This commit is contained in:
Daniel Arantes Loverde
2026-04-28 09:26:08 -03:00
parent e54c0a029f
commit a12cfb6bf3
70 changed files with 335 additions and 230 deletions

View File

@@ -1,28 +1,36 @@
import SwiftUI
#if canImport(UIKit)
import UIKit
#elseif canImport(AppKit)
import AppKit
#endif
// MARK: - Colors
enum AppColors {
static let primary = Color(hex: "#1E6B43")
static let secondary = Color(hex: "#2F7C4B")
static let tertiary = Color(hex: "#8CFF2E")
// Brandbook 2026 (Pedi Foods)
// Primary now follows the "FOODS" dark green tone from the logo.
static let primary = Color(hex: "#345D54")
// Secondary keeps the vivid lime from the symbol/logo body.
static let secondary = Color(hex: "#D5D841")
static let tertiary = Color(hex: "#A7BF42")
static let brandDark = Color(hex: "#1B5C3A")
static let brandSoft = Color(hex: "#E8F2EC")
static let brandDark = Color(hex: "#1F2D40")
static let brandSoft = Color(hex: "#F2F5E3")
static let backgroundLight = Color(hex: "#F3F5F7")
static let backgroundDark = Color(hex: "#18230F")
static let backgroundDark = Color(hex: "#1F2D40")
static let surface = Color(hex: "#FFFFFF")
static let textPrimary = Color(hex: "#1C1F23")
static let textPrimary = Color(hex: "#000000")
static let textInverse = Color(hex: "#FFFFFF")
static let textMuted = Color(hex: "#7B8794")
static let textMuted = Color(hex: "#667085")
}
enum AppDarkColors {
static let background = Color(hex: "#18230F")
static let surface = Color(hex: "#FFFFFF", alpha: 0.05)
static let background = Color(hex: "#1F2D40")
static let surface = Color(hex: "#FFFFFF", alpha: 0.08)
static let textPrimary = Color(hex: "#FFFFFF")
static let textSecondary = Color(hex: "#A3A3A3")
static let textSecondary = Color(hex: "#D0D5DD")
static let primary = AppColors.primary
static let secondary = AppColors.secondary
static let tertiary = AppColors.tertiary
@@ -31,22 +39,38 @@ enum AppDarkColors {
// MARK: - Typography
enum AppTypography {
static let fontFamily = "Plus Jakarta Sans"
// Brandbook typography: Nexa (fallback: system font)
static let fontFamily = "Nexa-Regular"
// Avoid applying dynamic weight on custom font descriptors to prevent
// SwiftUI runtime warnings on some platforms/toolchains.
static let heading1 = Font.custom(fontFamily, size: 28)
static let heading25 = Font.custom(fontFamily, size: 25)
static let heading2 = Font.custom(fontFamily, size: 20)
static let heading3 = Font.custom(fontFamily, size: 16)
static let body = Font.custom(fontFamily, size: 16)
static let button = Font.custom(fontFamily, size: 14)
static let caption = Font.custom(fontFamily, size: 10)
static let overline = Font.custom(fontFamily, size: 11)
static let heading1 = resolvedFont(size: 28, fallbackWeight: .bold)
static let heading25 = resolvedFont(size: 25, fallbackWeight: .bold)
static let heading2 = resolvedFont(size: 20, fallbackWeight: .semibold)
static let heading3 = resolvedFont(size: 16, fallbackWeight: .semibold)
static let body = resolvedFont(size: 16, fallbackWeight: .regular)
static let button = resolvedFont(size: 14, fallbackWeight: .semibold)
static let caption = resolvedFont(size: 10, fallbackWeight: .regular)
static let overline = resolvedFont(size: 11, fallbackWeight: .regular)
static let bodyLineHeight: CGFloat = 1.6
static let buttonLetterSpacing: CGFloat = 0.08
static let captionLetterSpacing: CGFloat = 0.12
private static func resolvedFont(size: CGFloat, fallbackWeight: Font.Weight) -> Font {
if isBrandFontAvailable {
return Font.custom(fontFamily, size: size)
}
return .system(size: size, weight: fallbackWeight, design: .default)
}
private static var isBrandFontAvailable: Bool {
#if canImport(UIKit)
return UIFont(name: fontFamily, size: 16) != nil
#elseif canImport(AppKit)
return NSFont(name: fontFamily, size: 16) != nil
#else
return false
#endif
}
}
// MARK: - Layout