From 1b586e0bce302e764ac0a116a437e0ed812adafd Mon Sep 17 00:00:00 2001 From: roel Date: Sat, 11 Jan 2025 23:45:18 +0900 Subject: [PATCH 01/20] =?UTF-8?q?[FEAT/#12]=20Modifier.noRippleClickable?= =?UTF-8?q?=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/core/util/modifier/ModifierExt.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt diff --git a/app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt b/app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt new file mode 100644 index 00000000..d64b56b7 --- /dev/null +++ b/app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt @@ -0,0 +1,19 @@ +package com.spoony.spoony.core.util.modifier + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.composed + +@Composable +fun Modifier.noRippleClickable( + onClick: () -> Unit, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } +): Modifier = composed { + this.clickable( + indication = null, + interactionSource = interactionSource + ) { onClick() } +} From 5c90d13c07c6370fadad85f729d3e63aaf8c7d4d Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 00:15:07 +0900 Subject: [PATCH 02/20] =?UTF-8?q?[FEAT/#12]=20ButtonStyles.kt=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/spoony/core/designsystem/type/ButtonStyles.kt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/src/main/java/com/spoony/spoony/core/designsystem/type/ButtonStyles.kt diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/type/ButtonStyles.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/type/ButtonStyles.kt new file mode 100644 index 00000000..48eb3b98 --- /dev/null +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/type/ButtonStyles.kt @@ -0,0 +1,9 @@ +package com.spoony.spoony.core.designsystem.type + +enum class ButtonSize { + Xlarge, Large, Medium, Small, Xsmall +} + +enum class ButtonStyle { + Primary, Secondary, Tertiary +} From 95d06989b06451ad3428fffbbb953562eb8347a8 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 00:15:36 +0900 Subject: [PATCH 03/20] =?UTF-8?q?[FEAT/#12]=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20SpoonyButton=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/button/SpoonyButton.kt | 592 ++++++++++++++++++ 1 file changed, 592 insertions(+) create mode 100644 app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt new file mode 100644 index 00000000..6c69416d --- /dev/null +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -0,0 +1,592 @@ +package com.spoony.spoony.core.designsystem.component.button + +import androidx.compose.foundation.background +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.interaction.collectIsPressedAsState +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Icon +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.spoony.spoony.R +import com.spoony.spoony.core.designsystem.theme.SpoonyAndroidTheme +import com.spoony.spoony.core.designsystem.type.ButtonSize +import com.spoony.spoony.core.designsystem.type.ButtonStyle +import com.spoony.spoony.core.util.modifier.noRippleClickable + +@Composable +fun SpoonyButton( + text: String, + size: ButtonSize = ButtonSize.Medium, + style: ButtonStyle = ButtonStyle.Primary, + enabled: Boolean = true, + icon: (@Composable () -> Unit)? = null, + onClick: () -> Unit = {}, + modifier: Modifier = Modifier +) { + val interactionSource = remember { MutableInteractionSource() } + val isPressed by interactionSource.collectIsPressedAsState() + val backgroundColor = when { + !enabled -> when (style) { + ButtonStyle.Primary -> SpoonyAndroidTheme.colors.main100 + ButtonStyle.Secondary -> SpoonyAndroidTheme.colors.gray300 + ButtonStyle.Tertiary -> SpoonyAndroidTheme.colors.gray100 + } + isPressed -> when (style) { + ButtonStyle.Primary -> SpoonyAndroidTheme.colors.main500 + ButtonStyle.Secondary -> SpoonyAndroidTheme.colors.gray800 + ButtonStyle.Tertiary -> SpoonyAndroidTheme.colors.gray100 + } + + else -> when (style) { + ButtonStyle.Primary -> SpoonyAndroidTheme.colors.main400 + ButtonStyle.Secondary -> SpoonyAndroidTheme.colors.black + ButtonStyle.Tertiary -> SpoonyAndroidTheme.colors.gray0 + } + } + val paddingValues = when (size) { + ButtonSize.Xlarge -> PaddingValues(horizontal = 16.dp, vertical = 16.5.dp) + ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 18.dp) + ButtonSize.Xsmall -> PaddingValues(horizontal = 16.dp, vertical = 12.dp) + } + + val textStyle = when (size) { + ButtonSize.Xlarge -> SpoonyAndroidTheme.typography.body1b + ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> SpoonyAndroidTheme.typography.body2b + } + + val textColor = when (style) { + ButtonStyle.Tertiary -> when { + !enabled -> SpoonyAndroidTheme.colors.gray400 + else -> SpoonyAndroidTheme.colors.gray600 + } + else -> SpoonyAndroidTheme.colors.white + } + + Box( + modifier = modifier + .fillMaxWidth() + .clip(RoundedCornerShape(8.dp)) + .background(color = backgroundColor) + .noRippleClickable( + interactionSource = interactionSource, + onClick = onClick + ) + .padding(paddingValues), + contentAlignment = Alignment.Center + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Center + ) { + if (icon != null) { + icon() + Spacer(modifier = Modifier.width(8.dp)) + } + Text( + text = text, + color = textColor, + style = textStyle + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonPrimaryEnabledPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Xlarge + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Large + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Medium + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Small + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Xsmall + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonPrimaryDisabledPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + style = ButtonStyle.Primary, + size = ButtonSize.Xlarge, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Primary, + size = ButtonSize.Large, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Primary, + size = ButtonSize.Medium, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Primary, + size = ButtonSize.Small, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Primary, + size = ButtonSize.Xsmall, + enabled = false + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonPrimaryIconTextPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Xlarge, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Large, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Medium, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Small, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Primary, + size = ButtonSize.Xsmall, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonSecondaryEnabledPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Xlarge + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Large + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Medium + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Small + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Xsmall + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonSecondaryDisabledPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + style = ButtonStyle.Secondary, + size = ButtonSize.Xlarge, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Secondary, + size = ButtonSize.Large, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Secondary, + size = ButtonSize.Medium, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Secondary, + size = ButtonSize.Small, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Secondary, + size = ButtonSize.Xsmall, + enabled = false + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonSecondaryIconTextPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Xlarge, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Large, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Medium, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Small, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Xsmall, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonTertiaryEnabledPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Tertiary, + size = ButtonSize.Xlarge + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Tertiary, + size = ButtonSize.Large + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Tertiary, + size = ButtonSize.Medium + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Tertiary, + size = ButtonSize.Small + ) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Tertiary, + size = ButtonSize.Xsmall + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonTertiaryDisabledPreview() { + SpoonyAndroidTheme { + Column( + modifier = Modifier.fillMaxWidth(), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + SpoonyButton( + text = "버튼", + style = ButtonStyle.Tertiary, + size = ButtonSize.Xlarge, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Tertiary, + size = ButtonSize.Large, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Tertiary, + size = ButtonSize.Medium, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Tertiary, + size = ButtonSize.Small, + enabled = false + ) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Tertiary, + size = ButtonSize.Xsmall, + enabled = false + ) + } + } +} + +@Preview +@Composable +private fun SpoonyButtonWidthModifierPreview() { + SpoonyAndroidTheme { + SpoonyButton( + text = "떠먹으러 가기", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Xsmall, + modifier = Modifier.width(134.dp) + ) + } +} + +@Preview +@Composable +private fun SpoonyButtonTwoButtonPreview() { + SpoonyAndroidTheme { + Column( + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Tertiary, + size = ButtonSize.Xsmall, + modifier = Modifier.weight(1f) + ) + Spacer(modifier = Modifier.width(13.dp)) + SpoonyButton( + text = "버튼", + onClick = {}, + style = ButtonStyle.Secondary, + size = ButtonSize.Xsmall, + modifier = Modifier.weight(1f) + ) + } + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + SpoonyButton( + text = "버튼", + style = ButtonStyle.Tertiary, + size = ButtonSize.Xsmall, + enabled = false, + modifier = Modifier.weight(1f) + ) + Spacer(modifier = Modifier.width(13.dp)) + SpoonyButton( + text = "버튼", + style = ButtonStyle.Secondary, + size = ButtonSize.Xsmall, + enabled = false, + modifier = Modifier.weight(1f) + ) + } + } + } +} From bfa780cf4a0fdb5b140118886e21813f89268d58 Mon Sep 17 00:00:00 2001 From: Hyobeen-Park Date: Sun, 12 Jan 2025 00:29:47 +0900 Subject: [PATCH 04/20] =?UTF-8?q?[ADD/#10]=20=EC=95=84=EC=9D=B4=EC=BD=98?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../res/drawable/ic_add_map_gray400_24.xml | 22 +++++ .../res/drawable/ic_add_map_main400_24.xml | 22 +++++ .../res/drawable/ic_add_pin_main400_24.xml | 19 ++++ app/src/main/res/drawable/ic_american_24.xml | 22 +++++ .../main/res/drawable/ic_arrow_down_24.xml | 10 ++ .../main/res/drawable/ic_arrow_left_24.xml | 10 ++ .../main/res/drawable/ic_arrow_right_24.xml | 10 ++ app/src/main/res/drawable/ic_arrow_up_24.xml | 10 ++ app/src/main/res/drawable/ic_bar_24.xml | 10 ++ .../main/res/drawable/ic_button_spoon_32.xml | 96 +++++++++++++++++++ app/src/main/res/drawable/ic_cafe_24.xml | 10 ++ app/src/main/res/drawable/ic_chinese_24.xml | 10 ++ app/src/main/res/drawable/ic_close_24.xml | 10 ++ .../main/res/drawable/ic_delete_filled_24.xml | 10 ++ .../drawable/ic_delete_filled_gray100_24.xml | 13 +++ .../res/drawable/ic_delete_outlined_24.xml | 14 +++ app/src/main/res/drawable/ic_error_24.xml | 17 ++++ app/src/main/res/drawable/ic_explore_24.xml | 10 ++ app/src/main/res/drawable/ic_filter_24.xml | 10 ++ app/src/main/res/drawable/ic_japanese_24.xml | 14 +++ app/src/main/res/drawable/ic_korean_24.xml | 19 ++++ .../main/res/drawable/ic_map_gray400_24.xml | 13 +++ .../main/res/drawable/ic_map_main400_24.xml | 13 +++ app/src/main/res/drawable/ic_pin_24.xml | 10 ++ app/src/main/res/drawable/ic_plus_24.xml | 10 ++ app/src/main/res/drawable/ic_radio_off_24.xml | 10 ++ app/src/main/res/drawable/ic_radio_on_24.xml | 13 +++ app/src/main/res/drawable/ic_register_24.xml | 9 ++ .../res/drawable/ic_scooped_up_gray500_24.xml | 24 +++++ app/src/main/res/drawable/ic_search_24.xml | 10 ++ app/src/main/res/drawable/ic_spoon_24.xml | 17 ++++ .../main/res/drawable/ic_spoon_cross_24.xml | 26 +++++ .../main/res/drawable/ic_views_grad_24.xml | 23 +++++ app/src/main/res/drawable/ic_world_24.xml | 18 ++++ 34 files changed, 564 insertions(+) create mode 100644 app/src/main/res/drawable/ic_add_map_gray400_24.xml create mode 100644 app/src/main/res/drawable/ic_add_map_main400_24.xml create mode 100644 app/src/main/res/drawable/ic_add_pin_main400_24.xml create mode 100644 app/src/main/res/drawable/ic_american_24.xml create mode 100644 app/src/main/res/drawable/ic_arrow_down_24.xml create mode 100644 app/src/main/res/drawable/ic_arrow_left_24.xml create mode 100644 app/src/main/res/drawable/ic_arrow_right_24.xml create mode 100644 app/src/main/res/drawable/ic_arrow_up_24.xml create mode 100644 app/src/main/res/drawable/ic_bar_24.xml create mode 100644 app/src/main/res/drawable/ic_button_spoon_32.xml create mode 100644 app/src/main/res/drawable/ic_cafe_24.xml create mode 100644 app/src/main/res/drawable/ic_chinese_24.xml create mode 100644 app/src/main/res/drawable/ic_close_24.xml create mode 100644 app/src/main/res/drawable/ic_delete_filled_24.xml create mode 100644 app/src/main/res/drawable/ic_delete_filled_gray100_24.xml create mode 100644 app/src/main/res/drawable/ic_delete_outlined_24.xml create mode 100644 app/src/main/res/drawable/ic_error_24.xml create mode 100644 app/src/main/res/drawable/ic_explore_24.xml create mode 100644 app/src/main/res/drawable/ic_filter_24.xml create mode 100644 app/src/main/res/drawable/ic_japanese_24.xml create mode 100644 app/src/main/res/drawable/ic_korean_24.xml create mode 100644 app/src/main/res/drawable/ic_map_gray400_24.xml create mode 100644 app/src/main/res/drawable/ic_map_main400_24.xml create mode 100644 app/src/main/res/drawable/ic_pin_24.xml create mode 100644 app/src/main/res/drawable/ic_plus_24.xml create mode 100644 app/src/main/res/drawable/ic_radio_off_24.xml create mode 100644 app/src/main/res/drawable/ic_radio_on_24.xml create mode 100644 app/src/main/res/drawable/ic_register_24.xml create mode 100644 app/src/main/res/drawable/ic_scooped_up_gray500_24.xml create mode 100644 app/src/main/res/drawable/ic_search_24.xml create mode 100644 app/src/main/res/drawable/ic_spoon_24.xml create mode 100644 app/src/main/res/drawable/ic_spoon_cross_24.xml create mode 100644 app/src/main/res/drawable/ic_views_grad_24.xml create mode 100644 app/src/main/res/drawable/ic_world_24.xml diff --git a/app/src/main/res/drawable/ic_add_map_gray400_24.xml b/app/src/main/res/drawable/ic_add_map_gray400_24.xml new file mode 100644 index 00000000..6818e549 --- /dev/null +++ b/app/src/main/res/drawable/ic_add_map_gray400_24.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_add_map_main400_24.xml b/app/src/main/res/drawable/ic_add_map_main400_24.xml new file mode 100644 index 00000000..bc0a91f0 --- /dev/null +++ b/app/src/main/res/drawable/ic_add_map_main400_24.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_add_pin_main400_24.xml b/app/src/main/res/drawable/ic_add_pin_main400_24.xml new file mode 100644 index 00000000..abab13e8 --- /dev/null +++ b/app/src/main/res/drawable/ic_add_pin_main400_24.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_american_24.xml b/app/src/main/res/drawable/ic_american_24.xml new file mode 100644 index 00000000..73e44b34 --- /dev/null +++ b/app/src/main/res/drawable/ic_american_24.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/ic_arrow_down_24.xml b/app/src/main/res/drawable/ic_arrow_down_24.xml new file mode 100644 index 00000000..f49b2848 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_down_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_left_24.xml b/app/src/main/res/drawable/ic_arrow_left_24.xml new file mode 100644 index 00000000..63fae3d4 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_left_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_right_24.xml b/app/src/main/res/drawable/ic_arrow_right_24.xml new file mode 100644 index 00000000..a3378dab --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_right_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_up_24.xml b/app/src/main/res/drawable/ic_arrow_up_24.xml new file mode 100644 index 00000000..ea624035 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_up_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_bar_24.xml b/app/src/main/res/drawable/ic_bar_24.xml new file mode 100644 index 00000000..fe8efe66 --- /dev/null +++ b/app/src/main/res/drawable/ic_bar_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_button_spoon_32.xml b/app/src/main/res/drawable/ic_button_spoon_32.xml new file mode 100644 index 00000000..57a517d4 --- /dev/null +++ b/app/src/main/res/drawable/ic_button_spoon_32.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_cafe_24.xml b/app/src/main/res/drawable/ic_cafe_24.xml new file mode 100644 index 00000000..00f3e99e --- /dev/null +++ b/app/src/main/res/drawable/ic_cafe_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_chinese_24.xml b/app/src/main/res/drawable/ic_chinese_24.xml new file mode 100644 index 00000000..411145a4 --- /dev/null +++ b/app/src/main/res/drawable/ic_chinese_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_close_24.xml b/app/src/main/res/drawable/ic_close_24.xml new file mode 100644 index 00000000..8000aca0 --- /dev/null +++ b/app/src/main/res/drawable/ic_close_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_delete_filled_24.xml b/app/src/main/res/drawable/ic_delete_filled_24.xml new file mode 100644 index 00000000..62070162 --- /dev/null +++ b/app/src/main/res/drawable/ic_delete_filled_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_delete_filled_gray100_24.xml b/app/src/main/res/drawable/ic_delete_filled_gray100_24.xml new file mode 100644 index 00000000..9ca0983f --- /dev/null +++ b/app/src/main/res/drawable/ic_delete_filled_gray100_24.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_delete_outlined_24.xml b/app/src/main/res/drawable/ic_delete_outlined_24.xml new file mode 100644 index 00000000..ea508347 --- /dev/null +++ b/app/src/main/res/drawable/ic_delete_outlined_24.xml @@ -0,0 +1,14 @@ + + + + diff --git a/app/src/main/res/drawable/ic_error_24.xml b/app/src/main/res/drawable/ic_error_24.xml new file mode 100644 index 00000000..833a6339 --- /dev/null +++ b/app/src/main/res/drawable/ic_error_24.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_explore_24.xml b/app/src/main/res/drawable/ic_explore_24.xml new file mode 100644 index 00000000..b7e249e3 --- /dev/null +++ b/app/src/main/res/drawable/ic_explore_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_filter_24.xml b/app/src/main/res/drawable/ic_filter_24.xml new file mode 100644 index 00000000..1b215dd9 --- /dev/null +++ b/app/src/main/res/drawable/ic_filter_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_japanese_24.xml b/app/src/main/res/drawable/ic_japanese_24.xml new file mode 100644 index 00000000..dc843d62 --- /dev/null +++ b/app/src/main/res/drawable/ic_japanese_24.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_korean_24.xml b/app/src/main/res/drawable/ic_korean_24.xml new file mode 100644 index 00000000..4a2431b7 --- /dev/null +++ b/app/src/main/res/drawable/ic_korean_24.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_map_gray400_24.xml b/app/src/main/res/drawable/ic_map_gray400_24.xml new file mode 100644 index 00000000..19a6f158 --- /dev/null +++ b/app/src/main/res/drawable/ic_map_gray400_24.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_map_main400_24.xml b/app/src/main/res/drawable/ic_map_main400_24.xml new file mode 100644 index 00000000..43f36678 --- /dev/null +++ b/app/src/main/res/drawable/ic_map_main400_24.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_pin_24.xml b/app/src/main/res/drawable/ic_pin_24.xml new file mode 100644 index 00000000..ef9b96c5 --- /dev/null +++ b/app/src/main/res/drawable/ic_pin_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_plus_24.xml b/app/src/main/res/drawable/ic_plus_24.xml new file mode 100644 index 00000000..e9be061b --- /dev/null +++ b/app/src/main/res/drawable/ic_plus_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_radio_off_24.xml b/app/src/main/res/drawable/ic_radio_off_24.xml new file mode 100644 index 00000000..c1134ea7 --- /dev/null +++ b/app/src/main/res/drawable/ic_radio_off_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_radio_on_24.xml b/app/src/main/res/drawable/ic_radio_on_24.xml new file mode 100644 index 00000000..eb0a74ac --- /dev/null +++ b/app/src/main/res/drawable/ic_radio_on_24.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_register_24.xml b/app/src/main/res/drawable/ic_register_24.xml new file mode 100644 index 00000000..fb1b768b --- /dev/null +++ b/app/src/main/res/drawable/ic_register_24.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_scooped_up_gray500_24.xml b/app/src/main/res/drawable/ic_scooped_up_gray500_24.xml new file mode 100644 index 00000000..5d6acd53 --- /dev/null +++ b/app/src/main/res/drawable/ic_scooped_up_gray500_24.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_search_24.xml b/app/src/main/res/drawable/ic_search_24.xml new file mode 100644 index 00000000..02ae24ac --- /dev/null +++ b/app/src/main/res/drawable/ic_search_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_spoon_24.xml b/app/src/main/res/drawable/ic_spoon_24.xml new file mode 100644 index 00000000..b9dd7147 --- /dev/null +++ b/app/src/main/res/drawable/ic_spoon_24.xml @@ -0,0 +1,17 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_spoon_cross_24.xml b/app/src/main/res/drawable/ic_spoon_cross_24.xml new file mode 100644 index 00000000..539f67e4 --- /dev/null +++ b/app/src/main/res/drawable/ic_spoon_cross_24.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_views_grad_24.xml b/app/src/main/res/drawable/ic_views_grad_24.xml new file mode 100644 index 00000000..e105ce44 --- /dev/null +++ b/app/src/main/res/drawable/ic_views_grad_24.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_world_24.xml b/app/src/main/res/drawable/ic_world_24.xml new file mode 100644 index 00000000..29dbbc70 --- /dev/null +++ b/app/src/main/res/drawable/ic_world_24.xml @@ -0,0 +1,18 @@ + + + + + + From 8d7062d23353b03e0c06a149601cab6def77e065 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 13:09:30 +0900 Subject: [PATCH 05/20] =?UTF-8?q?[FEAT/#12]=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=ED=81=AC=EA=B8=B0=EB=B3=84=20radius=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/designsystem/component/button/SpoonyButton.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 6c69416d..ce712f06 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -81,10 +81,15 @@ fun SpoonyButton( else -> SpoonyAndroidTheme.colors.white } + val cornerRadius = when (size) { + ButtonSize.Xlarge -> 8.dp + ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> 10.dp + } + Box( modifier = modifier .fillMaxWidth() - .clip(RoundedCornerShape(8.dp)) + .clip(RoundedCornerShape(cornerRadius)) .background(color = backgroundColor) .noRippleClickable( interactionSource = interactionSource, From 189c67e139244ff0307e106b0895e063fc4f6c44 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 13:11:22 +0900 Subject: [PATCH 06/20] =?UTF-8?q?[FEAT/#12]=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EB=82=B4=EB=B6=80=20.fillMaxWidth()=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/core/designsystem/component/button/SpoonyButton.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index ce712f06..bd39bb72 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -88,7 +88,6 @@ fun SpoonyButton( Box( modifier = modifier - .fillMaxWidth() .clip(RoundedCornerShape(cornerRadius)) .background(color = backgroundColor) .noRippleClickable( From 0fccd08c8323f69ddbef29143ec251b850ce07d8 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 13:14:55 +0900 Subject: [PATCH 07/20] =?UTF-8?q?[FEAT/#12]=20=EA=B0=90=EC=8B=B8=EA=B3=A0?= =?UTF-8?q?=20=EC=9E=88=EB=8A=94=20Box=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=A0=9C=EA=B1=B0=20-=20Row=20=EB=A1=9C=EB=A7=8C?= =?UTF-8?q?=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/button/SpoonyButton.kt | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index bd39bb72..c594eddd 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.background import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.collectIsPressedAsState import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row @@ -85,8 +84,7 @@ fun SpoonyButton( ButtonSize.Xlarge -> 8.dp ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> 10.dp } - - Box( + Row( modifier = modifier .clip(RoundedCornerShape(cornerRadius)) .background(color = backgroundColor) @@ -95,22 +93,18 @@ fun SpoonyButton( onClick = onClick ) .padding(paddingValues), - contentAlignment = Alignment.Center + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Center ) { - Row( - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.Center - ) { - if (icon != null) { - icon() - Spacer(modifier = Modifier.width(8.dp)) - } - Text( - text = text, - color = textColor, - style = textStyle - ) + if (icon != null) { + icon() + Spacer(modifier = Modifier.width(8.dp)) } + Text( + text = text, + color = textColor, + style = textStyle + ) } } From 1ee3a6fb36123a8308a80174e4500e02e6068eec Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 13:16:50 +0900 Subject: [PATCH 08/20] =?UTF-8?q?[FEAT/#12]=20=ED=99=95=EC=9E=A5=EC=84=B1?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=B4=20=ED=8F=B4=EB=8D=94=EB=AA=85=20?= =?UTF-8?q?modifier=20=3D>=20extension?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/core/designsystem/component/button/SpoonyButton.kt | 2 +- .../spoony/core/util/{modifier => extension}/ModifierExt.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename app/src/main/java/com/spoony/spoony/core/util/{modifier => extension}/ModifierExt.kt (92%) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index c594eddd..cbd5b4f3 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -29,7 +29,7 @@ import com.spoony.spoony.R import com.spoony.spoony.core.designsystem.theme.SpoonyAndroidTheme import com.spoony.spoony.core.designsystem.type.ButtonSize import com.spoony.spoony.core.designsystem.type.ButtonStyle -import com.spoony.spoony.core.util.modifier.noRippleClickable +import com.spoony.spoony.core.util.extension.noRippleClickable @Composable fun SpoonyButton( diff --git a/app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt b/app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt similarity index 92% rename from app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt rename to app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt index d64b56b7..0d2c21dd 100644 --- a/app/src/main/java/com/spoony/spoony/core/util/modifier/ModifierExt.kt +++ b/app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt @@ -1,4 +1,4 @@ -package com.spoony.spoony.core.util.modifier +package com.spoony.spoony.core.util.extension import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource From 495bb036b627c7d199095ff0c2ac863a9c79bc3f Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 13:24:18 +0900 Subject: [PATCH 09/20] =?UTF-8?q?[FEAT/#12]=20noRippleClickable=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20param=20interactionSource=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20=EB=B0=8F=20inline=20=ED=95=A8=EC=88=98=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/designsystem/component/button/SpoonyButton.kt | 5 +++-- .../spoony/spoony/core/util/extension/ModifierExt.kt | 10 ++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index cbd5b4f3..906f5ec5 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -1,6 +1,7 @@ package com.spoony.spoony.core.designsystem.component.button import androidx.compose.foundation.background +import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.collectIsPressedAsState import androidx.compose.foundation.layout.Arrangement @@ -29,7 +30,6 @@ import com.spoony.spoony.R import com.spoony.spoony.core.designsystem.theme.SpoonyAndroidTheme import com.spoony.spoony.core.designsystem.type.ButtonSize import com.spoony.spoony.core.designsystem.type.ButtonStyle -import com.spoony.spoony.core.util.extension.noRippleClickable @Composable fun SpoonyButton( @@ -88,7 +88,8 @@ fun SpoonyButton( modifier = modifier .clip(RoundedCornerShape(cornerRadius)) .background(color = backgroundColor) - .noRippleClickable( + .clickable( + indication = null, interactionSource = interactionSource, onClick = onClick ) diff --git a/app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt b/app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt index 0d2c21dd..1fd624eb 100644 --- a/app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt +++ b/app/src/main/java/com/spoony/spoony/core/util/extension/ModifierExt.kt @@ -8,12 +8,10 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.composed @Composable -fun Modifier.noRippleClickable( - onClick: () -> Unit, - interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } -): Modifier = composed { +inline fun Modifier.noRippleClickable(crossinline onClick: () -> Unit): Modifier = composed { this.clickable( indication = null, - interactionSource = interactionSource - ) { onClick() } + interactionSource = remember { MutableInteractionSource() }, + onClick = { onClick() } + ) } From d7c12051ead21920a53dff5ae48829c25275f164 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 13:40:53 +0900 Subject: [PATCH 10/20] =?UTF-8?q?[FEAT/#12]=20remember=20=EC=9D=84=20?= =?UTF-8?q?=ED=86=B5=ED=95=B4=20enabled,=20isPressed=20=EB=B0=94=EB=80=8C?= =?UTF-8?q?=EC=97=88=EC=9D=84=20=EB=95=8C=20recomposition=20=ED=95=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/button/SpoonyButton.kt | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 906f5ec5..6f88ec3e 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -43,22 +43,24 @@ fun SpoonyButton( ) { val interactionSource = remember { MutableInteractionSource() } val isPressed by interactionSource.collectIsPressedAsState() - val backgroundColor = when { - !enabled -> when (style) { - ButtonStyle.Primary -> SpoonyAndroidTheme.colors.main100 - ButtonStyle.Secondary -> SpoonyAndroidTheme.colors.gray300 - ButtonStyle.Tertiary -> SpoonyAndroidTheme.colors.gray100 - } - isPressed -> when (style) { - ButtonStyle.Primary -> SpoonyAndroidTheme.colors.main500 - ButtonStyle.Secondary -> SpoonyAndroidTheme.colors.gray800 - ButtonStyle.Tertiary -> SpoonyAndroidTheme.colors.gray100 - } - - else -> when (style) { - ButtonStyle.Primary -> SpoonyAndroidTheme.colors.main400 - ButtonStyle.Secondary -> SpoonyAndroidTheme.colors.black - ButtonStyle.Tertiary -> SpoonyAndroidTheme.colors.gray0 + val spoonyColors = SpoonyAndroidTheme.colors + val backgroundColor = remember(enabled, isPressed) { + when { + !enabled -> when (style) { + ButtonStyle.Primary -> spoonyColors.main100 + ButtonStyle.Secondary -> spoonyColors.gray300 + ButtonStyle.Tertiary -> spoonyColors.gray100 + } + isPressed -> when (style) { + ButtonStyle.Primary -> spoonyColors.main500 + ButtonStyle.Secondary -> spoonyColors.gray800 + ButtonStyle.Tertiary -> spoonyColors.gray100 + } + else -> when (style) { + ButtonStyle.Primary -> spoonyColors.main400 + ButtonStyle.Secondary -> spoonyColors.black + ButtonStyle.Tertiary -> spoonyColors.gray0 + } } } val paddingValues = when (size) { From e26e8fcf37b8fdcc8ce3d86fa2b8866aea1daf90 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 14:10:43 +0900 Subject: [PATCH 11/20] =?UTF-8?q?[FEAT/#12]=20PreviewParameterProvider=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=B4=EC=84=9C=20Preview=20=EA=B0=84?= =?UTF-8?q?=EA=B2=B0=ED=95=98=EA=B2=8C=20=EB=A7=8C=EB=93=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/button/SpoonyButton.kt | 437 +++--------------- 1 file changed, 53 insertions(+), 384 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 6f88ec3e..8fb4bef8 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -25,6 +25,8 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.PreviewParameter +import androidx.compose.ui.tooling.preview.PreviewParameterProvider import androidx.compose.ui.unit.dp import com.spoony.spoony.R import com.spoony.spoony.core.designsystem.theme.SpoonyAndroidTheme @@ -111,418 +113,85 @@ fun SpoonyButton( } } -@Preview -@Composable -private fun SpoonyButtonPrimaryEnabledPreview() { - SpoonyAndroidTheme { - Column( - modifier = Modifier.fillMaxWidth(), - verticalArrangement = Arrangement.spacedBy(16.dp) - ) { - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Xlarge - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Large - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Medium - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Small - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Xsmall - ) - } - } -} - -@Preview -@Composable -private fun SpoonyButtonPrimaryDisabledPreview() { - SpoonyAndroidTheme { - Column( - modifier = Modifier.fillMaxWidth(), - verticalArrangement = Arrangement.spacedBy(16.dp) - ) { - SpoonyButton( - text = "버튼", - style = ButtonStyle.Primary, - size = ButtonSize.Xlarge, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Primary, - size = ButtonSize.Large, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Primary, - size = ButtonSize.Medium, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Primary, - size = ButtonSize.Small, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Primary, - size = ButtonSize.Xsmall, - enabled = false - ) - } - } -} - -@Preview -@Composable -private fun SpoonyButtonPrimaryIconTextPreview() { - SpoonyAndroidTheme { - Column( - modifier = Modifier.fillMaxWidth(), - verticalArrangement = Arrangement.spacedBy(16.dp) - ) { - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Xlarge, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Large, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Medium, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Small, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Primary, - size = ButtonSize.Xsmall, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - } - } -} - -@Preview -@Composable -private fun SpoonyButtonSecondaryEnabledPreview() { - SpoonyAndroidTheme { - Column( - modifier = Modifier.fillMaxWidth(), - verticalArrangement = Arrangement.spacedBy(16.dp) - ) { - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Xlarge - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Large - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Medium - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Small - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Xsmall - ) - } - } -} - -@Preview -@Composable -private fun SpoonyButtonSecondaryDisabledPreview() { - SpoonyAndroidTheme { - Column( - modifier = Modifier.fillMaxWidth(), - verticalArrangement = Arrangement.spacedBy(16.dp) - ) { - SpoonyButton( - text = "버튼", - style = ButtonStyle.Secondary, - size = ButtonSize.Xlarge, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Secondary, - size = ButtonSize.Large, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Secondary, - size = ButtonSize.Medium, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Secondary, - size = ButtonSize.Small, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Secondary, - size = ButtonSize.Xsmall, - enabled = false - ) - } - } +private class ButtonStyleProvider : PreviewParameterProvider { + override val values: Sequence = sequenceOf( + ButtonStyle.Primary, + ButtonStyle.Secondary, + ButtonStyle.Tertiary + ) } @Preview @Composable -private fun SpoonyButtonSecondaryIconTextPreview() { +fun SpoonyButtonEnabledPreview( + @PreviewParameter(ButtonStyleProvider::class) style: ButtonStyle +) { SpoonyAndroidTheme { Column( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier, verticalArrangement = Arrangement.spacedBy(16.dp) ) { - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Xlarge, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Large, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Medium, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Small, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Secondary, - size = ButtonSize.Xsmall, - icon = { - Icon( - painter = painterResource(R.drawable.ic_launcher_foreground), - modifier = Modifier.size(32.dp), - contentDescription = "ic_spoon_button", - tint = Color.Unspecified - ) - } - ) + ButtonSize.entries.forEach { size -> + SpoonyButton( + text = "버튼", + style = style, + size = size, + onClick = { } + ) + } } } } @Preview @Composable -private fun SpoonyButtonTertiaryEnabledPreview() { +fun SpoonyButtonEnabledIconPreview( + @PreviewParameter(ButtonStyleProvider::class) style: ButtonStyle +) { SpoonyAndroidTheme { Column( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier, verticalArrangement = Arrangement.spacedBy(16.dp) ) { - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Tertiary, - size = ButtonSize.Xlarge - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Tertiary, - size = ButtonSize.Large - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Tertiary, - size = ButtonSize.Medium - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Tertiary, - size = ButtonSize.Small - ) - SpoonyButton( - text = "버튼", - onClick = {}, - style = ButtonStyle.Tertiary, - size = ButtonSize.Xsmall - ) + ButtonSize.entries.forEach { size -> + SpoonyButton( + text = "버튼", + style = style, + size = size, + onClick = { }, + icon = { + Icon( + painter = painterResource(R.drawable.ic_launcher_foreground), + modifier = Modifier.size(32.dp), + contentDescription = "ic_spoon_button", + tint = Color.Unspecified + ) + } + ) + } } } } @Preview @Composable -private fun SpoonyButtonTertiaryDisabledPreview() { +fun SpoonyButtonDisabledPreview( + @PreviewParameter(ButtonStyleProvider::class) style: ButtonStyle +) { SpoonyAndroidTheme { Column( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier, verticalArrangement = Arrangement.spacedBy(16.dp) ) { - SpoonyButton( - text = "버튼", - style = ButtonStyle.Tertiary, - size = ButtonSize.Xlarge, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Tertiary, - size = ButtonSize.Large, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Tertiary, - size = ButtonSize.Medium, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Tertiary, - size = ButtonSize.Small, - enabled = false - ) - SpoonyButton( - text = "버튼", - style = ButtonStyle.Tertiary, - size = ButtonSize.Xsmall, - enabled = false - ) + ButtonSize.entries.forEach { size -> + SpoonyButton( + text = "버튼", + style = style, + size = size, + enabled = false, + onClick = { } + ) + } } } } From 8a1d85401425736606ffd25caeeb5c03b2bae011 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 14:16:46 +0900 Subject: [PATCH 12/20] =?UTF-8?q?[FEAT/#12]=20SpoonyButton=20param=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/designsystem/component/button/SpoonyButton.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 8fb4bef8..9115dcf7 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -36,12 +36,12 @@ import com.spoony.spoony.core.designsystem.type.ButtonStyle @Composable fun SpoonyButton( text: String, - size: ButtonSize = ButtonSize.Medium, - style: ButtonStyle = ButtonStyle.Primary, + size: ButtonSize, + style: ButtonStyle, + onClick: () -> Unit, + modifier: Modifier = Modifier, enabled: Boolean = true, icon: (@Composable () -> Unit)? = null, - onClick: () -> Unit = {}, - modifier: Modifier = Modifier ) { val interactionSource = remember { MutableInteractionSource() } val isPressed by interactionSource.collectIsPressedAsState() @@ -243,6 +243,7 @@ private fun SpoonyButtonTwoButtonPreview() { ) { SpoonyButton( text = "버튼", + onClick = {}, style = ButtonStyle.Tertiary, size = ButtonSize.Xsmall, enabled = false, @@ -251,6 +252,7 @@ private fun SpoonyButtonTwoButtonPreview() { Spacer(modifier = Modifier.width(13.dp)) SpoonyButton( text = "버튼", + onClick = {}, style = ButtonStyle.Secondary, size = ButtonSize.Xsmall, enabled = false, From 51b52cd84de39a0721c426073e6010ef5023cd09 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 14:28:53 +0900 Subject: [PATCH 13/20] =?UTF-8?q?[FEAT/#12]=20SpoonyButton=20param=20inter?= =?UTF-8?q?actionSource=20=EC=B6=94=EA=B0=80(=ED=99=95=EC=9E=A5=EC=84=B1?= =?UTF-8?q?=20=EA=B3=A0=EB=A0=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/core/designsystem/component/button/SpoonyButton.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 9115dcf7..02bc2fa3 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -42,8 +42,8 @@ fun SpoonyButton( modifier: Modifier = Modifier, enabled: Boolean = true, icon: (@Composable () -> Unit)? = null, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } ) { - val interactionSource = remember { MutableInteractionSource() } val isPressed by interactionSource.collectIsPressedAsState() val spoonyColors = SpoonyAndroidTheme.colors val backgroundColor = remember(enabled, isPressed) { From 2d95f957b5adf8860c8ae7b2752f0d8b7befdc70 Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 14:30:23 +0900 Subject: [PATCH 14/20] =?UTF-8?q?[FEAT/#12]=20padding=20=EC=86=8C=EC=88=98?= =?UTF-8?q?=EC=A0=90=2016.5.dp=20=3D>=2016.dp=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/core/designsystem/component/button/SpoonyButton.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 02bc2fa3..c986f776 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -66,7 +66,7 @@ fun SpoonyButton( } } val paddingValues = when (size) { - ButtonSize.Xlarge -> PaddingValues(horizontal = 16.dp, vertical = 16.5.dp) + ButtonSize.Xlarge -> PaddingValues(horizontal = 16.dp, vertical = 16.dp) ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 18.dp) ButtonSize.Xsmall -> PaddingValues(horizontal = 16.dp, vertical = 12.dp) } From eaaede08772b43dbc234d79fa8081809a741a095 Mon Sep 17 00:00:00 2001 From: Hyobeen-Park <98209004+Hyobeen-Park@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:24:03 +0900 Subject: [PATCH 15/20] =?UTF-8?q?[DOCS/#18]=20=EB=A6=AC=EB=93=9C=EB=AF=B8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a95ce0a..c9b24477 100644 --- a/README.md +++ b/README.md @@ -1 +1,66 @@ -# 35-APPJAM-ANDROID-SPOONY \ No newline at end of file +# SPOONY + + + +**장소의 찐 리스트를 공유하며 신뢰할 수 있는 추천으로 나만의 지도를 완성하는 앱 서비스** + +
+ +## CONTRIBUTORS +| 👑박효빈
([@Hyobeen-Park](https://github.com/Hyobeen-Park)) | 한민재
([@angryPodo](https://github.com/angryPodo)) | 안세홍
([@Roel4990](https://github.com/Roel4990)) | 박동민
([@chattymin](https://github.com/chattymin)) | +|:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:| +| | | | | +| `지도`
`탐색`
| `등록`
| `장소 상세 페이지`
`신고하기`
| `칩`
+ + +
+ +## PACKAGE CONVENTION + +``` + +📁 core + ┣ 📁 designsystem + ┣ 📁 util + ┣ 📁 state + ┗ 📁navigation + +📁 data + ┣ 📁 dto + ┃ ┣ 📁 response + ┃ ┣ 📁 request + ┣ 📁 datasource + ┣ 📁 datasourceImpl + ┣ 📁 di + ┣ 📁 local + ┣ 📁 mapper + ┣ 📁 repositoryImpl + ┗ 📁 service + +📁 domain + ┣ 📁 entity + ┗ 📁 repository + +📁 presentation + ┗ 📁 기능 별 패키징 + +``` + +
+ +## TECH STACK +| Title | Content | +| ------------ |---------------------------------------| +| Architecture | Clean Architecture, MVVM | +| UI Framework | Jetpack Compose | +| Dependency Injection | Hilt | +| Network | Retrofit2, OkHttp | +| Asynchronous Processing | Coroutine, Flow | +| Third Party Library | Coil, Timber, Lottie, Naver Map | +| Other Tools | Discode, Notion, Figma, Slack |\ +
+ +## Convention +[안드푼스들의 깃 컨벤션](https://creative-suede-cad.notion.site/Git-Convention-4038dc7126e34df6aa042b400284b188?pvs=4) +
+[안드푼스들의 코딩 컨벤션](https://creative-suede-cad.notion.site/Android-Coding-Convention-71015e22d6a44f28b07aa756c81b2cf3?pvs=4) From 5f59593a8fec59af8b3b2d20b74a85d44844bbca Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 17:31:30 +0900 Subject: [PATCH 16/20] =?UTF-8?q?[FEAT/#12]=20paddingValues,=20textStyle,?= =?UTF-8?q?=20textColor,=20cornerRadius=20remember=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/button/SpoonyButton.kt | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index c986f776..a565d260 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -46,7 +46,8 @@ fun SpoonyButton( ) { val isPressed by interactionSource.collectIsPressedAsState() val spoonyColors = SpoonyAndroidTheme.colors - val backgroundColor = remember(enabled, isPressed) { + val spoonyTypography = SpoonyAndroidTheme.typography + val backgroundColor = remember(enabled, isPressed, style) { when { !enabled -> when (style) { ButtonStyle.Primary -> spoonyColors.main100 @@ -65,28 +66,36 @@ fun SpoonyButton( } } } - val paddingValues = when (size) { - ButtonSize.Xlarge -> PaddingValues(horizontal = 16.dp, vertical = 16.dp) - ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 18.dp) - ButtonSize.Xsmall -> PaddingValues(horizontal = 16.dp, vertical = 12.dp) + val paddingValues = remember(size) { + when (size) { + ButtonSize.Xlarge -> PaddingValues(horizontal = 16.dp, vertical = 16.dp) + ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 18.dp) + ButtonSize.Xsmall -> PaddingValues(horizontal = 16.dp, vertical = 12.dp) + } } - val textStyle = when (size) { - ButtonSize.Xlarge -> SpoonyAndroidTheme.typography.body1b - ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> SpoonyAndroidTheme.typography.body2b + val textStyle = remember(size) { + when (size) { + ButtonSize.Xlarge -> spoonyTypography.body1b + ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> spoonyTypography.body2b + } } - val textColor = when (style) { - ButtonStyle.Tertiary -> when { - !enabled -> SpoonyAndroidTheme.colors.gray400 - else -> SpoonyAndroidTheme.colors.gray600 + val textColor = remember(style) { + when (style) { + ButtonStyle.Tertiary -> when { + !enabled -> spoonyColors.gray400 + else -> spoonyColors.gray600 + } + else -> spoonyColors.white } - else -> SpoonyAndroidTheme.colors.white } - val cornerRadius = when (size) { - ButtonSize.Xlarge -> 8.dp - ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> 10.dp + val cornerRadius = remember(size) { + when (size) { + ButtonSize.Xlarge -> 8.dp + ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> 10.dp + } } Row( modifier = modifier From 011597b68622bca3545625361ddab1e93f6ea85a Mon Sep 17 00:00:00 2001 From: roel Date: Sun, 12 Jan 2025 17:35:30 +0900 Subject: [PATCH 17/20] =?UTF-8?q?[FEAT/#12]=20clickable=20enabled=20false?= =?UTF-8?q?=20=EC=9D=B8=EA=B2=BD=EC=9A=B0=20=EB=B2=84=ED=8A=BC=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EB=B6=88=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spoony/core/designsystem/component/button/SpoonyButton.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index a565d260..0325593b 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -102,6 +102,7 @@ fun SpoonyButton( .clip(RoundedCornerShape(cornerRadius)) .background(color = backgroundColor) .clickable( + enabled = enabled, indication = null, interactionSource = interactionSource, onClick = onClick From 90c3d4456660709ab1e3e12b80d114d6c10b4a0e Mon Sep 17 00:00:00 2001 From: Hyobeen-Park <98209004+Hyobeen-Park@users.noreply.github.com> Date: Sun, 12 Jan 2025 17:38:11 +0900 Subject: [PATCH 18/20] =?UTF-8?q?[DOCS/#18]=20=EC=84=9C=EB=B9=84=EC=8A=A4?= =?UTF-8?q?=20=EC=86=8C=EA=B0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index c9b24477..68c02384 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,23 @@ **장소의 찐 리스트를 공유하며 신뢰할 수 있는 추천으로 나만의 지도를 완성하는 앱 서비스** +
+ +**‘Spoony’** 는 리뷰 작성자의 신뢰도와 영향력에 기반해, 유저가 믿을 수 있는 장소 정보를 탐색하고 공유하며 나만의 찐 리스트 지도를 만들어가는 앱 서비스입니다. + +🌟Spoony와 함께 새로운 장소를 발견하고 나만의 지도를 완성해보세요!🌟 + +
+ + +> 🥄 **Spoony 만의 특별한 사용법**

+1️⃣ **장소 등록하고 수저 획득하기**
+나만 알고 싶은 맛집, 아늑한 카페, 분위기 좋은 펍 등 찐 **장소를 등록하고 수저를 획득**하세요!

+2️⃣**신뢰도 높은 찐 리스트 떠먹기**
+획득한 수저로 다른 사람의 찐 리스트를 떠먹어 보세요! 원하는 유저를 팔로우하고 로컬 사용자와 지역별 랭킹을 통해 **신뢰도 높은 리뷰**를 확인해보세요.

+3️⃣ **나만의 지도 완성하기**
+떠먹은 리스트 중 **마음에 드는 장소를** 추가해 나만의 **찐 리스트 지도**를 만들어보세요!
+
## CONTRIBUTORS From 0e6774eb53883cd3814f3e6ff23bed0bed189d09 Mon Sep 17 00:00:00 2001 From: Hyobeen-Park <98209004+Hyobeen-Park@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:50:09 +0900 Subject: [PATCH 19/20] =?UTF-8?q?[DOCS/#18]=20task=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68c02384..ec5b4391 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ | 👑박효빈
([@Hyobeen-Park](https://github.com/Hyobeen-Park)) | 한민재
([@angryPodo](https://github.com/angryPodo)) | 안세홍
([@Roel4990](https://github.com/Roel4990)) | 박동민
([@chattymin](https://github.com/chattymin)) | |:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:| | | | | | -| `지도`
`탐색`
| `등록`
| `장소 상세 페이지`
`신고하기`
| `칩`
+| `메인 지도`
`탐색하기`
| `장소 등록하기`
| `장소 상세 페이지`
`신고하기`
| `멘토`

From 4fa3c3e074adea99fa68a135b76c86ccfdc62e9c Mon Sep 17 00:00:00 2001 From: roel Date: Mon, 13 Jan 2025 13:09:37 +0900 Subject: [PATCH 20/20] =?UTF-8?q?[FEAT/#12]=20=EB=94=94=EC=9E=90=EC=9D=B8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=EC=97=90=20=EB=94=B0=EB=A5=B8=20textStyle?= =?UTF-8?q?,=20padding=20=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designsystem/component/button/SpoonyButton.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt index 0325593b..61474325 100644 --- a/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt +++ b/app/src/main/java/com/spoony/spoony/core/designsystem/component/button/SpoonyButton.kt @@ -68,19 +68,11 @@ fun SpoonyButton( } val paddingValues = remember(size) { when (size) { - ButtonSize.Xlarge -> PaddingValues(horizontal = 16.dp, vertical = 16.dp) - ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 18.dp) + ButtonSize.Xlarge, ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 18.dp) ButtonSize.Xsmall -> PaddingValues(horizontal = 16.dp, vertical = 12.dp) } } - val textStyle = remember(size) { - when (size) { - ButtonSize.Xlarge -> spoonyTypography.body1b - ButtonSize.Large, ButtonSize.Medium, ButtonSize.Small, ButtonSize.Xsmall -> spoonyTypography.body2b - } - } - val textColor = remember(style) { when (style) { ButtonStyle.Tertiary -> when { @@ -118,7 +110,7 @@ fun SpoonyButton( Text( text = text, color = textColor, - style = textStyle + style = SpoonyAndroidTheme.typography.body2b ) } }