@kumix/ui 0.1.3 → 0.2.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 (497) hide show
  1. package/README.md +115 -95
  2. package/dist/components/reui/alert.d.ts +12 -0
  3. package/dist/components/reui/alert.d.ts.map +1 -0
  4. package/dist/components/reui/alert.js +58 -0
  5. package/dist/components/reui/alert.js.map +1 -0
  6. package/dist/components/reui/autocomplete.d.ts +43 -0
  7. package/dist/components/reui/autocomplete.d.ts.map +1 -0
  8. package/dist/components/reui/autocomplete.js +165 -0
  9. package/dist/components/reui/autocomplete.js.map +1 -0
  10. package/dist/components/reui/badge.d.ts +17 -0
  11. package/dist/components/reui/badge.d.ts.map +1 -0
  12. package/dist/components/reui/badge.js +75 -0
  13. package/dist/components/reui/badge.js.map +1 -0
  14. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +17 -0
  15. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -0
  16. package/dist/components/reui/data-grid/data-grid-column-filter.js +127 -0
  17. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -0
  18. package/dist/components/reui/data-grid/data-grid-column-header.d.ts +18 -0
  19. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -0
  20. package/dist/components/reui/data-grid/data-grid-column-header.js +228 -0
  21. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -0
  22. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +10 -0
  23. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -0
  24. package/dist/components/reui/data-grid/data-grid-column-visibility.js +28 -0
  25. package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -0
  26. package/dist/components/reui/data-grid/data-grid-pagination.d.ts +22 -0
  27. package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -0
  28. package/dist/components/reui/data-grid/data-grid-pagination.js +144 -0
  29. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -0
  30. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts +12 -0
  31. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -0
  32. package/dist/components/reui/data-grid/data-grid-scroll-area.js +289 -0
  33. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -0
  34. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +14 -0
  35. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -0
  36. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +166 -0
  37. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -0
  38. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +10 -0
  39. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -0
  40. package/dist/components/reui/data-grid/data-grid-table-dnd.js +171 -0
  41. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -0
  42. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +29 -0
  43. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -0
  44. package/dist/components/reui/data-grid/data-grid-table-virtual.js +269 -0
  45. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -0
  46. package/dist/components/reui/data-grid/data-grid-table.d.ts +116 -0
  47. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -0
  48. package/dist/components/reui/data-grid/data-grid-table.js +864 -0
  49. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -0
  50. package/dist/components/reui/data-grid/data-grid.d.ts +112 -0
  51. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -0
  52. package/dist/components/reui/data-grid/data-grid.js +134 -0
  53. package/dist/components/reui/data-grid/data-grid.js.map +1 -0
  54. package/dist/components/reui/date-selector.d.ts +131 -0
  55. package/dist/components/reui/date-selector.d.ts.map +1 -0
  56. package/dist/components/reui/date-selector.js +783 -0
  57. package/dist/components/reui/date-selector.js.map +1 -0
  58. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts +7 -0
  59. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts.map +1 -0
  60. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +108 -0
  61. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -0
  62. package/dist/components/reui/event-calendar/event-calendar-content.d.ts +15 -0
  63. package/dist/components/reui/event-calendar/event-calendar-content.d.ts.map +1 -0
  64. package/dist/components/reui/event-calendar/event-calendar-content.js +44 -0
  65. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -0
  66. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts +30 -0
  67. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts.map +1 -0
  68. package/dist/components/reui/event-calendar/event-calendar-dnd.js +581 -0
  69. package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -0
  70. package/dist/components/reui/event-calendar/event-calendar-event.d.ts +73 -0
  71. package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -0
  72. package/dist/components/reui/event-calendar/event-calendar-event.js +299 -0
  73. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -0
  74. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +103 -0
  75. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -0
  76. package/dist/components/reui/event-calendar/event-calendar-i18n.js +141 -0
  77. package/dist/components/reui/event-calendar/event-calendar-i18n.js.map +1 -0
  78. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +111 -0
  79. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts.map +1 -0
  80. package/dist/components/reui/event-calendar/event-calendar-lib.js +398 -0
  81. package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -0
  82. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +29 -0
  83. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts.map +1 -0
  84. package/dist/components/reui/event-calendar/event-calendar-month-view.js +530 -0
  85. package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -0
  86. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts +71 -0
  87. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -0
  88. package/dist/components/reui/event-calendar/event-calendar-nav.js +319 -0
  89. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -0
  90. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts +32 -0
  91. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts.map +1 -0
  92. package/dist/components/reui/event-calendar/event-calendar-recurrence.js +300 -0
  93. package/dist/components/reui/event-calendar/event-calendar-recurrence.js.map +1 -0
  94. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts +14 -0
  95. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts.map +1 -0
  96. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +355 -0
  97. package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -0
  98. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +35 -0
  99. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts.map +1 -0
  100. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +651 -0
  101. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -0
  102. package/dist/components/reui/event-calendar/event-calendar-types.d.ts +236 -0
  103. package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -0
  104. package/dist/components/reui/event-calendar/event-calendar-types.js +2 -0
  105. package/dist/components/reui/event-calendar/event-calendar.d.ts +561 -0
  106. package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -0
  107. package/dist/components/reui/event-calendar/event-calendar.js +817 -0
  108. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -0
  109. package/dist/components/reui/filters.d.ts +176 -0
  110. package/dist/components/reui/filters.d.ts.map +1 -0
  111. package/dist/components/reui/filters.js +1216 -0
  112. package/dist/components/reui/filters.js.map +1 -0
  113. package/dist/components/reui/frame.d.ts +32 -0
  114. package/dist/components/reui/frame.d.ts.map +1 -0
  115. package/dist/components/reui/frame.js +115 -0
  116. package/dist/components/reui/frame.js.map +1 -0
  117. package/dist/components/reui/gantt/gantt-bar.d.ts +44 -0
  118. package/dist/components/reui/gantt/gantt-bar.d.ts.map +1 -0
  119. package/dist/components/reui/gantt/gantt-bar.js +229 -0
  120. package/dist/components/reui/gantt/gantt-bar.js.map +1 -0
  121. package/dist/components/reui/gantt/gantt-dnd.d.ts +36 -0
  122. package/dist/components/reui/gantt/gantt-dnd.d.ts.map +1 -0
  123. package/dist/components/reui/gantt/gantt-dnd.js +615 -0
  124. package/dist/components/reui/gantt/gantt-dnd.js.map +1 -0
  125. package/dist/components/reui/gantt/gantt-i18n.d.ts +91 -0
  126. package/dist/components/reui/gantt/gantt-i18n.d.ts.map +1 -0
  127. package/dist/components/reui/gantt/gantt-i18n.js +131 -0
  128. package/dist/components/reui/gantt/gantt-i18n.js.map +1 -0
  129. package/dist/components/reui/gantt/gantt-lib.d.ts +123 -0
  130. package/dist/components/reui/gantt/gantt-lib.d.ts.map +1 -0
  131. package/dist/components/reui/gantt/gantt-lib.js +354 -0
  132. package/dist/components/reui/gantt/gantt-lib.js.map +1 -0
  133. package/dist/components/reui/gantt/gantt-nav.d.ts +60 -0
  134. package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -0
  135. package/dist/components/reui/gantt/gantt-nav.js +266 -0
  136. package/dist/components/reui/gantt/gantt-nav.js.map +1 -0
  137. package/dist/components/reui/gantt/gantt-recurrence.d.ts +37 -0
  138. package/dist/components/reui/gantt/gantt-recurrence.d.ts.map +1 -0
  139. package/dist/components/reui/gantt/gantt-recurrence.js +230 -0
  140. package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -0
  141. package/dist/components/reui/gantt/gantt-types.d.ts +251 -0
  142. package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -0
  143. package/dist/components/reui/gantt/gantt-types.js +2 -0
  144. package/dist/components/reui/gantt/gantt-view.d.ts +10 -0
  145. package/dist/components/reui/gantt/gantt-view.d.ts.map +1 -0
  146. package/dist/components/reui/gantt/gantt-view.js +2193 -0
  147. package/dist/components/reui/gantt/gantt-view.js.map +1 -0
  148. package/dist/components/reui/gantt/gantt.d.ts +602 -0
  149. package/dist/components/reui/gantt/gantt.d.ts.map +1 -0
  150. package/dist/components/reui/gantt/gantt.js +796 -0
  151. package/dist/components/reui/gantt/gantt.js.map +1 -0
  152. package/dist/components/reui/icon-stack.d.ts +7 -0
  153. package/dist/components/reui/icon-stack.d.ts.map +1 -0
  154. package/dist/components/reui/icon-stack.js +76 -0
  155. package/dist/components/reui/icon-stack.js.map +1 -0
  156. package/dist/components/reui/kanban.d.ts +70 -0
  157. package/dist/components/reui/kanban.d.ts.map +1 -0
  158. package/dist/components/reui/kanban.js +519 -0
  159. package/dist/components/reui/kanban.js.map +1 -0
  160. package/dist/components/reui/number-field.d.ts +29 -0
  161. package/dist/components/reui/number-field.d.ts.map +1 -0
  162. package/dist/components/reui/number-field.js +127 -0
  163. package/dist/components/reui/number-field.js.map +1 -0
  164. package/dist/components/reui/phone-input.d.ts +13 -0
  165. package/dist/components/reui/phone-input.d.ts.map +1 -0
  166. package/dist/components/reui/phone-input.js +126 -0
  167. package/dist/components/reui/phone-input.js.map +1 -0
  168. package/dist/components/reui/rating.d.ts +34 -0
  169. package/dist/components/reui/rating.d.ts.map +1 -0
  170. package/dist/components/reui/rating.js +94 -0
  171. package/dist/components/reui/rating.js.map +1 -0
  172. package/dist/components/reui/scrollspy.d.ts +17 -0
  173. package/dist/components/reui/scrollspy.d.ts.map +1 -0
  174. package/dist/components/reui/scrollspy.js +130 -0
  175. package/dist/components/reui/scrollspy.js.map +1 -0
  176. package/dist/components/reui/sortable.d.ts +48 -0
  177. package/dist/components/reui/sortable.d.ts.map +1 -0
  178. package/dist/components/reui/sortable.js +230 -0
  179. package/dist/components/reui/sortable.js.map +1 -0
  180. package/dist/components/reui/stepper.d.ts +63 -0
  181. package/dist/components/reui/stepper.d.ts.map +1 -0
  182. package/dist/components/reui/stepper.js +234 -0
  183. package/dist/components/reui/stepper.js.map +1 -0
  184. package/dist/components/reui/timeline.d.ts +24 -0
  185. package/dist/components/reui/timeline.d.ts.map +1 -0
  186. package/dist/components/reui/timeline.js +123 -0
  187. package/dist/components/reui/timeline.js.map +1 -0
  188. package/dist/components/reui/tree.d.ts +23 -0
  189. package/dist/components/reui/tree.d.ts.map +1 -0
  190. package/dist/components/reui/tree.js +115 -0
  191. package/dist/components/reui/tree.js.map +1 -0
  192. package/dist/components/ui/accordion.d.ts +9 -0
  193. package/dist/components/ui/accordion.d.ts.map +1 -0
  194. package/dist/components/ui/accordion.js +56 -0
  195. package/dist/components/ui/accordion.js.map +1 -0
  196. package/dist/components/ui/alert-dialog.d.ts +21 -0
  197. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  198. package/dist/components/ui/alert-dialog.js +96 -0
  199. package/dist/components/ui/alert-dialog.js.map +1 -0
  200. package/dist/components/ui/alert.d.ts +13 -0
  201. package/dist/components/ui/alert.d.ts.map +1 -0
  202. package/dist/components/ui/alert.js +45 -0
  203. package/dist/components/ui/alert.js.map +1 -0
  204. package/dist/components/ui/aspect-ratio.d.ts +8 -0
  205. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  206. package/dist/components/ui/aspect-ratio.js +16 -0
  207. package/dist/components/ui/aspect-ratio.js.map +1 -0
  208. package/dist/components/ui/attachment.d.ts +26 -0
  209. package/dist/components/ui/attachment.d.ts.map +1 -0
  210. package/dist/components/ui/attachment.js +106 -0
  211. package/dist/components/ui/attachment.js.map +1 -0
  212. package/dist/components/ui/avatar.d.ts +14 -0
  213. package/dist/components/ui/avatar.d.ts.map +1 -0
  214. package/dist/components/ui/avatar.js +52 -0
  215. package/dist/components/ui/avatar.js.map +1 -0
  216. package/dist/components/ui/badge.d.ts +10 -0
  217. package/dist/components/ui/badge.d.ts.map +1 -0
  218. package/dist/components/ui/badge.js +32 -0
  219. package/dist/components/ui/badge.js.map +1 -0
  220. package/dist/components/ui/breadcrumb.d.ts +13 -0
  221. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  222. package/dist/components/ui/breadcrumb.js +72 -0
  223. package/dist/components/ui/breadcrumb.js.map +1 -0
  224. package/dist/components/ui/bubble.d.ts +19 -0
  225. package/dist/components/ui/bubble.d.ts.map +1 -0
  226. package/dist/components/ui/bubble.js +75 -0
  227. package/dist/components/ui/bubble.js.map +1 -0
  228. package/dist/components/ui/button-group.d.ts +14 -0
  229. package/dist/components/ui/button-group.d.ts.map +1 -0
  230. package/dist/components/ui/button-group.js +44 -0
  231. package/dist/components/ui/button-group.js.map +1 -0
  232. package/dist/components/ui/button.d.ts +11 -0
  233. package/dist/components/ui/button.d.ts.map +1 -0
  234. package/dist/components/ui/button.js +47 -0
  235. package/dist/components/ui/button.js.map +1 -0
  236. package/dist/components/ui/calendar.d.ts +13 -0
  237. package/dist/components/ui/calendar.d.ts.map +1 -0
  238. package/dist/components/ui/calendar.js +110 -0
  239. package/dist/components/ui/calendar.js.map +1 -0
  240. package/dist/components/ui/card.d.ts +14 -0
  241. package/dist/components/ui/card.d.ts.map +1 -0
  242. package/dist/components/ui/card.js +58 -0
  243. package/dist/components/ui/card.js.map +1 -0
  244. package/dist/components/ui/carousel.d.ts +31 -0
  245. package/dist/components/ui/carousel.d.ts.map +1 -0
  246. package/dist/components/ui/carousel.js +135 -0
  247. package/dist/components/ui/carousel.js.map +1 -0
  248. package/dist/components/ui/chart.d.ts +47 -0
  249. package/dist/components/ui/chart.d.ts.map +1 -0
  250. package/dist/components/ui/chart.js +151 -0
  251. package/dist/components/ui/chart.js.map +1 -0
  252. package/dist/components/ui/checkbox.d.ts +6 -0
  253. package/dist/components/ui/checkbox.d.ts.map +1 -0
  254. package/dist/components/ui/checkbox.js +22 -0
  255. package/dist/components/ui/checkbox.js.map +1 -0
  256. package/dist/components/ui/collapsible.d.ts +8 -0
  257. package/dist/components/ui/collapsible.d.ts.map +1 -0
  258. package/dist/components/ui/collapsible.js +26 -0
  259. package/dist/components/ui/collapsible.js.map +1 -0
  260. package/dist/components/ui/combobox.d.ts +27 -0
  261. package/dist/components/ui/combobox.d.ts.map +1 -0
  262. package/dist/components/ui/combobox.js +164 -0
  263. package/dist/components/ui/combobox.js.map +1 -0
  264. package/dist/components/ui/command.d.ts +22 -0
  265. package/dist/components/ui/command.d.ts.map +1 -0
  266. package/dist/components/ui/command.js +89 -0
  267. package/dist/components/ui/command.js.map +1 -0
  268. package/dist/components/ui/context-menu.d.ts +32 -0
  269. package/dist/components/ui/context-menu.d.ts.map +1 -0
  270. package/dist/components/ui/context-menu.js +134 -0
  271. package/dist/components/ui/context-menu.js.map +1 -0
  272. package/dist/components/ui/dialog.d.ts +20 -0
  273. package/dist/components/ui/dialog.d.ts.map +1 -0
  274. package/dist/components/ui/dialog.js +93 -0
  275. package/dist/components/ui/dialog.js.map +1 -0
  276. package/dist/components/ui/direction.d.ts +2 -0
  277. package/dist/components/ui/direction.js +3 -0
  278. package/dist/components/ui/drawer.d.ts +19 -0
  279. package/dist/components/ui/drawer.d.ts.map +1 -0
  280. package/dist/components/ui/drawer.js +125 -0
  281. package/dist/components/ui/drawer.js.map +1 -0
  282. package/dist/components/ui/dropdown-menu.d.ts +32 -0
  283. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  284. package/dist/components/ui/dropdown-menu.js +138 -0
  285. package/dist/components/ui/dropdown-menu.js.map +1 -0
  286. package/dist/components/ui/empty.d.ts +15 -0
  287. package/dist/components/ui/empty.d.ts.map +1 -0
  288. package/dist/components/ui/empty.js +62 -0
  289. package/dist/components/ui/empty.js.map +1 -0
  290. package/dist/components/ui/field.d.ts +28 -0
  291. package/dist/components/ui/field.d.ts.map +1 -0
  292. package/dist/components/ui/field.js +112 -0
  293. package/dist/components/ui/field.js.map +1 -0
  294. package/dist/components/ui/hover-card.d.ts +8 -0
  295. package/dist/components/ui/hover-card.d.ts.map +1 -0
  296. package/dist/components/ui/hover-card.js +38 -0
  297. package/dist/components/ui/hover-card.js.map +1 -0
  298. package/dist/components/ui/input-group.d.ts +21 -0
  299. package/dist/components/ui/input-group.d.ts.map +1 -0
  300. package/dist/components/ui/input-group.js +80 -0
  301. package/dist/components/ui/input-group.js.map +1 -0
  302. package/dist/components/ui/input-otp.d.ts +14 -0
  303. package/dist/components/ui/input-otp.d.ts.map +1 -0
  304. package/dist/components/ui/input-otp.js +49 -0
  305. package/dist/components/ui/input-otp.js.map +1 -0
  306. package/dist/components/ui/input.d.ts +6 -0
  307. package/dist/components/ui/input.d.ts.map +1 -0
  308. package/dist/components/ui/input.js +17 -0
  309. package/dist/components/ui/input.js.map +1 -0
  310. package/dist/components/ui/item.d.ts +25 -0
  311. package/dist/components/ui/item.d.ts.map +1 -0
  312. package/dist/components/ui/item.js +123 -0
  313. package/dist/components/ui/item.js.map +1 -0
  314. package/dist/components/ui/kbd.d.ts +7 -0
  315. package/dist/components/ui/kbd.d.ts.map +1 -0
  316. package/dist/components/ui/kbd.js +22 -0
  317. package/dist/components/ui/kbd.js.map +1 -0
  318. package/dist/components/ui/label.d.ts +6 -0
  319. package/dist/components/ui/label.d.ts.map +1 -0
  320. package/dist/components/ui/label.js +15 -0
  321. package/dist/components/ui/label.js.map +1 -0
  322. package/dist/components/ui/marker.d.ts +13 -0
  323. package/dist/components/ui/marker.d.ts.map +1 -0
  324. package/dist/components/ui/marker.js +45 -0
  325. package/dist/components/ui/marker.js.map +1 -0
  326. package/dist/components/ui/menubar.d.ts +32 -0
  327. package/dist/components/ui/menubar.d.ts.map +1 -0
  328. package/dist/components/ui/menubar.js +137 -0
  329. package/dist/components/ui/menubar.js.map +1 -0
  330. package/dist/components/ui/message-scroller.d.ts +13 -0
  331. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  332. package/dist/components/ui/message-scroller.js +62 -0
  333. package/dist/components/ui/message-scroller.js.map +1 -0
  334. package/dist/components/ui/message.d.ts +13 -0
  335. package/dist/components/ui/message.d.ts.map +1 -0
  336. package/dist/components/ui/message.js +51 -0
  337. package/dist/components/ui/message.js.map +1 -0
  338. package/dist/components/ui/native-select.d.ts +11 -0
  339. package/dist/components/ui/native-select.d.ts.map +1 -0
  340. package/dist/components/ui/native-select.js +40 -0
  341. package/dist/components/ui/native-select.js.map +1 -0
  342. package/dist/components/ui/navigation-menu.d.ts +15 -0
  343. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  344. package/dist/components/ui/navigation-menu.js +85 -0
  345. package/dist/components/ui/navigation-menu.js.map +1 -0
  346. package/dist/components/ui/pagination.d.ts +20 -0
  347. package/dist/components/ui/pagination.d.ts.map +1 -0
  348. package/dist/components/ui/pagination.js +81 -0
  349. package/dist/components/ui/pagination.js.map +1 -0
  350. package/dist/components/ui/popover.d.ts +12 -0
  351. package/dist/components/ui/popover.d.ts.map +1 -0
  352. package/dist/components/ui/popover.js +56 -0
  353. package/dist/components/ui/popover.js.map +1 -0
  354. package/dist/components/ui/progress.d.ts +10 -0
  355. package/dist/components/ui/progress.d.ts.map +1 -0
  356. package/dist/components/ui/progress.js +46 -0
  357. package/dist/components/ui/progress.js.map +1 -0
  358. package/dist/components/ui/radio-group.d.ts +8 -0
  359. package/dist/components/ui/radio-group.d.ts.map +1 -0
  360. package/dist/components/ui/radio-group.js +29 -0
  361. package/dist/components/ui/radio-group.js.map +1 -0
  362. package/dist/components/ui/resizable.d.ts +10 -0
  363. package/dist/components/ui/resizable.d.ts.map +1 -0
  364. package/dist/components/ui/resizable.js +30 -0
  365. package/dist/components/ui/resizable.js.map +1 -0
  366. package/dist/components/ui/scroll-area.d.ts +7 -0
  367. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  368. package/dist/components/ui/scroll-area.js +38 -0
  369. package/dist/components/ui/scroll-area.js.map +1 -0
  370. package/dist/components/ui/select.d.ts +18 -0
  371. package/dist/components/ui/select.d.ts.map +1 -0
  372. package/dist/components/ui/select.js +99 -0
  373. package/dist/components/ui/select.js.map +1 -0
  374. package/dist/components/ui/separator.d.ts +6 -0
  375. package/dist/components/ui/separator.d.ts.map +1 -0
  376. package/dist/components/ui/separator.js +17 -0
  377. package/dist/components/ui/separator.js.map +1 -0
  378. package/dist/components/ui/sheet.d.ts +17 -0
  379. package/dist/components/ui/sheet.d.ts.map +1 -0
  380. package/dist/components/ui/sheet.js +90 -0
  381. package/dist/components/ui/sheet.js.map +1 -0
  382. package/dist/components/ui/sidebar.d.ts +66 -0
  383. package/dist/components/ui/sidebar.d.ts.map +1 -0
  384. package/dist/components/ui/sidebar.js +383 -0
  385. package/dist/components/ui/sidebar.js.map +1 -0
  386. package/dist/components/ui/skeleton.d.ts +6 -0
  387. package/dist/components/ui/skeleton.d.ts.map +1 -0
  388. package/dist/components/ui/skeleton.js +15 -0
  389. package/dist/components/ui/skeleton.js.map +1 -0
  390. package/dist/components/ui/slider.d.ts +6 -0
  391. package/dist/components/ui/slider.d.ts.map +1 -0
  392. package/dist/components/ui/slider.js +36 -0
  393. package/dist/components/ui/slider.js.map +1 -0
  394. package/dist/components/ui/sonner.d.ts +7 -0
  395. package/dist/components/ui/sonner.d.ts.map +1 -0
  396. package/dist/components/ui/sonner.js +32 -0
  397. package/dist/components/ui/sonner.js.map +1 -0
  398. package/dist/components/ui/spinner.d.ts +6 -0
  399. package/dist/components/ui/spinner.d.ts.map +1 -0
  400. package/dist/components/ui/spinner.js +18 -0
  401. package/dist/components/ui/spinner.js.map +1 -0
  402. package/dist/components/ui/switch.d.ts +8 -0
  403. package/dist/components/ui/switch.d.ts.map +1 -0
  404. package/dist/components/ui/switch.js +21 -0
  405. package/dist/components/ui/switch.js.map +1 -0
  406. package/dist/components/ui/table.d.ts +13 -0
  407. package/dist/components/ui/table.d.ts.map +1 -0
  408. package/dist/components/ui/table.js +68 -0
  409. package/dist/components/ui/table.js.map +1 -0
  410. package/dist/components/ui/tabs.d.ts +13 -0
  411. package/dist/components/ui/tabs.d.ts.map +1 -0
  412. package/dist/components/ui/tabs.js +47 -0
  413. package/dist/components/ui/tabs.js.map +1 -0
  414. package/dist/components/ui/textarea.d.ts +6 -0
  415. package/dist/components/ui/textarea.d.ts.map +1 -0
  416. package/dist/components/ui/textarea.js +15 -0
  417. package/dist/components/ui/textarea.js.map +1 -0
  418. package/dist/components/ui/toggle-group.d.ts +14 -0
  419. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  420. package/dist/components/ui/toggle-group.js +54 -0
  421. package/dist/components/ui/toggle-group.js.map +1 -0
  422. package/dist/components/ui/toggle.d.ts +11 -0
  423. package/dist/components/ui/toggle.d.ts.map +1 -0
  424. package/dist/components/ui/toggle.js +38 -0
  425. package/dist/components/ui/toggle.js.map +1 -0
  426. package/dist/components/ui/tooltip.d.ts +9 -0
  427. package/dist/components/ui/tooltip.d.ts.map +1 -0
  428. package/dist/components/ui/tooltip.js +43 -0
  429. package/dist/components/ui/tooltip.js.map +1 -0
  430. package/dist/hooks/use-body-classes.d.ts +27 -0
  431. package/dist/hooks/use-body-classes.d.ts.map +1 -0
  432. package/dist/hooks/use-body-classes.js +52 -0
  433. package/dist/hooks/use-body-classes.js.map +1 -0
  434. package/dist/hooks/use-copy-to-clipboard.d.ts +43 -0
  435. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  436. package/dist/hooks/use-copy-to-clipboard.js +69 -0
  437. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  438. package/dist/hooks/use-file-upload.d.ts +49 -0
  439. package/dist/hooks/use-file-upload.d.ts.map +1 -0
  440. package/dist/hooks/use-file-upload.js +227 -0
  441. package/dist/hooks/use-file-upload.js.map +1 -0
  442. package/dist/hooks/use-hydrated.d.ts +37 -0
  443. package/dist/hooks/use-hydrated.d.ts.map +1 -0
  444. package/dist/hooks/use-hydrated.js +50 -0
  445. package/dist/hooks/use-hydrated.js.map +1 -0
  446. package/dist/hooks/use-intersection-observer.d.ts +55 -0
  447. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  448. package/dist/hooks/use-intersection-observer.js +144 -0
  449. package/dist/hooks/use-intersection-observer.js.map +1 -0
  450. package/dist/hooks/use-is-mac.d.ts +28 -0
  451. package/dist/hooks/use-is-mac.d.ts.map +1 -0
  452. package/dist/hooks/use-is-mac.js +38 -0
  453. package/dist/hooks/use-is-mac.js.map +1 -0
  454. package/dist/hooks/use-media-query.d.ts +44 -0
  455. package/dist/hooks/use-media-query.d.ts.map +1 -0
  456. package/dist/hooks/use-media-query.js +58 -0
  457. package/dist/hooks/use-media-query.js.map +1 -0
  458. package/dist/hooks/use-meta-color.d.ts +78 -0
  459. package/dist/hooks/use-meta-color.d.ts.map +1 -0
  460. package/dist/hooks/use-meta-color.js +138 -0
  461. package/dist/hooks/use-meta-color.js.map +1 -0
  462. package/dist/hooks/use-mobile.d.ts +5 -0
  463. package/dist/hooks/use-mobile.d.ts.map +1 -0
  464. package/dist/hooks/use-mobile.js +21 -0
  465. package/dist/hooks/use-mobile.js.map +1 -0
  466. package/dist/hooks/use-mutation-observer.d.ts +61 -0
  467. package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
  468. package/dist/hooks/use-mutation-observer.js +96 -0
  469. package/dist/hooks/use-mutation-observer.js.map +1 -0
  470. package/dist/hooks/use-scroll-position.d.ts +76 -0
  471. package/dist/hooks/use-scroll-position.d.ts.map +1 -0
  472. package/dist/hooks/use-scroll-position.js +97 -0
  473. package/dist/hooks/use-scroll-position.js.map +1 -0
  474. package/dist/hooks/use-slider-input.d.ts +94 -0
  475. package/dist/hooks/use-slider-input.d.ts.map +1 -0
  476. package/dist/hooks/use-slider-input.js +116 -0
  477. package/dist/hooks/use-slider-input.js.map +1 -0
  478. package/dist/hooks/use-viewport.d.ts +72 -0
  479. package/dist/hooks/use-viewport.d.ts.map +1 -0
  480. package/dist/hooks/use-viewport.js +91 -0
  481. package/dist/hooks/use-viewport.js.map +1 -0
  482. package/dist/style.css +0 -247
  483. package/dist/theme.css +244 -0
  484. package/dist/theme.css.d.ts +3 -0
  485. package/package.json +101 -40
  486. package/dist/hooks.d.ts +0 -957
  487. package/dist/hooks.d.ts.map +0 -1
  488. package/dist/hooks.js +0 -1391
  489. package/dist/hooks.js.map +0 -1
  490. package/dist/index.d.ts +0 -1993
  491. package/dist/index.d.ts.map +0 -1
  492. package/dist/index.js +0 -10647
  493. package/dist/index.js.map +0 -1
  494. package/dist/source.css +0 -1
  495. package/dist/source.css.d.ts +0 -3
  496. package/dist/use-is-mobile-Dln4-L1O.js +0 -210
  497. package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
