@iamfiro/design 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 (264) hide show
  1. package/AGENTS.md +81 -0
  2. package/README.md +15 -2
  3. package/agents/INDEX.md +156 -0
  4. package/agents/accordion/AGENTS.md +279 -0
  5. package/agents/action-bar/AGENTS.md +90 -0
  6. package/agents/alert/AGENTS.md +212 -0
  7. package/agents/alert-dialog/AGENTS.md +193 -0
  8. package/agents/app-shell/AGENTS.md +409 -0
  9. package/agents/area-chart/AGENTS.md +183 -0
  10. package/agents/aspect-ratio/AGENTS.md +143 -0
  11. package/agents/avatar/AGENTS.md +130 -0
  12. package/agents/badge/AGENTS.md +217 -0
  13. package/agents/bar-chart/AGENTS.md +386 -0
  14. package/agents/bar-list/AGENTS.md +223 -0
  15. package/agents/brand-icon/AGENTS.md +82 -0
  16. package/agents/breadcrumb/AGENTS.md +133 -0
  17. package/agents/button/AGENTS.md +195 -0
  18. package/agents/card/AGENTS.md +141 -0
  19. package/agents/card-frame/AGENTS.md +227 -0
  20. package/agents/chat-bubble/AGENTS.md +266 -0
  21. package/agents/chat-composer/AGENTS.md +251 -0
  22. package/agents/checkbox/AGENTS.md +113 -0
  23. package/agents/code-block/AGENTS.md +144 -0
  24. package/agents/color-dot/AGENTS.md +120 -0
  25. package/agents/color-picker/AGENTS.md +224 -0
  26. package/agents/colors/AGENTS.md +168 -0
  27. package/agents/combobox/AGENTS.md +218 -0
  28. package/agents/command-menu/AGENTS.md +169 -0
  29. package/agents/comment/AGENTS.md +206 -0
  30. package/agents/context-menu/AGENTS.md +303 -0
  31. package/agents/copy-button/AGENTS.md +84 -0
  32. package/agents/count-badge/AGENTS.md +115 -0
  33. package/agents/countdown/AGENTS.md +101 -0
  34. package/agents/data-grid/AGENTS.md +460 -0
  35. package/agents/date-picker/AGENTS.md +197 -0
  36. package/agents/delta/AGENTS.md +114 -0
  37. package/agents/description-list/AGENTS.md +251 -0
  38. package/agents/dialog/AGENTS.md +391 -0
  39. package/agents/drawer/AGENTS.md +471 -0
  40. package/agents/dropdown-menu/AGENTS.md +322 -0
  41. package/agents/dropzone/AGENTS.md +116 -0
  42. package/agents/elapsed/AGENTS.md +160 -0
  43. package/agents/empty-state/AGENTS.md +203 -0
  44. package/agents/file-chip/AGENTS.md +79 -0
  45. package/agents/file-icon/AGENTS.md +66 -0
  46. package/agents/file-upload/AGENTS.md +168 -0
  47. package/agents/filter-chips/AGENTS.md +167 -0
  48. package/agents/flag/AGENTS.md +67 -0
  49. package/agents/funnel-chart/AGENTS.md +131 -0
  50. package/agents/highlight/AGENTS.md +119 -0
  51. package/agents/hover-card/AGENTS.md +271 -0
  52. package/agents/icon-stack/AGENTS.md +120 -0
  53. package/agents/icon-tile/AGENTS.md +94 -0
  54. package/agents/inline-diff/AGENTS.md +211 -0
  55. package/agents/input/AGENTS.md +261 -0
  56. package/agents/kanban/AGENTS.md +352 -0
  57. package/agents/kbd/AGENTS.md +160 -0
  58. package/agents/layout/AGENTS.md +351 -0
  59. package/agents/line-chart/AGENTS.md +393 -0
  60. package/agents/link/AGENTS.md +53 -0
  61. package/agents/list/AGENTS.md +392 -0
  62. package/agents/marker/AGENTS.md +142 -0
  63. package/agents/masked-text/AGENTS.md +127 -0
  64. package/agents/menubar/AGENTS.md +276 -0
  65. package/agents/multi-select/AGENTS.md +159 -0
  66. package/agents/navigation-menu/AGENTS.md +315 -0
  67. package/agents/notice-stack/AGENTS.md +101 -0
  68. package/agents/number-stepper/AGENTS.md +96 -0
  69. package/agents/otp-input/AGENTS.md +162 -0
  70. package/agents/pagination/AGENTS.md +189 -0
  71. package/agents/phone-input/AGENTS.md +131 -0
  72. package/agents/pie-chart/AGENTS.md +243 -0
  73. package/agents/popover/AGENTS.md +190 -0
  74. package/agents/progress/AGENTS.md +273 -0
  75. package/agents/progress-tracker/AGENTS.md +305 -0
  76. package/agents/rating/AGENTS.md +165 -0
  77. package/agents/relative-time/AGENTS.md +103 -0
  78. package/agents/resizable/AGENTS.md +390 -0
  79. package/agents/scaled-preview/AGENTS.md +111 -0
  80. package/agents/scatter-chart/AGENTS.md +160 -0
  81. package/agents/scroll-area/AGENTS.md +271 -0
  82. package/agents/search-input/AGENTS.md +105 -0
  83. package/agents/segmented-control/AGENTS.md +153 -0
  84. package/agents/select/AGENTS.md +159 -0
  85. package/agents/selector-button/AGENTS.md +122 -0
  86. package/agents/sidebar/AGENTS.md +201 -0
  87. package/agents/skeleton/AGENTS.md +166 -0
  88. package/agents/slider/AGENTS.md +181 -0
  89. package/agents/spark-chart/AGENTS.md +257 -0
  90. package/agents/sparkbar/AGENTS.md +92 -0
  91. package/agents/spinner/AGENTS.md +123 -0
  92. package/agents/split-view/AGENTS.md +290 -0
  93. package/agents/stat/AGENTS.md +138 -0
  94. package/agents/status-icon/AGENTS.md +243 -0
  95. package/agents/step-list/AGENTS.md +313 -0
  96. package/agents/table/AGENTS.md +286 -0
  97. package/agents/tabs/AGENTS.md +305 -0
  98. package/agents/tag-input/AGENTS.md +246 -0
  99. package/agents/time-picker/AGENTS.md +228 -0
  100. package/agents/timeline/AGENTS.md +1018 -0
  101. package/agents/toast/AGENTS.md +266 -0
  102. package/agents/toggle-group/AGENTS.md +216 -0
  103. package/agents/toolbar/AGENTS.md +277 -0
  104. package/agents/tooltip/AGENTS.md +154 -0
  105. package/agents/tracker/AGENTS.md +158 -0
  106. package/agents/tree-diagram/AGENTS.md +260 -0
  107. package/agents/tree-view/AGENTS.md +329 -0
  108. package/agents/typography/AGENTS.md +396 -0
  109. package/lib/index.js +17914 -0
  110. package/lib/style.css +2 -0
  111. package/lib/types/components/Accordion/Accordion.d.ts +57 -0
  112. package/lib/types/components/ActionBar/ActionBar.d.ts +24 -0
  113. package/lib/types/components/Alert/Alert.d.ts +36 -0
  114. package/lib/types/components/AppShell/AppShell.d.ts +38 -0
  115. package/lib/types/components/AreaChart/AreaChart.d.ts +17 -0
  116. package/lib/types/components/BarChart/BarChart.d.ts +57 -0
  117. package/lib/types/components/BarList/BarList.d.ts +56 -0
  118. package/lib/types/components/Breadcrumb/Breadcrumb.d.ts +15 -0
  119. package/lib/types/components/Calendar/Calendar.d.ts +34 -0
  120. package/lib/types/components/Calendar/DatePicker.d.ts +45 -0
  121. package/lib/types/components/Calendar/date.d.ts +32 -0
  122. package/lib/types/components/Card/Card.d.ts +64 -0
  123. package/lib/types/components/CardFrame/CardFrame.d.ts +15 -0
  124. package/lib/types/components/Chart/ChartParts.d.ts +38 -0
  125. package/lib/types/components/Chart/chart.d.ts +46 -0
  126. package/lib/types/components/Chart/useChartInteraction.d.ts +39 -0
  127. package/lib/types/components/ChatBubble/ChatBubble.d.ts +61 -0
  128. package/lib/types/components/ChatBubble/formatChatTime.d.ts +2 -0
  129. package/lib/types/components/ChatComposer/ChatComposer.d.ts +42 -0
  130. package/lib/types/components/CodeBlock/CodeBlock.d.ts +18 -0
  131. package/lib/types/components/CodeBlock/highlight.d.ts +10 -0
  132. package/lib/types/components/ColorPicker/ColorPicker.d.ts +61 -0
  133. package/lib/types/components/ColorPicker/color.d.ts +48 -0
  134. package/lib/types/components/ColorPicker/presets.d.ts +7 -0
  135. package/lib/types/components/Combobox/Combobox.d.ts +48 -0
  136. package/lib/types/components/CommandMenu/CommandMenu.d.ts +51 -0
  137. package/lib/types/components/Comment/Comment.d.ts +45 -0
  138. package/lib/types/components/ContextMenu/ContextMenu.d.ts +40 -0
  139. package/lib/types/components/DataGrid/DataGrid.d.ts +43 -0
  140. package/lib/types/components/DataGrid/GridPopover.d.ts +43 -0
  141. package/lib/types/components/DataGrid/anchor.d.ts +5 -0
  142. package/lib/types/components/DataGrid/model.d.ts +61 -0
  143. package/lib/types/components/DataGrid/panels.d.ts +63 -0
  144. package/lib/types/components/DataGrid/typeMeta.d.ts +6 -0
  145. package/lib/types/components/DataGrid/types.d.ts +77 -0
  146. package/lib/types/components/DescriptionList/DescriptionList.d.ts +77 -0
  147. package/lib/types/components/Dialog/AlertDialog.d.ts +26 -0
  148. package/lib/types/components/Dialog/Dialog.d.ts +42 -0
  149. package/lib/types/components/Dialog/modal.d.ts +38 -0
  150. package/lib/types/components/Drawer/Drawer.d.ts +62 -0
  151. package/lib/types/components/DropdownMenu/DropdownMenu.d.ts +97 -0
  152. package/lib/types/components/DropdownMenu/menuCore.d.ts +23 -0
  153. package/lib/types/components/Dropzone/Dropzone.d.ts +30 -0
  154. package/lib/types/components/EmptyState/EmptyState.d.ts +26 -0
  155. package/lib/types/components/FileChip/FileChip.d.ts +32 -0
  156. package/lib/types/components/FileUpload/FileUpload.d.ts +52 -0
  157. package/lib/types/components/FilterChips/FilterChips.d.ts +37 -0
  158. package/lib/types/components/FunnelChart/FunnelChart.d.ts +38 -0
  159. package/lib/types/components/FunnelChart/funnel.d.ts +25 -0
  160. package/lib/types/components/Highlight/Highlight.d.ts +35 -0
  161. package/lib/types/components/HoverCard/HoverCard.d.ts +47 -0
  162. package/lib/types/components/InlineDiff/InlineDiff.d.ts +36 -0
  163. package/lib/types/components/InlineDiff/diff.d.ts +42 -0
  164. package/lib/types/components/InlineDiff/useDiffReview.d.ts +57 -0
  165. package/lib/types/components/Kanban/Kanban.d.ts +64 -0
  166. package/lib/types/components/Kanban/KanbanCard.d.ts +35 -0
  167. package/lib/types/components/Kanban/move.d.ts +25 -0
  168. package/lib/types/components/LineChart/LineChart.d.ts +85 -0
  169. package/lib/types/components/List/List.d.ts +62 -0
  170. package/lib/types/components/Listbox/Listbox.d.ts +60 -0
  171. package/lib/types/components/Marker/Marker.d.ts +28 -0
  172. package/lib/types/components/Menubar/Menubar.d.ts +50 -0
  173. package/lib/types/components/MultiSelect/MultiSelect.d.ts +38 -0
  174. package/lib/types/components/NavigationMenu/NavigationMenu.d.ts +101 -0
  175. package/lib/types/components/NoticeStack/NoticeStack.d.ts +41 -0
  176. package/lib/types/components/NumberStepper/NumberStepper.d.ts +32 -0
  177. package/lib/types/components/OtpInput/OtpInput.d.ts +31 -0
  178. package/lib/types/components/Pagination/Pagination.d.ts +54 -0
  179. package/lib/types/components/Pagination/paginationRange.d.ts +7 -0
  180. package/lib/types/components/PhoneInput/PhoneInput.d.ts +47 -0
  181. package/lib/types/components/PieChart/PieChart.d.ts +67 -0
  182. package/lib/types/components/PieChart/arc.d.ts +26 -0
  183. package/lib/types/components/PieChart/useArcTween.d.ts +15 -0
  184. package/lib/types/components/Popover/Popover.d.ts +28 -0
  185. package/lib/types/components/ProgressTracker/ProgressTracker.d.ts +64 -0
  186. package/lib/types/components/Rating/Rating.d.ts +42 -0
  187. package/lib/types/components/Resizable/Resizable.d.ts +50 -0
  188. package/lib/types/components/Resizable/layout.d.ts +31 -0
  189. package/lib/types/components/ScaledPreview/ScaledPreview.d.ts +38 -0
  190. package/lib/types/components/ScatterChart/ScatterChart.d.ts +81 -0
  191. package/lib/types/components/ScatterChart/scatter.d.ts +14 -0
  192. package/lib/types/components/ScrollArea/ScrollArea.d.ts +34 -0
  193. package/lib/types/components/Select/Select.d.ts +39 -0
  194. package/lib/types/components/Sidebar/Sidebar.d.ts +39 -0
  195. package/lib/types/components/Skeleton/Skeleton.d.ts +47 -0
  196. package/lib/types/components/Slider/Slider.d.ts +36 -0
  197. package/lib/types/components/SparkChart/SparkChart.d.ts +55 -0
  198. package/lib/types/components/SparkChart/spark.d.ts +16 -0
  199. package/lib/types/components/Sparkbar/Sparkbar.d.ts +39 -0
  200. package/lib/types/components/SplitView/SplitView.d.ts +31 -0
  201. package/lib/types/components/Stat/Stat.d.ts +58 -0
  202. package/lib/types/components/StepList/StepList.d.ts +61 -0
  203. package/lib/types/components/Table/Table.d.ts +39 -0
  204. package/lib/types/components/Tabs/Tabs.d.ts +47 -0
  205. package/lib/types/components/TagInput/TagInput.d.ts +46 -0
  206. package/lib/types/components/TimePicker/TimePicker.d.ts +43 -0
  207. package/lib/types/components/TimePicker/time.d.ts +15 -0
  208. package/lib/types/components/Timeline/Timeline.d.ts +154 -0
  209. package/lib/types/components/Timeline/scale.d.ts +22 -0
  210. package/lib/types/components/Toast/Toaster.d.ts +19 -0
  211. package/lib/types/components/Toast/index.d.ts +4 -0
  212. package/lib/types/components/Toast/store.d.ts +75 -0
  213. package/lib/types/components/ToggleGroup/ToggleGroup.d.ts +28 -0
  214. package/lib/types/components/Toolbar/Toolbar.d.ts +70 -0
  215. package/lib/types/components/Tracker/Tracker.d.ts +43 -0
  216. package/lib/types/components/TreeDiagram/TreeDiagram.d.ts +68 -0
  217. package/lib/types/components/TreeView/TreeView.d.ts +107 -0
  218. package/lib/types/components/index.d.ts +186 -0
  219. package/lib/types/hooks/index.d.ts +17 -0
  220. package/lib/types/hooks/timing.d.ts +29 -0
  221. package/lib/types/hooks/useControllableState.d.ts +5 -0
  222. package/lib/types/hooks/useCountdown.d.ts +19 -0
  223. package/lib/types/hooks/useDigitInput.d.ts +24 -0
  224. package/lib/types/hooks/useDismiss.d.ts +3 -0
  225. package/lib/types/hooks/useElapsed.d.ts +28 -0
  226. package/lib/types/hooks/useFloating.d.ts +21 -0
  227. package/lib/types/hooks/useFocusTrap.d.ts +7 -0
  228. package/lib/types/hooks/usePresence.d.ts +8 -0
  229. package/lib/types/hooks/usePressToOpen.d.ts +20 -0
  230. package/lib/types/hooks/useScrollLock.d.ts +2 -0
  231. package/lib/types/hooks/useSelection.d.ts +29 -0
  232. package/lib/types/index.d.ts +5 -0
  233. package/lib/types/primitives/AspectRatio.d.ts +14 -0
  234. package/lib/types/primitives/BrandIcon.d.ts +12 -0
  235. package/lib/types/primitives/ColorDot.d.ts +20 -0
  236. package/lib/types/primitives/CopyButton.d.ts +12 -0
  237. package/lib/types/primitives/CountBadge.d.ts +28 -0
  238. package/lib/types/primitives/Countdown.d.ts +21 -0
  239. package/lib/types/primitives/Delta.d.ts +33 -0
  240. package/lib/types/primitives/Elapsed.d.ts +23 -0
  241. package/lib/types/primitives/FileIcon.d.ts +17 -0
  242. package/lib/types/primitives/Flag.d.ts +15 -0
  243. package/lib/types/primitives/IconStack.d.ts +27 -0
  244. package/lib/types/primitives/IconTile.d.ts +24 -0
  245. package/lib/types/primitives/Kbd.d.ts +19 -0
  246. package/lib/types/primitives/Layout.d.ts +64 -0
  247. package/lib/types/primitives/Link.d.ts +12 -0
  248. package/lib/types/primitives/MaskedText.d.ts +28 -0
  249. package/lib/types/primitives/Progress.d.ts +52 -0
  250. package/lib/types/primitives/RelativeTime.d.ts +22 -0
  251. package/lib/types/primitives/SearchInput.d.ts +8 -0
  252. package/lib/types/primitives/SelectorButton.d.ts +23 -0
  253. package/lib/types/primitives/Spinner.d.ts +15 -0
  254. package/lib/types/primitives/StatusIcon.d.ts +40 -0
  255. package/lib/types/primitives/Swatch.d.ts +11 -0
  256. package/lib/types/primitives/Tooltip.d.ts +17 -0
  257. package/lib/types/primitives/Typography.d.ts +48 -0
  258. package/lib/types/primitives/formatCountdown.d.ts +2 -0
  259. package/lib/types/primitives/formatElapsed.d.ts +8 -0
  260. package/lib/types/primitives/formatRelativeTime.d.ts +16 -0
  261. package/lib/types/primitives/hotkey.d.ts +10 -0
  262. package/lib/types/primitives/index.d.ts +188 -0
  263. package/lib/types/primitives/maskValue.d.ts +24 -0
  264. package/package.json +54 -4
