diff --git a/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Sample/AnotherView.swift b/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Sample/AnotherView.swift new file mode 100644 index 0000000..4db7482 --- /dev/null +++ b/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Sample/AnotherView.swift @@ -0,0 +1,19 @@ +// +// AnotherView.swift +// App +// +// Created by 박서연 on 2024/06/13. +// Copyright © 2024 iOS. All rights reserved. +// + +import SwiftUI + +struct AnotherView: View { + var body: some View { + Text("Saaaaample Viewwwwww") + } +} + +#Preview { + AnotherView() +} diff --git a/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Tabbar.swift b/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Tabbar.swift index 97c6e57..e135242 100644 --- a/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Tabbar.swift +++ b/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/Tabbar.swift @@ -7,6 +7,7 @@ // import SwiftUI +import DesignSystem enum Tabbar: CaseIterable { case home, category, mypage @@ -40,14 +41,25 @@ enum Tabbar: CaseIterable { } } - var image: String { + var image_default: Image { switch self { case .home: - "house" + ZerosomeTab.ic_home case .category: - "star.fill" + ZerosomeTab.ic_category case .mypage: - "heart.fill" + ZerosomeTab.ic_mypage + } + } + + var image_fill: Image { + switch self { + case .home: + ZerosomeTab.ic_home_fill + case .category: + ZerosomeTab.ic_category_fill + case .mypage: + ZerosomeTab.ic_mpyage_fill } } } diff --git a/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/TabbarView.swift b/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/TabbarView.swift index 2b3f2c5..29f7a3d 100644 --- a/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/TabbarView.swift +++ b/Projects/App/Sources/Presentation/Tabbar+Navigation/Tabbar/TabbarView.swift @@ -7,6 +7,7 @@ // import SwiftUI +import DesignSystem struct TabbarView: View { @ObservedObject var viewModel: TabbarViewModel @@ -23,11 +24,11 @@ struct TabbarView: View { HStack { ForEach(Tabbar.allCases, id: \.self) { item in VStack(spacing: 5) { - Image(systemName: item.image) + (viewModel.selected == item ? item.image_fill : item.image_default) .frame(width: 24, height: 24) Text(item.title) .applyFont(font: .label1) - .foregroundStyle(Color.neutral400) + .foregroundStyle(viewModel.selected == item ? Color.primaryFF6972 : Color.neutral400) } .frame(maxWidth: .infinity, alignment: .center) .contentShape(Rectangle()) diff --git a/Projects/DesignSystem/Project.swift b/Projects/DesignSystem/Project.swift index f5b4e29..39d2419 100644 --- a/Projects/DesignSystem/Project.swift +++ b/Projects/DesignSystem/Project.swift @@ -26,5 +26,5 @@ let designSystemTarget = Target.makeTarget( let designSystemProject = Project.makeProject( name: "DesignSystem", targets: designSystemTarget, - isXconfigSet: true) + isXconfigSet: false) diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Color/Info/Negative.colorset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Color/Info/Negative.colorset/Contents.json index 63d0ff8..6825ed4 100644 --- a/Projects/DesignSystem/Resources/Assets.xcassets/Color/Info/Negative.colorset/Contents.json +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Color/Info/Negative.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.251", - "green" : "0.251", - "red" : "1.000" + "blue" : "0.149", + "green" : "0.192", + "red" : "0.984" } }, "idiom" : "universal" diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Common/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Common/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Common/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Common/progress_gray.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Common/progress_gray.imageset/Contents.json new file mode 100644 index 0000000..ba895f0 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Common/progress_gray.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "progress_gray.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Common/progress_gray.imageset/progress_gray.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Common/progress_gray.imageset/progress_gray.svg new file mode 100644 index 0000000..65524ec --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Common/progress_gray.imageset/progress_gray.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_empty.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_empty.imageset/Contents.json new file mode 100644 index 0000000..3197d37 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_empty.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_category_empty.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_empty.imageset/ic_category_empty.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_empty.imageset/ic_category_empty.svg new file mode 100644 index 0000000..93a76e8 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_empty.imageset/ic_category_empty.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_fill.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_fill.imageset/Contents.json new file mode 100644 index 0000000..5619351 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_fill.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_category_fill.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_fill.imageset/ic_category_fill.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_fill.imageset/ic_category_fill.svg new file mode 100644 index 0000000..334379d --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_category_fill.imageset/ic_category_fill.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_empty.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_empty.imageset/Contents.json new file mode 100644 index 0000000..79e0aff --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_empty.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_home_empty.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_empty.imageset/ic_home_empty.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_empty.imageset/ic_home_empty.svg new file mode 100644 index 0000000..6f0a2e8 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_empty.imageset/ic_home_empty.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_fill.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_fill.imageset/Contents.json new file mode 100644 index 0000000..cb61b18 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_fill.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_home_fill.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_fill.imageset/ic_home_fill.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_fill.imageset/ic_home_fill.svg new file mode 100644 index 0000000..40154de --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_home_fill.imageset/ic_home_fill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_empty.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_empty.imageset/Contents.json new file mode 100644 index 0000000..60bd379 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_empty.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_mypage_empty.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_empty.imageset/ic_mypage_empty.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_empty.imageset/ic_mypage_empty.svg new file mode 100644 index 0000000..1e10d1f --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_empty.imageset/ic_mypage_empty.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_fill.imageset/Contents.json b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_fill.imageset/Contents.json new file mode 100644 index 0000000..2cdb440 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_fill.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_mypage_fill.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_fill.imageset/ic_mypage_fill.svg b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_fill.imageset/ic_mypage_fill.svg new file mode 100644 index 0000000..d645d46 --- /dev/null +++ b/Projects/DesignSystem/Resources/Assets.xcassets/Tabbar/ic_mypage_fill.imageset/ic_mypage_fill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Projects/DesignSystem/Sources/Assets/AssestsTestView.swift b/Projects/DesignSystem/Sources/Assets/AssestsTestView.swift new file mode 100644 index 0000000..b730383 --- /dev/null +++ b/Projects/DesignSystem/Sources/Assets/AssestsTestView.swift @@ -0,0 +1,23 @@ +// +// AssestsTestView.swift +// DesignSystem +// +// Created by 박서연 on 2024/06/18. +// Copyright © 2024 iOS. All rights reserved. +// + +import SwiftUI + +struct AssestsTestView: View { + var body: some View { + VStack { + ZerosomeTab.ic_home + ZerosomeAsset.zero_progress + } + .background(.green) + } +} + +#Preview { + AssestsTestView() +} diff --git a/Projects/DesignSystem/Sources/Assets/Common/Common+Assests.swift b/Projects/DesignSystem/Sources/Assets/Common/Common+Assests.swift new file mode 100644 index 0000000..0e595fe --- /dev/null +++ b/Projects/DesignSystem/Sources/Assets/Common/Common+Assests.swift @@ -0,0 +1,13 @@ +// +// Common+Assests.swift +// DesignSystem +// +// Created by 박서연 on 2024/06/18. +// Copyright © 2024 iOS. All rights reserved. +// + +import SwiftUI + +public struct ZerosomeAsset { + public static let zero_progress = DesignSystemAsset.Assets.progressGray.swiftUIImage +} diff --git a/Projects/DesignSystem/Sources/Assets/Tab/Tabbar.swift b/Projects/DesignSystem/Sources/Assets/Tab/Tabbar.swift new file mode 100644 index 0000000..63942b6 --- /dev/null +++ b/Projects/DesignSystem/Sources/Assets/Tab/Tabbar.swift @@ -0,0 +1,18 @@ +// +// Tabbar.swift +// DesignSystem +// +// Created by 박서연 on 2024/06/18. +// Copyright © 2024 iOS. All rights reserved. +// + +import SwiftUI + +public enum ZerosomeTab { + public static let ic_home = DesignSystemAsset.Assets.icHomeEmpty.swiftUIImage + public static let ic_home_fill = DesignSystemAsset.Assets.icHomeFill.swiftUIImage + public static let ic_category = DesignSystemAsset.Assets.icCategoryEmpty.swiftUIImage + public static let ic_category_fill = DesignSystemAsset.Assets.icCategoryFill.swiftUIImage + public static let ic_mypage = DesignSystemAsset.Assets.icMypageEmpty.swiftUIImage + public static let ic_mpyage_fill = DesignSystemAsset.Assets.icMypageFill.swiftUIImage +} diff --git a/Projects/DesignSystem/Sources/Font/Font.swift b/Projects/DesignSystem/Sources/Font/Font.swift index cc2a102..bcf460e 100644 --- a/Projects/DesignSystem/Sources/Font/Font.swift +++ b/Projects/DesignSystem/Sources/Font/Font.swift @@ -5,7 +5,6 @@ // Created by 박서연 on 2024/05/12. // Copyright © 2024 iOS. All rights reserved. // -import UIKit import SwiftUI public enum ZSFont { @@ -16,6 +15,7 @@ public enum ZSFont { case body1 case body2 case body3 + case body4 case label1 case label2 case caption @@ -39,6 +39,8 @@ extension ZSFont { return DesignSystemFontFamily.Pretendard.medium.name case .body3: return DesignSystemFontFamily.Pretendard.medium.name + case .body4: + return DesignSystemFontFamily.Pretendard.medium.name case .label1: return DesignSystemFontFamily.Pretendard.medium.name case .label2: @@ -64,8 +66,10 @@ extension ZSFont { return 14 case .body3: return 13 - case .label1: + case .body4: return 12 + case .label1: + return 13 case .label2: return 11 case .caption: @@ -89,6 +93,8 @@ extension ZSFont { return CGFloat(ZSFont.body2.size * 0.140) case .body3: return CGFloat(ZSFont.body2.size * 0.140) + case .body4: + return CGFloat(ZSFont.body2.size * 0.140) case .label1: return CGFloat(ZSFont.label1.size * 0.140) case .label2: @@ -114,6 +120,8 @@ extension ZSFont { return 0 case .body3: return 0 + case .body4: + return 0 case .label1: return 0 case .label2: @@ -126,7 +134,6 @@ extension ZSFont { public var toUIFont: UIFont { return UIFont(name: self.name, size: self.size) ?? UIFont.systemFont(ofSize: self.size) } - } public struct FontModifier: ViewModifier {