feat: add iOS support and harden receipt scanning

This commit is contained in:
Timo
2026-08-20 23:48:26 +02:00
parent f5e06c32b0
commit cf1b799e1b
107 changed files with 11755 additions and 122 deletions

View File

@@ -0,0 +1,35 @@
import SwiftUI
/// Cards per `DESIGN (1).md` Components Cards: "White backgrounds with
/// 1px borders in #E2E8F0. No shadows. Content within cards should follow
/// the 24px internal padding rule." And Shapes: 0px radius everywhere.
struct ZenithCardModifier: ViewModifier {
var padding: CGFloat = ZenithSpacing.cardPadding
func body(content: Content) -> some View {
content
.padding(padding)
.background(Color.zenithSurface)
.overlay(Rectangle().strokeBorder(Color.zenithBorder, lineWidth: 1))
// Deliberately no `.cornerRadius` and no `.shadow` both are
// explicitly rejected by the design system ("rejects traditional
// shadows and depth", "0px radius" everywhere).
}
}
extension View {
func zenithCard(padding: CGFloat = ZenithSpacing.cardPadding) -> some View {
modifier(ZenithCardModifier(padding: padding))
}
/// Strips the default iOS `List`/`Form` chrome (rounded row groups,
/// system grey background, inset grouping) toward the flat,
/// bordered-card look the rest of this design system uses. Apply to a
/// `List`/`Form`; still combine with `.listRowBackground(Color.zenithSurface)`
/// and `.listRowSeparatorTint(Color.zenithBorder)` on individual rows if
/// you want row separators to match instead of disappearing.
func zenithListBackground() -> some View {
scrollContentBackground(.hidden)
.background(Color.zenithBg)
}
}