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 ea1414914..d3b7b695f 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 @@ -218,9 +218,11 @@ val OudsElevationKeyToken.order: Int OudsElevationKeyToken.None -> 0 OudsElevationKeyToken.Raised -> 1 OudsElevationKeyToken.OverlayDefault -> 2 - OudsElevationKeyToken.AllSticky -> 3 - OudsElevationKeyToken.Drag -> 4 - OudsElevationKeyToken.OverlayEmphasized -> 5 + OudsElevationKeyToken.StickyDefault -> 3 + OudsElevationKeyToken.StickyEmphasized -> 4 + OudsElevationKeyToken.StickyNavigationScrolled -> 5 + OudsElevationKeyToken.Drag -> 6 + OudsElevationKeyToken.OverlayEmphasized -> 7 } val OudsOpacityKeyToken.order: Int @@ -263,12 +265,14 @@ val OudsSizeKeyToken.Icon.order: Int 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.Small.SizeExtraSmall -> 80 + OudsSizeKeyToken.Icon.WithLabel.Small.SizeSmall -> 81 + OudsSizeKeyToken.Icon.WithLabel.Small.SizeMedium -> 82 + OudsSizeKeyToken.Icon.WithLabel.Small.SizeLarge -> 83 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeExtraSmall -> 90 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeSmall -> 91 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeMedium -> 92 + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeLarge -> 93 OudsSizeKeyToken.Icon.WithLabel.Large.SizeExtraSmall -> 100 OudsSizeKeyToken.Icon.WithLabel.Large.SizeSmall -> 101 OudsSizeKeyToken.Icon.WithLabel.Large.SizeMedium -> 102 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 2079587f6..9997043eb 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 @@ -142,8 +142,9 @@ data class OudsColorScheme( ) data class Opacity( - val invisibleBlack: Color, - val invisibleWhite: Color + val transparent: Color, + val lowest: Color, + val lower: Color, ) data class Overlay( @@ -337,8 +338,9 @@ val OudsColorSemanticTokens.lightColorScheme: OudsColorScheme }, opacityColors = with(opacityColorTokens) { OudsColorScheme.Opacity( - invisibleBlack = opacityInvisibleBlackLight, - invisibleWhite = opacityInvisibleWhiteLight, + transparent = opacityTransparentLight, + lowest = opacityLowestLight, + lower = opacityLowerLight, ) }, overlayColors = with(overlayColorTokens) { @@ -535,8 +537,9 @@ val OudsColorSemanticTokens.darkColorScheme: OudsColorScheme }, opacityColors = with(opacityColorTokens) { OudsColorScheme.Opacity( - invisibleBlack = opacityInvisibleBlackDark, - invisibleWhite = opacityInvisibleWhiteDark, + transparent = opacityTransparentDark, + lowest = opacityLowestDark, + lower = opacityLowerDark, ) }, overlayColors = with(overlayColorTokens) { @@ -661,13 +664,13 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Always): Color { } @Stable -fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Background): Color { +fun OudsColorScheme.fromToken(token: Background): Color { return with(backgroundColors) { when (token) { - OudsColorKeyToken.Background.Emphasized -> emphasized - OudsColorKeyToken.Background.Primary -> primary - OudsColorKeyToken.Background.Secondary -> secondary - OudsColorKeyToken.Background.Tertiary -> tertiary + Background.Emphasized -> emphasized + Background.Primary -> primary + Background.Secondary -> secondary + Background.Tertiary -> tertiary } } } @@ -836,8 +839,9 @@ fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Surface): Color { @Stable fun OudsColorScheme.fromToken(token: OudsColorKeyToken.Opacity): Color { return when (token) { - OudsColorKeyToken.Opacity.Invisible.Black -> opacityColors.invisibleBlack - OudsColorKeyToken.Opacity.Invisible.White -> opacityColors.invisibleWhite + OudsColorKeyToken.Opacity.Lower -> opacityColors.lower + OudsColorKeyToken.Opacity.Lowest -> opacityColors.lowest + OudsColorKeyToken.Opacity.Transparent -> opacityColors.transparent } } @@ -946,7 +950,7 @@ val OudsColorKeyToken.value: Color get() = when (this) { is OudsColorKeyToken.Action -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Always -> OudsTheme.colorScheme.fromToken(this) - is OudsColorKeyToken.Background -> OudsTheme.colorScheme.fromToken(this) + is Background -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Border -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Content -> OudsTheme.colorScheme.fromToken(this) is OudsColorKeyToken.Decorative -> OudsTheme.colorScheme.fromToken(this) 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 b68045a9b..d68a555b9 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 @@ -80,12 +80,14 @@ data class OudsSizes( val extraLarge: ExtraLarge ) { data class Small( + val sizeExtraSmall: Dp, val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) data class Medium( + val sizeExtraSmall: Dp, val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, @@ -240,11 +242,13 @@ fun OudsSizeSemanticTokens.getSizes() = OudsSizes( ), withLabel = OudsSizes.Icon.WithLabel( small = OudsSizes.Icon.WithLabel.Small( + sizeExtraSmall = iconWithLabelSmallSizeXs.dp, sizeSmall = iconWithLabelSmallSizeSm.dp, sizeMedium = iconWithLabelSmallSizeMd.dp, sizeLarge = iconWithLabelSmallSizeLg.dp, ), medium = OudsSizes.Icon.WithLabel.Medium( + sizeExtraSmall = iconWithLabelMediumSizeXs.dp, sizeSmall = iconWithLabelMediumSizeSm.dp, sizeMedium = iconWithLabelMediumSizeMd.dp, sizeLarge = iconWithLabelMediumSizeLg.dp, @@ -475,6 +479,7 @@ fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Large): Dp { @Stable fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Medium): Dp { return when (token) { + OudsSizeKeyToken.Icon.WithLabel.Medium.SizeExtraSmall -> icon.withLabel.medium.sizeExtraSmall 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 @@ -484,6 +489,7 @@ fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Medium): Dp { @Stable fun OudsSizes.fromToken(token: OudsSizeKeyToken.Icon.WithLabel.Small): Dp { return when (token) { + OudsSizeKeyToken.Icon.WithLabel.Small.SizeExtraSmall -> icon.withLabel.small.sizeExtraSmall 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