@kumix/ui 0.2.3 → 0.3.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 (369) hide show
  1. package/README.md +32 -10
  2. package/dist/components/motion/action-swap-blur.d.ts +11 -0
  3. package/dist/components/motion/action-swap-blur.d.ts.map +1 -0
  4. package/dist/components/motion/action-swap-blur.js +26 -0
  5. package/dist/components/motion/action-swap-blur.js.map +1 -0
  6. package/dist/components/motion/action-swap-cascade.d.ts +11 -0
  7. package/dist/components/motion/action-swap-cascade.d.ts.map +1 -0
  8. package/dist/components/motion/action-swap-cascade.js +26 -0
  9. package/dist/components/motion/action-swap-cascade.js.map +1 -0
  10. package/dist/components/motion/action-swap-roll.d.ts +11 -0
  11. package/dist/components/motion/action-swap-roll.d.ts.map +1 -0
  12. package/dist/components/motion/action-swap-roll.js +26 -0
  13. package/dist/components/motion/action-swap-roll.js.map +1 -0
  14. package/dist/components/motion/action-swap.d.ts +41 -0
  15. package/dist/components/motion/action-swap.d.ts.map +1 -0
  16. package/dist/components/motion/action-swap.js +261 -0
  17. package/dist/components/motion/action-swap.js.map +1 -0
  18. package/dist/components/motion/animated-badge.d.ts +18 -0
  19. package/dist/components/motion/animated-badge.d.ts.map +1 -0
  20. package/dist/components/motion/animated-badge.js +206 -0
  21. package/dist/components/motion/animated-badge.js.map +1 -0
  22. package/dist/components/motion/animated-number.d.ts +12 -0
  23. package/dist/components/motion/animated-number.d.ts.map +1 -0
  24. package/dist/components/motion/animated-number.js +47 -0
  25. package/dist/components/motion/animated-number.js.map +1 -0
  26. package/dist/components/motion/animated-sidebar.d.ts +97 -0
  27. package/dist/components/motion/animated-sidebar.d.ts.map +1 -0
  28. package/dist/components/motion/animated-sidebar.js +611 -0
  29. package/dist/components/motion/animated-sidebar.js.map +1 -0
  30. package/dist/components/motion/animated-toast-stack.d.ts +65 -0
  31. package/dist/components/motion/animated-toast-stack.d.ts.map +1 -0
  32. package/dist/components/motion/animated-toast-stack.js +303 -0
  33. package/dist/components/motion/animated-toast-stack.js.map +1 -0
  34. package/dist/components/motion/bottom-sheet.d.ts +19 -0
  35. package/dist/components/motion/bottom-sheet.d.ts.map +1 -0
  36. package/dist/components/motion/bottom-sheet.js +146 -0
  37. package/dist/components/motion/bottom-sheet.js.map +1 -0
  38. package/dist/components/motion/bounce-sidebar.d.ts +26 -0
  39. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -0
  40. package/dist/components/motion/bounce-sidebar.js +164 -0
  41. package/dist/components/motion/bounce-sidebar.js.map +1 -0
  42. package/dist/components/motion/bouncy-accordion.d.ts +32 -0
  43. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -0
  44. package/dist/components/motion/bouncy-accordion.js +172 -0
  45. package/dist/components/motion/bouncy-accordion.js.map +1 -0
  46. package/dist/components/motion/button/base.d.ts +17 -0
  47. package/dist/components/motion/button/base.d.ts.map +1 -0
  48. package/dist/components/motion/button/base.js +86 -0
  49. package/dist/components/motion/button/base.js.map +1 -0
  50. package/dist/components/motion/button/magnetic.d.ts +12 -0
  51. package/dist/components/motion/button/magnetic.d.ts.map +1 -0
  52. package/dist/components/motion/button/magnetic.js +21 -0
  53. package/dist/components/motion/button/magnetic.js.map +1 -0
  54. package/dist/components/motion/button/stateful.d.ts +16 -0
  55. package/dist/components/motion/button/stateful.d.ts.map +1 -0
  56. package/dist/components/motion/button/stateful.js +190 -0
  57. package/dist/components/motion/button/stateful.js.map +1 -0
  58. package/dist/components/motion/center-morph-modal.d.ts +43 -0
  59. package/dist/components/motion/center-morph-modal.d.ts.map +1 -0
  60. package/dist/components/motion/center-morph-modal.js +238 -0
  61. package/dist/components/motion/center-morph-modal.js.map +1 -0
  62. package/dist/components/motion/checkbox.d.ts +15 -0
  63. package/dist/components/motion/checkbox.d.ts.map +1 -0
  64. package/dist/components/motion/checkbox.js +81 -0
  65. package/dist/components/motion/checkbox.js.map +1 -0
  66. package/dist/components/motion/chromatic-text-reveal.d.ts +31 -0
  67. package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -0
  68. package/dist/components/motion/chromatic-text-reveal.js +132 -0
  69. package/dist/components/motion/chromatic-text-reveal.js.map +1 -0
  70. package/dist/components/motion/context-menu.d.ts +71 -0
  71. package/dist/components/motion/context-menu.d.ts.map +1 -0
  72. package/dist/components/motion/context-menu.js +454 -0
  73. package/dist/components/motion/context-menu.js.map +1 -0
  74. package/dist/components/motion/cylinder-carousel.d.ts +40 -0
  75. package/dist/components/motion/cylinder-carousel.d.ts.map +1 -0
  76. package/dist/components/motion/cylinder-carousel.js +274 -0
  77. package/dist/components/motion/cylinder-carousel.js.map +1 -0
  78. package/dist/components/motion/dock.d.ts +24 -0
  79. package/dist/components/motion/dock.d.ts.map +1 -0
  80. package/dist/components/motion/dock.js +62 -0
  81. package/dist/components/motion/dock.js.map +1 -0
  82. package/dist/components/motion/drawer.d.ts +19 -0
  83. package/dist/components/motion/drawer.d.ts.map +1 -0
  84. package/dist/components/motion/drawer.js +58 -0
  85. package/dist/components/motion/drawer.js.map +1 -0
  86. package/dist/components/motion/hold-action-button.d.ts +17 -0
  87. package/dist/components/motion/hold-action-button.d.ts.map +1 -0
  88. package/dist/components/motion/hold-action-button.js +158 -0
  89. package/dist/components/motion/hold-action-button.js.map +1 -0
  90. package/dist/components/motion/input.d.ts +29 -0
  91. package/dist/components/motion/input.d.ts.map +1 -0
  92. package/dist/components/motion/input.js +126 -0
  93. package/dist/components/motion/input.js.map +1 -0
  94. package/dist/components/motion/loader.d.ts +17 -0
  95. package/dist/components/motion/loader.d.ts.map +1 -0
  96. package/dist/components/motion/loader.js +791 -0
  97. package/dist/components/motion/loader.js.map +1 -0
  98. package/dist/components/motion/magnetic.d.ts +11 -0
  99. package/dist/components/motion/magnetic.d.ts.map +1 -0
  100. package/dist/components/motion/magnetic.js +44 -0
  101. package/dist/components/motion/magnetic.js.map +1 -0
  102. package/dist/components/motion/marquee.d.ts +15 -0
  103. package/dist/components/motion/marquee.d.ts.map +1 -0
  104. package/dist/components/motion/marquee.js +35 -0
  105. package/dist/components/motion/marquee.js.map +1 -0
  106. package/dist/components/motion/morphing-modal.d.ts +15 -0
  107. package/dist/components/motion/morphing-modal.d.ts.map +1 -0
  108. package/dist/components/motion/morphing-modal.js +117 -0
  109. package/dist/components/motion/morphing-modal.js.map +1 -0
  110. package/dist/components/motion/number-ticker.d.ts +26 -0
  111. package/dist/components/motion/number-ticker.d.ts.map +1 -0
  112. package/dist/components/motion/number-ticker.js +129 -0
  113. package/dist/components/motion/number-ticker.js.map +1 -0
  114. package/dist/components/motion/parallax.d.ts +21 -0
  115. package/dist/components/motion/parallax.d.ts.map +1 -0
  116. package/dist/components/motion/parallax.js +35 -0
  117. package/dist/components/motion/parallax.js.map +1 -0
  118. package/dist/components/motion/popover-morph.d.ts +38 -0
  119. package/dist/components/motion/popover-morph.d.ts.map +1 -0
  120. package/dist/components/motion/popover-morph.js +167 -0
  121. package/dist/components/motion/popover-morph.js.map +1 -0
  122. package/dist/components/motion/popover.d.ts +40 -0
  123. package/dist/components/motion/popover.d.ts.map +1 -0
  124. package/dist/components/motion/popover.js +393 -0
  125. package/dist/components/motion/popover.js.map +1 -0
  126. package/dist/components/motion/preview-rail.d.ts +26 -0
  127. package/dist/components/motion/preview-rail.d.ts.map +1 -0
  128. package/dist/components/motion/preview-rail.js +134 -0
  129. package/dist/components/motion/preview-rail.js.map +1 -0
  130. package/dist/components/motion/pull-to-refresh.d.ts +28 -0
  131. package/dist/components/motion/pull-to-refresh.d.ts.map +1 -0
  132. package/dist/components/motion/pull-to-refresh.js +389 -0
  133. package/dist/components/motion/pull-to-refresh.js.map +1 -0
  134. package/dist/components/motion/radio.d.ts +22 -0
  135. package/dist/components/motion/radio.d.ts.map +1 -0
  136. package/dist/components/motion/radio.js +79 -0
  137. package/dist/components/motion/radio.js.map +1 -0
  138. package/dist/components/motion/range-slider-bubble.d.ts +16 -0
  139. package/dist/components/motion/range-slider-bubble.d.ts.map +1 -0
  140. package/dist/components/motion/range-slider-bubble.js +117 -0
  141. package/dist/components/motion/range-slider-bubble.js.map +1 -0
  142. package/dist/components/motion/range-slider-fluid.d.ts +18 -0
  143. package/dist/components/motion/range-slider-fluid.d.ts.map +1 -0
  144. package/dist/components/motion/range-slider-fluid.js +63 -0
  145. package/dist/components/motion/range-slider-fluid.js.map +1 -0
  146. package/dist/components/motion/range-slider-ruler.d.ts +19 -0
  147. package/dist/components/motion/range-slider-ruler.d.ts.map +1 -0
  148. package/dist/components/motion/range-slider-ruler.js +142 -0
  149. package/dist/components/motion/range-slider-ruler.js.map +1 -0
  150. package/dist/components/motion/range-slider-wave.d.ts +16 -0
  151. package/dist/components/motion/range-slider-wave.d.ts.map +1 -0
  152. package/dist/components/motion/range-slider-wave.js +57 -0
  153. package/dist/components/motion/range-slider-wave.js.map +1 -0
  154. package/dist/components/motion/range-slider.d.ts +11 -0
  155. package/dist/components/motion/range-slider.d.ts.map +1 -0
  156. package/dist/components/motion/range-slider.js +63 -0
  157. package/dist/components/motion/range-slider.js.map +1 -0
  158. package/dist/components/motion/scroll-progress.d.ts +29 -0
  159. package/dist/components/motion/scroll-progress.d.ts.map +1 -0
  160. package/dist/components/motion/scroll-progress.js +71 -0
  161. package/dist/components/motion/scroll-progress.js.map +1 -0
  162. package/dist/components/motion/scroll-reveal.d.ts +23 -0
  163. package/dist/components/motion/scroll-reveal.d.ts.map +1 -0
  164. package/dist/components/motion/scroll-reveal.js +42 -0
  165. package/dist/components/motion/scroll-reveal.js.map +1 -0
  166. package/dist/components/motion/scroll-to.d.ts +21 -0
  167. package/dist/components/motion/scroll-to.d.ts.map +1 -0
  168. package/dist/components/motion/scroll-to.js +27 -0
  169. package/dist/components/motion/scroll-to.js.map +1 -0
  170. package/dist/components/motion/select-morph.d.ts +41 -0
  171. package/dist/components/motion/select-morph.d.ts.map +1 -0
  172. package/dist/components/motion/select-morph.js +251 -0
  173. package/dist/components/motion/select-morph.js.map +1 -0
  174. package/dist/components/motion/select.d.ts +36 -0
  175. package/dist/components/motion/select.d.ts.map +1 -0
  176. package/dist/components/motion/select.js +319 -0
  177. package/dist/components/motion/select.js.map +1 -0
  178. package/dist/components/motion/shader-background.d.ts +38 -0
  179. package/dist/components/motion/shader-background.d.ts.map +1 -0
  180. package/dist/components/motion/shader-background.js +49 -0
  181. package/dist/components/motion/shader-background.js.map +1 -0
  182. package/dist/components/motion/shared-layout-bg.d.ts +17 -0
  183. package/dist/components/motion/shared-layout-bg.d.ts.map +1 -0
  184. package/dist/components/motion/shared-layout-bg.js +88 -0
  185. package/dist/components/motion/shared-layout-bg.js.map +1 -0
  186. package/dist/components/motion/slide-action-button.d.ts +15 -0
  187. package/dist/components/motion/slide-action-button.d.ts.map +1 -0
  188. package/dist/components/motion/slide-action-button.js +146 -0
  189. package/dist/components/motion/slide-action-button.js.map +1 -0
  190. package/dist/components/motion/smooth-scroll.d.ts +47 -0
  191. package/dist/components/motion/smooth-scroll.d.ts.map +1 -0
  192. package/dist/components/motion/smooth-scroll.js +182 -0
  193. package/dist/components/motion/smooth-scroll.js.map +1 -0
  194. package/dist/components/motion/switch.d.ts +13 -0
  195. package/dist/components/motion/switch.d.ts.map +1 -0
  196. package/dist/components/motion/switch.js +76 -0
  197. package/dist/components/motion/switch.js.map +1 -0
  198. package/dist/components/motion/table/editable-cell.d.ts +9 -0
  199. package/dist/components/motion/table/editable-cell.d.ts.map +1 -0
  200. package/dist/components/motion/table/editable-cell.js +17 -0
  201. package/dist/components/motion/table/editable-cell.js.map +1 -0
  202. package/dist/components/motion/table/index.d.ts +6 -0
  203. package/dist/components/motion/table/index.d.ts.map +1 -0
  204. package/dist/components/motion/table/index.js +420 -0
  205. package/dist/components/motion/table/index.js.map +1 -0
  206. package/dist/components/motion/table/row-handle.d.ts +15 -0
  207. package/dist/components/motion/table/row-handle.d.ts.map +1 -0
  208. package/dist/components/motion/table/row-handle.js +51 -0
  209. package/dist/components/motion/table/row-handle.js.map +1 -0
  210. package/dist/components/motion/table/skeleton-rows.d.ts +11 -0
  211. package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -0
  212. package/dist/components/motion/table/skeleton-rows.js +23 -0
  213. package/dist/components/motion/table/skeleton-rows.js.map +1 -0
  214. package/dist/components/motion/table/table-header.d.ts +35 -0
  215. package/dist/components/motion/table/table-header.d.ts.map +1 -0
  216. package/dist/components/motion/table/table-header.js +167 -0
  217. package/dist/components/motion/table/table-header.js.map +1 -0
  218. package/dist/components/motion/table/table-menu.d.ts +17 -0
  219. package/dist/components/motion/table/table-menu.d.ts.map +1 -0
  220. package/dist/components/motion/table/table-menu.js +92 -0
  221. package/dist/components/motion/table/table-menu.js.map +1 -0
  222. package/dist/components/motion/tabs.d.ts +29 -0
  223. package/dist/components/motion/tabs.d.ts.map +1 -0
  224. package/dist/components/motion/tabs.js +125 -0
  225. package/dist/components/motion/tabs.js.map +1 -0
  226. package/dist/components/motion/text-cascade.d.ts +15 -0
  227. package/dist/components/motion/text-cascade.d.ts.map +1 -0
  228. package/dist/components/motion/text-cascade.js +21 -0
  229. package/dist/components/motion/text-cascade.js.map +1 -0
  230. package/dist/components/motion/text-reveal.d.ts +25 -0
  231. package/dist/components/motion/text-reveal.d.ts.map +1 -0
  232. package/dist/components/motion/text-reveal.js +94 -0
  233. package/dist/components/motion/text-reveal.js.map +1 -0
  234. package/dist/components/motion/text-shimmer.d.ts +12 -0
  235. package/dist/components/motion/text-shimmer.d.ts.map +1 -0
  236. package/dist/components/motion/text-shimmer.js +15 -0
  237. package/dist/components/motion/text-shimmer.js.map +1 -0
  238. package/dist/components/motion/theme-toggle.d.ts +23 -0
  239. package/dist/components/motion/theme-toggle.d.ts.map +1 -0
  240. package/dist/components/motion/theme-toggle.js +160 -0
  241. package/dist/components/motion/theme-toggle.js.map +1 -0
  242. package/dist/components/motion/tilt-card.d.ts +12 -0
  243. package/dist/components/motion/tilt-card.d.ts.map +1 -0
  244. package/dist/components/motion/tilt-card.js +56 -0
  245. package/dist/components/motion/tilt-card.js.map +1 -0
  246. package/dist/components/motion/tooltip.d.ts +17 -0
  247. package/dist/components/motion/tooltip.d.ts.map +1 -0
  248. package/dist/components/motion/tooltip.js +194 -0
  249. package/dist/components/motion/tooltip.js.map +1 -0
  250. package/dist/components/motion/wheel-picker.d.ts +24 -0
  251. package/dist/components/motion/wheel-picker.d.ts.map +1 -0
  252. package/dist/components/motion/wheel-picker.js +442 -0
  253. package/dist/components/motion/wheel-picker.js.map +1 -0
  254. package/dist/components/reui/alert.d.ts +1 -1
  255. package/dist/components/reui/alert.js +1 -1
  256. package/dist/components/reui/autocomplete.js +2 -2
  257. package/dist/components/reui/badge.d.ts +1 -1
  258. package/dist/components/reui/badge.js +10 -9
  259. package/dist/components/reui/badge.js.map +1 -1
  260. package/dist/components/reui/data-grid/data-grid-table-dnd.js +21 -19
  261. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
  262. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +1 -1
  263. package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
  264. package/dist/components/reui/data-grid/data-grid-table.js +4 -2
  265. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  266. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +2 -1
  267. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
  268. package/dist/components/reui/event-calendar/event-calendar-content.js +8 -7
  269. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
  270. package/dist/components/reui/event-calendar/event-calendar-dnd.js +7 -4
  271. package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -1
  272. package/dist/components/reui/event-calendar/event-calendar-event.js +49 -47
  273. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
  274. package/dist/components/reui/event-calendar/event-calendar-lib.js +3 -2
  275. package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -1
  276. package/dist/components/reui/event-calendar/event-calendar-nav.js +37 -31
  277. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
  278. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +2 -1
  279. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
  280. package/dist/components/reui/event-calendar/event-calendar.js +2 -1
  281. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
  282. package/dist/components/reui/filters.js +5 -3
  283. package/dist/components/reui/filters.js.map +1 -1
  284. package/dist/components/reui/frame.d.ts +1 -1
  285. package/dist/components/reui/frame.js +1 -1
  286. package/dist/components/reui/gantt/gantt-bar.js +52 -51
  287. package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
  288. package/dist/components/reui/gantt/gantt-lib.js +3 -2
  289. package/dist/components/reui/gantt/gantt-lib.js.map +1 -1
  290. package/dist/components/reui/gantt/gantt-nav.js +34 -30
  291. package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
  292. package/dist/components/reui/gantt/gantt-recurrence.js +2 -2
  293. package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -1
  294. package/dist/components/reui/gantt/gantt-view.js +175 -171
  295. package/dist/components/reui/gantt/gantt-view.js.map +1 -1
  296. package/dist/components/reui/icon-tile.js +12 -11
  297. package/dist/components/reui/icon-tile.js.map +1 -1
  298. package/dist/components/reui/kanban.js +42 -37
  299. package/dist/components/reui/kanban.js.map +1 -1
  300. package/dist/components/reui/number-field.js +1 -1
  301. package/dist/components/reui/rating.js +1 -1
  302. package/dist/components/reui/sortable.js +10 -9
  303. package/dist/components/reui/sortable.js.map +1 -1
  304. package/dist/components/reui/stepper.js +16 -16
  305. package/dist/components/reui/stepper.js.map +1 -1
  306. package/dist/components/reui/timeline.js +45 -38
  307. package/dist/components/reui/timeline.js.map +1 -1
  308. package/dist/components/reui/tree.js +2 -1
  309. package/dist/components/reui/tree.js.map +1 -1
  310. package/dist/components/ui/alert-dialog.js +1 -1
  311. package/dist/components/ui/alert-dialog.js.map +1 -1
  312. package/dist/components/ui/alert.js +1 -1
  313. package/dist/components/ui/attachment.d.ts +1 -1
  314. package/dist/components/ui/attachment.js +1 -1
  315. package/dist/components/ui/badge.d.ts +1 -1
  316. package/dist/components/ui/bubble.d.ts +1 -1
  317. package/dist/components/ui/bubble.js +1 -1
  318. package/dist/components/ui/button-group.js +1 -1
  319. package/dist/components/ui/button.d.ts +2 -2
  320. package/dist/components/ui/button.js +1 -1
  321. package/dist/components/ui/card.js +1 -1
  322. package/dist/components/ui/card.js.map +1 -1
  323. package/dist/components/ui/dialog.js +1 -1
  324. package/dist/components/ui/dialog.js.map +1 -1
  325. package/dist/components/ui/drawer.js +1 -1
  326. package/dist/components/ui/drawer.js.map +1 -1
  327. package/dist/components/ui/empty.d.ts +1 -1
  328. package/dist/components/ui/empty.js +2 -2
  329. package/dist/components/ui/empty.js.map +1 -1
  330. package/dist/components/ui/field.js +1 -1
  331. package/dist/components/ui/input-group.js +1 -1
  332. package/dist/components/ui/item.d.ts +2 -2
  333. package/dist/components/ui/item.js +1 -1
  334. package/dist/components/ui/marker.js +1 -1
  335. package/dist/components/ui/navigation-menu.js +1 -1
  336. package/dist/components/ui/sheet.js +1 -1
  337. package/dist/components/ui/sheet.js.map +1 -1
  338. package/dist/components/ui/sidebar.d.ts +1 -1
  339. package/dist/components/ui/sidebar.js +2 -2
  340. package/dist/components/ui/sidebar.js.map +1 -1
  341. package/dist/components/ui/tabs.js +1 -1
  342. package/dist/components/ui/toggle.d.ts +1 -1
  343. package/dist/components/ui/toggle.js +1 -1
  344. package/dist/hooks/use-hover-capable.d.ts +10 -0
  345. package/dist/hooks/use-hover-capable.d.ts.map +1 -0
  346. package/dist/hooks/use-hover-capable.js +24 -0
  347. package/dist/hooks/use-hover-capable.js.map +1 -0
  348. package/dist/hooks/use-mobile.js +1 -1
  349. package/dist/hooks/use-mobile.js.map +1 -1
  350. package/dist/hooks/use-slider.d.ts +58 -0
  351. package/dist/hooks/use-slider.d.ts.map +1 -0
  352. package/dist/hooks/use-slider.js +133 -0
  353. package/dist/hooks/use-slider.js.map +1 -0
  354. package/dist/lib/ease.d.ts +50 -0
  355. package/dist/lib/ease.d.ts.map +1 -0
  356. package/dist/lib/ease.js +66 -0
  357. package/dist/lib/ease.js.map +1 -0
  358. package/dist/lib/tick-sound.d.ts +17 -0
  359. package/dist/lib/tick-sound.d.ts.map +1 -0
  360. package/dist/lib/tick-sound.js +120 -0
  361. package/dist/lib/tick-sound.js.map +1 -0
  362. package/dist/popover-position-BUqYCq8X.js +54 -0
  363. package/dist/popover-position-BUqYCq8X.js.map +1 -0
  364. package/dist/theme.css +18 -58
  365. package/dist/types-Bah5NY44.d.ts +81 -0
  366. package/dist/types-Bah5NY44.d.ts.map +1 -0
  367. package/dist/utils-DQ7OpbYQ.js +25 -0
  368. package/dist/utils-DQ7OpbYQ.js.map +1 -0
  369. package/package.json +17 -6
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.js","names":[],"sources":["../../../src/components/reui/stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype StepperOrientation = \"horizontal\" | \"vertical\";\ntype StepState = \"active\" | \"completed\" | \"inactive\" | \"loading\";\ntype StepIndicators = {\n active?: React.ReactNode;\n completed?: React.ReactNode;\n inactive?: React.ReactNode;\n loading?: React.ReactNode;\n};\n\ninterface StepperContextValue {\n activeStep: number;\n setActiveStep: (step: number) => void;\n stepsCount: number;\n orientation: StepperOrientation;\n registerTrigger: (node: HTMLButtonElement | null) => void;\n triggerNodes: HTMLButtonElement[];\n focusNext: (currentIdx: number) => void;\n focusPrev: (currentIdx: number) => void;\n focusFirst: () => void;\n focusLast: () => void;\n indicators: StepIndicators;\n}\n\ninterface StepItemContextValue {\n step: number;\n state: StepState;\n isDisabled: boolean;\n isLoading: boolean;\n}\n\nconst StepperContext = createContext<StepperContextValue | undefined>(undefined);\nconst StepItemContext = createContext<StepItemContextValue | undefined>(undefined);\n\nfunction useStepper() {\n const ctx = useContext(StepperContext);\n if (!ctx) throw new Error(\"useStepper must be used within a Stepper\");\n return ctx;\n}\n\nfunction useStepItem() {\n const ctx = useContext(StepItemContext);\n if (!ctx) throw new Error(\"useStepItem must be used within a StepperItem\");\n return ctx;\n}\n\ninterface StepperProps extends HTMLAttributes<HTMLDivElement> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: StepperOrientation;\n indicators?: StepIndicators;\n}\n\nfunction Stepper({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"horizontal\",\n className,\n children,\n indicators = {},\n ...props\n}: StepperProps) {\n const [activeStep, setActiveStep] = useState(defaultValue);\n const [triggerNodes, setTriggerNodes] = useState<HTMLButtonElement[]>([]);\n\n // Register/unregister triggers\n const registerTrigger = useCallback((node: HTMLButtonElement | null) => {\n setTriggerNodes((prev) => {\n if (node && !prev.includes(node)) {\n return [...prev, node];\n } else if (!node && prev.includes(node!)) {\n return prev.filter((n) => n !== node);\n } else {\n return prev;\n }\n });\n }, []);\n\n const handleSetActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setActiveStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n // Keyboard navigation logic\n const focusTrigger = useCallback(\n (idx: number) => {\n if (triggerNodes[idx]) triggerNodes[idx].focus();\n },\n [triggerNodes],\n );\n const focusNext = useCallback(\n (currentIdx: number) => focusTrigger((currentIdx + 1) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusPrev = useCallback(\n (currentIdx: number) =>\n focusTrigger((currentIdx - 1 + triggerNodes.length) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusFirst = useCallback(() => focusTrigger(0), [focusTrigger]);\n const focusLast = useCallback(\n () => focusTrigger(triggerNodes.length - 1),\n [focusTrigger, triggerNodes.length],\n );\n\n // Context value\n const contextValue = useMemo<StepperContextValue>(\n () => ({\n activeStep: currentStep,\n setActiveStep: handleSetActiveStep,\n stepsCount: Children.toArray(children).filter(\n (child): child is ReactElement =>\n isValidElement(child) &&\n (child.type as { displayName?: string }).displayName === \"StepperItem\",\n ).length,\n orientation,\n registerTrigger,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n triggerNodes,\n indicators,\n }),\n [\n currentStep,\n handleSetActiveStep,\n children,\n orientation,\n registerTrigger,\n triggerNodes,\n focusNext,\n indicators,\n focusLast,\n focusPrev,\n focusFirst,\n ],\n );\n\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n role=\"tablist\"\n aria-orientation={orientation}\n data-slot=\"stepper\"\n className={cn(\"w-full\", className)}\n data-orientation={orientation}\n {...props}\n >\n {children}\n </div>\n </StepperContext.Provider>\n );\n}\n\ninterface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n step: number;\n completed?: boolean;\n disabled?: boolean;\n loading?: boolean;\n}\n\nfunction StepperItem({\n step,\n completed = false,\n disabled = false,\n loading = false,\n className,\n children,\n ...props\n}: StepperItemProps) {\n const { activeStep } = useStepper();\n\n const state: StepState =\n completed || step < activeStep ? \"completed\" : activeStep === step ? \"active\" : \"inactive\";\n\n const isLoading = loading && step === activeStep;\n\n return (\n <StepItemContext.Provider value={{ step, state, isDisabled: disabled, isLoading }}>\n <div\n data-slot=\"stepper-item\"\n className={cn(\n \"group/step flex not-last:flex-1 items-center justify-center group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col\",\n className,\n )}\n data-state={state}\n {...(isLoading ? { \"data-loading\": true } : {})}\n {...props}\n >\n {children}\n </div>\n </StepItemContext.Provider>\n );\n}\n\ntype StepperTriggerProps = useRender.ComponentProps<\"button\">;\n\nfunction StepperTrigger({ className, children, tabIndex, render, ...props }: StepperTriggerProps) {\n const { state, isLoading } = useStepItem();\n const stepperCtx = useStepper();\n const {\n setActiveStep,\n activeStep,\n registerTrigger,\n triggerNodes,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n } = stepperCtx;\n const { step, isDisabled } = useStepItem();\n const isSelected = activeStep === step;\n const id = `stepper-tab-${step}`;\n const panelId = `stepper-panel-${step}`;\n\n // Register this trigger for keyboard navigation\n const btnRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (btnRef.current) {\n registerTrigger(btnRef.current);\n }\n }, [registerTrigger]);\n\n // Find our index among triggers for navigation\n const myIdx = useMemo(\n () => triggerNodes.findIndex((n: HTMLButtonElement) => n === btnRef.current),\n [triggerNodes],\n );\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (e.key) {\n case \"ArrowRight\":\n case \"ArrowDown\":\n e.preventDefault();\n if (myIdx !== -1 && focusNext) focusNext(myIdx);\n break;\n case \"ArrowLeft\":\n case \"ArrowUp\":\n e.preventDefault();\n if (myIdx !== -1 && focusPrev) focusPrev(myIdx);\n break;\n case \"Home\":\n e.preventDefault();\n if (focusFirst) focusFirst();\n break;\n case \"End\":\n e.preventDefault();\n if (focusLast) focusLast();\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n setActiveStep(step);\n break;\n }\n };\n\n const defaultProps = {\n role: \"tab\",\n id,\n \"aria-selected\": isSelected,\n \"aria-controls\": panelId,\n tabIndex: typeof tabIndex === \"number\" ? tabIndex : isSelected ? 0 : -1,\n \"data-slot\": \"stepper-trigger\",\n \"data-state\": state,\n \"data-loading\": isLoading,\n className: cn(\n \"inline-flex cursor-pointer items-center outline-none focus-visible:z-10 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-60\",\n \"gap-2.5 rounded-full\",\n className,\n ),\n onClick: () => setActiveStep(step),\n onKeyDown: handleKeyDown,\n disabled: isDisabled,\n children,\n };\n\n return useRender({\n defaultTagName: \"button\",\n render,\n ref: btnRef,\n props: mergeProps<\"button\">(defaultProps, props),\n });\n}\n\nfunction StepperIndicator({ children, className }: React.ComponentProps<\"div\">) {\n const { state, isLoading } = useStepItem();\n const { indicators } = useStepper();\n\n return (\n <div\n data-slot=\"stepper-indicator\"\n data-state={state}\n className={cn(\n \"relative flex size-6 shrink-0 items-center justify-center overflow-hidden border-background bg-accent text-accent-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground\",\n \"rounded-full text-xs\",\n className,\n )}\n >\n <div className=\"absolute\">\n {indicators &&\n ((isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive))\n ? (isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive)\n : children}\n </div>\n </div>\n );\n}\n\nfunction StepperSeparator({ className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-separator\"\n data-state={state}\n className={cn(\n \"m-0.5 rounded-sm bg-muted group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1\",\n className,\n )}\n />\n );\n}\n\nfunction StepperTitle({ children, className }: React.ComponentProps<\"h3\">) {\n const { state } = useStepItem();\n\n return (\n <h3\n data-slot=\"stepper-title\"\n data-state={state}\n className={cn(\"font-medium text-sm leading-none\", className)}\n >\n {children}\n </h3>\n );\n}\n\nfunction StepperDescription({ children, className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-description\"\n data-state={state}\n className={cn(\"text-muted-foreground text-sm\", className)}\n >\n {children}\n </div>\n );\n}\n\nfunction StepperNav({ children, className }: React.ComponentProps<\"nav\">) {\n const { activeStep, orientation } = useStepper();\n\n return (\n <nav\n data-slot=\"stepper-nav\"\n data-state={activeStep}\n data-orientation={orientation}\n className={cn(\n \"group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n )}\n >\n {children}\n </nav>\n );\n}\n\nfunction StepperPanel({ children, className }: React.ComponentProps<\"div\">) {\n const { activeStep } = useStepper();\n\n return (\n <div data-slot=\"stepper-panel\" data-state={activeStep} className={cn(\"w-full\", className)}>\n {children}\n </div>\n );\n}\n\ninterface StepperContentProps extends React.ComponentProps<\"div\"> {\n value: number;\n forceMount?: boolean;\n}\n\nfunction StepperContent({ value, forceMount, children, className }: StepperContentProps) {\n const { activeStep } = useStepper();\n const isActive = value === activeStep;\n\n if (!forceMount && !isActive) {\n return null;\n }\n\n return (\n <div\n data-slot=\"stepper-content\"\n data-state={activeStep}\n className={cn(\"w-full\", className, !isActive && forceMount && \"hidden\")}\n hidden={!isActive && forceMount}\n >\n {children}\n </div>\n );\n}\n\nexport {\n Stepper,\n StepperContent,\n type StepperContentProps,\n StepperDescription,\n StepperIndicator,\n StepperItem,\n type StepperItemProps,\n StepperNav,\n StepperPanel,\n type StepperProps,\n StepperSeparator,\n StepperTitle,\n StepperTrigger,\n type StepperTriggerProps,\n useStepItem,\n useStepper,\n};\n"],"mappings":";;;;;;;AAmDA,MAAM,iBAAiB,cAA+C,KAAA,CAAS;AAC/E,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,SAAS,aAAa;CACpB,MAAM,MAAM,WAAW,cAAc;CACrC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,0CAA0C;CACpE,OAAO;AACT;AAEA,SAAS,cAAc;CACrB,MAAM,MAAM,WAAW,eAAe;CACtC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,+CAA+C;CACzE,OAAO;AACT;AAUA,SAAS,QAAQ,EACf,eAAe,GACf,OACA,eACA,cAAc,cACd,WACA,UACA,aAAa,CAAC,GACd,GAAG,SACY;CACf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GACT,iPACA,SACF;CACD,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,UAAU,aAAyC;CACzE,MAAM,EAAE,UAAU,YAAY;CAE9B,OACE,oBAAC,MAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,oCAAoC,SAAS;EAE1D;CACC,CAAA;AAER;AAEA,SAAS,mBAAmB,EAAE,UAAU,aAA0C;CAChF,MAAM,EAAE,UAAU,YAAY;CAE9B,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,iCAAiC,SAAS;EAEvD;CACE,CAAA;AAET;AAEA,SAAS,WAAW,EAAE,UAAU,aAA0C;CACxE,MAAM,EAAE,YAAY,gBAAgB,WAAW;CAE/C,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,oBAAkB;EAClB,WAAW,GACT,kJACA,SACF;EAEC;CACE,CAAA;AAET;AAEA,SAAS,aAAa,EAAE,UAAU,aAA0C;CAC1E,MAAM,EAAE,eAAe,WAAW;CAElC,OACE,oBAAC,OAAD;EAAK,aAAU;EAAgB,cAAY;EAAY,WAAW,GAAG,UAAU,SAAS;EACrF;CACE,CAAA;AAET;AAOA,SAAS,eAAe,EAAE,OAAO,YAAY,UAAU,aAAkC;CACvF,MAAM,EAAE,eAAe,WAAW;CAClC,MAAM,WAAW,UAAU;CAE3B,IAAI,CAAC,cAAc,CAAC,UAClB,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,UAAU,WAAW,CAAC,YAAY,cAAc,QAAQ;EACtE,QAAQ,CAAC,YAAY;EAEpB;CACE,CAAA;AAET"}
1
+ {"version":3,"file":"stepper.js","names":[],"sources":["../../../src/components/reui/stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype StepperOrientation = \"horizontal\" | \"vertical\";\ntype StepState = \"active\" | \"completed\" | \"inactive\" | \"loading\";\ntype StepIndicators = {\n active?: React.ReactNode;\n completed?: React.ReactNode;\n inactive?: React.ReactNode;\n loading?: React.ReactNode;\n};\n\ninterface StepperContextValue {\n activeStep: number;\n setActiveStep: (step: number) => void;\n stepsCount: number;\n orientation: StepperOrientation;\n registerTrigger: (node: HTMLButtonElement | null) => void;\n triggerNodes: HTMLButtonElement[];\n focusNext: (currentIdx: number) => void;\n focusPrev: (currentIdx: number) => void;\n focusFirst: () => void;\n focusLast: () => void;\n indicators: StepIndicators;\n}\n\ninterface StepItemContextValue {\n step: number;\n state: StepState;\n isDisabled: boolean;\n isLoading: boolean;\n}\n\nconst StepperContext = createContext<StepperContextValue | undefined>(undefined);\nconst StepItemContext = createContext<StepItemContextValue | undefined>(undefined);\n\nfunction useStepper() {\n const ctx = useContext(StepperContext);\n if (!ctx) throw new Error(\"useStepper must be used within a Stepper\");\n return ctx;\n}\n\nfunction useStepItem() {\n const ctx = useContext(StepItemContext);\n if (!ctx) throw new Error(\"useStepItem must be used within a StepperItem\");\n return ctx;\n}\n\ninterface StepperProps extends HTMLAttributes<HTMLDivElement> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: StepperOrientation;\n indicators?: StepIndicators;\n}\n\nfunction Stepper({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"horizontal\",\n className,\n children,\n indicators = {},\n ...props\n}: StepperProps) {\n const [activeStep, setActiveStep] = useState(defaultValue);\n const [triggerNodes, setTriggerNodes] = useState<HTMLButtonElement[]>([]);\n\n // Register/unregister triggers\n const registerTrigger = useCallback((node: HTMLButtonElement | null) => {\n setTriggerNodes((prev) => {\n if (node && !prev.includes(node)) {\n return [...prev, node];\n } else if (!node && prev.includes(node!)) {\n return prev.filter((n) => n !== node);\n } else {\n return prev;\n }\n });\n }, []);\n\n const handleSetActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setActiveStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n // Keyboard navigation logic\n const focusTrigger = useCallback(\n (idx: number) => {\n if (triggerNodes[idx]) triggerNodes[idx].focus();\n },\n [triggerNodes],\n );\n const focusNext = useCallback(\n (currentIdx: number) => focusTrigger((currentIdx + 1) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusPrev = useCallback(\n (currentIdx: number) =>\n focusTrigger((currentIdx - 1 + triggerNodes.length) % triggerNodes.length),\n [focusTrigger, triggerNodes.length],\n );\n const focusFirst = useCallback(() => focusTrigger(0), [focusTrigger]);\n const focusLast = useCallback(\n () => focusTrigger(triggerNodes.length - 1),\n [focusTrigger, triggerNodes.length],\n );\n\n // Context value\n const contextValue = useMemo<StepperContextValue>(\n () => ({\n activeStep: currentStep,\n setActiveStep: handleSetActiveStep,\n stepsCount: Children.toArray(children).filter(\n (child): child is ReactElement =>\n isValidElement(child) &&\n (child.type as { displayName?: string }).displayName === \"StepperItem\",\n ).length,\n orientation,\n registerTrigger,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n triggerNodes,\n indicators,\n }),\n [\n currentStep,\n handleSetActiveStep,\n children,\n orientation,\n registerTrigger,\n triggerNodes,\n focusNext,\n indicators,\n focusLast,\n focusPrev,\n focusFirst,\n ],\n );\n\n return (\n <StepperContext.Provider value={contextValue}>\n <div\n role=\"tablist\"\n aria-orientation={orientation}\n data-slot=\"stepper\"\n className={cn(\"w-full\", className)}\n data-orientation={orientation}\n {...props}\n >\n {children}\n </div>\n </StepperContext.Provider>\n );\n}\n\ninterface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n step: number;\n completed?: boolean;\n disabled?: boolean;\n loading?: boolean;\n}\n\nfunction StepperItem({\n step,\n completed = false,\n disabled = false,\n loading = false,\n className,\n children,\n ...props\n}: StepperItemProps) {\n const { activeStep } = useStepper();\n\n const state: StepState =\n completed || step < activeStep ? \"completed\" : activeStep === step ? \"active\" : \"inactive\";\n\n const isLoading = loading && step === activeStep;\n\n return (\n <StepItemContext.Provider value={{ step, state, isDisabled: disabled, isLoading }}>\n <div\n data-slot=\"stepper-item\"\n className={cn(\n \"group/step flex not-last:flex-1 items-center justify-center group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col\",\n className,\n )}\n data-state={state}\n {...(isLoading ? { \"data-loading\": true } : {})}\n {...props}\n >\n {children}\n </div>\n </StepItemContext.Provider>\n );\n}\n\ntype StepperTriggerProps = useRender.ComponentProps<\"button\">;\n\nfunction StepperTrigger({ className, children, tabIndex, render, ...props }: StepperTriggerProps) {\n const { state, isLoading } = useStepItem();\n const stepperCtx = useStepper();\n const {\n setActiveStep,\n activeStep,\n registerTrigger,\n triggerNodes,\n focusNext,\n focusPrev,\n focusFirst,\n focusLast,\n } = stepperCtx;\n const { step, isDisabled } = useStepItem();\n const isSelected = activeStep === step;\n const id = `stepper-tab-${step}`;\n const panelId = `stepper-panel-${step}`;\n\n // Register this trigger for keyboard navigation\n const btnRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (btnRef.current) {\n registerTrigger(btnRef.current);\n }\n }, [registerTrigger]);\n\n // Find our index among triggers for navigation\n const myIdx = useMemo(\n () => triggerNodes.findIndex((n: HTMLButtonElement) => n === btnRef.current),\n [triggerNodes],\n );\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (e.key) {\n case \"ArrowRight\":\n case \"ArrowDown\":\n e.preventDefault();\n if (myIdx !== -1 && focusNext) focusNext(myIdx);\n break;\n case \"ArrowLeft\":\n case \"ArrowUp\":\n e.preventDefault();\n if (myIdx !== -1 && focusPrev) focusPrev(myIdx);\n break;\n case \"Home\":\n e.preventDefault();\n if (focusFirst) focusFirst();\n break;\n case \"End\":\n e.preventDefault();\n if (focusLast) focusLast();\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n setActiveStep(step);\n break;\n }\n };\n\n const defaultProps = {\n role: \"tab\",\n id,\n \"aria-selected\": isSelected,\n \"aria-controls\": panelId,\n tabIndex: typeof tabIndex === \"number\" ? tabIndex : isSelected ? 0 : -1,\n \"data-slot\": \"stepper-trigger\",\n \"data-state\": state,\n \"data-loading\": isLoading,\n className: cn(\n \"inline-flex cursor-pointer items-center outline-none focus-visible:z-10 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-60\",\n \"gap-2.5 rounded-full\",\n className,\n ),\n onClick: () => setActiveStep(step),\n onKeyDown: handleKeyDown,\n disabled: isDisabled,\n children,\n };\n\n return useRender({\n defaultTagName: \"button\",\n render,\n ref: btnRef,\n props: mergeProps<\"button\">(defaultProps, props),\n });\n}\n\nfunction StepperIndicator({ children, className }: React.ComponentProps<\"div\">) {\n const { state, isLoading } = useStepItem();\n const { indicators } = useStepper();\n\n return (\n <div\n data-slot=\"stepper-indicator\"\n data-state={state}\n className={cn(\n \"relative flex size-6 shrink-0 items-center justify-center overflow-hidden border-background bg-accent text-accent-foreground data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground\",\n \"rounded-full text-xs\",\n className,\n )}\n >\n <div className=\"absolute\">\n {indicators &&\n ((isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive))\n ? (isLoading && indicators.loading) ||\n (state === \"completed\" && indicators.completed) ||\n (state === \"active\" && indicators.active) ||\n (state === \"inactive\" && indicators.inactive)\n : children}\n </div>\n </div>\n );\n}\n\nfunction StepperSeparator({ className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-separator\"\n data-state={state}\n className={cn(\n \"m-0.5 rounded-sm bg-muted group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1\",\n className,\n )}\n />\n );\n}\n\nfunction StepperTitle({ children, className }: React.ComponentProps<\"h3\">) {\n const { state } = useStepItem();\n\n return (\n <h3\n data-slot=\"stepper-title\"\n data-state={state}\n className={cn(\"font-medium text-sm leading-none\", className)}\n >\n {children}\n </h3>\n );\n}\n\nfunction StepperDescription({ children, className }: React.ComponentProps<\"div\">) {\n const { state } = useStepItem();\n\n return (\n <div\n data-slot=\"stepper-description\"\n data-state={state}\n className={cn(\"text-muted-foreground text-sm\", className)}\n >\n {children}\n </div>\n );\n}\n\nfunction StepperNav({ children, className }: React.ComponentProps<\"nav\">) {\n const { activeStep, orientation } = useStepper();\n\n return (\n <nav\n data-slot=\"stepper-nav\"\n data-state={activeStep}\n data-orientation={orientation}\n className={cn(\n \"group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n )}\n >\n {children}\n </nav>\n );\n}\n\nfunction StepperPanel({ children, className }: React.ComponentProps<\"div\">) {\n const { activeStep } = useStepper();\n\n return (\n <div data-slot=\"stepper-panel\" data-state={activeStep} className={cn(\"w-full\", className)}>\n {children}\n </div>\n );\n}\n\ninterface StepperContentProps extends React.ComponentProps<\"div\"> {\n value: number;\n forceMount?: boolean;\n}\n\nfunction StepperContent({ value, forceMount, children, className }: StepperContentProps) {\n const { activeStep } = useStepper();\n const isActive = value === activeStep;\n\n if (!forceMount && !isActive) {\n return null;\n }\n\n return (\n <div\n data-slot=\"stepper-content\"\n data-state={activeStep}\n className={cn(\"w-full\", className, !isActive && forceMount && \"hidden\")}\n hidden={!isActive && forceMount}\n >\n {children}\n </div>\n );\n}\n\nexport {\n Stepper,\n StepperContent,\n type StepperContentProps,\n StepperDescription,\n StepperIndicator,\n StepperItem,\n type StepperItemProps,\n StepperNav,\n StepperPanel,\n type StepperProps,\n StepperSeparator,\n StepperTitle,\n StepperTrigger,\n type StepperTriggerProps,\n useStepItem,\n useStepper,\n};\n"],"mappings":";;;;;;;AAmDA,MAAM,iBAAiB,cAA+C,KAAA,CAAS;AAC/E,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,SAAS,aAAa;CACpB,MAAM,MAAM,WAAW,cAAc;CACrC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,0CAA0C;CACpE,OAAO;AACT;AAEA,SAAS,cAAc;CACrB,MAAM,MAAM,WAAW,eAAe;CACtC,IAAI,CAAC,KAAK,MAAM,IAAI,MAAM,+CAA+C;CACzE,OAAO;AACT;AAUA,SAAS,QAAQ,EACf,eAAe,GACf,OACA,eACA,cAAc,cACd,WACA,UACA,aAAa,CAAC,GACd,GAAG,SACY;CACf,MAAM,CAAC,YAAY,iBAAiB,SAAS,YAAY;CACzD,MAAM,CAAC,cAAc,mBAAmB,SAA8B,CAAC,CAAC;CAGxE,MAAM,kBAAkB,aAAa,SAAmC;EACtE,iBAAiB,SAAS;GACxB,IAAI,QAAQ,CAAC,KAAK,SAAS,IAAI,GAC7B,OAAO,CAAC,GAAG,MAAM,IAAI;QAChB,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAK,GACrC,OAAO,KAAK,QAAQ,MAAM,MAAM,IAAI;QAEpC,OAAO;EAEX,CAAC;CACH,GAAG,CAAC,CAAC;CAEL,MAAM,sBAAsB,aACzB,SAAiB;EAChB,IAAI,UAAU,KAAA,GACZ,cAAc,IAAI;EAEpB,gBAAgB,IAAI;CACtB,GACA,CAAC,OAAO,aAAa,CACvB;CAEA,MAAM,cAAc,SAAS;CAG7B,MAAM,eAAe,aAClB,QAAgB;EACf,IAAI,aAAa,MAAM,aAAa,IAAI,CAAC,MAAM;CACjD,GACA,CAAC,YAAY,CACf;CACA,MAAM,YAAY,aACf,eAAuB,cAAc,aAAa,KAAK,aAAa,MAAM,GAC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AY,WAAW,GAAG,UAAU,SAAS;EACrF;CACE,CAAA;AAET;AAOA,SAAS,eAAe,EAAE,OAAO,YAAY,UAAU,aAAkC;CACvF,MAAM,EAAE,eAAe,WAAW;CAClC,MAAM,WAAW,UAAU;CAE3B,IAAI,CAAC,cAAc,CAAC,UAClB,OAAO;CAGT,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,GAAG,UAAU,WAAW,CAAC,YAAY,cAAc,QAAQ;EACtE,QAAQ,CAAC,YAAY;EAEpB;CACE,CAAA;AAET"}
@@ -37,84 +37,91 @@ function Timeline({ defaultValue = 1, value, onValueChange, orientation = "verti
37
37
  });
