Skip to content

Commit

Permalink
[System] 디자인시스템 적용 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajou4095 authored Jan 28, 2024
1 parent 4c64d65 commit e8283f4
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,34 @@ package ac.dnd.bookkeeping.android.presentation.common.theme

import androidx.compose.ui.graphics.Color

val Purple200 = Color(0xFFBB86FC)
val Purple500 = Color(0xFF6200EE)
val Purple700 = Color(0xFF3700B3)
val Teal200 = Color(0xFF03DAC5)
val Primary8 = Color(0xFF8830A7)
val Primary7 = Color(0xFFAD00E9)
val Primary6 = Color(0xFFC400F4)
val Primary5 = Color(0xFFD401FE)
val Primary4 = Color(0xFFdd55ff)
val Primary3 = Color(0xFFe788ff)
val Primary2 = Color(0xFFf1bbff)
val Primary1 = Color(0xFFfceeff)

val Secondary6 = Color(0xFFFF8300)
val Secondary5 = Color(0xFFFFC800)
val Secondary4 = Color(0xFFFFDD26)
val Secondary3 = Color(0xFFFFEC80)
val Secondary2 = Color(0xFFFFF4B1)
val Secondary1 = Color(0xFFFFEC80)

val Gray800 = Color(0xFF101219)
val Gray700 = Color(0xFF33353C)
val Gray600 = Color(0xFF75777B)
val Gray500 = Color(0xFFA4A6AA)
val Gray400 = Color(0xFFCBCDCF)
val Gray300 = Color(0xFFE8E9EA)
val Gray200 = Color(0xFFF2F3F4)
val Gray150 = Color(0xFFF6F6F7)
val Gray100 = Color(0xFFF9F9FA)
val Gray000 = Color(0xFFFFFFFF)

val Negative = Color(0xFFFF4949)
val Positive = Color(0xFF13CE66)
val Warning = Color(0xFFFFCC3D)
val Active = Color(0xFF2D8EFF)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ac.dnd.bookkeeping.android.presentation.common.theme

import androidx.compose.ui.unit.dp

val Space4 = 4.dp
val Space8 = 8.dp
val Space12 = 12.dp
val Space16 = 16.dp
val Space20 = 20.dp
val Space24 = 24.dp
val Space32 = 32.dp
val Space40 = 40.dp
val Space48 = 48.dp
val Space56 = 56.dp
val Space80 = 80.dp

val Icon24 = 24.dp
val Icon28 = 24.dp
val Icon32 = 24.dp
val Icon80 = 24.dp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import androidx.compose.ui.unit.dp

val Shapes = Shapes(
small = RoundedCornerShape(4.dp),
medium = RoundedCornerShape(4.dp),
large = RoundedCornerShape(0.dp)
medium = RoundedCornerShape(8.dp),
large = RoundedCornerShape(12.dp)
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@ import androidx.compose.material.darkColors
import androidx.compose.material.lightColors
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.Color
import com.google.accompanist.systemuicontroller.rememberSystemUiController

private val DarkColorPalette = darkColors(
primary = Purple200,
primaryVariant = Purple700,
secondary = Teal200
primary = Primary2,
primaryVariant = Primary4,
secondary = Secondary1,
background = Gray600,
surface = Gray700,
onPrimary = Gray800,
onSecondary = Gray800,
onBackground = Gray000,
onSurface = Gray000,
)


private val LightColorPalette = lightColors(
primary = Purple500,
primaryVariant = Purple700,
secondary = Teal200

/* Other default colors to override
background = Color.White,
surface = Color.White,
onPrimary = Color.White,
onSecondary = Color.Black,
onBackground = Color.Black,
onSurface = Color.Black,
*/
primary = Primary4,
primaryVariant = Primary1,
secondary = Secondary2,
background = Gray200,
surface = Gray100,
onPrimary = Gray000,
onSecondary = Gray000,
onBackground = Gray800,
onSurface = Gray800,
)

@Composable
Expand All @@ -47,8 +48,9 @@ fun BookkeepingTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Compo
)

val systemUiController = rememberSystemUiController()

SideEffect {
systemUiController.setSystemBarsColor(Color.White)
systemUiController.setSystemBarsColor(colors.background)
systemUiController.isNavigationBarVisible = false
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package ac.dnd.bookkeeping.android.presentation.common.theme

import androidx.compose.material.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp

private val EmptyTextStyle = TextStyle(
fontSize = 0.sp
)

val Typography = Typography(
defaultFontFamily = FontFamily.Default,
h1 = EmptyTextStyle,
h2 = EmptyTextStyle,
h3 = EmptyTextStyle,
h4 = EmptyTextStyle,
h5 = EmptyTextStyle,
h6 = EmptyTextStyle,
subtitle1 = EmptyTextStyle,
subtitle2 = EmptyTextStyle,
body1 = EmptyTextStyle,
body2 = EmptyTextStyle,
button = EmptyTextStyle,
caption = EmptyTextStyle,
overline = EmptyTextStyle,
)

val Headline0 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 24.sp
)
val Headline1 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 20.sp
)
val Headline2 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 18.sp
)
val Headline3 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 16.sp
)
val Body0 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp
)
val Body1 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 14.sp
)
val Body2 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 12.sp
)
val Caption1 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 12.sp
)
val Caption2 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 12.sp
)
val Caption3 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 10.sp
)
val Caption4 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.SemiBold,
fontSize = 10.sp
)
val Caption5 = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 10.sp
)

0 comments on commit e8283f4

Please sign in to comment.