@iamfiro/design 0.0.0-stage → 0.3.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 (416) hide show
  1. package/AGENTS.md +82 -0
  2. package/README.md +15 -2
  3. package/agents/INDEX.md +157 -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/social-login-button/AGENTS.md +156 -0
  90. package/agents/spark-chart/AGENTS.md +257 -0
  91. package/agents/sparkbar/AGENTS.md +92 -0
  92. package/agents/spinner/AGENTS.md +123 -0
  93. package/agents/split-view/AGENTS.md +290 -0
  94. package/agents/stat/AGENTS.md +138 -0
  95. package/agents/status-icon/AGENTS.md +243 -0
  96. package/agents/step-list/AGENTS.md +313 -0
  97. package/agents/table/AGENTS.md +286 -0
  98. package/agents/tabs/AGENTS.md +305 -0
  99. package/agents/tag-input/AGENTS.md +246 -0
  100. package/agents/time-picker/AGENTS.md +228 -0
  101. package/agents/timeline/AGENTS.md +1018 -0
  102. package/agents/toast/AGENTS.md +266 -0
  103. package/agents/toggle-group/AGENTS.md +216 -0
  104. package/agents/toolbar/AGENTS.md +277 -0
  105. package/agents/tooltip/AGENTS.md +154 -0
  106. package/agents/tracker/AGENTS.md +158 -0
  107. package/agents/tree-diagram/AGENTS.md +260 -0
  108. package/agents/tree-view/AGENTS.md +329 -0
  109. package/agents/typography/AGENTS.md +396 -0
  110. package/lib/components/Accordion/Accordion2.js +135 -0
  111. package/lib/components/ActionBar/ActionBar2.js +65 -0
  112. package/lib/components/Alert/Alert2.js +131 -0
  113. package/lib/components/AppShell/AppShell2.js +94 -0
  114. package/lib/components/AreaChart/AreaChart.js +59 -0
  115. package/lib/components/BarChart/BarChart2.js +243 -0
  116. package/lib/components/BarList/BarList2.js +172 -0
  117. package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
  118. package/lib/components/Calendar/Calendar2.js +309 -0
  119. package/lib/components/Calendar/DatePicker2.js +229 -0
  120. package/lib/components/Calendar/date.js +121 -0
  121. package/lib/components/Card/Card2.js +104 -0
  122. package/lib/components/CardFrame/CardFrame2.js +72 -0
  123. package/lib/components/Chart/ChartParts.js +150 -0
  124. package/lib/components/Chart/chart2.js +96 -0
  125. package/lib/components/Chart/useChartInteraction.js +94 -0
  126. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  127. package/lib/components/ChatBubble/formatChatTime.js +53 -0
  128. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  129. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  130. package/lib/components/CodeBlock/highlight.js +114 -0
  131. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  132. package/lib/components/ColorPicker/color.js +180 -0
  133. package/lib/components/ColorPicker/presets.js +75 -0
  134. package/lib/components/Combobox/Combobox2.js +229 -0
  135. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  136. package/lib/components/Comment/Comment2.js +134 -0
  137. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  138. package/lib/components/DataGrid/DataGrid2.js +1996 -0
  139. package/lib/components/DataGrid/GridPopover.js +154 -0
  140. package/lib/components/DataGrid/anchor.js +50 -0
  141. package/lib/components/DataGrid/model.js +558 -0
  142. package/lib/components/DataGrid/panels.js +703 -0
  143. package/lib/components/DataGrid/typeMeta.js +76 -0
  144. package/lib/components/DataGrid/types.js +54 -0
  145. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  146. package/lib/components/Dialog/AlertDialog.js +118 -0
  147. package/lib/components/Dialog/Dialog2.js +109 -0
  148. package/lib/components/Dialog/modal.js +92 -0
  149. package/lib/components/Drawer/Drawer2.js +244 -0
  150. package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
  151. package/lib/components/DropdownMenu/menuCore.js +63 -0
  152. package/lib/components/Dropzone/Dropzone2.js +144 -0
  153. package/lib/components/EmptyState/EmptyState2.js +72 -0
  154. package/lib/components/FileChip/FileChip2.js +118 -0
  155. package/lib/components/FileUpload/FileUpload.js +258 -0
  156. package/lib/components/FilterChips/FilterChips2.js +101 -0
  157. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  158. package/lib/components/FunnelChart/funnel.js +69 -0
  159. package/lib/components/Highlight/Highlight2.js +100 -0
  160. package/lib/components/HoverCard/HoverCard.js +134 -0
  161. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  162. package/lib/components/InlineDiff/diff.js +126 -0
  163. package/lib/components/InlineDiff/useDiffReview.js +109 -0
  164. package/lib/components/Kanban/Kanban2.js +691 -0
  165. package/lib/components/Kanban/KanbanCard.js +159 -0
  166. package/lib/components/Kanban/move.js +69 -0
  167. package/lib/components/LineChart/LineChart2.js +342 -0
  168. package/lib/components/List/List2.js +133 -0
  169. package/lib/components/Listbox/Listbox2.js +163 -0
  170. package/lib/components/Marker/Marker2.js +82 -0
  171. package/lib/components/Menubar/Menubar2.js +223 -0
  172. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  173. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  174. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  175. package/lib/components/NumberStepper/NumberStepper2.js +129 -0
  176. package/lib/components/OtpInput/OtpInput2.js +122 -0
  177. package/lib/components/Pagination/Pagination2.js +210 -0
  178. package/lib/components/Pagination/paginationRange.js +53 -0
  179. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  180. package/lib/components/PieChart/PieChart2.js +246 -0
  181. package/lib/components/PieChart/arc.js +66 -0
  182. package/lib/components/PieChart/useArcTween.js +94 -0
  183. package/lib/components/Popover/Popover2.js +112 -0
  184. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  185. package/lib/components/Rating/Rating2.js +186 -0
  186. package/lib/components/Resizable/Resizable2.js +236 -0
  187. package/lib/components/Resizable/layout.js +115 -0
  188. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  189. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  190. package/lib/components/ScatterChart/scatter.js +83 -0
  191. package/lib/components/ScrollArea/ScrollArea2.js +218 -0
  192. package/lib/components/Select/Select2.js +153 -0
  193. package/lib/components/Sidebar/Sidebar2.js +127 -0
  194. package/lib/components/Skeleton/Skeleton2.js +91 -0
  195. package/lib/components/Slider/Slider2.js +142 -0
  196. package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
  197. package/lib/components/SparkChart/SparkChart2.js +217 -0
  198. package/lib/components/SparkChart/spark.js +76 -0
  199. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  200. package/lib/components/SplitView/SplitView2.js +95 -0
  201. package/lib/components/Stat/Stat2.js +164 -0
  202. package/lib/components/StepList/StepList2.js +131 -0
  203. package/lib/components/Table/Table2.js +104 -0
  204. package/lib/components/Tabs/Tabs2.js +131 -0
  205. package/lib/components/TagInput/TagInput2.js +360 -0
  206. package/lib/components/TimePicker/TimePicker2.js +388 -0
  207. package/lib/components/TimePicker/time.js +83 -0
  208. package/lib/components/Timeline/Timeline2.js +369 -0
  209. package/lib/components/Timeline/scale.js +83 -0
  210. package/lib/components/Toast/Toaster.js +212 -0
  211. package/lib/components/Toast/store.js +129 -0
  212. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  213. package/lib/components/Toolbar/Toolbar2.js +281 -0
  214. package/lib/components/Tracker/Tracker2.js +172 -0
  215. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  216. package/lib/components/TreeView/TreeView2.js +284 -0
  217. package/lib/hooks/timing.js +55 -0
  218. package/lib/hooks/useControllableState.js +49 -0
  219. package/lib/hooks/useCountdown.js +80 -0
  220. package/lib/hooks/useDigitInput.js +105 -0
  221. package/lib/hooks/useDismiss.js +71 -0
  222. package/lib/hooks/useElapsed.js +83 -0
  223. package/lib/hooks/useFloating.js +70 -0
  224. package/lib/hooks/useFocusTrap.js +61 -0
  225. package/lib/hooks/usePresence.js +60 -0
  226. package/lib/hooks/usePressToOpen.js +69 -0
  227. package/lib/hooks/useScrollLock.js +70 -0
  228. package/lib/hooks/useSelection.js +68 -0
  229. package/lib/index.js +178 -0
  230. package/lib/primitives/AspectRatio2.js +80 -0
  231. package/lib/primitives/BrandIcon.js +245 -0
  232. package/lib/primitives/ColorDot2.js +70 -0
  233. package/lib/primitives/CopyButton2.js +85 -0
  234. package/lib/primitives/CountBadge2.js +78 -0
  235. package/lib/primitives/Countdown2.js +65 -0
  236. package/lib/primitives/Delta2.js +67 -0
  237. package/lib/primitives/Elapsed.js +62 -0
  238. package/lib/primitives/FileIcon2.js +125 -0
  239. package/lib/primitives/Flag2.js +263 -0
  240. package/lib/primitives/IconStack2.js +85 -0
  241. package/lib/primitives/IconTile2.js +68 -0
  242. package/lib/primitives/Kbd2.js +88 -0
  243. package/lib/primitives/Layout2.js +118 -0
  244. package/lib/primitives/Link2.js +53 -0
  245. package/lib/primitives/MaskedText2.js +120 -0
  246. package/lib/primitives/Progress2.js +137 -0
  247. package/lib/primitives/RelativeTime.js +84 -0
  248. package/lib/primitives/SearchInput2.js +84 -0
  249. package/lib/primitives/SelectorButton2.js +97 -0
  250. package/lib/primitives/Spinner2.js +98 -0
  251. package/lib/primitives/StatusIcon2.js +126 -0
  252. package/lib/primitives/Swatch2.js +79 -0
  253. package/lib/primitives/Tooltip2.js +132 -0
  254. package/lib/primitives/Typography2.js +97 -0
  255. package/lib/primitives/formatCountdown.js +51 -0
  256. package/lib/primitives/formatElapsed.js +66 -0
  257. package/lib/primitives/formatRelativeTime.js +64 -0
  258. package/lib/primitives/hotkey.js +94 -0
  259. package/lib/primitives/index.js +352 -0
  260. package/lib/primitives/maskValue.js +65 -0
  261. package/lib/style.css +2 -0
  262. package/lib/types/components/Accordion/Accordion.d.ts +57 -0
  263. package/lib/types/components/ActionBar/ActionBar.d.ts +24 -0
  264. package/lib/types/components/Alert/Alert.d.ts +36 -0
  265. package/lib/types/components/AppShell/AppShell.d.ts +38 -0
  266. package/lib/types/components/AreaChart/AreaChart.d.ts +17 -0
  267. package/lib/types/components/BarChart/BarChart.d.ts +57 -0
  268. package/lib/types/components/BarList/BarList.d.ts +56 -0
  269. package/lib/types/components/Breadcrumb/Breadcrumb.d.ts +15 -0
  270. package/lib/types/components/Calendar/Calendar.d.ts +34 -0
  271. package/lib/types/components/Calendar/DatePicker.d.ts +45 -0
  272. package/lib/types/components/Calendar/date.d.ts +32 -0
  273. package/lib/types/components/Card/Card.d.ts +64 -0
  274. package/lib/types/components/CardFrame/CardFrame.d.ts +15 -0
  275. package/lib/types/components/Chart/ChartParts.d.ts +38 -0
  276. package/lib/types/components/Chart/chart.d.ts +46 -0
  277. package/lib/types/components/Chart/useChartInteraction.d.ts +39 -0
  278. package/lib/types/components/ChatBubble/ChatBubble.d.ts +61 -0
  279. package/lib/types/components/ChatBubble/formatChatTime.d.ts +2 -0
  280. package/lib/types/components/ChatComposer/ChatComposer.d.ts +42 -0
  281. package/lib/types/components/CodeBlock/CodeBlock.d.ts +18 -0
  282. package/lib/types/components/CodeBlock/highlight.d.ts +10 -0
  283. package/lib/types/components/ColorPicker/ColorPicker.d.ts +61 -0
  284. package/lib/types/components/ColorPicker/color.d.ts +48 -0
  285. package/lib/types/components/ColorPicker/presets.d.ts +7 -0
  286. package/lib/types/components/Combobox/Combobox.d.ts +48 -0
  287. package/lib/types/components/CommandMenu/CommandMenu.d.ts +51 -0
  288. package/lib/types/components/Comment/Comment.d.ts +45 -0
  289. package/lib/types/components/ContextMenu/ContextMenu.d.ts +40 -0
  290. package/lib/types/components/DataGrid/DataGrid.d.ts +43 -0
  291. package/lib/types/components/DataGrid/GridPopover.d.ts +43 -0
  292. package/lib/types/components/DataGrid/anchor.d.ts +5 -0
  293. package/lib/types/components/DataGrid/model.d.ts +61 -0
  294. package/lib/types/components/DataGrid/panels.d.ts +63 -0
  295. package/lib/types/components/DataGrid/typeMeta.d.ts +6 -0
  296. package/lib/types/components/DataGrid/types.d.ts +77 -0
  297. package/lib/types/components/DescriptionList/DescriptionList.d.ts +77 -0
  298. package/lib/types/components/Dialog/AlertDialog.d.ts +26 -0
  299. package/lib/types/components/Dialog/Dialog.d.ts +42 -0
  300. package/lib/types/components/Dialog/modal.d.ts +38 -0
  301. package/lib/types/components/Drawer/Drawer.d.ts +62 -0
  302. package/lib/types/components/DropdownMenu/DropdownMenu.d.ts +97 -0
  303. package/lib/types/components/DropdownMenu/menuCore.d.ts +23 -0
  304. package/lib/types/components/Dropzone/Dropzone.d.ts +30 -0
  305. package/lib/types/components/EmptyState/EmptyState.d.ts +26 -0
  306. package/lib/types/components/FileChip/FileChip.d.ts +32 -0
  307. package/lib/types/components/FileUpload/FileUpload.d.ts +52 -0
  308. package/lib/types/components/FilterChips/FilterChips.d.ts +37 -0
  309. package/lib/types/components/FunnelChart/FunnelChart.d.ts +38 -0
  310. package/lib/types/components/FunnelChart/funnel.d.ts +25 -0
  311. package/lib/types/components/Highlight/Highlight.d.ts +35 -0
  312. package/lib/types/components/HoverCard/HoverCard.d.ts +47 -0
  313. package/lib/types/components/InlineDiff/InlineDiff.d.ts +36 -0
  314. package/lib/types/components/InlineDiff/diff.d.ts +42 -0
  315. package/lib/types/components/InlineDiff/useDiffReview.d.ts +57 -0
  316. package/lib/types/components/Kanban/Kanban.d.ts +64 -0
  317. package/lib/types/components/Kanban/KanbanCard.d.ts +35 -0
  318. package/lib/types/components/Kanban/move.d.ts +25 -0
  319. package/lib/types/components/LineChart/LineChart.d.ts +85 -0
  320. package/lib/types/components/List/List.d.ts +62 -0
  321. package/lib/types/components/Listbox/Listbox.d.ts +60 -0
  322. package/lib/types/components/Marker/Marker.d.ts +28 -0
  323. package/lib/types/components/Menubar/Menubar.d.ts +50 -0
  324. package/lib/types/components/MultiSelect/MultiSelect.d.ts +38 -0
  325. package/lib/types/components/NavigationMenu/NavigationMenu.d.ts +101 -0
  326. package/lib/types/components/NoticeStack/NoticeStack.d.ts +41 -0
  327. package/lib/types/components/NumberStepper/NumberStepper.d.ts +32 -0
  328. package/lib/types/components/OtpInput/OtpInput.d.ts +31 -0
  329. package/lib/types/components/Pagination/Pagination.d.ts +54 -0
  330. package/lib/types/components/Pagination/paginationRange.d.ts +7 -0
  331. package/lib/types/components/PhoneInput/PhoneInput.d.ts +47 -0
  332. package/lib/types/components/PieChart/PieChart.d.ts +67 -0
  333. package/lib/types/components/PieChart/arc.d.ts +26 -0
  334. package/lib/types/components/PieChart/useArcTween.d.ts +15 -0
  335. package/lib/types/components/Popover/Popover.d.ts +28 -0
  336. package/lib/types/components/ProgressTracker/ProgressTracker.d.ts +64 -0
  337. package/lib/types/components/Rating/Rating.d.ts +42 -0
  338. package/lib/types/components/Resizable/Resizable.d.ts +50 -0
  339. package/lib/types/components/Resizable/layout.d.ts +31 -0
  340. package/lib/types/components/ScaledPreview/ScaledPreview.d.ts +38 -0
  341. package/lib/types/components/ScatterChart/ScatterChart.d.ts +81 -0
  342. package/lib/types/components/ScatterChart/scatter.d.ts +14 -0
  343. package/lib/types/components/ScrollArea/ScrollArea.d.ts +34 -0
  344. package/lib/types/components/Select/Select.d.ts +39 -0
  345. package/lib/types/components/Sidebar/Sidebar.d.ts +39 -0
  346. package/lib/types/components/Skeleton/Skeleton.d.ts +47 -0
  347. package/lib/types/components/Slider/Slider.d.ts +36 -0
  348. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  349. package/lib/types/components/SparkChart/SparkChart.d.ts +55 -0
  350. package/lib/types/components/SparkChart/spark.d.ts +16 -0
  351. package/lib/types/components/Sparkbar/Sparkbar.d.ts +39 -0
  352. package/lib/types/components/SplitView/SplitView.d.ts +31 -0
  353. package/lib/types/components/Stat/Stat.d.ts +58 -0
  354. package/lib/types/components/StepList/StepList.d.ts +61 -0
  355. package/lib/types/components/Table/Table.d.ts +39 -0
  356. package/lib/types/components/Tabs/Tabs.d.ts +47 -0
  357. package/lib/types/components/TagInput/TagInput.d.ts +46 -0
  358. package/lib/types/components/TimePicker/TimePicker.d.ts +43 -0
  359. package/lib/types/components/TimePicker/time.d.ts +15 -0
  360. package/lib/types/components/Timeline/Timeline.d.ts +154 -0
  361. package/lib/types/components/Timeline/scale.d.ts +22 -0
  362. package/lib/types/components/Toast/Toaster.d.ts +19 -0
  363. package/lib/types/components/Toast/index.d.ts +4 -0
  364. package/lib/types/components/Toast/store.d.ts +75 -0
  365. package/lib/types/components/ToggleGroup/ToggleGroup.d.ts +28 -0
  366. package/lib/types/components/Toolbar/Toolbar.d.ts +70 -0
  367. package/lib/types/components/Tracker/Tracker.d.ts +43 -0
  368. package/lib/types/components/TreeDiagram/TreeDiagram.d.ts +68 -0
  369. package/lib/types/components/TreeView/TreeView.d.ts +107 -0
  370. package/lib/types/components/index.d.ts +188 -0
  371. package/lib/types/hooks/index.d.ts +17 -0
  372. package/lib/types/hooks/timing.d.ts +29 -0
  373. package/lib/types/hooks/useControllableState.d.ts +5 -0
  374. package/lib/types/hooks/useCountdown.d.ts +19 -0
  375. package/lib/types/hooks/useDigitInput.d.ts +24 -0
  376. package/lib/types/hooks/useDismiss.d.ts +3 -0
  377. package/lib/types/hooks/useElapsed.d.ts +28 -0
  378. package/lib/types/hooks/useFloating.d.ts +21 -0
  379. package/lib/types/hooks/useFocusTrap.d.ts +7 -0
  380. package/lib/types/hooks/usePresence.d.ts +8 -0
  381. package/lib/types/hooks/usePressToOpen.d.ts +20 -0
  382. package/lib/types/hooks/useScrollLock.d.ts +2 -0
  383. package/lib/types/hooks/useSelection.d.ts +29 -0
  384. package/lib/types/index.d.ts +5 -0
  385. package/lib/types/primitives/AspectRatio.d.ts +14 -0
  386. package/lib/types/primitives/BrandIcon.d.ts +12 -0
  387. package/lib/types/primitives/ColorDot.d.ts +20 -0
  388. package/lib/types/primitives/CopyButton.d.ts +12 -0
  389. package/lib/types/primitives/CountBadge.d.ts +28 -0
  390. package/lib/types/primitives/Countdown.d.ts +21 -0
  391. package/lib/types/primitives/Delta.d.ts +33 -0
  392. package/lib/types/primitives/Elapsed.d.ts +23 -0
  393. package/lib/types/primitives/FileIcon.d.ts +17 -0
  394. package/lib/types/primitives/Flag.d.ts +15 -0
  395. package/lib/types/primitives/IconStack.d.ts +27 -0
  396. package/lib/types/primitives/IconTile.d.ts +24 -0
  397. package/lib/types/primitives/Kbd.d.ts +19 -0
  398. package/lib/types/primitives/Layout.d.ts +64 -0
  399. package/lib/types/primitives/Link.d.ts +12 -0
  400. package/lib/types/primitives/MaskedText.d.ts +28 -0
  401. package/lib/types/primitives/Progress.d.ts +52 -0
  402. package/lib/types/primitives/RelativeTime.d.ts +22 -0
  403. package/lib/types/primitives/SearchInput.d.ts +8 -0
  404. package/lib/types/primitives/SelectorButton.d.ts +23 -0
  405. package/lib/types/primitives/Spinner.d.ts +15 -0
  406. package/lib/types/primitives/StatusIcon.d.ts +40 -0
  407. package/lib/types/primitives/Swatch.d.ts +11 -0
  408. package/lib/types/primitives/Tooltip.d.ts +17 -0
  409. package/lib/types/primitives/Typography.d.ts +48 -0
  410. package/lib/types/primitives/formatCountdown.d.ts +2 -0
  411. package/lib/types/primitives/formatElapsed.d.ts +8 -0
  412. package/lib/types/primitives/formatRelativeTime.d.ts +16 -0
  413. package/lib/types/primitives/hotkey.d.ts +10 -0
  414. package/lib/types/primitives/index.d.ts +188 -0
  415. package/lib/types/primitives/maskValue.d.ts +24 -0
  416. package/package.json +55 -4
