@neynar/ui 0.1.1

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 (364) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +195 -0
  3. package/dist/components/ui/accordion.d.ts +229 -0
  4. package/dist/components/ui/accordion.d.ts.map +1 -0
  5. package/dist/components/ui/alert-dialog.d.ts +247 -0
  6. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  7. package/dist/components/ui/alert.d.ts +187 -0
  8. package/dist/components/ui/alert.d.ts.map +1 -0
  9. package/dist/components/ui/aspect-ratio.d.ts +94 -0
  10. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  11. package/dist/components/ui/avatar.d.ts +244 -0
  12. package/dist/components/ui/avatar.d.ts.map +1 -0
  13. package/dist/components/ui/badge.d.ts +163 -0
  14. package/dist/components/ui/badge.d.ts.map +1 -0
  15. package/dist/components/ui/breadcrumb.d.ts +281 -0
  16. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  17. package/dist/components/ui/button.d.ts +129 -0
  18. package/dist/components/ui/button.d.ts.map +1 -0
  19. package/dist/components/ui/calendar.d.ts +169 -0
  20. package/dist/components/ui/calendar.d.ts.map +1 -0
  21. package/dist/components/ui/card.d.ts +365 -0
  22. package/dist/components/ui/card.d.ts.map +1 -0
  23. package/dist/components/ui/carousel.d.ts +369 -0
  24. package/dist/components/ui/carousel.d.ts.map +1 -0
  25. package/dist/components/ui/chart.d.ts +442 -0
  26. package/dist/components/ui/chart.d.ts.map +1 -0
  27. package/dist/components/ui/checkbox.d.ts +88 -0
  28. package/dist/components/ui/checkbox.d.ts.map +1 -0
  29. package/dist/components/ui/collapsible.d.ts +182 -0
  30. package/dist/components/ui/collapsible.d.ts.map +1 -0
  31. package/dist/components/ui/combobox.d.ts +270 -0
  32. package/dist/components/ui/combobox.d.ts.map +1 -0
  33. package/dist/components/ui/command.d.ts +355 -0
  34. package/dist/components/ui/command.d.ts.map +1 -0
  35. package/dist/components/ui/container.d.ts +102 -0
  36. package/dist/components/ui/container.d.ts.map +1 -0
  37. package/dist/components/ui/context-menu.d.ts +339 -0
  38. package/dist/components/ui/context-menu.d.ts.map +1 -0
  39. package/dist/components/ui/date-picker.d.ts +145 -0
  40. package/dist/components/ui/date-picker.d.ts.map +1 -0
  41. package/dist/components/ui/dialog.d.ts +322 -0
  42. package/dist/components/ui/dialog.d.ts.map +1 -0
  43. package/dist/components/ui/drawer.d.ts +154 -0
  44. package/dist/components/ui/drawer.d.ts.map +1 -0
  45. package/dist/components/ui/dropdown-menu.d.ts +349 -0
  46. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  47. package/dist/components/ui/empty-state.d.ts +133 -0
  48. package/dist/components/ui/empty-state.d.ts.map +1 -0
  49. package/dist/components/ui/hover-card.d.ts +109 -0
  50. package/dist/components/ui/hover-card.d.ts.map +1 -0
  51. package/dist/components/ui/input.d.ts +89 -0
  52. package/dist/components/ui/input.d.ts.map +1 -0
  53. package/dist/components/ui/label.d.ts +93 -0
  54. package/dist/components/ui/label.d.ts.map +1 -0
  55. package/dist/components/ui/menubar.d.ts +306 -0
  56. package/dist/components/ui/menubar.d.ts.map +1 -0
  57. package/dist/components/ui/navigation-menu.d.ts +318 -0
  58. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  59. package/dist/components/ui/pagination.d.ts +343 -0
  60. package/dist/components/ui/pagination.d.ts.map +1 -0
  61. package/dist/components/ui/popover.d.ts +178 -0
  62. package/dist/components/ui/popover.d.ts.map +1 -0
  63. package/dist/components/ui/progress.d.ts +64 -0
  64. package/dist/components/ui/progress.d.ts.map +1 -0
  65. package/dist/components/ui/radio-group.d.ts +144 -0
  66. package/dist/components/ui/radio-group.d.ts.map +1 -0
  67. package/dist/components/ui/resizable.d.ts +164 -0
  68. package/dist/components/ui/resizable.d.ts.map +1 -0
  69. package/dist/components/ui/scroll-area.d.ts +82 -0
  70. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  71. package/dist/components/ui/select.d.ts +316 -0
  72. package/dist/components/ui/select.d.ts.map +1 -0
  73. package/dist/components/ui/separator.d.ts +80 -0
  74. package/dist/components/ui/separator.d.ts.map +1 -0
  75. package/dist/components/ui/sheet.d.ts +346 -0
  76. package/dist/components/ui/sheet.d.ts.map +1 -0
  77. package/dist/components/ui/sidebar.d.ts +1561 -0
  78. package/dist/components/ui/sidebar.d.ts.map +1 -0
  79. package/dist/components/ui/skeleton.d.ts +66 -0
  80. package/dist/components/ui/skeleton.d.ts.map +1 -0
  81. package/dist/components/ui/slider.d.ts +95 -0
  82. package/dist/components/ui/slider.d.ts.map +1 -0
  83. package/dist/components/ui/sonner.d.ts +101 -0
  84. package/dist/components/ui/sonner.d.ts.map +1 -0
  85. package/dist/components/ui/stack.d.ts +192 -0
  86. package/dist/components/ui/stack.d.ts.map +1 -0
  87. package/dist/components/ui/stories/accordion.stories.d.ts +71 -0
  88. package/dist/components/ui/stories/accordion.stories.d.ts.map +1 -0
  89. package/dist/components/ui/stories/alert-dialog.stories.d.ts +39 -0
  90. package/dist/components/ui/stories/alert-dialog.stories.d.ts.map +1 -0
  91. package/dist/components/ui/stories/alert.stories.d.ts +48 -0
  92. package/dist/components/ui/stories/alert.stories.d.ts.map +1 -0
  93. package/dist/components/ui/stories/aspect-ratio.stories.d.ts +53 -0
  94. package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -0
  95. package/dist/components/ui/stories/avatar.stories.d.ts +49 -0
  96. package/dist/components/ui/stories/avatar.stories.d.ts.map +1 -0
  97. package/dist/components/ui/stories/badge.stories.d.ts +64 -0
  98. package/dist/components/ui/stories/badge.stories.d.ts.map +1 -0
  99. package/dist/components/ui/stories/breadcrumb.stories.d.ts +27 -0
  100. package/dist/components/ui/stories/breadcrumb.stories.d.ts.map +1 -0
  101. package/dist/components/ui/stories/button.stories.d.ts +92 -0
  102. package/dist/components/ui/stories/button.stories.d.ts.map +1 -0
  103. package/dist/components/ui/stories/calendar.stories.d.ts +94 -0
  104. package/dist/components/ui/stories/calendar.stories.d.ts.map +1 -0
  105. package/dist/components/ui/stories/card.stories.d.ts +29 -0
  106. package/dist/components/ui/stories/card.stories.d.ts.map +1 -0
  107. package/dist/components/ui/stories/carousel.stories.d.ts +42 -0
  108. package/dist/components/ui/stories/carousel.stories.d.ts.map +1 -0
  109. package/dist/components/ui/stories/chart.stories.d.ts +51 -0
  110. package/dist/components/ui/stories/chart.stories.d.ts.map +1 -0
  111. package/dist/components/ui/stories/checkbox.stories.d.ts +72 -0
  112. package/dist/components/ui/stories/checkbox.stories.d.ts.map +1 -0
  113. package/dist/components/ui/stories/cn.stories.d.ts +19 -0
  114. package/dist/components/ui/stories/cn.stories.d.ts.map +1 -0
  115. package/dist/components/ui/stories/collapsible.stories.d.ts +51 -0
  116. package/dist/components/ui/stories/collapsible.stories.d.ts.map +1 -0
  117. package/dist/components/ui/stories/colors.stories.d.ts +31 -0
  118. package/dist/components/ui/stories/colors.stories.d.ts.map +1 -0
  119. package/dist/components/ui/stories/combobox.stories.d.ts +89 -0
  120. package/dist/components/ui/stories/combobox.stories.d.ts.map +1 -0
  121. package/dist/components/ui/stories/command.stories.d.ts +69 -0
  122. package/dist/components/ui/stories/command.stories.d.ts.map +1 -0
  123. package/dist/components/ui/stories/container.stories.d.ts +42 -0
  124. package/dist/components/ui/stories/container.stories.d.ts.map +1 -0
  125. package/dist/components/ui/stories/context-menu.stories.d.ts +32 -0
  126. package/dist/components/ui/stories/context-menu.stories.d.ts.map +1 -0
  127. package/dist/components/ui/stories/date-picker.stories.d.ts +67 -0
  128. package/dist/components/ui/stories/date-picker.stories.d.ts.map +1 -0
  129. package/dist/components/ui/stories/dialog.stories.d.ts +48 -0
  130. package/dist/components/ui/stories/dialog.stories.d.ts.map +1 -0
  131. package/dist/components/ui/stories/drawer.stories.d.ts +33 -0
  132. package/dist/components/ui/stories/drawer.stories.d.ts.map +1 -0
  133. package/dist/components/ui/stories/dropdown-menu.stories.d.ts +31 -0
  134. package/dist/components/ui/stories/dropdown-menu.stories.d.ts.map +1 -0
  135. package/dist/components/ui/stories/empty-state.stories.d.ts +74 -0
  136. package/dist/components/ui/stories/empty-state.stories.d.ts.map +1 -0
  137. package/dist/components/ui/stories/hover-card.stories.d.ts +35 -0
  138. package/dist/components/ui/stories/hover-card.stories.d.ts.map +1 -0
  139. package/dist/components/ui/stories/input.stories.d.ts +69 -0
  140. package/dist/components/ui/stories/input.stories.d.ts.map +1 -0
  141. package/dist/components/ui/stories/label.stories.d.ts +47 -0
  142. package/dist/components/ui/stories/label.stories.d.ts.map +1 -0
  143. package/dist/components/ui/stories/menubar.stories.d.ts +39 -0
  144. package/dist/components/ui/stories/menubar.stories.d.ts.map +1 -0
  145. package/dist/components/ui/stories/navigation-menu.stories.d.ts +44 -0
  146. package/dist/components/ui/stories/navigation-menu.stories.d.ts.map +1 -0
  147. package/dist/components/ui/stories/pagination.stories.d.ts +33 -0
  148. package/dist/components/ui/stories/pagination.stories.d.ts.map +1 -0
  149. package/dist/components/ui/stories/popover.stories.d.ts +36 -0
  150. package/dist/components/ui/stories/popover.stories.d.ts.map +1 -0
  151. package/dist/components/ui/stories/progress.stories.d.ts +38 -0
  152. package/dist/components/ui/stories/progress.stories.d.ts.map +1 -0
  153. package/dist/components/ui/stories/radio-group.stories.d.ts +76 -0
  154. package/dist/components/ui/stories/radio-group.stories.d.ts.map +1 -0
  155. package/dist/components/ui/stories/resizable.stories.d.ts +49 -0
  156. package/dist/components/ui/stories/resizable.stories.d.ts.map +1 -0
  157. package/dist/components/ui/stories/scroll-area.stories.d.ts +35 -0
  158. package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -0
  159. package/dist/components/ui/stories/select.stories.d.ts +51 -0
  160. package/dist/components/ui/stories/select.stories.d.ts.map +1 -0
  161. package/dist/components/ui/stories/separator.stories.d.ts +58 -0
  162. package/dist/components/ui/stories/separator.stories.d.ts.map +1 -0
  163. package/dist/components/ui/stories/sheet.stories.d.ts +43 -0
  164. package/dist/components/ui/stories/sheet.stories.d.ts.map +1 -0
  165. package/dist/components/ui/stories/sidebar.stories.d.ts +60 -0
  166. package/dist/components/ui/stories/sidebar.stories.d.ts.map +1 -0
  167. package/dist/components/ui/stories/skeleton.stories.d.ts +42 -0
  168. package/dist/components/ui/stories/skeleton.stories.d.ts.map +1 -0
  169. package/dist/components/ui/stories/slider.stories.d.ts +99 -0
  170. package/dist/components/ui/stories/slider.stories.d.ts.map +1 -0
  171. package/dist/components/ui/stories/sonner.stories.d.ts +9 -0
  172. package/dist/components/ui/stories/sonner.stories.d.ts.map +1 -0
  173. package/dist/components/ui/stories/stack.stories.d.ts +39 -0
  174. package/dist/components/ui/stories/stack.stories.d.ts.map +1 -0
  175. package/dist/components/ui/stories/switch.stories.d.ts +71 -0
  176. package/dist/components/ui/stories/switch.stories.d.ts.map +1 -0
  177. package/dist/components/ui/stories/table.stories.d.ts +40 -0
  178. package/dist/components/ui/stories/table.stories.d.ts.map +1 -0
  179. package/dist/components/ui/stories/tabs.stories.d.ts +62 -0
  180. package/dist/components/ui/stories/tabs.stories.d.ts.map +1 -0
  181. package/dist/components/ui/stories/text-field.stories.d.ts +78 -0
  182. package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -0
  183. package/dist/components/ui/stories/textarea.stories.d.ts +57 -0
  184. package/dist/components/ui/stories/textarea.stories.d.ts.map +1 -0
  185. package/dist/components/ui/stories/theme-toggle.stories.d.ts +71 -0
  186. package/dist/components/ui/stories/theme-toggle.stories.d.ts.map +1 -0
  187. package/dist/components/ui/stories/theme.stories.d.ts +51 -0
  188. package/dist/components/ui/stories/theme.stories.d.ts.map +1 -0
  189. package/dist/components/ui/stories/toggle-group.stories.d.ts +71 -0
  190. package/dist/components/ui/stories/toggle-group.stories.d.ts.map +1 -0
  191. package/dist/components/ui/stories/toggle.stories.d.ts +78 -0
  192. package/dist/components/ui/stories/toggle.stories.d.ts.map +1 -0
  193. package/dist/components/ui/stories/tooltip.stories.d.ts +37 -0
  194. package/dist/components/ui/stories/tooltip.stories.d.ts.map +1 -0
  195. package/dist/components/ui/stories/typography.stories.d.ts +137 -0
  196. package/dist/components/ui/stories/typography.stories.d.ts.map +1 -0
  197. package/dist/components/ui/stories/use-mobile.stories.d.ts +20 -0
  198. package/dist/components/ui/stories/use-mobile.stories.d.ts.map +1 -0
  199. package/dist/components/ui/stories/use-theme.stories.d.ts +23 -0
  200. package/dist/components/ui/stories/use-theme.stories.d.ts.map +1 -0
  201. package/dist/components/ui/switch.d.ts +84 -0
  202. package/dist/components/ui/switch.d.ts.map +1 -0
  203. package/dist/components/ui/table.d.ts +321 -0
  204. package/dist/components/ui/table.d.ts.map +1 -0
  205. package/dist/components/ui/tabs.d.ts +260 -0
  206. package/dist/components/ui/tabs.d.ts.map +1 -0
  207. package/dist/components/ui/text-field.d.ts +157 -0
  208. package/dist/components/ui/text-field.d.ts.map +1 -0
  209. package/dist/components/ui/textarea.d.ts +84 -0
  210. package/dist/components/ui/textarea.d.ts.map +1 -0
  211. package/dist/components/ui/theme-toggle.d.ts +105 -0
  212. package/dist/components/ui/theme-toggle.d.ts.map +1 -0
  213. package/dist/components/ui/theme.d.ts +110 -0
  214. package/dist/components/ui/theme.d.ts.map +1 -0
  215. package/dist/components/ui/toggle-group.d.ts +133 -0
  216. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  217. package/dist/components/ui/toggle.d.ts +84 -0
  218. package/dist/components/ui/toggle.d.ts.map +1 -0
  219. package/dist/components/ui/tooltip.d.ts +202 -0
  220. package/dist/components/ui/tooltip.d.ts.map +1 -0
  221. package/dist/components/ui/typography.d.ts +287 -0
  222. package/dist/components/ui/typography.d.ts.map +1 -0
  223. package/dist/hooks/use-mobile.d.ts +74 -0
  224. package/dist/hooks/use-mobile.d.ts.map +1 -0
  225. package/dist/hooks/use-theme.d.ts +142 -0
  226. package/dist/hooks/use-theme.d.ts.map +1 -0
  227. package/dist/index.d.ts +57 -0
  228. package/dist/index.d.ts.map +1 -0
  229. package/dist/index.js +27498 -0
  230. package/dist/index.js.map +1 -0
  231. package/dist/lib/utils.d.ts +43 -0
  232. package/dist/lib/utils.d.ts.map +1 -0
  233. package/dist/tsconfig.tsbuildinfo +1 -0
  234. package/docs/llm/colors.md +273 -0
  235. package/docs/llm/components/buttons.md +68 -0
  236. package/docs/llm/components/cards.md +53 -0
  237. package/docs/llm/components/display.md +134 -0
  238. package/docs/llm/components/feedback.md +96 -0
  239. package/docs/llm/components/forms.md +90 -0
  240. package/docs/llm/components/layout.md +59 -0
  241. package/docs/llm/components/menus.md +70 -0
  242. package/docs/llm/components/navigation.md +80 -0
  243. package/docs/llm/components/overlays.md +83 -0
  244. package/docs/llm/components/tables.md +73 -0
  245. package/docs/llm/components/typography.md +199 -0
  246. package/docs/llm/components/utilities.md +114 -0
  247. package/docs/llm/guide.md +165 -0
  248. package/llms.txt +122 -0
  249. package/package.json +104 -0
  250. package/src/components/ui/accordion.tsx +285 -0
  251. package/src/components/ui/alert-dialog.tsx +387 -0
  252. package/src/components/ui/alert.tsx +243 -0
  253. package/src/components/ui/aspect-ratio.tsx +99 -0
  254. package/src/components/ui/avatar.tsx +288 -0
  255. package/src/components/ui/badge.tsx +205 -0
  256. package/src/components/ui/breadcrumb.tsx +378 -0
  257. package/src/components/ui/button.tsx +195 -0
  258. package/src/components/ui/calendar.tsx +371 -0
  259. package/src/components/ui/card.tsx +447 -0
  260. package/src/components/ui/carousel.tsx +624 -0
  261. package/src/components/ui/chart.tsx +802 -0
  262. package/src/components/ui/checkbox.tsx +113 -0
  263. package/src/components/ui/collapsible.tsx +207 -0
  264. package/src/components/ui/combobox.tsx +373 -0
  265. package/src/components/ui/command.tsx +518 -0
  266. package/src/components/ui/container.tsx +114 -0
  267. package/src/components/ui/context-menu.tsx +563 -0
  268. package/src/components/ui/date-picker.tsx +213 -0
  269. package/src/components/ui/dialog.tsx +447 -0
  270. package/src/components/ui/drawer.tsx +273 -0
  271. package/src/components/ui/dropdown-menu.tsx +578 -0
  272. package/src/components/ui/empty-state.tsx +145 -0
  273. package/src/components/ui/hover-card.tsx +144 -0
  274. package/src/components/ui/input.tsx +106 -0
  275. package/src/components/ui/label.tsx +110 -0
  276. package/src/components/ui/menubar.tsx +553 -0
  277. package/src/components/ui/navigation-menu.tsx +471 -0
  278. package/src/components/ui/pagination.tsx +456 -0
  279. package/src/components/ui/popover.tsx +216 -0
  280. package/src/components/ui/progress.tsx +88 -0
  281. package/src/components/ui/radio-group.tsx +183 -0
  282. package/src/components/ui/resizable.tsx +209 -0
  283. package/src/components/ui/scroll-area.tsx +132 -0
  284. package/src/components/ui/select.tsx +485 -0
  285. package/src/components/ui/separator.tsx +101 -0
  286. package/src/components/ui/sheet.tsx +495 -0
  287. package/src/components/ui/sidebar.tsx +2211 -0
  288. package/src/components/ui/skeleton.tsx +76 -0
  289. package/src/components/ui/slider.tsx +147 -0
  290. package/src/components/ui/sonner.tsx +120 -0
  291. package/src/components/ui/stack.tsx +180 -0
  292. package/src/components/ui/stories/accordion.stories.tsx +429 -0
  293. package/src/components/ui/stories/alert-dialog.stories.tsx +519 -0
  294. package/src/components/ui/stories/alert.stories.tsx +228 -0
  295. package/src/components/ui/stories/aspect-ratio.stories.tsx +200 -0
  296. package/src/components/ui/stories/avatar.stories.tsx +317 -0
  297. package/src/components/ui/stories/badge.stories.tsx +260 -0
  298. package/src/components/ui/stories/breadcrumb.stories.tsx +482 -0
  299. package/src/components/ui/stories/button.stories.tsx +266 -0
  300. package/src/components/ui/stories/calendar.stories.tsx +375 -0
  301. package/src/components/ui/stories/card.stories.tsx +308 -0
  302. package/src/components/ui/stories/carousel.stories.tsx +328 -0
  303. package/src/components/ui/stories/chart.stories.tsx +430 -0
  304. package/src/components/ui/stories/checkbox.stories.tsx +297 -0
  305. package/src/components/ui/stories/cn.stories.tsx +433 -0
  306. package/src/components/ui/stories/collapsible.stories.tsx +256 -0
  307. package/src/components/ui/stories/colors.stories.tsx +502 -0
  308. package/src/components/ui/stories/combobox.stories.tsx +301 -0
  309. package/src/components/ui/stories/command.stories.tsx +632 -0
  310. package/src/components/ui/stories/container.stories.tsx +250 -0
  311. package/src/components/ui/stories/context-menu.stories.tsx +446 -0
  312. package/src/components/ui/stories/date-picker.stories.tsx +378 -0
  313. package/src/components/ui/stories/dialog.stories.tsx +535 -0
  314. package/src/components/ui/stories/drawer.stories.tsx +364 -0
  315. package/src/components/ui/stories/dropdown-menu.stories.tsx +374 -0
  316. package/src/components/ui/stories/empty-state.stories.tsx +244 -0
  317. package/src/components/ui/stories/hover-card.stories.tsx +355 -0
  318. package/src/components/ui/stories/input.stories.tsx +289 -0
  319. package/src/components/ui/stories/label.stories.tsx +294 -0
  320. package/src/components/ui/stories/menubar.stories.tsx +764 -0
  321. package/src/components/ui/stories/navigation-menu.stories.tsx +539 -0
  322. package/src/components/ui/stories/pagination.stories.tsx +604 -0
  323. package/src/components/ui/stories/popover.stories.tsx +392 -0
  324. package/src/components/ui/stories/progress.stories.tsx +218 -0
  325. package/src/components/ui/stories/radio-group.stories.tsx +400 -0
  326. package/src/components/ui/stories/resizable.stories.tsx +417 -0
  327. package/src/components/ui/stories/scroll-area.stories.tsx +180 -0
  328. package/src/components/ui/stories/select.stories.tsx +389 -0
  329. package/src/components/ui/stories/separator.stories.tsx +192 -0
  330. package/src/components/ui/stories/sheet.stories.tsx +468 -0
  331. package/src/components/ui/stories/sidebar.stories.tsx +731 -0
  332. package/src/components/ui/stories/skeleton.stories.tsx +216 -0
  333. package/src/components/ui/stories/slider.stories.tsx +321 -0
  334. package/src/components/ui/stories/sonner.stories.tsx +373 -0
  335. package/src/components/ui/stories/stack.stories.tsx +222 -0
  336. package/src/components/ui/stories/switch.stories.tsx +202 -0
  337. package/src/components/ui/stories/table.stories.tsx +541 -0
  338. package/src/components/ui/stories/tabs.stories.tsx +544 -0
  339. package/src/components/ui/stories/text-field.stories.tsx +280 -0
  340. package/src/components/ui/stories/textarea.stories.tsx +245 -0
  341. package/src/components/ui/stories/theme-toggle.stories.tsx +275 -0
  342. package/src/components/ui/stories/theme.stories.tsx +412 -0
  343. package/src/components/ui/stories/toggle-group.stories.tsx +337 -0
  344. package/src/components/ui/stories/toggle.stories.tsx +325 -0
  345. package/src/components/ui/stories/tooltip.stories.tsx +444 -0
  346. package/src/components/ui/stories/typography.stories.tsx +1586 -0
  347. package/src/components/ui/stories/use-mobile.stories.tsx +420 -0
  348. package/src/components/ui/stories/use-theme.stories.tsx +531 -0
  349. package/src/components/ui/switch.tsx +106 -0
  350. package/src/components/ui/table.tsx +424 -0
  351. package/src/components/ui/tabs.tsx +316 -0
  352. package/src/components/ui/text-field.tsx +206 -0
  353. package/src/components/ui/textarea.tsx +98 -0
  354. package/src/components/ui/theme-toggle.tsx +185 -0
  355. package/src/components/ui/theme.tsx +148 -0
  356. package/src/components/ui/toggle-group.tsx +196 -0
  357. package/src/components/ui/toggle.tsx +115 -0
  358. package/src/components/ui/tooltip.tsx +253 -0
  359. package/src/components/ui/typography.tsx +468 -0
  360. package/src/hooks/use-mobile.ts +91 -0
  361. package/src/hooks/use-theme.ts +319 -0
  362. package/src/index.ts +77 -0
  363. package/src/lib/utils.ts +57 -0
  364. package/src/styles/globals.css +160 -0
