Skip to content

Commit 7cc0314

Browse files
committed
chore(docs): ๐Ÿ”ง ๐Ÿ“š๏ธ update README and CHANGELOG for krds-tokens package
1 parent c3223bf commit 7cc0314

4 files changed

Lines changed: 167 additions & 74 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# @gracefullight/krds-tokens
2+
3+
Design tokens for the KRDS design system.
4+
5+
## Installation
6+
7+
Install the package via pnpm, npm or yarn:
8+
9+
```bash
10+
pnpm add @gracefullight/krds-tokens
11+
# or
12+
npm install @gracefullight/krds-tokens
13+
# or
14+
yarn add @gracefullight/krds-tokens
15+
```
16+
17+
## Usage
18+
19+
Import the helper functions or raw tokens in your TypeScript or JavaScript project.
20+
21+
```typescript
22+
// Import helper functions
23+
import { getTypography, getColor, getPalette, getRadius, getShadow, BREAKPOINTS } from "@gracefullight/krds-tokens";
24+
25+
// Get a typography style by key
26+
const headingStyle = getTypography("pc.heading.large");
27+
28+
// Get a color value
29+
const primaryColor = getColor("mode-light.color.primary.50");
30+
31+
// Access raw token object (if needed)
32+
import TOKENS from "@gracefullight/krds-tokens/dist/tokens";
33+
```
34+
35+
## API
36+
37+
### getTypography(key: string)
38+
39+
Retrieve a typography style object by its path. Returns an object with:
40+
- `fontSize`: string
41+
- `fontWeight`: number
42+
- `lineHeight`: number
43+
- `letterSpacing`: string
44+
45+
```ts
46+
getTypography("mobile.display.small");
47+
```
48+
49+
### getColor(key: string)
50+
51+
Retrieve a color value from the token set.
52+
53+
```ts
54+
getColor("mode-high-contrast.color.text.primary");
55+
```
56+
57+
### getPalette(name: string)
58+
59+
Get a predefined color palette.
60+
61+
### getRadius(key: string)
62+
63+
Get border-radius value.
64+
65+
### getShadow(key: string)
66+
67+
Get box-shadow definition.
68+
69+
### BREAKPOINTS
70+
71+
Exported breakpoint map for responsive design.
72+
73+
## Scripts
74+
75+
- `pnpm build` - Build the package with tsup
76+
- `pnpm dev` - Run tsup in watch mode
77+
78+
## Contributing
79+
80+
1. Fork the repository
81+
2. Install dependencies: `pnpm install`
82+
3. Run generators or update tokens
83+
4. Build: `pnpm build`
84+
5. Submit a pull request following conventional commits
85+
86+
## License
87+
88+
MIT

โ€Žpackages/krds-tokens/package.jsonโ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"name": "@gracefullight/krds-tokens",
33
"version": "1.0.0",
44
"description": "Design tokens for KRDS design system",
5+
"homepage": "https://krds.gracefullight.dev",
6+
"license": "MIT",
7+
"author": {
8+
"name": "gracefullight",
9+
"email": "gracefullight.dev@gmail.com"
10+
},
511
"imports": {
612
"#/*": "./dist/*"
713
},

