Skip to content

Commit

Permalink
Merge pull request #9 from duckduckgo/diego/vpn-control-widget
Browse files Browse the repository at this point in the history
Updates DRK
  • Loading branch information
diegoreymendez authored Dec 20, 2024
2 parents ad133f7 + ba2f7e2 commit a35414a
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Sources/DesignResourcesKit/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ public enum DesignSystemColor: String {
case backgroundSheets
case surface
case container
case textLink
case textPrimary
case textSecondary
case textSelectionFill
case lines
case accent
case icons
Expand All @@ -39,10 +41,20 @@ public enum DesignSystemColor: String {
case buttonsSecondaryFillPressed
}

/// When used multiple times, we should propose that these are promoted do design system.
///
public enum SingleUserColor: String {
case controlWidgetBackground
}

public extension Color {
init(designSystemColor: DesignSystemColor) {
self.init(designSystemColor.rawValue, bundle: bundle)
}

init(singleUseColor: SingleUserColor) {
self.init(singleUseColor.rawValue, bundle: bundle)
}
}

#if canImport(UIKit)
Expand All @@ -53,6 +65,10 @@ public extension UIColor {
convenience init(designSystemColor: DesignSystemColor) {
self.init(named: designSystemColor.rawValue, in: bundle, compatibleWith: nil)!
}

convenience init(singleUseColor: SingleUserColor) {
self.init(named: singleUseColor.rawValue, in: bundle, compatibleWith: nil)!
}
}

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x87",
"green" : "0x83",
"red" : "0x81"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x87",
"green" : "0x83",
"red" : "0x81"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xEF",
"green" : "0x69",
"red" : "0x39"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF6",
"green" : "0x95",
"red" : "0x72"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.200",
"blue" : "0xEF",
"green" : "0x69",
"red" : "0x39"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.200",
"blue" : "0xF6",
"green" : "0x95",
"red" : "0x72"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

0 comments on commit a35414a

Please sign in to comment.