diff --git a/app/src/main/java/com/paw/key/core/designsystem/theme/Color.kt b/app/src/main/java/com/paw/key/core/designsystem/theme/Color.kt index a53d631e..2bc037ff 100644 --- a/app/src/main/java/com/paw/key/core/designsystem/theme/Color.kt +++ b/app/src/main/java/com/paw/key/core/designsystem/theme/Color.kt @@ -44,6 +44,22 @@ val System_red = Color(0xFFEB210F) val System_green = Color(0xFF40C927) +/*------------------------------------------------*/ +// Brand +val OpacityPrimary = Color(0xFF114531) +val Primary = Color(0xFF4CD137) + +// contents +val Contents = Color(0xFF171717) + +// background +val Background1 = Color(0xFFEEEEEE) +val Background2 = Color(0xFFFFFFFF) + +// default +val Default = Color(0xFF9C9C9C) + + @Stable class PawKeyColors( green50: Color, @@ -78,6 +94,14 @@ class PawKeyColors( system_red: Color, system_green: Color, + + /*--------------------*/ + opacityPrimary: Color, + primary: Color, + contents: Color, + background1: Color, + background2: Color, + default: Color, ) { var green50: Color by mutableStateOf(green50) private set @@ -140,20 +164,21 @@ class PawKeyColors( var system_green: Color by mutableStateOf(system_green) private set + /*----------------------------*/ + var opacityPrimary: Color by mutableStateOf(opacityPrimary) + private set + var primary: Color by mutableStateOf(primary) + private set + var contents: Color by mutableStateOf(contents) + private set + var background1: Color by mutableStateOf(background1) + private set + var background2: Color by mutableStateOf(background2) + private set + var default: Color by mutableStateOf(default) + private set fun copy( - beige50: Color = this.green50, - beige100: Color = this.green100, - beige200: Color = this.green200, - beige300: Color = this.green300, - beige400: Color = this.green400, - beige500: Color = this.green500, - beige600: Color = this.green600, - beige700: Color = this.green700, - beige800: Color = this.green800, - beige900: Color = this.green900, - beige950: Color = this.green950, - gray5: Color = this.gray5, gray25: Color = this.gray25, gray50: Color = this.gray50, @@ -175,8 +200,16 @@ class PawKeyColors( system_red: Color = this.system_red, system_green: Color = this.system_green, + /*----------------------------------*/ + opacityPrimary: Color = this.opacityPrimary, + primary: Color = this.primary, + contents: Color = this.contents, + background1: Color = this.background1, + background2: Color = this.background2, + default: Color = this.default, ): PawKeyColors = PawKeyColors( + green50 = green50, green100 = green100, green200 = green200, @@ -208,7 +241,15 @@ class PawKeyColors( black = black, system_red = system_red, - system_green = system_green + system_green = system_green, + + /*-------------------------------*/ + opacityPrimary = opacityPrimary, + primary = primary, + contents = contents, + background1 = background1, + background2 = background2, + default = default, ) fun update(other: PawKeyColors) { @@ -243,6 +284,14 @@ class PawKeyColors( system_red = other.system_red system_green = other.system_green + + /*-------------------------------*/ + opacityPrimary = other.opacityPrimary + primary = other.primary + contents = other.contents + background1 = other.background1 + background2 = other.background2 + default = other.default } } @@ -280,8 +329,14 @@ fun pawKeyColors( system_red: Color = System_red, system_green: Color = System_green, - - ) = PawKeyColors( + /*---------------------------------*/ + opacityPrimary: Color = OpacityPrimary, + primary: Color = Primary, + contents: Color = Contents, + background1: Color = Background1, + background2: Color = Background2, + default: Color = Default, +) = PawKeyColors( green50 = green50, green100 = green100, green200 = green200, @@ -313,7 +368,13 @@ fun pawKeyColors( black = black, system_red = system_red, - system_green = system_green - - + system_green = system_green, + + /*----------------------------*/ + opacityPrimary = opacityPrimary, + primary = primary, + contents = contents, + background1 = background1, + background2 = background2, + default = default, ) \ No newline at end of file diff --git a/app/src/main/java/com/paw/key/core/designsystem/theme/Theme.kt b/app/src/main/java/com/paw/key/core/designsystem/theme/Theme.kt index fa170c00..1f3b5ace 100644 --- a/app/src/main/java/com/paw/key/core/designsystem/theme/Theme.kt +++ b/app/src/main/java/com/paw/key/core/designsystem/theme/Theme.kt @@ -45,19 +45,6 @@ fun ProvidePawKeyColorsAndTypography( content = content ) } -/* -@Composable -fun DoggyWalkerAndroidTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - content: @Composable () -> Unit -) { - val colors = DoggyWalkerColors() - val typography = DoggyWalkerTypography() - - ProvideDoggyWalkerColorsAndTypography(colors, typography) { - MaterialTheme(content = content) - } -}*/ @Composable fun PawKeyTheme( diff --git a/app/src/main/java/com/paw/key/core/designsystem/theme/Type.kt b/app/src/main/java/com/paw/key/core/designsystem/theme/Type.kt index 86ae6931..2149279c 100644 --- a/app/src/main/java/com/paw/key/core/designsystem/theme/Type.kt +++ b/app/src/main/java/com/paw/key/core/designsystem/theme/Type.kt @@ -11,6 +11,7 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.LineHeightStyle import androidx.compose.ui.unit.TextUnit +import androidx.compose.ui.unit.em import androidx.compose.ui.unit.sp import com.paw.key.R @@ -38,7 +39,21 @@ class PawKeyTypography internal constructor( caption12Sb1: TextStyle, caption12Sb2: TextStyle, caption12M: TextStyle, - caption12R: TextStyle + caption12R: TextStyle, + /*--- 이 위에는 전체 디자인 확정 시 전부 삭제 예정 지금은 오류 방지용으로 남김*/ + header1: TextStyle, + header2: TextStyle, + header3: TextStyle, + subTitle: TextStyle, + bodyDefault: TextStyle, + bodyActive: TextStyle, + bodySmall: TextStyle, + mainButtonDefault: TextStyle, + mainButtonActive: TextStyle, + subButtonDefault: TextStyle, + subButtonActive: TextStyle, + buttonSmall: TextStyle, + buttonLink: TextStyle, ) { var head24B: TextStyle by mutableStateOf(head24B) private set @@ -75,6 +90,34 @@ class PawKeyTypography internal constructor( var caption12R: TextStyle by mutableStateOf(caption12R) private set + /*------------------------------------------------------------*/ + var header1: TextStyle by mutableStateOf(header1) + private set + var header2: TextStyle by mutableStateOf(header2) + private set + var header3: TextStyle by mutableStateOf(header3) + private set + var subTitle: TextStyle by mutableStateOf(subTitle) + private set + var bodyDefault: TextStyle by mutableStateOf(bodyDefault) + private set + var bodyActive: TextStyle by mutableStateOf(bodyActive) + private set + var bodySmall: TextStyle by mutableStateOf(bodySmall) + private set + var mainButtonDefault: TextStyle by mutableStateOf(mainButtonDefault) + private set + var mainButtonActive: TextStyle by mutableStateOf(mainButtonActive) + private set + var subButtonDefault: TextStyle by mutableStateOf(subButtonDefault) + private set + var subButtonActive: TextStyle by mutableStateOf(subButtonActive) + private set + var buttonSmall: TextStyle by mutableStateOf(buttonSmall) + private set + var buttonLink: TextStyle by mutableStateOf(buttonLink) + private set + fun copy( head24B: TextStyle = this.head24B, head24Sb: TextStyle = this.head24Sb, @@ -92,7 +135,22 @@ class PawKeyTypography internal constructor( caption12Sb1: TextStyle = this.caption12Sb1, caption12Sb2: TextStyle = this.caption12Sb2, caption12M: TextStyle = this.caption12M, - caption12R: TextStyle = this.caption12R + caption12R: TextStyle = this.caption12R, + /*----------------------------------*/ + header1: TextStyle = this.header1, + header2: TextStyle = this.header2, + header3: TextStyle = this.header3, + subTitle: TextStyle = this.subTitle, + bodyDefault: TextStyle = this.bodyDefault, + bodyActive: TextStyle = this.bodyActive, + bodySmall: TextStyle = this.bodySmall, + mainButtonDefault: TextStyle = this.mainButtonDefault, + mainButtonActive: TextStyle = this.mainButtonActive, + subButtonDefault: TextStyle = this.subButtonDefault, + subButtonActive: TextStyle = this.subButtonActive, + buttonSmall: TextStyle = this.buttonSmall, + buttonLink: TextStyle = this.buttonLink, + ): PawKeyTypography = PawKeyTypography( head24B, head24Sb, @@ -110,7 +168,21 @@ class PawKeyTypography internal constructor( caption12Sb1, caption12Sb2, caption12M, - caption12R + caption12R, + /*----------------------------------*/ + header1, + header2, + header3, + subTitle, + bodyDefault, + bodyActive, + bodySmall, + mainButtonDefault, + mainButtonActive, + subButtonDefault, + subButtonActive, + buttonSmall, + buttonLink, ) fun update(other: PawKeyTypography) { @@ -131,6 +203,20 @@ class PawKeyTypography internal constructor( caption12Sb2 = other.caption12Sb2 caption12M = other.caption12M caption12R = other.caption12R + /*----------------------------------*/ + header1 = other.header1 + header2 = other.header2 + header3 = other.header3 + subTitle = other.subTitle + bodyDefault = other.bodyDefault + bodyActive = other.bodyActive + bodySmall = other.bodySmall + mainButtonDefault = other.mainButtonDefault + mainButtonActive = other.mainButtonActive + subButtonDefault = other.subButtonDefault + subButtonActive = other.subButtonActive + buttonSmall = other.buttonSmall + buttonLink = other.buttonLink } } @@ -275,5 +361,97 @@ fun pawKeyTypography(): PawKeyTypography { lineHeight = (12 * 1.2).sp, letterSpacing = TextUnit.Unspecified ), + /*---------------------------------------*/ + header1 = pawKeyTextStyle( + fontFamily = PretendardBold, + fontWeight = FontWeight.Bold, + fontSize = 28.sp, + lineHeight = 36.sp, + letterSpacing = (-0.02).em + ), + header2 = pawKeyTextStyle( + fontFamily = PretendardBold, + fontWeight = FontWeight.Bold, + fontSize = 24.sp, + lineHeight = 26.sp, + letterSpacing = (-0.02).em + ), + header3 = pawKeyTextStyle( + fontFamily = PretendardBold, + fontWeight = FontWeight.Bold, + fontSize = 20.sp, + lineHeight = 24.sp, + letterSpacing = (-0.02).em + ), + subTitle = pawKeyTextStyle( + fontFamily = PretendardSemiBold, + fontWeight = FontWeight.SemiBold, + fontSize = 16.sp, + lineHeight = 20.sp, + letterSpacing = 0.em + ), + bodyDefault = pawKeyTextStyle( + fontFamily = PretendardRegular, + fontWeight = FontWeight.Normal, + fontSize = 14.sp, + lineHeight = 20.sp, + letterSpacing = 0.em + ), + bodyActive = pawKeyTextStyle( + fontFamily = PretendardRegular, + fontWeight = FontWeight.Normal, + fontSize = 14.sp, + lineHeight = 20.sp, + letterSpacing = 0.em + ), + bodySmall = pawKeyTextStyle( + fontFamily = PretendardMedium, + fontWeight = FontWeight.Medium, + fontSize = 12.sp, + lineHeight = 16.sp, + letterSpacing = 0.em + ), + mainButtonDefault = pawKeyTextStyle( + fontFamily = PretendardRegular, + fontWeight = FontWeight.Normal, + fontSize = 18.sp, + lineHeight = 16.sp, + letterSpacing = 0.em + ), + mainButtonActive = pawKeyTextStyle( + fontFamily = PretendardRegular, + fontWeight = FontWeight.Normal, + fontSize = 18.sp, + lineHeight = 16.sp, + letterSpacing = 0.em + ), + subButtonDefault = pawKeyTextStyle( + fontFamily = PretendardRegular, + fontWeight = FontWeight.Normal, + fontSize = 12.sp, + lineHeight = 16.sp, + letterSpacing = 0.em + ), + subButtonActive = pawKeyTextStyle( + fontFamily = PretendardSemiBold, + fontWeight = FontWeight.SemiBold, + fontSize = 12.sp, + lineHeight = 16.sp, + letterSpacing = 0.em + ), + buttonSmall = pawKeyTextStyle( + fontFamily = PretendardSemiBold, + fontWeight = FontWeight.SemiBold, + fontSize = 10.sp, + lineHeight = 14.sp, + letterSpacing = 0.em + ), + buttonLink = pawKeyTextStyle( + fontFamily = PretendardRegular, + fontWeight = FontWeight.Normal, + fontSize = 12.sp, + lineHeight = 16.sp, + letterSpacing = 0.em + ), ) } \ No newline at end of file