Skip to content

Commit

Permalink
chore: update tokens (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
boosted-bot authored Dec 16, 2024
1 parent 766bfbc commit 6e5f69e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
12 changes: 9 additions & 3 deletions core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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
)
Expand All @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
@@ -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,
)
val raised: Float = ElevationRawTokens.elevation1,
val stickyDefault: Float = ElevationRawTokens.elevation3,
val stickyEmphasized: Float = ElevationRawTokens.elevation3,
val stickyNavigationScrolled: Float = ElevationRawTokens.elevation3
)

0 comments on commit 6e5f69e

Please sign in to comment.