Updated on 2026-08-14
This commit is contained in:
parent
0344c98f5f
commit
9cd37f92c5
15 changed files with 148 additions and 143 deletions
|
|
@ -7,7 +7,9 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
|||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.itemsIndexed
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.material.RadioButton
|
||||
import androidx.compose.material.RadioButtonDefaults
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.runtime.remember
|
||||
|
|
@ -210,7 +212,7 @@ private fun TangemDialog(
|
|||
modifier = Modifier
|
||||
.background(
|
||||
shape = TangemTheme.shapes.roundedCornersLarge,
|
||||
color = TangemTheme.colors.background.plain,
|
||||
color = TangemTheme.colors.background.primary,
|
||||
)
|
||||
.padding(vertical = TangemTheme.dimens.spacing24),
|
||||
) {
|
||||
|
|
@ -386,7 +388,7 @@ private fun SelectorDialogContent(
|
|||
selected = index == selectedItemIndex,
|
||||
onClick = onClick,
|
||||
colors = RadioButtonDefaults.colors(
|
||||
selectedColor = TangemTheme.colors.icon.accent,
|
||||
selectedColor = TangemTheme.colors.control.checked,
|
||||
unselectedColor = TangemTheme.colors.icon.secondary,
|
||||
),
|
||||
interactionSource = interactionSource,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class TangemColors internal constructor(
|
|||
warning: Color,
|
||||
attention: Color,
|
||||
accent: Color = TangemColorPalette.Azure,
|
||||
constantWhite: Color = TangemColorPalette.White,
|
||||
constant: Color = TangemColorPalette.White,
|
||||
) {
|
||||
var primary1 by mutableStateOf(primary1)
|
||||
private set
|
||||
|
|
@ -60,7 +60,7 @@ class TangemColors internal constructor(
|
|||
private set
|
||||
var attention by mutableStateOf(attention)
|
||||
private set
|
||||
var constantWhite by mutableStateOf(constantWhite)
|
||||
var constantWhite by mutableStateOf(constant)
|
||||
private set
|
||||
|
||||
fun update(other: Text) {
|
||||
|
|
@ -83,6 +83,7 @@ class TangemColors internal constructor(
|
|||
warning: Color,
|
||||
attention: Color,
|
||||
accent: Color = TangemColorPalette.Azure,
|
||||
constant: Color = TangemColorPalette.White,
|
||||
) {
|
||||
var primary1 by mutableStateOf(primary1)
|
||||
private set
|
||||
|
|
@ -118,8 +119,7 @@ class TangemColors internal constructor(
|
|||
primary: Color,
|
||||
secondary: Color,
|
||||
disabled: Color,
|
||||
positive: Color = TangemColorPalette.Meadow,
|
||||
positiveDisabled: Color,
|
||||
positive: Color = TangemColorPalette.Azure,
|
||||
) {
|
||||
var primary by mutableStateOf(primary)
|
||||
private set
|
||||
|
|
@ -129,15 +129,12 @@ class TangemColors internal constructor(
|
|||
private set
|
||||
var positive by mutableStateOf(positive)
|
||||
private set
|
||||
var positiveDisabled by mutableStateOf(positiveDisabled)
|
||||
private set
|
||||
|
||||
fun update(other: Button) {
|
||||
primary = other.primary
|
||||
secondary = other.secondary
|
||||
disabled = other.disabled
|
||||
positive = other.positive
|
||||
positiveDisabled = other.positiveDisabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -146,9 +143,7 @@ class TangemColors internal constructor(
|
|||
primary: Color,
|
||||
secondary: Color,
|
||||
tertiary: Color,
|
||||
plain: Color,
|
||||
action: Color,
|
||||
fade: Color,
|
||||
) {
|
||||
var primary by mutableStateOf(primary)
|
||||
private set
|
||||
|
|
@ -156,20 +151,14 @@ class TangemColors internal constructor(
|
|||
private set
|
||||
var tertiary by mutableStateOf(tertiary)
|
||||
private set
|
||||
var plain by mutableStateOf(plain)
|
||||
private set
|
||||
var action by mutableStateOf(action)
|
||||
private set
|
||||
var fade by mutableStateOf(fade)
|
||||
private set
|
||||
|
||||
fun update(other: Background) {
|
||||
primary = other.primary
|
||||
secondary = other.secondary
|
||||
tertiary = other.tertiary
|
||||
plain = other.plain
|
||||
action = other.action
|
||||
fade = other.fade
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ data class TangemDimens internal constructor(
|
|||
val size11: Dp = 11.dp,
|
||||
val size12: Dp = 12.dp,
|
||||
val size14: Dp = 14.dp,
|
||||
val size15: Dp = 15.dp,
|
||||
val size16: Dp = 16.dp,
|
||||
val size18: Dp = 18.dp,
|
||||
val size20: Dp = 20.dp,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ private fun materialThemeColors(colors: TangemColors, isDark: Boolean): Colors {
|
|||
secondary = colors.button.primary,
|
||||
secondaryVariant = colors.text.accent,
|
||||
background = colors.background.primary,
|
||||
surface = colors.background.plain,
|
||||
surface = colors.background.secondary,
|
||||
error = colors.text.warning,
|
||||
onPrimary = colors.text.primary1,
|
||||
onSecondary = colors.text.primary1,
|
||||
|
|
@ -94,10 +94,10 @@ private fun lightThemeColors(): TangemColors {
|
|||
attention = TangemColorPalette.Tangerine,
|
||||
),
|
||||
icon = TangemColors.Icon(
|
||||
primary1 = TangemColorPalette.Black,
|
||||
primary1 = TangemColorPalette.Dark6,
|
||||
primary2 = TangemColorPalette.White,
|
||||
secondary = TangemColorPalette.Dark2,
|
||||
informative = TangemColorPalette.Light5,
|
||||
informative = TangemColorPalette.Dark1,
|
||||
inactive = TangemColorPalette.Light4,
|
||||
warning = TangemColorPalette.Amaranth,
|
||||
attention = TangemColorPalette.Tangerine,
|
||||
|
|
@ -106,15 +106,12 @@ private fun lightThemeColors(): TangemColors {
|
|||
primary = TangemColorPalette.Dark6,
|
||||
secondary = TangemColorPalette.Light2,
|
||||
disabled = TangemColorPalette.Light2,
|
||||
positiveDisabled = TangemColorPalette.MagicMint,
|
||||
),
|
||||
background = TangemColors.Background(
|
||||
primary = TangemColorPalette.White,
|
||||
secondary = TangemColorPalette.Light1,
|
||||
tertiary = TangemColorPalette.Light1,
|
||||
plain = TangemColorPalette.White,
|
||||
action = TangemColorPalette.White,
|
||||
fade = TangemColorPalette.White,
|
||||
),
|
||||
control = TangemColors.Control(
|
||||
checked = TangemColorPalette.Dark6,
|
||||
|
|
@ -123,7 +120,7 @@ private fun lightThemeColors(): TangemColors {
|
|||
),
|
||||
stroke = TangemColors.Stroke(
|
||||
primary = TangemColorPalette.Light2,
|
||||
secondary = TangemColorPalette.Dark4,
|
||||
secondary = TangemColorPalette.Dark5,
|
||||
transparency = TangemColorPalette.White,
|
||||
),
|
||||
field = TangemColors.Field(
|
||||
|
|
@ -149,25 +146,22 @@ private fun darkThemeColors(): TangemColors {
|
|||
icon = TangemColors.Icon(
|
||||
primary1 = TangemColorPalette.White,
|
||||
primary2 = TangemColorPalette.Dark6,
|
||||
secondary = TangemColorPalette.Dark1,
|
||||
informative = TangemColorPalette.Dark2,
|
||||
inactive = TangemColorPalette.Dark4,
|
||||
secondary = TangemColorPalette.Light5,
|
||||
informative = TangemColorPalette.Dark1,
|
||||
inactive = TangemColorPalette.Dark3,
|
||||
warning = TangemColorPalette.Flamingo,
|
||||
attention = TangemColorPalette.Mustard,
|
||||
),
|
||||
button = TangemColors.Button(
|
||||
primary = TangemColorPalette.Light4,
|
||||
primary = TangemColorPalette.Light2,
|
||||
secondary = TangemColorPalette.Dark4,
|
||||
disabled = TangemColorPalette.Dark5,
|
||||
positiveDisabled = TangemColorPalette.DarkGreen,
|
||||
),
|
||||
background = TangemColors.Background(
|
||||
primary = TangemColorPalette.Dark6,
|
||||
secondary = TangemColorPalette.Black,
|
||||
tertiary = TangemColorPalette.Dark6,
|
||||
plain = TangemColorPalette.Black,
|
||||
action = TangemColorPalette.Dark5,
|
||||
fade = TangemColorPalette.Black,
|
||||
),
|
||||
control = TangemColors.Control(
|
||||
checked = TangemColorPalette.Azure,
|
||||
|
|
@ -176,7 +170,7 @@ private fun darkThemeColors(): TangemColors {
|
|||
),
|
||||
stroke = TangemColors.Stroke(
|
||||
primary = TangemColorPalette.Dark4,
|
||||
secondary = TangemColorPalette.Dark1,
|
||||
secondary = TangemColorPalette.Dark4,
|
||||
transparency = TangemColorPalette.Dark6,
|
||||
),
|
||||
field = TangemColors.Field(
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ data class TangemTypography internal constructor(
|
|||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
letterSpacing = TextUnit(value = 0.1f, type = TextUnitType.Sp),
|
||||
lineHeight = TextUnit(value = 20f, type = TextUnitType.Sp),
|
||||
lineHeight = TextUnit(value = 16f, type = TextUnitType.Sp),
|
||||
),
|
||||
val caption1: TextStyle = TextStyle(
|
||||
fontFamily = RobotoFamily,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ abstract class ComposeBottomSheetFragment : BottomSheetDialogFragment(), Compose
|
|||
if (expandedHeightFraction != null) it.fillMaxHeight(expandedHeightFraction!!) else it
|
||||
}
|
||||
.background(
|
||||
color = TangemTheme.colors.background.plain,
|
||||
color = TangemTheme.colors.background.primary,
|
||||
shape = TangemTheme.shapes.bottomSheet,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue