@constructive-io/ui 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +1 -1
  2. package/dist/{ai-CiaH2sfF.js → ai-4JrVVL3q.js} +1794 -250
  3. package/dist/ai-4JrVVL3q.js.map +1 -0
  4. package/dist/{ai-lAkichk8.cjs → ai-B08ufcbD.cjs} +1888 -248
  5. package/dist/ai-B08ufcbD.cjs.map +1 -0
  6. package/dist/{alert-BXuP0ayz.d.ts → alert-CJ4Qyk6W.d.cts} +4 -2
  7. package/dist/{alert-BXuP0ayz.d.cts → alert-CJ4Qyk6W.d.ts} +4 -2
  8. package/dist/components/accordion.cjs +60 -0
  9. package/dist/components/accordion.cjs.map +1 -0
  10. package/dist/components/accordion.d.cts +14 -0
  11. package/dist/components/accordion.d.ts +14 -0
  12. package/dist/components/accordion.js +54 -0
  13. package/dist/components/accordion.js.map +1 -0
  14. package/dist/components/ai/index.cjs +17 -1
  15. package/dist/components/ai/index.d.cts +2 -2
  16. package/dist/components/ai/index.d.ts +2 -2
  17. package/dist/components/ai/index.js +2 -2
  18. package/dist/components/alert-dialog.cjs +17 -8
  19. package/dist/components/alert-dialog.cjs.map +1 -1
  20. package/dist/components/alert-dialog.d.cts +1 -1
  21. package/dist/components/alert-dialog.d.ts +1 -1
  22. package/dist/components/alert-dialog.js +17 -8
  23. package/dist/components/alert-dialog.js.map +1 -1
  24. package/dist/components/alert.cjs +18 -8
  25. package/dist/components/alert.cjs.map +1 -1
  26. package/dist/components/alert.d.cts +2 -2
  27. package/dist/components/alert.d.ts +2 -2
  28. package/dist/components/alert.js +18 -9
  29. package/dist/components/alert.js.map +1 -1
  30. package/dist/components/autocomplete.cjs +9 -5
  31. package/dist/components/autocomplete.cjs.map +1 -1
  32. package/dist/components/autocomplete.js +9 -5
  33. package/dist/components/autocomplete.js.map +1 -1
  34. package/dist/components/avatar.cjs +9 -3
  35. package/dist/components/avatar.cjs.map +1 -1
  36. package/dist/components/avatar.d.cts +6 -0
  37. package/dist/components/avatar.d.ts +6 -0
  38. package/dist/components/avatar.js +9 -3
  39. package/dist/components/avatar.js.map +1 -1
  40. package/dist/components/badge.cjs +25 -18
  41. package/dist/components/badge.cjs.map +1 -1
  42. package/dist/components/badge.d.cts +2 -2
  43. package/dist/components/badge.d.ts +2 -2
  44. package/dist/components/badge.js +25 -18
  45. package/dist/components/badge.js.map +1 -1
  46. package/dist/components/breadcrumb.cjs +9 -6
  47. package/dist/components/breadcrumb.cjs.map +1 -1
  48. package/dist/components/breadcrumb.js +9 -6
  49. package/dist/components/breadcrumb.js.map +1 -1
  50. package/dist/components/button-group.cjs +57 -0
  51. package/dist/components/button-group.cjs.map +1 -0
  52. package/dist/components/button-group.d.cts +16 -0
  53. package/dist/components/button-group.d.ts +16 -0
  54. package/dist/components/button-group.js +51 -0
  55. package/dist/components/button-group.js.map +1 -0
  56. package/dist/components/button.cjs +62 -18
  57. package/dist/components/button.cjs.map +1 -1
  58. package/dist/components/button.d.cts +32 -2
  59. package/dist/components/button.d.ts +32 -2
  60. package/dist/components/button.js +62 -18
  61. package/dist/components/button.js.map +1 -1
  62. package/dist/components/calendar-rac.cjs +14 -8
  63. package/dist/components/calendar-rac.cjs.map +1 -1
  64. package/dist/components/calendar-rac.js +14 -8
  65. package/dist/components/calendar-rac.js.map +1 -1
  66. package/dist/components/card.cjs +35 -23
  67. package/dist/components/card.cjs.map +1 -1
  68. package/dist/components/card.d.cts +3 -2
  69. package/dist/components/card.d.ts +3 -2
  70. package/dist/components/card.js +35 -23
  71. package/dist/components/card.js.map +1 -1
  72. package/dist/components/checkbox.cjs +5 -5
  73. package/dist/components/checkbox.cjs.map +1 -1
  74. package/dist/components/checkbox.js +5 -5
  75. package/dist/components/checkbox.js.map +1 -1
  76. package/dist/components/collapsible.cjs +3 -3
  77. package/dist/components/collapsible.cjs.map +1 -1
  78. package/dist/components/collapsible.js +3 -3
  79. package/dist/components/collapsible.js.map +1 -1
  80. package/dist/components/combobox.cjs +24 -12
  81. package/dist/components/combobox.cjs.map +1 -1
  82. package/dist/components/combobox.d.cts +2 -1
  83. package/dist/components/combobox.d.ts +2 -1
  84. package/dist/components/combobox.js +24 -12
  85. package/dist/components/combobox.js.map +1 -1
  86. package/dist/components/command.cjs +30 -14
  87. package/dist/components/command.cjs.map +1 -1
  88. package/dist/components/command.d.cts +9 -2
  89. package/dist/components/command.d.ts +9 -2
  90. package/dist/components/command.js +30 -14
  91. package/dist/components/command.js.map +1 -1
  92. package/dist/components/dialog.cjs +22 -12
  93. package/dist/components/dialog.cjs.map +1 -1
  94. package/dist/components/dialog.d.cts +5 -2
  95. package/dist/components/dialog.d.ts +5 -2
  96. package/dist/components/dialog.js +22 -12
  97. package/dist/components/dialog.js.map +1 -1
  98. package/dist/components/dock.cjs +50 -27
  99. package/dist/components/dock.cjs.map +1 -1
  100. package/dist/components/dock.d.cts +1 -1
  101. package/dist/components/dock.d.ts +1 -1
  102. package/dist/components/dock.js +51 -28
  103. package/dist/components/dock.js.map +1 -1
  104. package/dist/components/drawer.cjs +22 -14
  105. package/dist/components/drawer.cjs.map +1 -1
  106. package/dist/components/drawer.js +22 -14
  107. package/dist/components/drawer.js.map +1 -1
  108. package/dist/components/dropdown-menu.cjs +34 -28
  109. package/dist/components/dropdown-menu.cjs.map +1 -1
  110. package/dist/components/dropdown-menu.d.cts +2 -2
  111. package/dist/components/dropdown-menu.d.ts +2 -2
  112. package/dist/components/dropdown-menu.js +52 -46
  113. package/dist/components/dropdown-menu.js.map +1 -1
  114. package/dist/components/empty.cjs +4 -4
  115. package/dist/components/empty.cjs.map +1 -1
  116. package/dist/components/empty.js +4 -4
  117. package/dist/components/empty.js.map +1 -1
  118. package/dist/components/field.cjs +33 -33
  119. package/dist/components/field.cjs.map +1 -1
  120. package/dist/components/field.js +34 -34
  121. package/dist/components/field.js.map +1 -1
  122. package/dist/components/flickering-grid.cjs +1 -1
  123. package/dist/components/flickering-grid.cjs.map +1 -1
  124. package/dist/components/flickering-grid.js +1 -1
  125. package/dist/components/flickering-grid.js.map +1 -1
  126. package/dist/components/flow-zoom-panel.cjs +10 -5
  127. package/dist/components/flow-zoom-panel.cjs.map +1 -1
  128. package/dist/components/flow-zoom-panel.d.cts +8 -1
  129. package/dist/components/flow-zoom-panel.d.ts +8 -1
  130. package/dist/components/flow-zoom-panel.js +10 -5
  131. package/dist/components/flow-zoom-panel.js.map +1 -1
  132. package/dist/components/form-control.cjs +12 -8
  133. package/dist/components/form-control.cjs.map +1 -1
  134. package/dist/components/form-control.js +12 -8
  135. package/dist/components/form-control.js.map +1 -1
  136. package/dist/components/form.cjs +5 -5
  137. package/dist/components/form.cjs.map +1 -1
  138. package/dist/components/form.js +5 -5
  139. package/dist/components/form.js.map +1 -1
  140. package/dist/components/input-group.cjs +13 -7
  141. package/dist/components/input-group.cjs.map +1 -1
  142. package/dist/components/input-group.d.cts +2 -2
  143. package/dist/components/input-group.d.ts +2 -2
  144. package/dist/components/input-group.js +11 -7
  145. package/dist/components/input-group.js.map +1 -1
  146. package/dist/components/input-otp.cjs +252 -0
  147. package/dist/components/input-otp.cjs.map +1 -0
  148. package/dist/components/input-otp.d.cts +44 -0
  149. package/dist/components/input-otp.d.ts +44 -0
  150. package/dist/components/input-otp.js +251 -0
  151. package/dist/components/input-otp.js.map +1 -0
  152. package/dist/components/input.cjs +10 -4
  153. package/dist/components/input.cjs.map +1 -1
  154. package/dist/components/input.d.cts +11 -2
  155. package/dist/components/input.d.ts +11 -2
  156. package/dist/components/input.js +10 -4
  157. package/dist/components/input.js.map +1 -1
  158. package/dist/components/item.cjs +151 -0
  159. package/dist/components/item.cjs.map +1 -0
  160. package/dist/components/item.d.cts +37 -0
  161. package/dist/components/item.d.ts +37 -0
  162. package/dist/components/item.js +137 -0
  163. package/dist/components/item.js.map +1 -0
  164. package/dist/components/json-input.cjs +4 -143
  165. package/dist/components/json-input.d.cts +6 -4
  166. package/dist/components/json-input.d.ts +6 -4
  167. package/dist/components/json-input.js +2 -140
  168. package/dist/components/kbd.cjs +35 -0
  169. package/dist/components/kbd.cjs.map +1 -0
  170. package/dist/components/kbd.d.cts +16 -0
  171. package/dist/components/kbd.d.ts +16 -0
  172. package/dist/components/kbd.js +31 -0
  173. package/dist/components/kbd.js.map +1 -0
  174. package/dist/components/label.cjs +3 -3
  175. package/dist/components/label.cjs.map +1 -1
  176. package/dist/components/label.js +3 -3
  177. package/dist/components/label.js.map +1 -1
  178. package/dist/components/motion-grid.cjs +20 -8
  179. package/dist/components/motion-grid.cjs.map +1 -1
  180. package/dist/components/motion-grid.js +20 -8
  181. package/dist/components/motion-grid.js.map +1 -1
  182. package/dist/components/multi-select.cjs +77 -67
  183. package/dist/components/multi-select.cjs.map +1 -1
  184. package/dist/components/multi-select.js +77 -67
  185. package/dist/components/multi-select.js.map +1 -1
  186. package/dist/components/page-header.cjs +12 -9
  187. package/dist/components/page-header.cjs.map +1 -1
  188. package/dist/components/page-header.js +12 -9
  189. package/dist/components/page-header.js.map +1 -1
  190. package/dist/components/pagination.cjs +10 -4
  191. package/dist/components/pagination.cjs.map +1 -1
  192. package/dist/components/pagination.d.cts +1 -1
  193. package/dist/components/pagination.d.ts +1 -1
  194. package/dist/components/pagination.js +10 -4
  195. package/dist/components/pagination.js.map +1 -1
  196. package/dist/components/phone-input.cjs +228 -0
  197. package/dist/components/phone-input.cjs.map +1 -0
  198. package/dist/components/phone-input.d.cts +42 -0
  199. package/dist/components/phone-input.d.ts +42 -0
  200. package/dist/components/phone-input.js +220 -0
  201. package/dist/components/phone-input.js.map +1 -0
  202. package/dist/components/popover.cjs +12 -4
  203. package/dist/components/popover.cjs.map +1 -1
  204. package/dist/components/popover.d.cts +7 -1
  205. package/dist/components/popover.d.ts +7 -1
  206. package/dist/components/popover.js +12 -5
  207. package/dist/components/popover.js.map +1 -1
  208. package/dist/components/progress.cjs +20 -3
  209. package/dist/components/progress.cjs.map +1 -1
  210. package/dist/components/progress.d.cts +1 -1
  211. package/dist/components/progress.d.ts +1 -1
  212. package/dist/components/progress.js +20 -3
  213. package/dist/components/progress.js.map +1 -1
  214. package/dist/components/progressive-blur-scroll-container.cjs +2 -2
  215. package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
  216. package/dist/components/progressive-blur-scroll-container.d.cts +1 -1
  217. package/dist/components/progressive-blur-scroll-container.d.ts +1 -1
  218. package/dist/components/progressive-blur-scroll-container.js +2 -2
  219. package/dist/components/progressive-blur-scroll-container.js.map +1 -1
  220. package/dist/components/progressive-blur.cjs +3 -2
  221. package/dist/components/progressive-blur.cjs.map +1 -1
  222. package/dist/components/progressive-blur.js +3 -2
  223. package/dist/components/progressive-blur.js.map +1 -1
  224. package/dist/components/radio-group.cjs +2 -2
  225. package/dist/components/radio-group.cjs.map +1 -1
  226. package/dist/components/radio-group.js +2 -2
  227. package/dist/components/radio-group.js.map +1 -1
  228. package/dist/components/record-picker.cjs +1 -1
  229. package/dist/components/record-picker.js +1 -1
  230. package/dist/components/resizable.cjs +2 -2
  231. package/dist/components/resizable.cjs.map +1 -1
  232. package/dist/components/resizable.js +2 -2
  233. package/dist/components/resizable.js.map +1 -1
  234. package/dist/components/responsive-diagram.cjs +43 -21
  235. package/dist/components/responsive-diagram.cjs.map +1 -1
  236. package/dist/components/responsive-diagram.d.cts +7 -1
  237. package/dist/components/responsive-diagram.d.ts +7 -1
  238. package/dist/components/responsive-diagram.js +43 -21
  239. package/dist/components/responsive-diagram.js.map +1 -1
  240. package/dist/components/scroll-area.cjs +2 -2
  241. package/dist/components/scroll-area.cjs.map +1 -1
  242. package/dist/components/scroll-area.js +2 -2
  243. package/dist/components/scroll-area.js.map +1 -1
  244. package/dist/components/select.cjs +84 -20
  245. package/dist/components/select.cjs.map +1 -1
  246. package/dist/components/select.d.cts +12 -7
  247. package/dist/components/select.d.ts +12 -7
  248. package/dist/components/select.js +84 -20
  249. package/dist/components/select.js.map +1 -1
  250. package/dist/components/separator.cjs +1 -1
  251. package/dist/components/separator.cjs.map +1 -1
  252. package/dist/components/separator.d.cts +11 -2
  253. package/dist/components/separator.d.ts +11 -2
  254. package/dist/components/separator.js +1 -1
  255. package/dist/components/separator.js.map +1 -1
  256. package/dist/components/sheet.cjs +1 -1
  257. package/dist/components/sheet.d.cts +11 -5
  258. package/dist/components/sheet.d.ts +12 -6
  259. package/dist/components/sheet.js +1 -1
  260. package/dist/components/sidebar.cjs +2 -1
  261. package/dist/components/sidebar.d.cts +8 -7
  262. package/dist/components/sidebar.d.ts +8 -7
  263. package/dist/components/sidebar.js +2 -1
  264. package/dist/components/slider.cjs +47 -0
  265. package/dist/components/slider.cjs.map +1 -0
  266. package/dist/components/slider.d.cts +8 -0
  267. package/dist/components/slider.d.ts +8 -0
  268. package/dist/components/slider.js +44 -0
  269. package/dist/components/slider.js.map +1 -0
  270. package/dist/components/sonner.cjs +15 -4
  271. package/dist/components/sonner.cjs.map +1 -1
  272. package/dist/components/sonner.d.cts +10 -1
  273. package/dist/components/sonner.d.ts +10 -1
  274. package/dist/components/sonner.js +16 -5
  275. package/dist/components/sonner.js.map +1 -1
  276. package/dist/components/spinner.cjs +25 -0
  277. package/dist/components/spinner.cjs.map +1 -0
  278. package/dist/components/spinner.d.cts +16 -0
  279. package/dist/components/spinner.d.ts +16 -0
  280. package/dist/components/spinner.js +22 -0
  281. package/dist/components/spinner.js.map +1 -0
  282. package/dist/components/stack/index.cjs +1 -1
  283. package/dist/components/stack/index.d.cts +1 -1
  284. package/dist/components/stack/index.d.ts +1 -1
  285. package/dist/components/stack/index.js +1 -1
  286. package/dist/components/stepper.cjs +23 -17
  287. package/dist/components/stepper.cjs.map +1 -1
  288. package/dist/components/stepper.d.cts +2 -2
  289. package/dist/components/stepper.d.ts +2 -2
  290. package/dist/components/stepper.js +23 -17
  291. package/dist/components/stepper.js.map +1 -1
  292. package/dist/components/switch.cjs +5 -5
  293. package/dist/components/switch.cjs.map +1 -1
  294. package/dist/components/switch.js +5 -5
  295. package/dist/components/switch.js.map +1 -1
  296. package/dist/components/table.cjs +26 -7
  297. package/dist/components/table.cjs.map +1 -1
  298. package/dist/components/table.d.cts +20 -2
  299. package/dist/components/table.d.ts +20 -2
  300. package/dist/components/table.js +26 -8
  301. package/dist/components/table.js.map +1 -1
  302. package/dist/components/tabs.cjs +64 -8
  303. package/dist/components/tabs.cjs.map +1 -1
  304. package/dist/components/tabs.d.cts +13 -2
  305. package/dist/components/tabs.d.ts +13 -2
  306. package/dist/components/tabs.js +66 -11
  307. package/dist/components/tabs.js.map +1 -1
  308. package/dist/components/tags.cjs +10 -5
  309. package/dist/components/tags.cjs.map +1 -1
  310. package/dist/components/tags.d.cts +1 -1
  311. package/dist/components/tags.d.ts +1 -1
  312. package/dist/components/tags.js +10 -5
  313. package/dist/components/tags.js.map +1 -1
  314. package/dist/components/textarea.cjs +5 -4
  315. package/dist/components/textarea.cjs.map +1 -1
  316. package/dist/components/textarea.js +5 -4
  317. package/dist/components/textarea.js.map +1 -1
  318. package/dist/components/toast/index.cjs +1 -1
  319. package/dist/components/toast/index.d.cts +2 -2
  320. package/dist/components/toast/index.d.ts +2 -2
  321. package/dist/components/toast/index.js +1 -1
  322. package/dist/components/toggle-group.cjs +69 -0
  323. package/dist/components/toggle-group.cjs.map +1 -0
  324. package/dist/components/toggle-group.d.cts +27 -0
  325. package/dist/components/toggle-group.d.ts +27 -0
  326. package/dist/components/toggle-group.js +65 -0
  327. package/dist/components/toggle-group.js.map +1 -0
  328. package/dist/components/toggle.cjs +54 -0
  329. package/dist/components/toggle.cjs.map +1 -0
  330. package/dist/components/toggle.d.cts +13 -0
  331. package/dist/components/toggle.d.ts +13 -0
  332. package/dist/components/toggle.js +50 -0
  333. package/dist/components/toggle.js.map +1 -0
  334. package/dist/components/tooltip.cjs +18 -6
  335. package/dist/components/tooltip.cjs.map +1 -1
  336. package/dist/components/tooltip.d.cts +1 -1
  337. package/dist/components/tooltip.d.ts +1 -1
  338. package/dist/components/tooltip.js +18 -6
  339. package/dist/components/tooltip.js.map +1 -1
  340. package/dist/components/unlink-button.cjs +2 -2
  341. package/dist/components/unlink-button.cjs.map +1 -1
  342. package/dist/components/unlink-button.d.cts +1 -0
  343. package/dist/components/unlink-button.d.ts +1 -0
  344. package/dist/components/unlink-button.js +2 -2
  345. package/dist/components/unlink-button.js.map +1 -1
  346. package/dist/components/workspace-kit/index.cjs +1507 -0
  347. package/dist/components/workspace-kit/index.cjs.map +1 -0
  348. package/dist/components/workspace-kit/index.d.cts +728 -0
  349. package/dist/components/workspace-kit/index.d.ts +728 -0
  350. package/dist/components/workspace-kit/index.js +1440 -0
  351. package/dist/components/workspace-kit/index.js.map +1 -0
  352. package/dist/compose-refs-Mbma1O3M.js +47 -0
  353. package/dist/compose-refs-Mbma1O3M.js.map +1 -0
  354. package/dist/compose-refs-uPrvNoiU.cjs +52 -0
  355. package/dist/compose-refs-uPrvNoiU.cjs.map +1 -0
  356. package/dist/fluid-highlight-CNELHV8o.js +134 -0
  357. package/dist/fluid-highlight-CNELHV8o.js.map +1 -0
  358. package/dist/fluid-highlight-YWFRZXsw.cjs +145 -0
  359. package/dist/fluid-highlight-YWFRZXsw.cjs.map +1 -0
  360. package/dist/{index-BzLmDsId.d.cts → index-B7cT7gZU.d.cts} +3 -3
  361. package/dist/{index-BzLmDsId.d.ts → index-B7cT7gZU.d.ts} +3 -3
  362. package/dist/{index-UnM04j0t.d.ts → index-BQZxmMpw.d.cts} +11 -31
  363. package/dist/{index-UnM04j0t.d.cts → index-BQZxmMpw.d.ts} +11 -31
  364. package/dist/{index-CyaFaZe2.d.cts → index-Cluc_xc5.d.ts} +345 -20
  365. package/dist/{index-B0wXxIAb.d.ts → index-DXoG0ghv.d.cts} +345 -20
  366. package/dist/index.cjs +107 -17
  367. package/dist/index.d.cts +64 -14
  368. package/dist/index.d.ts +64 -14
  369. package/dist/index.js +27 -14
  370. package/dist/initial-focus-B8RLtyOZ.cjs +67 -0
  371. package/dist/initial-focus-B8RLtyOZ.cjs.map +1 -0
  372. package/dist/initial-focus-j2E0EnIx.js +61 -0
  373. package/dist/initial-focus-j2E0EnIx.js.map +1 -0
  374. package/dist/initials-DSkWTOb0.cjs +127 -0
  375. package/dist/initials-DSkWTOb0.cjs.map +1 -0
  376. package/dist/initials-kCcHgrSy.js +97 -0
  377. package/dist/initials-kCcHgrSy.js.map +1 -0
  378. package/dist/json-input-CH5aEmoA.js +293 -0
  379. package/dist/json-input-CH5aEmoA.js.map +1 -0
  380. package/dist/json-input-D8yM578l.cjs +311 -0
  381. package/dist/json-input-D8yM578l.cjs.map +1 -0
  382. package/dist/{motion-config-COCFHq1L.cjs → motion-config-DZ7w5Uhq.cjs} +32 -2
  383. package/dist/motion-config-DZ7w5Uhq.cjs.map +1 -0
  384. package/dist/{motion-config-COsZ6azM.js → motion-config-DoFp4I8f.js} +21 -3
  385. package/dist/motion-config-DoFp4I8f.js.map +1 -0
  386. package/dist/{record-picker-Bz4FApxD.cjs → record-picker-BQ1-Vx0g.cjs} +23 -8
  387. package/dist/record-picker-BQ1-Vx0g.cjs.map +1 -0
  388. package/dist/{record-picker-BbxngCeV.js → record-picker-DSRo4RXV.js} +23 -8
  389. package/dist/record-picker-DSRo4RXV.js.map +1 -0
  390. package/dist/{sheet-BdA0rfIz.cjs → sheet-OxWlnT_G.cjs} +25 -32
  391. package/dist/sheet-OxWlnT_G.cjs.map +1 -0
  392. package/dist/{sheet-BLHnhLRH.js → sheet-wPF_l9Cn.js} +25 -32
  393. package/dist/sheet-wPF_l9Cn.js.map +1 -0
  394. package/dist/{sidebar-BavjjJp0.cjs → sidebar-BEEWmJwC.cjs} +74 -57
  395. package/dist/sidebar-BEEWmJwC.cjs.map +1 -0
  396. package/dist/{sidebar-DeoL2ttp.js → sidebar-DWl1Azyv.js} +74 -57
  397. package/dist/sidebar-DWl1Azyv.js.map +1 -0
  398. package/dist/{stack-ci2lkfkr.cjs → stack-CEvmUSwF.cjs} +12 -10
  399. package/dist/stack-CEvmUSwF.cjs.map +1 -0
  400. package/dist/{stack-C9GROTGA.js → stack-Kqu7YaR0.js} +12 -10
  401. package/dist/stack-Kqu7YaR0.js.map +1 -0
  402. package/dist/text-runs-CdmlS5C7.cjs +52 -0
  403. package/dist/text-runs-CdmlS5C7.cjs.map +1 -0
  404. package/dist/text-runs-DqcEO8L_.js +45 -0
  405. package/dist/text-runs-DqcEO8L_.js.map +1 -0
  406. package/dist/theme-CKpIa4Fj.d.cts +536 -0
  407. package/dist/theme-CKpIa4Fj.d.ts +536 -0
  408. package/dist/theme-dials-config.cjs +273 -0
  409. package/dist/theme-dials-config.cjs.map +1 -0
  410. package/dist/theme-dials-config.d.cts +95 -0
  411. package/dist/theme-dials-config.d.ts +95 -0
  412. package/dist/theme-dials-config.js +269 -0
  413. package/dist/theme-dials-config.js.map +1 -0
  414. package/dist/theme-presets.cjs +922 -0
  415. package/dist/theme-presets.cjs.map +1 -0
  416. package/dist/theme-presets.d.cts +89 -0
  417. package/dist/theme-presets.d.ts +89 -0
  418. package/dist/theme-presets.js +912 -0
  419. package/dist/theme-presets.js.map +1 -0
  420. package/dist/theme-tuning-CTOHSrsh.d.cts +158 -0
  421. package/dist/theme-tuning-DOko6Pmy.d.ts +158 -0
  422. package/dist/theme-tuning.cjs +349 -0
  423. package/dist/theme-tuning.cjs.map +1 -0
  424. package/dist/theme-tuning.d.cts +2 -0
  425. package/dist/theme-tuning.d.ts +2 -0
  426. package/dist/theme-tuning.js +333 -0
  427. package/dist/theme-tuning.js.map +1 -0
  428. package/dist/theme.cjs +438 -0
  429. package/dist/theme.cjs.map +1 -0
  430. package/dist/theme.d.cts +2 -0
  431. package/dist/theme.d.ts +2 -0
  432. package/dist/theme.js +436 -0
  433. package/dist/theme.js.map +1 -0
  434. package/dist/toast-08jF1DBQ.cjs +193 -0
  435. package/dist/toast-08jF1DBQ.cjs.map +1 -0
  436. package/dist/toast-CVW5XY4u.js +164 -0
  437. package/dist/toast-CVW5XY4u.js.map +1 -0
  438. package/dist/toast-details-BdxxSLlN.cjs +209 -0
  439. package/dist/toast-details-BdxxSLlN.cjs.map +1 -0
  440. package/dist/toast-details-CfsB1Vxb.js +198 -0
  441. package/dist/toast-details-CfsB1Vxb.js.map +1 -0
  442. package/dist/{tooltip-CTRQoN1A.d.ts → tooltip-Fqb4JK-g.d.cts} +2 -2
  443. package/dist/{tooltip-CTRQoN1A.d.cts → tooltip-Fqb4JK-g.d.ts} +2 -2
  444. package/dist/tuning-BKVFsxLr.js +48 -0
  445. package/dist/tuning-BKVFsxLr.js.map +1 -0
  446. package/dist/tuning-BRPG7U1U.cjs +71 -0
  447. package/dist/tuning-BRPG7U1U.cjs.map +1 -0
  448. package/dist/use-document-theme-BSEuNsEE.cjs +43 -0
  449. package/dist/use-document-theme-BSEuNsEE.cjs.map +1 -0
  450. package/dist/use-document-theme-Ch_PqxZz.js +38 -0
  451. package/dist/use-document-theme-Ch_PqxZz.js.map +1 -0
  452. package/dist/use-scroll-fade-CaHp52u4.cjs +79 -0
  453. package/dist/use-scroll-fade-CaHp52u4.cjs.map +1 -0
  454. package/dist/use-scroll-fade-ilq-o00-.js +72 -0
  455. package/dist/use-scroll-fade-ilq-o00-.js.map +1 -0
  456. package/package.json +166 -27
  457. package/src/styles/globals.css +194 -97
  458. package/dist/ai-CiaH2sfF.js.map +0 -1
  459. package/dist/ai-lAkichk8.cjs.map +0 -1
  460. package/dist/button-Bvh83YGs.d.cts +0 -20
  461. package/dist/button-Bvh83YGs.d.ts +0 -20
  462. package/dist/components/app-bar.cjs +0 -81
  463. package/dist/components/app-bar.cjs.map +0 -1
  464. package/dist/components/app-bar.d.cts +0 -27
  465. package/dist/components/app-bar.d.ts +0 -27
  466. package/dist/components/app-bar.js +0 -77
  467. package/dist/components/app-bar.js.map +0 -1
  468. package/dist/components/app-shell.cjs +0 -267
  469. package/dist/components/app-shell.cjs.map +0 -1
  470. package/dist/components/app-shell.d.cts +0 -98
  471. package/dist/components/app-shell.d.ts +0 -98
  472. package/dist/components/app-shell.js +0 -264
  473. package/dist/components/app-shell.js.map +0 -1
  474. package/dist/components/json-input.cjs.map +0 -1
  475. package/dist/components/json-input.js.map +0 -1
  476. package/dist/input-CBrCuMH8.d.cts +0 -11
  477. package/dist/input-CBrCuMH8.d.ts +0 -11
  478. package/dist/motion-config-COCFHq1L.cjs.map +0 -1
  479. package/dist/motion-config-COsZ6azM.js.map +0 -1
  480. package/dist/record-picker-BbxngCeV.js.map +0 -1
  481. package/dist/record-picker-Bz4FApxD.cjs.map +0 -1
  482. package/dist/separator-BQEsr0Rc.d.cts +0 -11
  483. package/dist/separator-BQEsr0Rc.d.ts +0 -11
  484. package/dist/sheet-BLHnhLRH.js.map +0 -1
  485. package/dist/sheet-BdA0rfIz.cjs.map +0 -1
  486. package/dist/sidebar-BavjjJp0.cjs.map +0 -1
  487. package/dist/sidebar-DeoL2ttp.js.map +0 -1
  488. package/dist/stack-C9GROTGA.js.map +0 -1
  489. package/dist/stack-ci2lkfkr.cjs.map +0 -1
  490. package/dist/toast-D6MqijT2.cjs +0 -316
  491. package/dist/toast-D6MqijT2.cjs.map +0 -1
  492. package/dist/toast-D_BOLzm3.js +0 -287
  493. package/dist/toast-D_BOLzm3.js.map +0 -1
