Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update tokens #235

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
)
Loading