@neynar/ui 0.1.1 → 0.1.3

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 (440) hide show
  1. package/dist/components/ui/accordion.d.ts +1 -25
  2. package/dist/components/ui/accordion.d.ts.map +1 -1
  3. package/dist/components/ui/alert-dialog.d.ts +240 -46
  4. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  5. package/dist/components/ui/alert.d.ts +73 -11
  6. package/dist/components/ui/alert.d.ts.map +1 -1
  7. package/dist/components/ui/aspect-ratio.d.ts +44 -10
  8. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  9. package/dist/components/ui/avatar.d.ts +117 -33
  10. package/dist/components/ui/avatar.d.ts.map +1 -1
  11. package/dist/components/ui/badge.d.ts +50 -71
  12. package/dist/components/ui/badge.d.ts.map +1 -1
  13. package/dist/components/ui/breadcrumb.d.ts +231 -49
  14. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  15. package/dist/components/ui/button.d.ts +189 -71
  16. package/dist/components/ui/button.d.ts.map +1 -1
  17. package/dist/components/ui/calendar.d.ts +197 -40
  18. package/dist/components/ui/calendar.d.ts.map +1 -1
  19. package/dist/components/ui/card.d.ts +7 -22
  20. package/dist/components/ui/card.d.ts.map +1 -1
  21. package/dist/components/ui/carousel.d.ts +369 -99
  22. package/dist/components/ui/carousel.d.ts.map +1 -1
  23. package/dist/components/ui/chart.d.ts.map +1 -1
  24. package/dist/components/ui/checkbox.d.ts +110 -38
  25. package/dist/components/ui/checkbox.d.ts.map +1 -1
  26. package/dist/components/ui/collapsible.d.ts +246 -61
  27. package/dist/components/ui/collapsible.d.ts.map +1 -1
  28. package/dist/components/ui/combobox.d.ts +207 -159
  29. package/dist/components/ui/combobox.d.ts.map +1 -1
  30. package/dist/components/ui/command.d.ts +336 -67
  31. package/dist/components/ui/command.d.ts.map +1 -1
  32. package/dist/components/ui/container.d.ts +159 -64
  33. package/dist/components/ui/container.d.ts.map +1 -1
  34. package/dist/components/ui/context-menu.d.ts +321 -39
  35. package/dist/components/ui/context-menu.d.ts.map +1 -1
  36. package/dist/components/ui/date-picker.d.ts +113 -86
  37. package/dist/components/ui/date-picker.d.ts.map +1 -1
  38. package/dist/components/ui/dialog.d.ts +106 -25
  39. package/dist/components/ui/dialog.d.ts.map +1 -1
  40. package/dist/components/ui/drawer.d.ts +388 -59
  41. package/dist/components/ui/drawer.d.ts.map +1 -1
  42. package/dist/components/ui/dropdown-menu.d.ts +521 -74
  43. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  44. package/dist/components/ui/empty-state.d.ts +148 -76
  45. package/dist/components/ui/empty-state.d.ts.map +1 -1
  46. package/dist/components/ui/hover-card.d.ts +253 -34
  47. package/dist/components/ui/hover-card.d.ts.map +1 -1
  48. package/dist/components/ui/input.d.ts +143 -44
  49. package/dist/components/ui/input.d.ts.map +1 -1
  50. package/dist/components/ui/label.d.ts +0 -8
  51. package/dist/components/ui/label.d.ts.map +1 -1
  52. package/dist/components/ui/menubar.d.ts +288 -46
  53. package/dist/components/ui/menubar.d.ts.map +1 -1
  54. package/dist/components/ui/navigation-menu.d.ts +444 -127
  55. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  56. package/dist/components/ui/pagination.d.ts +342 -66
  57. package/dist/components/ui/pagination.d.ts.map +1 -1
  58. package/dist/components/ui/popover.d.ts +0 -8
  59. package/dist/components/ui/popover.d.ts.map +1 -1
  60. package/dist/components/ui/progress.d.ts +88 -30
  61. package/dist/components/ui/progress.d.ts.map +1 -1
  62. package/dist/components/ui/radio-group.d.ts +189 -45
  63. package/dist/components/ui/radio-group.d.ts.map +1 -1
  64. package/dist/components/ui/resizable.d.ts +178 -62
  65. package/dist/components/ui/resizable.d.ts.map +1 -1
  66. package/dist/components/ui/scroll-area.d.ts +180 -21
  67. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  68. package/dist/components/ui/select.d.ts +382 -60
  69. package/dist/components/ui/select.d.ts.map +1 -1
  70. package/dist/components/ui/separator.d.ts +52 -39
  71. package/dist/components/ui/separator.d.ts.map +1 -1
  72. package/dist/components/ui/sheet.d.ts +144 -27
  73. package/dist/components/ui/sheet.d.ts.map +1 -1
  74. package/dist/components/ui/sidebar.d.ts +81 -31
  75. package/dist/components/ui/sidebar.d.ts.map +1 -1
  76. package/dist/components/ui/skeleton.d.ts +94 -32
  77. package/dist/components/ui/skeleton.d.ts.map +1 -1
  78. package/dist/components/ui/slider.d.ts +37 -31
  79. package/dist/components/ui/slider.d.ts.map +1 -1
  80. package/dist/components/ui/sonner.d.ts +280 -46
  81. package/dist/components/ui/sonner.d.ts.map +1 -1
  82. package/dist/components/ui/stack.d.ts +289 -148
  83. package/dist/components/ui/stack.d.ts.map +1 -1
  84. package/dist/components/ui/stories/aspect-ratio.stories.d.ts +1 -2
  85. package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -1
  86. package/dist/components/ui/stories/container.stories.d.ts +2 -3
  87. package/dist/components/ui/stories/container.stories.d.ts.map +1 -1
  88. package/dist/components/ui/stories/empty-state.stories.d.ts +2 -2
  89. package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -2
  90. package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -1
  91. package/dist/components/ui/stories/stack.stories.d.ts +1 -1
  92. package/dist/components/ui/stories/text-field.stories.d.ts +7 -1
  93. package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -1
  94. package/dist/components/ui/switch.d.ts +44 -38
  95. package/dist/components/ui/switch.d.ts.map +1 -1
  96. package/dist/components/ui/table.d.ts +33 -0
  97. package/dist/components/ui/table.d.ts.map +1 -1
  98. package/dist/components/ui/tabs.d.ts +4 -22
  99. package/dist/components/ui/tabs.d.ts.map +1 -1
  100. package/dist/components/ui/text-field.d.ts +170 -84
  101. package/dist/components/ui/text-field.d.ts.map +1 -1
  102. package/dist/components/ui/textarea.d.ts +106 -29
  103. package/dist/components/ui/textarea.d.ts.map +1 -1
  104. package/dist/components/ui/theme-toggle.d.ts +190 -65
  105. package/dist/components/ui/theme-toggle.d.ts.map +1 -1
  106. package/dist/components/ui/theme.d.ts +107 -23
  107. package/dist/components/ui/theme.d.ts.map +1 -1
  108. package/dist/components/ui/toggle-group.d.ts +143 -67
  109. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  110. package/dist/components/ui/toggle.d.ts +118 -30
  111. package/dist/components/ui/toggle.d.ts.map +1 -1
  112. package/dist/components/ui/tooltip.d.ts +152 -28
  113. package/dist/components/ui/tooltip.d.ts.map +1 -1
  114. package/dist/components/ui/typography.d.ts +452 -134
  115. package/dist/components/ui/typography.d.ts.map +1 -1
  116. package/dist/index.js +9388 -8281
  117. package/dist/index.js.map +1 -1
  118. package/dist/tsconfig.tsbuildinfo +1 -1
  119. package/llm-docs/a.llm.md +145 -0
  120. package/llm-docs/accordion-content.llm.md +67 -0
  121. package/llm-docs/accordion-item.llm.md +61 -0
  122. package/llm-docs/accordion-trigger.llm.md +69 -0
  123. package/llm-docs/accordion.llm.md +88 -0
  124. package/llm-docs/alert-description.llm.md +78 -0
  125. package/llm-docs/alert-dialog-action.llm.md +51 -0
  126. package/llm-docs/alert-dialog-cancel.llm.md +48 -0
  127. package/llm-docs/alert-dialog-content.llm.md +88 -0
  128. package/llm-docs/alert-dialog-description.llm.md +53 -0
  129. package/llm-docs/alert-dialog-footer.llm.md +41 -0
  130. package/llm-docs/alert-dialog-header.llm.md +39 -0
  131. package/llm-docs/alert-dialog-overlay.llm.md +44 -0
  132. package/llm-docs/alert-dialog-portal.llm.md +41 -0
  133. package/llm-docs/alert-dialog-title.llm.md +46 -0
  134. package/llm-docs/alert-dialog-trigger.llm.md +40 -0
  135. package/llm-docs/alert-dialog.llm.md +80 -0
  136. package/llm-docs/alert-title.llm.md +48 -0
  137. package/llm-docs/alert.llm.md +92 -0
  138. package/llm-docs/aspect-ratio.llm.md +41 -0
  139. package/llm-docs/avatar-fallback.llm.md +41 -0
  140. package/llm-docs/avatar-image.llm.md +48 -0
  141. package/llm-docs/avatar.llm.md +35 -0
  142. package/llm-docs/badge.llm.md +108 -0
  143. package/llm-docs/blockquote.llm.md +122 -0
  144. package/llm-docs/breadcrumb-ellipsis.llm.md +73 -0
  145. package/llm-docs/breadcrumb-item.llm.md +53 -0
  146. package/llm-docs/breadcrumb-link.llm.md +84 -0
  147. package/llm-docs/breadcrumb-list.llm.md +54 -0
  148. package/llm-docs/breadcrumb-page.llm.md +52 -0
  149. package/llm-docs/breadcrumb-separator.llm.md +60 -0
  150. package/llm-docs/breadcrumb.llm.md +110 -0
  151. package/llm-docs/button.llm.md +281 -0
  152. package/llm-docs/calendar-day-button.llm.md +57 -0
  153. package/llm-docs/calendar.llm.md +340 -0
  154. package/llm-docs/card-action.llm.md +64 -0
  155. package/llm-docs/card-content.llm.md +48 -0
  156. package/llm-docs/card-description.llm.md +46 -0
  157. package/llm-docs/card-footer.llm.md +56 -0
  158. package/llm-docs/card-header.llm.md +53 -0
  159. package/llm-docs/card-title.llm.md +43 -0
  160. package/llm-docs/card.llm.md +100 -0
  161. package/llm-docs/carousel-content.llm.md +77 -0
  162. package/llm-docs/carousel-item.llm.md +96 -0
  163. package/llm-docs/carousel-next.llm.md +95 -0
  164. package/llm-docs/carousel-previous.llm.md +95 -0
  165. package/llm-docs/carousel.llm.md +211 -0
  166. package/llm-docs/chart-config.llm.md +71 -0
  167. package/llm-docs/chart-container.llm.md +148 -0
  168. package/llm-docs/chart-legend-content.llm.md +85 -0
  169. package/llm-docs/chart-legend.llm.md +144 -0
  170. package/llm-docs/chart-style.llm.md +28 -0
  171. package/llm-docs/chart-tooltip-content.llm.md +149 -0
  172. package/llm-docs/chart-tooltip.llm.md +184 -0
  173. package/llm-docs/checkbox.llm.md +100 -0
  174. package/llm-docs/cn.llm.md +46 -0
  175. package/llm-docs/code.llm.md +108 -0
  176. package/llm-docs/collapsible-content.llm.md +109 -0
  177. package/llm-docs/collapsible-trigger.llm.md +75 -0
  178. package/llm-docs/collapsible.llm.md +109 -0
  179. package/llm-docs/combobox-option.llm.md +53 -0
  180. package/llm-docs/combobox.llm.md +208 -0
  181. package/llm-docs/command-dialog.llm.md +112 -0
  182. package/llm-docs/command-empty.llm.md +63 -0
  183. package/llm-docs/command-group.llm.md +83 -0
  184. package/llm-docs/command-input.llm.md +82 -0
  185. package/llm-docs/command-item.llm.md +97 -0
  186. package/llm-docs/command-list.llm.md +53 -0
  187. package/llm-docs/command-loading.llm.md +48 -0
  188. package/llm-docs/command-separator.llm.md +44 -0
  189. package/llm-docs/command-shortcut.llm.md +63 -0
  190. package/llm-docs/command.llm.md +147 -0
  191. package/llm-docs/container.llm.md +236 -0
  192. package/llm-docs/context-menu-checkbox-item.llm.md +97 -0
  193. package/llm-docs/context-menu-content.llm.md +91 -0
  194. package/llm-docs/context-menu-group.llm.md +61 -0
  195. package/llm-docs/context-menu-item.llm.md +94 -0
  196. package/llm-docs/context-menu-label.llm.md +60 -0
  197. package/llm-docs/context-menu-portal.llm.md +49 -0
  198. package/llm-docs/context-menu-radio-group.llm.md +66 -0
  199. package/llm-docs/context-menu-radio-item.llm.md +76 -0
  200. package/llm-docs/context-menu-separator.llm.md +51 -0
  201. package/llm-docs/context-menu-shortcut.llm.md +57 -0
  202. package/llm-docs/context-menu-sub-content.llm.md +90 -0
  203. package/llm-docs/context-menu-sub-trigger.llm.md +73 -0
  204. package/llm-docs/context-menu-sub.llm.md +61 -0
  205. package/llm-docs/context-menu-trigger.llm.md +53 -0
  206. package/llm-docs/context-menu.llm.md +103 -0
  207. package/llm-docs/date-picker.llm.md +90 -0
  208. package/llm-docs/dialog-close.llm.md +61 -0
  209. package/llm-docs/dialog-content.llm.md +128 -0
  210. package/llm-docs/dialog-description.llm.md +44 -0
  211. package/llm-docs/dialog-footer.llm.md +38 -0
  212. package/llm-docs/dialog-header.llm.md +40 -0
  213. package/llm-docs/dialog-overlay.llm.md +57 -0
  214. package/llm-docs/dialog-portal.llm.md +47 -0
  215. package/llm-docs/dialog-title.llm.md +41 -0
  216. package/llm-docs/dialog-trigger.llm.md +51 -0
  217. package/llm-docs/dialog.llm.md +113 -0
  218. package/llm-docs/drawer-close.llm.md +53 -0
  219. package/llm-docs/drawer-content.llm.md +58 -0
  220. package/llm-docs/drawer-description.llm.md +54 -0
  221. package/llm-docs/drawer-footer.llm.md +67 -0
  222. package/llm-docs/drawer-header.llm.md +60 -0
  223. package/llm-docs/drawer-overlay.llm.md +40 -0
  224. package/llm-docs/drawer-portal.llm.md +42 -0
  225. package/llm-docs/drawer-title.llm.md +51 -0
  226. package/llm-docs/drawer-trigger.llm.md +44 -0
  227. package/llm-docs/drawer.llm.md +194 -0
  228. package/llm-docs/dropdown-menu-checkbox-item.llm.md +111 -0
  229. package/llm-docs/dropdown-menu-content.llm.md +109 -0
  230. package/llm-docs/dropdown-menu-group.llm.md +38 -0
  231. package/llm-docs/dropdown-menu-item.llm.md +94 -0
  232. package/llm-docs/dropdown-menu-label.llm.md +66 -0
  233. package/llm-docs/dropdown-menu-portal.llm.md +32 -0
  234. package/llm-docs/dropdown-menu-radio-group.llm.md +73 -0
  235. package/llm-docs/dropdown-menu-radio-item.llm.md +92 -0
  236. package/llm-docs/dropdown-menu-separator.llm.md +55 -0
  237. package/llm-docs/dropdown-menu-shortcut.llm.md +74 -0
  238. package/llm-docs/dropdown-menu-sub-content.llm.md +80 -0
  239. package/llm-docs/dropdown-menu-sub-trigger.llm.md +84 -0
  240. package/llm-docs/dropdown-menu-sub.llm.md +74 -0
  241. package/llm-docs/dropdown-menu-trigger.llm.md +48 -0
  242. package/llm-docs/dropdown-menu.llm.md +120 -0
  243. package/llm-docs/empty-state.llm.md +174 -0
  244. package/llm-docs/h1.llm.md +113 -0
  245. package/llm-docs/h2.llm.md +113 -0
  246. package/llm-docs/h3.llm.md +111 -0
  247. package/llm-docs/h4.llm.md +109 -0
  248. package/llm-docs/h5.llm.md +110 -0
  249. package/llm-docs/h6.llm.md +110 -0
  250. package/llm-docs/hover-card-content.llm.md +167 -0
  251. package/llm-docs/hover-card-trigger.llm.md +65 -0
  252. package/llm-docs/hover-card.llm.md +121 -0
  253. package/llm-docs/input.llm.md +319 -0
  254. package/llm-docs/label.llm.md +145 -0
  255. package/llm-docs/lead.llm.md +119 -0
  256. package/llm-docs/menubar-checkbox-item.llm.md +66 -0
  257. package/llm-docs/menubar-content.llm.md +128 -0
  258. package/llm-docs/menubar-group.llm.md +40 -0
  259. package/llm-docs/menubar-item.llm.md +62 -0
  260. package/llm-docs/menubar-label.llm.md +40 -0
  261. package/llm-docs/menubar-menu.llm.md +32 -0
  262. package/llm-docs/menubar-portal.llm.md +38 -0
  263. package/llm-docs/menubar-radio-group.llm.md +39 -0
  264. package/llm-docs/menubar-radio-item.llm.md +59 -0
  265. package/llm-docs/menubar-separator.llm.md +35 -0
  266. package/llm-docs/menubar-shortcut.llm.md +37 -0
  267. package/llm-docs/menubar-sub-content.llm.md +127 -0
  268. package/llm-docs/menubar-sub-trigger.llm.md +51 -0
  269. package/llm-docs/menubar-sub.llm.md +53 -0
  270. package/llm-docs/menubar-trigger.llm.md +37 -0
  271. package/llm-docs/menubar.llm.md +115 -0
  272. package/llm-docs/navigation-menu-content.llm.md +116 -0
  273. package/llm-docs/navigation-menu-indicator.llm.md +68 -0
  274. package/llm-docs/navigation-menu-item.llm.md +62 -0
  275. package/llm-docs/navigation-menu-link.llm.md +109 -0
  276. package/llm-docs/navigation-menu-list.llm.md +52 -0
  277. package/llm-docs/navigation-menu-trigger-style.llm.md +22 -0
  278. package/llm-docs/navigation-menu-trigger.llm.md +57 -0
  279. package/llm-docs/navigation-menu-viewport.llm.md +51 -0
  280. package/llm-docs/navigation-menu.llm.md +184 -0
  281. package/llm-docs/p.llm.md +115 -0
  282. package/llm-docs/pagination-content.llm.md +60 -0
  283. package/llm-docs/pagination-ellipsis.llm.md +107 -0
  284. package/llm-docs/pagination-item.llm.md +59 -0
  285. package/llm-docs/pagination-link.llm.md +150 -0
  286. package/llm-docs/pagination-next.llm.md +115 -0
  287. package/llm-docs/pagination-previous.llm.md +115 -0
  288. package/llm-docs/pagination.llm.md +190 -0
  289. package/llm-docs/popover-anchor.llm.md +53 -0
  290. package/llm-docs/popover-content.llm.md +109 -0
  291. package/llm-docs/popover-trigger.llm.md +54 -0
  292. package/llm-docs/popover.llm.md +116 -0
  293. package/llm-docs/progress.llm.md +76 -0
  294. package/llm-docs/radio-group-indicator.llm.md +28 -0
  295. package/llm-docs/radio-group-item.llm.md +40 -0
  296. package/llm-docs/radio-group.llm.md +76 -0
  297. package/llm-docs/resizable-handle.llm.md +156 -0
  298. package/llm-docs/resizable-panel-group.llm.md +149 -0
  299. package/llm-docs/resizable-panel.llm.md +157 -0
  300. package/llm-docs/scroll-area-corner.llm.md +41 -0
  301. package/llm-docs/scroll-area-thumb.llm.md +39 -0
  302. package/llm-docs/scroll-area-viewport.llm.md +60 -0
  303. package/llm-docs/scroll-area.llm.md +125 -0
  304. package/llm-docs/scroll-bar.llm.md +78 -0
  305. package/llm-docs/sdk-items-registry.json +2638 -0
  306. package/llm-docs/select-content.llm.md +139 -0
  307. package/llm-docs/select-group.llm.md +60 -0
  308. package/llm-docs/select-item.llm.md +75 -0
  309. package/llm-docs/select-label.llm.md +62 -0
  310. package/llm-docs/select-scroll-down-button.llm.md +45 -0
  311. package/llm-docs/select-scroll-up-button.llm.md +45 -0
  312. package/llm-docs/select-separator.llm.md +59 -0
  313. package/llm-docs/select-trigger.llm.md +66 -0
  314. package/llm-docs/select-value.llm.md +67 -0
  315. package/llm-docs/select.llm.md +159 -0
  316. package/llm-docs/separator.llm.md +129 -0
  317. package/llm-docs/sheet-close.llm.md +49 -0
  318. package/llm-docs/sheet-content.llm.md +115 -0
  319. package/llm-docs/sheet-description.llm.md +62 -0
  320. package/llm-docs/sheet-footer.llm.md +64 -0
  321. package/llm-docs/sheet-header.llm.md +52 -0
  322. package/llm-docs/sheet-title.llm.md +53 -0
  323. package/llm-docs/sheet-trigger.llm.md +46 -0
  324. package/llm-docs/sheet.llm.md +126 -0
  325. package/llm-docs/sidebar-content.llm.md +63 -0
  326. package/llm-docs/sidebar-footer.llm.md +50 -0
  327. package/llm-docs/sidebar-group-action.llm.md +60 -0
  328. package/llm-docs/sidebar-group-content.llm.md +64 -0
  329. package/llm-docs/sidebar-group-label.llm.md +53 -0
  330. package/llm-docs/sidebar-group.llm.md +56 -0
  331. package/llm-docs/sidebar-header.llm.md +67 -0
  332. package/llm-docs/sidebar-input.llm.md +50 -0
  333. package/llm-docs/sidebar-inset.llm.md +52 -0
  334. package/llm-docs/sidebar-menu-action.llm.md +84 -0
  335. package/llm-docs/sidebar-menu-badge.llm.md +60 -0
  336. package/llm-docs/sidebar-menu-button.llm.md +103 -0
  337. package/llm-docs/sidebar-menu-item.llm.md +75 -0
  338. package/llm-docs/sidebar-menu-skeleton.llm.md +76 -0
  339. package/llm-docs/sidebar-menu-sub-button.llm.md +85 -0
  340. package/llm-docs/sidebar-menu-sub-item.llm.md +54 -0
  341. package/llm-docs/sidebar-menu-sub.llm.md +74 -0
  342. package/llm-docs/sidebar-menu.llm.md +65 -0
  343. package/llm-docs/sidebar-provider.llm.md +79 -0
  344. package/llm-docs/sidebar-rail.llm.md +34 -0
  345. package/llm-docs/sidebar-separator.llm.md +57 -0
  346. package/llm-docs/sidebar-trigger.llm.md +49 -0
  347. package/llm-docs/sidebar.llm.md +129 -0
  348. package/llm-docs/skeleton.llm.md +134 -0
  349. package/llm-docs/slider.llm.md +173 -0
  350. package/llm-docs/small.llm.md +115 -0
  351. package/llm-docs/span.llm.md +132 -0
  352. package/llm-docs/stack.llm.md +28 -0
  353. package/llm-docs/strong.llm.md +115 -0
  354. package/llm-docs/switch.llm.md +76 -0
  355. package/llm-docs/table-body.llm.md +36 -0
  356. package/llm-docs/table-caption.llm.md +48 -0
  357. package/llm-docs/table-cell.llm.md +53 -0
  358. package/llm-docs/table-footer.llm.md +41 -0
  359. package/llm-docs/table-head.llm.md +69 -0
  360. package/llm-docs/table-header.llm.md +41 -0
  361. package/llm-docs/table-row.llm.md +42 -0
  362. package/llm-docs/table.llm.md +123 -0
  363. package/llm-docs/tabs-content.llm.md +47 -0
  364. package/llm-docs/tabs-list.llm.md +41 -0
  365. package/llm-docs/tabs-trigger.llm.md +47 -0
  366. package/llm-docs/tabs.llm.md +71 -0
  367. package/llm-docs/text-field.llm.md +327 -0
  368. package/llm-docs/textarea.llm.md +311 -0
  369. package/llm-docs/theme-preference.llm.md +25 -0
  370. package/llm-docs/theme-toggle.llm.md +57 -0
  371. package/llm-docs/theme.llm.md +14 -0
  372. package/llm-docs/toast.llm.md +32 -0
  373. package/llm-docs/toaster.llm.md +193 -0
  374. package/llm-docs/toggle-group-item.llm.md +59 -0
  375. package/llm-docs/toggle-group.llm.md +101 -0
  376. package/llm-docs/toggle.llm.md +40 -0
  377. package/llm-docs/tooltip-content.llm.md +185 -0
  378. package/llm-docs/tooltip-provider.llm.md +68 -0
  379. package/llm-docs/tooltip-trigger.llm.md +70 -0
  380. package/llm-docs/tooltip.llm.md +129 -0
  381. package/llm-docs/typography.llm.md +175 -0
  382. package/llm-docs/use-carousel.llm.md +55 -0
  383. package/llm-docs/use-command-state.llm.md +32 -0
  384. package/llm-docs/use-is-mobile.llm.md +73 -0
  385. package/llm-docs/use-sidebar.llm.md +61 -0
  386. package/llms.txt +173 -3
  387. package/package.json +7 -3
  388. package/src/components/ui/accordion.tsx +112 -27
  389. package/src/components/ui/alert-dialog.tsx +401 -46
  390. package/src/components/ui/alert.tsx +114 -11
  391. package/src/components/ui/aspect-ratio.tsx +69 -14
  392. package/src/components/ui/avatar.tsx +179 -33
  393. package/src/components/ui/badge.tsx +74 -75
  394. package/src/components/ui/breadcrumb.tsx +335 -50
  395. package/src/components/ui/button.tsx +198 -90
  396. package/src/components/ui/calendar.tsx +867 -43
  397. package/src/components/ui/card.tsx +140 -33
  398. package/src/components/ui/carousel.tsx +529 -98
  399. package/src/components/ui/chart.tsx +222 -1
  400. package/src/components/ui/checkbox.tsx +176 -38
  401. package/src/components/ui/collapsible.tsx +321 -67
  402. package/src/components/ui/combobox.tsx +284 -83
  403. package/src/components/ui/command.tsx +527 -67
  404. package/src/components/ui/container.tsx +217 -65
  405. package/src/components/ui/context-menu.tsx +716 -51
  406. package/src/components/ui/date-picker.tsx +228 -38
  407. package/src/components/ui/dialog.tsx +270 -33
  408. package/src/components/ui/drawer.tsx +546 -67
  409. package/src/components/ui/dropdown-menu.tsx +657 -74
  410. package/src/components/ui/empty-state.tsx +241 -82
  411. package/src/components/ui/hover-card.tsx +328 -39
  412. package/src/components/ui/input.tsx +207 -44
  413. package/src/components/ui/label.tsx +98 -8
  414. package/src/components/ui/menubar.tsx +587 -54
  415. package/src/components/ui/navigation-menu.tsx +557 -128
  416. package/src/components/ui/pagination.tsx +561 -79
  417. package/src/components/ui/popover.tsx +119 -8
  418. package/src/components/ui/progress.tsx +131 -29
  419. package/src/components/ui/radio-group.tsx +260 -51
  420. package/src/components/ui/resizable.tsx +289 -63
  421. package/src/components/ui/scroll-area.tsx +377 -66
  422. package/src/components/ui/select.tsx +545 -60
  423. package/src/components/ui/separator.tsx +146 -40
  424. package/src/components/ui/sheet.tsx +348 -31
  425. package/src/components/ui/sidebar.tsx +471 -29
  426. package/src/components/ui/skeleton.tsx +114 -32
  427. package/src/components/ui/slider.tsx +77 -31
  428. package/src/components/ui/sonner.tsx +574 -46
  429. package/src/components/ui/stack.tsx +423 -101
  430. package/src/components/ui/switch.tsx +78 -39
  431. package/src/components/ui/table.tsx +170 -4
  432. package/src/components/ui/tabs.tsx +108 -22
  433. package/src/components/ui/text-field.tsx +226 -81
  434. package/src/components/ui/textarea.tsx +180 -29
  435. package/src/components/ui/theme-toggle.tsx +313 -65
  436. package/src/components/ui/theme.tsx +117 -23
  437. package/src/components/ui/toggle-group.tsx +280 -69
  438. package/src/components/ui/toggle.tsx +124 -35
  439. package/src/components/ui/tooltip.tsx +239 -29
  440. package/src/components/ui/typography.tsx +1115 -165
