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 0d34acd5b..d08a5ee03 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,7 +18,6 @@ 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 @@ -49,7 +48,6 @@ 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 9e2014a97..ee314de54 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 @@ -71,13 +71,11 @@ 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() { @@ -250,7 +248,6 @@ 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 ff40ab1aa..71f563b81 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,7 +12,6 @@ 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 @@ -21,7 +20,6 @@ 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, @@ -71,7 +69,6 @@ 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 } } @@ -82,6 +79,5 @@ 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 67af1eb29..fbe028e25 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, VIVO_NEW_OVERRIDE } +enum class BrandType { BLAU, MOVISTAR, O2, TELEFONICA, VIVO, VIVO_NEW } 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 deleted file mode 100644 index e6e0d2113..000000000 --- a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrand.kt +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index dc9394ba1..000000000 --- a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandColorsAutogenerated.kt +++ /dev/null @@ -1,365 +0,0 @@ -// 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 deleted file mode 100644 index 4379124ff..000000000 --- a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontSizesAutogenerated.kt +++ /dev/null @@ -1,11 +0,0 @@ -// 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 deleted file mode 100644 index 6fc369eae..000000000 --- a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandFontWeightsAutogenerated.kt +++ /dev/null @@ -1,34 +0,0 @@ -// 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 deleted file mode 100644 index a89c2528b..000000000 --- a/library/src/main/java/com/telefonica/mistica/compose/theme/brand/VivoNewOverrideBrandRadiusAutogenerated.kt +++ /dev/null @@ -1,19 +0,0 @@ -// 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/tokens/src/main/java/com/telefonica/mistica/tokens/compose/GenerateComposeFiles.kt b/tokens/src/main/java/com/telefonica/mistica/tokens/compose/GenerateComposeFiles.kt index c12420bb1..741b7439b 100644 --- a/tokens/src/main/java/com/telefonica/mistica/tokens/compose/GenerateComposeFiles.kt +++ b/tokens/src/main/java/com/telefonica/mistica/tokens/compose/GenerateComposeFiles.kt @@ -4,6 +4,7 @@ import com.squareup.kotlinpoet.ClassName import com.squareup.moshi.JsonAdapter import com.telefonica.mistica.tokens.TokensGenerator.Companion.BRANDS import com.telefonica.mistica.tokens.TokensGenerator.Companion.MISTICA_TOKENS_DIR +import com.telefonica.mistica.tokens.TokensGenerator.Companion.VIVO_NEW_OVERRIDE import com.telefonica.mistica.tokens.dto.TokensDTO import java.io.File @@ -20,18 +21,20 @@ class GenerateComposeFiles( generateMisticaColors(jsonAdapter) generateMisticaRadius(jsonAdapter) - BRANDS.forEach { brand -> - val json = File("${MISTICA_TOKENS_DIR}/${brand.file}.json").readText() - val tokens = jsonAdapter.fromJson(json) - if (tokens == null) { - throw Exception("Invalid JSON") - } else { - generateBrandColors(tokens, brand.name) - generateBrandRadius(tokens, brand.name) - generateBrandFontWeights(tokens, brand.name) - generateBrandFontSizes(tokens, brand.name) + BRANDS + .filter { it.name != VIVO_NEW_OVERRIDE } //TODO: ANDROID-13833 Remove this when VIVO_NEW is main style. + .forEach { brand -> + val json = File("${MISTICA_TOKENS_DIR}/${brand.file}.json").readText() + val tokens = jsonAdapter.fromJson(json) + if (tokens == null) { + throw Exception("Invalid JSON") + } else { + generateBrandColors(tokens, brand.name) + generateBrandRadius(tokens, brand.name) + generateBrandFontWeights(tokens, brand.name) + generateBrandFontSizes(tokens, brand.name) + } } - } } companion object {