Skip to content

Commit

Permalink
Merge pull request #37 from TimerTiTi/36-010-qa
Browse files Browse the repository at this point in the history
close #36 0.1.0 qa
  • Loading branch information
koreatlwls authored Jan 31, 2024
2 parents eb42a72 + 37b4a1c commit e011a40
Show file tree
Hide file tree
Showing 15 changed files with 215 additions and 200 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.titi.app.core.designsystem.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
Expand All @@ -12,7 +11,6 @@ import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
Expand All @@ -25,7 +23,7 @@ import com.titi.app.core.designsystem.theme.TiTiTheme

@Composable
fun TdsDialog(
modifier: Modifier = Modifier.background(color = TdsColor.BACKGROUND.getColor()),
modifier: Modifier = Modifier,
tdsDialogInfo: TdsDialogInfo,
onShowDialog: (Boolean) -> Unit,
bodyContent: (@Composable () -> Unit)? = null,
Expand All @@ -45,7 +43,7 @@ fun TdsDialog(
.fillMaxWidth()
.wrapContentHeight(),
shape = RoundedCornerShape(14.dp),
color = Color.Transparent,
color = TdsColor.ALERT_BACKGROUND.getColor(),
) {
Column(
modifier = modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import androidx.compose.foundation.text.KeyboardOptions
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.SolidColor
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
Expand All @@ -36,10 +38,16 @@ fun TdsOutlinedInputTextField(
modifier = modifier,
value = text,
onValueChange = onValueChange,
textStyle = TdsTextStyle.NORMAL_TEXT_STYLE.getTextStyle(fontSize = fontSize)
.copy(textAlign = TextAlign.Center),
textStyle = TdsTextStyle
.NORMAL_TEXT_STYLE
.getTextStyle(fontSize = fontSize)
.copy(
color = TdsColor.TEXT.getColor(),
textAlign = TextAlign.Center,
),
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
cursorBrush = SolidColor(TdsColor.TEXT.getColor()),
) { innerTextField ->
Box(
modifier = modifier
Expand All @@ -48,7 +56,8 @@ fun TdsOutlinedInputTextField(
color = TdsColor.DIVIDER.getColor(),
shape = RoundedCornerShape(4.dp),
)
.background(TdsColor.BACKGROUND.getColor()),
.clip(RoundedCornerShape(4.dp))
.background(TdsColor.TERTIARY_BACKGROUND.getColor()),
contentAlignment = Alignment.Center,
) {
innerTextField()
Expand Down Expand Up @@ -77,6 +86,7 @@ fun TdsOutlinedInputTextField(
.copy(textAlign = TextAlign.Center),
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
cursorBrush = SolidColor(TdsColor.TEXT.getColor()),
) { innerTextField ->
Box(
modifier =
Expand All @@ -86,7 +96,8 @@ fun TdsOutlinedInputTextField(
color = TdsColor.DIVIDER.getColor(),
shape = RoundedCornerShape(4.dp),
)
.background(TdsColor.BACKGROUND.getColor()),
.clip(RoundedCornerShape(4.dp))
.background(TdsColor.TERTIARY_BACKGROUND.getColor()),
contentAlignment = Alignment.Center,
) {
innerTextField()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ fun TdsTaskListItem(
checkedTrackColor = themeColor,
checkedBorderColor = Color.Transparent,
checkedThumbColor = Color.White,
uncheckedTrackColor = TdsColor.DIVIDER.getColor(),
uncheckedTrackColor = TdsColor.SWITCH_BACKGROUND.getColor(),
uncheckedBorderColor = Color.Transparent,
uncheckedThumbColor = Color.White,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ data class TdsColorsPalette(
val d12: Color = Color.Unspecified,
val textColor: Color = Color.Unspecified,
val backgroundColor: Color = Color.Unspecified,
val secondaryBackgroundColor: Color = Color.Unspecified,
val switchBackgroundColor: Color = Color.Unspecified,
val alertBackgroundColor: Color = Color.Unspecified,
val tertiaryBackgroundColor: Color = Color.Unspecified,
val redColor: Color = Color.Unspecified,
val blueColor: Color = Color.Unspecified,
val dividerColor: Color = Color.Unspecified,
Expand All @@ -44,6 +48,10 @@ val TdsLightColorsPalette =
d12 = Color(0xFF928AEA),
textColor = Color(0xFF000000),
backgroundColor = Color(0xFFFFFFFF),
secondaryBackgroundColor = Color(0xFFF2F2F7),
switchBackgroundColor = Color(0xFFE9E9EB),
alertBackgroundColor = Color(0xD1EEEEEE),
tertiaryBackgroundColor = Color(0xFFFFFFFF),
redColor = Color(0xFFFF453A),
blueColor = Color(0xFF0A84FF),
dividerColor = Color(0x4D000000),
Expand All @@ -68,9 +76,13 @@ val TdsDarkColorsPalette =
d12 = Color(0xFF6379EB),
textColor = Color(0xFFFFFFFF),
backgroundColor = Color(0xFF000000),
secondaryBackgroundColor = Color(0xFF1C1C1E),
switchBackgroundColor = Color(0xFF39393D),
alertBackgroundColor = Color(0xD12B2B2B),
tertiaryBackgroundColor = Color(0xFF2C2C2E),
redColor = Color(0xFFFF453A),
blueColor = Color(0xFF0A84FF),
dividerColor = Color(0x99000000),
dividerColor = Color(0x4DFFFFFF),
lightGrayColor = Color(0xFF555555),
whiteColor = Color(0xFFFFFFFF),
blackColor = Color(0xFF000000),
Expand All @@ -92,6 +104,10 @@ enum class TdsColor {

TEXT,
BACKGROUND,
SECONDARY_BACKGROUND,
SWITCH_BACKGROUND,
ALERT_BACKGROUND,
TERTIARY_BACKGROUND,
RED,
BLUE,
DIVIDER,
Expand All @@ -118,6 +134,11 @@ enum class TdsColor {

TEXT -> TiTiTheme.colors.textColor
BACKGROUND -> TiTiTheme.colors.backgroundColor
SECONDARY_BACKGROUND -> TiTiTheme.colors.secondaryBackgroundColor
SWITCH_BACKGROUND -> TiTiTheme.colors.switchBackgroundColor
ALERT_BACKGROUND -> TiTiTheme.colors.alertBackgroundColor
TERTIARY_BACKGROUND -> TiTiTheme.colors.tertiaryBackgroundColor

RED -> TiTiTheme.colors.redColor
BLUE -> TiTiTheme.colors.blueColor
DIVIDER -> TiTiTheme.colors.dividerColor
Expand Down
5 changes: 5 additions & 0 deletions feature/color/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
android:name=".ui.ColorActivity"
android:exported="false" />
</application>
</manifest>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.titi.app.feature.color.ui

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.titi.app.core.designsystem.theme.TiTiTheme
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class ColorActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

val recordingMode = intent.getIntExtra(
"recordingMode",
1,
)

setContent {
TiTiTheme {
ColorScreen(
recordingMode = recordingMode,
onFinish = {
finish()
},
)
}
}
}
}
Loading

0 comments on commit e011a40

Please sign in to comment.