@constructive-io/ui 0.6.0 → 0.6.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 (414) hide show
  1. package/dist/button-D4vqTxhp.d.cts +20 -0
  2. package/dist/button-D4vqTxhp.d.ts +20 -0
  3. package/dist/components/alert-dialog.cjs +98 -302
  4. package/dist/components/alert-dialog.cjs.map +1 -1
  5. package/dist/components/alert-dialog.d.cts +22 -21
  6. package/dist/components/alert-dialog.d.ts +22 -21
  7. package/dist/components/alert-dialog.js +96 -281
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/alert.cjs +51 -108
  10. package/dist/components/alert.cjs.map +1 -1
  11. package/dist/components/alert.d.cts +13 -13
  12. package/dist/components/alert.d.ts +13 -13
  13. package/dist/components/alert.js +49 -87
  14. package/dist/components/alert.js.map +1 -1
  15. package/dist/components/app-bar.cjs +73 -359
  16. package/dist/components/app-bar.cjs.map +1 -1
  17. package/dist/components/app-bar.d.cts +21 -20
  18. package/dist/components/app-bar.d.ts +21 -20
  19. package/dist/components/app-bar.js +71 -338
  20. package/dist/components/app-bar.js.map +1 -1
  21. package/dist/components/app-shell.cjs +252 -1777
  22. package/dist/components/app-shell.cjs.map +1 -1
  23. package/dist/components/app-shell.d.cts +77 -85
  24. package/dist/components/app-shell.d.ts +77 -85
  25. package/dist/components/app-shell.js +249 -1756
  26. package/dist/components/app-shell.js.map +1 -1
  27. package/dist/components/autocomplete.cjs +146 -397
  28. package/dist/components/autocomplete.cjs.map +1 -1
  29. package/dist/components/autocomplete.d.cts +24 -24
  30. package/dist/components/autocomplete.d.ts +24 -24
  31. package/dist/components/autocomplete.js +146 -376
  32. package/dist/components/autocomplete.js.map +1 -1
  33. package/dist/components/avatar.cjs +26 -38
  34. package/dist/components/avatar.cjs.map +1 -1
  35. package/dist/components/avatar.d.cts +11 -10
  36. package/dist/components/avatar.d.ts +11 -10
  37. package/dist/components/avatar.js +24 -37
  38. package/dist/components/avatar.js.map +1 -1
  39. package/dist/components/badge.cjs +42 -60
  40. package/dist/components/badge.cjs.map +1 -1
  41. package/dist/components/badge.d.cts +13 -13
  42. package/dist/components/badge.d.ts +13 -13
  43. package/dist/components/badge.js +39 -38
  44. package/dist/components/badge.js.map +1 -1
  45. package/dist/components/breadcrumb.cjs +65 -94
  46. package/dist/components/breadcrumb.cjs.map +1 -1
  47. package/dist/components/breadcrumb.d.cts +14 -13
  48. package/dist/components/breadcrumb.d.ts +14 -13
  49. package/dist/components/breadcrumb.js +63 -73
  50. package/dist/components/breadcrumb.js.map +1 -1
  51. package/dist/components/button.cjs +68 -162
  52. package/dist/components/button.cjs.map +1 -1
  53. package/dist/components/button.d.cts +2 -20
  54. package/dist/components/button.d.ts +2 -20
  55. package/dist/components/button.js +65 -140
  56. package/dist/components/button.js.map +1 -1
  57. package/dist/components/calendar-rac.cjs +49 -62
  58. package/dist/components/calendar-rac.cjs.map +1 -1
  59. package/dist/components/calendar-rac.d.cts +8 -8
  60. package/dist/components/calendar-rac.d.ts +8 -8
  61. package/dist/components/calendar-rac.js +49 -61
  62. package/dist/components/calendar-rac.js.map +1 -1
  63. package/dist/components/card.cjs +61 -74
  64. package/dist/components/card.cjs.map +1 -1
  65. package/dist/components/card.d.cts +15 -16
  66. package/dist/components/card.d.ts +15 -16
  67. package/dist/components/card.js +58 -72
  68. package/dist/components/card.js.map +1 -1
  69. package/dist/components/checkbox-group.cjs +12 -11
  70. package/dist/components/checkbox-group.cjs.map +1 -1
  71. package/dist/components/checkbox-group.d.cts +5 -5
  72. package/dist/components/checkbox-group.d.ts +5 -5
  73. package/dist/components/checkbox-group.js +12 -10
  74. package/dist/components/checkbox-group.js.map +1 -1
  75. package/dist/components/checkbox.cjs +60 -114
  76. package/dist/components/checkbox.cjs.map +1 -1
  77. package/dist/components/checkbox.d.cts +6 -6
  78. package/dist/components/checkbox.d.ts +6 -6
  79. package/dist/components/checkbox.js +58 -93
  80. package/dist/components/checkbox.js.map +1 -1
  81. package/dist/components/collapsible.cjs +76 -113
  82. package/dist/components/collapsible.cjs.map +1 -1
  83. package/dist/components/collapsible.d.cts +16 -15
  84. package/dist/components/collapsible.d.ts +16 -15
  85. package/dist/components/collapsible.js +74 -92
  86. package/dist/components/collapsible.js.map +1 -1
  87. package/dist/components/combobox.cjs +213 -507
  88. package/dist/components/combobox.cjs.map +1 -1
  89. package/dist/components/combobox.d.cts +36 -35
  90. package/dist/components/combobox.d.ts +36 -35
  91. package/dist/components/combobox.js +229 -504
  92. package/dist/components/combobox.js.map +1 -1
  93. package/dist/components/command.cjs +102 -199
  94. package/dist/components/command.cjs.map +1 -1
  95. package/dist/components/command.d.cts +22 -21
  96. package/dist/components/command.d.ts +22 -21
  97. package/dist/components/command.js +100 -198
  98. package/dist/components/command.js.map +1 -1
  99. package/dist/components/dialog.cjs +110 -402
  100. package/dist/components/dialog.cjs.map +1 -1
  101. package/dist/components/dialog.d.cts +27 -26
  102. package/dist/components/dialog.d.ts +27 -26
  103. package/dist/components/dialog.js +107 -380
  104. package/dist/components/dialog.js.map +1 -1
  105. package/dist/components/dock.cjs +80 -111
  106. package/dist/components/dock.cjs.map +1 -1
  107. package/dist/components/dock.d.cts +25 -25
  108. package/dist/components/dock.d.ts +25 -25
  109. package/dist/components/dock.js +78 -106
  110. package/dist/components/dock.js.map +1 -1
  111. package/dist/components/drawer.cjs +77 -111
  112. package/dist/components/drawer.cjs.map +1 -1
  113. package/dist/components/drawer.d.cts +15 -14
  114. package/dist/components/drawer.d.ts +15 -14
  115. package/dist/components/drawer.js +75 -90
  116. package/dist/components/drawer.js.map +1 -1
  117. package/dist/components/dropdown-menu.cjs +163 -238
  118. package/dist/components/dropdown-menu.cjs.map +1 -1
  119. package/dist/components/dropdown-menu.d.cts +44 -43
  120. package/dist/components/dropdown-menu.d.ts +44 -43
  121. package/dist/components/dropdown-menu.js +161 -217
  122. package/dist/components/dropdown-menu.js.map +1 -1
  123. package/dist/components/empty.cjs +51 -85
  124. package/dist/components/empty.cjs.map +1 -1
  125. package/dist/components/empty.d.cts +13 -13
  126. package/dist/components/empty.d.ts +13 -13
  127. package/dist/components/empty.js +48 -83
  128. package/dist/components/empty.js.map +1 -1
  129. package/dist/components/field.cjs +150 -259
  130. package/dist/components/field.cjs.map +1 -1
  131. package/dist/components/field.d.cts +39 -39
  132. package/dist/components/field.d.ts +39 -39
  133. package/dist/components/field.js +148 -238
  134. package/dist/components/field.js.map +1 -1
  135. package/dist/components/flickering-grid.cjs +143 -166
  136. package/dist/components/flickering-grid.cjs.map +1 -1
  137. package/dist/components/flickering-grid.d.cts +14 -13
  138. package/dist/components/flickering-grid.d.ts +14 -13
  139. package/dist/components/flickering-grid.js +141 -161
  140. package/dist/components/flickering-grid.js.map +1 -1
  141. package/dist/components/flow-zoom-panel.cjs +56 -188
  142. package/dist/components/flow-zoom-panel.cjs.map +1 -1
  143. package/dist/components/flow-zoom-panel.d.cts +9 -9
  144. package/dist/components/flow-zoom-panel.d.ts +9 -9
  145. package/dist/components/flow-zoom-panel.js +56 -168
  146. package/dist/components/flow-zoom-panel.js.map +1 -1
  147. package/dist/components/form-control.cjs +58 -186
  148. package/dist/components/form-control.cjs.map +1 -1
  149. package/dist/components/form-control.d.cts +11 -10
  150. package/dist/components/form-control.d.ts +11 -10
  151. package/dist/components/form-control.js +56 -165
  152. package/dist/components/form-control.js.map +1 -1
  153. package/dist/components/form.cjs +78 -184
  154. package/dist/components/form.cjs.map +1 -1
  155. package/dist/components/form.d.cts +2 -36
  156. package/dist/components/form.d.ts +2 -36
  157. package/dist/components/form.js +76 -163
  158. package/dist/components/form.js.map +1 -1
  159. package/dist/components/input-group.cjs +51 -165
  160. package/dist/components/input-group.cjs.map +1 -1
  161. package/dist/components/input-group.d.cts +14 -15
  162. package/dist/components/input-group.d.ts +14 -15
  163. package/dist/components/input-group.js +51 -164
  164. package/dist/components/input-group.js.map +1 -1
  165. package/dist/components/input.cjs +30 -55
  166. package/dist/components/input.cjs.map +1 -1
  167. package/dist/components/input.d.cts +2 -10
  168. package/dist/components/input.d.ts +2 -10
  169. package/dist/components/input.js +30 -54
  170. package/dist/components/input.js.map +1 -1
  171. package/dist/components/json-input.cjs +133 -337
  172. package/dist/components/json-input.cjs.map +1 -1
  173. package/dist/components/json-input.d.cts +20 -19
  174. package/dist/components/json-input.d.ts +20 -19
  175. package/dist/components/json-input.js +132 -317
  176. package/dist/components/json-input.js.map +1 -1
  177. package/dist/components/label.cjs +19 -21
  178. package/dist/components/label.cjs.map +1 -1
  179. package/dist/components/label.d.cts +6 -5
  180. package/dist/components/label.d.ts +6 -5
  181. package/dist/components/label.js +17 -20
  182. package/dist/components/label.js.map +1 -1
  183. package/dist/components/motion-grid.cjs +61 -101
  184. package/dist/components/motion-grid.cjs.map +1 -1
  185. package/dist/components/motion-grid.d.cts +15 -14
  186. package/dist/components/motion-grid.d.ts +15 -14
  187. package/dist/components/motion-grid.js +59 -80
  188. package/dist/components/motion-grid.js.map +1 -1
  189. package/dist/components/multi-select.cjs +563 -786
  190. package/dist/components/multi-select.cjs.map +1 -1
  191. package/dist/components/multi-select.d.cts +173 -173
  192. package/dist/components/multi-select.d.ts +173 -173
  193. package/dist/components/multi-select.js +561 -765
  194. package/dist/components/multi-select.js.map +1 -1
  195. package/dist/components/page-header.cjs +24 -13
  196. package/dist/components/page-header.cjs.map +1 -1
  197. package/dist/components/page-header.d.cts +11 -11
  198. package/dist/components/page-header.d.ts +11 -11
  199. package/dist/components/page-header.js +23 -11
  200. package/dist/components/page-header.js.map +1 -1
  201. package/dist/components/pagination.cjs +72 -272
  202. package/dist/components/pagination.cjs.map +1 -1
  203. package/dist/components/pagination.d.cts +15 -16
  204. package/dist/components/pagination.d.ts +15 -16
  205. package/dist/components/pagination.js +69 -250
  206. package/dist/components/pagination.js.map +1 -1
  207. package/dist/components/popover.cjs +68 -111
  208. package/dist/components/popover.cjs.map +1 -1
  209. package/dist/components/popover.d.cts +31 -30
  210. package/dist/components/popover.d.ts +31 -30
  211. package/dist/components/popover.js +66 -90
  212. package/dist/components/popover.js.map +1 -1
  213. package/dist/components/portal.cjs +128 -81
  214. package/dist/components/portal.cjs.map +1 -1
  215. package/dist/components/portal.d.cts +24 -23
  216. package/dist/components/portal.d.ts +24 -23
  217. package/dist/components/portal.js +126 -60
  218. package/dist/components/portal.js.map +1 -1
  219. package/dist/components/progress.cjs +23 -24
  220. package/dist/components/progress.cjs.map +1 -1
  221. package/dist/components/progress.d.cts +8 -7
  222. package/dist/components/progress.d.ts +8 -7
  223. package/dist/components/progress.js +21 -23
  224. package/dist/components/progress.js.map +1 -1
  225. package/dist/components/progressive-blur-scroll-container.cjs +70 -138
  226. package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
  227. package/dist/components/progressive-blur-scroll-container.d.cts +19 -19
  228. package/dist/components/progressive-blur-scroll-container.d.ts +19 -19
  229. package/dist/components/progressive-blur-scroll-container.js +70 -137
  230. package/dist/components/progressive-blur-scroll-container.js.map +1 -1
  231. package/dist/components/progressive-blur.cjs +40 -64
  232. package/dist/components/progressive-blur.cjs.map +1 -1
  233. package/dist/components/progressive-blur.d.cts +15 -14
  234. package/dist/components/progressive-blur.d.ts +15 -14
  235. package/dist/components/progressive-blur.js +38 -63
  236. package/dist/components/progressive-blur.js.map +1 -1
  237. package/dist/components/radio-group.cjs +28 -42
  238. package/dist/components/radio-group.cjs.map +1 -1
  239. package/dist/components/radio-group.d.cts +8 -8
  240. package/dist/components/radio-group.d.ts +8 -8
  241. package/dist/components/radio-group.js +28 -41
  242. package/dist/components/radio-group.js.map +1 -1
  243. package/dist/components/record-picker.cjs +6 -418
  244. package/dist/components/record-picker.d.cts +13 -13
  245. package/dist/components/record-picker.d.ts +13 -13
  246. package/dist/components/record-picker.js +5 -397
  247. package/dist/components/resizable.cjs +32 -58
  248. package/dist/components/resizable.cjs.map +1 -1
  249. package/dist/components/resizable.d.cts +10 -9
  250. package/dist/components/resizable.d.ts +10 -9
  251. package/dist/components/resizable.js +29 -37
  252. package/dist/components/resizable.js.map +1 -1
  253. package/dist/components/responsive-diagram.cjs +50 -61
  254. package/dist/components/responsive-diagram.cjs.map +1 -1
  255. package/dist/components/responsive-diagram.d.cts +7 -7
  256. package/dist/components/responsive-diagram.d.ts +7 -7
  257. package/dist/components/responsive-diagram.js +50 -60
  258. package/dist/components/responsive-diagram.js.map +1 -1
  259. package/dist/components/scroll-area.cjs +37 -83
  260. package/dist/components/scroll-area.cjs.map +1 -1
  261. package/dist/components/scroll-area.d.cts +9 -8
  262. package/dist/components/scroll-area.d.ts +9 -8
  263. package/dist/components/scroll-area.js +35 -62
  264. package/dist/components/scroll-area.js.map +1 -1
  265. package/dist/components/select.cjs +175 -300
  266. package/dist/components/select.cjs.map +1 -1
  267. package/dist/components/select.d.cts +36 -35
  268. package/dist/components/select.d.ts +36 -35
  269. package/dist/components/select.js +172 -278
  270. package/dist/components/select.js.map +1 -1
  271. package/dist/components/separator.cjs +16 -19
  272. package/dist/components/separator.cjs.map +1 -1
  273. package/dist/components/separator.d.cts +2 -10
  274. package/dist/components/separator.d.ts +2 -10
  275. package/dist/components/separator.js +14 -18
  276. package/dist/components/separator.js.map +1 -1
  277. package/dist/components/sheet.cjs +17 -487
  278. package/dist/components/sheet.d.cts +85 -85
  279. package/dist/components/sheet.d.ts +85 -85
  280. package/dist/components/sheet.js +3 -453
  281. package/dist/components/sidebar.cjs +27 -1298
  282. package/dist/components/sidebar.d.cts +62 -65
  283. package/dist/components/sidebar.d.ts +62 -65
  284. package/dist/components/sidebar.js +3 -1254
  285. package/dist/components/skeleton.cjs +18 -30
  286. package/dist/components/skeleton.cjs.map +1 -1
  287. package/dist/components/skeleton.d.cts +6 -5
  288. package/dist/components/skeleton.d.ts +6 -5
  289. package/dist/components/skeleton.js +15 -28
  290. package/dist/components/skeleton.js.map +1 -1
  291. package/dist/components/sonner.cjs +17 -19
  292. package/dist/components/sonner.cjs.map +1 -1
  293. package/dist/components/sonner.d.cts +7 -7
  294. package/dist/components/sonner.d.ts +7 -7
  295. package/dist/components/sonner.js +17 -18
  296. package/dist/components/sonner.js.map +1 -1
  297. package/dist/components/stack/index.cjs +43 -1515
  298. package/dist/components/stack/index.d.cts +2 -672
  299. package/dist/components/stack/index.d.ts +2 -672
  300. package/dist/components/stack/index.js +3 -1455
  301. package/dist/components/stepper.cjs +131 -285
  302. package/dist/components/stepper.cjs.map +1 -1
  303. package/dist/components/stepper.d.cts +27 -26
  304. package/dist/components/stepper.d.ts +27 -26
  305. package/dist/components/stepper.js +130 -265
  306. package/dist/components/stepper.js.map +1 -1
  307. package/dist/components/switch.cjs +21 -32
  308. package/dist/components/switch.cjs.map +1 -1
  309. package/dist/components/switch.d.cts +7 -6
  310. package/dist/components/switch.d.ts +7 -6
  311. package/dist/components/switch.js +19 -31
  312. package/dist/components/switch.js.map +1 -1
  313. package/dist/components/table.cjs +58 -106
  314. package/dist/components/table.cjs.map +1 -1
  315. package/dist/components/table.d.cts +17 -16
  316. package/dist/components/table.d.ts +17 -16
  317. package/dist/components/table.js +55 -104
  318. package/dist/components/table.js.map +1 -1
  319. package/dist/components/tabs.cjs +31 -35
  320. package/dist/components/tabs.cjs.map +1 -1
  321. package/dist/components/tabs.d.cts +9 -8
  322. package/dist/components/tabs.d.ts +9 -8
  323. package/dist/components/tabs.js +29 -34
  324. package/dist/components/tabs.js.map +1 -1
  325. package/dist/components/tags.cjs +114 -433
  326. package/dist/components/tags.cjs.map +1 -1
  327. package/dist/components/tags.d.cts +24 -28
  328. package/dist/components/tags.d.ts +24 -28
  329. package/dist/components/tags.js +114 -413
  330. package/dist/components/tags.js.map +1 -1
  331. package/dist/components/textarea.cjs +27 -49
  332. package/dist/components/textarea.cjs.map +1 -1
  333. package/dist/components/textarea.d.cts +8 -7
  334. package/dist/components/textarea.d.ts +8 -7
  335. package/dist/components/textarea.js +27 -48
  336. package/dist/components/textarea.js.map +1 -1
  337. package/dist/components/toast/index.cjs +9 -612
  338. package/dist/components/toast/index.d.cts +2 -52
  339. package/dist/components/toast/index.d.ts +2 -52
  340. package/dist/components/toast/index.js +3 -586
  341. package/dist/components/tooltip.cjs +47 -72
  342. package/dist/components/tooltip.cjs.map +1 -1
  343. package/dist/components/tooltip.d.cts +2 -28
  344. package/dist/components/tooltip.d.ts +2 -28
  345. package/dist/components/tooltip.js +45 -51
  346. package/dist/components/tooltip.js.map +1 -1
  347. package/dist/components/unlink-button.cjs +19 -192
  348. package/dist/components/unlink-button.cjs.map +1 -1
  349. package/dist/components/unlink-button.d.cts +11 -11
  350. package/dist/components/unlink-button.d.ts +11 -11
  351. package/dist/components/unlink-button.js +18 -170
  352. package/dist/components/unlink-button.js.map +1 -1
  353. package/dist/form-DgRTv7O7.d.ts +54 -0
  354. package/dist/form-DoZEWSzb.d.cts +54 -0
  355. package/dist/index-CjA4CENl.d.cts +684 -0
  356. package/dist/index-CjA4CENl.d.ts +684 -0
  357. package/dist/index-UnM04j0t.d.cts +58 -0
  358. package/dist/index-UnM04j0t.d.ts +58 -0
  359. package/dist/index.cjs +408 -8697
  360. package/dist/index.d.cts +224 -2136
  361. package/dist/index.d.ts +224 -2136
  362. package/dist/index.js +65 -8350
  363. package/dist/input-CBrCuMH8.d.cts +11 -0
  364. package/dist/input-CBrCuMH8.d.ts +11 -0
  365. package/dist/motion-config-COCFHq1L.cjs +271 -0
  366. package/dist/motion-config-COCFHq1L.cjs.map +1 -0
  367. package/dist/motion-config-COsZ6azM.js +241 -0
  368. package/dist/motion-config-COsZ6azM.js.map +1 -0
  369. package/dist/record-picker-BbxngCeV.js +162 -0
  370. package/dist/record-picker-BbxngCeV.js.map +1 -0
  371. package/dist/record-picker-Bz4FApxD.cjs +167 -0
  372. package/dist/record-picker-Bz4FApxD.cjs.map +1 -0
  373. package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
  374. package/dist/separator-BQEsr0Rc.d.cts +11 -0
  375. package/dist/separator-BQEsr0Rc.d.ts +11 -0
  376. package/dist/sheet-BLHnhLRH.js +425 -0
  377. package/dist/sheet-BLHnhLRH.js.map +1 -0
  378. package/dist/sheet-BdA0rfIz.cjs +515 -0
  379. package/dist/sheet-BdA0rfIz.cjs.map +1 -0
  380. package/dist/sidebar-CPy_fibW.cjs +608 -0
  381. package/dist/sidebar-CPy_fibW.cjs.map +1 -0
  382. package/dist/sidebar-Cfax0g0_.js +463 -0
  383. package/dist/sidebar-Cfax0g0_.js.map +1 -0
  384. package/dist/slot-C-jEfihz.cjs +122 -0
  385. package/dist/slot-C-jEfihz.cjs.map +1 -0
  386. package/dist/slot-EL8zfLG0.js +97 -0
  387. package/dist/slot-EL8zfLG0.js.map +1 -0
  388. package/dist/stack-DKdvlOM6.cjs +1771 -0
  389. package/dist/stack-DKdvlOM6.cjs.map +1 -0
  390. package/dist/stack-jMdxDrex.js +1531 -0
  391. package/dist/stack-jMdxDrex.js.map +1 -0
  392. package/dist/toast-D6MqijT2.cjs +316 -0
  393. package/dist/toast-D6MqijT2.cjs.map +1 -0
  394. package/dist/toast-D_BOLzm3.js +287 -0
  395. package/dist/toast-D_BOLzm3.js.map +1 -0
  396. package/dist/tooltip-CTRQoN1A.d.cts +29 -0
  397. package/dist/tooltip-CTRQoN1A.d.ts +29 -0
  398. package/dist/utils-BkMLyah9.js +12 -0
  399. package/dist/utils-BkMLyah9.js.map +1 -0
  400. package/dist/utils-CzTQ3-VI.cjs +17 -0
  401. package/dist/utils-CzTQ3-VI.cjs.map +1 -0
  402. package/package.json +5 -5
  403. package/dist/components/record-picker.cjs.map +0 -1
  404. package/dist/components/record-picker.js.map +0 -1
  405. package/dist/components/sheet.cjs.map +0 -1
  406. package/dist/components/sheet.js.map +0 -1
  407. package/dist/components/sidebar.cjs.map +0 -1
  408. package/dist/components/sidebar.js.map +0 -1
  409. package/dist/components/stack/index.cjs.map +0 -1
  410. package/dist/components/stack/index.js.map +0 -1
  411. package/dist/components/toast/index.cjs.map +0 -1
  412. package/dist/components/toast/index.js.map +0 -1
  413. package/dist/index.cjs.map +0 -1
  414. package/dist/index.js.map +0 -1
