Skip to content

Commit

Permalink
[WEAV-30] DesignSystem Core (#10)
Browse files Browse the repository at this point in the history
* [WEAV-31] 디자인시스템 - Color Asset 구현 (#6)

* [WEAV-31] Resource - color asset 추가
* [WEAV-31] GradientA 구현

* [WEAV-32] 디자인시스템 - Font 및 Typography 구현 (#7)

* [WEAV-31] 디자인시스템 - Color Asset 구현 (#6)

* [WEAV-31] Resource - color asset 추가
* [WEAV-31] GradientA 구현

* [WEAV-32] 모듈명 DesignCore 로 변경, Pretendard 추가

* [WEAV-32] Pretendard View Modifier 생성

* [WEAV-32] Roboto Slab 폰트 구성

* [WEAV-32] Font LineHeight 적용

* [WEAV-32] DesignSystem - Typography 구현

* [WEAV-32] add DesignCore font test

* [WEAV-30] Design Preview View add.

* [WEAV-30] Change Design Color
  • Loading branch information
jisu15-kim authored Sep 15, 2024
1 parent 8413378 commit 2a4d8e5
Show file tree
Hide file tree
Showing 68 changed files with 1,664 additions and 33 deletions.
17 changes: 5 additions & 12 deletions Projects/App/Sources/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,23 @@ import SwiftUI
import CoreKit
import NetworkKit
import ComponentsKit
import DesignSystemKit
import DesignCore
import Main

public struct ContentView: View {
public init() {}

public var body: some View {
VStack {
VStack(spacing: 20) {
Text("Hello, World!")
.padding()
.pretendard(weight: ._300, size: 20)
.robotoSlab(size: 12)

MainView()

SampleComponent()
.foregroundStyle(Color.tempColor)
}
.onAppear {
Task {
do {
try await AuthEndpoint.requestSMSVerification(phone: "010-4602-2274")
} catch {
print(error)
}
}
.foregroundStyle(DesignCore.red300)
}
}
}
Expand Down
115 changes: 115 additions & 0 deletions Projects/App/Sources/DesignPreviewView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
//
// DesignPreviewView.swift
// App
//
// Created by 김지수 on 9/14/24.
// Copyright © 2024 com.studentcenter. All rights reserved.
//

import SwiftUI
import DesignCore

struct DesignPreviewView: View {

let blackColors = [
DesignCore.black,
DesignCore.grey500,
DesignCore.grey400,
DesignCore.grey300,
DesignCore.grey200,
DesignCore.grey100
]

let tintColors = [
DesignCore.red300,
DesignCore.blue300
]

let pastelColors = [
DesignCore.darkGreen,
DesignCore.darkPink,
DesignCore.darkBlue,
DesignCore.lightYellow,
DesignCore.lightGreen,
DesignCore.lightPink,
DesignCore.lightBlue,
]

var colorGroups: [[Color]] {
return [
blackColors,
tintColors,
pastelColors
]
}

var body: some View {
NavigationStack {
ScrollView {
VStack(spacing: 24) {
VStack(spacing: 12) {
ForEach(colorGroups, id: \.self) { group in
HStack {
ForEach(group, id: \.self) {
RoundedRectangle(cornerRadius: 4)
.frame(width: 24, height: 24)
.foregroundStyle($0)
}
}
}

RoundedRectangle(cornerRadius: 5)
.frame(height: 36)
.padding(.horizontal, 36)
.foregroundStyle(LinearGradient.gradientA)
}
Divider()

Text("HOME / en-medium-20")
.typography(.en_medium_20)
.foregroundStyle(DesignCore.black)
Text("Introduction / en-medium-16")
.typography(.en_medium_16)
.foregroundStyle(DesignCore.grey400)
Text("새 메시지 3개 / semibold-14")
.typography(.semibold_14)
.foregroundStyle(DesignCore.grey500)
Text("안녕하세요? 이것은 샘플 화면입니다...\nUI를 잡아보는 중인데 글자 수가 얼마... / regular-15")
.typography(.regular_15)
.foregroundStyle(Color(hex: 0x474638))
Text("28분 전 / regular-12")
.typography(.regular_12)
.foregroundStyle(Color(hex: 0x534C44, opacity: 0.5))
Text("이지혜 / semibold-28")
.typography(.semibold_28)
.foregroundStyle(DesignCore.black)
Text("1998년생 / medium-14")
.typography(.medium_14)
.foregroundStyle(DesignCore.grey200)
Text("직업 / medium-14")
.typography(.medium_14)
.foregroundStyle(DesignCore.darkGreen)
Text("초등학교 교사 / medium-16")
.typography(.medium_16)
.foregroundStyle(DesignCore.darkGreen)
Text("취미 / semibold-24")
.typography(.semibold_24)
.foregroundStyle(Color(hex: 0x15394B))
Text("연락한 지 2일차 / medium-18")
.typography(.medium_18)
.foregroundStyle(Color(hex: 0x534C44))
Text("3일차까지 10시간 24분 43초 남았어요 / regular-14")
.typography(.regular_14)
.foregroundStyle(Color(hex: 0x534C44))
}
.padding(.vertical, 20)
}
.navigationTitle("three-days DesignSystem")
.toolbarTitleDisplayMode(.inline)
}
}
}

#Preview {
DesignPreviewView()
}
2 changes: 1 addition & 1 deletion Projects/App/Sources/Weave2IOSApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SwiftUI
struct Weave2IOSApp: App {
var body: some Scene {
WindowGroup {
ContentView()
DesignPreviewView()
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "238",
"green" : "241",
"red" : "245"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "31",
"green" : "31",
"red" : "31"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "255",
"green" : "140",
"red" : "64"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "143",
"green" : "109",
"red" : "96"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "84",
"green" : "102",
"red" : "91"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "112",
"green" : "100",
"red" : "132"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "172",
"green" : "139",
"red" : "255"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "255",
"green" : "193",
"red" : "152"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "197",
"green" : "199",
"red" : "202"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "160",
"green" : "160",
"red" : "160"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "132",
"green" : "132",
"red" : "132"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading

0 comments on commit 2a4d8e5

Please sign in to comment.