diff --git a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/Emotion.kt b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/Emotion.kt
index 5a4f72a3..931074a1 100644
--- a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/Emotion.kt
+++ b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/Emotion.kt
@@ -34,3 +34,19 @@ val Emotion.graphicRes: Int
Emotion.SAD -> R.drawable.img_emotion_sadness
Emotion.INSIGHT -> R.drawable.img_emotion_insight
}
+
+val Emotion.graphicResV2: Int
+ get() = when (this) {
+ Emotion.WARM -> R.drawable.img_category_warm
+ Emotion.JOY -> R.drawable.img_category_joy
+ Emotion.SAD -> R.drawable.img_category_sad
+ Emotion.INSIGHT -> R.drawable.img_category_insight
+ }
+
+val Emotion.descriptionRes: Int
+ get() = when (this) {
+ Emotion.WARM -> R.string.emotion_warm_description
+ Emotion.JOY -> R.string.emotion_joy_description
+ Emotion.SAD -> R.string.emotion_sad_description
+ Emotion.INSIGHT -> R.string.emotion_insight_description
+ }
diff --git a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ChipSizeStyle.kt b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ChipSizeStyle.kt
new file mode 100644
index 00000000..360c41b5
--- /dev/null
+++ b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ChipSizeStyle.kt
@@ -0,0 +1,29 @@
+package com.ninecraft.booket.core.designsystem.component.chip
+
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.text.TextStyle
+import com.ninecraft.booket.core.designsystem.theme.ReedTheme
+
+data class ChipSizeStyle(
+ val paddingValues: PaddingValues,
+ val textStyle: TextStyle,
+)
+
+val mediumChipStyle: ChipSizeStyle
+ @Composable get() = ChipSizeStyle(
+ paddingValues = PaddingValues(
+ horizontal = ReedTheme.spacing.spacing3,
+ vertical = ReedTheme.spacing.spacing2,
+ ),
+ textStyle = ReedTheme.typography.body2Medium,
+ )
+
+val smallChipStyle: ChipSizeStyle
+ @Composable get() = ChipSizeStyle(
+ paddingValues = PaddingValues(
+ horizontal = ReedTheme.spacing.spacing3,
+ vertical = ReedTheme.spacing.spacing15,
+ ),
+ textStyle = ReedTheme.typography.label1Medium,
+ )
diff --git a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ReedRemovableChip.kt b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ReedRemovableChip.kt
new file mode 100644
index 00000000..df72cccf
--- /dev/null
+++ b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ReedRemovableChip.kt
@@ -0,0 +1,75 @@
+package com.ninecraft.booket.core.designsystem.component.chip
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+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.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.res.vectorResource
+import androidx.compose.ui.unit.dp
+import com.ninecraft.booket.core.common.extensions.noRippleClickable
+import com.ninecraft.booket.core.designsystem.ComponentPreview
+import com.ninecraft.booket.core.designsystem.R
+import com.ninecraft.booket.core.designsystem.theme.ReedTheme
+
+@Composable
+fun ReedRemovableChip(
+ label: String,
+ chipSizeStyle: ChipSizeStyle,
+ onRemove: () -> Unit,
+ modifier: Modifier = Modifier,
+) {
+ val cornerShape = RoundedCornerShape(ReedTheme.radius.full)
+
+ Row(
+ modifier = modifier
+ .clip(cornerShape)
+ .background(color = ReedTheme.colors.bgTertiary)
+ .border(
+ width = 1.dp,
+ color = ReedTheme.colors.borderBrand,
+ shape = cornerShape,
+ )
+ .padding(chipSizeStyle.paddingValues),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Text(
+ text = label,
+ color = ReedTheme.colors.contentBrand,
+ style = chipSizeStyle.textStyle,
+ )
+ Spacer(modifier = Modifier.width(ReedTheme.spacing.spacing1))
+ Icon(
+ imageVector = ImageVector.vectorResource(R.drawable.ic_close),
+ contentDescription = "Icon Close",
+ tint = ReedTheme.colors.contentBrand,
+ modifier = Modifier
+ .size(14.dp)
+ .noRippleClickable {
+ onRemove()
+ },
+ )
+ }
+}
+
+@ComponentPreview
+@Composable
+private fun ReedRemovableChipPreview() {
+ ReedTheme {
+ ReedRemovableChip(
+ label = "text",
+ chipSizeStyle = mediumChipStyle,
+ onRemove = {},
+ )
+ }
+}
diff --git a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ReedSelectableChip.kt b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ReedSelectableChip.kt
new file mode 100644
index 00000000..c75629a9
--- /dev/null
+++ b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/chip/ReedSelectableChip.kt
@@ -0,0 +1,89 @@
+package com.ninecraft.booket.core.designsystem.component.chip
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.unit.dp
+import com.ninecraft.booket.core.common.extensions.noRippleClickable
+import com.ninecraft.booket.core.designsystem.ComponentPreview
+import com.ninecraft.booket.core.designsystem.theme.ReedTheme
+
+@Composable
+fun ReedSelectableChip(
+ label: String,
+ chipSizeStyle: ChipSizeStyle,
+ selected: Boolean,
+ onClick: () -> Unit,
+ modifier: Modifier = Modifier,
+) {
+ val cornerShape = RoundedCornerShape(ReedTheme.radius.full)
+ val backgroundColor = if (selected) ReedTheme.colors.bgTertiary else ReedTheme.colors.basePrimary
+ val borderColor = if (selected) ReedTheme.colors.borderBrand else ReedTheme.colors.borderPrimary
+ val textColor = if (selected) ReedTheme.colors.contentBrand else ReedTheme.colors.contentSecondary
+
+ Row(
+ modifier = modifier
+ .clip(cornerShape)
+ .background(color = backgroundColor)
+ .noRippleClickable {
+ onClick()
+ }
+ .border(
+ width = 1.dp,
+ color = borderColor,
+ shape = cornerShape,
+ )
+ .padding(chipSizeStyle.paddingValues),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Text(
+ text = label,
+ color = textColor,
+ style = chipSizeStyle.textStyle,
+ )
+ }
+}
+
+@ComponentPreview
+@Composable
+private fun ReedSelectableChipPreview() {
+ ReedTheme {
+ Column(
+ verticalArrangement = Arrangement.spacedBy(ReedTheme.spacing.spacing1),
+ ) {
+ ReedSelectableChip(
+ label = "text",
+ chipSizeStyle = mediumChipStyle,
+ selected = false,
+ onClick = {},
+ )
+ ReedSelectableChip(
+ label = "text",
+ chipSizeStyle = mediumChipStyle,
+ selected = true,
+ onClick = {},
+ )
+ ReedSelectableChip(
+ label = "text",
+ chipSizeStyle = smallChipStyle,
+ selected = false,
+ onClick = {},
+ )
+ ReedSelectableChip(
+ label = "text",
+ chipSizeStyle = smallChipStyle,
+ selected = true,
+ onClick = {},
+ )
+ }
+ }
+}
diff --git a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Spacing.kt b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Spacing.kt
index a4dfd5fd..9595ba84 100644
--- a/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Spacing.kt
+++ b/core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Spacing.kt
@@ -9,6 +9,7 @@ data class ReedSpacing(
val spacing0: Dp = 0.dp,
val spacing05: Dp = 2.dp,
val spacing1: Dp = 4.dp,
+ val spacing15: Dp = 6.dp,
val spacing2: Dp = 8.dp,
val spacing3: Dp = 12.dp,
val spacing4: Dp = 16.dp,
diff --git a/core/designsystem/src/main/res/drawable/img_category_insight.webp b/core/designsystem/src/main/res/drawable/img_category_insight.webp
new file mode 100644
index 00000000..b0ad9df0
Binary files /dev/null and b/core/designsystem/src/main/res/drawable/img_category_insight.webp differ
diff --git a/core/designsystem/src/main/res/drawable/img_category_joy.webp b/core/designsystem/src/main/res/drawable/img_category_joy.webp
new file mode 100644
index 00000000..70036262
Binary files /dev/null and b/core/designsystem/src/main/res/drawable/img_category_joy.webp differ
diff --git a/core/designsystem/src/main/res/drawable/img_category_sad.webp b/core/designsystem/src/main/res/drawable/img_category_sad.webp
new file mode 100644
index 00000000..016a7321
Binary files /dev/null and b/core/designsystem/src/main/res/drawable/img_category_sad.webp differ
diff --git a/core/designsystem/src/main/res/drawable/img_category_warm.webp b/core/designsystem/src/main/res/drawable/img_category_warm.webp
new file mode 100644
index 00000000..5ad834e2
Binary files /dev/null and b/core/designsystem/src/main/res/drawable/img_category_warm.webp differ
diff --git a/core/designsystem/src/main/res/values/strings.xml b/core/designsystem/src/main/res/values/strings.xml
index a2793c60..674c8c55 100644
--- a/core/designsystem/src/main/res/values/strings.xml
+++ b/core/designsystem/src/main/res/values/strings.xml
@@ -4,4 +4,8 @@
알 수 없는 오류가 발생하였습니다.
도서 검색 후 내 서재에 담아보세요
로그인이 필요한 기능입니다
+ 공감과 위로가 된 순간
+ 흥미롭고 유쾌한 순간
+ 눈물이 고인 순간
+ 생각이 깊어지는 순간
diff --git a/core/designsystem/stability/designsystem.stability b/core/designsystem/stability/designsystem.stability
index 2bf67bed..9261a073 100644
--- a/core/designsystem/stability/designsystem.stability
+++ b/core/designsystem/stability/designsystem.stability
@@ -163,6 +163,39 @@ public fun com.ninecraft.booket.core.designsystem.component.checkbox.TickOnlyChe
- onCheckedChange: STABLE (function type)
- modifier: STABLE (marked @Stable or @Immutable)
+@Composable
+public fun com.ninecraft.booket.core.designsystem.component.chip.(): com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle
+ skippable: true
+ restartable: true
+ params:
+
+@Composable
+public fun com.ninecraft.booket.core.designsystem.component.chip.(): com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle
+ skippable: true
+ restartable: true
+ params:
+
+@Composable
+public fun com.ninecraft.booket.core.designsystem.component.chip.ReedRemovableChip(label: kotlin.String, chipSizeStyle: com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle, onRemove: kotlin.Function0, modifier: androidx.compose.ui.Modifier): kotlin.Unit
+ skippable: true
+ restartable: true
+ params:
+ - label: STABLE (String is immutable)
+ - chipSizeStyle: STABLE (class with no mutable properties)
+ - onRemove: STABLE (function type)
+ - modifier: STABLE (marked @Stable or @Immutable)
+
+@Composable
+public fun com.ninecraft.booket.core.designsystem.component.chip.ReedSelectableChip(label: kotlin.String, chipSizeStyle: com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle, selected: kotlin.Boolean, onClick: kotlin.Function0, modifier: androidx.compose.ui.Modifier): kotlin.Unit
+ skippable: true
+ restartable: true
+ params:
+ - label: STABLE (String is immutable)
+ - chipSizeStyle: STABLE (class with no mutable properties)
+ - selected: STABLE (primitive type)
+ - onClick: STABLE (function type)
+ - modifier: STABLE (marked @Stable or @Immutable)
+
@Composable
public fun com.ninecraft.booket.core.designsystem.component.textfield.ReedRecordTextField(recordState: androidx.compose.foundation.text.input.TextFieldState, recordHintRes: kotlin.Int, modifier: androidx.compose.ui.Modifier, inputTransformation: androidx.compose.foundation.text.input.InputTransformation?, keyboardOptions: androidx.compose.foundation.text.KeyboardOptions, lineLimits: androidx.compose.foundation.text.input.TextFieldLineLimits, isError: kotlin.Boolean, errorMessage: kotlin.String, onClear: kotlin.Function0?, onNext: kotlin.Function0, backgroundColor: androidx.compose.ui.graphics.Color, textColor: androidx.compose.ui.graphics.Color, cornerShape: androidx.compose.foundation.shape.RoundedCornerShape, borderStroke: androidx.compose.foundation.BorderStroke): kotlin.Unit
skippable: true
diff --git a/feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/register/RecordRegisterPresenter.kt b/feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/register/RecordRegisterPresenter.kt
index 62581d60..8a01ac5c 100644
--- a/feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/register/RecordRegisterPresenter.kt
+++ b/feature/record/src/main/kotlin/com/ninecraft/booket/feature/record/register/RecordRegisterPresenter.kt
@@ -31,6 +31,9 @@ import dev.zacsweers.metro.AppScope
import dev.zacsweers.metro.Assisted
import dev.zacsweers.metro.AssistedFactory
import dev.zacsweers.metro.AssistedInject
+import kotlinx.collections.immutable.ImmutableList
+import kotlinx.collections.immutable.persistentListOf
+import kotlinx.collections.immutable.persistentMapOf
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.launch
@@ -61,12 +64,8 @@ class RecordRegisterPresenter(
@Composable
override fun present(): RecordRegisterUiState {
- val scope = rememberCoroutineScope()
- var isLoading by rememberRetained { mutableStateOf(false) }
- var sideEffect by rememberRetained { mutableStateOf(null) }
- var currentStep by rememberRetained { mutableStateOf(RecordStep.QUOTE) }
- val recordPageState = rememberTextFieldState()
- val recordSentenceState = rememberTextFieldState()
+ /** 2차 고도화 삭제 예정 ===================================================================== */
+ val impressionState = rememberTextFieldState()
val impressionGuideList by rememberRetained {
mutableStateOf(
listOf(
@@ -80,13 +79,28 @@ class RecordRegisterPresenter(
).toPersistentList(),
)
}
- val emotions by rememberRetained { mutableStateOf(Emotion.entries.toPersistentList()) }
- var selectedEmotion by rememberRetained { mutableStateOf(null) }
var selectedImpressionGuide by rememberRetained { mutableStateOf("") }
var beforeSelectedImpressionGuide by rememberRetained { mutableStateOf(selectedImpressionGuide) }
- val impressionState = rememberTextFieldState()
- var savedRecordId by rememberRetained { mutableStateOf("") }
var isImpressionGuideBottomSheetVisible by rememberRetained { mutableStateOf(false) }
+ var isScanTooltipVisible by rememberRetained { mutableStateOf(true) }
+ var isImpressionGuideTooltipVisible by rememberRetained { mutableStateOf(true) }
+
+ /** ====================================================================================== */
+ val scope = rememberCoroutineScope()
+ var isLoading by rememberRetained { mutableStateOf(false) }
+ var sideEffect by rememberRetained { mutableStateOf(null) }
+ var currentStep by rememberRetained { mutableStateOf(RecordStep.QUOTE) }
+ val recordPageState = rememberTextFieldState()
+ val recordSentenceState = rememberTextFieldState()
+ val memoState = rememberTextFieldState()
+ val emotions by rememberRetained { mutableStateOf(Emotion.entries.toPersistentList()) }
+ var emotionDetails by rememberRetained { mutableStateOf(persistentListOf()) }
+ var selectedEmotion by rememberRetained { mutableStateOf(null) }
+ var selectedEmotionDetails by rememberRetained { mutableStateOf