@conscience-technology/ovenn 0.7.3 → 0.7.5

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 (150) hide show
  1. package/assets/components/AIMessage/AIMessage.module.css +10 -0
  2. package/assets/components/AIMessage/AIMessage.tsx +6 -2
  3. package/assets/components/Breadcrumb/Breadcrumb.module.css +82 -23
  4. package/assets/components/Breadcrumb/Breadcrumb.tsx +44 -26
  5. package/assets/components/Breadcrumb/index.ts +1 -0
  6. package/assets/components/Button/Button.module.css +2 -4
  7. package/assets/components/Callout/Callout.module.css +44 -18
  8. package/assets/components/Callout/Callout.tsx +9 -4
  9. package/assets/components/Callout/index.ts +1 -1
  10. package/assets/components/Canvas/Canvas.module.css +13 -0
  11. package/assets/components/Canvas/Canvas.tsx +378 -94
  12. package/assets/components/Canvas/clipboard.ts +5 -1
  13. package/assets/components/Canvas/collision.ts +5 -1
  14. package/assets/components/Canvas/graph.ts +14 -5
  15. package/assets/components/Canvas/history.ts +11 -4
  16. package/assets/components/Canvas/index.ts +2 -1
  17. package/assets/components/Canvas/types.ts +36 -1
  18. package/assets/components/CanvasEdge/tokens.css +14 -1
  19. package/assets/components/CanvasNode/tokens.css +13 -10
  20. package/assets/components/ChatInput/ChatInput.tsx +1 -1
  21. package/assets/components/ColorField/ColorField.module.css +6 -1
  22. package/assets/components/ColorPicker/ColorPicker.module.css +3 -0
  23. package/assets/components/CommandPalette/CommandPalette.module.css +115 -1
  24. package/assets/components/CommandPalette/CommandPalette.tsx +206 -21
  25. package/assets/components/CommandPalette/index.ts +1 -0
  26. package/assets/components/DatePicker/DatePicker.module.css +3 -2
  27. package/assets/components/Drawer/Drawer.module.css +30 -0
  28. package/assets/components/Drawer/Drawer.tsx +75 -16
  29. package/assets/components/Drawer/index.ts +1 -0
  30. package/assets/components/Icon/Icon.tsx +3 -0
  31. package/assets/components/Input/Input.module.css +4 -4
  32. package/assets/components/Select/Select.module.css +6 -2
  33. package/assets/components/SocialLoginButton/SocialLoginButton.module.css +198 -0
  34. package/assets/components/SocialLoginButton/SocialLoginButton.tsx +86 -0
  35. package/assets/components/SocialLoginButton/assets/amazon.svg +1 -0
  36. package/assets/components/SocialLoginButton/assets/apple.svg +3 -0
  37. package/assets/components/SocialLoginButton/assets/discord.svg +3 -0
  38. package/assets/components/SocialLoginButton/assets/facebook-white.png +0 -0
  39. package/assets/components/SocialLoginButton/assets/facebook.png +0 -0
  40. package/assets/components/SocialLoginButton/assets/github.svg +3 -0
  41. package/assets/components/SocialLoginButton/assets/google-mark.png +0 -0
  42. package/assets/components/SocialLoginButton/assets/kakao.svg +3 -0
  43. package/assets/components/SocialLoginButton/assets/line-icon.png +0 -0
  44. package/assets/components/SocialLoginButton/assets/line-white.png +0 -0
  45. package/assets/components/SocialLoginButton/assets/linkedin-white.png +0 -0
  46. package/assets/components/SocialLoginButton/assets/linkedin.png +0 -0
  47. package/assets/components/SocialLoginButton/assets/microsoft.svg +6 -0
  48. package/assets/components/SocialLoginButton/assets/naver.png +0 -0
  49. package/assets/components/SocialLoginButton/assets/slack.svg +17 -0
  50. package/assets/components/SocialLoginButton/assets/spotify.svg +3 -0
  51. package/assets/components/SocialLoginButton/assets/twitch.svg +21 -0
  52. package/assets/components/SocialLoginButton/assets/wechat.png +0 -0
  53. package/assets/components/SocialLoginButton/assets/x.svg +3 -0
  54. package/assets/components/SocialLoginButton/index.ts +2 -0
  55. package/assets/components/SocialLoginButton/provider-tokens.css +30 -0
  56. package/assets/components/SocialLoginButton/providers.ts +23 -0
  57. package/assets/components/TimePicker/TimePicker.module.css +3 -2
  58. package/assets/components/_data.ts +1 -1
  59. package/assets/components/_utils.css +2 -2
  60. package/assets/components/component-registry.json +30 -1
  61. package/assets/components/index.ts +1 -0
  62. package/assets/components/tokens.css +14 -15
  63. package/assets/prompts/ASSEMBLY.md +2 -0
  64. package/assets/prompts/CATALOG.md +1 -0
  65. package/assets/prompts/PRINCIPLES.md +1 -1
  66. package/assets/prompts/RULES.md +31 -0
  67. package/assets/prompts/axes/material.md +4 -4
  68. package/assets/prompts/axes/palette.md +1 -1
  69. package/assets/prompts/axes/shape.md +2 -2
  70. package/assets/prompts/axes/voice.md +2 -2
  71. package/assets/prompts/components/_variants.md +3 -3
  72. package/assets/prompts/components/accordion.md +1 -1
  73. package/assets/prompts/components/ai-message.md +6 -2
  74. package/assets/prompts/components/app-frame.md +2 -2
  75. package/assets/prompts/components/avatar.md +2 -2
  76. package/assets/prompts/components/badge.md +1 -1
  77. package/assets/prompts/components/breadcrumb.md +11 -5
  78. package/assets/prompts/components/button.md +2 -2
  79. package/assets/prompts/components/calendar.md +1 -1
  80. package/assets/prompts/components/callout.md +8 -4
  81. package/assets/prompts/components/canvas-edge.md +1 -1
  82. package/assets/prompts/components/canvas-node.md +2 -2
  83. package/assets/prompts/components/canvas.md +24 -8
  84. package/assets/prompts/components/chart-radial.md +1 -1
  85. package/assets/prompts/components/chart.md +1 -1
  86. package/assets/prompts/components/chat-reactions.md +1 -1
  87. package/assets/prompts/components/checkbox-card.md +3 -3
  88. package/assets/prompts/components/checkbox.md +1 -1
  89. package/assets/prompts/components/chip.md +4 -4
  90. package/assets/prompts/components/code-block.md +1 -1
  91. package/assets/prompts/components/combobox.md +3 -3
  92. package/assets/prompts/components/command-palette.md +52 -44
  93. package/assets/prompts/components/comment.md +2 -2
  94. package/assets/prompts/components/control-group.md +1 -1
  95. package/assets/prompts/components/data-table.md +1 -1
  96. package/assets/prompts/components/disclosure.md +1 -1
  97. package/assets/prompts/components/drawer.md +15 -1
  98. package/assets/prompts/components/dropdown-menu.md +1 -1
  99. package/assets/prompts/components/event-chip.md +2 -2
  100. package/assets/prompts/components/file-icon.md +1 -1
  101. package/assets/prompts/components/file-upload.md +1 -1
  102. package/assets/prompts/components/icon-button.md +1 -1
  103. package/assets/prompts/components/input.md +3 -3
  104. package/assets/prompts/components/list-item.md +1 -1
  105. package/assets/prompts/components/menu-item.md +2 -2
  106. package/assets/prompts/components/metric-card.md +1 -1
  107. package/assets/prompts/components/mini-calendar.md +1 -1
  108. package/assets/prompts/components/page-header.md +1 -1
  109. package/assets/prompts/components/segmented-chart.md +1 -1
  110. package/assets/prompts/components/sidebar.md +3 -3
  111. package/assets/prompts/components/skeleton.md +3 -3
  112. package/assets/prompts/components/social-login-button.md +117 -0
  113. package/assets/prompts/components/tab-strip.md +1 -1
  114. package/assets/prompts/components/table-cell.md +1 -1
  115. package/assets/prompts/components/table-header.md +1 -1
  116. package/assets/prompts/components/table-row-edit.md +3 -3
  117. package/assets/prompts/components/table-row.md +1 -1
  118. package/assets/prompts/components/table-toolbar.md +1 -1
  119. package/assets/prompts/components/timeline-view.md +2 -2
  120. package/assets/prompts/components/toast.md +1 -1
  121. package/assets/prompts/components/tooltip.md +3 -3
  122. package/assets/prompts/components/tree-nav.md +2 -2
  123. package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
  124. package/assets/prompts/design-examples/catalog.json +9 -9
  125. package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +37 -1
  126. package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +113 -18
  127. package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +2 -2
  128. package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +3 -1
  129. package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +99 -51
  130. package/assets/prompts/primitives/scroll.md +1 -1
  131. package/assets/prompts/tokens/color.md +4 -5
  132. package/assets/prompts/tokens/material.md +5 -2
  133. package/assets/prompts/tokens/radius.md +1 -1
  134. package/assets/prompts/use-cases/chat-chat-input.md +382 -74
  135. package/assets/prompts/use-cases/data-list-item.md +38 -431
  136. package/assets/prompts/use-cases/feedback-drawer.md +112 -33
  137. package/assets/prompts/use-cases/overlay-command-palette.md +2004 -0
  138. package/assets/prompts/use-cases/structure-canvas.md +1016 -0
  139. package/assets/skills/ovenn-validate/SKILL.md +1 -1
  140. package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +27 -5
  141. package/assets/skills/ovenn-validate/scripts/rules/hard-rules.mjs +174 -0
  142. package/assets/skills/ovenn-validate/scripts/rules/hard-rules.test.mjs +57 -0
  143. package/assets/skills/ovenn-validate/scripts/validate.mjs +2 -0
  144. package/package.json +1 -1
  145. package/src/commands/info.js +5 -4
  146. package/src/commands/update.js +5 -1
  147. package/src/utils/agents.js +28 -17
  148. package/src/utils/client-bridges.js +4 -2
  149. package/src/utils/component-usage.js +27 -5
  150. package/src/utils/patch.js +2 -1
