@mzc-fe/design-system 0.0.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-push +21 -0
- package/.storybook/main.ts +11 -0
- package/.storybook/preview.tsx +30 -0
- package/.vscode/settings.json +12 -0
- package/.vscode/tailwind.json +105 -0
- package/README.md +136 -0
- package/bitbucket-pipelines.yml +52 -0
- package/components.json +21 -0
- package/eslint.config.js +38 -0
- package/package.json +98 -0
- package/public/vite.svg +1 -0
- package/src/components/accordion.stories.tsx +258 -0
- package/src/components/accordion.test.tsx +390 -0
- package/src/components/accordion.tsx +64 -0
- package/src/components/alert-dialog.stories.tsx +213 -0
- package/src/components/alert-dialog.test.tsx +80 -0
- package/src/components/alert-dialog.tsx +155 -0
- package/src/components/alert.stories.tsx +84 -0
- package/src/components/alert.test.tsx +35 -0
- package/src/components/alert.tsx +66 -0
- package/src/components/aspect-ratio.stories.tsx +97 -0
- package/src/components/aspect-ratio.test.tsx +47 -0
- package/src/components/aspect-ratio.tsx +11 -0
- package/src/components/avatar.stories.tsx +76 -0
- package/src/components/avatar.test.tsx +50 -0
- package/src/components/avatar.tsx +51 -0
- package/src/components/badge.stories.tsx +64 -0
- package/src/components/badge.test.tsx +34 -0
- package/src/components/badge.tsx +46 -0
- package/src/components/breadcrumb.stories.tsx +86 -0
- package/src/components/breadcrumb.test.tsx +74 -0
- package/src/components/breadcrumb.tsx +109 -0
- package/src/components/button-group.stories.tsx +62 -0
- package/src/components/button-group.tsx +83 -0
- package/src/components/button.stories.tsx +118 -0
- package/src/components/button.test.tsx +64 -0
- package/src/components/button.tsx +62 -0
- package/src/components/calendar.stories.tsx +81 -0
- package/src/components/calendar.tsx +220 -0
- package/src/components/card.stories.tsx +110 -0
- package/src/components/card.test.tsx +56 -0
- package/src/components/card.tsx +92 -0
- package/src/components/carousel.stories.tsx +90 -0
- package/src/components/carousel.tsx +239 -0
- package/src/components/chart.tsx +357 -0
- package/src/components/checkbox.stories.tsx +108 -0
- package/src/components/checkbox.test.tsx +67 -0
- package/src/components/checkbox.tsx +32 -0
- package/src/components/collapsible.stories.tsx +106 -0
- package/src/components/collapsible.test.tsx +92 -0
- package/src/components/collapsible.tsx +31 -0
- package/src/components/command.stories.tsx +90 -0
- package/src/components/command.tsx +182 -0
- package/src/components/context-menu.stories.tsx +63 -0
- package/src/components/context-menu.tsx +252 -0
- package/src/components/dialog.stories.tsx +128 -0
- package/src/components/dialog.tsx +141 -0
- package/src/components/drawer.stories.tsx +104 -0
- package/src/components/drawer.tsx +135 -0
- package/src/components/dropdown-menu.stories.tsx +97 -0
- package/src/components/dropdown-menu.tsx +255 -0
- package/src/components/empty.stories.tsx +90 -0
- package/src/components/empty.test.tsx +55 -0
- package/src/components/empty.tsx +104 -0
- package/src/components/field.tsx +246 -0
- package/src/components/form.tsx +168 -0
- package/src/components/hover-card.stories.tsx +66 -0
- package/src/components/hover-card.tsx +44 -0
- package/src/components/input-group.stories.tsx +57 -0
- package/src/components/input-group.test.tsx +40 -0
- package/src/components/input-group.tsx +170 -0
- package/src/components/input-otp.stories.tsx +94 -0
- package/src/components/input-otp.test.tsx +60 -0
- package/src/components/input-otp.tsx +75 -0
- package/src/components/input.stories.tsx +94 -0
- package/src/components/input.test.tsx +53 -0
- package/src/components/input.tsx +21 -0
- package/src/components/item.tsx +193 -0
- package/src/components/kbd.stories.tsx +100 -0
- package/src/components/kbd.test.tsx +28 -0
- package/src/components/kbd.tsx +28 -0
- package/src/components/label.stories.tsx +48 -0
- package/src/components/label.test.tsx +28 -0
- package/src/components/label.tsx +24 -0
- package/src/components/menubar.tsx +274 -0
- package/src/components/navigation-menu.tsx +168 -0
- package/src/components/pagination.stories.tsx +107 -0
- package/src/components/pagination.tsx +127 -0
- package/src/components/popover.stories.tsx +102 -0
- package/src/components/popover.tsx +48 -0
- package/src/components/progress.stories.tsx +76 -0
- package/src/components/progress.test.tsx +36 -0
- package/src/components/progress.tsx +29 -0
- package/src/components/radio-group.stories.tsx +73 -0
- package/src/components/radio-group.test.tsx +74 -0
- package/src/components/radio-group.tsx +45 -0
- package/src/components/resizable.stories.tsx +120 -0
- package/src/components/resizable.tsx +54 -0
- package/src/components/scroll-area.stories.tsx +64 -0
- package/src/components/scroll-area.test.tsx +46 -0
- package/src/components/scroll-area.tsx +58 -0
- package/src/components/select.stories.tsx +111 -0
- package/src/components/select.test.tsx +90 -0
- package/src/components/select.tsx +188 -0
- package/src/components/separator.stories.tsx +76 -0
- package/src/components/separator.test.tsx +24 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.stories.tsx +122 -0
- package/src/components/sheet.tsx +137 -0
- package/src/components/sidebar.tsx +726 -0
- package/src/components/skeleton.stories.tsx +53 -0
- package/src/components/skeleton.test.tsx +24 -0
- package/src/components/skeleton.tsx +13 -0
- package/src/components/slider.stories.tsx +97 -0
- package/src/components/slider.test.tsx +49 -0
- package/src/components/slider.tsx +63 -0
- package/src/components/sonner.stories.tsx +96 -0
- package/src/components/sonner.tsx +38 -0
- package/src/components/spinner.stories.tsx +54 -0
- package/src/components/spinner.test.tsx +30 -0
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.stories.tsx +108 -0
- package/src/components/switch.test.tsx +62 -0
- package/src/components/switch.tsx +31 -0
- package/src/components/table.stories.tsx +139 -0
- package/src/components/table.test.tsx +85 -0
- package/src/components/table.tsx +114 -0
- package/src/components/tabs.stories.tsx +99 -0
- package/src/components/tabs.test.tsx +64 -0
- package/src/components/tabs.tsx +66 -0
- package/src/components/textarea.stories.tsx +89 -0
- package/src/components/textarea.test.tsx +53 -0
- package/src/components/textarea.tsx +18 -0
- package/src/components/toggle-group.stories.tsx +108 -0
- package/src/components/toggle-group.test.tsx +66 -0
- package/src/components/toggle-group.tsx +81 -0
- package/src/components/toggle.stories.tsx +98 -0
- package/src/components/toggle.test.tsx +42 -0
- package/src/components/toggle.tsx +45 -0
- package/src/components/tooltip.stories.tsx +111 -0
- package/src/components/tooltip.tsx +61 -0
- package/src/foundations/README.md +141 -0
- package/src/foundations/ThemeProvider.tsx +77 -0
- package/src/foundations/color.css +232 -0
- package/src/foundations/color.stories.tsx +719 -0
- package/src/foundations/palette.css +249 -0
- package/src/foundations/spacing.css +8 -0
- package/src/foundations/typography.css +143 -0
- package/src/foundations/typography.stories.tsx +17 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +176 -0
- package/src/index.ts +336 -0
- package/src/lib/utils.ts +6 -0
- package/src/test/setup.ts +8 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.app.json +33 -0
- package/tsconfig.json +13 -0
- package/tsconfig.node.json +25 -0
- package/vite.config.ts +30 -0
- package/vitest.config.ts +25 -0
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Foundations',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'padded',
|
|
7
|
+
},
|
|
8
|
+
} satisfies Meta;
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
|
|
13
|
+
const PaletteColor = ({ bgColor }: { bgColor: string }) => {
|
|
14
|
+
// 빈 색상인 경우 빈 div 반환
|
|
15
|
+
if (!bgColor) {
|
|
16
|
+
return <div className='w-full h-16' />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 실제 색상 값이 정의되어 있는지 확인
|
|
20
|
+
const actualColorValue = getComputedStyle(document.documentElement).getPropertyValue(bgColor).trim();
|
|
21
|
+
if (!actualColorValue) {
|
|
22
|
+
return <div className='w-full h-16' />;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const opacity = Number(bgColor.split('-').reverse()[0]);
|
|
26
|
+
let fontColorClassName = 'text-static-black';
|
|
27
|
+
switch (bgColor) {
|
|
28
|
+
case '--white-100':
|
|
29
|
+
fontColorClassName = 'text-static-black';
|
|
30
|
+
break;
|
|
31
|
+
case '--black-100':
|
|
32
|
+
fontColorClassName = 'text-static-white';
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
fontColorClassName = opacity >= 50 ? 'text-static-white' : 'text-static-black';
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div
|
|
41
|
+
className={`px-2 py-1.5 text-xs w-full h-16 ${fontColorClassName}`}
|
|
42
|
+
style={{
|
|
43
|
+
backgroundColor: `var(${bgColor})`,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<p>{opacity}</p>
|
|
47
|
+
<p>{actualColorValue}</p>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Palette section component
|
|
53
|
+
const PaletteSection = ({ title, colors }: { title: string; colors: string[] }) => (
|
|
54
|
+
<div>
|
|
55
|
+
<p className='font-semibold mb-6'>{title}</p>
|
|
56
|
+
<div className='flex w-full'>
|
|
57
|
+
{colors.map((color, index) => (
|
|
58
|
+
<PaletteColor key={index} bgColor={color} />
|
|
59
|
+
))}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export const Palette: Story = {
|
|
65
|
+
render: () => {
|
|
66
|
+
const colorNames = [
|
|
67
|
+
'neutral',
|
|
68
|
+
'cool-neutral',
|
|
69
|
+
'navy',
|
|
70
|
+
'blue',
|
|
71
|
+
'red',
|
|
72
|
+
'orange',
|
|
73
|
+
'yellow',
|
|
74
|
+
'lime',
|
|
75
|
+
'green',
|
|
76
|
+
'teal',
|
|
77
|
+
'cyan',
|
|
78
|
+
'sky',
|
|
79
|
+
'indigo',
|
|
80
|
+
'violet',
|
|
81
|
+
'purple',
|
|
82
|
+
'pink',
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
const shades = [0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95];
|
|
86
|
+
|
|
87
|
+
const generateColors = (colorName: string) => {
|
|
88
|
+
return shades.map((shade) => `--${colorName}-${shade}`);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const getTitle = (colorName: string) => {
|
|
92
|
+
return colorName
|
|
93
|
+
.split('-')
|
|
94
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
95
|
+
.join(' ');
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<div className='w-full gap-12 grid'>
|
|
100
|
+
<div className='flex w-full'>
|
|
101
|
+
<div className='w-full'>
|
|
102
|
+
<p className='font-semibold mb-6'> White</p>
|
|
103
|
+
<div className='border border-border-main box-border'>
|
|
104
|
+
<PaletteColor bgColor='--white-100' />
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div className='w-full'>
|
|
108
|
+
<p className='font-semibold mb-6'>Black</p>
|
|
109
|
+
<div className='border border-static-black box-border'>
|
|
110
|
+
<PaletteColor bgColor='--black-100' />
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
{colorNames.map((colorName, index) => (
|
|
115
|
+
<PaletteSection key={index} title={getTitle(colorName)} colors={generateColors(colorName)} />
|
|
116
|
+
))}
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
interface ColorItem {
|
|
123
|
+
token: string;
|
|
124
|
+
role: string;
|
|
125
|
+
value: string;
|
|
126
|
+
preview: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const ColorTable = ({ title, description, colors }: { title: string; description?: string; colors: ColorItem[] }) => (
|
|
130
|
+
<div>
|
|
131
|
+
<h2 className='text-lg font-bold '>{title}</h2>
|
|
132
|
+
{description && <p className='mb-4 text-sm' dangerouslySetInnerHTML={{ __html: description }} />}
|
|
133
|
+
<table className='w-full border-collapse text-sm bg-background-alternative rounded-md '>
|
|
134
|
+
<colgroup>
|
|
135
|
+
<col className='w-1/3' />
|
|
136
|
+
<col className='w-1/3' />
|
|
137
|
+
<col className='w-1/3' />
|
|
138
|
+
</colgroup>
|
|
139
|
+
<thead className='shadow shadow-sm'>
|
|
140
|
+
<tr>
|
|
141
|
+
<th className=' p-3 text-left'>Token</th>
|
|
142
|
+
<th className=' p-3 text-left'>Role</th>
|
|
143
|
+
<th className=' p-3 text-left'>Value</th>
|
|
144
|
+
</tr>
|
|
145
|
+
</thead>
|
|
146
|
+
<tbody>
|
|
147
|
+
{colors.map((color, colorIndex) => (
|
|
148
|
+
<tr key={colorIndex}>
|
|
149
|
+
<td className='p-3 font-medium'>{color.token}</td>
|
|
150
|
+
<td className='p-3 text-sm'>{color.role}</td>
|
|
151
|
+
<td className='p-3 text-sm '>
|
|
152
|
+
<div className='flex justify-between items-center'>
|
|
153
|
+
{color.value}
|
|
154
|
+
<div className={`w-12 h-12 border border-gray-200 rounded-full ${color.preview}`} />
|
|
155
|
+
</div>
|
|
156
|
+
</td>
|
|
157
|
+
</tr>
|
|
158
|
+
))}
|
|
159
|
+
</tbody>
|
|
160
|
+
</table>
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
export const Color: Story = {
|
|
165
|
+
render: () => {
|
|
166
|
+
const data = [
|
|
167
|
+
{
|
|
168
|
+
title: 'Static',
|
|
169
|
+
description: '테마에 상관없이 변하지 않는 고정 색상을 정의합니다.',
|
|
170
|
+
data: [
|
|
171
|
+
{
|
|
172
|
+
token: 'static-white',
|
|
173
|
+
role: '배경 및 밝은 요소에 사용되는 고정 색상',
|
|
174
|
+
value: 'white-100',
|
|
175
|
+
preview: 'bg-static-white',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
token: 'static-black',
|
|
179
|
+
role: '어두운 요소에 사용되는 고정 색상',
|
|
180
|
+
value: 'black-100',
|
|
181
|
+
preview: 'bg-static-black',
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
title: 'Primary',
|
|
187
|
+
description:
|
|
188
|
+
'각 제품의 주요 행동과 브랜드 아이덴티티를 나타내는 핵심 컬러입니다. (ex. 로고, Accent 컬러, Button, Active 상태의 Border 등)<br/>각 제품별로 정의할 수 있습니다.',
|
|
189
|
+
data: [
|
|
190
|
+
{
|
|
191
|
+
token: 'primary-main',
|
|
192
|
+
role: '메인 컬러',
|
|
193
|
+
value: 'violet-60',
|
|
194
|
+
preview: 'bg-primary-main',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
token: 'primary-alternative',
|
|
198
|
+
role: '어두운 톤의 보조 컬러 (Main 배경위에 겹쳐지는 더 깊은 위계를 가짐)',
|
|
199
|
+
value: 'violet-80',
|
|
200
|
+
preview: 'bg-primary-alternative',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
token: 'primary-subtle',
|
|
204
|
+
role: '밝은 톤의 보조 컬러 (Main 배경 위에 겹쳐지는 더 깊은 위계를 가짐)',
|
|
205
|
+
value: 'violet-40',
|
|
206
|
+
preview: 'bg-primary-subtle',
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
title: 'Secondary',
|
|
212
|
+
description:
|
|
213
|
+
'Primary 컬러를 보조하거나 다른 중요한 요소를 강조하는 데 사용되는 컬러입니다. Primary 색상과 조화로운 색상을 적용합니다.<br/>각 제품별로 정의할 수 있습니다.',
|
|
214
|
+
data: [
|
|
215
|
+
{
|
|
216
|
+
token: 'secondary-main',
|
|
217
|
+
role: 'Secondary의 메인 컬러',
|
|
218
|
+
value: 'indigo-60',
|
|
219
|
+
preview: 'bg-secondary-main',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
token: 'secondary-alternative',
|
|
223
|
+
role: '어두운 톤의 보조 컬러 (Main 배경위에 겹쳐지는 더 깊은 위계를 가짐)',
|
|
224
|
+
value: 'indigo-80',
|
|
225
|
+
preview: 'bg-secondary-alternative',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
token: 'secondary-subtle',
|
|
229
|
+
role: '밝은 톤의 보조 컬러 (Main 배경 위에 겹쳐지는 더 깊은 위계를 가짐)',
|
|
230
|
+
value: 'indigo-40',
|
|
231
|
+
preview: 'bg-secondary-subtle',
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
title: 'Tertiary',
|
|
237
|
+
description:
|
|
238
|
+
'가장 낮은 위계의 요소에 사용되며, 시각적 노이즈를 줄이는 역할을 합니다.<br/>각 제품별로 정의할 수 있습니다.',
|
|
239
|
+
data: [
|
|
240
|
+
{
|
|
241
|
+
token: 'tertiary-main',
|
|
242
|
+
role: 'Tertiary의 메인 컬러',
|
|
243
|
+
value: 'navy-60',
|
|
244
|
+
preview: 'bg-tertiary-main',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
token: 'tertiary-alternative',
|
|
248
|
+
role: '어두운 톤의 보조 컬러 (Main 배경위에 겹쳐지는 더 깊은 위계를 가짐)',
|
|
249
|
+
value: 'navy-80',
|
|
250
|
+
preview: 'bg-tertiary-alternative',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
token: 'tertiary-subtle',
|
|
254
|
+
role: '밝은 톤의 보조 컬러 (Main 배경 위에 겹쳐지는 더 깊은 위계를 가짐)',
|
|
255
|
+
value: 'navy-40',
|
|
256
|
+
preview: 'bg-tertiary-subtle',
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
title: 'Background',
|
|
262
|
+
description: '애플리케이션의 배경에 사용되는 색상으로, 콘텐츠를 돋보이게 하고 시각적 위계를 형성합니다.',
|
|
263
|
+
data: [
|
|
264
|
+
{
|
|
265
|
+
token: 'background-main',
|
|
266
|
+
role: '서비스의 주요 배경색',
|
|
267
|
+
value: 'white-100',
|
|
268
|
+
preview: 'bg-background-main',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
token: 'background-alternative',
|
|
272
|
+
role: '사이드 패널이나 특정 섹션의 배경색(primary 배경과 시각적 위계를 구분됨)',
|
|
273
|
+
value: 'cool-neutral-5',
|
|
274
|
+
preview: 'bg-background-alternative',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
token: 'background-subtle',
|
|
278
|
+
role: '사이드 패널이나 특정 섹션의 배경색(alternative 배경과 시각적 위계를 구분됨)',
|
|
279
|
+
value: 'cool-neutral-0',
|
|
280
|
+
preview: 'bg-background-subtle',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
token: 'background-elevated-main',
|
|
284
|
+
role: '배경 위에 겹쳐지는 더 깊은 위계를 가진 영역에 사용(Component의 배경색)',
|
|
285
|
+
value: 'cool-neutral-10',
|
|
286
|
+
preview: 'bg-background-elevated-main',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
token: 'background-elevated-alternative',
|
|
290
|
+
role: '배경 위에 겹쳐지는 더 깊은 위계를 가진 영역에 사용(Component의 배경색)',
|
|
291
|
+
value: 'cool-neutral-20',
|
|
292
|
+
preview: 'bg-background-elevated-alternative',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
token: 'background-emphize',
|
|
296
|
+
role: 'UI의 기본 배경과 대비되는 색상 (깊이감이나 강조 효과)',
|
|
297
|
+
value: 'cool-neutral-90',
|
|
298
|
+
preview: 'bg-background-emphize',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
token: 'background-quiet',
|
|
302
|
+
role: '비활성화된 Component의 배경색',
|
|
303
|
+
value: 'cool-neutral-90 / 5%',
|
|
304
|
+
preview: 'bg-background-quiet',
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
token: 'background-success',
|
|
308
|
+
role: '성공 상태를 나타내는 배경 색상',
|
|
309
|
+
value: 'green-50',
|
|
310
|
+
preview: 'bg-background-success',
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
token: 'background-error',
|
|
314
|
+
role: '에러 상태를 나타내는 배경 색상',
|
|
315
|
+
value: 'red-50',
|
|
316
|
+
preview: 'bg-background-error',
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
token: 'background-info-subtle',
|
|
320
|
+
role: '정보 혹은 팁을 나타내는 보조 배경색',
|
|
321
|
+
value: 'blue-50 / 5%',
|
|
322
|
+
preview: 'bg-background-info-subtle',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
token: 'background-success-subtle',
|
|
326
|
+
role: '성공 상황를 나타내는 보조 배경색',
|
|
327
|
+
value: 'green-50 / 5%',
|
|
328
|
+
preview: 'bg-background-success-subtle',
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
token: 'background-warning-subtle',
|
|
332
|
+
role: '주의 사항을 나타내는 보조 배경색',
|
|
333
|
+
value: 'yellow-50 / 5%',
|
|
334
|
+
preview: 'bg-background-warning-subtle',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
token: 'background-error-subtle',
|
|
338
|
+
role: '위험 상황를 나타내는 보조 배경색',
|
|
339
|
+
value: 'red-50 / 5%',
|
|
340
|
+
preview: 'bg-background-error-subtle',
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
title: 'Text',
|
|
346
|
+
description: '애플리케이션의 텍스트에 사용되는 색상으로, 가독성과 시각적 위계를 제공합니다.',
|
|
347
|
+
data: [
|
|
348
|
+
{
|
|
349
|
+
token: 'text-main',
|
|
350
|
+
role: '본문, 제목 등 가장 중요한 텍스트 색상',
|
|
351
|
+
value: 'cool-neutral-90',
|
|
352
|
+
preview: 'bg-text-main',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
token: 'text-alternative',
|
|
356
|
+
role: '보조 정보, 캡션, 부제목 등 상대적으로 덜 중요한 텍스트 색상 1',
|
|
357
|
+
value: 'cool-neutral-80',
|
|
358
|
+
preview: 'bg-text-alternative',
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
token: 'text-subtle',
|
|
362
|
+
role: '보조 정보, 캡션, 부제목 등 상대적으로 덜 중요한 텍스트 색상 2',
|
|
363
|
+
value: 'cool-neutral-60',
|
|
364
|
+
preview: 'bg-text-subtle',
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
token: 'text-ghost',
|
|
368
|
+
role: '보조 정보, 캡션, 부제목 등 상대적으로 덜 중요한 텍스트 색상 3',
|
|
369
|
+
value: 'cool-neutral-30',
|
|
370
|
+
preview: 'bg-text-ghost',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
token: 'text-quiet',
|
|
374
|
+
role: '비활성화된 텍스트 색상',
|
|
375
|
+
value: 'cool-neutral-25',
|
|
376
|
+
preview: 'bg-text-quiet',
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
token: 'text-emphize',
|
|
380
|
+
role: '기본 텍스트 컬러와 대비되는 색상 (깊이감이나 강조 효과)',
|
|
381
|
+
value: 'cool-neutral-10',
|
|
382
|
+
preview: 'bg-text-emphize',
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
token: 'text-interactive',
|
|
386
|
+
role: '클릭 가능한 링크의 텍스트 색상',
|
|
387
|
+
value: 'violet-60',
|
|
388
|
+
preview: 'bg-text-interactive',
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
token: 'text-info',
|
|
392
|
+
role: '정보 혹은 팁을 나타내는 텍스트 색상',
|
|
393
|
+
value: 'blue-70',
|
|
394
|
+
preview: 'bg-text-info',
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
token: 'text-success',
|
|
398
|
+
role: '성공의 상황를 나타내는 텍스트 색상',
|
|
399
|
+
value: 'green-70',
|
|
400
|
+
preview: 'bg-text-success',
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
token: 'text-warning',
|
|
404
|
+
role: '주의의 상황를 나타내는 텍스트 색상',
|
|
405
|
+
value: 'yellow-70',
|
|
406
|
+
preview: 'bg-text-warning',
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
token: 'text-error',
|
|
410
|
+
role: '위험의 상황를 나타내는텍스트 색상',
|
|
411
|
+
value: 'red-70',
|
|
412
|
+
preview: 'bg-text-error',
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
title: 'Border',
|
|
418
|
+
description: '컴포넌트와 레이아웃을 구분하는 경계선에 사용되는 색상입니다.',
|
|
419
|
+
data: [
|
|
420
|
+
{
|
|
421
|
+
token: 'border-main',
|
|
422
|
+
role: '기본 테두리 색상',
|
|
423
|
+
value: 'cool-neutral-10',
|
|
424
|
+
preview: 'bg-border-main',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
token: 'border-alternative',
|
|
428
|
+
role: '대체 테두리 색상 (더 진한 톤)',
|
|
429
|
+
value: 'cool-neutral-30',
|
|
430
|
+
preview: 'bg-border-alternative',
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
token: 'border-subtle',
|
|
434
|
+
role: '미묘한 테두리 색상 (더 연한 톤)',
|
|
435
|
+
value: 'cool-neutral-0',
|
|
436
|
+
preview: 'bg-border-subtle',
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
token: 'border-emphize',
|
|
440
|
+
role: '강조된 테두리 색상',
|
|
441
|
+
value: 'cool-neutral-90',
|
|
442
|
+
preview: 'bg-border-emphize',
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
token: 'border-quiet',
|
|
446
|
+
role: '비활성화된 테두리 색상',
|
|
447
|
+
value: 'cool-neutral-5',
|
|
448
|
+
preview: 'bg-border-quiet',
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
token: 'border-main-focusRing',
|
|
452
|
+
role: '기본 포커스 링 색상',
|
|
453
|
+
value: 'cool-neutral-10 / 50%',
|
|
454
|
+
preview: 'bg-border-main-focusRing',
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
token: 'border-emphize--focusRing',
|
|
458
|
+
role: '강조된 포커스 링 색상',
|
|
459
|
+
value: 'cool-neutral-90 / 50%',
|
|
460
|
+
preview: 'bg-border-emphize--focusRing',
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
token: 'border-control-default-focusRing',
|
|
464
|
+
role: '컨트롤 요소의 기본 포커스 링 색상',
|
|
465
|
+
value: 'cool-neutral-20 / 50%',
|
|
466
|
+
preview: 'bg-border-control-default-focusRing',
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
token: 'border-info',
|
|
470
|
+
role: '정보를 전달하는 테두리 색상',
|
|
471
|
+
value: 'blue-50',
|
|
472
|
+
preview: 'bg-border-info',
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
token: 'border-success',
|
|
476
|
+
role: '성공 상태를 나타내는 테두리 색상',
|
|
477
|
+
value: 'green-50',
|
|
478
|
+
preview: 'bg-border-success',
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
token: 'border-warning',
|
|
482
|
+
role: '경고를 나타내는 테두리 색상',
|
|
483
|
+
value: 'orange-50',
|
|
484
|
+
preview: 'bg-border-warning',
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
token: 'border-error',
|
|
488
|
+
role: '에러를 나타내는 테두리 색상',
|
|
489
|
+
value: 'red-50',
|
|
490
|
+
preview: 'bg-border-error',
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
token: 'border-success-focusRing',
|
|
494
|
+
role: '성공 상태의 포커스 링 색상',
|
|
495
|
+
value: 'green-50 / 50%',
|
|
496
|
+
preview: 'bg-border-success-focusRing',
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
token: 'border-warning-focusRing',
|
|
500
|
+
role: '경고 상태의 포커스 링 색상',
|
|
501
|
+
value: 'orange-50 / 50%',
|
|
502
|
+
preview: 'bg-border-warning-focusRing',
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
token: 'border-error-focusRing',
|
|
506
|
+
role: '에러 상태의 포커스 링 색상',
|
|
507
|
+
value: 'red-50 / 50%',
|
|
508
|
+
preview: 'bg-border-error-focusRing',
|
|
509
|
+
},
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
title: 'Icon',
|
|
514
|
+
description: '아이콘에 사용되는 색상으로, 시각적 위계와 상태를 나타냅니다.',
|
|
515
|
+
data: [
|
|
516
|
+
{
|
|
517
|
+
token: 'icon-main',
|
|
518
|
+
role: '기본 아이콘 색상',
|
|
519
|
+
value: 'cool-neutral-90',
|
|
520
|
+
preview: 'bg-icon-main',
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
token: 'icon-alternative',
|
|
524
|
+
role: '대체 아이콘 색상',
|
|
525
|
+
value: 'cool-neutral-70',
|
|
526
|
+
preview: 'bg-icon-alternative',
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
token: 'icon-quiet',
|
|
530
|
+
role: '비활성화된 아이콘 색상',
|
|
531
|
+
value: 'cool-neutral-20',
|
|
532
|
+
preview: 'bg-icon-quiet',
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
token: 'icon-emphize',
|
|
536
|
+
role: '강조된 아이콘 색상 (어두운 배경 위)',
|
|
537
|
+
value: 'cool-neutral-0',
|
|
538
|
+
preview: 'bg-icon-emphize',
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
token: 'icon-disable',
|
|
542
|
+
role: '비활성 상태 아이콘 색상',
|
|
543
|
+
value: 'cool-neutral-30',
|
|
544
|
+
preview: 'bg-icon-disable',
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
token: 'icon-info',
|
|
548
|
+
role: '정보를 전달하는 아이콘 색상',
|
|
549
|
+
value: 'blue-50',
|
|
550
|
+
preview: 'bg-icon-info',
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
token: 'icon-success',
|
|
554
|
+
role: '성공 상태를 나타내는 아이콘 색상',
|
|
555
|
+
value: 'green-50',
|
|
556
|
+
preview: 'bg-icon-success',
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
token: 'icon-warning',
|
|
560
|
+
role: '경고를 나타내는 아이콘 색상',
|
|
561
|
+
value: 'orange-50',
|
|
562
|
+
preview: 'bg-icon-warning',
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
token: 'icon-error',
|
|
566
|
+
role: '에러를 나타내는 아이콘 색상',
|
|
567
|
+
value: 'red-50',
|
|
568
|
+
preview: 'bg-icon-error',
|
|
569
|
+
},
|
|
570
|
+
],
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
title: 'State',
|
|
574
|
+
description: '인터랙티브 요소의 상태를 나타내는 색상입니다.',
|
|
575
|
+
data: [
|
|
576
|
+
{
|
|
577
|
+
token: 'state-default',
|
|
578
|
+
role: '기본 상태 색상',
|
|
579
|
+
value: 'cool-neutral-0 / 100%',
|
|
580
|
+
preview: 'bg-state-default',
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
token: 'state-hovered',
|
|
584
|
+
role: '호버 상태 색상',
|
|
585
|
+
value: 'cool-neutral-5 / 100%',
|
|
586
|
+
preview: 'bg-state-hovered',
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
token: 'state-focused',
|
|
590
|
+
role: '포커스 상태 색상',
|
|
591
|
+
value: 'cool-neutral-10 / 100%',
|
|
592
|
+
preview: 'bg-state-focused',
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
token: 'state-pressed',
|
|
596
|
+
role: '눌림 상태 색상',
|
|
597
|
+
value: 'cool-neutral-15 / 100%',
|
|
598
|
+
preview: 'bg-state-pressed',
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
token: 'state-disabled',
|
|
602
|
+
role: '비활성화 상태 색상',
|
|
603
|
+
value: 'static-white / 50%',
|
|
604
|
+
preview: 'bg-state-disabled',
|
|
605
|
+
},
|
|
606
|
+
],
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
title: 'Status',
|
|
610
|
+
description: '상태 메시지와 알림에 사용되는 색상입니다.',
|
|
611
|
+
data: [
|
|
612
|
+
{
|
|
613
|
+
token: 'status-info-main',
|
|
614
|
+
role: '정보 상태의 메인 색상',
|
|
615
|
+
value: 'blue-50',
|
|
616
|
+
preview: 'bg-status-info-main',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
token: 'status-info-alternative',
|
|
620
|
+
role: '정보 상태의 대체 색상',
|
|
621
|
+
value: 'blue-70',
|
|
622
|
+
preview: 'bg-status-info-alternative',
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
token: 'status-info-ghost',
|
|
626
|
+
role: '정보 상태의 미묘한 색상',
|
|
627
|
+
value: 'blue-10',
|
|
628
|
+
preview: 'bg-status-info-ghost',
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
token: 'status-success-main',
|
|
632
|
+
role: '성공 상태의 메인 색상',
|
|
633
|
+
value: 'green-50',
|
|
634
|
+
preview: 'bg-status-success-main',
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
token: 'status-success-alternative',
|
|
638
|
+
role: '성공 상태의 대체 색상',
|
|
639
|
+
value: 'green-70',
|
|
640
|
+
preview: 'bg-status-success-alternative',
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
token: 'status-success-ghost',
|
|
644
|
+
role: '성공 상태의 미묘한 색상',
|
|
645
|
+
value: 'green-10',
|
|
646
|
+
preview: 'bg-status-success-ghost',
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
token: 'status-warning-main',
|
|
650
|
+
role: '경고 상태의 메인 색상',
|
|
651
|
+
value: 'orange-50',
|
|
652
|
+
preview: 'bg-status-warning-main',
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
token: 'status-warning-alternative',
|
|
656
|
+
role: '경고 상태의 대체 색상',
|
|
657
|
+
value: 'orange-70',
|
|
658
|
+
preview: 'bg-status-warning-alternative',
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
token: 'status-warning-ghost',
|
|
662
|
+
role: '경고 상태의 미묘한 색상',
|
|
663
|
+
value: 'orange-10',
|
|
664
|
+
preview: 'bg-status-warning-ghost',
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
token: 'status-error-main',
|
|
668
|
+
role: '에러 상태의 메인 색상',
|
|
669
|
+
value: 'red-50',
|
|
670
|
+
preview: 'bg-status-error-main',
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
token: 'status-error-alternative',
|
|
674
|
+
role: '에러 상태의 대체 색상',
|
|
675
|
+
value: 'red-70',
|
|
676
|
+
preview: 'bg-status-error-alternative',
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
token: 'status-error-ghost',
|
|
680
|
+
role: '에러 상태의 미묘한 색상',
|
|
681
|
+
value: 'red-10',
|
|
682
|
+
preview: 'bg-status-error-ghost',
|
|
683
|
+
},
|
|
684
|
+
],
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
title: 'Overlay',
|
|
688
|
+
description: '모달, 팝업 등에 사용되는 오버레이 색상입니다.',
|
|
689
|
+
data: [
|
|
690
|
+
{
|
|
691
|
+
token: 'overlay-main',
|
|
692
|
+
role: '메인 오버레이 색상',
|
|
693
|
+
value: 'cool-neutral-90 / 40%',
|
|
694
|
+
preview: 'bg-overlay-main',
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
token: 'overlay-alternative',
|
|
698
|
+
role: '대체 오버레이 색상 (더 연한 톤)',
|
|
699
|
+
value: 'cool-neutral-90 / 20%',
|
|
700
|
+
preview: 'bg-overlay-alternative',
|
|
701
|
+
},
|
|
702
|
+
],
|
|
703
|
+
},
|
|
704
|
+
];
|
|
705
|
+
|
|
706
|
+
return (
|
|
707
|
+
<div className='space-y-6'>
|
|
708
|
+
{data.map((colorGroup, groupIndex) => (
|
|
709
|
+
<ColorTable
|
|
710
|
+
key={groupIndex}
|
|
711
|
+
title={colorGroup.title}
|
|
712
|
+
description={colorGroup.description}
|
|
713
|
+
colors={colorGroup.data}
|
|
714
|
+
/>
|
|
715
|
+
))}
|
|
716
|
+
</div>
|
|
717
|
+
);
|
|
718
|
+
},
|
|
719
|
+
};
|