Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/aa 3240 migrate typographies #313

Merged
merged 9 commits into from
Dec 13, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fun ActionMenuItem(
text = text,
maxLines = ACTION_TEXT_MAX_LINES,
overflow = TextOverflow.Ellipsis,
style = GrapesTheme.typography.titleS,
style = GrapesTheme.typography.titleM,
modifier = Modifier.weight(1f),
)
if (enabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ private fun ActionMenuSectionHeader(
) {
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 @@ -30,7 +30,7 @@ fun GrapesBadge(
modifier = modifier
.background(backgroundColor, RoundedCornerShape(100))
.padding(horizontal = GrapesTheme.dimensions.spacing3, vertical = GrapesTheme.dimensions.spacing1),
style = GrapesTheme.typography.titleM,
style = GrapesTheme.typography.titleL,
color = GrapesTheme.colors.mainWhite
)
}
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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object GrapesButtonStyleDefaults {
@ReadOnlyComposable
get() =
GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidth.value,
height = GrapesButtonDefaults.MinHeight.value
Expand All @@ -44,7 +44,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleS,
textStyle = GrapesTheme.typography.titleM,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -62,7 +62,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidth.value,
height = GrapesButtonDefaults.MinHeight.value
Expand All @@ -80,7 +80,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleS,
textStyle = GrapesTheme.typography.titleM,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -98,7 +98,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidth.value,
height = GrapesButtonDefaults.MinHeight.value
Expand All @@ -116,7 +116,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleS,
textStyle = GrapesTheme.typography.titleM,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -134,7 +134,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidth.value,
height = GrapesButtonDefaults.MinHeight.value
Expand All @@ -152,7 +152,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidth.value,
height = GrapesButtonDefaults.MinHeight.value
Expand All @@ -170,7 +170,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidth.value,
height = GrapesButtonDefaults.MinHeight.value
Expand All @@ -188,7 +188,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -206,7 +206,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -224,7 +224,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -242,7 +242,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand All @@ -260,7 +260,7 @@ object GrapesButtonStyleDefaults {
@Composable
@ReadOnlyComposable
get() = GrapesButtonStyle(
textStyle = GrapesTheme.typography.titleM,
textStyle = GrapesTheme.typography.titleL,
minSize = Size(
width = GrapesButtonDefaults.MinWidthSmall.value,
height = GrapesButtonDefaults.MinHeightSmall.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fun GrapesCoreCallout(
horizontalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing2),
) {
ProvideTextStyle(
GrapesTheme.typography.titleS.copy(color = colors.titleColor().value),
GrapesTheme.typography.titleM.copy(color = colors.titleColor().value),
) {
if (leadingIcon != null) {
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fun ColumnScope.GrapesCalloutContent(
Text(
modifier = Modifier.fillMaxWidth(),
text = description,
style = GrapesTheme.typography.bodyS,
style = GrapesTheme.typography.bodyM,
)

bottomContent?.invoke(this)
Expand All @@ -34,7 +34,7 @@ fun ColumnScope.GrapesCalloutContent(
Text(
modifier = Modifier.fillMaxWidth(),
text = description,
style = GrapesTheme.typography.bodyS,
style = GrapesTheme.typography.bodyM,
)

bottomContent?.invoke(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fun GrapesInformationCard(
) {
Text(
text = title,
style = GrapesTheme.typography.titleS,
style = GrapesTheme.typography.titleM,
modifier = Modifier.padding(horizontal = GrapesTheme.dimensions.spacing3),
)
GrapesDivider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fun GrapesInlineInformationItem(
Text(
text = title,
color = GrapesTheme.colors.mainNeutralDarker,
style = GrapesTheme.typography.bodyRegular,
style = GrapesTheme.typography.bodyL,
modifier = Modifier.weight(1f),
)
Box(
Expand All @@ -40,7 +40,7 @@ fun GrapesInlineInformationItem(
) {
Text(
text = value,
style = GrapesTheme.typography.bodyRegular,
style = GrapesTheme.typography.bodyL,
textAlign = TextAlign.End
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ internal fun IconAction(iconActionConfiguration: ListItemConfiguration.IconActio
modifier = Modifier.weight(1f),
verticalArrangement = Arrangement.spacedBy(GrapesTheme.dimensions.spacing1)
) {
Text(text = iconActionConfiguration.title, style = GrapesTheme.typography.titleM, color = titleColor)
Text(text = iconActionConfiguration.title, style = GrapesTheme.typography.titleL, color = titleColor)
iconActionConfiguration.description?.let {
Text(text = it, style = GrapesTheme.typography.bodyS, color = GrapesTheme.colors.mainNeutralDarker)
Text(text = it, style = GrapesTheme.typography.bodyM, color = GrapesTheme.colors.mainNeutralDarker)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ fun SectionItem(
icon(Modifier.size(iconSize))
Text(
text = title,
style = GrapesTheme.typography.bodyRegular,
style = GrapesTheme.typography.bodyL,
)
Spacer(modifier = Modifier.weight(1f))
Text(
text = description,
style = GrapesTheme.typography.bodyRegular,
style = GrapesTheme.typography.bodyL,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fun TextDivider(
modifier = modifier.fillMaxWidth()
) {
GrapesDivider(modifier = Modifier.weight(1f), color = color)
Text(text = text, maxLines = 1, overflow = TextOverflow.Ellipsis, style = GrapesTheme.typography.bodyRegular, color = color)
Text(text = text, maxLines = 1, overflow = TextOverflow.Ellipsis, style = GrapesTheme.typography.bodyL, color = color)
GrapesDivider(modifier = Modifier.weight(1f), color = color)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fun GrapesMessage(
}
Text(
text = title,
style = GrapesTheme.typography.titleS,
style = GrapesTheme.typography.titleM,
color = GrapesTheme.colors.contentColorFor(configuration),
textAlign = titleTextAlign,
modifier = Modifier.fillMaxWidth(),
Expand All @@ -70,7 +70,7 @@ fun GrapesMessage(
Spacer(modifier = Modifier.size(GrapesTheme.dimensions.spacing1))
Text(
text = description,
style = GrapesTheme.typography.bodyS,
style = GrapesTheme.typography.bodyM,
color = GrapesTheme.colors.mainComplementary,
textAlign = descriptionTextAlign,
modifier = Modifier.fillMaxWidth(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private fun PasswordValidationItem(
Box(modifier = Modifier.size(PasswordValidationDefaults.ValidationBoxSize), contentAlignment = Alignment.Center) {
Icon(painter = painterResource(id = itemIcon), contentDescription = null, tint = itemColor, modifier = Modifier.size(iconSize))
}
Text(text = label, style = GrapesTheme.typography.bodyS, color = itemColor)
Text(text = label, style = GrapesTheme.typography.bodyM, color = itemColor)
}
}

Expand Down Expand Up @@ -129,7 +129,7 @@ private fun PasswordValidationPreview() {
}
}
)
Text(text = "Change ${item.label} status", style = GrapesTheme.typography.bodyS)
Text(text = "Change ${item.label} status", style = GrapesTheme.typography.bodyM)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private fun Select(
.border(1.dp, GrapesTheme.colors.mainNeutralLight, shape = RoundedCornerShape(50, 50, radiusSize, radiusSize))
.padding(horizontal = GrapesTheme.dimensions.spacing3, vertical = GrapesTheme.dimensions.paddingMedium)
) {
Text(text = label, style = GrapesTheme.typography.titleS, color = contentColor)
Text(text = label, style = GrapesTheme.typography.titleM, color = contentColor)

GrapesSelectIcon(expanded = isExpanded, tint = contentColor)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fun GrapesCheckboxText(
Text(
text = text,
color = GrapesTheme.colors.mainComplementary,
style = GrapesTheme.typography.bodyRegular
style = GrapesTheme.typography.bodyL
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fun GrapesRadioButtonText(
Text(
text = text,
color = GrapesTheme.colors.mainNeutralDarker,
style = GrapesTheme.typography.bodyRegular
style = GrapesTheme.typography.bodyL
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ fun GrapesSelectCardText(
color = if (isSelected) GrapesSelectCardTextDefaultColors.selectedTitleColor else GrapesSelectCardTextDefaultColors.unselectedTitleColor,
overflow = TextOverflow.Ellipsis,
maxLines = 1,
style = GrapesTheme.typography.titleM,
style = GrapesTheme.typography.titleL,
text = title
)
Spacer(modifier = Modifier.padding(GrapesTheme.dimensions.spacing1))
Text(
color = if (isSelected) GrapesSelectCardTextDefaultColors.selectedDescriptionColor else GrapesSelectCardTextDefaultColors.unselectedDescriptionColor,
overflow = TextOverflow.Ellipsis,
maxLines = 2,
style = GrapesTheme.typography.bodyS,
style = GrapesTheme.typography.bodyM,
text = description
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fun GrapesTag(
}

ProvideTextStyle(
GrapesTheme.typography.titleS.copy(color = LocalContentColor.current),
GrapesTheme.typography.titleM.copy(color = LocalContentColor.current),
) {
Text(text = label)
}
Expand Down
Loading