Files
Sportstime/SportsTime/Features/Trip/Views/Wizard/Steps/RegionsStep.swift
Trey t 94bb68d431 fix(wizard): improve UX with step reordering and UI polish
- Reorder wizard steps: dates before sports (enables availability check)
- Add contentShape(Rectangle()) for full tap targets on all cards
- Fix route preference showing preselected value
- Fix sport cards having inconsistent heights
- Speed up step reveal animation (0.3s → 0.15s)
- Add debounced scroll delay to avoid interrupting selection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 21:13:45 -06:00

53 lines
1.4 KiB
Swift

//
// RegionsStep.swift
// SportsTime
//
// Step 4 of the trip wizard - select geographic regions.
//
import SwiftUI
struct RegionsStep: View {
@Environment(\.colorScheme) private var colorScheme
@Binding var selectedRegions: Set<Region>
var body: some View {
VStack(alignment: .leading, spacing: Theme.Spacing.md) {
StepHeader(
title: "Where do you want to go?",
subtitle: "Tap the map to select regions"
)
RegionMapSelector(
selectedRegions: $selectedRegions,
onToggle: { region in
toggleRegion(region)
}
)
}
.padding(Theme.Spacing.lg)
.background(Theme.cardBackground(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.large))
.overlay {
RoundedRectangle(cornerRadius: Theme.CornerRadius.large)
.stroke(Theme.surfaceGlow(colorScheme), lineWidth: 1)
}
}
private func toggleRegion(_ region: Region) {
if selectedRegions.contains(region) {
selectedRegions.remove(region)
} else {
selectedRegions.insert(region)
}
}
}
// MARK: - Preview
#Preview {
RegionsStep(selectedRegions: .constant([.east, .central]))
.padding()
.themedBackground()
}