38
38
  }
39
39
  function TimelineContent({ className, render, children, ...props }) {
40
+ const defaultProps = {
41
+ className: cn("text-muted-foreground text-sm", className),
42
+ "data-slot": "timeline-content",
43
+ children
44
+ };
40
45
  return useRender({
41
46
  defaultTagName: "div",
42
47
  render,
43
- props: mergeProps({
44
- className: cn("text-muted-foreground text-sm", className),
45
- "data-slot": "timeline-content",
46
- children
47
- }, props)
48
+ props: mergeProps(defaultProps, props)
48
49
  });
49
50
  }
50
51
  function TimelineDate({ className, render, children, ...props }) {
52
+ const defaultProps = {
53
+ className: cn("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", className),
54
+ "data-slot": "timeline-date",
55
+ children
56
+ };
51
57
  return useRender({
52
58
  defaultTagName: "time",
53
59
  render,
54
- props: mergeProps({
55
- className: cn("mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4", className),
56
- "data-slot": "timeline-date",
57
- children
58
- }, props)
60
+ props: mergeProps(defaultProps, props)
59
61
  });
60
62
  }
61
63
  function TimelineHeader({ className, render, children, ...props }) {
64
+ const defaultProps = {
65
+ className: cn(className),
66
+ "data-slot": "timeline-header",
67
+ children
68
+ };
62
69
  return useRender({
63
70
  defaultTagName: "div",
64
71
  render,
65
- props: mergeProps({
66
- className: cn(className),
67
- "data-slot": "timeline-header",
68
- children
69
- }, props)
72
+ props: mergeProps(defaultProps, props)
70
73
  });
71
74
  }