@@ -6,18 +6,20 @@ const require_slot = require('../slot-C-jEfihz.cjs');
6
6
  let react = require("react");
7
7
  react = require_rolldown_runtime.__toESM(react, 1);
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
+ let _base_ui_react_button = require("@base-ui/react/button");
9
10
  let class_variance_authority = require("class-variance-authority");
10
11
 
11
12
  //#region src/components/button.tsx
12
- const buttonVariants = (0, class_variance_authority.cva)("[&_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", {
13
+ const buttonVariants = (0, class_variance_authority.cva)("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-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", {
13
14
  defaultVariants: {
14
15
  size: "default",
15
16
  static: false,
16
- variant: "default"
17
+ variant: "default",
18
+ wrap: false
17
19
  },
18
20
  variants: {
19
21
  static: {
20
- false: "motion-safe:active:not-disabled:scale-[0.96]",
22
+ false: "motion-safe:active:not-disabled:not-data-disabled:scale-[0.96]",
21
23
  true: null
22
24
  },
23
25
  size: {
@@ -25,33 +27,75 @@ const buttonVariants = (0, class_variance_authority.cva)("[&_svg]:-mx-0.5 relati
25
27
  icon: "size-10 pointer-coarse:size-11",
26
28
  "icon-lg": "size-11",
27
29
  "icon-sm": "size-8 pointer-coarse:size-11",
28
- "icon-xl": "size-11 [&_svg:not([class*=\"size-\"])]:size-5",
30
+ "icon-xl": "size-11 [&_svg:not([class*='size-'])]:size-5",
29
31
  "icon-xs": "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",
30
32
  lg: "h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]",
31
33
  sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
32
- xl: "h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*=\"size-\"])]:size-5",
33
- xs: "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"
34
+ xl: "h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*='size-'])]:size-5",
35
+ xs: "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"
34
36
  },
35
37
  variant: {
36
- default: "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",
37
- destructive: "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",
38
- "destructive-outline": "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",
39
- ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
40
- link: "border-transparent underline-offset-4 hover:underline",
41
- outline: "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",
42
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
38
+ default: "not-disabled:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none",
39
+ destructive: "not-disabled:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-shadow-none",
40
+ "destructive-outline": "border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32",
41
+ ghost: "border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent",
42
+ link: "border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline",
43
+ outline: "border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32",
44
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary"
45
+ },
46
+ wrap: {
47
+ false: null,
48
+ true: "max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]"
49
+ }
50
+ },
51
+ compoundVariants: [
52
+ {
53
+ wrap: true,
54
+ size: "default",
55
+ className: "h-auto min-h-10 py-[calc(--spacing(2)-1px)]"
56
+ },
57
+ {
58
+ wrap: true,
59
+ size: "sm",
60
+ className: "h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]"
61
+ },
62
+ {
63
+ wrap: true,
64
+ size: "xs",
65
+ className: "h-auto min-h-7 py-[calc(--spacing(1)-1px)]"
66
+ },
67
+ {
68
+ wrap: true,
69
+ size: "lg",
70
+ className: "h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]"
71
+ },
72
+ {
73
+ wrap: true,
74
+ size: "xl",
75
+ className: "h-auto min-h-12 py-[calc(--spacing(3)-1px)]"
43
76
  }
44
- }
77
+ ]
45
78
  });
46
- const Button = react.forwardRef(({ className, variant, size, static: isStatic, asChild, children, type = "button", ...props }, ref) => {
79
+ const Button = react.forwardRef(({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = "button", ...props }, ref) => {
47
80
  const buttonClasses = require_utils.cn(buttonVariants({
48
81
  className,
49
82
  size,
50
83
  static: isStatic,
51
- variant
84
+ variant,
85
+ wrap
52
86
  }));
53
- const Comp = asChild ? require_slot.Slot : "button";
54
- if (asChild) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {
87
+ if (focusableWhenDisabled) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_button.Button, {
88
+ ref,
89
+ focusableWhenDisabled: true,
90
+ nativeButton: !asChild,
91
+ render: asChild && react.isValidElement(children) ? children : void 0,
92
+ type: asChild ? void 0 : type,
93
+ className: buttonClasses,
94
+ "data-slot": "button",
95
+ ...props,
96
+ children: asChild ? void 0 : children
97
+ });
98
+ if (asChild) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slot.Slot, {
55
99
  ref,
56
100
  className: buttonClasses,
57
101
  "data-slot": "button",
@@ -1 +1 @@
1
- {"version":3,"file":"button.cjs","names":["React","cn","Slot","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,mDACL,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,MAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,SAAS,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACtG,MAAM,gBAAgBC,iBAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;CAAQ,CAAC,CAAC;CACvF,MAAM,OAAO,UAAUC,oBAAO;CAE9B,IAAI,SAEH,OACC,2CAACC,MAAD;EACM;EACL,WAAW;EACX,aAAU;EACV,GAAI;EAEH;CACW;CAIf,OACC,2CAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
1
+ {"version":3,"file":"button.cjs","names":["React","cn","BaseButton","Slot"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as BaseButton } from '@base-ui/react/button';\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-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-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\twrap: false,\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:not-data-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:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-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-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32',\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 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary',\n\t\t\t},\n\t\t\t// Opt-in: long or translated labels wrap onto more lines instead of\n\t\t\t// overflowing. The height becomes a minimum and the button may shrink\n\t\t\t// inside a flex row. Icon sizes ignore it (they have no label).\n\t\t\twrap: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ wrap: true, size: 'default', className: 'h-auto min-h-10 py-[calc(--spacing(2)-1px)]' },\n\t\t\t{ wrap: true, size: 'sm', className: 'h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xs', className: 'h-auto min-h-7 py-[calc(--spacing(1)-1px)]' },\n\t\t\t{ wrap: true, size: 'lg', className: 'h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xl', className: 'h-auto min-h-12 py-[calc(--spacing(3)-1px)]' },\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/**\n\t * Lets the label wrap onto several lines (long or translated copy) instead of\n\t * staying on one line and overflowing. The height becomes a minimum and the\n\t * button can shrink inside a flex row. Off by default.\n\t */\n\twrap?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/**\n\t * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip\n\t * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.\n\t */\n\tfocusableWhenDisabled?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant, wrap }));\n\n\t\t// Base UI keeps a disabled button focusable, marks it `aria-disabled` and swallows the events a native disabled\n\t\t// button never receives, so a composed menu or dialog trigger cannot open and a consumer handler cannot run. It\n\t\t// renders the same element enabled or disabled, so toggling keeps focus and what the element holds.\n\t\tif (focusableWhenDisabled) {\n\t\t\treturn (\n\t\t\t\t<BaseButton\n\t\t\t\t\tref={ref}\n\t\t\t\t\tfocusableWhenDisabled\n\t\t\t\t\tnativeButton={!asChild}\n\t\t\t\t\trender={asChild && React.isValidElement(children) ? children : undefined}\n\t\t\t\t\ttype={asChild ? undefined : type}\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{asChild ? undefined : children}\n\t\t\t\t</BaseButton>\n\t\t\t);\n\t\t}\n\n\t\tif (asChild) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref as React.Ref<HTMLElement>} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\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":";;;;;;;;;;;;AAOA,MAAM,mDACL,gpBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACP;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;EAIA,MAAM;GACL,OAAO;GACP,MAAM;EACP;CACD;CACA,kBAAkB;EACjB;GAAE,MAAM;GAAM,MAAM;GAAW,WAAW;EAA8C;EACxF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA+C;EACpF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA6C;EAClF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAAgD;EACrF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA8C;CACpF;AACD,CACD;AAsBA,MAAM,SAASA,MAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,MAAM,SAAS,uBAAuB,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACnI,MAAM,gBAAgBC,iBAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;EAAS;CAAK,CAAC,CAAC;CAK7F,IAAI,uBACH,OACC,2CAACC,8BAAD;EACM;EACL;EACA,cAAc,CAAC;EACf,QAAQ,WAAWF,MAAM,eAAe,QAAQ,IAAI,WAAW;EAC/D,MAAM,UAAU,SAAY;EAC5B,WAAW;EACX,aAAU;EACV,GAAI;YAEH,UAAU,SAAY;CACZ;CAId,IAAI,SACH,OACC,2CAACG,mBAAD;EAAW;EAA+B,WAAW;EAAe,aAAU;EAAS,GAAI;EACzF;CACI;CAIR,OACC,2CAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
@@ -1,2 +1,32 @@
1
- import { n as ButtonProps, r as buttonVariants, t as Button } from "../button-Bvh83YGs.cjs";
2
- export { Button, type ButtonProps, buttonVariants };
1
+ import * as React$1 from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ //#region src/components/button.d.ts
4
+ declare const buttonVariants: (props?: ({
5
+ static?: boolean | null | undefined;
6
+ size?: "default" | "sm" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "xl" | "xs" | null | undefined;
7
+ variant?: "default" | "ghost" | "destructive" | "destructive-outline" | "link" | "outline" | "secondary" | null | undefined;
8
+ wrap?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
11
+ variant?: VariantProps<typeof buttonVariants>['variant'];
12
+ size?: VariantProps<typeof buttonVariants>['size'];
13
+ /** Disables tactile press scaling when motion would distract from the interaction. */
14
+ static?: boolean;
15
+ /**
16
+ * Lets the label wrap onto several lines (long or translated copy) instead of
17
+ * staying on one line and overflowing. The height becomes a minimum and the
18
+ * button can shrink inside a flex row. Off by default.
19
+ */
20
+ wrap?: boolean;
21
+ /** When true, merges props onto the child element instead of rendering a button */
22
+ asChild?: boolean;
23
+ /**
24
+ * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip
25
+ * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.
26
+ */
27
+ focusableWhenDisabled?: boolean;
28
+ }
29
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
30
+ //#endregion
31
+ export { Button, type ButtonProps, buttonVariants };
32
+ //# sourceMappingURL=button.d.cts.map
@@ -1,2 +1,32 @@
1
- import { n as ButtonProps, r as buttonVariants, t as Button } from "../button-Bvh83YGs.js";
2
- export { Button, type ButtonProps, buttonVariants };
1
+ import * as React$1 from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ //#region src/components/button.d.ts
4
+ declare const buttonVariants: (props?: ({
5
+ static?: boolean | null | undefined;
6
+ size?: "default" | "sm" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "xl" | "xs" | null | undefined;
7
+ variant?: "default" | "ghost" | "destructive" | "destructive-outline" | "link" | "outline" | "secondary" | null | undefined;
8
+ wrap?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
11
+ variant?: VariantProps<typeof buttonVariants>['variant'];
12
+ size?: VariantProps<typeof buttonVariants>['size'];
13
+ /** Disables tactile press scaling when motion would distract from the interaction. */
14
+ static?: boolean;
15
+ /**
16
+ * Lets the label wrap onto several lines (long or translated copy) instead of
17
+ * staying on one line and overflowing. The height becomes a minimum and the
18
+ * button can shrink inside a flex row. Off by default.
19
+ */
20
+ wrap?: boolean;
21
+ /** When true, merges props onto the child element instead of rendering a button */
22
+ asChild?: boolean;
23
+ /**
24
+ * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip
25
+ * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.
26
+ */
27
+ focusableWhenDisabled?: boolean;
28
+ }
29
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
30
+ //#endregion
31
+ export { Button, type ButtonProps, buttonVariants };
32
+ //# sourceMappingURL=button.d.ts.map
@@ -3,18 +3,20 @@ import { t as cn } from "../utils-BkMLyah9.js";
3
3
  import { t as Slot } from "../slot-EL8zfLG0.js";
4
4
  import * as React$1 from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
+ import { Button as Button$1 } from "@base-ui/react/button";
6
7
  import { cva } from "class-variance-authority";
7
8
 
8
9
  //#region src/components/button.tsx
9
- const buttonVariants = cva("[&_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", {
10
+ const buttonVariants = cva("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-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", {
10
11
  defaultVariants: {
11
12
  size: "default",
12
13
  static: false,
13
- variant: "default"
14
+ variant: "default",
15
+ wrap: false
14
16
  },
15
17
  variants: {
16
18
  static: {
17
- false: "motion-safe:active:not-disabled:scale-[0.96]",
19
+ false: "motion-safe:active:not-disabled:not-data-disabled:scale-[0.96]",
18
20
  true: null
19
21
  },
20
22
  size: {
@@ -22,33 +24,75 @@ const buttonVariants = cva("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor
22
24
  icon: "size-10 pointer-coarse:size-11",
23
25
  "icon-lg": "size-11",
24
26
  "icon-sm": "size-8 pointer-coarse:size-11",
25
- "icon-xl": "size-11 [&_svg:not([class*=\"size-\"])]:size-5",
27
+ "icon-xl": "size-11 [&_svg:not([class*='size-'])]:size-5",
26
28
  "icon-xs": "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",
27
29
  lg: "h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]",
28
30
  sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
29
- xl: "h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*=\"size-\"])]:size-5",
30
- xs: "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"
31
+ xl: "h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*='size-'])]:size-5",
32
+ xs: "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"
31
33
  },
32
34
  variant: {
33
- default: "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",
34
- destructive: "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",
35
- "destructive-outline": "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",
36
- ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
37
- link: "border-transparent underline-offset-4 hover:underline",
38
- outline: "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",
39
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
35
+ default: "not-disabled:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none",
36
+ destructive: "not-disabled:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-shadow-none",
37
+ "destructive-outline": "border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32",
38
+ ghost: "border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent",
39
+ link: "border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline",
40
+ outline: "border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32",
41
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary"
42
+ },
43
+ wrap: {
44
+ false: null,
45
+ true: "max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]"
46
+ }
47
+ },
48
+ compoundVariants: [
49
+ {
50
+ wrap: true,
51
+ size: "default",
52
+ className: "h-auto min-h-10 py-[calc(--spacing(2)-1px)]"
53
+ },
54
+ {
55
+ wrap: true,
56
+ size: "sm",
57
+ className: "h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]"
58
+ },
59
+ {
60
+ wrap: true,
61
+ size: "xs",
62
+ className: "h-auto min-h-7 py-[calc(--spacing(1)-1px)]"
63
+ },
64
+ {
65
+ wrap: true,
66
+ size: "lg",
67
+ className: "h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]"
68
+ },
69
+ {
70
+ wrap: true,
71
+ size: "xl",
72
+ className: "h-auto min-h-12 py-[calc(--spacing(3)-1px)]"
40
73
  }
41
- }
74
+ ]
42
75
  });
43
- const Button = React$1.forwardRef(({ className, variant, size, static: isStatic, asChild, children, type = "button", ...props }, ref) => {
76
+ const Button = React$1.forwardRef(({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = "button", ...props }, ref) => {
44
77
  const buttonClasses = cn(buttonVariants({
45
78
  className,
46
79
  size,
47
80
  static: isStatic,
48
- variant
81
+ variant,
82
+ wrap
49
83
  }));
50
- const Comp = asChild ? Slot : "button";
51
- if (asChild) return /* @__PURE__ */ jsx(Comp, {
84
+ if (focusableWhenDisabled) return /* @__PURE__ */ jsx(Button$1, {
85
+ ref,
86
+ focusableWhenDisabled: true,
87
+ nativeButton: !asChild,
88
+ render: asChild && React$1.isValidElement(children) ? children : void 0,
89
+ type: asChild ? void 0 : type,
90
+ className: buttonClasses,
91
+ "data-slot": "button",
92
+ ...props,
93
+ children: asChild ? void 0 : children
94
+ });
95
+ if (asChild) return /* @__PURE__ */ jsx(Slot, {
52
96
  ref,
53
97
  className: buttonClasses,
54
98
  "data-slot": "button",
@@ -1 +1 @@
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
+ {"version":3,"file":"button.js","names":["React","BaseButton"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as BaseButton } from '@base-ui/react/button';\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-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-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\twrap: false,\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:not-data-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:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:not-data-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,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-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-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-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:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32',\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 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary',\n\t\t\t},\n\t\t\t// Opt-in: long or translated labels wrap onto more lines instead of\n\t\t\t// overflowing. The height becomes a minimum and the button may shrink\n\t\t\t// inside a flex row. Icon sizes ignore it (they have no label).\n\t\t\twrap: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ wrap: true, size: 'default', className: 'h-auto min-h-10 py-[calc(--spacing(2)-1px)]' },\n\t\t\t{ wrap: true, size: 'sm', className: 'h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xs', className: 'h-auto min-h-7 py-[calc(--spacing(1)-1px)]' },\n\t\t\t{ wrap: true, size: 'lg', className: 'h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xl', className: 'h-auto min-h-12 py-[calc(--spacing(3)-1px)]' },\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/**\n\t * Lets the label wrap onto several lines (long or translated copy) instead of\n\t * staying on one line and overflowing. The height becomes a minimum and the\n\t * button can shrink inside a flex row. Off by default.\n\t */\n\twrap?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/**\n\t * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip\n\t * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.\n\t */\n\tfocusableWhenDisabled?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant, wrap }));\n\n\t\t// Base UI keeps a disabled button focusable, marks it `aria-disabled` and swallows the events a native disabled\n\t\t// button never receives, so a composed menu or dialog trigger cannot open and a consumer handler cannot run. It\n\t\t// renders the same element enabled or disabled, so toggling keeps focus and what the element holds.\n\t\tif (focusableWhenDisabled) {\n\t\t\treturn (\n\t\t\t\t<BaseButton\n\t\t\t\t\tref={ref}\n\t\t\t\t\tfocusableWhenDisabled\n\t\t\t\t\tnativeButton={!asChild}\n\t\t\t\t\trender={asChild && React.isValidElement(children) ? children : undefined}\n\t\t\t\t\ttype={asChild ? undefined : type}\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{asChild ? undefined : children}\n\t\t\t\t</BaseButton>\n\t\t\t);\n\t\t}\n\n\t\tif (asChild) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref as React.Ref<HTMLElement>} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\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":";;;;;;;;;AAOA,MAAM,iBAAiB,IACtB,gpBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACP;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;EAIA,MAAM;GACL,OAAO;GACP,MAAM;EACP;CACD;CACA,kBAAkB;EACjB;GAAE,MAAM;GAAM,MAAM;GAAW,WAAW;EAA8C;EACxF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA+C;EACpF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA6C;EAClF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAAgD;EACrF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA8C;CACpF;AACD,CACD;AAsBA,MAAM,SAASA,QAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,MAAM,SAAS,uBAAuB,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACnI,MAAM,gBAAgB,GAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;EAAS;CAAK,CAAC,CAAC;CAK7F,IAAI,uBACH,OACC,oBAACC,UAAD;EACM;EACL;EACA,cAAc,CAAC;EACf,QAAQ,WAAWD,QAAM,eAAe,QAAQ,IAAI,WAAW;EAC/D,MAAM,UAAU,SAAY;EAC5B,WAAW;EACX,aAAU;EACV,GAAI;YAEH,UAAU,SAAY;CACZ;CAId,IAAI,SACH,OACC,oBAAC,MAAD;EAAW;EAA+B,WAAW;EAAe,aAAU;EAAS,GAAI;EACzF;CACI;CAIR,OACC,oBAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
@@ -14,14 +14,20 @@ function CalendarHeader() {
14
14
  children: [
15
15
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
16
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 })
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]\n data-disabled:pointer-events-none data-disabled:opacity-30",
18
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeftIcon, {
19
+ size: 16,
20
+ className: "rtl:rotate-180"
21
+ })
19
22
  }),
20
23
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Heading, { className: "grow text-center text-sm font-medium" }),
21
24
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
22
25
  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 })
26
+ 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]\n data-disabled:pointer-events-none data-disabled:opacity-30",
27
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, {
28
+ size: 16,
29
+ className: "rtl:rotate-180"
30
+ })
25
31
  })
26
32
  ]
27
33
  });
@@ -29,7 +35,7 @@ function CalendarHeader() {
29
35
  function CalendarGridComponent({ isRange = false }) {
30
36
  const now = (0, _internationalized_date.today)((0, _internationalized_date.getLocalTimeZone)());
31
37
  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",
38
+ className: "text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium tabular-nums",
33
39
  children: day
34
40
  }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CalendarGridBody, {
35
41
  className: "[&_td]:px-0 [&_td]:py-px",
@@ -37,8 +43,8 @@ function CalendarGridComponent({ isRange = false }) {
37
43
  date,
38
44
  className: require_utils.cn(`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground
39
45
  data-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center
40
- justify-center rounded-md p-0 text-sm font-normal whitespace-nowrap
41
- [transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none
46
+ justify-center rounded-md p-0 text-sm font-normal whitespace-nowrap tabular-nums
47
+ [transition-property:color,background-color,border-radius,box-shadow] duration-(--duration-moderate) outline-none
42
48
  data-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10
43
49
  data-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through
44
50
  data-unavailable:opacity-30`, isRange && `data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive
@@ -46,7 +52,7 @@ function CalendarGridComponent({ isRange = false }) {
46
52
  data-selection-start:bg-primary data-selection-end:text-primary-foreground
47
53
  data-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none
48
54
  data-selection-end:rounded-e-md data-invalid:data-selection-end:text-white
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
55
+ 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:left-1/2 after:bottom-1 after:z-10
50
56
  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
57
  })
52
58
  })] });
@@ -1 +1 @@
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
+ {"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\t\tdata-disabled:pointer-events-none data-disabled:opacity-30'\n\t\t\t>\n\t\t\t\t<ChevronLeftIcon size={16} className='rtl:rotate-180' />\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\t\tdata-disabled:pointer-events-none data-disabled:opacity-30'\n\t\t\t>\n\t\t\t\t<ChevronRightIcon size={16} className='rtl:rotate-180' />\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 tabular-nums'>\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 tabular-nums\n\t\t\t\t\t\t\t[transition-property:color,background-color,border-radius,box-shadow] duration-(--duration-moderate) 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:left-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;cAIV,2CAACC,8BAAD;KAAiB,MAAM;KAAI,WAAU;IAAkB;GAChD;GACR,2CAACC,+BAAD,EAAY,WAAU,uCAAwC;GAC9D,2CAACF,8BAAD;IACC,MAAK;IACL,WAAU;cAIV,2CAACG,+BAAD;KAAkB,MAAM;KAAI,WAAU;IAAkB;GACjD;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"}
@@ -13,14 +13,20 @@ function CalendarHeader() {
13
13
  children: [
14
14
  /* @__PURE__ */ jsx(Button, {
15
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 })
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]\n data-disabled:pointer-events-none data-disabled:opacity-30",
17
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, {
18
+ size: 16,
19
+ className: "rtl:rotate-180"
20
+ })
18
21
  }),
19
22
  /* @__PURE__ */ jsx(Heading, { className: "grow text-center text-sm font-medium" }),
20
23
  /* @__PURE__ */ jsx(Button, {
21
24
  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 })
25
+ 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]\n data-disabled:pointer-events-none data-disabled:opacity-30",
26
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {
27
+ size: 16,
28
+ className: "rtl:rotate-180"
29
+ })
24
30
  })
25
31
  ]
26
32
  });
@@ -28,7 +34,7 @@ function CalendarHeader() {
28
34
  function CalendarGridComponent({ isRange = false }) {
29
35
  const now = today(getLocalTimeZone());
30
36
  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",
37
+ className: "text-muted-foreground/80 size-9 rounded-md p-0 text-xs font-medium tabular-nums",
32
38
  children: day
33
39
  }) }), /* @__PURE__ */ jsx(CalendarGridBody, {
34
40
  className: "[&_td]:px-0 [&_td]:py-px",
@@ -36,8 +42,8 @@ function CalendarGridComponent({ isRange = false }) {
36
42
  date,
37
43
  className: cn(`text-foreground data-hovered:bg-accent data-selected:bg-primary data-hovered:text-foreground
38
44
  data-selected:text-primary-foreground data-focus-visible:ring-ring/50 relative flex size-9 items-center
39
- justify-center rounded-md p-0 text-sm font-normal whitespace-nowrap
40
- [transition-property:color,background-color,border-radius,box-shadow] duration-150 outline-none
45
+ justify-center rounded-md p-0 text-sm font-normal whitespace-nowrap tabular-nums
46
+ [transition-property:color,background-color,border-radius,box-shadow] duration-(--duration-moderate) outline-none
41
47
  data-disabled:pointer-events-none data-disabled:opacity-30 data-focus-visible:z-10
42
48
  data-focus-visible:ring-[3px] data-unavailable:pointer-events-none data-unavailable:line-through
43
49
  data-unavailable:opacity-30`, isRange && `data-selected:bg-accent data-selected:text-foreground data-invalid:data-selection-end:bg-destructive
@@ -45,7 +51,7 @@ function CalendarGridComponent({ isRange = false }) {
45
51
  data-selection-start:bg-primary data-selection-end:text-primary-foreground
46
52
  data-selection-start:text-primary-foreground data-invalid:bg-red-100 data-selected:rounded-none
47
53
  data-selection-end:rounded-e-md data-invalid:data-selection-end:text-white
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
54
+ 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:left-1/2 after:bottom-1 after:z-10
49
55
  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
56
  })
51
57
  })] });
@@ -1 +1 @@
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
+ {"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\t\tdata-disabled:pointer-events-none data-disabled:opacity-30'\n\t\t\t>\n\t\t\t\t<ChevronLeftIcon size={16} className='rtl:rotate-180' />\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\t\tdata-disabled:pointer-events-none data-disabled:opacity-30'\n\t\t\t>\n\t\t\t\t<ChevronRightIcon size={16} className='rtl:rotate-180' />\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 tabular-nums'>\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 tabular-nums\n\t\t\t\t\t\t\t[transition-property:color,background-color,border-radius,box-shadow] duration-(--duration-moderate) 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:left-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;cAIV,oBAAC,iBAAD;KAAiB,MAAM;KAAI,WAAU;IAAkB;GAChD;GACR,oBAACA,SAAD,EAAY,WAAU,uCAAwC;GAC9D,oBAAC,QAAD;IACC,MAAK;IACL,WAAU;cAIV,oBAAC,kBAAD;KAAkB,MAAM;KAAI,WAAU;IAAkB;GACjD;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"}