@@ -1 +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AAG,KAAA;AAAA,UAEH;AAAA;AAAA,OACF;AAAA,IAEF;AAEA,IAAA,uBACCA,GAAAA,CAAC,QAAA,EAAA,EAAO,GAAA,EAAU,IAAA,EAAY,SAAA,EAAW,aAAA,EAAe,WAAA,EAAU,QAAA,EAAU,GAAG,KAAA,EAC7E,QAAA,EACF,CAAA;AAAA,EAEF;AACD;AACA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"button.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\n","import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:scale-[0.96]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': 'size-11 [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\txs:\n\t\t\t\t\t'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));\n\t\tconst Comp = asChild ? Slot : 'button';\n\n\t\tif (asChild) {\n\t\t\tconst SlottedComp = Comp as typeof Slot;\n\t\t\treturn (\n\t\t\t\t<SlottedComp\n\t\t\t\t\tref={ref as React.Ref<HTMLElement>}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SlottedComp>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"]}
1
+ {"version":3,"file":"button.js","names":["React","SlottedComp"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:scale-[0.96]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': 'size-11 [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\txs:\n\t\t\t\t\t'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));\n\t\tconst Comp = asChild ? Slot : 'button';\n\n\t\tif (asChild) {\n\t\t\tconst SlottedComp = Comp as typeof Slot;\n\t\t\treturn (\n\t\t\t\t<SlottedComp\n\t\t\t\t\tref={ref as React.Ref<HTMLElement>}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SlottedComp>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"],"mappings":";;;;;;;;AAMA,MAAM,iBAAiB,IACtB,8nBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;CACV;CACA,UAAU;EACT,QAAQ;GACP,OAAO;GACP,MAAM;EACP;EACA,MAAM;GACL,SAAS;GACT,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;GACX,WACC;GACD,IAAI;GACJ,IACC;GACD,IAAI;GACJ,IACC;EACF;EACA,SAAS;GACR,SACC;GACD,aACC;GACD,uBACC;GACD,OAAO;GACP,MAAM;GACN,SACC;GACD,WACC;EACF;CACD;AACD,CACD;AAWA,MAAM,SAASA,QAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,SAAS,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACtG,MAAM,gBAAgB,GAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;CAAQ,CAAC,CAAC;CACvF,MAAM,OAAO,UAAU,OAAO;CAE9B,IAAI,SAEH,OACC,oBAACC,MAAD;EACM;EACL,WAAW;EACX,aAAU;EACV,GAAI;EAEH;CACW;CAIf,OACC,oBAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
@@ -1,85 +1,72 @@
1
- "use client";
2
- 'use strict';
1
+ 'use client';
3
2
 
4
- var date = require('@internationalized/date');
5
- var lucideReact = require('lucide-react');
6
- var reactAriaComponents = require('react-aria-components');
7
- var clsx = require('clsx');
8
- var tailwindMerge = require('tailwind-merge');
9
- var jsxRuntime = require('react/jsx-runtime');
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+ const require_utils = require('../utils-CzTQ3-VI.cjs');
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let lucide_react = require("lucide-react");
7
+ let _internationalized_date = require("@internationalized/date");
8
+ let react_aria_components = require("react-aria-components");
10
9
 
11
- function cn(...inputs) {
12
- return tailwindMerge.twMerge(clsx.clsx(inputs));
13
- }
10
+ //#region src/components/calendar-rac.tsx
14
11
  function CalendarHeader() {
15
- return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex w-full items-center gap-1 pb-1", children: [
16
- /* @__PURE__ */ jsxRuntime.jsx(
17
- reactAriaComponents.Button,
18
- {
19
- slot: "previous",
20
- className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
21
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { size: 16 })
22
- }
23
- ),
24
- /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Heading, { className: "grow text-center text-sm font-medium" }),
25
- /* @__PURE__ */ jsxRuntime.jsx(
26
- reactAriaComponents.Button,
27
- {
28
- slot: "next",
29
- className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
30
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { size: 16 })
31
- }
32
- )
33
- ] });
12
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
13
+ className: "flex w-full items-center gap-1 pb-1",
14
+ children: [
15
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
16
+ slot: "previous",
17
+ className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
18
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeftIcon, { size: 16 })
19
+ }),
20
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Heading, { className: "grow text-center text-sm font-medium" }),
21
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
22
+ slot: "next",
23
+ className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
24
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { size: 16 })
25
+ })
26
+ ]
27
+ });
34
28
  }