72
75
  function TimelineIndicator({ className, children, render, ...props }) {
76
+ const defaultProps = {
77
+ "aria-hidden": true,
78
+ className: cn("absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary", className),
79
+ "data-slot": "timeline-indicator",
80
+ children
81
+ };
73
82
  return useRender({
74
83
  defaultTagName: "div",
75
84
  render,
76
- props: mergeProps({
77
- "aria-hidden": true,
78
- className: cn("absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary", className),
79
- "data-slot": "timeline-indicator",
80
- children
81
- }, props)
85
+ props: mergeProps(defaultProps, props)
82
86
  });
83
87
  }
84
88
  function TimelineItem({ step, className, render, children, ...props }) {
85
89
  const { activeStep } = useTimeline();
90
+ const defaultProps = {
91
+ className: cn("group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6", className),
92
+ "data-completed": step <= activeStep || void 0,
93
+ "data-slot": "timeline-item",
94
+ children
95
+ };
86
96
  return useRender({
87
97
  defaultTagName: "div",
88
98
  render,
89
- props: mergeProps({
90
- className: cn("group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6", className),
91
- "data-completed": step <= activeStep || void 0,
92
- "data-slot": "timeline-item",
93
- children
94
- }, props)
99
+ props: mergeProps(defaultProps, props)
95
100
  });
96
101
  }