@@ -0,0 +1,651 @@
1
+ "use client";
2
+ import { ScrollArea } from "../../ui/scroll-area.js";
3
+ import { getDayKey, getDayTotalMinutes, getRangeKey, resolveOffDay, snapMinutes, toZoned, zonedStartOfDay } from "./event-calendar-lib.js";
4
+ import { EventCalendarViewContext, useEventCalendar, useEventCalendarDay, useEventCalendarSelector, useEventCalendarSettings, useEventCalendarViewConfig, useEventCalendarViewContext, useEventCalendarViewSettings } from "./event-calendar.js";
5
+ import { useEventCalendarGestures, wasRecentChipPress, wasRecentDrag } from "./event-calendar-dnd.js";
6
+ import { EVENT_CALENDAR_GHOST, EventCalendarEvent } from "./event-calendar-event.js";
7
+ import { useEffect, useMemo, useRef, useState } from "react";
8
+ import { cn } from "@kumix/utils";
9
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
+ import { mergeProps } from "@base-ui/react/merge-props";
11
+ import { useRender } from "@base-ui/react/use-render";
12
+ import { addDays, addMinutes, differenceInMinutes, format } from "date-fns";
13
+ //#region src/components/reui/event-calendar/event-calendar-time-grid.tsx
14
+ /** Current time, refreshed on an interval and on tab focus. */
15
+ function useNow(intervalMs = 3e4) {
16
+ const [now, setNow] = useState(() => /* @__PURE__ */ new Date());
17
+ useEffect(() => {
18
+ const tick = () => setNow(/* @__PURE__ */ new Date());
19
+ const id = setInterval(tick, intervalMs);
20
+ document.addEventListener("visibilitychange", tick);
21
+ window.addEventListener("focus", tick);
22
+ return () => {
23
+ clearInterval(id);
24
+ document.removeEventListener("visibilitychange", tick);
25
+ window.removeEventListener("focus", tick);
26
+ };
27
+ }, [intervalMs]);
28
+ return now;
29
+ }
30
+ const EMPTY_ALL_DAY_SEGMENTS = [];
31
+ function EventCalendarTimeGrid({ view, className, render, dayStartHour, dayEndHour, showAllDay = true, interval: intervalProp, ...props }) {
32
+ const instance = useEventCalendar();
33
+ const settings = useEventCalendarSettings();
34
+ const viewConfig = useEventCalendarViewConfig();
35
+ const visibleRange = useEventCalendarSelector((state) => state.visibleRange, { isEqual: (a, b) => getRangeKey(a) === getRangeKey(b) });
36
+ const startHour = dayStartHour ?? settings.dayStartHour;
37
+ const endHour = dayEndHour ?? settings.dayEndHour;
38
+ const interval = Math.min(Math.max(intervalProp ?? viewConfig.interval, 5), 240);
39
+ const contained = viewConfig.scrollMode !== "page";
40
+ const { effective } = useEventCalendarViewSettings();
41
+ const days = useMemo(() => {
42
+ const result = [];
43
+ let cursor = zonedStartOfDay(visibleRange.start, settings.timeZone);
44
+ while (cursor < visibleRange.end) {
45
+ result.push(cursor);
46
+ cursor = zonedStartOfDay(addDays(toZoned(cursor, settings.timeZone), 1), settings.timeZone);
47
+ }
48
+ if (effective.weekends || view === "day") return result;
49
+ return result.filter((day) => ![0, 6].includes(toZoned(day, settings.timeZone).getDay()));
50
+ }, [
51
+ visibleRange,
52
+ settings.timeZone,
53
+ effective.weekends,
54
+ view
55
+ ]);
56
+ const scrollRef = useRef(null);
57
+ useEffect(() => {
58
+ if (!contained) return;
59
+ const el = scrollRef.current;
60
+ if (!el) return;
61
+ const viewport = el.querySelector("[data-slot=scroll-area-viewport]");
62
+ const pxPerMinute = (el.querySelector("[data-slot=event-calendar-time-gutter] > div")?.getBoundingClientRect().height || 64) / interval;
63
+ const scrollTo = (minutes) => {
64
+ viewport?.scrollTo({ top: Math.max(0, (minutes - startHour * 60) * pxPerMinute - 12) });
65
+ };
66
+ scrollTo(viewConfig.scrollToHour * 60);
67
+ instance.internals.registerScrollHandler((time) => {
68
+ const minutes = typeof time === "number" ? time : toZoned(time, settings.timeZone).getHours() * 60 + toZoned(time, settings.timeZone).getMinutes();
69
+ scrollTo(minutes);
70
+ });
71
+ const root = el.closest("[data-slot=event-calendar-time-grid], [data-slot=event-calendar-resource-view]");
72
+ const syncScrollbarGutter = () => {
73
+ root?.style.setProperty("--ec-scrollbar-w", `${viewport ? viewport.offsetWidth - viewport.clientWidth : 0}px`);
74
+ };
75
+ syncScrollbarGutter();
76
+ const gutterObserver = viewport ? new ResizeObserver(syncScrollbarGutter) : null;
77
+ if (viewport) gutterObserver?.observe(viewport);
78
+ return () => {
79
+ instance.internals.registerScrollHandler(null);
80
+ gutterObserver?.disconnect();
81
+ };
82
+ }, [
83
+ contained,
84
+ instance,
85
+ settings.timeZone,
86
+ startHour,
87
+ interval,
88
+ viewConfig.scrollToHour
89
+ ]);
90
+ const slots = useMemo(() => {
91
+ const result = [];
92
+ for (let m = startHour * 60; m < endHour * 60; m += interval) result.push(m);
93
+ return result;
94
+ }, [
95
+ startHour,
96
+ endHour,
97
+ interval
98
+ ]);
99
+ const allDaySegments = useEventCalendarSelector(() => {
100
+ if (!viewConfig.renderAllDaySection) return EMPTY_ALL_DAY_SEGMENTS;
101
+ const byDay = instance.internals.getIndex().byDay;
102
+ const result = days.flatMap((day) => byDay.get(getDayKey(day, settings.timeZone))?.allDay ?? []);
103
+ return result.length ? result : EMPTY_ALL_DAY_SEGMENTS;
104
+ }, { isEqual: (a, b) => a === b || a.length === b.length && a.every((segment, i) => segment === b[i]) });
105
+ const gridTemplateColumns = `repeat(${days.length}, minmax(var(--ec-day-col-min,0px), 1fr))`;
106
+ const track = /* @__PURE__ */ jsxs("div", {
107
+ className: "relative flex",
108
+ children: [
109
+ /* @__PURE__ */ jsx(EventCalendarTimeGutter, {
110
+ days,
111
+ slots,
112
+ startHour,
113
+ interval
114
+ }),
115
+ /* @__PURE__ */ jsx("div", {
116
+ className: "grid min-w-0 flex-1",
117
+ style: { gridTemplateColumns },
118
+ children: days.map((day) => /* @__PURE__ */ jsx(EventCalendarDayColumn, {
119
+ day,
120
+ startHour,
121
+ endHour,
122
+ interval
123
+ }, day.getTime()))
124
+ }),
125
+ effective.nowIndicator && /* @__PURE__ */ jsx(EventCalendarNowIndicator, {
126
+ days,
127
+ startHour,
128
+ endHour
129
+ })
130
+ ]
131
+ });
132
+ const defaultProps = {
133
+ "data-slot": "event-calendar-time-grid",
134
+ "data-view": view,
135
+ className: cn("flex flex-col border-t", contained && "min-h-0 flex-1 overflow-hidden", viewConfig.classNames?.timeGrid, className),
136
+ style: { "--ec-hour-height": "4rem" },
137
+ children: /* @__PURE__ */ jsxs(Fragment$1, { children: [
138
+ /* @__PURE__ */ jsxs("div", {
139
+ className: cn("flex border-b pe-(--ec-scrollbar-w,0px)", !contained && "sticky top-(--ec-sticky-offset,0px) z-20 bg-background", viewConfig.classNames?.timeGridHeader),
140
+ children: [/* @__PURE__ */ jsx("div", { className: "w-(--ec-gutter-width,4.5rem) shrink-0 border-e" }), /* @__PURE__ */ jsx("div", {
141
+ className: "grid min-w-0 flex-1",
142
+ style: { gridTemplateColumns },
143
+ children: days.map((day) => /* @__PURE__ */ jsx(EventCalendarDayHeader, {
144
+ day,
145
+ view
146
+ }, day.getTime()))
147
+ })]
148
+ }),
149
+ showAllDay && /* @__PURE__ */ jsx("div", {
150
+ "data-slot": "event-calendar-all-day-section",
151
+ className: cn("flex border-b pe-(--ec-scrollbar-w,0px)", viewConfig.classNames?.allDaySection),
152
+ children: viewConfig.renderAllDaySection?.({
153
+ days,
154
+ segments: allDaySegments
155
+ }) ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
156
+ className: cn("w-(--ec-gutter-width,4.5rem) shrink-0 border-e ps-2 pe-2.5 pt-1.5 text-muted-foreground", viewConfig.classNames?.allDayLabel),
157
+ children: /* @__PURE__ */ jsx("span", {
158
+ className: "flex h-[calc(var(--ec-month-bar-h,1.625rem)-0.125rem)] items-center justify-end",
159
+ children: settings.i18n.labels.allDay
160
+ })
161
+ }), /* @__PURE__ */ jsx(EventCalendarAllDayBars, {
162
+ days,
163
+ gridTemplateColumns
164
+ })] })
165
+ }),
166
+ contained ? /* @__PURE__ */ jsx("div", {
167
+ ref: scrollRef,
168
+ className: "min-h-0 flex-1",
169
+ children: viewConfig.scrollbars === "native" ? /* @__PURE__ */ jsx("div", {
170
+ "data-slot": "scroll-area-viewport",
171
+ "data-ec-native-scroll": "",
172
+ className: "h-full overflow-y-auto",
173
+ children: track
174
+ }) : /* @__PURE__ */ jsx(ScrollArea, {
175
+ className: "h-full",
176
+ children: track
177
+ })
178
+ }) : track
179
+ ] })
180
+ };
181
+ return /* @__PURE__ */ jsx(EventCalendarViewContext.Provider, {
182
+ value: { view },
183
+ children: useRender({
184
+ defaultTagName: "div",
185
+ render,
186
+ props: mergeProps(defaultProps, props)
187
+ })
188
+ });
189
+ }
190
+ function EventCalendarDayHeader({ day, view }) {
191
+ const settings = useEventCalendarSettings();
192
+ const viewConfig = useEventCalendarViewConfig();
193
+ const { isToday } = useEventCalendarDay(day);
194
+ return /* @__PURE__ */ jsx("div", {
195
+ "data-slot": "event-calendar-day-header",
196
+ "data-today": isToday || void 0,
197
+ className: cn("min-w-0 truncate border-e px-2 py-1.5 font-medium last:border-e-0 data-today:text-primary", isToday && viewConfig.todayClassName),
198
+ children: viewConfig.renderDayHeader?.({
199
+ day,
200
+ view,
201
+ isToday
202
+ }) ?? format(toZoned(day, settings.timeZone), settings.i18n.formats.timeGridDayHeader, { locale: settings.locale })
203
+ });
204
+ }
205
+ /**
206
+ * Continuous all-day bars for the week/N-days all-day row: consecutive-day
207
+ * segments of one occurrence merge into a single bar spanning its columns
208
+ * (same treatment as the month view), lane-packed. Returns CLONED segments -
209
+ * the shared per-day segments must stay pristine (see packWeekRowLanes).
210
+ */
211
+ function useEventCalendarAllDayBars(days) {
212
+ const instance = useEventCalendar();
213
+ const settings = useEventCalendarSettings();
214
+ return useEventCalendarSelector(() => {
215
+ const byDay = instance.internals.getIndex().byDay;
216
+ const merged = /* @__PURE__ */ new Map();
217
+ days.forEach((day, col) => {
218
+ for (const seg of byDay.get(getDayKey(day, settings.timeZone))?.allDay ?? []) {
219
+ const key = seg.occurrence.key;
220
+ const bar = merged.get(key);
221
+ if (bar) {
222
+ bar.colEnd = col;
223
+ bar.isEnd = seg.isEnd;
224
+ } else merged.set(key, {
225
+ seg,
226
+ colStart: col,
227
+ colEnd: col,
228
+ isStart: seg.isStart,
229
+ isEnd: seg.isEnd,
230
+ lane: 0
231
+ });
232
+ }
233
+ });
234
+ const packed = Array.from(merged.values()).sort((a, b) => a.colStart - b.colStart || b.colEnd - b.colStart - (a.colEnd - a.colStart) || a.seg.occurrence.key.localeCompare(b.seg.occurrence.key));
235
+ const lanes = [];
236
+ for (const bar of packed) {
237
+ let lane = 0;
238
+ for (;;) {
239
+ lanes[lane] ??= new Array(days.length).fill(false);
240
+ let free = true;
241
+ for (let c = bar.colStart; c <= bar.colEnd; c++) if (lanes[lane][c]) {
242
+ free = false;
243
+ break;
244
+ }
245
+ if (free) break;
246
+ lane++;
247
+ }
248
+ for (let c = bar.colStart; c <= bar.colEnd; c++) lanes[lane][c] = true;
249
+ bar.lane = lane;
250
+ }
251
+ return {
252
+ bars: packed.map((bar) => ({
253
+ ...bar.seg,
254
+ isStart: bar.isStart,
255
+ isEnd: bar.isEnd,
256
+ continuesBefore: !bar.isStart,
257
+ continuesAfter: !bar.isEnd,
258
+ colStart: bar.colStart,
259
+ colSpan: bar.colEnd - bar.colStart + 1,
260
+ lane: bar.lane
261
+ })),
262
+ laneCount: lanes.length
263
+ };
264
+ }, {
265
+ calendar: instance,
266
+ isEqual: (a, b) => a.laneCount === b.laneCount && a.bars.length === b.bars.length && a.bars.every((s, i) => {
267
+ const o = b.bars[i];
268
+ return s.occurrence === o.occurrence && s.colStart === o.colStart && s.colSpan === o.colSpan && s.lane === o.lane && s.isStart === o.isStart && s.isEnd === o.isEnd;
269
+ })
270
+ });
271
+ }
272
+ /**
273
+ * The all-day row body: drop-target cells underneath, one continuous bar per
274
+ * occurrence in an overlay grid on top (month-view treatment), plus the
275
+ * standardized day-granular drag ghost for moves/resizes in this lane.
276
+ */
277
+ function EventCalendarAllDayBars({ days, gridTemplateColumns }) {
278
+ const settings = useEventCalendarSettings();
279
+ const viewConfig = useEventCalendarViewConfig();
280
+ const { bars, laneCount } = useEventCalendarAllDayBars(days);
281
+ const dragGhost = useEventCalendarSelector((state) => {
282
+ const drag = state.drag;
283
+ if (!drag?.proposedDayGranular) return null;
284
+ const tz = settings.timeZone;
285
+ const startMs = zonedStartOfDay(drag.proposedStart, tz).getTime();
286
+ const lastMs = zonedStartOfDay(/* @__PURE__ */ new Date(drag.proposedEnd.getTime() - 1), tz).getTime();
287
+ let colStart = -1;
288
+ let colEnd = -1;
289
+ days.forEach((day, i) => {
290
+ const t = zonedStartOfDay(day, tz).getTime();
291
+ if (t >= startMs && t <= lastMs) {
292
+ if (colStart === -1) colStart = i;
293
+ colEnd = i;
294
+ }
295
+ });
296
+ if (colStart === -1) return null;
297
+ return {
298
+ kind: drag.kind,
299
+ valid: drag.valid,
300
+ occurrence: drag.occurrence,
301
+ proposedStart: drag.proposedStart,
302
+ proposedEnd: drag.proposedEnd,
303
+ colStart,
304
+ colSpan: colEnd - colStart + 1,
305
+ isStart: zonedStartOfDay(days[colStart], tz).getTime() <= startMs,
306
+ isEnd: zonedStartOfDay(days[colEnd], tz).getTime() >= lastMs,
307
+ color: drag.occurrence.event.color
308
+ };
309
+ }, { isEqual: (a, b) => a === b || a !== null && b !== null && a.colStart === b.colStart && a.colSpan === b.colSpan && a.valid === b.valid && a.kind === b.kind && a.proposedStart.getTime() === b.proposedStart.getTime() && a.proposedEnd.getTime() === b.proposedEnd.getTime() });
310
+ const ghostLane = dragGhost ? bars.find((s) => s.occurrence.key === dragGhost.occurrence.key)?.lane ?? laneCount : 0;
311
+ const effectiveLanes = Math.max(laneCount, dragGhost ? ghostLane + 1 : 0);
312
+ return /* @__PURE__ */ jsxs("div", {
313
+ className: "relative min-w-0 flex-1",
314
+ children: [/* @__PURE__ */ jsx("div", {
315
+ className: "grid h-full",
316
+ style: {
317
+ gridTemplateColumns,
318
+ minHeight: `calc(${Math.max(effectiveLanes, 1)} * var(--ec-month-bar-h, 1.625rem) + 0.625rem)`
319
+ },
320
+ children: days.map((day) => /* @__PURE__ */ jsx(EventCalendarAllDayCell, { day }, day.getTime()))
321
+ }), (bars.length > 0 || dragGhost) && /* @__PURE__ */ jsxs("div", {
322
+ "data-slot": "event-calendar-all-day-bar-overlay",
323
+ className: "pointer-events-none absolute inset-x-0 top-0 grid pt-1.5",
324
+ style: {
325
+ gridTemplateColumns,
326
+ gridAutoRows: "var(--ec-month-bar-h, 1.625rem)"
327
+ },
328
+ children: [bars.map((segment) => /* @__PURE__ */ jsx("div", {
329
+ className: cn("pointer-events-auto min-w-0 px-1", viewConfig.classNames?.monthBar),
330
+ style: {
331
+ gridColumn: `${(segment.colStart ?? 0) + 1} / span ${segment.colSpan ?? 1}`,
332
+ gridRow: (segment.lane ?? 0) + 1
333
+ },
334
+ children: /* @__PURE__ */ jsx(EventCalendarEvent, {
335
+ segment,
336
+ className: "h-[calc(var(--ec-month-bar-h,1.625rem)-0.125rem)]"
337
+ })
338
+ }, segment.occurrence.key)), dragGhost && /* @__PURE__ */ jsx("div", {
339
+ "aria-hidden": true,
340
+ className: cn("min-w-0 px-1", viewConfig.classNames?.monthBar),
341
+ style: {
342
+ gridColumn: `${dragGhost.colStart + 1} / span ${dragGhost.colSpan}`,
343
+ gridRow: ghostLane + 1
344
+ },
345
+ children: /* @__PURE__ */ jsx("div", {
346
+ "data-slot": "event-calendar-drag-ghost",
347
+ "data-kind": dragGhost.kind,
348
+ "data-drop-invalid": !dragGhost.valid || void 0,
349
+ className: cn("h-[calc(var(--ec-month-bar-h,1.625rem)-0.125rem)]", dragGhost.kind === "move" ? cn(EVENT_CALENDAR_GHOST.move, !dragGhost.valid && EVENT_CALENDAR_GHOST.invalid) : cn(EVENT_CALENDAR_GHOST.resize, !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidResize), viewConfig.classNames?.dragGhost),
350
+ style: { "--ec-event-color": dragGhost.color ?? "var(--color-primary)" },
351
+ children: dragGhost.kind !== "move" && /* @__PURE__ */ jsx(EventCalendarEvent, {
352
+ preview: true,
353
+ segment: {
354
+ occurrence: {
355
+ ...dragGhost.occurrence,
356
+ start: dragGhost.proposedStart,
357
+ end: dragGhost.proposedEnd
358
+ },
359
+ day: days[dragGhost.colStart] ?? days[0],
360
+ isStart: dragGhost.isStart,
361
+ isEnd: dragGhost.isEnd,
362
+ continuesBefore: !dragGhost.isStart,
363
+ continuesAfter: !dragGhost.isEnd
364
+ },
365
+ className: cn("inset-ring-0 h-full", !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidContent)
366
+ })
367
+ })
368
+ })]
369
+ })]
370
+ });
371
+ }
372
+ function EventCalendarAllDayCell({ day }) {
373
+ const settings = useEventCalendarSettings();
374
+ const viewConfig = useEventCalendarViewConfig();
375
+ const { view } = useEventCalendarViewContext();
376
+ const { effective } = useEventCalendarViewSettings();
377
+ const gestures = useEventCalendarGestures();
378
+ const dayStart = zonedStartOfDay(day, settings.timeZone);
379
+ const dayEnd = addDays(toZoned(dayStart, settings.timeZone), 1);
380
+ const isOff = resolveOffDay(day, settings.timeZone, effective.offDays ? typeof viewConfig.offDays === "object" ? viewConfig.offDays : true : false);
381
+ const offClassName = typeof viewConfig.offDays === "object" && viewConfig.offDays.className || "bg-muted/25";
382
+ const isDropTarget = useEventCalendarSelector((state) => {
383
+ const drag = state.drag;
384
+ if (!drag?.proposedDayGranular) return null;
385
+ if (!(drag.proposedStart < dayEnd && drag.proposedEnd > dayStart)) return null;
386
+ return drag.valid ? "valid" : "invalid";
387
+ });
388
+ const inDraft = useEventCalendarSelector((state) => {
389
+ const draft = state.slotDraft;
390
+ if (!draft?.allDay) return null;
391
+ if (draft.start >= dayEnd || draft.end <= dayStart) return null;
392
+ return {
393
+ isStart: draft.start >= dayStart,
394
+ isEnd: draft.end <= dayEnd
395
+ };
396
+ }, { isEqual: (a, b) => a === b || a !== null && b !== null && a.isStart === b.isStart && a.isEnd === b.isEnd });
397
+ return /* @__PURE__ */ jsx("div", {
398
+ "data-slot": "event-calendar-all-day-cell",
399
+ "data-ec-day": dayStart.getTime(),
400
+ "data-drop-target": isDropTarget ?? void 0,
401
+ "data-off": isOff || void 0,
402
+ className: cn("relative flex min-w-0 flex-col gap-0.5 border-e px-1 py-1.5 last:border-e-0", isOff && offClassName, viewConfig.dayClassName?.(day), inDraft && cn("bg-primary/10", viewConfig.classNames?.slotDraft), viewConfig.classNames?.allDayCell),
403
+ onPointerDown: (e) => {
404
+ if (e.target === e.currentTarget) gestures.beginCreate(e, day, true);
405
+ },
406
+ onClick: (e) => {
407
+ if (e.target === e.currentTarget && !wasRecentDrag() && !wasRecentChipPress()) settings.onSlotClick?.({
408
+ date: dayStart,
409
+ allDay: true,
410
+ view
411
+ }, e);
412
+ }
413
+ });
414
+ }
415
+ function EventCalendarTimeGutter({ days, slots, startHour, interval }) {
416
+ const settings = useEventCalendarSettings();
417
+ const viewConfig = useEventCalendarViewConfig();
418
+ const referenceDay = days[0] ?? /* @__PURE__ */ new Date();
419
+ const labelFormat = interval % 60 === 0 ? settings.i18n.formats.timeGutter : settings.i18n.formats.timeGutterMinute;
420
+ return /* @__PURE__ */ jsx("div", {
421
+ "data-slot": "event-calendar-time-gutter",
422
+ className: cn("relative w-(--ec-gutter-width,4.5rem) shrink-0 border-e", viewConfig.classNames?.timeGutter),
423
+ children: slots.map((minutes) => {
424
+ const time = addMinutes(zonedStartOfDay(referenceDay, settings.timeZone), minutes);
425
+ const label = viewConfig.renderTimeGutterSlot?.({
426
+ time,
427
+ hour: Math.floor(minutes / 60),
428
+ minute: minutes % 60
429
+ }) ?? (minutes > startHour * 60 ? format(time, labelFormat, { locale: settings.locale }) : null);
430
+ return /* @__PURE__ */ jsx("div", {
431
+ className: "relative",
432
+ style: { height: `calc(var(--ec-hour-height) * ${interval / 60})` },
433
+ children: label != null && /* @__PURE__ */ jsx("span", {
434
+ className: cn("absolute end-2.5 -top-2 text-muted-foreground", viewConfig.classNames?.timeGutterLabel),
435
+ children: label
436
+ })
437
+ }, minutes);
438
+ })
439
+ });
440
+ }
441
+ /** Absolute overlay block positioned by minutes (ghosts + drafts). */
442
+ function minuteBlockStyle(startMin, endMin, boundsStartMin) {
443
+ const top = (startMin - boundsStartMin) / 60;
444
+ const height = Math.max((endMin - startMin) / 60, .25);
445
+ return {
446
+ top: `calc(var(--ec-hour-height) * ${top})`,
447
+ height: `calc(var(--ec-hour-height) * ${height})`
448
+ };
449
+ }
450
+ function EventCalendarDayColumn({ day, startHour, endHour, interval }) {
451
+ const settings = useEventCalendarSettings();
452
+ const viewConfig = useEventCalendarViewConfig();
453
+ const { effective } = useEventCalendarViewSettings();
454
+ const { view } = useEventCalendarViewContext();
455
+ const gestures = useEventCalendarGestures();
456
+ const { segments, isToday } = useEventCalendarDay(day);
457
+ const isOff = resolveOffDay(day, settings.timeZone, effective.offDays ? typeof viewConfig.offDays === "object" ? viewConfig.offDays : true : false);
458
+ const offClassName = typeof viewConfig.offDays === "object" && viewConfig.offDays.className || "bg-muted/25";
459
+ const timeZone = settings.timeZone;
460
+ const dayStart = zonedStartOfDay(day, timeZone);
461
+ const dayEnd = addDays(toZoned(dayStart, timeZone), 1);
462
+ const totalMinutes = getDayTotalMinutes(day, timeZone);
463
+ const boundsStartMin = startHour * 60;
464
+ const boundsEndMin = Math.min(endHour * 60, totalMinutes);
465
+ const boundsMinutes = Math.max(60, boundsEndMin - boundsStartMin);
466
+ const windowFor = (start, end) => {
467
+ if (start >= dayEnd || end <= dayStart) return null;
468
+ const from = Math.max(differenceInMinutes(start > dayStart ? start : dayStart, dayStart), boundsStartMin);
469
+ const to = Math.min(differenceInMinutes(end < dayEnd ? end : dayEnd, dayStart), boundsEndMin);
470
+ return to > from ? [from, to] : null;
471
+ };
472
+ const dragGhost = useEventCalendarSelector((state) => {
473
+ const drag = state.drag;
474
+ if (!drag || drag.proposedDayGranular) return null;
475
+ const window = windowFor(drag.proposedStart, drag.proposedEnd);
476
+ if (!window) return null;
477
+ return {
478
+ valid: drag.valid,
479
+ kind: drag.kind,
480
+ occurrence: drag.occurrence,
481
+ proposedStart: drag.proposedStart,
482
+ proposedEnd: drag.proposedEnd,
483
+ window,
484
+ color: drag.occurrence.event.color,
485
+ title: drag.occurrence.event.title
486
+ };
487
+ }, { isEqual: (a, b) => a === b || a !== null && b !== null && a.window[0] === b.window[0] && a.window[1] === b.window[1] && a.valid === b.valid && a.kind === b.kind && a.proposedStart.getTime() === b.proposedStart.getTime() && a.proposedEnd.getTime() === b.proposedEnd.getTime() });
488
+ const draftWindow = useEventCalendarSelector((state) => {
489
+ const draft = state.slotDraft;
490
+ if (!draft || draft.allDay) return null;
491
+ return windowFor(draft.start, draft.end);
492
+ }, { isEqual: (a, b) => a === b || a !== null && b !== null && a[0] === b[0] && a[1] === b[1] });
493
+ const slotFromPointer = (e) => {
494
+ const rect = e.currentTarget.getBoundingClientRect();
495
+ const pxPerMinute = rect.height / boundsMinutes;
496
+ const minutes = snapMinutes(boundsStartMin + (e.clientY - rect.top) / pxPerMinute, settings.snapDuration);
497
+ const clamped = Math.min(Math.max(minutes, boundsStartMin), boundsEndMin - settings.slotDuration);
498
+ return {
499
+ date: addMinutes(dayStart, clamped),
500
+ end: addMinutes(dayStart, clamped + settings.slotDuration)
501
+ };
502
+ };
503
+ return /* @__PURE__ */ jsxs("div", {
504
+ "data-slot": "event-calendar-day-column",
505
+ "data-today": isToday || void 0,
506
+ "data-off": isOff || void 0,
507
+ "data-ec-day": dayStart.getTime(),
508
+ "data-ec-bounds-start": boundsStartMin,
509
+ "data-ec-bounds-end": boundsEndMin,
510
+ role: "group",
511
+ "aria-label": format(toZoned(day, timeZone), settings.i18n.formats.dayAria, { locale: settings.locale }),
512
+ className: cn("relative min-w-0 border-e last:border-e-0", isOff && offClassName, isToday && viewConfig.todayClassName, viewConfig.dayClassName?.(day), viewConfig.classNames?.dayColumn),
513
+ style: {
514
+ height: `calc(var(--ec-hour-height) * ${boundsMinutes / 60})`,
515
+ backgroundImage: `repeating-linear-gradient(to bottom, transparent, transparent calc(var(--ec-hour-height) * ${interval / 60} - var(--ec-slot-line-width, 1px)), var(--ec-slot-line-color, var(--color-border)) calc(var(--ec-hour-height) * ${interval / 60} - var(--ec-slot-line-width, 1px)), var(--ec-slot-line-color, var(--color-border)) calc(var(--ec-hour-height) * ${interval / 60}))`
516
+ },
517
+ onPointerDown: (e) => {
518
+ if (e.target === e.currentTarget) gestures.beginCreate(e, day, false);
519
+ },
520
+ onClick: (e) => {
521
+ if (e.target !== e.currentTarget || wasRecentDrag() || wasRecentChipPress()) return;
522
+ const slot = slotFromPointer(e);
523
+ settings.onSlotClick?.({
524
+ ...slot,
525
+ allDay: false,
526
+ view
527
+ }, e);
528
+ },
529
+ children: [
530
+ viewConfig.renderDayColumnBackground && /* @__PURE__ */ jsx("div", {
531
+ className: "pointer-events-none absolute inset-0",
532
+ children: viewConfig.renderDayColumnBackground({
533
+ day,
534
+ boundsStartMin,
535
+ boundsEndMin,
536
+ totalMinutes
537
+ })
538
+ }),
539
+ segments.timed.map((segment) => {
540
+ const startMin = Math.max(segment.startMin ?? 0, boundsStartMin);
541
+ const endMin = Math.min(segment.endMin ?? startMin, boundsEndMin);
542
+ if (endMin <= boundsStartMin || startMin >= boundsEndMin) return null;
543
+ const columnCount = segment.columnCount ?? 1;
544
+ const column = segment.column ?? 0;
545
+ const span = segment.columnSpan ?? 1;
546
+ const zIndex = segment.occurrence.event.zIndex ?? 10 + column;
547
+ const colPct = 100 / columnCount;
548
+ return /* @__PURE__ */ jsx("div", {
549
+ className: "absolute z-(--ec-z) min-h-(--ec-event-min-h,1.5rem) px-0.5 hover:z-40",
550
+ style: {
551
+ ...minuteBlockStyle(startMin, endMin, boundsStartMin),
552
+ left: `${column * colPct}%`,
553
+ width: `${span * colPct}%`,
554
+ "--ec-z": zIndex
555
+ },
556
+ children: /* @__PURE__ */ jsx(EventCalendarEvent, {
557
+ segment,
558
+ className: cn(columnCount > 1 && "ring-1 ring-background", endMin - startMin < viewConfig.compactEventMinutes ? "h-full gap-1 py-0 leading-4" : "h-full flex-col items-start justify-start gap-0 py-1", viewConfig.classNames?.timedChip)
559
+ })
560
+ }, segment.occurrence.key);
561
+ }),
562
+ dragGhost && /* @__PURE__ */ jsx("div", {
563
+ "data-slot": "event-calendar-drag-ghost",
564
+ "data-kind": dragGhost.kind,
565
+ "data-drop-invalid": !dragGhost.valid || void 0,
566
+ className: cn("pointer-events-none absolute inset-x-0.5 z-50 min-h-(--ec-event-min-h,1.5rem)", dragGhost.kind === "move" ? cn(EVENT_CALENDAR_GHOST.move, !dragGhost.valid && EVENT_CALENDAR_GHOST.invalid) : cn(EVENT_CALENDAR_GHOST.resize, !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidResize), viewConfig.classNames?.dragGhost),
567
+ style: {
568
+ ...minuteBlockStyle(dragGhost.window[0], dragGhost.window[1], boundsStartMin),
569
+ "--ec-event-color": dragGhost.color ?? "var(--color-primary)"
570
+ },
571
+ children: dragGhost.kind !== "move" && /* @__PURE__ */ jsx(EventCalendarEvent, {
572
+ preview: true,
573
+ segment: {
574
+ occurrence: {
575
+ ...dragGhost.occurrence,
576
+ start: dragGhost.proposedStart,
577
+ end: dragGhost.proposedEnd,
578
+ allDay: false
579
+ },
580
+ day,
581
+ isStart: true,
582
+ isEnd: true,
583
+ continuesBefore: false,
584
+ continuesAfter: false,
585
+ startMin: dragGhost.window[0],
586
+ endMin: dragGhost.window[1]
587
+ },
588
+ className: cn(dragGhost.window[1] - dragGhost.window[0] < viewConfig.compactEventMinutes ? "h-full gap-1 py-0 leading-4" : "h-full flex-col items-start justify-start gap-0 py-1", viewConfig.classNames?.timedChip, "inset-ring-0", !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidContent)
589
+ })
590
+ }),
591
+ draftWindow && /* @__PURE__ */ jsx("div", {
592
+ "data-slot": "event-calendar-slot-draft",
593
+ className: cn("pointer-events-none absolute inset-x-0.5 z-40 rounded-sm border border-primary/40 border-dashed bg-primary/5", viewConfig.classNames?.slotDraft),
594
+ style: minuteBlockStyle(draftWindow[0], draftWindow[1], boundsStartMin)
595
+ })
596
+ ]
597
+ });
598
+ }
599
+ function EventCalendarNowIndicator({ days, startHour, endHour }) {
600
+ const settings = useEventCalendarSettings();
601
+ const viewConfig = useEventCalendarViewConfig();
602
+ const now = useNow(viewConfig.nowIndicatorInterval);
603
+ const timeZone = settings.timeZone;
604
+ const todayKey = getDayKey(now, timeZone);
605
+ const todayIndex = days.findIndex((day) => getDayKey(day, timeZone) === todayKey);
606
+ if (todayIndex === -1) return null;
607
+ const minutes = differenceInMinutes(now, zonedStartOfDay(now, timeZone));
608
+ if (minutes < startHour * 60 || minutes > endHour * 60) return null;
609
+ const top = minutes / 60 - startHour;
610
+ if (viewConfig.renderNowIndicator) return /* @__PURE__ */ jsx("div", {
611
+ className: "pointer-events-none absolute inset-x-0 z-40",
612
+ style: { top: `calc(var(--ec-hour-height) * ${top})` },
613
+ children: viewConfig.renderNowIndicator({ time: now })
614
+ });
615
+ const columnWidthPct = 100 / days.length;
616
+ return /* @__PURE__ */ jsxs("div", {
617
+ "data-slot": "event-calendar-now-indicator",
618
+ className: "pointer-events-none absolute inset-x-0 z-40",
619
+ style: { top: `calc(var(--ec-hour-height) * ${top})` },
620
+ children: [/* @__PURE__ */ jsx("div", { className: "absolute start-(--ec-gutter-width,4.5rem) end-0 h-px bg-destructive/40" }), /* @__PURE__ */ jsxs("div", {
621
+ className: "absolute h-px",
622
+ style: {
623
+ left: `calc(var(--ec-gutter-width, 4.5rem) + (100% - var(--ec-gutter-width, 4.5rem)) * ${todayIndex * columnWidthPct / 100})`,
624
+ width: `calc((100% - var(--ec-gutter-width, 4.5rem)) * ${columnWidthPct / 100})`
625
+ },
626
+ children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-0 h-px bg-destructive" }), /* @__PURE__ */ jsx("div", { className: "absolute -start-1 top-0 size-1.5 -translate-y-1/2 rounded-full bg-destructive" })]
627
+ })]
628
+ });
629
+ }
630
+ function EventCalendarWeekView(props) {
631
+ return /* @__PURE__ */ jsx(EventCalendarTimeGrid, {
632
+ view: "week",
633
+ ...props
634
+ });
635
+ }
636
+ function EventCalendarDayView(props) {
637
+ return /* @__PURE__ */ jsx(EventCalendarTimeGrid, {
638
+ view: "day",
639
+ ...props
640
+ });
641
+ }
642
+ function EventCalendarDaysView(props) {
643
+ return /* @__PURE__ */ jsx(EventCalendarTimeGrid, {
644
+ view: "days",
645
+ ...props
646
+ });
647
+ }
648
+ //#endregion
649
+ export { EventCalendarDayView, EventCalendarDaysView, EventCalendarNowIndicator, EventCalendarTimeGrid, EventCalendarTimeGutter, EventCalendarWeekView, minuteBlockStyle, useNow };
650
+
651
+ //# sourceMappingURL=event-calendar-time-grid.js.map