@@ -4,11 +4,671 @@ import {
4
4
  ChevronLeftIcon,
5
5
  ChevronRightIcon,
6
6
  } from "lucide-react";
7
- import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker";
7
+ import {
8
+ DayButton,
9
+ DayPicker,
10
+ getDefaultClassNames,
11
+ type DateRange,
12
+ type Matcher,
13
+ } from "react-day-picker";
14
+ import type { Locale } from "date-fns";
8
15
 
9
16
  import { cn } from "@/lib/utils";
10
17
  import { Button, buttonVariants } from "@/components/ui/button";
11
18
 
19
+ /**
20
+ * Props for Calendar component (Documentation only - NOT used in component implementation)
21
+ *
22
+ * These types are for documentation generation and should not replace react-day-picker inferred types.
23
+ * Extends react-day-picker's DayPicker props with additional customization options.
24
+ * Provides comprehensive type safety and documentation for all available props.
25
+ */
26
+ // eslint-disable-next-line unused-imports/no-unused-vars
27
+ type CalendarDocsProps = {
28
+ /**
29
+ * Selection mode that determines how dates can be selected
30
+ *
31
+ * @default "none"
32
+ * @example
33
+ * ```tsx
34
+ * // Single date selection
35
+ * <Calendar mode="single" selected={date} onSelect={setDate} />
36
+ *
37
+ * // Date range selection
38
+ * <Calendar mode="range" selected={range} onSelect={setRange} />
39
+ *
40
+ * // Multiple dates selection
41
+ * <Calendar mode="multiple" selected={dates} onSelect={setDates} />
42
+ * ```
43
+ */
44
+ mode?: "single" | "multiple" | "range" | "none";
45
+
46
+ /**
47
+ * The selected date(s) - type varies based on selection mode
48
+ *
49
+ * - Single mode: `Date | undefined`
50
+ * - Multiple mode: `Date[] | undefined`
51
+ * - Range mode: `DateRange | undefined`
52
+ * - None mode: Not applicable
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * const [date, setDate] = useState<Date>()
57
+ * <Calendar mode="single" selected={date} />
58
+ *
59
+ * const [dates, setDates] = useState<Date[]>()
60
+ * <Calendar mode="multiple" selected={dates} />
61
+ *
62
+ * const [range, setRange] = useState<DateRange>()
63
+ * <Calendar mode="range" selected={range} />
64
+ * ```
65
+ */
66
+ selected?: Date | Date[] | DateRange | undefined;
67
+
68
+ /**
69
+ * Event handler called when date selection changes
70
+ *
71
+ * The handler signature varies based on the selection mode:
72
+ * - Single: `(date: Date | undefined) => void`
73
+ * - Multiple: `(dates: Date[] | undefined) => void`
74
+ * - Range: `(range: DateRange | undefined) => void`
75
+ *
76
+ * @param value - The new selected value(s)
77
+ */
78
+ onSelect?: (value: Date | Date[] | DateRange | undefined) => void;
79
+
80
+ /**
81
+ * Button variant for navigation arrows and interactive elements
82
+ *
83
+ * Controls the visual style of the previous/next month navigation buttons.
84
+ * Choose from shadcn/ui button variants to match your design system.
85
+ *
86
+ * @default "ghost"
87
+ * @example
88
+ * ```tsx
89
+ * // Outline style navigation buttons
90
+ * <Calendar buttonVariant="outline" />
91
+ *
92
+ * // Secondary style for subtle navigation
93
+ * <Calendar buttonVariant="secondary" />
94
+ * ```
95
+ */
96
+ buttonVariant?:
97
+ | "default"
98
+ | "destructive"
99
+ | "outline"
100
+ | "secondary"
101
+ | "ghost"
102
+ | "link";
103
+
104
+ /**
105
+ * Layout style for the month caption area
106
+ *
107
+ * - `"buttons"`: Navigation buttons on either side of the month/year label
108
+ * - `"dropdown"`: Interactive dropdowns for month and year selection
109
+ * - `"dropdown-buttons"`: Combines dropdowns with navigation buttons
110
+ *
111
+ * @default "buttons"
112
+ * @example
113
+ * ```tsx
114
+ * // Enable month/year dropdowns
115
+ * <Calendar captionLayout="dropdown" fromYear={2020} toYear={2030} />
116
+ * ```
117
+ */
118
+ captionLayout?: "buttons" | "dropdown" | "dropdown-buttons";
119
+
120
+ /**
121
+ * Whether to show days from adjacent months (outside days)
122
+ *
123
+ * When true, displays grayed-out days from the previous and next months
124
+ * to fill the calendar grid. Useful for maintaining consistent layout.
125
+ *
126
+ * @default true
127
+ */
128
+ showOutsideDays?: boolean;
129
+
130
+ /**
131
+ * The number of months to display simultaneously
132
+ *
133
+ * Useful for date range selection or providing more calendar context.
134
+ * Months are displayed side by side on larger screens.
135
+ *
136
+ * @default 1
137
+ * @example
138
+ * ```tsx
139
+ * // Show two months for range selection
140
+ * <Calendar numberOfMonths={2} mode="range" />
141
+ * ```
142
+ */
143
+ numberOfMonths?: number;
144
+
145
+ /**
146
+ * Whether to display a column showing week numbers
147
+ *
148
+ * Week numbers are calculated according to the locale settings.
149
+ * Use `ISOWeek` prop for ISO 8601 week numbering.
150
+ *
151
+ * @default false
152
+ * @see {@link ISOWeek} For ISO week date format
153
+ * @see {@link firstWeekContainsDate} For first week configuration
154
+ */
155
+ showWeekNumber?: boolean;
156
+
157
+ /**
158
+ * Use ISO 8601 week dates instead of locale-based week numbering
159
+ *
160
+ * When true, weeks start on Monday and the first week contains January 4th.
161
+ * This standardizes week numbering across different locales.
162
+ *
163
+ * @default false
164
+ * @see {@link showWeekNumber} To display week numbers
165
+ */
166
+ ISOWeek?: boolean;
167
+
168
+ /**
169
+ * Always display exactly 6 weeks per month
170
+ *
171
+ * Prevents calendar height changes during navigation by ensuring
172
+ * a consistent 6-week grid. Empty cells are filled with outside days.
173
+ *
174
+ * @default false
175
+ */
176
+ fixedWeeks?: boolean;
177
+
178
+ /**
179
+ * Dates or date ranges that cannot be selected
180
+ *
181
+ * Accepts various matcher formats:
182
+ * - Single date: `new Date(2024, 0, 15)`
183
+ * - Date range: `{ from: new Date(2024, 0, 1), to: new Date(2024, 0, 31) }`
184
+ * - Days of week: `{ dayOfWeek: [0, 6] }` (Sunday, Saturday)
185
+ * - Before/after: `{ before: new Date() }`, `{ after: new Date(2024, 11, 31) }`
186
+ * - Array of matchers: `[date1, { dayOfWeek: [0] }, { before: new Date() }]`
187
+ *
188
+ * @example
189
+ * ```tsx
190
+ * <Calendar disabled={[
191
+ * { before: new Date() }, // Past dates
192
+ * { dayOfWeek: [0, 6] }, // Weekends
193
+ * new Date(2024, 11, 25), // Christmas
194
+ * { from: new Date(2024, 6, 1), to: new Date(2024, 6, 7) } // Vacation week
195
+ * ]} />
196
+ * ```
197
+ */
198
+ disabled?: Matcher | Matcher[];
199
+
200
+ /**
201
+ * Dates or date ranges to visually highlight with special styling
202
+ *
203
+ * Similar to disabled prop but for positive highlighting.
204
+ * Useful for marking holidays, events, or available dates.
205
+ *
206
+ * @example
207
+ * ```tsx
208
+ * <Calendar highlighted={[
209
+ * new Date(2024, 11, 25), // Christmas
210
+ * { from: new Date(2024, 5, 1), to: new Date(2024, 5, 7) } // Special week
211
+ * ]} />
212
+ * ```
213
+ */
214
+ highlighted?: Matcher | Matcher[];
215
+
216
+ /**
217
+ * The initially displayed month when the calendar first renders
218
+ *
219
+ * Useful for starting the calendar on a specific month rather than
220
+ * the current month or selected date.
221
+ *
222
+ * @example
223
+ * ```tsx
224
+ * // Start calendar in June 2024
225
+ * <Calendar defaultMonth={new Date(2024, 5)} />
226
+ * ```
227
+ */
228
+ defaultMonth?: Date;
229
+
230
+ /**
231
+ * Controlled month display (use with onMonthChange)
232
+ *
233
+ * When provided, the calendar will display this specific month.
234
+ * Use with onMonthChange for programmatic month control.
235
+ *
236
+ * @example
237
+ * ```tsx
238
+ * const [month, setMonth] = useState(new Date(2024, 5))
239
+ * <Calendar month={month} onMonthChange={setMonth} />
240
+ * ```
241
+ */
242
+ month?: Date;
243
+
244
+ /**
245
+ * Event handler called when the displayed month changes
246
+ *
247
+ * Called when user navigates to a different month via buttons,
248
+ * dropdowns, or keyboard navigation.
249
+ *
250
+ * @param month - The new month being displayed
251
+ */
252
+ onMonthChange?: (month: Date) => void;
253
+
254
+ /**
255
+ * Earliest month that can be navigated to
256
+ *
257
+ * Restricts backward navigation beyond this month.
258
+ * Navigation buttons are disabled when reaching this limit.
259
+ *
260
+ * @example
261
+ * ```tsx
262
+ * // Don't allow navigation before January 2024
263
+ * <Calendar startMonth={new Date(2024, 0)} />
264
+ * ```
265
+ */
266
+ startMonth?: Date;
267
+
268
+ /**
269
+ * Latest month that can be navigated to
270
+ *
271
+ * Restricts forward navigation beyond this month.
272
+ * Navigation buttons are disabled when reaching this limit.
273
+ *
274
+ * @example
275
+ * ```tsx
276
+ * // Don't allow navigation past December 2025
277
+ * <Calendar endMonth={new Date(2025, 11)} />
278
+ * ```
279
+ */
280
+ endMonth?: Date;
281
+
282
+ /**
283
+ * Earliest year for dropdown navigation (when using captionLayout="dropdown")
284
+ *
285
+ * Only relevant when using dropdown caption layout.
286
+ * Limits the earliest selectable year in the year dropdown.
287
+ *
288
+ * @default Current year - 100
289
+ */
290
+ fromYear?: number;
291
+
292
+ /**
293
+ * Latest year for dropdown navigation (when using captionLayout="dropdown")
294
+ *
295
+ * Only relevant when using dropdown caption layout.
296
+ * Limits the latest selectable year in the year dropdown.
297
+ *
298
+ * @default Current year + 100
299
+ */
300
+ toYear?: number;
301
+
302
+ /**
303
+ * Completely disable all month navigation
304
+ *
305
+ * When true, removes navigation buttons and prevents month changes.
306
+ * Useful for static calendar displays.
307
+ *
308
+ * @default false
309
+ */
310
+ disableNavigation?: boolean;
311
+
312
+ /**
313
+ * Hide the navigation buttons while keeping programmatic navigation possible
314
+ *
315
+ * Unlike disableNavigation, this only hides the UI buttons but allows
316
+ * navigation via onMonthChange and other programmatic methods.
317
+ *
318
+ * @default false
319
+ */
320
+ hideNavigation?: boolean;
321
+
322
+ /**
323
+ * Enable smooth month transition animations
324
+ *
325
+ * Adds CSS transitions when navigating between months.
326
+ * Customize animation duration and timing with CSS variables.
327
+ *
328
+ * @default false
329
+ * @example
330
+ * ```tsx
331
+ * // Enable with custom animation
332
+ * <Calendar
333
+ * animate
334
+ * className="[--rdp-animation_duration:0.3s] [--rdp-animation_timing:ease-in-out]"
335
+ * />
336
+ * ```
337
+ */
338
+ animate?: boolean;
339
+
340
+ /**
341
+ * The first day of the week (0 = Sunday, 1 = Monday, etc.)
342
+ *
343
+ * Overrides the locale's default first day of week setting.
344
+ * Affects both the weekday header display and week calculations.
345
+ *
346
+ * @default Locale default
347
+ * @example
348
+ * ```tsx
349
+ * // Start weeks on Monday
350
+ * <Calendar weekStartsOn={1} />
351
+ * ```
352
+ */
353
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
354
+
355
+ /**
356
+ * Configuration for the first week of the year
357
+ *
358
+ * - `1`: First week contains January 1st
359
+ * - `4`: First week contains January 4th (ISO 8601 standard)
360
+ *
361
+ * Affects week number calculations when showWeekNumber is enabled.
362
+ *
363
+ * @default 1
364
+ * @see {@link showWeekNumber}
365
+ * @see {@link ISOWeek}
366
+ */
367
+ firstWeekContainsDate?: 1 | 4;
368
+
369
+ /**
370
+ * Locale for date formatting and localization
371
+ *
372
+ * Uses date-fns locale objects for internationalization.
373
+ * Affects month names, weekday names, and date formatting.
374
+ *
375
+ * @default date-fns English locale
376
+ * @example
377
+ * ```tsx
378
+ * import { es } from 'date-fns/locale'
379
+ * <Calendar locale={es} />
380
+ * ```
381
+ */
382
+ locale?: Locale;
383
+
384
+ /**
385
+ * Text direction for right-to-left languages
386
+ *
387
+ * @default "ltr"
388
+ * @example
389
+ * ```tsx
390
+ * // For Arabic or Hebrew
391
+ * <Calendar dir="rtl" />
392
+ * ```
393
+ */
394
+ dir?: "ltr" | "rtl";
395
+
396
+ /**
397
+ * Event handler for day click events
398
+ *
399
+ * Called when any day is clicked, regardless of selection mode.
400
+ * Provides the clicked date and any active modifiers.
401
+ *
402
+ * @param day - The clicked date
403
+ * @param modifiers - Object containing modifier states (selected, disabled, etc.)
404
+ */
405
+ onDayClick?: (day: Date, modifiers: Record<string, boolean>) => void;
406
+
407
+ /**
408
+ * Event handler for day hover events
409
+ *
410
+ * Called when the mouse enters a day cell.
411
+ *
412
+ * @param day - The hovered date
413
+ * @param modifiers - Object containing modifier states
414
+ */
415
+ onDayMouseEnter?: (day: Date, modifiers: Record<string, boolean>) => void;
416
+
417
+ /**
418
+ * Event handler for day hover leave events
419
+ *
420
+ * Called when the mouse leaves a day cell.
421
+ *
422
+ * @param day - The unhovered date
423
+ * @param modifiers - Object containing modifier states
424
+ */
425
+ onDayMouseLeave?: (day: Date, modifiers: Record<string, boolean>) => void;
426
+
427
+ /**
428
+ * Event handler for day keyboard events
429
+ *
430
+ * Called when a key is pressed while a day has focus.
431
+ * Useful for custom keyboard shortcuts or interactions.
432
+ *
433
+ * @param day - The focused date
434
+ * @param key - The pressed key
435
+ * @param modifiers - Object containing modifier states
436
+ */
437
+ onDayKeyDown?: (
438
+ day: Date,
439
+ key: string,
440
+ modifiers: Record<string, boolean>,
441
+ ) => void;
442
+
443
+ /**
444
+ * Event handler for week number clicks
445
+ *
446
+ * Called when a week number is clicked (when showWeekNumber is true).
447
+ * Useful for selecting entire weeks or custom week-based interactions.
448
+ *
449
+ * @param weekNumber - The clicked week number
450
+ * @param dates - Array of all dates in that week
451
+ */
452
+ onWeekNumberClick?: (weekNumber: number, dates: Date[]) => void;
453
+
454
+ /**
455
+ * Custom formatters for date display
456
+ *
457
+ * Override default formatting for various calendar elements.
458
+ * All formatters receive the date and locale options.
459
+ *
460
+ * @example
461
+ * ```tsx
462
+ * <Calendar formatters={{
463
+ * formatDay: (date) => date.getDate().toString(),
464
+ * formatMonthCaption: (date) => date.toLocaleDateString('en', { month: 'long', year: 'numeric' }),
465
+ * formatWeekNumber: (weekNumber) => `W${weekNumber}`
466
+ * }} />
467
+ * ```
468
+ */
469
+ formatters?: {
470
+ /** Format individual day numbers */
471
+ formatDay?: (date: Date) => string;
472
+ /** Format month caption (header) */
473
+ formatMonthCaption?: (date: Date) => string;
474
+ /** Format week numbers */
475
+ formatWeekNumber?: (weekNumber: number) => string;
476
+ /** Format weekday names in header */
477
+ formatWeekdayName?: (date: Date) => string;
478
+ /** Format year in dropdown */
479
+ formatYearDropdown?: (date: Date) => string;
480
+ /** Format month in dropdown */
481
+ formatMonthDropdown?: (date: Date) => string;
482
+ };
483
+
484
+ /**
485
+ * Custom class names for calendar elements
486
+ *
487
+ * Override default styling for specific parts of the calendar.
488
+ * Useful for theming or custom styling without affecting the entire component.
489
+ *
490
+ * @example
491
+ * ```tsx
492
+ * <Calendar classNames={{
493
+ * day: "hover:bg-blue-100",
494
+ * selected: "bg-blue-500 text-white",
495
+ * disabled: "opacity-30",
496
+ * range_middle: "bg-blue-100"
497
+ * }} />
498
+ * ```
499
+ */
500
+ classNames?: {
501
+ /** Root calendar container */
502
+ root?: string;
503
+ /** Months container */
504
+ months?: string;
505
+ /** Individual month container */
506
+ month?: string;
507
+ /** Month caption/header */
508
+ month_caption?: string;
509
+ /** Navigation container */
510
+ nav?: string;
511
+ /** Previous month button */
512
+ button_previous?: string;
513
+ /** Next month button */
514
+ button_next?: string;
515
+ /** Month/year dropdowns container */
516
+ dropdowns?: string;
517
+ /** Individual dropdown */
518
+ dropdown?: string;
519
+ /** Weekdays header row */
520
+ weekdays?: string;
521
+ /** Individual weekday header */
522
+ weekday?: string;
523
+ /** Week row container */
524
+ week?: string;
525
+ /** Week number cell */
526
+ week_number?: string;
527
+ /** Individual day cell */
528
+ day?: string;
529
+ /** Selected day(s) */
530
+ selected?: string;
531
+ /** Today's date */
532
+ today?: string;
533
+ /** Disabled days */
534
+ disabled?: string;
535
+ /** Days outside current month */
536
+ outside?: string;
537
+ /** Range start day */
538
+ range_start?: string;
539
+ /** Range end day */
540
+ range_end?: string;
541
+ /** Days in middle of range */
542
+ range_middle?: string;
543
+ /** Hidden days */
544
+ hidden?: string;
545
+ };
546
+
547
+ /**
548
+ * Custom React components to replace default calendar parts
549
+ *
550
+ * Allows complete customization of calendar rendering by replacing
551
+ * internal components with your own implementations.
552
+ *
553
+ * @example
554
+ * ```tsx
555
+ * <Calendar components={{
556
+ * DayContent: ({ date }) => (
557
+ * <span>{date.getDate()}{date.getDate() === 1 && '🎉'}</span>
558
+ * ),
559
+ * MonthCaption: ({ displayMonth }) => (
560
+ * <h2 className="text-lg font-bold">{displayMonth.toLocaleDateString()}</h2>
561
+ * )
562
+ * }} />
563
+ * ```
564
+ */
565
+ components?: {
566
+ /** Root calendar container component */
567
+ Root?: React.ComponentType<
568
+ React.ComponentProps<"div"> & { rootRef?: React.Ref<HTMLDivElement> }
569
+ >;
570
+ /** Month caption component */
571
+ MonthCaption?: React.ComponentType<{ displayMonth: Date }>;
572
+ /** Navigation chevron icons */
573
+ Chevron?: React.ComponentType<
574
+ React.ComponentProps<"svg"> & {
575
+ orientation?: "left" | "right" | "up" | "down";
576
+ }
577
+ >;
578
+ /** Individual day button */
579
+ DayButton?: React.ComponentType<React.ComponentProps<typeof DayButton>>;
580
+ /** Day content (number/text inside day) */
581
+ DayContent?: React.ComponentType<{ date: Date }>;
582
+ /** Dropdown select components */
583
+ Dropdown?: React.ComponentType<React.ComponentProps<"select">>;
584
+ /** Week number component */
585
+ WeekNumber?: React.ComponentType<
586
+ React.ComponentProps<"td"> & { children: React.ReactNode }
587
+ >;
588
+ /** Footer component */
589
+ Footer?: React.ComponentType<{ children: React.ReactNode }>;
590
+ /** Weekdays header */
591
+ Weekdays?: React.ComponentType<React.ComponentProps<"tr">>;
592
+ /** Week row component */
593
+ Week?: React.ComponentType<React.ComponentProps<"tr">>;
594
+ };
595
+
596
+ /**
597
+ * Footer content displayed below the calendar
598
+ *
599
+ * Can be any React node - text, components, or complex elements.
600
+ * Commonly used to show selected date(s) or provide additional context.
601
+ *
602
+ * @example
603
+ * ```tsx
604
+ * <Calendar footer={
605
+ * selected ? (
606
+ * <p>Selected: {selected.toLocaleDateString()}</p>
607
+ * ) : (
608
+ * <p>Please select a date</p>
609
+ * )
610
+ * } />
611
+ * ```
612
+ */
613
+ footer?: React.ReactNode;
614
+
615
+ /**
616
+ * Custom modifiers for advanced styling and behavior
617
+ *
618
+ * Define custom rules for styling or highlighting specific dates.
619
+ * Each modifier can be a date, date range, or function that returns boolean.
620
+ *
621
+ * @example
622
+ * ```tsx
623
+ * <Calendar modifiers={{
624
+ * weekend: { dayOfWeek: [0, 6] },
625
+ * holiday: [new Date(2024, 11, 25), new Date(2024, 0, 1)],
626
+ * booked: (date) => bookedDates.includes(date.toDateString())
627
+ * }} />
628
+ * ```
629
+ */
630
+ modifiers?: Record<string, Matcher | Matcher[]>;
631
+
632
+ /**
633
+ * Additional CSS classes to apply to the calendar root
634
+ *
635
+ * Standard className prop for styling the entire calendar container.
636
+ */
637
+ className?: string;
638
+
639
+ /**
640
+ * Inline styles for the calendar root
641
+ *
642
+ * React CSSProperties object for inline styling.
643
+ */
644
+ style?: React.CSSProperties;
645
+
646
+ /**
647
+ * HTML data attributes and other props
648
+ *
649
+ * Any additional HTML attributes will be forwarded to the root element.
650
+ */
651
+ [key: string]: unknown;
652
+ } & Omit<React.ComponentProps<typeof DayPicker>, "buttonVariant">;
653
+
654
+ /**
655
+ * Actual props type used by the Calendar component implementation
656
+ * Uses react-day-picker's inferred types for perfect compatibility
657
+ */
658
+ type CalendarProps = React.ComponentProps<typeof DayPicker> & {
659
+ /**
660
+ * Button variant for navigation arrows and interactive elements
661
+ * @default "ghost"
662
+ */
663
+ buttonVariant?:
664
+ | "default"
665
+ | "destructive"
666
+ | "outline"
667
+ | "secondary"
668
+ | "ghost"
669
+ | "link";
670
+ };
671
+
12
672
  /**
13
673
  * Calendar - A comprehensive date selection calendar component
14
674
  *
@@ -16,6 +676,10 @@ import { Button, buttonVariants } from "@/components/ui/button";
16
676
  * date selection with extensive customization options. Supports single dates, date ranges,
17
677
  * multiple dates, and custom validation rules with built-in accessibility features.
18
678
  *
679
+ * Built on the powerful react-day-picker library, this component provides a complete
680
+ * calendar interface with advanced features like custom formatters, modifiers, disabled
681
+ * dates, localization, and extensive styling options.
682
+ *
19
683
  * @component
20
684
  *
21
685
  * @example Basic single date selection
@@ -43,7 +707,7 @@ import { Button, buttonVariants } from "@/components/ui/button";
43
707
  * />
44
708
  * ```
45
709
  *
46
- * @example Multiple date selection
710
+ * @example Multiple date selection with limits
47
711
  * ```tsx
48
712
  * const [dates, setDates] = useState<Date[] | undefined>()
49
713
  *
@@ -51,6 +715,8 @@ import { Button, buttonVariants } from "@/components/ui/button";
51
715
  * mode="multiple"
52
716
  * selected={dates}
53
717
  * onSelect={setDates}
718
+ * min={2} // Minimum 2 dates required
719
+ * max={5} // Maximum 5 dates allowed
54
720
  * className="rounded-md border"
55
721
  * />
56
722
  * ```
@@ -70,7 +736,7 @@ import { Button, buttonVariants } from "@/components/ui/button";
70
736
  * />
71
737
  * ```
72
738
  *
73
- * @example Calendar with month/year dropdowns
739
+ * @example Calendar with month/year dropdowns and navigation limits
74
740
  * ```tsx
75
741
  * <Calendar
76
742
  * mode="single"
@@ -79,36 +745,194 @@ import { Button, buttonVariants } from "@/components/ui/button";
79
745
  * onSelect={setDate}
80
746
  * fromYear={2020}
81
747
  * toYear={2030}
748
+ * startMonth={new Date(2023, 0)} // Don't go before Jan 2023
749
+ * endMonth={new Date(2025, 11)} // Don't go past Dec 2025
82
750
  * className="rounded-md border"
83
751
  * />
84
752
  * ```
85
753
  *
754
+ * @example International calendar with custom locale
755
+ * ```tsx
756
+ * import { es } from 'date-fns/locale'
757
+ *
758
+ * <Calendar
759
+ * mode="single"
760
+ * selected={date}
761
+ * onSelect={setDate}
762
+ * locale={es} // Spanish locale
763
+ * weekStartsOn={1} // Start weeks on Monday
764
+ * dir="ltr"
765
+ * className="rounded-md border"
766
+ * />
767
+ * ```
768
+ *
769
+ * @example Calendar with custom formatters and styling
770
+ * ```tsx
771
+ * <Calendar
772
+ * mode="single"
773
+ * showWeekNumber
774
+ * formatters={{
775
+ * formatDay: (date) => date.getDate().toString(),
776
+ * formatWeekNumber: (weekNumber) => `W${weekNumber}`,
777
+ * formatMonthCaption: (date) =>
778
+ * date.toLocaleDateString('en', { month: 'long', year: 'numeric' })
779
+ * }}
780
+ * classNames={{
781
+ * day: "hover:bg-blue-100 transition-colors",
782
+ * selected: "bg-blue-500 text-white font-semibold",
783
+ * today: "bg-blue-100 font-bold"
784
+ * }}
785
+ * className="rounded-lg border-2 shadow-lg"
786
+ * />
787
+ * ```
788
+ *
789
+ * @example Calendar with custom modifiers and event handling
790
+ * ```tsx
791
+ * const holidays = [new Date(2024, 11, 25), new Date(2024, 0, 1)]
792
+ * const weekends = { dayOfWeek: [0, 6] }
793
+ *
794
+ * <Calendar
795
+ * mode="single"
796
+ * modifiers={{
797
+ * holiday: holidays,
798
+ * weekend: weekends,
799
+ * available: (date) => availableDates.includes(date.toDateString())
800
+ * }}
801
+ * onDayClick={(day, modifiers) => {
802
+ * if (modifiers.holiday) {
803
+ * alert('Holiday selected!')
804
+ * }
805
+ * }}
806
+ * onWeekNumberClick={(weekNumber, dates) => {
807
+ * console.log(`Week ${weekNumber} contains:`, dates)
808
+ * }}
809
+ * classNames={{
810
+ * holiday: "bg-red-100 text-red-800",
811
+ * weekend: "bg-gray-100 text-gray-600",
812
+ * available: "bg-green-100 text-green-800"
813
+ * }}
814
+ * />
815
+ * ```
816
+ *
817
+ * @example Calendar with custom components
818
+ * ```tsx
819
+ * <Calendar
820
+ * mode="single"
821
+ * components={{
822
+ * DayContent: ({ date }) => (
823
+ * <div className="relative">
824
+ * {date.getDate()}
825
+ * {date.getDate() === 1 && (
826
+ * <span className="absolute -top-1 -right-1 text-xs">🎉</span>
827
+ * )}
828
+ * </div>
829
+ * ),
830
+ * MonthCaption: ({ displayMonth }) => (
831
+ * <div className="flex items-center justify-center py-2">
832
+ * <h2 className="text-lg font-bold text-blue-600">
833
+ * {displayMonth.toLocaleDateString('en', {
834
+ * month: 'long',
835
+ * year: 'numeric'
836
+ * })}
837
+ * </h2>
838
+ * </div>
839
+ * )
840
+ * }}
841
+ * />
842
+ * ```
843
+ *
844
+ * @example Advanced range selection with custom styling
845
+ * ```tsx
846
+ * const [dateRange, setDateRange] = useState<DateRange>()
847
+ *
848
+ * <Calendar
849
+ * mode="range"
850
+ * selected={dateRange}
851
+ * onSelect={setDateRange}
852
+ * numberOfMonths={2}
853
+ * showOutsideDays={false}
854
+ * fixedWeeks
855
+ * classNames={{
856
+ * range_start: "bg-blue-500 text-white rounded-l-md",
857
+ * range_end: "bg-blue-500 text-white rounded-r-md",
858
+ * range_middle: "bg-blue-100 text-blue-900",
859
+ * selected: "bg-blue-500 text-white"
860
+ * }}
861
+ * footer={dateRange && (
862
+ * <div className="p-3 border-t">
863
+ * <p className="text-sm text-gray-600">
864
+ * {dateRange.from && `From: ${dateRange.from.toLocaleDateString()}`}
865
+ * {dateRange.to && ` • To: ${dateRange.to.toLocaleDateString()}`}
866
+ * {dateRange.from && dateRange.to && (
867
+ * ` • ${Math.ceil((dateRange.to.getTime() - dateRange.from.getTime()) / (1000 * 60 * 60 * 24) + 1)} days`
868
+ * )}
869
+ * </p>
870
+ * </div>
871
+ * )}
872
+ * />
873
+ * ```
874
+ *
86
875
  * @features
87
- * - **Selection modes**: Single date, date ranges, multiple dates
88
- * - **Navigation**: Month/year navigation with keyboard support
89
- * - **Validation**: Flexible date disabling and validation rules
90
- * - **Customization**: Multiple caption layouts, button variants, styling
91
- * - **Internationalization**: Built-in locale support via react-day-picker
92
- * - **Accessibility**: Full WCAG compliance with keyboard navigation
876
+ * - **Selection Modes**: Single date, date ranges, multiple dates, or no selection
877
+ * - **Navigation**: Month/year navigation with buttons or dropdowns, keyboard support
878
+ * - **Validation**: Flexible date disabling, custom matchers, min/max constraints
879
+ * - **Customization**: Custom formatters, modifiers, components, styling
880
+ * - **Internationalization**: Full locale support, RTL languages, custom week start
881
+ * - **Accessibility**: WCAG 2.1 AA compliant, screen reader support, keyboard navigation
882
+ * - **Performance**: Optimized rendering, minimal re-renders, efficient DOM updates
93
883
  *
94
884
  * @accessibility
95
- * - **Keyboard Navigation**: Arrow keys for date navigation, Page Up/Down for months
96
- * - **Screen Reader Support**: Comprehensive ARIA labels and announcements
97
- * - **Focus Management**: Proper focus handling and restoration
98
- * - **Standards Compliance**: WCAG 2.1 AA compliant
99
- * - **RTL Support**: Right-to-left language support
885
+ * - **Keyboard Navigation**:
886
+ * - Arrow keys navigate between dates
887
+ * - Page Up/Down navigate months
888
+ * - Home/End navigate to start/end of week
889
+ * - Ctrl+Page Up/Down navigate years
890
+ * - Enter/Space select dates
891
+ * - Escape closes popover/dropdown states
892
+ * - **Screen Reader Support**:
893
+ * - Comprehensive ARIA labels and descriptions
894
+ * - Live region announcements for month changes
895
+ * - Proper role and state management
896
+ * - Selected dates and ranges announced clearly
897
+ * - **Focus Management**:
898
+ * - Visible focus indicators with 3px ring
899
+ * - Focus restoration after month navigation
900
+ * - Logical tab order through interactive elements
901
+ * - Trapped focus in dropdown modes
902
+ * - **Standards Compliance**:
903
+ * - WCAG 2.1 AA color contrast requirements
904
+ * - Proper heading structure and landmarks
905
+ * - Compatible with screen readers and assistive technology
906
+ * - **RTL Support**:
907
+ * - Right-to-left text direction support
908
+ * - Mirrored navigation button orientation
909
+ * - Locale-aware date formatting
100
910
  *
101
911
  * @performance
102
- * The component is optimized for performance with minimal re-renders and efficient
103
- * DOM updates. Large date ranges and multiple months are handled efficiently.
912
+ * - **Optimized Rendering**: Minimal re-renders through memoization and efficient state management
913
+ * - **Large Date Ranges**: Efficiently handles calendars spanning multiple months and years
914
+ * - **Event Handling**: Debounced and optimized event handlers for smooth interactions
915
+ * - **Memory Management**: Proper cleanup and garbage collection for long-running applications
916
+ * - **Bundle Size**: Tree-shakeable with minimal runtime overhead
104
917
  *
105
918
  * @styling
106
- * Fully customizable with Tailwind CSS classes. Supports CSS custom properties
107
- * for cell sizing (`--cell-size`) and integrates with the design system theme.
919
+ * - **Design System Integration**: Built with shadcn/ui design tokens and Tailwind CSS
920
+ * - **CSS Custom Properties**: Supports `--cell-size` and other CSS variables for sizing
921
+ * - **Theming**: Dark mode support and custom theme integration
922
+ * - **Responsive**: Mobile-friendly with touch interactions and responsive layouts
923
+ * - **Customizable**: Override any visual aspect through classNames, components, or CSS
924
+ *
925
+ * @browser-support
926
+ * - **Modern Browsers**: Chrome 91+, Firefox 90+, Safari 15+, Edge 91+
927
+ * - **Mobile**: iOS Safari 15+, Android Chrome 91+
928
+ * - **Accessibility**: Compatible with NVDA, JAWS, VoiceOver screen readers
108
929
  *
109
- * @see {@link CalendarDayButton} Individual day button component
110
- * @see [react-day-picker docs](https://react-day-picker.js.org/) for advanced configuration
111
- * @see {@link https://ui.shadcn.com/docs/components/calendar} - shadcn/ui Calendar documentation
930
+ * @see {@link CalendarDayButton} Individual day button component with custom styling
931
+ * @see {@link CalendarProps} Complete props interface with TypeScript definitions
932
+ * @see {@link https://react-day-picker.js.org/} react-day-picker documentation for advanced configuration
933
+ * @see {@link https://ui.shadcn.com/docs/components/calendar} shadcn/ui Calendar documentation
934
+ * @see {@link https://date-fns.org/docs/I18n} date-fns internationalization guide
935
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/} WAI-ARIA Authoring Practices Guide
112
936
  * @since 1.0.0
113
937
  */
