Skip to content

Commit

Permalink
Fix breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
amegias committed Aug 22, 2024
1 parent 5e9329c commit f45624f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
18 changes: 9 additions & 9 deletions Sources/Mistica/Components/Button/ButtonStyle+Toolkit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public extension Button.Style {
allowsBleedingAlignment: false,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textButtonPrimary, backgroundColor: .buttonPrimaryBackground, borderColor: .buttonPrimaryBackground),
.selected: Button.StateStyle(textColor: .textButtonPrimary, backgroundColor: .buttonPrimaryBackgroundSelected, borderColor: .buttonPrimaryBackgroundSelected),
.selected: Button.StateStyle(textColor: .textButtonPrimary, backgroundColor: .buttonPrimaryBackgroundPressed, borderColor: .buttonPrimaryBackgroundPressed),
.disabled: Button.StateStyle(textColor: .textButtonPrimary, backgroundColor: .buttonPrimaryBackground, borderColor: .buttonPrimaryBackground),
.loading: Button.StateStyle(textColor: .textButtonPrimary, backgroundColor: .buttonPrimaryBackground, borderColor: .buttonPrimaryBackground)
]
Expand All @@ -45,7 +45,7 @@ public extension Button.Style {
allowsBleedingAlignment: false,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textButtonSecondary, backgroundColor: backgroundColor, borderColor: .buttonSecondaryBorder),
.selected: Button.StateStyle(textColor: .textButtonSecondarySelected, backgroundColor: backgroundColor, borderColor: .buttonSecondaryBackgroundSelected),
.selected: Button.StateStyle(textColor: .textButtonSecondaryPressed, backgroundColor: backgroundColor, borderColor: .buttonSecondaryBackgroundPressed),
.disabled: Button.StateStyle(textColor: .textButtonSecondary, backgroundColor: backgroundColor, borderColor: .buttonSecondaryBorder),
.loading: Button.StateStyle(textColor: .textButtonSecondary, backgroundColor: backgroundColor, borderColor: .buttonSecondaryBorder)
]
Expand All @@ -59,7 +59,7 @@ public extension Button.Style {
allowsBleedingAlignment: false,
stateStyleByState: [
.normal: Button.StateStyle(textColor: textColor, backgroundColor: .buttonDangerBackground, borderColor: .buttonDangerBackground),
.selected: Button.StateStyle(textColor: textColor, backgroundColor: .buttonDangerBackgroundSelected, borderColor: .buttonDangerBackgroundSelected),
.selected: Button.StateStyle(textColor: textColor, backgroundColor: .buttonDangerBackgroundPressed, borderColor: .buttonDangerBackgroundPressed),
.disabled: Button.StateStyle(textColor: textColor, backgroundColor: .buttonDangerBackground, borderColor: .buttonDangerBackground),
.loading: Button.StateStyle(textColor: textColor, backgroundColor: .buttonDangerBackground, borderColor: .buttonDangerBackground)
]
Expand All @@ -73,7 +73,7 @@ public extension Button.Style {
allowsBleedingAlignment: true,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textLink, backgroundColor: backgroundColor, borderColor: backgroundColor),
.selected: Button.StateStyle(textColor: .textLink, backgroundColor: .buttonLinkBackgroundSelected, borderColor: backgroundColor),
.selected: Button.StateStyle(textColor: .textLink, backgroundColor: .buttonLinkBackgroundPressed, borderColor: backgroundColor),
.disabled: Button.StateStyle(textColor: .textLink, backgroundColor: backgroundColor, borderColor: backgroundColor),
.loading: Button.StateStyle(textColor: .textLink, backgroundColor: backgroundColor, borderColor: backgroundColor)
]
Expand All @@ -89,7 +89,7 @@ public extension Button.Style {
allowsBleedingAlignment: true,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .clear, borderColor: .clear),
.selected: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .buttonLinkDangerBackgroundSelected, borderColor: .clear),
.selected: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .buttonLinkDangerBackgroundPressed, borderColor: .clear),
.disabled: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .clear, borderColor: .clear),
.loading: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .clear, borderColor: .clear)
]
Expand All @@ -105,7 +105,7 @@ public extension Button.Style {
allowsBleedingAlignment: true,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .buttonLinkDangerBackgroundInverse, borderColor: .clear),
.selected: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .buttonLinkDangerBackgroundInverseSelected, borderColor: .clear),
.selected: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .buttonLinkDangerBackgroundInversePressed, borderColor: .clear),
.disabled: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .clear, borderColor: .clear),
.loading: Button.StateStyle(textColor: .textLinkDanger, backgroundColor: .clear, borderColor: .clear)
]
Expand All @@ -121,7 +121,7 @@ public extension Button.Style {
allowsBleedingAlignment: false,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textButtonPrimaryInverse, backgroundColor: .buttonPrimaryBackgroundInverse, borderColor: .buttonPrimaryBackgroundInverse),
.selected: Button.StateStyle(textColor: .textButtonPrimaryInverseSelected, backgroundColor: .buttonPrimaryBackgroundInverseSelected, borderColor: .buttonPrimaryBackgroundInverseSelected),
.selected: Button.StateStyle(textColor: .textButtonPrimaryInversePressed, backgroundColor: .buttonPrimaryBackgroundInversePressed, borderColor: .buttonPrimaryBackgroundInversePressed),
.disabled: Button.StateStyle(textColor: .textButtonPrimaryInverse, backgroundColor: .buttonPrimaryBackgroundInverse, borderColor: .buttonPrimaryBackgroundInverse),
.loading: Button.StateStyle(textColor: .textButtonPrimaryInverse, backgroundColor: .buttonPrimaryBackgroundInverse, borderColor: .buttonPrimaryBackgroundInverse)
]
Expand All @@ -133,7 +133,7 @@ public extension Button.Style {
allowsBleedingAlignment: false,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textButtonSecondaryInverse, backgroundColor: .clear, borderColor: .buttonSecondaryBorderInverse),
.selected: Button.StateStyle(textColor: .textButtonSecondaryInverseSelected, backgroundColor: .clear, borderColor: .buttonSecondaryBorderInverseSelected),
.selected: Button.StateStyle(textColor: .textButtonSecondaryInversePressed, backgroundColor: .clear, borderColor: .buttonSecondaryBorderInversePressed),
.disabled: Button.StateStyle(textColor: .textButtonSecondaryInverse, backgroundColor: .clear, borderColor: .buttonSecondaryBorderInverse),
.loading: Button.StateStyle(textColor: .textButtonSecondaryInverse, backgroundColor: .clear, borderColor: .buttonSecondaryBorderInverse)
]
Expand All @@ -146,7 +146,7 @@ public extension Button.Style {
allowsBleedingAlignment: true,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textLinkInverse, backgroundColor: backgroundColor, borderColor: backgroundColor),
.selected: Button.StateStyle(textColor: .textLinkInverse, backgroundColor: .buttonLinkBackgroundInverseSelected, borderColor: backgroundColor),
.selected: Button.StateStyle(textColor: .textLinkInverse, backgroundColor: .buttonLinkBackgroundInversePressed, borderColor: backgroundColor),
.disabled: Button.StateStyle(textColor: .textLinkInverse, backgroundColor: backgroundColor, borderColor: backgroundColor),
.loading: Button.StateStyle(textColor: .textLinkInverse, backgroundColor: backgroundColor, borderColor: backgroundColor)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private extension Button.Style {
allowsBleedingAlignment: true,
stateStyleByState: [
.normal: Button.StateStyle(textColor: .textLinkSnackbar, backgroundColor: backgroundColor, borderColor: backgroundColor),
.selected: Button.StateStyle(textColor: .textLinkSnackbar, backgroundColor: .buttonLinkBackgroundSelected, borderColor: backgroundColor),
.selected: Button.StateStyle(textColor: .textLinkSnackbar, backgroundColor: .buttonLinkBackgroundPressed, borderColor: backgroundColor),
.disabled: Button.StateStyle(textColor: .textLinkSnackbar, backgroundColor: backgroundColor, borderColor: backgroundColor),
.loading: Button.StateStyle(textColor: .textLinkSnackbar, backgroundColor: backgroundColor, borderColor: backgroundColor)
]
Expand Down
28 changes: 14 additions & 14 deletions Sources/MisticaSwiftUI/Components/Button/MisticaButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
),
.selected: MisticaButton.StateStyle(
textColor: .textButtonPrimary,
backgroundColor: .buttonPrimaryBackgroundSelected,
borderColor: .buttonPrimaryBackgroundSelected
backgroundColor: .buttonPrimaryBackgroundPressed,
borderColor: .buttonPrimaryBackgroundPressed
),
.disabled: MisticaButton.StateStyle(
textColor: .textButtonPrimary,
Expand Down Expand Up @@ -85,9 +85,9 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
borderColor: .buttonPrimaryBackgroundInverse
),
.selected: MisticaButton.StateStyle(
textColor: .textButtonPrimaryInverseSelected,
backgroundColor: .buttonPrimaryBackgroundInverseSelected,
borderColor: .buttonPrimaryBackgroundInverseSelected
textColor: .textButtonPrimaryInversePressed,
backgroundColor: .buttonPrimaryBackgroundInversePressed,
borderColor: .buttonPrimaryBackgroundInversePressed
),
.disabled: MisticaButton.StateStyle(
textColor: .textButtonPrimaryInverse,
Expand Down Expand Up @@ -120,9 +120,9 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
borderColor: .buttonSecondaryBorder
),
.selected: MisticaButton.StateStyle(
textColor: .textButtonSecondarySelected,
textColor: .textButtonSecondaryPressed,
backgroundColor: .clear,
borderColor: .buttonSecondaryBackgroundSelected
borderColor: .buttonSecondaryBackgroundPressed
),
.disabled: MisticaButton.StateStyle(
textColor: .textButtonSecondary.opacity(opacity),
Expand Down Expand Up @@ -155,9 +155,9 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
borderColor: .buttonSecondaryBorderInverse
),
.selected: MisticaButton.StateStyle(
textColor: .textButtonSecondaryInverseSelected,
textColor: .textButtonSecondaryInversePressed,
backgroundColor: .clear,
borderColor: .buttonSecondaryBorderInverseSelected
borderColor: .buttonSecondaryBorderInversePressed
),
.disabled: MisticaButton.StateStyle(
textColor: .textButtonSecondaryInverse.opacity(opacity),
Expand Down Expand Up @@ -191,8 +191,8 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
),
.selected: MisticaButton.StateStyle(
textColor: .textButtonPrimary,
backgroundColor: .buttonDangerBackgroundSelected,
borderColor: .buttonDangerBackgroundSelected
backgroundColor: .buttonDangerBackgroundPressed,
borderColor: .buttonDangerBackgroundPressed
),
.disabled: MisticaButton.StateStyle(
textColor: .textButtonPrimary,
Expand Down Expand Up @@ -228,7 +228,7 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
),
.selected: MisticaButton.StateStyle(
textColor: .textLink,
backgroundColor: .buttonLinkBackgroundSelected,
backgroundColor: .buttonLinkBackgroundPressed,
borderColor: .clear
),
.disabled: MisticaButton.StateStyle(
Expand Down Expand Up @@ -265,7 +265,7 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
),
.selected: MisticaButton.StateStyle(
textColor: .textLinkInverse,
backgroundColor: .buttonLinkBackgroundInverseSelected,
backgroundColor: .buttonLinkBackgroundInversePressed,
borderColor: .clear
),
.disabled: MisticaButton.StateStyle(
Expand Down Expand Up @@ -301,7 +301,7 @@ public extension ButtonStyle where Self == MisticaButtonStyle {
),
.selected: MisticaButton.StateStyle(
textColor: .textLinkSnackbar,
backgroundColor: .buttonLinkBackgroundSelected,
backgroundColor: .buttonLinkBackgroundPressed,
borderColor: .clear
),
.disabled: MisticaButton.StateStyle(
Expand Down

0 comments on commit f45624f

Please sign in to comment.