From f7c3b2f7f26c69f7bbd79073e1befa790832628b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Tue, 7 Nov 2023 11:05:42 +0100 Subject: [PATCH] ANDROID-13833 Created a clone of VivoNew to mitigate a inheritance styling problem. --- .../mistica/catalog/ui/CatalogMainActivity.kt | 2 + .../catalog/ui/ComponentCatalogActivity.kt | 11 +- .../composeview/AbstractMisticaComposeView.kt | 4 + .../mistica/compose/theme/brand/Brand.kt | 2 +- .../theme/brand/VivoNewOverrideBrand.kt | 37 ++ ...VivoNewOverrideBrandColorsAutogenerated.kt | 365 ++++++++++++++++++ ...oNewOverrideBrandFontSizesAutogenerated.kt | 11 + ...ewOverrideBrandFontWeightsAutogenerated.kt | 34 ++ ...VivoNewOverrideBrandRadiusAutogenerated.kt | 19 + .../themes_vivoNewOverride_autogenerated.xml | 112 ++++++ .../src/main/res/values/attrs_components.xml | 1 + .../colors_vivoNewOverride_autogenerated.xml | 53 +++ .../res/values/themes_vivoNewOverride.xml | 32 ++ .../themes_vivoNewOverride_autogenerated.xml | 157 ++++++++ .../mistica/tokens/TokensGenerator.kt | 24 +- .../mistica/tokens/xml/GenerateXMLFiles.kt | 34 +- 16 files changed, 884 insertions(+), 14 deletions(-) create mode 100644 library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrand.kt create mode 100644 library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandColorsAutogenerated.kt create mode 100644 library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontSizesAutogenerated.kt create mode 100644 library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontWeightsAutogenerated.kt create mode 100644 library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandRadiusAutogenerated.kt create mode 100644 library/src/main/res/values-night/themes_vivoNewOverride_autogenerated.xml create mode 100644 library/src/main/res/values/colors_vivoNewOverride_autogenerated.xml create mode 100644 library/src/main/res/values/themes_vivoNewOverride.xml create mode 100644 library/src/main/res/values/themes_vivoNewOverride_autogenerated.xml diff --git a/catalog/src/main/java/com/telefonica/mistica/catalog/ui/CatalogMainActivity.kt b/catalog/src/main/java/com/telefonica/mistica/catalog/ui/CatalogMainActivity.kt index d08a5ee03..0d34acd5b 100644 --- a/catalog/src/main/java/com/telefonica/mistica/catalog/ui/CatalogMainActivity.kt +++ b/catalog/src/main/java/com/telefonica/mistica/catalog/ui/CatalogMainActivity.kt @@ -18,6 +18,7 @@ import com.telefonica.mistica.compose.theme.brand.BrandType.O2 import com.telefonica.mistica.compose.theme.brand.BrandType.TELEFONICA import com.telefonica.mistica.compose.theme.brand.BrandType.VIVO import com.telefonica.mistica.compose.theme.brand.BrandType.VIVO_NEW +import com.telefonica.mistica.compose.theme.brand.BrandType.VIVO_NEW_OVERRIDE import com.telefonica.mistica.compose.theme.brand.MovistarBrand import com.telefonica.mistica.input.DropDownInput import com.telefonica.mistica.list.ListRowView @@ -48,6 +49,7 @@ class CatalogMainActivity : AppCompatActivity() { ComponentStyle("O2", R.style.MisticaTheme_O2, O2), ComponentStyle("Vivo", R.style.MisticaTheme_Vivo, VIVO), ComponentStyle("Vivo New", R.style.MisticaTheme_VivoNew, VIVO_NEW), + ComponentStyle("Vivo New Override", R.style.VivoNewOverride, VIVO_NEW_OVERRIDE), ComponentStyle("Telefonica", R.style.MisticaTheme_Telefonica, TELEFONICA), ComponentStyle("Blau", R.style.MisticaTheme_Blau, BLAU), ) diff --git a/catalog/src/main/java/com/telefonica/mistica/catalog/ui/ComponentCatalogActivity.kt b/catalog/src/main/java/com/telefonica/mistica/catalog/ui/ComponentCatalogActivity.kt index bd43143da..9e2014a97 100644 --- a/catalog/src/main/java/com/telefonica/mistica/catalog/ui/ComponentCatalogActivity.kt +++ b/catalog/src/main/java/com/telefonica/mistica/catalog/ui/ComponentCatalogActivity.kt @@ -61,17 +61,23 @@ import com.telefonica.mistica.catalog.ui.compose.components.TabsCatalog import com.telefonica.mistica.catalog.ui.compose.components.Tags import com.telefonica.mistica.catalog.ui.compose.components.Texts import com.telefonica.mistica.catalog.ui.compose.components.Titles -import com.telefonica.mistica.compose.badge.Badge import com.telefonica.mistica.compose.theme.MisticaTheme import com.telefonica.mistica.compose.theme.brand.BlauBrand import com.telefonica.mistica.compose.theme.brand.Brand import com.telefonica.mistica.compose.theme.brand.BrandType -import com.telefonica.mistica.compose.theme.brand.BrandType.* +import com.telefonica.mistica.compose.theme.brand.BrandType.BLAU +import com.telefonica.mistica.compose.theme.brand.BrandType.MOVISTAR +import com.telefonica.mistica.compose.theme.brand.BrandType.O2 +import com.telefonica.mistica.compose.theme.brand.BrandType.TELEFONICA +import com.telefonica.mistica.compose.theme.brand.BrandType.VIVO +import com.telefonica.mistica.compose.theme.brand.BrandType.VIVO_NEW +import com.telefonica.mistica.compose.theme.brand.BrandType.VIVO_NEW_OVERRIDE import com.telefonica.mistica.compose.theme.brand.MovistarBrand import com.telefonica.mistica.compose.theme.brand.O2Brand import com.telefonica.mistica.compose.theme.brand.TelefonicaBrand import com.telefonica.mistica.compose.theme.brand.VivoBrand import com.telefonica.mistica.compose.theme.brand.VivoNewBrand +import com.telefonica.mistica.compose.theme.brand.VivoNewOverrideBrand class ComponentCatalogActivity : FragmentActivity() { @@ -244,6 +250,7 @@ class ComponentCatalogActivity : FragmentActivity() { O2 -> O2Brand VIVO -> VivoBrand VIVO_NEW -> VivoNewBrand + VIVO_NEW_OVERRIDE -> VivoNewOverrideBrand TELEFONICA -> TelefonicaBrand BLAU -> BlauBrand } diff --git a/library/src/main/java/com/telefonica/mistica/compose/composeview/AbstractMisticaComposeView.kt b/library/src/main/java/com/telefonica/mistica/compose/composeview/AbstractMisticaComposeView.kt index 71f563b81..ff40ab1aa 100644 --- a/library/src/main/java/com/telefonica/mistica/compose/composeview/AbstractMisticaComposeView.kt +++ b/library/src/main/java/com/telefonica/mistica/compose/composeview/AbstractMisticaComposeView.kt @@ -12,6 +12,7 @@ import com.telefonica.mistica.compose.composeview.AbstractMisticaComposeView.Com import com.telefonica.mistica.compose.composeview.AbstractMisticaComposeView.Companion.BRAND_VALUE_TELEFONICA import com.telefonica.mistica.compose.composeview.AbstractMisticaComposeView.Companion.BRAND_VALUE_VIVO import com.telefonica.mistica.compose.composeview.AbstractMisticaComposeView.Companion.BRAND_VALUE_VIVO_NEW +import com.telefonica.mistica.compose.composeview.AbstractMisticaComposeView.Companion.BRAND_VALUE_VIVO_NEW_OVERRIDE import com.telefonica.mistica.compose.theme.MisticaTheme import com.telefonica.mistica.compose.theme.brand.BlauBrand import com.telefonica.mistica.compose.theme.brand.Brand @@ -20,6 +21,7 @@ import com.telefonica.mistica.compose.theme.brand.O2Brand import com.telefonica.mistica.compose.theme.brand.TelefonicaBrand import com.telefonica.mistica.compose.theme.brand.VivoBrand import com.telefonica.mistica.compose.theme.brand.VivoNewBrand +import com.telefonica.mistica.compose.theme.brand.VivoNewOverrideBrand abstract class AbstractMisticaComposeView @JvmOverloads constructor( context: Context, @@ -69,6 +71,7 @@ abstract class AbstractMisticaComposeView @JvmOverloads constructor( const val BRAND_VALUE_TELEFONICA = 3 const val BRAND_VALUE_BLAU = 4 const val BRAND_VALUE_VIVO_NEW = 5 + const val BRAND_VALUE_VIVO_NEW_OVERRIDE = 6 } } @@ -79,5 +82,6 @@ fun Int.mapToComposeBrand(): Brand = when (this) { BRAND_VALUE_TELEFONICA -> TelefonicaBrand BRAND_VALUE_BLAU -> BlauBrand BRAND_VALUE_VIVO_NEW -> VivoNewBrand + BRAND_VALUE_VIVO_NEW_OVERRIDE -> VivoNewOverrideBrand else -> TelefonicaBrand } \ No newline at end of file diff --git a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/Brand.kt b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/Brand.kt index fbe028e25..67af1eb29 100644 --- a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/Brand.kt +++ b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/Brand.kt @@ -32,4 +32,4 @@ interface Brand { val radius: MisticaRadius } -enum class BrandType { BLAU, MOVISTAR, O2, TELEFONICA, VIVO, VIVO_NEW } +enum class BrandType { BLAU, MOVISTAR, O2, TELEFONICA, VIVO, VIVO_NEW, VIVO_NEW_OVERRIDE } diff --git a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrand.kt b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrand.kt new file mode 100644 index 000000000..e6e0d2113 --- /dev/null +++ b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrand.kt @@ -0,0 +1,37 @@ +package com.telefonica.mistica.compose.theme.brand + +import com.telefonica.mistica.R + +object VivoNewOverrideBrand : Brand { + + override val compatibilityTheme: Int + get() = R.style.VivoNewOverride + + override val lightColors = VivoNewOverrideBrandColors.lightColors + + override val darkColors = VivoNewOverrideBrandColors.darkColors + + override val preset5FontWeight = VivoNewOverrideBrandFontWeights.text5FontWeight + + override val preset6FontWeight = VivoNewOverrideBrandFontWeights.text6FontWeight + + override val preset7FontWeight = VivoNewOverrideBrandFontWeights.text7FontWeight + + override val preset8FontWeight = VivoNewOverrideBrandFontWeights.text8FontWeight + + override val cardTitleFontWeight = VivoNewOverrideBrandFontWeights.cardTitleFontWeight + + override val buttonFontWeight = VivoNewOverrideBrandFontWeights.buttonFontWeight + + override val linkFontWeight = VivoNewOverrideBrandFontWeights.linkFontWeight + + override val title1FontWeight = VivoNewOverrideBrandFontWeights.title1FontWeight + + override val indicatorFontWeight = VivoNewOverrideBrandFontWeights.indicatorFontWeight + + override val tabsLabelFontWeight = VivoNewOverrideBrandFontWeights.tabsLabelFontWeight + + override val tabsLabelFontSize = VivoNewOverrideBrandFontSizes.tabsLabelFontSize + + override val radius = VivoNewOverrideBrandRadius.radius +} diff --git a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandColorsAutogenerated.kt b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandColorsAutogenerated.kt new file mode 100644 index 000000000..dc9394ba1 --- /dev/null +++ b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandColorsAutogenerated.kt @@ -0,0 +1,365 @@ +// Code generated automatically, DO NOT EDIT manually. Use Import design tokens GitHub Action. +package com.telefonica.mistica.compose.theme.brand + +import androidx.compose.ui.graphics.Color +import com.telefonica.mistica.compose.theme.color.MisticaColors + +public object VivoNewOverrideBrandColors { + public val lightColors: MisticaColors = MisticaColors(background = + VivoNewOverridePaletteColor.vivoNewOverride_color_white, + backgroundAlternative = VivoNewOverridePaletteColor.vivoNewOverride_color_grey1, + backgroundBrand = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + backgroundBrandSecondary = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight90, + backgroundContainer = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + backgroundContainerHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_3_alpha, + backgroundContainerPressed = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_5_alpha, + backgroundContainerBrand = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + backgroundContainerBrandHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_20_alpha, + backgroundContainerBrandPressed = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_40_alpha, + backgroundContainerBrandOverInverse = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + backgroundContainerAlternative = VivoNewOverridePaletteColor.vivoNewOverride_color_grey1, + backgroundOverlay = VivoNewOverridePaletteColor.vivoNewOverride_color_grey6_60_alpha, + backgroundSkeleton = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + backgroundSkeletonInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + backgroundFeedbackBottom = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + appBarBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + navigationBarBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + skeletonWave = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + borderLow = VivoNewOverridePaletteColor.vivoNewOverride_color_grey1, + border = VivoNewOverridePaletteColor.vivoNewOverride_color_grey3, + borderHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + borderSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + coverBackgroundHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_25_alpha, + coverBackgroundPressed = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_35_alpha, + buttonDangerBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + buttonDangerBackgroundSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark, + buttonDangerBackgroundHover = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark, + buttonLinkBackgroundSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight10, + buttonLinkBackgroundInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_10_alpha, + buttonPrimaryBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + buttonPrimaryBackgroundInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonPrimaryBackgroundSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + buttonPrimaryBackgroundHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + buttonPrimaryBackgroundInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + buttonSecondaryBorder = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + buttonSecondaryBorderSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + buttonSecondaryBackgroundHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight10, + buttonSecondaryBackgroundSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight10, + buttonSecondaryBorderInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonSecondaryBorderInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonSecondaryBackgroundInverseHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_15_alpha, + buttonSecondaryBackgroundInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_15_alpha, + textButtonPrimary = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textButtonPrimaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + textButtonPrimaryInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + textButtonSecondary = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + textButtonSecondarySelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + textButtonSecondaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textButtonSecondaryInverseSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textLink = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + textLinkInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textLinkDanger = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + textLinkSnackbar = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight20, + control = VivoNewOverridePaletteColor.vivoNewOverride_color_grey3, + controlActivated = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + controlError = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + loadingBar = VivoNewOverridePaletteColor.vivoNewOverride_color_pink, + loadingBarBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperLight30, + toggleAndroidInactive = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + toggleAndroidBackgroundActive = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight20, + iosControlKnob = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + divider = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + dividerInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white_20_alpha, + navigationBarDivider = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + badge = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark, + feedbackErrorBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + feedbackInfoBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + brand = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + brandHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + inverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + neutralHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_grey6, + neutralMedium = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + neutralMediumInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + neutralLow = VivoNewOverridePaletteColor.vivoNewOverride_color_grey1, + neutralLowAlternative = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textPrimary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey6, + textPrimaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textSecondary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + textSecondaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight20, + success = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreen, + warning = VivoNewOverridePaletteColor.vivoNewOverride_color_orange, + error = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + promo = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + highlight = VivoNewOverridePaletteColor.vivoNewOverride_color_pink, + successLow = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreenLight10, + warningLow = VivoNewOverridePaletteColor.vivoNewOverride_color_orangeLight10, + errorLow = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperLight10, + promoLow = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight10, + brandLow = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight10, + successHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreenDark, + warningHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_orangeDark, + errorHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark80, + promoHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + successHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreenDark, + warningHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_orangeDark, + errorHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark80, + promoHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + textNavigationBarPrimary = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textNavigationBarSecondary = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + textNavigationSearchBarHint = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + textNavigationSearchBarText = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + textAppBar = VivoNewOverridePaletteColor.vivoNewOverride_color_grey4, + textAppBarSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + customTabsBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + ) + + public val darkColors: MisticaColors = MisticaColors(background = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + backgroundAlternative = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + backgroundBrand = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + backgroundBrandSecondary = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + backgroundContainer = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey, + backgroundContainerHover = VivoNewOverridePaletteColor.vivoNewOverride_color_white_3_alpha, + backgroundContainerPressed = VivoNewOverridePaletteColor.vivoNewOverride_color_white_5_alpha, + backgroundContainerBrand = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey, + backgroundContainerBrandHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_3_alpha, + backgroundContainerBrandPressed = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_5_alpha, + backgroundContainerBrandOverInverse = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey, + backgroundContainerAlternative = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey, + backgroundOverlay = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey_80_alpha, + backgroundSkeleton = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + backgroundSkeletonInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + backgroundFeedbackBottom = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + appBarBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey, + navigationBarBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + skeletonWave = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + borderLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + border = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey, + borderHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + borderSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + coverBackgroundHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_25_alpha, + coverBackgroundPressed = + VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack_35_alpha, + buttonDangerBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + buttonDangerBackgroundSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark, + buttonDangerBackgroundHover = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark, + buttonLinkBackgroundSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_8_alpha, + buttonLinkBackgroundInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_8_alpha, + buttonPrimaryBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight80, + buttonPrimaryBackgroundInverse = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight80, + buttonPrimaryBackgroundSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + buttonPrimaryBackgroundHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + buttonPrimaryBackgroundInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleDark, + buttonSecondaryBackgroundHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_15_alpha, + buttonSecondaryBackgroundSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_15_alpha, + buttonSecondaryBorder = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonSecondaryBorderSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonSecondaryBorderInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonSecondaryBorderInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white, + buttonSecondaryBackgroundInverseHover = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_15_alpha, + buttonSecondaryBackgroundInverseSelected = + VivoNewOverridePaletteColor.vivoNewOverride_color_white_15_alpha, + textButtonPrimary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textButtonPrimaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textButtonPrimaryInverseSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textButtonSecondary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textButtonSecondarySelected = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textButtonSecondaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textButtonSecondaryInverseSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textLink = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + textLinkInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + textLinkDanger = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + textLinkSnackbar = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + control = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + controlActivated = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight80, + controlError = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + loadingBar = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight80, + loadingBarBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + toggleAndroidInactive = VivoNewOverridePaletteColor.vivoNewOverride_color_grey4, + toggleAndroidBackgroundActive = + VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + iosControlKnob = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + divider = VivoNewOverridePaletteColor.vivoNewOverride_color_white_5_alpha, + dividerInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_white_5_alpha, + navigationBarDivider = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + badge = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark, + feedbackErrorBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + feedbackInfoBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_grey6, + brand = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight80, + brandHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_white_5_alpha, + inverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + neutralHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + neutralMedium = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + neutralMediumInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + neutralLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + neutralLowAlternative = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + textPrimary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textPrimaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textSecondary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey4, + textSecondaryInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_grey4, + success = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreen, + warning = VivoNewOverridePaletteColor.vivoNewOverride_color_orange, + error = VivoNewOverridePaletteColor.vivoNewOverride_color_pepper, + promo = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight80, + highlight = VivoNewOverridePaletteColor.vivoNewOverride_color_pink, + successLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + warningLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + errorLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + promoLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + brandLow = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeGrey6, + successHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreenLight30, + warningHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_orangeLight40, + errorHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperLight40, + promoHigh = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurpleLight50, + successHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoGreenDark, + warningHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_orangeDark, + errorHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_pepperDark80, + promoHighInverse = VivoNewOverridePaletteColor.vivoNewOverride_color_vivoPurple, + textNavigationBarPrimary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textNavigationBarSecondary = VivoNewOverridePaletteColor.vivoNewOverride_color_grey4, + textNavigationSearchBarHint = VivoNewOverridePaletteColor.vivoNewOverride_color_grey4, + textNavigationSearchBarText = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + textAppBar = VivoNewOverridePaletteColor.vivoNewOverride_color_grey5, + textAppBarSelected = VivoNewOverridePaletteColor.vivoNewOverride_color_grey2, + customTabsBackground = VivoNewOverridePaletteColor.vivoNewOverride_color_darkModeBlack, + ) +} + +private object VivoNewOverridePaletteColor { + public val vivoNewOverride_color_vivoPurple: Color = Color(0xFF660099) + + public val vivoNewOverride_color_vivoPurpleDark: Color = Color(0xFF461E5F) + + public val vivoNewOverride_color_vivoPurpleLight10: Color = Color(0xFFEFE5F4) + + public val vivoNewOverride_color_vivoPurpleLight20: Color = Color(0xFFE0CCEB) + + public val vivoNewOverride_color_vivoPurpleLight50: Color = Color(0xFFB280CC) + + public val vivoNewOverride_color_vivoPurpleLight80: Color = Color(0xFF8433AD) + + public val vivoNewOverride_color_vivoPurpleLight90: Color = Color(0xFF751AA3) + + public val vivoNewOverride_color_vivoGreen: Color = Color(0xFF99CC33) + + public val vivoNewOverride_color_vivoGreenDark: Color = Color(0xFF225C3D) + + public val vivoNewOverride_color_vivoGreenLight10: Color = Color(0xFFEDF8E8) + + public val vivoNewOverride_color_vivoGreen25: Color = Color(0xFFD6EBAD) + + public val vivoNewOverride_color_vivoGreenLight30: Color = Color(0xFF91AE9E) + + public val vivoNewOverride_color_vivoBlue: Color = Color(0xFF00ABDB) + + public val vivoNewOverride_color_orange: Color = Color(0xFFFF9900) + + public val vivoNewOverride_color_orange25: Color = Color(0xFFFFD699) + + public val vivoNewOverride_color_orangeDark: Color = Color(0xFF972A1D) + + public val vivoNewOverride_color_orangeLight10: Color = Color(0xFFFFEFE1) + + public val vivoNewOverride_color_orangeLight40: Color = Color(0xFFFFB84C) + + public val vivoNewOverride_color_pink: Color = Color(0xFFEB3D7D) + + public val vivoNewOverride_color_pepper: Color = Color(0xFFCC1F59) + + public val vivoNewOverride_color_pepperDark: Color = Color(0xFFB71D63) + + public val vivoNewOverride_color_pepperDark80: Color = Color(0xFF8F2052) + + public val vivoNewOverride_color_pepperLight10: Color = Color(0xFFFCE4EF) + + public val vivoNewOverride_color_pepperLight30: Color = Color(0xFFF7B1CB) + + public val vivoNewOverride_color_pepperLight40: Color = Color(0xFFDB628B) + + public val vivoNewOverride_color_grey1: Color = Color(0xFFF6F6F6) + + public val vivoNewOverride_color_grey2: Color = Color(0xFFEEEEEE) + + public val vivoNewOverride_color_grey3: Color = Color(0xFFDDDDDD) + + public val vivoNewOverride_color_grey4: Color = Color(0xFF999999) + + public val vivoNewOverride_color_grey5: Color = Color(0xFF666666) + + public val vivoNewOverride_color_grey6: Color = Color(0xFF000000) + + public val vivoNewOverride_color_white: Color = Color(0xFFFFFFFF) + + public val vivoNewOverride_color_darkModeBlack: Color = Color(0xFF191919) + + public val vivoNewOverride_color_darkModeGrey: Color = Color(0xFF242424) + + public val vivoNewOverride_color_darkModeGrey6: Color = Color(0xFF313235) + + public val vivoNewOverride_color_darkModeBlack_3_alpha: Color = Color(0x08191919) + + public val vivoNewOverride_color_darkModeBlack_5_alpha: Color = Color(0x0D191919) + + public val vivoNewOverride_color_darkModeBlack_20_alpha: Color = Color(0x33191919) + + public val vivoNewOverride_color_darkModeBlack_40_alpha: Color = Color(0x66191919) + + public val vivoNewOverride_color_grey6_60_alpha: Color = Color(0x99000000) + + public val vivoNewOverride_color_darkModeBlack_25_alpha: Color = Color(0x40191919) + + public val vivoNewOverride_color_darkModeBlack_35_alpha: Color = Color(0x59191919) + + public val vivoNewOverride_color_white_10_alpha: Color = Color(0x1AFFFFFF) + + public val vivoNewOverride_color_white_15_alpha: Color = Color(0x26FFFFFF) + + public val vivoNewOverride_color_white_20_alpha: Color = Color(0x33FFFFFF) + + public val vivoNewOverride_color_white_3_alpha: Color = Color(0x08FFFFFF) + + public val vivoNewOverride_color_white_5_alpha: Color = Color(0x0DFFFFFF) + + public val vivoNewOverride_color_darkModeGrey_80_alpha: Color = Color(0xCC242424) + + public val vivoNewOverride_color_white_8_alpha: Color = Color(0x14FFFFFF) +} diff --git a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontSizesAutogenerated.kt b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontSizesAutogenerated.kt new file mode 100644 index 000000000..4379124ff --- /dev/null +++ b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontSizesAutogenerated.kt @@ -0,0 +1,11 @@ +// Code generated automatically, DO NOT EDIT manually. Use Import design tokens GitHub Action. +package com.telefonica.mistica.compose.theme.brand + +import androidx.compose.ui.unit.TextUnit +import androidx.compose.ui.unit.sp + +public object VivoNewOverrideBrandFontSizes { + public val tabsLabelFontSize: TextUnit = 18.sp + + public val title2FontSize: TextUnit = 18.sp +} diff --git a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontWeightsAutogenerated.kt b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontWeightsAutogenerated.kt new file mode 100644 index 000000000..6fc369eae --- /dev/null +++ b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontWeightsAutogenerated.kt @@ -0,0 +1,34 @@ +// Code generated automatically, DO NOT EDIT manually. Use Import design tokens GitHub Action. +package com.telefonica.mistica.compose.theme.brand + +import androidx.compose.ui.text.font.FontWeight + +public object VivoNewOverrideBrandFontWeights { + public val cardTitleFontWeight: FontWeight = FontWeight.Normal + + public val buttonFontWeight: FontWeight = FontWeight.Normal + + public val tabsLabelFontWeight: FontWeight = FontWeight.Normal + + public val linkFontWeight: FontWeight = FontWeight.Normal + + public val title1FontWeight: FontWeight = FontWeight.Normal + + public val title2FontWeight: FontWeight = FontWeight.Normal + + public val indicatorFontWeight: FontWeight = FontWeight.Normal + + public val navigationBarFontWeight: FontWeight = FontWeight.Normal + + public val text5FontWeight: FontWeight = FontWeight.Normal + + public val text6FontWeight: FontWeight = FontWeight.Normal + + public val text7FontWeight: FontWeight = FontWeight.Normal + + public val text8FontWeight: FontWeight = FontWeight.Normal + + public val text9FontWeight: FontWeight = FontWeight.Normal + + public val text10FontWeight: FontWeight = FontWeight.Normal +} diff --git a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandRadiusAutogenerated.kt b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandRadiusAutogenerated.kt new file mode 100644 index 000000000..a89c2528b --- /dev/null +++ b/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandRadiusAutogenerated.kt @@ -0,0 +1,19 @@ +// Code generated automatically, DO NOT EDIT manually. Use Import design tokens GitHub Action. +package com.telefonica.mistica.compose.theme.brand + +import androidx.compose.ui.unit.dp +import com.telefonica.mistica.compose.theme.values.MisticaRadius + +public object VivoNewOverrideBrandRadius { + public val radius: MisticaRadius = MisticaRadius( + avatarBorderRadius = 50, + barBorderRadius = 999.dp, + buttonBorderRadius = 999.dp, + checkboxBorderRadius = 2.dp, + containerBorderRadius = 16.dp, + indicatorBorderRadius = 999.dp, + inputBorderRadius = 12.dp, + legacyDisplayBorderRadius = 16.dp, + popupBorderRadius = 8.dp, + sheetBorderRadius = 16.dp,) +} diff --git a/library/src/main/res/values-night/themes_vivoNewOverride_autogenerated.xml b/library/src/main/res/values-night/themes_vivoNewOverride_autogenerated.xml new file mode 100644 index 000000000..de151c03d --- /dev/null +++ b/library/src/main/res/values-night/themes_vivoNewOverride_autogenerated.xml @@ -0,0 +1,112 @@ + + + + + + \ No newline at end of file diff --git a/library/src/main/res/values/attrs_components.xml b/library/src/main/res/values/attrs_components.xml index 55e0758a2..599c1e850 100755 --- a/library/src/main/res/values/attrs_components.xml +++ b/library/src/main/res/values/attrs_components.xml @@ -300,6 +300,7 @@ + diff --git a/library/src/main/res/values/colors_vivoNewOverride_autogenerated.xml b/library/src/main/res/values/colors_vivoNewOverride_autogenerated.xml new file mode 100644 index 000000000..668e38048 --- /dev/null +++ b/library/src/main/res/values/colors_vivoNewOverride_autogenerated.xml @@ -0,0 +1,53 @@ + + + + #660099 + #461E5F + #EFE5F4 + #E0CCEB + #B280CC + #8433AD + #751AA3 + #99CC33 + #225C3D + #EDF8E8 + #D6EBAD + #91AE9E + #00ABDB + #FF9900 + #FFD699 + #972A1D + #FFEFE1 + #FFB84C + #EB3D7D + #CC1F59 + #B71D63 + #8F2052 + #FCE4EF + #F7B1CB + #DB628B + #F6F6F6 + #EEEEEE + #DDDDDD + #999999 + #666666 + #000000 + #FFFFFF + #191919 + #242424 + #313235 + #08191919 + #0D191919 + #33191919 + #66191919 + #99000000 + #40191919 + #59191919 + #1AFFFFFF + #26FFFFFF + #33FFFFFF + #08FFFFFF + #0DFFFFFF + #CC242424 + #14FFFFFF + \ No newline at end of file diff --git a/library/src/main/res/values/themes_vivoNewOverride.xml b/library/src/main/res/values/themes_vivoNewOverride.xml new file mode 100644 index 000000000..5ebe39ebe --- /dev/null +++ b/library/src/main/res/values/themes_vivoNewOverride.xml @@ -0,0 +1,32 @@ + + + + + + diff --git a/library/src/main/res/values/themes_vivoNewOverride_autogenerated.xml b/library/src/main/res/values/themes_vivoNewOverride_autogenerated.xml new file mode 100644 index 000000000..a96c6cf0a --- /dev/null +++ b/library/src/main/res/values/themes_vivoNewOverride_autogenerated.xml @@ -0,0 +1,157 @@ + + + + + + \ No newline at end of file diff --git a/tokens/src/main/java/com/telefonica/mistica/tokens/TokensGenerator.kt b/tokens/src/main/java/com/telefonica/mistica/tokens/TokensGenerator.kt index c31ce9852..4044f97b4 100644 --- a/tokens/src/main/java/com/telefonica/mistica/tokens/TokensGenerator.kt +++ b/tokens/src/main/java/com/telefonica/mistica/tokens/TokensGenerator.kt @@ -23,16 +23,28 @@ class TokensGenerator( } companion object { + const val BLAU = "blau" + const val MOVISTAR = "movistar" + const val O2 = "o2" + const val TELEFONICA = "telefonica" + const val VIVO = "vivo" + const val VIVO_NEW = "vivoNew" + const val VIVO_NEW_OVERRIDE = "vivoNewOverride" + val BRANDS = listOf( - Brand("blau", "blau"), - Brand("movistar", "movistar"), - Brand("o2", "o2"), - Brand("telefonica", "telefonica"), - Brand("vivo", "vivo"), - Brand("vivoNew", "vivo-new") + Brand(BLAU, "blau"), + Brand(MOVISTAR, "movistar"), + Brand(O2, "o2"), + Brand(TELEFONICA, "telefonica"), + Brand(VIVO, "vivo"), + Brand(VIVO_NEW, "vivo-new"), + Brand(VIVO_NEW_OVERRIDE, "vivo-new") ) + val ALPHA_REGEX = "0\\.\\d{1,2}".toRegex() const val AUTOGENERATED_COMMENT = "Code generated automatically, DO NOT EDIT manually. Use Import design tokens GitHub Action." + const val AUTOGENERATED_COMMENT_FOR_VIVO_NEW_OVERRIDE = + "Important: This theme is just a copy of $VIVO_NEW. As themes do not support multiple inheritance" const val MISTICA_TOKENS_DIR = "../temp/mistica-design/tokens" const val CIRCLE_RADIUS = "circle" const val LIGHT = "light" diff --git a/tokens/src/main/java/com/telefonica/mistica/tokens/xml/GenerateXMLFiles.kt b/tokens/src/main/java/com/telefonica/mistica/tokens/xml/GenerateXMLFiles.kt index 792849fd6..24ed21fbf 100644 --- a/tokens/src/main/java/com/telefonica/mistica/tokens/xml/GenerateXMLFiles.kt +++ b/tokens/src/main/java/com/telefonica/mistica/tokens/xml/GenerateXMLFiles.kt @@ -3,6 +3,7 @@ package com.telefonica.mistica.tokens.xml import com.squareup.moshi.JsonAdapter import com.telefonica.mistica.tokens.TokensGenerator.Companion.ALPHA_REGEX import com.telefonica.mistica.tokens.TokensGenerator.Companion.AUTOGENERATED_COMMENT +import com.telefonica.mistica.tokens.TokensGenerator.Companion.AUTOGENERATED_COMMENT_FOR_VIVO_NEW_OVERRIDE import com.telefonica.mistica.tokens.TokensGenerator.Companion.BOLD import com.telefonica.mistica.tokens.TokensGenerator.Companion.BRANDS import com.telefonica.mistica.tokens.TokensGenerator.Companion.CIRCLE_RADIUS @@ -10,6 +11,7 @@ import com.telefonica.mistica.tokens.TokensGenerator.Companion.LIGHT import com.telefonica.mistica.tokens.TokensGenerator.Companion.MEDIUM import com.telefonica.mistica.tokens.TokensGenerator.Companion.MISTICA_TOKENS_DIR import com.telefonica.mistica.tokens.TokensGenerator.Companion.REGULAR +import com.telefonica.mistica.tokens.TokensGenerator.Companion.VIVO_NEW_OVERRIDE import com.telefonica.mistica.tokens.common.GetBorderRadiusName import com.telefonica.mistica.tokens.common.GetColorNameWithAlpha import com.telefonica.mistica.tokens.common.GetColorsWithAlpha @@ -76,13 +78,26 @@ class GenerateXMLFiles( val lightThemesXml = xml("resources", "utf-8", XmlVersion.V10) { comment(AUTOGENERATED_COMMENT) + if (brandName == VIVO_NEW_OVERRIDE) { //TODO: ANDROID-13833 Remove this when VIVO_NEW is main style. + comment(AUTOGENERATED_COMMENT_FOR_VIVO_NEW_OVERRIDE) + } + "style" { - attribute("name", "MisticaTheme.${brandName.capitalizeString()}") - attribute("parent", "MisticaTheme.${brandName.capitalizeString()}_Customizations") + if (brandName == VIVO_NEW_OVERRIDE) { //TODO: ANDROID-13833 Remove this when VIVO_NEW is main style. + attribute("name", brandName.capitalizeString()) + attribute("parent", "${brandName.capitalizeString()}_Customizations") + } else { + attribute("name", "MisticaTheme.${brandName.capitalizeString()}") + attribute("parent", "MisticaTheme.${brandName.capitalizeString()}_Customizations") + } } "style" { - attribute("name", "MisticaTheme.${brandName.capitalizeString()}_Base") + if (brandName == VIVO_NEW_OVERRIDE) { //TODO: ANDROID-13833 Remove this when VIVO_NEW is main style. + attribute("name", "${brandName.capitalizeString()}_Base") + } else { + attribute("name", "MisticaTheme.${brandName.capitalizeString()}_Base") + } mapColors(tokens.light, brandName) borderRadius(tokens) @@ -157,9 +172,18 @@ class GenerateXMLFiles( val darkThemesXml = xml("resources", "utf-8", XmlVersion.V10) { comment(AUTOGENERATED_COMMENT) + if (brandName == VIVO_NEW_OVERRIDE) { //TODO: ANDROID-13833 Remove this when VIVO_NEW is main style. + comment(AUTOGENERATED_COMMENT_FOR_VIVO_NEW_OVERRIDE) + } + "style" { - attribute("name", "MisticaTheme.${brandName.capitalizeString()}") - attribute("parent", "MisticaTheme.${brandName.capitalizeString()}_Customizations") + if (brandName == VIVO_NEW_OVERRIDE) { //TODO: ANDROID-13833 Remove this when VIVO_NEW is main style. + attribute("name", brandName.capitalizeString()) + attribute("parent", "${brandName.capitalizeString()}_Customizations") + } else { + attribute("name", "MisticaTheme.${brandName.capitalizeString()}") + attribute("parent", "MisticaTheme.${brandName.capitalizeString()}_Customizations") + } mapColors(tokens.dark, brandName) }