diff --git a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/Button.kt b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/Button.kt index 7e3bfbbe2..3476ea400 100644 --- a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/Button.kt +++ b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/Button.kt @@ -38,7 +38,7 @@ fun MifosButton( modifier: Modifier = Modifier, enabled: Boolean = true, contentPadding: PaddingValues = ButtonDefaults.ContentPadding, - color: Color = MaterialTheme.colorScheme.onBackground, + color: Color = MaterialTheme.colorScheme.primary, content: @Composable RowScope.() -> Unit, ) { Button( diff --git a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/LoadingWheel.kt b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/LoadingWheel.kt index 3e7d350ef..f4b926c23 100644 --- a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/LoadingWheel.kt +++ b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/LoadingWheel.kt @@ -146,7 +146,7 @@ fun MfOverlayLoadingWheel(contentDesc: String = "Loading") { Box( modifier = Modifier .fillMaxSize() - .background(color = Color.Black.copy(alpha = 0.6f)) + .background(color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f)) .focusable(), contentAlignment = Alignment.Center ) { @@ -160,7 +160,7 @@ fun MfOverlayLoadingWheel(contentDesc: String = "Loading") { @Composable fun MfLoadingWheel( contentDesc: String = "Loading", - backgroundColor: Color = Color.Black.copy(alpha = 0.6f) + backgroundColor: Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.6f) ) { Box( modifier = Modifier diff --git a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/MifosTopBar.kt b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/MifosTopBar.kt index a3730ea3b..d14f1e49e 100644 --- a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/MifosTopBar.kt +++ b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/MifosTopBar.kt @@ -6,6 +6,7 @@ import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarDefaults @@ -26,7 +27,8 @@ fun MifosTopBar( title = { Text( text = stringResource(id = topBarTitle), - style = styleMifosTopBar + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.onSurface ) }, navigationIcon = { @@ -34,11 +36,11 @@ fun MifosTopBar( Icon( imageVector = Icons.Filled.ArrowBack, contentDescription = "Back", - tint = mifosText + tint = MaterialTheme.colorScheme.onSurface ) } }, - colors = TopAppBarDefaults.mediumTopAppBarColors(containerColor = Color.White), + colors = TopAppBarDefaults.mediumTopAppBarColors(containerColor = MaterialTheme.colorScheme.surface), actions = actions ) } \ No newline at end of file diff --git a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/OutlineTextField.kt b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/OutlineTextField.kt index 7df7a50a8..3377fc81c 100644 --- a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/OutlineTextField.kt +++ b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/OutlineTextField.kt @@ -3,6 +3,7 @@ package org.mifospay.core.designsystem.component import androidx.compose.foundation.Image import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextFieldDefaults import androidx.compose.material3.Text @@ -43,8 +44,8 @@ fun MifosOutlinedTextField( Image( painter = painterResource(id = icon), contentDescription = null, - colorFilter = if (isSystemInDarkTheme()) ColorFilter.tint(Color.White) else ColorFilter.tint( - Color.Black + colorFilter = ColorFilter.tint( + MaterialTheme.colorScheme.onSurface ) ) } @@ -53,11 +54,11 @@ fun MifosOutlinedTextField( maxLines = maxLines, singleLine = singleLine, colors = OutlinedTextFieldDefaults.colors( - focusedBorderColor = Color.Black, - focusedLabelColor = Color.Black + focusedBorderColor = MaterialTheme.colorScheme.onSurface, + focusedLabelColor = MaterialTheme.colorScheme.onSurface ), textStyle = LocalDensity.current.run { - TextStyle(fontSize = 18.sp, color = Color.Black) + TextStyle(fontSize = 18.sp, color = MaterialTheme.colorScheme.onSurface) }, keyboardOptions = keyboardOptions, visualTransformation = visualTransformation, diff --git a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/TextField.kt b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/TextField.kt index 516052c21..6adf88567 100644 --- a/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/TextField.kt +++ b/core/designsystem/src/main/kotlin/org/mifospay/core/designsystem/component/TextField.kt @@ -12,6 +12,7 @@ import androidx.compose.material.icons.filled.Visibility import androidx.compose.material.icons.filled.VisibilityOff import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextFieldDefaults import androidx.compose.material3.Text @@ -62,11 +63,11 @@ fun MfOutlinedTextField( }, keyboardOptions = keyboardOptions, colors = OutlinedTextFieldDefaults.colors( - focusedBorderColor = Color.Black, - focusedLabelColor = Color.Black + focusedBorderColor = MaterialTheme.colorScheme.onSurface, + focusedLabelColor = MaterialTheme.colorScheme.onSurface ), textStyle = LocalDensity.current.run { - TextStyle(fontSize = 18.sp, color = Color.Black) + TextStyle(fontSize = 18.sp, color = MaterialTheme.colorScheme.onSurface) } ) } @@ -133,10 +134,8 @@ fun MifosOutlinedTextField( Image( painter = painterResource(id = icon), contentDescription = null, - colorFilter = if (isSystemInDarkTheme()) { - ColorFilter.tint(Color.White) - } else ColorFilter.tint( - Color.Black + colorFilter = ColorFilter.tint( + MaterialTheme.colorScheme.onSurface ) ) } @@ -145,11 +144,11 @@ fun MifosOutlinedTextField( maxLines = maxLines, singleLine = singleLine, colors = OutlinedTextFieldDefaults.colors( - focusedBorderColor = Color.Black, - focusedLabelColor = Color.Black + focusedBorderColor = MaterialTheme.colorScheme.onSurface, + focusedLabelColor = MaterialTheme.colorScheme.onSurface ), textStyle = LocalDensity.current.run { - TextStyle(fontSize = 18.sp, color = Color.Black) + TextStyle(fontSize = 18.sp, color = MaterialTheme.colorScheme.onSurface) }, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), keyboardActions = keyboardActions, @@ -163,7 +162,7 @@ fun MifosOutlinedTextField( fun MfOutlinedTextFieldPreview() { MifosTheme { Box( - modifier = Modifier.background(color = Color.White) + modifier = Modifier.background(color = MaterialTheme.colorScheme.surface) ) { MfOutlinedTextField( modifier = Modifier, diff --git a/core/ui/src/main/kotlin/org/mifospay/core/ui/EmptyContentScreen.kt b/core/ui/src/main/kotlin/org/mifospay/core/ui/EmptyContentScreen.kt index 19bcbf83e..36003e39e 100644 --- a/core/ui/src/main/kotlin/org/mifospay/core/ui/EmptyContentScreen.kt +++ b/core/ui/src/main/kotlin/org/mifospay/core/ui/EmptyContentScreen.kt @@ -72,6 +72,7 @@ fun EmptyContentScreen( .padding(start = 24.dp, end = 24.dp), textAlign = TextAlign.Center, style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface ) } } @@ -82,7 +83,7 @@ fun EmptyContentScreen( modifier: Modifier = Modifier, title: String, subTitle: String, - iconTint: Color = LocalTintTheme.current.iconTint, + iconTint: Color = MaterialTheme.colorScheme.surfaceTint, iconDrawable: Int ) { EmptyContentScreen( @@ -105,7 +106,7 @@ fun EmptyContentScreen( modifier: Modifier = Modifier, title: String, subTitle: String, - iconTint: Color = LocalTintTheme.current.iconTint, + iconTint: Color = MaterialTheme.colorScheme.surfaceTint, iconImageVector: ImageVector = Icons.Rounded.Search ) { EmptyContentScreen( diff --git a/core/ui/src/main/kotlin/org/mifospay/core/ui/FaqItemScreen.kt b/core/ui/src/main/kotlin/org/mifospay/core/ui/FaqItemScreen.kt index 06cafbe84..954ea3c0d 100644 --- a/core/ui/src/main/kotlin/org/mifospay/core/ui/FaqItemScreen.kt +++ b/core/ui/src/main/kotlin/org/mifospay/core/ui/FaqItemScreen.kt @@ -51,7 +51,7 @@ fun FaqItemScreen( Text( text = question.orEmpty(), style = MaterialTheme.typography.bodyMedium.copy(fontWeight = FontWeight.Bold), - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .fillMaxWidth() .weight(1f), @@ -60,7 +60,7 @@ fun FaqItemScreen( Icon( imageVector = Icons.Default.ArrowDropDown, contentDescription = "drop down", - tint = Color.Black, + tint = MaterialTheme.colorScheme.onSurface, modifier = Modifier .scale(1f, if (isSelected) -1f else 1f) ) @@ -77,7 +77,7 @@ fun FaqItemScreen( Text( text = answer.orEmpty(), style = MaterialTheme.typography.bodyMedium, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, modifier = Modifier .fillMaxWidth() .padding(bottom = 8.dp) diff --git a/core/ui/src/main/kotlin/org/mifospay/core/ui/HeadingTitile.kt b/core/ui/src/main/kotlin/org/mifospay/core/ui/HeadingTitile.kt index 536b26946..4cc4e5790 100644 --- a/core/ui/src/main/kotlin/org/mifospay/core/ui/HeadingTitile.kt +++ b/core/ui/src/main/kotlin/org/mifospay/core/ui/HeadingTitile.kt @@ -6,6 +6,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Check import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -29,7 +30,7 @@ fun VerifyStepHeader(text: String, isVerified: Boolean) { ) { Text( text = text, - color = Color(0xFF212121), + color = MaterialTheme.colorScheme.onSurface, fontSize = 17.sp, overflow = TextOverflow.Ellipsis, modifier = Modifier @@ -45,7 +46,7 @@ fun VerifyStepHeader(text: String, isVerified: Boolean) { Icon( imageVector = Icons.Default.Check, contentDescription = null, - tint = if (isVerified) Color.Black else Color.Gray, + tint = if (isVerified) MaterialTheme.colorScheme.onSurface else Color.Gray, modifier = Modifier.size(24.dp) ) } diff --git a/core/ui/src/main/kotlin/org/mifospay/core/ui/ScrollableTabRow.kt b/core/ui/src/main/kotlin/org/mifospay/core/ui/ScrollableTabRow.kt index a215a689d..356c37bc5 100644 --- a/core/ui/src/main/kotlin/org/mifospay/core/ui/ScrollableTabRow.kt +++ b/core/ui/src/main/kotlin/org/mifospay/core/ui/ScrollableTabRow.kt @@ -1,6 +1,7 @@ package org.mifospay.core.ui import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.ScrollableTabRow import androidx.compose.material3.Tab import androidx.compose.material3.Text @@ -26,8 +27,8 @@ fun MifosScrollableTabRow( tabContents: List, pagerState: PagerState, modifier: Modifier = Modifier, - containerColor: Color = Color.White, - selectedContentColor: Color = Color.Black, + containerColor: Color = MaterialTheme.colorScheme.surface, + selectedContentColor: Color = MaterialTheme.colorScheme.onSurface, unselectedContentColor: Color = Color.LightGray, edgePadding: Dp = 8.dp ) { @@ -42,7 +43,8 @@ fun MifosScrollableTabRow( ) { tabContents.forEachIndexed { index, currentTab -> Tab( - text = { Text(text = currentTab.tabName) }, + text = { Text(text = currentTab.tabName, + color = MaterialTheme.colorScheme.onSurface) }, selected = pagerState.currentPage == index, selectedContentColor = selectedContentColor, unselectedContentColor = unselectedContentColor, diff --git a/core/ui/src/main/kotlin/org/mifospay/core/ui/TransactionItemScreen.kt b/core/ui/src/main/kotlin/org/mifospay/core/ui/TransactionItemScreen.kt index be0c466c2..4e5188d8d 100644 --- a/core/ui/src/main/kotlin/org/mifospay/core/ui/TransactionItemScreen.kt +++ b/core/ui/src/main/kotlin/org/mifospay/core/ui/TransactionItemScreen.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -48,7 +49,7 @@ fun TransactionItemScreen( } ), contentDescription = null, - colorFilter = ColorFilter.tint(Color.Black) + colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface) ) Column( modifier = Modifier @@ -60,7 +61,7 @@ fun TransactionItemScreen( style = TextStyle( fontSize = 14.sp, fontWeight = FontWeight(400), - color = Color(0xFF000000), + color = MaterialTheme.colorScheme.onSurface, ) ) diff --git a/core/ui/src/main/kotlin/org/mifospay/core/ui/utility/AddBtnChip.kt b/core/ui/src/main/kotlin/org/mifospay/core/ui/utility/AddBtnChip.kt index 61f1564d9..924f87048 100644 --- a/core/ui/src/main/kotlin/org/mifospay/core/ui/utility/AddBtnChip.kt +++ b/core/ui/src/main/kotlin/org/mifospay/core/ui/utility/AddBtnChip.kt @@ -31,7 +31,7 @@ fun AddCardChip( stringResource(text), style = MaterialTheme.typography.bodyLarge.copy( fontWeight = FontWeight.Bold, - color = Color.White + color = MaterialTheme.colorScheme.onPrimary ), modifier = Modifier.padding(horizontal = 8.dp) ) @@ -41,11 +41,11 @@ fun AddCardChip( Icons.Filled.Add, contentDescription = stringResource(btnText), modifier = Modifier.size(16.dp), - tint = Color.White + tint = MaterialTheme.colorScheme.onPrimary ) }, colors = AssistChipDefaults.assistChipColors( - containerColor = Color.Black + containerColor = MaterialTheme.colorScheme.primary ), ) } \ No newline at end of file diff --git a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsItem.kt b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsItem.kt index 3a732a4e9..24da4a6cb 100644 --- a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsItem.kt +++ b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsItem.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material3.CardDefaults import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -29,7 +30,7 @@ fun AccountsItem( ) { MifosCard( onClick = { onAccountClicked.invoke() }, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Column { Row( @@ -49,12 +50,13 @@ fun AccountsItem( Column { Text( text = bankAccountDetails.accountholderName.toString(), - color = mifosText, + color = MaterialTheme.colorScheme.onSurface, ) Text( text = bankAccountDetails.bankName.toString(), modifier = Modifier.padding(top = 4.dp), - style = styleMedium16sp.copy(mifosText) + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface ) } Column( @@ -65,7 +67,7 @@ fun AccountsItem( text = bankAccountDetails.branch.toString(), modifier = Modifier.padding(16.dp), fontSize = 12.sp, - color = mifosText + color = MaterialTheme.colorScheme.onSurface ) } } diff --git a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsScreen.kt b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsScreen.kt index 8202a3dcb..99a35843a 100644 --- a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsScreen.kt +++ b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/AccountsScreen.kt @@ -19,6 +19,7 @@ import androidx.compose.material.pullrefresh.PullRefreshIndicator import androidx.compose.material.pullrefresh.pullRefresh import androidx.compose.material.pullrefresh.rememberPullRefreshState import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -110,7 +111,7 @@ fun AccountScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = Icons.Rounded.Info ) } @@ -125,7 +126,7 @@ fun AccountScreen( Text( text = stringResource(id = R.string.linked_bank_account), fontSize = 16.sp, - color = colorResource(id = R.color.colorTextPrimary), + color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(top = 48.dp, start = 24.dp) ) } @@ -146,7 +147,7 @@ fun AccountScreen( modifier = Modifier .fillMaxWidth() .padding(16.dp) - .background(color = Color.White) + .background(MaterialTheme.colorScheme.surface) ) { AddCardChip( modifier = Modifier.align(Alignment.Center), @@ -162,7 +163,7 @@ fun AccountScreen( AccountsUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } diff --git a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/details/BankAccountDetailScreen.kt b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/details/BankAccountDetailScreen.kt index 5cf7956cb..d7544429e 100644 --- a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/details/BankAccountDetailScreen.kt +++ b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/details/BankAccountDetailScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.material.icons.filled.ChevronRight import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -70,7 +71,7 @@ fun BankAccountDetailScreen( Column( modifier = Modifier .padding(20.dp) - .border(2.dp, Color.Black) + .border(2.dp, MaterialTheme.colorScheme.onSurface) .padding(20.dp) ) { BankAccountDetailRows( @@ -148,9 +149,14 @@ fun BankAccountDetailRows( verticalAlignment = Alignment.CenterVertically ) { Text( - text = stringResource(id = detail), modifier = Modifier.padding(end = 10.dp) + text = stringResource(id = detail), + modifier = Modifier.padding(end = 10.dp), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface ) - Text(text = detailValue, style = styleMedium16sp) + Text(text = detailValue, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface) } } @@ -165,11 +171,10 @@ fun BankAccountDetailButton( if (isUpiEnabled) { Button( onClick = { onClick.invoke() }, - colors = ButtonDefaults.buttonColors(Color.White), + colors = ButtonDefaults.buttonColors(MaterialTheme.colorScheme.primary), modifier = modifier .padding(start = 20.dp, end = 20.dp), - contentPadding = PaddingValues(20.dp), - border = BorderStroke(2.dp, Color.Black) + contentPadding = PaddingValues(20.dp) ) { Row( modifier = modifier, @@ -178,13 +183,14 @@ fun BankAccountDetailButton( ) { Text( text = stringResource(id = btnText), - style = TextStyle(color = mifosText, fontSize = 18.sp) + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onPrimary ) if (hasTrailingIcon) { Icon( imageVector = Icons.Filled.ChevronRight, contentDescription = null, - tint = Color.Black + tint = MaterialTheme.colorScheme.onPrimary ) } } diff --git a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/link/LinkBankAccountScreen.kt b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/link/LinkBankAccountScreen.kt index 00d3d2eb3..f598df2b1 100644 --- a/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/link/LinkBankAccountScreen.kt +++ b/feature/accounts/src/main/kotlin/org/mifospay/feature/bank/accounts/link/LinkBankAccountScreen.kt @@ -107,7 +107,7 @@ fun LinkBankAccountScreen( ) { Scaffold( - modifier = Modifier.background(color = Color.White), + modifier = Modifier.background(color = MaterialTheme.colorScheme.surface), topBar = { MifosTopAppBar( titleRes = R.string.link_bank_account, @@ -115,7 +115,7 @@ fun LinkBankAccountScreen( navigationIconContentDescription = "Back icon", onNavigationClick = onBackClick, colors = TopAppBarDefaults.centerAlignedTopAppBarColors( - containerColor = Color.White, + containerColor = MaterialTheme.colorScheme.surface, ), ) }) { paddingValues -> @@ -126,7 +126,7 @@ fun LinkBankAccountScreen( is BankUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -156,7 +156,7 @@ fun BankListScreenContent( Column( modifier = Modifier .fillMaxSize() - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) .verticalScroll(rememberScrollState()) ) { MifosOutlinedTextField(modifier = Modifier @@ -176,7 +176,7 @@ fun BankListScreenContent( Spacer(modifier = Modifier.height(24.dp)) Text( text = stringResource(id = R.string.popular_banks), - style = TextStyle(Color.Black, fontWeight = FontWeight.Medium), + style = TextStyle(MaterialTheme.colorScheme.onSurface, fontWeight = FontWeight.Medium), modifier = Modifier.padding(start = 16.dp) ) Spacer(modifier = Modifier.height(12.dp)) @@ -187,7 +187,7 @@ fun BankListScreenContent( Spacer(modifier = Modifier.height(24.dp)) Text( text = stringResource(id = R.string.other_banks), - style = TextStyle(Color.Black, fontWeight = FontWeight.Medium), + style = TextStyle(MaterialTheme.colorScheme.onSurface, fontWeight = FontWeight.Medium), modifier = Modifier.padding(start = 16.dp) ) Spacer(modifier = Modifier.height(12.dp)) @@ -212,7 +212,7 @@ fun PopularBankGridBody( modifier = Modifier, shape = RoundedCornerShape(0.dp), elevation = 2.dp, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { FlowRow( modifier = Modifier, diff --git a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/login/LoginScreen.kt b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/login/LoginScreen.kt index e05b562df..f652b31b6 100644 --- a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/login/LoginScreen.kt +++ b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/login/LoginScreen.kt @@ -21,6 +21,7 @@ import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -113,14 +114,15 @@ fun LoginScreenContent( Column( modifier = Modifier .fillMaxWidth() - .background(Color.White) + .background(MaterialTheme.colorScheme.surface) .verticalScroll(rememberScrollState()) .padding(top = 100.dp, start = 48.dp, end = 48.dp), horizontalAlignment = Alignment.Start ) { Text( text = stringResource(id = R.string.feature_auth_login), - style = styleMedium30sp + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.primary ) Text( modifier = Modifier @@ -161,7 +163,7 @@ fun LoginScreenContent( modifier = Modifier .fillMaxWidth() .padding(top = 16.dp), - colors = ButtonDefaults.buttonColors(containerColor = Color.Black), + colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.primary), enabled = userName.text.isNotEmpty() && password.text.isNotEmpty(), onClick = { login.invoke(userName.text, password.text) @@ -170,7 +172,8 @@ fun LoginScreenContent( ) { Text( text = stringResource(id = R.string.feature_auth_login).uppercase(), - style = styleMedium16sp.copy(color = Color.White) + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onPrimary ) } // Hide reset password for now @@ -200,14 +203,15 @@ fun LoginScreenContent( ) { Text( text = "Don’t have an account yet? ", - style = styleMedium16sp + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onSurface ) Text( modifier = Modifier.clickable { showSignUpScreen = true }, text = stringResource(id = R.string.feature_auth_sign_up), - style = styleMedium16sp.copy( + style = MaterialTheme.typography.titleMedium.copy( textDecoration = TextDecoration.Underline, ), ) diff --git a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/mobile_verify/MobileVerificationScreen.kt b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/mobile_verify/MobileVerificationScreen.kt index 7f9da809d..b9d27c288 100644 --- a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/mobile_verify/MobileVerificationScreen.kt +++ b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/mobile_verify/MobileVerificationScreen.kt @@ -102,7 +102,7 @@ fun MobileVerificationScreen( Column( modifier = Modifier .fillMaxWidth() - .background(color = MaterialTheme.colorScheme.onBackground), + .background(color = MaterialTheme.colorScheme.primary), verticalArrangement = Arrangement.Top ) { Text( @@ -112,7 +112,7 @@ fun MobileVerificationScreen( } else { stringResource(id = R.string.feature_auth_enter_otp) }, - style = MaterialTheme.typography.titleLarge.copy(color = Color.White) + style = MaterialTheme.typography.titleLarge.copy(color = MaterialTheme.colorScheme.onPrimary) ) Text( modifier = Modifier.padding( @@ -123,7 +123,8 @@ fun MobileVerificationScreen( } else { stringResource(id = R.string.feature_auth_enter_otp_received_on_your_registered_device) }, - style = MaterialTheme.typography.bodySmall.copy(color = Color.White) + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onPrimary ) } @@ -157,7 +158,7 @@ fun MobileVerificationScreen( modifier = Modifier .fillMaxWidth() .padding(horizontal = 32.dp, vertical = 16.dp), - colors = ButtonDefaults.buttonColors(containerColor = Color.Black), + colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.primary), enabled = if (uiState == MobileVerificationUiState.VerifyPhone) { isNumberValid } else { @@ -171,7 +172,8 @@ fun MobileVerificationScreen( stringResource(id = R.string.feature_auth_verify_phone).uppercase() } else { stringResource(id = R.string.feature_auth_verify_otp).uppercase() - }, style = styleMedium16sp.copy(color = Color.White) + }, style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onPrimary ) } } @@ -231,7 +233,7 @@ fun ShowProgressScreen( Box( modifier = Modifier .fillMaxSize() - .background(color = Color.Black.copy(alpha = 0.6f)) + .background(color = MaterialTheme.colorScheme.primary.copy(alpha = 0.6f)) .focusable(), contentAlignment = Alignment.Center ) { diff --git a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt index 6fd58e951..bd35bf1f1 100644 --- a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt +++ b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/signup/SignupScreen.kt @@ -152,20 +152,20 @@ fun SignupScreen( Column( modifier = Modifier .fillMaxSize() - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) .verticalScroll(rememberScrollState()) .focusable(!showProgressState), ) { Column( modifier = Modifier .fillMaxWidth() - .background(color = MaterialTheme.colorScheme.onBackground), + .background(color = MaterialTheme.colorScheme.primary), verticalArrangement = Arrangement.Top ) { Text( modifier = Modifier.padding(top = 48.dp, start = 24.dp, end = 24.dp), text = stringResource(id = R.string.feature_auth_complete_your_registration), - style = MaterialTheme.typography.titleLarge.copy(color = Color.White) + style = MaterialTheme.typography.titleLarge.copy(color = MaterialTheme.colorScheme.onPrimary) ) Text( modifier = Modifier.padding( @@ -278,7 +278,7 @@ fun SignupScreen( modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp), - colors = ButtonDefaults.buttonColors(containerColor = Color.Black), + colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.primary), enabled = true, onClick = { validateAllFields() @@ -288,7 +288,7 @@ fun SignupScreen( ) { Text( text = stringResource(id = R.string.feature_auth_complete), - style = styleMedium16sp.copy(color = Color.White) + style = styleMedium16sp.copy(color = MaterialTheme.colorScheme.onPrimary) ) } } diff --git a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/social_signup/SocialSignupMethodScreen.kt b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/social_signup/SocialSignupMethodScreen.kt index 753d05765..be358b0fa 100644 --- a/feature/auth/src/main/kotlin/org/mifospay/feature/auth/social_signup/SocialSignupMethodScreen.kt +++ b/feature/auth/src/main/kotlin/org/mifospay/feature/auth/social_signup/SocialSignupMethodScreen.kt @@ -190,7 +190,7 @@ fun SignupMethodContentScreen( Column( modifier = Modifier .fillMaxSize() - .background(color = Color.White), + .background(color = MaterialTheme.colorScheme.surface), horizontalAlignment = Alignment.CenterHorizontally ) { Text( @@ -204,7 +204,7 @@ fun SignupMethodContentScreen( }, border = BorderStroke(1.dp, Color.LightGray), shape = RoundedCornerShape(4.dp), - colors = ButtonDefaults.outlinedButtonColors(contentColor = Color.Black) + colors = ButtonDefaults.outlinedButtonColors(contentColor = MaterialTheme.colorScheme.primary) ) { Text( text = stringResource(id = R.string.feature_auth_sign_up_as_merchant).uppercase(), @@ -243,7 +243,7 @@ fun SignupMethodContentScreen( }, border = BorderStroke(1.dp, Color.LightGray), shape = RoundedCornerShape(4.dp), - colors = ButtonDefaults.outlinedButtonColors(contentColor = Color.Black) + colors = ButtonDefaults.outlinedButtonColors(contentColor = MaterialTheme.colorScheme.primary) ) { Text( text = stringResource(id = R.string.feature_auth_sign_up_as_customer).uppercase(), @@ -263,7 +263,7 @@ fun SignupMethodContentScreen( onCheckedChange = { checkedGoogleAccountState = !checkedGoogleAccountState }, - colors = CheckboxDefaults.colors(Color.Black) + colors = CheckboxDefaults.colors(MaterialTheme.colorScheme.primary) ) Text( text = stringResource(id = R.string.feature_auth_ease_my_sign_up_using_google_account), diff --git a/feature/history/src/main/kotlin/org/mifospay/feature/history/HistoryScreen.kt b/feature/history/src/main/kotlin/org/mifospay/feature/history/HistoryScreen.kt index 46f7f5770..eb220fdac 100644 --- a/feature/history/src/main/kotlin/org/mifospay/feature/history/HistoryScreen.kt +++ b/feature/history/src/main/kotlin/org/mifospay/feature/history/HistoryScreen.kt @@ -16,6 +16,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -78,7 +79,7 @@ fun HistoryScreen( modifier = Modifier, title = stringResource(id = R.string.feature_history_error_oops), subTitle = stringResource(id = R.string.feature_history_empty_no_transaction_history_title), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -88,7 +89,7 @@ fun HistoryScreen( modifier = Modifier, title = stringResource(id = R.string.feature_history_error_oops), subTitle = stringResource(id = R.string.feature_history_unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -173,12 +174,12 @@ fun Chip(selected: Boolean, onClick: () -> Unit, label: String) { onClick() Toast.makeText(context, label, Toast.LENGTH_SHORT).show() }, - colors = ButtonDefaults.buttonColors(backgroundColor) + colors = ButtonDefaults.buttonColors(if (selected) MaterialTheme.colorScheme.primary else lightGrey) ) { Text( modifier = Modifier.padding(top = 4.dp, bottom = 4.dp, start = 16.dp, end = 16.dp), text = label, - color = Color.Black + color = if (selected) MaterialTheme.colorScheme.onPrimary else MaterialTheme.colorScheme.onSurface ) } } diff --git a/feature/history/src/main/kotlin/org/mifospay/feature/specific/transactions/SpecificTransactionsScreen.kt b/feature/history/src/main/kotlin/org/mifospay/feature/specific/transactions/SpecificTransactionsScreen.kt index 990b6a311..7c48f282d 100644 --- a/feature/history/src/main/kotlin/org/mifospay/feature/specific/transactions/SpecificTransactionsScreen.kt +++ b/feature/history/src/main/kotlin/org/mifospay/feature/specific/transactions/SpecificTransactionsScreen.kt @@ -88,7 +88,7 @@ fun SpecificTransactionsScreen( SpecificTransactionsUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -98,7 +98,7 @@ fun SpecificTransactionsScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.no_transactions_found), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = Icons.Rounded.Info ) } else { @@ -167,7 +167,7 @@ fun SpecificTransactionItem( Text( text = stringResource(id = R.string.transaction_id) + transaction.transactionId, style = MaterialTheme.typography.bodyLarge, - color = primaryDarkBlue + color = MaterialTheme.colorScheme.primary ) Text( text = stringResource(id = R.string.date) + transaction.date, diff --git a/feature/history/src/main/kotlin/org/mifospay/feature/transaction/detail/TransactionDetailScreen.kt b/feature/history/src/main/kotlin/org/mifospay/feature/transaction/detail/TransactionDetailScreen.kt index 983024e2b..b451b6ef6 100644 --- a/feature/history/src/main/kotlin/org/mifospay/feature/transaction/detail/TransactionDetailScreen.kt +++ b/feature/history/src/main/kotlin/org/mifospay/feature/transaction/detail/TransactionDetailScreen.kt @@ -116,7 +116,7 @@ fun TransactionsDetailContent( Text( text = stringResource(id = R.string.transaction_id) + transaction.transactionId, style = MaterialTheme.typography.bodyLarge, - color = primaryDarkBlue + color = MaterialTheme.colorScheme.primary ) Text( text = stringResource(id = R.string.date) + transaction.date, @@ -162,7 +162,7 @@ fun TransactionsDetailContent( Text( text = stringResource(id = R.string.view_receipt), style = MaterialTheme.typography.bodyLarge, - color = primaryDarkBlue, + color = MaterialTheme.colorScheme.primary, textAlign = TextAlign.Center, modifier = Modifier.clickable { viewReceipt() } ) diff --git a/feature/home/src/main/kotlin/org/mifospay/feature/home/HomeScreen.kt b/feature/home/src/main/kotlin/org/mifospay/feature/home/HomeScreen.kt index 6a96b6a33..eb2128eb7 100644 --- a/feature/home/src/main/kotlin/org/mifospay/feature/home/HomeScreen.kt +++ b/feature/home/src/main/kotlin/org/mifospay/feature/home/HomeScreen.kt @@ -20,6 +20,7 @@ import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -63,7 +64,7 @@ fun HomeRoute( is HomeUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -100,7 +101,7 @@ fun HomeScreen( modifier = Modifier .fillMaxWidth() - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) .padding(start = 32.dp, end = 32.dp), ) { item { @@ -117,7 +118,8 @@ fun HomeScreen( Text( modifier = Modifier.padding(top = 32.dp), text = "Recent Transactions", - style = styleMedium16sp + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(16.dp)) } @@ -138,7 +140,7 @@ fun MifosWalletCardScreen(account: Account?) { .fillMaxWidth() .height(225.dp) .padding(top = 20.dp, bottom = 32.dp), - colors = CardDefaults.cardColors(containerColor = Color.Black) + colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.onSurface) ) { Column( modifier = Modifier @@ -166,7 +168,7 @@ fun MifosWalletCardScreen(account: Account?) { style = TextStyle( fontSize = 42.sp, fontWeight = FontWeight(600), - color = Color.White + color = MaterialTheme.colorScheme.surface ) ) Spacer(modifier = Modifier.height(10.dp)) @@ -224,7 +226,7 @@ fun PayCard( .height(144.dp) .clickable { onClickCard.invoke() }, border = BorderStroke(1.dp, border), - colors = CardDefaults.cardColors(containerColor = Color.White) + colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surface) ) { Column( modifier = Modifier @@ -235,14 +237,14 @@ fun PayCard( Box( modifier = Modifier .size(40.dp) - .background(Color.Black, shape = RoundedCornerShape(4.dp)), + .background(MaterialTheme.colorScheme.onSurface, shape = RoundedCornerShape(4.dp)), contentAlignment = Alignment.Center ) { Image( modifier = Modifier.size(20.dp), painter = painterResource(id = icon), contentDescription = null, - colorFilter = ColorFilter.tint(Color.White) + colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.surface) ) } Text(text = title) diff --git a/feature/invoices/src/main/kotlin/org/mifospay/feature/invoices/InvoiceDetailScreen.kt b/feature/invoices/src/main/kotlin/org/mifospay/feature/invoices/InvoiceDetailScreen.kt index 2369479cf..da9a7700a 100644 --- a/feature/invoices/src/main/kotlin/org/mifospay/feature/invoices/InvoiceDetailScreen.kt +++ b/feature/invoices/src/main/kotlin/org/mifospay/feature/invoices/InvoiceDetailScreen.kt @@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -67,7 +68,7 @@ fun InvoiceDetailScreen( Column( modifier = Modifier .fillMaxSize() - .background(Color.White) + .background(MaterialTheme.colorScheme.surface) .padding(it) ) { when (invoiceDetailUiState) { @@ -190,13 +191,13 @@ fun InvoiceDetailsContent(invoice: Invoice?, merchantId: String?, paymentLink: S ) { Text( text = stringResource(id = R.string.feature_invoices_transaction_id), - color = primaryDarkBlue, + color = MaterialTheme.colorScheme.primary, modifier = Modifier .padding(top = 10.dp) ) Text( text = invoice.transactionId ?: "", - color = primaryDarkBlue, + color = MaterialTheme.colorScheme.primary, modifier = Modifier .padding(top = 10.dp) .then(Modifier.height(0.dp)) @@ -210,7 +211,7 @@ fun InvoiceDetailsContent(invoice: Invoice?, merchantId: String?, paymentLink: S ) Text( text = invoice.transactionId ?: "", - color = primaryDarkBlue, + color = MaterialTheme.colorScheme.primary, modifier = Modifier .padding(top = 10.dp) .pointerInput(Unit) { @@ -263,7 +264,7 @@ fun InvoiceDetailsContent(invoice: Invoice?, merchantId: String?, paymentLink: S ) { Text( text = paymentLink.toString(), - color = primaryDarkBlue, + color = MaterialTheme.colorScheme.primary, modifier = Modifier .padding(top = 10.dp) .pointerInput(Unit) { diff --git a/feature/kyc/src/main/kotlin/org/mifospay/feature/kyc/KYCDescriptionScreen.kt b/feature/kyc/src/main/kotlin/org/mifospay/feature/kyc/KYCDescriptionScreen.kt index 8e21cfbec..9c9b28625 100644 --- a/feature/kyc/src/main/kotlin/org/mifospay/feature/kyc/KYCDescriptionScreen.kt +++ b/feature/kyc/src/main/kotlin/org/mifospay/feature/kyc/KYCDescriptionScreen.kt @@ -207,13 +207,13 @@ fun ButtonComponent( contentPadding = PaddingValues(), colors = ButtonDefaults.buttonColors( containerColor = when { - completed -> Color.White - enabled -> Color.Blue + completed -> MaterialTheme.colorScheme.onPrimary + enabled -> MaterialTheme.colorScheme.primary else -> Color.Gray }, contentColor = when { - completed -> Color.Blue - enabled -> Color.White + completed -> MaterialTheme.colorScheme.primary + enabled -> MaterialTheme.colorScheme.onPrimary else -> Color.Gray } ), diff --git a/feature/make-transfer/src/main/kotlin/org/mifospay/feature/make/transfer/MakeTransferScreen.kt b/feature/make-transfer/src/main/kotlin/org/mifospay/feature/make/transfer/MakeTransferScreen.kt index f456bf72e..f63a175eb 100644 --- a/feature/make-transfer/src/main/kotlin/org/mifospay/feature/make/transfer/MakeTransferScreen.kt +++ b/feature/make-transfer/src/main/kotlin/org/mifospay/feature/make/transfer/MakeTransferScreen.kt @@ -179,7 +179,7 @@ fun MakeTransferContent( style = TextStyle( fontSize = 24.sp, fontWeight = FontWeight.Bold, - color = Color.Black + color = MaterialTheme.colorScheme.onSurface ), modifier = Modifier .padding(vertical = 10.dp) @@ -199,7 +199,7 @@ fun MakeTransferContent( Text( text = stringResource(id = R.string.feature_make_transfer_sending_to) + Constants.COLON, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyMedium.fontSize ) ) @@ -209,7 +209,7 @@ fun MakeTransferContent( Text( text = resultName, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -219,7 +219,7 @@ fun MakeTransferContent( Text( text = externalId, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -229,7 +229,7 @@ fun MakeTransferContent( Text( text = stringResource(id = R.string.feature_make_transfer_amount) + Constants.COLON, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyMedium.fontSize ) ) @@ -239,7 +239,7 @@ fun MakeTransferContent( Text( text = transferAmount.toString(), style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -307,7 +307,7 @@ fun TransactionStatusContent(showTransactionStatus: ShowTransactionStatus) { style = TextStyle( fontSize = 24.sp, fontWeight = FontWeight.Bold, - color = Color.Black + color = MaterialTheme.colorScheme.onSurface ), modifier = Modifier .padding(vertical = 10.dp) diff --git a/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantScreen.kt b/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantScreen.kt index e4daad704..6b04b3770 100644 --- a/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantScreen.kt +++ b/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantScreen.kt @@ -19,6 +19,7 @@ import androidx.compose.material.pullrefresh.rememberPullRefreshState import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.SearchBar import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -78,7 +79,7 @@ fun MerchantScreen( modifier = Modifier, title = stringResource(id = R.string.empty_no_merchants_title), subTitle = stringResource(id = R.string.empty_no_merchants_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = Icons.Rounded.Info ) } @@ -88,7 +89,7 @@ fun MerchantScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = Icons.Rounded.Info ) } @@ -96,7 +97,7 @@ fun MerchantScreen( MerchantUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } diff --git a/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantsItem.kt b/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantsItem.kt index 776ead9b4..df41fcd3a 100644 --- a/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantsItem.kt +++ b/feature/merchants/src/main/kotlin/org/mifospay/feature/merchants/MerchantsItem.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.size import androidx.compose.material3.CardDefaults import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -39,7 +40,7 @@ fun MerchantsItem( ) }, onClick = { onMerchantClicked.invoke() }, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Column { Row( @@ -59,7 +60,7 @@ fun MerchantsItem( Column { Text( text = savingsWithAssociations.clientName, - color = mifosText, + color = MaterialTheme.colorScheme.onSurface, ) Text( text = savingsWithAssociations.externalId, diff --git a/feature/notification/src/main/kotlin/org/mifospay/feature/notification/NotificationScreen.kt b/feature/notification/src/main/kotlin/org/mifospay/feature/notification/NotificationScreen.kt index 7b9819857..87c4baff1 100644 --- a/feature/notification/src/main/kotlin/org/mifospay/feature/notification/NotificationScreen.kt +++ b/feature/notification/src/main/kotlin/org/mifospay/feature/notification/NotificationScreen.kt @@ -13,6 +13,7 @@ import androidx.compose.material.pullrefresh.PullRefreshIndicator import androidx.compose.material.pullrefresh.pullRefresh import androidx.compose.material.pullrefresh.rememberPullRefreshState import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -68,7 +69,7 @@ fun NotificationScreen( modifier = Modifier, title = stringResource(id = R.string.feature_notification_error_oops), subTitle = stringResource(id = R.string.feature_notification_unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = MifosIcons.RoundedInfo ) } @@ -76,7 +77,7 @@ fun NotificationScreen( NotificationUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.feature_notification_loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -86,7 +87,7 @@ fun NotificationScreen( modifier = Modifier, title = stringResource(R.string.feature_notification_nothing_to_notify), subTitle = stringResource(R.string.feature_notification_there_is_nothing_to_show), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = MifosIcons.RoundedInfo ) } else { @@ -117,7 +118,8 @@ fun NotificationListItem(title: String, body: String, timestamp: String) { modifier = Modifier .fillMaxWidth() .padding(8.dp), - shape = RoundedCornerShape(12.dp) + shape = RoundedCornerShape(12.dp), + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.primaryContainer) ) { Column( modifier = Modifier @@ -127,18 +129,21 @@ fun NotificationListItem(title: String, body: String, timestamp: String) { Text( text = title, style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onPrimaryContainer, modifier = Modifier .fillMaxWidth() .padding(bottom = 8.dp) ) Text( text = body, style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onPrimaryContainer, modifier = Modifier .fillMaxWidth() .padding(bottom = 8.dp) ) Text( text = timestamp, style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onPrimaryContainer, modifier = Modifier .fillMaxWidth() .padding(bottom = 8.dp) diff --git a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileItemCard.kt b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileItemCard.kt index 56f1b4506..945dea06f 100644 --- a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileItemCard.kt +++ b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileItemCard.kt @@ -44,7 +44,7 @@ fun ProfileItemCard( painter = rememberVectorPainter(icon), modifier = Modifier.size(32.dp), contentDescription = null, - tint = Color.Black + tint = MaterialTheme.colorScheme.onSurface ) Text( modifier = if (text == R.string.edit_profile || text == R.string.settings) Modifier @@ -53,7 +53,8 @@ fun ProfileItemCard( ) .align(Alignment.CenterVertically) else Modifier, text = stringResource(id = text), - style = TextStyle(fontSize = 18.sp, fontWeight = FontWeight.Medium) + style = TextStyle(fontSize = 18.sp, fontWeight = FontWeight.Medium), + color = MaterialTheme.colorScheme.onSurface ) if (text == R.string.edit_profile || text == R.string.settings) { Spacer(modifier = Modifier.fillMaxWidth()) diff --git a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileScreen.kt b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileScreen.kt index ce78de19a..4fd2064f7 100644 --- a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileScreen.kt +++ b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/ProfileScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowDropDown import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -79,11 +80,12 @@ fun ProfileScreenContent( Text( text = profileState.name.toString(), style = TextStyle(fontSize = 24.sp, fontWeight = FontWeight.Medium), + color = MaterialTheme.colorScheme.onSurface ) IconButton(onClick = { showDetails = !showDetails }) { Icon( imageVector = Icons.Default.ArrowDropDown, - tint = Color.Black, + tint = MaterialTheme.colorScheme.onSurface, contentDescription = null ) } diff --git a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreen.kt b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreen.kt index 464b785d2..123b2946a 100644 --- a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreen.kt +++ b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreen.kt @@ -26,6 +26,7 @@ import androidx.compose.material.TextFieldDefaults import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -123,7 +124,7 @@ fun EditProfileScreen( EditProfileUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -244,7 +245,7 @@ fun EditProfileScreenContent( Column( modifier = Modifier .fillMaxSize() - .background(Color.White) + .background(color = MaterialTheme.colorScheme.surface,) .verticalScroll(rememberScrollState()) ) { EditProfileScreenImage( @@ -289,7 +290,7 @@ fun EditProfileScreenContent( autoDetectCode = true, shape = RoundedCornerShape(3.dp), colors = TextFieldDefaults.outlinedTextFieldColors( - focusedBorderColor = Color.Black + focusedBorderColor = MaterialTheme.colorScheme.onSurface, ), onValueChange = { (code, phone), isValid -> if (isValid) { @@ -336,7 +337,7 @@ fun EditProfileBottomSheetContent( ) { Column( modifier = Modifier - .background(Color.White) + .background(MaterialTheme.colorScheme.surface) .padding(top = 8.dp, bottom = 12.dp) ) { Row( @@ -388,14 +389,14 @@ fun EditProfileBottomSheetContent( fun EditProfileSaveButton(onClick: () -> Unit, buttonText: Int) { Button( onClick = { onClick.invoke() }, - colors = ButtonDefaults.buttonColors(Color.Black), + colors = ButtonDefaults.buttonColors(MaterialTheme.colorScheme.primary), modifier = Modifier .fillMaxWidth() .padding(16.dp), shape = RoundedCornerShape(10.dp), contentPadding = PaddingValues(12.dp) ) { - Text(text = stringResource(id = buttonText), style = styleMedium16sp.copy(Color.White)) + Text(text = stringResource(id = buttonText), style = styleMedium16sp.copy(MaterialTheme.colorScheme.onPrimary)) } } diff --git a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreenImage.kt b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreenImage.kt index c3eb7f3c5..9a160dc56 100644 --- a/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreenImage.kt +++ b/feature/profile/src/main/kotlin/org/mifospay/feature/profile/edit/EditProfileScreenImage.kt @@ -11,6 +11,7 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.IconButtonDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -36,7 +37,7 @@ fun EditProfileScreenImage(imageUri: Uri?, onCameraIconClick: () -> Unit) { .padding(top = 32.dp) .size(200.dp) .clip(CircleShape) - .border(2.dp, Color.Black, CircleShape), + .border(2.dp, MaterialTheme.colorScheme.primary, CircleShape), contentAlignment = Alignment.Center ) { AsyncImage( @@ -54,14 +55,14 @@ fun EditProfileScreenImage(imageUri: Uri?, onCameraIconClick: () -> Unit) { .size(48.dp) .clip(CircleShape) .align(Alignment.BottomEnd), - colors = IconButtonDefaults.iconButtonColors(Color.Black) + colors = IconButtonDefaults.iconButtonColors(MaterialTheme.colorScheme.primary) ) { Icon( painter = rememberVectorPainter(MifosIcons.Camera), contentDescription = null, modifier = Modifier .size(24.dp), - tint = Color.White + tint = MaterialTheme.colorScheme.onPrimary ) } } diff --git a/feature/qr/src/main/kotlin/org/mifospay/feature/read/qr/ReadQrScreen.kt b/feature/qr/src/main/kotlin/org/mifospay/feature/read/qr/ReadQrScreen.kt index cb1ceec78..d087e0ddf 100644 --- a/feature/qr/src/main/kotlin/org/mifospay/feature/read/qr/ReadQrScreen.kt +++ b/feature/qr/src/main/kotlin/org/mifospay/feature/read/qr/ReadQrScreen.kt @@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -115,7 +116,7 @@ fun ReadQrScreen( is ReadQrUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.feature_qr_loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -128,7 +129,7 @@ fun ReadQrScreen( modifier = Modifier, title = stringResource(R.string.feature_qr_oops), subTitle = stringResource(id = R.string.feature_qr_unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = MifosIcons.Info ) } diff --git a/feature/receipt/src/main/kotlin/org/mifospay/feature/receipt/ReceiptScreen.kt b/feature/receipt/src/main/kotlin/org/mifospay/feature/receipt/ReceiptScreen.kt index bf9c6a718..7ed47d009 100644 --- a/feature/receipt/src/main/kotlin/org/mifospay/feature/receipt/ReceiptScreen.kt +++ b/feature/receipt/src/main/kotlin/org/mifospay/feature/receipt/ReceiptScreen.kt @@ -172,7 +172,7 @@ fun ReceiptScreenContent( needToHandlePermissions = true } }, - contentColor = Color.Black, + contentColor = MaterialTheme.colorScheme.onSurface, content = { Icon( painter = painterResource(id = R.drawable.feature_receipt_ic_download), @@ -343,7 +343,7 @@ fun ReceiptHeaderBody( Text( text = transaction.amount.toString(), style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.headlineLarge.fontSize ), modifier = centerWithPaddingModifier.padding(top = 10.dp) @@ -404,7 +404,7 @@ fun ReceiptDetailsBody( Text( text = transaction.transactionId.toString(), style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -421,7 +421,7 @@ fun ReceiptDetailsBody( Text( text = transaction.date.toString(), style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -438,14 +438,14 @@ fun ReceiptDetailsBody( Text( text = stringResource(R.string.feature_receipt_name) + transferDetail.toClient.displayName, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) Text( text = stringResource(R.string.feature_receipt_account_no) + transferDetail.toAccount.accountNo, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -462,14 +462,14 @@ fun ReceiptDetailsBody( Text( text = stringResource(R.string.feature_receipt_name) + transferDetail.fromClient.displayName, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) Text( text = stringResource(R.string.feature_receipt_account_no) + transferDetail.fromAccount.accountNo, style = TextStyle( - Color.Black, + MaterialTheme.colorScheme.onSurface, MaterialTheme.typography.bodyLarge.fontSize ) ) @@ -512,7 +512,7 @@ fun ReceiptLinkActions( Text( text = receiptLink, style = TextStyle( - Color.Blue, + MaterialTheme.colorScheme.primary, MaterialTheme.typography.bodyMedium.fontSize ) ) @@ -527,7 +527,7 @@ fun ReceiptLinkActions( .clickable { copyToClipboard(context, receiptLink) }, - tint = Color.Black + tint = MaterialTheme.colorScheme.onSurface ) Icon( @@ -539,7 +539,7 @@ fun ReceiptLinkActions( .clickable { shareReceiptMessage(prepareShareMessage, context) }, - tint = Color.Black + tint = MaterialTheme.colorScheme.onSurface ) } } diff --git a/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/PayVpaMobileScreen.kt b/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/PayVpaMobileScreen.kt index a9e0168e4..bd4e4db2d 100644 --- a/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/PayVpaMobileScreen.kt +++ b/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/PayVpaMobileScreen.kt @@ -5,8 +5,10 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextField +import androidx.compose.material3.TextFieldDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue @@ -47,10 +49,12 @@ fun PayVpsMobileScreen() { .fillMaxWidth() .padding(top = 32.dp), value = amount, + colors = TextFieldDefaults.colors(MaterialTheme.colorScheme.surface), onValueChange = { amount = it }, - label = { Text("Amount") } + label = { Text(text = "Amount", + color = MaterialTheme.colorScheme.onSurface) } ) TextField( modifier = Modifier @@ -60,19 +64,20 @@ fun PayVpsMobileScreen() { onValueChange = { description = it }, - label = { Text("Description") } + label = { Text(text = "Description", + color = MaterialTheme.colorScheme.onSurface) } ) Button( modifier = Modifier .fillMaxWidth() .padding(top = 16.dp), - colors = ButtonDefaults.buttonColors(containerColor = Color.Black), + colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.primary), enabled = amount.isNotEmpty() && description.isNotEmpty(), onClick = { } ) { - Text(text = "Create Payment Request", style = styleMedium16sp.copy(color = Color.White)) + Text(text = "Create Payment Request", style = styleMedium16sp.copy(color = MaterialTheme.colorScheme.onPrimary)) } } } diff --git a/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/SetAmountDialog.kt b/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/SetAmountDialog.kt index 42242390f..07d865644 100644 --- a/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/SetAmountDialog.kt +++ b/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/SetAmountDialog.kt @@ -84,13 +84,14 @@ fun SetAmountDialog( content = { Surface( shape = RoundedCornerShape(16.dp), - color = Color.White + color = MaterialTheme.colorScheme.surface ) { Column(modifier = Modifier.padding(16.dp)) { Text( text = stringResource(id = R.string.feature_request_money_set_amount), - style = MaterialTheme.typography.titleMedium + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(8.dp)) diff --git a/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/ShowQrScreenRoute.kt b/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/ShowQrScreenRoute.kt index 584a3a8db..4e238a27f 100644 --- a/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/ShowQrScreenRoute.kt +++ b/feature/request-money/src/main/kotlin/org/mifospay/feature/request/money/ShowQrScreenRoute.kt @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.padding import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect @@ -80,7 +81,7 @@ fun ShowQrScreen( is ShowQrUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.feature_request_money_loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -90,7 +91,7 @@ fun ShowQrScreen( modifier = Modifier, title = stringResource(R.string.feature_request_money_nothing_to_notify), subTitle = stringResource(R.string.feature_request_money_there_is_nothing_to_show), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = MifosIcons.Info ) } else { @@ -109,7 +110,7 @@ fun ShowQrScreen( modifier = Modifier, title = stringResource(id = R.string.feature_request_money_error_oops), subTitle = stringResource(id = R.string.feature_request_money_unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.onSurface, iconImageVector = MifosIcons.Info ) } diff --git a/feature/savedcards/src/main/kotlin/org/mifospay/feature/savedcards/CardsScreen.kt b/feature/savedcards/src/main/kotlin/org/mifospay/feature/savedcards/CardsScreen.kt index 7121432c0..e9667f2a8 100644 --- a/feature/savedcards/src/main/kotlin/org/mifospay/feature/savedcards/CardsScreen.kt +++ b/feature/savedcards/src/main/kotlin/org/mifospay/feature/savedcards/CardsScreen.kt @@ -18,6 +18,7 @@ import androidx.compose.material.icons.filled.Close import androidx.compose.material.icons.filled.Search import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.ExperimentalMaterial3Api @@ -25,6 +26,7 @@ import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.SearchBar +import androidx.compose.material3.SearchBarDefaults import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -128,7 +130,7 @@ fun CardsScreen( CardsUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.feature_savedcards_loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -141,7 +143,7 @@ fun CardsScreen( modifier = Modifier, title = stringResource(id = R.string.feature_savedcards_error_oops), subTitle = stringResource(id = R.string.feature_savedcards_unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -224,7 +226,7 @@ fun CardsScreenContent( .fillMaxWidth() .height(56.dp) .align(Alignment.BottomCenter) - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) ) { AddCardChip( modifier = Modifier.align(Alignment.Center), @@ -249,12 +251,14 @@ fun SearchBarScreen( .fillMaxWidth() .padding(vertical = 16.dp, horizontal = 16.dp), query = query, + colors = SearchBarDefaults.colors(MaterialTheme.colorScheme.primaryContainer), onQueryChange = onQueryChange, onSearch = onSearch, active = false, onActiveChange = { }, placeholder = { - Text(text = stringResource(R.string.feature_savedcards_search)) + Text(text = stringResource(R.string.feature_savedcards_search), + color = MaterialTheme.colorScheme.onPrimaryContainer) }, leadingIcon = { Icon( @@ -299,9 +303,10 @@ fun CardItem(card: Card, onMenuItemClick: (Card, CardMenuAction) -> Unit) { Card( modifier = Modifier .clickable { expanded = true } - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) .fillMaxWidth() - .padding(10.dp) + .padding(10.dp), + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.primaryContainer) ) { Column( modifier = Modifier @@ -311,17 +316,18 @@ fun CardItem(card: Card, onMenuItemClick: (Card, CardMenuAction) -> Unit) { Row { Column { Row { - Text(text = card.firstName, style = MaterialTheme.typography.bodyMedium) + Text(text = card.firstName, style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurface) Spacer(modifier = Modifier.height(6.dp)) - Text(text = card.lastName, style = MaterialTheme.typography.bodyMedium) + Text(text = card.lastName, style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onPrimaryContainer) } Spacer(modifier = Modifier.height(6.dp)) Text( text = "${stringResource(R.string.feature_savedcards_card_number)} ${card.cardNumber}", - style = MaterialTheme.typography.bodyMedium + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onPrimaryContainer ) Spacer(modifier = Modifier.height(8.dp)) - Text(text = card.expiryDate, style = MaterialTheme.typography.bodyMedium) + Text(text = card.expiryDate, style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onPrimaryContainer) } Spacer(modifier = Modifier.height(38.dp)) DropdownMenu( @@ -365,7 +371,8 @@ fun NoCardAddCardsScreen(onAddBtn: () -> Unit) { Column( horizontalAlignment = Alignment.CenterHorizontally ) { - Text(text = stringResource(R.string.feature_savedcards_add_cards)) + Text(text = stringResource(R.string.feature_savedcards_add_cards), + color = MaterialTheme.colorScheme.onSurface) AddCardChip( modifier = Modifier, onAddBtn = onAddBtn, diff --git a/feature/send-money/src/main/kotlin/org/mifospay/feature/send/money/SendScreenRoute.kt b/feature/send-money/src/main/kotlin/org/mifospay/feature/send/money/SendScreenRoute.kt index 6f9c985ff..d483f899e 100644 --- a/feature/send-money/src/main/kotlin/org/mifospay/feature/send/money/SendScreenRoute.kt +++ b/feature/send-money/src/main/kotlin/org/mifospay/feature/send/money/SendScreenRoute.kt @@ -244,7 +244,7 @@ fun SendMoneyScreen( Icon( imageVector = Icons.Filled.QrCode2, contentDescription = "Scan QR", - tint = Color.Blue + tint = MaterialTheme.colorScheme.primary ) } } @@ -273,7 +273,7 @@ fun SendMoneyScreen( .fillMaxWidth() .padding(top = 16.dp) .align(Alignment.CenterHorizontally), - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, enabled = isValidInfo, onClick = { if (!isValidInfo) return@MifosButton @@ -291,7 +291,7 @@ fun SendMoneyScreen( ) { Text( stringResource(id = R.string.submit), - style = styleMedium16sp.copy(color = Color.White) + style = styleMedium16sp.copy(color = MaterialTheme.colorScheme.surface) ) } } @@ -330,7 +330,7 @@ fun EnterPhoneScreen( fun VpaMobileChip(selected: Boolean, onClick: () -> Unit, label: String) { MifosButton( onClick = onClick, - color = if (selected) Color.Black else Color.LightGray, + color = if (selected) MaterialTheme.colorScheme.primary else Color.LightGray, modifier = Modifier .padding(4.dp) .wrapContentSize() diff --git a/feature/settings/src/main/kotlin/org/mifospay/feature/settings/SettingsScreen.kt b/feature/settings/src/main/kotlin/org/mifospay/feature/settings/SettingsScreen.kt index 6755d1dc4..8be9a63c6 100644 --- a/feature/settings/src/main/kotlin/org/mifospay/feature/settings/SettingsScreen.kt +++ b/feature/settings/src/main/kotlin/org/mifospay/feature/settings/SettingsScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.CardDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -67,7 +68,7 @@ fun SettingsScreenRoute( Column( modifier = Modifier .fillMaxSize() - .background(Color.White) + .background(MaterialTheme.colorScheme.surface) .padding(contentPadding) ) { Row( @@ -79,14 +80,14 @@ fun SettingsScreenRoute( ) ) { MifosCard( - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Text( text = stringResource(id = R.string.feature_settings_notification_settings), modifier = Modifier .fillMaxWidth() .padding(20.dp), - style = TextStyle(fontSize = 18.sp, color = mifosText) + style = TextStyle(fontSize = 18.sp, color = MaterialTheme.colorScheme.onSurface) ) } } @@ -101,14 +102,14 @@ fun SettingsScreenRoute( ) { MifosCard( onClick = { onChangePasswordClicked(context) }, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Text( text = stringResource(id = R.string.feature_settings_change_password), modifier = Modifier .fillMaxWidth() .padding(20.dp), - style = TextStyle(fontSize = 18.sp, color = mifosText) + style = TextStyle(fontSize = 18.sp, color = MaterialTheme.colorScheme.onSurface) ) } } @@ -123,14 +124,14 @@ fun SettingsScreenRoute( ) { MifosCard( onClick = { onChangePasscodeClicked(context, passcodePreferencesHelper) }, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Text( text = stringResource(id = R.string.feature_settings_change_passcode), modifier = Modifier .fillMaxWidth() .padding(20.dp), - style = TextStyle(fontSize = 18.sp, color = mifosText) + style = TextStyle(fontSize = 18.sp, color = MaterialTheme.colorScheme.onSurface) ) } } @@ -149,14 +150,15 @@ fun SettingsScreenRoute( onConfirm = { viewmodel.disableAccount() } ) }, - colors = CardDefaults.cardColors(Color.Black) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.error) ) { Text( text = stringResource(id = R.string.feature_settings_disable_account).uppercase(), modifier = Modifier .fillMaxWidth() .padding(20.dp), - style = styleSettingsButton + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onError ) } } @@ -177,14 +179,15 @@ fun SettingsScreenRoute( } ) }, - colors = CardDefaults.cardColors(Color.Black) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.secondary) ) { Text( text = stringResource(id = R.string.feature_settings_log_out).uppercase(), modifier = Modifier .fillMaxWidth() .padding(20.dp), - style = styleSettingsButton + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onSecondary ) } } diff --git a/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/SIContent.kt b/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/SIContent.kt index 62944986c..a304c6cf9 100644 --- a/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/SIContent.kt +++ b/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/SIContent.kt @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.Divider +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -24,7 +25,7 @@ fun SIContent( Column(modifier = Modifier.padding(10.dp)) { Text( text = fromClientName, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, fontSize = 16.sp, modifier = Modifier.padding(bottom = 20.dp) ) @@ -32,13 +33,13 @@ fun SIContent( Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { Text( text = toClientName, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, fontSize = 16.sp, modifier = Modifier.padding(bottom = 4.dp) ) Text( text = amount, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, fontSize = 16.sp, modifier = Modifier.padding(end = 8.dp, bottom = 8.dp) ) @@ -51,7 +52,7 @@ fun SIContent( ) Divider( - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, thickness = 1.dp, modifier = Modifier.padding(vertical = 8.dp) ) diff --git a/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/StandingInstructionScreen.kt b/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/StandingInstructionScreen.kt index 4d795c78e..628dfc5f4 100644 --- a/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/StandingInstructionScreen.kt +++ b/feature/standing-instruction/src/main/kotlin/org/mifospay/feature/standing/instruction/StandingInstructionScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -52,7 +53,7 @@ fun StandingInstructionScreen( modifier = Modifier, title = stringResource(id = R.string.feature_standing_instruction_error_oops), subTitle = stringResource(id = R.string.feature_standing_instruction_empty_standing_instructions), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -62,7 +63,7 @@ fun StandingInstructionScreen( modifier = Modifier, title = stringResource(id = R.string.feature_standing_instruction_error_oops), subTitle = stringResource(id = R.string.feature_standing_instruction_error_fetching_si_list), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -80,11 +81,13 @@ fun StandingInstructionScreen( floatingActionButton = { FloatingActionButton( onClick = { onNewSI.invoke() }, + containerColor = MaterialTheme.colorScheme.primary, + contentColor = MaterialTheme.colorScheme.onPrimary ) { Icon( painter = rememberVectorPainter(MifosIcons.Add), contentDescription = null, - tint = Color.Black + tint = MaterialTheme.colorScheme.onPrimary ) } } diff --git a/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/DebitCardScreenContent.kt b/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/DebitCardScreenContent.kt index fffe4ac62..a87294661 100644 --- a/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/DebitCardScreenContent.kt +++ b/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/DebitCardScreenContent.kt @@ -8,6 +8,7 @@ import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.OutlinedTextField import androidx.compose.material.TextFieldDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -46,7 +47,7 @@ fun DebitCardScreenContents( label = { Text( text = "Debit Card Number", - style = TextStyle(color = Color.Black) + style = TextStyle(color = MaterialTheme.colorScheme.onSurface) ) }, value = cardNumber, @@ -66,7 +67,7 @@ fun DebitCardScreenContents( colors = TextFieldDefaults.outlinedTextFieldColors( focusedBorderColor = Color.DarkGray, unfocusedBorderColor = Color.LightGray, - cursorColor = Color.Black + cursorColor = MaterialTheme.colorScheme.onSurface ) ) Spacer(modifier = Modifier.height(8.dp)) diff --git a/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/OtpScreen.kt b/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/OtpScreen.kt index 1a035af90..74d92b847 100644 --- a/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/OtpScreen.kt +++ b/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/OtpScreen.kt @@ -55,7 +55,7 @@ fun OtpScreen( private fun OtpScreenContent(realOtp: String, onOtpTextCorrectlyEntered: () -> Unit) { Text( text = stringResource(id = R.string.feature_upi_setup_enter_otp), - color = Color(0xFF1E90FF), + color = MaterialTheme.colorScheme.onSurface, fontSize = 18.sp, style = MaterialTheme.typography.headlineMedium ) diff --git a/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/UpiPinScreen.kt b/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/UpiPinScreen.kt index 5199082ed..dfc6245a3 100644 --- a/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/UpiPinScreen.kt +++ b/feature/upi-setup/src/main/kotlin/org/mifospay/feature/upi_setup/screens/UpiPinScreen.kt @@ -79,7 +79,7 @@ fun UpiPinScreenContent( Text( text = if (steps1.value == 0) stringResource(id = R.string.feature_upi_setup_enter_upi_pin) else stringResource(id = R.string.feature_upi_setup_reenter_upi), - color = Color(0xFF1E90FF), + color = MaterialTheme.colorScheme.onSurface, fontSize = 18.sp, style = MaterialTheme.typography.headlineMedium ) diff --git a/mifospay/src/main/java/org/mifospay/bank/choose_sim/ChooseSimDialogSheet.kt b/mifospay/src/main/java/org/mifospay/bank/choose_sim/ChooseSimDialogSheet.kt index dda62ace4..624326da4 100644 --- a/mifospay/src/main/java/org/mifospay/bank/choose_sim/ChooseSimDialogSheet.kt +++ b/mifospay/src/main/java/org/mifospay/bank/choose_sim/ChooseSimDialogSheet.kt @@ -65,20 +65,23 @@ fun ChooseSimDialogSheetContent(onSimSelected: (Int) -> Unit) { ) { Text( text = stringResource(id = R.string.verify_mobile_number), - style = MaterialTheme.typography.titleLarge + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(16.dp)) Text( text = stringResource(id = R.string.confirm_mobile_number_message), style = MaterialTheme.typography.bodySmall.copy( textAlign = TextAlign.Center - ) + ), + color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(16.dp)) Text( modifier = Modifier.padding(horizontal = 24.dp), text = stringResource(id = R.string.bank_account_mobile_verification_conditions), - style = MaterialTheme.typography.bodyMedium + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(20.dp)) Row( @@ -93,7 +96,8 @@ fun ChooseSimDialogSheetContent(onSimSelected: (Int) -> Unit) { ) Spacer(modifier = Modifier.width(24.dp)) - Text(text = stringResource(id = R.string.or)) + Text(text = stringResource(id = R.string.or), + color = MaterialTheme.colorScheme.onSurface) Spacer(modifier = Modifier.width(24.dp)) SimCard( simNumber = 2, @@ -104,7 +108,7 @@ fun ChooseSimDialogSheetContent(onSimSelected: (Int) -> Unit) { Spacer(modifier = Modifier.height(16.dp)) Text( text = stringResource(id = R.string.regular_charges_will_apply), - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.bodySmall ) MifosButton( diff --git a/mifospay/src/main/java/org/mifospay/bank/link_bank/LinkBankAccountScreen.kt b/mifospay/src/main/java/org/mifospay/bank/link_bank/LinkBankAccountScreen.kt index efb5d23ff..c8220884b 100644 --- a/mifospay/src/main/java/org/mifospay/bank/link_bank/LinkBankAccountScreen.kt +++ b/mifospay/src/main/java/org/mifospay/bank/link_bank/LinkBankAccountScreen.kt @@ -107,7 +107,7 @@ fun LinkBankAccountScreen( ) { Scaffold( - modifier = Modifier.background(color = Color.White), + modifier = Modifier.background(color = MaterialTheme.colorScheme.surface), topBar = { MifosTopAppBar( titleRes = R.string.link_bank_account, @@ -115,7 +115,7 @@ fun LinkBankAccountScreen( navigationIconContentDescription = "Back icon", onNavigationClick = onBackClick, colors = TopAppBarDefaults.centerAlignedTopAppBarColors( - containerColor = Color.White, + containerColor = MaterialTheme.colorScheme.surface, ), ) }) { paddingValues -> @@ -126,7 +126,7 @@ fun LinkBankAccountScreen( is BankUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -156,7 +156,7 @@ fun BankListScreenContent( Column( modifier = Modifier .fillMaxSize() - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) .verticalScroll(rememberScrollState()) ) { MifosOutlinedTextField(modifier = Modifier @@ -176,7 +176,7 @@ fun BankListScreenContent( Spacer(modifier = Modifier.height(24.dp)) Text( text = stringResource(id = R.string.popular_banks), - style = TextStyle(Color.Black, fontWeight = FontWeight.Medium), + style = TextStyle(MaterialTheme.colorScheme.onSurface, fontWeight = FontWeight.Medium), modifier = Modifier.padding(start = 16.dp) ) Spacer(modifier = Modifier.height(12.dp)) @@ -187,7 +187,7 @@ fun BankListScreenContent( Spacer(modifier = Modifier.height(24.dp)) Text( text = stringResource(id = R.string.other_banks), - style = TextStyle(Color.Black, fontWeight = FontWeight.Medium), + style = TextStyle(MaterialTheme.colorScheme.onSurface, fontWeight = FontWeight.Medium), modifier = Modifier.padding(start = 16.dp) ) Spacer(modifier = Modifier.height(12.dp)) @@ -212,7 +212,7 @@ fun PopularBankGridBody( modifier = Modifier, shape = RoundedCornerShape(0.dp), elevation = 2.dp, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { FlowRow( modifier = Modifier, @@ -255,7 +255,8 @@ fun PopularBankItemBody( Text( text = bank.name, style = MaterialTheme.typography.bodyMedium, - modifier = Modifier.padding(top = 4.dp, bottom = 16.dp) + modifier = Modifier.padding(top = 4.dp, bottom = 16.dp), + color = MaterialTheme.colorScheme.onSurface ) } } diff --git a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreen.kt b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreen.kt index a583b2393..951714f9c 100644 --- a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreen.kt +++ b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreen.kt @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material.Card +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment @@ -54,7 +55,8 @@ fun DebitCardScreenWithHeaderAndContent( modifier = Modifier .fillMaxWidth() .padding(dimensionResource(id = R.dimen.value_20dp)), - elevation = 1.dp + elevation = 1.dp, + contentColor = MaterialTheme.colorScheme.surface ) { Column( modifier = Modifier.padding( diff --git a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreenContent.kt b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreenContent.kt index c0d9271b6..6a0740fcd 100644 --- a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreenContent.kt +++ b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/DebitCardScreenContent.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.OutlinedTextField import androidx.compose.material.Text import androidx.compose.material.TextFieldDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -47,7 +48,7 @@ fun DebitCardScreenContents( .fillMaxWidth(), label = { Text(text = "Debit Card Number", - style = TextStyle(color = Color.Black) + style = TextStyle(color = MaterialTheme.colorScheme.onSurface) ) }, value = cardNumber, diff --git a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/OtpScreen.kt b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/OtpScreen.kt index a1f8da401..1413380fe 100644 --- a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/OtpScreen.kt +++ b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/OtpScreen.kt @@ -37,7 +37,8 @@ fun OtpScreen( bottom = dimensionResource(id = R.dimen.value_15dp), start = dimensionResource(id = R.dimen.value_10dp), end = dimensionResource(id = R.dimen.value_10dp) - ), elevation = 1.dp + ), elevation = 1.dp, + contentColor = MaterialTheme.colorScheme.surface ) { Column( modifier = Modifier.fillMaxWidth(), @@ -56,7 +57,7 @@ fun OtpScreen( private fun OtpScreenContent(realOtp: String, onOtpTextCorrectlyEntered: () -> Unit) { Text( text = stringResource(id = R.string.enter_otp), - color = Color(0xFF1E90FF), + color = MaterialTheme.colorScheme.primary, fontSize = 18.sp, style = MaterialTheme.typography.headlineMedium ) diff --git a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/UpiPinScreen.kt b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/UpiPinScreen.kt index 299a9115e..495d64bd6 100644 --- a/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/UpiPinScreen.kt +++ b/mifospay/src/main/java/org/mifospay/bank/setupUpi/screens/UpiPinScreen.kt @@ -53,7 +53,8 @@ fun UpiPinScreen( bottom = dimensionResource(id = R.dimen.value_15dp), start = dimensionResource(id = R.dimen.value_10dp), end = dimensionResource(id = R.dimen.value_10dp) - ), elevation = 1.dp + ), elevation = 1.dp, + contentColor = MaterialTheme.colorScheme.surface ) { Column( modifier = Modifier.fillMaxWidth(), @@ -80,7 +81,7 @@ fun UpiPinScreenContent( Text( text = if (steps1.value == 0) stringResource(id = R.string.enter_upi_pin) else stringResource(id = R.string.reenter_upi), - color = colorResource(id = R.color.colorUpiPinScreenTitle), + color = MaterialTheme.colorScheme.primary, fontSize = 18.sp, style = MaterialTheme.typography.headlineMedium ) diff --git a/mifospay/src/main/java/org/mifospay/bank/ui/AccountsItem.kt b/mifospay/src/main/java/org/mifospay/bank/ui/AccountsItem.kt index b25f07acf..380229662 100644 --- a/mifospay/src/main/java/org/mifospay/bank/ui/AccountsItem.kt +++ b/mifospay/src/main/java/org/mifospay/bank/ui/AccountsItem.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material3.CardDefaults import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -29,7 +30,7 @@ fun AccountsItem( ) { MifosCard( onClick = { onAccountClicked.invoke() }, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Column { Row( @@ -49,12 +50,14 @@ fun AccountsItem( Column { Text( text = bankAccountDetails.accountholderName.toString(), - color = mifosText, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface, ) Text( text = bankAccountDetails.bankName.toString(), modifier = Modifier.padding(top = 4.dp), - style = styleMedium16sp.copy(mifosText) + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface, ) } Column( @@ -64,8 +67,8 @@ fun AccountsItem( Text( text = bankAccountDetails.branch.toString(), modifier = Modifier.padding(16.dp), - fontSize = 12.sp, - color = mifosText + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface, ) } } diff --git a/mifospay/src/main/java/org/mifospay/bank/ui/AccountsScreen.kt b/mifospay/src/main/java/org/mifospay/bank/ui/AccountsScreen.kt index e9192c792..14f3aed44 100644 --- a/mifospay/src/main/java/org/mifospay/bank/ui/AccountsScreen.kt +++ b/mifospay/src/main/java/org/mifospay/bank/ui/AccountsScreen.kt @@ -19,6 +19,7 @@ import androidx.compose.material.pullrefresh.PullRefreshIndicator import androidx.compose.material.pullrefresh.pullRefresh import androidx.compose.material.pullrefresh.rememberPullRefreshState import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -111,7 +112,7 @@ fun AccountScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.surfaceTint, iconImageVector = Icons.Rounded.Info ) } @@ -126,7 +127,7 @@ fun AccountScreen( Text( text = stringResource(id = R.string.linked_bank_account), fontSize = 16.sp, - color = colorResource(id = R.color.colorTextPrimary), + color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(top = 48.dp, start = 24.dp) ) } @@ -147,7 +148,7 @@ fun AccountScreen( modifier = Modifier .fillMaxWidth() .padding(16.dp) - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) ) { AddCardChip( modifier = Modifier.align(Alignment.Center), @@ -163,7 +164,7 @@ fun AccountScreen( AccountsUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } } diff --git a/mifospay/src/main/java/org/mifospay/bank/ui/BankAccountDetailScreen.kt b/mifospay/src/main/java/org/mifospay/bank/ui/BankAccountDetailScreen.kt index d756355a4..a4e61b629 100644 --- a/mifospay/src/main/java/org/mifospay/bank/ui/BankAccountDetailScreen.kt +++ b/mifospay/src/main/java/org/mifospay/bank/ui/BankAccountDetailScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.material.icons.filled.ChevronRight import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -70,7 +71,7 @@ fun BankAccountDetailScreen( Column( modifier = Modifier .padding(20.dp) - .border(2.dp, Color.Black) + .border(2.dp, MaterialTheme.colorScheme.onSurface) .padding(20.dp) ) { BankAccountDetailRows( @@ -148,9 +149,13 @@ fun BankAccountDetailRows( verticalAlignment = Alignment.CenterVertically ) { Text( - text = stringResource(id = detail), modifier = Modifier.padding(end = 10.dp) + text = stringResource(id = detail), + modifier = Modifier.padding(end = 10.dp), + color = MaterialTheme.colorScheme.tertiary ) - Text(text = detailValue, style = styleMedium16sp) + Text(text = detailValue, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface) } } @@ -165,11 +170,10 @@ fun BankAccountDetailButton( if (isUpiEnabled) { Button( onClick = { onClick.invoke() }, - colors = ButtonDefaults.buttonColors(Color.White), + colors = ButtonDefaults.buttonColors(MaterialTheme.colorScheme.primary), modifier = modifier .padding(start = 20.dp, end = 20.dp), contentPadding = PaddingValues(20.dp), - border = BorderStroke(2.dp, Color.Black) ) { Row( modifier = modifier, @@ -178,13 +182,14 @@ fun BankAccountDetailButton( ) { Text( text = stringResource(id = btnText), - style = TextStyle(color = mifosText, fontSize = 18.sp) + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onPrimary ) if (hasTrailingIcon) { Icon( imageVector = Icons.Filled.ChevronRight, contentDescription = null, - tint = Color.Black + tint = MaterialTheme.colorScheme.onSurface ) } } diff --git a/mifospay/src/main/java/org/mifospay/common/ui/SearchScreen.kt b/mifospay/src/main/java/org/mifospay/common/ui/SearchScreen.kt index bb5e81949..698098d7b 100644 --- a/mifospay/src/main/java/org/mifospay/common/ui/SearchScreen.kt +++ b/mifospay/src/main/java/org/mifospay/common/ui/SearchScreen.kt @@ -79,7 +79,7 @@ fun SearchScreen( SearchResultState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -90,7 +90,8 @@ fun SearchScreen( } is SearchResultState.Error -> { - Text(text = searchResultState.message) + Text(text = searchResultState.message, + color = MaterialTheme.colorScheme.onSurface) } } } @@ -209,7 +210,8 @@ fun SearchResultItem( text = searchResult.resultName, modifier = Modifier .fillMaxWidth() - .padding(16.dp) + .padding(16.dp), + color = MaterialTheme.colorScheme.onSurface ) } diff --git a/mifospay/src/main/java/org/mifospay/history/specific_transactions/ui/SpecificTransactionsScreen.kt b/mifospay/src/main/java/org/mifospay/history/specific_transactions/ui/SpecificTransactionsScreen.kt index 9c6202b75..f12bc750e 100644 --- a/mifospay/src/main/java/org/mifospay/history/specific_transactions/ui/SpecificTransactionsScreen.kt +++ b/mifospay/src/main/java/org/mifospay/history/specific_transactions/ui/SpecificTransactionsScreen.kt @@ -96,7 +96,7 @@ fun SpecificTransactionsScreen( SpecificTransactionsUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -106,7 +106,7 @@ fun SpecificTransactionsScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.no_transactions_found), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } else { @@ -175,7 +175,7 @@ fun SpecificTransactionItem( Text( text = stringResource(id = R.string.transaction_id) + transaction.transactionId, style = MaterialTheme.typography.bodyLarge, - color = primaryDarkBlue + color = MaterialTheme.colorScheme.primary ) Text( text = stringResource(id = R.string.date) + transaction.date, diff --git a/mifospay/src/main/java/org/mifospay/history/ui/HistoryScreen.kt b/mifospay/src/main/java/org/mifospay/history/ui/HistoryScreen.kt index 9b13c2670..52c957b65 100644 --- a/mifospay/src/main/java/org/mifospay/history/ui/HistoryScreen.kt +++ b/mifospay/src/main/java/org/mifospay/history/ui/HistoryScreen.kt @@ -16,6 +16,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -79,7 +80,7 @@ fun HistoryScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.empty_no_transaction_history_title), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.surfaceTint, iconImageVector = Icons.Rounded.Info ) } @@ -89,7 +90,7 @@ fun HistoryScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.surfaceTint, iconImageVector = Icons.Rounded.Info ) } @@ -168,7 +169,7 @@ fun HistoryScreen( @Composable fun Chip(selected: Boolean, onClick: () -> Unit, label: String) { val context = LocalContext.current - val backgroundColor = if (selected) chipSelectedColor else lightGrey + val backgroundColor = if (selected) MaterialTheme.colorScheme.primary else lightGrey Button( onClick = { onClick() @@ -179,7 +180,7 @@ fun Chip(selected: Boolean, onClick: () -> Unit, label: String) { Text( modifier = Modifier.padding(top = 4.dp, bottom = 4.dp, start = 16.dp, end = 16.dp), text = label, - color = Color.Black + color = if (selected) MaterialTheme.colorScheme.onPrimary else Color.Black ) } } diff --git a/mifospay/src/main/java/org/mifospay/home/screens/HomeScreen.kt b/mifospay/src/main/java/org/mifospay/home/screens/HomeScreen.kt index 3155f669b..3c610044f 100644 --- a/mifospay/src/main/java/org/mifospay/home/screens/HomeScreen.kt +++ b/mifospay/src/main/java/org/mifospay/home/screens/HomeScreen.kt @@ -20,6 +20,7 @@ import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -65,7 +66,7 @@ fun HomeRoute( is HomeUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -102,7 +103,7 @@ fun HomeScreen( modifier = Modifier .fillMaxWidth() - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) .padding(start = 32.dp, end = 32.dp), ) { item { @@ -119,7 +120,8 @@ fun HomeScreen( Text( modifier = Modifier.padding(top = 32.dp), text = "Recent Transactions", - style = styleMedium16sp + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(16.dp)) } @@ -140,7 +142,7 @@ fun MifosWalletCardScreen(account: Account?) { .fillMaxWidth() .height(225.dp) .padding(top = 20.dp, bottom = 32.dp), - colors = CardDefaults.cardColors(containerColor = Color.Black) + colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.primary) ) { Column( modifier = Modifier @@ -155,7 +157,7 @@ fun MifosWalletCardScreen(account: Account?) { style = TextStyle( fontSize = 12.sp, fontWeight = FontWeight.W400, - color = lightGrey + color = MaterialTheme.colorScheme.onPrimary ) ) Spacer(modifier = Modifier.height(10.dp)) @@ -168,7 +170,7 @@ fun MifosWalletCardScreen(account: Account?) { style = TextStyle( fontSize = 42.sp, fontWeight = FontWeight(600), - color = Color.White + color = MaterialTheme.colorScheme.onPrimary ) ) Spacer(modifier = Modifier.height(10.dp)) @@ -180,7 +182,7 @@ fun MifosWalletCardScreen(account: Account?) { style = TextStyle( fontSize = 12.sp, fontWeight = FontWeight(500), - color = lightGrey + color = MaterialTheme.colorScheme.onPrimary ) ) } @@ -226,7 +228,7 @@ fun PayCard( .height(144.dp) .clickable { onClickCard.invoke() }, border = BorderStroke(1.dp, border), - colors = CardDefaults.cardColors(containerColor = Color.White) + colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surface) ) { Column( modifier = Modifier @@ -237,17 +239,18 @@ fun PayCard( Box( modifier = Modifier .size(40.dp) - .background(Color.Black, shape = RoundedCornerShape(4.dp)), + .background(MaterialTheme.colorScheme.secondary, shape = RoundedCornerShape(4.dp)), contentAlignment = Alignment.Center ) { Image( modifier = Modifier.size(20.dp), painter = painterResource(id = icon), contentDescription = null, - colorFilter = ColorFilter.tint(Color.White) + colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSecondary) ) } - Text(text = title) + Text(text = title, + color = MaterialTheme.colorScheme.onSurface) } } } diff --git a/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceDetailScreen.kt b/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceDetailScreen.kt index e5cc2db38..04a0fe39f 100644 --- a/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceDetailScreen.kt +++ b/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceDetailScreen.kt @@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -68,7 +69,7 @@ fun InvoiceDetailScreen( Column( modifier = Modifier .fillMaxSize() - .background(Color.White) + .background(MaterialTheme.colorScheme.surface) .padding(it) ) { when (invoiceDetailUiState) { diff --git a/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceItem.kt b/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceItem.kt index 68a997569..3ba7e6a01 100644 --- a/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceItem.kt +++ b/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceItem.kt @@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.size import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -40,7 +41,7 @@ fun InvoiceItem( .padding(4.dp) .clickable { onClick(invoiceId) }, elevation = CardDefaults.cardElevation(4.dp), - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.surface) ) { Column { Row( @@ -71,12 +72,12 @@ fun InvoiceItem( ) { Text( text = invoiceTitle, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, modifier = Modifier.weight(1f) ) Text( text = invoiceAmount, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, textAlign = TextAlign.End, modifier = Modifier.weight(1f) ) diff --git a/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceScreen.kt b/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceScreen.kt index 8f4760628..8286f7a5e 100644 --- a/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceScreen.kt +++ b/mifospay/src/main/java/org/mifospay/invoice/ui/InvoiceScreen.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier @@ -50,7 +51,7 @@ fun InvoiceScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Info ) } @@ -82,7 +83,7 @@ fun InvoiceScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.error_no_invoices_found), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, ) } diff --git a/mifospay/src/main/java/org/mifospay/kyc/ui/KYCDescriptionScreen.kt b/mifospay/src/main/java/org/mifospay/kyc/ui/KYCDescriptionScreen.kt index 8cb11e2d7..cc3b2cc71 100644 --- a/mifospay/src/main/java/org/mifospay/kyc/ui/KYCDescriptionScreen.kt +++ b/mifospay/src/main/java/org/mifospay/kyc/ui/KYCDescriptionScreen.kt @@ -209,13 +209,13 @@ fun ButtonComponent( contentPadding = PaddingValues(), colors = ButtonDefaults.buttonColors( containerColor = when { - completed -> Color.White - enabled -> Color.Blue + completed -> MaterialTheme.colorScheme.surface + enabled -> MaterialTheme.colorScheme.primary else -> Color.Gray }, contentColor = when { - completed -> Color.Blue - enabled -> Color.White + completed -> MaterialTheme.colorScheme.onSurface + enabled -> MaterialTheme.colorScheme.onPrimary else -> Color.Gray } ), diff --git a/mifospay/src/main/java/org/mifospay/kyc/ui/KYCLevel3Screen.kt b/mifospay/src/main/java/org/mifospay/kyc/ui/KYCLevel3Screen.kt index 06d54069a..8a1f4de72 100644 --- a/mifospay/src/main/java/org/mifospay/kyc/ui/KYCLevel3Screen.kt +++ b/mifospay/src/main/java/org/mifospay/kyc/ui/KYCLevel3Screen.kt @@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -87,11 +89,13 @@ fun Kyc3Form( Button( onClick = {}, + colors = ButtonDefaults.buttonColors(MaterialTheme.colorScheme.primary), modifier = Modifier .align(Alignment.CenterHorizontally) .padding(16.dp) ) { - Text(stringResource(R.string.submit)) + Text(stringResource(R.string.submit), + color = MaterialTheme.colorScheme.onPrimary) } } } diff --git a/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantScreen.kt b/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantScreen.kt index 129bec21a..d9ff5466d 100644 --- a/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantScreen.kt +++ b/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantScreen.kt @@ -19,7 +19,9 @@ import androidx.compose.material.pullrefresh.rememberPullRefreshState import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.SearchBar +import androidx.compose.material3.SearchBarDefaults import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -80,7 +82,7 @@ fun MerchantScreen( modifier = Modifier, title = stringResource(id = R.string.empty_no_merchants_title), subTitle = stringResource(id = R.string.empty_no_merchants_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -90,7 +92,7 @@ fun MerchantScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.unexpected_error_subtitle), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -98,7 +100,7 @@ fun MerchantScreen( MerchantUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = MaterialTheme.colorScheme.surface ) } @@ -185,9 +187,11 @@ fun SearchBarScreen( onQueryChange = onQueryChange, onSearch = onSearch, active = false, + colors = SearchBarDefaults.colors(MaterialTheme.colorScheme.primaryContainer), onActiveChange = { }, placeholder = { - Text(text = stringResource(R.string.search)) + Text(text = stringResource(R.string.search), + color = MaterialTheme.colorScheme.onPrimaryContainer) }, leadingIcon = { Icon( @@ -201,7 +205,8 @@ fun SearchBarScreen( ) { Icon( imageVector = Icons.Filled.Close, - contentDescription = stringResource(R.string.close) + contentDescription = stringResource(R.string.close), + tint = MaterialTheme.colorScheme.onPrimaryContainer ) } } diff --git a/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantTransferScreen.kt b/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantTransferScreen.kt index db426b2e6..2015028bc 100644 --- a/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantTransferScreen.kt +++ b/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantTransferScreen.kt @@ -14,11 +14,12 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.Divider -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text +//noinspection UsingMaterialAndMaterial3Libraries +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Divider +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue @@ -112,7 +113,7 @@ fun MerchantTransferScreen( is MerchantTransferUiState.Loading -> { MfLoadingWheel( contentDesc = stringResource(R.string.loading), - backgroundColor = Color.White + backgroundColor = androidx.compose.material3.MaterialTheme.colorScheme.surface ) } @@ -129,7 +130,7 @@ fun MerchantTransferScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.no_transactions_found), - iconTint = Color.Black, + iconTint = androidx.compose.material3.MaterialTheme.colorScheme.onSurface, iconImageVector = MifosIcons.Info ) } @@ -192,7 +193,7 @@ fun MerchantBottomSheet( Text( text = stringResource(R.string.transfer_money_to_this_merchant), color = ElectricViolet, - style = MaterialTheme.typography.subtitle1 + style = MaterialTheme.typography.bodyMedium ) Spacer(modifier = Modifier.height(24.dp)) @@ -217,7 +218,7 @@ fun MerchantBottomSheet( merchantVPA ) }, - colors = ButtonDefaults.buttonColors(backgroundColor = submitButtonColor), + colors = ButtonDefaults.buttonColors(MaterialTheme.colorScheme.primary), modifier = Modifier.width(155.dp) ) { Text(stringResource(id = R.string.submit), color = Color.White) @@ -238,12 +239,12 @@ fun MerchantInfo( Spacer(modifier = Modifier.height(10.dp)) Text( text = merchantName, - style = MaterialTheme.typography.h5 + style = MaterialTheme.typography.labelMedium ) Spacer(modifier = Modifier.height(9.dp)) Text( text = merchantVPA, - style = MaterialTheme.typography.h6, + style = MaterialTheme.typography.labelMedium, color = Color.Gray ) } @@ -257,14 +258,14 @@ fun MerchantInitialAvatar(merchantName: String) { modifier = Modifier .size(86.dp) .background( - color = InitialAvatarBgColor, + color = MaterialTheme.colorScheme.primary, shape = CircleShape ), contentAlignment = Alignment.Center ) { Text( text = initial, - color = Color.White, + color = MaterialTheme.colorScheme.onPrimary, fontSize = 44.sp, fontWeight = FontWeight.Medium ) diff --git a/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantsItem.kt b/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantsItem.kt index de50f26a6..b0a52f235 100644 --- a/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantsItem.kt +++ b/mifospay/src/main/java/org/mifospay/merchants/ui/MerchantsItem.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.size import androidx.compose.material3.CardDefaults import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -39,7 +40,7 @@ fun MerchantsItem( ) }, onClick = { onMerchantClicked.invoke() }, - colors = CardDefaults.cardColors(Color.White) + colors = CardDefaults.cardColors(MaterialTheme.colorScheme.primaryContainer) ) { Column { Row( @@ -59,12 +60,14 @@ fun MerchantsItem( Column { Text( text = savingsWithAssociations.clientName, - color = mifosText, + color = MaterialTheme.colorScheme.onPrimaryContainer, + style = MaterialTheme.typography.bodyMedium ) Text( text = savingsWithAssociations.externalId, modifier = Modifier.padding(top = 4.dp), - style = styleMedium16sp.copy(mifosText) + color = MaterialTheme.colorScheme.onPrimaryContainer, + style = MaterialTheme.typography.bodyMedium ) } } diff --git a/mifospay/src/main/java/org/mifospay/payments/send/SendScreenRoute.kt b/mifospay/src/main/java/org/mifospay/payments/send/SendScreenRoute.kt index e46e6ed2d..0159a09d1 100644 --- a/mifospay/src/main/java/org/mifospay/payments/send/SendScreenRoute.kt +++ b/mifospay/src/main/java/org/mifospay/payments/send/SendScreenRoute.kt @@ -200,7 +200,8 @@ fun SendMoneyScreen( Text( modifier = Modifier.padding(start = 20.dp, top = 20.dp), text = stringResource(id = R.string.select_transfer_method), - style = styleNormal18sp + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.onSurface ) Column(modifier = Modifier.padding(16.dp)) { Row( @@ -249,7 +250,7 @@ fun SendMoneyScreen( Icon( imageVector = Icons.Filled.QrCode2, contentDescription = "Scan QR", - tint = Color.Blue + tint = MaterialTheme.colorScheme.primary ) } } @@ -278,7 +279,7 @@ fun SendMoneyScreen( .fillMaxWidth() .padding(top = 16.dp) .align(Alignment.CenterHorizontally), - color = Color.Black, + color = MaterialTheme.colorScheme.primary, enabled = isValidInfo, onClick = { if (!isValidInfo) return@MifosButton @@ -295,7 +296,8 @@ fun SendMoneyScreen( ) { Text( stringResource(id = R.string.submit), - style = styleMedium16sp.copy(color = Color.White) + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onPrimary ) } } @@ -334,7 +336,7 @@ fun EnterPhoneScreen( fun VpaMobileChip(selected: Boolean, onClick: () -> Unit, label: String) { MifosButton( onClick = onClick, - color = if (selected) Color.Black else Color.LightGray, + color = if (selected) MaterialTheme.colorScheme.primary else Color.LightGray, modifier = Modifier .padding(4.dp) .wrapContentSize() @@ -342,6 +344,7 @@ fun VpaMobileChip(selected: Boolean, onClick: () -> Unit, label: String) { Text( modifier = Modifier.padding(top = 4.dp, bottom = 4.dp), text = label, + color = MaterialTheme.colorScheme.onPrimary ) } } diff --git a/mifospay/src/main/java/org/mifospay/payments/ui/RequestScreen.kt b/mifospay/src/main/java/org/mifospay/payments/ui/RequestScreen.kt index e48fcc59c..fc084cfcf 100644 --- a/mifospay/src/main/java/org/mifospay/payments/ui/RequestScreen.kt +++ b/mifospay/src/main/java/org/mifospay/payments/ui/RequestScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.QrCode import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState @@ -37,7 +38,8 @@ fun RequestScreen( Text( modifier = Modifier.padding(start = 20.dp, top = 30.dp), text = stringResource(id = R.string.receive), - style = styleNormal18sp.copy(Color.Blue) + style = MaterialTheme.typography.titleMedium, + color = MaterialTheme.colorScheme.primary ) Row(modifier = Modifier.fillMaxWidth().padding(start = 20.dp), verticalAlignment = Alignment.CenterVertically) { Column( @@ -48,12 +50,16 @@ fun RequestScreen( ) { Column { Text(text = stringResource(id = R.string.virtual_payment_address_vpa)) - Text(text = vpa, style = styleMedium16sp) + Text(text = vpa, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface) } Column(modifier = Modifier.padding(top = 10.dp)) { Text(text = stringResource(id = R.string.mobile_number)) - Text(text = mobile, style = styleMedium16sp) + Text(text = mobile, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface) } } Column( @@ -65,7 +71,7 @@ fun RequestScreen( IconButton(onClick = { showQr.invoke() }) { Icon( imageVector = Icons.Default.QrCode, - tint = Color.Blue, + tint = MaterialTheme.colorScheme.primary, contentDescription = stringResource(id = R.string.show_code), ) } diff --git a/mifospay/src/main/java/org/mifospay/standinginstruction/ui/SIContent.kt b/mifospay/src/main/java/org/mifospay/standinginstruction/ui/SIContent.kt index eda7b76ee..5a4712e9f 100644 --- a/mifospay/src/main/java/org/mifospay/standinginstruction/ui/SIContent.kt +++ b/mifospay/src/main/java/org/mifospay/standinginstruction/ui/SIContent.kt @@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.Divider +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -24,7 +26,7 @@ fun SIContent( Column(modifier = Modifier.padding(10.dp)) { Text( text = fromClientName, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, fontSize = 16.sp, modifier = Modifier.padding(bottom = 20.dp) ) @@ -32,13 +34,13 @@ fun SIContent( Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { Text( text = toClientName, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, fontSize = 16.sp, modifier = Modifier.padding(bottom = 4.dp) ) Text( text = amount, - color = Color.Black, + color = MaterialTheme.colorScheme.onSurface, fontSize = 16.sp, modifier = Modifier.padding(end = 8.dp, bottom = 8.dp) ) @@ -50,10 +52,10 @@ fun SIContent( modifier = Modifier.padding(bottom = 4.dp) ) - Divider( - color = Color.Black, + HorizontalDivider( + modifier = Modifier.padding(vertical = 8.dp), thickness = 1.dp, - modifier = Modifier.padding(vertical = 8.dp) + color = MaterialTheme.colorScheme.onSurface ) } } diff --git a/mifospay/src/main/java/org/mifospay/standinginstruction/ui/StandingInstructionScreen.kt b/mifospay/src/main/java/org/mifospay/standinginstruction/ui/StandingInstructionScreen.kt index 3d1eb5ce9..67e926ab3 100644 --- a/mifospay/src/main/java/org/mifospay/standinginstruction/ui/StandingInstructionScreen.kt +++ b/mifospay/src/main/java/org/mifospay/standinginstruction/ui/StandingInstructionScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Info import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -48,7 +49,7 @@ fun StandingInstructionScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.empty_standing_instructions), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } @@ -58,7 +59,7 @@ fun StandingInstructionScreen( modifier = Modifier, title = stringResource(id = R.string.error_oops), subTitle = stringResource(id = R.string.error_fetching_si_list), - iconTint = Color.Black, + iconTint = MaterialTheme.colorScheme.primary, iconImageVector = Icons.Rounded.Info ) } diff --git a/mifospay/src/main/java/org/mifospay/ui/MifosApp.kt b/mifospay/src/main/java/org/mifospay/ui/MifosApp.kt index 240ceb0c4..20b3cf69a 100644 --- a/mifospay/src/main/java/org/mifospay/ui/MifosApp.kt +++ b/mifospay/src/main/java/org/mifospay/ui/MifosApp.kt @@ -113,22 +113,24 @@ fun MifosApp(appState: MifosAppState, bottomSheetNavigator: BottomSheetNavigator .fillMaxWidth() .wrapContentSize(Alignment.TopEnd) .padding(end = 24.dp) - .background(color = Color.White) + .background(color = MaterialTheme.colorScheme.surface) ) { DropdownMenu( - modifier = Modifier.background(color = Color.White), + modifier = Modifier.background(color = MaterialTheme.colorScheme.surface), expanded = showHomeMenuOption, onDismissRequest = { showHomeMenuOption = false } ) { DropdownMenuItem( - text = { Text(stringResource(id = R.string.faq)) }, + text = { Text(stringResource(id = R.string.faq), + color = MaterialTheme.colorScheme.onSurface) }, onClick = { showHomeMenuOption = false context.startActivity(Intent(context, FAQActivity::class.java)) } ) DropdownMenuItem( - text = { Text(stringResource(id = R.string.settings)) }, + text = { Text(stringResource(id = R.string.settings), + color = MaterialTheme.colorScheme.onSurface) }, onClick = { showHomeMenuOption = false appState.navController.navigateToSettings()