|
@@ -3,42 +3,128 @@
|
|
|
// indeed_ai_job_search
|
|
// indeed_ai_job_search
|
|
|
//
|
|
//
|
|
|
|
|
|
|
|
|
|
+import AppKit
|
|
|
import SwiftUI
|
|
import SwiftUI
|
|
|
|
|
|
|
|
enum AppColors {
|
|
enum AppColors {
|
|
|
// Brand — Indeed-inspired blue from design
|
|
// Brand — Indeed-inspired blue from design
|
|
|
- static let brand = Color(red: 0.145, green: 0.388, blue: 0.922) // #2557EB
|
|
|
|
|
- static let brandDark = Color(red: 0.082, green: 0.255, blue: 0.651) // #1541A6
|
|
|
|
|
- static let brandSoft = Color(red: 0.898, green: 0.933, blue: 0.988) // #E5EEFC
|
|
|
|
|
- static let brandMuted = Color(red: 0.820, green: 0.886, blue: 0.976) // #D1E2F9
|
|
|
|
|
|
|
+ static let brand = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.145, green: 0.388, blue: 0.922, alpha: 1), // #2557EB
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.357, green: 0.549, blue: 0.980, alpha: 1) // #5B8CFA
|
|
|
|
|
+ )
|
|
|
|
|
+ static let brandDark = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.082, green: 0.255, blue: 0.651, alpha: 1), // #1541A6
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.255, green: 0.455, blue: 0.922, alpha: 1) // #4174EB
|
|
|
|
|
+ )
|
|
|
|
|
+ static let brandSoft = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.898, green: 0.933, blue: 0.988, alpha: 1), // #E5EEFC
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.145, green: 0.200, blue: 0.320, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let brandMuted = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.820, green: 0.886, blue: 0.976, alpha: 1), // #D1E2F9
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.180, green: 0.255, blue: 0.400, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
// Surfaces
|
|
// Surfaces
|
|
|
- static let backgroundPrimary = Color(red: 0.973, green: 0.976, blue: 0.980) // #F8F9FA
|
|
|
|
|
- static let backgroundSidebar = Color(red: 0.953, green: 0.961, blue: 0.973) // #F3F5F8
|
|
|
|
|
- static let surface = Color.white
|
|
|
|
|
- static let surfaceElevated = Color.white
|
|
|
|
|
- static let surfaceCard = Color.white
|
|
|
|
|
- static let border = Color(red: 0.890, green: 0.906, blue: 0.925) // #E3E7EC
|
|
|
|
|
- static let borderStrong = Color(red: 0.820, green: 0.843, blue: 0.875) // #D1D7DF
|
|
|
|
|
|
|
+ static let backgroundPrimary = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.973, green: 0.976, blue: 0.980, alpha: 1), // #F8F9FA
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.086, green: 0.098, blue: 0.118, alpha: 1) // #161920
|
|
|
|
|
+ )
|
|
|
|
|
+ static let backgroundSidebar = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.953, green: 0.961, blue: 0.973, alpha: 1), // #F3F5F8
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.110, green: 0.125, blue: 0.149, alpha: 1) // #1C2026
|
|
|
|
|
+ )
|
|
|
|
|
+ static let surface = Color.dynamic(
|
|
|
|
|
+ light: .white,
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.145, green: 0.165, blue: 0.196, alpha: 1) // #252A32
|
|
|
|
|
+ )
|
|
|
|
|
+ static let surfaceElevated = Color.dynamic(
|
|
|
|
|
+ light: .white,
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.173, green: 0.196, blue: 0.231, alpha: 1) // #2C323B
|
|
|
|
|
+ )
|
|
|
|
|
+ static let surfaceCard = Color.dynamic(
|
|
|
|
|
+ light: .white,
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.145, green: 0.165, blue: 0.196, alpha: 1) // #252A32
|
|
|
|
|
+ )
|
|
|
|
|
+ static let border = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.890, green: 0.906, blue: 0.925, alpha: 1), // #E3E7EC
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.255, green: 0.282, blue: 0.322, alpha: 1) // #414852
|
|
|
|
|
+ )
|
|
|
|
|
+ static let borderStrong = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.820, green: 0.843, blue: 0.875, alpha: 1), // #D1D7DF
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.322, green: 0.353, blue: 0.400, alpha: 1) // #525A66
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
// Text
|
|
// Text
|
|
|
- static let textPrimary = Color(red: 0.102, green: 0.122, blue: 0.153) // #1A1F27
|
|
|
|
|
- static let textSecondary = Color(red: 0.420, green: 0.455, blue: 0.510) // #6B7482
|
|
|
|
|
- static let textTertiary = Color(red: 0.580, green: 0.620, blue: 0.670) // #949EAB
|
|
|
|
|
|
|
+ static let textPrimary = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.102, green: 0.122, blue: 0.153, alpha: 1), // #1A1F27
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.937, green: 0.945, blue: 0.957, alpha: 1) // #EFF1F4
|
|
|
|
|
+ )
|
|
|
|
|
+ static let textSecondary = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.420, green: 0.455, blue: 0.510, alpha: 1), // #6B7482
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.655, green: 0.690, blue: 0.737, alpha: 1) // #A7B0BC
|
|
|
|
|
+ )
|
|
|
|
|
+ static let textTertiary = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.580, green: 0.620, blue: 0.670, alpha: 1), // #949EAB
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.510, green: 0.545, blue: 0.600, alpha: 1) // #828B99
|
|
|
|
|
+ )
|
|
|
static let textOnBrand = Color.white
|
|
static let textOnBrand = Color.white
|
|
|
|
|
|
|
|
// Semantic
|
|
// Semantic
|
|
|
- static let salary = Color(red: 0.086, green: 0.580, blue: 0.373) // #16945F
|
|
|
|
|
- static let featured = Color(red: 0.898, green: 0.933, blue: 0.988)
|
|
|
|
|
- static let featuredText = Color(red: 0.145, green: 0.388, blue: 0.922)
|
|
|
|
|
- static let urgent = Color(red: 1.0, green: 0.910, blue: 0.910) // #FFE8E8
|
|
|
|
|
- static let urgentText = Color(red: 0.780, green: 0.220, blue: 0.250) // #C73840
|
|
|
|
|
- static let easyApply = Color(red: 0.145, green: 0.388, blue: 0.922)
|
|
|
|
|
- static let destructive = Color(red: 0.780, green: 0.220, blue: 0.250)
|
|
|
|
|
- static let unavailable = Color(red: 0.580, green: 0.620, blue: 0.670)
|
|
|
|
|
- static let success = Color(red: 0.086, green: 0.580, blue: 0.373)
|
|
|
|
|
- static let warning = Color(red: 0.851, green: 0.549, blue: 0.118)
|
|
|
|
|
|
|
+ static let salary = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.086, green: 0.580, blue: 0.373, alpha: 1), // #16945F
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.290, green: 0.780, blue: 0.550, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let featured = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.898, green: 0.933, blue: 0.988, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.145, green: 0.200, blue: 0.320, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let featuredText = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.145, green: 0.388, blue: 0.922, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.557, green: 0.710, blue: 1.0, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let urgent = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 1.0, green: 0.910, blue: 0.910, alpha: 1), // #FFE8E8
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.320, green: 0.145, blue: 0.160, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let urgentText = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.780, green: 0.220, blue: 0.250, alpha: 1), // #C73840
|
|
|
|
|
+ dark: NSColor(srgbRed: 1.0, green: 0.580, blue: 0.600, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let easyApply = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.145, green: 0.388, blue: 0.922, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.557, green: 0.710, blue: 1.0, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let destructive = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.780, green: 0.220, blue: 0.250, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 1.0, green: 0.420, blue: 0.450, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let unavailable = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.580, green: 0.620, blue: 0.670, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.510, green: 0.545, blue: 0.600, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let success = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.086, green: 0.580, blue: 0.373, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.290, green: 0.780, blue: 0.550, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ static let warning = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.851, green: 0.549, blue: 0.118, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.960, green: 0.690, blue: 0.290, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
// Promo card
|
|
// Promo card
|
|
|
- static let promoBackground = Color(red: 0.898, green: 0.933, blue: 0.988)
|
|
|
|
|
|
|
+ static let promoBackground = Color.dynamic(
|
|
|
|
|
+ light: NSColor(srgbRed: 0.898, green: 0.933, blue: 0.988, alpha: 1),
|
|
|
|
|
+ dark: NSColor(srgbRed: 0.145, green: 0.200, blue: 0.320, alpha: 1)
|
|
|
|
|
+ )
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+private extension Color {
|
|
|
|
|
+ static func dynamic(light: NSColor, dark: NSColor) -> Color {
|
|
|
|
|
+ Color(
|
|
|
|
|
+ nsColor: NSColor(name: nil) { appearance in
|
|
|
|
|
+ appearance.bestMatch(from: [.darkAqua, .aqua]) == .darkAqua ? dark : light
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|