From f14e4f393f7996cabe751f6a34cb562056f39f41 Mon Sep 17 00:00:00 2001 From: boosted-bot Date: Fri, 13 Dec 2024 11:35:13 +0100 Subject: [PATCH 1/2] chore: update tokens --- .../semantic/OudsElevationSemanticTokens.kt | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsElevationSemanticTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsElevationSemanticTokens.kt index 3d01db70..51494f52 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsElevationSemanticTokens.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsElevationSemanticTokens.kt @@ -1,24 +1,26 @@ -/* - * 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.semantic import com.orange.ouds.tokens.global.raw.ElevationRawTokens data class OudsElevationSemanticTokens( + val drag: Float = ElevationRawTokens.elevation4, val none: Float = ElevationRawTokens.elevation0, - val raised: Float = ElevationRawTokens.elevation1, val overlayDefault: Float = ElevationRawTokens.elevation2, - val allSticky: Float = ElevationRawTokens.elevation3, - val drag: Float = ElevationRawTokens.elevation4, val overlayEmphasized: Float = ElevationRawTokens.elevation5, -) \ No newline at end of file + val raised: Float = ElevationRawTokens.elevation1, + val stickyDefault: Float = ElevationRawTokens.elevation3, + val stickyEmphasized: Float = ElevationRawTokens.elevation3, + val stickyNavigationScrolled: Float = ElevationRawTokens.elevation3 +) From 8ef9edbc4500fb43863d467f3e5d745dce9cd6b3 Mon Sep 17 00:00:00 2001 From: Florent Maitre Date: Fri, 13 Dec 2024 11:51:04 +0100 Subject: [PATCH 2/2] Update OudsElevationKeyToken and OudsElevation --- .../com/orange/ouds/core/theme/OudsElevations.kt | 12 +++++++++--- .../ouds/theme/tokens/OudsElevationKeyToken.kt | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt index c3a12817..5581c59d 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt @@ -24,7 +24,9 @@ data class OudsElevations( val none: Dp, val raised: Dp, val overlayDefault: Dp, - val allSticky: Dp, + val stickyDefault: Dp, + val stickyEmphasized: Dp, + val stickyNavigationScrolled: Dp, val drag: Dp, val overlayEmphasized: Dp, ) @@ -33,7 +35,9 @@ fun OudsElevationSemanticTokens.getElevation() = OudsElevations( none = none.dp, raised = raised.dp, overlayDefault = overlayDefault.dp, - allSticky = allSticky.dp, + stickyDefault = stickyDefault.dp, + stickyEmphasized = stickyEmphasized.dp, + stickyNavigationScrolled = stickyNavigationScrolled.dp, drag = drag.dp, overlayEmphasized = overlayEmphasized.dp ) @@ -44,7 +48,9 @@ fun OudsElevations.fromToken(token: OudsElevationKeyToken): Dp { OudsElevationKeyToken.None -> none OudsElevationKeyToken.Raised -> raised OudsElevationKeyToken.OverlayDefault -> overlayDefault - OudsElevationKeyToken.AllSticky -> allSticky + OudsElevationKeyToken.StickyDefault -> stickyDefault + OudsElevationKeyToken.StickyEmphasized -> stickyEmphasized + OudsElevationKeyToken.StickyNavigationScrolled -> stickyNavigationScrolled OudsElevationKeyToken.Drag -> drag OudsElevationKeyToken.OverlayEmphasized -> overlayEmphasized } diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt index 0e534f37..403b8dd4 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt @@ -17,7 +17,9 @@ sealed interface OudsElevationKeyToken { data object None : OudsElevationKeyToken data object Raised : OudsElevationKeyToken data object OverlayDefault : OudsElevationKeyToken - data object AllSticky : OudsElevationKeyToken + data object StickyDefault : OudsElevationKeyToken + data object StickyEmphasized : OudsElevationKeyToken + data object StickyNavigationScrolled : OudsElevationKeyToken data object Drag : OudsElevationKeyToken data object OverlayEmphasized : OudsElevationKeyToken } \ No newline at end of file