Skip to content

Commit

Permalink
fix: dark mode semantics (#59)
Browse files Browse the repository at this point in the history
* fix: dark mode semantics colors

* fix: linter issues

* chore: bump to 0.5.2 for cocoapods + update README

Co-authored-by: daniel-dumortier <[email protected]>
  • Loading branch information
baptistedajon and daniel-dumortier authored Apr 27, 2022
1 parent 854c349 commit 61df95d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ For its [Digital section](https://www.decathlon.design/726f8c765/p/6145b2-overvi

```swift
dependencies: [
.package(url: "https://github.com/Decathlon/vitamin-ios.git", .exact("0.5.0"))
.package(url: "https://github.com/Decathlon/vitamin-ios.git", .exact("0.5.2"))
]
```

### Cocoapods
```ruby
pod 'Vitamin', '= 0.5.0'
pod 'Vitamin', '= 0.5.2'
```

## Available elements
Expand Down
22 changes: 13 additions & 9 deletions Sources/Vitamin/Foundations/Colors/Semantic/Colors+Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension VitaminColor {
public static let contentActionReversed = VitaminColor.Base.white.color
public static let contentVisitedReversed = VitaminColor.Base.purple200.color

public static let borderPrimary = VitaminColor.Base.black.color
public static let borderPrimary = VitaminColor.Base.white.color
public static let borderSecondary = VitaminColor.Base.grey200.color
public static let borderTertiary = VitaminColor.Base.grey100.color
public static let borderActive = VitaminColor.Base.blue400.color
Expand All @@ -46,7 +46,7 @@ extension VitaminColor {
public static let borderWarning = VitaminColor.Base.orange400.color
public static let borderPositive = VitaminColor.Base.conifer400.color
public static let borderInformation = VitaminColor.Base.blue400.color
public static let borderPrimaryReversed = VitaminColor.Base.white.color
public static let borderPrimaryReversed = VitaminColor.Base.black.color

public static let decorativeGravel = VitaminColor.Base.grey100.color
public static let decorativeBrick = VitaminColor.Base.red100.color
Expand All @@ -57,18 +57,20 @@ extension VitaminColor {
public static let decorativeCobalt = VitaminColor.Base.blue100.color
public static let decorativeAmethyst = VitaminColor.Base.purple100.color

public static let hoverPrimary = VitaminColor.Base.blue50.color

public static let shadowShadow = VitaminColor.Base.blue600.color.withAlphaComponent(0.1)
}

public enum Dark {
public static let backgroundPrimary = VitaminColor.Base.grey800.color
public static let backgroundSecondary = VitaminColor.Base.grey900.color
public static let backgroundTertiary = VitaminColor.Base.black.color
public static let backgroundPrimary = VitaminColor.Base.grey900.color
public static let backgroundSecondary = VitaminColor.Base.black.color
public static let backgroundTertiary = VitaminColor.Base.grey800.color
public static let backgroundBrandPrimary = VitaminColor.Base.blue300.color
public static let backgroundBrandSecondary = VitaminColor.Base.blue700.color
public static let backgroundAccent = VitaminColor.Base.yellow400.color
@available(*, deprecated, renamed: "backgroundAlert")
public static let backgroundDiscount = VitaminColor.Base.red400.color
public static let backgroundDiscount = VitaminColor.Base.red300.color
public static let backgroundAlert = VitaminColor.Base.red300.color
public static let backgroundPrimaryReversed = VitaminColor.Base.white.color
public static let backgroundBrandPrimaryReversed = VitaminColor.Base.black.color
Expand All @@ -89,16 +91,16 @@ extension VitaminColor {
public static let contentActionReversed = VitaminColor.Base.black.color
public static let contentVisitedReversed = VitaminColor.Base.purple300.color

public static let borderPrimary = VitaminColor.Base.white.color
public static let borderSecondary = VitaminColor.Base.grey200.color
public static let borderPrimary = VitaminColor.Base.grey800.color
public static let borderSecondary = VitaminColor.Base.grey700.color
public static let borderTertiary = VitaminColor.Base.black.color
public static let borderActive = VitaminColor.Base.blue300.color
public static let borderInactive = VitaminColor.Base.grey500.color
public static let borderNegative = VitaminColor.Base.red300.color
public static let borderWarning = VitaminColor.Base.orange300.color
public static let borderPositive = VitaminColor.Base.conifer300.color
public static let borderInformation = VitaminColor.Base.blue300.color
public static let borderPrimaryReversed = VitaminColor.Base.black.color
public static let borderPrimaryReversed = VitaminColor.Base.white.color

public static let decorativeGravel = VitaminColor.Base.grey600.color
public static let decorativeBrick = VitaminColor.Base.red600.color
Expand All @@ -109,6 +111,8 @@ extension VitaminColor {
public static let decorativeCobalt = VitaminColor.Base.blue600.color
public static let decorativeAmethyst = VitaminColor.Base.purple600.color

public static let hoverPrimary = VitaminColor.Base.blue700.color

public static let shadowShadow = VitaminColor.Base.blue200.color.withAlphaComponent(0.1)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Vitamin.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Vitamin"
s.version = "0.5.0"
s.version = "0.5.2"
s.summary = "The iOS implement of Decathlon's design system"

s.homepage = "https://github.com/Decathlon/vitamin-ios"
Expand Down

0 comments on commit 61df95d

Please sign in to comment.