@conscience-technology/ovenn 0.6.7 → 0.7.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 (320) hide show
  1. package/assets/components/AIMessage/AIMessage.module.css +2 -1
  2. package/assets/components/Accordion/Accordion.module.css +3 -0
  3. package/assets/components/AppFrame/AppFrame.module.css +2 -0
  4. package/assets/components/AttachmentItem/AttachmentItem.module.css +9 -3
  5. package/assets/components/AttachmentThumb/AttachmentThumb.module.css +4 -0
  6. package/assets/components/Avatar/Avatar.module.css +26 -11
  7. package/assets/components/Avatar/Avatar.tsx +1 -1
  8. package/assets/components/AvatarUpload/AvatarUpload.module.css +4 -3
  9. package/assets/components/Badge/Badge.module.css +96 -70
  10. package/assets/components/Badge/Badge.tsx +33 -25
  11. package/assets/components/Breadcrumb/Breadcrumb.module.css +8 -4
  12. package/assets/components/Breadcrumb/Breadcrumb.tsx +1 -1
  13. package/assets/components/Bubble/Bubble.module.css +6 -0
  14. package/assets/components/Button/Button.module.css +6 -0
  15. package/assets/components/Calendar/Calendar.module.css +244 -0
  16. package/assets/components/Calendar/Calendar.tsx +419 -0
  17. package/assets/components/Calendar/index.ts +2 -0
  18. package/assets/components/Callout/Callout.module.css +1 -0
  19. package/assets/components/Canvas/Canvas.module.css +75 -0
  20. package/assets/components/Canvas/Canvas.tsx +699 -0
  21. package/assets/components/Canvas/alignment.ts +34 -0
  22. package/assets/components/Canvas/clipboard.ts +30 -0
  23. package/assets/components/Canvas/collision.ts +67 -0
  24. package/assets/components/Canvas/edgeOptions.ts +11 -0
  25. package/assets/components/Canvas/graph.ts +11 -0
  26. package/assets/components/Canvas/history.ts +41 -0
  27. package/assets/components/Canvas/index.ts +4 -0
  28. package/assets/components/Canvas/selection.ts +56 -0
  29. package/assets/components/Canvas/tokens.css +61 -0
  30. package/assets/components/Canvas/types.ts +27 -0
  31. package/assets/components/Canvas/useCanvasSettlement.ts +79 -0
  32. package/assets/components/CanvasEdge/CanvasEdge.module.css +62 -0
  33. package/assets/components/CanvasEdge/CanvasEdge.tsx +121 -0
  34. package/assets/components/CanvasEdge/geometry.ts +350 -0
  35. package/assets/components/CanvasEdge/index.ts +4 -0
  36. package/assets/components/CanvasEdge/interactions.ts +14 -0
  37. package/assets/components/CanvasEdge/tokens.css +29 -0
  38. package/assets/components/CanvasNode/CanvasNode.module.css +234 -30
  39. package/assets/components/CanvasNode/CanvasNode.tsx +95 -28
  40. package/assets/components/CanvasNode/index.ts +1 -1
  41. package/assets/components/CanvasNode/runningOutline.ts +59 -0
  42. package/assets/components/CanvasNode/tokens.css +76 -13
  43. package/assets/components/Card/Card.module.css +5 -0
  44. package/assets/components/Chart/Chart.module.css +278 -0
  45. package/assets/components/Chart/Chart.tsx +385 -0
  46. package/assets/components/Chart/entrance.tsx +57 -0
  47. package/assets/components/Chart/index.ts +14 -0
  48. package/assets/components/ChatInput/ChatInput.module.css +5 -0
  49. package/assets/components/Checkbox/Checkbox.module.css +39 -0
  50. package/assets/components/Checkbox/Checkbox.tsx +99 -14
  51. package/assets/components/Checkbox/index.ts +1 -1
  52. package/assets/components/CheckboxCard/CheckboxCard.module.css +1 -177
  53. package/assets/components/CheckboxCard/CheckboxCard.tsx +6 -72
  54. package/assets/components/Chip/Chip.module.css +20 -30
  55. package/assets/components/Code/Code.module.css +1 -0
  56. package/assets/components/CodeBlock/CodeBlock.module.css +7 -3
  57. package/assets/components/ColorArea/ColorArea.module.css +3 -0
  58. package/assets/components/ColorField/ColorField.module.css +6 -0
  59. package/assets/components/ColorField/ColorField.tsx +3 -1
  60. package/assets/components/ColorPicker/ColorPicker.module.css +310 -0
  61. package/assets/components/ColorPicker/ColorPicker.tsx +387 -0
  62. package/assets/components/ColorPicker/index.ts +16 -0
  63. package/assets/components/ColorSlider/ColorSlider.module.css +15 -12
  64. package/assets/components/ColorSlider/ColorSlider.tsx +3 -3
  65. package/assets/components/ColorSwatch/ColorSwatch.module.css +2 -2
  66. package/assets/components/ColorSwatchPicker/ColorSwatchPicker.module.css +4 -3
  67. package/assets/components/Combobox/Combobox.module.css +1 -1
  68. package/assets/components/Combobox/Combobox.tsx +1 -1
  69. package/assets/components/CommandPalette/CommandPalette.module.css +18 -23
  70. package/assets/components/CommandPalette/CommandPalette.tsx +7 -5
  71. package/assets/components/Comment/Comment.module.css +25 -0
  72. package/assets/components/Comment/Comment.tsx +44 -0
  73. package/assets/components/Comment/CommentComposer.module.css +26 -0
  74. package/assets/components/Comment/CommentComposer.tsx +56 -0
  75. package/assets/components/Comment/CommentEditor.module.css +8 -0
  76. package/assets/components/Comment/CommentEditor.tsx +43 -0
  77. package/assets/components/Comment/CommentMentionInput.module.css +9 -0
  78. package/assets/components/Comment/CommentMentionInput.tsx +150 -0
  79. package/assets/components/Comment/index.ts +9 -0
  80. package/assets/components/Comment/types.ts +1 -0
  81. package/assets/components/ContextMenu/ContextMenu.module.css +5 -2
  82. package/assets/components/ContextMenu/ContextMenu.tsx +5 -0
  83. package/assets/components/ControlGroup/ControlGroup.module.css +7 -1
  84. package/assets/components/DataTable/DataTable.module.css +2 -0
  85. package/assets/components/DatePicker/DatePicker.module.css +36 -3
  86. package/assets/components/DatePicker/DatePicker.tsx +11 -1
  87. package/assets/components/DatePicker/TimeSelector.tsx +1 -1
  88. package/assets/components/Disclosure/Disclosure.module.css +1 -0
  89. package/assets/components/Drawer/Drawer.module.css +11 -4
  90. package/assets/components/Drawer/Drawer.tsx +5 -1
  91. package/assets/components/DropdownMenu/DropdownMenu.tsx +5 -0
  92. package/assets/components/EventChip/EventChip.module.css +120 -53
  93. package/assets/components/EventChip/EventChip.tsx +54 -6
  94. package/assets/components/EventChip/index.ts +1 -1
  95. package/assets/components/EventListItem/EventListItem.module.css +3 -0
  96. package/assets/components/EventListItem/EventListItem.tsx +15 -8
  97. package/assets/components/FileIcon/FileIcon.module.css +2 -0
  98. package/assets/components/FileUpload/FileUpload.module.css +10 -3
  99. package/assets/components/FileUpload/FileUpload.tsx +5 -9
  100. package/assets/components/FileUpload/FileUploadItem.tsx +34 -0
  101. package/assets/components/GalleryItem/GalleryItem.module.css +16 -19
  102. package/assets/components/GeneratedImage/GeneratedImage.module.css +2 -0
  103. package/assets/components/Icon/Icon.tsx +264 -1088
  104. package/assets/components/Icon/LucideFamilyIcon.tsx +434 -0
  105. package/assets/components/Icon/MissingIcon.tsx +25 -0
  106. package/assets/components/Icon/SolarFamilyIcon.tsx +439 -0
  107. package/assets/components/Icon/catalogNames.ts +8 -0
  108. package/assets/components/Icon/context.tsx +1 -1
  109. package/assets/components/Icon/index.ts +2 -0
  110. package/assets/components/Icon/lucideCatalog.ts +11358 -0
  111. package/assets/components/Icon/phosphorCatalog.ts +3052 -0
  112. package/assets/components/Icon/solarCatalog.ts +16064 -0
  113. package/assets/components/IconButton/IconButton.module.css +3 -2
  114. package/assets/components/Input/Input.module.css +30 -12
  115. package/assets/components/Input/Input.tsx +1 -1
  116. package/assets/components/Kanban/Kanban.module.css +6 -0
  117. package/assets/components/ListItem/ListItem.module.css +9 -6
  118. package/assets/components/MenuItem/MenuItem.module.css +24 -22
  119. package/assets/components/MenuItem/MenuItem.tsx +12 -12
  120. package/assets/components/MessageActions/MessageActions.module.css +36 -0
  121. package/assets/components/MessageActions/MessageActions.tsx +53 -28
  122. package/assets/components/MessageQuote/MessageQuote.module.css +1 -0
  123. package/assets/components/MessageSources/MessageSources.module.css +2 -0
  124. package/assets/components/MessageState/MessageState.module.css +1 -1
  125. package/assets/components/MetricCard/MetricCard.module.css +96 -108
  126. package/assets/components/MetricCard/MetricCard.tsx +45 -23
  127. package/assets/components/MetricCard/tokens.css +10 -0
  128. package/assets/components/MiniCalendar/MiniCalendar.module.css +130 -0
  129. package/assets/components/MiniCalendar/MiniCalendar.tsx +161 -0
  130. package/assets/components/MiniCalendar/index.ts +2 -0
  131. package/assets/components/Modal/Modal.module.css +13 -4
  132. package/assets/components/Modal/Modal.tsx +4 -0
  133. package/assets/components/Onboarding/LayoutBuilder.tsx +12 -50
  134. package/assets/components/Onboarding/Onboarding.module.css +211 -278
  135. package/assets/components/Onboarding/OnboardingAxisPanel.tsx +81 -125
  136. package/assets/components/Onboarding/OnboardingPage.tsx +244 -467
  137. package/assets/components/Onboarding/actions.ts +5 -0
  138. package/assets/components/Onboarding/palette.css +8 -0
  139. package/assets/components/Onboarding/wizardData.ts +8 -8
  140. package/assets/components/ProgressBar/ProgressBar.module.css +8 -8
  141. package/assets/components/ProgressBar/ProgressBar.tsx +0 -5
  142. package/assets/components/ProgressBar/index.ts +0 -1
  143. package/assets/components/QuotationBar/QuotationBar.module.css +2 -0
  144. package/assets/components/Radio/Radio.module.css +2 -0
  145. package/assets/components/RadioCard/RadioCard.module.css +78 -3
  146. package/assets/components/RadioCard/RadioCard.tsx +34 -12
  147. package/assets/components/RadioCard/index.ts +1 -1
  148. package/assets/components/SegmentedChart/SegmentedChart.module.css +16 -0
  149. package/assets/components/SegmentedChart/SegmentedChart.tsx +25 -8
  150. package/assets/components/Select/Select.tsx +7 -4
  151. package/assets/components/Shortcut/Shortcut.module.css +2 -0
  152. package/assets/components/Sidebar/Sidebar.module.css +1 -0
  153. package/assets/components/Sidebar/Sidebar.tsx +2 -2
  154. package/assets/components/Skeleton/Skeleton.module.css +33 -0
  155. package/assets/components/Skeleton/Skeleton.tsx +20 -0
  156. package/assets/components/Skeleton/index.ts +2 -0
  157. package/assets/components/Skeleton/tokens.css +11 -0
  158. package/assets/components/Slider/Slider.module.css +3 -0
  159. package/assets/components/Slider/Slider.tsx +7 -2
  160. package/assets/components/Spinner/LottiePlayer.tsx +4 -4
  161. package/assets/components/Spinner/Spinner.module.css +3 -0
  162. package/assets/components/Spinner/lottieManifest.ts +3 -0
  163. package/assets/components/Stepper/Stepper.module.css +56 -8
  164. package/assets/components/Stepper/Stepper.tsx +13 -4
  165. package/assets/components/Switch/Switch.module.css +55 -42
  166. package/assets/components/Switch/Switch.tsx +6 -2
  167. package/assets/components/Switch/index.ts +1 -1
  168. package/assets/components/TabStrip/TabStrip.module.css +5 -1
  169. package/assets/components/TableCell/TableCell.module.css +8 -1
  170. package/assets/components/TableCell/TableCellBadge.tsx +7 -3
  171. package/assets/components/TableCell/TableCellImage.tsx +1 -1
  172. package/assets/components/TableCell/TableCellTag.tsx +23 -0
  173. package/assets/components/TableCell/index.ts +3 -0
  174. package/assets/components/TableHeader/TableHeader.module.css +4 -0
  175. package/assets/components/TableRow/TableRow.module.css +3 -0
  176. package/assets/components/TableRowEdit/TableRowEdit.module.css +2 -0
  177. package/assets/components/TableToolbar/TableToolbar.module.css +1 -0
  178. package/assets/components/Tabs/Tabs.module.css +22 -7
  179. package/assets/components/Tabs/Tabs.tsx +2 -1
  180. package/assets/components/Tag/Tag.module.css +101 -0
  181. package/assets/components/Tag/Tag.tsx +55 -0
  182. package/assets/components/Tag/index.ts +2 -0
  183. package/assets/components/TemplateBoundary/TemplateBoundary.tsx +22 -18
  184. package/assets/components/TemplateBoundary/types.ts +2 -0
  185. package/assets/components/Textarea/Textarea.module.css +7 -0
  186. package/assets/components/ThemeController.tsx +30 -3
  187. package/assets/components/TimePicker/TimePicker.module.css +1 -0
  188. package/assets/components/TimePicker/TimePicker.tsx +37 -16
  189. package/assets/components/TimelineView/TimelineEventBar.tsx +109 -0
  190. package/assets/components/TimelineView/TimelineView.module.css +203 -0
  191. package/assets/components/TimelineView/TimelineView.tsx +137 -0
  192. package/assets/components/TimelineView/axis.ts +62 -0
  193. package/assets/components/TimelineView/index.ts +3 -0
  194. package/assets/components/TimelineView/layout.ts +56 -0
  195. package/assets/components/TimelineView/move.ts +51 -0
  196. package/assets/components/TimelineView/useTimelineDrag.ts +215 -0
  197. package/assets/components/TimelineView/useTimelineZoom.ts +92 -0
  198. package/assets/components/Toast/Toast.module.css +2 -0
  199. package/assets/components/Toolbar/Toolbar.module.css +31 -24
  200. package/assets/components/Toolbar/Toolbar.tsx +4 -3
  201. package/assets/components/Tooltip/Tooltip.module.css +10 -0
  202. package/assets/components/Tooltip/Tooltip.tsx +17 -8
  203. package/assets/components/TopLoader/TopLoader.module.css +1 -0
  204. package/assets/components/TreeNav/TreeNav.module.css +1 -0
  205. package/assets/components/_color.ts +2 -2
  206. package/assets/components/_data.ts +33 -32
  207. package/assets/components/_utils.css +5 -0
  208. package/assets/components/axisOptions.ts +2 -0
  209. package/assets/components/component-registry.json +151 -2
  210. package/assets/components/index.ts +16 -0
  211. package/assets/components/materialScope.tsx +11 -0
  212. package/assets/components/reset.css +1 -0
  213. package/assets/components/themeBootScript.ts +3 -2
  214. package/assets/components/tokens.css +225 -71
  215. package/assets/components/useChartEntrance.ts +119 -0
  216. package/assets/prompts/ASSEMBLY.md +9 -7
  217. package/assets/prompts/CATALOG.md +18 -4
  218. package/assets/prompts/FEEDBACK_PROCESS.md +19 -0
  219. package/assets/prompts/PRINCIPLES.md +14 -0
  220. package/assets/prompts/WORKFLOW_DESIGN.md +46 -70
  221. package/assets/prompts/axes/font.md +6 -1
  222. package/assets/prompts/axes/icon.md +6 -4
  223. package/assets/prompts/axes/material.md +40 -0
  224. package/assets/prompts/axes/palette.md +2 -1
  225. package/assets/prompts/axes/shape.md +8 -0
  226. package/assets/prompts/components/attachment-item.md +2 -1
  227. package/assets/prompts/components/badge.md +32 -97
  228. package/assets/prompts/components/breadcrumb.md +1 -0
  229. package/assets/prompts/components/calendar.md +151 -0
  230. package/assets/prompts/components/canvas-edge.md +67 -0
  231. package/assets/prompts/components/canvas-node.md +25 -8
  232. package/assets/prompts/components/canvas.md +82 -0
  233. package/assets/prompts/components/card.md +10 -10
  234. package/assets/prompts/components/chart-bar.md +77 -0
  235. package/assets/prompts/components/chart-pie.md +63 -0
  236. package/assets/prompts/components/chart-radar.md +56 -0
  237. package/assets/prompts/components/chart-radial.md +56 -0
  238. package/assets/prompts/components/chart.md +129 -0
  239. package/assets/prompts/components/checkbox-card.md +26 -45
  240. package/assets/prompts/components/checkbox.md +23 -0
  241. package/assets/prompts/components/chip.md +6 -6
  242. package/assets/prompts/components/code-block.md +1 -0
  243. package/assets/prompts/components/color-picker.md +173 -0
  244. package/assets/prompts/components/color-slider.md +7 -7
  245. package/assets/prompts/components/command-palette.md +7 -6
  246. package/assets/prompts/components/comment.md +72 -0
  247. package/assets/prompts/components/context-menu.md +6 -3
  248. package/assets/prompts/components/data-table.md +9 -0
  249. package/assets/prompts/components/date-picker.md +10 -0
  250. package/assets/prompts/components/drawer.md +10 -0
  251. package/assets/prompts/components/dropdown-menu.md +3 -1
  252. package/assets/prompts/components/event-chip.md +60 -18
  253. package/assets/prompts/components/event-list-item.md +14 -10
  254. package/assets/prompts/components/file-upload.md +1 -1
  255. package/assets/prompts/components/gallery-item.md +5 -4
  256. package/assets/prompts/components/icon.md +30 -8
  257. package/assets/prompts/components/kanban.md +1 -1
  258. package/assets/prompts/components/list-item.md +11 -2
  259. package/assets/prompts/components/menu-item.md +8 -3
  260. package/assets/prompts/components/message-actions.md +9 -0
  261. package/assets/prompts/components/metric-card.md +57 -109
  262. package/assets/prompts/components/mini-calendar.md +72 -0
  263. package/assets/prompts/components/modal.md +1 -0
  264. package/assets/prompts/components/onboarding.md +11 -7
  265. package/assets/prompts/components/page-header.md +11 -2
  266. package/assets/prompts/components/progress-bar.md +12 -2
  267. package/assets/prompts/components/radio-card.md +33 -117
  268. package/assets/prompts/components/segmented-chart.md +19 -5
  269. package/assets/prompts/components/select.md +1 -0
  270. package/assets/prompts/components/sidebar.md +12 -3
  271. package/assets/prompts/components/skeleton.md +44 -0
  272. package/assets/prompts/components/stepper.md +15 -1
  273. package/assets/prompts/components/switch.md +15 -10
  274. package/assets/prompts/components/tab-strip.md +1 -0
  275. package/assets/prompts/components/table-cell.md +6 -4
  276. package/assets/prompts/components/table-row.md +12 -3
  277. package/assets/prompts/components/table-toolbar.md +9 -0
  278. package/assets/prompts/components/tabs.md +4 -2
  279. package/assets/prompts/components/tag.md +54 -0
  280. package/assets/prompts/components/time-picker.md +1 -0
  281. package/assets/prompts/components/timeline-view.md +129 -0
  282. package/assets/prompts/components/toast.md +1 -1
  283. package/assets/prompts/components/toolbar.md +17 -4
  284. package/assets/prompts/components/tooltip.md +21 -3
  285. package/assets/prompts/components/top-loader.md +1 -1
  286. package/assets/prompts/components/topbar.md +9 -0
  287. package/assets/prompts/components/tree-nav.md +1 -1
  288. package/assets/prompts/templates/ains.md +2 -1
  289. package/assets/prompts/templates/aurora.md +5 -4
  290. package/assets/prompts/templates/glass-button.md +6 -5
  291. package/assets/prompts/templates/minimal.md +8 -6
  292. package/assets/prompts/templates/workspace.md +3 -3
  293. package/assets/prompts/tokens/color.md +4 -2
  294. package/assets/prompts/tokens/material.md +51 -0
  295. package/assets/prompts/tokens/radius.md +12 -0
  296. package/assets/prompts/tokens/typography.md +24 -2
  297. package/assets/prompts/use-cases/chart-chart-area.md +1334 -0
  298. package/assets/prompts/use-cases/chart-chart-bar.md +1886 -0
  299. package/assets/prompts/use-cases/chart-chart-pie.md +1031 -0
  300. package/assets/prompts/use-cases/chart-chart-radar.md +785 -0
  301. package/assets/prompts/use-cases/chart-chart-radial.md +988 -0
  302. package/assets/prompts/use-cases/chart-segmented-chart.md +262 -0
  303. package/assets/prompts/use-cases/data-comment.md +360 -0
  304. package/assets/prompts/use-cases/data-data-table.md +249 -0
  305. package/assets/prompts/use-cases/data-list-item.md +1056 -0
  306. package/assets/prompts/use-cases/data-metric-card.md +673 -0
  307. package/assets/prompts/use-cases/data-table-row.md +966 -0
  308. package/assets/prompts/use-cases/data-table-toolbar.md +481 -0
  309. package/assets/prompts/use-cases/feedback-drawer.md +1163 -0
  310. package/assets/prompts/use-cases/feedback-progress-bar.md +427 -0
  311. package/assets/prompts/use-cases/general-toolbar.md +854 -0
  312. package/assets/prompts/use-cases/general-tooltip.md +652 -0
  313. package/assets/prompts/use-cases/input-checkbox.md +443 -0
  314. package/assets/prompts/use-cases/structure-card.md +603 -0
  315. package/assets/prompts/use-cases/structure-page-header.md +755 -0
  316. package/assets/prompts/use-cases/structure-sidebar.md +1132 -0
  317. package/assets/prompts/use-cases/structure-topbar.md +1200 -0
  318. package/assets/public/ovenn-wordmark.svg +19 -0
  319. package/package.json +6 -2
  320. package/src/commands/info.js +1 -1