โ€Žpackages/krds/CHANGELOG.mdโ€Ž

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file following [Conventional Commits](https://www.conventionalcommits.org).
4+
5+
- Added MUI components and composite components: 0.11.0
6+
- divider
7+
- info-box
8+
- top-button
9+
- Changed date input icon: 0.10.1
10+
- Added composite components: 0.10.0
11+
- chip
12+
- chip-group
13+
- masthead
14+
- skip-link
15+
- splash-screen
16+
- Added MUI components and composite components: 0.9.0
17+
- critical-alerts
18+
- date-picker
19+
- tooltip
20+
- Added MUI components: 0.8.0
21+
- stepper
22+
- switch
23+
- table
24+
- Added MUI components: 0.7.0
25+
- menu
26+
- pagination
27+
- radio
28+
- select
29+
- Added MUI components: 0.6.0
30+
- dialog
31+
- drawer
32+
- linear-progress
33+
- Added MUI components: 0.5.0
34+
- checkbox
35+
- chip
36+
- circular-progress
37+
- Added MUI components: 0.4.0
38+
- alert
39+
- badge
40+
- breadcrumbs
41+
- Added MUI components: 0.3.0
42+
- link
43+
- tabs
44+
- Provided MUI theme: 0.2.0
45+
- theme
46+
- button
47+
- typography
48+
- Provided reset styles: 0.1.1
49+
- Provided design token helper: 0.1.0

โ€Žpackages/krds/README.mdโ€Ž

Lines changed: 24 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,58 @@
11
# @gracefullight/krds
22

3-
**@gracefullight/krds**๋Š” [Korea Design System](https://www.krds.go.kr/)์˜ ๊ณต์‹ ๊ฐ€์ด๋“œ๋ผ์ธ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ MUI(Material-UI) ํ…Œ๋งˆ ๋ฐ ์ปดํฌ๋„ŒํŠธ ๋ชจ์Œ์ž…๋‹ˆ๋‹ค. ์ผ๊ด€๋œ ๋””์ž์ธ, ์ ‘๊ทผ์„ฑ, ๊ทธ๋ฆฌ๊ณ  ๋น ๋ฅธ ๊ฐœ๋ฐœ์„ ์ง€์›ํ•˜๋ฉฐ, React ํ”„๋กœ์ ํŠธ์—์„œ ์†์‰ฝ๊ฒŒ ๋Œ€ํ•œ๋ฏผ๊ตญ ์ •๋ถ€ ๋””์ž์ธ ์‹œ์Šคํ…œ์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
3+
The official MUI (Material UI) theme and component library for the Korea Design System, based on the official guidelines. It provides consistent design, accessibility support, and a fast development experience for React applications.
44

5-
## ์ฃผ์š” ํŠน์ง•
5+
## Key Features
66

7-
- **KRDS ๊ณต์‹ ๋””์ž์ธ ๋ฐ˜์˜**: ๋Œ€ํ•œ๋ฏผ๊ตญ ์ •๋ถ€ ๋””์ž์ธ ์‹œ์Šคํ…œ์„ ๊ทธ๋Œ€๋กœ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
8-
- **MUI ํ˜ธํ™˜**: MUI v7 ์ด์ƒ๊ณผ React v19 ์ด์ƒ์—์„œ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.
9-
- **๋‹ค์–‘ํ•œ ์ปดํฌ๋„ŒํŠธ**: Alert, Button, Table ๋“ฑ ์ž์ฃผ ์“ฐ์ด๋Š” UI ์ปดํฌ๋„ŒํŠธ์™€ ์กฐํ•ฉ ์ปดํฌ๋„ŒํŠธ ์ œ๊ณต
10-
- **๋””์ž์ธ ํ† ํฐ/ํ—ฌํผ**: ์ƒ‰์ƒ, ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ ๋“ฑ ๋””์ž์ธ ํ† ํฐ๊ณผ ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜ ํฌํ•จ
11-
- **๊ฐ„ํŽธํ•œ ํ…Œ๋งˆ ์ ์šฉ**: ThemeProvider๋กœ ์ „์ฒด ์•ฑ์— ์†์‰ฝ๊ฒŒ ํ…Œ๋งˆ ์ ์šฉ ๊ฐ€๋Šฅ
7+
- **Official KRDS Design**: Implements the Korea Design System as-is.
8+
- **MUI Compatible**: Works with MUI v7+ and React v19+.
9+
- **Rich Component Library**: Includes common components like Alert, Button, Table, and composite components.
10+
- **Design Tokens & Utilities**: Provides color, typography tokens, and helper functions.
11+
- **Easy Theme Application**: Apply the theme to your entire app with MUI's ThemeProvider.
1212

13-
## ์ตœ์†Œ ์ง€์› ๋ฒ„์ „
13+
## Minimum Requirements
1414

15-
- mui >= 7
16-
- react >= 19
15+
- MUI >= 7
16+
- React >= 19
1717

18-
## ์‹œ์ž‘ํ•˜๊ธฐ
18+
## Getting Started
1919

20-
### 1. ํŒจํ‚ค์ง€ ์„ค์น˜
20+
### 1. Install the Package
2121

2222
```bash
2323
pnpm install @gracefullight/krds
2424
```
2525

26-
### 2. ํ…Œ๋งˆ ์ ์šฉ
26+
### 2. Apply the Theme
2727

28-
์•„๋ž˜ ์˜ˆ์‹œ์ฒ˜๋Ÿผ ThemeProvider์— KRDS ํ…Œ๋งˆ๋ฅผ ์ ์šฉํ•˜์„ธ์š”.
29-
30-
```ts
28+
```tsx
3129
import type { PropsWithChildren } from "react";
3230

3331
import { createKrdsTheme } from "@gracefullight/krds";
3432
import { ThemeProvider } from "@mui/material/styles";
3533

36-
const krdsTheme = createKrdsTheme();
37-
3834
export default function MuiProvider({ children }: PropsWithChildren) {
39-
return (
40-
<ThemeProvider theme={krdsTheme}>{children}</ThemeProvider>
41-
);
35+
const krdsTheme = createKrdsTheme();
36+
37+
return <ThemeProvider theme={krdsTheme}>{children}</ThemeProvider>;
4238
}
4339
```
4440

45-
> **์ฐธ๊ณ :** ํƒ€์ž… ์ง€์›์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ์•„๋ž˜๋ฅผ ์ถ”๊ฐ€ํ•˜์„ธ์š”.
41+
> **Note:** If you need type definitions, add:
4642
4743
```ts
4844
/// <reference types="@gracefullight/krds" />
4945
```
5046

51-
## ์‚ฌ์šฉ ์˜ˆ์‹œ
52-
53-
KRDS ํ…Œ๋งˆ๊ฐ€ ์ ์šฉ๋œ MUI ์ปดํฌ๋„ŒํŠธ์™€ KRDS ์ „์šฉ ์ปดํฌ๋„ŒํŠธ๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
47+
## Usage Example
5448

5549
```tsx
5650
import { Button } from "@mui/material";
5751
import { CriticalAlerts } from "@gracefullight/krds/components";
5852
```
5953

60-
- ๋” ๋งŽ์€ ์ปดํฌ๋„ŒํŠธ์™€ ์‚ฌ์šฉ๋ฒ•์€ [๊ณต์‹ ๋ฌธ์„œ](https://www.krds.go.kr/) ๋˜๋Š” [Storybook](https://krds.gracefullight.dev)์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.
61-
62-
## ๋ณ€๊ฒฝ ์ด๋ ฅ
63-
64-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€, ์กฐํ•ฉ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.11.0
65-
- divider
66-
- info-box
67-
- top-button
68-
- date input ์•„์ด์ฝ˜ ๋ณ€๊ฒฝ: 0.10.1
69-
- ์กฐํ•ฉ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.10.0
70-
- chip
71-
- chip-group
72-
- masthead
73-
- skip-link
74-
- splash-screen
75-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€, ์กฐํ•ฉ ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.9.0
76-
- critical-alerts
77-
- date-picker
78-
- tooltip
79-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.8.0
80-
- stepper
81-
- switch
82-
- table
83-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.7.0
84-
- menu
85-
- pagination
86-
- radio
87-
- select
88-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.6.0
89-
- dialog
90-
- drawer
91-
- linear-progress
92-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.5.0
93-
- checkbox
94-
- chip
95-
- circular-progress
96-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.4.0
97-
- alert
98-
- badge
99-
- breadcrumbs
100-
- Mui ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: 0.3.0
101-
- link
102-
- tabs
103-
- Mui ํ…Œ๋งˆ ์ œ๊ณต: 0.2.0
104-
- theme
105-
- button
106-
- typography
107-
- ์ดˆ๊ธฐํ™” ์Šคํƒ€์ผ ์ œ๊ณต: 0.1.1
108-
- ๋””์ž์ธ ํ† ํฐ ํ—ฌํผ ์ œ๊ณต: 0.1.0
54+
Refer to the [official documentation](https://www.krds.go.kr/) or [Storybook](https://krds.gracefullight.dev) for more components and usage.
55+
56+
## Changelog
57+
58+
See [CHANGELOG.md](./CHANGELOG.md) for the detailed release history.

0 commit comments

Comments
ย (0)