@@ -4,13 +4,13 @@
4
4
 
5
5
  ### 사례 목록
6
6
 
7
- - Notification inbox
8
- - Document library
7
+ - Notifications
8
+ - Document list
9
9
  - Activity log
10
10
 
11
11
  문서: /en/components/data/list-item#use-cases
12
12
 
13
- 사례 소스가 현재 page.tsx에 연결되지 않았습니다. 구현 참조는 가능하지만 문서에서 볼 수 있다고 가정하지 마세요.
13
+ 문서 페이지에서 렌더하는 사례입니다.
14
14
 
15
15
  ### 조회 방법
16
16
 
@@ -23,17 +23,15 @@ get_guide(topic="use-cases/data-list-item", sections=["사례 목록", "파일
23
23
  - `web/app/[lang]/components/data/list-item/page.tsx`
24
24
  - `web/app/[lang]/components/data/list-item/UseCases.module.css`
25
25
  - `web/app/[lang]/components/data/list-item/UseCases.tsx`
26
- - `web/examples/RowInteractionExamples.module.css`
27
- - `web/examples/RowInteractionExamples.tsx`
28
26
 
29
27
  ### Section: web/app/[lang]/components/data/list-item/UseCases.tsx#use-cases
30
28
 
31
29
  ```tsx
32
30
  <section id="use-cases" className="section">
33
31
  <h2>{ko ? "사용 사례" : "In Use"}</h2>
34
- <h3>{ko ? "알림함" : "Notification inbox"}</h3><ExampleBlock align="column" previewWidth="full"><Notifications ko={false} /></ExampleBlock>
35
- <h3>{ko ? "문서 목록" : "Document library"}</h3><ExampleBlock align="column" previewWidth="full"><Documents ko={false} /></ExampleBlock>
36
- <h3>{ko ? "활동 로그" : "Activity log"}</h3><ExampleBlock align="column" previewWidth="full"><Activity ko={false} /></ExampleBlock>
32
+ <h3>{ko ? "알림함" : "Notifications"}</h3><ExampleBlock align="column" previewWidth="full"><Notifications /></ExampleBlock>
33
+ <h3>{ko ? "문서 목록" : "Document list"}</h3><ExampleBlock align="column" previewWidth="full"><Documents /></ExampleBlock>
34
+ <h3>{ko ? "활동 로그" : "Activity log"}</h3><ExampleBlock align="column" previewWidth="full"><Activity /></ExampleBlock>
37
35
  </section>
38
36
  ```
39
37
 
@@ -53,7 +51,6 @@ type Strings = {
53
51
  sampleTitle: string;
54
52
  sampleWrittenOn: string;
55
53
  };
56
- playgroundDesc: string;
57
54
  playground: {
58
55
  decisionPending: string;
59
56
  scopeConfirm: string;
@@ -67,31 +64,6 @@ type Strings = {
67
64
  desc: ReactNode;
68
65
  rows: { title: string; date: string }[];
69
66
  };
70
- withStatus: {
71
- heading: string;
72
- desc: ReactNode;
73
- openAria: string;
74
- reviewNeeded: string;
75
- approved: string;
76
- item1Title: string;
77
- item1MetaRequested: string;
78
- item2Title: string;
79
- item2Meta1: string;
80
- item2Meta2: string;
81
- item3Title: string;
82
- item3Meta: string;
83
- };
84
- withDescription: {
85
- heading: string;
86
- desc: ReactNode;
87
- extractedBadge: string;
88
- rows: { title: string; sub: string }[];
89
- };
90
- interactive: {
91
- heading: string;
92
- desc: ReactNode;
93
- rows: { title: string; date: string }[];
94
- };
95
67
  api: {
96
68
  heading: string;
97
69
  columns: { prop: string; type: string; default: string; desc: string };
@@ -108,21 +80,19 @@ type Strings = {
108
80
 
109
81
  const en: Strings = {
110
82
  title: "List Item",
111
- lead: "Compose leading, content, and trailing areas for feeds, notifications, logs, and tasks. Use Event List Item for date-led rows.",
83
+ lead: "Show one entry in a notification feed, document list, or activity log. Use Event List Item for rows organized around a date.",
112
84
 
113
85
  usage: {
114
86
  heading: "Usage",
115
87
  desc: (
116
88
  <>
117
- Freely assemble <Code>ListItem.Title</Code>, <Code>Description</Code>, and <Code>Meta</Code> inside content.
89
+ Add a title and use <Code>ListItem.Meta</Code> for details such as a date or author.
118
90
  </>
119
91
  ),
120
92
  sampleTitle: "Hiring pipeline QBR",
121
93
  sampleWrittenOn: "Written on Jul 8, 2029",
122
94
  },
123
95
 
124
- playgroundDesc: "Try the combinations below.",
125
-
126
96
  playground: {
127
97
  decisionPending: "Decision pending",
128
98
  scopeConfirm: "Confirm scope and doc coverage",
@@ -133,62 +103,10 @@ const en: Strings = {
133
103
  },
134
104
 
135
105
  sizes: {
136
- heading: "Sizes",
137
- desc: (
138
- <>
139
- <Code>md</Code> for lists that need breathing room like tasks and resources, <Code>sm</Code> for streams that stack densely without separators like activity logs or extract-complete feeds.
140
- </>
141
- ),
142
- rows: [
143
- { title: "Hiring pipeline QBR", date: "Jul 8, 2029" },
144
- { title: "ERP 2.0 sidebar spec", date: "Jun 24, 2029" },
145
- ],
146
- },
147
-
148
- withStatus: {
149
- heading: "With Status",
150
- desc: (
151
- <>
152
- Checklist leading, title and meta, and a right-side status Badge plus chevron. For two-line bodies pin leading to the title line with <Code>align=&quot;top&quot;</Code>.
153
- </>
154
- ),
155
- openAria: "Open",
156
- reviewNeeded: "Needs review",
157
- approved: "Approved",
158
- item1Title: "Confirm scope and doc coverage",
159
- item1MetaRequested: "Requested 22 min ago",
160
- item2Title: "Plan to apply the semi-auto experiment-group policy",
161
- item2Meta1: "Requested 4 hours ago",
162
- item2Meta2: "Rationale change needs review",
163
- item3Title: "Implementation plan from request intake to report",
164
- item3Meta: "Requested yesterday",
165
- },
166
-
167
- withDescription: {
168
- heading: "With Description",
169
- desc: (
170
- <>
171
- Two-line body (title plus sub) and a right-side status Badge. This is a stream that stacks densely without separators, so <Code>size=&quot;sm&quot;</Code> tightens the vertical rhythm.
172
- </>
173
- ),
174
- extractedBadge: "Extracted",
175
- rows: [
176
- {
177
- title: "Draft spec for report export",
178
- sub: "Automation scenario, version 1",
179
- },
180
- {
181
- title: "Reusable checklist from request to report",
182
- sub: "Automation scenario, version 1",
183
- },
184
- ],
185
- },
186
-
187
- interactive: {
188
- heading: "Interactive",
106
+ heading: "Variants",
189
107
  desc: (
190
108
  <>
191
- Pass <Code>href</Code> or <Code>onClick</Code> to make the whole row clickable with visible keyboard focus.
109
+ Use the default <Code>md</Code> for document lists and <Code>sm</Code> for compact activity logs.
192
110
  </>
193
111
  ),
194
112
  rows: [
@@ -203,31 +121,29 @@ const en: Strings = {
203
121
  rows: {
204
122
  leading: "Left slot. Icon, Avatar, or IconMark.",
205
123
  trailing: "Right slot. Badge, IconButton, and the like.",
206
- size: "md is roomy, sm is tight stream.",
124
+ size: "Choose md for document lists or sm for compact feeds.",
207
125
  align: "Vertical alignment of leading. Use top with two-line bodies.",
208
126
  href: "Adds a native link action inside the row; auxiliary controls stay independent.",
209
- onClick: "If set, enables interactive.",
127
+ onClick: "Runs when the user activates the row.",
210
128
  },
211
129
  },
212
130
  };
213
131
 
214
132
  const ko: Strings = {
215
133
  title: "List Item",
216
- lead: "앞쪽·본문·뒤쪽 영역을 조합해 목록의 한 행을 만들어요. 피드·알림·활동 로그·작업 목록에 쓰고, 날짜를 앞세운 일정 목록에는 Event List Item을 써요.",
134
+ lead: "알림, 문서, 활동 로그의 한 항목을 표시합니다. 날짜가 중심인 일정에는 Event List Item을 사용하세요.",
217
135
 
218
136
  usage: {
219
137
  heading: "사용법",
220
138
  desc: (
221
139
  <>
222
- content 안에 <Code>ListItem.Title</Code>·<Code>Description</Code>·<Code>Meta</Code>를 자유 조립해요.
140
+ 제목을 넣고, 날짜나 작성자는 <Code>ListItem.Meta</Code>에 표시하세요.
223
141
  </>
224
142
  ),
225
143
  sampleTitle: "채용 파이프라인 QBR",
226
144
  sampleWrittenOn: "2029년 7월 8일 작성",
227
145
  },
228
146
 
229
- playgroundDesc: "옵션을 바꿔 보세요.",
230
-
231
147
  playground: {
232
148
  decisionPending: "결정 대기",
233
149
  scopeConfirm: "개발 대상과 문서 범위 확인",
@@ -238,62 +154,10 @@ const ko: Strings = {
238
154
  },
239
155
 
240
156
  sizes: {
241
- heading: "크기",
157
+ heading: "변형",
242
158
  desc: (
243
159
  <>
244
- <Code>md</Code>는 작업·자원 리스트처럼 호흡이 있는 자리, <Code>sm</Code>은 활동 로그·추출 완료처럼 분리선 없이 조밀하게 쌓이는 스트림 자리에.
245
- </>
246
- ),
247
- rows: [
248
- { title: "채용 파이프라인 QBR", date: "2029년 7월 8일" },
249
- { title: "ERP 2.0 사이드바 사양", date: "2029년 6월 24일" },
250
- ],
251
- },
252
-
253
- withStatus: {
254
- heading: "상태 표시",
255
- desc: (
256
- <>
257
- 체크리스트 leading, 제목·메타, 우측 상태 Badge + chevron. 2줄 본문에선 leading을 <Code>align=&quot;top&quot;</Code>으로 title 라인에 맞춰요.
258
- </>
259
- ),
260
- openAria: "열기",
261
- reviewNeeded: "검토 필요",
262
- approved: "승인 완료",
263
- item1Title: "개발 대상과 문서 범위 확인",
264
- item1MetaRequested: "22분 전 요청",
265
- item2Title: "Semi-auto 실험그룹 정책 반영 계획",
266
- item2Meta1: "4시간 전 요청",
267
- item2Meta2: "근거 변경 확인 필요",
268
- item3Title: "요청 등록부터 보고서까지 구현 계획",
269
- item3Meta: "어제 요청",
270
- },
271
-
272
- withDescription: {
273
- heading: "설명",
274
- desc: (
275
- <>
276
- 2줄 본문(제목·서브)과 우측 상태 Badge. 분리선 없이 조밀하게 쌓이는 스트림이라 <Code>size=&quot;sm&quot;</Code>으로 세로 리듬을 좁혀요.
277
- </>
278
- ),
279
- extractedBadge: "추출·정리 완료",
280
- rows: [
281
- {
282
- title: "보고서 내보내기 상세 기획 초안",
283
- sub: "업무 자동화 시나리오·버전 1",
284
- },
285
- {
286
- title: "요청부터 보고까지 재사용 체크리스트",
287
- sub: "업무 자동화 시나리오·버전 1",
288
- },
289
- ],
290
- },
291
-
292
- interactive: {
293
- heading: "행 동작",
294
- desc: (
295
- <>
296
- <Code>href</Code>나 <Code>onClick</Code>을 넘기면 행 전체를 누를 수 있고 키보드 포커스도 표시돼요.
160
+ 문서 목록에는 기본 <Code>md</Code>를, 촘촘한 활동 로그에는 <Code>sm</Code>을 사용하세요.
297
161
  </>
298
162
  ),
299
163
  rows: [
@@ -308,10 +172,10 @@ const ko: Strings = {
308
172
  rows: {
309
173
  leading: "좌측 슬롯. Icon·Avatar·IconMark.",
310
174
  trailing: "우측 슬롯. Badge·IconButton 등.",
311
- size: "md=여유, sm=타이트 스트림.",
175
+ size: "문서 목록에는 md, 촘촘한 피드에는 sm을 사용합니다.",
312
176
  align: "leading 세로 정렬. 2줄 본문엔 top.",
313
177
  href: "행 안에 네이티브 링크 진입점을 제공. 보조 컨트롤은 독립 동작.",
314
- onClick: "지정 시 interactive 활성.",
178
+ onClick: "행을 누르거나 키보드로 실행하면 호출됩니다.",
315
179
  },
316
180
  },
317
181
  };
@@ -324,6 +188,8 @@ export type { Strings };
324
188
 
325
189
  ````css
326
190
  .list {
191
+ width: 100%;
192
+ min-width: 0;
327
193
  list-style: none;
328
194
  padding: 0;
329
195
  margin: 0;
@@ -351,7 +217,6 @@ export type { Strings };
351
217
  "use client";
352
218
 
353
219
  import { Tag } from "@/components/Tag";
354
- import { RowInteractionExamples } from "@/examples/RowInteractionExamples";
355
220
  import { useState } from "react";
356
221
  import { usePathname } from "next/navigation";
357
222
  import {
@@ -361,7 +226,6 @@ import {
361
226
  type ListItemAlign,
362
227
  } from "@/components/ListItem";
363
228
  import { Avatar } from "@/components/Avatar";
364
- import { Badge } from "@/components/Badge";
365
229
  import { Code } from "@/components/Code";
366
230
  import { Icon } from "@/components/Icon";
367
231
  import { IconButton } from "@/components/IconButton";
@@ -370,6 +234,7 @@ import { Playground } from "../../../../_components/Playground";
370
234
  import { DocsTable } from "../../../../_components/DocsTable";
371
235
  import { localeFromPathname } from "../../../../_dict";
372
236
  import { strings } from "./_strings";
237
+ import { ListItemUseCases } from "./UseCases";
373
238
  import styles from "./page.module.css";
374
239
 
375
240
  type LeadingKind = "none" | "icon" | "avatar" | "iconmark";
@@ -382,7 +247,8 @@ const TRAILINGS: TrailingKind[] = ["none", "badge", "chevron", "badge-chevron"];
382
247
 
383
248
  export default function ListItemPage() {
384
249
  const pathname = usePathname() ?? "/";
385
- const t = strings[localeFromPathname(pathname)];
250
+ const locale = localeFromPathname(pathname);
251
+ const t = strings[locale];
386
252
 
387
253
  const [pgSize, setPgSize] = useState<ListItemSize>("md");
388
254
  const [pgAlign, setPgAlign] = useState<ListItemAlign>("top");
@@ -441,13 +307,13 @@ export default function ListItemPage() {
441
307
  <>
442
308
  <h1 className="page-title">{t.title}</h1>
443
309
  <p className="page-lead">{t.lead}</p>
444
- <section className="section-first"><h2>{localeFromPathname(pathname) === "ko" ? "행 행동 조합" : "Row interactions"}</h2><RowInteractionExamples only="list" /></section>
445
310
 
446
311
  <section id="usage" className="section-first">
447
312
  <h2>{t.usage.heading}</h2>
448
313
  <p className="desc">{t.usage.desc}</p>
449
314
  <ExampleBlock
450
315
  align="column"
316
+ previewWidth="full"
451
317
  code={`import { ListItem } from "@/components/ListItem";
452
318
  import { Icon } from "@/components/Icon";
453
319
 
@@ -470,7 +336,6 @@ import { Icon } from "@/components/Icon";
470
336
  </section>
471
337
 
472
338
  <Playground
473
- desc={t.playgroundDesc}
474
339
  axes={[
475
340
  {
476
341
  label: "size",
@@ -530,8 +395,6 @@ import { Icon } from "@/components/Icon";
530
395
  {pgMeta && (
531
396
  <ListItem.Meta>
532
397
  <span>{strings.en.playground.requestedAgo}</span>
533
- <ListItem.MetaDivider />
534
- <time dateTime="2026-10-13T22:25:00+09:00">22 min</time>
535
398
  </ListItem.Meta>
536
399
  )}
537
400
  </ListItem>
@@ -544,6 +407,7 @@ import { Icon } from "@/components/Icon";
544
407
  <p className="desc">{t.sizes.desc}</p>
545
408
  <ExampleBlock
546
409
  align="column"
410
+ previewWidth="full"
547
411
  code={`<ListItem size="md" leading={...}>
548
412
  <ListItem.Title>...</ListItem.Title>
549
413
  <ListItem.Meta>...</ListItem.Meta>
@@ -551,7 +415,7 @@ import { Icon } from "@/components/Icon";
551
415
  <ListItem size="sm" leading={...}>...</ListItem>`}
552
416
  >
553
417
  <ul className={`${styles.list} ${styles.hairline}`}>
554
- {strings.en.sizes.rows.map((r, i) => (
418
+ {strings.en.sizes.rows.slice(0, 1).map((r, i) => (
555
419
  <li key={i}>
556
420
  <ListItem
557
421
  leading={
@@ -569,7 +433,7 @@ import { Icon } from "@/components/Icon";
569
433
  ))}
570
434
  </ul>
571
435
  <ul className={styles.list}>
572
- {strings.en.sizes.rows.map((r, i) => (
436
+ {strings.en.sizes.rows.slice(0, 1).map((r, i) => (
573
437
  <li key={i}>
574
438
  <ListItem
575
439
  size="sm"
@@ -590,162 +454,7 @@ import { Icon } from "@/components/Icon";
590
454
  </ExampleBlock>
591
455
  </section>
592
456
 
593
- <section id="with-status">
594
- <h2>{t.withStatus.heading}</h2>
595
- <p className="desc">{t.withStatus.desc}</p>
596
- <ExampleBlock
597
- align="column"
598
- code={`<ListItem
599
- align="top"
600
- leading={<Icon name="list-dashes" />}
601
- trailing={<><Tag status="warning">${strings.en.withStatus.reviewNeeded}</Tag><IconButton ... /></>}
602
- >
603
- <ListItem.Title>${strings.en.withStatus.item1Title}</ListItem.Title>
604
- <ListItem.Meta><span>${strings.en.withStatus.item1MetaRequested}</span></ListItem.Meta>
605
- </ListItem>`}
606
- >
607
- <ul className={`${styles.list} ${styles.hairline}`}>
608
- <li>
609
- <ListItem
610
- align="top"
611
- leading={<Icon name="list-dashes" />}
612
- trailing={
613
- <>
614
- <Tag variant="soft" status="warning">
615
- {strings.en.withStatus.reviewNeeded}
616
- </Tag>
617
- <IconButton
618
- variant="ghost"
619
- size="sm"
620
- icon={<Icon name="caret-right" />}
621
- aria-label={strings.en.withStatus.openAria}
622
- />
623
- </>
624
- }
625
- >
626
- <ListItem.Title>{strings.en.withStatus.item1Title}</ListItem.Title>
627
- <ListItem.Meta>
628
- <span>{strings.en.withStatus.item1MetaRequested}</span>
629
- </ListItem.Meta>
630
- </ListItem>
631
- </li>
632
- <li>
633
- <ListItem
634
- align="top"
635
- leading={<Icon name="list-dashes" />}
636
- trailing={
637
- <>
638
- <Tag variant="soft" status="warning">
639
- {strings.en.withStatus.reviewNeeded}
640
- </Tag>
641
- <IconButton
642
- variant="ghost"
643
- size="sm"
644
- icon={<Icon name="caret-right" />}
645
- aria-label={strings.en.withStatus.openAria}
646
- />
647
- </>
648
- }
649
- >
650
- <ListItem.Title>{strings.en.withStatus.item2Title}</ListItem.Title>
651
- <ListItem.Meta>
652
- <span>{strings.en.withStatus.item2Meta1}</span>
653
- <ListItem.MetaDivider />
654
- <span>{strings.en.withStatus.item2Meta2}</span>
655
- </ListItem.Meta>
656
- </ListItem>
657
- </li>
658
- <li>
659
- <ListItem
660
- align="top"
661
- leading={<Icon name="list-dashes" />}
662
- trailing={
663
- <>
664
- <Tag variant="soft" status="success">
665
- {strings.en.withStatus.approved}
666
- </Tag>
667
- <IconButton
668
- variant="ghost"
669
- size="sm"
670
- icon={<Icon name="caret-right" />}
671
- aria-label={strings.en.withStatus.openAria}
672
- />
673
- </>
674
- }
675
- >
676
- <ListItem.Title>{strings.en.withStatus.item3Title}</ListItem.Title>
677
- <ListItem.Meta>
678
- <span>{strings.en.withStatus.item3Meta}</span>
679
- </ListItem.Meta>
680
- </ListItem>
681
- </li>
682
- </ul>
683
- </ExampleBlock>
684
- </section>
685
-
686
- <section id="with-description">
687
- <h2>{t.withDescription.heading}</h2>
688
- <p className="desc">{t.withDescription.desc}</p>
689
- <ExampleBlock
690
- align="column"
691
- code={`<ListItem align="top" size="sm" leading={<Icon name="copy-simple" />}>
692
- <ListItem.Title>...</ListItem.Title>
693
- <ListItem.Description>...</ListItem.Description>
694
- </ListItem>`}
695
- >
696
- <ul className={styles.list}>
697
- {strings.en.withDescription.rows.map((row, i) => (
698
- <li key={i}>
699
- <ListItem
700
- align="top"
701
- size="sm"
702
- leading={<Icon name="copy-simple" />}
703
- trailing={
704
- <Tag variant="soft" status="success">
705
- {strings.en.withDescription.extractedBadge}
706
- </Tag>
707
- }
708
- >
709
- <ListItem.Title>{row.title}</ListItem.Title>
710
- <ListItem.Description>{row.sub}</ListItem.Description>
711
- </ListItem>
712
- </li>
713
- ))}
714
- </ul>
715
- </ExampleBlock>
716
- </section>
717
-
718
- <section id="interactive">
719
- <h2>{t.interactive.heading}</h2>
720
- <p className="desc">{t.interactive.desc}</p>
721
- <ExampleBlock
722
- align="column"
723
- code={`<ListItem href="/docs/qbr" leading={<Icon name="file-text" />} trailing={<Icon name="caret-right" />}>
724
- <ListItem.Title>${strings.en.interactive.rows[0].title}</ListItem.Title>
725
- </ListItem>`}
726
- >
727
- <ul className={`${styles.list} ${styles.hairline}`}>
728
- {strings.en.interactive.rows.map((r, i) => (
729
- <li key={i}>
730
- <ListItem
731
- href="#"
732
- leading={
733
- <ListItemLeadingIcon tone="neutral" size="md">
734
- <Icon name="file-text" />
735
- </ListItemLeadingIcon>
736
- }
737
- trailing={<Icon name="caret-right" />}
738
- >
739
- <ListItem.Title>{r.title}</ListItem.Title>
740
- <ListItem.Meta>
741
- <time>{r.date}</time>
742
- </ListItem.Meta>
743
- </ListItem>
744
- </li>
745
- ))}
746
- </ul>
747
- </ExampleBlock>
748
- </section>
457
+ <ListItemUseCases ko={locale === "ko"} />
749
458
 
750
459
  <section id="api">
751
460
  <h2>{t.api.heading}</h2>
@@ -848,15 +557,15 @@ function focusTab(root: HTMLDivElement | null) {
848
557
  root?.querySelector<HTMLButtonElement>('[role="tab"][aria-selected="true"]')?.focus();
849
558
  }
850
559
 
851
- function Notifications({ ko }: { ko: boolean }) {
560
+ function Notifications() {
852
561
  const [view, setView] = useState("all");
853
562
  const [read, setRead] = useState(["invite"]);
854
563
  const [detail, setDetail] = useState<string | null>(null);
855
564
  const tabs = useRef<HTMLDivElement>(null);
856
565
  const items = [
857
566
  { id: "mention", person: "Mina Kim", title: "mentioned you in Homepage design", body: "Could you also review the empty search results screen?", time: "5 minutes ago", date: "2026-11-04T10:25:00+09:00" },
858
- { id: "review", person: "James Lee", title: "requested a review of Component guide", body: "The button states and keyboard interactions are ready for your review.", time: "32 minutes ago", date: "2026-11-04T09:58:00+09:00" },
859
- { id: "invite", person: "Sarah Park", title: "invited you to Design system", body: "Shared components and working documents are available in this project.", time: "1 hour ago", date: "2026-11-04T09:30:00+09:00" },
567
+ { id: "review", person: "James Lee", title: "requested a review of Component guide", body: "Please review the button states and keyboard interactions.", time: "32 minutes ago", date: "2026-11-04T09:58:00+09:00" },
568
+ { id: "invite", person: "Sarah Park", title: "invited you to Design system", body: "Open the project to view shared components and documents.", time: "1 hour ago", date: "2026-11-04T09:30:00+09:00" },
860
569
  ];
861
570
  const markRead = (id: string) => {
862
571
  focusTab(tabs.current);
@@ -871,7 +580,7 @@ function Notifications({ ko }: { ko: boolean }) {
871
580
  <Tabs.Trigger value="all">{"All"}</Tabs.Trigger>
872
581
  <Tabs.Trigger value="unread">{"Unread"}</Tabs.Trigger>
873
582
  </Tabs.List>
874
- <Button size="sm" variant="ghost" disabled={items.every((item) => read.includes(item.id))} onClick={() => { focusTab(tabs.current); setRead(items.map((item) => item.id)); }}>{"Mark all read"}</Button>
583
+ <Button size="sm" variant="ghost" disabled={items.every((item) => read.includes(item.id))} onClick={() => { focusTab(tabs.current); setRead(items.map((item) => item.id)); }}>{"Mark all as read"}</Button>
875
584
  </div>
876
585
  {["all", "unread"].map((value) => <Tabs.Panel key={value} value={value}>
877
586
  <ul className={styles.list}>{visible.map((item) => <li key={item.id}>
@@ -880,7 +589,7 @@ function Notifications({ ko }: { ko: boolean }) {
880
589
  <ListItem.Meta><time dateTime={item.date}>{item.time}</time></ListItem.Meta>
881
590
  </ListItem>
882
591
  </li>)}</ul>
883
- {!visible.length && <EmptyState title={"You're all caught up"} />}
592
+ {!visible.length && <EmptyState title={"No unread notifications"} />}
884
593
  </Tabs.Panel>)}
885
594
  </Tabs>
886
595
  <Modal open={!!current} onOpenChange={(open) => { if (!open) setDetail(null); }} title={current?.person ?? ""} size="sm" onCloseAutoFocus={(event) => { event.preventDefault(); focusTab(tabs.current); }}>
@@ -889,7 +598,7 @@ function Notifications({ ko }: { ko: boolean }) {
889
598
  </div>;
890
599
  }
891
600
 
892
- function Documents({ ko }: { ko: boolean }) {
601
+ function Documents() {
893
602
  const [query, setQuery] = useState("");
894
603
  const [items, setItems] = useState([
895
604
  { id: "guide", title: "Component usage guide", person: "Mina Kim", time: "Updated today", body: "Buttons distinguish primary and secondary actions. Inputs provide clear labels and error states." },
@@ -924,7 +633,7 @@ function Documents({ ko }: { ko: boolean }) {
924
633
  </div>;
925
634
  }
926
635
 
927
- function Activity({ ko }: { ko: boolean }) {
636
+ function Activity() {
928
637
  const groups = [
929
638
  { day: "Today", items: [
930
639
  { person: "Mina Kim", verb: "updated", target: "Onboarding screens", time: "10:24", meta: "Website redesign" },
@@ -946,111 +655,9 @@ function Activity({ ko }: { ko: boolean }) {
946
655
  export function ListItemUseCases({ ko }: { ko: boolean }) {
947
656
  return <section id="use-cases" className="section">
948
657
  <h2>{ko ? "사용 사례" : "In Use"}</h2>
949
- <h3>{ko ? "알림함" : "Notification inbox"}</h3><ExampleBlock align="column" previewWidth="full"><Notifications ko={false} /></ExampleBlock>
950
- <h3>{ko ? "문서 목록" : "Document library"}</h3><ExampleBlock align="column" previewWidth="full"><Documents ko={false} /></ExampleBlock>
951
- <h3>{ko ? "활동 로그" : "Activity log"}</h3><ExampleBlock align="column" previewWidth="full"><Activity ko={false} /></ExampleBlock>
658
+ <h3>{ko ? "알림함" : "Notifications"}</h3><ExampleBlock align="column" previewWidth="full"><Notifications /></ExampleBlock>
659
+ <h3>{ko ? "문서 목록" : "Document list"}</h3><ExampleBlock align="column" previewWidth="full"><Documents /></ExampleBlock>
660
+ <h3>{ko ? "활동 로그" : "Activity log"}</h3><ExampleBlock align="column" previewWidth="full"><Activity /></ExampleBlock>
952
661
  </section>;
953
662
  }
954
663
  ````
955
-
956
- ### Source: web/examples/RowInteractionExamples.module.css
957
-
958
- ````css
959
- .examples { display: grid; gap: var(--space-8); min-width: 0; width: 100%; }
960
- .example { display: grid; gap: var(--space-3); min-width: 0; }
961
- .example h3 { margin: 0; font-size: var(--text-lg); color: var(--fg); }
962
- .example output { color: var(--fg-muted); font-size: var(--text-sm); }
963
- .example output:empty { display: none; }
964
- .list { list-style: none; padding: 0; margin: 0; }
965
- .list > li { border-bottom: var(--hairline) solid var(--border); }
966
- .list > li:last-child { border-bottom: 0; }
967
-
968
- .scroll { max-width: 100%; overflow: auto; }
969
- .example output::before { content: attr(aria-label) ": "; color: var(--fg-subtle); }
970
- ````
971
-
972
- ### Source: web/examples/RowInteractionExamples.tsx
973
-
974
- ````tsx
975
- "use client";
976
- import { useState } from "react";
977
- import { ListItem } from "../components/ListItem";
978
- import { Checkbox } from "../components/Checkbox";
979
- import { Button } from "../components/Button";
980
- import { DataTable, createDataTableState } from "../components/DataTable";
981
- import { TableHeader } from "../components/TableHeader";
982
- import { TableRowSelect } from "../components/TableRowSelect";
983
- import type { TableRowColumn } from "../components/TableRow";
984
- import { useTheme, ThemeLocaleProvider } from "../components/ThemeController";
985
- import styles from "./RowInteractionExamples.module.css";
986
-
987
- const customers = [
988
- { id: "hana", name: "Hana Logistics", next: "Review quote", amount: "₩24,000,000" },
989
- { id: "on", name: "On Retail", next: "Discuss rollout schedule", amount: "₩18,000,000" },
990
- ];
991
-
992
- /** 실제 상태를 연결한 조합. 디자인 처방이 아닌 행동 계약의 예시다. */
993
- function RowInteractionExamplesContent({ only }: { only?: "list" | "table" }) {
994
- const { lang } = useTheme(); const ko = lang === "ko";
995
- const [done, setDone] = useState(false);
996
- const [selected, setSelected] = useState<string[]>([]);
997
- const [detail, setDetail] = useState("");
998
- const [calls, setCalls] = useState(0);
999
- const [table, setTable] = useState(() => createDataTableState(5));
1000
- const [tableDetail, setTableDetail] = useState("");
1001
- const [tableCalls, setTableCalls] = useState(0);
1002
- const [selectionClicks, setSelectionClicks] = useState(0);
1003
- const [selectionActions, setSelectionActions] = useState(0);
1004
- const [readOnlyTable, setReadOnlyTable] = useState(() => createDataTableState(5));
1005
- const [linkTable, setLinkTable] = useState(() => createDataTableState(5));
1006
- const [selectionOnly, setSelectionOnly] = useState(false);
1007
- const columns = [{ key: "name", label: "Customer", width: "2fr", minWidth: "var(--input-w-md)" }, { key: "amount", label: "Expected revenue", width: "1fr", minWidth: "var(--input-w-md)" }];
1008
- const selectionColumns: TableRowColumn<(typeof customers)[number]>[] = [...columns, {
1009
- key: "action", label: "Action", width: "var(--input-w-md)", align: "center",
1010
- render: () => <Button variant="ghost" onClick={() => setSelectionActions(selectionActions + 1)}>Add note</Button>,
1011
- }];
1012
- return <div className={styles.examples}>
1013
- {only !== "table" && <>
1014
- <section className={styles.example} aria-label="Complete a task">
1015
- <h3>{"Complete a task"}</h3>
1016
- <ListItem selected={done} onClick={() => setDone(!done)} actionLabel={"Toggle send quote"} leading={<Checkbox aria-label={"Send quote completed"} checked={done} onChange={(e) => setDone(e.currentTarget.checked)} />}>
1017
- <ListItem.Title>{"Send quote"}</ListItem.Title>
1018
- <ListItem.Description>{"Hana Logistics · Today"}</ListItem.Description>
1019
- </ListItem>
1020
- <output aria-label="Task status">{done ? "Complete" : "Incomplete"}</output>
1021
- </section>
1022
- <section className={styles.example} aria-label="Customer detail and selection">
1023
- <h3>{"Customer detail and selection"}</h3>
1024
- <ul className={styles.list}>{customers.map((customer) => <li key={customer.id}>
1025
- <ListItem selected={selected.includes(customer.id)} active={detail === customer.name} actionLabel={`${customer.name} details`} onClick={() => setDetail(customer.name)} leading={<Checkbox aria-label={`${customer.name} select`} checked={selected.includes(customer.id)} onChange={(e) => setSelected(e.currentTarget.checked ? [...selected, customer.id] : selected.filter((id) => id !== customer.id))} />} trailing={<Button variant="ghost" onClick={() => setCalls(calls + 1)}>{"Log contact"}</Button>}>
1026
- <ListItem.Title>{customer.name}</ListItem.Title><ListItem.Description>{customer.next}</ListItem.Description>
1027
- </ListItem>
1028
- </li>)}</ul>
1029
- <output aria-label="Selected customers">{selected.length}</output><output aria-label="Customer details">{detail}</output><output aria-label="Contact count">{calls}</output>
1030
- <ListItem href="#row-example-detail" actionLabel="Customer details link" trailing={<Button variant="ghost" onClick={() => setCalls(calls + 1)}>Link action</Button>}><ListItem.Title>Customer details link</ListItem.Title></ListItem>
1031
- <ListItem disabled onClick={() => setDetail("Must not run")} leading={<Checkbox aria-label="Select disabled customer" />}><ListItem.Title>Disabled customer</ListItem.Title></ListItem>
1032
- <ListItem><ListItem.Title>Read-only status row</ListItem.Title></ListItem>
1033
- <div id="row-example-detail" tabIndex={-1}>{"Customer detail area"}</div>
1034
- </section>
1035
- </>}
1036
- {only !== "list" && <>
1037
- <section className={styles.example} aria-label="Deal detail and selection">
1038
- <h3>{"Deal detail and selection"}</h3>
1039
- <DataTable label="Deals example" rows={customers} columns={columns} getRowId={(row) => row.id} state={table} onStateChange={setTable} onRowClick={(row) => setTableDetail(row.name)} getRowLabel={(row) => `${row.name} deal details`} activeRowId={customers.find((row) => row.name === tableDetail)?.id} actions={() => <Button variant="ghost" onClick={() => setTableCalls(tableCalls + 1)}>{"Log contact"}</Button>} />
1040
- <output aria-label="Deal details">{tableDetail}</output><output aria-label="Selected deals">{table.selected.length}</output><output aria-label="Deal contacts">{tableCalls}</output>
1041
- </section>
1042
- <section className={styles.example} aria-label="Selection-only table">
1043
- <h3>{"Selection-only table"}</h3>
1044
- <div className={styles.scroll}><div role="table" aria-label="Candidates"><TableHeader columns={selectionColumns} /><TableRowSelect columns={selectionColumns} data={customers[0]} onClick={() => setSelectionClicks(selectionClicks + 1)} selected={selectionOnly} onSelectedChange={setSelectionOnly} /></div></div>
1045
- <output aria-label="Candidate clicks">{selectionClicks}</output><output aria-label="Candidate notes">{selectionActions}</output><output aria-label="Candidate selection">{selectionOnly ? "Selected" : "Not selected"}</output>
1046
- </section>
1047
- <section className={styles.example} aria-label="Customer navigation table"><h3>{"Selection and navigation"}</h3><DataTable label="Customer navigation example" rows={customers} columns={columns} getRowId={(row) => row.id} state={linkTable} onStateChange={setLinkTable} getRowHref={(row) => "#customer-" + row.id} getRowLabel={(row) => row.name + " open page"} /><div id="customer-hana">Hana Logistics details</div><div id="customer-on">On Retail details</div></section>
1048
- <section className={styles.example} aria-label="Summary without selection"><h3>{"Summary without selection"}</h3><DataTable label="Regional summary" rows={customers} columns={columns} getRowId={(row) => row.id} state={readOnlyTable} onStateChange={setReadOnlyTable} selectable={false} /></section>
1049
- </>}
1050
- </div>;
1051
- }
1052
-
1053
- export function RowInteractionExamples({ only, lang = "en" }: { only?: "list" | "table"; lang?: "ko" | "en" }) {
1054
- return <ThemeLocaleProvider lang={lang}><RowInteractionExamplesContent only={only} /></ThemeLocaleProvider>;
1055
- }
1056
- ````