Skip to content

Commit edb04dd

Browse files
authored
Merge branch 'main' into 62-storybook-docs-dark-mode
2 parents 5924da8 + 5d94813 commit edb04dd

File tree

4 files changed

+141
-11
lines changed

4 files changed

+141
-11
lines changed

โ€Žbun.lockโ€Ž

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

โ€Žpackage.jsonโ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"devDependencies": {
3636
"@chromatic-com/storybook": "^3.2.6",
37-
"@eslint/js": "^9.23.0",
37+
"@eslint/js": "^9.24.0",
3838
"@faker-js/faker": "^9.4.0",
3939
"@pandacss/dev": "^0.53.3",
4040
"@storybook/addon-a11y": "^8.6.12",
@@ -51,8 +51,8 @@
5151
"@testing-library/jest-dom": "^6.6.3",
5252
"@testing-library/react": "^16.2.0",
5353
"@testing-library/user-event": "^14.6.1",
54-
"@types/react": "^19.1.0",
55-
"@types/react-dom": "^19.1.1",
54+
"@types/react": "^19.1.2",
55+
"@types/react-dom": "^19.1.2",
5656
"@vitejs/plugin-react": "^4.3.4",
5757
"eslint": "^9.24.0",
5858
"eslint-plugin-react-hooks": "^5.1.0",
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { test } from "vitest";
2+
3+
test.todo("RadioGroup์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ž์‹ ์š”์†Œ์™€ ํ•จ๊ป˜ ๋ Œ๋”๋ง๋จ");
4+
test.todo(
5+
"RadioGroup.Item์ด RadioGroup.Root ์™ธ๋ถ€์—์„œ ์‚ฌ์šฉ๋  ๊ฒฝ์šฐ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•จ"
6+
);
7+
test.todo("RadioGroup.Root์˜ name ์†์„ฑ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์„ค์ •๋จ");
8+
9+
test.todo("RadioGroup.Item์˜ value๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋™์ž‘ํ•จ");
10+
test.todo("RadioGroup.Item์˜ disabled ์†์„ฑ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ ์šฉ๋จ");
11+
test.todo("RadioGroup.Item ์„ ํƒ ์‹œ onChange๊ฐ€ ํ˜ธ์ถœ๋จ");
12+
13+
test.todo("defaultValue๊ฐ€ ์ œ๊ณต๋  ๋•Œ ํ•ด๋‹น ๊ฐ’์ด ์„ ํƒ๋จ");
14+
test.todo("defaultValue๊ฐ€ ์ œ๊ณต๋˜์ง€ ์•Š์„ ๋•Œ ์•„๋ฌด๊ฒƒ๋„ ์„ ํƒ๋˜์ง€ ์•Š์Œ");
15+
test.todo("value์™€ defaultValue๊ฐ€ ๋ชจ๋‘ ์ œ๊ณต๋  ๋•Œ value๊ฐ€ ์šฐ์„ ์‹œ๋จ");
16+
17+
test.todo("Root์˜ disabled๊ฐ€ true์ผ ๋•Œ ๋ชจ๋“  RadioGroup.Item์ด ๋น„ํ™œ์„ฑํ™”๋จ");
18+
test.todo("Item์˜ disabled๊ฐ€ true์ผ ๋•Œ ํ•ด๋‹น ์•„์ดํ…œ๋งŒ ๋น„ํ™œ์„ฑํ™”๋จ");
19+
20+
test.todo("required๊ฐ€ true์ผ ๋•Œ ํ•„์ˆ˜ ์ž…๋ ฅ์œผ๋กœ ํ‘œ์‹œ๋จ");
21+
22+
test.todo("orientation์ด 'horizontal'์ผ ๋•Œ RadioGroup.Item์ด ๊ฐ€๋กœ๋กœ ๋ฐฐ์—ด๋จ");
23+
test.todo("orientation์ด 'vertical'์ผ ๋•Œ RadioGroup.Item์ด ์„ธ๋กœ๋กœ ๋ฐฐ์—ด๋จ");
24+
25+
test.todo("ํ‚ค๋ณด๋“œ ๋ฐฉํ–ฅํ‚ค๋กœ RadioGroup.Item ๊ฐ„ ์ด๋™์ด ๊ฐ€๋Šฅํ•จ");
26+
test.todo("Tab ํ‚ค๋กœ RadioGroup์— ์ดˆ์ ์„ ๋งž์ถœ ์ˆ˜ ์žˆ์Œ");
27+
28+
test.todo("ํผ ์ œ์ถœ ์‹œ ์„ ํƒ๋œ RadioGroup ๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ „์†ก๋จ");
29+
test.todo("ํผ ๋ฆฌ์…‹ ์‹œ RadioGroup์ด defaultValue๋กœ ์ดˆ๊ธฐํ™”๋จ");
30+
31+
test.todo("RadioGroup.Item์ด ๋™์ ์œผ๋กœ ์ถ”๊ฐ€/์ œ๊ฑฐ๋  ๋•Œ ์ •์ƒ ์ž‘๋™ํ•จ");
32+
test.todo("RadioGroup.Item ์‚ฌ์ด์— ๋‹ค๋ฅธ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์žˆ์–ด๋„ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ž‘๋™ํ•จ");
33+
34+
test.todo("tone prop์— ๋”ฐ๋ผ ์˜ฌ๋ฐ”๋ฅธ ์ƒ‰์ƒ์ด ์ ์šฉ๋จ");
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import { type ReactNode } from "react";
2+
import type { Tone } from "../../tokens/colors";
3+
4+
interface RadioGroupProps {
5+
/**
6+
* RadioGroup์˜ ์ž์‹ ์š”์†Œ๋“ค์ž…๋‹ˆ๋‹ค.
7+
* RadioGroup.Item ์ปดํฌ๋„ŒํŠธ๋ฅผ ํฌํ•จํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
8+
*/
9+
children: ReactNode;
10+
11+
/**
12+
* ํผ ์ž…๋ ฅ ์ด๋ฆ„: ๋™์ผํ•œ ๊ทธ๋ฃน์˜ ๋ผ๋””์˜ค ๋ฒ„ํŠผ๋“ค์ด ๊ณต์œ ํ•˜๋Š” ์ด๋ฆ„์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
13+
*/
14+
name: string;
15+
16+
/**
17+
* ๋ผ๋””์˜ค ๊ทธ๋ฃน์˜ ๋ ˆ์ด๋ธ”: ๋ผ๋””์˜ค ๊ทธ๋ฃน์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
18+
*/
19+
label: string;
20+
21+
/**
22+
* ๊ธฐ๋ณธ ์„ ํƒ๊ฐ’: ์ปดํฌ๋„ŒํŠธ ์ดˆ๊ธฐ ๋ Œ๋”๋ง ์‹œ ์„ ํƒ๋  ๊ฐ’์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
23+
* @default undefined
24+
*/
25+
defaultValue?: string;
26+
27+
/**
28+
* ํ˜„์žฌ ์„ ํƒ๋œ ๊ฐ’: ์™ธ๋ถ€์—์„œ ๊ฐ’์„ ์ง์ ‘ ๊ด€๋ฆฌํ•  ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
29+
* @default undefined
30+
*/
31+
value?: string;
32+
33+
/**
34+
* ๊ฐ’ ๋ณ€๊ฒฝ ํ•ธ๋“ค๋Ÿฌ: ์‚ฌ์šฉ์ž๊ฐ€ ์„ ํƒ์„ ๋ณ€๊ฒฝํ•  ๋•Œ ํ˜ธ์ถœ๋˜๋Š” ์ฝœ๋ฐฑ ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.
35+
* @default undefined
36+
*/
37+
onChange?: (value: string) => void;
38+
39+
/**
40+
* ๋น„ํ™œ์„ฑํ™” ์—ฌ๋ถ€: true์ด๋ฉด ๋ชจ๋“  ๋ผ๋””์˜ค ๋ฒ„ํŠผ์ด ๋น„ํ™œ์„ฑํ™”๋˜์–ด ์ƒํ˜ธ์ž‘์šฉ์„ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค.
41+
* @default false
42+
*/
43+
disabled?: boolean;
44+
45+
/**
46+
* ํ•„์ˆ˜ ์—ฌ๋ถ€: true์ผ ๊ฒฝ์šฐ ์‚ฌ์šฉ์ž๊ฐ€ ํ•˜๋‚˜์˜ ์˜ต์…˜์„ ๋ฐ˜๋“œ์‹œ ์„ ํƒํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
47+
* @default undefined
48+
*/
49+
required?: boolean;
50+
51+
/**
52+
* ๋ผ๋””์˜ค ๊ทธ๋ฃน์˜ ๋ฐฐ์น˜ ๋ฐฉํ–ฅ์„ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค.
53+
* 'horizontal'์€ ๊ฐ€๋กœ ๋ฐฐ์—ด, 'vertical'์€ ์„ธ๋กœ ๋ฐฐ์—ด์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
54+
* @default undefined
55+
*/
56+
orientation?: "horizontal" | "vertical";
57+
58+
/** ์ƒ‰์กฐ */
59+
tone?: Tone;
60+
}
61+
62+
/**
63+
* RadioGroup์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
64+
* ๋ผ๋””์˜ค ๋ฒ„ํŠผ ๊ทธ๋ฃน์„ ์ •์˜ํ•˜๊ณ  ์ƒํƒœ๋ฅผ.๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
65+
*/
66+
// eslint-disable-next-line no-empty-pattern
67+
export function RadioGroup({}: RadioGroupProps) {
68+
// TODO: ๊ตฌํ˜„
69+
return null;
70+
}
71+
72+
interface RadioProps {
73+
/**
74+
* ๋ผ๋””์˜ค ๋ฒ„ํŠผ์˜ ๊ฐ’์ž…๋‹ˆ๋‹ค.
75+
*/
76+
value: string;
77+
78+
/**
79+
* ๋ผ๋””์˜ค ๋ฒ„ํŠผ์˜ ์ž์‹ ์š”์†Œ์ž…๋‹ˆ๋‹ค.
80+
*/
81+
children?: ReactNode;
82+
83+
/**
84+
* ๋น„ํ™œ์„ฑํ™” ์—ฌ๋ถ€: true์ด๋ฉด ์ด ๋ผ๋””์˜ค ๋ฒ„ํŠผ์ด ๋น„ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.
85+
* @default false
86+
*/
87+
disabled?: boolean;
88+
}
89+
90+
/**
91+
* ๋ผ๋””์˜ค ๊ทธ๋ฃน์˜ ๊ฐœ๋ณ„ ํ•ญ๋ชฉ์ž…๋‹ˆ๋‹ค.
92+
* ์„ ํƒ ๊ฐ€๋Šฅํ•œ ๋‹จ์ผ ๋ผ๋””์˜ค ๋ฒ„ํŠผ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
93+
*/
94+
// eslint-disable-next-line no-empty-pattern
95+
export function Radio({}: RadioProps) {
96+
// TODO: ๊ตฌํ˜„
97+
return null;
98+
}

0 commit comments

Comments
ย (0)