35
29
  function CalendarGridComponent({ isRange = false }) {
36
- const now = date.today(date.getLocalTimeZone());
37
- return /* @__PURE__ */ jsxRuntime.jsxs(reactAriaComponents.CalendarGrid, { children: [
38
- /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell, { className: "text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium", children: day }) }),
39
- /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.CalendarGridBody, { className: "[&_td]:px-0 [&_td]:py-px", children: (date) => /* @__PURE__ */ jsxRuntime.jsx(
40
- reactAriaComponents.CalendarCell,
41
- {
42
- date,
43
- className: cn(
44
- `text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground
30
+ const now = (0, _internationalized_date.today)((0, _internationalized_date.getLocalTimeZone)());
31
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.CalendarGrid, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarGridHeader, { children: (day) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarHeaderCell, {
32
+ className: "text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium",
33
+ children: day
34
+ }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarGridBody, {
35
+ className: "[&_td]:px-0 [&_td]:py-px",
36
+ children: (date) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarCell, {
37
+ date,
38
+ className: require_utils.cn(`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground
45
39
  data-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center
46
40
  justify-center rounded-md p-0 text-sm font-normal whitespace-nowrap
47
41
  [transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none
48
42
  data-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10
49
43
  data-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through
50
- data-unavailable:opacity-30`,
51
- // Range-specific styles
52
- isRange && `data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive
44
+ data-unavailable:opacity-30`, isRange && `data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive
53
45
  data-invalid:data-selection-start:bg-destructive data-selection-end:bg-primary
54
46
  data-selection-start:bg-primary data-selection-end:text-primary-foreground
55
47
  data-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none
56
48
  data-selection-end:rounded-e-md data-invalid:data-selection-end:text-white
57
- data-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`,
58
- // Today indicator styles
59
- date.compare(now) === 0 && cn(
60
- `after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10
61
- after:size-[3px] after:-translate-x-1/2 after:rounded-full`,
62
- isRange ? "data-selection-end:after:bg-background data-selection-start:after:bg-background" : "data-selected:after:bg-background"
63
- )
64
- )
65
- }
66
- ) })
67
- ] });
49
+ data-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`, date.compare(now) === 0 && require_utils.cn(`after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10
50
+ after:size-[3px] after:-translate-x-1/2 after:rounded-full`, isRange ? "data-selection-end:after:bg-background data-selection-start:after:bg-background" : "data-selected:after:bg-background"))
51
+ })
52
+ })] });
68
53
  }