97
102
  function TimelineSeparator({ className, render, children, ...props }) {
103
+ const defaultProps = {
104
+ "aria-hidden": true,
105
+ className: cn("absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5", className),
106
+ "data-slot": "timeline-separator",
107
+ children
108
+ };
98
109
  return useRender({
99
110
  defaultTagName: "div",
100
111
  render,
101
- props: mergeProps({
102
- "aria-hidden": true,
103
- className: cn("absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5", className),
104
- "data-slot": "timeline-separator",
105
- children
106
- }, props)
112
+ props: mergeProps(defaultProps, props)
107
113
  });
108
114
  }
109
115
  function TimelineTitle({ className, render, children, ...props }) {
116
+ const defaultProps = {
117
+ className: cn("font-medium text-sm", className),
118
+ "data-slot": "timeline-title",
119
+ children
120
+ };
110
121
  return useRender({
111
122
  defaultTagName: "h3",
112
123
  render,
113
- props: mergeProps({
114
- className: cn("font-medium text-sm", className),
115
- "data-slot": "timeline-title",
116
- children
117
- }, props)
124
+ props: mergeProps(defaultProps, props)
118
125
  });
119
126
  }
120
127
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.js","names":[],"sources":["../../../src/components/reui/timeline.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useCallback, useContext, useState } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype TimelineContextValue = {\n activeStep: number;\n setActiveStep: (step: number) => void;\n};\n\n// Context\nconst TimelineContext = createContext<TimelineContextValue | undefined>(undefined);\n\nconst useTimeline = () => {\n const context = useContext(TimelineContext);\n if (!context) {\n throw new Error(\"useTimeline must be used within a Timeline\");\n }\n return context;\n};\n\n// Components\ninterface TimelineProps extends useRender.ComponentProps<\"div\"> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction Timeline({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"vertical\",\n className,\n render,\n children,\n ...props\n}: TimelineProps) {\n const [activeStep, setInternalStep] = useState(defaultValue);\n\n const setActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setInternalStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n const defaultProps = {\n className: cn(\n \"group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n ),\n \"data-orientation\": orientation,\n \"data-slot\": \"timeline\",\n children,\n };\n\n return (\n <TimelineContext.Provider value={{ activeStep: currentStep, setActiveStep }}>\n {useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n })}\n </TimelineContext.Provider>\n );\n}\n\n// TimelineContent\nfunction TimelineContent({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(\"text-muted-foreground text-sm\", className),\n \"data-slot\": \"timeline-content\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineDate\ntype TimelineDateProps = useRender.ComponentProps<\"time\">;\n\nfunction TimelineDate({ className, render, children, ...props }: TimelineDateProps) {\n const defaultProps = {\n className: cn(\n \"mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4\",\n className,\n ),\n \"data-slot\": \"timeline-date\",\n children,\n };\n\n return useRender({\n defaultTagName: \"time\",\n render,\n props: mergeProps<\"time\">(defaultProps, props),\n });\n}\n\n// TimelineHeader\nfunction TimelineHeader({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(className),\n \"data-slot\": \"timeline-header\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineIndicator\ntype TimelineIndicatorProps = useRender.ComponentProps<\"div\">;\n\nfunction TimelineIndicator({ className, children, render, ...props }: TimelineIndicatorProps) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary\",\n className,\n ),\n \"data-slot\": \"timeline-indicator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineItem\ninterface TimelineItemProps extends useRender.ComponentProps<\"div\"> {\n step: number;\n}\n\nfunction TimelineItem({ step, className, render, children, ...props }: TimelineItemProps) {\n const { activeStep } = useTimeline();\n\n const defaultProps = {\n className: cn(\n \"group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6\",\n className,\n ),\n \"data-completed\": step <= activeStep || undefined,\n \"data-slot\": \"timeline-item\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineSeparator\nfunction TimelineSeparator({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5\",\n className,\n ),\n \"data-slot\": \"timeline-separator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineTitle\nfunction TimelineTitle({ className, render, children, ...props }: useRender.ComponentProps<\"h3\">) {\n const defaultProps = {\n className: cn(\"font-medium text-sm\", className),\n \"data-slot\": \"timeline-title\",\n children,\n };\n\n return useRender({\n defaultTagName: \"h3\",\n render,\n props: mergeProps<\"h3\">(defaultProps, props),\n });\n}\n\nexport {\n Timeline,\n TimelineContent,\n TimelineDate,\n TimelineHeader,\n TimelineIndicator,\n TimelineItem,\n TimelineSeparator,\n TimelineTitle,\n};\n"],"mappings":";;;;;;;AAeA,MAAM,kBAAkB,cAAgD,KAAA,CAAS;AAEjF,MAAM,oBAAoB;CACxB,MAAM,UAAU,WAAW,eAAe;CAC1C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,4CAA4C;CAE9D,OAAO;AACT;AAUA,SAAS,SAAS,EAChB,eAAe,GACf,OACA,eACA,cAAc,YACd,WACA,QACA,UACA,GAAG,SACa;CAChB,MAAM,CAAC,YAAY,mBAAmB,SAAS,YAAY;CAE3D,MAAM,gBAAgB,aACnB,SAAiB;EAChB,IAAI,UAAU,KAAA,GACZ,gBAAgB,IAAI;EAEtB,gBAAgB,IAAI;CACtB,GACA,CAAC,OAAO,aAAa,CACvB;CAEA,MAAM,cAAc,SAAS;CAE7B,MAAM,eAAe;EACnB,WAAW,GACT,wIACA,SACF;EACA,oBAAoB;EACpB,aAAa;EACb;CACF;CAEA,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;GAAE,YAAY;GAAa;EAAc;EACvE,UAAA,UAAU;GACT,gBAAgB;GAChB;GACA,OAAO,WAAkB,cAAc,KAAK;EAC9C,CAAC;CACuB,CAAA;AAE9B;AAGA,SAAS,gBAAgB,EACvB,WACA,QACA,UACA,GAAG,SAC+B;CAOlC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GARzB,WAAW,GAAG,iCAAiC,SAAS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,WAAW,GAAG,uBAAuB,SAAS;GAC9C,aAAa;GACb;EAMmC,GAAG,KAAK;CAC7C,CAAC;AACH"}
1
+ {"version":3,"file":"timeline.js","names":[],"sources":["../../../src/components/reui/timeline.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useCallback, useContext, useState } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\n\nimport { cn } from \"@kumix/utils\";\n\n// Types\ntype TimelineContextValue = {\n activeStep: number;\n setActiveStep: (step: number) => void;\n};\n\n// Context\nconst TimelineContext = createContext<TimelineContextValue | undefined>(undefined);\n\nconst useTimeline = () => {\n const context = useContext(TimelineContext);\n if (!context) {\n throw new Error(\"useTimeline must be used within a Timeline\");\n }\n return context;\n};\n\n// Components\ninterface TimelineProps extends useRender.ComponentProps<\"div\"> {\n defaultValue?: number;\n value?: number;\n onValueChange?: (value: number) => void;\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nfunction Timeline({\n defaultValue = 1,\n value,\n onValueChange,\n orientation = \"vertical\",\n className,\n render,\n children,\n ...props\n}: TimelineProps) {\n const [activeStep, setInternalStep] = useState(defaultValue);\n\n const setActiveStep = useCallback(\n (step: number) => {\n if (value === undefined) {\n setInternalStep(step);\n }\n onValueChange?.(step);\n },\n [value, onValueChange],\n );\n\n const currentStep = value ?? activeStep;\n\n const defaultProps = {\n className: cn(\n \"group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col\",\n className,\n ),\n \"data-orientation\": orientation,\n \"data-slot\": \"timeline\",\n children,\n };\n\n return (\n <TimelineContext.Provider value={{ activeStep: currentStep, setActiveStep }}>\n {useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n })}\n </TimelineContext.Provider>\n );\n}\n\n// TimelineContent\nfunction TimelineContent({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(\"text-muted-foreground text-sm\", className),\n \"data-slot\": \"timeline-content\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineDate\ntype TimelineDateProps = useRender.ComponentProps<\"time\">;\n\nfunction TimelineDate({ className, render, children, ...props }: TimelineDateProps) {\n const defaultProps = {\n className: cn(\n \"mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4\",\n className,\n ),\n \"data-slot\": \"timeline-date\",\n children,\n };\n\n return useRender({\n defaultTagName: \"time\",\n render,\n props: mergeProps<\"time\">(defaultProps, props),\n });\n}\n\n// TimelineHeader\nfunction TimelineHeader({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n className: cn(className),\n \"data-slot\": \"timeline-header\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineIndicator\ntype TimelineIndicatorProps = useRender.ComponentProps<\"div\">;\n\nfunction TimelineIndicator({ className, children, render, ...props }: TimelineIndicatorProps) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-completed/timeline-item:border-primary\",\n className,\n ),\n \"data-slot\": \"timeline-indicator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineItem\ninterface TimelineItemProps extends useRender.ComponentProps<\"div\"> {\n step: number;\n}\n\nfunction TimelineItem({ step, className, render, children, ...props }: TimelineItemProps) {\n const { activeStep } = useTimeline();\n\n const defaultProps = {\n className: cn(\n \"group/timeline-item relative flex flex-1 flex-col gap-0.5 has-[+[data-completed]]:**:data-[slot=timeline-separator]:bg-primary group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-6\",\n className,\n ),\n \"data-completed\": step <= activeStep || undefined,\n \"data-slot\": \"timeline-item\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineSeparator\nfunction TimelineSeparator({\n className,\n render,\n children,\n ...props\n}: useRender.ComponentProps<\"div\">) {\n const defaultProps = {\n \"aria-hidden\": true,\n className: cn(\n \"absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:-translate-x-1/2 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:translate-y-4.5\",\n className,\n ),\n \"data-slot\": \"timeline-separator\",\n children,\n };\n\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n// TimelineTitle\nfunction TimelineTitle({ className, render, children, ...props }: useRender.ComponentProps<\"h3\">) {\n const defaultProps = {\n className: cn(\"font-medium text-sm\", className),\n \"data-slot\": \"timeline-title\",\n children,\n };\n\n return useRender({\n defaultTagName: \"h3\",\n render,\n props: mergeProps<\"h3\">(defaultProps, props),\n });\n}\n\nexport {\n Timeline,\n TimelineContent,\n TimelineDate,\n TimelineHeader,\n TimelineI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;CAClC,MAAM,eAAe;EACnB,WAAW,GAAG,SAAS;EACvB,aAAa;EACb;CACF;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB,cAAc,KAAK;CAC9C,CAAC;AACH;AAKA,SAAS,kBAAkB,EAAE,WAAW,UAAU,QAAQ,GAAG,SAAiC;CAC5F,MAAM,eAAe;EACnB,eAAe;EACf,WAAW,GACT,mbACA,SACF;EACA,aAAa;EACb;CACF;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB,cAAc,KAAK;CAC9C,CAAC;AACH;AAOA,SAAS,aAAa,EAAE,MAAM,WAAW,QAAQ,UAAU,GAAG,SAA4B;CACxF,MAAM,EAAE,eAAe,YAAY;CAEnC,MAAM,eAAe;EACnB,WAAW,GACT,wVACA,SACF;EACA,kBAAkB,QAAQ,cAAc,KAAA;EACxC,aAAa;EACb;CACF;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB,cAAc,KAAK;CAC9C,CAAC;AACH;AAGA,SAAS,kBAAkB,EACzB,WACA,QACA,UACA,GAAG,SAC+B;CAClC,MAAM,eAAe;EACnB,eAAe;EACf,WAAW,GACT,kpBACA,SACF;EACA,aAAa;EACb;CACF;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB,cAAc,KAAK;CAC9C,CAAC;AACH;AAGA,SAAS,cAAc,EAAE,WAAW,QAAQ,UAAU,GAAG,SAAyC;CAChG,MAAM,eAAe;EACnB,WAAW,GAAG,uBAAuB,SAAS;EAC9C,aAAa;EACb;CACF;CAEA,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAiB,cAAc,KAAK;CAC7C,CAAC;AACH"}
@@ -103,8 +103,9 @@ function TreeDragLine({ className, ...props }) {
103
103
  console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
104
104
  return null;
105
105
  }
106
+ const dragLine = tree.getDragLineStyle();
106
107
  return /* @__PURE__ */ jsx("div", {
107
- style: tree.getDragLineStyle(),
108
+ style: dragLine,
108
109
  className: cn("absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background", "before:rounded-full", className),
109
110
  ...props
110
111
  });
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","names":[],"sources":["../../../src/components/reui/tree.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <> */\n\n\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ItemInstance } from \"@headless-tree/core\";\nimport { ChevronDownIcon, MinusIcon, PlusIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ToggleIconType = \"chevron\" | \"plus-minus\";\n\ninterface TreeContextValue<T = any> {\n indent: number;\n currentItem?: ItemInstance<T>;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nconst TreeContext = createContext<TreeContextValue>({\n indent: 20,\n currentItem: undefined,\n tree: undefined,\n toggleIconType: \"plus-minus\",\n});\n\nfunction useTreeContext<T = any>() {\n return useContext(TreeContext) as TreeContextValue<T>;\n}\n\ninterface TreeProps extends React.HTMLAttributes<HTMLDivElement> {\n indent?: number;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nfunction Tree({ indent = 20, tree, className, toggleIconType = \"chevron\", ...props }: TreeProps) {\n const containerProps =\n tree && typeof tree.getContainerProps === \"function\" ? tree.getContainerProps() : {};\n const mergedProps = { ...props, ...containerProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-indent\": `${indent}px`,\n } as React.CSSProperties;\n\n return (\n <TreeContext.Provider value={{ indent, tree, toggleIconType }}>\n <div\n data-slot=\"tree\"\n style={mergedStyle}\n className={cn(\"flex flex-col\", className)}\n {...otherProps}\n />\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemProps<T = any> extends Omit<useRender.ComponentProps<\"button\">, \"indent\"> {\n item: ItemInstance<T>;\n indent?: number;\n}\n\nfunction TreeItem<T = any>({ item, className, render, children, ...props }: TreeItemProps<T>) {\n const parentContext = useTreeContext<T>();\n const { indent } = parentContext;\n\n const itemProps = typeof item.getProps === \"function\" ? item.getProps() : {};\n const mergedProps = { ...props, children, ...itemProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-padding\": `${item.getItemMeta().level * indent}px`,\n } as React.CSSProperties;\n\n const defaultProps = {\n \"data-slot\": \"tree-item\",\n style: mergedStyle,\n className: cn(\n \"z-10 select-none ps-(--tree-padding) not-last:pb-0.5 outline-hidden focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n ),\n \"data-focus\": typeof item.isFocused === \"function\" ? item.isFocused() || false : undefined,\n \"data-folder\": typeof item.isFolder === \"function\" ? item.isFolder() || false : undefined,\n \"data-selected\": typeof item.isSelected === \"function\" ? item.isSelected() || false : undefined,\n \"data-drag-target\":\n typeof item.isDragTarget === \"function\" ? item.isDragTarget() || false : undefined,\n \"data-search-match\":\n typeof item.isMatchingSearch === \"function\" ? item.isMatchingSearch() || false : undefined,\n \"aria-expanded\": item.isExpanded(),\n };\n\n return (\n <TreeContext.Provider value={{ ...parentContext, currentItem: item }}>\n {useRender({\n defaultTagName: \"button\",\n render,\n props: mergeProps<\"button\">(defaultProps, otherProps),\n })}\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {\n item?: ItemInstance<T>;\n}\n\nfunction TreeItemLabel<T = any>({\n item: propItem,\n children,\n className,\n ...props\n}: TreeItemLabelProps<T>) {\n const { currentItem, toggleIconType } = useTreeContext<T>();\n const item = propItem || currentItem;\n\n if (!item) {\n console.warn(\"TreeItemLabel: No item provided via props or context\");\n return null;\n }\n\n return (\n <span\n data-slot=\"tree-item-label\"\n className={cn(\n \"flex items-center gap-1 bg-background in-data-[drag-target=true]:bg-accent in-data-[search-match=true]:bg-blue-50! in-data-[selected=true]:bg-accent not-in-data-[folder=true]:ps-7 in-data-[selected=true]:text-accent-foreground in-focus-visible:ring-[3px] in-focus-visible:ring-ring/50 transition-colors hover:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"rounded-md\",\n \"py-1.5\",\n \"px-2\",\n \"text-sm\",\n className,\n )}\n {...props}\n >\n {item.isFolder() &&\n (toggleIconType === \"plus-minus\" ? (\n item.isExpanded() ? (\n <MinusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n ) : (\n <PlusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n )\n ) : (\n <ChevronDownIcon className=\"size-4 in-aria-[expanded=false]:-rotate-90 text-muted-foreground\" />\n ))}\n {children || (typeof item.getItemName === \"function\" ? item.getItemName() : null)}\n </span>\n );\n}\n\nfunction TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n const { tree } = useTreeContext();\n\n if (!tree || typeof tree.getDragLineStyle !== \"function\") {\n console.warn(\n \"TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method\",\n );\n return null;\n }\n\n const dragLine = tree.getDragLineStyle();\n return (\n <div\n style={dragLine}\n className={cn(\n \"absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background\",\n \"before:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Tree, TreeDragLine, TreeItem, TreeItemLabel };\n"],"mappings":";;;;;;;;;AAqBA,MAAM,cAAc,cAAgC;CAClD,QAAQ;CACR,aAAa,KA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sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: <> */\n\n\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ItemInstance } from \"@headless-tree/core\";\nimport { ChevronDownIcon, MinusIcon, PlusIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\n\ntype ToggleIconType = \"chevron\" | \"plus-minus\";\n\ninterface TreeContextValue<T = any> {\n indent: number;\n currentItem?: ItemInstance<T>;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nconst TreeContext = createContext<TreeContextValue>({\n indent: 20,\n currentItem: undefined,\n tree: undefined,\n toggleIconType: \"plus-minus\",\n});\n\nfunction useTreeContext<T = any>() {\n return useContext(TreeContext) as TreeContextValue<T>;\n}\n\ninterface TreeProps extends React.HTMLAttributes<HTMLDivElement> {\n indent?: number;\n tree?: any;\n toggleIconType?: ToggleIconType;\n}\n\nfunction Tree({ indent = 20, tree, className, toggleIconType = \"chevron\", ...props }: TreeProps) {\n const containerProps =\n tree && typeof tree.getContainerProps === \"function\" ? tree.getContainerProps() : {};\n const mergedProps = { ...props, ...containerProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-indent\": `${indent}px`,\n } as React.CSSProperties;\n\n return (\n <TreeContext.Provider value={{ indent, tree, toggleIconType }}>\n <div\n data-slot=\"tree\"\n style={mergedStyle}\n className={cn(\"flex flex-col\", className)}\n {...otherProps}\n />\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemProps<T = any> extends Omit<useRender.ComponentProps<\"button\">, \"indent\"> {\n item: ItemInstance<T>;\n indent?: number;\n}\n\nfunction TreeItem<T = any>({ item, className, render, children, ...props }: TreeItemProps<T>) {\n const parentContext = useTreeContext<T>();\n const { indent } = parentContext;\n\n const itemProps = typeof item.getProps === \"function\" ? item.getProps() : {};\n const mergedProps = { ...props, children, ...itemProps };\n\n // Extract style from mergedProps to merge with our custom styles\n const { style: propStyle, ...otherProps } = mergedProps;\n\n // Merge styles\n const mergedStyle = {\n ...propStyle,\n \"--tree-padding\": `${item.getItemMeta().level * indent}px`,\n } as React.CSSProperties;\n\n const defaultProps = {\n \"data-slot\": \"tree-item\",\n style: mergedStyle,\n className: cn(\n \"z-10 select-none ps-(--tree-padding) not-last:pb-0.5 outline-hidden focus:z-20 data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n ),\n \"data-focus\": typeof item.isFocused === \"function\" ? item.isFocused() || false : undefined,\n \"data-folder\": typeof item.isFolder === \"function\" ? item.isFolder() || false : undefined,\n \"data-selected\": typeof item.isSelected === \"function\" ? item.isSelected() || false : undefined,\n \"data-drag-target\":\n typeof item.isDragTarget === \"function\" ? item.isDragTarget() || false : undefined,\n \"data-search-match\":\n typeof item.isMatchingSearch === \"function\" ? item.isMatchingSearch() || false : undefined,\n \"aria-expanded\": item.isExpanded(),\n };\n\n return (\n <TreeContext.Provider value={{ ...parentContext, currentItem: item }}>\n {useRender({\n defaultTagName: \"button\",\n render,\n props: mergeProps<\"button\">(defaultProps, otherProps),\n })}\n </TreeContext.Provider>\n );\n}\n\ninterface TreeItemLabelProps<T = any> extends React.HTMLAttributes<HTMLSpanElement> {\n item?: ItemInstance<T>;\n}\n\nfunction TreeItemLabel<T = any>({\n item: propItem,\n children,\n className,\n ...props\n}: TreeItemLabelProps<T>) {\n const { currentItem, toggleIconType } = useTreeContext<T>();\n const item = propItem || currentItem;\n\n if (!item) {\n console.warn(\"TreeItemLabel: No item provided via props or context\");\n return null;\n }\n\n return (\n <span\n data-slot=\"tree-item-label\"\n className={cn(\n \"flex items-center gap-1 bg-background in-data-[drag-target=true]:bg-accent in-data-[search-match=true]:bg-blue-50! in-data-[selected=true]:bg-accent not-in-data-[folder=true]:ps-7 in-data-[selected=true]:text-accent-foreground in-focus-visible:ring-[3px] in-focus-visible:ring-ring/50 transition-colors hover:bg-accent [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"rounded-md\",\n \"py-1.5\",\n \"px-2\",\n \"text-sm\",\n className,\n )}\n {...props}\n >\n {item.isFolder() &&\n (toggleIconType === \"plus-minus\" ? (\n item.isExpanded() ? (\n <MinusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n ) : (\n <PlusIcon\n className=\"size-3.5 text-muted-foreground\"\n stroke=\"currentColor\"\n strokeWidth=\"1\"\n />\n )\n ) : (\n <ChevronDownIcon className=\"size-4 in-aria-[expanded=false]:-rotate-90 text-muted-foreground\" />\n ))}\n {children || (typeof item.getItemName === \"function\" ? item.getItemName() : null)}\n </span>\n );\n}\n\nfunction TreeDragLine({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n const { tree } = useTreeContext();\n\n if (!tree || typeof tree.getDragLineStyle !== \"function\") {\n console.warn(\n \"TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method\",\n );\n return null;\n }\n\n const dragLine = tree.getDragLineStyle();\n return (\n <div\n style={dragLine}\n className={cn(\n \"absolute z-30 -mt-px h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:border-2 before:border-primary before:bg-background\",\n \"before:rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Tree, TreeDragLine, TreeItem, TreeItemLabel };\n"],"mappings":";;;;;;;;;AAqBA,MAAM,cAAc,cAAgC;CAClD,QAAQ;CACR,aAAa,KAAA;CACb,MAAM,KAAA;CACN,gBAAgB;AAClB,CAAC;AAED,SAAS,iBAA0B;CACjC,OAAO,WAAW,WAAW;AAC/B;AAQA,SAAS,KAAK,EAAE,SAAS,IAAI,MAAM,WAAW,iBAAiB,WAAW,GAAG,SAAoB;CAC/F,MAAM,iBACJ,QAAQ,OAAO,KAAK,sBAAsB,aAAa,KAAK,kBAAkB,IAAI,CAAC;CAIrF,MAAM,E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cAAc,UAAU;EACtD,CAAC;CACmB,CAAA;AAE1B;AAMA,SAAS,cAAuB,EAC9B,MAAM,UACN,UACA,WACA,GAAG,SACqB;CACxB,MAAM,EAAE,aAAa,mBAAmB,eAAkB;CAC1D,MAAM,OAAO,YAAY;CAEzB,IAAI,CAAC,MAAM;EACT,QAAQ,KAAK,sDAAsD;EACnE,OAAO;CACT;CAEA,OACE,qBAAC,QAAD;EACE,aAAU;EACV,WAAW,GACT,+WACA,cACA,UACA,QACA,WACA,SACF;EACA,GAAI;EAVN,UAAA,CAYG,KAAK,SAAS,MACZ,mBAAmB,eAClB,KAAK,WAAW,IACd,oBAAC,WAAD;GACE,WAAU;GACV,QAAO;GACP,aAAY;EACb,CAAA,IAED,oBAAC,UAAD;GACE,WAAU;GACV,QAAO;GACP,aAAY;EACb,CAAA,IAGH,oBAAC,iBAAD,EAAiB,WAAU,mEAAoE,CAAA,IAElG,aAAa,OAAO,KAAK,gBAAgB,aAAa,KAAK,YAAY,IAAI,KACxE;;AAEV;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA+C;CACnF,MAAM,EAAE,SAAS,eAAe;CAEhC,IAAI,CAAC,QAAQ,OAAO,KAAK,qBAAqB,YAAY;EACxD,QAAQ,KACN,0FACF;EACA,OAAO;CACT;CAEA,MAAM,WAAW,KAAK,iBAAiB;CACvC,OACE,oBAAC,OAAD;EACE,OAAO;EACP,WAAW,GACT,4KACA,uBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -61,7 +61,7 @@ function AlertDialogMedia({ className, ...props }) {
61
61
  function AlertDialogTitle({ className, ...props }) {
62
62
  return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
63
63
  "data-slot": "alert-dialog-title",
64
- className: cn("font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
64
+ className: cn("font-heading font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
65
65
  ...props
66
66
  });
67
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive"],"sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"./button\";\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-balance text-muted-foreground text-sm md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>) {\n return <Button data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":";;;;;;AAQA,SAAS,YAAY,EAAE,GAAG,SAA0C;CAClE,OAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,mBAAmB,EAAE,GAAG,SAA6C;CAC5E,OAAO,oBAACA,cAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;AAEA,SAAS,kBAAkB,EAAE,GAAG,SAA4C;CAC1E,OAAO,oBAACA,cAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA8C;CACxF,OACE,oBAACA,cAAqB,UAAtB;EACE,aAAU;EACV,WAAW,GACT,yLACA,SACF;EACA,GAAI;CACL,CA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AQ,oBAAC,QAAD;GAAiB;GAAe;EAAO,CAAA;EAC/C,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive"],"sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\nimport { AlertDialog as AlertDialogPrimitive } from \"@base-ui/react/alert-dialog\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"./button\";\n\nfunction AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) {\n return (\n <AlertDialogPrimitive.Backdrop\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Popup.Props & {\n size?: \"default\" | \"sm\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-heading font-medium text-base sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\n \"text-balance text-muted-foreground text-sm md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>) {\n return <Button data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: AlertDialogPrimitive.Close.Props &\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">) {\n return (\n <AlertDialogPrimitive.Close\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n render={<Button variant={variant} size={size} />}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":";;;;;;AAQA,SAAS,YAAY,EAAE,GAAG,SAA0C;CAClE,OAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,mBAAmB,EAAE,GAAG,SAA6C;CAC5E,OAAO,oBAACA,cAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;AAEA,SAAS,kBAAkB,EAAE,GAAG,SAA4C;CAC1E,OAAO,oBAACA,cAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA8C;CACxF,OACE,oBAACA,cAAqB,UAAtB;EACE,aAAU;EACV,WAAW,GACT,yLACA,SACF;EACA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SAAS;EACvB,QAAQ,oBAAC,QAAD;GAAiB;GAAe;EAAO,CAAA;EAC/C,GAAI;CACL,CAAA;AAEL"}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "@kumix/utils";
3
- import { cva } from "class-variance-authority";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
5
  //#region src/components/ui/alert.tsx
6
6
  const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 has-data-[slot=alert-action]:pr-18 *:[svg:not([class*='size-'])]:size-4 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current", {
7
7
  variants: { variant: {
@@ -11,7 +11,7 @@ declare function Attachment({ className, state, size, orientation, ...props }: R
11
11
  state?: "idle" | "uploading" | "processing" | "error" | "done";
12
12
  }): React$1.JSX.Element;
13
13
  declare const attachmentMediaVariants: (props?: ({
14
- variant?: "image" | "icon" | null | undefined;
14
+ variant?: "icon" | "image" | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
16
  declare function AttachmentMedia({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants>): React$1.JSX.Element;
17
17
  declare function AttachmentContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Button } from "./button.js";
3
3
  import { cn } from "@kumix/utils";
4
- import { cva } from "class-variance-authority";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
6
  import { mergeProps } from "@base-ui/react/merge-props";
7
7
  import { useRender } from "@base-ui/react/use-render";
8
8
  //#region src/components/ui/attachment.tsx
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority";
2
2
  import { useRender } from "@base-ui/react/use-render";
3
3
  //#region src/components/ui/badge.d.ts
4
4
  declare const badgeVariants: (props?: ({
5
- variant?: "ghost" | "outline" | "secondary" | "default" | "destructive" | "link" | null | undefined;
5
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
8
8
  //#endregion
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render";
4
4
  //#region src/components/ui/bubble.d.ts
5
5
  declare function BubbleGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
6
6
  declare const bubbleVariants: (props?: ({
7
- variant?: "ghost" | "outline" | "secondary" | "default" | "destructive" | "muted" | "tinted" | null | undefined;
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "muted" | "tinted" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  declare function Bubble({ variant, align, className, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
10
10
  align?: "start" | "end";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "@kumix/utils";
3
- import { cva } from "class-variance-authority";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
5
  import { mergeProps } from "@base-ui/react/merge-props";
6
6
  import { useRender } from "@base-ui/react/use-render";
7
7
  //#region src/components/ui/bubble.tsx
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Separator } from "./separator.js";
3
3
  import { cn } from "@kumix/utils";
4
- import { cva } from "class-variance-authority";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
6
  import { mergeProps } from "@base-ui/react/merge-props";
7
7
  import { useRender } from "@base-ui/react/use-render";
8
8
  //#region src/components/ui/button-group.tsx
@@ -2,8 +2,8 @@ import { VariantProps } from "class-variance-authority";
2
2
  import { Button as Button$1 } from "@base-ui/react/button";
3
3
  //#region src/components/ui/button.d.ts
4
4
  declare const buttonVariants: (props?: ({
5
- variant?: "ghost" | "outline" | "secondary" | "default" | "destructive" | "link" | null | undefined;
6
- size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
5
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
6
+ size?: "icon" | "default" | "sm" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
9
9
  //#endregion
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from "@kumix/utils";
3
- import { cva } from "class-variance-authority";
4
3
  import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
5
  import { Button as Button$1 } from "@base-ui/react/button";
6
6
  //#region src/components/ui/button.tsx
7
7
  const buttonVariants = cva("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-lg border border-transparent bg-clip-padding font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
@@ -20,7 +20,7 @@ function CardHeader({ className, ...props }) {
20
20
  function CardTitle({ className, ...props }) {
21
21
  return /* @__PURE__ */ jsx("div", {
22
22
  "data-slot": "card-title",
23
- className: cn("font-medium text-base leading-snug group-data-[size=sm]/card:text-sm", className),
23
+ className: cn("font-heading font-medium text-base leading-snug group-data-[size=sm]/card:text-sm", className),
24
24
  ...props
25
25
  });
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","names":[],"sources":["../../../src/components/ui/card.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\n\nimport { cn } from \"@kumix/utils\";\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n \"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-card-foreground text-sm ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 has-data-[slot=card-footer]:pb-0 data-[size=sm]:has-data-[slot=card-footer]:pb-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\n \"font-medium text-base leading-snug group-data-[size=sm]/card:text-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"card-content\" className={cn(\"px-(--card-spacing)\", className)} {...props} />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\n \"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"mappings":";;;;AAMA,SAAS,KAAK,EACZ,WACA,OAAO,WACP,GAAG,SACyD;CAC5D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,wZACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,0PACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;CACvE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,wEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAsC;CAC7E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,kEAAkE,SAAS;EACzF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EAAK,aAAU;EAAe,WAAW,GAAG,uBAAuB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAE/F;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,0EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"card.js","names":[],"sources":["../../../src/components/ui/card.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\n\nimport { cn } from \"@kumix/utils\";\n\nfunction Card({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n \"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-card-foreground text-sm ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 has-data-[slot=card-footer]:pb-0 data-[size=sm]:has-data-[slot=card-footer]:pb-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\n \"font-heading font-medium text-base leading-snug group-data-[size=sm]/card:text-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"card-content\" className={cn(\"px-(--card-spacing)\", className)} {...props} />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\n \"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"mappings":";;;;AAMA,SAAS,KAAK,EACZ,WACA,OAAO,WACP,GAAG,SACyD;CAC5D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,wZACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,0PACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;CACvE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,qFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAsC;CAC7E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,kEAAkE,SAAS;EACzF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EAAK,aAAU;EAAe,WAAW,GAAG,uBAAuB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAE/F;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,0EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -76,7 +76,7 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
76
76
  function DialogTitle({ className, ...props }) {
77
77
  return /* @__PURE__ */ jsx(Dialog$1.Title, {
78
78
  "data-slot": "dialog-title",
79
- className: cn("font-medium text-base leading-none", className),
79
+ className: cn("font-heading font-medium text-base leading-none", className),
80
80
  ...props
81
81
  });
82
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":["DialogPrimitive"],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"./button\";\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground text-sm outline-none ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in sm:max-w-sm\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={<Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\" />}\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"dialog-header\" className={cn(\"flex flex-col gap-2\", className)} {...props} />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>Close</DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"font-medium text-base leading-none\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground text-sm *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;AASA,SAAS,OAAO,EAAE,GAAG,SAAqC;CACxD,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAEA,SAAS,cAAc,EAAE,GAAG,SAAwC;CAClE,OAAO,oBAACA,SAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,aAAa,EAAE,GAAG,SAAuC;CAChE,OAAO,oBAACA,SAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;AAEA,SAAS,YAAY,EAAE,GAAG,SAAsC;CAC9D,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAyC;CAC9E,OACE,oBAACA,SAAgB,UAAjB;EACE,aAAU;EACV,WAAW,GACT,yLACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EACrB,WACA,UACA,kBAAkB,MAClB,GAAG,SAGF;CACD,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GACT,0WACA,SACF;EACA,GAAI;EANN,UAAA,CAQG,UACA,mBACC,qBAACA,SAAgB,OAAjB;GACE,aAAU;GACV,QAAQ,oBAAC,QAAD;IAAQ,SAAQ;IAAQ,WAAU;IAAyB,MAAK;GAAW,CAAA;GAFrF,UAAA,CAIE,oBAAC,OAAD,CAAQ,CAAA,GACR,oBAAC,QAAD;IAAM,WAAU;IAAU,UAAA;GAAW,CAAA,CAChB;EAEJ,CAAA,CAAA;CACX,CAAA,CAAA,EAAA,CAAA;AAElB;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,OAAD;EAAK,aAAU;EAAgB,WAAW,GAAG,uBAAuB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEhG;AAEA,SAAS,aAAa,EACpB,WACA,kBAAkB,OAClB,UACA,GAAG,SAGF;CACD,OACE,qBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,4GACA,SACF;EACA,GAAI;EANN,UAAA,CAQG,UACA,mBACC,oBAACA,SAAgB,OAAjB;GAAuB,QAAQ,oBAAC,QAAD,EAAQ,SAAQ,UAAW,CAAA;GAAG,UAAA;EAA4B,CAAA,CAExF;;AAET;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,sCAAsC,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAA4C;CACrF,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GACT,sGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"dialog.js","names":["DialogPrimitive"],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type * as React from \"react\";\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"./button\";\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:fade-in-0 data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground text-sm outline-none ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in sm:max-w-sm\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={<Button variant=\"ghost\" className=\"absolute top-2 right-2\" size=\"icon-sm\" />}\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"dialog-header\" className={cn(\"flex flex-col gap-2\", className)} {...props} />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>Close</DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"font-heading font-medium text-base leading-none\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground text-sm *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;AASA,SAAS,OAAO,EAAE,GAAG,SAAqC;CACxD,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAEA,SAAS,cAAc,EAAE,GAAG,SAAwC;CAClE,OAAO,oBAACA,SAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,aAAa,EAAE,GAAG,SAAuC;CAChE,OAAO,oBAACA,SAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;AAEA,SAAS,YAAY,EAAE,GAAG,SAAsC;CAC9D,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;A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E,WAAW,GAAG,SAA4C;CACrF,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GACT,sGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -108,7 +108,7 @@ function DrawerFooter({ className, ...props }) {
108
108
  function DrawerTitle({ className, ...props }) {
109
109
  return /* @__PURE__ */ jsx(Drawer$1.Title, {
110
110
  "data-slot": "drawer-title",
111
- className: cn("font-medium text-base text-foreground", className),
111
+ className: cn("font-heading font-medium text-base text-foreground", className),
112
112
  ...props
113
113
  });
114
114
  }