mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-05 04:33:33 +00:00
Add OpenClaw design system foundations: - Custom typography tokens (OpenClawType) using Plus Jakarta Sans, DM Sans, and JetBrains Mono with Dynamic Type scaling - Spacing and radius token enums (OpenClawSpacing, OpenClawRadius) - Additive brand color tokens (accentPressed, teal, void, obsidian, slate, textPrimary, textSecondary) - Shared components: OpenClawToggleIndicator, OpenClawStatusBadge, OpenClawPrimaryButtonStyle, OpenClawSecondaryButtonStyle - Bundled font files with OFL license provenance Migrate all iOS views to OpenClawType tokens. No behavioral, navigation, or routing changes — this is purely visual/typographic. Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.2 KiB
Swift
37 lines
1.2 KiB
Swift
import OpenClawKit
|
|
import SwiftUI
|
|
|
|
extension AgentProTab {
|
|
func detailMetric(label: String, value: String) -> some View {
|
|
VStack(alignment: .leading, spacing: 3) {
|
|
Text(label)
|
|
.font(OpenClawType.caption2Medium)
|
|
.foregroundStyle(.secondary)
|
|
Text(value)
|
|
.font(OpenClawType.subheadSemiBold)
|
|
.lineLimit(1)
|
|
.minimumScaleFactor(0.8)
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding(10)
|
|
.background(
|
|
Color.primary.opacity(0.055),
|
|
in: RoundedRectangle(cornerRadius: OpenClawRadius.sm, style: .continuous))
|
|
}
|
|
|
|
func emptyDetailRow(icon: String, title: String, detail: String) -> some View {
|
|
HStack(spacing: 12) {
|
|
ProIconBadge(systemName: icon, color: .secondary)
|
|
VStack(alignment: .leading, spacing: 3) {
|
|
Text(title)
|
|
.font(OpenClawType.subheadSemiBold)
|
|
Text(detail)
|
|
.font(OpenClawType.caption)
|
|
.foregroundStyle(.secondary)
|
|
.lineLimit(2)
|
|
}
|
|
Spacer(minLength: 8)
|
|
}
|
|
}
|
|
}
|