@conscience-technology/ctds 0.0.0-stage → 0.1.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.
Files changed (289) hide show
  1. package/README.md +128 -2
  2. package/assets/components/AppFrame/AppFrame.module.css +177 -0
  3. package/assets/components/AppFrame/AppFrame.tsx +93 -0
  4. package/assets/components/AppFrame/index.ts +6 -0
  5. package/assets/components/AttachmentChip/AttachmentChip.module.css +71 -0
  6. package/assets/components/AttachmentChip/AttachmentChip.tsx +74 -0
  7. package/assets/components/AttachmentChip/index.ts +2 -0
  8. package/assets/components/AttachmentThumb/AttachmentThumb.module.css +107 -0
  9. package/assets/components/AttachmentThumb/AttachmentThumb.tsx +91 -0
  10. package/assets/components/AttachmentThumb/index.ts +2 -0
  11. package/assets/components/Avatar/Avatar.module.css +167 -0
  12. package/assets/components/Avatar/Avatar.tsx +228 -0
  13. package/assets/components/Avatar/index.ts +2 -0
  14. package/assets/components/AvatarUpload/AvatarUpload.module.css +130 -0
  15. package/assets/components/AvatarUpload/AvatarUpload.tsx +139 -0
  16. package/assets/components/AvatarUpload/index.ts +2 -0
  17. package/assets/components/Badge/Badge.module.css +76 -0
  18. package/assets/components/Badge/Badge.tsx +68 -0
  19. package/assets/components/Badge/index.ts +2 -0
  20. package/assets/components/Breadcrumb/Breadcrumb.module.css +213 -0
  21. package/assets/components/Breadcrumb/Breadcrumb.tsx +279 -0
  22. package/assets/components/Breadcrumb/index.ts +8 -0
  23. package/assets/components/Button/Button.module.css +216 -0
  24. package/assets/components/Button/Button.tsx +149 -0
  25. package/assets/components/Button/index.ts +2 -0
  26. package/assets/components/Callout/Callout.module.css +146 -0
  27. package/assets/components/Callout/Callout.tsx +138 -0
  28. package/assets/components/Callout/index.ts +2 -0
  29. package/assets/components/ChatInput/ChatInput.module.css +241 -0
  30. package/assets/components/ChatInput/ChatInput.tsx +322 -0
  31. package/assets/components/ChatInput/ModelSelector.tsx +40 -0
  32. package/assets/components/ChatInput/SendButton.tsx +41 -0
  33. package/assets/components/ChatInput/index.ts +10 -0
  34. package/assets/components/Checkbox/Checkbox.module.css +66 -0
  35. package/assets/components/Checkbox/Checkbox.tsx +36 -0
  36. package/assets/components/Checkbox/index.ts +2 -0
  37. package/assets/components/Chip/Chip.module.css +128 -0
  38. package/assets/components/Chip/Chip.tsx +103 -0
  39. package/assets/components/Chip/index.ts +2 -0
  40. package/assets/components/ChoiceCard/ChoiceCard.module.css +142 -0
  41. package/assets/components/ChoiceCard/ChoiceCard.tsx +132 -0
  42. package/assets/components/ChoiceCard/index.ts +2 -0
  43. package/assets/components/ContextMenu/ContextMenu.module.css +102 -0
  44. package/assets/components/ContextMenu/ContextMenu.tsx +392 -0
  45. package/assets/components/ContextMenu/index.ts +9 -0
  46. package/assets/components/DatePicker/Calendar.tsx +234 -0
  47. package/assets/components/DatePicker/DESIGN_NOTES.md +106 -0
  48. package/assets/components/DatePicker/DESIGN_NOTES_TIME.md +125 -0
  49. package/assets/components/DatePicker/DatePicker.module.css +295 -0
  50. package/assets/components/DatePicker/DatePicker.tsx +387 -0
  51. package/assets/components/DatePicker/TimeSelector.tsx +69 -0
  52. package/assets/components/DatePicker/index.ts +8 -0
  53. package/assets/components/DatePicker/presets.ts +80 -0
  54. package/assets/components/DatePicker/utils.ts +148 -0
  55. package/assets/components/Disclosure/Disclosure.module.css +73 -0
  56. package/assets/components/Disclosure/Disclosure.tsx +129 -0
  57. package/assets/components/Disclosure/index.ts +6 -0
  58. package/assets/components/Drawer/Drawer.module.css +257 -0
  59. package/assets/components/Drawer/Drawer.tsx +126 -0
  60. package/assets/components/Drawer/index.ts +7 -0
  61. package/assets/components/EmptyState/EmptyState.module.css +102 -0
  62. package/assets/components/EmptyState/EmptyState.tsx +80 -0
  63. package/assets/components/EmptyState/index.ts +2 -0
  64. package/assets/components/FileIcon/FileIcon.module.css +66 -0
  65. package/assets/components/FileIcon/FileIcon.tsx +84 -0
  66. package/assets/components/FileIcon/fileExtMap.ts +112 -0
  67. package/assets/components/FileIcon/index.ts +9 -0
  68. package/assets/components/FilterButton/FilterButton.module.css +130 -0
  69. package/assets/components/FilterButton/FilterButton.tsx +94 -0
  70. package/assets/components/FilterButton/index.ts +2 -0
  71. package/assets/components/GalleryItem/GalleryItem.module.css +220 -0
  72. package/assets/components/GalleryItem/GalleryItem.tsx +163 -0
  73. package/assets/components/GalleryItem/index.ts +7 -0
  74. package/assets/components/Icon/Icon.tsx +616 -0
  75. package/assets/components/Icon/context.tsx +39 -0
  76. package/assets/components/Icon/index.ts +4 -0
  77. package/assets/components/IconButton/IconButton.module.css +109 -0
  78. package/assets/components/IconButton/IconButton.tsx +110 -0
  79. package/assets/components/IconButton/index.ts +2 -0
  80. package/assets/components/Input/Input.module.css +338 -0
  81. package/assets/components/Input/Input.tsx +371 -0
  82. package/assets/components/Input/index.ts +2 -0
  83. package/assets/components/ListItem/ListItem.module.css +318 -0
  84. package/assets/components/ListItem/ListItem.tsx +262 -0
  85. package/assets/components/ListItem/index.ts +9 -0
  86. package/assets/components/MenuItem/MenuItem.module.css +437 -0
  87. package/assets/components/MenuItem/MenuItem.tsx +529 -0
  88. package/assets/components/MenuItem/index.ts +8 -0
  89. package/assets/components/MetricCard/MetricCard.module.css +153 -0
  90. package/assets/components/MetricCard/MetricCard.tsx +140 -0
  91. package/assets/components/MetricCard/index.ts +2 -0
  92. package/assets/components/Modal/Modal.module.css +175 -0
  93. package/assets/components/Modal/Modal.tsx +98 -0
  94. package/assets/components/Modal/index.ts +2 -0
  95. package/assets/components/Onboarding/DocsIndex.tsx +82 -0
  96. package/assets/components/Onboarding/LayoutBuilder.tsx +160 -0
  97. package/assets/components/Onboarding/Onboarding.module.css +1394 -0
  98. package/assets/components/Onboarding/OnboardingAxisPanel.tsx +515 -0
  99. package/assets/components/Onboarding/OnboardingPage.tsx +1193 -0
  100. package/assets/components/Onboarding/PresetsGallery.tsx +65 -0
  101. package/assets/components/Onboarding/actions.ts +250 -0
  102. package/assets/components/Onboarding/index.ts +8 -0
  103. package/assets/components/Onboarding/palette.css +40 -0
  104. package/assets/components/Onboarding/wizardData.ts +265 -0
  105. package/assets/components/Pagination/Pagination.module.css +82 -0
  106. package/assets/components/Pagination/Pagination.tsx +248 -0
  107. package/assets/components/Pagination/index.ts +6 -0
  108. package/assets/components/ProgressBar/ProgressBar.module.css +64 -0
  109. package/assets/components/ProgressBar/ProgressBar.tsx +54 -0
  110. package/assets/components/ProgressBar/index.ts +2 -0
  111. package/assets/components/QuotationBar/QuotationBar.module.css +61 -0
  112. package/assets/components/QuotationBar/QuotationBar.tsx +48 -0
  113. package/assets/components/QuotationBar/index.ts +2 -0
  114. package/assets/components/Radio/Radio.module.css +63 -0
  115. package/assets/components/Radio/Radio.tsx +33 -0
  116. package/assets/components/Radio/index.ts +2 -0
  117. package/assets/components/Select/Select.module.css +151 -0
  118. package/assets/components/Select/Select.tsx +425 -0
  119. package/assets/components/Select/index.ts +10 -0
  120. package/assets/components/SelectableCard/SelectableCard.module.css +177 -0
  121. package/assets/components/SelectableCard/SelectableCard.tsx +83 -0
  122. package/assets/components/SelectableCard/index.ts +2 -0
  123. package/assets/components/Shortcut/Shortcut.module.css +56 -0
  124. package/assets/components/Shortcut/Shortcut.tsx +156 -0
  125. package/assets/components/Shortcut/index.ts +2 -0
  126. package/assets/components/Sidebar/Sidebar.module.css +242 -0
  127. package/assets/components/Sidebar/Sidebar.tsx +264 -0
  128. package/assets/components/Sidebar/index.ts +7 -0
  129. package/assets/components/SidebarSplit/SidebarSplit.module.css +126 -0
  130. package/assets/components/SidebarSplit/SidebarSplit.tsx +222 -0
  131. package/assets/components/SidebarSplit/index.ts +6 -0
  132. package/assets/components/Slider/Slider.module.css +120 -0
  133. package/assets/components/Slider/Slider.tsx +88 -0
  134. package/assets/components/Slider/index.ts +2 -0
  135. package/assets/components/SplitButton/SplitButton.module.css +190 -0
  136. package/assets/components/SplitButton/SplitButton.tsx +145 -0
  137. package/assets/components/SplitButton/index.ts +6 -0
  138. package/assets/components/Stepper/Stepper.module.css +182 -0
  139. package/assets/components/Stepper/Stepper.tsx +185 -0
  140. package/assets/components/Stepper/index.ts +2 -0
  141. package/assets/components/Switch/Switch.module.css +116 -0
  142. package/assets/components/Switch/Switch.tsx +58 -0
  143. package/assets/components/Switch/index.ts +2 -0
  144. package/assets/components/TableCell/TableCell.module.css +137 -0
  145. package/assets/components/TableCell/TableCellAvatar.tsx +42 -0
  146. package/assets/components/TableCell/TableCellBadge.tsx +23 -0
  147. package/assets/components/TableCell/TableCellIcon.tsx +39 -0
  148. package/assets/components/TableCell/TableCellImage.tsx +49 -0
  149. package/assets/components/TableCell/TableCellLink.tsx +33 -0
  150. package/assets/components/TableCell/TableCellMeter.tsx +55 -0
  151. package/assets/components/TableCell/TableCellNumber.tsx +43 -0
  152. package/assets/components/TableCell/TableCellText.tsx +30 -0
  153. package/assets/components/TableCell/index.ts +23 -0
  154. package/assets/components/TableHeader/TableHeader.module.css +287 -0
  155. package/assets/components/TableHeader/TableHeader.tsx +590 -0
  156. package/assets/components/TableHeader/index.ts +9 -0
  157. package/assets/components/TableRow/TableRow.module.css +290 -0
  158. package/assets/components/TableRow/TableRow.tsx +253 -0
  159. package/assets/components/TableRow/index.ts +8 -0
  160. package/assets/components/TableRowEdit/TableRowEdit.module.css +126 -0
  161. package/assets/components/TableRowEdit/TableRowEdit.tsx +247 -0
  162. package/assets/components/TableRowEdit/index.ts +2 -0
  163. package/assets/components/TableRowSelect/TableRowSelect.module.css +23 -0
  164. package/assets/components/TableRowSelect/TableRowSelect.tsx +175 -0
  165. package/assets/components/TableRowSelect/index.ts +2 -0
  166. package/assets/components/Tabs/Tabs.module.css +234 -0
  167. package/assets/components/Tabs/Tabs.tsx +426 -0
  168. package/assets/components/Tabs/index.ts +9 -0
  169. package/assets/components/Textarea/Textarea.module.css +318 -0
  170. package/assets/components/Textarea/Textarea.tsx +426 -0
  171. package/assets/components/Textarea/index.ts +7 -0
  172. package/assets/components/ThemeController.tsx +271 -0
  173. package/assets/components/TimePicker/TimePicker.module.css +317 -0
  174. package/assets/components/TimePicker/TimePicker.tsx +821 -0
  175. package/assets/components/TimePicker/index.ts +8 -0
  176. package/assets/components/TimePicker/utils.ts +115 -0
  177. package/assets/components/Toast/Toast.module.css +264 -0
  178. package/assets/components/Toast/Toast.tsx +243 -0
  179. package/assets/components/Toast/index.ts +15 -0
  180. package/assets/components/Toolbar/Toolbar.module.css +72 -0
  181. package/assets/components/Toolbar/Toolbar.tsx +75 -0
  182. package/assets/components/Toolbar/index.ts +2 -0
  183. package/assets/components/Tooltip/Tooltip.module.css +42 -0
  184. package/assets/components/Tooltip/Tooltip.tsx +332 -0
  185. package/assets/components/Tooltip/index.ts +2 -0
  186. package/assets/components/Topbar/Topbar.module.css +26 -0
  187. package/assets/components/Topbar/Topbar.tsx +47 -0
  188. package/assets/components/Topbar/index.ts +2 -0
  189. package/assets/components/_cn.ts +3 -0
  190. package/assets/components/_color.ts +48 -0
  191. package/assets/components/_data.ts +659 -0
  192. package/assets/components/_utils.css +19 -0
  193. package/assets/components/axisOptions.ts +24 -0
  194. package/assets/components/tokens.css +742 -0
  195. package/assets/prompts/GUIDE.md +251 -0
  196. package/assets/prompts/OVERRIDE.md +170 -0
  197. package/assets/prompts/PRINCIPLES.md +130 -0
  198. package/assets/prompts/axes/density.md +38 -0
  199. package/assets/prompts/axes/font.md +36 -0
  200. package/assets/prompts/axes/hue.md +36 -0
  201. package/assets/prompts/axes/icon.md +48 -0
  202. package/assets/prompts/axes/mode.md +50 -0
  203. package/assets/prompts/axes/motion.md +77 -0
  204. package/assets/prompts/axes/palette.md +35 -0
  205. package/assets/prompts/axes/shape.md +33 -0
  206. package/assets/prompts/axes/voice.md +54 -0
  207. package/assets/prompts/components/README.md +84 -0
  208. package/assets/prompts/components/app-frame.md +94 -0
  209. package/assets/prompts/components/attachment-chip.md +46 -0
  210. package/assets/prompts/components/attachment-thumb.md +49 -0
  211. package/assets/prompts/components/avatar.md +86 -0
  212. package/assets/prompts/components/badge.md +104 -0
  213. package/assets/prompts/components/breadcrumb.md +77 -0
  214. package/assets/prompts/components/button.md +99 -0
  215. package/assets/prompts/components/callout.md +81 -0
  216. package/assets/prompts/components/chat-input.md +84 -0
  217. package/assets/prompts/components/checkbox.md +46 -0
  218. package/assets/prompts/components/chip.md +84 -0
  219. package/assets/prompts/components/choice-card.md +127 -0
  220. package/assets/prompts/components/context-menu.md +145 -0
  221. package/assets/prompts/components/date-picker.md +104 -0
  222. package/assets/prompts/components/drawer.md +152 -0
  223. package/assets/prompts/components/empty-state.md +69 -0
  224. package/assets/prompts/components/file-icon.md +73 -0
  225. package/assets/prompts/components/filter-button.md +42 -0
  226. package/assets/prompts/components/form-field.md +74 -0
  227. package/assets/prompts/components/gallery-item.md +158 -0
  228. package/assets/prompts/components/icon-button.md +82 -0
  229. package/assets/prompts/components/icon.md +68 -0
  230. package/assets/prompts/components/input.md +95 -0
  231. package/assets/prompts/components/list-item.md +235 -0
  232. package/assets/prompts/components/menu-item.md +234 -0
  233. package/assets/prompts/components/metric-card.md +132 -0
  234. package/assets/prompts/components/modal.md +131 -0
  235. package/assets/prompts/components/pagination.md +92 -0
  236. package/assets/prompts/components/progress-bar.md +61 -0
  237. package/assets/prompts/components/quotation-bar.md +39 -0
  238. package/assets/prompts/components/radio.md +41 -0
  239. package/assets/prompts/components/select.md +104 -0
  240. package/assets/prompts/components/selectable-card.md +67 -0
  241. package/assets/prompts/components/shortcut.md +76 -0
  242. package/assets/prompts/components/sidebar.md +107 -0
  243. package/assets/prompts/components/slider.md +89 -0
  244. package/assets/prompts/components/split-button.md +71 -0
  245. package/assets/prompts/components/stepper.md +93 -0
  246. package/assets/prompts/components/switch.md +86 -0
  247. package/assets/prompts/components/table-cell.md +87 -0
  248. package/assets/prompts/components/table-header.md +157 -0
  249. package/assets/prompts/components/table-row-edit.md +129 -0
  250. package/assets/prompts/components/table-row-select.md +82 -0
  251. package/assets/prompts/components/table-row.md +156 -0
  252. package/assets/prompts/components/tabs.md +122 -0
  253. package/assets/prompts/components/textarea.md +105 -0
  254. package/assets/prompts/components/toast.md +149 -0
  255. package/assets/prompts/components/tooltip.md +71 -0
  256. package/assets/prompts/components/topbar.md +148 -0
  257. package/assets/prompts/primitives/emerge.md +43 -0
  258. package/assets/prompts/primitives/fade.md +31 -0
  259. package/assets/prompts/primitives/scale.md +32 -0
  260. package/assets/prompts/primitives/scroll.md +75 -0
  261. package/assets/prompts/primitives/slide.md +31 -0
  262. package/assets/prompts/themes/_SCHEMA.md +135 -0
  263. package/assets/prompts/themes/_TEMPLATE.md +73 -0
  264. package/assets/prompts/themes/expressive.md +118 -0
  265. package/assets/prompts/themes/pure.md +87 -0
  266. package/assets/prompts/themes/spare.md +73 -0
  267. package/assets/prompts/tokens/breakpoint.md +29 -0
  268. package/assets/prompts/tokens/color.md +78 -0
  269. package/assets/prompts/tokens/radius.md +33 -0
  270. package/assets/prompts/tokens/shadow.md +35 -0
  271. package/assets/prompts/tokens/spacing.md +86 -0
  272. package/assets/prompts/tokens/typography.md +76 -0
  273. package/assets/prompts/tokens/z-index.md +35 -0
  274. package/assets/public/expressive.png +0 -0
  275. package/assets/public/pure.png +0 -0
  276. package/assets/public/spare.png +0 -0
  277. package/assets/skill/SKILL.md +36 -0
  278. package/bin/ctds.js +76 -0
  279. package/package.json +35 -4
  280. package/src/commands/init.js +215 -0
  281. package/src/commands/update.js +275 -0
  282. package/src/utils/assets.js +78 -0
  283. package/src/utils/deps.js +51 -0
  284. package/src/utils/detect.js +47 -0
  285. package/src/utils/diff.js +52 -0
  286. package/src/utils/hash.js +16 -0
  287. package/src/utils/log.js +41 -0
  288. package/src/utils/meta.js +73 -0
  289. package/src/utils/prompt.js +28 -0