@@ -0,0 +1,518 @@
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { SearchIcon } from "lucide-react";
4
+
5
+ import { cn } from "@/lib/utils";
6
+ import {
7
+ Dialog,
8
+ DialogContent,
9
+ DialogDescription,
10
+ DialogHeader,
11
+ DialogTitle,
12
+ } from "@/components/ui/dialog";
13
+
14
+ /**
15
+ * Command - A fast, composable command menu for search and navigation
16
+ *
17
+ * Built on the cmdk primitive, this component provides a powerful command palette
18
+ * interface with search, filtering, and keyboard navigation. Perfect for creating
19
+ * search interfaces, command palettes, and action menus with full accessibility support.
20
+ *
21
+ * @component
22
+ * @example
23
+ * ```tsx
24
+ * // Basic command menu
25
+ * <Command>
26
+ * <CommandInput placeholder="Type a command or search..." />
27
+ * <CommandList>
28
+ * <CommandEmpty>No results found.</CommandEmpty>
29
+ * <CommandGroup heading="Suggestions">
30
+ * <CommandItem>Calendar</CommandItem>
31
+ * <CommandItem>Search Emoji</CommandItem>
32
+ * <CommandItem>Calculator</CommandItem>
33
+ * </CommandGroup>
34
+ * </CommandList>
35
+ * </Command>
36
+ * ```
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * // Command dialog with keyboard shortcut
41
+ * const [open, setOpen] = useState(false);
42
+ *
43
+ * useEffect(() => {
44
+ * const down = (e: KeyboardEvent) => {
45
+ * if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
46
+ * e.preventDefault();
47
+ * setOpen((open) => !open);
48
+ * }
49
+ * };
50
+ * document.addEventListener("keydown", down);
51
+ * return () => document.removeEventListener("keydown", down);
52
+ * }, []);
53
+ *
54
+ * <CommandDialog open={open} onOpenChange={setOpen}>
55
+ * <CommandInput placeholder="Type a command..." />
56
+ * <CommandList>
57
+ * <CommandGroup heading="Actions">
58
+ * <CommandItem onSelect={() => console.log("New file")}>
59
+ * New File
60
+ * <CommandShortcut>⌘N</CommandShortcut>
61
+ * </CommandItem>
62
+ * </CommandGroup>
63
+ * </CommandList>
64
+ * </CommandDialog>
65
+ * ```
66
+ *
67
+ * @accessibility
68
+ * - Full keyboard navigation with arrow keys and Home/End
69
+ * - Type-ahead search and filtering
70
+ * - Enter key to select items, Escape to close dialogs
71
+ * - Screen reader announcements for filtered results
72
+ * - ARIA roles following command palette pattern
73
+ * - Focus management and trapping in dialog mode
74
+ *
75
+ * @see {@link https://ui.shadcn.com/docs/components/command} for design patterns
76
+ * @see {@link CommandDialog} - For modal command palette
77
+ * @see {@link CommandInput} - Search input component
78
+ * @see {@link CommandList} - Scrollable results container
79
+ * @since 1.0.0
80
+ */
81
+ function Command({
82
+ className,
83
+ ...props
84
+ }: React.ComponentProps<typeof CommandPrimitive>) {
85
+ return (
86
+ <CommandPrimitive
87
+ data-slot="command"
88
+ className={cn(
89
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
90
+ className,
91
+ )}
92
+ {...props}
93
+ />
94
+ );
95
+ }
96
+
97
+ /**
98
+ * CommandDialog - Modal dialog wrapper for command menu
99
+ *
100
+ * Presents the command menu in a modal dialog overlay, perfect for application-wide
101
+ * command palettes triggered by keyboard shortcuts like Cmd+K. Includes proper
102
+ * focus management and accessibility features.
103
+ *
104
+ * @component
105
+ * @example
106
+ * ```tsx
107
+ * // Command palette dialog with keyboard shortcut
108
+ * const [open, setOpen] = useState(false);
109
+ *
110
+ * useEffect(() => {
111
+ * const down = (e: KeyboardEvent) => {
112
+ * if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
113
+ * e.preventDefault();
114
+ * setOpen((open) => !open);
115
+ * }
116
+ * };
117
+ * document.addEventListener("keydown", down);
118
+ * return () => document.removeEventListener("keydown", down);
119
+ * }, []);
120
+ *
121
+ * <CommandDialog open={open} onOpenChange={setOpen}>
122
+ * <CommandInput placeholder="Type a command..." />
123
+ * <CommandList>
124
+ * <CommandGroup heading="Actions">
125
+ * <CommandItem>Create New File</CommandItem>
126
+ * <CommandItem>Open Settings</CommandItem>
127
+ * </CommandGroup>
128
+ * </CommandList>
129
+ * </CommandDialog>
130
+ * ```
131
+ *
132
+ * @param title - Screen reader title for the dialog
133
+ * @param description - Screen reader description for the dialog
134
+ * @param showCloseButton - Whether to show the close button
135
+ *
136
+ * @accessibility
137
+ * - Focus trapped within dialog when open
138
+ * - Escape key closes the dialog
139
+ * - Screen reader announcements with title and description
140
+ * - Preserves all command menu keyboard navigation
141
+ *
142
+ * @since 1.0.0
143
+ */
144
+ function CommandDialog({
145
+ title = "Command Palette",
146
+ description = "Search for a command to run...",
147
+ children,
148
+ className,
149
+ showCloseButton = true,
150
+ ...props
151
+ }: React.ComponentProps<typeof Dialog> & {
152
+ /**
153
+ * The title for screen readers
154
+ * @default "Command Palette"
155
+ */
156
+ title?: string;
157
+ /**
158
+ * The description for screen readers
159
+ * @default "Search for a command to run..."
160
+ */
161
+ description?: string;
162
+ /**
163
+ * Additional CSS classes
164
+ */
165
+ className?: string;
166
+ /**
167
+ * Whether to show the close button
168
+ * @default true
169
+ */
170
+ showCloseButton?: boolean;
171
+ }) {
172
+ return (
173
+ <Dialog {...props}>
174
+ <DialogHeader className="sr-only">
175
+ <DialogTitle>{title}</DialogTitle>
176
+ <DialogDescription>{description}</DialogDescription>
177
+ </DialogHeader>
178
+ <DialogContent
179
+ className={cn("overflow-hidden p-0", className)}
180
+ showCloseButton={showCloseButton}
181
+ >
182
+ <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
183
+ {children}
184
+ </Command>
185
+ </DialogContent>
186
+ </Dialog>
187
+ );
188
+ }
189
+
190
+ /**
191
+ * CommandInput - Search input for command menu filtering
192
+ *
193
+ * Provides a search input with search icon for filtering command menu items.
194
+ * Automatically filters items as the user types and handles focus management.
195
+ *
196
+ * @component
197
+ * @example
198
+ * ```tsx
199
+ * <Command>
200
+ * <CommandInput placeholder="Search commands..." />
201
+ * <CommandList>...</CommandList>
202
+ * </Command>
203
+ * ```
204
+ *
205
+ * @example
206
+ * ```tsx
207
+ * // Controlled input with state
208
+ * <CommandInput
209
+ * placeholder="Type a command or search..."
210
+ * value={searchValue}
211
+ * onValueChange={setSearchValue}
212
+ * />
213
+ * ```
214
+ *
215
+ * @accessibility
216
+ * - Auto-focuses when command menu opens
217
+ * - Live region announces result count to screen readers
218
+ * - Supports all standard input accessibility features
219
+ *
220
+ * @since 1.0.0
221
+ */
222
+ function CommandInput({
223
+ className,
224
+ ...props
225
+ }: React.ComponentProps<typeof CommandPrimitive.Input>) {
226
+ return (
227
+ <div
228
+ data-slot="command-input-wrapper"
229
+ className="flex h-9 items-center gap-2 border-b px-3"
230
+ >
231
+ <SearchIcon className="size-4 shrink-0 opacity-50" />
232
+ <CommandPrimitive.Input
233
+ data-slot="command-input"
234
+ className={cn(
235
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
236
+ className,
237
+ )}
238
+ {...props}
239
+ />
240
+ </div>
241
+ );
242
+ }
243
+
244
+ /**
245
+ * CommandList - Scrollable container for command items
246
+ *
247
+ * Contains and manages the list of command items with automatic scrolling
248
+ * and overflow handling. Manages keyboard navigation and selection state.
249
+ *
250
+ * @component
251
+ * @example
252
+ * ```tsx
253
+ * <CommandList>
254
+ * <CommandEmpty>No results found</CommandEmpty>
255
+ * <CommandGroup heading="Actions">
256
+ * <CommandItem>New File</CommandItem>
257
+ * <CommandItem>Open File</CommandItem>
258
+ * </CommandGroup>
259
+ * </CommandList>
260
+ * ```
261
+ *
262
+ * @accessibility
263
+ * - Scrollable with keyboard arrow navigation
264
+ * - Maintains focus within list boundaries
265
+ * - Supports Home/End key navigation
266
+ *
267
+ * @since 1.0.0
268
+ */
269
+ function CommandList({
270
+ className,
271
+ ...props
272
+ }: React.ComponentProps<typeof CommandPrimitive.List>) {
273
+ return (
274
+ <CommandPrimitive.List
275
+ data-slot="command-list"
276
+ className={cn(
277
+ "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
278
+ className,
279
+ )}
280
+ {...props}
281
+ />
282
+ );
283
+ }
284
+
285
+ /**
286
+ * CommandEmpty - Empty state message for command menu
287
+ *
288
+ * Displays when no command items match the current search query.
289
+ * Can contain custom content beyond simple text messages.
290
+ *
291
+ * @component
292
+ * @example
293
+ * ```tsx
294
+ * <CommandList>
295
+ * <CommandEmpty>No commands found.</CommandEmpty>
296
+ * </CommandList>
297
+ * ```
298
+ *
299
+ * @example
300
+ * ```tsx
301
+ * // Custom empty state with icon and helpful text
302
+ * <CommandEmpty>
303
+ * <div className="py-6 text-center">
304
+ * <SearchIcon className="mx-auto h-10 w-10 text-muted-foreground/50" />
305
+ * <h3 className="mt-2 text-sm font-medium">No results found</h3>
306
+ * <p className="mt-1 text-sm text-muted-foreground">
307
+ * Try adjusting your search terms.
308
+ * </p>
309
+ * </div>
310
+ * </CommandEmpty>
311
+ * ```
312
+ *
313
+ * @accessibility
314
+ * - Announced to screen readers when no results are found
315
+ * - Content is properly focusable if interactive
316
+ *
317
+ * @since 1.0.0
318
+ */
319
+ function CommandEmpty({
320
+ ...props
321
+ }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
322
+ return (
323
+ <CommandPrimitive.Empty
324
+ data-slot="command-empty"
325
+ className="py-6 text-center text-sm"
326
+ {...props}
327
+ />
328
+ );
329
+ }
330
+
331
+ /**
332
+ * CommandGroup - Groups related command items under a heading
333
+ *
334
+ * Organizes command items into labeled sections for better organization
335
+ * and navigation. Groups provide semantic structure for screen readers.
336
+ *
337
+ * @component
338
+ * @example
339
+ * ```tsx
340
+ * <CommandGroup heading="Recent Files">
341
+ * <CommandItem>document.pdf</CommandItem>
342
+ * <CommandItem>presentation.pptx</CommandItem>
343
+ * </CommandGroup>
344
+ * <CommandGroup heading="Actions">
345
+ * <CommandItem>New File</CommandItem>
346
+ * <CommandItem>Open File</CommandItem>
347
+ * </CommandGroup>
348
+ * ```
349
+ *
350
+ * @param heading - The group heading text displayed above items
351
+ *
352
+ * @accessibility
353
+ * - Group headings are announced to screen readers
354
+ * - Provides semantic grouping for better navigation
355
+ * - Maintains keyboard navigation flow between groups
356
+ *
357
+ * @since 1.0.0
358
+ */
359
+ function CommandGroup({
360
+ className,
361
+ ...props
362
+ }: React.ComponentProps<typeof CommandPrimitive.Group>) {
363
+ return (
364
+ <CommandPrimitive.Group
365
+ data-slot="command-group"
366
+ className={cn(
367
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
368
+ className,
369
+ )}
370
+ {...props}
371
+ />
372
+ );
373
+ }
374
+
375
+ /**
376
+ * CommandSeparator - Visual separator between command groups
377
+ *
378
+ * Provides visual separation between different sections of commands.
379
+ * Purely decorative element that improves visual organization.
380
+ *
381
+ * @component
382
+ * @example
383
+ * ```tsx
384
+ * <CommandGroup heading="Recent">...</CommandGroup>
385
+ * <CommandSeparator />
386
+ * <CommandGroup heading="Actions">...</CommandGroup>
387
+ * ```
388
+ *
389
+ * @accessibility
390
+ * - Decorative element, properly hidden from screen readers
391
+ * - Does not interfere with keyboard navigation
392
+ *
393
+ * @since 1.0.0
394
+ */
395
+ function CommandSeparator({
396
+ className,
397
+ ...props
398
+ }: React.ComponentProps<typeof CommandPrimitive.Separator>) {
399
+ return (
400
+ <CommandPrimitive.Separator
401
+ data-slot="command-separator"
402
+ className={cn("bg-border -mx-1 h-px", className)}
403
+ {...props}
404
+ />
405
+ );
406
+ }
407
+
408
+ /**
409
+ * CommandItem - Individual selectable command item
410
+ *
411
+ * Represents a single command or action that can be selected via
412
+ * keyboard or mouse interaction. Supports icons, text, and shortcuts.
413
+ *
414
+ * @component
415
+ * @example
416
+ * ```tsx
417
+ * // Basic command item
418
+ * <CommandItem onSelect={() => console.log("File opened")}>
419
+ * Open File
420
+ * </CommandItem>
421
+ * ```
422
+ *
423
+ * @example
424
+ * ```tsx
425
+ * // Command item with icon and shortcut
426
+ * <CommandItem value="new-document" onSelect={handleCreateDocument}>
427
+ * <FileIcon className="mr-2 h-4 w-4" />
428
+ * New Document
429
+ * <CommandShortcut>⌘N</CommandShortcut>
430
+ * </CommandItem>
431
+ * ```
432
+ *
433
+ * @param value - Unique identifier for the item (used for filtering)
434
+ * @param onSelect - Callback when item is selected
435
+ * @param disabled - Whether the item is disabled
436
+ *
437
+ * @accessibility
438
+ * - Keyboard selectable with Enter key and arrow navigation
439
+ * - Visual highlight on focus and hover states
440
+ * - Supports disabled state with proper ARIA attributes
441
+ * - Screen reader announces item content and state
442
+ *
443
+ * @since 1.0.0
444
+ */
445
+ function CommandItem({
446
+ className,
447
+ ...props
448
+ }: React.ComponentProps<typeof CommandPrimitive.Item>) {
449
+ return (
450
+ <CommandPrimitive.Item
451
+ data-slot="command-item"
452
+ className={cn(
453
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
454
+ className,
455
+ )}
456
+ {...props}
457
+ />
458
+ );
459
+ }
460
+
461
+ /**
462
+ * CommandShortcut - Displays keyboard shortcut for command items
463
+ *
464
+ * Shows the keyboard shortcut associated with a command item,
465
+ * typically displayed on the right side. Supports platform-specific shortcuts.
466
+ *
467
+ * @component
468
+ * @example
469
+ * ```tsx
470
+ * <CommandItem>
471
+ * Save File
472
+ * <CommandShortcut>⌘S</CommandShortcut>
473
+ * </CommandItem>
474
+ * ```
475
+ *
476
+ * @example
477
+ * ```tsx
478
+ * // Multi-key shortcuts
479
+ * <CommandItem>
480
+ * Redo
481
+ * <CommandShortcut>⇧⌘Z</CommandShortcut>
482
+ * </CommandItem>
483
+ * ```
484
+ *
485
+ * @accessibility
486
+ * - Semantically associated with its command item
487
+ * - Announced to screen readers as part of item description
488
+ * - Uses proper keyboard shortcut formatting
489
+ *
490
+ * @since 1.0.0
491
+ */
492
+ function CommandShortcut({
493
+ className,
494
+ ...props
495
+ }: React.ComponentProps<"span">) {
496
+ return (
497
+ <span
498
+ data-slot="command-shortcut"
499
+ className={cn(
500
+ "text-muted-foreground ml-auto text-xs tracking-widest",
501
+ className,
502
+ )}
503
+ {...props}
504
+ />
505
+ );
506
+ }
507
+
508
+ export {
509
+ Command,
510
+ CommandDialog,
511
+ CommandInput,
512
+ CommandList,
513
+ CommandEmpty,
514
+ CommandGroup,
515
+ CommandItem,
516
+ CommandShortcut,
517
+ CommandSeparator,
518
+ };
@@ -0,0 +1,114 @@
1
+ import * as React from "react";
2
+ import { cn } from "@/lib/utils";
3
+
4
+ /**
5
+ * Props for the Container component
6
+ *
7
+ * @public
8
+ */
9
+ export type ContainerProps = React.HTMLAttributes<HTMLDivElement> & {
10
+ /**
11
+ * The maximum width size of the container
12
+ *
13
+ * - `sm`: max-w-3xl (48rem) - Optimal for reading content, articles, and blog posts
14
+ * - `md`: max-w-5xl (64rem) - Suitable for forms, documentation, and medium-width layouts
15
+ * - `lg`: max-w-7xl (80rem) - Default size, ideal for main application content and dashboards
16
+ * - `xl`: max-w-none - No max-width constraint but maintains responsive padding
17
+ * - `full`: max-w-full - Full width container for edge-to-edge designs
18
+ *
19
+ * @default "lg"
20
+ */
21
+ size?: "sm" | "md" | "lg" | "xl" | "full";
22
+ };
23
+
24
+ /**
25
+ * A responsive content wrapper component that provides consistent max-width constraints and horizontal padding
26
+ *
27
+ * Container is inspired by layout patterns from shadcn/ui and Tailwind UI, offering a flexible foundation
28
+ * for page layouts. It automatically centers content horizontally and applies responsive padding that
29
+ * adapts gracefully across different screen sizes (px-4 on mobile, px-6 on small screens, px-8 on large screens).
30
+ *
31
+ * The component supports five size variants optimized for different content types:
32
+ * - Small containers for optimal reading experiences
33
+ * - Medium containers for forms and documentation
34
+ * - Large containers for application dashboards
35
+ * - Extra-large and full-width for specialized layouts
36
+ *
37
+ * @example Basic usage with default large size
38
+ * ```tsx
39
+ * <Container>
40
+ * <h1>Dashboard Title</h1>
41
+ * <p>Main application content with optimal width constraints</p>
42
+ * </Container>
43
+ * ```
44
+ *
45
+ * @example Reading-optimized container for articles
46
+ * ```tsx
47
+ * <Container size="sm">
48
+ * <article>
49
+ * <h1>Blog Post Title</h1>
50
+ * <p>Long-form content with line lengths optimized for readability</p>
51
+ * </article>
52
+ * </Container>
53
+ * ```
54
+ *
55
+ * @example Full-width layout for complex interfaces
56
+ * ```tsx
57
+ * <Container size="full">
58
+ * <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
59
+ * <DashboardWidget />
60
+ * <DashboardWidget />
61
+ * <DashboardWidget />
62
+ * </div>
63
+ * </Container>
64
+ * ```
65
+ *
66
+ * @example Composing with other layout components
67
+ * ```tsx
68
+ * <Container size="lg" className="py-8">
69
+ * <Stack spacing="lg">
70
+ * <Heading size="xl">Section Title</Heading>
71
+ * <Text>Section description</Text>
72
+ * <Card>Content card</Card>
73
+ * </Stack>
74
+ * </Container>
75
+ * ```
76
+ *
77
+ * @accessibility
78
+ * - Uses semantic HTML `div` element that works well with screen readers
79
+ * - Maintains proper focus management and keyboard navigation flow
80
+ * - Responsive design ensures content remains accessible across all device sizes
81
+ * - Text content automatically reflows for optimal readability
82
+ * - Compatible with high contrast themes and browser zoom levels up to 200%
83
+ *
84
+ * @see {@link https://ui.shadcn.com/docs/components/sidebar} Sidebar component for app layouts
85
+ * @see {@link https://ui.shadcn.com/blocks} shadcn/ui blocks for complete layout examples
86
+ *
87
+ * @public
88
+ * @since 1.0.0
89
+ */
90
+ const Container = React.forwardRef<HTMLDivElement, ContainerProps>(
91
+ ({ className, size = "lg", ...props }, ref) => {
92
+ return (
93
+ <div
94
+ ref={ref}
95
+ className={cn(
96
+ "mx-auto w-full px-4 sm:px-6 lg:px-8",
97
+ {
98
+ "max-w-3xl": size === "sm",
99
+ "max-w-5xl": size === "md",
100
+ "max-w-7xl": size === "lg",
101
+ "max-w-none": size === "xl",
102
+ "max-w-full": size === "full",
103
+ },
104
+ className,
105
+ )}
106
+ {...props}
107
+ />
108
+ );
109
+ },
110
+ );
111
+
112
+ Container.displayName = "Container";
113
+
114
+ export { Container };