-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/Noostak/Noostak_Android …
…into feat/#6-login
- Loading branch information
Showing
47 changed files
with
1,678 additions
and
146 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
core/src/main/java/com/sopt/core/designsystem/component/button/NoostakBottomButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package com.sopt.core.designsystem.component.button | ||
|
||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.Shape | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakAndroidTheme | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
import com.sopt.core.extension.noRippleClickable | ||
import com.sopt.core.util.NoRippleInteractionSource | ||
|
||
@Composable | ||
fun NoostakBottomButton( | ||
shape: Shape = RoundedCornerShape(8.dp), | ||
style: TextStyle = NoostakTheme.typography.t3Bold, | ||
paddingHorizontal: Dp = 0.dp, | ||
paddingVertical: Dp = dimensionResource(id = R.dimen.bottom_btn_vertical_padding), | ||
text: String, | ||
onButtonClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
activateColor: Color = NoostakTheme.colors.blue600, | ||
deactivateColor: Color = NoostakTheme.colors.gray500, | ||
isEnabled: Boolean = true | ||
) { | ||
Button( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.padding(dimensionResource(id = R.dimen.bottom_padding)) | ||
.run { | ||
if (isEnabled) { | ||
noRippleClickable(onClick = onButtonClick) | ||
} else { | ||
this | ||
} | ||
}, | ||
shape = shape, | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = if (isEnabled) activateColor else deactivateColor | ||
), | ||
contentPadding = PaddingValues( | ||
vertical = paddingVertical, | ||
horizontal = paddingHorizontal | ||
), | ||
onClick = { onButtonClick() }, | ||
enabled = isEnabled, | ||
interactionSource = NoRippleInteractionSource | ||
) { | ||
Text( | ||
text = text, | ||
color = NoostakTheme.colors.white, | ||
style = style | ||
) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun NoostakBottomButtonPreview() { | ||
NoostakAndroidTheme { | ||
NoostakBottomButton(text = "다음", onButtonClick = {}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
core/src/main/java/com/sopt/core/designsystem/component/snackbar/BaseSnackBar.kt
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
core/src/main/java/com/sopt/core/designsystem/component/snackbar/NoostakSnackBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.sopt.core.designsystem.component.snackbar | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
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.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.dimensionResource | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakAndroidTheme | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
|
||
const val SNACK_BAR_DURATION = 2000L | ||
|
||
@Composable | ||
fun NoostakSnackBar( | ||
message: String = "", | ||
textStyle: TextStyle = NoostakTheme.typography.c3Regular, | ||
textColor: Color = NoostakTheme.colors.white, | ||
backgroundColor: Color = NoostakTheme.colors.gray800 | ||
) { | ||
Box( | ||
modifier = Modifier | ||
.clip(RoundedCornerShape(dimensionResource(id = R.dimen.snack_bar_radius))) | ||
.background(color = backgroundColor) | ||
.padding( | ||
vertical = dimensionResource(id = R.dimen.snack_bar_vertical_padding), | ||
horizontal = dimensionResource( | ||
id = R.dimen.snack_bar_horizontal_padding | ||
) | ||
) | ||
) { | ||
Text(text = message, style = textStyle, color = textColor) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun NoostakSnackBarPreview() { | ||
NoostakAndroidTheme { | ||
NoostakSnackBar(message = "Noostak SnackBar") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
core/src/main/java/com/sopt/core/designsystem/component/topappbar/BaseTopAppBar.kt
This file was deleted.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
core/src/main/java/com/sopt/core/designsystem/component/topappbar/NoostakCloseAppBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.sopt.core.designsystem.component.topappbar | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.size | ||
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.dimensionResource | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.sopt.core.R | ||
import com.sopt.core.designsystem.theme.NoostakAndroidTheme | ||
import com.sopt.core.designsystem.theme.NoostakTheme | ||
|
||
@Composable | ||
fun NoostakCloseAppBar( | ||
modifier: Modifier, | ||
onBackButtonClick: () -> Unit = {} | ||
) { | ||
Box( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.background(color = NoostakTheme.colors.white) | ||
.height(dimensionResource(id = R.dimen.appbar_height)) | ||
) { | ||
IconButton( | ||
onClick = onBackButtonClick, | ||
modifier = Modifier | ||
.align(Alignment.CenterStart) | ||
.size(dimensionResource(id = R.dimen.appbar_height)) | ||
) { | ||
Icon( | ||
painter = painterResource(id = R.drawable.ic_appbar_close), | ||
contentDescription = stringResource(R.string.icon_noostak_close_appbar_description) | ||
) | ||
} | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun NoostakCloseAppBarPreview() { | ||
NoostakAndroidTheme { | ||
NoostakCloseAppBar(Modifier) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
core/src/main/java/com/sopt/core/designsystem/screen/NoostakEmptyScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.sopt.core.designsystem.screen | ||
|
||
import androidx.annotation.StringRes | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.aspectRatio | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.material3.Text | ||
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.res.stringResource | ||
import androidx.compose.ui.text.TextStyle | ||
|
||
@Composable | ||
fun NoostakEmptyScreen(@StringRes emptyText: Int, color: Color, style: TextStyle) { | ||
Box( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.aspectRatio(1f) | ||
) { | ||
Text( | ||
modifier = Modifier.align(Alignment.Center), | ||
text = stringResource(emptyText), | ||
color = color, | ||
style = style | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="48" | ||
android:viewportHeight="48"> | ||
<path | ||
android:pathData="M17.25,17.25L30.75,30.75M30.75,17.25L17.25,30.75" | ||
android:strokeWidth="1.80645" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#000000" | ||
android:strokeLineCap="round"/> | ||
</vector> |
Oops, something went wrong.