diff --git a/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt b/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt index e719652a..29fde2c0 100644 --- a/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt +++ b/core/src/main/java/com/orange/ouds/core/component/button/OudsButton.kt @@ -13,17 +13,22 @@ package com.orange.ouds.core.component.button import android.os.Parcelable +import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.IntrinsicSize import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Button @@ -57,10 +62,12 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.orange.ouds.core.R +import com.orange.ouds.core.component.coloredsurface.OudsColoredSurface import com.orange.ouds.core.component.content.OudsComponentContent import com.orange.ouds.core.component.content.OudsComponentIcon import com.orange.ouds.core.extensions.InteractionState import com.orange.ouds.core.extensions.collectInteractionStateAsState +import com.orange.ouds.core.theme.LocalContrastedSurface import com.orange.ouds.core.theme.OudsTheme import com.orange.ouds.core.theme.value import com.orange.ouds.core.utilities.OudsPreview @@ -298,6 +305,7 @@ private fun Modifier.outerBorder(state: OudsButton.State, shape: Shape): Modifie @Composable private fun borderWidth(hierarchy: OudsButton.Hierarchy, state: OudsButton.State): Dp? { + val onColoredSurface = LocalContrastedSurface.current != null return with(OudsTheme.componentsTokens.button) { when (hierarchy) { OudsButton.Hierarchy.Default -> when (state) { @@ -305,7 +313,7 @@ private fun borderWidth(hierarchy: OudsButton.Hierarchy, state: OudsButton.State OudsButton.State.Disabled -> borderWidthDefault OudsButton.State.Hovered, OudsButton.State.Pressed, - OudsButton.State.Loading -> borderWidthDefaultInteraction + OudsButton.State.Loading -> if (onColoredSurface) borderWidthDefaultInteractionMono else borderWidthDefaultInteraction OudsButton.State.Focused -> OudsBorderKeyToken.Width.FocusInset OudsButton.State.Skeleton -> null } @@ -326,27 +334,40 @@ private fun borderWidth(hierarchy: OudsButton.Hierarchy, state: OudsButton.State @Composable private fun borderColor(hierarchy: OudsButton.Hierarchy, state: OudsButton.State): Color? { + val onColoredSurface = LocalContrastedSurface.current != null return with(OudsTheme.componentsTokens.button) { when (hierarchy) { OudsButton.Hierarchy.Default -> when (state) { - OudsButton.State.Enabled -> colorBorderDefaultEnabled - OudsButton.State.Hovered -> colorBorderDefaultHover - OudsButton.State.Pressed -> colorBorderDefaultPressed - OudsButton.State.Loading -> colorBorderDefaultLoading - OudsButton.State.Disabled -> colorBorderDefaultDisabled - OudsButton.State.Focused -> colorBorderDefaultFocus + OudsButton.State.Enabled -> if (onColoredSurface) colorBorderDefaultEnabledMono else colorBorderDefaultEnabled + OudsButton.State.Hovered -> if (onColoredSurface) colorBorderDefaultHoverMono else colorBorderDefaultHover + OudsButton.State.Pressed -> if (onColoredSurface) colorBorderDefaultPressedMono else colorBorderDefaultPressed + OudsButton.State.Loading -> if (onColoredSurface) colorBorderDefaultLoadingMono else colorBorderDefaultLoading + OudsButton.State.Disabled -> if (onColoredSurface) colorBorderDefaultDisabledMono else colorBorderDefaultDisabled + OudsButton.State.Focused -> if (onColoredSurface) colorBorderDefaultFocusMono else colorBorderDefaultFocus OudsButton.State.Skeleton -> null } OudsButton.Hierarchy.Minimal -> when (state) { - OudsButton.State.Enabled -> colorBorderMinimalEnabled - OudsButton.State.Hovered -> colorBorderMinimalHover - OudsButton.State.Pressed -> colorBorderMinimalPressed - OudsButton.State.Loading -> colorBorderMinimalLoading - OudsButton.State.Disabled -> colorBorderMinimalDisabled - OudsButton.State.Focused -> colorBorderMinimalFocus + OudsButton.State.Enabled -> if (onColoredSurface) colorBorderMinimalEnabledMono else colorBorderMinimalEnabled + OudsButton.State.Hovered -> if (onColoredSurface) colorBorderMinimalHoverMono else colorBorderMinimalHover + OudsButton.State.Pressed -> if (onColoredSurface) colorBorderMinimalPressedMono else colorBorderMinimalPressed + OudsButton.State.Loading -> if (onColoredSurface) colorBorderMinimalLoadingMono else colorBorderMinimalLoading + OudsButton.State.Disabled -> if (onColoredSurface) colorBorderMinimalDisabledMono else colorBorderMinimalDisabled + OudsButton.State.Focused -> if (onColoredSurface) colorBorderMinimalFocusMono else colorBorderMinimalFocus OudsButton.State.Skeleton -> null } - OudsButton.Hierarchy.Strong, + OudsButton.Hierarchy.Strong -> if (onColoredSurface) { + when (state) { + OudsButton.State.Enabled -> colorBorderStrongEnabledMono + OudsButton.State.Hovered -> colorBorderStrongHoverMono + OudsButton.State.Pressed -> colorBorderStrongPressedMono + OudsButton.State.Loading -> colorBorderStrongLoadingMono + OudsButton.State.Disabled -> colorBorderStrongDisabledMono + OudsButton.State.Focused -> colorBorderStrongFocusMono + OudsButton.State.Skeleton -> null + } + } else { + null + } OudsButton.Hierarchy.Negative -> null }?.value } @@ -364,33 +385,34 @@ private fun buttonColors(hierarchy: OudsButton.Hierarchy, buttonState: OudsButto @Composable private fun containerColor(hierarchy: OudsButton.Hierarchy, state: OudsButton.State): Color { + val onColoredSurface = LocalContrastedSurface.current != null return with(OudsTheme.componentsTokens.button) { when (hierarchy) { OudsButton.Hierarchy.Default -> when (state) { - OudsButton.State.Enabled -> colorBgDefaultEnabled - OudsButton.State.Focused -> colorBgDefaultFocus - OudsButton.State.Hovered -> colorBgDefaultHover - OudsButton.State.Pressed -> colorBgDefaultPressed - OudsButton.State.Loading -> colorBgDefaultLoading - OudsButton.State.Disabled -> colorBgDefaultDisabled + OudsButton.State.Enabled -> if (onColoredSurface) colorBgDefaultEnabledMono else colorBgDefaultEnabled + OudsButton.State.Focused -> if (onColoredSurface) colorBgDefaultFocusMono else colorBgDefaultFocus + OudsButton.State.Hovered -> if (onColoredSurface) colorBgDefaultHoverMono else colorBgDefaultHover + OudsButton.State.Pressed -> if (onColoredSurface) colorBgDefaultPressedMono else colorBgDefaultPressed + OudsButton.State.Loading -> if (onColoredSurface) colorBgDefaultLoadingMono else colorBgDefaultLoading + OudsButton.State.Disabled -> if (onColoredSurface) colorBgDefaultDisabledMono else colorBgDefaultDisabled OudsButton.State.Skeleton -> OudsTheme.componentsTokens.skeleton.colorBg } OudsButton.Hierarchy.Minimal -> when (state) { - OudsButton.State.Enabled -> colorBgMinimalEnabled - OudsButton.State.Focused -> colorBgMinimalFocus - OudsButton.State.Hovered -> colorBgMinimalHover - OudsButton.State.Pressed -> colorBgMinimalPressed - OudsButton.State.Loading -> colorBgMinimalLoading - OudsButton.State.Disabled -> colorBgMinimalDisabled + OudsButton.State.Enabled -> if (onColoredSurface) colorBgMinimalEnabledMono else colorBgMinimalEnabled + OudsButton.State.Focused -> if (onColoredSurface) colorBgMinimalFocusMono else colorBgMinimalFocus + OudsButton.State.Hovered -> if (onColoredSurface) colorBgMinimalHoverMono else colorBgMinimalHover + OudsButton.State.Pressed -> if (onColoredSurface) colorBgMinimalPressedMono else colorBgMinimalPressed + OudsButton.State.Loading -> if (onColoredSurface) colorBgMinimalLoadingMono else colorBgMinimalLoading + OudsButton.State.Disabled -> if (onColoredSurface) colorBgMinimalDisabledMono else colorBgMinimalDisabled OudsButton.State.Skeleton -> OudsTheme.componentsTokens.skeleton.colorBg } OudsButton.Hierarchy.Strong -> when (state) { - OudsButton.State.Enabled -> OudsColorKeyToken.Action.Enabled - OudsButton.State.Focused -> OudsColorKeyToken.Action.Focus - OudsButton.State.Hovered -> OudsColorKeyToken.Action.Hover - OudsButton.State.Pressed -> OudsColorKeyToken.Action.Pressed - OudsButton.State.Loading -> OudsColorKeyToken.Action.Loading - OudsButton.State.Disabled -> OudsColorKeyToken.Action.Disabled + OudsButton.State.Enabled -> if (onColoredSurface) colorBgStrongEnabledMono else OudsColorKeyToken.Action.Enabled + OudsButton.State.Focused -> if (onColoredSurface) colorBgStrongFocusMono else OudsColorKeyToken.Action.Focus + OudsButton.State.Hovered -> if (onColoredSurface) colorBgStrongHoverMono else OudsColorKeyToken.Action.Hover + OudsButton.State.Pressed -> if (onColoredSurface) colorBgStrongPressedMono else OudsColorKeyToken.Action.Pressed + OudsButton.State.Loading -> if (onColoredSurface) colorBgStrongLoadingMono else OudsColorKeyToken.Action.Loading + OudsButton.State.Disabled -> if (onColoredSurface) colorBgStrongDisabledMono else OudsColorKeyToken.Action.Disabled OudsButton.State.Skeleton -> OudsTheme.componentsTokens.skeleton.colorBg } OudsButton.Hierarchy.Negative -> when (state) { @@ -408,33 +430,34 @@ private fun containerColor(hierarchy: OudsButton.Hierarchy, state: OudsButton.St @Composable private fun contentColor(hierarchy: OudsButton.Hierarchy, state: OudsButton.State): Color { + val onColoredSurface = LocalContrastedSurface.current != null return with(OudsTheme.componentsTokens.button) { when (hierarchy) { OudsButton.Hierarchy.Default -> when (state) { - OudsButton.State.Enabled -> colorContentDefaultEnabled - OudsButton.State.Focused -> colorContentDefaultFocus - OudsButton.State.Hovered -> colorContentDefaultHover - OudsButton.State.Pressed -> colorContentDefaultPressed - OudsButton.State.Loading -> colorContentDefaultLoading - OudsButton.State.Disabled -> colorContentDefaultDisabled + OudsButton.State.Enabled -> if (onColoredSurface) colorContentDefaultEnabledMono else colorContentDefaultEnabled + OudsButton.State.Focused -> if (onColoredSurface) colorContentDefaultFocusMono else colorContentDefaultFocus + OudsButton.State.Hovered -> if (onColoredSurface) colorContentDefaultHoverMono else colorContentDefaultHover + OudsButton.State.Pressed -> if (onColoredSurface) colorContentDefaultPressedMono else colorContentDefaultPressed + OudsButton.State.Loading -> if (onColoredSurface) colorContentDefaultLoadingMono else colorContentDefaultLoading + OudsButton.State.Disabled -> if (onColoredSurface) colorContentDefaultDisabledMono else colorContentDefaultDisabled OudsButton.State.Skeleton -> OudsTheme.componentsTokens.skeleton.colorBg } OudsButton.Hierarchy.Minimal -> when (state) { - OudsButton.State.Enabled -> colorContentMinimalEnabled - OudsButton.State.Focused -> colorContentMinimalFocus - OudsButton.State.Hovered -> colorContentMinimalHover - OudsButton.State.Pressed -> colorContentMinimalPressed - OudsButton.State.Loading -> colorContentMinimalLoading - OudsButton.State.Disabled -> colorContentMinimalDisabled + OudsButton.State.Enabled -> if (onColoredSurface) colorContentMinimalEnabledMono else colorContentMinimalEnabled + OudsButton.State.Focused -> if (onColoredSurface) colorContentMinimalFocusMono else colorContentMinimalFocus + OudsButton.State.Hovered -> if (onColoredSurface) colorContentMinimalHoverMono else colorContentMinimalHover + OudsButton.State.Pressed -> if (onColoredSurface) colorContentMinimalPressedMono else colorContentMinimalPressed + OudsButton.State.Loading -> if (onColoredSurface) colorContentMinimalLoadingMono else colorContentMinimalLoading + OudsButton.State.Disabled -> if (onColoredSurface) colorContentMinimalDisabledMono else colorContentMinimalDisabled OudsButton.State.Skeleton -> OudsTheme.componentsTokens.skeleton.colorBg } OudsButton.Hierarchy.Strong -> when (state) { - OudsButton.State.Enabled -> OudsColorKeyToken.Content.OnAction.Enabled - OudsButton.State.Focused -> OudsColorKeyToken.Content.OnAction.Focus - OudsButton.State.Hovered -> OudsColorKeyToken.Content.OnAction.Hover - OudsButton.State.Pressed -> OudsColorKeyToken.Content.OnAction.Pressed - OudsButton.State.Loading -> OudsColorKeyToken.Content.OnAction.Loading - OudsButton.State.Disabled -> OudsColorKeyToken.Content.OnAction.Disabled + OudsButton.State.Enabled -> if (onColoredSurface) colorContentStrongEnabledMono else OudsColorKeyToken.Content.OnAction.Enabled + OudsButton.State.Focused -> if (onColoredSurface) colorContentStrongFocusMono else OudsColorKeyToken.Content.OnAction.Focus + OudsButton.State.Hovered -> if (onColoredSurface) colorContentStrongHoverMono else OudsColorKeyToken.Content.OnAction.Hover + OudsButton.State.Pressed -> if (onColoredSurface) colorContentStrongPressedMono else OudsColorKeyToken.Content.OnAction.Pressed + OudsButton.State.Loading -> if (onColoredSurface) colorContentStrongLoadingMono else OudsColorKeyToken.Content.OnAction.Loading + OudsButton.State.Disabled -> if (onColoredSurface) colorContentStrongDisabledMono else OudsColorKeyToken.Content.OnAction.Disabled OudsButton.State.Skeleton -> OudsTheme.componentsTokens.skeleton.colorBg } OudsButton.Hierarchy.Negative -> when (state) { @@ -617,20 +640,82 @@ private fun PreviewOudsButton(@PreviewParameter(OudsButtonPreviewParameterProvid internal fun PreviewOudsButton( darkThemeEnabled: Boolean, parameter: OudsButtonPreviewParameter -) = OudsPreview(modifier = Modifier.padding(16.dp), darkThemeEnabled = darkThemeEnabled) { +) = OudsPreview(darkThemeEnabled = darkThemeEnabled) { with(parameter) { - val text = if (hasText) hierarchy.name else null - val icon = if (hasIcon) OudsButton.Icon(painterResource(id = android.R.drawable.star_on), "") else null - val chunkedStates = states.chunked(2) - Column(verticalArrangement = Arrangement.spacedBy(16.dp)) { - chunkedStates.forEach { states -> - Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) { - states.forEach { state -> - OudsButton(icon = icon, text = text, onClick = {}, hierarchy = hierarchy, previewState = state) + val columnCount = 2 + val content: @Composable () -> Unit = { + Box(modifier = Modifier.padding(16.dp)) { + val text = if (hasText) hierarchy.name else null + val icon = if (hasIcon) OudsButton.Icon(painterResource(id = android.R.drawable.star_on), "") else null + val chunkedStates = states.chunked(columnCount) + Column(verticalArrangement = Arrangement.spacedBy(16.dp)) { + chunkedStates.forEach { states -> + Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) { + states.forEach { state -> + OudsButton(icon = icon, text = text, onClick = {}, hierarchy = hierarchy, previewState = state) + } + } } } } } + if (contrastedSurfaceGroup != null) { + RainbowContrastedSurface(group = contrastedSurfaceGroup, columnCount = columnCount, content = content) + } else { + content() + } + } +} + +internal enum class ContrastedSurfaceGroup { + Brand, StatusEmphasized, StatusMuted +} + +@Composable +private fun RainbowContrastedSurface(group: ContrastedSurfaceGroup, columnCount: Int, content: @Composable () -> Unit) { + // The color parameter below can be whichever surface + // because the actual colors will be drawn as a rainbow in order to display multiple contrasted surfaces at once + OudsColoredSurface(color = OudsColorKeyToken.Surface.Status.Positive.Emphasized) { + Box( + modifier = Modifier + .width(IntrinsicSize.Max) + .height(IntrinsicSize.Max) + ) { + Row(modifier = Modifier.fillMaxSize()) { + val colors = buildList { + repeat(columnCount) { + addAll( + when (group) { + ContrastedSurfaceGroup.Brand -> listOf( + OudsColorKeyToken.Surface.Brand.Primary + ) + ContrastedSurfaceGroup.StatusEmphasized -> listOf( + OudsColorKeyToken.Surface.Status.Positive.Emphasized, + OudsColorKeyToken.Surface.Status.Negative.Emphasized, + OudsColorKeyToken.Surface.Status.Warning.Emphasized, + OudsColorKeyToken.Surface.Status.Info.Emphasized + ) + ContrastedSurfaceGroup.StatusMuted -> listOf( + OudsColorKeyToken.Surface.Status.Positive.Muted, + OudsColorKeyToken.Surface.Status.Negative.Muted, + OudsColorKeyToken.Surface.Status.Warning.Muted, + OudsColorKeyToken.Surface.Status.Info.Muted + ) + } + ) + } + } + colors.map { color -> + Box( + modifier = Modifier + .background(color = color.value) + .fillMaxSize() + .weight(1.0f) + ) + } + } + content() + } } } @@ -638,6 +723,8 @@ internal data class OudsButtonPreviewParameter( val hierarchy: OudsButton.Hierarchy, val hasText: Boolean, val hasIcon: Boolean, + val contrastedSurfaceGroup: ContrastedSurfaceGroup? = null, +) { val states: List = listOf( OudsButton.State.Enabled, OudsButton.State.Hovered, @@ -646,16 +733,24 @@ internal data class OudsButtonPreviewParameter( OudsButton.State.Disabled, OudsButton.State.Focused, OudsButton.State.Skeleton - ) -) + ).filter { contrastedSurfaceGroup == null || it != OudsButton.State.Skeleton } +} internal class OudsButtonPreviewParameterProvider : BasicPreviewParameterProvider(*previewParameterValues.toTypedArray()) private val previewParameterValues: List get() = buildList { OudsButton.Hierarchy.entries.forEach { hierarchy -> - add(OudsButtonPreviewParameter(hierarchy, hasText = true, hasIcon = false)) - add(OudsButtonPreviewParameter(hierarchy, hasText = true, hasIcon = true)) - add(OudsButtonPreviewParameter(hierarchy, hasText = false, hasIcon = true)) + val parameters = listOf( + OudsButtonPreviewParameter(hierarchy, hasText = true, hasIcon = false), + OudsButtonPreviewParameter(hierarchy, hasText = true, hasIcon = true), + OudsButtonPreviewParameter(hierarchy, hasText = false, hasIcon = true), + ) + addAll(parameters) + if (hierarchy != OudsButton.Hierarchy.Negative) { + //addAll(parameters.map { it.copy(contrastedSurfaceGroup = ContrastedSurfaceGroup.Brand) }) + addAll(parameters.map { it.copy(contrastedSurfaceGroup = ContrastedSurfaceGroup.StatusEmphasized) }) + //addAll(parameters.map { it.copy(contrastedSurfaceGroup = ContrastedSurfaceGroup.StatusMuted) }) + } } - } + } \ No newline at end of file diff --git a/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt b/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt index 73acd256..2869283b 100644 --- a/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt +++ b/core/src/main/java/com/orange/ouds/core/utilities/OudsPreview.kt @@ -12,11 +12,9 @@ package com.orange.ouds.core.utilities -import androidx.compose.foundation.background import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.foundation.layout.Box +import androidx.compose.material3.Surface import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier import com.orange.ouds.core.BuildConfig import com.orange.ouds.core.theme.OudsTheme import com.orange.ouds.core.theme.value @@ -25,21 +23,12 @@ import com.orange.ouds.theme.tokens.OudsColorKeyToken /** * Configures the Compose OUDS preview environment in Android Studio. * - * @param modifier The modifier for the preview content. * @param darkThemeEnabled Indicates whether the dark theme is enabled or not. * @param content The content of the preview. */ @Composable -fun OudsPreview(modifier: Modifier = Modifier, darkThemeEnabled: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) { +fun OudsPreview(darkThemeEnabled: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) { OudsTheme(themeContract = BuildConfig.PREVIEW_THEME, darkThemeEnabled) { - // Add a box to be able to see components - // Use a box instead of a surface to avoid clipping children in cases where something is drawn outside of the component to preview - Box( - modifier = Modifier - .background(OudsColorKeyToken.Background.Primary.value) - .then(modifier) - ) { - content() - } + Surface(color = OudsColorKeyToken.Background.Primary.value, content = content) // Add a surface to be able to see components } } diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[10].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[10].png index 958dfc21..5aac6fe1 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[10].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[10].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[11].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[11].png index 7d108a43..d5627847 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[11].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[11].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[12].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[12].png new file mode 100644 index 00000000..83ebdd33 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[12].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[13].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[13].png new file mode 100644 index 00000000..527b0bdc Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[13].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[14].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[14].png new file mode 100644 index 00000000..5472f22e Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[14].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[15].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[15].png new file mode 100644 index 00000000..0a8090b7 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[15].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[16].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[16].png new file mode 100644 index 00000000..30172107 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[16].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[17].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[17].png new file mode 100644 index 00000000..cefb1c34 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[17].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[18].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[18].png new file mode 100644 index 00000000..113730eb Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[18].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[19].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[19].png new file mode 100644 index 00000000..958dfc21 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[19].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[20].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[20].png new file mode 100644 index 00000000..7d108a43 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[20].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[3].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[3].png index 692a210b..2f898702 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[3].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[3].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[4].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[4].png index b792c892..ed6ed44a 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[4].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[4].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[5].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[5].png index c7f76dfb..76e2af73 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[5].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[5].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[6].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[6].png index 83ebdd33..692a210b 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[6].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[6].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[7].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[7].png index 527b0bdc..b792c892 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[7].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[7].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[8].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[8].png index 5472f22e..c7f76dfb 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[8].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[8].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[9].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[9].png index 113730eb..aba8ec45 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[9].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonDarkThemeSnapshot[9].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[10].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[10].png index 04e04a20..b297d639 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[10].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[10].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[11].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[11].png index 49ce468c..3f3a02d2 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[11].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[11].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[12].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[12].png new file mode 100644 index 00000000..7596919a Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[12].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[13].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[13].png new file mode 100644 index 00000000..78783cc2 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[13].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[14].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[14].png new file mode 100644 index 00000000..50493bee Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[14].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[15].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[15].png new file mode 100644 index 00000000..eaa6558a Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[15].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[16].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[16].png new file mode 100644 index 00000000..f156c5b9 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[16].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[17].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[17].png new file mode 100644 index 00000000..b65accab Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[17].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[18].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[18].png new file mode 100644 index 00000000..bcf71b9a Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[18].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[19].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[19].png new file mode 100644 index 00000000..04e04a20 Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[19].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[20].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[20].png new file mode 100644 index 00000000..49ce468c Binary files /dev/null and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[20].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[3].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[3].png index 9ebfd616..d2122406 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[3].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[3].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[4].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[4].png index ffcbcb6e..0a4a5b09 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[4].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[4].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[5].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[5].png index 5cb5519f..e4876771 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[5].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[5].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[6].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[6].png index 7596919a..9ebfd616 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[6].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[6].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[7].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[7].png index 78783cc2..ffcbcb6e 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[7].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[7].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[8].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[8].png index 50493bee..5cb5519f 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[8].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[8].png differ diff --git a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[9].png b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[9].png index bcf71b9a..5570af12 100644 Binary files a/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[9].png and b/core/src/test/snapshots/images/com.orange.ouds.core.component.button_OudsButtonTest_takeOudsButtonLightThemeSnapshot[9].png differ