@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,42 @@
1
+ import { type ReactNode } from 'react';
2
+ import './ChatComposer.css';
3
+ export interface ChatComposerProps {
4
+ value?: string;
5
+ defaultValue?: string;
6
+ onValueChange?: (value: string) => void;
7
+ /** Enter or the send button. The text is cleared afterwards. */
8
+ onSubmit?: (value: string) => void;
9
+ placeholder?: string;
10
+ disabled?: boolean;
11
+ /** A reply is being generated: the send button turns into stop, and Esc stops too. */
12
+ pending?: boolean;
13
+ onStop?: () => void;
14
+ /** Shows the + button on the left. */
15
+ onAttach?: () => void;
16
+ attachLabel?: string;
17
+ /** Left side of the toolbar, after +: mode chips, etc. */
18
+ tools?: ReactNode;
19
+ /** Right side of the toolbar, before send: model picker, voice, etc. */
20
+ actions?: ReactNode;
21
+ /** Above the text: attached files, quoted message. */
22
+ attachments?: ReactNode;
23
+ /** A strip under a hairline: connected apps, a hint. */
24
+ footer?: ReactNode;
25
+ /** Grows with the text up to this many lines, then scrolls. Default 8 (md) / 4 (sm). */
26
+ maxRows?: number;
27
+ /**
28
+ * md: the text above a toolbar · sm: one compact row — text, `actions` and a small send button
29
+ * side by side — for replies and comments. It still grows with the text up to `maxRows`.
30
+ */
31
+ size?: 'sm' | 'md';
32
+ autoFocus?: boolean;
33
+ name?: string;
34
+ 'aria-label'?: string;
35
+ className?: string;
36
+ }
37
+ /**
38
+ * The message box of a chat. Enter sends, Shift+Enter adds a line (ignored while composing
39
+ * Korean with an IME). The text grows to `maxRows`; clicking anywhere on the empty surface
40
+ * puts the caret in the text.
41
+ */
42
+ export declare function ChatComposer({ value: valueProp, defaultValue, onValueChange, onSubmit, placeholder, disabled, pending, onStop, onAttach, attachLabel, tools, actions, attachments, footer, maxRows, size, autoFocus, name, 'aria-label': ariaLabel, className, }: ChatComposerProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type CodeLanguage } from './highlight';
3
+ import './CodeBlock.css';
4
+ export interface CodeBlockProps {
5
+ code: string;
6
+ language?: CodeLanguage;
7
+ /** Shown in a header row (file name, tab title…). */
8
+ title?: ReactNode;
9
+ /** One-line command style with a `$` prompt (install snippets). */
10
+ command?: boolean;
11
+ showLineNumbers?: boolean;
12
+ /** Collapse tall code to this height with a "더 보기" toggle. */
13
+ maxHeight?: number;
14
+ copyable?: boolean;
15
+ className?: string;
16
+ }
17
+ /** Read-only code with light syntax colors and a copy button. */
18
+ export declare function CodeBlock({ code, language, title, command, showLineNumbers, maxHeight, copyable, className, }: CodeBlockProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A tiny highlighter: enough to read TSX / CSS / shell snippets in docs.
3
+ * It tokenizes with one ordered regex per language; anything unmatched is plain text.
4
+ */
5
+ export type CodeLanguage = 'tsx' | 'css' | 'bash' | 'text';
6
+ export interface Token {
7
+ type: 'plain' | 'comment' | 'string' | 'keyword' | 'tag' | 'attr' | 'number' | 'fn' | 'punct' | 'prop';
8
+ text: string;
9
+ }
10
+ export declare function tokenize(code: string, language: CodeLanguage): Token[];
@@ -0,0 +1,61 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import { type ColorFormat } from './color';
3
+ import type { ColorPreset } from './presets';
4
+ import './ColorPicker.css';
5
+ export { CHART_COLOR_PRESETS } from './presets';
6
+ export type { ColorPreset } from './presets';
7
+ export interface ColorPickerProps {
8
+ /** Hex string: `#rrggbb`, or `#rrggbbaa` when `alpha` is on and the color is see-through. */
9
+ value?: string;
10
+ defaultValue?: string;
11
+ /** Fires on every change, also while dragging (preview). */
12
+ onValueChange?: (value: string) => void;
13
+ /** Fires once per finished change: pointer up, a key press, Enter / blur in a field, a swatch click. Not after Esc. */
14
+ onValueCommit?: (value: string) => void;
15
+ /** Adds the opacity slider and field; the value may then carry an alpha byte. */
16
+ alpha?: boolean;
17
+ /** Which text fields to show (and copy): HEX · RGB · HSL. */
18
+ format?: ColorFormat;
19
+ defaultFormat?: ColorFormat;
20
+ onFormatChange?: (format: ColorFormat) => void;
21
+ /** Preset swatches: CSS colors or token names. `CHART_COLOR_PRESETS` is a ready set. */
22
+ presets?: Array<string | ColorPreset>;
23
+ presetsLabel?: ReactNode;
24
+ /** Recently used colors (controlled). A color is added when focus leaves the picker after a change. */
25
+ recentColors?: string[];
26
+ defaultRecentColors?: string[];
27
+ onRecentColorsChange?: (colors: string[]) => void;
28
+ /** Hides the recent row entirely. */
29
+ showRecent?: boolean;
30
+ maxRecent?: number;
31
+ /** Show the screen eyedropper button when the browser supports it (EyeDropper API). */
32
+ eyeDropper?: boolean;
33
+ /** Show a copy button for the value in the current format. */
34
+ copyable?: boolean;
35
+ disabled?: boolean;
36
+ className?: string;
37
+ style?: CSSProperties;
38
+ 'aria-label'?: string;
39
+ }
40
+ /**
41
+ * A color picker panel: saturation/brightness area, hue and opacity sliders, HEX · RGB · HSL fields,
42
+ * presets, recent colors, eyedropper and copy. Dragging previews (onValueChange), letting go commits
43
+ * (onValueCommit), Esc mid-drag restores the color from before the drag.
44
+ */
45
+ export declare function ColorPicker({ value: valueProp, defaultValue, onValueChange, onValueCommit, alpha, format: formatProp, defaultFormat, onFormatChange, presets, presetsLabel, recentColors, defaultRecentColors, onRecentColorsChange, showRecent, maxRecent, eyeDropper, copyable, disabled, className, style, 'aria-label': ariaLabel, }: ColorPickerProps): import("react").JSX.Element;
46
+ export interface ColorFieldProps extends Omit<ColorPickerProps, 'className' | 'style'> {
47
+ open?: boolean;
48
+ defaultOpen?: boolean;
49
+ onOpenChange?: (open: boolean) => void;
50
+ size?: 'sm' | 'md' | 'lg';
51
+ invalid?: boolean;
52
+ /** Popover width in px. */
53
+ popoverWidth?: number;
54
+ /** Submits the hex value with forms. */
55
+ name?: string;
56
+ id?: string;
57
+ className?: string;
58
+ 'aria-labelledby'?: string;
59
+ }
60
+ /** A field that looks like an input (color chip + value) and opens a ColorPicker in a popover. */
61
+ export declare function ColorField({ value: valueProp, defaultValue, onValueChange, format: formatProp, defaultFormat, onFormatChange, recentColors, defaultRecentColors, onRecentColorsChange, open: openProp, defaultOpen, onOpenChange, size, invalid, popoverWidth, name, id, className, disabled, alpha, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...pickerProps }: ColorFieldProps): import("react").JSX.Element;
@@ -0,0 +1,48 @@
1
+ /** Red, green, blue 0–255 and alpha 0–1. */
2
+ export interface Rgba {
3
+ r: number;
4
+ g: number;
5
+ b: number;
6
+ a: number;
7
+ }
8
+ /** Hue 0–360, saturation / value 0–1, alpha 0–1 (the picker's working model). */
9
+ export interface Hsva {
10
+ h: number;
11
+ s: number;
12
+ v: number;
13
+ a: number;
14
+ }
15
+ /** Hue 0–360, saturation / lightness 0–1, alpha 0–1. */
16
+ export interface Hsla {
17
+ h: number;
18
+ s: number;
19
+ l: number;
20
+ a: number;
21
+ }
22
+ export type ColorFormat = 'hex' | 'rgb' | 'hsl';
23
+ export declare const clamp: (n: number, lo: number, hi: number) => number;
24
+ /** #rgb, #rgba, #rrggbb, #rrggbbaa (the # is optional). */
25
+ export declare function parseHex(input: string): Rgba | null;
26
+ /** rgb(59 130 246) · rgba(59, 130, 246, 0.5) · bare "59, 130, 246". */
27
+ export declare function parseRgb(input: string): Rgba | null;
28
+ /** hsl(217 91% 60%) · hsla(217, 91%, 60%, 0.5) · bare "217, 91%, 60%". */
29
+ export declare function parseHsl(input: string): Rgba | null;
30
+ /** Any of the formats above. */
31
+ export declare function parseColor(input: string): Rgba | null;
32
+ export declare function rgbToHsv({ r, g, b, a }: Rgba): Hsva;
33
+ export declare function hsvToRgb({ h, s, v, a }: Hsva): Rgba;
34
+ export declare function rgbToHsl({ r, g, b, a }: Rgba): Hsla;
35
+ export declare function hslToRgb({ h, s, l, a }: Hsla): Rgba;
36
+ export declare const hsvToHex: (c: Hsva, alpha?: boolean) => string;
37
+ export declare const hexToHsv: (hex: string) => Hsva | null;
38
+ /** #rrggbb, or #rrggbbaa when `alpha` is on and the color isn't opaque. Lowercase. */
39
+ export declare function formatHex({ r, g, b, a }: Rgba, alpha?: boolean): string;
40
+ export declare function formatRgb({ r, g, b, a }: Rgba): string;
41
+ export declare function formatHsl(rgb: Rgba): string;
42
+ export declare function formatColor(rgb: Rgba, format: ColorFormat, alpha?: boolean): string;
43
+ /** Normalizes any accepted color string to the picker's value (#rrggbb / #rrggbbaa), or null. */
44
+ export declare function normalizeHex(input: string, alpha?: boolean): string | null;
45
+ /** WCAG relative luminance 0–1 (alpha ignored). */
46
+ export declare function luminance({ r, g, b }: Rgba): number;
47
+ /** Whether dark marks (a check, text) read better than white ones on this color. */
48
+ export declare const isLight: (rgb: Rgba) => boolean;
@@ -0,0 +1,7 @@
1
+ /** A preset swatch: a CSS color or a token name (`--chart-1`), with an optional name for the tooltip. */
2
+ export interface ColorPreset {
3
+ color: string;
4
+ label?: string;
5
+ }
6
+ /** The chart series tokens, a handy default palette. */
7
+ export declare const CHART_COLOR_PRESETS: ColorPreset[];
@@ -0,0 +1,48 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ListOption, type OptionState } from '../Listbox/Listbox';
3
+ import './Combobox.css';
4
+ interface ComboboxBaseProps<V extends string> {
5
+ options: ListOption<V>[];
6
+ placeholder?: string;
7
+ size?: 'sm' | 'md' | 'lg';
8
+ disabled?: boolean;
9
+ invalid?: boolean;
10
+ leading?: ReactNode;
11
+ /** Custom matcher; defaults to label + keywords, ignoring case and spaces. */
12
+ filter?: (option: ListOption<V>, query: string) => boolean;
13
+ /** Controlled search text. */
14
+ inputValue?: string;
15
+ onInputChange?: (text: string) => void;
16
+ /** Adds a "'query' 추가" row when nothing matches exactly; you add the option and select it. */
17
+ onCreate?: (query: string) => void;
18
+ createLabel?: (query: string) => ReactNode;
19
+ emptyText?: ReactNode;
20
+ /** Bold the matched part of each label (default on). */
21
+ highlight?: boolean;
22
+ renderOption?: (option: ListOption<V>, state: OptionState & {
23
+ query: string;
24
+ }) => ReactNode;
25
+ maxHeight?: number;
26
+ id?: string;
27
+ className?: string;
28
+ 'aria-label'?: string;
29
+ 'aria-labelledby'?: string;
30
+ }
31
+ export type ComboboxProps<V extends string> = ComboboxBaseProps<V> & ({
32
+ multiple?: false;
33
+ value?: V | null;
34
+ defaultValue?: V | null;
35
+ onValueChange?: (value: V | null) => void;
36
+ } | {
37
+ multiple: true;
38
+ value?: V[];
39
+ defaultValue?: V[];
40
+ onValueChange?: (value: V[]) => void;
41
+ });
42
+ export declare const defaultComboboxFilter: <V extends string>(o: ListOption<V>, q: string) => boolean;
43
+ /**
44
+ * Searchable select. Type to filter, arrows to move, Enter to pick, Escape to close.
45
+ * `multiple` keeps the list open and shows picks as removable tags (Backspace removes the last).
46
+ */
47
+ export declare function Combobox<V extends string>(props: ComboboxProps<V>): import("react").JSX.Element;
48
+ export {};
@@ -0,0 +1,51 @@
1
+ import { type MouseEvent, type ReactElement, type ReactNode } from 'react';
2
+ /** One command row. */
3
+ export interface CommandItem {
4
+ id: string;
5
+ label: string;
6
+ /** Gray text after the label: the app, a channel, a path. Searched too when it's a string. */
7
+ hint?: ReactNode;
8
+ /** Leading tile (IconTile with a logo or icon). */
9
+ icon?: ReactNode;
10
+ /** Key names that run it while the menu is open, e.g. ['mod', '1']. Shown as key caps. */
11
+ shortcut?: string[];
12
+ /** Extra search terms (aliases, English names, …). */
13
+ keywords?: string[];
14
+ disabled?: boolean;
15
+ onSelect?: () => void;
16
+ }
17
+ export interface CommandGroup {
18
+ heading: string;
19
+ items: CommandItem[];
20
+ }
21
+ export interface CommandMenuProps {
22
+ open?: boolean;
23
+ defaultOpen?: boolean;
24
+ onOpenChange?: (open: boolean) => void;
25
+ /** A button that opens the menu. */
26
+ trigger?: ReactElement<{
27
+ onClick?: (e: MouseEvent) => void;
28
+ }>;
29
+ groups: CommandGroup[];
30
+ /** Called with every command that runs (after the item's own onSelect). */
31
+ onSelect?: (item: CommandItem) => void;
32
+ /** Letter that toggles the menu with ⌘ (Mac) / Ctrl from anywhere on the page. `null` turns it off. */
33
+ shortcutKey?: string | null;
34
+ placeholder?: string;
35
+ /** Custom matching; the default looks at the label, a string hint and keywords. */
36
+ filter?: (item: CommandItem, query: string) => boolean;
37
+ emptyText?: (query: string) => ReactNode;
38
+ /** Bottom hint row. `false` hides it. */
39
+ footer?: ReactNode | false;
40
+ /** Close after a command runs. */
41
+ closeOnSelect?: boolean;
42
+ /** Accessible name of the dialog (not shown). */
43
+ title?: string;
44
+ }
45
+ export declare function defaultCommandFilter(item: CommandItem, query: string): boolean;
46
+ /**
47
+ * A ⌘K palette: a search field over grouped commands. Arrows move, Enter runs, Tab jumps to the
48
+ * next section, each command's shortcut runs it directly, and Esc or a click outside closes it.
49
+ * Assembled from Dialog (bare, top), Input (bare), Listbox, Kbd and Text.
50
+ */
51
+ export declare function CommandMenu({ open: openProp, defaultOpen, onOpenChange, trigger, groups, onSelect, shortcutKey, placeholder, filter, emptyText, footer, closeOnSelect, title, }: CommandMenuProps): import("react").JSX.Element;
@@ -0,0 +1,45 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import { type DateInput } from '../../primitives';
3
+ import './Comment.css';
4
+ export interface CommentProps {
5
+ /** Who wrote it. A string also draws the default avatar. */
6
+ author: ReactNode;
7
+ /** Replaces the default avatar (a string `author` gets `<Avatar name={author} />`). */
8
+ avatar?: ReactNode;
9
+ /** When it was written; shown as relative time ("2분 전") with the full date on hover. */
10
+ date?: DateInput;
11
+ /** Small things after the name: a role Badge, "수정됨". */
12
+ meta?: ReactNode;
13
+ /** Buttons on the right (reply, react, more). They appear while the comment is hovered or focused. */
14
+ actions?: ReactNode;
15
+ /** The message. Inline `<Text variant="code">` chips work inside. */
16
+ children?: ReactNode;
17
+ /** Under the message: attachments, a status line (`Collapsible variant="inline"`), reactions. */
18
+ footer?: ReactNode;
19
+ /**
20
+ * A follow-up from the same author right after their previous message: no avatar or name,
21
+ * just the text lined up under the previous one, closer together.
22
+ */
23
+ continued?: boolean;
24
+ /** Avatar size in px. The text column lines up with it. */
25
+ avatarSize?: number;
26
+ className?: string;
27
+ style?: CSSProperties;
28
+ }
29
+ /** One message in a comment thread or discussion: avatar, name, relative time, text, actions. */
30
+ export declare function Comment({ author, avatar, date, meta, actions, children, footer, continued, avatarSize, className, style, }: CommentProps): import("react").JSX.Element;
31
+ export declare namespace Comment {
32
+ var Thread: typeof CommentThread;
33
+ }
34
+ export interface CommentThreadProps {
35
+ /** `Comment`s, oldest first. */
36
+ children: ReactNode;
37
+ className?: string;
38
+ style?: CSSProperties;
39
+ 'aria-label'?: string;
40
+ }
41
+ /**
42
+ * A column of comments separated by space, never by lines. `continued` comments sit closer
43
+ * to the one before them, so one person's run of messages reads as a group.
44
+ */
45
+ export declare function CommentThread({ children, className, style, 'aria-label': ariaLabel }: CommentThreadProps): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { type ReactNode } from 'react';
2
+ import { DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub } from '../DropdownMenu/DropdownMenu';
3
+ import './ContextMenu.css';
4
+ export interface ContextMenuProps {
5
+ /** The area that opens the menu on right-click, touch long-press, or Shift+F10 / the ContextMenu key. */
6
+ trigger: ReactNode;
7
+ /** Items, labels, separators and submenus — the same parts as DropdownMenu. */
8
+ children: ReactNode;
9
+ open?: boolean;
10
+ defaultOpen?: boolean;
11
+ onOpenChange?: (open: boolean) => void;
12
+ /** Leave the browser's own context menu in place. */
13
+ disabled?: boolean;
14
+ /** Minimum panel width in px. */
15
+ minWidth?: number;
16
+ 'aria-label'?: string;
17
+ }
18
+ /**
19
+ * A menu that opens where you right-click. On touch, holding still for TIMING.longPress opens it;
20
+ * from the keyboard, Shift+F10 or the ContextMenu key opens it under the focused element.
21
+ * The panel flips left / up near the viewport edge and stays inside it. Esc, an outside press
22
+ * or picking an item closes it, and focus returns to where it was.
23
+ */
24
+ export declare function ContextMenu({ trigger, children, open: openProp, defaultOpen, onOpenChange, disabled, minWidth, 'aria-label': ariaLabel, }: ContextMenuProps): import("react").JSX.Element;
25
+ export declare namespace ContextMenu {
26
+ var Item: typeof DropdownMenuItem;
27
+ var CheckboxItem: typeof DropdownMenuCheckboxItem;
28
+ var RadioGroup: typeof DropdownMenuRadioGroup;
29
+ var RadioItem: typeof DropdownMenuRadioItem;
30
+ var Label: typeof DropdownMenuLabel;
31
+ var Separator: typeof DropdownMenuSeparator;
32
+ var Sub: typeof DropdownMenuSub;
33
+ }
34
+ export declare const ContextMenuItem: typeof DropdownMenuItem;
35
+ export declare const ContextMenuCheckboxItem: typeof DropdownMenuCheckboxItem;
36
+ export declare const ContextMenuRadioGroup: typeof DropdownMenuRadioGroup;
37
+ export declare const ContextMenuRadioItem: typeof DropdownMenuRadioItem;
38
+ export declare const ContextMenuLabel: typeof DropdownMenuLabel;
39
+ export declare const ContextMenuSeparator: typeof DropdownMenuSeparator;
40
+ export declare const ContextMenuSub: typeof DropdownMenuSub;
@@ -0,0 +1,43 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import { type GridCellEdit, type GridColumn, type GridRow, type GridView } from './types';
3
+ import './DataGrid.css';
4
+ export interface DataGridProps<R extends GridRow> {
5
+ rows?: R[];
6
+ defaultRows?: R[];
7
+ onRowsChange?: (rows: R[]) => void;
8
+ columns?: GridColumn<R>[];
9
+ defaultColumns?: GridColumn<R>[];
10
+ onColumnsChange?: (columns: GridColumn<R>[]) => void;
11
+ /** Sort · filter · group · search · density. Keep it to save a "view". */
12
+ view?: GridView;
13
+ defaultView?: Partial<GridView>;
14
+ onViewChange?: (view: GridView) => void;
15
+ selectedRowIds?: string[];
16
+ defaultSelectedRowIds?: string[];
17
+ onSelectedRowIdsChange?: (ids: string[]) => void;
18
+ /** Builds a new row (+ 새로 만들기, paste past the end). Gets values from active filters / group. */
19
+ createRow?: (values: Record<string, unknown>) => R;
20
+ /** Every committed cell change (typing, paste, fill, clear). */
21
+ onCellEdit?: (edit: GridCellEdit<R>) => void;
22
+ /** Data can't change; sorting, filtering, resizing and copying still work. */
23
+ readOnly?: boolean;
24
+ /** Users may add, rename, retype and delete columns. */
25
+ columnEditing?: boolean;
26
+ toolbar?: boolean;
27
+ title?: ReactNode;
28
+ /** Extra controls at the end of the toolbar. */
29
+ actions?: ReactNode;
30
+ footer?: boolean;
31
+ /** Max height of the scrolling area. */
32
+ height?: number | string;
33
+ emptyState?: ReactNode;
34
+ 'aria-label'?: string;
35
+ className?: string;
36
+ style?: CSSProperties;
37
+ }
38
+ /**
39
+ * Spreadsheet-grade data table: Notion-style typed properties, views (sort · filter · group ·
40
+ * search), Sheets-style range selection, keyboard editing, clipboard and fill handle, column
41
+ * resize · reorder · pin · hide, row drag, footer calculations, undo/redo and row virtualization.
42
+ */
43
+ export declare function DataGrid<R extends GridRow>(props: DataGridProps<R>): import("react").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { Anchor } from './anchor';
3
+ export interface GridPopoverProps {
4
+ anchor: Anchor;
5
+ closing?: boolean;
6
+ onClose: () => void;
7
+ align?: 'start' | 'center' | 'end';
8
+ width?: number;
9
+ maxHeight?: number;
10
+ /**
11
+ * Where focus goes once the panel is positioned: the panel itself (menus, arrow keys work),
12
+ * its first text field, or its last one (a just-added filter rule). Omit to leave focus alone.
13
+ */
14
+ initialFocus?: 'panel' | 'input' | 'lastInput';
15
+ className?: string;
16
+ /** Keep focus where it is when the panel is pressed (editor popovers, the text stays in the cell). */
17
+ keepFocus?: boolean;
18
+ label?: string;
19
+ children: ReactNode;
20
+ }
21
+ /** Portal panel with the shared `.ds-popover` look, outside-press + Esc dismissal and exit animation. */
22
+ export declare function GridPopover({ anchor, closing, onClose, align, width, maxHeight, initialFocus, className, keepFocus, label, children, }: GridPopoverProps): import("react").ReactPortal;
23
+ export interface MenuItem {
24
+ key: string;
25
+ label: ReactNode;
26
+ icon?: ReactNode;
27
+ /** Text on the right (shortcut, current value). */
28
+ hint?: ReactNode;
29
+ checked?: boolean;
30
+ danger?: boolean;
31
+ disabled?: boolean;
32
+ /** Opens a nested page instead of acting. */
33
+ submenu?: boolean;
34
+ onSelect: () => void;
35
+ }
36
+ export type MenuEntry = MenuItem | 'separator' | {
37
+ heading: string;
38
+ };
39
+ /** Keyboard-navigable list of actions (↑↓ Home End, Enter, typeahead-free). */
40
+ export declare function Menu({ items, className }: {
41
+ items: MenuEntry[];
42
+ className?: string;
43
+ }): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { RefObject } from 'react';
2
+ /** Something a popover can hang from: an element, or a point (right-click menus). */
3
+ export type Anchor = RefObject<HTMLElement | null>;
4
+ export declare function pointAnchor(x: number, y: number): Anchor;
5
+ export declare function elementAnchor(el: Element | null): Anchor;
@@ -0,0 +1,61 @@
1
+ import type { GridAggregate, GridColumn, GridColumnType, GridFilterOp, GridNumberFormat, GridOption, GridRow, GridView } from './types';
2
+ import type { Tone } from '../../primitives';
3
+ export declare const typeOf: (c: GridColumn<GridRow>) => GridColumnType;
4
+ export declare function isEmptyValue(v: unknown): boolean;
5
+ export declare const formatNumber: (n: number, format?: GridNumberFormat, decimals?: number) => string;
6
+ export declare const toISODate: (d: Date) => string;
7
+ export declare const todayISO: () => string;
8
+ /** '2026-10-25' → '10월 25일' (the year only when it isn't this year). */
9
+ export declare function formatDate(iso: string): string;
10
+ /** Accepts 2026-10-25, 2026.10.25, 10/25, 10월 25일, 오늘, 내일, 어제. */
11
+ export declare function parseDate(text: string): string | null;
12
+ export declare function parseNumber(text: string): number | null;
13
+ export declare const parseBoolean: (text: string) => boolean;
14
+ /** Plain text of a value, for copying, searching and the edit field. */
15
+ export declare function valueToText(column: GridColumn<GridRow>, v: unknown): string;
16
+ /** Display text (formatted), used by default cells and footers. */
17
+ export declare function displayText(column: GridColumn<GridRow>, v: unknown): string;
18
+ export type ParseResult = {
19
+ ok: true;
20
+ value: unknown;
21
+ newOptions?: GridOption[];
22
+ } | {
23
+ ok: false;
24
+ error: string;
25
+ };
26
+ /** Text → typed value. Unknown select labels become new options unless the column forbids it. */
27
+ export declare function parseValue(column: GridColumn<GridRow>, text: string): ParseResult;
28
+ export declare const nextOptionTone: (options?: GridOption[]) => Tone;
29
+ /** Convert a value when a column changes type. */
30
+ export declare function convertValue(from: GridColumn<GridRow>, to: GridColumn<GridRow>, v: unknown): unknown;
31
+ /** Options a select column needs after a type change (every distinct label in the data). */
32
+ export declare function optionsFromValues(rows: GridRow[], key: string, existing?: GridOption[]): GridOption[];
33
+ export declare const FILTER_OPS: Record<GridColumnType, GridFilterOp[]>;
34
+ export declare const FILTER_OP_LABEL: Record<GridFilterOp, string>;
35
+ export declare const opNeedsValue: (op: GridFilterOp) => boolean;
36
+ export declare function viewRows<R extends GridRow>(rows: R[], columns: GridColumn<R>[], view: GridView): R[];
37
+ export interface GridGroup<R extends GridRow> {
38
+ key: string;
39
+ label: string;
40
+ /** The value new rows in this group get. */
41
+ value: unknown;
42
+ tone?: Tone;
43
+ rows: R[];
44
+ }
45
+ export declare function groupRows<R extends GridRow>(rows: R[], column: GridColumn<R>): GridGroup<R>[];
46
+ export declare const AGGREGATE_LABEL: Record<GridAggregate, string>;
47
+ export declare function aggregatesFor(type: GridColumnType): GridAggregate[];
48
+ export declare function aggregate(column: GridColumn<GridRow>, rows: GridRow[], kind: GridAggregate): {
49
+ label: string;
50
+ value: string;
51
+ } | null;
52
+ export declare function toTSV(cells: string[][]): string;
53
+ export declare function parseTSV(text: string): string[][];
54
+ export declare function toCSV(columns: GridColumn<GridRow>[], rows: GridRow[]): string;
55
+ /**
56
+ * Values for `count` cells after `source`. Numbers with a steady step continue the series
57
+ * (1, 2 → 3, 4); anything else repeats the pattern, like Sheets.
58
+ */
59
+ export declare function fillSeries(source: unknown[], count: number): unknown[];
60
+ export declare const filterOptions: (options: GridOption[], query: string) => GridOption[];
61
+ export declare const newId: (prefix?: string) => string;
@@ -0,0 +1,63 @@
1
+ import type { GridAggregate, GridColumn, GridColumnType, GridOption, GridRow, GridSort, GridView } from './types';
2
+ export interface ColumnMenuActions {
3
+ rename: (name: string) => void;
4
+ setType: (type: GridColumnType) => void;
5
+ update: (patch: Partial<GridColumn<GridRow>>) => void;
6
+ sort: (dir: 'asc' | 'desc') => void;
7
+ filter: () => void;
8
+ group: () => void;
9
+ insert: (side: 'left' | 'right') => void;
10
+ duplicate: () => void;
11
+ hide: () => void;
12
+ remove: () => void;
13
+ }
14
+ export declare function ColumnMenu({ column, grouped, canEditColumns, actions, }: {
15
+ column: GridColumn<GridRow>;
16
+ grouped: boolean;
17
+ canEditColumns: boolean;
18
+ actions: ColumnMenuActions;
19
+ }): import("react").JSX.Element;
20
+ export declare function AggregateMenu({ column, onPick }: {
21
+ column: GridColumn<GridRow>;
22
+ onPick: (a: GridAggregate) => void;
23
+ }): import("react").JSX.Element;
24
+ export declare function FilterPanel({ columns, view, onChange, }: {
25
+ columns: GridColumn<GridRow>[];
26
+ view: GridView;
27
+ onChange: (patch: Partial<GridView>) => void;
28
+ }): import("react").JSX.Element;
29
+ export declare function SortPanel({ columns, sorts, onChange }: {
30
+ columns: GridColumn<GridRow>[];
31
+ sorts: GridSort[];
32
+ onChange: (s: GridSort[]) => void;
33
+ }): import("react").JSX.Element;
34
+ export declare function GroupMenu({ columns, groupBy, onPick }: {
35
+ columns: GridColumn<GridRow>[];
36
+ groupBy: string | null;
37
+ onPick: (key: string | null) => void;
38
+ }): import("react").JSX.Element;
39
+ export declare function PropertiesPanel({ columns, onUpdate, onShowAll, }: {
40
+ columns: GridColumn<GridRow>[];
41
+ onUpdate: (key: string, patch: Partial<GridColumn<GridRow>>) => void;
42
+ onShowAll: (hidden: boolean) => void;
43
+ }): import("react").JSX.Element;
44
+ export declare function ViewPanel({ view, onChange, onExport }: {
45
+ view: GridView;
46
+ onChange: (p: Partial<GridView>) => void;
47
+ onExport: () => void;
48
+ }): import("react").JSX.Element;
49
+ export declare function OptionList({ options, query, selected, active, multiple, creatable, onActive, onPick, onRemove, }: {
50
+ options: GridOption[];
51
+ query: string;
52
+ selected: string[];
53
+ active: number;
54
+ multiple: boolean;
55
+ creatable: boolean;
56
+ onActive: (i: number) => void;
57
+ onPick: (label: string) => void;
58
+ onRemove: (label: string) => void;
59
+ }): import("react").JSX.Element;
60
+ export declare function DatePicker({ value, onPick }: {
61
+ value: string | null;
62
+ onPick: (iso: string | null) => void;
63
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { GridColumnType } from './types';
3
+ export declare const TYPE_META: Record<GridColumnType, {
4
+ label: string;
5
+ icon: ReactNode;
6
+ }>;