@kamod-ch/ui 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +183 -0
  3. package/dist/Accordion-D1PiNspd.d.ts +39 -0
  4. package/dist/AlertDialog-ALB541qy.d.ts +64 -0
  5. package/dist/Button-vQnkiVTI.d.ts +84 -0
  6. package/dist/CalendarDateTimePanel-B3J8OlSc.d.ts +79 -0
  7. package/dist/Carousel-BUB4DVuh.d.ts +48 -0
  8. package/dist/Chart-Ax22S5_N.d.ts +10 -0
  9. package/dist/Checkbox-DBbLYq6Q.d.ts +12 -0
  10. package/dist/Collapsible-CW1hQwqV.d.ts +34 -0
  11. package/dist/ComboboxValue-BGfXgtZt.d.ts +135 -0
  12. package/dist/CommandSeparator-wZRCsqsT.d.ts +47 -0
  13. package/dist/DataTable-zNTTdYVU.d.ts +13 -0
  14. package/dist/DatePicker-AFAYh5Ca.d.ts +20 -0
  15. package/dist/Dialog-BOIteLfe.d.ts +28 -0
  16. package/dist/DialogContent-CK1t4m4e.d.ts +24 -0
  17. package/dist/DialogHeader-CYT7iUDq.d.ts +13 -0
  18. package/dist/DialogTitle-CerJD0oA.d.ts +13 -0
  19. package/dist/Direction-25ZOt0gW.d.ts +24 -0
  20. package/dist/Drawer-B3pZMn5j.d.ts +41 -0
  21. package/dist/Dropdown-CVbWVKok.d.ts +143 -0
  22. package/dist/FieldTitle-aSgThW-B.d.ts +100 -0
  23. package/dist/HoverCard-aVEEtkyO.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-CH_Kx2mn.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-s0xRF22F.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-CR-thcs6.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-Ba3GxE7u.d.ts +40 -0
  42. package/dist/Typography-ccTtE182.d.ts +64 -0
  43. package/dist/chunk-26CRIZXP.js +244 -0
  44. package/dist/chunk-26CRIZXP.js.map +1 -0
  45. package/dist/chunk-2BQ54337.js +282 -0
  46. package/dist/chunk-2BQ54337.js.map +1 -0
  47. package/dist/chunk-2HZCH73K.js +109 -0
  48. package/dist/chunk-2HZCH73K.js.map +1 -0
  49. package/dist/chunk-2KY7P27I.js +64 -0
  50. package/dist/chunk-2KY7P27I.js.map +1 -0
  51. package/dist/chunk-3DNIMQX6.js +78 -0
  52. package/dist/chunk-3DNIMQX6.js.map +1 -0
  53. package/dist/chunk-3KB54OYF.js +81 -0
  54. package/dist/chunk-3KB54OYF.js.map +1 -0
  55. package/dist/chunk-4BJJOHZT.js +477 -0
  56. package/dist/chunk-4BJJOHZT.js.map +1 -0
  57. package/dist/chunk-4IBTERDG.js +9 -0
  58. package/dist/chunk-4IBTERDG.js.map +1 -0
  59. package/dist/chunk-4V3WHQJE.js +510 -0
  60. package/dist/chunk-4V3WHQJE.js.map +1 -0
  61. package/dist/chunk-5FBD2NTR.js +103 -0
  62. package/dist/chunk-5FBD2NTR.js.map +1 -0
  63. package/dist/chunk-5KS2VSX2.js +94 -0
  64. package/dist/chunk-5KS2VSX2.js.map +1 -0
  65. package/dist/chunk-5Q4RBIMZ.js +25 -0
  66. package/dist/chunk-5Q4RBIMZ.js.map +1 -0
  67. package/dist/chunk-67J4KBOW.js +124 -0
  68. package/dist/chunk-67J4KBOW.js.map +1 -0
  69. package/dist/chunk-6BK3PIRX.js +151 -0
  70. package/dist/chunk-6BK3PIRX.js.map +1 -0
  71. package/dist/chunk-6FYSVMH7.js +21 -0
  72. package/dist/chunk-6FYSVMH7.js.map +1 -0
  73. package/dist/chunk-6RASPU5N.js +31 -0
  74. package/dist/chunk-6RASPU5N.js.map +1 -0
  75. package/dist/chunk-7AJT2E2Y.js +624 -0
  76. package/dist/chunk-7AJT2E2Y.js.map +1 -0
  77. package/dist/chunk-7IOAIEIA.js +102 -0
  78. package/dist/chunk-7IOAIEIA.js.map +1 -0
  79. package/dist/chunk-7MITRFPE.js +192 -0
  80. package/dist/chunk-7MITRFPE.js.map +1 -0
  81. package/dist/chunk-BDK7CDEI.js +22 -0
  82. package/dist/chunk-BDK7CDEI.js.map +1 -0
  83. package/dist/chunk-BQP4UA44.js +18 -0
  84. package/dist/chunk-BQP4UA44.js.map +1 -0
  85. package/dist/chunk-BYG2ULS3.js +196 -0
  86. package/dist/chunk-BYG2ULS3.js.map +1 -0
  87. package/dist/chunk-C7WEQOUA.js +26 -0
  88. package/dist/chunk-C7WEQOUA.js.map +1 -0
  89. package/dist/chunk-CLEC2RMU.js +8 -0
  90. package/dist/chunk-CLEC2RMU.js.map +1 -0
  91. package/dist/chunk-CMBERB5B.js +9 -0
  92. package/dist/chunk-CMBERB5B.js.map +1 -0
  93. package/dist/chunk-COPT6I2D.js +122 -0
  94. package/dist/chunk-COPT6I2D.js.map +1 -0
  95. package/dist/chunk-CP55TVOV.js +271 -0
  96. package/dist/chunk-CP55TVOV.js.map +1 -0
  97. package/dist/chunk-D3DQ4ICC.js +25 -0
  98. package/dist/chunk-D3DQ4ICC.js.map +1 -0
  99. package/dist/chunk-ERBGZZ2U.js +26 -0
  100. package/dist/chunk-ERBGZZ2U.js.map +1 -0
  101. package/dist/chunk-FIOKWIJP.js +361 -0
  102. package/dist/chunk-FIOKWIJP.js.map +1 -0
  103. package/dist/chunk-G6TV6TF7.js +95 -0
  104. package/dist/chunk-G6TV6TF7.js.map +1 -0
  105. package/dist/chunk-GGTDJEE2.js +15 -0
  106. package/dist/chunk-GGTDJEE2.js.map +1 -0
  107. package/dist/chunk-GIU6BZTW.js +173 -0
  108. package/dist/chunk-GIU6BZTW.js.map +1 -0
  109. package/dist/chunk-HAAXVB3R.js +34 -0
  110. package/dist/chunk-HAAXVB3R.js.map +1 -0
  111. package/dist/chunk-HTSAUMF5.js +398 -0
  112. package/dist/chunk-HTSAUMF5.js.map +1 -0
  113. package/dist/chunk-IJ4ZRIR4.js +182 -0
  114. package/dist/chunk-IJ4ZRIR4.js.map +1 -0
  115. package/dist/chunk-J4DMQV64.js +340 -0
  116. package/dist/chunk-J4DMQV64.js.map +1 -0
  117. package/dist/chunk-JKXSX67K.js +95 -0
  118. package/dist/chunk-JKXSX67K.js.map +1 -0
  119. package/dist/chunk-JNF7FDJO.js +633 -0
  120. package/dist/chunk-JNF7FDJO.js.map +1 -0
  121. package/dist/chunk-JURNPBSW.js +70 -0
  122. package/dist/chunk-JURNPBSW.js.map +1 -0
  123. package/dist/chunk-LCMPFPBN.js +141 -0
  124. package/dist/chunk-LCMPFPBN.js.map +1 -0
  125. package/dist/chunk-LCWXIQKA.js +36 -0
  126. package/dist/chunk-LCWXIQKA.js.map +1 -0
  127. package/dist/chunk-LFJF3M6M.js +171 -0
  128. package/dist/chunk-LFJF3M6M.js.map +1 -0
  129. package/dist/chunk-MD6HHORY.js +524 -0
  130. package/dist/chunk-MD6HHORY.js.map +1 -0
  131. package/dist/chunk-MJG6UKD4.js +83 -0
  132. package/dist/chunk-MJG6UKD4.js.map +1 -0
  133. package/dist/chunk-MKG3UAP6.js +347 -0
  134. package/dist/chunk-MKG3UAP6.js.map +1 -0
  135. package/dist/chunk-MS2ZNYCJ.js +9 -0
  136. package/dist/chunk-MS2ZNYCJ.js.map +1 -0
  137. package/dist/chunk-NGKQBNZ5.js +29 -0
  138. package/dist/chunk-NGKQBNZ5.js.map +1 -0
  139. package/dist/chunk-NKKMM6CK.js +56 -0
  140. package/dist/chunk-NKKMM6CK.js.map +1 -0
  141. package/dist/chunk-OCLVMKVC.js +110 -0
  142. package/dist/chunk-OCLVMKVC.js.map +1 -0
  143. package/dist/chunk-PFV7YIEP.js +104 -0
  144. package/dist/chunk-PFV7YIEP.js.map +1 -0
  145. package/dist/chunk-PGOCR4LG.js +216 -0
  146. package/dist/chunk-PGOCR4LG.js.map +1 -0
  147. package/dist/chunk-PPYJQNE5.js +159 -0
  148. package/dist/chunk-PPYJQNE5.js.map +1 -0
  149. package/dist/chunk-PU5J5EPY.js +733 -0
  150. package/dist/chunk-PU5J5EPY.js.map +1 -0
  151. package/dist/chunk-PZS2D2QM.js +32 -0
  152. package/dist/chunk-PZS2D2QM.js.map +1 -0
  153. package/dist/chunk-Q5IUIA6B.js +9 -0
  154. package/dist/chunk-Q5IUIA6B.js.map +1 -0
  155. package/dist/chunk-QFDTG2ZJ.js +176 -0
  156. package/dist/chunk-QFDTG2ZJ.js.map +1 -0
  157. package/dist/chunk-QZX3RFIC.js +165 -0
  158. package/dist/chunk-QZX3RFIC.js.map +1 -0
  159. package/dist/chunk-R565SY7K.js +69 -0
  160. package/dist/chunk-R565SY7K.js.map +1 -0
  161. package/dist/chunk-RHNI5UQO.js +455 -0
  162. package/dist/chunk-RHNI5UQO.js.map +1 -0
  163. package/dist/chunk-ROKLAZHC.js +550 -0
  164. package/dist/chunk-ROKLAZHC.js.map +1 -0
  165. package/dist/chunk-RTIFG4XT.js +9 -0
  166. package/dist/chunk-RTIFG4XT.js.map +1 -0
  167. package/dist/chunk-TFLSEEM4.js +88 -0
  168. package/dist/chunk-TFLSEEM4.js.map +1 -0
  169. package/dist/chunk-U2UNWXBC.js +242 -0
  170. package/dist/chunk-U2UNWXBC.js.map +1 -0
  171. package/dist/chunk-UEGIKBX6.js +385 -0
  172. package/dist/chunk-UEGIKBX6.js.map +1 -0
  173. package/dist/chunk-UEXTD7ZB.js +108 -0
  174. package/dist/chunk-UEXTD7ZB.js.map +1 -0
  175. package/dist/chunk-UNWEH4Z6.js +83 -0
  176. package/dist/chunk-UNWEH4Z6.js.map +1 -0
  177. package/dist/chunk-UXWUFNXY.js +8 -0
  178. package/dist/chunk-UXWUFNXY.js.map +1 -0
  179. package/dist/chunk-V2MG5Y5F.js +77 -0
  180. package/dist/chunk-V2MG5Y5F.js.map +1 -0
  181. package/dist/chunk-V63YIVKJ.js +326 -0
  182. package/dist/chunk-V63YIVKJ.js.map +1 -0
  183. package/dist/chunk-WAPRVVDQ.js +9 -0
  184. package/dist/chunk-WAPRVVDQ.js.map +1 -0
  185. package/dist/chunk-X4HPHMYW.js +17 -0
  186. package/dist/chunk-X4HPHMYW.js.map +1 -0
  187. package/dist/chunk-XGFJJ2YB.js +36 -0
  188. package/dist/chunk-XGFJJ2YB.js.map +1 -0
  189. package/dist/chunk-YJGECAOZ.js +18 -0
  190. package/dist/chunk-YJGECAOZ.js.map +1 -0
  191. package/dist/chunk-YTHUHPE5.js +51 -0
  192. package/dist/chunk-YTHUHPE5.js.map +1 -0
  193. package/dist/chunk-YTJRKLUR.js +76 -0
  194. package/dist/chunk-YTJRKLUR.js.map +1 -0
  195. package/dist/chunk-YVALXJRN.js +49 -0
  196. package/dist/chunk-YVALXJRN.js.map +1 -0
  197. package/dist/chunk-YZLPO4B2.js +33 -0
  198. package/dist/chunk-YZLPO4B2.js.map +1 -0
  199. package/dist/chunk-ZHAGKFSO.js +16 -0
  200. package/dist/chunk-ZHAGKFSO.js.map +1 -0
  201. package/dist/chunk-ZM67EKZC.js +135 -0
  202. package/dist/chunk-ZM67EKZC.js.map +1 -0
  203. package/dist/chunk-ZVAW22GX.js +50 -0
  204. package/dist/chunk-ZVAW22GX.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 +15 -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 +59 -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 +5 -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 +44 -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-BWnESpon.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,633 @@