69
54
  function Calendar({ className, ...props }) {
70
- return /* @__PURE__ */ jsxRuntime.jsxs(reactAriaComponents.Calendar, { ...props, className: reactAriaComponents.composeRenderProps(className, (className2) => cn("w-fit", className2)), children: [
71
- /* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, {}),
72
- /* @__PURE__ */ jsxRuntime.jsx(CalendarGridComponent, {})
73
- ] });
55
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.Calendar, {
56
+ ...props,
57
+ className: (0, react_aria_components.composeRenderProps)(className, (className) => require_utils.cn("w-fit", className)),
58
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CalendarHeader, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CalendarGridComponent, {})]
59
+ });
74
60
  }
75
61
  function RangeCalendar({ className, ...props }) {
76
- return /* @__PURE__ */ jsxRuntime.jsxs(reactAriaComponents.RangeCalendar, { ...props, className: reactAriaComponents.composeRenderProps(className, (className2) => cn("w-fit", className2)), children: [
77
- /* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, {}),
78
- /* @__PURE__ */ jsxRuntime.jsx(CalendarGridComponent, { isRange: true })
79
- ] });
62
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.RangeCalendar, {
63
+ ...props,
64
+ className: (0, react_aria_components.composeRenderProps)(className, (className) => require_utils.cn("w-fit", className)),
65
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CalendarHeader, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CalendarGridComponent, { isRange: true })]
66
+ });
80
67
  }
81
68
 
69
+ //#endregion
82
70
  exports.Calendar = Calendar;
83
71
  exports.RangeCalendar = RangeCalendar;
84
- //# sourceMappingURL=calendar-rac.cjs.map
85
72
  //# sourceMappingURL=calendar-rac.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/calendar-rac.tsx"],"names":["twMerge","clsx","jsxs","jsx","Button","ChevronLeftIcon","HeadingRac","ChevronRightIcon","today","getLocalTimeZone","CalendarGridRac","CalendarGridHeaderRac","CalendarHeaderCellRac","CalendarGridBodyRac","CalendarCellRac","CalendarRac","composeRenderProps","className","RangeCalendarRac"],"mappings":";;;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,O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A;AAAA,kCAAA,CAAA;AAAA;AAAA,UAQA,OAAA,IACC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sFAAA,CAAA;AAAA;AAAA,UAOD,IAAA,CAAK,OAAA,CAAQ,GAAG,CAAA,KAAM,CAAA,IACrB,EAAA;AAAA,YACC,CAAA;AAAA,mEAAA,CAAA;AAAA,YAEA,UACG,iFAAA,GACA;AAAA;AACJ;AACF;AAAA,KACD,EAEF;AAAA,GAAA,EACD,CAAA;AAEF;AAEA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkB;AACzD,EAAA,uBACCZ,eAAA,CAACa,4BAAA,EAAA,EAAa,GAAG,KAAA,EAAO,SAAA,EAAWC,sCAAA,CAAmB,SAAA,EAAW,CAACC,UAAAA,KAAc,EAAA,CAAG,OAAA,EAASA,UAAS,CAAC,CAAA,EACrG,QAAA,EAAA;AAAA,oBAAAd,cAAA,CAAC,cAAA,EAAA,EAAe,CAAA;AAAA,mCACf,qBAAA,EAAA,EAAsB;AAAA,GAAA,EACxB,CAAA;AAEF;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuB;AACnE,EAAA,uBACCD,eAAA,CAACgB,iCAAA,EAAA,EAAkB,GAAG,KAAA,EAAO,SAAA,EAAWF,sCAAA,CAAmB,SAAA,EAAW,CAACC,UAAAA,KAAc,EAAA,CAAG,OAAA,EAASA,UAAS,CAAC,CAAA,EAC1G,QAAA,EAAA;AAAA,oBAAAd,cAAA,CAAC,cAAA,EAAA,EAAe,CAAA;AAAA,oBAChBA,cAAA,CAAC,qBAAA,EAAA,EAAsB,OAAA,EAAO,IAAA,EAAC;AAAA,GAAA,EAChC,CAAA;AAEF","file":"calendar-rac.cjs","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport { ComponentProps } from 'react';\nimport { getLocalTimeZone, today } from '@internationalized/date';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport {\n\tButton,\n\tCalendarCell as CalendarCellRac,\n\tCalendarGridBody as CalendarGridBodyRac,\n\tCalendarGridHeader as CalendarGridHeaderRac,\n\tCalendarGrid as CalendarGridRac,\n\tCalendarHeaderCell as CalendarHeaderCellRac,\n\tCalendar as CalendarRac,\n\tcomposeRenderProps,\n\tHeading as HeadingRac,\n\tRangeCalendar as RangeCalendarRac,\n} from 'react-aria-components';\n\nimport { cn } from '../lib/utils';\n\ninterface BaseCalendarProps {\n\tclassName?: string;\n}\n\ntype CalendarProps = ComponentProps<typeof CalendarRac> & BaseCalendarProps;\ntype RangeCalendarProps = ComponentProps<typeof RangeCalendarRac> & BaseCalendarProps;\n\nfunction CalendarHeader() {\n\treturn (\n\t\t<header className='flex w-full items-center gap-1 pb-1'>\n\t\t\t<Button\n\t\t\t\tslot='previous'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronLeftIcon size={16} />\n\t\t\t</Button>\n\t\t\t<HeadingRac className='grow text-center text-sm font-medium' />\n\t\t\t<Button\n\t\t\t\tslot='next'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronRightIcon size={16} />\n\t\t\t</Button>\n\t\t</header>\n\t);\n}\n\nfunction CalendarGridComponent({ isRange = false }: { isRange?: boolean }) {\n\tconst now = today(getLocalTimeZone());\n\n\treturn (\n\t\t<CalendarGridRac>\n\t\t\t<CalendarGridHeaderRac>\n\t\t\t\t{(day) => (\n\t\t\t\t\t<CalendarHeaderCellRac className='text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium'>\n\t\t\t\t\t\t{day}\n\t\t\t\t\t</CalendarHeaderCellRac>\n\t\t\t\t)}\n\t\t\t</CalendarGridHeaderRac>\n\t\t\t<CalendarGridBodyRac className='[&_td]:px-0 [&_td]:py-px'>\n\t\t\t\t{(date) => (\n\t\t\t\t\t<CalendarCellRac\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground\n\t\t\t\t\t\t\tdata-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center\n\t\t\t\t\t\t\tjustify-center rounded-md p-0 text-sm font-normal whitespace-nowrap\n\t\t\t\t\t\t\t[transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none\n\t\t\t\t\t\t\tdata-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10\n\t\t\t\t\t\t\tdata-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through\n\t\t\t\t\t\t\tdata-unavailable:opacity-30`,\n\t\t\t\t\t\t\t// Range-specific styles\n\t\t\t\t\t\t\tisRange &&\n\t\t\t\t\t\t\t\t`data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive\n\t\t\t\t\t\t\t\tdata-invalid:data-selection-start:bg-destructive data-selection-end:bg-primary\n\t\t\t\t\t\t\t\tdata-selection-start:bg-primary data-selection-end:text-primary-foreground\n\t\t\t\t\t\t\t\tdata-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none\n\t\t\t\t\t\t\t\tdata-selection-end:rounded-e-md data-invalid:data-selection-end:text-white\n\t\t\t\t\t\t\t\tdata-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`,\n\t\t\t\t\t\t\t// Today indicator styles\n\t\t\t\t\t\t\tdate.compare(now) === 0 &&\n\t\t\t\t\t\t\t\tcn(\n\t\t\t\t\t\t\t\t\t`after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10\n\t\t\t\t\t\t\t\t\tafter:size-[3px] after:-translate-x-1/2 after:rounded-full`,\n\t\t\t\t\t\t\t\t\tisRange\n\t\t\t\t\t\t\t\t\t\t? 'data-selection-end:after:bg-background data-selection-start:after:bg-background'\n\t\t\t\t\t\t\t\t\t\t: 'data-selected:after:bg-background',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CalendarGridBodyRac>\n\t\t</CalendarGridRac>\n\t);\n}\n\nfunction Calendar({ className, ...props }: CalendarProps) {\n\treturn (\n\t\t<CalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent />\n\t\t</CalendarRac>\n\t);\n}\n\nfunction RangeCalendar({ className, ...props }: RangeCalendarProps) {\n\treturn (\n\t\t<RangeCalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent isRange />\n\t\t</RangeCalendarRac>\n\t);\n}\n\nexport { Calendar, RangeCalendar };\n"]}
