From 83b90b2fdb6c5c72bdc7fa4815656983c9502207 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Thu, 8 Oct 2026 12:32:57 +0900 Subject: [PATCH] =?UTF-8?q?feat(gift):=20=EC=84=A0=EB=AC=BC=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=EC=A0=95=EB=B3=B4=EB=A5=BC=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/GiftInfoSectionView.swift | 43 +++++++++++++++++++ .../Detail/Components/GiftProgressView.swift | 41 ++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 SodaLive/Sources/V2/Gift/Detail/Components/GiftInfoSectionView.swift create mode 100644 SodaLive/Sources/V2/Gift/Detail/Components/GiftProgressView.swift diff --git a/SodaLive/Sources/V2/Gift/Detail/Components/GiftInfoSectionView.swift b/SodaLive/Sources/V2/Gift/Detail/Components/GiftInfoSectionView.swift new file mode 100644 index 00000000..7efa906c --- /dev/null +++ b/SodaLive/Sources/V2/Gift/Detail/Components/GiftInfoSectionView.swift @@ -0,0 +1,43 @@ +import SwiftUI + +struct GiftInfoSectionView: View { + let title: String + @ViewBuilder let content: Content + + var body: some View { + VStack(alignment: .leading, spacing: SodaSpacing.s24) { + Text(title) + .appFont(.body1) + .foregroundColor(.white) + .accessibilityAddTraits(.isHeader) + + VStack(alignment: .leading, spacing: SodaSpacing.s14) { + content + } + .padding(SodaSpacing.s14) + .frame(maxWidth: .infinity, alignment: .leading) + .background(Color.gray900) + .clipShape(RoundedRectangle(cornerRadius: SodaRadius.r14)) + } + .frame(maxWidth: .infinity, alignment: .leading) + } +} + +struct GiftInfoRow: View { + let title: String + let value: String + + var body: some View { + HStack(alignment: .top, spacing: SodaSpacing.s24) { + Text(title) + .foregroundColor(.gray500) + .frame(width: SodaSpacing.s48 + SodaSpacing.s24, alignment: .leading) + Text(value) + .foregroundColor(.white) + .frame(maxWidth: .infinity, alignment: .leading) + } + .appFont(.body6) + .fixedSize(horizontal: false, vertical: true) + .accessibilityElement(children: .combine) + } +} diff --git a/SodaLive/Sources/V2/Gift/Detail/Components/GiftProgressView.swift b/SodaLive/Sources/V2/Gift/Detail/Components/GiftProgressView.swift new file mode 100644 index 00000000..4594e04b --- /dev/null +++ b/SodaLive/Sources/V2/Gift/Detail/Components/GiftProgressView.swift @@ -0,0 +1,41 @@ +import SwiftUI + +struct GiftProgressView: View { + let progress: [GiftProgressDisplayModel] + + var body: some View { + HStack(alignment: .top, spacing: SodaSpacing.s4) { + ForEach(progress, id: \.step) { model in + VStack(spacing: SodaSpacing.s12) { + Capsule() + .fill(model.occurredDateText != nil ? Color.soda400 : Color.gray700) + .frame(height: SodaSpacing.s4) + .accessibilityHidden(true) + + VStack(spacing: SodaSpacing.s8) { + Text(model.step.title) + .foregroundColor(model.occurredDateText != nil ? .white : .gray500) + if let date = model.occurredDateText { + Text(date) + .foregroundColor(.gray400) + } + } + .appFont(.caption3) + .multilineTextAlignment(.center) + .fixedSize(horizontal: false, vertical: true) + } + .frame(maxWidth: .infinity, alignment: .top) + } + } + .padding(SodaSpacing.s14) + .frame(maxWidth: .infinity, alignment: .leading) + .background(Color.gray900) + .clipShape(RoundedRectangle(cornerRadius: SodaRadius.r14)) + .accessibilityElement(children: .ignore) + .accessibilityLabel(progress.enumerated().map { index, model in + ["\(index + 1)단계", model.step.title, model.occurredDateText, + model.occurredDateText != nil ? "완료" : "미완료"] + .compactMap { $0 }.joined(separator: ", ") + }.joined(separator: "; ")) + } +}