Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: 정보 μž…λ ₯ νŽ˜μ΄μ§€ 쀑볡 μ½”λ“œ κ°œμ„  #140

Merged
merged 6 commits into from
May 29, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ public extension TargetDependency {
}

public extension TargetDependency.Feature {
static let InputInformationBaseFeature = TargetDependency.project(
target: ModulePaths.Feature.InputInformationBaseFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputInformationBaseFeature.rawValue)
)
static let RootFeature = TargetDependency.project(
target: ModulePaths.Feature.RootFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.RootFeature.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum ModulePaths {

public extension ModulePaths {
enum Feature: String {
case InputInformationBaseFeature
case RootFeature
case InputLanguageInfoFeature
case InputCertificateInfoFeature
Expand Down
16 changes: 16 additions & 0 deletions Projects/Core/DesignSystem/Sources/Separator/SMSSeparator.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import SwiftUI

public struct SMSSeparator: View {
let height: CGFloat

public init(height: CGFloat = 16) {
self.height = height
}

public var body: some View {
Rectangle()
.fill(Color.sms(.neutral(.n10)))
.frame(maxWidth: .infinity)
.frame(height: height)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ let project = Project.makeModule(
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature
.Feature.InputInformationBaseFeature
]
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BaseFeature
import DesignSystem
import FoundationUtil
import InputInformationBaseFeature
import SwiftUI
import ViewUtil

Expand All @@ -13,13 +14,15 @@ struct InputCertificateInfoView: View {
GeometryReader { proxy in
SMSNavigationTitleView(title: "μ •λ³΄μž…λ ₯") {
ScrollView(showsIndicators: false) {
Rectangle()
.fill(Color.sms(.neutral(.n10)))
.frame(maxWidth: .infinity)
.frame(height: 16)
SMSSeparator()

VStack(spacing: 32) {
pageTitleView()
InputInformationPageTitleView(
title: "자격증",
isRequired: false,
pageCount: 6,
selectedPage: 4
)

VStack(spacing: 8) {
certificateListView()
Expand Down Expand Up @@ -54,22 +57,6 @@ struct InputCertificateInfoView: View {
.hideKeyboardWhenTap()
}

@ViewBuilder
func pageTitleView() -> some View {
HStack(spacing: 4) {
Text("자격증")
.foregroundColor(.sms(.system(.black)))

Text("*")
.foregroundColor(.sms(.sub(.s2)))

Spacer()

SMSPageControl(pageCount: 6, selectedPage: 4)
}
.smsFont(.title1)
}

@ViewBuilder
func certificateListView() -> some View {
VStack(spacing: 12) {
Expand Down
12 changes: 12 additions & 0 deletions Projects/Feature/InputInformationBaseFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
name: ModulePaths.Feature.InputInformationBaseFeature.rawValue,
product: .framework,
targets: [],
internalDependencies: [
.Feature.BaseFeature
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import DesignSystem
import SwiftUI

public struct InputInformationPageTitleView: View {
let title: String
let isRequired: Bool
let pageCount: Int
let selectedPage: Int

public init(
title: String,
isRequired: Bool = true,
pageCount: Int,
selectedPage: Int
) {
self.title = title
self.isRequired = isRequired
self.pageCount = pageCount
self.selectedPage = selectedPage
}

public var body: some View {
HStack(spacing: 4) {
Text(title)
.foregroundColor(.sms(.system(.black)))

Text("*")
.foregroundColor(.sms(.sub(.s2)))
.conditional(isRequired)

Spacer()

SMSPageControl(pageCount: pageCount, selectedPage: selectedPage)
}
.smsFont(.title1)
}
}
2 changes: 1 addition & 1 deletion Projects/Feature/InputLanguageInfoFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ let project = Project.makeModule(
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature
.Feature.InputInformationBaseFeature
]
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BaseFeature
import DesignSystem
import FoundationUtil
import InputInformationBaseFeature
import SwiftUI
import ViewUtil

Expand All @@ -13,13 +14,15 @@ struct InputLanguageInfoView: View {
GeometryReader { proxy in
SMSNavigationTitleView(title: "μ •λ³΄μž…λ ₯") {
ScrollView(showsIndicators: false) {
Rectangle()
.fill(Color.sms(.neutral(.n10)))
.frame(maxWidth: .infinity)
.frame(height: 16)
SMSSeparator()

VStack(spacing: 32) {
pageTitleView()
InputInformationPageTitleView(
title: "μ™Έκ΅­μ–΄",
isRequired: false,
pageCount: 6,
selectedPage: 5
)

languageListView(proxy: proxy)
}
Expand All @@ -45,22 +48,6 @@ struct InputLanguageInfoView: View {
.hideKeyboardWhenTap()
}

@ViewBuilder
func pageTitleView() -> some View {
HStack(spacing: 4) {
Text("μ™Έκ΅­μ–΄")
.foregroundColor(.sms(.system(.black)))

Text("*")
.foregroundColor(.sms(.sub(.s2)))

Spacer()

SMSPageControl(pageCount: 6, selectedPage: 5)
}
.smsFont(.title1)
}

@ViewBuilder
func languageListView(proxy: GeometryProxy) -> some View {
VStack(spacing: 8) {
Expand Down
2 changes: 1 addition & 1 deletion Projects/Feature/InputMilitaryInfoFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let project = Project.makeModule(
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature,
.Feature.InputInformationBaseFeature,
.Domain.StudentDomainInterface
]
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import BaseFeature
import DesignSystem
import SwiftUI
import InputInformationBaseFeature
import StudentDomainInterface
import SwiftUI

struct InputMilitaryInfoView: View {
@StateObject var container: MVIContainer<InputMilitaryInfoIntentProtocol, InputMilitaryInfoStateProtocol>
Expand All @@ -11,13 +12,10 @@ struct InputMilitaryInfoView: View {
var body: some View {
GeometryReader { proxy in
SMSNavigationTitleView(title: "μ •λ³΄μž…λ ₯") {
Rectangle()
.fill(Color.sms(.neutral(.n10)))
.frame(maxWidth: .infinity)
.frame(height: 16)
SMSSeparator()

VStack(spacing: 32) {
pageTitleView()
InputInformationPageTitleView(title: "병역", pageCount: 6, selectedPage: 3)

VStack(spacing: 24) {
SMSTextField(
Expand Down Expand Up @@ -69,22 +67,6 @@ struct InputMilitaryInfoView: View {
.animation(.default, value: state.isPresentedMilitarySheet)
}

@ViewBuilder
func pageTitleView() -> some View {
HStack(spacing: 4) {
Text("병역")
.foregroundColor(.sms(.system(.black)))

Text("*")
.foregroundColor(.sms(.sub(.s2)))

Spacer()

SMSPageControl(pageCount: 6, selectedPage: 3)
}
.smsFont(.title1)
}

@ViewBuilder
func militaryListView() -> some View {
VStack(spacing: 16) {
Expand Down
2 changes: 1 addition & 1 deletion Projects/Feature/InputProfileInfoFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let project = Project.makeModule(
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature,
.Feature.InputInformationBaseFeature,
.Domain.MajorDomainInterface
],
unitTestDependencies: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BaseFeature
import DesignSystem
import SwiftUI
import InputInformationBaseFeature

struct InputProfileInfoView: View {
enum FocusField: Hashable {
Expand All @@ -18,13 +19,10 @@ struct InputProfileInfoView: View {
var body: some View {
SMSNavigationTitleView(title: "μ •λ³΄μž…λ ₯") {
ScrollView(showsIndicators: false) {
Rectangle()
.fill(Color.sms(.neutral(.n10)))
.frame(maxWidth: .infinity)
.frame(height: 16)
SMSSeparator()

VStack(spacing: 32) {
pageTitleView()
InputInformationPageTitleView(title: "ν”„λ‘œν•„", pageCount: 6, selectedPage: 0)

VStack(alignment: .leading, spacing: 24) {
VStack(alignment: .leading, spacing: 8) {
Expand Down Expand Up @@ -186,22 +184,6 @@ struct InputProfileInfoView: View {
.animation(.default, value: state.inputProfileErrorFieldSet)
}

@ViewBuilder
func pageTitleView() -> some View {
HStack(spacing: 4) {
Text("ν”„λ‘œν•„")
.foregroundColor(.sms(.system(.black)))

Text("*")
.foregroundColor(.sms(.sub(.s2)))

Spacer()

SMSPageControl(pageCount: 6, selectedPage: 0)
}
.smsFont(.title1)
}

@ViewBuilder
func majorListView() -> some View {
ScrollView {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ let project = Project.makeModule(
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature
.Feature.InputInformationBaseFeature
]
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import BaseFeature
import DesignSystem
import InputInformationBaseFeature
import SwiftUI
import UniformTypeIdentifiers

Expand All @@ -11,13 +12,10 @@ struct InputSchoolLifeInfoView: View {
var body: some View {
GeometryReader { proxy in
SMSNavigationTitleView(title: "μ •λ³΄μž…λ ₯") {
Rectangle()
.fill(Color.sms(.neutral(.n10)))
.frame(maxWidth: .infinity)
.frame(height: 16)
SMSSeparator()

VStack(spacing: 32) {
pageTitleView()
InputInformationPageTitleView(title: "학ꡐ μƒν™œ", pageCount: 6, selectedPage: 1)

VStack(spacing: 24) {
SMSTextField(
Expand Down Expand Up @@ -87,20 +85,4 @@ struct InputSchoolLifeInfoView: View {
}
}
}

@ViewBuilder
func pageTitleView() -> some View {
HStack(spacing: 4) {
Text("학ꡐ μƒν™œ")
.foregroundColor(.sms(.system(.black)))

Text("*")
.foregroundColor(.sms(.sub(.s2)))

Spacer()

SMSPageControl(pageCount: 6, selectedPage: 1)
}
.smsFont(.title1)
}
}
2 changes: 1 addition & 1 deletion Projects/Feature/InputWorkInfoFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let project = Project.makeModule(
product: .staticLibrary,
targets: [.interface, .unitTest],
internalDependencies: [
.Feature.BaseFeature,
.Feature.InputInformationBaseFeature,
.Domain.StudentDomainInterface
]
)
Loading