1
+ {"version":3,"file":"calendar-rac.cjs","names":["Button","ChevronLeftIcon","HeadingRac","ChevronRightIcon","CalendarGridRac","CalendarGridHeaderRac","CalendarHeaderCellRac","CalendarGridBodyRac","CalendarCellRac","cn","CalendarRac","RangeCalendarRac"],"sources":["../../src/components/calendar-rac.tsx"],"sourcesContent":["'use client';\n\nimport { ComponentProps } from 'react';\nimport { getLocalTimeZone, today } from '@internationalized/date';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport {\n\tButton,\n\tCalendarCell as CalendarCellRac,\n\tCalendarGridBody as CalendarGridBodyRac,\n\tCalendarGridHeader as CalendarGridHeaderRac,\n\tCalendarGrid as CalendarGridRac,\n\tCalendarHeaderCell as CalendarHeaderCellRac,\n\tCalendar as CalendarRac,\n\tcomposeRenderProps,\n\tHeading as HeadingRac,\n\tRangeCalendar as RangeCalendarRac,\n} from 'react-aria-components';\n\nimport { cn } from '../lib/utils';\n\ninterface BaseCalendarProps {\n\tclassName?: string;\n}\n\ntype CalendarProps = ComponentProps<typeof CalendarRac> & BaseCalendarProps;\ntype RangeCalendarProps = ComponentProps<typeof RangeCalendarRac> & BaseCalendarProps;\n\nfunction CalendarHeader() {\n\treturn (\n\t\t<header className='flex w-full items-center gap-1 pb-1'>\n\t\t\t<Button\n\t\t\t\tslot='previous'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronLeftIcon size={16} />\n\t\t\t</Button>\n\t\t\t<HeadingRac className='grow text-center text-sm font-medium' />\n\t\t\t<Button\n\t\t\t\tslot='next'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronRightIcon size={16} />\n\t\t\t</Button>\n\t\t</header>\n\t);\n}\n\nfunction CalendarGridComponent({ isRange = false }: { isRange?: boolean }) {\n\tconst now = today(getLocalTimeZone());\n\n\treturn (\n\t\t<CalendarGridRac>\n\t\t\t<CalendarGridHeaderRac>\n\t\t\t\t{(day) => (\n\t\t\t\t\t<CalendarHeaderCellRac className='text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium'>\n\t\t\t\t\t\t{day}\n\t\t\t\t\t</CalendarHeaderCellRac>\n\t\t\t\t)}\n\t\t\t</CalendarGridHeaderRac>\n\t\t\t<CalendarGridBodyRac className='[&_td]:px-0 [&_td]:py-px'>\n\t\t\t\t{(date) => (\n\t\t\t\t\t<CalendarCellRac\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground\n\t\t\t\t\t\t\tdata-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center\n\t\t\t\t\t\t\tjustify-center rounded-md p-0 text-sm font-normal whitespace-nowrap\n\t\t\t\t\t\t\t[transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none\n\t\t\t\t\t\t\tdata-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10\n\t\t\t\t\t\t\tdata-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through\n\t\t\t\t\t\t\tdata-unavailable:opacity-30`,\n\t\t\t\t\t\t\t// Range-specific styles\n\t\t\t\t\t\t\tisRange &&\n\t\t\t\t\t\t\t\t`data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive\n\t\t\t\t\t\t\t\tdata-invalid:data-selection-start:bg-destructive data-selection-end:bg-primary\n\t\t\t\t\t\t\t\tdata-selection-start:bg-primary data-selection-end:text-primary-foreground\n\t\t\t\t\t\t\t\tdata-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none\n\t\t\t\t\t\t\t\tdata-selection-end:rounded-e-md data-invalid:data-selection-end:text-white\n\t\t\t\t\t\t\t\tdata-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`,\n\t\t\t\t\t\t\t// Today indicator styles\n\t\t\t\t\t\t\tdate.compare(now) === 0 &&\n\t\t\t\t\t\t\t\tcn(\n\t\t\t\t\t\t\t\t\t`after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10\n\t\t\t\t\t\t\t\t\tafter:size-[3px] after:-translate-x-1/2 after:rounded-full`,\n\t\t\t\t\t\t\t\t\tisRange\n\t\t\t\t\t\t\t\t\t\t? 'data-selection-end:after:bg-background data-selection-start:after:bg-background'\n\t\t\t\t\t\t\t\t\t\t: 'data-selected:after:bg-background',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CalendarGridBodyRac>\n\t\t</CalendarGridRac>\n\t);\n}\n\nfunction Calendar({ className, ...props }: CalendarProps) {\n\treturn (\n\t\t<CalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent />\n\t\t</CalendarRac>\n\t);\n}\n\nfunction RangeCalendar({ className, ...props }: RangeCalendarProps) {\n\treturn (\n\t\t<RangeCalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent isRange />\n\t\t</RangeCalendarRac>\n\t);\n}\n\nexport { Calendar, RangeCalendar };\n"],"mappings":";;;;;;;;;;AA2BA,SAAS,iBAAiB;CACzB,OACC,4CAAC,UAAD;EAAQ,WAAU;YAAlB;GACC,2CAACA,8BAAD;IACC,MAAK;IACL,WAAU;cAGV,2CAACC,8BAAD,EAAiB,MAAM,GAAK;GACrB;GACR,2CAACC,+BAAD,EAAY,WAAU,uCAAwC;GAC9D,2CAACF,8BAAD;IACC,MAAK;IACL,WAAU;cAGV,2CAACG,+BAAD,EAAkB,MAAM,GAAK;GACtB;EACD;;AAEV;AAEA,SAAS,sBAAsB,EAAE,UAAU,SAAgC;CAC1E,MAAM,uFAA6B,CAAC;CAEpC,OACC,4CAACC,oCAAD,aACC,2CAACC,0CAAD,aACG,QACD,2CAACC,0CAAD;EAAuB,WAAU;YAC/B;CACqB,GAEF,IACvB,2CAACC,wCAAD;EAAqB,WAAU;aAC5B,SACD,2CAACC,oCAAD;GACO;GACN,WAAWC,iBACV;;;;;;qCAQA,WACC;;;;;yFAOD,KAAK,QAAQ,GAAG,MAAM,KACrBA,iBACC;sEAEA,UACG,oFACA,mCACJ,CACF;EACA;CAEkB,EACL;AAEnB;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;CACzD,OACC,4CAACC,gCAAD;EAAa,GAAI;EAAO,yDAA8B,YAAY,cAAcD,iBAAG,SAAS,SAAS,CAAC;YAAtG,CACC,2CAAC,gBAAD,CAAiB,IACjB,2CAAC,uBAAD,CAAwB,EACZ;;AAEf;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;CACnE,OACC,4CAACE,qCAAD;EAAkB,GAAI;EAAO,yDAA8B,YAAY,cAAcF,iBAAG,SAAS,SAAS,CAAC;YAA3G,CACC,2CAAC,gBAAD,CAAiB,IACjB,2CAAC,uBAAD,EAAuB,cAAS,EACf;;AAEpB"}
@@ -1,13 +1,13 @@
1
- import * as React from 'react';
2
- import { ComponentProps } from 'react';
3
- import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from 'react-aria-components';
4
-
1
+ import { ComponentProps } from "react";
2
+ import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from "react-aria-components";
3
+ //#region src/components/calendar-rac.d.ts
5
4
  interface BaseCalendarProps {
6
- className?: string;
5
+ className?: string;
7
6
  }
