diff --git a/DesignSystem/Sources/View/Dashboard/DashboardSkeletonView.swift b/DesignSystem/Sources/View/Dashboard/DashboardSkeletonView.swift index a0820078..03a605f4 100644 --- a/DesignSystem/Sources/View/Dashboard/DashboardSkeletonView.swift +++ b/DesignSystem/Sources/View/Dashboard/DashboardSkeletonView.swift @@ -31,7 +31,7 @@ public struct DashboardSkeletonView: View { cardPlaceholder() } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.bottom, 32) } .background(Color.primary50.ignoresSafeArea()) @@ -65,7 +65,7 @@ private extension DashboardSkeletonView { placeholder(width: 40, height: 12, color: .gray3) } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.vertical, 14) .frame(maxWidth: .infinity, alignment: .leading) .background( diff --git a/DesignSystem/Sources/View/Profile/ProfileSkeletonView.swift b/DesignSystem/Sources/View/Profile/ProfileSkeletonView.swift index 33127e78..137890ae 100644 --- a/DesignSystem/Sources/View/Profile/ProfileSkeletonView.swift +++ b/DesignSystem/Sources/View/Profile/ProfileSkeletonView.swift @@ -27,27 +27,27 @@ public struct ProfileSkeletonView: View { Divider() .background(.gray2.opacity(0.4)) - .padding(.horizontal, 16) + .padding(.horizontal, 20) Spacer().frame(height: 32) sectionPlaceholder() - .padding(.horizontal, 16) + .padding(.horizontal, 20) Spacer().frame(height: 12) cardPlaceholder() - .padding(.horizontal, 16) + .padding(.horizontal, 20) Spacer().frame(height: 28) sectionPlaceholder() - .padding(.horizontal, 16) + .padding(.horizontal, 20) Spacer().frame(height: 12) cardPlaceholder() - .padding(.horizontal, 16) + .padding(.horizontal, 20) // sectionPlaceholder() // .padding(.horizontal, 16) @@ -87,7 +87,7 @@ private extension ProfileSkeletonView { Spacer() } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.top, 12) } @@ -134,7 +134,7 @@ private extension ProfileSkeletonView { .frame(height: 14) .shimmer(phase: shimmerPhase) } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .frame(height: 52) if index == 0 { diff --git a/DesignSystem/Sources/View/Travel/TravelListSkeletonView.swift b/DesignSystem/Sources/View/Travel/TravelListSkeletonView.swift index 12ce5f2d..10ff77b8 100644 --- a/DesignSystem/Sources/View/Travel/TravelListSkeletonView.swift +++ b/DesignSystem/Sources/View/Travel/TravelListSkeletonView.swift @@ -20,7 +20,8 @@ public struct TravelListSkeletonView: View { cardSkeleton() } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) } .onAppear { withAnimation( diff --git a/DesignSystem/Sources/View/Travel/TravelSettingSkeletonView.swift b/DesignSystem/Sources/View/Travel/TravelSettingSkeletonView.swift index 34bf9128..2a5b1690 100644 --- a/DesignSystem/Sources/View/Travel/TravelSettingSkeletonView.swift +++ b/DesignSystem/Sources/View/Travel/TravelSettingSkeletonView.swift @@ -29,7 +29,7 @@ public struct TravelSettingSkeletonView: View { manageCard() } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.bottom, 28) } .background(Color.primary50.ignoresSafeArea()) @@ -86,7 +86,8 @@ private extension TravelSettingSkeletonView { smallBar() } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) .frame(maxWidth: .infinity, alignment: .leading) .background( RoundedRectangle(cornerRadius: 12) @@ -109,7 +110,8 @@ private extension TravelSettingSkeletonView { fullBar(height: 20) } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) .frame(maxWidth: .infinity, alignment: .leading) .background( RoundedRectangle(cornerRadius: 12) @@ -132,7 +134,7 @@ private extension TravelSettingSkeletonView { manageRow() } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.vertical, 14) .frame(maxWidth: .infinity, alignment: .leading) .background( diff --git a/Features/ExpenseList/Sources/Components/ExpenseCardView.swift b/Features/ExpenseList/Sources/Components/ExpenseCardView.swift index 26ce9c0c..59d7c5d7 100644 --- a/Features/ExpenseList/Sources/Components/ExpenseCardView.swift +++ b/Features/ExpenseList/Sources/Components/ExpenseCardView.swift @@ -70,7 +70,7 @@ public struct ExpenseCardView: View { .font(.app(.caption1, weight: .medium)) .foregroundStyle(Color.gray7) } - .padding(16) + .padding(20) .background(Color.primary50) .clipShape(RoundedRectangle(cornerRadius: 16)) .overlay( diff --git a/Features/Member/Sources/View/MemberView.swift b/Features/Member/Sources/View/MemberView.swift index 9d74e61f..87e70bc2 100644 --- a/Features/Member/Sources/View/MemberView.swift +++ b/Features/Member/Sources/View/MemberView.swift @@ -37,7 +37,7 @@ public struct MemberView: View { Spacer() } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.vertical, 20) ScrollView { @@ -52,7 +52,8 @@ public struct MemberView: View { } } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) } } .navigationBarBackButtonHidden(true) diff --git a/Features/Profile/Sources/View/Components/SettingRow.swift b/Features/Profile/Sources/View/Components/SettingRow.swift index cd167313..eaf28fa7 100644 --- a/Features/Profile/Sources/View/Components/SettingRow.swift +++ b/Features/Profile/Sources/View/Components/SettingRow.swift @@ -75,5 +75,5 @@ public struct SettingRow: View { action: {}, tapTermAction: {} ) - .padding(.horizontal, 16) + .padding(.horizontal, 20) } diff --git a/Features/Profile/Sources/View/ProfileView.swift b/Features/Profile/Sources/View/ProfileView.swift index 8b789d81..16e6ded7 100644 --- a/Features/Profile/Sources/View/ProfileView.swift +++ b/Features/Profile/Sources/View/ProfileView.swift @@ -91,7 +91,7 @@ extension ProfileView { store.send(.delegate(.backToTravel)) } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) } @ViewBuilder @@ -227,7 +227,7 @@ extension ProfileView { ) } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .background(.white) .cornerRadius(8) } @@ -278,7 +278,7 @@ extension ProfileView { ) } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .background(.white) .cornerRadius(8) } @@ -328,7 +328,7 @@ extension ProfileView { .padding(.vertical, 12) } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .background(.white) .cornerRadius(8) } diff --git a/Features/SaveExpense/Sources/Components/InputContainer.swift b/Features/SaveExpense/Sources/Components/InputContainer.swift index 4487573e..8129c477 100644 --- a/Features/SaveExpense/Sources/Components/InputContainer.swift +++ b/Features/SaveExpense/Sources/Components/InputContainer.swift @@ -19,7 +19,7 @@ struct InputContainer: View { HStack { content } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .frame(height: 52) .background(Color.white) .overlay( diff --git a/Features/SaveExpense/Sources/Components/ParticipantSelector/ParticipantSelectorView.swift b/Features/SaveExpense/Sources/Components/ParticipantSelector/ParticipantSelectorView.swift index b5b45086..1369fd21 100644 --- a/Features/SaveExpense/Sources/Components/ParticipantSelector/ParticipantSelectorView.swift +++ b/Features/SaveExpense/Sources/Components/ParticipantSelector/ParticipantSelectorView.swift @@ -61,7 +61,8 @@ public struct ParticipantSelectorView: View { ) } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) .background(Color.white) .cornerRadius(12) .overlay( diff --git a/Features/SaveExpense/Sources/SaveExpenseView.swift b/Features/SaveExpense/Sources/SaveExpenseView.swift index 1e2b9a15..92204be2 100644 --- a/Features/SaveExpense/Sources/SaveExpenseView.swift +++ b/Features/SaveExpense/Sources/SaveExpenseView.swift @@ -84,7 +84,7 @@ public struct SaveExpenseView: View { send(.saveButtonTapped) } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.bottom, 16) .navigationBarBackButtonHidden(true) .background(Color.white) diff --git a/Features/SettlementDetail/Sources/Components/MemberDetailCard.swift b/Features/SettlementDetail/Sources/Components/MemberDetailCard.swift index 2a3a1b6e..6735c860 100644 --- a/Features/SettlementDetail/Sources/Components/MemberDetailCard.swift +++ b/Features/SettlementDetail/Sources/Components/MemberDetailCard.swift @@ -142,7 +142,7 @@ struct MemberDetailCard: View { .padding(.vertical, 16) } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .transition(.asymmetric( insertion: .scale(scale: 0.95, anchor: .top).combined(with: .opacity), removal: .scale(scale: 0.95, anchor: .top).combined(with: .opacity) diff --git a/Features/SettlementResult/Sources/Components/PaymentSectionView.swift b/Features/SettlementResult/Sources/Components/PaymentSectionView.swift index 00d8666e..820c54e5 100644 --- a/Features/SettlementResult/Sources/Components/PaymentSectionView.swift +++ b/Features/SettlementResult/Sources/Components/PaymentSectionView.swift @@ -22,7 +22,7 @@ struct PaymentSectionView: View { .foregroundStyle(Color.black) // 결제 리스트 - VStack(spacing: 12) { + VStack(spacing: 20) { ForEach(payments) { payment in PaymentRowView(payment: payment) } @@ -62,7 +62,7 @@ private struct PaymentRowView: View { .frame(width: 32, height: 32) Text(payment.name) - .font(.app(.title3, weight: .medium)) + .font(.app(.body, weight: .medium)) .foregroundStyle(Color.black) Spacer() diff --git a/Features/Travel/Sources/View/CreateTravel/Components/DateRangeView.swift b/Features/Travel/Sources/View/CreateTravel/Components/DateRangeView.swift index aa1a3d3b..a2531ac6 100644 --- a/Features/Travel/Sources/View/CreateTravel/Components/DateRangeView.swift +++ b/Features/Travel/Sources/View/CreateTravel/Components/DateRangeView.swift @@ -40,6 +40,9 @@ struct DateRangeView: View { title: "시작", date: startDate ) { + if startDate == nil { + startDate = today + } showStartPicker.toggle() } .sheet(isPresented: $showStartPicker) { @@ -74,6 +77,9 @@ struct DateRangeView: View { title: "종료", date: endDate ) { + if endDate == nil { + endDate = startDate ?? today + } showEndPicker.toggle() } .sheet(isPresented: $showEndPicker) { @@ -101,6 +107,14 @@ struct DateRangeView: View { } } } + .onAppear { + if startDate == nil { + startDate = today + } + if endDate == nil { + endDate = startDate ?? today + } + } } } diff --git a/Features/Travel/Sources/View/CreateTravel/Components/TravelInfoView.swift b/Features/Travel/Sources/View/CreateTravel/Components/TravelInfoView.swift index 241d8e4e..a4d1c065 100644 --- a/Features/Travel/Sources/View/CreateTravel/Components/TravelInfoView.swift +++ b/Features/Travel/Sources/View/CreateTravel/Components/TravelInfoView.swift @@ -16,7 +16,7 @@ struct TravelInfoView: View { var body: some View { VStack(alignment: .leading, spacing: 20) { Text("여행 정보") - .font(.app(.title3, weight: .semibold)) + .font(.app(.title2, weight: .semibold)) .foregroundStyle(Color.appBlack) VStack(spacing: 16) { diff --git a/Features/Travel/Sources/View/CreateTravel/CreateTravelView.swift b/Features/Travel/Sources/View/CreateTravel/CreateTravelView.swift index 0349c03c..b9272eab 100644 --- a/Features/Travel/Sources/View/CreateTravel/CreateTravelView.swift +++ b/Features/Travel/Sources/View/CreateTravel/CreateTravelView.swift @@ -35,8 +35,7 @@ public struct CreateTravelView: View { Spacer() } - .padding(.horizontal, 16) - .padding(.vertical, 20) + .padding(20) ScrollView { VStack(spacing: 16) { @@ -68,7 +67,7 @@ public struct CreateTravelView: View { ) } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) } .scrollDismissesKeyboard(.immediately) .scrollIndicators(.hidden) @@ -77,7 +76,7 @@ public struct CreateTravelView: View { SaveButton(isEnabled: store.isSaveEnabled && !store.isSubmitting) { store.send(.saveButtonTapped) } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.vertical, 10) } .onAppear { diff --git a/Features/Travel/Sources/View/TravelSetting/Components/BasicSettingView.swift b/Features/Travel/Sources/View/TravelSetting/Components/BasicSettingView.swift index a838a9b1..e84c26d9 100644 --- a/Features/Travel/Sources/View/TravelSetting/Components/BasicSettingView.swift +++ b/Features/Travel/Sources/View/TravelSetting/Components/BasicSettingView.swift @@ -62,7 +62,8 @@ struct BasicSettingView: View { inviteSection } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) .background(RoundedRectangle(cornerRadius: 8).fill(Color(.appWhite))) } } diff --git a/Features/Travel/Sources/View/TravelSetting/Components/MemberSettingView.swift b/Features/Travel/Sources/View/TravelSetting/Components/MemberSettingView.swift index 2be095c1..a564ae04 100644 --- a/Features/Travel/Sources/View/TravelSetting/Components/MemberSettingView.swift +++ b/Features/Travel/Sources/View/TravelSetting/Components/MemberSettingView.swift @@ -31,7 +31,8 @@ struct MemberSettingView: View { myId: myId, ownerId: ownerId ?? "" ) - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) .background( RoundedRectangle(cornerRadius: 8) .fill(Color(.appWhite)) diff --git a/Features/Travel/Sources/View/TravelSetting/Components/SectionHeader.swift b/Features/Travel/Sources/View/TravelSetting/Components/SectionHeader.swift index be97bc14..ef48aa2a 100644 --- a/Features/Travel/Sources/View/TravelSetting/Components/SectionHeader.swift +++ b/Features/Travel/Sources/View/TravelSetting/Components/SectionHeader.swift @@ -33,7 +33,7 @@ struct SectionHeader: View { } label: { Text(isEditing ? "완료" : "수정") .underline(true, color: Color.gray7) - .font(.app(.caption1, weight: .medium)) + .font(.app(.body, weight: .medium)) .foregroundColor(Color.gray7) } } diff --git a/Features/Travel/Sources/View/TravelSetting/Components/TravelManageView.swift b/Features/Travel/Sources/View/TravelSetting/Components/TravelManageView.swift index 105dda7d..2706e221 100644 --- a/Features/Travel/Sources/View/TravelSetting/Components/TravelManageView.swift +++ b/Features/Travel/Sources/View/TravelSetting/Components/TravelManageView.swift @@ -67,7 +67,7 @@ struct TravelManageView: View { .disabled(store.isSubmitting) } } - .padding(16) + .padding(20) .background(RoundedRectangle(cornerRadius: 8).fill(Color(.appWhite))) } } diff --git a/Features/Travel/Sources/View/TravelSetting/TravelSettingView.swift b/Features/Travel/Sources/View/TravelSetting/TravelSettingView.swift index 9966e401..8a3a0a44 100644 --- a/Features/Travel/Sources/View/TravelSetting/TravelSettingView.swift +++ b/Features/Travel/Sources/View/TravelSetting/TravelSettingView.swift @@ -73,8 +73,7 @@ private extension TravelSettingView { Spacer() } - .padding(.horizontal, 16) - .padding(.vertical, 20) + .padding(20) ScrollView { VStack(spacing: 16) { @@ -99,7 +98,8 @@ private extension TravelSettingView { TravelManageView(store: manageStore) } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) } .scrollDismissesKeyboard(.immediately) .scrollIndicators(.hidden) diff --git a/Features/Travel/Sources/View/Travels/Components/InviteCodeModalView.swift b/Features/Travel/Sources/View/Travels/Components/InviteCodeModalView.swift index 501b73ea..14261d9f 100644 --- a/Features/Travel/Sources/View/Travels/Components/InviteCodeModalView.swift +++ b/Features/Travel/Sources/View/Travels/Components/InviteCodeModalView.swift @@ -50,13 +50,24 @@ struct InviteCodeModalView: View { Button(action: onConfirm) { Text("확인") - .foregroundColor(.white) + .foregroundColor(Color.appWhite) .font(.app(.title3, weight: .semibold)) .frame(maxWidth: .infinity) .padding(.vertical, 13) .background(Color.primary500) .cornerRadius(26) } + .padding(.bottom, 10) + + Button(action: onCancel) { + Text("취소") + .foregroundColor(Color.appBlack) + .font(.app(.title3, weight: .semibold)) + .frame(maxWidth: .infinity) + .padding(.vertical, 13) + .background(Color.gray1) + .cornerRadius(26) + } } .padding(14) .background( diff --git a/Features/Travel/Sources/View/Travels/Components/TabBarView.swift b/Features/Travel/Sources/View/Travels/Components/TabBarView.swift index ff539a71..470f6766 100644 --- a/Features/Travel/Sources/View/Travels/Components/TabBarView.swift +++ b/Features/Travel/Sources/View/Travels/Components/TabBarView.swift @@ -12,9 +12,9 @@ struct TabBarView: View { @Binding var selectedTab: TravelTab var body: some View { - HStack { + HStack(spacing: 0) { ForEach(TravelTab.allCases, id: \.self) { tab in - VStack { + VStack(spacing: 0) { Text(tab.rawValue) .font(.app(.title3, weight: .medium)) .foregroundStyle(Color.appBlack) diff --git a/Features/Travel/Sources/View/Travels/Components/TravelCardView.swift b/Features/Travel/Sources/View/Travels/Components/TravelCardView.swift index fad91302..59610a65 100644 --- a/Features/Travel/Sources/View/Travels/Components/TravelCardView.swift +++ b/Features/Travel/Sources/View/Travels/Components/TravelCardView.swift @@ -12,18 +12,18 @@ import Domain struct TravelCardView: View { let travel: Travel - private var ddayText: String { + private var ddayStatus: DDayStatus { let today = Calendar.current.startOfDay(for: Date()) let startDay = Calendar.current.startOfDay(for: travel.startDate) let endDay = Calendar.current.startOfDay(for: travel.endDate) if today < startDay { let diff = Calendar.current.dateComponents([.day], from: today, to: startDay).day ?? 0 - return "D-\(diff)" + return .upcoming(diff) } else if today <= endDay { - return "D-Day" + return .today } else { - return "완료" + return .finished } } @@ -44,7 +44,7 @@ struct TravelCardView: View { var body: some View { ZStack(alignment: .leading) { RoundedRectangle(cornerRadius: 16) - .fill(Color.primary100) + .fill(ddayStatus.color) RoundedRectangle(cornerRadius: 16) .fill(Color.appWhite) @@ -52,7 +52,7 @@ struct TravelCardView: View { HStack { VStack(alignment: .leading, spacing: 12) { - Text(ddayText) + Text(ddayStatus.text) .font(.app(.caption1, weight: .medium)) .foregroundColor(Color.primary500) .padding(.horizontal, 8) @@ -102,6 +102,33 @@ struct TravelCardView: View { } } +extension TravelCardView { + private enum DDayStatus { + case upcoming(Int) + case today + case finished + + var text: String { + switch self { + case .upcoming(let day): return "D-\(day)" + case .today: return "D-Day" + case .finished: return "완료" + } + } + + var color: Color { + switch self { + case .today: + return Color.primary300 + case .finished: + return Color.primary500 + case .upcoming: + return Color.primary100 + } + } + } +} + #Preview { TravelCardView(travel: Travel( id: "1", diff --git a/Features/Travel/Sources/View/Travels/Components/TravelListHeaderView.swift b/Features/Travel/Sources/View/Travels/Components/TravelListHeaderView.swift index b4c54381..ae11dc53 100644 --- a/Features/Travel/Sources/View/Travels/Components/TravelListHeaderView.swift +++ b/Features/Travel/Sources/View/Travels/Components/TravelListHeaderView.swift @@ -28,8 +28,7 @@ struct TravelListHeaderView: View { action() } } - .padding(.vertical, 20) - .padding(.horizontal, 16) + .padding(20) } } diff --git a/Features/Travel/Sources/View/Travels/TravelView.swift b/Features/Travel/Sources/View/Travels/TravelView.swift index 71389b1f..c2607970 100644 --- a/Features/Travel/Sources/View/Travels/TravelView.swift +++ b/Features/Travel/Sources/View/Travels/TravelView.swift @@ -19,7 +19,7 @@ public struct TravelView: View { } public var body: some View { - return VStack { + return VStack(spacing: 0) { TravelListHeaderView { store.send(.profileButtonTapped) } @@ -34,7 +34,7 @@ public struct TravelView: View { TravelEmptyView() } else { ScrollView { - LazyVStack(spacing: 18) { + LazyVStack(spacing: 8) { ForEach(store.travels, id: \.id) { travel in TravelCardView(travel: travel) .onAppear { @@ -49,7 +49,8 @@ public struct TravelView: View { ProgressView().padding(.vertical, 20) } } - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 20) } .refreshable { store.send(.refresh) diff --git a/Features/Travel/Sources/View/UpdateTravel/UpdateTravelView.swift b/Features/Travel/Sources/View/UpdateTravel/UpdateTravelView.swift index c935259e..8455dfc8 100644 --- a/Features/Travel/Sources/View/UpdateTravel/UpdateTravelView.swift +++ b/Features/Travel/Sources/View/UpdateTravel/UpdateTravelView.swift @@ -44,7 +44,7 @@ public struct UpdateTravelView: View { ) } } - .padding(.horizontal, 16) + .padding(.horizontal, 20) } .scrollDismissesKeyboard(.immediately) .scrollIndicators(.hidden) @@ -52,7 +52,7 @@ public struct UpdateTravelView: View { SaveButton(isEnabled: store.canSave && !store.isSubmitting) { store.send(.saveButtonTapped) } - .padding(.horizontal, 16) + .padding(.horizontal, 20) .padding(.vertical, 10) } .background(Color.primary50) @@ -95,14 +95,13 @@ private extension UpdateTravelView { Spacer() } - .padding(.horizontal, 16) - .padding(.vertical, 20) + .padding(20) } var travelInfoSection: some View { VStack(alignment: .leading, spacing: 20) { Text("여행 정보") - .font(.app(.title3, weight: .semibold)) + .font(.app(.title2, weight: .semibold)) .foregroundStyle(Color.appBlack) VStack(spacing: 16) {