Introduce unified design tokens and migrate Home, Orders, and Statistics UI.

Establish AppColor/AppFont/AppSpacing/AppRadius theming, shared components, and design-system docs so pilot screens align with Android while keeping iOS-native spacing and touch targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 17:58:18 +08:00
parent 39186cfe25
commit 87696a4774
31 changed files with 737 additions and 213 deletions

View File

@ -0,0 +1,44 @@
//
// AppCardView.swift
// suixinkan
//
import SnapKit
import UIKit
///
final class AppCardView: UIView {
/// container
let contentView = UIView()
private let showsBorder: Bool
/// - Parameter showsBorder: 1px falseflat
init(showsBorder: Bool = false) {
self.showsBorder = showsBorder
super.init(frame: .zero)
setupUI()
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setupUI() {
backgroundColor = AppColor.cardBackground
layer.cornerRadius = AppRadius.md
clipsToBounds = true
if showsBorder {
layer.borderWidth = 1
layer.borderColor = AppColor.cardOutline.cgColor
}
addSubview(contentView)
contentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
}