diff --git a/app/src/main/java/com/orange/ouds/app/ui/MainScreen.kt b/app/src/main/java/com/orange/ouds/app/ui/MainScreen.kt index 17c801f3..f921e94a 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/MainScreen.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/MainScreen.kt @@ -57,7 +57,7 @@ import com.orange.ouds.theme.OudsThemeContract import com.orange.ouds.theme.orange.ORANGE_THEME_NAME import com.orange.ouds.theme.orange.OrangeTheme import com.orange.ouds.theme.orangecountry.OrangeCountryTheme -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken import com.orange.ouds.theme.whitelabel.WhiteLabelTheme @@ -155,7 +155,7 @@ private fun ChangeThemeDialog(themeManager: ThemeManager, dismissDialog: () -> U Dialog(onDismissRequest = dismissDialog) { Column( modifier = Modifier - .background(OudsColorKeyToken.BgSecondary.value) + .background(OudsColorBackgroundKeyToken.Secondary.value) .selectableGroup() ) { Text( diff --git a/app/src/main/java/com/orange/ouds/app/ui/TopBar.kt b/app/src/main/java/com/orange/ouds/app/ui/TopBar.kt index 54a61818..ec0a8902 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/TopBar.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/TopBar.kt @@ -34,7 +34,7 @@ import com.orange.ouds.app.ui.utilities.isDarkModeEnabled import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.UiModePreviews -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken import com.orange.ouds.theme.tokens.OudsTypographyKeyToken @@ -70,7 +70,7 @@ private fun TopBar( Image( imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(id = R.string.app_common_back_a11y), - colorFilter = ColorFilter.tint(OudsColorKeyToken.ContentDefault.value) + colorFilter = ColorFilter.tint(OudsColorContentKeyToken.Default.value) ) } } @@ -78,7 +78,7 @@ private fun TopBar( title = { Text( text = title, - color = OudsColorKeyToken.ContentDefault.value, + color = OudsColorContentKeyToken.Default.value, modifier = Modifier.semantics { traversalIndex = -1f }, style = OudsTypographyKeyToken.HeadingMedium.value ) 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 01ac3cad..d7d9bbd2 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 @@ -30,7 +30,7 @@ import com.orange.ouds.core.component.button.OudsButton import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.UiModePreviews -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken import com.orange.ouds.theme.tokens.OudsGridKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken @@ -51,7 +51,7 @@ fun ComponentsScreen() { .padding(top = OudsSpaceFixedKeyToken.Medium.value) .width(OudsGridKeyToken.Margin.value) .height(OudsGridKeyToken.ColumnGap.value) - .background(OudsColorKeyToken.BgBrandPrimary.value) + .background(OudsColorBackgroundKeyToken.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 74ad2d60..52520e58 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 @@ -40,7 +40,7 @@ import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.BasicPreviewParameterProvider import com.orange.ouds.foundation.utilities.UiModePreviews import com.orange.ouds.theme.OudsBorderStyle -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken import com.orange.ouds.theme.tokens.OudsTypographyKeyToken @@ -109,7 +109,7 @@ fun TokenCategoryDetailScreen(tokenCategory: TokenCategory, onSubcategoryClick: maxLines = 1, overflow = TextOverflow.Ellipsis, style = OudsTypographyKeyToken.BodyDefaultMedium.value, - color = OudsColorKeyToken.ContentMuted.value + color = OudsColorContentKeyToken.Muted.value ) } } else { @@ -143,7 +143,7 @@ fun TokenCategoryDetailScreen(tokenCategory: TokenCategory, onSubcategoryClick: text = token.literalValue, maxLines = 1, overflow = TextOverflow.Ellipsis, - style = OudsTypographyKeyToken.BodyDefaultMedium.value.copy(color = OudsColorKeyToken.ContentMuted.value) + style = OudsTypographyKeyToken.BodyDefaultMedium.value.copy(color = OudsColorContentKeyToken.Muted.value) ) } } 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 0dee91f4..68b5a85d 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 @@ -45,7 +45,7 @@ import com.orange.ouds.theme.OudsBorderStyle import com.orange.ouds.theme.tokens.OudsBorderRadiusKeyToken import com.orange.ouds.theme.tokens.OudsBorderStyleKeyToken import com.orange.ouds.theme.tokens.OudsBorderWidthKeyToken -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken import com.orange.ouds.theme.tokens.OudsElevationKeyToken import com.orange.ouds.theme.tokens.OudsGridKeyToken import com.orange.ouds.theme.tokens.OudsOpacityKeyToken @@ -86,7 +86,7 @@ sealed class TokenProperty( @Composable fun Illustration(elevation: Dp) { Surface(shadowElevation = elevation) { - IllustrationBox(backgroundColor = OudsColorKeyToken.BgSecondary.value) + IllustrationBox(backgroundColor = OudsColorBackgroundKeyToken.Secondary.value) } } } 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 82041f5c..d78448b0 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 @@ -40,7 +40,9 @@ import com.orange.ouds.core.theme.value import com.orange.ouds.theme.OudsBorderStyle import com.orange.ouds.theme.dashedBorder import com.orange.ouds.theme.dottedBorder -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorAlwaysKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken private val defaultIllustrationSize = 64.dp @@ -48,7 +50,7 @@ private val defaultIllustrationSize = 64.dp @Composable fun IllustrationBox( modifier: Modifier = Modifier, - backgroundColor: Color = OudsColorKeyToken.BgEmphasized.value, + backgroundColor: Color = OudsColorBackgroundKeyToken.Emphasized.value, contentAlignment: Alignment = Alignment.TopStart, content: @Composable BoxScope.() -> Unit = { } ) { @@ -68,14 +70,14 @@ fun BorderIllustrationBox( shape: Shape = RectangleShape, style: OudsBorderStyle = OudsBorderStyle.Solid ) { - val borderColor = OudsColorKeyToken.ContentDefault.value + val borderColor = OudsColorContentKeyToken.Default.value val modifier = when (style) { OudsBorderStyle.None -> Modifier OudsBorderStyle.Solid -> Modifier.border(width = width, color = borderColor, shape = shape) OudsBorderStyle.Dashed -> Modifier.dashedBorder(width = width, color = borderColor, shape = shape) OudsBorderStyle.Dotted -> Modifier.dottedBorder(width = width, color = borderColor, shape = shape) } - IllustrationBox(modifier = modifier, backgroundColor = OudsColorKeyToken.BgSecondary.value) + IllustrationBox(modifier = modifier, backgroundColor = OudsColorBackgroundKeyToken.Secondary.value) } @Composable @@ -95,7 +97,7 @@ fun SpaceIllustrationBox( } IllustrationBox(contentAlignment = contentAlignment) { Box( - modifier = dimensionBoxModifier.background(color = OudsColorKeyToken.AlwaysInfo.value) + modifier = dimensionBoxModifier.background(color = OudsColorAlwaysKeyToken.Info.value) ) } } @@ -114,14 +116,14 @@ fun SpacePaddingInlineWithImageIllustrationRow( Row( modifier = modifier .size(defaultIllustrationSize) - .background(color = OudsColorKeyToken.BgEmphasized.value), + .background(color = OudsColorBackgroundKeyToken.Emphasized.value), verticalAlignment = Alignment.CenterVertically ) { Box( modifier = Modifier .fillMaxHeight() .width(width = spaceSize) - .background(color = OudsColorKeyToken.AlwaysInfo.value) + .background(color = OudsColorAlwaysKeyToken.Info.value) ) Image( modifier = imageModifier, @@ -138,7 +140,7 @@ fun GridIllustrations() { modifier = Modifier .fillMaxWidth() .padding(horizontal = OudsSpaceFixedKeyToken.Medium.value) - .background(OudsColorKeyToken.BgEmphasized.value), + .background(OudsColorBackgroundKeyToken.Emphasized.value), painter = painterResource(id = R.drawable.il_tokens_grid_column_margin), contentDescription = null ) @@ -147,7 +149,7 @@ fun GridIllustrations() { .fillMaxWidth() .padding(horizontal = OudsSpaceFixedKeyToken.Medium.value) .padding(top = OudsSpaceFixedKeyToken.Medium.value) - .background(OudsColorKeyToken.BgEmphasized.value), + .background(OudsColorBackgroundKeyToken.Emphasized.value), painter = painterResource(id = R.drawable.il_tokens_grid_min_width), contentDescription = null ) @@ -156,7 +158,7 @@ fun GridIllustrations() { .fillMaxWidth() .padding(horizontal = OudsSpaceFixedKeyToken.Medium.value) .padding(top = OudsSpaceFixedKeyToken.Medium.value) - .background(OudsColorKeyToken.BgEmphasized.value), + .background(OudsColorBackgroundKeyToken.Emphasized.value), painter = painterResource(id = R.drawable.il_tokens_grid_max_width), contentDescription = null ) diff --git a/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/DetailScreenHeader.kt b/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/DetailScreenHeader.kt index 284a72bd..97f5b67b 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/DetailScreenHeader.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/DetailScreenHeader.kt @@ -32,9 +32,10 @@ import com.orange.ouds.app.R import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.UiModePreviews +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken import com.orange.ouds.theme.tokens.OudsTypographyKeyToken -import com.orange.ouds.theme.tokens.OudsColorKeyToken @Composable fun DetailScreenHeader( @@ -44,12 +45,12 @@ fun DetailScreenHeader( Column { Image( painter = painterResource(imageRes), - colorFilter = ColorFilter.tint(OudsColorKeyToken.ContentDefaultOnBgEmphasized.value), + colorFilter = ColorFilter.tint(OudsColorContentKeyToken.DefaultOnBgEmphasized.value), contentDescription = null, modifier = Modifier .fillMaxWidth() .height(186.dp) - .background(OudsColorKeyToken.BgEmphasized.value), + .background(OudsColorBackgroundKeyToken.Emphasized.value), contentScale = ContentScale.None ) @@ -68,7 +69,7 @@ private fun DetailScreenDescription( Text( modifier = modifier, text = stringResource(descriptionRes), - color = OudsColorKeyToken.ContentDefault.value, + color = OudsColorContentKeyToken.Default.value, style = OudsTypographyKeyToken.BodyDefaultLarge.value ) } diff --git a/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/LargeCard.kt b/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/LargeCard.kt index 88ea6c33..8ec797dd 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/LargeCard.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/LargeCard.kt @@ -21,7 +21,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults.cardElevation -import androidx.compose.material3.CardElevation import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -35,10 +34,12 @@ import com.orange.ouds.app.R import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.UiModePreviews +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken +import com.orange.ouds.theme.tokens.OudsColorElevationKeyToken +import com.orange.ouds.theme.tokens.OudsElevationKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken import com.orange.ouds.theme.tokens.OudsTypographyKeyToken -import com.orange.ouds.theme.tokens.OudsColorKeyToken -import com.orange.ouds.theme.tokens.OudsElevationKeyToken /** * Temporary large card used by the demo app @@ -51,15 +52,15 @@ fun LargeCard( modifier: Modifier = Modifier, ) { Card(modifier = modifier, shape = RectangleShape, elevation = cardElevation(defaultElevation = OudsElevationKeyToken.Raised.value), onClick = onClick) { - Column(modifier = Modifier.background(OudsColorKeyToken.ElevationRaised.value)) { + Column(modifier = Modifier.background(OudsColorElevationKeyToken.Raised.value)) { Image( painter = painterResource(imageRes), - colorFilter = ColorFilter.tint(OudsColorKeyToken.ContentDefaultOnBgEmphasized.value), + colorFilter = ColorFilter.tint(OudsColorContentKeyToken.DefaultOnBgEmphasized.value), contentDescription = null, modifier = Modifier .fillMaxWidth() - .height(184.dp) //TODO use token when available - .background(OudsColorKeyToken.BgEmphasized.value), + .height(184.dp) + .background(OudsColorBackgroundKeyToken.Emphasized.value), contentScale = ContentScale.None ) Column( @@ -67,7 +68,7 @@ fun LargeCard( ) { Text( text = title, - color = OudsColorKeyToken.ContentDefault.value, + color = OudsColorContentKeyToken.Default.value, overflow = TextOverflow.Ellipsis, maxLines = 1, style = OudsTypographyKeyToken.HeadingMedium.value diff --git a/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/Screen.kt b/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/Screen.kt index de16dbcb..6e9ca0c6 100644 --- a/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/Screen.kt +++ b/app/src/main/java/com/orange/ouds/app/ui/utilities/composable/Screen.kt @@ -20,14 +20,14 @@ import androidx.compose.ui.Modifier import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.UiModePreviews -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken @Composable fun Screen(content: @Composable () -> Unit) { Box( modifier = Modifier .fillMaxSize() - .background(OudsColorKeyToken.BgPrimary.value) + .background(OudsColorBackgroundKeyToken.Primary.value) ) { content() } 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 e9b20744..8d4842e3 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 @@ -28,7 +28,7 @@ import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview import com.orange.ouds.foundation.utilities.BasicPreviewParameterProvider import com.orange.ouds.foundation.utilities.UiModePreviews -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken @Composable fun OudsButton( @@ -66,7 +66,7 @@ fun OudsButton( modifier = modifier, text = text, style = labelStyle.value, - color = OudsColorKeyToken.ContentOnActionPrimaryEnabled.value + color = OudsColorContentKeyToken.OnActionPrimaryEnabled.value ) } } 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 8cae4f39..f66bcdb2 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 @@ -19,7 +19,16 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.ReadOnlyComposable import androidx.compose.runtime.Stable import androidx.compose.ui.graphics.Color -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorActionKeyToken +import com.orange.ouds.theme.tokens.OudsColorAlwaysKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken +import com.orange.ouds.theme.tokens.OudsColorBorderKeyToken +import com.orange.ouds.theme.tokens.OudsColorBrandKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken +import com.orange.ouds.theme.tokens.OudsColorDecorativeKeyToken +import com.orange.ouds.theme.tokens.OudsColorElevationKeyToken +import com.orange.ouds.theme.tokens.OudsColorGlobalKeyToken +import com.orange.ouds.theme.tokens.OudsColorGradientKeyToken import com.orange.ouds.theme.tokens.semantic.OudsColorSemanticTokens data class OudsColorScheme( @@ -721,210 +730,264 @@ val OudsColorSemanticTokens.darkColorScheme: OudsColorScheme ) @Stable -fun OudsColorScheme.fromToken(token: OudsColorKeyToken): Color { +fun OudsColorScheme.fromToken(token: OudsColorActionKeyToken): Color { return when (token) { - OudsColorKeyToken.TransparentDefault -> globalColors.transparentDefault - OudsColorKeyToken.ActionDisabled -> actionColors.disabled - OudsColorKeyToken.ActionDisabledOnBgEmphasized -> actionColors.disabledOnBgEmphasized - OudsColorKeyToken.ActionNegativeEnabled -> actionColors.negativeEnabled - OudsColorKeyToken.ActionNegativeFocus -> actionColors.negativeFocus - OudsColorKeyToken.ActionNegativeHover -> actionColors.negativeHover - OudsColorKeyToken.ActionNegativeLoading -> actionColors.negativeLoading - OudsColorKeyToken.ActionNegativePressed -> actionColors.negativePressed - OudsColorKeyToken.ActionPrimaryEnabled -> actionColors.primaryEnabled - OudsColorKeyToken.ActionPrimaryEnabledOnBgEmphasized -> actionColors.primaryEnabledOnBgEmphasized - OudsColorKeyToken.ActionPrimaryFocus -> actionColors.primaryFocus - OudsColorKeyToken.ActionPrimaryFocusOnBgEmphasized -> actionColors.primaryFocusOnBgEmphasized - OudsColorKeyToken.ActionPrimaryHover -> actionColors.primaryHover - OudsColorKeyToken.ActionPrimaryHoverOnBgEmphasized -> actionColors.primaryHoverOnBgEmphasized - OudsColorKeyToken.ActionPrimaryLoading -> actionColors.primaryLoading - OudsColorKeyToken.ActionPrimaryLoadingOnBgEmphasized -> actionColors.primaryLoadingOnBgEmphasized - OudsColorKeyToken.ActionPrimaryPressed -> actionColors.primaryPressed - OudsColorKeyToken.ActionPrimaryPressedOnBgEmphasized -> actionColors.primaryPressedOnBgEmphasized - OudsColorKeyToken.ActionSecondaryEnabled -> actionColors.secondaryEnabled - OudsColorKeyToken.ActionSecondaryEnabledOnBgEmphasized -> actionColors.secondaryEnabledOnBgEmphasized - OudsColorKeyToken.ActionSecondaryFocus -> actionColors.secondaryFocus - OudsColorKeyToken.ActionSecondaryFocusOnBgEmphasized -> actionColors.secondaryFocusOnBgEmphasized - OudsColorKeyToken.ActionSecondaryHover -> actionColors.secondaryHover - OudsColorKeyToken.ActionSecondaryHoverOnBgEmphasized -> actionColors.secondaryHoverOnBgEmphasized - OudsColorKeyToken.ActionSecondaryLoading -> actionColors.secondaryLoading - OudsColorKeyToken.ActionSecondaryLoadingOnBgEmphasized -> actionColors.secondaryLoadingOnBgEmphasized - OudsColorKeyToken.ActionSecondaryPressed -> actionColors.secondaryPressed - OudsColorKeyToken.ActionSecondaryPressedOnBgEmphasized -> actionColors.secondaryPressedOnBgEmphasized - OudsColorKeyToken.ActionSelected -> actionColors.selected - OudsColorKeyToken.ActionSelectedOnBgEmphasized -> actionColors.selectedOnBgEmphasized - OudsColorKeyToken.ActionVisited -> actionColors.visited - OudsColorKeyToken.ActionVisitedOnBgEmphasized -> actionColors.visitedOnBgEmphasized - OudsColorKeyToken.AlwaysAccent -> alwaysColors.accent - OudsColorKeyToken.AlwaysBlack -> alwaysColors.black - OudsColorKeyToken.AlwaysInfo -> alwaysColors.info - OudsColorKeyToken.AlwaysNegative -> alwaysColors.negative - OudsColorKeyToken.AlwaysOnAccent -> alwaysColors.onAccent - OudsColorKeyToken.AlwaysOnBlack -> alwaysColors.onBlack - OudsColorKeyToken.AlwaysOnInfo -> alwaysColors.onInfo - OudsColorKeyToken.AlwaysOnNegative -> alwaysColors.onNegative - OudsColorKeyToken.AlwaysOnPositive -> alwaysColors.onPositive - OudsColorKeyToken.AlwaysOnWarning -> alwaysColors.onWarning - OudsColorKeyToken.AlwaysOnWhite -> alwaysColors.onWhite - OudsColorKeyToken.AlwaysPositive -> alwaysColors.positive - OudsColorKeyToken.AlwaysWarning -> alwaysColors.warning - OudsColorKeyToken.AlwaysWhite -> alwaysColors.white - OudsColorKeyToken.BgBrandPrimary -> backgroundColors.brandPrimary - OudsColorKeyToken.BgEmphasized -> backgroundColors.emphasized - OudsColorKeyToken.BgPrimary -> backgroundColors.primary - OudsColorKeyToken.BgSecondary -> backgroundColors.secondary - OudsColorKeyToken.BgStatusAccentEmphasized -> backgroundColors.statusAccentEmphasized - OudsColorKeyToken.BgStatusAccentMuted -> backgroundColors.statusAccentMuted - OudsColorKeyToken.BgStatusAccentMutedOnBgEmphasized -> backgroundColors.statusAccentMutedOnBgEmphasized - OudsColorKeyToken.BgStatusInfoEmphasized -> backgroundColors.statusInfoEmphasized - OudsColorKeyToken.BgStatusInfoMuted -> backgroundColors.statusInfoMuted - OudsColorKeyToken.BgStatusInfoMutedOnBgEmphasized -> backgroundColors.statusInfoMutedOnBgEmphasized - OudsColorKeyToken.BgStatusNegativeEmphasized -> backgroundColors.statusNegativeEmphasized - OudsColorKeyToken.BgStatusNegativeMuted -> backgroundColors.statusNegativeMuted - OudsColorKeyToken.BgStatusNegativeMutedOnBgEmphasized -> backgroundColors.statusNegativeMutedOnBgEmphasized - OudsColorKeyToken.BgStatusNeutral -> backgroundColors.statusNeutral - OudsColorKeyToken.BgStatusNeutralOnBgEmphasized -> backgroundColors.statusNeutralOnBgEmphasized - OudsColorKeyToken.BgStatusPositiveEmphasized -> backgroundColors.statusPositiveEmphasized - OudsColorKeyToken.BgStatusPositiveMuted -> backgroundColors.statusPositiveMuted - OudsColorKeyToken.BgStatusPositiveMutedOnBgEmphasized -> backgroundColors.statusPositiveMutedOnBgEmphasized - OudsColorKeyToken.BgStatusWarningEmphasized -> backgroundColors.statusWarningEmphasized - OudsColorKeyToken.BgStatusWarningMuted -> backgroundColors.statusWarningMuted - OudsColorKeyToken.BgStatusWarningMutedOnBgEmphasized -> backgroundColors.statusWarningMutedOnBgEmphasized - OudsColorKeyToken.BgTertiary -> backgroundColors.tertiary - OudsColorKeyToken.BorderBrandPrimary -> borderColors.brandPrimary - OudsColorKeyToken.BorderBrandPrimaryOnBgEmphasized -> borderColors.brandPrimaryOnBgEmphasized - OudsColorKeyToken.BorderDefault -> borderColors.default - OudsColorKeyToken.BorderDefaultOnBgEmphasized -> borderColors.defaultOnBgEmphasized - OudsColorKeyToken.BorderEmphasized -> borderColors.emphasized - OudsColorKeyToken.BorderEmphasizedOnBgEmphasized -> borderColors.emphasizedOnBgEmphasized - OudsColorKeyToken.BorderFocus -> borderColors.focus - OudsColorKeyToken.BorderFocusInset -> borderColors.focusInset - OudsColorKeyToken.BorderFocusInsetOnBgEmphasized -> borderColors.focusInsetOnBgEmphasized - OudsColorKeyToken.BorderFocusOnBgEmphasized -> borderColors.focusOnBgEmphasized - OudsColorKeyToken.BorderOnBrandPrimary -> borderColors.onBrandPrimary - OudsColorKeyToken.BrandAccentDefault -> brandColors.accentDefault - OudsColorKeyToken.BrandAccentHigh -> brandColors.accentHigh - OudsColorKeyToken.BrandAccentHighest -> brandColors.accentHighest - OudsColorKeyToken.BrandAccentLowest -> brandColors.accentLowest - OudsColorKeyToken.BrandInfoDefault -> brandColors.infoDefault - OudsColorKeyToken.BrandInfoHighest -> brandColors.infoHighest - OudsColorKeyToken.BrandInfoLowest -> brandColors.infoLowest - OudsColorKeyToken.BrandNegativeDefault -> brandColors.negativeDefault - OudsColorKeyToken.BrandNegativeHigh -> brandColors.negativeHigh - OudsColorKeyToken.BrandNegativeHigher -> brandColors.negativeHigher - OudsColorKeyToken.BrandNegativeHighest -> brandColors.negativeHighest - OudsColorKeyToken.BrandNegativeLowest -> brandColors.negativeLowest - OudsColorKeyToken.BrandNeutralEmphasizedBlack -> brandColors.neutralEmphasizedBlack - OudsColorKeyToken.BrandNeutralEmphasizedHigh -> brandColors.neutralEmphasizedHigh - OudsColorKeyToken.BrandNeutralEmphasizedHigher -> brandColors.neutralEmphasizedHigher - OudsColorKeyToken.BrandNeutralEmphasizedHighest -> brandColors.neutralEmphasizedHighest - OudsColorKeyToken.BrandNeutralEmphasizedLow -> brandColors.neutralEmphasizedLow - OudsColorKeyToken.BrandNeutralEmphasizedLower -> brandColors.neutralEmphasizedLower - OudsColorKeyToken.BrandNeutralEmphasizedLowest -> brandColors.neutralEmphasizedLowest - OudsColorKeyToken.BrandNeutralEmphasizedMedium -> brandColors.neutralEmphasizedMedium - OudsColorKeyToken.BrandNeutralMutedHighest -> brandColors.neutralMutedHighest - OudsColorKeyToken.BrandNeutralMutedLow -> brandColors.neutralMutedLow - OudsColorKeyToken.BrandNeutralMutedLower -> brandColors.neutralMutedLower - OudsColorKeyToken.BrandNeutralMutedLowest -> brandColors.neutralMutedLowest - OudsColorKeyToken.BrandNeutralMutedMedium -> brandColors.neutralMutedMedium - OudsColorKeyToken.BrandNeutralMutedWhite -> brandColors.neutralMutedWhite - OudsColorKeyToken.BrandPositiveDefault -> brandColors.positiveDefault - OudsColorKeyToken.BrandPositiveHighest -> brandColors.positiveHighest - OudsColorKeyToken.BrandPositiveLowest -> brandColors.positiveLowest - OudsColorKeyToken.BrandPrimaryDefault -> brandColors.primaryDefault - OudsColorKeyToken.BrandPrimaryLow -> brandColors.primaryLow - OudsColorKeyToken.BrandWarningDefault -> brandColors.warningDefault - OudsColorKeyToken.BrandWarningHigh -> brandColors.warningHigh - OudsColorKeyToken.BrandWarningHighest -> brandColors.warningHighest - OudsColorKeyToken.BrandWarningLowest -> brandColors.warningLowest - OudsColorKeyToken.ContentBrandPrimary -> contentColors.brandPrimary - OudsColorKeyToken.ContentBrandPrimaryOnBgEmphasized -> contentColors.brandPrimaryOnBgEmphasized - OudsColorKeyToken.ContentDefault -> contentColors.default - OudsColorKeyToken.ContentDefaultOnBgEmphasized -> contentColors.defaultOnBgEmphasized - OudsColorKeyToken.ContentDisabled -> contentColors.disabled - OudsColorKeyToken.ContentDisabledOnBgEmphasized -> contentColors.disabledOnBgEmphasized - OudsColorKeyToken.ContentMuted -> contentColors.muted - OudsColorKeyToken.ContentMutedOnBgEmphasized -> contentColors.mutedOnBgEmphasized - OudsColorKeyToken.ContentOnActionDisabled -> contentColors.onActionDisabled - OudsColorKeyToken.ContentOnActionDisabledOnBgEmphasized -> contentColors.onActionDisabledOnBgEmphasized - OudsColorKeyToken.ContentOnActionNegative -> contentColors.onActionNegative - OudsColorKeyToken.ContentOnActionPrimaryEnabled -> contentColors.onActionPrimaryEnabled - OudsColorKeyToken.ContentOnActionPrimaryEnabledOnBgEmphasized -> contentColors.onActionPrimaryEnabledOnBgEmphasized - OudsColorKeyToken.ContentOnActionPrimaryFocus -> contentColors.onActionPrimaryFocus - OudsColorKeyToken.ContentOnActionPrimaryFocusOnBgEmphasized -> contentColors.onActionPrimaryFocusOnBgEmphasized - OudsColorKeyToken.ContentOnActionPrimaryHover -> contentColors.onActionPrimaryHover - OudsColorKeyToken.ContentOnActionPrimaryHoverOnBgEmphasized -> contentColors.onActionPrimaryHoverOnBgEmphasized - OudsColorKeyToken.ContentOnActionPrimaryLoading -> contentColors.onActionPrimaryLoading - OudsColorKeyToken.ContentOnActionPrimaryLoadingOnBgEmphasized -> contentColors.onActionPrimaryLoadingOnBgEmphasized - OudsColorKeyToken.ContentOnActionPrimaryPressed -> contentColors.onActionPrimaryPressed - OudsColorKeyToken.ContentOnActionPrimaryPressedOnBgEmphasized -> contentColors.onActionPrimaryPressedOnBgEmphasized - OudsColorKeyToken.ContentOnBrandPrimary -> contentColors.onBrandPrimary - OudsColorKeyToken.ContentOnStatusAccentEmphasized -> contentColors.onStatusAccentEmphasized - OudsColorKeyToken.ContentOnStatusAccentMuted -> contentColors.onStatusAccentMuted - OudsColorKeyToken.ContentOnStatusAccentMutedOnBgEmphasized -> contentColors.onStatusAccentMutedOnBgEmphasized - OudsColorKeyToken.ContentOnStatusInfoEmphasized -> contentColors.onStatusInfoEmphasized - OudsColorKeyToken.ContentOnStatusInfoMuted -> contentColors.onStatusInfoMuted - OudsColorKeyToken.ContentOnStatusInfoMutedOnBgEmphasized -> contentColors.onStatusInfoMutedOnBgEmphasized - OudsColorKeyToken.ContentOnStatusNegativeEmphasized -> contentColors.onStatusNegativeEmphasized - OudsColorKeyToken.ContentOnStatusNegativeMuted -> contentColors.onStatusNegativeMuted - OudsColorKeyToken.ContentOnStatusNegativeMutedOnBgEmphasized -> contentColors.onStatusNegativeMutedOnBgEmphasized - OudsColorKeyToken.ContentOnStatusPositiveEmphasized -> contentColors.onStatusPositiveEmphasized - OudsColorKeyToken.ContentOnStatusPositiveMuted -> contentColors.onStatusPositiveMuted - OudsColorKeyToken.ContentOnStatusPositiveMutedOnBgEmphasized -> contentColors.onStatusPositiveMutedOnBgEmphasized - OudsColorKeyToken.ContentOnStatusWarningEmphasized -> contentColors.onStatusWarningEmphasized - OudsColorKeyToken.ContentOnStatusWarningMuted -> contentColors.onStatusWarningMuted - OudsColorKeyToken.ContentOnStatusWarningMutedOnBgEmphasized -> contentColors.onStatusWarningMutedOnBgEmphasized - OudsColorKeyToken.ContentStatusInfo -> contentColors.statusInfo - OudsColorKeyToken.ContentStatusNegative -> contentColors.statusNegative - OudsColorKeyToken.ContentStatusPositive -> contentColors.statusPositive - OudsColorKeyToken.ContentStatusWarning -> contentColors.statusWarning - OudsColorKeyToken.ElevationDrag -> elevationColors.drag - OudsColorKeyToken.ElevationDragOnBgEmphasized -> elevationColors.dragOnBgEmphasized - OudsColorKeyToken.ElevationDragOnBgSecondary -> elevationColors.dragOnBgSecondary - OudsColorKeyToken.ElevationModal -> elevationColors.modal - OudsColorKeyToken.ElevationOverlayDefault -> elevationColors.overlayDefault - OudsColorKeyToken.ElevationOverlayDefaultOnBgEmphasized -> elevationColors.overlayDefaultOnBgEmphasized - OudsColorKeyToken.ElevationOverlayDefaultOnBgSecondary -> elevationColors.overlayDefaultOnBgSecondary - OudsColorKeyToken.ElevationOverlayEmphasized -> elevationColors.overlayEmphasized - OudsColorKeyToken.ElevationOverlayEmphasizedOnBgEmphasized -> elevationColors.overlayEmphasizedOnBgEmphasized - OudsColorKeyToken.ElevationOverlayEmphasizedOnBgSecondary -> elevationColors.overlayEmphasizedOnBgSecondary - OudsColorKeyToken.ElevationRaised -> elevationColors.raised - OudsColorKeyToken.ElevationRaisedOnBgEmphasized -> elevationColors.raisedOnBgEmphasized - OudsColorKeyToken.ElevationRaisedOnBgSecondary -> elevationColors.raisedOnBgSecondary - OudsColorKeyToken.GradientSkeletonMiddle -> gradientColors.skeletonMiddle - OudsColorKeyToken.GradientSkeletonMiddleOnBgEmphasized -> gradientColors.skeletonMiddleOnBgEmphasized - OudsColorKeyToken.GradientSkeletonStartEnd -> gradientColors.skeletonStartEnd - OudsColorKeyToken.GradientSkeletonStartEndOnBgEmphasized -> gradientColors.skeletonStartEndOnBgEmphasized - OudsColorKeyToken.DecorativeAccent1Default -> decorativeColors.accent1Default - OudsColorKeyToken.DecorativeAccent1Emphasized -> decorativeColors.accent1Emphasized - OudsColorKeyToken.DecorativeAccent1Muted -> decorativeColors.accent1Muted - OudsColorKeyToken.DecorativeAccent2Default -> decorativeColors.accent2Default - OudsColorKeyToken.DecorativeAccent2Emphasized -> decorativeColors.accent2Emphasized - OudsColorKeyToken.DecorativeAccent2Muted -> decorativeColors.accent2Muted - OudsColorKeyToken.DecorativeAccent3Default -> decorativeColors.accent3Default - OudsColorKeyToken.DecorativeAccent3Emphasized -> decorativeColors.accent3Emphasized - OudsColorKeyToken.DecorativeAccent3Muted -> decorativeColors.accent3Muted - OudsColorKeyToken.DecorativeAccent4Default -> decorativeColors.accent4Default - OudsColorKeyToken.DecorativeAccent4Emphasized -> decorativeColors.accent4Emphasized - OudsColorKeyToken.DecorativeAccent4Muted -> decorativeColors.accent4Muted - OudsColorKeyToken.DecorativeAccent5Default -> decorativeColors.accent5Default - OudsColorKeyToken.DecorativeAccent5Emphasized -> decorativeColors.accent5Emphasized - OudsColorKeyToken.DecorativeAccent5Muted -> decorativeColors.accent5Muted - OudsColorKeyToken.DecorativeBrandPrimary -> decorativeColors.brandPrimary - OudsColorKeyToken.DecorativeBrandSecondary -> decorativeColors.brandSecondary - OudsColorKeyToken.DecorativeBrandTertiary -> decorativeColors.brandTertiary - OudsColorKeyToken.DecorativeNeutralDefault -> decorativeColors.neutralDefault - OudsColorKeyToken.DecorativeNeutralEmphasized -> decorativeColors.neutralEmphasized - OudsColorKeyToken.DecorativeNeutralMuted -> decorativeColors.neutralMuted - OudsColorKeyToken.DecorativeSkinTint100 -> decorativeColors.skinTint100 - OudsColorKeyToken.DecorativeSkinTint200 -> decorativeColors.skinTint200 - OudsColorKeyToken.DecorativeSkinTint300 -> decorativeColors.skinTint300 - OudsColorKeyToken.DecorativeSkinTint400 -> decorativeColors.skinTint400 - OudsColorKeyToken.DecorativeSkinTint500 -> decorativeColors.skinTint500 - OudsColorKeyToken.DecorativeSkinTint600 -> decorativeColors.skinTint600 - OudsColorKeyToken.DecorativeSkinTint700 -> decorativeColors.skinTint700 - OudsColorKeyToken.DecorativeSkinTint800 -> decorativeColors.skinTint800 - OudsColorKeyToken.DecorativeSkinTint900 -> decorativeColors.skinTint900 + OudsColorActionKeyToken.Disabled -> actionColors.disabled + OudsColorActionKeyToken.DisabledOnBgEmphasized -> actionColors.disabledOnBgEmphasized + OudsColorActionKeyToken.NegativeEnabled -> actionColors.negativeEnabled + OudsColorActionKeyToken.NegativeFocus -> actionColors.negativeFocus + OudsColorActionKeyToken.NegativeHover -> actionColors.negativeHover + OudsColorActionKeyToken.NegativeLoading -> actionColors.negativeLoading + OudsColorActionKeyToken.NegativePressed -> actionColors.negativePressed + OudsColorActionKeyToken.PrimaryEnabled -> actionColors.primaryEnabled + OudsColorActionKeyToken.PrimaryEnabledOnBgEmphasized -> actionColors.primaryEnabledOnBgEmphasized + OudsColorActionKeyToken.PrimaryFocus -> actionColors.primaryFocus + OudsColorActionKeyToken.PrimaryFocusOnBgEmphasized -> actionColors.primaryFocusOnBgEmphasized + OudsColorActionKeyToken.PrimaryHover -> actionColors.primaryHover + OudsColorActionKeyToken.PrimaryHoverOnBgEmphasized -> actionColors.primaryHoverOnBgEmphasized + OudsColorActionKeyToken.PrimaryLoading -> actionColors.primaryLoading + OudsColorActionKeyToken.PrimaryLoadingOnBgEmphasized -> actionColors.primaryLoadingOnBgEmphasized + OudsColorActionKeyToken.PrimaryPressed -> actionColors.primaryPressed + OudsColorActionKeyToken.PrimaryPressedOnBgEmphasized -> actionColors.primaryPressedOnBgEmphasized + OudsColorActionKeyToken.SecondaryEnabled -> actionColors.secondaryEnabled + OudsColorActionKeyToken.SecondaryEnabledOnBgEmphasized -> actionColors.secondaryEnabledOnBgEmphasized + OudsColorActionKeyToken.SecondaryFocus -> actionColors.secondaryFocus + OudsColorActionKeyToken.SecondaryFocusOnBgEmphasized -> actionColors.secondaryFocusOnBgEmphasized + OudsColorActionKeyToken.SecondaryHover -> actionColors.secondaryHover + OudsColorActionKeyToken.SecondaryHoverOnBgEmphasized -> actionColors.secondaryHoverOnBgEmphasized + OudsColorActionKeyToken.SecondaryLoading -> actionColors.secondaryLoading + OudsColorActionKeyToken.SecondaryLoadingOnBgEmphasized -> actionColors.secondaryLoadingOnBgEmphasized + OudsColorActionKeyToken.SecondaryPressed -> actionColors.secondaryPressed + OudsColorActionKeyToken.SecondaryPressedOnBgEmphasized -> actionColors.secondaryPressedOnBgEmphasized + OudsColorActionKeyToken.Selected -> actionColors.selected + OudsColorActionKeyToken.SelectedOnBgEmphasized -> actionColors.selectedOnBgEmphasized + OudsColorActionKeyToken.Visited -> actionColors.visited + OudsColorActionKeyToken.VisitedOnBgEmphasized -> actionColors.visitedOnBgEmphasized + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorAlwaysKeyToken): Color { + return when (token) { + OudsColorAlwaysKeyToken.Accent -> alwaysColors.accent + OudsColorAlwaysKeyToken.Black -> alwaysColors.black + OudsColorAlwaysKeyToken.Info -> alwaysColors.info + OudsColorAlwaysKeyToken.Negative -> alwaysColors.negative + OudsColorAlwaysKeyToken.OnAccent -> alwaysColors.onAccent + OudsColorAlwaysKeyToken.OnBlack -> alwaysColors.onBlack + OudsColorAlwaysKeyToken.OnInfo -> alwaysColors.onInfo + OudsColorAlwaysKeyToken.OnNegative -> alwaysColors.onNegative + OudsColorAlwaysKeyToken.OnPositive -> alwaysColors.onPositive + OudsColorAlwaysKeyToken.OnWarning -> alwaysColors.onWarning + OudsColorAlwaysKeyToken.OnWhite -> alwaysColors.onWhite + OudsColorAlwaysKeyToken.Positive -> alwaysColors.positive + OudsColorAlwaysKeyToken.Warning -> alwaysColors.warning + OudsColorAlwaysKeyToken.White -> alwaysColors.white + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorBackgroundKeyToken): Color { + return when (token) { + OudsColorBackgroundKeyToken.BrandPrimary -> backgroundColors.brandPrimary + OudsColorBackgroundKeyToken.Emphasized -> backgroundColors.emphasized + OudsColorBackgroundKeyToken.Primary -> backgroundColors.primary + OudsColorBackgroundKeyToken.Secondary -> backgroundColors.secondary + OudsColorBackgroundKeyToken.StatusAccentEmphasized -> backgroundColors.statusAccentEmphasized + OudsColorBackgroundKeyToken.StatusAccentMuted -> backgroundColors.statusAccentMuted + OudsColorBackgroundKeyToken.StatusAccentMutedOnBgEmphasized -> backgroundColors.statusAccentMutedOnBgEmphasized + OudsColorBackgroundKeyToken.StatusInfoEmphasized -> backgroundColors.statusInfoEmphasized + OudsColorBackgroundKeyToken.StatusInfoMuted -> backgroundColors.statusInfoMuted + OudsColorBackgroundKeyToken.StatusInfoMutedOnBgEmphasized -> backgroundColors.statusInfoMutedOnBgEmphasized + OudsColorBackgroundKeyToken.StatusNegativeEmphasized -> backgroundColors.statusNegativeEmphasized + OudsColorBackgroundKeyToken.StatusNegativeMuted -> backgroundColors.statusNegativeMuted + OudsColorBackgroundKeyToken.StatusNegativeMutedOnBgEmphasized -> backgroundColors.statusNegativeMutedOnBgEmphasized + OudsColorBackgroundKeyToken.StatusNeutral -> backgroundColors.statusNeutral + OudsColorBackgroundKeyToken.StatusNeutralOnBgEmphasized -> backgroundColors.statusNeutralOnBgEmphasized + OudsColorBackgroundKeyToken.StatusPositiveEmphasized -> backgroundColors.statusPositiveEmphasized + OudsColorBackgroundKeyToken.StatusPositiveMuted -> backgroundColors.statusPositiveMuted + OudsColorBackgroundKeyToken.StatusPositiveMutedOnBgEmphasized -> backgroundColors.statusPositiveMutedOnBgEmphasized + OudsColorBackgroundKeyToken.StatusWarningEmphasized -> backgroundColors.statusWarningEmphasized + OudsColorBackgroundKeyToken.StatusWarningMuted -> backgroundColors.statusWarningMuted + OudsColorBackgroundKeyToken.StatusWarningMutedOnBgEmphasized -> backgroundColors.statusWarningMutedOnBgEmphasized + OudsColorBackgroundKeyToken.Tertiary -> backgroundColors.tertiary + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorBorderKeyToken): Color { + return when (token) { + OudsColorBorderKeyToken.BrandPrimary -> borderColors.brandPrimary + OudsColorBorderKeyToken.BrandPrimaryOnBgEmphasized -> borderColors.brandPrimaryOnBgEmphasized + OudsColorBorderKeyToken.Default -> borderColors.default + OudsColorBorderKeyToken.DefaultOnBgEmphasized -> borderColors.defaultOnBgEmphasized + OudsColorBorderKeyToken.Emphasized -> borderColors.emphasized + OudsColorBorderKeyToken.EmphasizedOnBgEmphasized -> borderColors.emphasizedOnBgEmphasized + OudsColorBorderKeyToken.Focus -> borderColors.focus + OudsColorBorderKeyToken.FocusInset -> borderColors.focusInset + OudsColorBorderKeyToken.FocusInsetOnBgEmphasized -> borderColors.focusInsetOnBgEmphasized + OudsColorBorderKeyToken.FocusOnBgEmphasized -> borderColors.focusOnBgEmphasized + OudsColorBorderKeyToken.OnBrandPrimary -> borderColors.onBrandPrimary + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorBrandKeyToken): Color { + return when (token) { + OudsColorBrandKeyToken.AccentDefault -> brandColors.accentDefault + OudsColorBrandKeyToken.AccentHigh -> brandColors.accentHigh + OudsColorBrandKeyToken.AccentHighest -> brandColors.accentHighest + OudsColorBrandKeyToken.AccentLowest -> brandColors.accentLowest + OudsColorBrandKeyToken.InfoDefault -> brandColors.infoDefault + OudsColorBrandKeyToken.InfoHighest -> brandColors.infoHighest + OudsColorBrandKeyToken.InfoLowest -> brandColors.infoLowest + OudsColorBrandKeyToken.NegativeDefault -> brandColors.negativeDefault + OudsColorBrandKeyToken.NegativeHigh -> brandColors.negativeHigh + OudsColorBrandKeyToken.NegativeHigher -> brandColors.negativeHigher + OudsColorBrandKeyToken.NegativeHighest -> brandColors.negativeHighest + OudsColorBrandKeyToken.NegativeLowest -> brandColors.negativeLowest + OudsColorBrandKeyToken.NeutralEmphasizedBlack -> brandColors.neutralEmphasizedBlack + OudsColorBrandKeyToken.NeutralEmphasizedHigh -> brandColors.neutralEmphasizedHigh + OudsColorBrandKeyToken.NeutralEmphasizedHigher -> brandColors.neutralEmphasizedHigher + OudsColorBrandKeyToken.NeutralEmphasizedHighest -> brandColors.neutralEmphasizedHighest + OudsColorBrandKeyToken.NeutralEmphasizedLow -> brandColors.neutralEmphasizedLow + OudsColorBrandKeyToken.NeutralEmphasizedLower -> brandColors.neutralEmphasizedLower + OudsColorBrandKeyToken.NeutralEmphasizedLowest -> brandColors.neutralEmphasizedLowest + OudsColorBrandKeyToken.NeutralEmphasizedMedium -> brandColors.neutralEmphasizedMedium + OudsColorBrandKeyToken.NeutralMutedHighest -> brandColors.neutralMutedHighest + OudsColorBrandKeyToken.NeutralMutedLow -> brandColors.neutralMutedLow + OudsColorBrandKeyToken.NeutralMutedLower -> brandColors.neutralMutedLower + OudsColorBrandKeyToken.NeutralMutedLowest -> brandColors.neutralMutedLowest + OudsColorBrandKeyToken.NeutralMutedMedium -> brandColors.neutralMutedMedium + OudsColorBrandKeyToken.NeutralMutedWhite -> brandColors.neutralMutedWhite + OudsColorBrandKeyToken.PositiveDefault -> brandColors.positiveDefault + OudsColorBrandKeyToken.PositiveHighest -> brandColors.positiveHighest + OudsColorBrandKeyToken.PositiveLowest -> brandColors.positiveLowest + OudsColorBrandKeyToken.PrimaryDefault -> brandColors.primaryDefault + OudsColorBrandKeyToken.PrimaryLow -> brandColors.primaryLow + OudsColorBrandKeyToken.WarningDefault -> brandColors.warningDefault + OudsColorBrandKeyToken.WarningHigh -> brandColors.warningHigh + OudsColorBrandKeyToken.WarningHighest -> brandColors.warningHighest + OudsColorBrandKeyToken.WarningLowest -> brandColors.warningLowest + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorContentKeyToken): Color { + return when (token) { + OudsColorContentKeyToken.BrandPrimary -> contentColors.brandPrimary + OudsColorContentKeyToken.BrandPrimaryOnBgEmphasized -> contentColors.brandPrimaryOnBgEmphasized + OudsColorContentKeyToken.Default -> contentColors.default + OudsColorContentKeyToken.DefaultOnBgEmphasized -> contentColors.defaultOnBgEmphasized + OudsColorContentKeyToken.Disabled -> contentColors.disabled + OudsColorContentKeyToken.DisabledOnBgEmphasized -> contentColors.disabledOnBgEmphasized + OudsColorContentKeyToken.Muted -> contentColors.muted + OudsColorContentKeyToken.MutedOnBgEmphasized -> contentColors.mutedOnBgEmphasized + OudsColorContentKeyToken.OnActionDisabled -> contentColors.onActionDisabled + OudsColorContentKeyToken.OnActionDisabledOnBgEmphasized -> contentColors.onActionDisabledOnBgEmphasized + OudsColorContentKeyToken.OnActionNegative -> contentColors.onActionNegative + OudsColorContentKeyToken.OnActionPrimaryEnabled -> contentColors.onActionPrimaryEnabled + OudsColorContentKeyToken.OnActionPrimaryEnabledOnBgEmphasized -> contentColors.onActionPrimaryEnabledOnBgEmphasized + OudsColorContentKeyToken.OnActionPrimaryFocus -> contentColors.onActionPrimaryFocus + OudsColorContentKeyToken.OnActionPrimaryFocusOnBgEmphasized -> contentColors.onActionPrimaryFocusOnBgEmphasized + OudsColorContentKeyToken.OnActionPrimaryHover -> contentColors.onActionPrimaryHover + OudsColorContentKeyToken.OnActionPrimaryHoverOnBgEmphasized -> contentColors.onActionPrimaryHoverOnBgEmphasized + OudsColorContentKeyToken.OnActionPrimaryLoading -> contentColors.onActionPrimaryLoading + OudsColorContentKeyToken.OnActionPrimaryLoadingOnBgEmphasized -> contentColors.onActionPrimaryLoadingOnBgEmphasized + OudsColorContentKeyToken.OnActionPrimaryPressed -> contentColors.onActionPrimaryPressed + OudsColorContentKeyToken.OnActionPrimaryPressedOnBgEmphasized -> contentColors.onActionPrimaryPressedOnBgEmphasized + OudsColorContentKeyToken.OnBrandPrimary -> contentColors.onBrandPrimary + OudsColorContentKeyToken.OnStatusAccentEmphasized -> contentColors.onStatusAccentEmphasized + OudsColorContentKeyToken.OnStatusAccentMuted -> contentColors.onStatusAccentMuted + OudsColorContentKeyToken.OnStatusAccentMutedOnBgEmphasized -> contentColors.onStatusAccentMutedOnBgEmphasized + OudsColorContentKeyToken.OnStatusInfoEmphasized -> contentColors.onStatusInfoEmphasized + OudsColorContentKeyToken.OnStatusInfoMuted -> contentColors.onStatusInfoMuted + OudsColorContentKeyToken.OnStatusInfoMutedOnBgEmphasized -> contentColors.onStatusInfoMutedOnBgEmphasized + OudsColorContentKeyToken.OnStatusNegativeEmphasized -> contentColors.onStatusNegativeEmphasized + OudsColorContentKeyToken.OnStatusNegativeMuted -> contentColors.onStatusNegativeMuted + OudsColorContentKeyToken.OnStatusNegativeMutedOnBgEmphasized -> contentColors.onStatusNegativeMutedOnBgEmphasized + OudsColorContentKeyToken.OnStatusPositiveEmphasized -> contentColors.onStatusPositiveEmphasized + OudsColorContentKeyToken.OnStatusPositiveMuted -> contentColors.onStatusPositiveMuted + OudsColorContentKeyToken.OnStatusPositiveMutedOnBgEmphasized -> contentColors.onStatusPositiveMutedOnBgEmphasized + OudsColorContentKeyToken.OnStatusWarningEmphasized -> contentColors.onStatusWarningEmphasized + OudsColorContentKeyToken.OnStatusWarningMuted -> contentColors.onStatusWarningMuted + OudsColorContentKeyToken.OnStatusWarningMutedOnBgEmphasized -> contentColors.onStatusWarningMutedOnBgEmphasized + OudsColorContentKeyToken.StatusInfo -> contentColors.statusInfo + OudsColorContentKeyToken.StatusNegative -> contentColors.statusNegative + OudsColorContentKeyToken.StatusPositive -> contentColors.statusPositive + OudsColorContentKeyToken.StatusWarning -> contentColors.statusWarning + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorElevationKeyToken): Color { + return when (token) { + OudsColorElevationKeyToken.Drag -> elevationColors.drag + OudsColorElevationKeyToken.DragOnBgEmphasized -> elevationColors.dragOnBgEmphasized + OudsColorElevationKeyToken.DragOnBgSecondary -> elevationColors.dragOnBgSecondary + OudsColorElevationKeyToken.Modal -> elevationColors.modal + OudsColorElevationKeyToken.OverlayDefault -> elevationColors.overlayDefault + OudsColorElevationKeyToken.OverlayDefaultOnBgEmphasized -> elevationColors.overlayDefaultOnBgEmphasized + OudsColorElevationKeyToken.OverlayDefaultOnBgSecondary -> elevationColors.overlayDefaultOnBgSecondary + OudsColorElevationKeyToken.OverlayEmphasized -> elevationColors.overlayEmphasized + OudsColorElevationKeyToken.OverlayEmphasizedOnBgEmphasized -> elevationColors.overlayEmphasizedOnBgEmphasized + OudsColorElevationKeyToken.OverlayEmphasizedOnBgSecondary -> elevationColors.overlayEmphasizedOnBgSecondary + OudsColorElevationKeyToken.Raised -> elevationColors.raised + OudsColorElevationKeyToken.RaisedOnBgEmphasized -> elevationColors.raisedOnBgEmphasized + OudsColorElevationKeyToken.RaisedOnBgSecondary -> elevationColors.raisedOnBgSecondary + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorGradientKeyToken): Color { + return when (token) { + OudsColorGradientKeyToken.SkeletonMiddle -> gradientColors.skeletonMiddle + OudsColorGradientKeyToken.SkeletonMiddleOnBgEmphasized -> gradientColors.skeletonMiddleOnBgEmphasized + OudsColorGradientKeyToken.SkeletonStartEnd -> gradientColors.skeletonStartEnd + OudsColorGradientKeyToken.SkeletonStartEndOnBgEmphasized -> gradientColors.skeletonStartEndOnBgEmphasized + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorDecorativeKeyToken): Color { + return when (token) { + OudsColorDecorativeKeyToken.Accent1Default -> decorativeColors.accent1Default + OudsColorDecorativeKeyToken.Accent1Emphasized -> decorativeColors.accent1Emphasized + OudsColorDecorativeKeyToken.Accent1Muted -> decorativeColors.accent1Muted + OudsColorDecorativeKeyToken.Accent2Default -> decorativeColors.accent2Default + OudsColorDecorativeKeyToken.Accent2Emphasized -> decorativeColors.accent2Emphasized + OudsColorDecorativeKeyToken.Accent2Muted -> decorativeColors.accent2Muted + OudsColorDecorativeKeyToken.Accent3Default -> decorativeColors.accent3Default + OudsColorDecorativeKeyToken.Accent3Emphasized -> decorativeColors.accent3Emphasized + OudsColorDecorativeKeyToken.Accent3Muted -> decorativeColors.accent3Muted + OudsColorDecorativeKeyToken.Accent4Default -> decorativeColors.accent4Default + OudsColorDecorativeKeyToken.Accent4Emphasized -> decorativeColors.accent4Emphasized + OudsColorDecorativeKeyToken.Accent4Muted -> decorativeColors.accent4Muted + OudsColorDecorativeKeyToken.Accent5Default -> decorativeColors.accent5Default + OudsColorDecorativeKeyToken.Accent5Emphasized -> decorativeColors.accent5Emphasized + OudsColorDecorativeKeyToken.Accent5Muted -> decorativeColors.accent5Muted + OudsColorDecorativeKeyToken.BrandPrimary -> decorativeColors.brandPrimary + OudsColorDecorativeKeyToken.BrandSecondary -> decorativeColors.brandSecondary + OudsColorDecorativeKeyToken.BrandTertiary -> decorativeColors.brandTertiary + OudsColorDecorativeKeyToken.NeutralDefault -> decorativeColors.neutralDefault + OudsColorDecorativeKeyToken.NeutralEmphasized -> decorativeColors.neutralEmphasized + OudsColorDecorativeKeyToken.NeutralMuted -> decorativeColors.neutralMuted + OudsColorDecorativeKeyToken.SkinTint100 -> decorativeColors.skinTint100 + OudsColorDecorativeKeyToken.SkinTint200 -> decorativeColors.skinTint200 + OudsColorDecorativeKeyToken.SkinTint300 -> decorativeColors.skinTint300 + OudsColorDecorativeKeyToken.SkinTint400 -> decorativeColors.skinTint400 + OudsColorDecorativeKeyToken.SkinTint500 -> decorativeColors.skinTint500 + OudsColorDecorativeKeyToken.SkinTint600 -> decorativeColors.skinTint600 + OudsColorDecorativeKeyToken.SkinTint700 -> decorativeColors.skinTint700 + OudsColorDecorativeKeyToken.SkinTint800 -> decorativeColors.skinTint800 + OudsColorDecorativeKeyToken.SkinTint900 -> decorativeColors.skinTint900 + } +} + +@Stable +fun OudsColorScheme.fromToken(token: OudsColorGlobalKeyToken): Color { + return when (token) { + OudsColorGlobalKeyToken.TransparentDefault -> globalColors.transparentDefault } } @@ -995,9 +1058,73 @@ val OudsColorSemanticTokens.materialDarkColorScheme: ColorScheme ) /** - * Converts an OUDS color token to the local color value provided by the theme. + * Converts an OUDS action color token to the local color value provided by the theme. + */ +val OudsColorActionKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS always color token to the local color value provided by the theme. + */ +val OudsColorAlwaysKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS background color token to the local color value provided by the theme. + */ +val OudsColorBackgroundKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS border color token to the local color value provided by the theme. + */ +val OudsColorBorderKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS brand color token to the local color value provided by the theme. */ -val OudsColorKeyToken.value: Color +val OudsColorBrandKeyToken.value: Color @ReadOnlyComposable @Composable get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS content color token to the local color value provided by the theme. + */ +val OudsColorContentKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS elevation color token to the local color value provided by the theme. + */ +val OudsColorElevationKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS gradient color token to the local color value provided by the theme. + */ +val OudsColorGradientKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) + +/** + * Converts an OUDS decorative color token to the local color value provided by the theme. + */ +val OudsColorDecorativeKeyToken.value: Color + @ReadOnlyComposable + @Composable + get() = OudsTheme.colorScheme.fromToken(this) \ No newline at end of file diff --git a/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt b/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt index b36f6c93..45893291 100644 --- a/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt +++ b/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt @@ -18,7 +18,7 @@ import androidx.compose.runtime.Composable import com.orange.ouds.core.BuildConfig import com.orange.ouds.core.theme.OudsTheme import com.orange.ouds.core.theme.value -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken /** * Configures the Compose OUDS preview environment in Android Studio. @@ -29,6 +29,6 @@ import com.orange.ouds.theme.tokens.OudsColorKeyToken @Composable fun OudsPreview(darkThemeEnabled: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) { OudsTheme(themeContract = BuildConfig.PREVIEW_THEME, darkThemeEnabled) { - Surface(color = OudsColorKeyToken.BgPrimary.value, content = content) // Add a surface to be able to see components + Surface(color = OudsColorBackgroundKeyToken.Primary.value, content = content) // Add a surface to be able to see components } } 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 6622d276..fca887e1 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 @@ -12,207 +12,234 @@ package com.orange.ouds.theme.tokens -enum class OudsColorKeyToken { +enum class OudsColorGlobalKeyToken { TransparentDefault, - ActionDisabled, - ActionDisabledOnBgEmphasized, - ActionNegativeEnabled, - ActionNegativeFocus, - ActionNegativeHover, - ActionNegativeLoading, - ActionNegativePressed, - ActionPrimaryEnabled, - ActionPrimaryEnabledOnBgEmphasized, - ActionPrimaryFocus, - ActionPrimaryFocusOnBgEmphasized, - ActionPrimaryHover, - ActionPrimaryHoverOnBgEmphasized, - ActionPrimaryLoading, - ActionPrimaryLoadingOnBgEmphasized, - ActionPrimaryPressed, - ActionPrimaryPressedOnBgEmphasized, - ActionSecondaryEnabled, - ActionSecondaryEnabledOnBgEmphasized, - ActionSecondaryFocus, - ActionSecondaryFocusOnBgEmphasized, - ActionSecondaryHover, - ActionSecondaryHoverOnBgEmphasized, - ActionSecondaryLoading, - ActionSecondaryLoadingOnBgEmphasized, - ActionSecondaryPressed, - ActionSecondaryPressedOnBgEmphasized, - ActionSelected, - ActionSelectedOnBgEmphasized, - ActionVisited, - ActionVisitedOnBgEmphasized, - AlwaysAccent, - AlwaysBlack, - AlwaysInfo, - AlwaysNegative, - AlwaysOnAccent, - AlwaysOnBlack, - AlwaysOnInfo, - AlwaysOnNegative, - AlwaysOnPositive, - AlwaysOnWarning, - AlwaysOnWhite, - AlwaysPositive, - AlwaysWarning, - AlwaysWhite, - BgBrandPrimary, - BgEmphasized, - BgPrimary, - BgSecondary, - BgStatusAccentEmphasized, - BgStatusAccentMuted, - BgStatusAccentMutedOnBgEmphasized, - BgStatusInfoEmphasized, - BgStatusInfoMuted, - BgStatusInfoMutedOnBgEmphasized, - BgStatusNegativeEmphasized, - BgStatusNegativeMuted, - BgStatusNegativeMutedOnBgEmphasized, - BgStatusNeutral, - BgStatusNeutralOnBgEmphasized, - BgStatusPositiveEmphasized, - BgStatusPositiveMuted, - BgStatusPositiveMutedOnBgEmphasized, - BgStatusWarningEmphasized, - BgStatusWarningMuted, - BgStatusWarningMutedOnBgEmphasized, - BgTertiary, - BorderBrandPrimary, - BorderBrandPrimaryOnBgEmphasized, - BorderDefault, - BorderDefaultOnBgEmphasized, - BorderEmphasized, - BorderEmphasizedOnBgEmphasized, - BorderFocus, - BorderFocusInset, - BorderFocusInsetOnBgEmphasized, - BorderFocusOnBgEmphasized, - BorderOnBrandPrimary, - BrandAccentDefault, - BrandAccentHigh, - BrandAccentHighest, - BrandAccentLowest, - BrandInfoDefault, - BrandInfoHighest, - BrandInfoLowest, - BrandNegativeDefault, - BrandNegativeHigh, - BrandNegativeHigher, - BrandNegativeHighest, - BrandNegativeLowest, - BrandNeutralEmphasizedBlack, - BrandNeutralEmphasizedHigh, - BrandNeutralEmphasizedHigher, - BrandNeutralEmphasizedHighest, - BrandNeutralEmphasizedLow, - BrandNeutralEmphasizedLower, - BrandNeutralEmphasizedLowest, - BrandNeutralEmphasizedMedium, - BrandNeutralMutedHighest, - BrandNeutralMutedLow, - BrandNeutralMutedLower, - BrandNeutralMutedLowest, - BrandNeutralMutedMedium, - BrandNeutralMutedWhite, - BrandPositiveDefault, - BrandPositiveHighest, - BrandPositiveLowest, - BrandPrimaryDefault, - BrandPrimaryLow, - BrandWarningDefault, - BrandWarningHigh, - BrandWarningHighest, - BrandWarningLowest, - ContentBrandPrimary, - ContentBrandPrimaryOnBgEmphasized, - ContentDefault, - ContentDefaultOnBgEmphasized, - ContentDisabled, - ContentDisabledOnBgEmphasized, - ContentMuted, - ContentMutedOnBgEmphasized, - ContentOnActionDisabled, - ContentOnActionDisabledOnBgEmphasized, - ContentOnActionNegative, - ContentOnActionPrimaryEnabled, - ContentOnActionPrimaryEnabledOnBgEmphasized, - ContentOnActionPrimaryFocus, - ContentOnActionPrimaryFocusOnBgEmphasized, - ContentOnActionPrimaryHover, - ContentOnActionPrimaryHoverOnBgEmphasized, - ContentOnActionPrimaryLoading, - ContentOnActionPrimaryLoadingOnBgEmphasized, - ContentOnActionPrimaryPressed, - ContentOnActionPrimaryPressedOnBgEmphasized, - ContentOnBrandPrimary, - ContentOnStatusAccentEmphasized, - ContentOnStatusAccentMuted, - ContentOnStatusAccentMutedOnBgEmphasized, - ContentOnStatusInfoEmphasized, - ContentOnStatusInfoMuted, - ContentOnStatusInfoMutedOnBgEmphasized, - ContentOnStatusNegativeEmphasized, - ContentOnStatusNegativeMuted, - ContentOnStatusNegativeMutedOnBgEmphasized, - ContentOnStatusPositiveEmphasized, - ContentOnStatusPositiveMuted, - ContentOnStatusPositiveMutedOnBgEmphasized, - ContentOnStatusWarningEmphasized, - ContentOnStatusWarningMuted, - ContentOnStatusWarningMutedOnBgEmphasized, - ContentStatusInfo, - ContentStatusNegative, - ContentStatusPositive, - ContentStatusWarning, - ElevationDrag, - ElevationDragOnBgEmphasized, - ElevationDragOnBgSecondary, - ElevationModal, - ElevationOverlayDefault, - ElevationOverlayDefaultOnBgEmphasized, - ElevationOverlayDefaultOnBgSecondary, - ElevationOverlayEmphasized, - ElevationOverlayEmphasizedOnBgEmphasized, - ElevationOverlayEmphasizedOnBgSecondary, - ElevationRaised, - ElevationRaisedOnBgEmphasized, - ElevationRaisedOnBgSecondary, - GradientSkeletonMiddle, - GradientSkeletonMiddleOnBgEmphasized, - GradientSkeletonStartEnd, - GradientSkeletonStartEndOnBgEmphasized, - DecorativeAccent1Default, - DecorativeAccent1Emphasized, - DecorativeAccent1Muted, - DecorativeAccent2Default, - DecorativeAccent2Emphasized, - DecorativeAccent2Muted, - DecorativeAccent3Default, - DecorativeAccent3Emphasized, - DecorativeAccent3Muted, - DecorativeAccent4Default, - DecorativeAccent4Emphasized, - DecorativeAccent4Muted, - DecorativeAccent5Default, - DecorativeAccent5Emphasized, - DecorativeAccent5Muted, - DecorativeBrandPrimary, - DecorativeBrandSecondary, - DecorativeBrandTertiary, - DecorativeNeutralDefault, - DecorativeNeutralEmphasized, - DecorativeNeutralMuted, - DecorativeSkinTint100, - DecorativeSkinTint200, - DecorativeSkinTint300, - DecorativeSkinTint400, - DecorativeSkinTint500, - DecorativeSkinTint600, - DecorativeSkinTint700, - DecorativeSkinTint800, - DecorativeSkinTint900, +} + +enum class OudsColorActionKeyToken { + Disabled, + DisabledOnBgEmphasized, + NegativeEnabled, + NegativeFocus, + NegativeHover, + NegativeLoading, + NegativePressed, + PrimaryEnabled, + PrimaryEnabledOnBgEmphasized, + PrimaryFocus, + PrimaryFocusOnBgEmphasized, + PrimaryHover, + PrimaryHoverOnBgEmphasized, + PrimaryLoading, + PrimaryLoadingOnBgEmphasized, + PrimaryPressed, + PrimaryPressedOnBgEmphasized, + SecondaryEnabled, + SecondaryEnabledOnBgEmphasized, + SecondaryFocus, + SecondaryFocusOnBgEmphasized, + SecondaryHover, + SecondaryHoverOnBgEmphasized, + SecondaryLoading, + SecondaryLoadingOnBgEmphasized, + SecondaryPressed, + SecondaryPressedOnBgEmphasized, + Selected, + SelectedOnBgEmphasized, + Visited, + VisitedOnBgEmphasized, +} + +enum class OudsColorAlwaysKeyToken { + Accent, + Black, + Info, + Negative, + OnAccent, + OnBlack, + OnInfo, + OnNegative, + OnPositive, + OnWarning, + OnWhite, + Positive, + Warning, + White, +} + +enum class OudsColorBackgroundKeyToken { + BrandPrimary, + Emphasized, + Primary, + Secondary, + StatusAccentEmphasized, + StatusAccentMuted, + StatusAccentMutedOnBgEmphasized, + StatusInfoEmphasized, + StatusInfoMuted, + StatusInfoMutedOnBgEmphasized, + StatusNegativeEmphasized, + StatusNegativeMuted, + StatusNegativeMutedOnBgEmphasized, + StatusNeutral, + StatusNeutralOnBgEmphasized, + StatusPositiveEmphasized, + StatusPositiveMuted, + StatusPositiveMutedOnBgEmphasized, + StatusWarningEmphasized, + StatusWarningMuted, + StatusWarningMutedOnBgEmphasized, + Tertiary, +} + +enum class OudsColorBorderKeyToken { + BrandPrimary, + BrandPrimaryOnBgEmphasized, + Default, + DefaultOnBgEmphasized, + Emphasized, + EmphasizedOnBgEmphasized, + Focus, + FocusInset, + FocusInsetOnBgEmphasized, + FocusOnBgEmphasized, + OnBrandPrimary, +} + +enum class OudsColorBrandKeyToken { + AccentDefault, + AccentHigh, + AccentHighest, + AccentLowest, + InfoDefault, + InfoHighest, + InfoLowest, + NegativeDefault, + NegativeHigh, + NegativeHigher, + NegativeHighest, + NegativeLowest, + NeutralEmphasizedBlack, + NeutralEmphasizedHigh, + NeutralEmphasizedHigher, + NeutralEmphasizedHighest, + NeutralEmphasizedLow, + NeutralEmphasizedLower, + NeutralEmphasizedLowest, + NeutralEmphasizedMedium, + NeutralMutedHighest, + NeutralMutedLow, + NeutralMutedLower, + NeutralMutedLowest, + NeutralMutedMedium, + NeutralMutedWhite, + PositiveDefault, + PositiveHighest, + PositiveLowest, + PrimaryDefault, + PrimaryLow, + WarningDefault, + WarningHigh, + WarningHighest, + WarningLowest, +} + +enum class OudsColorContentKeyToken { + BrandPrimary, + BrandPrimaryOnBgEmphasized, + Default, + DefaultOnBgEmphasized, + Disabled, + DisabledOnBgEmphasized, + Muted, + MutedOnBgEmphasized, + OnActionDisabled, + OnActionDisabledOnBgEmphasized, + OnActionNegative, + OnActionPrimaryEnabled, + OnActionPrimaryEnabledOnBgEmphasized, + OnActionPrimaryFocus, + OnActionPrimaryFocusOnBgEmphasized, + OnActionPrimaryHover, + OnActionPrimaryHoverOnBgEmphasized, + OnActionPrimaryLoading, + OnActionPrimaryLoadingOnBgEmphasized, + OnActionPrimaryPressed, + OnActionPrimaryPressedOnBgEmphasized, + OnBrandPrimary, + OnStatusAccentEmphasized, + OnStatusAccentMuted, + OnStatusAccentMutedOnBgEmphasized, + OnStatusInfoEmphasized, + OnStatusInfoMuted, + OnStatusInfoMutedOnBgEmphasized, + OnStatusNegativeEmphasized, + OnStatusNegativeMuted, + OnStatusNegativeMutedOnBgEmphasized, + OnStatusPositiveEmphasized, + OnStatusPositiveMuted, + OnStatusPositiveMutedOnBgEmphasized, + OnStatusWarningEmphasized, + OnStatusWarningMuted, + OnStatusWarningMutedOnBgEmphasized, + StatusInfo, + StatusNegative, + StatusPositive, + StatusWarning, +} + +enum class OudsColorElevationKeyToken { + Drag, + DragOnBgEmphasized, + DragOnBgSecondary, + Modal, + OverlayDefault, + OverlayDefaultOnBgEmphasized, + OverlayDefaultOnBgSecondary, + OverlayEmphasized, + OverlayEmphasizedOnBgEmphasized, + OverlayEmphasizedOnBgSecondary, + Raised, + RaisedOnBgEmphasized, + RaisedOnBgSecondary, +} + +enum class OudsColorGradientKeyToken { + SkeletonMiddle, + SkeletonMiddleOnBgEmphasized, + SkeletonStartEnd, + SkeletonStartEndOnBgEmphasized, +} + +enum class OudsColorDecorativeKeyToken { + Accent1Default, + Accent1Emphasized, + Accent1Muted, + Accent2Default, + Accent2Emphasized, + Accent2Muted, + Accent3Default, + Accent3Emphasized, + Accent3Muted, + Accent4Default, + Accent4Emphasized, + Accent4Muted, + Accent5Default, + Accent5Emphasized, + Accent5Muted, + BrandPrimary, + BrandSecondary, + BrandTertiary, + NeutralDefault, + NeutralEmphasized, + NeutralMuted, + SkinTint100, + SkinTint200, + SkinTint300, + SkinTint400, + SkinTint500, + SkinTint600, + SkinTint700, + SkinTint800, + SkinTint900, } \ No newline at end of file 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 60927eb3..d309a35a 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 @@ -13,16 +13,18 @@ package com.orange.ouds.theme.tokens.components import com.orange.ouds.theme.tokens.OudsBorderRadiusKeyToken -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorActionKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken +import com.orange.ouds.theme.tokens.OudsColorContentKeyToken import com.orange.ouds.theme.tokens.OudsElevationKeyToken import com.orange.ouds.theme.tokens.OudsSpaceFixedKeyToken import com.orange.ouds.theme.tokens.OudsTypographyKeyToken open class OudsButtonTokens( - val containerColor: OudsColorKeyToken = OudsColorKeyToken.BgBrandPrimary, - val contentColor: OudsColorKeyToken = OudsColorKeyToken.ContentBrandPrimary, - val disabledContainerColor: OudsColorKeyToken = OudsColorKeyToken.ActionDisabled, - val disabledContentColor: OudsColorKeyToken = OudsColorKeyToken.ContentDisabled, + val containerColor: OudsColorBackgroundKeyToken = OudsColorBackgroundKeyToken.BrandPrimary, + val contentColor: OudsColorContentKeyToken = OudsColorContentKeyToken.BrandPrimary, + val disabledContainerColor: OudsColorActionKeyToken = OudsColorActionKeyToken.Disabled, + val disabledContentColor: OudsColorContentKeyToken = OudsColorContentKeyToken.Disabled, val cornerRadius: OudsBorderRadiusKeyToken = OudsBorderRadiusKeyToken.None, val defaultElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, val pressedElevation: OudsElevationKeyToken = OudsElevationKeyToken.None, 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 8935e3e3..2d23583e 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 @@ -15,7 +15,7 @@ package com.orange.ouds.theme.orangecountry import androidx.compose.ui.graphics.Color import com.orange.ouds.theme.orange.OrangeTheme import com.orange.ouds.theme.tokens.OudsBorderRadiusKeyToken -import com.orange.ouds.theme.tokens.OudsColorKeyToken +import com.orange.ouds.theme.tokens.OudsColorBackgroundKeyToken import com.orange.ouds.theme.tokens.components.OudsButtonTokens import com.orange.ouds.theme.tokens.components.OudsComponentsTokens import com.orange.ouds.theme.tokens.semantic.OudsColorBgSemanticTokens @@ -38,6 +38,6 @@ class OrangeCountryTheme : OrangeTheme() { override val componentsTokens: OudsComponentsTokens get() = OudsComponentsTokens( - button = OudsButtonTokens(containerColor = OudsColorKeyToken.BgStatusAccentEmphasized, cornerRadius = OudsBorderRadiusKeyToken.Short) + button = OudsButtonTokens(containerColor = OudsColorBackgroundKeyToken.StatusAccentEmphasized, cornerRadius = OudsBorderRadiusKeyToken.Short) ) } \ No newline at end of file