sprint-1 #1
@ -10,8 +10,8 @@ import androidx.compose.material3.ExperimentalMaterial3Api
|
|||||||
import androidx.compose.material3.ModalBottomSheet
|
import androidx.compose.material3.ModalBottomSheet
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import com.example.libary.theme.WhiteColor
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
@ -22,7 +22,7 @@ fun BottomSheet(
|
|||||||
ModalBottomSheet(
|
ModalBottomSheet(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
onDismissRequest = {},
|
onDismissRequest = {},
|
||||||
containerColor = Color.White,
|
containerColor = WhiteColor,
|
||||||
shape = AbsoluteRoundedCornerShape(24.dp),
|
shape = AbsoluteRoundedCornerShape(24.dp),
|
||||||
dragHandle = null
|
dragHandle = null
|
||||||
) {
|
) {
|
||||||
|
@ -3,6 +3,7 @@ package com.example.libary
|
|||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.PaddingValues
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
@ -23,10 +24,15 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.example.libary.theme.AccentColor
|
import com.example.libary.theme.AccentColor
|
||||||
|
import com.example.libary.theme.AccentInactive
|
||||||
import com.example.libary.theme.BlackColor
|
import com.example.libary.theme.BlackColor
|
||||||
|
import com.example.libary.theme.Desc
|
||||||
|
import com.example.libary.theme.InputBGColor
|
||||||
|
import com.example.libary.theme.InputStroke
|
||||||
import com.example.libary.theme.WhiteColor
|
import com.example.libary.theme.WhiteColor
|
||||||
|
|
||||||
enum class BigButtonState(
|
enum class BigButtonState(
|
||||||
@ -40,7 +46,7 @@ enum class BigButtonState(
|
|||||||
textColor = Color.White,
|
textColor = Color.White,
|
||||||
),
|
),
|
||||||
Inactive(
|
Inactive(
|
||||||
containerColor = Color(0xFFC9D4FB),
|
containerColor = AccentInactive,
|
||||||
textColor = WhiteColor,
|
textColor = WhiteColor,
|
||||||
enabled = false
|
enabled = false
|
||||||
),
|
),
|
||||||
@ -50,7 +56,7 @@ enum class BigButtonState(
|
|||||||
border = BorderStroke(1.dp, AccentColor)
|
border = BorderStroke(1.dp, AccentColor)
|
||||||
),
|
),
|
||||||
Tetriary(
|
Tetriary(
|
||||||
containerColor = Color(0xFFF5F5F9),
|
containerColor = InputBGColor,
|
||||||
textColor = BlackColor,
|
textColor = BlackColor,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -96,7 +102,7 @@ enum class SmallButtonState(
|
|||||||
textColor = Color.White,
|
textColor = Color.White,
|
||||||
),
|
),
|
||||||
Inactive(
|
Inactive(
|
||||||
containerColor = Color(0xFFC9D4FB),
|
containerColor = AccentInactive,
|
||||||
textColor = WhiteColor,
|
textColor = WhiteColor,
|
||||||
enabled = false
|
enabled = false
|
||||||
),
|
),
|
||||||
@ -106,7 +112,7 @@ enum class SmallButtonState(
|
|||||||
border = BorderStroke(1.dp, AccentColor)
|
border = BorderStroke(1.dp, AccentColor)
|
||||||
),
|
),
|
||||||
Tetriary(
|
Tetriary(
|
||||||
containerColor = Color(0xFFF5F5F9),
|
containerColor = InputBGColor,
|
||||||
textColor = BlackColor,
|
textColor = BlackColor,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -215,7 +221,7 @@ fun LoginButton(
|
|||||||
.width(335.dp)
|
.width(335.dp)
|
||||||
.height(60.dp),
|
.height(60.dp),
|
||||||
shape = AbsoluteRoundedCornerShape(10.dp),
|
shape = AbsoluteRoundedCornerShape(10.dp),
|
||||||
border = BorderStroke(1.dp, Color(0xFFEBEBEB)),
|
border = BorderStroke(1.dp, InputStroke),
|
||||||
colors = ButtonDefaults.buttonColors(
|
colors = ButtonDefaults.buttonColors(
|
||||||
containerColor = Color.White
|
containerColor = Color.White
|
||||||
)
|
)
|
||||||
@ -246,7 +252,7 @@ enum class ChipButtonState(
|
|||||||
val textColor: Color
|
val textColor: Color
|
||||||
) {
|
) {
|
||||||
On(AccentColor, Color.White),
|
On(AccentColor, Color.White),
|
||||||
Off(Color(0xFFF5F5F9), Color(0xFF7E7E9A))
|
Off(InputBGColor, Desc)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -277,3 +283,17 @@ fun ChipButton(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Preview
|
||||||
|
@Composable
|
||||||
|
private fun BigButtonPrev() {
|
||||||
|
Column {
|
||||||
|
BigButtonState.entries.forEach {
|
||||||
|
BigButton(
|
||||||
|
state = it,
|
||||||
|
text = "test"
|
||||||
|
)
|
||||||
|
Spacer(Modifier.height(5.dp))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -30,7 +30,12 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import com.example.libary.theme.Black1Color
|
||||||
|
import com.example.libary.theme.CaptionColor
|
||||||
|
import com.example.libary.theme.CartShadowColor
|
||||||
import com.example.libary.theme.DividerColor
|
import com.example.libary.theme.DividerColor
|
||||||
|
import com.example.libary.theme.InputBGColor
|
||||||
|
import com.example.libary.theme.White1Color
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun BaseCard(
|
fun BaseCard(
|
||||||
@ -39,13 +44,12 @@ fun BaseCard(
|
|||||||
) {
|
) {
|
||||||
Card(
|
Card(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.shadow(10.dp, AbsoluteRoundedCornerShape(12.dp), ambientColor = Color(0x99E4E8F5), spotColor = Color(
|
.shadow(10.dp, AbsoluteRoundedCornerShape(12.dp),
|
||||||
0x99E4E8F5
|
ambientColor = CartShadowColor, spotColor = CartShadowColor
|
||||||
)
|
|
||||||
),
|
),
|
||||||
shape = AbsoluteRoundedCornerShape(12.dp),
|
shape = AbsoluteRoundedCornerShape(12.dp),
|
||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
containerColor = Color.White
|
containerColor = White1Color
|
||||||
),
|
),
|
||||||
border = BorderStroke(1.dp, DividerColor)
|
border = BorderStroke(1.dp, DividerColor)
|
||||||
) {
|
) {
|
||||||
@ -71,7 +75,7 @@ fun PrimaryCard(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = name,
|
text = name,
|
||||||
color = Color.Black,
|
color = Black1Color,
|
||||||
fontWeight = FontWeight.W500,
|
fontWeight = FontWeight.W500,
|
||||||
fontSize = 16.sp
|
fontSize = 16.sp
|
||||||
)
|
)
|
||||||
@ -86,7 +90,7 @@ fun PrimaryCard(
|
|||||||
Column {
|
Column {
|
||||||
Text(
|
Text(
|
||||||
text = category,
|
text = category,
|
||||||
color = Color(0xFF939396),
|
color = CaptionColor,
|
||||||
fontWeight = FontWeight.W600,
|
fontWeight = FontWeight.W600,
|
||||||
fontSize = 14.sp
|
fontSize = 14.sp
|
||||||
)
|
)
|
||||||
@ -95,7 +99,7 @@ fun PrimaryCard(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = "$price ₽",
|
text = "$price ₽",
|
||||||
color = Color.Black,
|
color = Black1Color,
|
||||||
fontWeight = FontWeight.W600,
|
fontWeight = FontWeight.W600,
|
||||||
fontSize = 17.sp
|
fontSize = 17.sp
|
||||||
)
|
)
|
||||||
@ -131,7 +135,7 @@ fun CartCard(
|
|||||||
text = name,
|
text = name,
|
||||||
fontWeight = FontWeight.W500,
|
fontWeight = FontWeight.W500,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
color = Color.Black,
|
color = Black1Color,
|
||||||
modifier = Modifier.weight(1.0f)
|
modifier = Modifier.weight(1.0f)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -153,7 +157,7 @@ fun CartCard(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "$price ₽",
|
text = "$price ₽",
|
||||||
color = Color.Black,
|
color = Black1Color,
|
||||||
fontWeight = FontWeight.W500,
|
fontWeight = FontWeight.W500,
|
||||||
fontSize = 17.sp
|
fontSize = 17.sp
|
||||||
)
|
)
|
||||||
@ -165,7 +169,7 @@ fun CartCard(
|
|||||||
text = "$count штук",
|
text = "$count штук",
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 15.sp,
|
fontSize = 15.sp,
|
||||||
color = Color.Black
|
color = Black1Color
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.width(42.dp))
|
Spacer(Modifier.width(42.dp))
|
||||||
@ -174,7 +178,7 @@ fun CartCard(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(64.dp)
|
.width(64.dp)
|
||||||
.height(32.dp)
|
.height(32.dp)
|
||||||
.background(Color(0xFFF5F5F9), AbsoluteRoundedCornerShape(8.dp))
|
.background(InputBGColor, AbsoluteRoundedCornerShape(8.dp))
|
||||||
.clip(AbsoluteRoundedCornerShape(8.dp)),
|
.clip(AbsoluteRoundedCornerShape(8.dp)),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
@ -223,7 +227,7 @@ fun ProjectCard(
|
|||||||
text = name,
|
text = name,
|
||||||
fontWeight = FontWeight.W500,
|
fontWeight = FontWeight.W500,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
color = Color.Black
|
color = Black1Color
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(44.dp))
|
Spacer(Modifier.height(44.dp))
|
||||||
@ -235,7 +239,7 @@ fun ProjectCard(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = date,
|
text = date,
|
||||||
color = Color(0xFF939396),
|
color = CaptionColor,
|
||||||
fontWeight = FontWeight.W600,
|
fontWeight = FontWeight.W600,
|
||||||
fontSize = 14.sp
|
fontSize = 14.sp
|
||||||
)
|
)
|
||||||
|
@ -26,6 +26,8 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.example.libary.HeaderState.*
|
import com.example.libary.HeaderState.*
|
||||||
|
import com.example.libary.theme.Black1Color
|
||||||
|
import com.example.libary.theme.InputBGColor
|
||||||
|
|
||||||
enum class HeaderState {
|
enum class HeaderState {
|
||||||
Big,
|
Big,
|
||||||
@ -69,7 +71,7 @@ fun Header(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
color = Color.Black,
|
color = Black1Color,
|
||||||
fontWeight = FontWeight.W800,
|
fontWeight = FontWeight.W800,
|
||||||
fontSize = 24.sp
|
fontSize = 24.sp
|
||||||
)
|
)
|
||||||
@ -90,7 +92,7 @@ fun Header(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
color = Color.Black,
|
color = Black1Color,
|
||||||
fontWeight = FontWeight.W600,
|
fontWeight = FontWeight.W600,
|
||||||
fontSize = 20.sp
|
fontSize = 20.sp
|
||||||
)
|
)
|
||||||
@ -116,7 +118,7 @@ fun HeaderBt(
|
|||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.size(32.dp)
|
.size(32.dp)
|
||||||
.background(Color(0xFFF5F5F9), AbsoluteRoundedCornerShape(8.dp))
|
.background(InputBGColor, AbsoluteRoundedCornerShape(8.dp))
|
||||||
.clip(AbsoluteRoundedCornerShape(8.dp)),
|
.clip(AbsoluteRoundedCornerShape(8.dp)),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
|
@ -24,6 +24,11 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.example.libary.theme.AccentColor
|
import com.example.libary.theme.AccentColor
|
||||||
|
import com.example.libary.theme.BlackColor
|
||||||
|
import com.example.libary.theme.CaptionColor
|
||||||
|
import com.example.libary.theme.Error1Color
|
||||||
|
import com.example.libary.theme.InputBGColor
|
||||||
|
import com.example.libary.theme.InputStroke
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun Input(
|
fun Input(
|
||||||
@ -56,7 +61,7 @@ fun Input(
|
|||||||
placeholder = {
|
placeholder = {
|
||||||
Text(
|
Text(
|
||||||
text = placeholder,
|
text = placeholder,
|
||||||
color = Color(0xFF939396),
|
color = CaptionColor,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 16.sp
|
fontSize = 16.sp
|
||||||
)
|
)
|
||||||
@ -85,17 +90,17 @@ fun Input(
|
|||||||
shape = AbsoluteRoundedCornerShape(10.dp),
|
shape = AbsoluteRoundedCornerShape(10.dp),
|
||||||
colors = TextFieldDefaults.colors(
|
colors = TextFieldDefaults.colors(
|
||||||
cursorColor = AccentColor,
|
cursorColor = AccentColor,
|
||||||
focusedPlaceholderColor = Color(0xFF939396),
|
focusedPlaceholderColor = CaptionColor,
|
||||||
unfocusedPlaceholderColor = Color(0xFF939396),
|
unfocusedPlaceholderColor = CaptionColor,
|
||||||
|
|
||||||
focusedTextColor = Color.Black,
|
focusedTextColor = BlackColor,
|
||||||
unfocusedTextColor = Color.Black,
|
unfocusedTextColor = BlackColor,
|
||||||
|
|
||||||
focusedIndicatorColor = if (errorText.isNotEmpty()) Color(0xFFFD3535) else Color(0xFFEBEBEB),
|
focusedIndicatorColor = if (errorText.isNotEmpty()) Error1Color else InputStroke,
|
||||||
unfocusedIndicatorColor = if (errorText.isNotEmpty()) Color(0xFFFD3535) else Color(0xFFEBEBEB),
|
unfocusedIndicatorColor = if (errorText.isNotEmpty()) Error1Color else InputStroke,
|
||||||
|
|
||||||
focusedContainerColor = if (errorText.isNotEmpty()) Color(0xFFFD3535).copy(0.1f) else Color(0xFFF5F5F9),
|
focusedContainerColor = if (errorText.isNotEmpty()) Error1Color.copy(0.1f) else InputBGColor,
|
||||||
unfocusedContainerColor = if (errorText.isNotEmpty()) Color(0xFFFD3535).copy(0.1f) else Color(0xFFF5F5F9)
|
unfocusedContainerColor = if (errorText.isNotEmpty()) Error1Color.copy(0.1f) else InputBGColor
|
||||||
),
|
),
|
||||||
visualTransformation = if (!vis && pasMode) PasswordVisualTransformation('*') else VisualTransformation.None
|
visualTransformation = if (!vis && pasMode) PasswordVisualTransformation('*') else VisualTransformation.None
|
||||||
)
|
)
|
||||||
@ -105,7 +110,7 @@ fun Input(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = errorText,
|
text = errorText,
|
||||||
color = Color(0xFFFD3535),
|
color = Error1Color,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
fontWeight = FontWeight.W400
|
fontWeight = FontWeight.W400
|
||||||
)
|
)
|
||||||
|
@ -14,13 +14,16 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.focus.onFocusChanged
|
import androidx.compose.ui.focus.onFocusChanged
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.example.libary.theme.AccentColor
|
import com.example.libary.theme.AccentColor
|
||||||
|
import com.example.libary.theme.BlackColor
|
||||||
|
import com.example.libary.theme.CaptionColor
|
||||||
|
import com.example.libary.theme.InputBGColor
|
||||||
|
import com.example.libary.theme.InputStroke
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SearchInput(
|
fun SearchInput(
|
||||||
@ -39,7 +42,7 @@ fun SearchInput(
|
|||||||
placeholder = {
|
placeholder = {
|
||||||
Text(
|
Text(
|
||||||
text = "Искать описание",
|
text = "Искать описание",
|
||||||
color = Color(0xFF939396),
|
color = CaptionColor,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 16.sp
|
fontSize = 16.sp
|
||||||
)
|
)
|
||||||
@ -61,17 +64,14 @@ fun SearchInput(
|
|||||||
shape = AbsoluteRoundedCornerShape(10.dp),
|
shape = AbsoluteRoundedCornerShape(10.dp),
|
||||||
colors = TextFieldDefaults.colors(
|
colors = TextFieldDefaults.colors(
|
||||||
cursorColor = AccentColor,
|
cursorColor = AccentColor,
|
||||||
focusedPlaceholderColor = Color(0xFF939396),
|
focusedPlaceholderColor = CaptionColor,
|
||||||
unfocusedPlaceholderColor = Color(0xFF939396),
|
unfocusedPlaceholderColor = CaptionColor,
|
||||||
|
focusedTextColor = BlackColor,
|
||||||
focusedTextColor = Color.Black,
|
unfocusedTextColor = BlackColor,
|
||||||
unfocusedTextColor = Color.Black,
|
focusedIndicatorColor = InputStroke,
|
||||||
|
unfocusedIndicatorColor = InputStroke,
|
||||||
focusedIndicatorColor = Color(0xFFEBEBEB),
|
focusedContainerColor = InputBGColor,
|
||||||
unfocusedIndicatorColor = Color(0xFFEBEBEB),
|
unfocusedContainerColor = InputBGColor
|
||||||
|
|
||||||
focusedContainerColor = Color(0xFFF5F5F9),
|
|
||||||
unfocusedContainerColor = Color(0xFFF5F5F9)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,15 @@ import androidx.compose.runtime.mutableStateOf
|
|||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
import com.example.libary.theme.BlackColor
|
||||||
|
import com.example.libary.theme.CaptionColor
|
||||||
|
import com.example.libary.theme.InputBGColor
|
||||||
|
import com.example.libary.theme.InputStroke
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun Select(
|
fun Select(
|
||||||
@ -43,18 +46,18 @@ fun Select(
|
|||||||
text = placeholder,
|
text = placeholder,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
color = Color(0xFF939396)
|
color = CaptionColor
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
colors = TextFieldDefaults.colors(
|
colors = TextFieldDefaults.colors(
|
||||||
focusedPlaceholderColor = Color(0xFF939396),
|
focusedPlaceholderColor = CaptionColor,
|
||||||
unfocusedPlaceholderColor = Color(0xFF939396),
|
unfocusedPlaceholderColor = CaptionColor,
|
||||||
focusedTextColor = Color.Black,
|
focusedTextColor = BlackColor,
|
||||||
unfocusedTextColor = Color.Black,
|
unfocusedTextColor = BlackColor,
|
||||||
focusedIndicatorColor = Color(0xFFEBEBEB),
|
focusedIndicatorColor = InputStroke,
|
||||||
unfocusedIndicatorColor = Color(0xFFEBEBEB),
|
unfocusedIndicatorColor = InputStroke,
|
||||||
focusedContainerColor = Color(0xFFF5F5F9),
|
focusedContainerColor = InputBGColor,
|
||||||
unfocusedContainerColor = Color(0xFFF5F5F9)
|
unfocusedContainerColor = InputBGColor
|
||||||
),
|
),
|
||||||
trailingIcon = {
|
trailingIcon = {
|
||||||
Image(
|
Image(
|
||||||
|
@ -25,7 +25,9 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import com.example.libary.theme.AccentColor
|
import com.example.libary.theme.AccentColor
|
||||||
|
import com.example.libary.theme.IconsColor
|
||||||
import com.example.libary.theme.InputIconColor
|
import com.example.libary.theme.InputIconColor
|
||||||
|
import com.example.libary.theme.TabBarShad
|
||||||
|
|
||||||
data class TabBarData(
|
data class TabBarData(
|
||||||
val icon: Int,
|
val icon: Int,
|
||||||
@ -59,9 +61,9 @@ fun TabBar(
|
|||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.shadow(10.dp, spotColor = Color(0x4DA0A0A0), ambientColor = Color(0x4DA0A0A0))
|
.shadow(10.dp, spotColor = TabBarShad, ambientColor = TabBarShad)
|
||||||
) {
|
) {
|
||||||
HorizontalDivider(thickness = 1.dp, color = Color(0x4DA0A0A0))
|
HorizontalDivider(thickness = 1.dp, color = TabBarShad)
|
||||||
|
|
||||||
NavigationBar(
|
NavigationBar(
|
||||||
containerColor = Color.White
|
containerColor = Color.White
|
||||||
@ -76,13 +78,13 @@ fun TabBar(
|
|||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(it.icon),
|
painter = painterResource(it.icon),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (value.value == it) AccentColor else Color(0xFFB8C1CC)
|
tint = if (value.value == it) AccentColor else IconsColor
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
label = {
|
label = {
|
||||||
Text(
|
Text(
|
||||||
text = it.name,
|
text = it.name,
|
||||||
color = if (value.value == it) AccentColor else Color(0xFFB8C1CC),
|
color = if (value.value == it) AccentColor else IconsColor,
|
||||||
fontWeight = FontWeight.W400,
|
fontWeight = FontWeight.W400,
|
||||||
fontSize = 12.sp
|
fontSize = 12.sp
|
||||||
)
|
)
|
||||||
|
@ -22,4 +22,17 @@ val InputIconColor = Color(0xFFBFC7D1)
|
|||||||
val PlaceholderColor = Color(0xFF98989A)
|
val PlaceholderColor = Color(0xFF98989A)
|
||||||
val DescriptionColor = Color(0xFF8787A1)
|
val DescriptionColor = Color(0xFF8787A1)
|
||||||
val CardStrokeColor = Color(0xFFF2F2F2)
|
val CardStrokeColor = Color(0xFFF2F2F2)
|
||||||
val DividerColor = Color(0xFFF4F4F4)
|
val DividerColor = Color(0xFFF4F4F4)
|
||||||
|
|
||||||
|
val CartShadowColor = Color(0x99E4E8F5)
|
||||||
|
val CaptionColor = Color(0xFF939396)
|
||||||
|
val InputBGColor = Color(0xFFF5F5F9)
|
||||||
|
val AccentInactive = Color(0xFFC9D4FB)
|
||||||
|
val Desc = Color(0xFF7E7E9A)
|
||||||
|
val InputStroke = Color(0xFFEBEBEB)
|
||||||
|
val IconsColor = Color(0xFFB8C1CC)
|
||||||
|
val TabBarShad = Color(0x4DA0A0A0)
|
||||||
|
val Error1Color = Color(0xFFFD3535)
|
||||||
|
|
||||||
|
val White1Color = Color.White
|
||||||
|
val Black1Color = Color.Black
|
Loading…
x
Reference in New Issue
Block a user