diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/ColorScheme.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/ColorScheme.kt index c33c10eb69..949237b62c 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/ColorScheme.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/ColorScheme.kt @@ -114,6 +114,7 @@ data class ColorScheme( val highlightPurpleFill1: Color, val highlightPurpleFill2: Color, val highlightPurpleFill3: Color, + val scrim: Color, val transparent: Color, ) @@ -219,6 +220,7 @@ internal val lightColorScheme: ColorScheme = ColorScheme( highlightPurpleFill1 = ColorLightTokens.HighlightPurpleFill1, highlightPurpleFill2 = ColorLightTokens.HighlightPurpleFill2, highlightPurpleFill3 = ColorLightTokens.HighlightPurpleFill3, + scrim = ColorLightTokens.Scrim, transparent = ColorLightTokens.Transparent, ) @@ -324,6 +326,7 @@ internal val darkColorScheme: ColorScheme = ColorScheme( highlightRedFill1 = ColorDarkTokens.HighlightRedFill1, highlightRedFill2 = ColorDarkTokens.HighlightRedFill2, highlightRedFill3 = ColorDarkTokens.HighlightRedFill3, + scrim = ColorDarkTokens.Scrim, transparent = ColorDarkTokens.Transparent, ) @@ -455,6 +458,7 @@ internal fun ColorScheme.fromToken(value: ColorSchemeKeyTokens): Color { ColorSchemeKeyTokens.HighlightPurpleFill1 -> highlightPurpleFill1 ColorSchemeKeyTokens.HighlightPurpleFill2 -> highlightPurpleFill2 ColorSchemeKeyTokens.HighlightPurpleFill3 -> highlightPurpleFill3 + ColorSchemeKeyTokens.Scrim -> scrim ColorSchemeKeyTokens.Transparent -> transparent } } diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/HedvigBottomSheet.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/HedvigBottomSheet.kt index d8c287261c..1a24e14bc6 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/HedvigBottomSheet.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/HedvigBottomSheet.kt @@ -40,6 +40,7 @@ import com.hedvig.android.design.system.hedvig.ButtonDefaults.ButtonStyle.Ghost import com.hedvig.android.design.system.hedvig.icon.ArrowDown import com.hedvig.android.design.system.hedvig.icon.HedvigIcons import com.hedvig.android.design.system.hedvig.tokens.BottomSheetTokens +import com.hedvig.android.design.system.hedvig.tokens.ScrimTokens import eu.wewox.modalsheet.ExperimentalSheetApi import eu.wewox.modalsheet.ModalSheet @@ -272,7 +273,7 @@ internal val bottomSheetColors: BottomSheetColors get() = with(HedvigTheme.colorScheme) { remember(this) { BottomSheetColors( - scrimColor = fromToken(BottomSheetTokens.ScrimColor), + scrimColor = fromToken(ScrimTokens.ContainerColor).copy(ScrimTokens.ContainerOpacity), bottomSheetBackgroundColor = fromToken(BottomSheetTokens.BottomSheetBackgroundColor), contentColor = fromToken(BottomSheetTokens.ContentColor), chipColor = fromToken(BottomSheetTokens.UpperChipColor), diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/BottomSheetTokens.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/BottomSheetTokens.kt index 68e581cf20..0ceba5cd71 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/BottomSheetTokens.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/BottomSheetTokens.kt @@ -3,7 +3,6 @@ package com.hedvig.android.design.system.hedvig.tokens import androidx.compose.ui.unit.dp internal object BottomSheetTokens { - val ScrimColor = ColorSchemeKeyTokens.SurfacePrimary val UpperChipColor = ColorSchemeKeyTokens.SurfaceSecondary val ArrowColor = ColorSchemeKeyTokens.FillNegative val ArrowColorBackground = ColorSchemeKeyTokens.FillPrimary diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorDarkTokens.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorDarkTokens.kt index 4ab3541273..643ff7b459 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorDarkTokens.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorDarkTokens.kt @@ -104,5 +104,6 @@ internal object ColorDarkTokens { val HighlightPurpleFill1: Color = PaletteTokens.Purple200 val HighlightPurpleFill2: Color = PaletteTokens.Purple300 val HighlightPurpleFill3: Color = PaletteTokens.Purple500 + val Scrim: Color = PaletteTokens.G100 val Transparent: Color = PaletteTokens.Transparent } diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorLightTokens.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorLightTokens.kt index 58d0b0dc24..6c2d49ba40 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorLightTokens.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorLightTokens.kt @@ -104,5 +104,6 @@ internal object ColorLightTokens { val HighlightPurpleFill1: Color = PaletteTokens.Purple100 val HighlightPurpleFill2: Color = PaletteTokens.Purple200 val HighlightPurpleFill3: Color = PaletteTokens.Purple300 + val Scrim: Color = PaletteTokens.Neutral val Transparent: Color = PaletteTokens.Transparent } diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorSchemeKeyTokens.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorSchemeKeyTokens.kt index 9fb8745d7a..3898cf3e84 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorSchemeKeyTokens.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ColorSchemeKeyTokens.kt @@ -103,5 +103,6 @@ internal enum class ColorSchemeKeyTokens { HighlightPurpleFill1, HighlightPurpleFill2, HighlightPurpleFill3, + Scrim, Transparent, } diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/PaletteTokens.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/PaletteTokens.kt index 00fe02ffc5..a0f91ed1ab 100644 --- a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/PaletteTokens.kt +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/PaletteTokens.kt @@ -144,5 +144,6 @@ internal object PaletteTokens { val Purple800 = Color(0xFF54446A) val Purple900 = Color(0xFF3D2D53) + val Neutral = Color(0xFF000000) val Transparent = Color.Transparent } diff --git a/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ScrimTokens.kt b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ScrimTokens.kt new file mode 100644 index 0000000000..c026993b17 --- /dev/null +++ b/app/design-system/design-system-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/tokens/ScrimTokens.kt @@ -0,0 +1,6 @@ +package com.hedvig.android.design.system.hedvig.tokens + +internal object ScrimTokens { + val ContainerColor = ColorSchemeKeyTokens.Scrim + const val ContainerOpacity = 0.32f +}