Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
113ad6a
chore(ui): timo-design-system 의존성 추가 (#48)
kimminna Jun 29, 2026
29312b3
feat(ui): Storybook 커스텀 테마 및 매니저 설정 추가 (#48)
kimminna Jun 29, 2026
a690406
feat(ui): Tag, PriorityIcon 컴포넌트 추가 (#48)
kimminna Jun 29, 2026
fc5c852
feat(ui): 타이포그래피 토큰 신규 항목 추가 (#48)
kimminna Jun 29, 2026
659b550
feat(root): Plop 컴포넌트 제너레이터에 스토리 템플릿 추가 (#48)
kimminna Jun 29, 2026
f666709
fix(ci): Chromatic 프리뷰 링크 출력 오류 수정 (#48)
kimminna Jun 29, 2026
7a5c6b8
feat(ui): 타이포그래피 토큰 스토리에 누락 항목 추가 (#48)
kimminna Jun 29, 2026
bb9f4fb
fix(ui): Storybook 데코레이터 Story 타입 어노테이션 제거 (#48)
kimminna Jun 29, 2026
7fc87d0
feat(ui): timo-blue-65 색상 토큰 추가 (#48)
kimminna Jun 29, 2026
c03e4c5
feat(ui): timo-gray 색상 토큰 추가 (#48)
kimminna Jun 29, 2026
543e408
feat(ui): Tag 컴포넌트를 text prop 기반으로 수정하고 스토리 추가 (#48)
kimminna Jun 29, 2026
3d6ef63
fix(ui): Tag 컴포넌트 내부 고정된 width 속성 제거 및 px 속성 추가 (#48)
kimminna Jun 29, 2026
bbc9db2
fix(ui): PriorityIcon priority prop 기본값 제거 (#48)
kimminna Jun 30, 2026
b51ed96
feat(ui): timo-gray-200 색상 토큰 추가 (#48)
kimminna Jun 30, 2026
c36628d
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
kimminna Jun 30, 2026
ff79f01
feat(ui): headline-b-40 타이포그래피 토큰 추가 (#48)
kimminna Jun 30, 2026
0e0fe8c
fix(ci): Chromatic buildScriptName 옵션 추가 (#48)
kimminna Jun 30, 2026
8e60a24
feat(design-system): PriorityIcon white·blue 타입 및 스토리 개선 (#48)
kimminna Jul 1, 2026
d8b48f4
feat(design-system): Tag blue 베리언트 추가 및 스토리 반영 (#48)
kimminna Jul 1, 2026
593863b
chore: coderabbit 설정 공백 정리
kimminna Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:

- name: Publish to Chromatic
id: chromatic
run: pnpm chromatic
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/timo-design-system
onlyChanged: true
exitZeroOnChanges: true
Comment thread
kimminna marked this conversation as resolved.
Resolved

- name: Comment Storybook preview link on PR
if: success()
Expand Down
16 changes: 16 additions & 0 deletions packages/tailwind-config/tokens/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@
--font-pretendard: var(--font-family-pretendard), sans-serif;

/* Headline */

--typo-size-headline-b-50: 50px;
--typo-line-height-headline-b-50: 1.5;
--typo-letter-spacing-headline-b-50: -0.03em;
--typo-font-weight-headline-b-50: 700;

--typo-size-headline-b-30: 30px;
--typo-line-height-headline-b-30: 1.5;
--typo-letter-spacing-headline-b-30: -0.03em;
--typo-font-weight-headline-b-30: 700;

--typo-size-headline-m-26: 26px;
--typo-line-height-headline-m-26: 1.5;
--typo-letter-spacing-headline-m-26: -0.03em;
--typo-font-weight-headline-m-26: 500;

--typo-size-headline-b-24: 24px;
--typo-line-height-headline-b-24: 1.5;
--typo-letter-spacing-headline-b-24: -0.03em;
Expand All @@ -22,6 +33,11 @@
--typo-letter-spacing-headline-b-20: -0.03em;
--typo-font-weight-headline-b-20: 700;

--typo-size-headline-m-20: 20px;
--typo-line-height-headline-m-20: 1.5;
--typo-letter-spacing-headline-m-20: -0.03em;
--typo-font-weight-headline-m-20: 500;

--typo-size-headline-b-18: 18px;
--typo-line-height-headline-b-18: 1.5;
--typo-letter-spacing-headline-b-18: -0.03em;
Expand Down
21 changes: 21 additions & 0 deletions packages/timo-design-system/.storybook/manager-head.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

js말고 css로 텍스트를 추가하는 방식이 깔끔한 것 같아요. 이런 방식으로 사용할 수도 있군용!

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<style>
.sidebar-header img {
height: 50px;
width: auto;
}

.sidebar-header a {
display: flex;
align-items: center;
}

.sidebar-header a::after {
content: "TIMO DESIGN SYSTEM";
font-size: 13px;
font-weight: 700;
color: #1f1f1f;
margin-left: 10px;
letter-spacing: 0.04em;
white-space: nowrap;
}
</style>
7 changes: 7 additions & 0 deletions packages/timo-design-system/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { addons } from "@storybook/manager-api";

import { timoTheme } from "./theme";

addons.setConfig({
theme: timoTheme,
});
23 changes: 21 additions & 2 deletions packages/timo-design-system/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
import React from "react";

import type { Preview } from "@storybook/react";

import "../src/styles/globals.css";
import type { Preview } from "@storybook/react-vite";

const preview: Preview = {
decorators: [
(Story: () => React.ReactNode) =>
React.createElement(
"div",
{
style: {
padding: "2rem",
display: "flex",
justifyContent: "center",
alignItems: "center",
minHeight: "120px",
},
},
React.createElement(Story),
),
],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
parameters: {
controls: {
matchers: {
Expand All @@ -21,7 +40,7 @@ const preview: Preview = {
styles: { width: "1280px", height: "900px" },
},
},
defaultViewport: "desktop",
defaultViewport: "responsive",
},
layout: "centered",
backgrounds: {
Expand Down
42 changes: 42 additions & 0 deletions packages/timo-design-system/.storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { create } from "@storybook/theming";

export const timoTheme = create({
base: "light",

brandImage: "/timo-logo/timo-logo.png",
brandTitle: "TIMO DESIGN SYSTEM",
brandUrl: "https://timo.kr",
brandTarget: "_blank",

// 배경
colorPrimary: "#74A0F8",
colorSecondary: "#8CB0F9",

// UI
appBg: "#f5f5f5",
appContentBg: "#ffffff",
appPreviewBg: "#ffffff",
appBorderColor: "#e5e5e5",
appBorderRadius: 10,

// 텍스트
textColor: "#1f1f1f",
textMutedColor: "#757575",
textInverseColor: "#ffffff",

// 툴바
barTextColor: "#525252",
barHoverColor: "#8CB0F9",
barSelectedColor: "#74a0f8",
barBg: "#ffffff",

// 인풋
inputBg: "#ffffff",
inputBorder: "#e5e5e5",
inputTextColor: "#1f1f1f",
inputBorderRadius: 6,

// 버튼
buttonBg: "#f5f5f5",
buttonBorder: "#e5e5e5",
});
1 change: 1 addition & 0 deletions packages/timo-design-system/.storybook/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "*.css";
2 changes: 2 additions & 0 deletions packages/timo-design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
"@storybook/addon-essentials": "8.6.14",
"@storybook/addon-interactions": "8.6.14",
"@storybook/addon-links": "^8.6.14",
"@storybook/manager-api": "^8.6.14",
"@storybook/react": "8.6.14",
"@storybook/react-vite": "^8.6.14",
"@storybook/theming": "^8.6.14",
"@tailwindcss/postcss": "^4.3.1",
"@types/node": "^22.15.3",
"@types/react": "19.2.2",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/timo-design-system/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export { Color } from "./color/Color";
export { Typography } from "./typography/Typography";
export { Tag } from "./tag/Tag";
export { PriorityIcon } from "./priority-icon/PriorityIcon";
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { PriorityIcon } from "./PriorityIcon";

import type { Meta, StoryObj } from "@storybook/react";

const meta = {
title: "Components/PriorityIcon",
component: PriorityIcon,
parameters: {
layout: "centered",
},
argTypes: {
priority: {
control: "select",
options: ["매우중요", "중요", "보통", "낮음", "Disable"],
},
},
} satisfies Meta<typeof PriorityIcon>;

export default meta;
type Story = StoryObj<typeof meta>;

export const 매우중요: Story = {
args: { priority: "매우중요" },
};

export const 중요: Story = {
args: { priority: "중요" },
};

export const 보통: Story = {
args: { priority: "보통" },
};

export const 낮음: Story = {
args: { priority: "낮음" },
};

export const Disable: Story = {
args: { priority: "Disable" },
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { cn } from "../../lib";

export type Priority = "매우중요" | "중요" | "보통" | "낮음" | "Disable";

const PRIORITY_COLOR: Record<Priority, string> = {
매우중요: "bg-timo-red",
중요: "bg-timo-orange",
보통: "bg-timo-gray-600",
낮음: "bg-timo-black",
Disable: "bg-timo-gray-500",
};

export interface PriorityIconProps {
priority: Priority;
}

export const PriorityIcon = ({ priority = "매우중요" }: PriorityIconProps) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority가 PriorityIconProps에서 required인데 기본값이 설정되어 있어요. 저는 optional로 맞추거나 기본값을 제거하는 게 좋을 것 같다고 생각이 들어요.
혹시 이렇게 작성한 의도가 있을까요?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props로 우선순위를 명확히 지정해서 전달한 뒤 쓰이는 경우가 많을 컴포넌트라고 생각되어 optional을 제거했었는데, 기본값도 함께 제거하는 걸 까먹었었네요!

제거해두겠습니돠

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

태그 디자인은 이미 변경 사항 반영해 두었어요~~!!

return (
<div
className={cn("size-4.5 shrink-0 rounded-full", PRIORITY_COLOR[priority])}
/>
);
};
52 changes: 52 additions & 0 deletions packages/timo-design-system/src/components/tag/Tag.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Tag } from "./Tag";

import type { Meta, StoryObj } from "@storybook/react";

const meta = {
title: "Components/Tag",
component: Tag,
parameters: {
layout: "centered",
},
argTypes: {
variant: {
control: "select",
options: ["과제", "운동", "일상", "업무", "기타"],
},
},
} satisfies Meta<typeof Tag>;

export default meta;
type Story = StoryObj<typeof meta>;

export const 과제: Story = {
args: { variant: "과제" },
};

export const 운동: Story = {
args: { variant: "운동" },
};

export const 일상: Story = {
args: { variant: "일상" },
};

export const 업무: Story = {
args: { variant: "업무" },
};

export const 기타: Story = {
args: { variant: "기타" },
};

export const AllVariants: Story = {
render: () => (
<div className="flex flex-col gap-2">
{(["과제", "운동", "일상", "업무", "기타"] as const).map((variant) => (
<div key={variant} className="flex items-center gap-2">
<Tag variant={variant} />
</div>
))}
</div>
),
};
43 changes: 43 additions & 0 deletions packages/timo-design-system/src/components/tag/Tag.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { cn } from "../../lib";

export type TagVariant = "과제" | "운동" | "일상" | "업무" | "기타";

const TAG_BG: Record<TagVariant, string> = {
과제: "bg-timo-yellow-300",
운동: "bg-timo-green",
일상: "bg-timo-blue-75",
업무: "bg-timo-gray-900",
기타: "bg-timo-gray-500",
};

const TAG_TEXT_COLOR: Record<TagVariant, string> = {
과제: "text-timo-black",
운동: "text-white",
일상: "text-white",
업무: "text-white",
기타: "text-timo-gray-800",
};

export interface TagProps {
variant?: TagVariant;
}

export const Tag = ({ variant = "과제" }: TagProps) => {
return (
<div
className={cn(
"flex h-4 w-7.5 items-center justify-center rounded-[4px]",
TAG_BG[variant],
)}
>
<span
className={cn(
"typo-caption-r-10 whitespace-nowrap",
TAG_TEXT_COLOR[variant],
)}
>
{variant}
</span>
</div>
Comment thread
kimminna marked this conversation as resolved.
Resolved
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Typography = ({
}}
>
<div className={token} style={{ minWidth: "200px", color: "#171717" }}>
가나다라마 Aa
계획 실행의 과정을 함께하는 Timo
</div>
<div>
<div
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion turbo/generators/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
path: "packages/timo-design-system/src/components/{{kebabCase name}}/{{pascalCase name}}.tsx",
templateFile: "templates/component/component.tsx.hbs",
},
{
type: "add",
path: "packages/timo-design-system/src/components/{{kebabCase name}}/{{pascalCase name}}.stories.tsx",
templateFile: "templates/component/component.stories.tsx.hbs",
},
{
type: "append",
path: "packages/timo-design-system/src/components/index.ts",
template: 'export { {{pascalCase name}} } from "./{{kebabCase name}}/{{pascalCase name}}";',
template:
'export { {{pascalCase name}} } from "./{{kebabCase name}}/{{pascalCase name}}";',
Comment thread
kimminna marked this conversation as resolved.
Resolved
},
],
});
Expand Down
Loading
Loading