8
7
  type CalendarProps = ComponentProps<typeof Calendar$1> & BaseCalendarProps;
9
8
  type RangeCalendarProps = ComponentProps<typeof RangeCalendar$1> & BaseCalendarProps;
10
- declare function Calendar({ className, ...props }: CalendarProps): React.JSX.Element;
11
- declare function RangeCalendar({ className, ...props }: RangeCalendarProps): React.JSX.Element;
12
-
9
+ declare function Calendar({ className, ...props }: CalendarProps): import("react").JSX.Element;
10
+ declare function RangeCalendar({ className, ...props }: RangeCalendarProps): import("react").JSX.Element;
11
+ //#endregion
13
12
  export { Calendar, RangeCalendar };
13
+ //# sourceMappingURL=calendar-rac.d.cts.map
@@ -1,13 +1,13 @@
1
- import * as React from 'react';
2
- import { ComponentProps } from 'react';
3
- import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from 'react-aria-components';
4
-
1
+ import { ComponentProps } from "react";
2
+ import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from "react-aria-components";
3
+ //#region src/components/calendar-rac.d.ts
5
4
  interface BaseCalendarProps {
6
- className?: string;
5
+ className?: string;
7
6
  }
8
7
  type CalendarProps = ComponentProps<typeof Calendar$1> & BaseCalendarProps;
9
8
  type RangeCalendarProps = ComponentProps<typeof RangeCalendar$1> & BaseCalendarProps;
10
- declare function Calendar({ className, ...props }: CalendarProps): React.JSX.Element;
11
- declare function RangeCalendar({ className, ...props }: RangeCalendarProps): React.JSX.Element;
12
-
9
+ declare function Calendar({ className, ...props }: CalendarProps): import("react").JSX.Element;
10
+ declare function RangeCalendar({ className, ...props }: RangeCalendarProps): import("react").JSX.Element;
11
+ //#endregion
13
12
  export { Calendar, RangeCalendar };
13
+ //# sourceMappingURL=calendar-rac.d.ts.map
@@ -1,82 +1,70 @@
1
- "use client";
2
- import { today, getLocalTimeZone } from '@internationalized/date';
3
- import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
4
- import { Calendar as Calendar$1, composeRenderProps, RangeCalendar as RangeCalendar$1, Button, Heading, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell } from 'react-aria-components';
5
- import { clsx } from 'clsx';
6
- import { twMerge } from 'tailwind-merge';
7
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ 'use client';
8
2
 
9
- function cn(...inputs) {
10
- return twMerge(clsx(inputs));
11
- }
3
+ import { t as cn } from "../utils-BkMLyah9.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
6
+ import { getLocalTimeZone, today } from "@internationalized/date";
7
+ import { Button, Calendar as Calendar$1, CalendarCell, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, Heading, RangeCalendar as RangeCalendar$1, composeRenderProps } from "react-aria-components";
8
+
9
+ //#region src/components/calendar-rac.tsx
12
10
  function CalendarHeader() {
13
- return /* @__PURE__ */ jsxs("header", { className: "flex w-full items-center gap-1 pb-1", children: [
14
- /* @__PURE__ */ jsx(
15
- Button,
16
- {
17
- slot: "previous",
18
- className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
19
- children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16 })
20
- }
21
- ),
22
- /* @__PURE__ */ jsx(Heading, { className: "grow text-center text-sm font-medium" }),
23
- /* @__PURE__ */ jsx(
24
- Button,
25
- {
26
- slot: "next",
27
- className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
28
- children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16 })
29
- }
30
- )
31
- ] });
11
+ return /* @__PURE__ */ jsxs("header", {
12
+ className: "flex w-full items-center gap-1 pb-1",
13
+ children: [
14
+ /* @__PURE__ */ jsx(Button, {
15
+ slot: "previous",
16
+ className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
17
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16 })
18
+ }),
19
+ /* @__PURE__ */ jsx(Heading, { className: "grow text-center text-sm font-medium" }),
20
+ /* @__PURE__ */ jsx(Button, {
21
+ slot: "next",
22
+ className: "text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n items-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]",
23
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16 })
24
+ })
25
+ ]
26
+ });
32
27
  }
33
28
  function CalendarGridComponent({ isRange = false }) {
34
- const now = today(getLocalTimeZone());
35
- return /* @__PURE__ */ jsxs(CalendarGrid, { children: [
36
- /* @__PURE__ */ jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx(CalendarHeaderCell, { className: "text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium", children: day }) }),
37
- /* @__PURE__ */ jsx(CalendarGridBody, { className: "[&_td]:px-0 [&_td]:py-px", children: (date) => /* @__PURE__ */ jsx(
38
- CalendarCell,
39
- {
40
- date,
41
- className: cn(
42
- `text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground
29
+ const now = today(getLocalTimeZone());
30
+ return /* @__PURE__ */ jsxs(CalendarGrid, { children: [/* @__PURE__ */ jsx(CalendarGridHeader, { children: (day) => /* @__PURE__ */ jsx(CalendarHeaderCell, {
31
+ className: "text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium",
32
+ children: day
33
+ }) }), /* @__PURE__ */ jsx(CalendarGridBody, {
34
+ className: "[&_td]:px-0 [&_td]:py-px",
35
+ children: (date) => /* @__PURE__ */ jsx(CalendarCell, {
36
+ date,
37
+ className: cn(`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground
43
38
  data-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center
44
39
  justify-center rounded-md p-0 text-sm font-normal whitespace-nowrap
45
40
  [transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none
46
41
  data-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10
47
42
  data-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through
48
- data-unavailable:opacity-30`,
49
- // Range-specific styles
50
- isRange && `data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive
43
+ data-unavailable:opacity-30`, isRange && `data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive
51
44
  data-invalid:data-selection-start:bg-destructive data-selection-end:bg-primary
52
45
  data-selection-start:bg-primary data-selection-end:text-primary-foreground
53
46
  data-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none
54
47
  data-selection-end:rounded-e-md data-invalid:data-selection-end:text-white
55
- data-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`,
56
- // Today indicator styles
57
- date.compare(now) === 0 && cn(
58
- `after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10
59
- after:size-[3px] after:-translate-x-1/2 after:rounded-full`,
60
- isRange ? "data-selection-end:after:bg-background data-selection-start:after:bg-background" : "data-selected:after:bg-background"
61
- )
62
- )
63
- }
64
- ) })
65
- ] });
48
+ data-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`, date.compare(now) === 0 && cn(`after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10
49
+ after:size-[3px] after:-translate-x-1/2 after:rounded-full`, isRange ? "data-selection-end:after:bg-background data-selection-start:after:bg-background" : "data-selected:after:bg-background"))
50
+ })
51
+ })] });
66
52
  }
67
53
  function Calendar({ className, ...props }) {
68
- return /* @__PURE__ */ jsxs(Calendar$1, { ...props, className: composeRenderProps(className, (className2) => cn("w-fit", className2)), children: [
69
- /* @__PURE__ */ jsx(CalendarHeader, {}),
70
- /* @__PURE__ */ jsx(CalendarGridComponent, {})
71
- ] });
54
+ return /* @__PURE__ */ jsxs(Calendar$1, {
55
+ ...props,
56
+ className: composeRenderProps(className, (className) => cn("w-fit", className)),
57
+ children: [/* @__PURE__ */ jsx(CalendarHeader, {}), /* @__PURE__ */ jsx(CalendarGridComponent, {})]
58
+ });
72
59
  }
73
60
  function RangeCalendar({ className, ...props }) {
74
- return /* @__PURE__ */ jsxs(RangeCalendar$1, { ...props, className: composeRenderProps(className, (className2) => cn("w-fit", className2)), children: [
75
- /* @__PURE__ */ jsx(CalendarHeader, {}),
76
- /* @__PURE__ */ jsx(CalendarGridComponent, { isRange: true })
77
- ] });
61
+ return /* @__PURE__ */ jsxs(RangeCalendar$1, {
62
+ ...props,
63
+ className: composeRenderProps(className, (className) => cn("w-fit", className)),
64
+ children: [/* @__PURE__ */ jsx(CalendarHeader, {}), /* @__PURE__ */ jsx(CalendarGridComponent, { isRange: true })]
65
+ });
78
66
  }
79
67
 
68
+ //#endregion
80
69
  export { Calendar, RangeCalendar };