@@ -0,0 +1,266 @@
1
+ # Toast
2
+
3
+ > 알림 · `@iamfiro/design` · 직접 만들지 말고 이 컴포넌트를 쓴다.
4
+
5
+ 잠깐 떠올랐다 사라지는 알림. 앱 최상단에 <Toaster />를 한 번만 두고, 어디서든 toast()를 부르면 돼요. 새 토스트가 앞을 덮고 이전 것은 뒤로 살짝 겹쳐 쌓이며, 마우스를 올리면 펼쳐지고 자동 닫힘 시간이 멈춰요. 탭이 안 보이는 동안에도 타이머가 멈춰요.
6
+
7
+ ```tsx
8
+ import { Toaster, toast } from '@iamfiro/design'
9
+
10
+ // 앱 최상단에 한 번
11
+ <Toaster />
12
+ ```
13
+
14
+ ## 디자인 규칙
15
+
16
+ - 겹친 카드 묶음(`Toaster`, `NoticeStack`)은 같은 방식: 뒤 카드는 앞 카드 높이로 맞춰 가장자리만 보이고, hover(의도 지연·유예)·focus로 펼치며, 닫힌 카드는 제자리에서 등장 역방향으로 나가고 나머지가 그 자리로 이동.
17
+ - 되돌릴 수 있는 작업(삭제·보관·이동): 확인 모달 대신 **즉시 실행 + "실행 취소" 토스트**. → `toast.undo()`
18
+ - 글 속 변경 내용(추적된 변경)은 `InlineDiff`: 삭제 = 빨간 취소선 + `--danger-soft`, 추가 = 초록 + `--success-soft`, 진짜 `<del>` · `<ins>` + 화면 읽기 "삭제" · "추가". 검토(수락 · 거절)는 `reviewable`, 툴바(남은 개수 `CountBadge variant="soft" tone="success"`, 이전 · 다음 `Button iconOnly`, 모두 거절 · 모두 수락)는 `useDiffReview` 상태를 함께 써서 조립한다. 검토 카드는 `CardFrame header`(회색 판 위 아이콘 + 문서 이름) 안에 `Card raised` — 회색 Box를 카드 안 제목줄로 넣으면 입력창처럼 보인다. 본문 줄 간격은 넉넉하게(위아래 줄의 색 배경이 닿지 않게). 모두 수락 · 거절은 확인 대신 `toast.undo`. 두 문자열 비교는 `diffWords`, 결과 글은 `applyDiffDecisions`.
19
+
20
+ ## API
21
+
22
+ ### toast
23
+
24
+ 모든 함수는 토스트 id(string)를 돌려줘요. promise는 넘긴 promise를 그대로 돌려줘요.
25
+
26
+ | prop | 타입 | 기본값 | 설명 |
27
+ | --- | --- | --- | --- |
28
+ | `toast(title, options?)` | `(ReactNode, ToastOptions) => string` | | 기본 토스트. |
29
+ | `toast.success / error / warning / info` | `(title, options?) => string` | | 아이콘이 붙은 상태별 토스트. |
30
+ | `toast.loading` | `(title, options?) => string` | | 스피너가 도는 토스트. 자동으로 닫히지 않아요. |
31
+ | `toast.update` | `(id, patch) => void` | | type · title · description · action 등을 바꿔요. 타이머도 다시 시작해요. |
32
+ | `toast.dismiss` | `(id?) => void` | | 닫기 애니메이션 후 제거. id를 생략하면 모두 닫아요. |
33
+ | `toast.promise` | `(promise, { loading, success, error }, options?) => Promise<T>` | | 로딩 → 성공 / 오류로 바뀌는 토스트. 각 상태는 문구, { title, description }, 또는 결과를 받는 함수. |
34
+ | `toast.undo` | `(title, { onUndo, onCommit?, undoLabel?, ...options }) => string` | | '실행 취소' 버튼이 달린 토스트. 기본 6초 동안 보이고, 취소 없이 닫히면 onCommit을 불러요. |
35
+
36
+ ### ToastOptions
37
+
38
+ | prop | 타입 | 기본값 | 설명 |
39
+ | --- | --- | --- | --- |
40
+ | `description` | `ReactNode` | | 제목 아래 설명. |
41
+ | `type` | `'default' \| 'success' \| 'error' \| 'warning' \| 'info' \| 'loading'` | `'default'` | toast()에서 종류를 직접 지정할 때. |
42
+ | `action` | `{ label: ReactNode; onClick: () => void }` | | 오른쪽 버튼. 누르면 onClick 후 닫혀요. |
43
+ | `duration` | `number` | `4000` | 자동 닫힘까지 ms. Infinity면 계속 남아요. |
44
+ | `id` | `string` | | 같은 id가 있으면 새로 쌓지 않고 그 토스트를 바꿔요. |
45
+ | `icon` | `ReactNode` | | 종류별 아이콘 대신 쓸 아이콘. |
46
+ | `closable` | `boolean` | `true` | false면 × 버튼을 숨겨요. |
47
+ | `onDismiss` | `() => void` | | 어떤 이유로든 닫힐 때 한 번 불려요. |
48
+
49
+ ### Toaster
50
+
51
+ 앱에 한 번만 둬요. document.body에 포털로 그려요.
52
+
53
+ | prop | 타입 | 기본값 | 설명 |
54
+ | --- | --- | --- | --- |
55
+ | `position` | `'top-left' \| 'top-center' \| 'top-right' \| 'bottom-left' \| 'bottom-center' \| 'bottom-right'` | `'bottom-right'` | 화면 위치. |
56
+ | `visibleToasts` | `number` | `3` | 스택에 보이는 최대 개수. 더 오래된 것은 뒤로 사라져요. |
57
+ | `duration` | `number` | `4000` | 기본 자동 닫힘 시간(ms). |
58
+ | `gap` | `number` | `10` | 펼쳤을 때 토스트 사이 간격(px). |
59
+ | `expand` | `boolean` | | 마우스를 올리지 않아도 항상 펼쳐 둬요. |
60
+ | `className` | `string` | | 루트에 붙일 클래스. |
61
+
62
+ ## 예제
63
+
64
+ 예제를 감싼 `style={{ ... }}` div는 미리보기 배치용이다. 실제 화면 배치는 `Stack` · `Inline` · `Grid`로 한다.
65
+
66
+ ### 종류
67
+
68
+ toast()는 기본, toast.success / error / warning / info / loading은 아이콘이 붙어요. loading은 직접 닫거나 바꾸기 전까지 남아 있어요. toast.dismiss()는 모두 닫아요.
69
+
70
+ ```tsx
71
+ import { Button, toast } from '@iamfiro/design'
72
+
73
+ export default function Example() {
74
+ return (
75
+ <div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', gap: 8 }}>
76
+ <Button onClick={() => toast('변경사항을 저장했어요')}>기본</Button>
77
+ <Button onClick={() => toast.success('결제가 완료됐어요', { description: '영수증을 이메일로 보냈어요.' })}>성공</Button>
78
+ <Button onClick={() => toast.error('저장하지 못했어요', { description: '네트워크 연결을 확인해 주세요.' })}>오류</Button>
79
+ <Button onClick={() => toast.warning('저장 공간이 거의 찼어요', { description: '10GB 중 9.2GB 사용 중' })}>경고</Button>
80
+ <Button onClick={() => toast.info('새 버전이 나왔어요', { description: '새로고침하면 적용돼요.' })}>정보</Button>
81
+ <Button onClick={() => toast.loading('동기화 중…', { description: '닫기 전까지 계속 보여요.' })}>로딩</Button>
82
+ <Button variant="ghost" onClick={() => toast.dismiss()}>
83
+ 모두 닫기
84
+ </Button>
85
+ </div>
86
+ )
87
+ }
88
+ ```
89
+
90
+ ### 실행 취소
91
+
92
+ 되돌릴 수 있는 작업은 확인 창 대신 바로 실행하고 toast.undo()로 "실행 취소"를 보여 줘요. 실제 영구 처리는 토스트가 취소 없이 닫힐 때 onCommit에서 해요. ⌘/Ctrl+Z로도 취소돼요.
93
+
94
+ ```tsx
95
+ import { useState } from 'react'
96
+ import { FileText, RotateCcw, Trash2 } from 'lucide-react'
97
+ import { Button, Text, Card, CardHeader, toast } from '@iamfiro/design'
98
+
99
+ const FILES = [
100
+ { id: 'f1', name: '3분기 이사회 보고서.pdf', meta: '4.2MB · 김민지' },
101
+ { id: 'f2', name: '브랜드 가이드 v3.fig', meta: '18MB · 박서연' },
102
+ { id: 'f3', name: '10월 회의록.docx', meta: '120KB · 이도현' },
103
+ ]
104
+
105
+ export default function Example() {
106
+ // 화면에서 바로 지운 파일(되돌릴 수 있음)과 실제로 영구 삭제된 파일을 따로 들고 있어요.
107
+ const [hidden, setHidden] = useState<string[]>([])
108
+ const [committed, setCommitted] = useState<string[]>([])
109
+
110
+ const remove = (file: (typeof FILES)[number]) => {
111
+ setHidden((ids) => [...ids, file.id])
112
+ toast.undo(`‘${file.name}’ 파일을 삭제했어요`, {
113
+ onUndo: () => setHidden((ids) => ids.filter((id) => id !== file.id)),
114
+ onCommit: () => setCommitted((ids) => [...ids, file.id]),
115
+ })
116
+ }
117
+
118
+ const reset = () => {
119
+ setHidden([])
120
+ setCommitted([])
121
+ }
122
+
123
+ const files = FILES.filter((f) => !hidden.includes(f.id))
124
+
125
+ return (
126
+ <div style={{ display: 'grid', gap: 8, width: 380 }}>
127
+ {files.map((file) => (
128
+ <Card key={file.id} padding="sm">
129
+ <CardHeader
130
+ icon={<FileText />}
131
+ title={file.name}
132
+ description={file.meta}
133
+ actions={<Button iconOnly variant="ghost" size="sm" icon={<Trash2 />} aria-label={`${file.name} 삭제`} onClick={() => remove(file)} />}
134
+ />
135
+ </Card>
136
+ ))}
137
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: 4 }}>
138
+ <Text variant="body-sm" tone="tertiary" numeric>
139
+ 영구 삭제됨 {committed.length}개
140
+ </Text>
141
+ <Button variant="ghost" size="sm" icon={<RotateCcw />} onClick={reset}>
142
+ 처음으로
143
+ </Button>
144
+ </div>
145
+ </div>
146
+ )
147
+ }
148
+ ```
149
+
150
+ ### 상태 바꾸기
151
+
152
+ toast.loading()이 돌려준 id로 toast.update()를 부르면 같은 토스트가 새 상태로 바뀌어요. 아이콘이 바뀌고 글이 한 줄씩 다시 올라와요.
153
+
154
+ ```tsx
155
+ import { Upload } from 'lucide-react'
156
+ import { Button, toast } from '@iamfiro/design'
157
+
158
+ const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
159
+ const FILE = '3분기 이사회 보고서.pdf · 4.2MB'
160
+
161
+ async function upload() {
162
+ const id = toast.loading('보고서 업로드 중…', { description: FILE })
163
+ await wait(1600)
164
+ toast.update(id, { type: 'warning', title: '연결이 느려요', description: '조금만 기다려 주세요 · 62%' })
165
+ await wait(1600)
166
+ toast.update(id, { type: 'loading', title: '마무리하는 중…', description: FILE })
167
+ await wait(1200)
168
+ toast.update(id, {
169
+ type: 'success',
170
+ title: '업로드 완료',
171
+ description: '팀원 4명에게 공유했어요.',
172
+ action: { label: '열기', onClick: () => toast.info('보고서를 열었어요') },
173
+ })
174
+ }
175
+
176
+ export default function Example() {
177
+ return (
178
+ <Button variant="primary" icon={<Upload />} onClick={upload}>
179
+ 보고서 업로드
180
+ </Button>
181
+ )
182
+ }
183
+ ```
184
+
185
+ ### promise
186
+
187
+ toast.promise()는 로딩 토스트를 띄우고 promise 결과에 따라 성공·오류로 바꿔요. 각 문구는 결과값이나 오류를 받는 함수로 쓸 수 있어요.
188
+
189
+ ```tsx
190
+ import { Button, toast } from '@iamfiro/design'
191
+
192
+ const sendInvites = (ok: boolean) =>
193
+ new Promise<number>((resolve, reject) => setTimeout(() => (ok ? resolve(3) : reject(new Error('권한이 없어요'))), 1800))
194
+
195
+ export default function Example() {
196
+ const invite = (ok: boolean) =>
197
+ toast
198
+ .promise(sendInvites(ok), {
199
+ loading: { title: '초대 메일 보내는 중…', description: 'design@lumen.app 외 2명' },
200
+ success: (count) => ({ title: `${count}명에게 초대를 보냈어요`, description: '수락하면 알려 드릴게요.' }),
201
+ error: (error) => ({ title: '초대를 보내지 못했어요', description: (error as Error).message }),
202
+ })
203
+ .catch(() => {})
204
+
205
+ return (
206
+ <div style={{ display: 'flex', gap: 8 }}>
207
+ <Button variant="primary" onClick={() => invite(true)}>
208
+ 초대 보내기
209
+ </Button>
210
+ <Button onClick={() => invite(false)}>실패하는 경우</Button>
211
+ </div>
212
+ )
213
+ }
214
+ ```
215
+
216
+ ### 옵션
217
+
218
+ action으로 버튼을 달고(누르면 닫혀요), duration: Infinity와 closable: false로 계속 띄워 둘 수 있어요. icon으로 아이콘을 바꾸고, 같은 id로 다시 부르면 새로 쌓이지 않고 그 자리에서 바뀌어요.
219
+
220
+ ```tsx
221
+ import { useRef } from 'react'
222
+ import { PartyPopper, WifiOff } from 'lucide-react'
223
+ import { Button, toast } from '@iamfiro/design'
224
+
225
+ export default function Example() {
226
+ const unread = useRef(0)
227
+
228
+ return (
229
+ <div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', gap: 8 }}>
230
+ <Button
231
+ onClick={() =>
232
+ toast.error('저장하지 못했어요', {
233
+ description: '네트워크 연결을 확인해 주세요.',
234
+ action: { label: '다시 시도', onClick: () => toast.success('저장했어요') },
235
+ })
236
+ }
237
+ >
238
+ 액션 버튼
239
+ </Button>
240
+ <Button
241
+ onClick={() =>
242
+ toast('오프라인 상태예요', {
243
+ id: 'offline',
244
+ icon: <WifiOff />,
245
+ description: '연결되면 자동으로 동기화해요.',
246
+ duration: Infinity,
247
+ closable: false,
248
+ action: { label: '다시 연결', onClick: () => toast.success('다시 연결했어요') },
249
+ })
250
+ }
251
+ >
252
+ 닫을 때까지 유지
253
+ </Button>
254
+ <Button onClick={() => toast('10월 목표를 달성했어요', { icon: <PartyPopper />, duration: 8000 })}>사용자 아이콘 · 8초</Button>
255
+ <Button
256
+ onClick={() => {
257
+ unread.current += 1
258
+ toast.info(`새 댓글 ${unread.current}개`, { id: 'comments', description: '김민지님 외 여러 명이 남겼어요.' })
259
+ }}
260
+ >
261
+ 같은 id로 교체
262
+ </Button>
263
+ </div>
264
+ )
265
+ }
266
+ ```
@@ -0,0 +1,216 @@
1
+ # ToggleGroup
2
+
3
+ > 선택 컨트롤 · `@iamfiro/design` · 직접 만들지 말고 이 컴포넌트를 쓴다.
4
+
5
+ 눌러서 켜고 끄는 버튼 묶음. type='single'은 라디오처럼 하나만, 'multiple'은 각각 따로 켜져요. 단일 선택은 흰 배경이 선택된 항목으로 미끄러지고, 화살표 키로 이동하면 선택도 함께 옮겨가요.
6
+
7
+ ```tsx
8
+ import { ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
9
+ ```
10
+
11
+ ## API
12
+
13
+ ### ToggleGroup
14
+
15
+ | prop | 타입 | 기본값 | 설명 |
16
+ | --- | --- | --- | --- |
17
+ | `type` (필수) | `'single' \| 'multiple'` | | 하나만 / 여러 개. |
18
+ | `value` | `V \| null · V[] (multiple)` | | 선택된 값(제어). V는 string \| number. |
19
+ | `defaultValue` | `V \| null · V[] (multiple)` | | 처음 선택값(비제어). |
20
+ | `onValueChange` | `(value: V \| null) => void · (value: V[]) => void` | | 값이 바뀔 때. |
21
+ | `required` | `boolean` | | type='single' 전용. 선택된 항목을 다시 눌러도 해제되지 않아요. |
22
+ | `variant` | `'soft' \| 'ghost'` | `'soft'` | soft: 회색 트랙 + 흰 선택 · ghost: 글자만, 선택 시 회색 채움. |
23
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | 크기. |
24
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | 배치 방향. 화살표 키 방향도 따라 바뀌어요. |
25
+ | `disabled` | `boolean` | | 모든 항목 비활성. |
26
+ | `aria-label` | `string` | | 그룹 이름(스크린 리더). |
27
+
28
+ ### ToggleGroupItem
29
+
30
+ 나머지 button 속성(aria-label, onClick 등)도 그대로 받아요. ToggleGroup.Item으로도 쓸 수 있어요.
31
+
32
+ | prop | 타입 | 기본값 | 설명 |
33
+ | --- | --- | --- | --- |
34
+ | `value` (필수) | `string \| number` | | 이 항목의 값. |
35
+ | `icon` | `ReactNode` | | 앞 아이콘. children이 없으면 아이콘 전용 정사각형 버튼. |
36
+ | `children` | `ReactNode` | | 버튼 글자. |
37
+ | `disabled` | `boolean` | | 이 항목만 비활성. 키보드 이동에서도 건너뛰어요. |
38
+
39
+ ## 예제
40
+
41
+ 예제를 감싼 `style={{ ... }}` div는 미리보기 배치용이다. 실제 화면 배치는 `Stack` · `Inline` · `Grid`로 한다.
42
+
43
+ ### 하나만 선택
44
+
45
+ required를 주면 선택된 항목을 다시 눌러도 꺼지지 않아요. Tab은 선택된 항목에 멈추고, ←→ / Home / End로 이동해요.
46
+
47
+ ```tsx
48
+ import { useState } from 'react'
49
+ import { AlignCenter, AlignLeft, AlignRight } from 'lucide-react'
50
+ import { ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
51
+
52
+ export default function Example() {
53
+ const [align, setAlign] = useState<string | null>('left')
54
+ return (
55
+ <ToggleGroup type="single" required value={align} onValueChange={setAlign} aria-label="문단 정렬">
56
+ <ToggleGroupItem value="left" icon={<AlignLeft />}>
57
+ 왼쪽
58
+ </ToggleGroupItem>
59
+ <ToggleGroupItem value="center" icon={<AlignCenter />}>
60
+ 가운데
61
+ </ToggleGroupItem>
62
+ <ToggleGroupItem value="right" icon={<AlignRight />}>
63
+ 오른쪽
64
+ </ToggleGroupItem>
65
+ </ToggleGroup>
66
+ )
67
+ }
68
+ ```
69
+
70
+ ### 여러 개 선택 · 아이콘만
71
+
72
+ 글자 없이 icon만 주면 정사각형 버튼이 돼요. 이때는 aria-label을 꼭 넣어 주세요.
73
+
74
+ ```tsx
75
+ import { useState } from 'react'
76
+ import { Bold, Italic, Strikethrough, Underline } from 'lucide-react'
77
+ import { ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
78
+
79
+ export default function Example() {
80
+ const [marks, setMarks] = useState<string[]>(['bold'])
81
+ return (
82
+ <ToggleGroup type="multiple" value={marks} onValueChange={setMarks} aria-label="텍스트 서식">
83
+ <ToggleGroupItem value="bold" icon={<Bold />} aria-label="굵게" />
84
+ <ToggleGroupItem value="italic" icon={<Italic />} aria-label="기울임" />
85
+ <ToggleGroupItem value="underline" icon={<Underline />} aria-label="밑줄" />
86
+ <ToggleGroupItem value="strike" icon={<Strikethrough />} aria-label="취소선" />
87
+ </ToggleGroup>
88
+ )
89
+ }
90
+ ```
91
+
92
+ ### ghost
93
+
94
+ variant='ghost'는 트랙 없이 글자만 두고, 선택된 항목에만 회색 채움이 생겨요. 개별 항목은 disabled로 막을 수 있어요.
95
+
96
+ ```tsx
97
+ import { useState } from 'react'
98
+ import { ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
99
+
100
+ export default function Example() {
101
+ const [period, setPeriod] = useState<string | null>('week')
102
+ return (
103
+ <div style={{ display: 'grid', gap: 16, justifyItems: 'start' }}>
104
+ <ToggleGroup type="single" variant="ghost" required value={period} onValueChange={setPeriod} aria-label="기간">
105
+ <ToggleGroupItem value="day">일</ToggleGroupItem>
106
+ <ToggleGroupItem value="week">주</ToggleGroupItem>
107
+ <ToggleGroupItem value="month">월</ToggleGroupItem>
108
+ <ToggleGroupItem value="year">년</ToggleGroupItem>
109
+ <ToggleGroupItem value="custom" disabled>
110
+ 직접 설정
111
+ </ToggleGroupItem>
112
+ </ToggleGroup>
113
+ <ToggleGroup type="multiple" variant="ghost" size="sm" defaultValue={['mine']} aria-label="보기 옵션">
114
+ <ToggleGroupItem value="mine">내 작업</ToggleGroupItem>
115
+ <ToggleGroupItem value="archived">보관됨 포함</ToggleGroupItem>
116
+ <ToggleGroupItem value="subtasks">하위 작업</ToggleGroupItem>
117
+ </ToggleGroup>
118
+ </div>
119
+ )
120
+ }
121
+ ```
122
+
123
+ ### 세로 배치
124
+
125
+ orientation='vertical'이면 ↑↓로 이동해요.
126
+
127
+ ```tsx
128
+ import { CalendarDays, GanttChart, KanbanSquare, List } from 'lucide-react'
129
+ import { ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
130
+
131
+ export default function Example() {
132
+ return (
133
+ <ToggleGroup type="single" orientation="vertical" required defaultValue="board" aria-label="보기 방식">
134
+ <ToggleGroupItem value="list" icon={<List />}>
135
+ 목록
136
+ </ToggleGroupItem>
137
+ <ToggleGroupItem value="board" icon={<KanbanSquare />}>
138
+ 보드
139
+ </ToggleGroupItem>
140
+ <ToggleGroupItem value="calendar" icon={<CalendarDays />}>
141
+ 캘린더
142
+ </ToggleGroupItem>
143
+ <ToggleGroupItem value="timeline" icon={<GanttChart />}>
144
+ 타임라인
145
+ </ToggleGroupItem>
146
+ </ToggleGroup>
147
+ )
148
+ }
149
+ ```
150
+
151
+ ### 테마 전환 (세로 · 아이콘만)
152
+
153
+ 새 컴포넌트 없이 soft · vertical · 아이콘만으로 만든 테마 전환. 선택된 해 · 달 아이콘 밑으로 흰 바탕이 미끄러져요. 아이콘만 쓸 땐 항목마다 aria-label을 넣어요.
154
+
155
+ ```tsx
156
+ import { useState } from 'react'
157
+ import { Monitor, Moon, Sun } from 'lucide-react'
158
+ import { Inline, Text, ToggleGroup, ToggleGroupItem } from '@iamfiro/design'
159
+
160
+ type Theme = 'light' | 'dark' | 'system'
161
+
162
+ const LABEL: Record<Theme, string> = { light: '밝게', dark: '어둡게', system: '시스템 설정' }
163
+
164
+ export default function Example() {
165
+ const [theme, setTheme] = useState<Theme>('light')
166
+ return (
167
+ <Inline gap={5} align="center">
168
+ <ToggleGroup
169
+ type="single"
170
+ required
171
+ orientation="vertical"
172
+ size="sm"
173
+ value={theme}
174
+ onValueChange={(v) => v && setTheme(v)}
175
+ aria-label="테마"
176
+ >
177
+ <ToggleGroupItem value="light" icon={<Sun />} aria-label={LABEL.light} />
178
+ <ToggleGroupItem value="dark" icon={<Moon />} aria-label={LABEL.dark} />
179
+ <ToggleGroupItem value="system" icon={<Monitor />} aria-label={LABEL.system} />
180
+ </ToggleGroup>
181
+ <Text variant="body-sm" tone="secondary">
182
+ 지금: {LABEL[theme]}
183
+ </Text>
184
+ </Inline>
185
+ )
186
+ }
187
+ ```
188
+
189
+ ### 크기와 비활성
190
+
191
+ size sm / md / lg. 그룹에 disabled를 주면 모든 항목이 비활성돼요.
192
+
193
+ ```tsx
194
+ import { ToggleGroup, ToggleGroupItem, type ToggleGroupSize } from '@iamfiro/design'
195
+
196
+ const SIZES: ToggleGroupSize[] = ['sm', 'md', 'lg']
197
+
198
+ export default function Example() {
199
+ return (
200
+ <div style={{ display: 'grid', gap: 16, justifyItems: 'start' }}>
201
+ {SIZES.map((size) => (
202
+ <ToggleGroup key={size} type="single" size={size} required defaultValue="all" aria-label={`보기 범위 (${size})`}>
203
+ <ToggleGroupItem value="all">전체</ToggleGroupItem>
204
+ <ToggleGroupItem value="active">진행 중</ToggleGroupItem>
205
+ <ToggleGroupItem value="done">완료</ToggleGroupItem>
206
+ </ToggleGroup>
207
+ ))}
208
+ <ToggleGroup type="single" disabled defaultValue="all" aria-label="보기 범위 (비활성)">
209
+ <ToggleGroupItem value="all">전체</ToggleGroupItem>
210
+ <ToggleGroupItem value="active">진행 중</ToggleGroupItem>
211
+ <ToggleGroupItem value="done">완료</ToggleGroupItem>
212
+ </ToggleGroup>
213
+ </div>
214
+ )
215
+ }
216
+ ```