@@ -0,0 +1,396 @@
1
+ # Typography
2
+
3
+ > 파운데이션 · `@iamfiro/design` · 직접 만들지 말고 이 컴포넌트를 쓴다.
4
+
5
+ 글자는 역할(role)로 골라요. tokens.css의 --type-* 토큰이 역할마다 크기·줄 높이·굵기·자간을 정하고, Text · Heading이 그 값을 그대로 써요. 컨테이너에 data-density를 붙이면 그 안의 본문·라벨·헤딩이 함께 촘촘해지거나 여유로워져요. 마크다운처럼 이미 만들어진 HTML은 Prose로 감싸요.
6
+
7
+ ```tsx
8
+ import { Heading, Prose, Text, type TextVariant } from '@iamfiro/design'
9
+ ```
10
+
11
+ ## API
12
+
13
+ ### Text
14
+
15
+ 나머지 props는 렌더되는 요소로 전달돼요.
16
+
17
+ | prop | 타입 | 기본값 | 설명 |
18
+ | --- | --- | --- | --- |
19
+ | `variant` | `TextVariant` | `'body-md'` | 역할. display-lg/md/sm · heading-xl/lg/md/sm/xs · body-lg/md/sm/xs · label-lg/md/sm/xs · caption · overline · number-xl/lg/md/sm · code. |
20
+ | `as` | `ElementType` | | 렌더할 요소. 생략하면 역할에 맞게(display → h1, heading → h2, body → p, code → code, 나머지 → span). |
21
+ | `tone` | `TextTone` | `'default'` | 'default' \| 'secondary' \| 'tertiary' \| 'disabled' \| 'accent' \| 'success' \| 'warning' \| 'danger' \| 'inverse' \| 'inherit' |
22
+ | `weight` | `'regular' \| 'medium' \| 'semibold' \| 'bold'` | | 역할의 굵기를 덮어써요. |
23
+ | `align` | `'start' \| 'center' \| 'end'` | | 정렬. |
24
+ | `truncate` | `boolean` | | 한 줄 말줄임. |
25
+ | `lineClamp` | `number` | | N줄까지 보여주고 말줄임. |
26
+ | `numeric` | `boolean` | | 고정폭 숫자(tabular-nums). number-* 역할은 항상 켜져 있어요. |
27
+ | `wrap` | `'balance' \| 'pretty'` | | balance는 줄 길이를 고르게(제목), pretty는 마지막 줄에 단어 하나만 남지 않게(본문). |
28
+
29
+ ### Heading
30
+
31
+ Text의 나머지 props(tone, weight, align, truncate …)를 모두 받아요. as · variant는 받지 않아요.
32
+
33
+ | prop | 타입 | 기본값 | 설명 |
34
+ | --- | --- | --- | --- |
35
+ | `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` | 문서 구조 레벨(h1–h6). 1 → heading-xl, 2 → heading-lg, 3 → heading-md, 4 → heading-sm, 5·6 → heading-xs. |
36
+ | `size` | `TextVariant` | | 레벨과 상관없이 보이는 크기. 예: level={2} size="display-sm". |
37
+ | `wrap` | `'balance' \| 'pretty'` | `'balance'` | 줄 나눔 방식. |
38
+
39
+ ### Prose
40
+
41
+ h1–h4, p, ul/ol, blockquote, code, pre, table, hr, a를 정돈해요. 나머지 props는 div로 전달돼요.
42
+
43
+ | prop | 타입 | 기본값 | 설명 |
44
+ | --- | --- | --- | --- |
45
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | 블록 전체 글자 크기. 제목과 간격도 함께 커지고 작아져요. |
46
+
47
+ ## 예제
48
+
49
+ 예제를 감싼 `style={{ ... }}` div는 미리보기 배치용이다. 실제 화면 배치는 `Stack` · `Inline` · `Grid`로 한다.
50
+
51
+ ### 타입 스케일
52
+
53
+ 디스플레이 · 헤딩 · 본문 · 라벨 · 작은 글씨 · 숫자 · 코드. 디스플레이는 화면 폭에 따라 유동적으로 커져요.
54
+
55
+ ```tsx
56
+ import { Text, type TextVariant } from '@iamfiro/design'
57
+
58
+ const SCALE: Array<{ group: string; roles: Array<[TextVariant, string]> }> = [
59
+ {
60
+ group: '디스플레이',
61
+ roles: [
62
+ ['display-lg', '팀의 모든 일을 한곳에서'],
63
+ ['display-md', '이번 달 매출 12% 성장'],
64
+ ['display-sm', '아직 프로젝트가 없어요'],
65
+ ],
66
+ },
67
+ {
68
+ group: '헤딩',
69
+ roles: [
70
+ ['heading-xl', '프로젝트 설정'],
71
+ ['heading-lg', '결제 및 구독'],
72
+ ['heading-md', '알림 채널'],
73
+ ['heading-sm', '최근 활동'],
74
+ ['heading-xs', '팀원 6명'],
75
+ ],
76
+ },
77
+ {
78
+ group: '본문',
79
+ roles: [
80
+ ['body-lg', '변경사항은 저장하는 즉시 모든 팀원에게 반영돼요.'],
81
+ ['body-md', '변경사항은 저장하는 즉시 모든 팀원에게 반영돼요.'],
82
+ ['body-sm', '변경사항은 저장하는 즉시 모든 팀원에게 반영돼요.'],
83
+ ['body-xs', '변경사항은 저장하는 즉시 모든 팀원에게 반영돼요.'],
84
+ ],
85
+ },
86
+ {
87
+ group: '라벨',
88
+ roles: [
89
+ ['label-lg', '변경사항 저장'],
90
+ ['label-md', '팀원 초대'],
91
+ ['label-sm', '필터 초기화'],
92
+ ['label-xs', '베타'],
93
+ ],
94
+ },
95
+ {
96
+ group: '작은 글씨 · 숫자 · 코드',
97
+ roles: [
98
+ ['caption', '마지막 수정 2분 전 · 김민지'],
99
+ ['overline', 'Workspace'],
100
+ ['number-xl', '₩12,480,000'],
101
+ ['number-lg', '98.6%'],
102
+ ['number-md', '1,284건'],
103
+ ['number-sm', '00:42:17'],
104
+ ['code', 'npm i @lumen/ui'],
105
+ ],
106
+ },
107
+ ]
108
+
109
+ export default function Example() {
110
+ return (
111
+ <div style={{ width: '100%', display: 'grid', gap: 36 }}>
112
+ {SCALE.map((group) => (
113
+ <section key={group.group} style={{ display: 'grid', gap: 14 }}>
114
+ <Text as="h4" variant="overline" tone="tertiary">
115
+ {group.group}
116
+ </Text>
117
+ {group.roles.map(([variant, sample]) => (
118
+ <div key={variant} style={{ display: 'grid', gridTemplateColumns: '96px minmax(0, 1fr)', alignItems: 'baseline', gap: 16 }}>
119
+ <Text as="code" variant="label-xs" tone="tertiary">
120
+ {variant}
121
+ </Text>
122
+ <Text as="div" variant={variant} truncate>
123
+ {sample}
124
+ </Text>
125
+ </div>
126
+ ))}
127
+ </section>
128
+ ))}
129
+ </div>
130
+ )
131
+ }
132
+ ```
133
+
134
+ ### 톤
135
+
136
+ 글자 색은 tone으로. 진한 정도(default · secondary · tertiary · disabled)와 상태색, 어두운 배경용 inverse가 있어요.
137
+
138
+ ```tsx
139
+ import { Text, type TextTone } from '@iamfiro/design'
140
+
141
+ const TONES: Array<[TextTone, string]> = [
142
+ ['default', '본문과 제목'],
143
+ ['secondary', '보조 설명'],
144
+ ['tertiary', '메타 정보 · 날짜'],
145
+ ['disabled', '사용할 수 없음'],
146
+ ['accent', '링크 · 강조'],
147
+ ['success', '결제 완료'],
148
+ ['warning', '검토 필요'],
149
+ ['danger', '연결 실패'],
150
+ ]
151
+
152
+ export default function Example() {
153
+ return (
154
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 140px)', gap: '20px 24px' }}>
155
+ {TONES.map(([tone, sample]) => (
156
+ <div key={tone} style={{ display: 'grid', gap: 4 }}>
157
+ <Text variant="label-md" tone={tone}>
158
+ {sample}
159
+ </Text>
160
+ <Text as="code" variant="caption" tone="tertiary">
161
+ {tone}
162
+ </Text>
163
+ </div>
164
+ ))}
165
+ </div>
166
+ )
167
+ }
168
+ ```
169
+
170
+ ### 말줄임
171
+
172
+ truncate는 한 줄, lineClamp는 N줄에서 말줄임표로 잘라요. 부모에 폭이 있어야 해요.
173
+
174
+ ```tsx
175
+ import { Text } from '@iamfiro/design'
176
+
177
+ export default function Example() {
178
+ return (
179
+ <div style={{ width: 340, display: 'grid', gap: 24 }}>
180
+ <div style={{ display: 'grid', gap: 4 }}>
181
+ <Text variant="caption" tone="tertiary">
182
+ truncate
183
+ </Text>
184
+ <Text variant="label-md" truncate>
185
+ 2026년 3분기 이사회 보고서 최종본 — 재무, 인사, 제품 로드맵, 다음 분기 채용 계획 포함.pdf
186
+ </Text>
187
+ </div>
188
+ <div style={{ display: 'grid', gap: 4 }}>
189
+ <Text variant="caption" tone="tertiary">
190
+ lineClamp=2
191
+ </Text>
192
+ <Text tone="secondary" lineClamp={2}>
193
+ 이번 업데이트로 대시보드 로딩 속도가 두 배 빨라졌고, 모든 리포트를 한 번의 클릭으로 CSV로 내보낼 수 있어요. 권한 설정도 팀 단위로
194
+ 세분화되어 관리자가 프로젝트별로 접근 범위를 정할 수 있어요.
195
+ </Text>
196
+ </div>
197
+ </div>
198
+ )
199
+ }
200
+ ```
201
+
202
+ ### 숫자 정렬
203
+
204
+ number-* 역할은 자동으로, 다른 역할은 numeric을 켜면 고정폭 숫자를 써요. 값이 바뀌어도 폭이 흔들리지 않아요.
205
+
206
+ ```tsx
207
+ import { useEffect, useState } from 'react'
208
+ import { Text } from '@iamfiro/design'
209
+
210
+ export default function Example() {
211
+ const [visitors, setVisitors] = useState(18204)
212
+
213
+ useEffect(() => {
214
+ const id = window.setInterval(() => setVisitors((v) => v + Math.floor(Math.random() * 37)), 150)
215
+ return () => window.clearInterval(id)
216
+ }, [])
217
+
218
+ return (
219
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 200px)', gap: 32 }}>
220
+ <div style={{ display: 'grid', gap: 4 }}>
221
+ <Text variant="label-sm" tone="secondary">
222
+ 오늘 방문자
223
+ </Text>
224
+ <Text variant="number-lg">{visitors.toLocaleString('ko-KR')}</Text>
225
+ <Text variant="caption" tone="tertiary">
226
+ number-lg · 자동으로 고정폭
227
+ </Text>
228
+ </div>
229
+ <div style={{ display: 'grid', gap: 4 }}>
230
+ <Text variant="label-sm" tone="secondary">
231
+ 평균 체류 시간
232
+ </Text>
233
+ <Text variant="heading-lg" numeric>
234
+ {(visitors / 97).toFixed(2)}초
235
+ </Text>
236
+ <Text variant="caption" tone="tertiary">
237
+ heading-lg + numeric
238
+ </Text>
239
+ </div>
240
+ </div>
241
+ )
242
+ }
243
+ ```
244
+
245
+ ### 제목 레벨과 크기
246
+
247
+ level은 문서 구조(h1–h6), size는 보이는 크기. 구조는 지키면서 모양만 바꿀 수 있어요. 줄 길이는 기본으로 균형 있게 나눠요.
248
+
249
+ ```tsx
250
+ import { Heading, Text } from '@iamfiro/design'
251
+
252
+ export default function Example() {
253
+ return (
254
+ <div style={{ width: 420, display: 'grid', gap: 28 }}>
255
+ <div style={{ display: 'grid', gap: 10 }}>
256
+ <Heading level={1}>프로젝트 설정</Heading>
257
+ <Heading level={2}>결제 및 구독</Heading>
258
+ <Heading level={3}>알림 채널</Heading>
259
+ <Heading level={4}>최근 활동</Heading>
260
+ <Heading level={5}>팀원 6명</Heading>
261
+ </div>
262
+ <div style={{ display: 'grid', gap: 6 }}>
263
+ <Text variant="caption" tone="tertiary">
264
+ {'level={2} size="display-sm"'}
265
+ </Text>
266
+ <Heading level={2} size="display-sm">
267
+ 팀원이 초대를 수락하면 바로 프로젝트에 참여할 수 있어요
268
+ </Heading>
269
+ </div>
270
+ </div>
271
+ )
272
+ }
273
+ ```
274
+
275
+ ### 밀도
276
+
277
+ 데이터가 많은 화면은 compact, 읽는 화면은 comfortable. 컨테이너 단위로 바꿔요.
278
+
279
+ ```tsx
280
+ import { useState } from 'react'
281
+ import { Heading, Text, Card, CardBody, ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
282
+
283
+ type Density = 'compact' | 'default' | 'comfortable'
284
+
285
+ export default function Example() {
286
+ const [density, setDensity] = useState<Density | null>('default')
287
+
288
+ return (
289
+ <div style={{ width: 400, display: 'grid', gap: 20, justifyItems: 'start' }}>
290
+ <ToggleGroup type="single" required value={density} onValueChange={setDensity} aria-label="밀도">
291
+ <ToggleGroupItem value="compact">촘촘하게</ToggleGroupItem>
292
+ <ToggleGroupItem value="default">기본</ToggleGroupItem>
293
+ <ToggleGroupItem value="comfortable">여유있게</ToggleGroupItem>
294
+ </ToggleGroup>
295
+ <Card data-density={density === 'default' ? undefined : density} style={{ width: '100%' }}>
296
+ <CardBody>
297
+ <div style={{ display: 'grid', gap: 12 }}>
298
+ <Heading level={3}>결제 수단</Heading>
299
+ <Text tone="secondary">등록된 카드로 매월 1일에 자동 결제돼요. 언제든 변경할 수 있어요.</Text>
300
+ <div style={{ display: 'flex', justifyContent: 'space-between' }}>
301
+ <Text variant="label-md">기본 카드</Text>
302
+ <Text variant="body-sm" tone="tertiary" numeric>
303
+ 신한 •••• 4821
304
+ </Text>
305
+ </div>
306
+ <div style={{ display: 'flex', justifyContent: 'space-between' }}>
307
+ <Text variant="label-md">다음 결제</Text>
308
+ <Text variant="body-sm" tone="tertiary" numeric>
309
+ 11월 1일 · ₩29,000
310
+ </Text>
311
+ </div>
312
+ </div>
313
+ </CardBody>
314
+ </Card>
315
+ </div>
316
+ )
317
+ }
318
+ ```
319
+
320
+ ### 인라인 코드 칩
321
+
322
+ 문장 안의 명령 · 값은 Text variant="code"(<code>)로. 회색 채움 칩에 고정폭 글자가 들어가요. 문장 맨 앞 "/명령" 칩에도 그대로 써요.
323
+
324
+ ```tsx
325
+ import { Stack, Text } from '@iamfiro/design'
326
+
327
+ export default function Example() {
328
+ return (
329
+ <Stack gap={3} style={{ maxWidth: 420 }}>
330
+ <Text variant="body-md">
331
+ <Text variant="code">/수정</Text> 소개 문단을 두 문장으로 줄여 주세요.
332
+ </Text>
333
+ <Text variant="body-sm" tone="secondary">
334
+ 설정 파일의 <Text variant="code">theme</Text> 값을 <Text variant="code">light</Text>로 바꾸면 밝은 화면으로 돌아가요.
335
+ </Text>
336
+ </Stack>
337
+ )
338
+ }
339
+ ```
340
+
341
+ ### Prose
342
+
343
+ 마크다운으로 만든 문서, 변경 로그, 도움말, AI 답변 같은 HTML을 그대로 정돈해 보여줘요.
344
+
345
+ ```tsx
346
+ import { Prose } from '@iamfiro/design'
347
+
348
+ export default function Example() {
349
+ return (
350
+ <Prose style={{ width: '100%', maxWidth: 640 }}>
351
+ <h2>Lumen 2.5 업데이트</h2>
352
+ <p>
353
+ 이번 버전은 <strong>대시보드 성능</strong>과 <a href="#permissions">권한 관리</a>에 집중했어요. 기존 설정은 그대로 유지돼요.
354
+ </p>
355
+ <h3>새로워진 점</h3>
356
+ <ul>
357
+ <li>대시보드 로딩이 평균 2배 빨라졌어요.</li>
358
+ <li>
359
+ 모든 리포트를 <code>CSV</code>로 내보낼 수 있어요.
360
+ </li>
361
+ <li>팀 단위 권한을 지원해요.</li>
362
+ </ul>
363
+ <blockquote>업데이트 후 처음 접속하면 새 기능 안내가 한 번 표시돼요.</blockquote>
364
+ <pre>
365
+ <code>npm i @lumen/ui@2.5.0</code>
366
+ </pre>
367
+ <table>
368
+ <thead>
369
+ <tr>
370
+ <th>플랜</th>
371
+ <th>월 요금</th>
372
+ <th>팀원</th>
373
+ </tr>
374
+ </thead>
375
+ <tbody>
376
+ <tr>
377
+ <td>스타터</td>
378
+ <td>₩9,000</td>
379
+ <td>3명</td>
380
+ </tr>
381
+ <tr>
382
+ <td>팀</td>
383
+ <td>₩29,000</td>
384
+ <td>20명</td>
385
+ </tr>
386
+ <tr>
387
+ <td>엔터프라이즈</td>
388
+ <td>문의</td>
389
+ <td>무제한</td>
390
+ </tr>
391
+ </tbody>
392
+ </table>
393
+ </Prose>
394
+ )
395
+ }
396
+ ```