81
- //# sourceMappingURL=calendar-rac.js.map
82
70
  //# sourceMappingURL=calendar-rac.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/calendar-rac.tsx"],"names":["HeadingRac","CalendarGridRac","CalendarGridHeaderRac","CalendarHeaderCellRac","CalendarGridBodyRac","CalendarCellRac","CalendarRac","className","RangeCalendarRac"],"mappings":";;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACsBA,SAAS,cAAA,GAAiB;AACzB,EAAA,uBACC,IAAA,CAAC,QAAA,EAAA,EAAO,SAAA,EAAU,qCAAA,EACjB,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACA,IAAA,EAAK,UAAA;AAAA,QACL,SAAA,EAAU,wNAAA;AAAA,QAGV,QAAA,kBAAA,GAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA,KAC5B;AAAA,oBACA,GAAA,CAACA,OAAA,EAAA,EAAW,SAAA,EAAU,sCAAA,EAAuC,CAAA;AAAA,oBAC7D,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACA,IAAA,EAAK,MAAA;AAAA,QACL,SAAA,EAAU,wNAAA;AAAA,QAGV,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA;AAC7B,GAAA,EACD,CAAA;AAEF;AAEA,SAAS,qBAAA,CAAsB,EAAE,OAAA,GAAU,KAAA,EAAM,EAA0B;AAC1E,EAAA,MAAM,GAAA,GAAM,KAAA,CAAM,gBAAA,EAAkB,CAAA;AAEpC,EAAA,4BACEC,YAAA,E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AAA,EAASA,UAAS,CAAC,CAAA,EAC1G,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAA,EAAA,EAAe,CAAA;AAAA,oBAChB,GAAA,CAAC,qBAAA,EAAA,EAAsB,OAAA,EAAO,IAAA,EAAC;AAAA,GAAA,EAChC,CAAA;AAEF","file":"calendar-rac.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport { ComponentProps } from 'react';\nimport { getLocalTimeZone, today } from '@internationalized/date';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport {\n\tButton,\n\tCalendarCell as CalendarCellRac,\n\tCalendarGridBody as CalendarGridBodyRac,\n\tCalendarGridHeader as CalendarGridHeaderRac,\n\tCalendarGrid as CalendarGridRac,\n\tCalendarHeaderCell as CalendarHeaderCellRac,\n\tCalendar as CalendarRac,\n\tcomposeRenderProps,\n\tHeading as HeadingRac,\n\tRangeCalendar as RangeCalendarRac,\n} from 'react-aria-components';\n\nimport { cn } from '../lib/utils';\n\ninterface BaseCalendarProps {\n\tclassName?: string;\n}\n\ntype CalendarProps = ComponentProps<typeof CalendarRac> & BaseCalendarProps;\ntype RangeCalendarProps = ComponentProps<typeof RangeCalendarRac> & BaseCalendarProps;\n\nfunction CalendarHeader() {\n\treturn (\n\t\t<header className='flex w-full items-center gap-1 pb-1'>\n\t\t\t<Button\n\t\t\t\tslot='previous'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronLeftIcon size={16} />\n\t\t\t</Button>\n\t\t\t<HeadingRac className='grow text-center text-sm font-medium' />\n\t\t\t<Button\n\t\t\t\tslot='next'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronRightIcon size={16} />\n\t\t\t</Button>\n\t\t</header>\n\t);\n}\n\nfunction CalendarGridComponent({ isRange = false }: { isRange?: boolean }) {\n\tconst now = today(getLocalTimeZone());\n\n\treturn (\n\t\t<CalendarGridRac>\n\t\t\t<CalendarGridHeaderRac>\n\t\t\t\t{(day) => (\n\t\t\t\t\t<CalendarHeaderCellRac className='text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium'>\n\t\t\t\t\t\t{day}\n\t\t\t\t\t</CalendarHeaderCellRac>\n\t\t\t\t)}\n\t\t\t</CalendarGridHeaderRac>\n\t\t\t<CalendarGridBodyRac className='[&_td]:px-0 [&_td]:py-px'>\n\t\t\t\t{(date) => (\n\t\t\t\t\t<CalendarCellRac\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground\n\t\t\t\t\t\t\tdata-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center\n\t\t\t\t\t\t\tjustify-center rounded-md p-0 text-sm font-normal whitespace-nowrap\n\t\t\t\t\t\t\t[transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none\n\t\t\t\t\t\t\tdata-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10\n\t\t\t\t\t\t\tdata-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through\n\t\t\t\t\t\t\tdata-unavailable:opacity-30`,\n\t\t\t\t\t\t\t// Range-specific styles\n\t\t\t\t\t\t\tisRange &&\n\t\t\t\t\t\t\t\t`data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive\n\t\t\t\t\t\t\t\tdata-invalid:data-selection-start:bg-destructive data-selection-end:bg-primary\n\t\t\t\t\t\t\t\tdata-selection-start:bg-primary data-selection-end:text-primary-foreground\n\t\t\t\t\t\t\t\tdata-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none\n\t\t\t\t\t\t\t\tdata-selection-end:rounded-e-md data-invalid:data-selection-end:text-white\n\t\t\t\t\t\t\t\tdata-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`,\n\t\t\t\t\t\t\t// Today indicator styles\n\t\t\t\t\t\t\tdate.compare(now) === 0 &&\n\t\t\t\t\t\t\t\tcn(\n\t\t\t\t\t\t\t\t\t`after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10\n\t\t\t\t\t\t\t\t\tafter:size-[3px] after:-translate-x-1/2 after:rounded-full`,\n\t\t\t\t\t\t\t\t\tisRange\n\t\t\t\t\t\t\t\t\t\t? 'data-selection-end:after:bg-background data-selection-start:after:bg-background'\n\t\t\t\t\t\t\t\t\t\t: 'data-selected:after:bg-background',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CalendarGridBodyRac>\n\t\t</CalendarGridRac>\n\t);\n}\n\nfunction Calendar({ className, ...props }: CalendarProps) {\n\treturn (\n\t\t<CalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent />\n\t\t</CalendarRac>\n\t);\n}\n\nfunction RangeCalendar({ className, ...props }: RangeCalendarProps) {\n\treturn (\n\t\t<RangeCalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent isRange />\n\t\t</RangeCalendarRac>\n\t);\n}\n\nexport { Calendar, RangeCalendar };\n"]}
