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:
@ -32,13 +32,13 @@ final class StatisticsStatCardView: UIView {
|
||||
}
|
||||
|
||||
private func setupUI() {
|
||||
layer.cornerRadius = 12
|
||||
layer.cornerRadius = AppRadius.lg
|
||||
clipsToBounds = true
|
||||
|
||||
titleLabel.font = .systemFont(ofSize: 14)
|
||||
titleLabel.textColor = UIColor.black.withAlphaComponent(0.6)
|
||||
titleLabel.font = .app(.body)
|
||||
titleLabel.textColor = AppColor.textPrimary.withAlphaComponent(0.6)
|
||||
|
||||
valueLabel.font = .systemFont(ofSize: 18, weight: .bold)
|
||||
valueLabel.font = .app(.metric)
|
||||
valueLabel.numberOfLines = 1
|
||||
valueLabel.adjustsFontSizeToFitWidth = true
|
||||
valueLabel.minimumScaleFactor = 0.8
|
||||
@ -50,16 +50,16 @@ final class StatisticsStatCardView: UIView {
|
||||
addSubview(iconView)
|
||||
|
||||
titleLabel.snp.makeConstraints { make in
|
||||
make.top.leading.equalToSuperview().inset(12)
|
||||
make.trailing.lessThanOrEqualTo(iconView.snp.leading).offset(-8)
|
||||
make.top.leading.equalToSuperview().inset(AppSpacing.sm)
|
||||
make.trailing.lessThanOrEqualTo(iconView.snp.leading).offset(-AppSpacing.xs)
|
||||
}
|
||||
valueLabel.snp.makeConstraints { make in
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(3)
|
||||
make.leading.bottom.equalToSuperview().inset(12)
|
||||
make.trailing.lessThanOrEqualTo(iconView.snp.leading).offset(-8)
|
||||
make.leading.bottom.equalToSuperview().inset(AppSpacing.sm)
|
||||
make.trailing.lessThanOrEqualTo(iconView.snp.leading).offset(-AppSpacing.xs)
|
||||
}
|
||||
iconView.snp.makeConstraints { make in
|
||||
make.trailing.equalToSuperview().inset(8)
|
||||
make.trailing.equalToSuperview().inset(AppSpacing.xs)
|
||||
make.centerY.equalToSuperview()
|
||||
make.size.equalTo(48)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user