114
938
  function Calendar({
@@ -120,25 +944,7 @@ function Calendar({
120
944
  formatters,
121
945
  components,
122
946
  ...props
123
- }: React.ComponentProps<typeof DayPicker> & {
124
- /**
125
- * Button variant for navigation arrows and interactive elements
126
- *
127
- * Controls the visual style of the previous/next month navigation buttons.
128
- * Choose from shadcn/ui button variants to match your design system.
129
- *
130
- * @default "ghost"
131
- * @example
132
- * ```tsx
133
- * // Outline style navigation buttons
134
- * <Calendar buttonVariant="outline" />
135
- *
136
- * // Secondary style for subtle navigation
137
- * <Calendar buttonVariant="secondary" />
138
- * ```
139
- */
140
- buttonVariant?: React.ComponentProps<typeof Button>["variant"];
141
- }) {
947
+ }: CalendarProps) {
142
948
  const defaultClassNames = getDefaultClassNames();
143
949
 
144
950
  return (
@@ -241,7 +1047,14 @@ function Calendar({
241
1047
  ...classNames,
242
1048
  }}
243
1049
  components={{
244
- Root: ({ className, rootRef, ...props }: { className?: string; rootRef?: React.Ref<HTMLDivElement> } & React.ComponentProps<"div">) => {
1050
+ Root: ({
1051
+ className,
1052
+ rootRef,
1053
+ ...props
1054
+ }: {
1055
+ className?: string;
1056
+ rootRef?: React.Ref<HTMLDivElement>;
1057
+ } & React.ComponentProps<"div">) => {
245
1058
  return (
246
1059
  <div
247
1060
  data-slot="calendar"
@@ -251,7 +1064,14 @@ function Calendar({
251
1064
  />
252
1065
  );
253
1066
  },
254
- Chevron: ({ className, orientation, ...props }: { className?: string; orientation?: "left" | "right" | "up" | "down" } & React.ComponentProps<"svg">) => {
1067
+ Chevron: ({
1068
+ className,
1069
+ orientation,
1070
+ ...props
1071
+ }: {
1072
+ className?: string;
1073
+ orientation?: "left" | "right" | "up" | "down";
1074
+ } & React.ComponentProps<"svg">) => {
255
1075
  if (orientation === "left") {
256
1076
  return (
257
1077
  <ChevronLeftIcon className={cn("size-4", className)} {...props} />
@@ -272,7 +1092,10 @@ function Calendar({
272
1092
  );
273
1093
  },
274
1094
  DayButton: CalendarDayButton,
275
- WeekNumber: ({ children, ...props }) => {
1095
+ WeekNumber: ({
1096
+ children,
1097
+ ...props
1098
+ }: React.ComponentProps<"td"> & { children?: React.ReactNode }) => {
276
1099
  return (
277
1100
  <td {...props}>
278
1101
  <div className="flex size-(--cell-size) items-center justify-center text-center">
@@ -369,3 +1192,4 @@ function CalendarDayButton({
369
1192
  }
370
1193
 
371
1194
  export { Calendar, CalendarDayButton };
1195
+ export type { CalendarProps };