@cashdoc/cashdoc-cms-design-system 1.0.12

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.
Files changed (121) hide show
  1. package/README.md +125 -0
  2. package/dist/.gitkeep +0 -0
  3. package/dist/components/Button/Button.d.ts +127 -0
  4. package/dist/components/Button/index.d.ts +1 -0
  5. package/dist/components/Checkbox/Checkbox.d.ts +87 -0
  6. package/dist/components/Checkbox/index.d.ts +2 -0
  7. package/dist/components/DatePicker/DatePicker.d.ts +98 -0
  8. package/dist/components/DatePicker/index.d.ts +2 -0
  9. package/dist/components/DateRangePicker/DateRangePicker.d.ts +93 -0
  10. package/dist/components/DateRangePicker/index.d.ts +2 -0
  11. package/dist/components/Dropdown/Combobox.d.ts +86 -0
  12. package/dist/components/Dropdown/Dropdown.d.ts +106 -0
  13. package/dist/components/Dropdown/Select.d.ts +87 -0
  14. package/dist/components/Dropdown/index.d.ts +3 -0
  15. package/dist/components/FileUpload/FileUpload.d.ts +58 -0
  16. package/dist/components/FileUpload/index.d.ts +2 -0
  17. package/dist/components/ImageUpload/ImageUpload.d.ts +154 -0
  18. package/dist/components/ImageUpload/index.d.ts +2 -0
  19. package/dist/components/LoadingCircle/LoadingCircle.d.ts +76 -0
  20. package/dist/components/LoadingCircle/index.d.ts +1 -0
  21. package/dist/components/Modal/ConfirmModal.d.ts +36 -0
  22. package/dist/components/Modal/DeleteModal.d.ts +33 -0
  23. package/dist/components/Modal/ErrorModal.d.ts +32 -0
  24. package/dist/components/Modal/Modal.d.ts +185 -0
  25. package/dist/components/Modal/SuccessModal.d.ts +31 -0
  26. package/dist/components/Modal/WarningModal.d.ts +35 -0
  27. package/dist/components/Modal/index.d.ts +12 -0
  28. package/dist/components/Pagination/Pagination.d.ts +106 -0
  29. package/dist/components/Pagination/index.d.ts +2 -0
  30. package/dist/components/Popover/Popover.d.ts +75 -0
  31. package/dist/components/Popover/PopoverMenuItem.d.ts +36 -0
  32. package/dist/components/Popover/index.d.ts +3 -0
  33. package/dist/components/RadioButton/RadioButton.d.ts +84 -0
  34. package/dist/components/RadioButton/index.d.ts +1 -0
  35. package/dist/components/SideNavigation/SideNavigation.d.ts +98 -0
  36. package/dist/components/SideNavigation/index.d.ts +1 -0
  37. package/dist/components/Switch/Switch.d.ts +71 -0
  38. package/dist/components/Switch/index.d.ts +1 -0
  39. package/dist/components/Table/Table.d.ts +192 -0
  40. package/dist/components/Table/index.d.ts +2 -0
  41. package/dist/components/TagInput/TagInput.d.ts +118 -0
  42. package/dist/components/TagInput/index.d.ts +1 -0
  43. package/dist/components/Text/Text.d.ts +71 -0
  44. package/dist/components/Text/index.d.ts +2 -0
  45. package/dist/components/TextInput/TextInput.d.ts +94 -0
  46. package/dist/components/TextInput/index.d.ts +2 -0
  47. package/dist/components/TimePicker/TimePicker.d.ts +110 -0
  48. package/dist/components/TimePicker/index.d.ts +2 -0
  49. package/dist/components/Toast/Toaster.d.ts +84 -0
  50. package/dist/components/Toast/index.d.ts +4 -0
  51. package/dist/components/ToolTip/ToolTip.d.ts +110 -0
  52. package/dist/components/ToolTip/index.d.ts +2 -0
  53. package/dist/components/icons/index.d.ts +61 -0
  54. package/dist/components/index.d.ts +21 -0
  55. package/dist/index.d.ts +3 -0
  56. package/dist/index.es.js +5233 -0
  57. package/dist/index.es.js.map +1 -0
  58. package/dist/index.umd.js +2 -0
  59. package/dist/index.umd.js.map +1 -0
  60. package/dist/playwright.config.d.ts +6 -0
  61. package/dist/src/components/Button/Button.d.ts +113 -0
  62. package/dist/src/components/Button/index.d.ts +2 -0
  63. package/dist/src/components/Button/variants.d.ts +18 -0
  64. package/dist/src/components/Checkbox/Checkbox.d.ts +90 -0
  65. package/dist/src/components/Checkbox/index.d.ts +2 -0
  66. package/dist/src/components/DatePicker/DatePicker.d.ts +101 -0
  67. package/dist/src/components/DatePicker/index.d.ts +2 -0
  68. package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +96 -0
  69. package/dist/src/components/DateRangePicker/index.d.ts +2 -0
  70. package/dist/src/components/Dropdown/Combobox.d.ts +86 -0
  71. package/dist/src/components/Dropdown/Dropdown.d.ts +107 -0
  72. package/dist/src/components/Dropdown/Select.d.ts +87 -0
  73. package/dist/src/components/Dropdown/index.d.ts +4 -0
  74. package/dist/src/components/Dropdown/variants.d.ts +4 -0
  75. package/dist/src/components/FileUpload/FileUpload.d.ts +61 -0
  76. package/dist/src/components/FileUpload/index.d.ts +2 -0
  77. package/dist/src/components/ImageUpload/ImageUpload.d.ts +157 -0
  78. package/dist/src/components/ImageUpload/index.d.ts +2 -0
  79. package/dist/src/components/LoadingCircle/LoadingCircle.d.ts +79 -0
  80. package/dist/src/components/LoadingCircle/index.d.ts +1 -0
  81. package/dist/src/components/Modal/ConfirmModal.d.ts +36 -0
  82. package/dist/src/components/Modal/DeleteModal.d.ts +33 -0
  83. package/dist/src/components/Modal/ErrorModal.d.ts +32 -0
  84. package/dist/src/components/Modal/Modal.d.ts +188 -0
  85. package/dist/src/components/Modal/SuccessModal.d.ts +31 -0
  86. package/dist/src/components/Modal/WarningModal.d.ts +35 -0
  87. package/dist/src/components/Modal/index.d.ts +12 -0
  88. package/dist/src/components/Pagination/Pagination.d.ts +109 -0
  89. package/dist/src/components/Pagination/index.d.ts +2 -0
  90. package/dist/src/components/Popover/Popover.d.ts +78 -0
  91. package/dist/src/components/Popover/PopoverMenuItem.d.ts +34 -0
  92. package/dist/src/components/Popover/index.d.ts +4 -0
  93. package/dist/src/components/Popover/variants.d.ts +3 -0
  94. package/dist/src/components/RadioButton/RadioButton.d.ts +87 -0
  95. package/dist/src/components/RadioButton/index.d.ts +1 -0
  96. package/dist/src/components/SideNavigation/SideNavigation.d.ts +101 -0
  97. package/dist/src/components/SideNavigation/index.d.ts +1 -0
  98. package/dist/src/components/Switch/Switch.d.ts +74 -0
  99. package/dist/src/components/Switch/index.d.ts +1 -0
  100. package/dist/src/components/Table/Table.d.ts +195 -0
  101. package/dist/src/components/Table/index.d.ts +2 -0
  102. package/dist/src/components/TagInput/TagInput.d.ts +121 -0
  103. package/dist/src/components/TagInput/index.d.ts +1 -0
  104. package/dist/src/components/Text/Text.d.ts +74 -0
  105. package/dist/src/components/Text/index.d.ts +2 -0
  106. package/dist/src/components/TextInput/TextInput.d.ts +97 -0
  107. package/dist/src/components/TextInput/index.d.ts +2 -0
  108. package/dist/src/components/TimePicker/TimePicker.d.ts +113 -0
  109. package/dist/src/components/TimePicker/index.d.ts +2 -0
  110. package/dist/src/components/Toast/Toaster.d.ts +87 -0
  111. package/dist/src/components/Toast/index.d.ts +4 -0
  112. package/dist/src/components/ToolTip/ToolTip.d.ts +112 -0
  113. package/dist/src/components/ToolTip/index.d.ts +2 -0
  114. package/dist/src/components/icons/index.d.ts +61 -0
  115. package/dist/src/components/index.d.ts +21 -0
  116. package/dist/src/index.d.ts +3 -0
  117. package/dist/src/utils/cn.d.ts +3 -0
  118. package/dist/style.css +1 -0
  119. package/dist/utils/cn.d.ts +3 -0
  120. package/dist/vite.config.d.ts +2 -0
  121. package/package.json +99 -0
