Skip to content

Commit

Permalink
Release/1.20.0 #314
Browse files Browse the repository at this point in the history
  • Loading branch information
kelianClerc authored Dec 13, 2023
2 parents 1b5c62d + 75f1f78 commit 7e80bbc
Show file tree
Hide file tree
Showing 47 changed files with 310 additions and 201 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
grapes-version = '1.19.0'
grapes-version = '1.20.0'
androidMinSdk = "21"
androidTargetSdk = "34"
androidCompileSdk = "34"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ fun ActionMenuItem(
disabledContentColor = GrapesTheme.colors.neutralNormal,
),
contentPadding = PaddingValues(
start = GrapesTheme.dimensions.paddingXLarge,
end = GrapesTheme.dimensions.paddingLarge,
start = GrapesTheme.dimensions.spacing4,
end = GrapesTheme.dimensions.spacing3,
top = verticalInnerPadding,
bottom = verticalInnerPadding,
),
shape = GrapesTheme.shapes.small,
shape = GrapesTheme.shapes.shape2,
modifier = modifier,
) {
Row(
Expand All @@ -76,16 +76,16 @@ fun ActionMenuItem(
enabled = enabled,
icon = icon,
)
Spacer(Modifier.width(GrapesTheme.dimensions.paddingXLarge))
Spacer(Modifier.width(GrapesTheme.dimensions.spacing4))
Text(
text = text,
maxLines = ACTION_TEXT_MAX_LINES,
overflow = TextOverflow.Ellipsis,
style = GrapesTheme.typography.titleS,
style = GrapesTheme.typography.titleM,
modifier = Modifier.weight(1f),
)
if (enabled) {
Spacer(Modifier.width(GrapesTheme.dimensions.paddingLarge))
Spacer(Modifier.width(GrapesTheme.dimensions.spacing3))
Icon(
painter = painterResource(R.drawable.ic_chevron_right),
contentDescription = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fun ActionMenuSection(
shape = sectionShape,
) {
Column(
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.paddingSmall),
modifier = Modifier.padding(GrapesTheme.dimensions.paddingSmall),
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing2),
modifier = Modifier.padding(GrapesTheme.dimensions.spacing2),
) {
ActionMenuSectionHeader(
title = title,
Expand All @@ -71,7 +71,7 @@ private fun ActionMenuSectionHeader(
modifier: Modifier = Modifier,
) {
Row(
horizontalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.paddingSmall),
horizontalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing2),
verticalAlignment = Alignment.CenterVertically,
modifier = modifier,
) {
Expand All @@ -84,23 +84,23 @@ private fun ActionMenuSectionHeader(
),
)
Column(
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.paddingXSmall),
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing1),
modifier = Modifier.padding(
bottom = GrapesTheme.dimensions.paddingSmall,
top = GrapesTheme.dimensions.paddingSmall,
end = GrapesTheme.dimensions.paddingSmall,
bottom = GrapesTheme.dimensions.spacing2,
top = GrapesTheme.dimensions.spacing2,
end = GrapesTheme.dimensions.spacing2,
)
) {
Text(
text = title,
style = GrapesTheme.typography.titleM,
style = GrapesTheme.typography.titleL,
color = GrapesTheme.colors.structureComplementary,
maxLines = TITLE_MAX_LINES,
overflow = TextOverflow.Ellipsis,
)
Text(
text = description,
style = GrapesTheme.typography.bodyS,
style = GrapesTheme.typography.bodyM,
color = GrapesTheme.colors.neutralDark,
maxLines = DESCRIPTION_MAX_LINES,
overflow = TextOverflow.Ellipsis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private fun RowScope.GrapesNavigationBarItem(
tab: GrapesNavigationItem,
onSelected: (GrapesNavigationItem) -> Unit,
) {
val textStyle = GrapesTheme.typography.titleXs
val textStyle = GrapesTheme.typography.titleS
val colors = NavigationBarItemDefaults.colors(
indicatorColor = GrapesTheme.colors.mainWhite,
selectedIconColor = GrapesTheme.colors.mainPrimaryNormal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ fun GrapesTopAppBarTitleWithSubtitle(

Text(
text = subTitle,
lineHeight = GrapesTheme.typography.bodyS.fontSize,
style = GrapesTheme.typography.bodyS,
lineHeight = GrapesTheme.typography.bodyM.fontSize,
style = GrapesTheme.typography.bodyM,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fun GrapesBadge(
text = content,
modifier = modifier
.background(backgroundColor, RoundedCornerShape(100))
.padding(horizontal = GrapesTheme.dimensions.paddingLarge, vertical = GrapesTheme.dimensions.paddingXSmall),
style = GrapesTheme.typography.titleM,
.padding(horizontal = GrapesTheme.dimensions.spacing3, vertical = GrapesTheme.dimensions.spacing1),
style = GrapesTheme.typography.titleL,
color = GrapesTheme.colors.mainWhite
)
}
Expand All @@ -39,7 +39,7 @@ fun GrapesBadge(
@Composable
fun GrapesBadgePreview() {
GrapesTheme {
Column(verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.paddingXSmall)) {
Column(verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing1)) {
GrapesBadge(content = "Message Inline Success", configuration = GrapesConfigurationStatus.SUCCESS)
GrapesBadge(content = "Message Inline Information", configuration = GrapesConfigurationStatus.INFORMATION)
GrapesBadge(content = "Message Inline Neutral", configuration = GrapesConfigurationStatus.NEUTRAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal fun GrapesBucketCore(
headline()

if (content != null) {
Spacer(Modifier.padding(bottom = GrapesTheme.dimensions.paddingLarge))
Spacer(Modifier.padding(bottom = GrapesTheme.dimensions.spacing3))
content()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ fun GrapesBucketContainer(
) {
Box(
modifier = modifier
.background(GrapesTheme.colors.mainWhite, GrapesTheme.shapes.small)
.border(GrapesBucketBorderWidth, GrapesTheme.colors.mainNeutralNormal, GrapesTheme.shapes.small)
.clip(GrapesTheme.shapes.small)
.background(GrapesTheme.colors.mainWhite, GrapesTheme.shapes.shape2)
.border(GrapesBucketBorderWidth, GrapesTheme.colors.mainNeutralNormal, GrapesTheme.shapes.shape2)
.clip(GrapesTheme.shapes.shape2)
) {
content()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun GrapesBucketHeadline(
color = GrapesTheme.colors.mainComplementary,
overflow = TextOverflow.Ellipsis,
maxLines = 1,
style = GrapesTheme.typography.titleS
style = GrapesTheme.typography.titleM
)
if (action != null && actionColor != null) {
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.paddingMedium))
Expand All @@ -48,7 +48,7 @@ fun GrapesBucketHeadline(
color = actionColor,
overflow = TextOverflow.Ellipsis,
maxLines = 1,
style = GrapesTheme.typography.titleS
style = GrapesTheme.typography.titleM
)
}
}
Expand All @@ -66,19 +66,19 @@ private fun GrapesBucketHeadlinePreview() {
) {

GrapesBucketHeadline(title = "Bucket de Rick Astley")
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.paddingLarge))
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.spacing3))

GrapesBucketHeadline(title = "Bucket de Rick Astley a bit longer than expecteeeeeeeeeeeeeed")
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.paddingLarge))
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.spacing3))

GrapesBucketHeadline(title = "Bucket de Rick Astley a bit longer than expecteeeeeeeeeeeeeeeeeeed", action = "Remove", actionColor = GrapesTheme.colors.mainAlertNormal)
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.paddingLarge))
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.spacing3))

GrapesBucketHeadline(title = "Bucket de Rick Astley", action = "Remove", actionColor = GrapesTheme.colors.mainAlertNormal)
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.paddingLarge))
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.spacing3))

GrapesBucketHeadline(title = "Bucket de Rick Astley", action = "Remooooooove with too many ooooooooooos", actionColor = GrapesTheme.colors.mainAlertNormal)
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.paddingLarge))
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.spacing3))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private fun GrapesButtonBrandPreview() {
modifier = Modifier
.fillMaxSize()
.background(GrapesTheme.colors.mainBackground)
.padding(GrapesTheme.dimensions.paddingLarge),
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.paddingLarge)
.padding(GrapesTheme.dimensions.spacing3),
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing3)
) {
GrapesGoogleButton(label = "Register to Google", onClick = { /*TODO*/ })
GrapesMicrosoftButton(label = "Register to Microsoft", onClick = { /*TODO*/ })
Expand Down
Loading

0 comments on commit 7e80bbc

Please sign in to comment.