@kamod-ui/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/LICENSE.md +9 -0
  2. package/dist/Accordion-D1PiNspd.d.ts +39 -0
  3. package/dist/AlertDialog-CpnCfDdN.d.ts +64 -0
  4. package/dist/Button-tRKMr8-H.d.ts +84 -0
  5. package/dist/CalendarDateTimePanel-B3J8OlSc.d.ts +79 -0
  6. package/dist/Carousel-DvlcMPpB.d.ts +41 -0
  7. package/dist/Chart-Ax22S5_N.d.ts +10 -0
  8. package/dist/Checkbox-DBbLYq6Q.d.ts +12 -0
  9. package/dist/Collapsible-DSZCp0tm.d.ts +34 -0
  10. package/dist/ComboboxInlineInput-CB7CEXzy.d.ts +135 -0
  11. package/dist/CommandSeparator-pJQnB9Lu.d.ts +47 -0
  12. package/dist/DataTable-zNTTdYVU.d.ts +13 -0
  13. package/dist/DatePicker-AFAYh5Ca.d.ts +20 -0
  14. package/dist/Dialog-CqCI4s9U.d.ts +28 -0
  15. package/dist/DialogContent-9VJGDt5l.d.ts +24 -0
  16. package/dist/DialogHeader-CYT7iUDq.d.ts +13 -0
  17. package/dist/DialogTitle-CvcRlZ_Z.d.ts +13 -0
  18. package/dist/Direction-25ZOt0gW.d.ts +24 -0
  19. package/dist/Drawer-BOPihYBJ.d.ts +41 -0
  20. package/dist/Dropdown-uPFaMqkB.d.ts +143 -0
  21. package/dist/EmptyTitle-J8rVLcJ3.d.ts +59 -0
  22. package/dist/FieldTitle-aSgThW-B.d.ts +100 -0
  23. package/dist/HoverCard-OSnOE6pE.d.ts +52 -0
  24. package/dist/Input-Cem05el9.d.ts +27 -0
  25. package/dist/Menubar-DwYDW4w2.d.ts +88 -0
  26. package/dist/PopoverTrigger-B6kK73gh.d.ts +43 -0
  27. package/dist/Progress-BGij8Hob.d.ts +13 -0
  28. package/dist/RadioGroup-BaElzLwa.d.ts +40 -0
  29. package/dist/ScrollArea-B-vILe3g.d.ts +16 -0
  30. package/dist/Select-B_mNVh70.d.ts +51 -0
  31. package/dist/Separator-DCQYrnpB.d.ts +9 -0
  32. package/dist/Sheet-B41Emmis.d.ts +29 -0
  33. package/dist/SidebarProvider-IAihmyD7.d.ts +46 -0
  34. package/dist/Slider-BQLMBpYs.d.ts +16 -0
  35. package/dist/Switch-CTTkNdqF.d.ts +31 -0
  36. package/dist/Tabs-DFJR_P2D.d.ts +47 -0
  37. package/dist/Textarea-DbKkduOG.d.ts +27 -0
  38. package/dist/ThemeToggle-DfiEM1dZ.d.ts +9 -0
  39. package/dist/Toggle-CseZl7XN.d.ts +49 -0
  40. package/dist/ToggleGroup-UeYHzQe7.d.ts +137 -0
  41. package/dist/Tooltip-BtRWVyCA.d.ts +40 -0
  42. package/dist/Typography-ccTtE182.d.ts +64 -0
  43. package/dist/chunk-2UHCXHAX.js +119 -0
  44. package/dist/chunk-2UHCXHAX.js.map +1 -0
  45. package/dist/chunk-2XNWLXG2.js +12 -0
  46. package/dist/chunk-2XNWLXG2.js.map +1 -0
  47. package/dist/chunk-3EHH62ZA.js +175 -0
  48. package/dist/chunk-3EHH62ZA.js.map +1 -0
  49. package/dist/chunk-3GKUUTSA.js +586 -0
  50. package/dist/chunk-3GKUUTSA.js.map +1 -0
  51. package/dist/chunk-3IT2RVO6.js +151 -0
  52. package/dist/chunk-3IT2RVO6.js.map +1 -0
  53. package/dist/chunk-3WAPI4KR.js +36 -0
  54. package/dist/chunk-3WAPI4KR.js.map +1 -0
  55. package/dist/chunk-44YLIQIS.js +15 -0
  56. package/dist/chunk-44YLIQIS.js.map +1 -0
  57. package/dist/chunk-4AJM7IA4.js +9 -0
  58. package/dist/chunk-4AJM7IA4.js.map +1 -0
  59. package/dist/chunk-4HX6SEWP.js +24 -0
  60. package/dist/chunk-4HX6SEWP.js.map +1 -0
  61. package/dist/chunk-6FTWMOHU.js +478 -0
  62. package/dist/chunk-6FTWMOHU.js.map +1 -0
  63. package/dist/chunk-6ZXYDBPR.js +304 -0
  64. package/dist/chunk-6ZXYDBPR.js.map +1 -0
  65. package/dist/chunk-7E2ZPDVI.js +224 -0
  66. package/dist/chunk-7E2ZPDVI.js.map +1 -0
  67. package/dist/chunk-7HZUM5ZQ.js +85 -0
  68. package/dist/chunk-7HZUM5ZQ.js.map +1 -0
  69. package/dist/chunk-7MECYLKS.js +375 -0
  70. package/dist/chunk-7MECYLKS.js.map +1 -0
  71. package/dist/chunk-7TDS7TC6.js +49 -0
  72. package/dist/chunk-7TDS7TC6.js.map +1 -0
  73. package/dist/chunk-7ZXJRNJO.js +26 -0
  74. package/dist/chunk-7ZXJRNJO.js.map +1 -0
  75. package/dist/chunk-AVCG4W6D.js +122 -0
  76. package/dist/chunk-AVCG4W6D.js.map +1 -0
  77. package/dist/chunk-BF3F5SJX.js +89 -0
  78. package/dist/chunk-BF3F5SJX.js.map +1 -0
  79. package/dist/chunk-BHMKSFES.js +195 -0
  80. package/dist/chunk-BHMKSFES.js.map +1 -0
  81. package/dist/chunk-BMF5SGYP.js +45 -0
  82. package/dist/chunk-BMF5SGYP.js.map +1 -0
  83. package/dist/chunk-D25ZQ36E.js +273 -0
  84. package/dist/chunk-D25ZQ36E.js.map +1 -0
  85. package/dist/chunk-D5W5YHJZ.js +426 -0
  86. package/dist/chunk-D5W5YHJZ.js.map +1 -0
  87. package/dist/chunk-DHBILREV.js +70 -0
  88. package/dist/chunk-DHBILREV.js.map +1 -0
  89. package/dist/chunk-DJ4PFETN.js +17 -0
  90. package/dist/chunk-DJ4PFETN.js.map +1 -0
  91. package/dist/chunk-DKXUKLZT.js +342 -0
  92. package/dist/chunk-DKXUKLZT.js.map +1 -0
  93. package/dist/chunk-EL2HT25C.js +9 -0
  94. package/dist/chunk-EL2HT25C.js.map +1 -0
  95. package/dist/chunk-FDNPBI2Z.js +26 -0
  96. package/dist/chunk-FDNPBI2Z.js.map +1 -0
  97. package/dist/chunk-FWCN47RC.js +65 -0
  98. package/dist/chunk-FWCN47RC.js.map +1 -0
  99. package/dist/chunk-G6PBJZYF.js +114 -0
  100. package/dist/chunk-G6PBJZYF.js.map +1 -0
  101. package/dist/chunk-GFF5OT46.js +80 -0
  102. package/dist/chunk-GFF5OT46.js.map +1 -0
  103. package/dist/chunk-GLWYIUE5.js +242 -0
  104. package/dist/chunk-GLWYIUE5.js.map +1 -0
  105. package/dist/chunk-HEQRODRF.js +110 -0
  106. package/dist/chunk-HEQRODRF.js.map +1 -0
  107. package/dist/chunk-HGTFOOUL.js +61 -0
  108. package/dist/chunk-HGTFOOUL.js.map +1 -0
  109. package/dist/chunk-HNESOMVN.js +18 -0
  110. package/dist/chunk-HNESOMVN.js.map +1 -0
  111. package/dist/chunk-I2PR3HXC.js +51 -0
  112. package/dist/chunk-I2PR3HXC.js.map +1 -0
  113. package/dist/chunk-IGGEBO7K.js +8 -0
  114. package/dist/chunk-IGGEBO7K.js.map +1 -0
  115. package/dist/chunk-J2Z2LSXM.js +26 -0
  116. package/dist/chunk-J2Z2LSXM.js.map +1 -0
  117. package/dist/chunk-JC7JMWSH.js +109 -0
  118. package/dist/chunk-JC7JMWSH.js.map +1 -0
  119. package/dist/chunk-JZRMLE4X.js +77 -0
  120. package/dist/chunk-JZRMLE4X.js.map +1 -0
  121. package/dist/chunk-KBXDU3G4.js +382 -0
  122. package/dist/chunk-KBXDU3G4.js.map +1 -0
  123. package/dist/chunk-KF34SFFZ.js +18 -0
  124. package/dist/chunk-KF34SFFZ.js.map +1 -0
  125. package/dist/chunk-L42B6QZS.js +524 -0
  126. package/dist/chunk-L42B6QZS.js.map +1 -0
  127. package/dist/chunk-LGO5HXMG.js +592 -0
  128. package/dist/chunk-LGO5HXMG.js.map +1 -0
  129. package/dist/chunk-LVK44RMS.js +78 -0
  130. package/dist/chunk-LVK44RMS.js.map +1 -0
  131. package/dist/chunk-N2LRB6TA.js +8 -0
  132. package/dist/chunk-N2LRB6TA.js.map +1 -0
  133. package/dist/chunk-NHTY2HD2.js +8 -0
  134. package/dist/chunk-NHTY2HD2.js.map +1 -0
  135. package/dist/chunk-NJUXP5FM.js +392 -0
  136. package/dist/chunk-NJUXP5FM.js.map +1 -0
  137. package/dist/chunk-NPHECLV5.js +94 -0
  138. package/dist/chunk-NPHECLV5.js.map +1 -0
  139. package/dist/chunk-NXVAR6P2.js +79 -0
  140. package/dist/chunk-NXVAR6P2.js.map +1 -0
  141. package/dist/chunk-OMXWBB67.js +9 -0
  142. package/dist/chunk-OMXWBB67.js.map +1 -0
  143. package/dist/chunk-PE5QQIV5.js +69 -0
  144. package/dist/chunk-PE5QQIV5.js.map +1 -0
  145. package/dist/chunk-QAUGWXGJ.js +158 -0
  146. package/dist/chunk-QAUGWXGJ.js.map +1 -0
  147. package/dist/chunk-QCYFSBZ7.js +81 -0
  148. package/dist/chunk-QCYFSBZ7.js.map +1 -0
  149. package/dist/chunk-QJT5UAL2.js +714 -0
  150. package/dist/chunk-QJT5UAL2.js.map +1 -0
  151. package/dist/chunk-QRLVOM3E.js +83 -0
  152. package/dist/chunk-QRLVOM3E.js.map +1 -0
  153. package/dist/chunk-RBVGV7VO.js +26 -0
  154. package/dist/chunk-RBVGV7VO.js.map +1 -0
  155. package/dist/chunk-RD6VXGVY.js +340 -0
  156. package/dist/chunk-RD6VXGVY.js.map +1 -0
  157. package/dist/chunk-RSPI2A4W.js +106 -0
  158. package/dist/chunk-RSPI2A4W.js.map +1 -0
  159. package/dist/chunk-RT26RZ7W.js +79 -0
  160. package/dist/chunk-RT26RZ7W.js.map +1 -0
  161. package/dist/chunk-RXAIDZ33.js +522 -0
  162. package/dist/chunk-RXAIDZ33.js.map +1 -0
  163. package/dist/chunk-S6TO62GJ.js +53 -0
  164. package/dist/chunk-S6TO62GJ.js.map +1 -0
  165. package/dist/chunk-SJ5MYJ7L.js +283 -0
  166. package/dist/chunk-SJ5MYJ7L.js.map +1 -0
  167. package/dist/chunk-SZ2I2SRP.js +156 -0
  168. package/dist/chunk-SZ2I2SRP.js.map +1 -0
  169. package/dist/chunk-UGOQKTHL.js +23 -0
  170. package/dist/chunk-UGOQKTHL.js.map +1 -0
  171. package/dist/chunk-UGQ756Z6.js +92 -0
  172. package/dist/chunk-UGQ756Z6.js.map +1 -0
  173. package/dist/chunk-UNPCAFLS.js +22 -0
  174. package/dist/chunk-UNPCAFLS.js.map +1 -0
  175. package/dist/chunk-V27UIXBD.js +36 -0
  176. package/dist/chunk-V27UIXBD.js.map +1 -0
  177. package/dist/chunk-VB5LDR7C.js +97 -0
  178. package/dist/chunk-VB5LDR7C.js.map +1 -0
  179. package/dist/chunk-VJ26PA3U.js +9 -0
  180. package/dist/chunk-VJ26PA3U.js.map +1 -0
  181. package/dist/chunk-VKB4VUN7.js +164 -0
  182. package/dist/chunk-VKB4VUN7.js.map +1 -0
  183. package/dist/chunk-Y37OHTAO.js +208 -0
  184. package/dist/chunk-Y37OHTAO.js.map +1 -0
  185. package/dist/chunk-Y4OW24IS.js +18 -0
  186. package/dist/chunk-Y4OW24IS.js.map +1 -0
  187. package/dist/chunk-YDMMDO2W.js +141 -0
  188. package/dist/chunk-YDMMDO2W.js.map +1 -0
  189. package/dist/chunk-YENXORWK.js +9 -0
  190. package/dist/chunk-YENXORWK.js.map +1 -0
  191. package/dist/chunk-YLTIB224.js +76 -0
  192. package/dist/chunk-YLTIB224.js.map +1 -0
  193. package/dist/chunk-YVA6PAML.js +63 -0
  194. package/dist/chunk-YVA6PAML.js.map +1 -0
  195. package/dist/chunk-YWUMX4JR.js +9 -0
  196. package/dist/chunk-YWUMX4JR.js.map +1 -0
  197. package/dist/chunk-ZDXR2SWG.js +32 -0
  198. package/dist/chunk-ZDXR2SWG.js.map +1 -0
  199. package/dist/chunk-ZIFL6GXH.js +187 -0
  200. package/dist/chunk-ZIFL6GXH.js.map +1 -0
  201. package/dist/chunk-ZM4VJOGF.js +40 -0
  202. package/dist/chunk-ZM4VJOGF.js.map +1 -0
  203. package/dist/chunk-ZVKIJLNO.js +9 -0
  204. package/dist/chunk-ZVKIJLNO.js.map +1 -0
  205. package/dist/components/accordion/index.d.ts +12 -0
  206. package/dist/components/accordion/index.js +4 -0
  207. package/dist/components/accordion/index.js.map +1 -0
  208. package/dist/components/alert/index.d.ts +64 -0
  209. package/dist/components/alert/index.js +4 -0
  210. package/dist/components/alert/index.js.map +1 -0
  211. package/dist/components/alert-dialog/index.d.ts +22 -0
  212. package/dist/components/alert-dialog/index.js +9 -0
  213. package/dist/components/alert-dialog/index.js.map +1 -0
  214. package/dist/components/aspect-ratio/index.d.ts +11 -0
  215. package/dist/components/aspect-ratio/index.js +4 -0
  216. package/dist/components/aspect-ratio/index.js.map +1 -0
  217. package/dist/components/avatar/index.d.ts +53 -0
  218. package/dist/components/avatar/index.js +4 -0
  219. package/dist/components/avatar/index.js.map +1 -0
  220. package/dist/components/badge/index.d.ts +175 -0
  221. package/dist/components/badge/index.js +4 -0
  222. package/dist/components/badge/index.js.map +1 -0
  223. package/dist/components/breadcrumb/index.d.ts +38 -0
  224. package/dist/components/breadcrumb/index.js +4 -0
  225. package/dist/components/breadcrumb/index.js.map +1 -0
  226. package/dist/components/button/index.d.ts +72 -0
  227. package/dist/components/button/index.js +5 -0
  228. package/dist/components/button/index.js.map +1 -0
  229. package/dist/components/button-group/index.d.ts +21 -0
  230. package/dist/components/button-group/index.js +4 -0
  231. package/dist/components/button-group/index.js.map +1 -0
  232. package/dist/components/calendar/index.d.ts +7 -0
  233. package/dist/components/calendar/index.js +12 -0
  234. package/dist/components/calendar/index.js.map +1 -0
  235. package/dist/components/card/index.d.ts +80 -0
  236. package/dist/components/card/index.js +3 -0
  237. package/dist/components/card/index.js.map +1 -0
  238. package/dist/components/carousel/index.d.ts +14 -0
  239. package/dist/components/carousel/index.js +5 -0
  240. package/dist/components/carousel/index.js.map +1 -0
  241. package/dist/components/chart/index.d.ts +6 -0
  242. package/dist/components/chart/index.js +4 -0
  243. package/dist/components/chart/index.js.map +1 -0
  244. package/dist/components/checkbox/index.d.ts +7 -0
  245. package/dist/components/checkbox/index.js +4 -0
  246. package/dist/components/checkbox/index.js.map +1 -0
  247. package/dist/components/collapsible/index.d.ts +11 -0
  248. package/dist/components/collapsible/index.js +4 -0
  249. package/dist/components/collapsible/index.js.map +1 -0
  250. package/dist/components/combobox/index.d.ts +13 -0
  251. package/dist/components/combobox/index.js +7 -0
  252. package/dist/components/combobox/index.js.map +1 -0
  253. package/dist/components/command/index.d.ts +21 -0
  254. package/dist/components/command/index.js +10 -0
  255. package/dist/components/command/index.js.map +1 -0
  256. package/dist/components/context-menu/index.d.ts +114 -0
  257. package/dist/components/context-menu/index.js +5 -0
  258. package/dist/components/context-menu/index.js.map +1 -0
  259. package/dist/components/data-table/index.d.ts +6 -0
  260. package/dist/components/data-table/index.js +5 -0
  261. package/dist/components/data-table/index.js.map +1 -0
  262. package/dist/components/date-picker/index.d.ts +7 -0
  263. package/dist/components/date-picker/index.js +8 -0
  264. package/dist/components/date-picker/index.js.map +1 -0
  265. package/dist/components/dialog/index.d.ts +22 -0
  266. package/dist/components/dialog/index.js +8 -0
  267. package/dist/components/dialog/index.js.map +1 -0
  268. package/dist/components/direction/index.d.ts +7 -0
  269. package/dist/components/direction/index.js +4 -0
  270. package/dist/components/direction/index.js.map +1 -0
  271. package/dist/components/drawer/index.d.ts +19 -0
  272. package/dist/components/drawer/index.js +8 -0
  273. package/dist/components/drawer/index.js.map +1 -0
  274. package/dist/components/dropdown/index.d.ts +24 -0
  275. package/dist/components/dropdown/index.js +5 -0
  276. package/dist/components/dropdown/index.js.map +1 -0
  277. package/dist/components/dropzone/index.d.ts +26 -0
  278. package/dist/components/dropzone/index.js +5 -0
  279. package/dist/components/dropzone/index.js.map +1 -0
  280. package/dist/components/empty/index.d.ts +8 -0
  281. package/dist/components/empty/index.js +4 -0
  282. package/dist/components/empty/index.js.map +1 -0
  283. package/dist/components/field/index.d.ts +8 -0
  284. package/dist/components/field/index.js +6 -0
  285. package/dist/components/field/index.js.map +1 -0
  286. package/dist/components/hover-card/index.d.ts +12 -0
  287. package/dist/components/hover-card/index.js +3 -0
  288. package/dist/components/hover-card/index.js.map +1 -0
  289. package/dist/components/image/index.d.ts +6 -0
  290. package/dist/components/image/index.js +4 -0
  291. package/dist/components/image/index.js.map +1 -0
  292. package/dist/components/input/index.d.ts +27 -0
  293. package/dist/components/input/index.js +4 -0
  294. package/dist/components/input/index.js.map +1 -0
  295. package/dist/components/input-group/index.d.ts +132 -0
  296. package/dist/components/input-group/index.js +7 -0
  297. package/dist/components/input-group/index.js.map +1 -0
  298. package/dist/components/input-otp/index.d.ts +39 -0
  299. package/dist/components/input-otp/index.js +4 -0
  300. package/dist/components/input-otp/index.js.map +1 -0
  301. package/dist/components/item/index.d.ts +108 -0
  302. package/dist/components/item/index.js +5 -0
  303. package/dist/components/item/index.js.map +1 -0
  304. package/dist/components/kbd/index.d.ts +31 -0
  305. package/dist/components/kbd/index.js +4 -0
  306. package/dist/components/kbd/index.js.map +1 -0
  307. package/dist/components/label/index.d.ts +49 -0
  308. package/dist/components/label/index.js +4 -0
  309. package/dist/components/label/index.js.map +1 -0
  310. package/dist/components/locale-segment-group/index.d.ts +15 -0
  311. package/dist/components/locale-segment-group/index.js +4 -0
  312. package/dist/components/locale-segment-group/index.js.map +1 -0
  313. package/dist/components/menubar/index.d.ts +23 -0
  314. package/dist/components/menubar/index.js +5 -0
  315. package/dist/components/menubar/index.js.map +1 -0
  316. package/dist/components/native-select/index.d.ts +89 -0
  317. package/dist/components/native-select/index.js +3 -0
  318. package/dist/components/native-select/index.js.map +1 -0
  319. package/dist/components/navigation-menu/index.d.ts +15 -0
  320. package/dist/components/navigation-menu/index.js +5 -0
  321. package/dist/components/navigation-menu/index.js.map +1 -0
  322. package/dist/components/pagination/index.d.ts +44 -0
  323. package/dist/components/pagination/index.js +5 -0
  324. package/dist/components/pagination/index.js.map +1 -0
  325. package/dist/components/popover/index.d.ts +76 -0
  326. package/dist/components/popover/index.js +5 -0
  327. package/dist/components/popover/index.js.map +1 -0
  328. package/dist/components/progress/index.d.ts +6 -0
  329. package/dist/components/progress/index.js +4 -0
  330. package/dist/components/progress/index.js.map +1 -0
  331. package/dist/components/prose/index.d.ts +8 -0
  332. package/dist/components/prose/index.js +4 -0
  333. package/dist/components/prose/index.js.map +1 -0
  334. package/dist/components/radio-group/index.d.ts +11 -0
  335. package/dist/components/radio-group/index.js +5 -0
  336. package/dist/components/radio-group/index.js.map +1 -0
  337. package/dist/components/scroll-area/index.d.ts +11 -0
  338. package/dist/components/scroll-area/index.js +4 -0
  339. package/dist/components/scroll-area/index.js.map +1 -0
  340. package/dist/components/select/index.d.ts +17 -0
  341. package/dist/components/select/index.js +5 -0
  342. package/dist/components/select/index.js.map +1 -0
  343. package/dist/components/selectable-card/index.d.ts +11 -0
  344. package/dist/components/selectable-card/index.js +5 -0
  345. package/dist/components/selectable-card/index.js.map +1 -0
  346. package/dist/components/separator/index.d.ts +24 -0
  347. package/dist/components/separator/index.js +4 -0
  348. package/dist/components/separator/index.js.map +1 -0
  349. package/dist/components/sheet/index.d.ts +20 -0
  350. package/dist/components/sheet/index.js +8 -0
  351. package/dist/components/sheet/index.js.map +1 -0
  352. package/dist/components/sidebar/index.d.ts +16 -0
  353. package/dist/components/sidebar/index.js +3 -0
  354. package/dist/components/sidebar/index.js.map +1 -0
  355. package/dist/components/skeleton/index.d.ts +52 -0
  356. package/dist/components/skeleton/index.js +3 -0
  357. package/dist/components/skeleton/index.js.map +1 -0
  358. package/dist/components/slider/index.d.ts +7 -0
  359. package/dist/components/slider/index.js +4 -0
  360. package/dist/components/slider/index.js.map +1 -0
  361. package/dist/components/sonner/index.d.ts +7 -0
  362. package/dist/components/sonner/index.js +3 -0
  363. package/dist/components/sonner/index.js.map +1 -0
  364. package/dist/components/spinner/index.d.ts +10 -0
  365. package/dist/components/spinner/index.js +4 -0
  366. package/dist/components/spinner/index.js.map +1 -0
  367. package/dist/components/switch/index.d.ts +7 -0
  368. package/dist/components/switch/index.js +4 -0
  369. package/dist/components/switch/index.js.map +1 -0
  370. package/dist/components/table/index.d.ts +45 -0
  371. package/dist/components/table/index.js +5 -0
  372. package/dist/components/table/index.js.map +1 -0
  373. package/dist/components/tabs/index.d.ts +13 -0
  374. package/dist/components/tabs/index.js +4 -0
  375. package/dist/components/tabs/index.js.map +1 -0
  376. package/dist/components/textarea/index.d.ts +27 -0
  377. package/dist/components/textarea/index.js +4 -0
  378. package/dist/components/textarea/index.js.map +1 -0
  379. package/dist/components/theme-toggle/index.d.ts +6 -0
  380. package/dist/components/theme-toggle/index.js +6 -0
  381. package/dist/components/theme-toggle/index.js.map +1 -0
  382. package/dist/components/toast/index.d.ts +27 -0
  383. package/dist/components/toast/index.js +3 -0
  384. package/dist/components/toast/index.js.map +1 -0
  385. package/dist/components/toggle/index.d.ts +7 -0
  386. package/dist/components/toggle/index.js +4 -0
  387. package/dist/components/toggle/index.js.map +1 -0
  388. package/dist/components/toggle-group/index.d.ts +11 -0
  389. package/dist/components/toggle-group/index.js +4 -0
  390. package/dist/components/toggle-group/index.js.map +1 -0
  391. package/dist/components/tooltip/index.d.ts +12 -0
  392. package/dist/components/tooltip/index.js +3 -0
  393. package/dist/components/tooltip/index.js.map +1 -0
  394. package/dist/components/typography/index.d.ts +8 -0
  395. package/dist/components/typography/index.js +4 -0
  396. package/dist/components/typography/index.js.map +1 -0
  397. package/dist/components/video/index.d.ts +8 -0
  398. package/dist/components/video/index.js +4 -0
  399. package/dist/components/video/index.js.map +1 -0
  400. package/dist/index.d.ts +82 -0
  401. package/dist/index.js +83 -0
  402. package/dist/index.js.map +1 -0
  403. package/dist/lib/interactive/index.d.ts +34 -0
  404. package/dist/lib/interactive/index.js +3 -0
  405. package/dist/lib/interactive/index.js.map +1 -0
  406. package/dist/lib/signals/index.d.ts +15 -0
  407. package/dist/lib/signals/index.js +3 -0
  408. package/dist/lib/signals/index.js.map +1 -0
  409. package/dist/lib/utils.d.ts +5 -0
  410. package/dist/lib/utils.js +3 -0
  411. package/dist/lib/utils.js.map +1 -0
  412. package/dist/navigationMenuTriggerStyle-MrMOOgmr.d.ts +48 -0
  413. package/dist/sonner-store-Dfdxy8ba.d.ts +11 -0
  414. package/dist/theme.css +81 -0
  415. package/package.json +360 -0
