diff --git a/app/src/main/java/com/orange/ouds/app/ui/components/ComponentsScreen.kt b/app/src/main/java/com/orange/ouds/app/ui/components/ComponentsScreen.kt index 3043f2cc..822633bd 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/components/ComponentsScreen.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/components/ComponentsScreen.kt @@ -51,7 +51,7 @@ fun ComponentsScreen() { .padding(top = OudsSpaceKeyToken.Fixed.Medium.value) .width(OudsGridKeyToken.Margin.value) .height(OudsGridKeyToken.ColumnGap.value) - .background(OudsColorKeyToken.Content.Brand.Primary.value) + .background(OudsColorKeyToken.Content.BrandPrimary.value) ) } } diff --git a/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenCategoryDetailScreen.kt b/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenCategoryDetailScreen.kt index 985b6cee..1a240e24 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenCategoryDetailScreen.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenCategoryDetailScreen.kt @@ -282,7 +282,7 @@ private fun CodeColumn(codeExample: String, modifier: Modifier = Modifier) { Icon( modifier = Modifier.rotate(linkArrowRotation), painter = painterResource(R.drawable.ic_chevron_down), - tint = OudsColorKeyToken.Content.Brand.Primary.value, + tint = OudsColorKeyToken.Content.BrandPrimary.value, contentDescription = null ) } diff --git a/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenProperty.kt b/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenProperty.kt index 9437df14..ea141491 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenProperty.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenProperty.kt @@ -125,17 +125,17 @@ sealed class TokenProperty( data object SizeIconWithText : TokenProperty( nameRes = R.string.app_tokens_dimension_size_iconWithText_label, tokens = listOf( - OudsSizeKeyToken.Icon.WithHeadingExtraLarge::class, - OudsSizeKeyToken.Icon.WithHeadingLarge::class, - OudsSizeKeyToken.Icon.WithHeadingMedium::class, - OudsSizeKeyToken.Icon.WithHeadingSmall::class, - OudsSizeKeyToken.Icon.WithBodyLarge::class, - OudsSizeKeyToken.Icon.WithBodyMedium::class, - OudsSizeKeyToken.Icon.WithBodySmall::class, - OudsSizeKeyToken.Icon.WithLabelExtraLarge::class, - OudsSizeKeyToken.Icon.WithLabelLarge::class, - OudsSizeKeyToken.Icon.WithLabelMedium::class, - OudsSizeKeyToken.Icon.WithLabelSmall::class, + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge::class, + OudsSizeKeyToken.Icon.WithHeading.Large::class, + OudsSizeKeyToken.Icon.WithHeading.Medium::class, + OudsSizeKeyToken.Icon.WithHeading.Small::class, + OudsSizeKeyToken.Icon.WithBody.Large::class, + OudsSizeKeyToken.Icon.WithBody.Medium::class, + OudsSizeKeyToken.Icon.WithBody.Small::class, + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge::class, + OudsSizeKeyToken.Icon.WithLabel.Large::class, + OudsSizeKeyToken.Icon.WithLabel.Medium::class, + OudsSizeKeyToken.Icon.WithLabel.Small::class, ).flatMap { keyTokenClass -> keyTokenClass.getTokens(tokenName = { it.getTokenName(OudsSizeKeyToken.Icon::class).removePrefix("With") }) }, @@ -190,3 +190,189 @@ sealed class TokenProperty( categoryClass = TokenCategory.Typography::class ) } + +val OudsBorderKeyToken.Radius.order: Int + get() = when (this) { + OudsBorderKeyToken.Radius.None -> 0 + OudsBorderKeyToken.Radius.Default -> 1 + OudsBorderKeyToken.Radius.Short -> 2 + OudsBorderKeyToken.Radius.Medium -> 3 + OudsBorderKeyToken.Radius.Tall -> 4 + OudsBorderKeyToken.Radius.Pill -> 5 + } + +val OudsBorderKeyToken.Width.order: Int + get() = when (this) { + OudsBorderKeyToken.Width.None -> 0 + OudsBorderKeyToken.Width.Default -> 2 + OudsBorderKeyToken.Width.Thin -> 3 + OudsBorderKeyToken.Width.Medium -> 4 + OudsBorderKeyToken.Width.Thick -> 5 + OudsBorderKeyToken.Width.Thicker -> 6 + OudsBorderKeyToken.Width.Focus -> 7 + OudsBorderKeyToken.Width.FocusInset -> 8 + } + +val OudsElevationKeyToken.order: Int + get() = when (this) { + OudsElevationKeyToken.None -> 0 + OudsElevationKeyToken.Raised -> 1 + OudsElevationKeyToken.OverlayDefault -> 2 + OudsElevationKeyToken.AllSticky -> 3 + OudsElevationKeyToken.Drag -> 4 + OudsElevationKeyToken.OverlayEmphasized -> 5 + } + +val OudsOpacityKeyToken.order: Int + get() = when (this) { + OudsOpacityKeyToken.Invisible -> 0 + OudsOpacityKeyToken.Weaker -> 1 + OudsOpacityKeyToken.Weak -> 2 + OudsOpacityKeyToken.Medium -> 3 + OudsOpacityKeyToken.Strong -> 5 + OudsOpacityKeyToken.Opaque -> 6 + } + +val OudsSizeKeyToken.Icon.order: Int + get() = when (this) { + OudsSizeKeyToken.Icon.Decorative.ExtraExtraSmall -> 0 + OudsSizeKeyToken.Icon.Decorative.ExtraSmall -> 1 + OudsSizeKeyToken.Icon.Decorative.Small -> 2 + OudsSizeKeyToken.Icon.Decorative.Medium -> 3 + OudsSizeKeyToken.Icon.Decorative.Large -> 4 + OudsSizeKeyToken.Icon.Decorative.ExtraLarge -> 5 + OudsSizeKeyToken.Icon.Decorative.ExtraExtraLarge -> 6 + OudsSizeKeyToken.Icon.WithHeading.Small.SizeSmall -> 10 + OudsSizeKeyToken.Icon.WithHeading.Small.SizeMedium -> 11 + OudsSizeKeyToken.Icon.WithHeading.Small.SizeLarge -> 12 + OudsSizeKeyToken.Icon.WithHeading.Medium.SizeSmall -> 20 + OudsSizeKeyToken.Icon.WithHeading.Medium.SizeMedium -> 21 + OudsSizeKeyToken.Icon.WithHeading.Medium.SizeLarge -> 22 + OudsSizeKeyToken.Icon.WithHeading.Large.SizeSmall -> 30 + OudsSizeKeyToken.Icon.WithHeading.Large.SizeMedium -> 31 + OudsSizeKeyToken.Icon.WithHeading.Large.SizeLarge -> 32 + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge.SizeSmall -> 40 + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge.SizeMedium -> 41 + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge.SizeLarge -> 42 + OudsSizeKeyToken.Icon.WithBody.Small.SizeSmall -> 50 + OudsSizeKeyToken.Icon.WithBody.Small.SizeMedium -> 51 + OudsSizeKeyToken.Icon.WithBody.Small.SizeLarge -> 52 + OudsSizeKeyToken.Icon.WithBody.Medium.SizeSmall -> 60 + OudsSizeKeyToken.Icon.WithBody.Medium.SizeMedium -> 61 + OudsSizeKeyToken.Icon.WithBody.Medium.SizeLarge -> 62 + OudsSizeKeyToken.Icon.WithBody.Large.SizeSmall -> 70 + OudsSizeKeyToken.Icon.WithBody.Large.SizeMedium -> 71 + OudsSizeKeyToken.Icon.WithBody.Large.SizeLarge -> 72 + OudsSizeKeyToken.Icon.WithLabel.Small.SizeSmall -> 80 + OudsSizeKeyToken.Icon.WithLabel.Small.SizeMedium -> 81 + OudsSizeKeyToken.Icon.WithLabel.Small.SizeLarge -> 82 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeSmall -> 90 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeMedium -> 91 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeLarge -> 92 + OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall -> 100 + OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall -> 101 + OudsSizeKeyToken.Icon.WithLabel.Large.SizeMedium -> 102 + OudsSizeKeyToken.Icon.WithLabel.Large.SizeLarge -> 103 + OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraLarge -> 104 + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge.SizeSmall -> 110 + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge.SizeMedium -> 111 + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge.SizeLarge -> 112 + } + +val OudsSpaceKeyToken.ColumnGap.order: Int + get() = when (this) { + OudsSpaceKeyToken.ColumnGap.None -> 0 + OudsSpaceKeyToken.ColumnGap.Smash -> 1 + OudsSpaceKeyToken.ColumnGap.Shortest -> 2 + OudsSpaceKeyToken.ColumnGap.Shorter -> 3 + OudsSpaceKeyToken.ColumnGap.Short -> 4 + OudsSpaceKeyToken.ColumnGap.Medium -> 5 + OudsSpaceKeyToken.ColumnGap.Tall -> 6 + OudsSpaceKeyToken.ColumnGap.Taller -> 7 + OudsSpaceKeyToken.ColumnGap.Tallest -> 8 + } + +val OudsSpaceKeyToken.Fixed.order: Int + get() = when (this) { + OudsSpaceKeyToken.Fixed.None -> 0 + OudsSpaceKeyToken.Fixed.Smash -> 1 + OudsSpaceKeyToken.Fixed.Shortest -> 2 + OudsSpaceKeyToken.Fixed.Shorter -> 3 + OudsSpaceKeyToken.Fixed.Short -> 4 + OudsSpaceKeyToken.Fixed.Medium -> 5 + OudsSpaceKeyToken.Fixed.Tall -> 6 + OudsSpaceKeyToken.Fixed.Taller -> 7 + OudsSpaceKeyToken.Fixed.Tallest -> 8 + OudsSpaceKeyToken.Fixed.Spacious -> 9 + OudsSpaceKeyToken.Fixed.Huge -> 10 + OudsSpaceKeyToken.Fixed.Jumbo -> 11 + } + +val OudsSpaceKeyToken.Inset.order: Int + get() = when (this) { + OudsSpaceKeyToken.Inset.None -> 0 + OudsSpaceKeyToken.Inset.Smash -> 1 + OudsSpaceKeyToken.Inset.Shortest -> 2 + OudsSpaceKeyToken.Inset.Shorter -> 3 + OudsSpaceKeyToken.Inset.Short -> 4 + OudsSpaceKeyToken.Inset.Medium -> 5 + OudsSpaceKeyToken.Inset.Tall -> 6 + OudsSpaceKeyToken.Inset.Taller -> 7 + OudsSpaceKeyToken.Inset.Tallest -> 8 + OudsSpaceKeyToken.Inset.Spacious -> 9 + } + +val OudsSpaceKeyToken.PaddingBlock.order: Int + get() = when (this) { + OudsSpaceKeyToken.PaddingBlock.None -> 0 + OudsSpaceKeyToken.PaddingBlock.Smash -> 1 + OudsSpaceKeyToken.PaddingBlock.Shortest -> 2 + OudsSpaceKeyToken.PaddingBlock.Shorter -> 3 + OudsSpaceKeyToken.PaddingBlock.Short -> 4 + OudsSpaceKeyToken.PaddingBlock.Medium -> 5 + OudsSpaceKeyToken.PaddingBlock.Tall -> 6 + OudsSpaceKeyToken.PaddingBlock.Taller -> 7 + OudsSpaceKeyToken.PaddingBlock.Tallest -> 8 + OudsSpaceKeyToken.PaddingBlock.Spacious -> 9 + OudsSpaceKeyToken.PaddingBlock.Huge -> 10 + } + +val OudsSpaceKeyToken.PaddingInline.order: Int + get() = when (this) { + OudsSpaceKeyToken.PaddingInline.None -> 0 + OudsSpaceKeyToken.PaddingInline.Smash -> 1 + OudsSpaceKeyToken.PaddingInline.Shortest -> 2 + OudsSpaceKeyToken.PaddingInline.Shorter -> 3 + OudsSpaceKeyToken.PaddingInline.Short -> 4 + OudsSpaceKeyToken.PaddingInline.Medium -> 5 + OudsSpaceKeyToken.PaddingInline.Tall -> 6 + OudsSpaceKeyToken.PaddingInline.Taller -> 7 + OudsSpaceKeyToken.PaddingInline.Tallest -> 8 + OudsSpaceKeyToken.PaddingInline.Spacious -> 9 + OudsSpaceKeyToken.PaddingInline.Huge -> 10 + } + +val OudsSpaceKeyToken.RowGap.order: Int + get() = when (this) { + OudsSpaceKeyToken.RowGap.None -> 0 + OudsSpaceKeyToken.RowGap.Smash -> 1 + OudsSpaceKeyToken.RowGap.Shortest -> 2 + OudsSpaceKeyToken.RowGap.Shorter -> 3 + OudsSpaceKeyToken.RowGap.Short -> 4 + OudsSpaceKeyToken.RowGap.Medium -> 5 + OudsSpaceKeyToken.RowGap.Tall -> 6 + } + +val OudsSpaceKeyToken.Scaled.order: Int + get() = when (this) { + OudsSpaceKeyToken.Scaled.None -> 0 + OudsSpaceKeyToken.Scaled.Smash -> 1 + OudsSpaceKeyToken.Scaled.Shortest -> 2 + OudsSpaceKeyToken.Scaled.Shorter -> 3 + OudsSpaceKeyToken.Scaled.Short -> 4 + OudsSpaceKeyToken.Scaled.Medium -> 5 + OudsSpaceKeyToken.Scaled.Tall -> 6 + OudsSpaceKeyToken.Scaled.Taller -> 7 + OudsSpaceKeyToken.Scaled.Tallest -> 8 + OudsSpaceKeyToken.Scaled.Spacious -> 9 + } \ No newline at end of file diff --git a/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenPropertyIllustration.kt b/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenPropertyIllustration.kt index 1fbc2236..cbf1100b 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenPropertyIllustration.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/tokens/TokenPropertyIllustration.kt @@ -19,7 +19,6 @@ import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope -import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth @@ -38,8 +37,6 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.graphics.Shape -import androidx.compose.ui.graphics.painter.Painter -import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.TextOverflow @@ -142,7 +139,8 @@ fun SizeIconWithTextIllustrationRow(size: Dp, tokenName: String) { val style = OudsTypographyKeyToken::class.getTokens() .asOrNull>>() ?.firstOrNull { typographyToken -> - tokenName.split(".").firstOrNull() == typographyToken.name.replace("Strong", "").replace(".", "") + val tokenNameTreeValues = tokenName.split('.') + typographyToken.name.replace(".Strong", "") == "${tokenNameTreeValues[0]}.${tokenNameTreeValues[1]}" } ?.value?.invoke() .orElse { LocalTextStyle.current } diff --git a/app/src/main/java/com/orange/ouds/app/ui/utilities/KClassExt.kt b/app/src/main/java/com/orange/ouds/app/ui/utilities/KClassExt.kt index e77f3ea8..fecaf144 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/utilities/KClassExt.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/utilities/KClassExt.kt @@ -13,6 +13,7 @@ package com.orange.ouds.app.ui.utilities import com.orange.ouds.app.ui.tokens.Token +import com.orange.ouds.app.ui.tokens.order import com.orange.ouds.core.theme.value import com.orange.ouds.foundation.extensions.asOrNull import com.orange.ouds.foundation.extensions.orElse @@ -30,7 +31,23 @@ fun KClass<*>.getTokens( recursive: Boolean = true, tokenName: (KClass<*>) -> String = { it.getTokenName(this) } ): List> { - return getNestedObjects(getRootKeyTokenSuperclass(), recursive).map { keyToken -> + return getNestedObjects(getRootKeyTokenSuperclass(), recursive).sortedBy { + when (it) { + is OudsBorderKeyToken.Radius -> it.order + is OudsBorderKeyToken.Width -> it.order + is OudsElevationKeyToken -> it.order + is OudsOpacityKeyToken -> it.order + is OudsSizeKeyToken.Icon -> it.order + is OudsSpaceKeyToken.ColumnGap -> it.order + is OudsSpaceKeyToken.Fixed -> it.order + is OudsSpaceKeyToken.Inset -> it.order + is OudsSpaceKeyToken.PaddingBlock -> it.order + is OudsSpaceKeyToken.PaddingInline -> it.order + is OudsSpaceKeyToken.RowGap -> it.order + is OudsSpaceKeyToken.Scaled -> it.order + else -> 0 + } + }.map { keyToken -> Token( name = tokenName(keyToken::class), value = { diff --git a/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt b/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt index dd7007e9..a0e40ee9 100644 --- a/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt +++ b/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt @@ -40,31 +40,23 @@ fun OudsButton( Button( onClick = onClick, enabled = enabled, - shape = RoundedCornerShape(cornerRadius.value), + shape = RoundedCornerShape(borderRadius.value), modifier = modifier, contentPadding = PaddingValues( - vertical = verticalContentPadding.value, - horizontal = horizontalContentPadding.value + vertical = spacePaddingBlock.value, + horizontal = spacePaddingBlock.value ), interactionSource = remember { MutableInteractionSource() }, - elevation = ButtonDefaults.buttonElevation( - defaultElevation = defaultElevation.value, - pressedElevation = pressedElevation.value, - focusedElevation = focusedElevation.value, - hoveredElevation = hoveredElevation.value, - disabledElevation = disabledElevation.value, - ), colors = ButtonDefaults.buttonColors( - containerColor = containerColor.value, - contentColor = contentColor.value, - disabledContainerColor = disabledContainerColor.value, - disabledContentColor = disabledContentColor.value, + containerColor = colorBgDefaultEnabled.value, + contentColor = colorContentDefaultEnabled.value, + disabledContainerColor = colorBgDefaultDisabled.value, + disabledContentColor = colorContentDefaultDisabled.value, ) ) { Text( modifier = modifier, - text = text, - style = labelStyle.value, + text = text ) } } diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt index acfeab61..054f96c5 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt @@ -69,7 +69,7 @@ fun OudsBorders.fromToken(token: OudsBorderKeyToken.Width): Dp { OudsBorderKeyToken.Width.Thick -> widthThick OudsBorderKeyToken.Width.Thicker -> widthThicker OudsBorderKeyToken.Width.Focus -> widthFocus - OudsBorderKeyToken.Width.Focus.Inset -> widthFocusInset + OudsBorderKeyToken.Width.FocusInset -> widthFocusInset } } diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt index d93810c6..2079587f 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt @@ -35,6 +35,7 @@ data class OudsColorScheme( val decorativeColors: Decorative, val opacityColors: Opacity, val overlayColors: Overlay, + val repositoryColors: Repository, val surfaceColors: Surface, ) { @@ -152,6 +153,60 @@ data class OudsColorScheme( val modal: Color, ) + data class Repository( + val accentDefault: Color, + val accentHighest: Color, + val accentLow: Color, + val accentLowest: Color, + val infoDefault: Color, + val infoHighest: Color, + val infoLow: Color, + val infoLowest: Color, + val negativeDefault: Color, + val negativeHigh: Color, + val negativeHigher: Color, + val negativeHighest: Color, + val negativeLow: Color, + val negativeLower: Color, + val negativeLowest: Color, + val neutralEmphasizedBlack: Color, + val neutralEmphasizedHigh: Color, + val neutralEmphasizedHigher: Color, + val neutralEmphasizedHighest: Color, + val neutralEmphasizedMedium: Color, + val neutralMutedLower: Color, + val neutralMutedLowest: Color, + val neutralMutedWhite: Color, + val opacityBlackHigher: Color, + val opacityBlackHighest: Color, + val opacityBlackLow: Color, + val opacityBlackLower: Color, + val opacityBlackLowest: Color, + val opacityBlackMedium: Color, + val opacityBlackTransparent: Color, + val opacityInfo: Color, + val opacityNegative: Color, + val opacityPositive: Color, + val opacityWarning: Color, + val opacityWhiteHigh: Color, + val opacityWhiteHigher: Color, + val opacityWhiteHighest: Color, + val opacityWhiteLow: Color, + val opacityWhiteLower: Color, + val opacityWhiteLowest: Color, + val opacityWhiteTransparent: Color, + val positiveDefault: Color, + val positiveHighest: Color, + val positiveLow: Color, + val positiveLowest: Color, + val primaryDefault: Color, + val primaryLow: Color, + val warningDefault: Color, + val warningHighest: Color, + val warningLow: Color, + val warningLowest: Color, + ) + data class Surface( val brandPrimary: Color, val statusAccentEmphasized: Color, @@ -294,6 +349,61 @@ val OudsColorSemanticTokens.lightColorScheme: OudsColorScheme modal = overlayModalLight ) }, + repositoryColors = with(repositoryColorTokens) { + OudsColorScheme.Repository( + accentDefault = repositoryAccentDefaultLight, + accentHighest = repositoryAccentHighestLight, + accentLow = repositoryAccentLowLight, + accentLowest = repositoryAccentLowestLight, + infoDefault = repositoryInfoDefaultLight, + infoHighest = repositoryInfoHighestLight, + infoLow = repositoryInfoLowLight, + infoLowest = repositoryInfoLowestLight, + negativeDefault = repositoryNegativeDefaultLight, + negativeHigh = repositoryNegativeHighLight, + negativeHigher = repositoryNegativeHigherLight, + negativeHighest = repositoryNegativeHighestLight, + negativeLow = repositoryNegativeLowLight, + negativeLower = repositoryNegativeLowerLight, + negativeLowest = repositoryNegativeLowestLight, + neutralEmphasizedBlack = repositoryNeutralEmphasizedBlackLight, + neutralEmphasizedHigh = repositoryNeutralEmphasizedHighLight, + neutralEmphasizedHigher = repositoryNeutralEmphasizedHigherLight, + neutralEmphasizedHighest = repositoryNeutralEmphasizedHighestLight, + neutralEmphasizedMedium = repositoryNeutralEmphasizedMediumLight, + neutralMutedLower = repositoryNeutralMutedLowerLight, + neutralMutedLowest = repositoryNeutralMutedLowestLight, + neutralMutedWhite = repositoryNeutralMutedWhiteLight, + opacityBlackHigher = repositoryOpacityBlackHigherLight, + opacityBlackHighest = repositoryOpacityBlackHighestLight, + opacityBlackLow = repositoryOpacityBlackLowLight, + opacityBlackLower = repositoryOpacityBlackLowerLight, + opacityBlackLowest = repositoryOpacityBlackLowestLight, + opacityBlackMedium = repositoryOpacityBlackMediumLight, + opacityBlackTransparent = repositoryOpacityBlackTransparentLight, + opacityInfo = repositoryOpacityInfoLight, + opacityNegative = repositoryOpacityNegativeLight, + opacityPositive = repositoryOpacityPositiveLight, + opacityWarning = repositoryOpacityWarningLight, + opacityWhiteHigh = repositoryOpacityWhiteHighLight, + opacityWhiteHigher = repositoryOpacityWhiteHigherLight, + opacityWhiteHighest = repositoryOpacityWhiteHighestLight, + opacityWhiteLow = repositoryOpacityWhiteLowLight, + opacityWhiteLower = repositoryOpacityWhiteLowerLight, + opacityWhiteLowest = repositoryOpacityWhiteLowestLight, + opacityWhiteTransparent = repositoryOpacityWhiteTransparentLight, + positiveDefault = repositoryPositiveDefaultLight, + positiveHighest = repositoryPositiveHighestLight, + positiveLow = repositoryPositiveLowLight, + positiveLowest = repositoryPositiveLowestLight, + primaryDefault = repositoryPrimaryDefaultLight, + primaryLow = repositoryPrimaryLowLight, + warningDefault = repositoryWarningDefaultLight, + warningHighest = repositoryWarningHighestLight, + warningLow = repositoryWarningLowLight, + warningLowest = repositoryWarningLowestLight, + ) + }, surfaceColors = with(surfaceColorTokens) { OudsColorScheme.Surface( brandPrimary = surfaceBrandPrimaryLight, @@ -437,6 +547,61 @@ val OudsColorSemanticTokens.darkColorScheme: OudsColorScheme modal = overlayModalLight ) }, + repositoryColors = with(repositoryColorTokens) { + OudsColorScheme.Repository( + accentDefault = repositoryAccentDefaultDark, + accentHighest = repositoryAccentHighestDark, + accentLow = repositoryAccentLowDark, + accentLowest = repositoryAccentLowestDark, + infoDefault = repositoryInfoDefaultDark, + infoHighest = repositoryInfoHighestDark, + infoLow = repositoryInfoLowDark, + infoLowest = repositoryInfoLowestDark, + negativeDefault = repositoryNegativeDefaultDark, + negativeHigh = repositoryNegativeHighDark, + negativeHigher = repositoryNegativeHigherDark, + negativeHighest = repositoryNegativeHighestDark, + negativeLow = repositoryNegativeLowDark, + negativeLower = repositoryNegativeLowerDark, + negativeLowest = repositoryNegativeLowestDark, + neutralEmphasizedBlack = repositoryNeutralEmphasizedBlackDark, + neutralEmphasizedHigh = repositoryNeutralEmphasizedHighDark, + neutralEmphasizedHigher = repositoryNeutralEmphasizedHigherDark, + neutralEmphasizedHighest = repositoryNeutralEmphasizedHighestDark, + neutralEmphasizedMedium = repositoryNeutralEmphasizedMediumDark, + neutralMutedLower = repositoryNeutralMutedLowerDark, + neutralMutedLowest = repositoryNeutralMutedLowestDark, + neutralMutedWhite = repositoryNeutralMutedWhiteDark, + opacityBlackHigher = repositoryOpacityBlackHigherDark, + opacityBlackHighest = repositoryOpacityBlackHighestDark, + opacityBlackLow = repositoryOpacityBlackLowDark, + opacityBlackLower = repositoryOpacityBlackLowerDark, + opacityBlackLowest = repositoryOpacityBlackLowestDark, + opacityBlackMedium = repositoryOpacityBlackMediumDark, + opacityBlackTransparent = repositoryOpacityBlackTransparentDark, + opacityInfo = repositoryOpacityInfoDark, + opacityNegative = repositoryOpacityNegativeDark, + opacityPositive = repositoryOpacityPositiveDark, + opacityWarning = repositoryOpacityWarningDark, + opacityWhiteHigh = repositoryOpacityWhiteHighDark, + opacityWhiteHigher = repositoryOpacityWhiteHigherDark, + opacityWhiteHighest = repositoryOpacityWhiteHighestDark, + opacityWhiteLow = repositoryOpacityWhiteLowDark, + opacityWhiteLower = repositoryOpacityWhiteLowerDark, + opacityWhiteLowest = repositoryOpacityWhiteLowestDark, + opacityWhiteTransparent = repositoryOpacityWhiteTransparentDark, + positiveDefault = repositoryPositiveDefaultDark, + positiveHighest = repositoryPositiveHighestDark, + positiveLow = repositoryPositiveLowDark, + positiveLowest = repositoryPositiveLowestDark, + primaryDefault = repositoryPrimaryDefaultDark, + primaryLow = repositoryPrimaryLowDark, + warningDefault = repositoryWarningDefaultDark, + warningHighest = repositoryWarningHighestDark, + warningLow = repositoryWarningLowDark, + warningLowest = repositoryWarningLowestDark, + ) + }, surfaceColors = with(surfaceColorTokens) { OudsColorScheme.Surface( brandPrimary = surfaceBrandPrimaryDark, @@ -511,11 +676,11 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Background): Color { fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Border): Color { return with(borderColors) { when (token) { - OudsColorKeyToken.Border.Brand.Primary -> brandPrimary + OudsColorKeyToken.Border.BrandPrimary -> brandPrimary OudsColorKeyToken.Border.Default -> default OudsColorKeyToken.Border.Emphasized -> emphasized OudsColorKeyToken.Border.Focus -> focus - OudsColorKeyToken.Border.Focus.Inset -> focusInset + OudsColorKeyToken.Border.FocusInset -> focusInset OudsColorKeyToken.Border.OnBrand.Primary -> onBrandPrimary } } @@ -525,7 +690,7 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Border): Color { fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Content): Color { return with(contentColors) { when (token) { - OudsColorKeyToken.Content.Brand.Primary -> brandPrimary + OudsColorKeyToken.Content.BrandPrimary -> brandPrimary OudsColorKeyToken.Content.Default -> default OudsColorKeyToken.Content.Disabled -> disabled OudsColorKeyToken.Content.Muted -> muted @@ -540,7 +705,7 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Content): Color { OudsColorKeyToken.Content.OnBrand.Primary -> onBrandPrimary OudsColorKeyToken.Content.OnOverlay.Emphasized -> onOverlayEmphasized OudsColorKeyToken.Content.OnStatus.Emphasized -> onStatusEmphasized - OudsColorKeyToken.Content.OnStatus.Emphasized.Neutral -> onStatusEmphasizedNeutral + OudsColorKeyToken.Content.OnStatus.EmphasizedNeutral -> onStatusEmphasizedNeutral OudsColorKeyToken.Content.OnStatus.Muted -> onStatusMuted OudsColorKeyToken.Content.Status.Info -> statusInfo OudsColorKeyToken.Content.Status.Negative -> statusNegative @@ -554,21 +719,21 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Content): Color { fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Decorative): Color { return with(decorativeColors) { when (token) { - OudsColorKeyToken.Decorative.Accent.One.Default -> accent1Default - OudsColorKeyToken.Decorative.Accent.One.Emphasized -> accent1Emphasized - OudsColorKeyToken.Decorative.Accent.One.Muted -> accent1Muted - OudsColorKeyToken.Decorative.Accent.Two.Default -> accent2Default - OudsColorKeyToken.Decorative.Accent.Two.Emphasized -> accent2Emphasized - OudsColorKeyToken.Decorative.Accent.Two.Muted -> accent2Muted - OudsColorKeyToken.Decorative.Accent.Three.Default -> accent3Default - OudsColorKeyToken.Decorative.Accent.Three.Emphasized -> accent3Emphasized - OudsColorKeyToken.Decorative.Accent.Three.Muted -> accent3Muted - OudsColorKeyToken.Decorative.Accent.Four.Default -> accent4Default - OudsColorKeyToken.Decorative.Accent.Four.Emphasized -> accent4Emphasized - OudsColorKeyToken.Decorative.Accent.Four.Muted -> accent4Muted - OudsColorKeyToken.Decorative.Accent.Five.Default -> accent5Default - OudsColorKeyToken.Decorative.Accent.Five.Emphasized -> accent5Emphasized - OudsColorKeyToken.Decorative.Accent.Five.Muted -> accent5Muted + OudsColorKeyToken.Decorative.Accent1.Default -> accent1Default + OudsColorKeyToken.Decorative.Accent1.Emphasized -> accent1Emphasized + OudsColorKeyToken.Decorative.Accent1.Muted -> accent1Muted + OudsColorKeyToken.Decorative.Accent2.Default -> accent2Default + OudsColorKeyToken.Decorative.Accent2.Emphasized -> accent2Emphasized + OudsColorKeyToken.Decorative.Accent2.Muted -> accent2Muted + OudsColorKeyToken.Decorative.Accent3.Default -> accent3Default + OudsColorKeyToken.Decorative.Accent3.Emphasized -> accent3Emphasized + OudsColorKeyToken.Decorative.Accent3.Muted -> accent3Muted + OudsColorKeyToken.Decorative.Accent4.Default -> accent4Default + OudsColorKeyToken.Decorative.Accent4.Emphasized -> accent4Emphasized + OudsColorKeyToken.Decorative.Accent4.Muted -> accent4Muted + OudsColorKeyToken.Decorative.Accent5.Default -> accent5Default + OudsColorKeyToken.Decorative.Accent5.Emphasized -> accent5Emphasized + OudsColorKeyToken.Decorative.Accent5.Muted -> accent5Muted OudsColorKeyToken.Decorative.Brand.Primary -> brandPrimary OudsColorKeyToken.Decorative.Brand.Secondary -> brandSecondary OudsColorKeyToken.Decorative.Brand.Tertiary -> brandTertiary @@ -588,6 +753,65 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Decorative): Color { } } +@Stable +fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Repository): Color { + return with(repositoryColors) { + when (token) { + OudsColorKeyToken.Repository.Accent.Default -> accentDefault + OudsColorKeyToken.Repository.Accent.Highest -> accentHighest + OudsColorKeyToken.Repository.Accent.Low -> accentLow + OudsColorKeyToken.Repository.Accent.Lowest -> accentLowest + OudsColorKeyToken.Repository.Info.Default -> infoDefault + OudsColorKeyToken.Repository.Info.Highest -> infoHighest + OudsColorKeyToken.Repository.Info.Low -> infoLow + OudsColorKeyToken.Repository.Info.Lowest -> infoLowest + OudsColorKeyToken.Repository.Negative.Default -> negativeDefault + OudsColorKeyToken.Repository.Negative.High -> negativeHigh + OudsColorKeyToken.Repository.Negative.Higher -> negativeHigher + OudsColorKeyToken.Repository.Negative.Highest -> negativeHighest + OudsColorKeyToken.Repository.Negative.Low -> negativeLow + OudsColorKeyToken.Repository.Negative.Lower -> negativeLower + OudsColorKeyToken.Repository.Negative.Lowest -> negativeLowest + OudsColorKeyToken.Repository.Neutral.Emphasized.Black -> neutralEmphasizedBlack + OudsColorKeyToken.Repository.Neutral.Emphasized.High -> neutralEmphasizedHigh + OudsColorKeyToken.Repository.Neutral.Emphasized.Higher -> neutralEmphasizedHigher + OudsColorKeyToken.Repository.Neutral.Emphasized.Highest -> neutralEmphasizedHighest + OudsColorKeyToken.Repository.Neutral.Emphasized.Medium -> neutralEmphasizedMedium + OudsColorKeyToken.Repository.Neutral.Muted.Lower -> neutralMutedLower + OudsColorKeyToken.Repository.Neutral.Muted.Lowest -> neutralMutedLowest + OudsColorKeyToken.Repository.Neutral.Muted.White -> neutralMutedWhite + OudsColorKeyToken.Repository.Opacity.Black.Higher -> opacityBlackHigher + OudsColorKeyToken.Repository.Opacity.Black.Highest -> opacityBlackHighest + OudsColorKeyToken.Repository.Opacity.Black.Low -> opacityBlackLow + OudsColorKeyToken.Repository.Opacity.Black.Lower -> opacityBlackLower + OudsColorKeyToken.Repository.Opacity.Black.Lowest -> opacityBlackLowest + OudsColorKeyToken.Repository.Opacity.Black.Medium -> opacityBlackMedium + OudsColorKeyToken.Repository.Opacity.Black.Transparent -> opacityBlackTransparent + OudsColorKeyToken.Repository.Opacity.Info -> opacityInfo + OudsColorKeyToken.Repository.Opacity.Negative -> opacityNegative + OudsColorKeyToken.Repository.Opacity.Positive -> opacityPositive + OudsColorKeyToken.Repository.Opacity.Warning -> opacityWarning + OudsColorKeyToken.Repository.Opacity.White.High -> opacityWhiteHigh + OudsColorKeyToken.Repository.Opacity.White.Higher -> opacityWhiteHigher + OudsColorKeyToken.Repository.Opacity.White.Highest -> opacityWhiteHighest + OudsColorKeyToken.Repository.Opacity.White.Low -> opacityWhiteLow + OudsColorKeyToken.Repository.Opacity.White.Lower -> opacityWhiteLower + OudsColorKeyToken.Repository.Opacity.White.Lowest -> opacityWhiteLowest + OudsColorKeyToken.Repository.Opacity.White.Transparent -> opacityWhiteTransparent + OudsColorKeyToken.Repository.Positive.Default -> positiveDefault + OudsColorKeyToken.Repository.Positive.Highest -> positiveHighest + OudsColorKeyToken.Repository.Positive.Low -> positiveLow + OudsColorKeyToken.Repository.Positive.Lowest -> positiveLowest + OudsColorKeyToken.Repository.Primary.Default -> positiveDefault + OudsColorKeyToken.Repository.Primary.Low -> primaryLow + OudsColorKeyToken.Repository.Warning.Default -> warningDefault + OudsColorKeyToken.Repository.Warning.Highest -> warningHighest + OudsColorKeyToken.Repository.Warning.Low -> warningLow + OudsColorKeyToken.Repository.Warning.Lowest -> warningLowest + } + } +} + @Stable fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Surface): Color { return with(surfaceColors) { @@ -612,8 +836,8 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Surface): Color { @Stable fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Opacity): Color { return when (token) { - OudsColorKeyToken.Opacity.InvisibleBlack -> opacityColors.invisibleBlack - OudsColorKeyToken.Opacity.InvisibleWhite -> opacityColors.invisibleWhite + OudsColorKeyToken.Opacity.Invisible.Black -> opacityColors.invisibleBlack + OudsColorKeyToken.Opacity.Invisible.White -> opacityColors.invisibleWhite } } @@ -728,5 +952,6 @@ val OudsColorKeyToken.value: Color is OudsColorKeyToken.Decorative -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Opacity -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Overlay -> OudsTheme.colorScheme.fromToken(this) + is OudsColorKeyToken.Repository -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Surface -> OudsTheme.colorScheme.fromToken(this) } \ No newline at end of file diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt index 8d9a086e..b68045a9 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt @@ -390,119 +390,119 @@ fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.Decorative): Dp { } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeadingExtraLarge, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeading.ExtraLarge, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithHeadingExtraLarge.SizeSmall -> icon.withHeading.extraLarge.sizeSmall - OudsSizeKeyToken.Icon.WithHeadingExtraLarge.SizeMedium -> icon.withHeading.extraLarge.sizeMedium - OudsSizeKeyToken.Icon.WithHeadingExtraLarge.SizeLarge -> icon.withHeading.extraLarge.sizeLarge + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge.SizeSmall -> icon.withHeading.extraLarge.sizeSmall + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge.SizeMedium -> icon.withHeading.extraLarge.sizeMedium + OudsSizeKeyToken.Icon.WithHeading.ExtraLarge.SizeLarge -> icon.withHeading.extraLarge.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeadingLarge, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeading.Large, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithHeadingLarge.SizeSmall -> icon.withHeading.large.sizeSmall - OudsSizeKeyToken.Icon.WithHeadingLarge.SizeMedium -> icon.withHeading.large.sizeMedium - OudsSizeKeyToken.Icon.WithHeadingLarge.SizeLarge -> icon.withHeading.large.sizeLarge + OudsSizeKeyToken.Icon.WithHeading.Large.SizeSmall -> icon.withHeading.large.sizeSmall + OudsSizeKeyToken.Icon.WithHeading.Large.SizeMedium -> icon.withHeading.large.sizeMedium + OudsSizeKeyToken.Icon.WithHeading.Large.SizeLarge -> icon.withHeading.large.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeadingMedium, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeading.Medium, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithHeadingMedium.SizeSmall -> icon.withHeading.medium.sizeSmall - OudsSizeKeyToken.Icon.WithHeadingMedium.SizeMedium -> icon.withHeading.medium.sizeMedium - OudsSizeKeyToken.Icon.WithHeadingMedium.SizeLarge -> icon.withHeading.medium.sizeLarge + OudsSizeKeyToken.Icon.WithHeading.Medium.SizeSmall -> icon.withHeading.medium.sizeSmall + OudsSizeKeyToken.Icon.WithHeading.Medium.SizeMedium -> icon.withHeading.medium.sizeMedium + OudsSizeKeyToken.Icon.WithHeading.Medium.SizeLarge -> icon.withHeading.medium.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeadingSmall, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithHeading.Small, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithHeadingSmall.SizeSmall -> icon.withHeading.small.sizeSmall - OudsSizeKeyToken.Icon.WithHeadingSmall.SizeMedium -> icon.withHeading.small.sizeMedium - OudsSizeKeyToken.Icon.WithHeadingSmall.SizeLarge -> icon.withHeading.small.sizeLarge + OudsSizeKeyToken.Icon.WithHeading.Small.SizeSmall -> icon.withHeading.small.sizeSmall + OudsSizeKeyToken.Icon.WithHeading.Small.SizeMedium -> icon.withHeading.small.sizeMedium + OudsSizeKeyToken.Icon.WithHeading.Small.SizeLarge -> icon.withHeading.small.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithBodyLarge, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithBody.Large, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithBodyLarge.SizeSmall -> icon.withBody.large.sizeSmall - OudsSizeKeyToken.Icon.WithBodyLarge.SizeMedium -> icon.withBody.large.sizeMedium - OudsSizeKeyToken.Icon.WithBodyLarge.SizeLarge -> icon.withBody.large.sizeLarge + OudsSizeKeyToken.Icon.WithBody.Large.SizeSmall -> icon.withBody.large.sizeSmall + OudsSizeKeyToken.Icon.WithBody.Large.SizeMedium -> icon.withBody.large.sizeMedium + OudsSizeKeyToken.Icon.WithBody.Large.SizeLarge -> icon.withBody.large.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithBodyMedium, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithBody.Medium, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithBodyMedium.SizeSmall -> icon.withBody.medium.sizeSmall - OudsSizeKeyToken.Icon.WithBodyMedium.SizeMedium -> icon.withBody.medium.sizeMedium - OudsSizeKeyToken.Icon.WithBodyMedium.SizeLarge -> icon.withBody.medium.sizeLarge + OudsSizeKeyToken.Icon.WithBody.Medium.SizeSmall -> icon.withBody.medium.sizeSmall + OudsSizeKeyToken.Icon.WithBody.Medium.SizeMedium -> icon.withBody.medium.sizeMedium + OudsSizeKeyToken.Icon.WithBody.Medium.SizeLarge -> icon.withBody.medium.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithBodySmall, adaptiveWindowType: OudsAdaptiveWindowType): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithBody.Small, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithBodySmall.SizeSmall -> icon.withBody.small.sizeSmall - OudsSizeKeyToken.Icon.WithBodySmall.SizeMedium -> icon.withBody.small.sizeMedium - OudsSizeKeyToken.Icon.WithBodySmall.SizeLarge -> icon.withBody.small.sizeLarge + OudsSizeKeyToken.Icon.WithBody.Small.SizeSmall -> icon.withBody.small.sizeSmall + OudsSizeKeyToken.Icon.WithBody.Small.SizeMedium -> icon.withBody.small.sizeMedium + OudsSizeKeyToken.Icon.WithBody.Small.SizeLarge -> icon.withBody.small.sizeLarge }.getValue(adaptiveWindowType) } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabelExtraLarge): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.ExtraLarge): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithLabelExtraLarge.SizeSmall -> icon.withLabel.extraLarge.sizeSmall - OudsSizeKeyToken.Icon.WithLabelExtraLarge.SizeMedium -> icon.withLabel.extraLarge.sizeMedium - OudsSizeKeyToken.Icon.WithLabelExtraLarge.SizeLarge -> icon.withLabel.extraLarge.sizeLarge + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge.SizeSmall -> icon.withLabel.extraLarge.sizeSmall + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge.SizeMedium -> icon.withLabel.extraLarge.sizeMedium + OudsSizeKeyToken.Icon.WithLabel.ExtraLarge.SizeLarge -> icon.withLabel.extraLarge.sizeLarge } } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabelLarge): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Large): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithLabelLarge.SizeExtraSmall -> icon.withLabel.large.sizeExtraSmall - OudsSizeKeyToken.Icon.WithLabelLarge.SizeSmall -> icon.withLabel.large.sizeSmall - OudsSizeKeyToken.Icon.WithLabelLarge.SizeMedium -> icon.withLabel.large.sizeMedium - OudsSizeKeyToken.Icon.WithLabelLarge.SizeLarge -> icon.withLabel.large.sizeLarge - OudsSizeKeyToken.Icon.WithLabelLarge.SizeExtraLarge -> icon.withLabel.large.sizeExtraLarge + OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall -> icon.withLabel.large.sizeExtraSmall + OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall -> icon.withLabel.large.sizeSmall + OudsSizeKeyToken.Icon.WithLabel.Large.SizeMedium -> icon.withLabel.large.sizeMedium + OudsSizeKeyToken.Icon.WithLabel.Large.SizeLarge -> icon.withLabel.large.sizeLarge + OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraLarge -> icon.withLabel.large.sizeExtraLarge } } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabelMedium): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Medium): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithLabelMedium.SizeSmall -> icon.withLabel.medium.sizeSmall - OudsSizeKeyToken.Icon.WithLabelMedium.SizeMedium -> icon.withLabel.medium.sizeMedium - OudsSizeKeyToken.Icon.WithLabelMedium.SizeLarge -> icon.withLabel.medium.sizeLarge + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeSmall -> icon.withLabel.medium.sizeSmall + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeMedium -> icon.withLabel.medium.sizeMedium + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeLarge -> icon.withLabel.medium.sizeLarge } } @Stable -fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabelSmall): Dp { +fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Small): Dp { return when (token) { - OudsSizeKeyToken.Icon.WithLabelSmall.SizeSmall -> icon.withLabel.small.sizeSmall - OudsSizeKeyToken.Icon.WithLabelSmall.SizeMedium -> icon.withLabel.small.sizeMedium - OudsSizeKeyToken.Icon.WithLabelSmall.SizeLarge -> icon.withLabel.small.sizeLarge + OudsSizeKeyToken.Icon.WithLabel.Small.SizeSmall -> icon.withLabel.small.sizeSmall + OudsSizeKeyToken.Icon.WithLabel.Small.SizeMedium -> icon.withLabel.small.sizeMedium + OudsSizeKeyToken.Icon.WithLabel.Small.SizeLarge -> icon.withLabel.small.sizeLarge } } @Stable fun OudsSizes.fromToken(token: OudsSizeKeyToken.MaxWidth, adaptiveWindowType: OudsAdaptiveWindowType): Dp { return when (token) { - OudsSizeKeyToken.MaxWidth.Type.DisplaySmall -> maxWidthType.display.small - OudsSizeKeyToken.MaxWidth.Type.DisplayMedium -> maxWidthType.display.medium - OudsSizeKeyToken.MaxWidth.Type.DisplayLarge -> maxWidthType.display.large - OudsSizeKeyToken.MaxWidth.Type.HeadingSmall -> maxWidthType.heading.small - OudsSizeKeyToken.MaxWidth.Type.HeadingMedium -> maxWidthType.heading.medium - OudsSizeKeyToken.MaxWidth.Type.HeadingLarge -> maxWidthType.heading.large - OudsSizeKeyToken.MaxWidth.Type.HeadingExtraLarge -> maxWidthType.heading.extraLarge - OudsSizeKeyToken.MaxWidth.Type.BodySmall -> maxWidthType.body.small - OudsSizeKeyToken.MaxWidth.Type.BodyMedium -> maxWidthType.body.medium - OudsSizeKeyToken.MaxWidth.Type.BodyLarge -> maxWidthType.body.large + OudsSizeKeyToken.MaxWidth.Type.Display.Small -> maxWidthType.display.small + OudsSizeKeyToken.MaxWidth.Type.Display.Medium -> maxWidthType.display.medium + OudsSizeKeyToken.MaxWidth.Type.Display.Large -> maxWidthType.display.large + OudsSizeKeyToken.MaxWidth.Type.Heading.Small -> maxWidthType.heading.small + OudsSizeKeyToken.MaxWidth.Type.Heading.Medium -> maxWidthType.heading.medium + OudsSizeKeyToken.MaxWidth.Type.Heading.Large -> maxWidthType.heading.large + OudsSizeKeyToken.MaxWidth.Type.Heading.ExtraLarge -> maxWidthType.heading.extraLarge + OudsSizeKeyToken.MaxWidth.Type.Body.Small -> maxWidthType.body.small + OudsSizeKeyToken.MaxWidth.Type.Body.Medium -> maxWidthType.body.medium + OudsSizeKeyToken.MaxWidth.Type.Body.Large -> maxWidthType.body.large }.getValue(adaptiveWindowType) } @@ -510,16 +510,16 @@ val OudsSizeKeyToken.value: Dp @Composable get() = when (this) { is OudsSizeKeyToken.Icon.Decorative -> OudsTheme.sizes.fromToken(this) - is OudsSizeKeyToken.Icon.WithHeadingExtraLarge -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithHeadingLarge -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithHeadingMedium -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithHeadingSmall -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithBodyLarge -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithBodyMedium -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithBodySmall -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) - is OudsSizeKeyToken.Icon.WithLabelExtraLarge -> OudsTheme.sizes.fromToken(this) - is OudsSizeKeyToken.Icon.WithLabelLarge -> OudsTheme.sizes.fromToken(this) - is OudsSizeKeyToken.Icon.WithLabelMedium -> OudsTheme.sizes.fromToken(this) - is OudsSizeKeyToken.Icon.WithLabelSmall -> OudsTheme.sizes.fromToken(this) + is OudsSizeKeyToken.Icon.WithHeading.ExtraLarge -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithHeading.Large -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithHeading.Medium -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithHeading.Small -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithBody.Large -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithBody.Medium -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithBody.Small -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) + is OudsSizeKeyToken.Icon.WithLabel.ExtraLarge -> OudsTheme.sizes.fromToken(this) + is OudsSizeKeyToken.Icon.WithLabel.Large -> OudsTheme.sizes.fromToken(this) + is OudsSizeKeyToken.Icon.WithLabel.Medium -> OudsTheme.sizes.fromToken(this) + is OudsSizeKeyToken.Icon.WithLabel.Small -> OudsTheme.sizes.fromToken(this) is OudsSizeKeyToken.MaxWidth -> OudsTheme.sizes.fromToken(this, OudsAdaptiveWindowType.fromWindowWidth(currentWindowWidth())) } diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt index 9abd028a..bc93af30 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt @@ -71,6 +71,7 @@ data class OudsSpaces( val taller: Dp, val tallest: Dp, val huge: Dp, + val spacious: Dp, ) data class PaddingBlock( @@ -201,6 +202,7 @@ fun OudsSpaceSemanticTokens.getSpaces() = OudsSpaces( taller = paddingInlineTaller.dp, tallest = paddingInlineTallest.dp, huge = paddingInlineHuge.dp, + spacious = paddingInlineSpacious.dp, ), paddingBlock = OudsSpaces.PaddingBlock( none = paddingBlockNone.dp, @@ -296,6 +298,7 @@ fun OudsSpaces.fromToken(token: OudsSpaceKeyToken.PaddingInline): Dp { OudsSpaceKeyToken.PaddingInline.Taller -> paddingInline.taller OudsSpaceKeyToken.PaddingInline.Tallest -> paddingInline.tallest OudsSpaceKeyToken.PaddingInline.Huge -> paddingInline.huge + OudsSpaceKeyToken.PaddingInline.Spacious -> paddingInline.spacious } } @@ -313,7 +316,6 @@ fun OudsSpaces.fromToken(token: OudsSpaceKeyToken.PaddingBlock): Dp { OudsSpaceKeyToken.PaddingBlock.Tallest -> paddingBlock.tallest OudsSpaceKeyToken.PaddingBlock.Spacious -> paddingBlock.spacious OudsSpaceKeyToken.PaddingBlock.Huge -> paddingBlock.huge - } } diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[0].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[0].png index 5afd96ce..e67d5993 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[0].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[0].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[1].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[1].png index 8a3580e1..b95b4e28 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[1].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[1].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[0].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[0].png index d4418d7b..e85828dd 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[0].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[0].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[1].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[1].png index df1fadc6..a9d8e936 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[1].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[1].png differ diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt index 46108e2c..63899b9a 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt @@ -1,44 +1,39 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens sealed interface OudsBorderKeyToken { - - sealed interface Width : OudsBorderKeyToken { - data object None : Width - data object Default : Width - data object Thin : Width - data object Medium : Width - data object Thick : Width - data object Thicker : Width - - sealed interface Focus : Width { - companion object : Focus - data object Inset : Focus - } - } - sealed interface Radius : OudsBorderKeyToken { - data object None : Radius data object Default : Radius - data object Short : Radius data object Medium : Radius - data object Tall : Radius + data object None : Radius data object Pill : Radius + data object Short : Radius + data object Tall : Radius } - sealed interface Style : OudsBorderKeyToken { data object Default : Style data object Drag : Style } -} \ No newline at end of file + sealed interface Width : OudsBorderKeyToken { + data object Default : Width + data object Focus : Width + data object FocusInset : Width + data object Medium : Width + data object None : Width + data object Thick : Width + data object Thicker : Width + data object Thin : Width + } +} + diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt index c1d07a57..c51ce22c 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt @@ -1,19 +1,24 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens - sealed interface OudsColorKeyToken { + sealed interface Opacity : OudsColorKeyToken { + sealed interface Invisible : Opacity { + data object Black : Invisible + data object White : Invisible + } + } sealed interface Action : OudsColorKeyToken { data object Disabled : Action @@ -22,7 +27,6 @@ sealed interface OudsColorKeyToken { data object Highlighted : Action data object Hover : Action data object Loading : Action - sealed interface Negative : Action { data object Enabled : Negative data object Focus : Negative @@ -33,7 +37,6 @@ sealed interface OudsColorKeyToken { data object Pressed : Action data object Selected : Action - sealed interface Support : Action { data object Enabled : Support data object Focus : Support @@ -60,32 +63,21 @@ sealed interface OudsColorKeyToken { } sealed interface Border : OudsColorKeyToken { - sealed interface Brand : Border { - data object Primary : Brand - } - + data object BrandPrimary : Border data object Default : Border data object Emphasized : Border - - sealed interface Focus : Border { - companion object : Focus - data object Inset : Focus - } - + data object Focus : Border + data object FocusInset : Border sealed interface OnBrand : Border { data object Primary : OnBrand } } sealed interface Content : OudsColorKeyToken { - sealed interface Brand : Content { - data object Primary : Brand - } - + data object BrandPrimary : Content data object Default : Content data object Disabled : Content data object Muted : Content - sealed interface OnAction : Content { data object Disabled : OnAction data object Enabled : OnAction @@ -106,11 +98,8 @@ sealed interface OudsColorKeyToken { } sealed interface OnStatus : Content { - sealed interface Emphasized : OnStatus { - companion object : Emphasized - data object Neutral : Emphasized - } - + data object Emphasized : OnStatus + data object EmphasizedNeutral : OnStatus data object Muted : OnStatus } @@ -122,38 +111,81 @@ sealed interface OudsColorKeyToken { } } - sealed interface Decorative : OudsColorKeyToken { - sealed interface Accent : Decorative { - sealed interface One : Accent { - data object Default : One - data object Emphasized : One - data object Muted : One + sealed interface Overlay : OudsColorKeyToken { + data object Default : Overlay + data object Drag : Overlay + data object Emphasized : Overlay + data object Modal : Overlay + } + + sealed interface Surface : OudsColorKeyToken { + sealed interface Brand : Surface { + data object Primary : Brand + } + + sealed interface Status : Surface { + sealed interface Accent : Status { + data object Emphasized : Accent + data object Muted : Accent + } + + sealed interface Info : Status { + data object Emphasized : Info + data object Muted : Info } - sealed interface Two : Accent { - data object Default : Two - data object Emphasized : Two - data object Muted : Two + sealed interface Negative : Status { + data object Emphasized : Negative + data object Muted : Negative } - sealed interface Three : Accent { - data object Default : Three - data object Emphasized : Three - data object Muted : Three + sealed interface Neutral : Status { + data object Emphasized : Neutral + data object Muted : Neutral } - sealed interface Four : Accent { - data object Default : Four - data object Emphasized : Four - data object Muted : Four + sealed interface Positive : Status { + data object Emphasized : Positive + data object Muted : Positive } - sealed interface Five : Accent { - data object Default : Five - data object Emphasized : Five - data object Muted : Five + sealed interface Warning : Status { + data object Emphasized : Warning + data object Muted : Warning } } + } + + sealed interface Decorative : OudsColorKeyToken { + sealed interface Accent1 : Decorative { + data object Default : Accent1 + data object Emphasized : Accent1 + data object Muted : Accent1 + } + + sealed interface Accent2 : Decorative { + data object Default : Accent2 + data object Emphasized : Accent2 + data object Muted : Accent2 + } + + sealed interface Accent3 : Decorative { + data object Default : Accent3 + data object Emphasized : Accent3 + data object Muted : Accent3 + } + + sealed interface Accent4 : Decorative { + data object Default : Accent4 + data object Emphasized : Accent4 + data object Muted : Accent4 + } + + sealed interface Accent5 : Decorative { + data object Default : Accent5 + data object Emphasized : Accent5 + data object Muted : Accent5 + } sealed interface Brand : Decorative { data object Primary : Brand @@ -180,54 +212,91 @@ sealed interface OudsColorKeyToken { } } - sealed interface Opacity : OudsColorKeyToken { - data object InvisibleBlack : Opacity - data object InvisibleWhite : Opacity - } + sealed interface Repository : OudsColorKeyToken { + sealed interface Accent : Repository { + data object Default : Accent + data object Highest : Accent + data object Low : Accent + data object Lowest : Accent + } - sealed interface Overlay : OudsColorKeyToken { - data object Default : Overlay - data object Drag : Overlay - data object Emphasized : Overlay - data object Modal : Overlay - } + sealed interface Info : Repository { + data object Default : Info + data object Highest : Info + data object Low : Info + data object Lowest : Info + } - sealed interface Surface : OudsColorKeyToken { - sealed interface Brand : Surface { - data object Primary : Brand + sealed interface Negative : Repository { + data object Default : Negative + data object High : Negative + data object Higher : Negative + data object Highest : Negative + data object Low : Negative + data object Lower : Negative + data object Lowest : Negative } - sealed interface Status : Surface { - sealed interface Accent : Status { - data object Emphasized : Accent - data object Muted : Accent + sealed interface Neutral : Repository { + sealed interface Emphasized : Neutral { + data object Black : Emphasized + data object High : Emphasized + data object Higher : Emphasized + data object Highest : Emphasized + data object Medium : Emphasized } - sealed interface Info : Status { - data object Emphasized : Info - data object Muted : Info + sealed interface Muted : Neutral { + data object Lower : Muted + data object Lowest : Muted + data object White : Muted } + } - sealed interface Negative : Status { - data object Emphasized : Negative - data object Muted : Negative + sealed interface Opacity : Repository { + sealed interface Black : Opacity { + data object Higher : Black + data object Highest : Black + data object Low : Black + data object Lower : Black + data object Lowest : Black + data object Medium : Black + data object Transparent : Black } - sealed interface Neutral : Status { - data object Emphasized : Neutral - data object Muted : Neutral + data object Info : Opacity + data object Negative : Opacity + data object Positive : Opacity + data object Warning : Opacity + sealed interface White : Opacity { + data object High : White + data object Higher : White + data object Highest : White + data object Low : White + data object Lower : White + data object Lowest : White + data object Transparent : White } + } - sealed interface Positive : Status { - data object Emphasized : Positive - data object Muted : Positive - } + sealed interface Positive : Repository { + data object Default : Positive + data object Highest : Positive + data object Low : Positive + data object Lowest : Positive + } - sealed interface Warning : Status { - data object Emphasized : Warning - data object Muted : Warning - } + sealed interface Primary : Repository { + data object Default : Primary + data object Low : Primary } - } + sealed interface Warning : Repository { + data object Default : Warning + data object Highest : Warning + data object Low : Warning + data object Lowest : Warning + } + } } + diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt index 4e9f0a90..d499d06d 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt @@ -1,21 +1,21 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens sealed interface OudsGridKeyToken { - - data object MinWidth : OudsGridKeyToken - data object MaxWidth : OudsGridKeyToken data object ColumnGap : OudsGridKeyToken data object Margin : OudsGridKeyToken -} \ No newline at end of file + data object MaxWidth : OudsGridKeyToken + data object MinWidth : OudsGridKeyToken +} + diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt index 7346c7a8..ef158204 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt @@ -1,23 +1,23 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens sealed interface OudsOpacityKeyToken { - data object Invisible : OudsOpacityKeyToken - data object Weaker : OudsOpacityKeyToken - data object Weak : OudsOpacityKeyToken data object Medium : OudsOpacityKeyToken - data object Strong : OudsOpacityKeyToken data object Opaque : OudsOpacityKeyToken -} \ No newline at end of file + data object Strong : OudsOpacityKeyToken + data object Weak : OudsOpacityKeyToken + data object Weaker : OudsOpacityKeyToken +} + diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt index 49db4dbf..726045e7 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt @@ -1,111 +1,111 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens sealed interface OudsSizeKeyToken { - sealed interface Icon : OudsSizeKeyToken { sealed interface Decorative : Icon { + data object ExtraExtraLarge : Decorative data object ExtraExtraSmall : Decorative - data object ExtraSmall : Decorative - data object Small : Decorative - data object Medium : Decorative data object Large : Decorative + data object Medium : Decorative + data object Small : Decorative data object ExtraLarge : Decorative - data object ExtraExtraLarge : Decorative - } - - sealed interface WithHeadingExtraLarge : Icon { - data object SizeSmall : WithHeadingExtraLarge - data object SizeMedium : WithHeadingExtraLarge - data object SizeLarge : WithHeadingExtraLarge - } - - sealed interface WithHeadingLarge : Icon { - data object SizeSmall : WithHeadingLarge - data object SizeMedium : WithHeadingLarge - data object SizeLarge : WithHeadingLarge - } - - sealed interface WithHeadingMedium : Icon { - data object SizeSmall : WithHeadingMedium - data object SizeMedium : WithHeadingMedium - data object SizeLarge : WithHeadingMedium - } - - sealed interface WithHeadingSmall : Icon { - data object SizeSmall : WithHeadingSmall - data object SizeMedium : WithHeadingSmall - data object SizeLarge : WithHeadingSmall - } - - sealed interface WithBodyLarge : Icon { - data object SizeSmall : WithBodyLarge - data object SizeMedium : WithBodyLarge - data object SizeLarge : WithBodyLarge - } - - sealed interface WithBodyMedium : Icon { - data object SizeSmall : WithBodyMedium - data object SizeMedium : WithBodyMedium - data object SizeLarge : WithBodyMedium - } - - sealed interface WithBodySmall : Icon { - data object SizeSmall : WithBodySmall - data object SizeMedium : WithBodySmall - data object SizeLarge : WithBodySmall - } - - sealed interface WithLabelExtraLarge : Icon { - data object SizeSmall : WithLabelExtraLarge - data object SizeMedium : WithLabelExtraLarge - data object SizeLarge : WithLabelExtraLarge + data object ExtraSmall : Decorative } - - sealed interface WithLabelLarge : Icon { - data object SizeExtraSmall : WithLabelLarge - data object SizeSmall : WithLabelLarge - data object SizeMedium : WithLabelLarge - data object SizeLarge : WithLabelLarge - data object SizeExtraLarge : WithLabelLarge + sealed interface WithBody : Icon { + sealed interface Large : WithBody { + data object SizeLarge : Large + data object SizeMedium : Large + data object SizeSmall : Large + } + sealed interface Medium : WithBody { + data object SizeLarge : Medium + data object SizeMedium : Medium + data object SizeSmall : Medium + } + sealed interface Small : WithBody { + data object SizeLarge : Small + data object SizeMedium : Small + data object SizeSmall : Small + } } - - sealed interface WithLabelMedium : Icon { - data object SizeSmall : WithLabelMedium - data object SizeMedium : WithLabelMedium - data object SizeLarge : WithLabelMedium + sealed interface WithHeading : Icon { + sealed interface Large : WithHeading { + data object SizeLarge : Large + data object SizeMedium : Large + data object SizeSmall : Large + } + sealed interface Medium : WithHeading { + data object SizeLarge : Medium + data object SizeMedium : Medium + data object SizeSmall : Medium + } + sealed interface Small : WithHeading { + data object SizeLarge : Small + data object SizeMedium : Small + data object SizeSmall : Small + } + sealed interface ExtraLarge : WithHeading { + data object SizeLarge : ExtraLarge + data object SizeMedium : ExtraLarge + data object SizeSmall : ExtraLarge + } } - - sealed interface WithLabelSmall : Icon { - data object SizeSmall : WithLabelSmall - data object SizeMedium : WithLabelSmall - data object SizeLarge : WithLabelSmall + sealed interface WithLabel : Icon { + sealed interface Large : WithLabel { + data object SizeLarge : Large + data object SizeMedium : Large + data object SizeSmall : Large + data object SizeExtraLarge : Large + data object SizeExtraSmall : Large + } + sealed interface Medium : WithLabel { + data object SizeLarge : Medium + data object SizeMedium : Medium + data object SizeSmall : Medium + } + sealed interface Small : WithLabel { + data object SizeLarge : Small + data object SizeMedium : Small + data object SizeSmall : Small + } + sealed interface ExtraLarge : WithLabel { + data object SizeLarge : ExtraLarge + data object SizeMedium : ExtraLarge + data object SizeSmall : ExtraLarge + } } } - sealed interface MaxWidth : OudsSizeKeyToken { sealed interface Type : MaxWidth { - data object DisplaySmall : Type - data object DisplayMedium : Type - data object DisplayLarge : Type - data object HeadingSmall : Type - data object HeadingMedium : Type - data object HeadingLarge : Type - data object HeadingExtraLarge : Type - data object BodySmall : Type - data object BodyMedium : Type - data object BodyLarge : Type + sealed interface Body : Type { + data object Large : Body + data object Medium : Body + data object Small : Body + } + sealed interface Display : Type { + data object Large : Display + data object Medium : Display + data object Small : Display + } + sealed interface Heading : Type { + data object Large : Heading + data object Medium : Heading + data object Small : Heading + data object ExtraLarge : Heading + } } } -} \ No newline at end of file +} + diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt index b81af1c9..3e956455 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt @@ -1,106 +1,101 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens sealed interface OudsSpaceKeyToken { - + sealed interface ColumnGap : OudsSpaceKeyToken { + data object Medium : ColumnGap + data object None : ColumnGap + data object Short : ColumnGap + data object Shorter : ColumnGap + data object Shortest : ColumnGap + data object Smash : ColumnGap + data object Tall : ColumnGap + data object Taller : ColumnGap + data object Tallest : ColumnGap + } sealed interface Fixed : OudsSpaceKeyToken { + data object Huge : Fixed + data object Jumbo : Fixed + data object Medium : Fixed data object None : Fixed - data object Smash : Fixed - data object Shortest : Fixed - data object Shorter : Fixed data object Short : Fixed - data object Medium : Fixed + data object Shorter : Fixed + data object Shortest : Fixed + data object Smash : Fixed + data object Spacious : Fixed data object Tall : Fixed data object Taller : Fixed data object Tallest : Fixed - data object Spacious : Fixed - data object Huge : Fixed - data object Jumbo : Fixed - } - - sealed interface Scaled : OudsSpaceKeyToken { - data object None : Scaled - data object Smash : Scaled - data object Shortest : Scaled - data object Shorter : Scaled - data object Short : Scaled - data object Medium : Scaled - data object Tall : Scaled - data object Taller : Scaled - data object Tallest : Scaled - data object Spacious : Scaled } - - sealed interface PaddingInline : OudsSpaceKeyToken { - data object None : PaddingInline - data object Smash : PaddingInline - data object Shortest : PaddingInline - data object Shorter : PaddingInline - data object Short : PaddingInline - data object Medium : PaddingInline - data object Tall : PaddingInline - data object Taller : PaddingInline - data object Tallest : PaddingInline - data object Huge : PaddingInline + sealed interface Inset : OudsSpaceKeyToken { + data object Medium : Inset + data object None : Inset + data object Short : Inset + data object Shorter : Inset + data object Shortest : Inset + data object Smash : Inset + data object Spacious : Inset + data object Tall : Inset + data object Taller : Inset + data object Tallest : Inset } - sealed interface PaddingBlock : OudsSpaceKeyToken { + data object Huge : PaddingBlock + data object Medium : PaddingBlock data object None : PaddingBlock - data object Smash : PaddingBlock - data object Shortest : PaddingBlock - data object Shorter : PaddingBlock data object Short : PaddingBlock - data object Medium : PaddingBlock + data object Shorter : PaddingBlock + data object Shortest : PaddingBlock + data object Smash : PaddingBlock + data object Spacious : PaddingBlock data object Tall : PaddingBlock data object Taller : PaddingBlock data object Tallest : PaddingBlock - data object Spacious : PaddingBlock - data object Huge : PaddingBlock } - - sealed interface Inset : OudsSpaceKeyToken { - data object None : Inset - data object Smash : Inset - data object Shortest : Inset - data object Shorter : Inset - data object Short : Inset - data object Medium : Inset - data object Tall : Inset - data object Taller : Inset - data object Tallest : Inset - data object Spacious : Inset - } - - sealed interface ColumnGap : OudsSpaceKeyToken { - data object None : ColumnGap - data object Smash : ColumnGap - data object Shortest : ColumnGap - data object Shorter : ColumnGap - data object Short : ColumnGap - data object Medium : ColumnGap - data object Tall : ColumnGap - data object Taller : ColumnGap - data object Tallest : ColumnGap + sealed interface PaddingInline : OudsSpaceKeyToken { + data object Huge : PaddingInline + data object Medium : PaddingInline + data object None : PaddingInline + data object Short : PaddingInline + data object Shorter : PaddingInline + data object Shortest : PaddingInline + data object Smash : PaddingInline + data object Spacious : PaddingInline + data object Tall : PaddingInline + data object Taller : PaddingInline + data object Tallest : PaddingInline } - sealed interface RowGap : OudsSpaceKeyToken { + data object Medium : RowGap data object None : RowGap - data object Smash : RowGap - data object Shortest : RowGap - data object Shorter : RowGap data object Short : RowGap - data object Medium : RowGap + data object Shorter : RowGap + data object Shortest : RowGap + data object Smash : RowGap data object Tall : RowGap } -} \ No newline at end of file + sealed interface Scaled : OudsSpaceKeyToken { + data object Medium : Scaled + data object None : Scaled + data object Short : Scaled + data object Shorter : Scaled + data object Shortest : Scaled + data object Smash : Scaled + data object Spacious : Scaled + data object Tall : Scaled + data object Taller : Scaled + data object Tallest : Scaled + } +} + diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsButtonTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsButtonTokens.kt index de1c247c..8807c5f6 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsButtonTokens.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsButtonTokens.kt @@ -1,35 +1,139 @@ -/* - * Software Name: OUDS Android - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Android library of reusable graphical components - */ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// package com.orange.ouds.theme.tokens.components import com.orange.ouds.theme.tokens.OudsBorderKeyToken import com.orange.ouds.theme.tokens.OudsColorKeyToken -import com.orange.ouds.theme.tokens.OudsElevationKeyToken +import com.orange.ouds.theme.tokens.OudsSizeKeyToken import com.orange.ouds.theme.tokens.OudsSpaceKeyToken -import com.orange.ouds.theme.tokens.OudsTypographyKeyToken +import com.orange.ouds.tokens.global.raw.DimensionRawTokens open class OudsButtonTokens( - val containerColor: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, - val contentColor: OudsColorKeyToken = OudsColorKeyToken.Content.OnAction.Enabled, - val disabledContainerColor: OudsColorKeyToken = OudsColorKeyToken.Action.Disabled, - val disabledContentColor: OudsColorKeyToken = OudsColorKeyToken.Content.OnAction.Disabled, - val cornerRadius: OudsBorderKeyToken.Radius = OudsBorderKeyToken.Radius.None, - val defaultElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, - val pressedElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, - val focusedElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, - val hoveredElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, - val disabledElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, - val labelStyle: OudsTypographyKeyToken = OudsTypographyKeyToken.Body.Strong.Large, - val verticalContentPadding: OudsSpaceKeyToken.Fixed = OudsSpaceKeyToken.Fixed.Smash, - val horizontalContentPadding: OudsSpaceKeyToken.Fixed = OudsSpaceKeyToken.Fixed.Tall -) \ No newline at end of file + val borderRadius: OudsBorderKeyToken.Radius = OudsBorderKeyToken.Radius.None, + val borderWidthDefault: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.Default, + val borderWidthDefaultInteraction: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.Medium, + val borderWidthMinimal: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.None, + val borderWidthMinimalInteraction: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.None, + val colorBgDefaultDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultFocus: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val colorBgDefaultHover: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val colorBgDefaultLoading: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.Higher, + val colorBgDefaultPressed: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgDefaultPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.Higher, + val colorBgMinimalDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgMinimalDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgMinimalEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgMinimalEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgMinimalFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Focus, + val colorBgMinimalFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val colorBgMinimalHover: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Hover, + val colorBgMinimalHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val colorBgMinimalLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Loading, + val colorBgMinimalLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.Higher, + val colorBgMinimalPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Pressed, + val colorBgMinimalPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.Higher, + val colorBgStrongDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Medium, + val colorBgStrongEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorBgStrongFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val colorBgStrongHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val colorBgStrongLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.Higher, + val colorBgStrongPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.Higher, + val colorBorderDefaultDisabled: OudsColorKeyToken = OudsColorKeyToken.Action.Disabled, + val colorBorderDefaultDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderDefaultEnabled: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, + val colorBorderDefaultEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorBorderDefaultFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Focus, + val colorBorderDefaultFocusMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderDefaultHover: OudsColorKeyToken = OudsColorKeyToken.Action.Hover, + val colorBorderDefaultHoverMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderDefaultLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Loading, + val colorBorderDefaultLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderDefaultPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Pressed, + val colorBorderDefaultPressedMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalFocus: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalFocusMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalHover: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalHoverMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalLoading: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalPressed: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderMinimalPressedMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderStrongDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderStrongEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderStrongFocusMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderStrongHoverMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderStrongLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderStrongPressedMono: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorContentDefaultDisabled: OudsColorKeyToken = OudsColorKeyToken.Action.Disabled, + val colorContentDefaultDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Medium, + val colorContentDefaultEnabled: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, + val colorContentDefaultEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentDefaultFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Focus, + val colorContentDefaultFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentDefaultHover: OudsColorKeyToken = OudsColorKeyToken.Action.Hover, + val colorContentDefaultHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentDefaultLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Loading, + val colorContentDefaultLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentDefaultPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Pressed, + val colorContentDefaultPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentMinimalDisabled: OudsColorKeyToken = OudsColorKeyToken.Action.Disabled, + val colorContentMinimalDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Medium, + val colorContentMinimalEnabled: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, + val colorContentMinimalEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentMinimalFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Focus, + val colorContentMinimalFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentMinimalHover: OudsColorKeyToken = OudsColorKeyToken.Action.Hover, + val colorContentMinimalHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentMinimalLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Loading, + val colorContentMinimalLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentMinimalPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Pressed, + val colorContentMinimalPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentStrongDisabled: OudsColorKeyToken = OudsColorKeyToken.Action.Disabled, + val colorContentStrongDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.White.High, + val colorContentStrongEnabled: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, + val colorContentStrongEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentStrongFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Focus, + val colorContentStrongFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentStrongHover: OudsColorKeyToken = OudsColorKeyToken.Action.Hover, + val colorContentStrongHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Muted.White, + val colorContentStrongLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Loading, + val colorContentStrongLoadingMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentStrongPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Pressed, + val colorContentStrongPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val sizeIcon: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeIconOnly: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall, + val sizeLoader: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeMaxHeight: Float = DimensionRawTokens.dimension600, + val sizeMinHeight: Float = DimensionRawTokens.dimension600, + val sizeMinWidth: Float = DimensionRawTokens.dimension600, + val spaceColumnGapArrow: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Shorter, + val spaceColumnGapIcon: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Short, + val spaceInsetIconAlone: OudsSpaceKeyToken.Inset = OudsSpaceKeyToken.Inset.Medium, + val spacePaddingBlock: OudsSpaceKeyToken.PaddingBlock = OudsSpaceKeyToken.PaddingBlock.Medium, + val spacePaddingInlineArrowEnd: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Tall, + val spacePaddingInlineArrowStart: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Tall, + val spacePaddingInlineEndIconStart: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Spacious, + val spacePaddingInlineIconNone: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Huge, + val spacePaddingInlineIconStart: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Taller, + val spacePaddingInlineStartIconEnd: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Spacious +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsCheckboxTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsCheckboxTokens.kt new file mode 100644 index 00000000..7ead54ff --- /dev/null +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsCheckboxTokens.kt @@ -0,0 +1,64 @@ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// + +package com.orange.ouds.theme.tokens.components + +import com.orange.ouds.theme.tokens.OudsBorderKeyToken +import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsSizeKeyToken +import com.orange.ouds.theme.tokens.OudsSpaceKeyToken +import com.orange.ouds.tokens.global.raw.DimensionRawTokens + +open class OudsCheckboxTokens( + val borderRadius: OudsBorderKeyToken.Radius = OudsBorderKeyToken.Radius.None, + val borderWidth: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.None, + val colorBgDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Focus, + val colorBgHover: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Hover, + val colorBgLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Loading, + val colorBgPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Pressed, + val colorBorderDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderHover: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderLoading: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderPressed: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorContentContentDisabled: OudsColorKeyToken = OudsColorKeyToken.Content.Disabled, + val colorContentContentEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentFocus: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentHover: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentLoading: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentPressed: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentHelperTextDisabled: OudsColorKeyToken = OudsColorKeyToken.Content.Disabled, + val colorContentHelperTextEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextFocus: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextHover: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextLoading: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextPressed: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentDisabled: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Transparent, + val colorContentEnabled: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Transparent, + val colorContentFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Focus, + val colorContentHover: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Hover, + val colorContentLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Loading, + val colorContentPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Pressed, + val sizeCheckBox: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall, + val sizeIcon: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeLoader: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeMaxHeightContainerIcon: Float = DimensionRawTokens.dimension600, + val sizeMinHeight: Float = DimensionRawTokens.dimension600, + val sizeMinHeightIconOnly: Float = DimensionRawTokens.dimension600, + val sizeMinWidth: Float = DimensionRawTokens.dimension600, + val sizeMinWidthIconOnly: Float = DimensionRawTokens.dimension600, + val spaceColumnGap: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Tall, + val spacePaddingInset: OudsSpaceKeyToken.Inset = OudsSpaceKeyToken.Inset.Medium, + val spaceRowGap: OudsSpaceKeyToken.RowGap = OudsSpaceKeyToken.RowGap.None +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsInputTextTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsInputTextTokens.kt new file mode 100644 index 00000000..27943629 --- /dev/null +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsInputTextTokens.kt @@ -0,0 +1,60 @@ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// + +package com.orange.ouds.theme.tokens.components + +import com.orange.ouds.theme.tokens.OudsBorderKeyToken +import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsSizeKeyToken +import com.orange.ouds.theme.tokens.OudsSpaceKeyToken +import com.orange.ouds.tokens.global.raw.DimensionRawTokens + +open class OudsInputTextTokens( + val borderRadius: OudsBorderKeyToken.Radius = OudsBorderKeyToken.Radius.None, + val borderWidthDefault: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.Default, + val borderWidthDefaultInteraction: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.Medium, + val colorBgDefaultDisabled: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Enabled, + val colorBgDefaultEnabled: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Enabled, + val colorBgDefaultFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Focus, + val colorBgDefaultHover: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Hover, + val colorBgDefaultLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Loading, + val colorBgDefaultPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Pressed, + val colorBorderDefaultDisabled: OudsColorKeyToken = OudsColorKeyToken.Action.Disabled, + val colorBorderDefaultLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Loading, + val colorBorderDefaultPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Pressed, + val colorBorderDefaultEnabled: OudsColorKeyToken = OudsColorKeyToken.Border.Default, + val colorBorderDefaultHover: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, + val colorContentDefaultDisabled: OudsColorKeyToken = OudsColorKeyToken.Content.Disabled, + val colorContentDefaultEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentDefaultFocus: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentDefaultHover: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentDefaultHover2: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentDefaultLoading: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentDefaultPressed: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val sizeIcon: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeLoader: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeMaxHeight: Float = DimensionRawTokens.dimension600, + val sizeMinHeight: Float = DimensionRawTokens.dimension600, + val sizeMinWidth: Float = DimensionRawTokens.dimension600, + val sizePrefixTextHeight: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall, + val sizeSuffixTextHeight: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall, + val spaceColumnGapArrow: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Shorter, + val spaceColumnGapIcon: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Short, + val spaceInsetIconAlone: OudsSpaceKeyToken.Inset = OudsSpaceKeyToken.Inset.Medium, + val spacePaddingBlock: OudsSpaceKeyToken.PaddingBlock = OudsSpaceKeyToken.PaddingBlock.Medium, + val spacePaddingInlineArrowEnd: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Tall, + val spacePaddingInlineArrowStart: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Tall, + val spacePaddingInlineEndIconStart: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Spacious, + val spacePaddingInlineIconNone: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Huge, + val spacePaddingInlineIconStart: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Taller, + val spacePaddingInlineStartIconEnd: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.Spacious +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsLinkTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsLinkTokens.kt new file mode 100644 index 00000000..4f502478 --- /dev/null +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsLinkTokens.kt @@ -0,0 +1,46 @@ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// + +package com.orange.ouds.theme.tokens.components + +import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsSizeKeyToken +import com.orange.ouds.theme.tokens.OudsSpaceKeyToken +import com.orange.ouds.tokens.global.raw.DimensionRawTokens + +open class OudsLinkTokens( + val colorArrowEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.BrandPrimary, + val colorArrowFocus: OudsColorKeyToken = OudsColorKeyToken.Content.BrandPrimary, + val colorArrowHover: OudsColorKeyToken = OudsColorKeyToken.Content.BrandPrimary, + val colorArrowPressed: OudsColorKeyToken = OudsColorKeyToken.Content.BrandPrimary, + val colorContentDisabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Medium, + val colorContentEnabled: OudsColorKeyToken = OudsColorKeyToken.Action.Enabled, + val colorContentEnabledMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Focus, + val colorContentFocusMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentHover: OudsColorKeyToken = OudsColorKeyToken.Action.Hover, + val colorContentHoverMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Neutral.Emphasized.Black, + val colorContentPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Pressed, + val colorContentPressedMono: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Higher, + val sizeIconMedium: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeIconSmall: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Medium.SizeSmall, + val sizeMinHeightMedium: Float = DimensionRawTokens.dimension600, + val sizeMinHeightSmall: Float = DimensionRawTokens.dimension550, + val sizeMinWidthMedium: Float = DimensionRawTokens.dimension600, + val sizeMinWidthSmall: Float = DimensionRawTokens.dimension550, + val spaceColumnGapArrowMedium: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Shorter, + val spaceColumnGapArrowSmall: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Shortest, + val spaceColumnGapIconMedium: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Short, + val spaceColumnGapIconSmall: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Shorter, + val spacePaddingBlock: OudsSpaceKeyToken.PaddingBlock = OudsSpaceKeyToken.PaddingBlock.Medium, + val spacePaddingInline: OudsSpaceKeyToken.PaddingInline = OudsSpaceKeyToken.PaddingInline.None +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsRadioButtonTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsRadioButtonTokens.kt new file mode 100644 index 00000000..6e5d3d4d --- /dev/null +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsRadioButtonTokens.kt @@ -0,0 +1,65 @@ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// + +package com.orange.ouds.theme.tokens.components + +import com.orange.ouds.theme.tokens.OudsBorderKeyToken +import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsSizeKeyToken +import com.orange.ouds.theme.tokens.OudsSpaceKeyToken +import com.orange.ouds.tokens.global.raw.DimensionRawTokens + +open class OudsRadioButtonTokens( + val borderRadius: OudsBorderKeyToken.Radius = OudsBorderKeyToken.Radius.None, + val borderWidth: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.None, + val borderWidthHighlight: OudsBorderKeyToken.Width = OudsBorderKeyToken.Width.Default, + val colorBgDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBgFocus: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Focus, + val colorBgHover: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Hover, + val colorBgLoading: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Loading, + val colorBgPressed: OudsColorKeyToken = OudsColorKeyToken.Action.Support.Pressed, + val colorBorderDisabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderEnabled: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderHover: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderLoading: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorBorderPressed: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black, + val colorContentContentDisabled: OudsColorKeyToken = OudsColorKeyToken.Content.Disabled, + val colorContentContentEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentFocus: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentHover: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentLoading: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentContentPressed: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentHelperTextDisabled: OudsColorKeyToken = OudsColorKeyToken.Content.Disabled, + val colorContentHelperTextEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextFocus: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextHover: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextLoading: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentHelperTextPressed: OudsColorKeyToken = OudsColorKeyToken.Content.Muted, + val colorContentPriceDisabled: OudsColorKeyToken = OudsColorKeyToken.Content.Disabled, + val colorContentPriceEnabled: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentPriceFocus: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentPriceHover: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentPriceLoading: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val colorContentPricePressed: OudsColorKeyToken = OudsColorKeyToken.Content.Default, + val sizeCheckBox: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall, + val sizeIcon: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeLoader: OudsSizeKeyToken.Icon = OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall, + val sizeMaxHeightContainerIcon: Float = DimensionRawTokens.dimension600, + val sizeMinHeight: Float = DimensionRawTokens.dimension600, + val sizeMinHeightIconOnly: Float = DimensionRawTokens.dimension600, + val sizeMinWidth: Float = DimensionRawTokens.dimension600, + val sizeMinWidthIconOnly: Float = DimensionRawTokens.dimension600, + val spaceColumnGap: OudsSpaceKeyToken.ColumnGap = OudsSpaceKeyToken.ColumnGap.Tall, + val spacePaddingInset: OudsSpaceKeyToken.Inset = OudsSpaceKeyToken.Inset.Medium, + val spaceRowGap: OudsSpaceKeyToken.RowGap = OudsSpaceKeyToken.RowGap.None +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsSkeletonTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsSkeletonTokens.kt new file mode 100644 index 00000000..74a25bc4 --- /dev/null +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/components/OudsSkeletonTokens.kt @@ -0,0 +1,21 @@ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// + +package com.orange.ouds.theme.tokens.components + +import com.orange.ouds.theme.tokens.OudsColorKeyToken + +open class OudsSkeletonTokens( + val colorBg: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Lowest, + val colorGradientMiddle: OudsColorKeyToken = OudsColorKeyToken.Repository.Opacity.Black.Lower, + val colorGradientStartEnd: OudsColorKeyToken = OudsColorKeyToken.Opacity.Invisible.Black +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorRepositorySemanticTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorRepositorySemanticTokens.kt new file mode 100644 index 00000000..72ba42c2 --- /dev/null +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorRepositorySemanticTokens.kt @@ -0,0 +1,122 @@ +// +// Software Name: OUDS Android +// SPDX-FileCopyrightText: Copyright (c) Orange SA +// SPDX-License-Identifier: MIT +// +// This software is distributed under the MIT license, +// the text of which is available at https://opensource.org/license/MIT/ +// or see the "LICENSE" file for more details. +// +// Software description: Android library of reusable graphical components +// + +package com.orange.ouds.theme.tokens.semantic + +import androidx.compose.ui.graphics.Color +import com.orange.ouds.tokens.global.raw.ColorRawTokens +import com.orange.ouds.tokens.global.raw.OrangeBrandColorRawTokens + +data class OudsColorRepositorySemanticTokens( + val repositoryAccentDefaultLight: Color = ColorRawTokens.colorFunctionalSun500, + val repositoryAccentHighestLight: Color = OrangeBrandColorRawTokens.colorWarmGray900, + val repositoryAccentLowLight: Color = ColorRawTokens.colorFunctionalSun300, + val repositoryAccentLowestLight: Color = OrangeBrandColorRawTokens.colorWarmGray100, + val repositoryAccentDefaultDark: Color = ColorRawTokens.colorFunctionalSun500, + val repositoryAccentHighestDark: Color = OrangeBrandColorRawTokens.colorWarmGray900, + val repositoryAccentLowDark: Color = ColorRawTokens.colorFunctionalSun300, + val repositoryAccentLowestDark: Color = OrangeBrandColorRawTokens.colorWarmGray100, + val repositoryInfoDefaultLight: Color = ColorRawTokens.colorFunctionalDodgerBlue500, + val repositoryInfoHighestLight: Color = ColorRawTokens.colorFunctionalDodgerBlue900, + val repositoryInfoLowLight: Color = ColorRawTokens.colorFunctionalDodgerBlue300, + val repositoryInfoLowestLight: Color = ColorRawTokens.colorFunctionalDodgerBlue100, + val repositoryInfoDefaultDark: Color = ColorRawTokens.colorFunctionalDodgerBlue500, + val repositoryInfoHighestDark: Color = ColorRawTokens.colorFunctionalDodgerBlue900, + val repositoryInfoLowDark: Color = ColorRawTokens.colorFunctionalDodgerBlue300, + val repositoryInfoLowestDark: Color = ColorRawTokens.colorFunctionalDodgerBlue100, + val repositoryNegativeDefaultLight: Color = ColorRawTokens.colorFunctionalScarlet600, + val repositoryNegativeHighLight: Color = ColorRawTokens.colorFunctionalScarlet700, + val repositoryNegativeHigherLight: Color = ColorRawTokens.colorFunctionalScarlet800, + val repositoryNegativeHighestLight: Color = ColorRawTokens.colorFunctionalScarlet900, + val repositoryNegativeLowLight: Color = ColorRawTokens.colorFunctionalScarlet300, + val repositoryNegativeLowerLight: Color = ColorRawTokens.colorFunctionalScarlet200, + val repositoryNegativeLowestLight: Color = ColorRawTokens.colorFunctionalScarlet100, + val repositoryNegativeDefaultDark: Color = ColorRawTokens.colorFunctionalScarlet600, + val repositoryNegativeHighDark: Color = ColorRawTokens.colorFunctionalScarlet700, + val repositoryNegativeHigherDark: Color = ColorRawTokens.colorFunctionalScarlet800, + val repositoryNegativeHighestDark: Color = ColorRawTokens.colorFunctionalScarlet900, + val repositoryNegativeLowDark: Color = ColorRawTokens.colorFunctionalScarlet300, + val repositoryNegativeLowerDark: Color = ColorRawTokens.colorFunctionalScarlet200, + val repositoryNegativeLowestDark: Color = ColorRawTokens.colorFunctionalScarlet100, + val repositoryNeutralEmphasizedBlackLight: Color = ColorRawTokens.colorFunctionalBlack, + val repositoryNeutralEmphasizedHighLight: Color = ColorRawTokens.colorFunctionalDarkGray720, + val repositoryNeutralEmphasizedHigherLight: Color = ColorRawTokens.colorFunctionalDarkGray800, + val repositoryNeutralEmphasizedHighestLight: Color = ColorRawTokens.colorFunctionalDarkGray880, + val repositoryNeutralEmphasizedMediumLight: Color = ColorRawTokens.colorFunctionalDarkGray640, + val repositoryNeutralEmphasizedBlackDark: Color = ColorRawTokens.colorFunctionalBlack, + val repositoryNeutralEmphasizedHighDark: Color = ColorRawTokens.colorFunctionalDarkGray720, + val repositoryNeutralEmphasizedHigherDark: Color = ColorRawTokens.colorFunctionalDarkGray800, + val repositoryNeutralEmphasizedHighestDark: Color = ColorRawTokens.colorFunctionalDarkGray880, + val repositoryNeutralEmphasizedMediumDark: Color = ColorRawTokens.colorFunctionalDarkGray640, + val repositoryNeutralMutedLowerLight: Color = ColorRawTokens.colorFunctionalLightGray160, + val repositoryNeutralMutedLowestLight: Color = ColorRawTokens.colorFunctionalLightGray80, + val repositoryNeutralMutedWhiteLight: Color = ColorRawTokens.colorFunctionalWhite, + val repositoryNeutralMutedLowerDark: Color = ColorRawTokens.colorFunctionalLightGray160, + val repositoryNeutralMutedLowestDark: Color = ColorRawTokens.colorFunctionalLightGray80, + val repositoryNeutralMutedWhiteDark: Color = ColorRawTokens.colorFunctionalWhite, + val repositoryOpacityBlackHigherLight: Color = ColorRawTokens.colorOpacityBlack680, + val repositoryOpacityBlackHighestLight: Color = ColorRawTokens.colorOpacityBlack840, + val repositoryOpacityBlackLowLight: Color = ColorRawTokens.colorOpacityBlack200, + val repositoryOpacityBlackLowerLight: Color = ColorRawTokens.colorOpacityBlack80, + val repositoryOpacityBlackLowestLight: Color = ColorRawTokens.colorOpacityBlack40, + val repositoryOpacityBlackMediumLight: Color = ColorRawTokens.colorOpacityBlack280, + val repositoryOpacityBlackTransparentLight: Color = ColorRawTokens.colorOpacityBlack0, + val repositoryOpacityBlackHigherDark: Color = ColorRawTokens.colorOpacityBlack680, + val repositoryOpacityBlackHighestDark: Color = ColorRawTokens.colorOpacityBlack840, + val repositoryOpacityBlackLowDark: Color = ColorRawTokens.colorOpacityBlack200, + val repositoryOpacityBlackLowerDark: Color = ColorRawTokens.colorOpacityBlack80, + val repositoryOpacityBlackLowestDark: Color = ColorRawTokens.colorOpacityBlack40, + val repositoryOpacityBlackMediumDark: Color = ColorRawTokens.colorOpacityBlack280, + val repositoryOpacityBlackTransparentDark: Color = ColorRawTokens.colorOpacityBlack0, + val repositoryOpacityInfoLight: Color = ColorRawTokens.colorOpacityDodgerBlue, + val repositoryOpacityNegativeLight: Color = ColorRawTokens.colorOpacityScarlet, + val repositoryOpacityPositiveLight: Color = ColorRawTokens.colorOpacityMalachite, + val repositoryOpacityWarningLight: Color = ColorRawTokens.colorOpacitySun, + val repositoryOpacityWhiteHighLight: Color = ColorRawTokens.colorOpacityWhite640, + val repositoryOpacityWhiteHigherLight: Color = ColorRawTokens.colorOpacityWhite800, + val repositoryOpacityWhiteHighestLight: Color = ColorRawTokens.colorOpacityWhite920, + val repositoryOpacityWhiteLowLight: Color = ColorRawTokens.colorOpacityWhite200, + val repositoryOpacityWhiteLowerLight: Color = ColorRawTokens.colorOpacityWhite80, + val repositoryOpacityWhiteLowestLight: Color = ColorRawTokens.colorOpacityWhite40, + val repositoryOpacityWhiteTransparentLight: Color = ColorRawTokens.colorOpacityWhite0, + val repositoryOpacityWhiteHighDark: Color = ColorRawTokens.colorOpacityWhite640, + val repositoryOpacityWhiteHigherDark: Color = ColorRawTokens.colorOpacityWhite800, + val repositoryOpacityWhiteHighestDark: Color = ColorRawTokens.colorOpacityWhite920, + val repositoryOpacityWhiteLowDark: Color = ColorRawTokens.colorOpacityWhite200, + val repositoryOpacityWhiteLowerDark: Color = ColorRawTokens.colorOpacityWhite80, + val repositoryOpacityWhiteLowestDark: Color = ColorRawTokens.colorOpacityWhite40, + val repositoryOpacityWhiteTransparentDark: Color = ColorRawTokens.colorOpacityWhite0, + val repositoryOpacityInfoDark: Color = ColorRawTokens.colorOpacityDodgerBlue, + val repositoryOpacityNegativeDark: Color = ColorRawTokens.colorOpacityScarlet, + val repositoryOpacityPositiveDark: Color = ColorRawTokens.colorOpacityMalachite, + val repositoryOpacityWarningDark: Color = ColorRawTokens.colorOpacitySun, + val repositoryPositiveDefaultLight: Color = ColorRawTokens.colorFunctionalMalachite500, + val repositoryPositiveHighestLight: Color = ColorRawTokens.colorFunctionalMalachite900, + val repositoryPositiveLowLight: Color = ColorRawTokens.colorFunctionalMalachite300, + val repositoryPositiveLowestLight: Color = ColorRawTokens.colorFunctionalMalachite100, + val repositoryPositiveDefaultDark: Color = ColorRawTokens.colorFunctionalMalachite500, + val repositoryPositiveHighestDark: Color = ColorRawTokens.colorFunctionalMalachite900, + val repositoryPositiveLowDark: Color = ColorRawTokens.colorFunctionalMalachite300, + val repositoryPositiveLowestDark: Color = ColorRawTokens.colorFunctionalMalachite100, + val repositoryPrimaryDefaultLight: Color = OrangeBrandColorRawTokens.colorOrange550, + val repositoryPrimaryLowLight: Color = OrangeBrandColorRawTokens.colorOrange500, + val repositoryPrimaryDefaultDark: Color = OrangeBrandColorRawTokens.colorOrange550, + val repositoryPrimaryLowDark: Color = OrangeBrandColorRawTokens.colorOrange500, + val repositoryWarningDefaultLight: Color = ColorRawTokens.colorFunctionalSun500, + val repositoryWarningHighestLight: Color = ColorRawTokens.colorFunctionalSun900, + val repositoryWarningLowLight: Color = ColorRawTokens.colorFunctionalSun300, + val repositoryWarningLowestLight: Color = ColorRawTokens.colorFunctionalSun100, + val repositoryWarningDefaultDark: Color = ColorRawTokens.colorFunctionalSun500, + val repositoryWarningHighestDark: Color = ColorRawTokens.colorFunctionalSun900, + val repositoryWarningLowDark: Color = ColorRawTokens.colorFunctionalSun300, + val repositoryWarningLowestDark: Color = ColorRawTokens.colorFunctionalSun100 +) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt index 1ee5e411..6d2a78c6 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt @@ -22,4 +22,6 @@ data class OudsColorSemanticTokens( val opacityColorTokens: OudsColorOpacitySemanticTokens = OudsColorOpacitySemanticTokens(), val overlayColorTokens: OudsColorOverlaySemanticTokens = OudsColorOverlaySemanticTokens(), val surfaceColorTokens: OudsColorSurfaceSemanticTokens = OudsColorSurfaceSemanticTokens() -) \ No newline at end of file +) { + val repositoryColorTokens: OudsColorRepositorySemanticTokens = OudsColorRepositorySemanticTokens() +} \ No newline at end of file diff --git a/theme-orange-country/src/main/java/com/orange/ouds/theme/orangecountry/OrangeCountryTheme.kt b/theme-orange-country/src/main/java/com/orange/ouds/theme/orangecountry/OrangeCountryTheme.kt index 1c377c8d..49e1ce05 100644 --- a/theme-orange-country/src/main/java/com/orange/ouds/theme/orangecountry/OrangeCountryTheme.kt +++ b/theme-orange-country/src/main/java/com/orange/ouds/theme/orangecountry/OrangeCountryTheme.kt @@ -38,6 +38,6 @@ class OrangeCountryTheme : OrangeTheme() { override val componentsTokens: OudsComponentsTokens get() = OudsComponentsTokens( - button = OudsButtonTokens(containerColor = OudsColorKeyToken.Surface.Status.Warning.Muted, cornerRadius = OudsBorderKeyToken.Radius.Short) + button = OudsButtonTokens(colorBgDefaultEnabled = OudsColorKeyToken.Surface.Status.Warning.Muted, borderRadius = OudsBorderKeyToken.Radius.Short) ) } \ No newline at end of file diff --git a/theme-white-label/src/main/java/com/orange/ouds/theme/whitelabel/WhiteLabelTheme.kt b/theme-white-label/src/main/java/com/orange/ouds/theme/whitelabel/WhiteLabelTheme.kt index d53f0b38..afee667b 100644 --- a/theme-white-label/src/main/java/com/orange/ouds/theme/whitelabel/WhiteLabelTheme.kt +++ b/theme-white-label/src/main/java/com/orange/ouds/theme/whitelabel/WhiteLabelTheme.kt @@ -16,9 +16,7 @@ import androidx.compose.ui.text.font.Font import androidx.compose.ui.text.font.FontFamily import com.orange.ouds.theme.OudsThemeContract import com.orange.ouds.theme.tokens.OudsBorderKeyToken -import com.orange.ouds.theme.tokens.OudsElevationKeyToken import com.orange.ouds.theme.tokens.OudsSpaceKeyToken -import com.orange.ouds.theme.tokens.OudsTypographyKeyToken import com.orange.ouds.theme.tokens.components.OudsButtonTokens import com.orange.ouds.theme.tokens.components.OudsComponentsTokens import com.orange.ouds.theme.tokens.semantic.OudsColorSemanticTokens @@ -40,13 +38,8 @@ open class WhiteLabelTheme : OudsThemeContract { override val componentsTokens: OudsComponentsTokens get() = OudsComponentsTokens( button = OudsButtonTokens( - cornerRadius = OudsBorderKeyToken.Radius.Pill, - defaultElevation = OudsElevationKeyToken.OverlayDefault, - focusedElevation = OudsElevationKeyToken.OverlayDefault, - hoveredElevation = OudsElevationKeyToken.OverlayDefault, - labelStyle = OudsTypographyKeyToken.Body.Default.Large, - verticalContentPadding = OudsSpaceKeyToken.Fixed.Shortest, - horizontalContentPadding = OudsSpaceKeyToken.Fixed.Short + borderRadius = OudsBorderKeyToken.Radius.Pill, + spacePaddingBlock = OudsSpaceKeyToken.PaddingBlock.Shortest ) ) }