diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt index 024d1c5..397ac04 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt @@ -75,6 +75,21 @@ internal val compoundColorsLight = SemanticColors( iconSuccessPrimary = LightColorTokens.colorGreen900, iconInfoPrimary = LightColorTokens.colorBlue900, iconOnSolidPrimary = LightColorTokens.colorThemeBg, + bgAccentRest = LightColorTokens.colorGreen900, + bgAccentHovered = LightColorTokens.colorGreen1000, + bgAccentPressed = LightColorTokens.colorGreen1100, + bgDecorative1 = LightColorTokens.colorLime300, + bgDecorative2 = LightColorTokens.colorCyan300, + bgDecorative3 = LightColorTokens.colorFuchsia300, + bgDecorative4 = LightColorTokens.colorPurple300, + bgDecorative5 = LightColorTokens.colorPink300, + bgDecorative6 = LightColorTokens.colorOrange300, + textDecorative1 = LightColorTokens.colorLime1100, + textDecorative2 = LightColorTokens.colorCyan1100, + textDecorative3 = LightColorTokens.colorFuchsia1100, + textDecorative4 = LightColorTokens.colorPurple1100, + textDecorative5 = LightColorTokens.colorPink1100, + textDecorative6 = LightColorTokens.colorOrange1100, isLight = true, ) @@ -133,5 +148,20 @@ internal val compoundColorsDark = SemanticColors( iconSuccessPrimary = DarkColorTokens.colorGreen900, iconInfoPrimary = DarkColorTokens.colorBlue900, iconOnSolidPrimary = DarkColorTokens.colorThemeBg, + bgAccentRest = LightColorTokens.colorGreen900, + bgAccentHovered = LightColorTokens.colorGreen1000, + bgAccentPressed = LightColorTokens.colorGreen1100, + bgDecorative1 = LightColorTokens.colorLime300, + bgDecorative2 = LightColorTokens.colorCyan300, + bgDecorative3 = LightColorTokens.colorFuchsia300, + bgDecorative4 = LightColorTokens.colorPurple300, + bgDecorative5 = LightColorTokens.colorPink300, + bgDecorative6 = LightColorTokens.colorOrange300, + textDecorative1 = LightColorTokens.colorLime1100, + textDecorative2 = LightColorTokens.colorCyan1100, + textDecorative3 = LightColorTokens.colorFuchsia1100, + textDecorative4 = LightColorTokens.colorPurple1100, + textDecorative5 = LightColorTokens.colorPink1100, + textDecorative6 = LightColorTokens.colorOrange1100, isLight = false, ) diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt index fd12391..fb6e68c 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt @@ -433,6 +433,9 @@ object CompoundIcons { @Composable fun TakePhoto(): ImageVector { return ImageVector.vectorResource(R.drawable.ic_compound_take_photo) } + @Composable fun TakePhotoSolid(): ImageVector { + return ImageVector.vectorResource(R.drawable.ic_compound_take_photo_solid) + } @Composable fun TextFormatting(): ImageVector { return ImageVector.vectorResource(R.drawable.ic_compound_text_formatting) } @@ -521,7 +524,7 @@ object CompoundIcons { return ImageVector.vectorResource(R.drawable.ic_compound_web_browser) } - val all @Composable get() = persistentListOf( + val all @Composable get() = persistentListOf( Admin(), ArrowDown(), ArrowLeft(), @@ -658,6 +661,7 @@ object CompoundIcons { Strikethrough(), SwitchCameraSolid(), TakePhoto(), + TakePhotoSolid(), TextFormatting(), Threads(), ThreadsSolid(), @@ -826,6 +830,7 @@ object CompoundIcons { R.drawable.ic_compound_strikethrough, R.drawable.ic_compound_switch_camera_solid, R.drawable.ic_compound_take_photo, + R.drawable.ic_compound_take_photo_solid, R.drawable.ic_compound_text_formatting, R.drawable.ic_compound_threads, R.drawable.ic_compound_threads_solid, diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt index 4c27f49..04b020c 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,9 @@ import androidx.compose.ui.graphics.Color */ @Stable class SemanticColors( + bgAccentHovered: Color, + bgAccentPressed: Color, + bgAccentRest: Color, bgActionPrimaryDisabled: Color, bgActionPrimaryHovered: Color, bgActionPrimaryPressed: Color, @@ -45,6 +48,12 @@ class SemanticColors( bgCriticalPrimary: Color, bgCriticalSubtle: Color, bgCriticalSubtleHovered: Color, + bgDecorative1: Color, + bgDecorative2: Color, + bgDecorative3: Color, + bgDecorative4: Color, + bgDecorative5: Color, + bgDecorative6: Color, bgInfoSubtle: Color, bgSubtlePrimary: Color, bgSubtleSecondary: Color, @@ -76,6 +85,12 @@ class SemanticColors( textActionAccent: Color, textActionPrimary: Color, textCriticalPrimary: Color, + textDecorative1: Color, + textDecorative2: Color, + textDecorative3: Color, + textDecorative4: Color, + textDecorative5: Color, + textDecorative6: Color, textDisabled: Color, textInfoPrimary: Color, textLinkExternal: Color, @@ -88,6 +103,15 @@ class SemanticColors( ) { var isLight by mutableStateOf(isLight) private set + /** Background colour for accent or brand actions. State: Hover */ + var bgAccentHovered by mutableStateOf(bgAccentHovered) + private set + /** Background colour for accent or brand actions. State: Pressed */ + var bgAccentPressed by mutableStateOf(bgAccentPressed) + private set + /** Background colour for accent or brand actions. State: Rest. */ + var bgAccentRest by mutableStateOf(bgAccentRest) + private set /** Background colour for primary actions. State: Disabled. */ var bgActionPrimaryDisabled by mutableStateOf(bgActionPrimaryDisabled) private set @@ -128,6 +152,24 @@ Elevation: Default (Level 0) */ /** Default subtle critical surfaces. State: Hover. */ var bgCriticalSubtleHovered by mutableStateOf(bgCriticalSubtleHovered) private set + /** Decorative background (1, Lime) for avatars and usernames. */ + var bgDecorative1 by mutableStateOf(bgDecorative1) + private set + /** Decorative background (2, Cyan) for avatars and usernames. */ + var bgDecorative2 by mutableStateOf(bgDecorative2) + private set + /** Decorative background (3, Fuchsia) for avatars and usernames. */ + var bgDecorative3 by mutableStateOf(bgDecorative3) + private set + /** Decorative background (4, Purple) for avatars and usernames. */ + var bgDecorative4 by mutableStateOf(bgDecorative4) + private set + /** Decorative background (5, Pink) for avatars and usernames. */ + var bgDecorative5 by mutableStateOf(bgDecorative5) + private set + /** Decorative background (6, Orange) for avatars and usernames. */ + var bgDecorative6 by mutableStateOf(bgDecorative6) + private set /** Subtle background colour for informational elements. State: Rest. */ var bgInfoSubtle by mutableStateOf(bgInfoSubtle) private set @@ -223,6 +265,24 @@ Elevation: Default (Level 1). */ /** Text colour for destructive plain actions. */ var textCriticalPrimary by mutableStateOf(textCriticalPrimary) private set + /** Decorative text colour (1, Lime) for avatars and usernames. */ + var textDecorative1 by mutableStateOf(textDecorative1) + private set + /** Decorative text colour (2, Cyan) for avatars and usernames. */ + var textDecorative2 by mutableStateOf(textDecorative2) + private set + /** Decorative text colour (3, Fuchsia) for avatars and usernames. */ + var textDecorative3 by mutableStateOf(textDecorative3) + private set + /** Decorative text colour (4, Purple) for avatars and usernames. */ + var textDecorative4 by mutableStateOf(textDecorative4) + private set + /** Decorative text colour (5, Pink) for avatars and usernames. */ + var textDecorative5 by mutableStateOf(textDecorative5) + private set + /** Decorative text colour (6, Orange) for avatars and usernames. */ + var textDecorative6 by mutableStateOf(textDecorative6) + private set /** Use for regular text in disabled elements. There's no minimum contrast requirement. */ var textDisabled by mutableStateOf(textDisabled) private set @@ -249,6 +309,9 @@ Elevation: Default (Level 1). */ private set fun copy( + bgAccentHovered: Color = this.bgAccentHovered, + bgAccentPressed: Color = this.bgAccentPressed, + bgAccentRest: Color = this.bgAccentRest, bgActionPrimaryDisabled: Color = this.bgActionPrimaryDisabled, bgActionPrimaryHovered: Color = this.bgActionPrimaryHovered, bgActionPrimaryPressed: Color = this.bgActionPrimaryPressed, @@ -262,6 +325,12 @@ Elevation: Default (Level 1). */ bgCriticalPrimary: Color = this.bgCriticalPrimary, bgCriticalSubtle: Color = this.bgCriticalSubtle, bgCriticalSubtleHovered: Color = this.bgCriticalSubtleHovered, + bgDecorative1: Color = this.bgDecorative1, + bgDecorative2: Color = this.bgDecorative2, + bgDecorative3: Color = this.bgDecorative3, + bgDecorative4: Color = this.bgDecorative4, + bgDecorative5: Color = this.bgDecorative5, + bgDecorative6: Color = this.bgDecorative6, bgInfoSubtle: Color = this.bgInfoSubtle, bgSubtlePrimary: Color = this.bgSubtlePrimary, bgSubtleSecondary: Color = this.bgSubtleSecondary, @@ -293,6 +362,12 @@ Elevation: Default (Level 1). */ textActionAccent: Color = this.textActionAccent, textActionPrimary: Color = this.textActionPrimary, textCriticalPrimary: Color = this.textCriticalPrimary, + textDecorative1: Color = this.textDecorative1, + textDecorative2: Color = this.textDecorative2, + textDecorative3: Color = this.textDecorative3, + textDecorative4: Color = this.textDecorative4, + textDecorative5: Color = this.textDecorative5, + textDecorative6: Color = this.textDecorative6, textDisabled: Color = this.textDisabled, textInfoPrimary: Color = this.textInfoPrimary, textLinkExternal: Color = this.textLinkExternal, @@ -303,6 +378,9 @@ Elevation: Default (Level 1). */ textSuccessPrimary: Color = this.textSuccessPrimary, isLight: Boolean = this.isLight, ) = SemanticColors( + bgAccentHovered = bgAccentHovered, + bgAccentPressed = bgAccentPressed, + bgAccentRest = bgAccentRest, bgActionPrimaryDisabled = bgActionPrimaryDisabled, bgActionPrimaryHovered = bgActionPrimaryHovered, bgActionPrimaryPressed = bgActionPrimaryPressed, @@ -316,6 +394,12 @@ Elevation: Default (Level 1). */ bgCriticalPrimary = bgCriticalPrimary, bgCriticalSubtle = bgCriticalSubtle, bgCriticalSubtleHovered = bgCriticalSubtleHovered, + bgDecorative1 = bgDecorative1, + bgDecorative2 = bgDecorative2, + bgDecorative3 = bgDecorative3, + bgDecorative4 = bgDecorative4, + bgDecorative5 = bgDecorative5, + bgDecorative6 = bgDecorative6, bgInfoSubtle = bgInfoSubtle, bgSubtlePrimary = bgSubtlePrimary, bgSubtleSecondary = bgSubtleSecondary, @@ -347,6 +431,12 @@ Elevation: Default (Level 1). */ textActionAccent = textActionAccent, textActionPrimary = textActionPrimary, textCriticalPrimary = textCriticalPrimary, + textDecorative1 = textDecorative1, + textDecorative2 = textDecorative2, + textDecorative3 = textDecorative3, + textDecorative4 = textDecorative4, + textDecorative5 = textDecorative5, + textDecorative6 = textDecorative6, textDisabled = textDisabled, textInfoPrimary = textInfoPrimary, textLinkExternal = textLinkExternal, @@ -359,6 +449,9 @@ Elevation: Default (Level 1). */ ) fun updateColorsFrom(other: SemanticColors) { + bgAccentHovered = other.bgAccentHovered + bgAccentPressed = other.bgAccentPressed + bgAccentRest = other.bgAccentRest bgActionPrimaryDisabled = other.bgActionPrimaryDisabled bgActionPrimaryHovered = other.bgActionPrimaryHovered bgActionPrimaryPressed = other.bgActionPrimaryPressed @@ -372,6 +465,12 @@ Elevation: Default (Level 1). */ bgCriticalPrimary = other.bgCriticalPrimary bgCriticalSubtle = other.bgCriticalSubtle bgCriticalSubtleHovered = other.bgCriticalSubtleHovered + bgDecorative1 = other.bgDecorative1 + bgDecorative2 = other.bgDecorative2 + bgDecorative3 = other.bgDecorative3 + bgDecorative4 = other.bgDecorative4 + bgDecorative5 = other.bgDecorative5 + bgDecorative6 = other.bgDecorative6 bgInfoSubtle = other.bgInfoSubtle bgSubtlePrimary = other.bgSubtlePrimary bgSubtleSecondary = other.bgSubtleSecondary @@ -403,6 +502,12 @@ Elevation: Default (Level 1). */ textActionAccent = other.textActionAccent textActionPrimary = other.textActionPrimary textCriticalPrimary = other.textCriticalPrimary + textDecorative1 = other.textDecorative1 + textDecorative2 = other.textDecorative2 + textDecorative3 = other.textDecorative3 + textDecorative4 = other.textDecorative4 + textDecorative5 = other.textDecorative5 + textDecorative6 = other.textDecorative6 textDisabled = other.textDisabled textInfoPrimary = other.textInfoPrimary textLinkExternal = other.textLinkExternal diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt index 6b403b2..9e481dd 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt index dc656c4..1e2383e 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt index faebe19..b1ed69e 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/compound/src/main/res/drawable/ic_compound_take_photo_solid.xml b/compound/src/main/res/drawable/ic_compound_take_photo_solid.xml new file mode 100644 index 0000000..a7053de --- /dev/null +++ b/compound/src/main/res/drawable/ic_compound_take_photo_solid.xml @@ -0,0 +1,10 @@ + + +