@@ -0,0 +1,659 @@
1
+ // ============================================================
2
+ // Theme axes — presets
3
+ // ============================================================
4
+
5
+ export type ModeValue = "light" | "dark";
6
+ export type PaletteValue = "mono" | "vivid" | "standard" | "calm" | "pastel";
7
+ export type ShapeValue = "soft" | "standard" | "crisp";
8
+ export type DensityValue = "compact" | "default" | "comfortable";
9
+ export type MotionValue = "bouncy" | "standard" | "calm" | "none";
10
+ export type IconFamily = "phosphor" | "solar" | "lucide";
11
+ export type IconWeight = "regular" | "fill";
12
+ export type VoiceValue = "formal" | "neutral" | "casual";
13
+ export type LangValue = "ko" | "en";
14
+ export type HuePreset = {
15
+ id: string;
16
+ label: string;
17
+ hue: number; // 0~360
18
+ desc: string;
19
+ /** 짝을 이루는 보조 hue. 없으면 단색 프리셋. secondary variant에서만 활용. */
20
+ accentHue?: number;
21
+ };
22
+
23
+ /** Hue 프리셋. 다이얼로 임의 값 지정도 가능하지만, 이름 붙은 진입점을 우선 노출.
24
+ * 기본 프리셋은 단색. `+` 프리셋은 보조 hue가 지정된 페어 프리셋. */
25
+ export const huePresets: HuePreset[] = [
26
+ { id: "ocean", label: "Ocean", hue: 210, desc: "신뢰 · 금융/공공" },
27
+ { id: "forest", label: "Forest", hue: 145, desc: "안정 · 헬스케어" },
28
+ { id: "sunset", label: "Sunset", hue: 25, desc: "활력 · 스타트업" },
29
+ { id: "lavender", label: "Lavender", hue: 280, desc: "창의 · 교육" },
30
+ { id: "crimson", label: "Crimson", hue: 355, desc: "강조 · 프로모션" },
31
+ { id: "slate", label: "Slate", hue: 260, desc: "무채색 · 관리 도구" },
32
+ { id: "ocean+sunset", label: "Ocean + Sunset", hue: 210, accentHue: 25, desc: "신뢰 + 활력 페어" },
33
+ { id: "forest+lavender", label: "Forest + Lavender", hue: 145, accentHue: 280, desc: "안정 + 창의 페어" },
34
+ { id: "sunset+ocean", label: "Sunset + Ocean", hue: 25, accentHue: 210, desc: "활력 + 신뢰 페어" },
35
+ ];
36
+
37
+ /**
38
+ * Palette 프리셋. chroma·lightness·hue-shift를 세트로 스왑.
39
+ * 단순 채도 필터가 아니라 팔레트 스타일 재해석:
40
+ * - mono: 채도 0, 무채색 지배. 아이콘·secondary도 fg 톤.
41
+ * - vivid/standard: 원본 hue 유지
42
+ * - calm: hue를 warm 방향으로 살짝 이동 → 초록이 카키·파랑이 슬레이트가 됨
43
+ * - pastel: hue를 cool 방향으로 살짝 이동 → 초록이 민트·오렌지가 피치가 됨
44
+ */
45
+ export const palettePresets: {
46
+ id: PaletteValue;
47
+ label: string;
48
+ desc: string;
49
+ chroma: number;
50
+ lightness: number;
51
+ hueShift: number;
52
+ }[] = [
53
+ { id: "mono", label: "Mono", desc: "채도 0 · 무채색 지배 · primary는 CTA/상태 지점에만", chroma: 0, lightness: 0.52, hueShift: 0 },
54
+ { id: "vivid", label: "Vivid", desc: "원본 hue · 진한 채도 · 강렬한 브랜드 톤", chroma: 0.20, lightness: 0.58, hueShift: 0 },
55
+ { id: "standard", label: "Standard", desc: "원본 hue · 중간 채도 · 기본", chroma: 0.14, lightness: 0.55, hueShift: 0 },
56
+ { id: "calm", label: "Calm", desc: "warm shift · 낮은 채도 · 카키/슬레이트/테라코타", chroma: 0.06, lightness: 0.48, hueShift: 18 },
57
+ { id: "pastel", label: "Pastel", desc: "cool shift · 낮은 채도 · 매우 밝은 명도 · 민트/피치/베이비블루", chroma: 0.09, lightness: 0.82, hueShift: -12 },
58
+ ];
59
+
60
+ /**
61
+ * Shape 프리셋. radius + shadow + border를 세트로 스왑.
62
+ * standard가 기본 · soft/crisp는 성격 표현이 필요한 프로젝트에서 선택.
63
+ */
64
+ export const shapePresets: {
65
+ id: ShapeValue;
66
+ label: string;
67
+ desc: string;
68
+ useCase: string;
69
+ }[] = [
70
+ {
71
+ id: "soft",
72
+ label: "Soft",
73
+ desc: "말랑, 캐주얼",
74
+ useCase: "스타트업 · 콘텐츠 · 교육 · 마케팅",
75
+ },
76
+ {
77
+ id: "standard",
78
+ label: "Standard",
79
+ desc: "표준, 무난",
80
+ useCase: "일반 웹 UI · 다목적",
81
+ },
82
+ {
83
+ id: "crisp",
84
+ label: "Crisp",
85
+ desc: "딱딱, 전문",
86
+ useCase: "관공서 · 금융 · 데이터 대시보드",
87
+ },
88
+ ];
89
+
90
+ /**
91
+ * Density 프리셋. space-scale + control-height 세트로 스왑.
92
+ * 정보 밀도가 승부 나는 대시보드/테이블 화면에서 결정적.
93
+ */
94
+ export const densityPresets: {
95
+ id: DensityValue;
96
+ label: string;
97
+ desc: string;
98
+ useCase: string;
99
+ scale: number;
100
+ }[] = [
101
+ {
102
+ id: "compact",
103
+ label: "Compact",
104
+ desc: "높은 밀도 (85%)",
105
+ useCase: "관리 도구 · 데이터 테이블 · 엑셀 대체",
106
+ scale: 0.85,
107
+ },
108
+ {
109
+ id: "default",
110
+ label: "Default",
111
+ desc: "표준 밀도 (100%)",
112
+ useCase: "일반 웹 UI",
113
+ scale: 1,
114
+ },
115
+ {
116
+ id: "comfortable",
117
+ label: "Comfortable",
118
+ desc: "낮은 밀도 (106%)",
119
+ useCase: "태블릿 · 터치 · 콘텐츠 중심",
120
+ scale: 1.06,
121
+ },
122
+ ];
123
+
124
+ /**
125
+ * Motion 프리셋.
126
+ * duration + ease + distance-scale을 세트로 스왑.
127
+ * "none"은 접근성/설정 모두 대응 (prefers-reduced-motion도 자동으로 강제 매핑됨).
128
+ */
129
+ export const motionPresets: {
130
+ id: MotionValue;
131
+ label: string;
132
+ desc: string;
133
+ useCase: string;
134
+ duration: number; // base ms
135
+ }[] = [
136
+ {
137
+ id: "bouncy",
138
+ label: "Bouncy",
139
+ desc: "쫀득한 오버슛",
140
+ useCase: "브랜드 · 온보딩 · 스타트업",
141
+ duration: 192,
142
+ },
143
+ {
144
+ id: "standard",
145
+ label: "Standard",
146
+ desc: "짧고 매끈 (Vercel 스타일)",
147
+ useCase: "일반 웹 UI",
148
+ duration: 160,
149
+ },
150
+ {
151
+ id: "calm",
152
+ label: "Calm",
153
+ desc: "심심하고 차분",
154
+ useCase: "관리 도구 · 대시보드 · 관공서",
155
+ duration: 144,
156
+ },
157
+ {
158
+ id: "none",
159
+ label: "None",
160
+ desc: "즉시 · 애니 없음",
161
+ useCase: "접근성 · 저사양",
162
+ duration: 0,
163
+ },
164
+ ];
165
+
166
+ /**
167
+ * 모션 프리미티브 카탈로그.
168
+ * 재사용 가능한 애니메이션 패턴. 컴포넌트가 골라 씀.
169
+ * 각 프리미티브는 축 값에 따라 파라미터가 자동 스왑됨.
170
+ */
171
+ export type MotionPrimitive = {
172
+ id: string;
173
+ label: string;
174
+ role: string;
175
+ usage: string;
176
+ className: string; // 데모용 CSS class
177
+ };
178
+
179
+ /**
180
+ * Icon 축.
181
+ * - Family: 프로젝트당 하나 선택 (한 페이지 안에서 절대 섞지 말 것)
182
+ * - Weight: regular / fill. Phosphor·Solar 두 family는 실제 반응, Lucide는 regular로 fallback.
183
+ */
184
+ export const iconFamilies: {
185
+ id: IconFamily;
186
+ label: string;
187
+ desc: string;
188
+ homepage: string;
189
+ }[] = [
190
+ {
191
+ id: "phosphor",
192
+ label: "Phosphor",
193
+ desc: "regular/fill 매트릭 매칭",
194
+ homepage: "https://phosphoricons.com",
195
+ },
196
+ {
197
+ id: "solar",
198
+ label: "Solar",
199
+ desc: "6-스타일 팩 · Linear(regular)/Bold(fill) 매칭",
200
+ homepage: "https://solaricons.com",
201
+ },
202
+ {
203
+ id: "lucide",
204
+ label: "Lucide",
205
+ desc: "Feather 계승 · 얇은 stroke · 표준적",
206
+ homepage: "https://lucide.dev",
207
+ },
208
+ ];
209
+
210
+ /**
211
+ * Font 축 — Language.
212
+ * data-lang이 --font-normal/point/code 슬롯의 스택을 통째로 스왑.
213
+ * point/code 폰트는 각 언어 특성에 맞춰 매핑 (프로젝트 초기 설정으로 언제든 교체 가능).
214
+ */
215
+ export const langPresets: {
216
+ id: LangValue;
217
+ label: string;
218
+ sample: string;
219
+ desc: string;
220
+ }[] = [
221
+ { id: "ko", label: "한국어", sample: "디자인 시스템", desc: "Pretendard · Nanum Myeongjo" },
222
+ { id: "en", label: "English", sample: "Design System", desc: "Inter · Playfair Display" },
223
+ ];
224
+
225
+ /**
226
+ * Voice 축 — 카피 톤. 토큰 없음(Layer 2 only).
227
+ * data-voice 속성만 노출. AI가 카피 생성 시 참조.
228
+ * Theme과 독립 — editorial·mechanical 어느 Theme에도 어떤 Voice든 결합 가능.
229
+ */
230
+ export const voicePresets: {
231
+ id: VoiceValue;
232
+ label: string;
233
+ desc: string;
234
+ useCase: string;
235
+ samples: { save: string; error: string };
236
+ }[] = [
237
+ {
238
+ id: "formal",
239
+ label: "Formal",
240
+ desc: "격식체 · 종결어미 “입니다”",
241
+ useCase: "공공 · 금융 · 법무 · 엔터프라이즈",
242
+ samples: { save: "저장되었습니다.", error: "요청을 처리할 수 없습니다." },
243
+ },
244
+ {
245
+ id: "neutral",
246
+ label: "Neutral",
247
+ desc: "표준 존대 · “입니다 / 해요” 혼용",
248
+ useCase: "일반 웹 UI · B2C 기본",
249
+ samples: { save: "저장했어요.", error: "다시 시도해 주세요." },
250
+ },
251
+ {
252
+ id: "casual",
253
+ label: "Casual",
254
+ desc: "친근체 · 말 놓기 톤 허용",
255
+ useCase: "소셜 · 게임 · 내부 도구",
256
+ samples: { save: "저장 완료!", error: "앗, 뭔가 잘못됐어요." },
257
+ },
258
+ ];
259
+
260
+ // ============================================================
261
+ // Presets — Theme이 묶는 6축(Mode/Shape/Density/Font/Icon/Motion) + 색/언어의 특정 조합에 이름 붙인 것 (1급 객체)
262
+ // ============================================================
263
+
264
+ export type ThemePreset = {
265
+ mode: ModeValue;
266
+ palette: PaletteValue;
267
+ hue: number;
268
+ /** 보조 hue — secondary variant에서만 활용. 미지정이면 primary hue로 폴백. */
269
+ accentHue?: number;
270
+ shape: ShapeValue;
271
+ density: DensityValue;
272
+ motion: MotionValue;
273
+ iconFamily: IconFamily;
274
+ lang: LangValue;
275
+ };
276
+
277
+ export const themePresets: {
278
+ id: string;
279
+ label: string;
280
+ desc: string;
281
+ values: ThemePreset;
282
+ }[] = [
283
+ {
284
+ id: "gov-formal",
285
+ label: "Gov Formal",
286
+ desc: "관공서 · 금융 · 신뢰",
287
+ values: {
288
+ mode: "light", palette: "mono", hue: 210,
289
+ shape: "crisp", density: "compact", motion: "calm",
290
+ iconFamily: "lucide",
291
+ lang: "ko",
292
+ },
293
+ },
294
+ {
295
+ id: "startup-vivid",
296
+ label: "Startup Vivid",
297
+ desc: "스타트업 · 마케팅 · 활력",
298
+ values: {
299
+ mode: "light", palette: "vivid", hue: 25, accentHue: 210,
300
+ shape: "soft", density: "default", motion: "bouncy",
301
+ iconFamily: "phosphor",
302
+ lang: "ko",
303
+ },
304
+ },
305
+ {
306
+ id: "admin-dense",
307
+ label: "Admin Dense",
308
+ desc: "관리 도구 · 데이터 대시보드",
309
+ values: {
310
+ mode: "dark", palette: "standard", hue: 260,
311
+ shape: "crisp", density: "compact", motion: "calm",
312
+ iconFamily: "lucide",
313
+ lang: "ko",
314
+ },
315
+ },
316
+ ];
317
+
318
+ export const motionPrimitives: MotionPrimitive[] = [
319
+ {
320
+ id: "fade",
321
+ label: "Fade",
322
+ role: "상태 전환 (opacity)",
323
+ usage: "hover/focus, 요소 표시/숨김",
324
+ className: "m-preview-fade",
325
+ },
326
+ {
327
+ id: "slide-up",
328
+ label: "Slide Up",
329
+ role: "공간 이동 (translateY)",
330
+ usage: "Toast, Drawer 하단→중앙",
331
+ className: "m-preview-slide-up",
332
+ },
333
+ {
334
+ id: "scale",
335
+ label: "Scale",
336
+ role: "강조 등장",
337
+ usage: "Popover, Modal, Tooltip",
338
+ className: "m-preview-scale",
339
+ },
340
+ {
341
+ id: "pulse",
342
+ label: "Pulse",
343
+ role: "반복 강조",
344
+ usage: "알림 배지, 대기 상태",
345
+ className: "m-pulse",
346
+ },
347
+ {
348
+ id: "spin",
349
+ label: "Spin",
350
+ role: "로딩 회전",
351
+ usage: "Spinner, 로딩 인디케이터",
352
+ className: "m-spin",
353
+ },
354
+ {
355
+ id: "shimmer",
356
+ label: "Shimmer",
357
+ role: "Skeleton 반짝임",
358
+ usage: "Skeleton, 로딩 placeholder",
359
+ className: "m-shimmer",
360
+ },
361
+ ];
362
+
363
+ export const spacing: [string, number][] = [
364
+ ["space-0", 0], ["space-0.5", 2], ["space-1", 4], ["space-1.5", 6],
365
+ ["space-2", 8], ["space-2.5", 10], ["space-3", 12], ["space-4", 16],
366
+ ["space-5", 20], ["space-6", 24], ["space-8", 32], ["space-10", 40],
367
+ ["space-12", 48], ["space-16", 64], ["space-20", 80], ["space-24", 96],
368
+ ];
369
+
370
+ export const spacingUse: Record<string, string> = {
371
+ "space-0.5": "아이콘 미세 간격",
372
+ "space-1": "텍스트-아이콘",
373
+ "space-1.5": "컨트롤 gap, sm/md 아이콘측 패딩",
374
+ "space-2": "버튼 sm 좌우, 작은 gap",
375
+ "space-2.5": "버튼 md 좌우",
376
+ "space-3": "폼 필드 내부, 버튼 lg 아이콘측",
377
+ "space-4": "카드 내부, 기본 gap",
378
+ "space-6": "섹션 내부 여백",
379
+ "space-8": "섹션 간 간격",
380
+ "space-12": "페이지 상단 여백",
381
+ "space-16": "랜딩 섹션 간격",
382
+ };
383
+
384
+ // 섹션(카테고리) 단위 프롬프트 — 원칙, 스케일 선택 전략, 애매할 때, 금지, 관련
385
+ export const sectionPrompts: Record<string, string> = {
386
+ spacing: `Spacing (여백/간격)
387
+
388
+ 원칙
389
+ 관계의 밀도를 시각화한다. 가까울수록 관련성이 강하고, 멀수록 문맥이 분리된다. 모든 값은 4px 배수(--space-* 토큰)만 사용.
390
+
391
+ 스케일 선택 전략
392
+ - 컴포넌트 내부(버튼/입력의 텍스트-아이콘, chip 등): space-1 ~ space-3
393
+ - 관련 있는 요소 사이(카드 내부 블록, 폼 필드 간, 모달 헤더-본문): space-4 ~ space-6
394
+ - 문맥이 다른 섹션 사이(KPI 그룹 → 테이블 등): space-8 ~ space-12
395
+ - 페이지 최상단/히어로: space-16 이상
396
+
397
+ 애매할 때
398
+ 큰 값 쪽으로. 여백 부족보다 여백 과다가 회복 쉬움.
399
+
400
+ line-height 시각 보정 (매우 중요)
401
+ 공간 계산은 항상 인접 요소의 line-height를 함께 본다. 텍스트 박스는 line-height만큼의 여백을 이미 상하로 내포하기 때문에, 물리적으로 대칭인 padding이 시각적으로 비대칭으로 보인다.
402
+
403
+ - 상하좌우 균일 padding의 함정: 모달/카드 상단에 텍스트(타이틀), 하단에 버튼(그래픽 요소)이 오는 경우 padding을 20/20/20/20으로 주면 위쪽이 넓어 보인다. line-height가 1.4 이상이면 특히 심함.
404
+ → 보정: top을 한 단계 줄인다. 예: 상 16 / 좌우 20 / 하 20. 또는 상 space-4 / 하 space-5.
405
+ - 텍스트 ↔ 텍스트 사이 gap: 두 요소 모두 line-height를 품고 있으므로 gap은 보수적으로(한 단계 작게) 잡는다. 예: 라벨-값 관계는 space-1~2로 충분.
406
+ - 텍스트 ↔ 그래픽(아이콘/이미지/버튼) 사이 gap: 그래픽은 line-height 여백이 없으므로 표준 스케일 그대로 쓴다.
407
+ - 그래픽 ↔ 그래픽: 필요하면 한 단계 크게. 시각적 밀착감이 강함.
408
+
409
+ 체크리스트: padding/gap을 정할 때 "이 위/아래(왼/오른) 요소가 텍스트인가 그래픽인가?" 를 먼저 판단한 뒤 스케일을 선택할 것.
410
+
411
+ 금지
412
+ - 스케일 밖의 임의 px(13px, 18px, 22px 등) 사용 금지. 필요하면 디자인 재검토 신호. (단, line-height 보정으로 상/하 값을 다르게 두는 것은 각각이 토큰 값이면 허용)
413
+ - 인접 스케일을 나란히 반복(space-4 옆에 space-5) 금지 — 위계가 사라짐. 최소 2단계 차이. (line-height 보정은 예외)
414
+ - 컴포넌트 간 간격을 space-2 이하로 좁히기 금지 — 각각의 hitbox와 시각적 독립성이 무너짐.
415
+
416
+ 관련
417
+ - Radius: 컴포넌트 크기(패딩)와 반경은 페어링됨. space-2 패딩엔 radius-md, space-4 패딩엔 radius-lg 근처.
418
+ - Typography: line-height는 spacing이 아닌 타이포 시스템으로 별도 관리. spacing으로 줄간격 조절 금지. 단, spacing 설계 시 인접 텍스트의 line-height 값을 반드시 참조.
419
+ - Breakpoint: 페이지 좌우 여백은 모바일 space-6, 데스크톱 space-8~12로 반응형 스왑.`,
420
+ };
421
+
422
+ export const spacingPrompt: Record<string, string> = {
423
+ "space-2": `space-2 (8px)
424
+ 사용처: 버튼/입력 내부의 텍스트-아이콘 간격, 작은 컴포넌트 내부의 요소 간 gap (예: Chip 내부 아이콘+텍스트, Badge 카운트).
425
+ 쓰지 말 것: 컴포넌트 간의 간격 (→ 최소 space-4), 카드 내부 큰 블록 사이 (→ space-4~6).
426
+ 이유: 내부 밀도를 유지하는 최소 단위. 이 값보다 작으면 hitbox가 무너지고, 크면 컴포넌트가 헐거워짐.`,
427
+
428
+ "space-4": `space-4 (16px)
429
+ 사용처: 카드 내부 기본 패딩, 폼 필드 간 세로 간격, 모달의 헤더-본문/본문-푸터 사이, 리스트 아이템 내부 좌우 패딩.
430
+ 쓰지 말 것: 페이지 최상단 여백 (→ space-12+), 관련 없는 섹션 사이 (→ space-8+), 버튼 내부 (→ space-2~3).
431
+ 이유: "관련 있는 요소들의 표준 간격". 이 값이 UI 전반의 기본 리듬을 만든다. 애매하면 이 값부터 시도.`,
432
+
433
+ "space-6": `space-6 (24px)
434
+ 사용처: 한 섹션 안에서 하위 블록들 사이 간격 (예: 카드 헤더-본문 큰 분리), 페이지 좌우 여백 (모바일), 사이드바와 본문 사이.
435
+ 쓰지 말 것: 컴포넌트 내부 요소 사이 (→ space-3~4), 무관한 섹션 사이 (→ space-8+).
436
+ 이유: "같은 문맥이지만 시각적으로 구분되어야 하는 블록"의 간격. space-4보다 명확한 위계를 만들지만 완전 분리는 아님.`,
437
+
438
+ "space-8": `space-8 (32px)
439
+ 사용처: 페이지 내 서로 다른 섹션(예: KPI 카드 그룹 → 테이블) 사이의 세로 간격, 페이지 좌우 여백 (데스크톱).
440
+ 쓰지 말 것: 카드 내부 (→ space-4~6), 나열되는 아이템 간격 (→ space-2~4).
441
+ 이유: "문맥이 바뀌는 지점"의 신호. 이 이상 벌어지면 사용자가 아래로 스크롤하며 별개 페이지처럼 느낀다.`,
442
+ };
443
+
444
+ export const radius: [string, number, string][] = [
445
+ ["radius-none", 0, "표/시트 셀"],
446
+ ["radius-xs", 6, "Chip, Badge"],
447
+ ["radius-sm", 6, "Input, Button (기본)"],
448
+ ["radius-md", 8, "Card"],
449
+ ["radius-lg", 12, "Modal, Popover"],
450
+ ["radius-xl", 16, "대형 카드"],
451
+ ["radius-2xl", 20, "히어로 카드"],
452
+ ["radius-3xl", 24, "랜딩 · 대형 오버레이"],
453
+ ["radius-full", 9999, "Avatar, Pill"],
454
+ ];
455
+
456
+ /** [Token, Size, LineHeight, Weight(400|500|600|700), 용도] */
457
+ export const type: [string, number, number, number, string][] = [
458
+ ["text-xs", 13, 20, 400, "Caption, Helper"],
459
+ ["text-sm", 14, 22, 400, "Body Small, Table"],
460
+ ["text-base", 15.5, 26, 400, "Body (기본)"],
461
+ ["text-lg", 18, 29, 400, "Lead"],
462
+ ["text-xl", 20, 30, 400, "H4"],
463
+ ["text-2xl", 24, 32, 400, "H3"],
464
+ ["text-3xl", 30, 38, 400, "H2"],
465
+ ["text-4xl", 36, 42, 400, "H1"],
466
+ ["text-5xl", 48, 50, 400, "Display"],
467
+ ["label-sm", 14, 22, 500, "Button sm"],
468
+ ["label-md", 15, 22, 500, "Button md/lg, MenuItem"],
469
+ ];
470
+
471
+ /** 그레이 위계 (진함 → 옅음). 판톤식 웨이트 카드로 렌더. */
472
+ /** Gray Scale — 이름은 role 기반(FG/Border/BG × 강도).
473
+ * 실제 밝기는 Mode에 따라 반전되므로 "Black/White" 같은 절대 명칭은 쓰지 않음. */
474
+ export const grayScale: {
475
+ token: string;
476
+ cssVar: string;
477
+ name: string;
478
+ role: string;
479
+ group: "fg" | "border" | "bg";
480
+ }[] = [
481
+ { token: "fg-strong", cssVar: "--fg-strong", name: "FG Strong", role: "헤딩·강조 텍스트", group: "fg" },
482
+ { token: "fg", cssVar: "--fg", name: "FG", role: "본문 텍스트", group: "fg" },
483
+ { token: "fg-muted", cssVar: "--fg-muted", name: "FG Muted", role: "설명·아이콘·부제", group: "fg" },
484
+ { token: "fg-subtle", cssVar: "--fg-subtle", name: "FG Subtle", role: "힌트·placeholder", group: "fg" },
485
+ { token: "fg-disabled", cssVar: "--fg-disabled", name: "FG Disabled", role: "비활성 텍스트", group: "fg" },
486
+ { token: "border-strong",cssVar: "--border-strong", name: "Border Strong", role: "강조 테두리·hover", group: "border" },
487
+ { token: "border", cssVar: "--border", name: "Border", role: "디바이더·인풋·모달 테두리", group: "border" },
488
+ { token: "bg-muted", cssVar: "--bg-muted", name: "BG Muted", role: "카드 배경·hover 표면", group: "bg" },
489
+ { token: "bg-subtle", cssVar: "--bg-subtle", name: "BG Subtle", role: "서브 배경", group: "bg" },
490
+ { token: "bg", cssVar: "--bg", name: "BG", role: "페이지 배경", group: "bg" },
491
+ ];
492
+
493
+ export const colors: [string, string, string][] = [
494
+ ["primary", "var(--primary)", "브랜드 컬러 · 주 액션 · 링크 · focus ring · 차트 강조"],
495
+ ["success", "var(--success)", "성공"],
496
+ ["warning", "var(--warning)", "경고"],
497
+ ["destructive", "var(--destructive)", "삭제, 위험"],
498
+ ["info", "var(--info)", "정보"],
499
+ ];
500
+
501
+ export const colorVarMap: Record<string, string> = {
502
+ primary: "--primary",
503
+ success: "--success",
504
+ warning: "--warning",
505
+ destructive: "--destructive",
506
+ info: "--info",
507
+ };
508
+
509
+ export const shadows: [string, string, string][] = [
510
+ ["shadow-xs", "var(--shadow-xs)", "미세 depth (Input focus 등)"],
511
+ ["shadow-sm", "var(--shadow-sm)", "Card 기본"],
512
+ ["shadow-md", "var(--shadow-md)", "Dropdown, Popover"],
513
+ ["shadow-lg", "var(--shadow-lg)", "Modal"],
514
+ ["shadow-xl", "var(--shadow-xl)", "Command Palette"],
515
+ ["shadow-inner", "var(--shadow-inner)", "눌린 상태"],
516
+ ];
517
+
518
+ export const motion: [string, string, string, string][] = [
519
+ ["duration-fast", "", "hover, tap", "fast"],
520
+ ["duration-base", "", "기본 트랜지션", "base"],
521
+ ["duration-slow", "", "오버레이 등장", "slow"],
522
+ ["duration-slower", "", "페이지 전환", "slower"],
523
+ ];
524
+
525
+ export const zIndex: [string, number, string][] = [
526
+ ["z-base", 0, "기본"],
527
+ ["z-docked", 10, "Sticky header"],
528
+ ["z-dropdown", 1000, "Dropdown, Select"],
529
+ ["z-sticky", 1100, "Sticky element"],
530
+ ["z-overlay", 1300, "Dim overlay"],
531
+ ["z-modal", 1400, "Modal, Drawer"],
532
+ ["z-popover", 1500, "Popover, Hover Card"],
533
+ ["z-toast", 1600, "Toast"],
534
+ ["z-tooltip", 1700, "Tooltip (최상단)"],
535
+ ];
536
+
537
+ export const breakpoints: [string, number][] = [
538
+ ["sm", 640], ["md", 768], ["lg", 1024], ["xl", 1280], ["2xl", 1536],
539
+ ];
540
+
541
+ /**
542
+ * 구현된 컴포넌트 → 상세 페이지 경로 slug 매핑.
543
+ * 여기에 등록된 컴포넌트만 링크 + "ready" 상태로 표시됨.
544
+ * slug는 `/components/{slug}` 아래의 실제 라우트와 일치해야 함.
545
+ */
546
+ export const componentSlugs: Record<string, string> = {
547
+ Button: "general/button",
548
+ "Split Button": "general/split-button",
549
+ "Icon Button": "general/icon-button",
550
+ "Menu Item": "general/menu-item",
551
+ Badge: "general/badge",
552
+ Avatar: "general/avatar",
553
+ Tooltip: "general/tooltip",
554
+ Shortcut: "general/shortcut",
555
+ "Filter Button": "general/filter-button",
556
+ Chip: "general/chip",
557
+ Toolbar: "general/toolbar",
558
+ Input: "input/input",
559
+ Textarea: "input/textarea",
560
+ Form: "input/input",
561
+ Select: "input/select",
562
+ Checkbox: "input/checkbox",
563
+ "Radio Group": "input/radio",
564
+ "Selectable Card": "input/selectable-card",
565
+ "Choice Card": "input/choice-card",
566
+ Switch: "input/switch",
567
+ Slider: "input/slider",
568
+ "Date Picker": "input/date-picker",
569
+ "Time Picker": "input/time-picker",
570
+ Tabs: "nav/tabs",
571
+ Breadcrumb: "nav/breadcrumb",
572
+ Sidebar: "nav/sidebar",
573
+ "Sidebar Split": "nav/sidebar-split",
574
+ Topbar: "nav/topbar",
575
+ Pagination: "nav/pagination",
576
+ "App Frame": "layout/app-frame",
577
+ Stepper: "nav/stepper",
578
+ "Context Menu": "overlay/context-menu",
579
+ Callout: "feedback/callout",
580
+ Modal: "feedback/modal",
581
+ Drawer: "feedback/drawer",
582
+ Toast: "feedback/toast",
583
+ "Table Header": "data/table-header",
584
+ "Table Row": "data/table-row",
585
+ "Table Row Select": "data/table-row-select",
586
+ "Table Row Edit": "data/table-row-edit",
587
+ "List Item": "data/list-item",
588
+ "Metric Card": "data/metric-card",
589
+ "Gallery Item": "data/gallery-item",
590
+ "Empty State": "data/empty-state",
591
+ "Progress Bar": "feedback/progress-bar",
592
+ "File Icon": "chat/file-icon",
593
+ "Attachment Thumb": "chat/attachment-thumb",
594
+ "Attachment Chip": "chat/attachment-chip",
595
+ "Quotation Bar": "chat/quotation-bar",
596
+ "Chat Input": "chat/chat-input",
597
+ };
598
+
599
+ export const components: { id: string; title: string; items: string[] }[] = [
600
+ {
601
+ id: "general",
602
+ title: "General",
603
+ items: [
604
+ "Button", "Split Button", "Icon Button", "Menu Item", "Toolbar", "Badge", "Avatar",
605
+ "Tooltip", "Shortcut", "Filter Button", "Chip", "Separator", "Skeleton", "Aspect Ratio",
606
+ ],
607
+ },
608
+ {
609
+ id: "input",
610
+ title: "Form / Input",
611
+ items: [
612
+ "Input", "Input OTP", "Textarea", "Select", "Combobox", "Multi-Select",
613
+ "Checkbox", "Radio Group", "Selectable Card", "Choice Card", "Switch", "Slider",
614
+ "Date Picker", "Time Picker",
615
+ "File Upload", "Form",
616
+ ],
617
+ },
618
+ {
619
+ id: "data",
620
+ title: "Data Display",
621
+ items: [
622
+ "Table Header", "Table Row", "Table Row Select", "Table Row Edit",
623
+ "List Item", "Metric Card", "Gallery Item",
624
+ "Empty State", "Description List", "Timeline",
625
+ ],
626
+ },
627
+ {
628
+ id: "nav",
629
+ title: "Navigation",
630
+ items: [
631
+ "App Frame", "Tabs", "Breadcrumb", "Sidebar", "Sidebar Split", "Topbar", "Pagination",
632
+ "Stepper",
633
+ ],
634
+ },
635
+ {
636
+ id: "feedback",
637
+ title: "Feedback",
638
+ items: [
639
+ "Modal", "Alert Dialog", "Drawer", "Popover", "Hover Card",
640
+ "Toast", "Callout", "Progress Bar", "Spinner",
641
+ ],
642
+ },
643
+ {
644
+ id: "overlay",
645
+ title: "Overlay / Menu",
646
+ items: [
647
+ "Context Menu", "Command Palette",
648
+ "Accordion", "Collapsible", "Toggle Group",
649
+ ],
650
+ },
651
+ {
652
+ id: "chat",
653
+ title: "AI Chat",
654
+ items: [
655
+ "File Icon", "Attachment Thumb", "Attachment Chip", "Quotation Bar", "Chat Input",
656
+ "Message Bubble", "Chat Sidebar",
657
+ ],
658
+ },
659
+ ];
@@ -0,0 +1,19 @@
1
+ /* CTDS 글로벌 유틸 — 컴포넌트가 참조하는 전역 클래스.
2
+ tokens.css가 이 파일을 import하므로 사용자 플젝에서도 자동 로드.
3
+
4
+ 접근성 유틸의 1px/-1px 값은 "픽셀 토큰"이 아니라 스크린리더 공식 트릭이라
5
+ CTDS 토큰 훅의 EXEMPT_FILES에 등록돼 예외 처리. */
6
+
7
+ /* 스크린리더만 읽는 숨김 — SelectableCard, Checkbox 등 네이티브 input을 가리고
8
+ 커스텀 UI 그리는 컴포넌트가 사용. */
9
+ .visually-hidden {
10
+ position: absolute;
11
+ width: 1px;
12
+ height: 1px;
13
+ padding: 0;
14
+ margin: -1px;
15
+ overflow: hidden;
16
+ clip: rect(0, 0, 0, 0);
17
+ white-space: nowrap;
18
+ border: 0;
19
+ }