Skip to content

Commit

Permalink
Merge pull request #285 from adevinta/colors/new-tokens
Browse files Browse the repository at this point in the history
Colors/new tokens
  • Loading branch information
LouisBorleeAdevinta authored Aug 2, 2023
2 parents 389a77e + d187e59 commit bcd68e8
Show file tree
Hide file tree
Showing 79 changed files with 798 additions and 372 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ public protocol ColorsStates {
var supportVariantPressed: any ColorToken { get }
var supportContainerPressed: any ColorToken { get }

// MARK: - Accent
var accentPressed: any ColorToken { get }
var accentVariantPressed: any ColorToken { get }
var accentContainerPressed: any ColorToken { get }

// MARK: - Basic
var basicPressed: any ColorToken { get }
var basicContainerPressed: any ColorToken { get }

// MARK: - Base

var surfacePressed: any ColorToken { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public struct ColorsStatesDefault: ColorsStates {
public let supportPressed: any ColorToken
public let supportVariantPressed: any ColorToken
public let supportContainerPressed: any ColorToken
public let accentPressed: any ColorToken
public let accentVariantPressed: any ColorToken
public let accentContainerPressed: any ColorToken
public let basicPressed: any ColorToken
public let basicContainerPressed: any ColorToken
public let surfacePressed: any ColorToken
public let surfaceInversePressed: any ColorToken
public let outlinePressed: any ColorToken
Expand All @@ -38,6 +43,11 @@ public struct ColorsStatesDefault: ColorsStates {
supportPressed: any ColorToken,
supportVariantPressed: any ColorToken,
supportContainerPressed: any ColorToken,
accentPressed: any ColorToken,
accentVariantPressed: any ColorToken,
accentContainerPressed: any ColorToken,
basicPressed: any ColorToken,
basicContainerPressed: any ColorToken,
surfacePressed: any ColorToken,
surfaceInversePressed: any ColorToken,
outlinePressed: any ColorToken,
Expand All @@ -57,6 +67,11 @@ public struct ColorsStatesDefault: ColorsStates {
self.supportPressed = supportPressed
self.supportVariantPressed = supportVariantPressed
self.supportContainerPressed = supportContainerPressed
self.accentPressed = accentPressed
self.accentVariantPressed = accentVariantPressed
self.accentContainerPressed = accentContainerPressed
self.basicPressed = basicPressed
self.basicContainerPressed = basicContainerPressed
self.surfacePressed = surfacePressed
self.surfaceInversePressed = surfaceInversePressed
self.outlinePressed = outlinePressed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ extension ColorsStatesGeneratedMock {
mock.underlyingSupportVariantPressed = ColorTokenGeneratedMock.random()
mock.underlyingSupportContainerPressed = ColorTokenGeneratedMock.random()

mock.underlyingAccentPressed = ColorTokenGeneratedMock.random()
mock.underlyingAccentVariantPressed = ColorTokenGeneratedMock.random()
mock.underlyingAccentContainerPressed = ColorTokenGeneratedMock.random()

mock.underlyingBasicPressed = ColorTokenGeneratedMock.random()
mock.underlyingBasicContainerPressed = ColorTokenGeneratedMock.random()

mock.underlyingSurfacePressed = ColorTokenGeneratedMock.random()
mock.underlyingSurfaceInversePressed = ColorTokenGeneratedMock.random()
mock.underlyingOutlinePressed = ColorTokenGeneratedMock.random()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ struct ColorSectionStatesViewModel: ColorSectionViewModelable {
.init(name: "supportPressed", colorToken: color.supportPressed),
.init(name: "supportVariantPressed", colorToken: color.supportVariantPressed),
.init(name: "supportContainerPressed", colorToken: color.supportContainerPressed),
.init(name: "accentPressed", colorToken: color.accentPressed),
.init(name: "accentVariantPressed", colorToken: color.accentVariantPressed),
.init(name: "accentContainerPressed", colorToken: color.accentContainerPressed),
.init(name: "basicPressed", colorToken: color.basicPressed),
.init(name: "basicContainerPressed", colorToken: color.basicContainerPressed),
.init(name: "surfacePressed", colorToken: color.surfacePressed),
.init(name: "surfaceInversePressed", colorToken: color.surfaceInversePressed),
.init(name: "outlinePressed", colorToken: color.outlinePressed),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.976",
"green" : "0.973",
"red" : "0.973"
"blue" : "0xF4",
"green" : "0xF4",
"red" : "0xF4"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.157",
"green" : "0.141",
"red" : "0.145"
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x2A",
"green" : "0x1F",
"red" : "0x1D"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x2A",
"green" : "0x1F",
"red" : "0x1D"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xF4",
"green" : "0xF4",
"red" : "0xF4"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x2A",
"green" : "0x1F",
"red" : "0x1D"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x41",
"green" : "0x37",
"red" : "0x35"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x2A",
"green" : "0x1F",
"red" : "0x1D"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x2A",
"green" : "0x1F",
"red" : "0x1D"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.835",
"green" : "0.816",
"red" : "0.820"
"blue" : "0xDE",
"green" : "0xDC",
"red" : "0xDC"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.314",
"green" : "0.286",
"red" : "0.290"
"blue" : "0x57",
"green" : "0x4E",
"red" : "0x4D"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "0.720",
"blue" : "0.212",
"green" : "0.188",
"red" : "0.192"
"blue" : "0x36",
"green" : "0x30",
"red" : "0x31"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "0.720",
"blue" : "0.212",
"green" : "0.188",
"red" : "0.192"
"blue" : "0x36",
"green" : "0x30",
"red" : "0x31"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.157",
"green" : "0.141",
"red" : "0.145"
"blue" : "0x41",
"green" : "0x37",
"red" : "0x35"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.976",
"green" : "0.973",
"red" : "0.973"
"blue" : "0xF4",
"green" : "0xF4",
"red" : "0xF4"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
"blue" : "0x2A",
"green" : "0x1F",
"red" : "0x1D"
}
},
"idiom" : "universal"
Expand Down
Loading

0 comments on commit bcd68e8

Please sign in to comment.