Skip to content

Commit

Permalink
[MERGE] #212 -> develop
Browse files Browse the repository at this point in the history
[REFACTOR/#212] ๋‹ค์ด์–ผ๋กœ๊ทธ / ๋ฆฌํŒฉํ† ๋ง
  • Loading branch information
boiledEgg-s authored Sep 6, 2024
2 parents a6569b5 + 52e6c48 commit 82d547f
Show file tree
Hide file tree
Showing 23 changed files with 1,106 additions and 482 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,20 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.aspectRatio
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.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import com.terning.core.R
import com.terning.core.designsystem.component.button.RoundButton
import com.terning.core.designsystem.theme.Grey300
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.core.extension.noRippleClickable

Expand Down Expand Up @@ -58,7 +48,8 @@ fun TerningBasicDialog(
Row(
modifier = Modifier
.fillMaxWidth()
.padding(18.dp),
.padding(top = 18.dp, bottom = 16.dp)
.padding(horizontal = 16.dp),
horizontalArrangement = Arrangement.End
) {
Icon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.Dp

/**
* ๋ผ๋””์˜ค๋ฒ„ํŠผ ๊ทธ๋ฃน์„ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
*
* @param options ๋ผ๋””์˜ค๋ฒ„ํŠผ์— ํ‘œ์‹œ๋  ์˜ต์…˜ ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค.
* @param buttonComposable ๋ผ๋””์˜ค๋ฒ„ํŠผ์„ ํ‘œ์‹œํ•˜๋Š” ์ปดํฌ์ €๋ธ”์ž…๋‹ˆ๋‹ค.
* @param gridCellCount Row ํ•˜๋‚˜์— ๋“ค์–ด๊ฐˆ ๋ฒ„ํŠผ ๊ฐœ์ˆ˜์ž…๋‹ˆ๋‹ค.
* @param verticalArrangementSpace Row ๊ฐ„๊ฒฉ์ž…๋‹ˆ๋‹ค.
* @param horizontalArrangementSpace Column ๊ฐ„๊ฒฉ์ž…๋‹ˆ๋‹ค.
* @param modifier ์ˆ˜์ •์ž์ž…๋‹ˆ๋‹ค.
* @param onOptionSelected ์˜ต์…˜์ด ์„ ํƒ๋˜์—ˆ์„ ๋•Œ ํ˜ธ์ถœ๋˜๋Š” ์ฝœ๋ฐฑ์ž…๋‹ˆ๋‹ค.
*/

@Composable
fun <T> RadioButtonGroups(
options: List<T>,
Expand Down
16 changes: 16 additions & 0 deletions core/src/main/java/com/terning/core/designsystem/theme/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ val CalBlue2 = Color(0xFF4AA9F2)
val CalPurple = Color(0xFF9B64E2)
val CalPink = Color(0xFFF260AC)

// Calendar Color (Border)
val CalRedLi = Color(0xFFDD2F36)
val CalOrangeLi = Color(0xFFF39D35)
val CalGreenLi = Color(0xFF74CE44)
val CalBlueLi = Color(0xFF3B9CE8)
val CalPurpleLi = Color(0xFF8D4EDE)
val CalPinkLi = Color(0xFFF9439A)

// Calendar Color (Background)
val CalRedBc = Color(0x7FED4E54)
val CalOrangeBc = Color(0x7FF3A649)
val CalGreenBc = Color(0x7F84D558)
val CalBlueBc = Color(0x7F4AA9F2)
val CalPurpleBc = Color(0x7F9B64E2)
val CalPinkBc = Color(0x7FF260AC)

// Other
val WarningRed = Color(0xFFF54645)
val SundayRed = Color(0xFFEB1211)
Expand Down
11 changes: 11 additions & 0 deletions core/src/main/java/com/terning/core/extension/TextStyle.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.terning.core.extension

import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp

@Composable
fun TextStyle.getFixHeightByMaxLine(maxLine: Int): Dp = with(LocalDensity.current) {
lineHeight.toDp() * maxLine
}
38 changes: 38 additions & 0 deletions core/src/main/java/com/terning/core/type/ColorType.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.terning.core.type

import androidx.compose.ui.graphics.Color
import com.terning.core.designsystem.theme.CalBlue2
import com.terning.core.designsystem.theme.CalBlueBc
import com.terning.core.designsystem.theme.CalBlueLi
import com.terning.core.designsystem.theme.CalGreen2
import com.terning.core.designsystem.theme.CalGreenBc
import com.terning.core.designsystem.theme.CalGreenLi
import com.terning.core.designsystem.theme.CalOrange2
import com.terning.core.designsystem.theme.CalOrangeBc
import com.terning.core.designsystem.theme.CalOrangeLi
import com.terning.core.designsystem.theme.CalPink
import com.terning.core.designsystem.theme.CalPinkBc
import com.terning.core.designsystem.theme.CalPinkLi
import com.terning.core.designsystem.theme.CalPurple
import com.terning.core.designsystem.theme.CalPurpleBc
import com.terning.core.designsystem.theme.CalPurpleLi
import com.terning.core.designsystem.theme.CalRed
import com.terning.core.designsystem.theme.CalRedBc
import com.terning.core.designsystem.theme.CalRedLi

enum class ColorType(
val main: Color,
val border: Color,
val sub: Color
) {
RED(main = CalRed, border = CalRedLi, sub = CalRedBc),
ORANGE(main = CalOrange2, border = CalOrangeLi, sub = CalOrangeBc),
GREEN(main = CalGreen2, border = CalGreenLi, sub = CalGreenBc),
BLUE(main = CalBlue2, border = CalBlueLi, sub = CalBlueBc),
PURPLE(main = CalPurple, border = CalPurpleLi, sub = CalPurpleBc),
PINK(main = CalPink, border = CalPinkLi, sub = CalPinkBc);

companion object {
fun findColorType(mainColor: Color): ColorType? = entries.find { it.main == mainColor }
}
}
6 changes: 3 additions & 3 deletions core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@

<!--Dialog-->
<string name="dialog_content_scrap_sub_title">๊ณต๊ณ ๋ฅผ ์บ˜๋ฆฐ๋”์— ์Šคํฌ๋žฉํ•˜์‹œ๊ฒ ์–ด์š”?</string>
<string name="dialog_content_color_button">์ƒ‰์ƒ</string>
<string name="dialog_content_calendar_color_change">์ƒ‰์ƒ ์ €์žฅํ•˜๊ธฐ</string>
<string name="dialog_content_color_button">์Šคํฌ๋žฉ ์ƒ‰์ƒ</string>
<string name="dialog_content_calendar_color_change">์ƒ‰์ƒ ๋ณ€๊ฒฝํ•˜๊ธฐ</string>
<string name="dialog_scrap_button">๋‚ด ์บ˜๋ฆฐ๋”์— ์Šคํฌ๋žฉํ•˜๊ธฐ</string>
<string name="dialog_content_scrap_cancel_main_title">๊ด€์‹ฌ ๊ณต๊ณ ๊ฐ€ ์บ˜๋ฆฐ๋”์—์„œ ์‚ฌ๋ผ์ ธ์š”!</string>
<string name="dialog_content_scrap_cancel_sub_title">์Šคํฌ๋žฉ์„ ์ทจ์†Œํ•˜์‹œ๊ฒ ์–ด์š”?</string>
<string name="dialog_scrap_cancel_button">์Šคํฌ๋žฉ ์ทจ์†Œํ•˜๊ธฐ</string>
<string name="dialog_scrap_mine">๋‚ด๊ฐ€ ์Šคํฌ๋žฉํ•œ ๊ด€์‹ฌ ๊ณต๊ณ ์—์š”!</string>
<string name="dialog_scrap_move_to_intern">๊ณต๊ณ  ์ƒ์„ธ ์ •๋ณด ๋ณด๋Ÿฌ๊ฐ€๊ธฐ</string>
<string name="dialog_scrap_move_to_intern">๊ณต๊ณ  ์ƒ์„ธ ์ •๋ณด ๋ณด๊ธฐ</string>
<string name="dialog_today_deadline">์˜ค๋Š˜ ๋งˆ๊ฐ๋˜๋Š” ๊ณต๊ณ ์˜ˆ์š”!</string>

<!--Intern-->
Expand Down
1 change: 1 addition & 0 deletions feature/src/main/assets/terning_scrap_cancel.json

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit 82d547f

Please sign in to comment.