1
+ import { Button } from './chunk-5FBD2NTR.js';
2
+ import { cn } from './chunk-MS2ZNYCJ.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(
127
+ selectBaseClass,
128
+ sm ? "min-w-[5rem] max-w-full" : "min-w-[5.25rem] max-w-full"
129
+ );
130
+ const yearSelectClass = cn(
131
+ selectBaseClass,
132
+ sm ? "min-w-[3.75rem] max-w-full" : "min-w-[4.25rem] max-w-full"
133
+ );
134
+ return /* @__PURE__ */ jsxs(
135
+ "div",
136
+ {
137
+ class: cn("flex w-full items-center justify-between", sm ? "mb-1 gap-0.5" : "mb-1.5 gap-1"),
138
+ dir,
139
+ children: [
140
+ /* @__PURE__ */ jsx(
141
+ Button,
142
+ {
143
+ type: "button",
144
+ variant: "ghost",
145
+ size: sm ? "icon-xs" : "icon-sm",
146
+ "aria-label": "Previous month",
147
+ onClick: onPrev,
148
+ children: /* @__PURE__ */ jsx(ChevronLeft, { class: dir === "rtl" ? "rotate-180" : void 0 })
149
+ }
150
+ ),
151
+ /* @__PURE__ */ jsxs(
152
+ "div",
153
+ {
154
+ class: cn(
155
+ "text-foreground flex min-w-0 flex-1 items-center justify-center font-medium",
156
+ sm ? "gap-1 text-xs" : "gap-1.5 text-xs",
157
+ captionTitleClass
158
+ ),
159
+ children: [
160
+ /* @__PURE__ */ jsx(
161
+ "select",
162
+ {
163
+ class: monthSelectClass,
164
+ value: String(m),
165
+ "aria-label": "Month",
166
+ onChange: (e) => {
167
+ const nextM = Number(e.target.value);
168
+ onPickMonthYear(y, nextM);
169
+ },
170
+ children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsx("option", { value: String(i), children: new Date(y, i, 1).toLocaleString(fmt?.locale ?? void 0, {
171
+ month: "short",
172
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
173
+ }) }, i))
174
+ }
175
+ ),
176
+ /* @__PURE__ */ jsx(
177
+ "select",
178
+ {
179
+ class: yearSelectClass,
180
+ value: String(y),
181
+ "aria-label": "Year",
182
+ onChange: (e) => {
183
+ const nextY = Number(e.target.value);
184
+ onPickMonthYear(nextY, m);
185
+ },
186
+ children: years.map((yy) => /* @__PURE__ */ jsx("option", { value: String(yy), children: yy }, yy))
187
+ }
188
+ )
189
+ ]
190
+ }
191
+ ),
192
+ /* @__PURE__ */ jsx(
193
+ Button,
194
+ {
195
+ type: "button",
196
+ variant: "ghost",
197
+ size: sm ? "icon-xs" : "icon-sm",
198
+ "aria-label": "Next month",
199
+ onClick: onNext,
200
+ children: /* @__PURE__ */ jsx(ChevronRight, { class: dir === "rtl" ? "rotate-180" : void 0 })
201
+ }
202
+ )
203
+ ]
204
+ }
205
+ );
206
+ }
207
+ return /* @__PURE__ */ jsxs(
208
+ "div",
209
+ {
210
+ class: cn("flex items-center justify-between", sm ? "mb-1 gap-1" : "mb-1.5 gap-1.5"),
211
+ dir,
212
+ children: [
213
+ /* @__PURE__ */ jsx(
214
+ Button,
215
+ {
216
+ type: "button",
217
+ variant: "ghost",
218
+ size: sm ? "icon-xs" : "icon-sm",
219
+ "aria-label": "Previous month",
220
+ onClick: onPrev,
221
+ children: /* @__PURE__ */ jsx(ChevronLeft, { class: dir === "rtl" ? "rotate-180" : void 0 })
222
+ }
223
+ ),
224
+ /* @__PURE__ */ jsx("div", { class: cn(sm ? "text-xs font-medium" : "text-sm font-medium", captionTitleClass), children: displayMonth.toLocaleString(fmt?.locale ?? void 0, {
225
+ month: "long",
226
+ year: "numeric",
227
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
228
+ }) }),
229
+ /* @__PURE__ */ jsx(
230
+ Button,
231
+ {
232
+ type: "button",
233
+ variant: "ghost",
234
+ size: sm ? "icon-xs" : "icon-sm",
235
+ "aria-label": "Next month",
236
+ onClick: onNext,
237
+ children: /* @__PURE__ */ jsx(ChevronRight, { class: dir === "rtl" ? "rotate-180" : void 0 })
238
+ }
239
+ )
240
+ ]
241
+ }
242
+ );
243
+ };
244
+ var DualMonthCaption = ({
245
+ firstMonth,
246
+ secondMonth,
247
+ dir,
248
+ locale,
249
+ timeZone,
250
+ captionTitleClass,
251
+ size,
252
+ onPrev,
253
+ onNext
254
+ }) => {
255
+ const fmt = intlOpts(locale, timeZone);
256
+ const sm = size === "sm";
257
+ return /* @__PURE__ */ jsxs(
258
+ "div",
259
+ {
260
+ class: cn("flex items-center justify-between", sm ? "mb-1 gap-1" : "mb-1.5 gap-1.5"),
261
+ dir,
262
+ children: [
263
+ /* @__PURE__ */ jsx(
264
+ Button,
265
+ {
266
+ type: "button",
267
+ variant: "ghost",
268
+ size: sm ? "icon-xs" : "icon-sm",
269
+ class: "shrink-0",
270
+ "aria-label": "Previous month",
271
+ onClick: onPrev,
272
+ children: /* @__PURE__ */ jsx(ChevronLeft, { class: dir === "rtl" ? "rotate-180" : void 0 })
273
+ }
274
+ ),
275
+ /* @__PURE__ */ jsxs(
276
+ "div",
277
+ {
278
+ class: cn(
279
+ "flex min-w-0 flex-1 justify-center text-center font-medium",
280
+ sm ? "gap-2 text-xs sm:gap-4" : "gap-4 text-sm sm:gap-6"
281
+ ),
282
+ children: [
283
+ /* @__PURE__ */ jsx("span", { class: cn("truncate", captionTitleClass), children: firstMonth.toLocaleString(fmt?.locale ?? void 0, {
284
+ month: "long",
285
+ year: "numeric",
286
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
287
+ }) }),
288
+ /* @__PURE__ */ jsx("span", { class: cn("truncate", captionTitleClass), children: secondMonth.toLocaleString(fmt?.locale ?? void 0, {
289
+ month: "long",
290
+ year: "numeric",
291
+ ...fmt && "timeZone" in fmt && fmt.timeZone ? { timeZone: fmt.timeZone } : {}
292
+ }) })
293
+ ]
294
+ }
295
+ ),
296
+ /* @__PURE__ */ jsx(
297
+ Button,
298
+ {
299
+ type: "button",
300
+ variant: "ghost",
301
+ size: sm ? "icon-xs" : "icon-sm",
302
+ class: "shrink-0",
303
+ "aria-label": "Next month",
304
+ onClick: onNext,
305
+ children: /* @__PURE__ */ jsx(ChevronRight, { class: dir === "rtl" ? "rotate-180" : void 0 })
306
+ }
307
+ )
308
+ ]
309
+ }
310
+ );
311
+ };
312
+ var MonthGrid = ({
313
+ year,
314
+ month,
315
+ mode,
316
+ singleSelected,
317
+ range,
318
+ locale,
319
+ weekdayLabels: weekdayLabelsProp,
320
+ showWeekdayLeadBorder,
321
+ showOutsideDays,
322
+ fixedWeeks,
323
+ showWeekNumber,
324
+ isDisabled,
325
+ modifierClassesFor,
326
+ dayAddon,
327
+ hasDayAddon,
328
+ size,
329
+ onDayClick
330
+ }) => {
331
+ const sm = size === "sm";
332
+ const gridGap = sm ? "gap-0.5" : "gap-1";
333
+ const rows = useMemo(
334
+ () => buildCalendarRows(year, month, showOutsideDays, fixedWeeks),
335
+ [year, month, showOutsideDays, fixedWeeks]
336
+ );
337
+ const today = useMemo(() => atNoon(/* @__PURE__ */ new Date()), []);
338
+ const weekdayLabels = useMemo(() => {
339
+ if (weekdayLabelsProp?.length === 7) return weekdayLabelsProp;
340
+ return Array.from(
341
+ { length: 7 },
342
+ (_, i) => new Date(2024, 0, 7 + i).toLocaleDateString(locale, { weekday: "short" })
343
+ );
344
+ }, [locale, weekdayLabelsProp]);
345
+ const dayClass = (d, outside) => {
346
+ let cls = cn(
347
+ "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",
348
+ sm ? "text-xs" : "text-sm",
349
+ hasDayAddon && "flex-col gap-0.5"
350
+ );
351
+ if (outside) {
352
+ cls += " text-muted-foreground";
353
+ }
354
+ const isToday = isSameDay(d, today);
355
+ const singleSel = mode === "single" && singleSelected && isSameDay(d, singleSelected);
356
+ const from = range?.from;
357
+ const to = range?.to;
358
+ const rangeFromOnly = mode === "range" && from && !to && isSameDay(d, from);
359
+ const inFullRange = mode === "range" && from && to && isBetweenInclusive(d, from, to);
360
+ if (singleSel || rangeFromOnly) {
361
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90";
362
+ } else if (inFullRange && from && to) {
363
+ if (isSameDay(from, to)) {
364
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90 rounded-md";
365
+ } else if (isSameDay(d, from)) {
366
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90 rounded-s-md rounded-e-none";
367
+ } else if (isSameDay(d, to)) {
368
+ cls += " bg-primary text-primary-foreground hover:bg-primary/90 rounded-e-md rounded-s-none";
369
+ } else {
370
+ cls += " bg-accent text-accent-foreground hover:bg-accent/80 rounded-none";
371
+ }
372
+ } else if (isToday) {
373
+ cls += " bg-accent text-accent-foreground";
374
+ } else {
375
+ cls += " hover:bg-accent hover:text-accent-foreground";
376
+ }
377
+ return cls;
378
+ };
379
+ return /* @__PURE__ */ jsxs("div", { class: "min-w-0 flex-1", children: [
380
+ /* @__PURE__ */ jsxs(
381
+ "div",
382
+ {
383
+ class: cn(
384
+ "grid text-center text-muted-foreground",
385
+ gridGap,
386
+ sm ? "text-[0.65rem] leading-none" : "text-xs",
387
+ showWeekNumber ? "grid-cols-8" : "grid-cols-7"
388
+ ),
389
+ children: [
390
+ showWeekNumber ? /* @__PURE__ */ jsx("div", { class: "flex size-[length:var(--cell-size,2rem)] items-center justify-center font-normal" }) : null,
391
+ weekdayLabels.map((day, wi) => /* @__PURE__ */ jsx(
392
+ "div",
393
+ {
394
+ class: cn(
395
+ "flex size-[length:var(--cell-size,2rem)] items-center justify-center font-normal",
396
+ showWeekdayLeadBorder && wi === 0 && "relative ms-0.5 border-s border-border ps-2"
397
+ ),
398
+ children: day
399
+ },
400
+ `w-${wi}`
401
+ ))
402
+ ]
403
+ }
404
+ ),
405
+ /* @__PURE__ */ jsx("div", { class: cn("flex flex-col", gridGap, sm ? "mt-1" : "mt-1.5"), children: rows.map((row, ri) => /* @__PURE__ */ jsxs("div", { class: cn("grid", gridGap, showWeekNumber ? "grid-cols-8" : "grid-cols-7"), children: [
406
+ showWeekNumber ? /* @__PURE__ */ jsx(
407
+ "div",
408
+ {
409
+ class: "text-muted-foreground flex size-[length:var(--cell-size,2rem)] items-center justify-center text-[0.8rem] select-none",
410
+ "aria-hidden": "true",
411
+ children: (() => {
412
+ const first = row.find((c) => c !== null);
413
+ return first ? formatWeekIndex(isoWeekNumber(first.date)) : "";
414
+ })()
415
+ }
416
+ ) : null,
417
+ row.map(
418
+ (cell, ci) => cell ? /* @__PURE__ */ jsxs(
419
+ "button",
420
+ {
421
+ type: "button",
422
+ "data-slot": "calendar-day",
423
+ "data-outside": cell.outside ? "true" : void 0,
424
+ "data-today": isSameDay(cell.date, today) ? "true" : void 0,
425
+ disabled: isDisabled(cell.date),
426
+ class: cn(dayClass(cell.date, cell.outside), modifierClassesFor(cell.date)),
427
+ onClick: () => onDayClick(cell.date, cell.outside),
428
+ children: [
429
+ /* @__PURE__ */ jsx("span", { children: cell.date.getDate() }),
430
+ (() => {
431
+ if (!dayAddon) return null;
432
+ const extra = dayAddon(cell.date, cell.outside);
433
+ if (extra == null || extra === false) return null;
434
+ return /* @__PURE__ */ jsx("span", { class: "text-muted-foreground text-xs leading-none opacity-70", children: extra });
435
+ })()
436
+ ]
437
+ },
438
+ `${cell.date.getTime()}-${ci}`
439
+ ) : /* @__PURE__ */ jsx(
440
+ "div",
441
+ {
442
+ class: "size-[length:var(--cell-size,2rem)]",
443
+ "aria-hidden": "true"
444
+ },
445
+ `empty-${ri}-${ci}`
446
+ )
447
+ )
448
+ ] }, ri)) })
449
+ ] });
450
+ };
451
+ var Calendar = ({
452
+ class: className,
453
+ mode = "single",
454
+ selected,
455
+ onSelect,
456
+ value,
457
+ onValueChange,
458
+ defaultMonth,
459
+ month: monthProp,
460
+ onMonthChange,
461
+ numberOfMonths = 1,
462
+ captionLayout = "buttons",
463
+ dir = "ltr",
464
+ showOutsideDays = true,
465
+ fixedWeeks = false,
466
+ disabled,
467
+ showWeekNumber = false,
468
+ modifiers,
469
+ modifiersClassNames,
470
+ locale,
471
+ timeZone,
472
+ dayAddon,
473
+ captionTitleClass,
474
+ weekdayLabels,
475
+ showWeekdayLeadBorder,
476
+ size = "default",
477
+ ...rest
478
+ }) => {
479
+ const calSize = size;
480
+ const singleSelected = mode === "single" ? selected ?? value : void 0;
481
+ const rangeSelected = mode === "range" ? selected : void 0;
482
+ const initialMonth = useMemo(() => {
483
+ const fromSel = singleSelected ?? rangeSelected?.from;
484
+ return startOfMonth(defaultMonth ?? fromSel ?? /* @__PURE__ */ new Date());
485
+ }, []);
486
+ const [innerMonth, setInnerMonth] = useState(initialMonth);
487
+ const displayMonth = monthProp !== void 0 ? startOfMonth(monthProp) : innerMonth;
488
+ const setMonth = (next) => {
489
+ const s = startOfMonth(next);
490
+ onMonthChange?.(s);
491
+ if (monthProp === void 0) {
492
+ setInnerMonth(s);
493
+ }
494
+ };
495
+ const shiftMonth = (delta) => {
496
+ setMonth(addMonths(displayMonth, delta));
497
+ };
498
+ const isDisabled = (d) => {
499
+ if (!disabled) return false;
500
+ if (Array.isArray(disabled)) {
501
+ return disabled.some((x) => isSameDay(atNoon(x), atNoon(d)));
502
+ }
503
+ return disabled(d);
504
+ };
505
+ const modifierClassesFor = (d) => {
506
+ if (!modifiers || !modifiersClassNames) return "";
507
+ const parts = [];
508
+ for (const [name, dates] of Object.entries(modifiers)) {
509
+ if (!dates?.length) continue;
510
+ if (dates.some((x) => isSameDay(atNoon(x), atNoon(d)))) {
511
+ const cnVal = modifiersClassNames[name];
512
+ if (cnVal) parts.push(cnVal);
513
+ }
514
+ }
515
+ return parts.join(" ");
516
+ };
517
+ const handleDayClick = (d, outside) => {
518
+ if (outside) {
519
+ setMonth(startOfMonth(d));
520
+ }
521
+ if (mode === "single") {
522
+ onSelect?.(d);
523
+ onValueChange?.(d);
524
+ return;
525
+ }
526
+ const cur = rangeSelected;
527
+ if (!cur?.from || cur.from && cur.to) {
528
+ onSelect?.({ from: d, to: void 0 });
529
+ } else {
530
+ let from = cur.from;
531
+ let to = d;
532
+ if (atNoon(to) < atNoon(from)) {
533
+ const tmp = from;
534
+ from = to;
535
+ to = tmp;
536
+ }
537
+ onSelect?.({ from, to });
538
+ }
539
+ };
540
+ const monthsToRender = numberOfMonths === 2 ? [0, 1] : [0];
541
+ const effectiveCaption = numberOfMonths === 2 ? "buttons" : captionLayout;
542
+ const secondVisible = addMonths(displayMonth, 1);
543
+ return /* @__PURE__ */ jsxs(
544
+ "div",
545
+ {
546
+ "data-slot": "calendar",
547
+ "data-calendar-size": calSize,
548
+ dir,
549
+ class: cn(
550
+ "bg-background group/calendar relative w-fit rounded-md border [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
551
+ calSize === "sm" ? "min-w-[15rem] p-2 [--cell-size:1.5625rem]" : "min-w-[16.75rem] p-2.5 [--cell-size:1.75rem]",
552
+ numberOfMonths === 2 && "max-w-full",
553
+ className
554
+ ),
555
+ ...rest,
556
+ children: [
557
+ numberOfMonths === 2 ? /* @__PURE__ */ jsx(
558
+ DualMonthCaption,
559
+ {
560
+ firstMonth: displayMonth,
561
+ secondMonth: secondVisible,
562
+ dir,
563
+ locale,
564
+ timeZone,
565
+ captionTitleClass,
566
+ size: calSize,
567
+ onPrev: () => shiftMonth(-1),
568
+ onNext: () => shiftMonth(1)
569
+ }
570
+ ) : /* @__PURE__ */ jsx(
571
+ MonthCaption,
572
+ {
573
+ displayMonth,
574
+ captionLayout: effectiveCaption,
575
+ dir,
576
+ locale,
577
+ timeZone,
578
+ captionTitleClass,
579
+ size: calSize,
580
+ onPrev: () => shiftMonth(-1),
581
+ onNext: () => shiftMonth(1),
582
+ onPickMonthYear: (yy, monthIndex) => {
583
+ setMonth(new Date(yy, monthIndex, 1));
584
+ }
585
+ }
586
+ ),
587
+ /* @__PURE__ */ jsx(
588
+ "div",
589
+ {
590
+ class: cn(
591
+ "relative flex flex-col",
592
+ calSize === "sm" ? "gap-2.5" : "gap-3",
593
+ numberOfMonths === 2 && "md:flex-row md:items-start md:justify-between",
594
+ numberOfMonths === 2 && (calSize === "sm" ? "md:gap-4" : "md:gap-6")
595
+ ),
596
+ children: monthsToRender.map((offset) => {
597
+ const ym = addMonths(displayMonth, offset);
598
+ const y = ym.getFullYear();
599
+ const m = ym.getMonth();
600
+ return /* @__PURE__ */ jsx(
601
+ MonthGrid,
602
+ {
603
+ year: y,
604
+ month: m,
605
+ mode,
606
+ singleSelected,
607
+ range: rangeSelected,
608
+ locale,
609
+ weekdayLabels,
610
+ showWeekdayLeadBorder,
611
+ showOutsideDays,
612
+ fixedWeeks,
613
+ showWeekNumber,
614
+ isDisabled,
615
+ modifierClassesFor,
616
+ dayAddon,
617
+ hasDayAddon: Boolean(dayAddon),
618
+ size: calSize,
619
+ onDayClick: handleDayClick
620
+ },
621
+ `${y}-${m}`
622
+ );
623
+ })
624
+ }
625
+ )
626
+ ]
627
+ }
628
+ );
629
+ };
630
+
631
+ export { Calendar };
632
+ //# sourceMappingURL=chunk-JNF7FDJO.js.map
633
+ //# sourceMappingURL=chunk-JNF7FDJO.js.map