@@ -0,0 +1,101 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface SubMenuItem {
4
+ url: string;
5
+ title: string;
6
+ }
7
+ export interface MenuItem {
8
+ url: string;
9
+ title: string;
10
+ icon?: React.ReactNode;
11
+ subMenu?: SubMenuItem[];
12
+ }
13
+ export interface SideNavigationProps {
14
+ title?: string;
15
+ menus: MenuItem[];
16
+ selectedUrl: string;
17
+ onMenuClick: (url: string) => void;
18
+ headerSlot?: React.ReactNode;
19
+ className?: string;
20
+ }
21
+ /**
22
+ * ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ์ฃผ์š” ์„น์…˜ ๊ฐ„ ์ด๋™์„ ๋‹ด๋‹นํ•˜๋Š” ์™ผ์ชฝ ์‚ฌ์ด๋“œ๋ฐ” ๋ฉ”๋‰ด ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
23
+ *
24
+ * {@link SideNavigation}์€ ๊ณ„์ธตํ˜• ๋ฉ”๋‰ด ๊ตฌ์กฐ(1๋‹จ๊ณ„ ๋ฐ ์„œ๋ธŒ๋ฉ”๋‰ด)๋ฅผ ์ง€์›ํ•˜๋ฉฐ,
25
+ * ํ˜„์žฌ ์‚ฌ์šฉ์ž์˜ ์œ„์น˜๋ฅผ ์‹œ๊ฐ์ ์œผ๋กœ ๊ฐ•์กฐํ•˜์—ฌ ๋‚ด๋น„๊ฒŒ์ด์…˜ ๋งฅ๋ฝ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
26
+ * ๋‹คํฌ ํ…Œ๋งˆ(Dark Theme) ์Šคํƒ€์ผ๋กœ ๊ณ ์ •๋˜์–ด ๋Œ€์‹œ๋ณด๋“œ ๋ฐ CMS ๊ด€๋ฆฌ ๋„๊ตฌ์— ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.
27
+ *
28
+ * Radix UI์˜ Accordion ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌํ˜„๋˜์–ด ์„œ๋ธŒ๋ฉ”๋‰ด์˜ ํŽผ์นจ/์ ‘ํž˜ ๋™์ž‘์ด
29
+ * ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
30
+ *
31
+ * ## When (์–ธ์ œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๊ฐ€)
32
+ *
33
+ * **์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
34
+ * - **๋ฉ”์ธ ๋‚ด๋น„๊ฒŒ์ด์…˜**: ์„œ๋น„์Šค์˜ ํ•ต์‹ฌ ๊ธฐ๋Šฅ์„ ์ƒ์‹œ ๋…ธ์ถœํ•˜๊ณ  ์ ‘๊ทผํ•ด์•ผ ํ•  ๋•Œ
35
+ * - **๊ณ„์ธต ๊ตฌ์กฐ ๊ด€๋ฆฌ**: ๋Œ€๋ฉ”๋‰ด์™€ ๊ทธ์— ์†ํ•œ ์†Œ๋ฉ”๋‰ด๋ฅผ ๊ตฌ์กฐ์ ์œผ๋กœ ๋ณด์—ฌ์ค˜์•ผ ํ•  ๋•Œ
36
+ * - **๊ด€๋ฆฌ์ž ํŽ˜์ด์ง€**: ๋‹ค์–‘ํ•œ ๊ด€๋ฆฌ ๋„๊ตฌ์™€ ์„ค์ • ํ•ญ๋ชฉ์„ ๋ถ„๋ฅ˜ํ•˜์—ฌ ์ œ๊ณตํ•  ๋•Œ
37
+ *
38
+ * **์‚ฌ์šฉํ•˜์ง€ ๋ง์•„์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
39
+ * - **๋‹จ์ˆœ ๋งํฌ ๋ชฉ๋ก**: 3-4๊ฐœ์˜ ๋‹จ์ˆœํ•œ ๋งํฌ๋ผ๋ฉด ์ƒ๋‹จ ๋‚ด๋น„๊ฒŒ์ด์…˜(GNB)์ด ๋” ์ ์ ˆํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
40
+ * - **๋ชจ๋ฐ”์ผ ์ „์šฉ ํƒญ**: ๋ชจ๋ฐ”์ผ ์•ฑ ์Šคํƒ€์ผ์˜ ๋‚ด๋น„๊ฒŒ์ด์…˜์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ํ•˜๋‹จ ํƒญ ๋ฐ”๋ฅผ ๊ณ ๋ คํ•˜์„ธ์š”.
41
+ *
42
+ * ## Layout behavior
43
+ *
44
+ * - **Fixed Width**: ๊ธฐ๋ณธ์ ์œผ๋กœ `w-70` (280px)์˜ ๊ณ ์ • ๋„ˆ๋น„๋ฅผ ๊ฐ€์ง€๋ฉฐ, ์„ธ๋กœ ์ „์ฒด(h-full)๋ฅผ ์ฐจ์ง€ํ•ฉ๋‹ˆ๋‹ค.
45
+ * - **Scrollable**: ๋ฉ”๋‰ด ํ•ญ๋ชฉ์ด ๋งŽ์•„ ํ™”๋ฉด ๋†’์ด๋ฅผ ๋„˜์–ด๊ฐ€๋ฉด ๋ฉ”๋‰ด ์˜์—ญ ๋‚ด๋ถ€์— ์Šคํฌ๋กค์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
46
+ * - **Accordion**: ์„œ๋ธŒ๋ฉ”๋‰ด๊ฐ€ ์žˆ๋Š” ํ•ญ๋ชฉ ํด๋ฆญ ์‹œ ์•„๋ž˜๋กœ ํŽผ์ณ์ง€๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜์ด ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.
47
+ *
48
+ * ## Usage guidelines
49
+ *
50
+ * ### โœ… Do (๊ถŒ์žฅ ์‚ฌํ•ญ)
51
+ *
52
+ * - **์•„์ด์ฝ˜ ํ™œ์šฉ**: ๊ฐ ๋Œ€๋ฉ”๋‰ด์— ์ ์ ˆํ•œ ์•„์ด์ฝ˜์„ ๋ฐฐ์น˜ํ•˜์—ฌ ์‚ฌ์šฉ์ž๊ฐ€ ๋ฉ”๋‰ด์˜ ์„ฑ๊ฒฉ์„ ๋น ๋ฅด๊ฒŒ ํŒŒ์•…ํ•˜๊ฒŒ ํ•˜์„ธ์š”.
53
+ * - **์ƒํƒœ ์—ฐ๋™**: ํ˜„์žฌ ํ™œ์„ฑํ™”๋œ ํŽ˜์ด์ง€์˜ URL๊ณผ `selectedUrl`์„ ์ •ํ™•ํžˆ ์ผ์น˜์‹œ์ผœ ํ•˜์ด๋ผ์ดํŠธ๊ฐ€ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ํ‘œ์‹œ๋˜๋„๋ก ํ•˜์„ธ์š”.
54
+ * - **์ผ๊ด€๋œ ๊ทธ๋ฃนํ™”**: ์—ฐ๊ด€๋œ ๊ธฐ๋Šฅ๋“ค์€ ํ•˜๋‚˜์˜ ๋Œ€๋ฉ”๋‰ด ์•„๋ž˜ ์„œ๋ธŒ๋ฉ”๋‰ด๋กœ ๋ฌถ์–ด ๋ณต์žก๋„๋ฅผ ๋‚ฎ์ถ”์„ธ์š”.
55
+ *
56
+ * ### ๐Ÿšซ Don't (์ฃผ์˜/๊ธˆ์ง€ ์‚ฌํ•ญ)
57
+ *
58
+ * - **๊ณผ๋„ํ•œ ๊ณ„์ธต**: ์„œ๋ธŒ๋ฉ”๋‰ด์˜ ์„œ๋ธŒ๋ฉ”๋‰ด(3๋‹จ๊ณ„ ์ด์ƒ)๋Š” ๊ฐ€๊ธ‰์  ํ”ผํ•˜์„ธ์š”. UI๊ฐ€ ๋ณต์žกํ•ด์ง€๊ณ  ์‚ฌ์šฉ์„ฑ์ด ๋–จ์–ด์ง‘๋‹ˆ๋‹ค.
59
+ * - **๊ธด ๋ฉ”๋‰ด ๋ช…์นญ**: ์‚ฌ์ด๋“œ๋ฐ” ๋„ˆ๋น„๊ฐ€ ์ œํ•œ์ ์ด๋ฏ€๋กœ ๋ฉ”๋‰ด ์ด๋ฆ„์€ ์งง๊ณ  ๋ช…ํ™•ํ•˜๊ฒŒ(๊ฐ€๊ธ‰์  10์ž ์ด๋‚ด) ์ž‘์„ฑํ•˜์„ธ์š”.
60
+ *
61
+ * ## Accessibility
62
+ *
63
+ * - **Accordion Support**: ์„œ๋ธŒ๋ฉ”๋‰ด ์ƒํƒœ๋ฅผ ์Šคํฌ๋ฆฐ ๋ฆฌ๋”์—์„œ 'ํŽผ์ณ์ง/์ ‘ํž˜'์œผ๋กœ ์ธ์‹ํ•ฉ๋‹ˆ๋‹ค.
64
+ * - **Keyboard Interaction**: `Tab` ํ‚ค๋กœ ๋ฉ”๋‰ด๋ฅผ ์ด๋™ํ•˜๊ณ , `Enter`๋‚˜ `Space`๋กœ ๋ฉ”๋‰ด๋ฅผ ์—ด๊ฑฐ๋‚˜ ์ด๋™ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
65
+ *
66
+ * ## Example
67
+ *
68
+ * {@tool snippet}
69
+ * ์„œ๋ธŒ๋ฉ”๋‰ด๋ฅผ ํฌํ•จํ•œ ์‚ฌ์ด๋“œ ๋„ค๋น„๊ฒŒ์ด์…˜:
70
+ *
71
+ * ```tsx
72
+ * const menus = [
73
+ * { url: '/dashboard', title: 'ํ™ˆ', icon: <HomeIcon /> },
74
+ * {
75
+ * url: '/contents',
76
+ * title: '์ฝ˜ํ…์ธ  ๊ด€๋ฆฌ',
77
+ * icon: <FileTextIcon />,
78
+ * subMenu: [
79
+ * { url: '/contents/posts', title: '๊ฒŒ์‹œ๊ธ€ ๋ชฉ๋ก' },
80
+ * { url: '/contents/comments', title: '๋Œ“๊ธ€ ๊ด€๋ฆฌ' },
81
+ * ]
82
+ * },
83
+ * ];
84
+ *
85
+ * <SideNavigation
86
+ * menus={menus}
87
+ * selectedUrl="/contents/posts"
88
+ * onMenuClick={(url) => navigate(url)}
89
+ * />
90
+ * ```
91
+ * {@end-tool}
92
+ *
93
+ * See also:
94
+ *
95
+ * - {@link Button}, ๋‹จ์ˆœ ์•ก์…˜ ์‹คํ–‰์„ ์œ„ํ•œ ์š”์†Œ
96
+ * - {@link Popover}, ํด๋ฆญ ์‹œ ์ผ์‹œ์ ์œผ๋กœ ๋‚˜ํƒ€๋‚˜๋Š” ์ถ”๊ฐ€ ๋ฉ”๋‰ด๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ
97
+ *
98
+ * ## ์ฐธ๊ณ ์‚ฌ์ง„
99
+ * ![](https://github.com/AlmSmartDoctor/ccds-screenshots/blob/main/screenshots/Navigation/SideNavigation/For%20Jsdoc.png?raw=true)
100
+ */
101
+ export declare const SideNavigation: React.ForwardRefExoticComponent<SideNavigationProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './SideNavigation';
@@ -0,0 +1,74 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+
4
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
5
+ declare const switchVariants: (props?: ({
6
+ variant?: "default" | "green" | "black" | "blue" | "red" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, VariantProps<typeof switchVariants> {
9
+ }
10
+ /**
11
+ * ๋‘ ๊ฐ€์ง€ ์ƒ๋ฐ˜๋œ ์ƒํƒœ(On/Off, ํ™œ์„ฑ/๋น„ํ™œ์„ฑ)๋ฅผ ์ฆ‰๊ฐ์ ์œผ๋กœ ์ „ํ™˜ํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
12
+ *
13
+ * {@link Switch}๋Š” ์‹ค์ œ ์ „๋“ฑ ์Šค์œ„์น˜์™€ ๊ฐ™์€ ์ง๊ด€์ ์ธ ์‹œ๊ฐ์  ๋ชจ๋ธ์„ ์ œ๊ณตํ•˜๋ฉฐ,
14
+ * ์ฒดํฌ๋ฐ•์Šค๋ณด๋‹ค ๋” '์ฆ‰๊ฐ์ ์ธ ๋ฐ˜์˜'์˜ ์˜๋ฏธ๋ฅผ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
15
+ *
16
+ * Radix UI์˜ Switch ์ปดํฌ๋„ŒํŠธ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌํ˜„๋˜์–ด ์ ‘๊ทผ์„ฑ๊ณผ ์• ๋‹ˆ๋ฉ”์ด์…˜์ด
17
+ * ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
18
+ *
19
+ * ## When (์–ธ์ œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๊ฐ€)
20
+ *
21
+ * **์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
22
+ * - **์ฆ‰๊ฐ์  ์„ค์ • ๋ฐ˜์˜**: ํด๋ฆญ ์ฆ‰์‹œ ์‹œ์Šคํ…œ ์„ค์ •์ด ๋ณ€๊ฒฝ๋˜๊ฑฐ๋‚˜ ์ €์žฅ๋˜์–ด์•ผ ํ•  ๋•Œ (์˜ˆ: ๋‹คํฌ๋ชจ๋“œ ์ผœ๊ธฐ, ์•Œ๋ฆผ ์ˆ˜์‹  ๋™์˜)
23
+ * - **์ƒํƒœ ์ „ํ™˜**: ํŠน์ • ๊ธฐ๋Šฅ์˜ ์‚ฌ์šฉ ์—ฌ๋ถ€๋ฅผ ๊ฒฐ์ •ํ•  ๋•Œ
24
+ * - **๋‹จ์ˆœ ํ† ๊ธ€**: ๋ณต์žกํ•œ ์ž…๋ ฅ ์—†์ด ์ผœ๊ณ  ๋„๋Š” ํ–‰์œ„๋งŒ ํ•„์š”ํ•  ๋•Œ
25
+ *
26
+ * **์‚ฌ์šฉํ•˜์ง€ ๋ง์•„์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
27
+ * - **์ œ์ถœ ๋ฒ„ํŠผ ํ•„์š”**: ์—ฌ๋Ÿฌ ์ •๋ณด๋ฅผ ์ž…๋ ฅํ•˜๊ณ  'ํ™•์ธ' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ์•ผ ๊ฒฐ๊ณผ๊ฐ€ ๋ฐ˜์˜๋˜๋Š” ํผ ๋‚ด์—์„œ๋Š” `Checkbox`๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.
28
+ * - **๋‹ค์ค‘ ์„ ํƒ**: ์—ฌ๋Ÿฌ ํ•ญ๋ชฉ ์ค‘ ์ผ๋ถ€๋ฅผ ๊ณจ๋ผ์•ผ ํ•  ๋•Œ๋„ `Checkbox`๊ฐ€ ๋” ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.
29
+ *
30
+ * ## Layout behavior
31
+ *
32
+ * - **Inline Component**: ์ฃผ๋ณ€ ํ…์ŠคํŠธ๋‚˜ ๋‹ค๋ฅธ ์š”์†Œ์™€ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์–ด์šฐ๋Ÿฌ์ง€๋Š” ์ธ๋ผ์ธ ๋ธ”๋ก ํ˜•ํƒœ์ž…๋‹ˆ๋‹ค.
33
+ * - **Thumb Animation**: ํด๋ฆญ ์‹œ ์Šค์œ„์น˜์˜ '์†์žก์ด(Thumb)'๊ฐ€ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ์ขŒ์šฐ๋กœ ์ด๋™ํ•˜๋ฉฐ ์ƒํƒœ ๋ณ€ํ™”๋ฅผ ์‹œ๊ฐํ™”ํ•ฉ๋‹ˆ๋‹ค.
34
+ *
35
+ * ## Usage guidelines
36
+ *
37
+ * ### โœ… Do (๊ถŒ์žฅ ์‚ฌํ•ญ)
38
+ *
39
+ * - **๋ช…ํ™•ํ•œ ํ˜„์žฌ ์ƒํƒœ ํ‘œ์‹œ**: ์ƒ‰์ƒ ๋ณ€ํ™”(ํšŒ์ƒ‰ vs ์ƒ‰์ƒ)๋ฅผ ํ†ตํ•ด ์ผœ์ ธ ์žˆ๋Š”์ง€ ๊บผ์ ธ ์žˆ๋Š”์ง€ ํ•œ๋ˆˆ์— ์•Œ ์ˆ˜ ์žˆ๊ฒŒ ํ•˜์„ธ์š”.
40
+ * - **๋ ˆ์ด๋ธ”๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉ**: ์Šค์œ„์น˜ ์˜†์— ๋ฌด์—‡์„ ์ œ์–ดํ•˜๋Š”์ง€ ์„ค๋ช…ํ•˜๋Š” ํ…์ŠคํŠธ๋ฅผ ๋ฐ˜๋“œ์‹œ ๋ฐฐ์น˜ํ•˜์„ธ์š”.
41
+ *
42
+ * ### ๐Ÿšซ Don't (์ฃผ์˜/๊ธˆ์ง€ ์‚ฌํ•ญ)
43
+ *
44
+ * - **๋ชจํ˜ธํ•œ ์˜๋ฏธ**: ์ƒํƒœ ์ „ํ™˜ ํ›„์— ์–ด๋–ค ๋ณ€ํ™”๊ฐ€ ์ƒ๊ธธ์ง€ ๋ช…ํ™•ํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ์—๋Š” ์‚ฌ์šฉ์„ ์ง€์–‘ํ•˜์„ธ์š”.
45
+ * - **๊ธด ๋Œ€๊ธฐ ์‹œ๊ฐ„**: ์„œ๋ฒ„ ํ†ต์‹  ๋“ฑ์œผ๋กœ ์ธํ•ด ์ƒํƒœ ๋ฐ˜์˜์— ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฌ๋Š” ๊ฒฝ์šฐ, ๋กœ๋”ฉ ์ธ๋””์ผ€์ดํ„ฐ๋ฅผ ํ•จ๊ป˜ ๋ณด์—ฌ์ฃผ๊ฑฐ๋‚˜ ์ฆ‰์‹œ ๋ฐ˜์‘์„ ์šฐ์„  ์ฒ˜๋ฆฌํ•˜์„ธ์š”.
46
+ *
47
+ * ## Accessibility
48
+ *
49
+ * - **Keyboard Support**: `Space` ํ‚ค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ƒํƒœ๋ฅผ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
50
+ * - **Roles**: `role="switch"` ์†์„ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ์Šคํฌ๋ฆฐ ๋ฆฌ๋”์—์„œ ํ† ๊ธ€ ์ƒํƒœ๋ฅผ ์ฝ์–ด์ค๋‹ˆ๋‹ค.
51
+ *
52
+ * ## Example
53
+ *
54
+ * {@tool snippet}
55
+ * ๋ ˆ์ด๋ธ”๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋Š” ๊ธฐ๋ณธ์ ์ธ ์Šค์œ„์น˜:
56
+ *
57
+ * ```tsx
58
+ * <div className="flex items-center gap-2">
59
+ * <Switch id="airplane-mode" />
60
+ * <label htmlFor="airplane-mode">๋น„ํ–‰๊ธฐ ๋ชจ๋“œ</label>
61
+ * </div>
62
+ * ```
63
+ * {@end-tool}
64
+ *
65
+ * See also:
66
+ *
67
+ * - {@link Checkbox}, ์ œ์ถœ ์ „๊นŒ์ง€ ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ
68
+ * - {@link RadioButton}, ์—ฌ๋Ÿฌ ์„ ํƒ์ง€ ์ค‘ ํ•˜๋‚˜๋ฅผ ๊ณ ๋ฅด๋Š” ๊ฒฝ์šฐ
69
+ *
70
+ * ## ์ฐธ๊ณ ์‚ฌ์ง„
71
+ * ![](https://github.com/AlmSmartDoctor/ccds-screenshots/blob/main/screenshots/Forms/Switch/For%20Jsdoc.png?raw=true)
72
+ */
73
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
74
+ export { Switch };
@@ -0,0 +1 @@
1
+ export * from './Switch';
@@ -0,0 +1,195 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+
4
+ declare const tableVariants: (props?: ({
5
+ bordered?: boolean | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
8
+ /** zebra stripe ํŒจํ„ด ์ ์šฉ ์—ฌ๋ถ€ */
9
+ striped?: boolean;
10
+ /** row hover ํšจ๊ณผ ์ ์šฉ ์—ฌ๋ถ€ */
11
+ hoverable?: boolean;
12
+ /** ํ…Œ๋‘๋ฆฌ ํ‘œ์‹œ ์—ฌ๋ถ€ */
13
+ bordered?: boolean;
14
+ /** ์ข์€ padding ์ ์šฉ ์—ฌ๋ถ€ */
15
+ compact?: boolean;
16
+ }
17
+ /**
18
+ * ๋ฐ์ดํ„ฐ๋ฅผ ํ–‰๊ณผ ์—ด๋กœ ๊ตฌ์กฐํ™”ํ•˜์—ฌ ํ‘œ์‹œํ•˜๋Š” ํ…Œ์ด๋ธ” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
19
+ *
20
+ * {@link Table}์€ Compound Component ํŒจํ„ด์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ตฌ์„ฑ๋˜๋ฉฐ,
21
+ * TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption
22
+ * ๋“ฑ์˜ ํ•˜์œ„ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์กฐํ•ฉํ•˜์—ฌ ์œ ์—ฐํ•œ ํ…Œ์ด๋ธ” ๋ ˆ์ด์•„์›ƒ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
23
+ *
24
+ * ## When (์–ธ์ œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๊ฐ€)
25
+ *
26
+ * **์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
27
+ * - **๋ฐ์ดํ„ฐ ๋ชฉ๋ก**: ์‚ฌ์šฉ์ž ๋ชฉ๋ก, ์ฃผ๋ฌธ ๋‚ด์—ญ, ์ œํ’ˆ ๋ฆฌ์ŠคํŠธ ๋“ฑ ๊ตฌ์กฐํ™”๋œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•  ๋•Œ
28
+ * - **๋น„๊ต**: ์—ฌ๋Ÿฌ ํ•ญ๋ชฉ์˜ ์†์„ฑ์„ ๋‚˜๋ž€ํžˆ ๋น„๊ตํ•ด์•ผ ํ•  ๋•Œ
29
+ * - **์ •๋ ฌ ๋ฐ ํ•„ํ„ฐ**: ๋ฐ์ดํ„ฐ๋ฅผ ์ •๋ ฌํ•˜๊ฑฐ๋‚˜ ํ•„ํ„ฐ๋งํ•ด์„œ ๋ณด์—ฌ์ค„ ๋•Œ
30
+ * - **๋Œ€๋Ÿ‰ ๋ฐ์ดํ„ฐ**: ๋งŽ์€ ์–‘์˜ ์ •๋ณด๋ฅผ ์กฐ์ง์ ์œผ๋กœ ํ‘œ์‹œํ•ด์•ผ ํ•  ๋•Œ
31
+ *
32
+ * **์‚ฌ์šฉํ•˜์ง€ ๋ง์•„์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
33
+ * - **๋ ˆ์ด์•„์›ƒ ๋ชฉ์ **: ๋‹จ์ˆœํžˆ ๋ ˆ์ด์•„์›ƒ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด์„œ๋Š” CSS Grid๋‚˜ Flexbox๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.
34
+ * - **์†Œ๋Ÿ‰ ๋ฐ์ดํ„ฐ**: 2-3๊ฐœ์˜ ๊ฐ„๋‹จํ•œ ์ •๋ณด๋Š” ๋ฆฌ์ŠคํŠธ๋‚˜ ์นด๋“œ ํ˜•ํƒœ๊ฐ€ ๋” ์ ํ•ฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
35
+ * - **๋ณต์žกํ•œ ์ธํ„ฐ๋ž™์…˜**: ๊ฐ ํ–‰๋งˆ๋‹ค ๋งŽ์€ ๋ฒ„ํŠผ์ด๋‚˜ ์ž…๋ ฅ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ์นด๋“œ ๋ ˆ์ด์•„์›ƒ์„ ๊ณ ๋ คํ•˜์„ธ์š”.
36
+ *
37
+ * ## Layout behavior
38
+ *
39
+ * - **Responsive**: ๊ธฐ๋ณธ์ ์œผ๋กœ ์Šคํฌ๋กค ๊ฐ€๋Šฅํ•œ ์ปจํ…Œ์ด๋„ˆ๋กœ ๋ž˜ํ•‘๋˜์–ด ๋ชจ๋ฐ”์ผ์—์„œ๋„ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
40
+ * - **Full Width**: ๋ถ€๋ชจ ์ปจํ…Œ์ด๋„ˆ์˜ ์ „์ฒด ๋„ˆ๋น„๋ฅผ ์ฐจ์ง€ํ•ฉ๋‹ˆ๋‹ค.
41
+ * - **Auto Height**: ๋‚ด์šฉ์— ๋”ฐ๋ผ ๋†’์ด๊ฐ€ ์ž๋™์œผ๋กœ ์กฐ์ •๋ฉ๋‹ˆ๋‹ค.
42
+ *
43
+ * ## Usage guidelines
44
+ *
45
+ * ### โœ… Do (๊ถŒ์žฅ ์‚ฌํ•ญ)
46
+ *
47
+ * - **๋ช…ํ™•ํ•œ ํ—ค๋”**: TableHead๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ ์—ด์˜ ์˜๋ฏธ๋ฅผ ๋ช…ํ™•ํžˆ ํ‘œ์‹œํ•˜์„ธ์š”.
48
+ * - **์ผ๊ด€๋œ ์ •๋ ฌ**: ์ˆซ์ž๋Š” ์˜ค๋ฅธ์ชฝ, ํ…์ŠคํŠธ๋Š” ์™ผ์ชฝ ์ •๋ ฌํ•˜๋Š” ๊ฒƒ์ด ์ผ๋ฐ˜์ ์ž…๋‹ˆ๋‹ค.
49
+ * - **์ ์ ˆํ•œ variant**: ๋ฐ์ดํ„ฐ๊ฐ€ ๋งŽ์„ ๋•Œ๋Š” `striped`๋‚˜ `hoverable`์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ€๋…์„ฑ์„ ๋†’์ด์„ธ์š”.
50
+ * - **Caption ํ™œ์šฉ**: ํ…Œ์ด๋ธ”์˜ ๋ชฉ์ ์„ ์„ค๋ช…ํ•˜๋Š” caption์„ ์ถ”๊ฐ€ํ•˜๋ฉด ์ ‘๊ทผ์„ฑ์ด ํ–ฅ์ƒ๋ฉ๋‹ˆ๋‹ค.
51
+ *
52
+ * ### ๐Ÿšซ Don't (์ฃผ์˜/๊ธˆ์ง€ ์‚ฌํ•ญ)
53
+ *
54
+ * - **๊ณผ๋„ํ•œ ์—ด**: ๋„ˆ๋ฌด ๋งŽ์€ ์—ด์€ ๊ฐ€๋…์„ฑ์„ ํ•ด์นฉ๋‹ˆ๋‹ค. ์ค‘์š”ํ•œ ์ •๋ณด๋งŒ ํ‘œ์‹œํ•˜์„ธ์š”.
55
+ * - **์ค‘์ฒฉ ํ…Œ์ด๋ธ”**: ํ…Œ์ด๋ธ” ์•ˆ์— ํ…Œ์ด๋ธ”์„ ๋„ฃ์ง€ ๋งˆ์„ธ์š”. ๋ณต์žก๋„๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์ฆ๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
56
+ * - **๋นˆ ์…€ ๋‚จ์šฉ**: ๋นˆ ์…€์ด ๋งŽ์œผ๋ฉด ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋ฅผ ๋‹ค์‹œ ๊ฒ€ํ† ํ•˜์„ธ์š”.
57
+ *
58
+ * ## Accessibility
59
+ *
60
+ * - **Semantic HTML**: ์ ์ ˆํ•œ `<table>`, `<thead>`, `<tbody>`, `<th>`, `<td>` ํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
61
+ * - **Scope Attribute**: TableHead๋Š” `scope="col"`์„ ์ž๋™์œผ๋กœ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
62
+ * - **ARIA Attributes**: ์ •๋ ฌ, ์„ ํƒ ๋“ฑ์˜ ์ƒํƒœ๋Š” `aria-sort`, `aria-selected`๋กœ ํ‘œํ˜„๋ฉ๋‹ˆ๋‹ค.
63
+ * - **Caption**: ํ…Œ์ด๋ธ”์˜ ๋ชฉ์ ์„ ์„ค๋ช…ํ•˜๋Š” `<caption>`์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
64
+ *
65
+ * ## Example
66
+ *
67
+ * {@tool snippet}
68
+ * ๊ธฐ๋ณธ ํ…Œ์ด๋ธ” ์‚ฌ์šฉ:
69
+ *
70
+ * ```tsx
71
+ * <Table>
72
+ * <TableCaption>์‚ฌ์šฉ์ž ๋ชฉ๋ก</TableCaption>
73
+ * <TableHeader>
74
+ * <TableRow>
75
+ * <TableHead>์ด๋ฆ„</TableHead>
76
+ * <TableHead>์ด๋ฉ”์ผ</TableHead>
77
+ * <TableHead align="right">์—ญํ• </TableHead>
78
+ * </TableRow>
79
+ * </TableHeader>
80
+ * <TableBody>
81
+ * <TableRow>
82
+ * <TableCell>ํ™๊ธธ๋™</TableCell>
83
+ * <TableCell>hong@example.com</TableCell>
84
+ * <TableCell align="right">๊ด€๋ฆฌ์ž</TableCell>
85
+ * </TableRow>
86
+ * </TableBody>
87
+ * </Table>
88
+ * ```
89
+ *
90
+ * Striped ํ…Œ์ด๋ธ”:
91
+ *
92
+ * ```tsx
93
+ * <Table striped hoverable>
94
+ * <TableHeader>
95
+ * <TableRow>
96
+ * <TableHead>์ œํ’ˆ๋ช…</TableHead>
97
+ * <TableHead align="right">๊ฐ€๊ฒฉ</TableHead>
98
+ * </TableRow>
99
+ * </TableHeader>
100
+ * <TableBody>
101
+ * {products.map((product) => (
102
+ * <TableRow key={product.id}>
103
+ * <TableCell>{product.name}</TableCell>
104
+ * <TableCell align="right">{product.price}</TableCell>
105
+ * </TableRow>
106
+ * ))}
107
+ * </TableBody>
108
+ * </Table>
109
+ * ```
110
+ * {@end-tool}
111
+ *
112
+ * ## ์ฐธ๊ณ ์‚ฌ์ง„
113
+ * ![](https://github.com/AlmSmartDoctor/ccds-screenshots/blob/main/screenshots/Data Display/Table/For%20Jsdoc.png?raw=true)
114
+ */
115
+ export declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
116
+ export interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
117
+ }
118
+ /**
119
+ * ํ…Œ์ด๋ธ”์˜ ํ—ค๋” ์„น์…˜์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
120
+ *
121
+ * `<thead>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, ๋ณดํ†ต `TableRow`์™€ `TableHead`๋ฅผ ํฌํ•จํ•˜์—ฌ
122
+ * ์—ด์˜ ์ œ๋ชฉ์„ ํ‘œ์‹œํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
123
+ */
124
+ export declare const TableHeader: React.ForwardRefExoticComponent<TableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
125
+ export interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
126
+ }
127
+ /**
128
+ * ํ…Œ์ด๋ธ”์˜ ๋ณธ๋ฌธ ์„น์…˜์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
129
+ *
130
+ * `<tbody>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, ์‹ค์ œ ๋ฐ์ดํ„ฐ๊ฐ€ ํฌํ•จ๋œ `TableRow`์™€ `TableCell`์„
131
+ * ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
132
+ */
133
+ export declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
134
+ export interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
135
+ }
136
+ /**
137
+ * ํ…Œ์ด๋ธ”์˜ ํ‘ธํ„ฐ ์„น์…˜์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
138
+ *
139
+ * `<tfoot>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, ํ•ฉ๊ณ„๋‚˜ ์š”์•ฝ ์ •๋ณด๋ฅผ ํ‘œ์‹œํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
140
+ */
141
+ export declare const TableFooter: React.ForwardRefExoticComponent<TableFooterProps & React.RefAttributes<HTMLTableSectionElement>>;
142
+ declare const tableRowVariants: (props?: ({
143
+ hoverable?: boolean | null | undefined;
144
+ selected?: boolean | null | undefined;
145
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
146
+ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>, VariantProps<typeof tableRowVariants> {
147
+ /** ์„ ํƒ๋œ ํ–‰ ํ‘œ์‹œ ์—ฌ๋ถ€ */
148
+ selected?: boolean;
149
+ }
150
+ /**
151
+ * ํ…Œ์ด๋ธ”์˜ ํ–‰(Row)์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
152
+ *
153
+ * `<tr>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, `hoverable`์ด๋‚˜ `striped` ์†์„ฑ์ด `Table` ์ปดํฌ๋„ŒํŠธ์—
154
+ * ์ ์šฉ๋˜์—ˆ์„ ๋•Œ ์ด์— ๋”ฐ๋ฅธ ์Šคํƒ€์ผ์„ ์ž๋™์œผ๋กœ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
155
+ */
156
+ export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
157
+ export interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
158
+ /** ์ •๋ ฌ ๊ฐ€๋Šฅ ์—ฌ๋ถ€ */
159
+ sortable?: boolean;
160
+ /** ์ •๋ ฌ ๋ฐฉํ–ฅ */
161
+ sortDirection?: "asc" | "desc" | null;
162
+ /** ์ •๋ ฌ ํด๋ฆญ ํ•ธ๋“ค๋Ÿฌ */
163
+ onSort?: () => void;
164
+ }
165
+ /**
166
+ * ํ…Œ์ด๋ธ”์˜ ํ—ค๋” ์…€์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
167
+ *
168
+ * `<th>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, ์—ด์˜ ์ œ๋ชฉ์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
169
+ * ์ •๋ ฌ ๊ธฐ๋Šฅ(`sortable`)์„ ์ง€์›ํ•˜๋ฉฐ, ์ •๋ ฌ ๋ฐฉํ–ฅ์— ๋”ฐ๋ผ ์•„์ด์ฝ˜์„ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
170
+ */
171
+ export declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
172
+ declare const tableCellVariants: (props?: ({
173
+ align?: "center" | "right" | "left" | null | undefined;
174
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
175
+ export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, VariantProps<typeof tableCellVariants> {
176
+ /** ํ…์ŠคํŠธ ์ •๋ ฌ ๋ฐฉ์‹ */
177
+ align?: "left" | "center" | "right";
178
+ }
179
+ /**
180
+ * ํ…Œ์ด๋ธ”์˜ ๋ฐ์ดํ„ฐ ์…€์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
181
+ *
182
+ * `<td>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, ์‹ค์ œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
183
+ * ํ…์ŠคํŠธ ์ •๋ ฌ(`align`)์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
184
+ */
185
+ export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
186
+ export interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
187
+ }
188
+ /**
189
+ * ํ…Œ์ด๋ธ”์˜ ์บก์…˜(์„ค๋ช…)์„ ์ •์˜ํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
190
+ *
191
+ * `<caption>` ํƒœ๊ทธ๋ฅผ ๋ Œ๋”๋งํ•˜๋ฉฐ, ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž์—๊ฒŒ ํ…Œ์ด๋ธ”์˜ ๋ชฉ์ ์„
192
+ * ์„ค๋ช…ํ•˜๋Š” ๋ฐ ์ค‘์š”ํ•œ ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค.
193
+ */
194
+ export declare const TableCaption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
195
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, } from './Table';
2
+ export type { TableProps, TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeadProps, TableCellProps, TableCaptionProps, } from './Table';
@@ -0,0 +1,121 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+
4
+ declare const tagInputContainerVariants: (props?: ({
5
+ readOnly?: boolean | null | undefined;
6
+ layout?: "row" | "column" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export interface TagInputProps extends Omit<VariantProps<typeof tagInputContainerVariants>, "readOnly"> {
9
+ label?: string;
10
+ required?: boolean;
11
+ maxTags?: number;
12
+ placeholder?: string;
13
+ value?: string[];
14
+ onChange?: (tags: string[]) => void;
15
+ readOnly?: boolean;
16
+ noLimit?: boolean;
17
+ validateTag?: (tag: string, currentTags: string[]) => boolean | string | undefined;
18
+ className?: string;
19
+ id?: string;
20
+ labelLayout?: "vertical" | "horizontal";
21
+ labelWidth?: string;
22
+ }
23
+ /**
24
+ * ์‚ฌ์šฉ์ž๊ฐ€ ํ…์ŠคํŠธ๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํƒœ๊ทธ(ํ‚ค์›Œ๋“œ) ๋ชฉ๋ก์„ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
25
+ *
26
+ * {@link TagInput}์€ ์ž…๋ ฅ์ฐฝ ๋‚ด๋ถ€์— ์‹œ๊ฐ์ ์ธ ํƒœ๊ทธ๋ฅผ ํ‘œ์‹œํ•˜๋ฉฐ,
27
+ * ์—”ํ„ฐ(Enter) ํ‚ค๋ฅผ ํ†ตํ•ด ์ƒˆ๋กœ์šด ํƒœ๊ทธ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  'x' ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ๊ธฐ์กด ํƒœ๊ทธ๋ฅผ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
28
+ * ์ฃผ๋กœ ๊ฒŒ์‹œ๊ธ€์˜ ํƒœ๊ทธ, ๊ฒ€์ƒ‰ ํ•„ํ„ฐ ์กฐ๊ฑด, ์ˆ˜์‹ ์ž ๋ชฉ๋ก ๋“ฑ์„ ์ž…๋ ฅ๋ฐ›์„ ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
29
+ *
30
+ * ## When (์–ธ์ œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๊ฐ€)
31
+ *
32
+ * **์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
33
+ * - **ํ‚ค์›Œ๋“œ ์ž…๋ ฅ**: ๊ฒŒ์‹œ๊ธ€์˜ ํ•ด์‹œํƒœ๊ทธ๋‚˜ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ์ž…๋ ฅ๋ฐ›์„ ๋•Œ
34
+ * - **๋‹ค์ค‘ ํ•ญ๋ชฉ ์ˆ˜์ง‘**: ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ด๋ฉ”์ผ ์ฃผ์†Œ๋‚˜ ์‚ฌ์šฉ์ž ์•„์ด๋””๋ฅผ ํ•œ๊บผ๋ฒˆ์— ์ž…๋ ฅ๋ฐ›์•„์•ผ ํ•  ๋•Œ
35
+ * - **์ œํ•œ๋œ ๊ฐœ์ˆ˜์˜ ํ•ญ๋ชฉ ์„ ํƒ**: ์ตœ๋Œ€ N๊ฐœ๊นŒ์ง€์˜ ์กฐ๊ฑด์„ ์ž…๋ ฅ๋ฐ›์•„์•ผ ํ•  ๋•Œ (`maxTags` ํ™œ์šฉ)
36
+ *
37
+ * **์‚ฌ์šฉํ•˜์ง€ ๋ง์•„์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
38
+ * - **๋‹จ์ผ ํ…์ŠคํŠธ ์ž…๋ ฅ**: ํ•˜๋‚˜์˜ ๊ฐ’๋งŒ ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์ผ๋ฐ˜ `TextInput`์„ ์‚ฌ์šฉํ•˜์„ธ์š”.
39
+ * - **๋ฏธ๋ฆฌ ์ •์˜๋œ ์˜ต์…˜**: ๊ณ ์ •๋œ ๋ชฉ๋ก์—์„œ๋งŒ ์„ ํƒํ•ด์•ผ ํ•œ๋‹ค๋ฉด `Dropdown`์ด๋‚˜ `Combobox`๊ฐ€ ๋” ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.
40
+ *
41
+ * ## Layout behavior
42
+ *
43
+ * - **Flow Layout**: ํƒœ๊ทธ๋“ค์€ ๊ฐ€๋กœ ๋ฐฉํ–ฅ์œผ๋กœ ๋‚˜์—ด๋˜๋ฉฐ, ๊ณต๊ฐ„์ด ๋ถ€์กฑํ•˜๋ฉด ์ž๋™์œผ๋กœ ๋‹ค์Œ ์ค„๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค (`layout="row"`).
44
+ * - **Column Layout**: ํƒœ๊ทธ๋“ค์„ ์ˆ˜์ง์œผ๋กœ ์Œ“๊ณ  ์‹ถ์„ ๊ฒฝ์šฐ `layout="column"` ์„ค์ •์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
45
+ * - **Constraint**: `maxTags`์— ๋„๋‹ฌํ•˜๋ฉด ์ถ”๊ฐ€ ์ž…๋ ฅ์ด ์ฐจ๋‹จ๋˜๋ฉฐ ์‹œ๊ฐ์ ์œผ๋กœ ์•ˆ๋‚ด๋ฉ๋‹ˆ๋‹ค.
46
+ *
47
+ * ๋ ˆ์ด๋ธ” ๋ฐฐ์น˜๋Š” `labelLayout` prop์œผ๋กœ ์ œ์–ด๋ฉ๋‹ˆ๋‹ค:
48
+ * - **vertical** (๊ธฐ๋ณธ๊ฐ’): Label์ด ํƒœ๊ทธ ์ž…๋ ฅ ํ•„๋“œ ์œ„์— ์„ธ๋กœ๋กœ ๋ฐฐ์น˜๋ฉ๋‹ˆ๋‹ค.
49
+ * - **horizontal**: Label๊ณผ ํƒœ๊ทธ ์ž…๋ ฅ ํ•„๋“œ๊ฐ€ ๊ฐ€๋กœ๋กœ ๋‚˜๋ž€ํžˆ ๋ฐฐ์น˜๋ฉ๋‹ˆ๋‹ค. `labelWidth`๋กœ Label ๋„ˆ๋น„๋ฅผ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค (๊ธฐ๋ณธ๊ฐ’: 120px).
50
+ *
51
+ * ## Usage guidelines
52
+ *
53
+ * ### โœ… Do (๊ถŒ์žฅ ์‚ฌํ•ญ)
54
+ *
55
+ * - **์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ํ™œ์šฉ**: `validateTag`๋ฅผ ํ†ตํ•ด ์ด๋ฉ”์ผ ํ˜•์‹ ํ™•์ธ์ด๋‚˜ ๊ธ€์ž ์ˆ˜ ์ œํ•œ ๋“ฑ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ์ ์šฉํ•˜์„ธ์š”.
56
+ * - **์ค‘๋ณต ๋ฐฉ์ง€**: ๋™์ผํ•œ ํƒœ๊ทธ๊ฐ€ ์ž…๋ ฅ๋˜์ง€ ์•Š๋„๋ก ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌ๋˜์ง€๋งŒ, ํ•„์š”์— ๋”ฐ๋ผ ์‚ฌ์šฉ์ž์—๊ฒŒ ์•Œ๋ฆผ์„ ์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
57
+ * - **๊ฐ€๋กœ ๋ฐฐ์น˜ ํ™œ์šฉ**: ํผ์—์„œ ์—ฌ๋Ÿฌ ์ž…๋ ฅ ํ•„๋“œ๋ฅผ ์ •๋ ฌํ•  ๋•Œ๋Š” `labelLayout="horizontal"`์„ ์‚ฌ์šฉํ•˜์—ฌ ์ผ๊ด€๋œ ๋ ˆ์ด์•„์›ƒ์„ ์œ ์ง€ํ•˜์„ธ์š”.
58
+ *
59
+ * ### ๐Ÿšซ Don't (์ฃผ์˜/๊ธˆ์ง€ ์‚ฌํ•ญ)
60
+ *
61
+ * - **๋„ˆ๋ฌด ๊ธด ํƒœ๊ทธ**: ํƒœ๊ทธ ํ•˜๋‚˜์— ๋„ˆ๋ฌด ๊ธด ๋ฌธ์žฅ์ด ๋“ค์–ด๊ฐ€๋Š” ๊ฒƒ์€ ํ”ผํ•˜์„ธ์š”. ๊ฐ€๊ธ‰์  ๋‹จ์–ด๋‚˜ ์งง์€ ๊ตฌ๋ฌธ์œผ๋กœ ์ œํ•œํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
62
+ * - **๋ณต์žกํ•œ ์ธํ„ฐํŽ˜์ด์Šค**: ํƒœ๊ทธ ๋‚ด๋ถ€์— ๋„ˆ๋ฌด ๋งŽ์€ ๊ธฐ๋Šฅ์„ ๋„ฃ์ง€ ๋งˆ์„ธ์š”. ํƒœ๊ทธ๋Š” ๊ฐ€๋ณ๊ณ  ๋น ๋ฅด๊ฒŒ ํ›‘์–ด๋ณผ ์ˆ˜ ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
63
+ *
64
+ * ## Accessibility
65
+ *
66
+ * - **Keyboard Management**: `Enter`๋กœ ์ถ”๊ฐ€, `Backspace`(๊ตฌํ˜„ ์˜ˆ์ •) ๋˜๋Š” 'x' ๋ฒ„ํŠผ ํด๋ฆญ์œผ๋กœ ์‚ญ์ œ๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
67
+ * - **Screen Reader**: ์ถ”๊ฐ€๋œ ๊ฐ ํƒœ๊ทธ์˜ ๋‚ด์šฉ๊ณผ ์‚ญ์ œ ๋ฒ„ํŠผ์˜ ์—ญํ• ์„ ์Œ์„ฑ์œผ๋กœ ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค.
68
+ *
69
+ * ## Example
70
+ *
71
+ * {@tool snippet}
72
+ * ๊ธฐ๋ณธ์ ์ธ ํƒœ๊ทธ ์ž…๋ ฅ ์˜ˆ์‹œ:
73
+ *
74
+ * ```tsx
75
+ * <TagInput
76
+ * label="๊ฒŒ์‹œ๊ธ€ ํƒœ๊ทธ"
77
+ * maxTags={5}
78
+ * placeholder="ํƒœ๊ทธ ์ž…๋ ฅ ํ›„ Enter"
79
+ * value={['React', 'Next.js']}
80
+ * onChange={(tags) => console.log(tags)}
81
+ * />
82
+ * ```
83
+ * {@end-tool}
84
+ *
85
+ * {@tool snippet}
86
+ * ์ปค์Šคํ…€ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๊ฐ€ ํฌํ•จ๋œ ํƒœ๊ทธ ์ž…๋ ฅ:
87
+ *
88
+ * ```tsx
89
+ * <TagInput
90
+ * validateTag={(tag) => {
91
+ * if (tag.length < 2) return "ํƒœ๊ทธ๋Š” 2๊ธ€์ž ์ด์ƒ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.";
92
+ * return true;
93
+ * }}
94
+ * />
95
+ * ```
96
+ * {@end-tool}
97
+ *
98
+ * {@tool snippet}
99
+ * ๊ฐ€๋กœ ๋ฐฐ์น˜ ๋ ˆ์ด์•„์›ƒ:
100
+ *
101
+ * ```tsx
102
+ * <TagInput
103
+ * label="ํ‚ค์›Œ๋“œ"
104
+ * required={true}
105
+ * labelLayout="horizontal"
106
+ * labelWidth="150px"
107
+ * placeholder="ํƒœ๊ทธ ์ž…๋ ฅ ํ›„ Enter"
108
+ * />
109
+ * ```
110
+ * {@end-tool}
111
+ *
112
+ * See also:
113
+ *
114
+ * - {@link TextInput}, ๋‹จ์ˆœ ํ…์ŠคํŠธ ์ž…๋ ฅ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ
115
+ * - {@link Combobox}, ๋ชฉ๋ก์—์„œ ๊ฒ€์ƒ‰ํ•˜์—ฌ ํƒœ๊ทธ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ
116
+ *
117
+ * ## ์ฐธ๊ณ ์‚ฌ์ง„
118
+ * ![](https://github.com/AlmSmartDoctor/ccds-screenshots/blob/main/screenshots/Forms/TagInput/For%20Jsdoc.png?raw=true)
119
+ */
120
+ export declare const TagInput: React.ForwardRefExoticComponent<TagInputProps & React.RefAttributes<HTMLDivElement>>;
121
+ export {};
@@ -0,0 +1 @@
1
+ export * from './TagInput';
@@ -0,0 +1,74 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+
4
+ declare const textVariants: (props?: ({
5
+ variant?: "h2" | "h3" | "body" | "caption" | "h1" | "subtitle" | "emphasis" | "price" | null | undefined;
6
+ align?: "center" | "right" | "left" | null | undefined;
7
+ decoration?: "none" | "underline" | "lineThrough" | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
+ export interface TextProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants> {
10
+ as?: "p" | "span" | "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label";
11
+ children: React.ReactNode;
12
+ }
13
+ /**
14
+ * ์ผ๊ด€๋œ ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ ์‹œ์Šคํ…œ์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•œ ํ…์ŠคํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
15
+ *
16
+ * {@link Text}๋Š” ์ œ๋ชฉ(Heading), ๋ณธ๋ฌธ(Body), ์บก์…˜(Caption) ๋“ฑ ๋ฏธ๋ฆฌ ์ •์˜๋œ ์Šคํƒ€์ผ์„ ์ œ๊ณตํ•˜์—ฌ
17
+ * ๋””์ž์ธ ์ผ๊ด€์„ฑ์„ ์œ ์ง€ํ•˜๊ณ  ํ…์ŠคํŠธ์˜ ์˜๋ฏธ์  ๊ตฌ์กฐ(Semantic Structure)๋ฅผ ์‰ฝ๊ฒŒ ์ •์˜ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค.
18
+ *
19
+ * ## When (์–ธ์ œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๊ฐ€)
20
+ *
21
+ * **์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
22
+ * - **ํŽ˜์ด์ง€ ์ œ๋ชฉ ๋ฐ ๋ถ€์ œ๋ชฉ**: ํ™”๋ฉด์˜ ์œ„๊ณ„๋ฅผ ๋‚˜๋ˆ„๋Š” ํƒ€์ดํ‹€์„ ์ž‘์„ฑํ•  ๋•Œ
23
+ * - **๋ณธ๋ฌธ ์ฝ˜ํ…์ธ **: ์ผ๋ฐ˜์ ์ธ ์„ค๋ช…๊ธ€์ด๋‚˜ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•  ๋•Œ
24
+ * - **์บก์…˜ ๋ฐ ํžŒํŠธ**: ๋ถ€๊ฐ€์ ์ธ ์„ค๋ช…์ด๋‚˜ ์ž‘์€ ํฌ๊ธฐ์˜ ์ •๋ณด๊ฐ€ ํ•„์š”ํ•  ๋•Œ
25
+ * - **์ •ํ˜•ํ™”๋œ ์Šคํƒ€์ผ**: ํŠน์ • ํฐํŠธ ๋‘๊ป˜๋‚˜ ํฌ๊ธฐ๋ฅผ ์‹œ์Šคํ…œ ๊ทœ์น™์— ๋งž์ถฐ ์ ์šฉํ•ด์•ผ ํ•  ๋•Œ
26
+ *
27
+ * **์‚ฌ์šฉํ•˜์ง€ ๋ง์•„์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ:**
28
+ * - **๋ณต์žกํ•œ ์Šคํƒ€์ผ๋ง**: ์‹œ์Šคํ…œ ์ •์˜ ๋ฒ”์œ„๋ฅผ ํฌ๊ฒŒ ๋ฒ—์–ด๋‚˜๋Š” ํŠน์ˆ˜ ์Šคํƒ€์ผ์€ ๋ณ„๋„ CSS ํด๋ž˜์Šค๋ฅผ ํ™œ์šฉํ•˜์„ธ์š”.
29
+ *
30
+ * ## Layout behavior
31
+ *
32
+ * - **Semantic Tag**: `as` prop์„ ํ†ตํ•ด ์‹ค์ œ HTML ํƒœ๊ทธ(`h1`, `p`, `span` ๋“ฑ)๋ฅผ ๊ฒฐ์ •ํ•  ์ˆ˜ ์žˆ์–ด SEO์™€ ์ ‘๊ทผ์„ฑ์— ์œ ๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
33
+ * - **Alignment**: `align` ์†์„ฑ์„ ํ†ตํ•ด ์™ผ์ชฝ, ์ค‘์•™, ์˜ค๋ฅธ์ชฝ ์ •๋ ฌ์„ ์†์‰ฝ๊ฒŒ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
34
+ *
35
+ * ## Usage guidelines
36
+ *
37
+ * ### โœ… Do (๊ถŒ์žฅ ์‚ฌํ•ญ)
38
+ *
39
+ * - **์˜๋ฏธ๋ก ์  ํƒœ๊ทธ ์‚ฌ์šฉ**: ์ œ๋ชฉ์—๋Š” `as="h1"`, ๋ณธ๋ฌธ์—๋Š” `as="p"`๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋“ฑ ๋งฅ๋ฝ์— ๋งž๋Š” ํƒœ๊ทธ๋ฅผ ์„ ํƒํ•˜์„ธ์š”.
40
+ * - **๊ณ„์ธต ๊ตฌ์กฐ ์ค€์ˆ˜**: ํฐ ์ œ๋ชฉ(h1) ์•„๋ž˜์— ์ž‘์€ ์ œ๋ชฉ(h2, h3)์ด ์˜ค๋„๋ก ๋…ผ๋ฆฌ์ ์ธ ํ๋ฆ„์„ ์œ ์ง€ํ•˜์„ธ์š”.
41
+ * - **๋ณ€ํ˜•(Variant) ํ™œ์šฉ**: ํฐํŠธ ํฌ๊ธฐ์™€ ๋‘๊ป˜๋ฅผ ์ง์ ‘ ์กฐ์ ˆํ•˜๊ธฐ๋ณด๋‹ค ์ œ๊ณต๋˜๋Š” `variant`๋ฅผ ์šฐ์„ ์ ์œผ๋กœ ์‚ฌ์šฉํ•˜์„ธ์š”.
42
+ *
43
+ * ### ๐Ÿšซ Don't (์ฃผ์˜/๊ธˆ์ง€ ์‚ฌํ•ญ)
44
+ *
45
+ * - **๊ณผ๋„ํ•œ ํฐํŠธ ํฌ๊ธฐ ์‚ฌ์šฉ**: ๊ฐ€๊ธ‰์  ์‹œ์Šคํ…œ์—์„œ ์ •์˜ํ•œ ํฌ๊ธฐ๋ฅผ ๋ฒ—์–ด๋‚˜์ง€ ์•Š๋„๋ก ์ฃผ์˜ํ•˜์„ธ์š”.
46
+ * - **์˜๋ฏธ์™€ ๋งž์ง€ ์•Š๋Š” ํƒœ๊ทธ**: ์‹œ๊ฐ์ ์œผ๋กœ๋งŒ ํฌ๊ฒŒ ๋ณด์ด๊ธฐ ์œ„ํ•ด ์ œ๋ชฉ ํƒœ๊ทธ๋ฅผ ๋‚จ์šฉํ•˜์ง€ ๋งˆ์„ธ์š”.
47
+ *
48
+ * ## Example
49
+ *
50
+ * {@tool snippet}
51
+ * ๋‹ค์–‘ํ•œ ์œ„๊ณ„์˜ ํ…์ŠคํŠธ ๊ตฌ์„ฑ:
52
+ *
53
+ * ```tsx
54
+ * <div className="space-y-4">
55
+ * <Text variant="h1" as="h1">๋Œ€์‹œ๋ณด๋“œ</Text>
56
+ * <Text variant="subtitle">์˜ค๋Š˜์˜ ์š”์•ฝ ์ •๋ณด์ž…๋‹ˆ๋‹ค.</Text>
57
+ * <Text variant="body">
58
+ * ํ˜„์žฌ ํ™œ์„ฑํ™”๋œ ์‚ฌ์šฉ์ž๋Š” ์ด 1,234๋ช…์ด๋ฉฐ, ์–ด์ œ ๋Œ€๋น„ 5% ์ฆ๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
59
+ * </Text>
60
+ * <Text variant="caption" align="right">์ตœ๊ทผ ์—…๋ฐ์ดํŠธ: 2024-01-24</Text>
61
+ * </div>
62
+ * ```
63
+ * {@end-tool}
64
+ *
65
+ * See also:
66
+ *
67
+ * - {@link TextInput}, ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ์„ ๋ฐ›๋Š” ํ…์ŠคํŠธ ํ•„๋“œ
68
+ * - {@link Button}, ํ…์ŠคํŠธ๋ฅผ ํฌํ•จํ•˜๋Š” ์•ก์…˜ ์š”์†Œ
69
+ *
70
+ * ## ์ฐธ๊ณ ์‚ฌ์ง„
71
+ * ![](https://github.com/AlmSmartDoctor/ccds-screenshots/blob/main/screenshots/Data%20Display/Text/For%20Jsdoc.png?raw=true)
72
+ */
73
+ export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
74
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Text } from './Text';
2
+ export type { TextProps } from './Text';