@@ -0,0 +1,586 @@
1
+ import { Button } from './chunk-UGQ756Z6.js';
2
+ import { cn } from './chunk-OMXWBB67.js';
3
+ import { useMemo, useState } from 'preact/hooks';
4
+ import { jsxs, jsx } from 'preact/jsx-runtime';
5
+
6
+ var atNoon = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0);
7
+ var isSameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
8
+ var isBetweenInclusive = (d, a, b) => {
9
+ const t = atNoon(d).getTime();
10
+ return t >= atNoon(a).getTime() && t <= atNoon(b).getTime();
11
+ };
12
+ var startOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1);
13
+ var addMonths = (d, delta) => new Date(d.getFullYear(), d.getMonth() + delta, 1);
14
+ var isoWeekNumber = (d) => {
15
+ const copy = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0);
16
+ const day = (copy.getDay() + 6) % 7;
17
+ copy.setDate(copy.getDate() - day + 3);
18
+ const week1 = new Date(copy.getFullYear(), 0, 4);
19
+ const w1d = (week1.getDay() + 6) % 7;
20
+ week1.setDate(week1.getDate() - w1d + 3);
21
+ return 1 + Math.round((copy.getTime() - week1.getTime()) / 6048e5);
22
+ };
23
+ var formatWeekIndex = (n) => String(n).padStart(2, "0");
24
+ var buildCalendarRows = (year, month, showOutsideDays, fixedWeeks) => {
25
+ const first = new Date(year, month, 1);
26
+ const daysInMonth = new Date(year, month + 1, 0).getDate();
27
+ const startPad = first.getDay();
28
+ const flat = [];
29
+ for (let i = 0; i < startPad; i += 1) {
30
+ if (showOutsideDays) {
31
+ const prevMonth = month === 0 ? 11 : month - 1;
32
+ const prevYear = month === 0 ? year - 1 : year;
33
+ const prevDays = new Date(prevYear, prevMonth + 1, 0).getDate();
34
+ const day = prevDays - startPad + i + 1;
35
+ flat.push({ date: new Date(prevYear, prevMonth, day), outside: true });
36
+ } else {
37
+ flat.push(null);
38
+ }
39
+ }
40
+ for (let d = 1; d <= daysInMonth; d += 1) {
41
+ flat.push({ date: new Date(year, month, d), outside: false });
42
+ }
43
+ const rem = flat.length % 7;
44
+ if (rem !== 0) {
45
+ const need = 7 - rem;
46
+ for (let i = 0; i < need; i += 1) {
47
+ if (showOutsideDays) {
48
+ flat.push({ date: new Date(year, month + 1, i + 1), outside: true });
49
+ } else {
50
+ flat.push(null);
51
+ }
52
+ }
53
+ }
54
+ if (fixedWeeks) {
55
+ while (flat.length < 42) {
56
+ if (showOutsideDays) {
57
+ const lastCell = flat[flat.length - 1];
58
+ if (lastCell) {
59
+ const next = new Date(lastCell.date);
60
+ next.setDate(next.getDate() + 1);
61
+ flat.push({ date: next, outside: true });
62
+ } else {
63
+ flat.push(null);
64
+ }
65
+ } else {
66
+ flat.push(null);
67
+ }
68
+ }
69
+ }
70
+ const rows = [];
71
+ for (let i = 0; i < flat.length; i += 7) {
72
+ rows.push(flat.slice(i, i + 7));
73
+ }
74
+ return rows;
75
+ };
76
+ var ChevronLeft = ({ class: className }) => /* @__PURE__ */ jsx(
77
+ "svg",
78
+ {
79
+ class: cn("size-4 shrink-0", className),
80
+ viewBox: "0 0 24 24",
81
+ fill: "none",
82
+ stroke: "currentColor",
83
+ "stroke-width": "2",
84
+ "aria-hidden": "true",
85
+ children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" })
86
+ }
87
+ );
88
+ var ChevronRight = ({ class: className }) => /* @__PURE__ */ jsx(
89
+ "svg",
90
+ {
91
+ class: cn("size-4 shrink-0", className),
92
+ viewBox: "0 0 24 24",
93
+ fill: "none",
94
+ stroke: "currentColor",
95
+ "stroke-width": "2",
96
+ "aria-hidden": "true",
97
+ children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
98
+ }
99
+ );
100
+ var intlOpts = (locale, timeZone) => timeZone ? { locale, timeZone } : locale ? { locale } : void 0;
101
+ var MonthCaption = ({
102
+ displayMonth,
103
+ captionLayout,
104
+ dir,
105
+ locale,
106
+ timeZone,
107
+ captionTitleClass,
108
+ size,
109
+ onPrev,
110
+ onNext,
111
+ onPickMonthYear
112
+ }) => {
113
+ const sm = size === "sm";
114
+ const y = displayMonth.getFullYear();
115
+ const m = displayMonth.getMonth();
116
+ const yearStart = y - 100;
117
+ const yearEnd = y + 20;
118
+ const years = useMemo(() => {
119
+ const list = [];
120
+ for (let yy = yearStart; yy <= yearEnd; yy += 1) list.push(yy);
121
+ return list;
122
+ }, [yearStart, yearEnd]);
123
+ const fmt = intlOpts(locale, timeZone);
124
+ if (captionLayout === "dropdown") {
125
+ const selectBaseClass = sm ? "border-input bg-background text-foreground focus-visible:ring-ring/50 box-border h-7 min-h-7 shrink-0 rounded-md border px-2 pe-7 text-xs leading-4 shadow-xs outline-none focus-visible:ring-2" : "border-input bg-background text-foreground focus-visible:ring-ring/50 box-border h-8 min-h-8 shrink-0 rounded-md border px-2.5 pe-8 text-xs leading-4 shadow-xs outline-none focus-visible:ring-2";
126
+ const monthSelectClass = cn(selectBaseClass, sm ? "min-w-[5rem] max-w-full" : "min-w-[5.25rem] max-w-full");
127
+ const yearSelectClass = cn(selectBaseClass, sm ? "min-w-[3.75rem] max-w-full" : "min-w-[4.25rem] max-w-full");
128
+ return /* @__PURE__ */ jsxs("div", { class: cn("flex w-full items-center justify-between", sm ? "mb-1 gap-0.5" : "mb-1.5 gap-1"), dir, children: [
129
+ /* @__PURE__ */ jsx(
130
+ Button,
131
+ {
132
+ type: "button",
133
+ variant: "ghost",
134
+ size: sm ? "icon-xs" : "icon-sm",
135
+ "aria-label": "Previous month",
136
+ onClick: onPrev,
137
+ children: /* @__PURE__ */ jsx(ChevronLeft, { class: dir === "rtl" ? "rotate-180" : void 0 })
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsxs(
141
+ "div",
142
+ {
143
+ class: cn(
144
+ "text-foreground flex min-w-0 flex-1 items-center justify-center font-medium",
145
+ sm ? "gap-1 text-xs" : "gap-1.5 text-xs",
146
+ captionTitleClass
147
+ ),
148
+ children: [
149
+ /* @__PURE__ */ jsx(
150
+ "select",
151
+ {
152
+ class: monthSelectClass,
153
+ value: String(m),
154
+ "aria-label": "Month",
155
+ onChange: (e) => {
156
+ const nextM = Number(e.target.value);
157
+ onPickMonthYear(y, nextM);
158
+ },
159
+ children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsx("option", { value: String(i), children: new Date(y, i, 1).toLocaleString(fmt?.locale ?? void 0, {
160
+ month: "short",
161
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
162
+ }) }, i))
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx(
166
+ "select",
167
+ {
168
+ class: yearSelectClass,
169
+ value: String(y),
170
+ "aria-label": "Year",
171
+ onChange: (e) => {
172
+ const nextY = Number(e.target.value);
173
+ onPickMonthYear(nextY, m);
174
+ },
175
+ children: years.map((yy) => /* @__PURE__ */ jsx("option", { value: String(yy), children: yy }, yy))
176
+ }
177
+ )
178
+ ]
179
+ }
180
+ ),
181
+ /* @__PURE__ */ jsx(
182
+ Button,
183
+ {
184
+ type: "button",
185
+ variant: "ghost",
186
+ size: sm ? "icon-xs" : "icon-sm",
187
+ "aria-label": "Next month",
188
+ onClick: onNext,
189
+ children: /* @__PURE__ */ jsx(ChevronRight, { class: dir === "rtl" ? "rotate-180" : void 0 })
190
+ }
191
+ )
192
+ ] });
193
+ }
194
+ return /* @__PURE__ */ jsxs("div", { class: cn("flex items-center justify-between", sm ? "mb-1 gap-1" : "mb-1.5 gap-1.5"), dir, children: [
195
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: sm ? "icon-xs" : "icon-sm", "aria-label": "Previous month", onClick: onPrev, children: /* @__PURE__ */ jsx(ChevronLeft, { class: dir === "rtl" ? "rotate-180" : void 0 }) }),
196
+ /* @__PURE__ */ jsx("div", { class: cn(sm ? "text-xs font-medium" : "text-sm font-medium", captionTitleClass), children: displayMonth.toLocaleString(fmt?.locale ?? void 0, {
197
+ month: "long",
198
+ year: "numeric",
199
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
200
+ }) }),
201
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: sm ? "icon-xs" : "icon-sm", "aria-label": "Next month", onClick: onNext, children: /* @__PURE__ */ jsx(ChevronRight, { class: dir === "rtl" ? "rotate-180" : void 0 }) })
202
+ ] });
203
+ };
204
+ var DualMonthCaption = ({
205
+ firstMonth,
206
+ secondMonth,
207
+ dir,
208
+ locale,
209
+ timeZone,
210
+ captionTitleClass,
211
+ size,
212
+ onPrev,
213
+ onNext
214
+ }) => {
215
+ const fmt = intlOpts(locale, timeZone);
216
+ const sm = size === "sm";
217
+ return /* @__PURE__ */ jsxs("div", { class: cn("flex items-center justify-between", sm ? "mb-1 gap-1" : "mb-1.5 gap-1.5"), dir, children: [
218
+ /* @__PURE__ */ jsx(
219
+ Button,
220
+ {
221
+ type: "button",
222
+ variant: "ghost",
223
+ size: sm ? "icon-xs" : "icon-sm",
224
+ class: "shrink-0",
225
+ "aria-label": "Previous month",
226
+ onClick: onPrev,
227
+ children: /* @__PURE__ */ jsx(ChevronLeft, { class: dir === "rtl" ? "rotate-180" : void 0 })
228
+ }
229
+ ),
230
+ /* @__PURE__ */ jsxs(
231
+ "div",
232
+ {
233
+ class: cn(
234
+ "flex min-w-0 flex-1 justify-center text-center font-medium",
235
+ sm ? "gap-2 text-xs sm:gap-4" : "gap-4 text-sm sm:gap-6"
236
+ ),
237
+ children: [
238
+ /* @__PURE__ */ jsx("span", { class: cn("truncate", captionTitleClass), children: firstMonth.toLocaleString(fmt?.locale ?? void 0, {
239
+ month: "long",
240
+ year: "numeric",
241
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
242
+ }) }),
243
+ /* @__PURE__ */ jsx("span", { class: cn("truncate", captionTitleClass), children: secondMonth.toLocaleString(fmt?.locale ?? void 0, {
244
+ month: "long",
245
+ year: "numeric",
246
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
247
+ }) })
248
+ ]
249
+ }
250
+ ),
251
+ /* @__PURE__ */ jsx(
252
+ Button,
253
+ {
254
+ type: "button",
255
+ variant: "ghost",
256
+ size: sm ? "icon-xs" : "icon-sm",
257
+ class: "shrink-0",
258
+ "aria-label": "Next month",
259
+ onClick: onNext,
260
+ children: /* @__PURE__ */ jsx(ChevronRight, { class: dir === "rtl" ? "rotate-180" : void 0 })
261
+ }
262
+ )
263
+ ] });
264
+ };
265
+ var MonthGrid = ({
266
+ year,
267
+ month,
268
+ mode,
269
+ singleSelected,
270
+ range,
271
+ locale,
272
+ weekdayLabels: weekdayLabelsProp,
273
+ showWeekdayLeadBorder,
274
+ showOutsideDays,
275
+ fixedWeeks,
276
+ showWeekNumber,
277
+ isDisabled,
278
+ modifierClassesFor,
279
+ dayAddon,
280
+ hasDayAddon,
281
+ size,
282
+ onDayClick
283
+ }) => {
284
+ const sm = size === "sm";
285
+ const gridGap = sm ? "gap-0.5" : "gap-1";
286
+ const rows = useMemo(
287
+ () => buildCalendarRows(year, month, showOutsideDays, fixedWeeks),
288
+ [year, month, showOutsideDays, fixedWeeks]
289
+ );
290
+ const today = useMemo(() => atNoon(/* @__PURE__ */ new Date()), []);
291
+ const weekdayLabels = useMemo(() => {
292
+ if (weekdayLabelsProp?.length === 7) return weekdayLabelsProp;
293
+ return Array.from(
294
+ { length: 7 },
295
+ (_, i) => new Date(2024, 0, 7 + i).toLocaleDateString(locale, { weekday: "short" })
296
+ );
297
+ }, [locale, weekdayLabelsProp]);
298
+ const dayClass = (d, outside) => {
299
+ let cls = cn(
300
+ "inline-flex size-[length:var(--cell-size,2rem)] min-h-[length:var(--cell-size,2rem)] min-w-[length:var(--cell-size,2rem)] items-center justify-center rounded-md leading-none font-normal transition-colors focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 dark:hover:text-accent-foreground",
301
+ sm ? "text-xs" : "text-sm",
302
+ hasDayAddon && "flex-col gap-0.5"
303
+ );
304
+ if (outside) {
305
+ cls += " text-muted-foreground";
306
+ }
307
+ const isToday = isSameDay(d, today);
308
+ const singleSel = mode === "single" && singleSelected && isSameDay(d, singleSelected);
309
+ const from = range?.from;
310
+ const to = range?.to;
311
+ const rangeFromOnly = mode === "range" && from && !to && isSameDay(d, from);
312
+ const inFullRange = mode === "range" && from && to && isBetweenInclusive(d, from, to);
313
+ if (singleSel || rangeFromOnly) {
314
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90";
315
+ } else if (inFullRange && from && to) {
316
+ if (isSameDay(from, to)) {
317
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90 rounded-md";
318
+ } else if (isSameDay(d, from)) {
319
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90 rounded-s-md rounded-e-none";
320
+ } else if (isSameDay(d, to)) {
321
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90 rounded-e-md rounded-s-none";
322
+ } else {
323
+ cls += " bg-accent text-accent-foreground hover:bg-accent/80 rounded-none";
324
+ }
325
+ } else if (isToday) {
326
+ cls += " bg-accent text-accent-foreground";
327
+ } else {
328
+ cls += " hover:bg-accent hover:text-accent-foreground";
329
+ }
330
+ return cls;
331
+ };
332
+ return /* @__PURE__ */ jsxs("div", { class: "min-w-0 flex-1", children: [
333
+ /* @__PURE__ */ jsxs(
334
+ "div",
335
+ {
336
+ class: cn(
337
+ "grid text-center text-muted-foreground",
338
+ gridGap,
339
+ sm ? "text-[0.65rem] leading-none" : "text-xs",
340
+ showWeekNumber ? "grid-cols-8" : "grid-cols-7"
341
+ ),
342
+ children: [
343
+ showWeekNumber ? /* @__PURE__ */ jsx("div", { class: "flex size-[length:var(--cell-size,2rem)] items-center justify-center font-normal" }) : null,
344
+ weekdayLabels.map((day, wi) => /* @__PURE__ */ jsx(
345
+ "div",
346
+ {
347
+ class: cn(
348
+ "flex size-[length:var(--cell-size,2rem)] items-center justify-center font-normal",
349
+ showWeekdayLeadBorder && wi === 0 && "relative ms-0.5 border-s border-border ps-2"
350
+ ),
351
+ children: day
352
+ },
353
+ `w-${wi}`
354
+ ))
355
+ ]
356
+ }
357
+ ),
358
+ /* @__PURE__ */ jsx("div", { class: cn("flex flex-col", gridGap, sm ? "mt-1" : "mt-1.5"), children: rows.map((row, ri) => /* @__PURE__ */ jsxs(
359
+ "div",
360
+ {
361
+ class: cn("grid", gridGap, showWeekNumber ? "grid-cols-8" : "grid-cols-7"),
362
+ children: [
363
+ showWeekNumber ? /* @__PURE__ */ jsx(
364
+ "div",
365
+ {
366
+ class: "text-muted-foreground flex size-[length:var(--cell-size,2rem)] items-center justify-center text-[0.8rem] select-none",
367
+ "aria-hidden": "true",
368
+ children: (() => {
369
+ const first = row.find((c) => c !== null);
370
+ return first ? formatWeekIndex(isoWeekNumber(first.date)) : "";
371
+ })()
372
+ }
373
+ ) : null,
374
+ row.map(
375
+ (cell, ci) => cell ? /* @__PURE__ */ jsxs(
376
+ "button",
377
+ {
378
+ type: "button",
379
+ "data-slot": "calendar-day",
380
+ "data-outside": cell.outside ? "true" : void 0,
381
+ "data-today": isSameDay(cell.date, today) ? "true" : void 0,
382
+ disabled: isDisabled(cell.date),
383
+ class: cn(dayClass(cell.date, cell.outside), modifierClassesFor(cell.date)),
384
+ onClick: () => onDayClick(cell.date, cell.outside),
385
+ children: [
386
+ /* @__PURE__ */ jsx("span", { children: cell.date.getDate() }),
387
+ (() => {
388
+ if (!dayAddon) return null;
389
+ const extra = dayAddon(cell.date, cell.outside);
390
+ if (extra == null || extra === false) return null;
391
+ return /* @__PURE__ */ jsx("span", { class: "text-muted-foreground text-xs leading-none opacity-70", children: extra });
392
+ })()
393
+ ]
394
+ },
395
+ `${cell.date.getTime()}-${ci}`
396
+ ) : /* @__PURE__ */ jsx("div", { class: "size-[length:var(--cell-size,2rem)]", "aria-hidden": "true" }, `empty-${ri}-${ci}`)
397
+ )
398
+ ]
399
+ },
400
+ ri
401
+ )) })
402
+ ] });
403
+ };
404
+ var Calendar = ({
405
+ class: className,
406
+ mode = "single",
407
+ selected,
408
+ onSelect,
409
+ value,
410
+ onValueChange,
411
+ defaultMonth,
412
+ month: monthProp,
413
+ onMonthChange,
414
+ numberOfMonths = 1,
415
+ captionLayout = "buttons",
416
+ dir = "ltr",
417
+ showOutsideDays = true,
418
+ fixedWeeks = false,
419
+ disabled,
420
+ showWeekNumber = false,
421
+ modifiers,
422
+ modifiersClassNames,
423
+ locale,
424
+ timeZone,
425
+ dayAddon,
426
+ captionTitleClass,
427
+ weekdayLabels,
428
+ showWeekdayLeadBorder,
429
+ size = "default",
430
+ ...rest
431
+ }) => {
432
+ const calSize = size;
433
+ const singleSelected = mode === "single" ? selected ?? value : void 0;
434
+ const rangeSelected = mode === "range" ? selected : void 0;
435
+ const initialMonth = useMemo(() => {
436
+ const fromSel = singleSelected ?? rangeSelected?.from;
437
+ return startOfMonth(defaultMonth ?? fromSel ?? /* @__PURE__ */ new Date());
438
+ }, []);
439
+ const [innerMonth, setInnerMonth] = useState(initialMonth);
440
+ const displayMonth = monthProp !== void 0 ? startOfMonth(monthProp) : innerMonth;
441
+ const setMonth = (next) => {
442
+ const s = startOfMonth(next);
443
+ onMonthChange?.(s);
444
+ if (monthProp === void 0) {
445
+ setInnerMonth(s);
446
+ }
447
+ };
448
+ const shiftMonth = (delta) => {
449
+ setMonth(addMonths(displayMonth, delta));
450
+ };
451
+ const isDisabled = (d) => {
452
+ if (!disabled) return false;
453
+ if (Array.isArray(disabled)) {
454
+ return disabled.some((x) => isSameDay(atNoon(x), atNoon(d)));
455
+ }
456
+ return disabled(d);
457
+ };
458
+ const modifierClassesFor = (d) => {
459
+ if (!modifiers || !modifiersClassNames) return "";
460
+ const parts = [];
461
+ for (const [name, dates] of Object.entries(modifiers)) {
462
+ if (!dates?.length) continue;
463
+ if (dates.some((x) => isSameDay(atNoon(x), atNoon(d)))) {
464
+ const cnVal = modifiersClassNames[name];
465
+ if (cnVal) parts.push(cnVal);
466
+ }
467
+ }
468
+ return parts.join(" ");
469
+ };
470
+ const handleDayClick = (d, outside) => {
471
+ if (outside) {
472
+ setMonth(startOfMonth(d));
473
+ }
474
+ if (mode === "single") {
475
+ onSelect?.(d);
476
+ onValueChange?.(d);
477
+ return;
478
+ }
479
+ const cur = rangeSelected;
480
+ if (!cur?.from || cur.from && cur.to) {
481
+ onSelect?.({ from: d, to: void 0 });
482
+ } else {
483
+ let from = cur.from;
484
+ let to = d;
485
+ if (atNoon(to) < atNoon(from)) {
486
+ const tmp = from;
487
+ from = to;
488
+ to = tmp;
489
+ }
490
+ onSelect?.({ from, to });
491
+ }
492
+ };
493
+ const monthsToRender = numberOfMonths === 2 ? [0, 1] : [0];
494
+ const effectiveCaption = numberOfMonths === 2 ? "buttons" : captionLayout;
495
+ const secondVisible = addMonths(displayMonth, 1);
496
+ return /* @__PURE__ */ jsxs(
497
+ "div",
498
+ {
499
+ "data-slot": "calendar",
500
+ "data-calendar-size": calSize,
501
+ dir,
502
+ class: cn(
503
+ "bg-background group/calendar relative w-fit rounded-md border [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
504
+ calSize === "sm" ? "min-w-[15rem] p-2 [--cell-size:1.5625rem]" : "min-w-[16.75rem] p-2.5 [--cell-size:1.75rem]",
505
+ numberOfMonths === 2 && "max-w-full",
506
+ className
507
+ ),
508
+ ...rest,
509
+ children: [
510
+ numberOfMonths === 2 ? /* @__PURE__ */ jsx(
511
+ DualMonthCaption,
512
+ {
513
+ firstMonth: displayMonth,
514
+ secondMonth: secondVisible,
515
+ dir,
516
+ locale,
517
+ timeZone,
518
+ captionTitleClass,
519
+ size: calSize,
520
+ onPrev: () => shiftMonth(-1),
521
+ onNext: () => shiftMonth(1)
522
+ }
523
+ ) : /* @__PURE__ */ jsx(
524
+ MonthCaption,
525
+ {
526
+ displayMonth,
527
+ captionLayout: effectiveCaption,
528
+ dir,
529
+ locale,
530
+ timeZone,
531
+ captionTitleClass,
532
+ size: calSize,
533
+ onPrev: () => shiftMonth(-1),
534
+ onNext: () => shiftMonth(1),
535
+ onPickMonthYear: (yy, monthIndex) => {
536
+ setMonth(new Date(yy, monthIndex, 1));
537
+ }
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsx(
541
+ "div",
542
+ {
543
+ class: cn(
544
+ "relative flex flex-col",
545
+ calSize === "sm" ? "gap-2.5" : "gap-3",
546
+ numberOfMonths === 2 && "md:flex-row md:items-start md:justify-between",
547
+ numberOfMonths === 2 && (calSize === "sm" ? "md:gap-4" : "md:gap-6")
548
+ ),
549
+ children: monthsToRender.map((offset) => {
550
+ const ym = addMonths(displayMonth, offset);
551
+ const y = ym.getFullYear();
552
+ const m = ym.getMonth();
553
+ return /* @__PURE__ */ jsx(
554
+ MonthGrid,
555
+ {
556
+ year: y,
557
+ month: m,
558
+ mode,
559
+ singleSelected,
560
+ range: rangeSelected,
561
+ locale,
562
+ weekdayLabels,
563
+ showWeekdayLeadBorder,
564
+ showOutsideDays,
565
+ fixedWeeks,
566
+ showWeekNumber,
567
+ isDisabled,
568
+ modifierClassesFor,
569
+ dayAddon,
570
+ hasDayAddon: Boolean(dayAddon),
571
+ size: calSize,
572
+ onDayClick: handleDayClick
573
+ },
574
+ `${y}-${m}`
575
+ );
576
+ })
577
+ }
578
+ )
579
+ ]
580
+ }
581
+ );
582
+ };
583
+
584
+ export { Calendar };
585
+ //# sourceMappingURL=chunk-3GKUUTSA.js.map
586
+ //# sourceMappingURL=chunk-3GKUUTSA.js.map