@@ -0,0 +1,603 @@
1
+ # Card 사용 사례 소스
2
+
3
+ <!-- Generated by scripts/build-use-cases.mjs. Edit original TSX/CSS, then regenerate. -->
4
+
5
+ ### 사례 목록
6
+
7
+ - Deal pipeline card
8
+
9
+ 문서: /en/components/structure/card#use-cases
10
+
11
+ 문서 페이지에서 렌더하는 사례입니다.
12
+
13
+ ### 조회 방법
14
+
15
+ get_guide(topic="use-cases/structure-card", sections=["사례 목록", "파일 목록"])로 먼저 확인하고, 필요한 Section 또는 Source 파일 헤딩만 sections로 조회하세요. 전체 문서는 문서 페이지의 다른 예제도 포함합니다. 공용 컴포넌트 계약은 get_component로 읽고, 예제의 docs 전용 셸·locale·import 경로는 대상 프로젝트에 맞게 조합하세요. 이 연결은 디자인 승인이나 기능 검증을 뜻하지 않습니다.
16
+
17
+ ### 파일 목록
18
+
19
+ - `web/app/[lang]/components/structure/card/_strings.tsx`
20
+ - `web/app/[lang]/components/structure/card/page.module.css`
21
+ - `web/app/[lang]/components/structure/card/page.tsx`
22
+ - `web/examples/PipelineCardExample.module.css`
23
+ - `web/examples/PipelineCardExample.tsx`
24
+
25
+ ### Section: web/app/[lang]/components/structure/card/page.tsx#use-cases
26
+
27
+ ```tsx
28
+ <section id="use-cases" className={styles.useCases}>
29
+ <h2>{t.useCases.heading}</h2>
30
+ <h3>{t.useCases.pipeline}</h3>
31
+ <ExampleBlock>
32
+ <PipelineCardExample lang="en" />
33
+ </ExampleBlock>
34
+ </section>
35
+ ```
36
+
37
+ ### Source: web/app/[lang]/components/structure/card/_strings.tsx
38
+
39
+ ````tsx
40
+ import { Code } from "@/components/Code";
41
+ import type { ReactNode } from "react";
42
+
43
+ type Strings = {
44
+ title: string;
45
+ lead: ReactNode;
46
+ usage: { heading: string; desc: ReactNode };
47
+ useCases: { heading: string; pipeline: string };
48
+ playgroundDesc: string;
49
+ variants: { heading: string; desc: ReactNode };
50
+ sizes: { heading: string; desc: ReactNode };
51
+ api: {
52
+ heading: string;
53
+ columns: { prop: string; type: string; default: string; desc: string };
54
+ rows: { variant: string; size: string; interactive: string };
55
+ };
56
+ basic: { title: string; body: string };
57
+ projectSummary: {
58
+ title: string;
59
+ desc: string;
60
+ inProgress: string;
61
+ waiting: string;
62
+ done: string;
63
+ };
64
+ variantHints: { line: string; soft: string; elevated: string; framed: string };
65
+ sizeHints: { sm: string; md: string; lg: string; xl: string };
66
+ sizesPaddingNote: string;
67
+ widthLabel: string;
68
+ };
69
+
70
+ const en: Strings = {
71
+ useCases: { pipeline: "Deal pipeline card", heading: "Use cases" },
72
+ title: "Card",
73
+ lead: (
74
+ <>
75
+ The <strong>surface</strong> for a content group. Three jobs only: background, radius,
76
+ padding. Card doesn&apos;t know what&apos;s inside it; the inner structure (title,
77
+ description, actions) belongs to dedicated vocabulary like PageHeader, ListItem, or
78
+ MetricCard.
79
+ </>
80
+ ),
81
+ usage: {
82
+ heading: "Usage",
83
+ desc: (
84
+ <>
85
+ Any ReactNode as children. Default is <Code>line</Code> and <Code>md</Code>.
86
+ </>
87
+ ),
88
+ },
89
+ playgroundDesc:
90
+ "Mix variant, size, and shape. The Shape axis is overridden only inside this demo.",
91
+ variants: {
92
+ heading: "Variants",
93
+ desc: (
94
+ <>
95
+ Four tones. <Code>line</Code> border only, <Code>soft</Code> bg-subtle only,
96
+ <Code>elevated</Code> shadow only, <Code>framed</Code> shadow plus hairline. line and soft
97
+ use border-led and fill-led defaults; combined surfaces require the very subtle colour difference in PRINCIPLES §5b; elevated and framed let shadow carry the look.
98
+ </>
99
+ ),
100
+ },
101
+ sizes: {
102
+ heading: "Sizes",
103
+ desc: (
104
+ <>
105
+ A padding + radius set. Card does not set its own width; pick size by{" "}
106
+ <strong>recommended outer width</strong>: <Code>sm</Code> ≤ 240px,{" "}
107
+ <Code>md</Code> 240 to 480px, <Code>lg</Code> 480 to 720px, <Code>xl</Code> ≥ 720px.
108
+ Radius responds to the Shape axis. Use the playground shape toggle to compare.
109
+ </>
110
+ ),
111
+ },
112
+ api: {
113
+ heading: "API Reference",
114
+ columns: { prop: "Prop", type: "Type", default: "Default", desc: "Description" },
115
+ rows: {
116
+ variant:
117
+ "Tone. line and soft use border-led and fill-led defaults (surface changes follow PRINCIPLES §5b), elevated is shadow only, framed is shadow plus border.",
118
+ size: "A padding + radius set. Inner gap is supplied by the consumer.",
119
+ interactive: "Supplies hover, active, and focus feedback. Use for link or button roles.",
120
+ },
121
+ },
122
+ basic: { title: "Project files", body: "Proposals, quotes and contracts" },
123
+ projectSummary: {
124
+ title: "Project summary",
125
+ desc: "Work in progress this quarter.",
126
+ inProgress: "In progress",
127
+ waiting: "Waiting",
128
+ done: "Done",
129
+ },
130
+ variantHints: {
131
+ line: "A quiet grouping. The most common.",
132
+ soft: "Separates by a bg-subtle tone shift.",
133
+ elevated: "Lifted by shadow.",
134
+ framed: "Shadow plus hairline. shadcn tone.",
135
+ },
136
+ sizeHints: {
137
+ sm: "sm: tight lists, compact",
138
+ md: "md: general section (default)",
139
+ lg: "lg: wide single-column block",
140
+ xl: "xl: landing or main block",
141
+ },
142
+ sizesPaddingNote: "Inner padding and radius swap naturally per size.",
143
+ widthLabel: "width",
144
+ };
145
+
146
+ const ko: Strings = {
147
+ useCases: { pipeline: "거래 파이프라인 카드", heading: "사용 사례" },
148
+ title: "Card",
149
+ lead: (
150
+ <>
151
+ 콘텐츠 묶음의 <strong>표면</strong>. 역할은 셋뿐 (배경, radius, padding). 안쪽에
152
+ 뭐가 들어가든 Card는 모르고, 제목이나 설명, 액션 같은 안쪽 구조는 전용 어휘(PageHeader,
153
+ ListItem, MetricCard 등)가 담당합니다.
154
+ </>
155
+ ),
156
+ usage: {
157
+ heading: "Usage",
158
+ desc: (
159
+ <>
160
+ children은 자유. 어떤 ReactNode든 Card 안에. 기본은 <Code>line</Code>, <Code>md</Code>.
161
+ </>
162
+ ),
163
+ },
164
+ playgroundDesc: "variant, size, shape를 조합해보세요. shape 축은 이 데모 안에서만 override됩니다.",
165
+ variants: {
166
+ heading: "Variants",
167
+ desc: (
168
+ <>
169
+ 네 가지 톤. <Code>line</Code> 테두리만, <Code>soft</Code> bg-subtle만,
170
+ <Code>elevated</Code> shadow만, <Code>framed</Code> shadow + hairline.
171
+ line과 soft는 각각 선·배경 중심 기본형(조합은 PRINCIPLES §5b 적용), elevated와 framed는 shadow가 주인공.
172
+ </>
173
+ ),
174
+ },
175
+ sizes: {
176
+ heading: "Sizes",
177
+ desc: (
178
+ <>
179
+ padding + radius 세트. Card는 폭을 결정하지 않고 size는 <strong>추천 바깥 폭</strong>에
180
+ 따라 선택: <Code>sm</Code> ≤ 240px, <Code>md</Code> 240~480px,{" "}
181
+ <Code>lg</Code> 480~720px, <Code>xl</Code> ≥ 720px. Shape 축에 따라 radius가
182
+ 자동 반응합니다. Playground의 shape 토글로 비교해보세요.
183
+ </>
184
+ ),
185
+ },
186
+ api: {
187
+ heading: "API Reference",
188
+ columns: { prop: "Prop", type: "Type", default: "Default", desc: "Description" },
189
+ rows: {
190
+ variant:
191
+ "톤. line과 soft는 각각 선·배경 중심 기본형(조합은 PRINCIPLES §5b 적용), elevated는 shadow만, framed는 shadow+border 조합.",
192
+ size: "padding + radius 세트. 안쪽 gap은 소비처가 공급.",
193
+ interactive: "호버, active, focus 피드백 공급. 링크나 버튼 역할일 때.",
194
+ },
195
+ },
196
+ basic: { title: "프로젝트 자료", body: "제안서, 견적서, 계약서" },
197
+ projectSummary: {
198
+ title: "프로젝트 요약",
199
+ desc: "이번 분기 진행 중인 작업.",
200
+ inProgress: "진행 중",
201
+ waiting: "대기",
202
+ done: "완료",
203
+ },
204
+ variantHints: {
205
+ line: "조용한 묶음. 가장 자주.",
206
+ soft: "bg-subtle 톤 차이로 분리.",
207
+ elevated: "shadow로 들어올림.",
208
+ framed: "shadow + hairline. shadcn 톤.",
209
+ },
210
+ sizeHints: {
211
+ sm: "sm. 좁은 리스트, compact",
212
+ md: "md. 일반 섹션 (기본)",
213
+ lg: "lg. 넓은 1컬럼 블록",
214
+ xl: "xl. 랜딩, 메인 블록",
215
+ },
216
+ sizesPaddingNote: "안쪽 padding과 radius가 size별로 자연스럽게 스왑됩니다.",
217
+ widthLabel: "폭",
218
+ };
219
+
220
+ export const strings = { en, ko };
221
+ export type { Strings };
222
+ ````
223
+
224
+ ### Source: web/app/[lang]/components/structure/card/page.module.css
225
+
226
+ ````css
227
+ .useCases :global(.example-preview) {
228
+ padding: var(--space-4);
229
+ }
230
+ ````
231
+
232
+ ### Source: web/app/[lang]/components/structure/card/page.tsx
233
+
234
+ ````tsx
235
+ "use client";
236
+
237
+ import { Tag } from "@/components/Tag";
238
+ import { useState } from "react";
239
+ import { usePathname } from "next/navigation";
240
+ import { Card, type CardVariant, type CardSize } from "@/components/Card";
241
+ import { PipelineCardExample } from "@/examples/PipelineCardExample";
242
+ import { Code } from "@/components/Code";
243
+ import { ExampleBlock } from "../../../../_components/ExampleBlock";
244
+ import { Playground } from "../../../../_components/Playground";
245
+ import { DocsTable } from "../../../../_components/DocsTable";
246
+ import { localeFromPathname } from "../../../../_dict";
247
+ import { strings, type Strings } from "./_strings";
248
+ import styles from "./page.module.css";
249
+
250
+ const VARIANT_OPTIONS = ["line", "soft", "elevated", "framed"] as const;
251
+ const SIZE_OPTIONS = ["sm", "md", "lg", "xl"] as const;
252
+ const SHAPE_OPTIONS = ["soft", "standard", "crisp"] as const;
253
+ type Shape = (typeof SHAPE_OPTIONS)[number];
254
+
255
+ export default function CardPage() {
256
+ const pathname = usePathname() ?? "/";
257
+ const t = strings[localeFromPathname(pathname)];
258
+ const [variant, setVariant] = useState<CardVariant>("line");
259
+ const [size, setSize] = useState<CardSize>("md");
260
+ const [shape, setShape] = useState<Shape>("standard");
261
+ const [interactive, setInteractive] = useState(false);
262
+
263
+ const SIZE_SAMPLES: { size: CardSize; width: string; hint: string }[] = [
264
+ { size: "sm", width: "240px", hint: strings.en.sizeHints.sm },
265
+ { size: "md", width: "360px", hint: strings.en.sizeHints.md },
266
+ { size: "lg", width: "560px", hint: strings.en.sizeHints.lg },
267
+ { size: "xl", width: "800px", hint: strings.en.sizeHints.xl },
268
+ ];
269
+
270
+ // Hook check_card_size.py literally greps for <Card ... size="lg|xl">.
271
+ // Compose the code example from a split tag so the pattern never appears in source.
272
+ const cardTag = "<" + "Card";
273
+ const sizesExampleCode = [
274
+ `${cardTag} size="sm"> {/* ${strings.en.sizeHints.sm} */}`,
275
+ `${cardTag} size="md"> {/* ${strings.en.sizeHints.md} */}`,
276
+ `${cardTag} size="lg"> {/* ${strings.en.sizeHints.lg} */}`,
277
+ `${cardTag} size="xl"> {/* ${strings.en.sizeHints.xl} */}`,
278
+ ].join("\n");
279
+
280
+ return (
281
+ <>
282
+ <h1 className="page-title">{t.title}</h1>
283
+ <p className="page-lead">{t.lead}</p>
284
+
285
+ {/* USAGE */}
286
+ <section id="usage" className="section-first">
287
+ <h2>{t.usage.heading}</h2>
288
+ <p className="desc">{t.usage.desc}</p>
289
+ <ExampleBlock
290
+ align="column"
291
+ code={`import { Card } from "@/components/Card";
292
+
293
+ <Card>
294
+ <h3>${strings.en.basic.title}</h3>
295
+ <p>${strings.en.basic.body}</p>
296
+ </Card>`}
297
+ >
298
+ <Card>
299
+ <div style={stackStyle("var(--space-1)")}>
300
+ <h3 style={titleStyle}>{strings.en.basic.title}</h3>
301
+ <p style={mutedStyle}>{strings.en.basic.body}</p>
302
+ </div>
303
+ </Card>
304
+ </ExampleBlock>
305
+ </section>
306
+
307
+ {/* PLAYGROUND */}
308
+ <Playground
309
+ desc={t.playgroundDesc}
310
+ axes={[
311
+ {
312
+ label: "variant",
313
+ value: variant,
314
+ onChange: (v) => setVariant(v as CardVariant),
315
+ options: VARIANT_OPTIONS,
316
+ },
317
+ {
318
+ label: "size",
319
+ value: size,
320
+ onChange: (v) => setSize(v as CardSize),
321
+ options: SIZE_OPTIONS,
322
+ },
323
+ {
324
+ label: "shape",
325
+ value: shape,
326
+ onChange: (v) => setShape(v as Shape),
327
+ options: SHAPE_OPTIONS,
328
+ },
329
+ ]}
330
+ toggles={[
331
+ { label: "interactive", value: interactive, onChange: setInteractive },
332
+ ]}
333
+ >
334
+ <div data-shape={shape} style={{ width: "100%" }}>
335
+ <Card variant={variant} size={size} interactive={interactive}>
336
+ <div style={stackStyle("var(--space-2)")}>
337
+ <h3 style={titleStyle}>{strings.en.projectSummary.title}</h3>
338
+ <p style={mutedStyle}>{strings.en.projectSummary.desc}</p>
339
+ <div style={stackStyle("var(--space-1_5)")}>
340
+ <SettingRow label={strings.en.projectSummary.inProgress} value="12" />
341
+ <SettingRow label={strings.en.projectSummary.waiting} value="5" />
342
+ <SettingRow label={strings.en.projectSummary.done} value="38" />
343
+ </div>
344
+ </div>
345
+ </Card>
346
+ </div>
347
+ </Playground>
348
+
349
+ {/* VARIANTS */}
350
+ <section id="variants">
351
+ <h2>{t.variants.heading}</h2>
352
+ <p className="desc">{t.variants.desc}</p>
353
+ <ExampleBlock
354
+ align="column"
355
+ code={`<Card variant="line">...</Card>
356
+ <Card variant="soft">...</Card>
357
+ <Card variant="elevated">...</Card>
358
+ <Card variant="framed">...</Card>`}
359
+ >
360
+ <div style={stackStyle("var(--space-3)")}>
361
+ {VARIANT_OPTIONS.map((v) => (
362
+ <Card key={v} variant={v}>
363
+ <div style={headerRowStyle}>
364
+ <div style={stackStyle("var(--space-0_5)")}>
365
+ <strong
366
+ style={{
367
+ fontWeight: "var(--font-weight-medium)",
368
+ color: "var(--fg-strong)",
369
+ }}
370
+ >
371
+ variant = {v}
372
+ </strong>
373
+ <span style={mutedStyle}>{variantHint(v, strings.en)}</span>
374
+ </div>
375
+ <Tag variant="soft">{v}</Tag>
376
+ </div>
377
+ </Card>
378
+ ))}
379
+ </div>
380
+ </ExampleBlock>
381
+ </section>
382
+
383
+ {/* SIZES */}
384
+ <section id="sizes">
385
+ <h2>{t.sizes.heading}</h2>
386
+ <p className="desc">{t.sizes.desc}</p>
387
+ <ExampleBlock align="column" code={sizesExampleCode}>
388
+ <div
389
+ style={{
390
+ display: "flex",
391
+ flexDirection: "column",
392
+ gap: "var(--space-3)",
393
+ alignItems: "flex-start",
394
+ width: "100%",
395
+ }}
396
+ >
397
+ {SIZE_SAMPLES.map(({ size: sz, width, hint }) => (
398
+ <div key={sz} style={{ width, maxWidth: "100%" }}>
399
+ <div
400
+ style={{
401
+ color: "var(--fg-subtle)",
402
+ fontSize: "var(--text-xs)",
403
+ marginBottom: "var(--space-1)",
404
+ }}
405
+ >
406
+ size={sz} · {strings.en.widthLabel} {width}
407
+ </div>
408
+ <Card size={sz}>
409
+ <div
410
+ style={stackStyle(
411
+ sz === "sm" ? "var(--space-0_5)" : "var(--space-1)",
412
+ )}
413
+ >
414
+ <strong
415
+ style={{
416
+ fontWeight: "var(--font-weight-medium)",
417
+ fontSize:
418
+ sz === "sm"
419
+ ? "var(--label-sm-size)"
420
+ : "var(--text-base)",
421
+ color: "var(--fg-strong)",
422
+ }}
423
+ >
424
+ {hint}
425
+ </strong>
426
+ <span
427
+ style={{
428
+ color: "var(--fg-muted)",
429
+ fontSize:
430
+ sz === "sm" ? "var(--text-xs)" : "var(--text-sm)",
431
+ }}
432
+ >
433
+ {strings.en.sizesPaddingNote}
434
+ </span>
435
+ </div>
436
+ </Card>
437
+ </div>
438
+ ))}
439
+ </div>
440
+ </ExampleBlock>
441
+ </section>
442
+
443
+ <section id="use-cases" className={styles.useCases}>
444
+ <h2>{t.useCases.heading}</h2>
445
+ <h3>{t.useCases.pipeline}</h3>
446
+ <ExampleBlock>
447
+ <PipelineCardExample lang="en" />
448
+ </ExampleBlock>
449
+ </section>
450
+
451
+ {/* API REFERENCE */}
452
+ <section id="api">
453
+ <h2>{t.api.heading}</h2>
454
+ <DocsTable
455
+ columns={[
456
+ { key: "prop", label: t.api.columns.prop, width: 160 },
457
+ { key: "type", label: t.api.columns.type, flex: true, minWidth: 200 },
458
+ { key: "default", label: t.api.columns.default, width: 120 },
459
+ { key: "desc", label: t.api.columns.desc, flex: true, minWidth: 240 },
460
+ ]}
461
+ rows={[
462
+ {
463
+ prop: <Code>variant</Code>,
464
+ type: (
465
+ <Code>
466
+ &apos;line&apos; | &apos;soft&apos; | &apos;elevated&apos; | &apos;framed&apos;
467
+ </Code>
468
+ ),
469
+ default: <Code>&apos;line&apos;</Code>,
470
+ desc: t.api.rows.variant,
471
+ },
472
+ {
473
+ prop: <Code>size</Code>,
474
+ type: (
475
+ <Code>
476
+ &apos;sm&apos; | &apos;md&apos; | &apos;lg&apos; | &apos;xl&apos;
477
+ </Code>
478
+ ),
479
+ default: <Code>&apos;md&apos;</Code>,
480
+ desc: t.api.rows.size,
481
+ },
482
+ {
483
+ prop: <Code>interactive</Code>,
484
+ type: <Code>boolean</Code>,
485
+ default: <Code>false</Code>,
486
+ desc: t.api.rows.interactive,
487
+ },
488
+ ]}
489
+ />
490
+ </section>
491
+ </>
492
+ );
493
+ }
494
+
495
+ /* ───────── 데모 전용 로컬 헬퍼 ───────── */
496
+
497
+ const titleStyle: React.CSSProperties = {
498
+ fontSize: "var(--text-base)",
499
+ fontWeight: "var(--font-weight-medium)",
500
+ color: "var(--fg-strong)",
501
+ margin: 0,
502
+ };
503
+ const mutedStyle: React.CSSProperties = {
504
+ color: "var(--fg-muted)",
505
+ fontSize: "var(--text-sm)",
506
+ margin: 0,
507
+ };
508
+ const headerRowStyle: React.CSSProperties = {
509
+ display: "flex",
510
+ alignItems: "flex-start",
511
+ justifyContent: "space-between",
512
+ gap: "var(--space-2)",
513
+ };
514
+
515
+ function stackStyle(gap: string): React.CSSProperties {
516
+ return {
517
+ display: "flex",
518
+ flexDirection: "column",
519
+ gap,
520
+ };
521
+ }
522
+
523
+ function SettingRow({ label, value }: { label: string; value: string }) {
524
+ return (
525
+ <div
526
+ style={{
527
+ display: "flex",
528
+ alignItems: "baseline",
529
+ justifyContent: "space-between",
530
+ gap: "var(--space-2)",
531
+ }}
532
+ >
533
+ <span style={{ color: "var(--fg-muted)" }}>{label}</span>
534
+ <span style={{ fontWeight: "var(--font-weight-book)" }}>{value}</span>
535
+ </div>
536
+ );
537
+ }
538
+
539
+ function variantHint(v: CardVariant, t: Strings): string {
540
+ if (v === "line") return t.variantHints.line;
541
+ if (v === "soft") return t.variantHints.soft;
542
+ if (v === "elevated") return t.variantHints.elevated;
543
+ return t.variantHints.framed;
544
+ }
545
+ ````
546
+
547
+ ### Source: web/examples/PipelineCardExample.module.css
548
+
549
+ ````css
550
+ .card {
551
+ display: grid;
552
+ gap: var(--space-4);
553
+ width: 100%;
554
+ max-width: calc(var(--size-24) * 4);
555
+ min-width: 0;
556
+ }
557
+
558
+ .card.pipelineCard {
559
+ gap: var(--space-2);
560
+ padding-top: var(--space-6);
561
+ }
562
+
563
+ .card.pipelineCard h3 {
564
+ font-size: var(--text-base);
565
+ line-height: var(--lh-tight);
566
+ }
567
+ ````
568
+
569
+ ### Source: web/examples/PipelineCardExample.tsx
570
+
571
+ ````tsx
572
+ "use client";
573
+
574
+ import { Card } from "@/components/Card";
575
+ import { SegmentedChart } from "@/components/SegmentedChart";
576
+ import styles from "./PipelineCardExample.module.css";
577
+
578
+ export const pipelineSource = [
579
+ { id: "discovery", label: "Discovery", en: "Discovery", value: 12600, count: 12 },
580
+ { id: "review", label: "Review", en: "Review", value: 9800, count: 8 },
581
+ { id: "proposal", label: "Proposal", en: "Proposal", value: 12400, count: 7 },
582
+ { id: "negotiation", label: "Negotiation", en: "Negotiation", value: 8000, count: 5 },
583
+ ];
584
+
585
+ export function PipelineCardExample({ lang = "ko" }: { lang?: "ko" | "en" }) {
586
+ const en = lang === "en";
587
+ const title = "Deal pipeline";
588
+ const data = pipelineSource.map((item) => ({
589
+ id: item.id,
590
+ label: item.en,
591
+ value: item.value,
592
+ description: `${item.count} deals`,
593
+ }));
594
+ const count = pipelineSource.reduce((sum, item) => sum + item.count, 0);
595
+
596
+ return (
597
+ <Card variant="framed" className={`${styles.card} ${styles.pipelineCard}`}>
598
+ <SegmentedChart title={title} showSummary data={data} unit={"× ₩10k"}
599
+ caption={`${count} deals total`} aria-label={title} />
600
+ </Card>
601
+ );
602
+ }
603
+ ````