mirror of
https://github.com/home-assistant/iOS.git
synced 2026-02-04 11:42:39 -06:00
81 lines
2.8 KiB
Swift
81 lines
2.8 KiB
Swift
import Foundation
|
|
import SwiftUI
|
|
|
|
public enum DesignSystem {
|
|
// TODO: Use HA design system font sizes when ready
|
|
public enum Font {
|
|
/// Large Title (34pt)
|
|
public static let largeTitle: SwiftUICore.Font = .largeTitle
|
|
/// Title (28pt)
|
|
public static let title: SwiftUICore.Font = .title
|
|
/// Title2 (22pt)
|
|
public static let title2: SwiftUICore.Font = .title2
|
|
/// Title3 (20pt)
|
|
public static let title3: SwiftUICore.Font = .title3
|
|
/// Headline (17pt, semibold)
|
|
public static let headline: SwiftUICore.Font = .headline
|
|
/// Body (17pt)
|
|
public static let body: SwiftUICore.Font = .body
|
|
/// Callout (16pt)
|
|
public static let callout: SwiftUICore.Font = .callout
|
|
/// Subheadline (15pt)
|
|
public static let subheadline: SwiftUICore.Font = .subheadline
|
|
/// Footnote (13pt)
|
|
public static let footnote: SwiftUICore.Font = .footnote
|
|
/// Caption (12pt)
|
|
public static let caption: SwiftUICore.Font = .caption
|
|
/// Caption2 (11pt)
|
|
public static let caption2: SwiftUICore.Font = .caption2
|
|
/// Caption3 (10pt)
|
|
public static let caption3: SwiftUICore.Font = .system(size: 10)
|
|
}
|
|
|
|
public enum Spaces {
|
|
public static let half: CGFloat = 4
|
|
public static let one: CGFloat = 8
|
|
public static let oneAndHalf: CGFloat = 12
|
|
public static let two: CGFloat = 16
|
|
public static let three: CGFloat = 24
|
|
public static let four: CGFloat = 32
|
|
public static let five: CGFloat = 40
|
|
public static let six: CGFloat = 48
|
|
}
|
|
|
|
public enum CornerRadius {
|
|
public static var half: CGFloat = 4
|
|
public static var one: CGFloat = 8
|
|
public static var oneAndHalf: CGFloat = 12
|
|
public static var two: CGFloat = 16
|
|
public static var three: CGFloat = 24
|
|
public static var four: CGFloat = 32
|
|
public static var five: CGFloat = 40
|
|
public static var six: CGFloat = 48
|
|
|
|
// Out of system points
|
|
public static var micro: CGFloat = 2
|
|
public static var oneAndMicro: CGFloat = 10
|
|
public static var twoAndMicro: CGFloat = 18
|
|
}
|
|
|
|
public enum Border {
|
|
public enum Width {
|
|
public static var `default`: CGFloat = 1
|
|
}
|
|
}
|
|
|
|
public enum Button {
|
|
public static let minHeight: CGFloat = 48
|
|
public static let maxWidth: CGFloat = 380
|
|
}
|
|
|
|
public enum List {
|
|
public static let rowMaxWidth: CGFloat = 380
|
|
}
|
|
|
|
public enum Animation {
|
|
public static let `default`: SwiftUICore.Animation = .easeInOut(duration: 0.3)
|
|
public static let easeInOutFaster: SwiftUICore.Animation = .easeInOut(duration: 0.1)
|
|
public static let easeInOutSlower: SwiftUICore.Animation = .easeInOut(duration: 0.8)
|
|
}
|
|
}
|