daleui 0.0.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/.github/CODEOWNERS +1 -0
- package/.github/FUNDING.yml +1 -0
- package/.github/workflows/automation.yml +13 -0
- package/.github/workflows/chromatic.yml +19 -0
- package/.github/workflows/deployment.yml +32 -0
- package/.github/workflows/integration.yml +15 -0
- package/.github/workflows/storybook-tests.yml +17 -0
- package/.storybook/main.ts +18 -0
- package/.storybook/preview.ts +29 -0
- package/.storybook/test-runner.ts +33 -0
- package/LICENSE +21 -0
- package/README.md +10 -0
- package/bun.lock +9736 -0
- package/bun.lockb +0 -0
- package/chromatic.config.json +5 -0
- package/eslint.config.js +28 -0
- package/index.html +13 -0
- package/package.json +63 -0
- package/panda.config.ts +61 -0
- package/postcss.config.cjs +5 -0
- package/public/logo.svg +9 -0
- package/src/App.tsx +67 -0
- package/src/assets/Discord.svg +1 -0
- package/src/assets/GitHub.svg +1 -0
- package/src/assets/LinkedIn.svg +1 -0
- package/src/assets/Medium.svg +1 -0
- package/src/assets/YouTube.svg +1 -0
- package/src/components/Button/Button.stories.tsx +115 -0
- package/src/components/Button/Button.test.tsx +108 -0
- package/src/components/Button/Button.tsx +245 -0
- package/src/components/Button/index.tsx +1 -0
- package/src/components/Heading/Heading.stories.tsx +72 -0
- package/src/components/Heading/Heading.test.tsx +55 -0
- package/src/components/Heading/Heading.tsx +73 -0
- package/src/components/Heading/index.tsx +1 -0
- package/src/components/Icon/Icon.stories.tsx +106 -0
- package/src/components/Icon/Icon.test.tsx +44 -0
- package/src/components/Icon/Icon.tsx +116 -0
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/Text/Text.stories.tsx +65 -0
- package/src/components/Text/Text.test.tsx +54 -0
- package/src/components/Text/Text.tsx +93 -0
- package/src/components/Text/index.tsx +1 -0
- package/src/index.css +2 -0
- package/src/main.tsx +10 -0
- package/src/setupTests.tsx +5 -0
- package/src/styles/globalCss.ts +43 -0
- package/src/tokens/colors.mdx +100 -0
- package/src/tokens/colors.ts +288 -0
- package/src/tokens/iconography.mdx +15 -0
- package/src/tokens/iconography.tsx +54 -0
- package/src/tokens/typography.mdx +38 -0
- package/src/tokens/typography.ts +132 -0
- package/src/vite-env.d.ts +2 -0
- package/tsconfig.app.json +25 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +22 -0
- package/vite.config.ts +16 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { css, cva } from "../../../styled-system/css";
|
|
2
|
+
import type { Tone } from "../../tokens/colors";
|
|
3
|
+
import { type IconName, icons } from "../../tokens/iconography";
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
/** 이름 */
|
|
6
|
+
name: IconName;
|
|
7
|
+
/** 색조 */
|
|
8
|
+
tone?: Tone;
|
|
9
|
+
/** 크기 */
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
11
|
+
/** 명암비 낮출지 */
|
|
12
|
+
muted?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* - `name` 속성으로 어떤 모양의 아이콘을 사용할지 지정할 수 있습니다.
|
|
17
|
+
* - 아이콘의 기본 크기는 부모 요소에서 설정한 글자 크기의 1.5배이며, `size` 속성을 통해서 크기를 변경할 수 있습니다.
|
|
18
|
+
* - 아이콘의 기본 색상은 부모 요소에서 설정한 글자 색상과 동일하며, `tone` 속성과 `muted` 속성을 통해서 색상을 변경할 수 있습니다.
|
|
19
|
+
*/
|
|
20
|
+
export const Icon = ({
|
|
21
|
+
name,
|
|
22
|
+
size,
|
|
23
|
+
tone,
|
|
24
|
+
muted = false,
|
|
25
|
+
...rest
|
|
26
|
+
}: IconProps) => {
|
|
27
|
+
const Tag = icons[name];
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Tag
|
|
31
|
+
className={css(
|
|
32
|
+
sizeStyles.raw({ size }),
|
|
33
|
+
colorStyles.raw({ tone, muted }),
|
|
34
|
+
css.raw({
|
|
35
|
+
display: "inline-block",
|
|
36
|
+
})
|
|
37
|
+
)}
|
|
38
|
+
{...rest}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const sizeStyles = cva({
|
|
44
|
+
variants: {
|
|
45
|
+
size: {
|
|
46
|
+
xs: {
|
|
47
|
+
width: "1em",
|
|
48
|
+
height: "1em",
|
|
49
|
+
},
|
|
50
|
+
sm: {
|
|
51
|
+
width: "1.25em",
|
|
52
|
+
height: "1.25em",
|
|
53
|
+
},
|
|
54
|
+
md: {
|
|
55
|
+
width: "1.5em",
|
|
56
|
+
height: "1.5em",
|
|
57
|
+
},
|
|
58
|
+
lg: {
|
|
59
|
+
width: "1.875em",
|
|
60
|
+
height: "1.875em",
|
|
61
|
+
},
|
|
62
|
+
xl: {
|
|
63
|
+
width: "2.25em",
|
|
64
|
+
height: "2.25em",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
size: "md",
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const colorStyles = cva({
|
|
74
|
+
compoundVariants: [
|
|
75
|
+
{
|
|
76
|
+
muted: false,
|
|
77
|
+
tone: "neutral",
|
|
78
|
+
css: { color: "text" },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
muted: false,
|
|
82
|
+
tone: "accent",
|
|
83
|
+
css: { color: "text.accent" },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
muted: false,
|
|
87
|
+
tone: "danger",
|
|
88
|
+
css: { color: "text.danger" },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
muted: false,
|
|
92
|
+
tone: "warning",
|
|
93
|
+
css: { color: "text.warning" },
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
muted: true,
|
|
97
|
+
tone: "neutral",
|
|
98
|
+
css: { color: "text.muted" },
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
muted: true,
|
|
102
|
+
tone: "accent",
|
|
103
|
+
css: { color: "text.muted.accent" },
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
muted: true,
|
|
107
|
+
tone: "danger",
|
|
108
|
+
css: { color: "text.muted.danger" },
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
muted: true,
|
|
112
|
+
tone: "warning",
|
|
113
|
+
css: { color: "text.muted.warning" },
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Icon as Text } from "./Icon";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { vstack } from "../../../styled-system/patterns";
|
|
3
|
+
import { Text } from "./Text";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
component: Text,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
children: "본문",
|
|
12
|
+
},
|
|
13
|
+
} satisfies Meta<typeof Text>;
|
|
14
|
+
|
|
15
|
+
export const Basic: StoryObj<typeof Text> = {};
|
|
16
|
+
|
|
17
|
+
export const Tones: StoryObj<typeof Text> = {
|
|
18
|
+
render: (args) => {
|
|
19
|
+
return (
|
|
20
|
+
<div className={vstack({ gap: "6" })}>
|
|
21
|
+
<Text {...args} tone="neutral">
|
|
22
|
+
중립 색조
|
|
23
|
+
</Text>
|
|
24
|
+
<Text {...args} tone="accent">
|
|
25
|
+
강조 색조
|
|
26
|
+
</Text>
|
|
27
|
+
<Text {...args} tone="danger">
|
|
28
|
+
위험 색조
|
|
29
|
+
</Text>
|
|
30
|
+
<Text {...args} tone="warning">
|
|
31
|
+
경고 색조
|
|
32
|
+
</Text>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
argTypes: {
|
|
37
|
+
children: {
|
|
38
|
+
control: false,
|
|
39
|
+
},
|
|
40
|
+
tone: {
|
|
41
|
+
control: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const Contrasts: StoryObj<typeof Text> = {
|
|
47
|
+
render: (args) => {
|
|
48
|
+
return (
|
|
49
|
+
<div className={vstack({ gap: "6" })}>
|
|
50
|
+
<Text {...args} muted>
|
|
51
|
+
낮은 명암비
|
|
52
|
+
</Text>
|
|
53
|
+
<Text {...args}>높은 명암비</Text>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
argTypes: {
|
|
58
|
+
children: {
|
|
59
|
+
control: false,
|
|
60
|
+
},
|
|
61
|
+
muted: {
|
|
62
|
+
control: false,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { composeStories } from "@storybook/react";
|
|
3
|
+
import { render, screen } from "@testing-library/react";
|
|
4
|
+
import { expect, test } from "vitest";
|
|
5
|
+
import { fontSizes, fontWeights } from "../../tokens/typography";
|
|
6
|
+
import * as stories from "./Text.stories";
|
|
7
|
+
|
|
8
|
+
const { Basic, Tones, Contrasts } = composeStories(stories);
|
|
9
|
+
|
|
10
|
+
test("renders the heading with the correct text content", () => {
|
|
11
|
+
render(<Basic>테스트</Basic>);
|
|
12
|
+
|
|
13
|
+
expect(screen.getByText("테스트"));
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test("applies the correct font weight class based on the weight prop", () => {
|
|
17
|
+
const weight = faker.helpers.arrayElement(
|
|
18
|
+
Object.keys(fontWeights)
|
|
19
|
+
) as keyof typeof fontWeights;
|
|
20
|
+
|
|
21
|
+
render(<Basic weight={weight} />);
|
|
22
|
+
|
|
23
|
+
expect(screen.getByText("본문")).toHaveClass(`fw_${weight}`);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test("applies the correct font size class based on the size prop", () => {
|
|
27
|
+
const size = faker.helpers.arrayElement(
|
|
28
|
+
Object.keys(fontSizes)
|
|
29
|
+
) as keyof typeof fontSizes;
|
|
30
|
+
|
|
31
|
+
render(<Basic size={size} />);
|
|
32
|
+
|
|
33
|
+
expect(screen.getByText("본문")).toHaveClass(`fs_${size}`);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("applies the correct color based on the tone", () => {
|
|
37
|
+
render(<Tones />);
|
|
38
|
+
|
|
39
|
+
expect(screen.getByText("중립 색조")).toHaveClass("c_text");
|
|
40
|
+
|
|
41
|
+
expect(screen.getByText("강조 색조")).toHaveClass("c_text.accent");
|
|
42
|
+
|
|
43
|
+
expect(screen.getByText("위험 색조")).toHaveClass("c_text.danger");
|
|
44
|
+
|
|
45
|
+
expect(screen.getByText("경고 색조")).toHaveClass("c_text.warning");
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test("applies the correct color for low and high contrast", () => {
|
|
49
|
+
render(<Contrasts />);
|
|
50
|
+
|
|
51
|
+
expect(screen.getByText("낮은 명암비")).toHaveClass("c_text.muted");
|
|
52
|
+
|
|
53
|
+
expect(screen.getByText("높은 명암비")).toHaveClass("c_text");
|
|
54
|
+
});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { ReactNode, HTMLAttributes } from "react";
|
|
2
|
+
import { css, cva } from "../../../styled-system/css";
|
|
3
|
+
import type { Tone } from "../../tokens/colors";
|
|
4
|
+
import type { FontSize, FontWeight } from "../../tokens/typography";
|
|
5
|
+
|
|
6
|
+
export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
7
|
+
/** 텍스트 */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** HTML 태그 */
|
|
10
|
+
as?: "span" | "div" | "p" | "strong" | "em" | "small";
|
|
11
|
+
/** 색조 */
|
|
12
|
+
tone?: Tone;
|
|
13
|
+
/** 크기 */
|
|
14
|
+
size?: FontSize;
|
|
15
|
+
/** 굵기 */
|
|
16
|
+
weight?: FontWeight;
|
|
17
|
+
/** 명암비 낮출지 */
|
|
18
|
+
muted?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* - `as` 속성으로 어떤 HTML 태그를 사용할지 지정할 수 있습니다.
|
|
23
|
+
* - `muted` 속성을 주시면 글자색이 옅어집니다. 명암비가 낮아지므로 접근성 측면에서 주의해서 사용하세요.
|
|
24
|
+
*/
|
|
25
|
+
export const Text = ({
|
|
26
|
+
children,
|
|
27
|
+
as: Tag = "span",
|
|
28
|
+
tone = "neutral",
|
|
29
|
+
size,
|
|
30
|
+
weight,
|
|
31
|
+
muted = false,
|
|
32
|
+
...rest
|
|
33
|
+
}: TextProps) => {
|
|
34
|
+
return (
|
|
35
|
+
<Tag
|
|
36
|
+
className={css(
|
|
37
|
+
styles.raw({ tone, muted }),
|
|
38
|
+
css.raw({
|
|
39
|
+
fontSize: size,
|
|
40
|
+
fontWeight: weight,
|
|
41
|
+
})
|
|
42
|
+
)}
|
|
43
|
+
{...rest}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</Tag>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const styles = cva({
|
|
51
|
+
compoundVariants: [
|
|
52
|
+
{
|
|
53
|
+
muted: false,
|
|
54
|
+
tone: "neutral",
|
|
55
|
+
css: { color: "text" },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
muted: false,
|
|
59
|
+
tone: "accent",
|
|
60
|
+
css: { color: "text.accent" },
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
muted: false,
|
|
64
|
+
tone: "danger",
|
|
65
|
+
css: { color: "text.danger" },
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
muted: false,
|
|
69
|
+
tone: "warning",
|
|
70
|
+
css: { color: "text.warning" },
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
muted: true,
|
|
74
|
+
tone: "neutral",
|
|
75
|
+
css: { color: "text.muted" },
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
muted: true,
|
|
79
|
+
tone: "accent",
|
|
80
|
+
css: { color: "text.muted.accent" },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
muted: true,
|
|
84
|
+
tone: "danger",
|
|
85
|
+
css: { color: "text.muted.danger" },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
muted: true,
|
|
89
|
+
tone: "warning",
|
|
90
|
+
css: { color: "text.muted.warning" },
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Text } from "./Text";
|
package/src/index.css
ADDED
package/src/main.tsx
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineGlobalStyles } from "@pandacss/dev";
|
|
2
|
+
|
|
3
|
+
export const globalCss = defineGlobalStyles({
|
|
4
|
+
":root": {
|
|
5
|
+
"--global-font-body": "var(--fonts-sans)",
|
|
6
|
+
backgroundColor: "var(--colors-base)",
|
|
7
|
+
},
|
|
8
|
+
h1: {
|
|
9
|
+
fontSize: "var(--font-sizes-4xl)", // 2.25rem
|
|
10
|
+
lineHeight: "var(--line-heights-loose)", // 2
|
|
11
|
+
fontWeight: "var(--font-weights-bold)", // 700
|
|
12
|
+
},
|
|
13
|
+
h2: {
|
|
14
|
+
fontSize: "var(--font-sizes-3xl)", // 1.875rem
|
|
15
|
+
lineHeight: "var(--line-heights-loose)", // 2
|
|
16
|
+
fontWeight: "var(--font-weights-bold)", // 500
|
|
17
|
+
},
|
|
18
|
+
h3: {
|
|
19
|
+
fontSize: "var(--font-sizes-2xl)", // 1.5rem
|
|
20
|
+
lineHeight: "var(--line-heights-relaxed)", // 1.625
|
|
21
|
+
fontWeight: "var(--font-weights-medium)", // 500
|
|
22
|
+
},
|
|
23
|
+
h4: {
|
|
24
|
+
fontSize: "var(--font-sizes-xl)", // 1.25rem
|
|
25
|
+
lineHeight: "var(--line-heights-relaxed)", // 1.625
|
|
26
|
+
fontWeight: "var(--font-weights-medium)", // 500
|
|
27
|
+
},
|
|
28
|
+
h5: {
|
|
29
|
+
fontSize: "var(--font-sizes-lg)", // 1.125rem
|
|
30
|
+
lineHeight: "var(--line-heights-relaxed)", // 1.625
|
|
31
|
+
fontWeight: "var(--font-weights-medium)", // 500
|
|
32
|
+
},
|
|
33
|
+
h6: {
|
|
34
|
+
fontSize: "var(--font-sizes-md)", // 1rem
|
|
35
|
+
lineHeight: "var(--line-heights-relaxed)", // 1.625
|
|
36
|
+
fontWeight: "var(--font-weights-medium)", // 500
|
|
37
|
+
},
|
|
38
|
+
p: {
|
|
39
|
+
fontSize: "var(--font-sizes-md)", // 1rem
|
|
40
|
+
lineHeight: "var(--line-heights-relaxed)", // 1.625
|
|
41
|
+
fontWeight: "var(--font-weights-normal)", // 400
|
|
42
|
+
},
|
|
43
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
|
|
2
|
+
import { colors, semanticColors } from "./colors.ts";
|
|
3
|
+
|
|
4
|
+
# Colors
|
|
5
|
+
|
|
6
|
+
달레 UI의 근간이 되는 색상 팔레트입니다.
|
|
7
|
+
|
|
8
|
+
<ColorPalette>
|
|
9
|
+
<ColorItem
|
|
10
|
+
title="초록"
|
|
11
|
+
subtitle="colors.teal"
|
|
12
|
+
colors={Object.fromEntries(
|
|
13
|
+
Object.entries(colors.teal).map(([name, { value }]) => [name, value])
|
|
14
|
+
)}
|
|
15
|
+
/>
|
|
16
|
+
<ColorItem
|
|
17
|
+
title="초록 (dark)"
|
|
18
|
+
subtitle="colors.tealDark"
|
|
19
|
+
colors={Object.fromEntries(
|
|
20
|
+
Object.entries(colors.tealDark).map(([name, { value }]) => [name, value])
|
|
21
|
+
)}
|
|
22
|
+
/>
|
|
23
|
+
<ColorItem
|
|
24
|
+
title="보라"
|
|
25
|
+
subtitle="colors.violet"
|
|
26
|
+
colors={Object.fromEntries(
|
|
27
|
+
Object.entries(colors.violet).map(([name, { value }]) => [name, value])
|
|
28
|
+
)}
|
|
29
|
+
/>
|
|
30
|
+
<ColorItem
|
|
31
|
+
title="보라 (dark)"
|
|
32
|
+
subtitle="colors.violetDark"
|
|
33
|
+
colors={Object.fromEntries(
|
|
34
|
+
Object.entries(colors.violetDark).map(([name, { value }]) => [
|
|
35
|
+
name,
|
|
36
|
+
value,
|
|
37
|
+
])
|
|
38
|
+
)}
|
|
39
|
+
/>
|
|
40
|
+
<ColorItem
|
|
41
|
+
title="빨강"
|
|
42
|
+
subtitle="colors.red"
|
|
43
|
+
colors={Object.fromEntries(
|
|
44
|
+
Object.entries(colors.red).map(([name, { value }]) => [name, value])
|
|
45
|
+
)}
|
|
46
|
+
/>
|
|
47
|
+
<ColorItem
|
|
48
|
+
title="빨강 (dark)"
|
|
49
|
+
subtitle="colors.redDark"
|
|
50
|
+
colors={Object.fromEntries(
|
|
51
|
+
Object.entries(colors.redDark).map(([name, { value }]) => [name, value])
|
|
52
|
+
)}
|
|
53
|
+
/>
|
|
54
|
+
<ColorItem
|
|
55
|
+
title="노랑"
|
|
56
|
+
subtitle="colors.yellow"
|
|
57
|
+
colors={Object.fromEntries(
|
|
58
|
+
Object.entries(colors.yellow).map(([name, { value }]) => [name, value])
|
|
59
|
+
)}
|
|
60
|
+
/>
|
|
61
|
+
<ColorItem
|
|
62
|
+
title="노랑 (dark)"
|
|
63
|
+
subtitle="colors.yellowDark"
|
|
64
|
+
colors={Object.fromEntries(
|
|
65
|
+
Object.entries(colors.yellowDark).map(([name, { value }]) => [
|
|
66
|
+
name,
|
|
67
|
+
value,
|
|
68
|
+
])
|
|
69
|
+
)}
|
|
70
|
+
/>
|
|
71
|
+
<ColorItem
|
|
72
|
+
title="회색"
|
|
73
|
+
subtitle="colors.gray"
|
|
74
|
+
colors={Object.fromEntries(
|
|
75
|
+
Object.entries(colors.gray).map(([name, { value }]) => [name, value])
|
|
76
|
+
)}
|
|
77
|
+
/>
|
|
78
|
+
<ColorItem
|
|
79
|
+
title="회색 (dark)"
|
|
80
|
+
subtitle="colors.grayDark"
|
|
81
|
+
colors={Object.fromEntries(
|
|
82
|
+
Object.entries(colors.grayDark).map(([name, { value }]) => [name, value])
|
|
83
|
+
)}
|
|
84
|
+
/>
|
|
85
|
+
</ColorPalette>
|
|
86
|
+
|
|
87
|
+
용도에 따라서 각 색상은 12가지 스케일로 분리됩니다.
|
|
88
|
+
|
|
89
|
+
- Scale 1: 페이지 배경
|
|
90
|
+
- Scale 2: 예비
|
|
91
|
+
- Scale 3: 컴포넌트 배경
|
|
92
|
+
- Scale 4: 컴포넌트 배경 (hover)
|
|
93
|
+
- Scale 5: 컴포넌트 배경 (active)
|
|
94
|
+
- Scale 6: 예비
|
|
95
|
+
- Scale 7: 경계
|
|
96
|
+
- Scale 8: 경계 (hover)
|
|
97
|
+
- Scale 9: 솔리드 배경
|
|
98
|
+
- Scale 10: 솔리드 배경 (hover)
|
|
99
|
+
- Scale 11: 글자 (low contrast)
|
|
100
|
+
- Scale 12: 글자 (high contrast)
|