From 6e5f69eb33b8f7b74c5cca3701becda8990691c6 Mon Sep 17 00:00:00 2001 From: "OUDS Bot [bot]" <130566815+boosted-bot@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:01:22 +0100 Subject: [PATCH] chore: update tokens (#235) --- .../orange/ouds/core/theme/OudsElevations.kt | 12 +++++-- .../theme/tokens/OudsElevationKeyToken.kt | 4 ++- .../semantic/OudsElevationSemanticTokens.kt | 32 ++++++++++--------- 3 files changed, 29 insertions(+), 19 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 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 +)