1
+ {"version":3,"file":"calendar-rac.js","names":["HeadingRac","CalendarGridRac","CalendarGridHeaderRac","CalendarHeaderCellRac","CalendarGridBodyRac","CalendarCellRac","CalendarRac","RangeCalendarRac"],"sources":["../../src/components/calendar-rac.tsx"],"sourcesContent":["'use client';\n\nimport { ComponentProps } from 'react';\nimport { getLocalTimeZone, today } from '@internationalized/date';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport {\n\tButton,\n\tCalendarCell as CalendarCellRac,\n\tCalendarGridBody as CalendarGridBodyRac,\n\tCalendarGridHeader as CalendarGridHeaderRac,\n\tCalendarGrid as CalendarGridRac,\n\tCalendarHeaderCell as CalendarHeaderCellRac,\n\tCalendar as CalendarRac,\n\tcomposeRenderProps,\n\tHeading as HeadingRac,\n\tRangeCalendar as RangeCalendarRac,\n} from 'react-aria-components';\n\nimport { cn } from '../lib/utils';\n\ninterface BaseCalendarProps {\n\tclassName?: string;\n}\n\ntype CalendarProps = ComponentProps<typeof CalendarRac> & BaseCalendarProps;\ntype RangeCalendarProps = ComponentProps<typeof RangeCalendarRac> & BaseCalendarProps;\n\nfunction CalendarHeader() {\n\treturn (\n\t\t<header className='flex w-full items-center gap-1 pb-1'>\n\t\t\t<Button\n\t\t\t\tslot='previous'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronLeftIcon size={16} />\n\t\t\t</Button>\n\t\t\t<HeadingRac className='grow text-center text-sm font-medium' />\n\t\t\t<Button\n\t\t\t\tslot='next'\n\t\t\t\tclassName='text-muted-foreground/80 hover:bg-accent hover:text-foreground focus-visible:ring-ring/50 flex size-9\n\t\t\t\t\titems-center justify-center rounded-md transition-[color,box-shadow] outline-none focus-visible:ring-[3px]'\n\t\t\t>\n\t\t\t\t<ChevronRightIcon size={16} />\n\t\t\t</Button>\n\t\t</header>\n\t);\n}\n\nfunction CalendarGridComponent({ isRange = false }: { isRange?: boolean }) {\n\tconst now = today(getLocalTimeZone());\n\n\treturn (\n\t\t<CalendarGridRac>\n\t\t\t<CalendarGridHeaderRac>\n\t\t\t\t{(day) => (\n\t\t\t\t\t<CalendarHeaderCellRac className='text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium'>\n\t\t\t\t\t\t{day}\n\t\t\t\t\t</CalendarHeaderCellRac>\n\t\t\t\t)}\n\t\t\t</CalendarGridHeaderRac>\n\t\t\t<CalendarGridBodyRac className='[&_td]:px-0 [&_td]:py-px'>\n\t\t\t\t{(date) => (\n\t\t\t\t\t<CalendarCellRac\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground\n\t\t\t\t\t\t\tdata-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center\n\t\t\t\t\t\t\tjustify-center rounded-md p-0 text-sm font-normal whitespace-nowrap\n\t\t\t\t\t\t\t[transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none\n\t\t\t\t\t\t\tdata-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10\n\t\t\t\t\t\t\tdata-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through\n\t\t\t\t\t\t\tdata-unavailable:opacity-30`,\n\t\t\t\t\t\t\t// Range-specific styles\n\t\t\t\t\t\t\tisRange &&\n\t\t\t\t\t\t\t\t`data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive\n\t\t\t\t\t\t\t\tdata-invalid:data-selection-start:bg-destructive data-selection-end:bg-primary\n\t\t\t\t\t\t\t\tdata-selection-start:bg-primary data-selection-end:text-primary-foreground\n\t\t\t\t\t\t\t\tdata-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none\n\t\t\t\t\t\t\t\tdata-selection-end:rounded-e-md data-invalid:data-selection-end:text-white\n\t\t\t\t\t\t\t\tdata-selection-start:rounded-s-md data-invalid:data-selection-start:text-white`,\n\t\t\t\t\t\t\t// Today indicator styles\n\t\t\t\t\t\t\tdate.compare(now) === 0 &&\n\t\t\t\t\t\t\t\tcn(\n\t\t\t\t\t\t\t\t\t`after:bg-primary after:pointer-events-none after:absolute after:start-1/2 after:bottom-1 after:z-10\n\t\t\t\t\t\t\t\t\tafter:size-[3px] after:-translate-x-1/2 after:rounded-full`,\n\t\t\t\t\t\t\t\t\tisRange\n\t\t\t\t\t\t\t\t\t\t? 'data-selection-end:after:bg-background data-selection-start:after:bg-background'\n\t\t\t\t\t\t\t\t\t\t: 'data-selected:after:bg-background',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</CalendarGridBodyRac>\n\t\t</CalendarGridRac>\n\t);\n}\n\nfunction Calendar({ className, ...props }: CalendarProps) {\n\treturn (\n\t\t<CalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent />\n\t\t</CalendarRac>\n\t);\n}\n\nfunction RangeCalendar({ className, ...props }: RangeCalendarProps) {\n\treturn (\n\t\t<RangeCalendarRac {...props} className={composeRenderProps(className, (className) => cn('w-fit', className))}>\n\t\t\t<CalendarHeader />\n\t\t\t<CalendarGridComponent isRange />\n\t\t</RangeCalendarRac>\n\t);\n}\n\nexport { Calendar, RangeCalendar };\n"],"mappings":";;;;;;;;;AA2BA,SAAS,iBAAiB;CACzB,OACC,qBAAC,UAAD;EAAQ,WAAU;YAAlB;GACC,oBAAC,QAAD;IACC,MAAK;IACL,WAAU;cAGV,oBAAC,iBAAD,EAAiB,MAAM,GAAK;GACrB;GACR,oBAACA,SAAD,EAAY,WAAU,uCAAwC;GAC9D,oBAAC,QAAD;IACC,MAAK;IACL,WAAU;cAGV,oBAAC,kBAAD,EAAkB,MAAM,GAAK;GACtB;EACD;;AAEV;AAEA,SAAS,sBAAsB,EAAE,UAAU,SAAgC;CAC1E,MAAM,MAAM,MAAM,iBAAiB,CAAC;CAEpC,OACC,qBAACC,cAAD,aACC,oBAACC,oBAAD,aACG,QACD,oBAACC,oBAAD;EAAuB,WAAU;YAC/B;CACqB,GAEF,IACvB,oBAACC,kBAAD;EAAqB,WAAU;aAC5B,SACD,oBAACC,cAAD;GACO;GACN,WAAW,GACV;;;;;;qCAQA,WACC;;;;;yFAOD,KAAK,QAAQ,GAAG,MAAM,KACrB,GACC;sEAEA,UACG,oFACA,mCACJ,CACF;EACA;CAEkB,EACL;AAEnB;AAEA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;CACzD,OACC,qBAACC,YAAD;EAAa,GAAI;EAAO,WAAW,mBAAmB,YAAY,cAAc,GAAG,SAAS,SAAS,CAAC;YAAtG,CACC,oBAAC,gBAAD,CAAiB,IACjB,oBAAC,uBAAD,CAAwB,EACZ;;AAEf;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;CACnE,OACC,qBAACC,iBAAD;EAAkB,GAAI;EAAO,WAAW,mBAAmB,YAAY,cAAc,GAAG,SAAS,SAAS,CAAC;YAA3G,CACC,oBAAC,gBAAD,CAAiB,IACjB,oBAAC,uBAAD,EAAuB,cAAS,EACf;;AAEpB"}
@@ -1,92 +1,80 @@
1
- "use client";
2
- 'use strict';
1
+ 'use client';
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
4
+ const require_utils = require('../utils-CzTQ3-VI.cjs');
5
+ let react = require("react");
6
+ react = require_rolldown_runtime.__toESM(react, 1);
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ let class_variance_authority = require("class-variance-authority");
3
9
 
4
- var classVarianceAuthority = require('class-variance-authority');
5
- var clsx = require('clsx');
6
- var tailwindMerge = require('tailwind-merge');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- // src/components/card.tsx
10
- function cn(...inputs) {
11
- return tailwindMerge.twMerge(clsx.clsx(inputs));
12
- }
13
- var cardVariants = classVarianceAuthority.cva(
14
- // Base styles
15
- "bg-card text-card-foreground flex flex-col gap-6 rounded-xl py-6",
16
- {
17
- variants: {
18
- variant: {
19
- default: "shadow-card",
20
- elevated: "shadow-card-lg",
21
- flat: "border border-border/60 shadow-none",
22
- ghost: "bg-transparent shadow-none",
23
- interactive: [
24
- "shadow-card",
25
- "hover:shadow-card-lg motion-safe:hover:-translate-y-0.5",
26
- "transition-[box-shadow,translate] duration-200 motion-reduce:transition-shadow",
27
- "cursor-pointer"
28
- ]
29
- }
30
- },
31
- defaultVariants: {
32
- variant: "default"
33
- }
34
- }
35
- );
10
+ //#region src/components/card.tsx
11
+ const cardVariants = (0, class_variance_authority.cva)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl py-6", {
12
+ variants: { variant: {
13
+ default: "shadow-card",
14
+ elevated: "shadow-card-lg",
15
+ flat: "border border-border/60 shadow-none",
16
+ ghost: "bg-transparent shadow-none",
17
+ interactive: [
18
+ "shadow-card",
19
+ "hover:shadow-card-lg motion-safe:hover:-translate-y-0.5",
20
+ "transition-[box-shadow,translate] duration-200 motion-reduce:transition-shadow",
21
+ "cursor-pointer"
22
+ ]
23
+ } },
24
+ defaultVariants: { variant: "default" }
25
+ });
36
26
  function Card({ className, variant, ...props }) {
37
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "card", className: cn(cardVariants({ variant }), className), ...props });
27
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
28
+ "data-slot": "card",
29
+ className: require_utils.cn(cardVariants({ variant }), className),
30
+ ...props
31
+ });
38
32
  }
39
33
  function CardHeader({ className, ...props }) {
40
- return /* @__PURE__ */ jsxRuntime.jsx(
41
- "div",
42
- {
43
- "data-slot": "card-header",
44
- className: cn(
45
- `@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6
46
- has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,
47
- className
48
- ),
49
- ...props
50
- }
51
- );
34
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
35
+ "data-slot": "card-header",
36
+ className: require_utils.cn(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6
37
+ has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`, className),
38
+ ...props
39
+ });
52
40
  }
53
41
  function CardTitle({ className, ...props }) {
54
- return /* @__PURE__ */ jsxRuntime.jsx(
55
- "div",
56
- {
57
- "data-slot": "card-title",
58
- className: cn("text-balance leading-none font-semibold tracking-tight", className),
59
- ...props
60
- }
61
- );
42
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
43
+ "data-slot": "card-title",
44
+ className: require_utils.cn("text-balance leading-none font-semibold tracking-tight", className),
45
+ ...props
46
+ });
62
47
  }
63
48
  function CardDescription({ className, ...props }) {
64
- return /* @__PURE__ */ jsxRuntime.jsx(
65
- "div",
66
- {
67
- "data-slot": "card-description",
68
- className: cn("text-muted-foreground text-pretty text-sm", className),
69
- ...props
70
- }
71
- );
49
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
50
+ "data-slot": "card-description",
51
+ className: require_utils.cn("text-muted-foreground text-pretty text-sm", className),
52
+ ...props
53
+ });
72
54
  }
73
55
  function CardAction({ className, ...props }) {
74
- return /* @__PURE__ */ jsxRuntime.jsx(
75
- "div",
76
- {
77
- "data-slot": "card-action",
78
- className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
79
- ...props
80
- }
81
- );
56
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
57
+ "data-slot": "card-action",
58
+ className: require_utils.cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
59
+ ...props
60
+ });
82
61
  }
83
62
  function CardContent({ className, ...props }) {
84
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props });
63
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
64
+ "data-slot": "card-content",
65
+ className: require_utils.cn("px-6", className),
66
+ ...props
67
+ });
85
68
  }
86
69
  function CardFooter({ className, ...props }) {
87
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className), ...props });
70
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
71
+ "data-slot": "card-footer",
72
+ className: require_utils.cn("flex items-center px-6 [.border-t]:pt-6", className),
73
+ ...props
74
+ });
88
75
  }
89
76
 
77
+ //#endregion
90
78
  exports.Card = Card;
91
79
  exports.CardAction = CardAction;
92
80
  exports.CardContent = CardContent;
@@ -95,5 +83,4 @@ exports.CardFooter = CardFooter;
95
83
  exports.CardHeader = CardHeader;
96
84
  exports.CardTitle = CardTitle;
97
85
  exports.cardVariants = cardVariants;
98
- //# sourceMappingURL=card.cjs.map
99
86
  //# sourceMappingURL=card.cjs.map