@kumix/ui 0.1.2 → 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 (494) hide show
  1. package/README.md +118 -88
  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/theme.css +244 -0
  483. package/dist/theme.css.d.ts +3 -0
  484. package/package.json +105 -36
  485. package/dist/hooks.d.ts +0 -957
  486. package/dist/hooks.d.ts.map +0 -1
  487. package/dist/hooks.js +0 -1391
  488. package/dist/hooks.js.map +0 -1
  489. package/dist/index.d.ts +0 -1993
  490. package/dist/index.d.ts.map +0 -1
  491. package/dist/index.js +0 -10647
  492. package/dist/index.js.map +0 -1
  493. package/dist/use-is-mobile-Dln4-L1O.js +0 -210
  494. package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-calendar-month-view.js","names":[],"sources":["../../../../src/components/reui/event-calendar/event-calendar-month-view.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type CSSProperties,\n type Ref,\n useCallback,\n useEffect,\n useLayoutEffect,\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\";\nimport { addDays, format, getWeek } from \"date-fns\";\nimport { PlusIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../../ui/popover\";\nimport { ScrollArea } from \"../../ui/scroll-area\";\nimport {\n EventCalendarViewContext,\n useEventCalendar,\n useEventCalendarDay,\n useEventCalendarSelector,\n useEventCalendarSettings,\n useEventCalendarViewConfig,\n useEventCalendarViewSettings,\n useEventCalendarWeek,\n} from \"./event-calendar\";\nimport { useEventCalendarGestures, wasRecentChipPress, wasRecentDrag } from \"./event-calendar-dnd\";\nimport { EVENT_CALENDAR_GHOST, EventCalendarEvent } from \"./event-calendar-event\";\nimport {\n getDayKey,\n getRangeKey,\n resolveOffDay,\n toZoned,\n zonedStartOfDay,\n} from \"./event-calendar-lib\";\nimport type {\n EventCalendarDateRange,\n EventCalendarDragState,\n EventCalendarSegment,\n} from \"./event-calendar-types\";\n\n// Layout-effect on the client (measure before paint, no flash), plain effect on\n// the server (never runs there) to avoid the SSR useLayoutEffect warning.\nconst useIsoLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\ninterface EventCalendarMonthViewProps extends useRender.ComponentProps<\"div\"> {\n maxEventsPerCell?: number | \"auto\";\n}\n\nfunction EventCalendarMonthView({\n className,\n render,\n maxEventsPerCell,\n ...props\n}: EventCalendarMonthViewProps) {\n const instance = useEventCalendar();\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n const visibleRange = useEventCalendarSelector<unknown, EventCalendarDateRange>(\n (state) => state.visibleRange,\n {\n isEqual: (a, b) => getRangeKey(a) === getRangeKey(b),\n },\n );\n const anchorDate = useEventCalendarSelector((state) => state.date);\n\n const { effective } = useEventCalendarViewSettings();\n const weeks = useMemo(() => {\n const days: Date[] = [];\n let cursor = zonedStartOfDay(visibleRange.start, settings.timeZone);\n while (cursor < visibleRange.end) {\n days.push(cursor);\n cursor = zonedStartOfDay(addDays(toZoned(cursor, settings.timeZone), 1), settings.timeZone);\n }\n const rows: Date[][] = [];\n for (let i = 0; i < days.length; i += 7) rows.push(days.slice(i, i + 7));\n if (effective.weekends) return rows;\n return rows.map((row) =>\n row.filter((day) => !settings.weekendDays.includes(toZoned(day, settings.timeZone).getDay())),\n );\n }, [visibleRange, settings.timeZone, settings.weekendDays, effective.weekends]);\n\n const headerDays = weeks[0] ?? [];\n const title = settings.i18n.functions.formatTitle(\"month\", {\n date: toZoned(anchorDate, settings.timeZone),\n activeRange: instance.api.getActiveRange(),\n visibleRange,\n locale: settings.locale,\n });\n\n const gridTemplateColumns = `${effective.weekNumbers ? \"var(--ec-week-number-w, 2.75rem) \" : \"\"}repeat(${headerDays.length}, minmax(0, 1fr))`;\n const cap = maxEventsPerCell ?? viewConfig.maxEventsPerCell;\n const contained = viewConfig.scrollMode !== \"page\";\n\n // \"auto\" fits as many event rows as the cell height allows and rolls the rest\n // into \"+N more\". Only the contained mode gives a cell a bounded height to\n // measure; page mode grows to fit, so \"auto\" there keeps the fixed fallback.\n const autoFit = cap === \"auto\" && contained;\n // slotProbe resolves the event-row height (--ec-month-bar-h) to px, honoring\n // the current font size and any consumer override; contentProbe is the first\n // cell's flex-1 content area, whose height is the event space per cell.\n const slotProbeRef = useRef<HTMLDivElement | null>(null);\n const contentProbeRef = useRef<HTMLDivElement | null>(null);\n const [autoCap, setAutoCap] = useState<number | null>(null);\n const measureCap = useCallback(() => {\n const content = contentProbeRef.current;\n const slot = slotProbeRef.current;\n if (!content || !slot) return;\n const laneH = slot.getBoundingClientRect().height;\n if (laneH <= 0) return;\n const cs = getComputedStyle(content);\n const inner = content.clientHeight - (parseFloat(cs.paddingTop) || 0);\n const gap = parseFloat(cs.rowGap) || 0;\n // N rows occupy N*laneH - gap (the last row has no trailing gap)\n setAutoCap(Math.max(1, Math.floor((inner + gap) / laneH)));\n }, []);\n useIsoLayoutEffect(() => {\n if (!autoFit) {\n setAutoCap(null);\n return;\n }\n const content = contentProbeRef.current;\n if (!content || typeof ResizeObserver === \"undefined\") return;\n measureCap();\n const observer = new ResizeObserver(measureCap);\n observer.observe(content);\n return () => observer.disconnect();\n // re-observe the first cell after a re-layout (row count or month change)\n }, [autoFit, measureCap, weeks.length, anchorDate]);\n const resolvedCap = cap === \"auto\" ? (autoFit ? (autoCap ?? 3) : 3) : cap;\n\n const defaultProps = {\n \"data-slot\": \"event-calendar-month-view\",\n \"data-view\": \"month\",\n role: \"grid\",\n \"aria-label\": title,\n className: cn(\n \"flex flex-col border-t\",\n contained && \"min-h-0 flex-1 overflow-hidden\",\n viewConfig.classNames?.monthView,\n className,\n ),\n children: (\n <>\n <div\n role=\"row\"\n data-slot=\"event-calendar-month-header\"\n // @container scopes the narrow-label breakpoint to the header row\n className={cn(\"@container grid border-b\", viewConfig.classNames?.monthHeader)}\n style={{ gridTemplateColumns }}\n >\n {effective.weekNumbers && (\n <div\n role=\"columnheader\"\n aria-hidden\n className={cn(\"border-e px-2 py-1.5\", viewConfig.classNames?.weekNumber)}\n />\n )}\n {headerDays.map((day) => (\n <div\n key={day.getTime()}\n role=\"columnheader\"\n className={cn(\n \"truncate px-2 py-1.5 font-medium text-muted-foreground\",\n viewConfig.classNames?.monthDayHeader,\n )}\n >\n {viewConfig.renderDayHeader?.({\n day,\n view: \"month\",\n isToday:\n getDayKey(day, settings.timeZone) === getDayKey(new Date(), settings.timeZone),\n }) ?? (\n <>\n <span className=\"@max-[36rem]:hidden\">\n {format(toZoned(day, settings.timeZone), settings.i18n.formats.monthDayHeader, {\n locale: settings.locale,\n })}\n </span>\n <span className=\"@max-[36rem]:inline hidden\">\n {format(\n toZoned(day, settings.timeZone),\n settings.i18n.formats.monthDayHeaderNarrow,\n { locale: settings.locale },\n )}\n </span>\n </>\n )}\n </div>\n ))}\n </div>\n <div\n data-slot=\"event-calendar-month-body\"\n className={cn(\"grid\", contained && \"min-h-0 flex-1\", viewConfig.classNames?.monthBody)}\n style={{\n gridTemplateRows: contained\n ? `repeat(${weeks.length}, minmax(0, 1fr))`\n : `repeat(${weeks.length}, minmax(var(--ec-month-row-min-h, 8rem), auto))`,\n }}\n >\n {weeks.map((week, rowIndex) => (\n <EventCalendarMonthWeek\n key={rowIndex}\n week={week}\n gridTemplateColumns={gridTemplateColumns}\n showWeekNumber={effective.weekNumbers}\n cap={resolvedCap}\n autoFit={autoFit}\n contentRef={rowIndex === 0 ? contentProbeRef : undefined}\n />\n ))}\n </div>\n {autoFit && (\n <div\n ref={slotProbeRef}\n aria-hidden\n className=\"pointer-events-none invisible absolute h-(--ec-month-bar-h,1.75rem) w-0\"\n />\n )}\n </>\n ),\n };\n\n return (\n <EventCalendarViewContext.Provider value={{ view: \"month\" }}>\n {useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n })}\n </EventCalendarViewContext.Provider>\n );\n}\n\n/**\n * One month week row. Multi-day / all-day events render as CONTINUOUS bars in\n * an overlay grid that spans day columns (colStart -> colSpan) and stacks by\n * lane; single-day timed events render inside each cell below the reserved bar\n * lanes. This is what makes a cross-day event read as one whole block instead\n * of a chip repeated per cell.\n */\nfunction EventCalendarMonthWeek({\n week,\n gridTemplateColumns,\n showWeekNumber,\n cap,\n autoFit,\n contentRef,\n}: {\n week: Date[];\n gridTemplateColumns: string;\n showWeekNumber: boolean;\n cap: number;\n autoFit: boolean;\n /** Set on the first week only: forwarded to its first cell's content area so\n * the view can measure the per-cell event height for \"auto\". */\n contentRef?: Ref<HTMLDivElement>;\n}) {\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n const { bars, rowStart } = useEventCalendarWeek(week[0]);\n const colOffset = showWeekNumber ? 1 : 0;\n const dayMs = 86400000;\n const rowStartMs = zonedStartOfDay(rowStart ?? week[0], settings.timeZone).getTime();\n // Day offsets from the TRUE row start (0-6) for each visible column, so a\n // weekends-hidden month still places bars on the right days.\n const offsets = week.map((d) =>\n Math.round((zonedStartOfDay(d, settings.timeZone).getTime() - rowStartMs) / dayMs),\n );\n /** Clamp a day-offset span onto the visible columns; null = fully hidden. */\n const gridPos = (colStart: number, colSpan: number) => {\n let start = -1;\n let end = -1;\n for (let o = colStart; o < colStart + colSpan; o++) {\n const col = offsets.indexOf(o);\n if (col === -1) continue;\n if (start === -1) start = col;\n end = col;\n }\n return start === -1 ? null : { col: start, span: end - start + 1 };\n };\n // bars fit within the cap; deeper lanes fall into each day's \"+N more\"\n const visibleBars = bars.filter((b) => (b.lane ?? 0) < cap);\n const covers = (b: EventCalendarSegment, dayOffset: number) =>\n (b.colStart ?? 0) <= dayOffset && dayOffset < (b.colStart ?? 0) + (b.colSpan ?? 1);\n // Occurrence keys of the bars hidden in each column (lane >= cap). Threaded to\n // the cell so its \"+N more\" popover can list the hidden bars WITHOUT re-listing\n // the visible ones (day buckets carry no lane, so the week row - which owns bar\n // laning - is the only place that knows which bars are hidden).\n const hiddenBarKeysByCol = week.map(\n (_, col) =>\n new Set(\n bars\n .filter((b) => (b.lane ?? 0) >= cap && covers(b, offsets[col]))\n .map((b) => b.occurrence.key),\n ),\n );\n\n // Live move/resize ghost at the PROPOSED day span. Standardized treatment\n // (EVENT_CALENDAR_GHOST): move = the event carried as a full clone, resize =\n // the same clone with a dashed boundary; invalid adds destructive marking\n // while the engine shows the not-allowed cursor + validation hint.\n const dragGhost = useEventCalendarSelector<\n unknown,\n | (Pick<\n EventCalendarDragState,\n \"kind\" | \"valid\" | \"occurrence\" | \"proposedStart\" | \"proposedEnd\" | \"proposedAllDay\"\n > & {\n colStart: number;\n colSpan: number;\n isStart: boolean;\n isEnd: boolean;\n color?: string;\n })\n | null\n >(\n (state) => {\n const drag = state.drag;\n if (!drag) return null;\n const rowEndMs = rowStartMs + 7 * dayMs;\n const startDayMs = zonedStartOfDay(drag.proposedStart, settings.timeZone).getTime();\n // exclusive end -> the last covered day\n const lastDayMs = zonedStartOfDay(\n new Date(drag.proposedEnd.getTime() - 1),\n settings.timeZone,\n ).getTime();\n if (startDayMs >= rowEndMs || lastDayMs < rowStartMs) return null;\n const startCol = Math.max(0, Math.round((startDayMs - rowStartMs) / dayMs));\n const endCol = Math.min(6, Math.round((lastDayMs - rowStartMs) / dayMs));\n if (endCol < startCol) return null;\n return {\n kind: drag.kind,\n valid: drag.valid,\n occurrence: drag.occurrence,\n proposedStart: drag.proposedStart,\n proposedEnd: drag.proposedEnd,\n proposedAllDay: drag.proposedAllDay,\n colStart: startCol,\n colSpan: endCol - startCol + 1,\n isStart: startDayMs >= rowStartMs,\n isEnd: lastDayMs < rowEndMs,\n color: drag.occurrence.event.color,\n };\n },\n {\n isEqual: (a, b) =>\n a === b ||\n (a !== null &&\n b !== null &&\n a.colStart === b.colStart &&\n a.colSpan === b.colSpan &&\n a.valid === b.valid &&\n a.kind === b.kind &&\n a.proposedAllDay === b.proposedAllDay &&\n a.proposedStart.getTime() === b.proposedStart.getTime() &&\n a.proposedEnd.getTime() === b.proposedEnd.getTime()),\n },\n );\n const ghostPos = dragGhost ? gridPos(dragGhost.colStart, dragGhost.colSpan) : null;\n const ghostLane = dragGhost\n ? (bars.find((b) => b.occurrence.key === dragGhost.occurrence.key)?.lane ?? 0)\n : 0;\n // A single-day timed MOVE is indicated INLINE in the target cell (a\n // placeholder at the time-sorted position, rendered by EventCalendarMonthCell)\n // rather than as a bar in this overlay, so only bar drags and every resize\n // render the overlay ghost. Bars = all-day or multi-day (span > 1 day).\n const ghostIsBar =\n !!dragGhost &&\n (dragGhost.kind !== \"move\" ||\n dragGhost.proposedAllDay ||\n dragGhost.proposedEnd.getTime() - dragGhost.proposedStart.getTime() > dayMs);\n\n return (\n <div\n role=\"row\"\n data-slot=\"event-calendar-month-row\"\n className={cn(\n \"relative grid min-h-0 border-b last:border-b-0\",\n viewConfig.classNames?.monthRow,\n )}\n style={{ gridTemplateColumns }}\n >\n {showWeekNumber && (\n <div\n role=\"rowheader\"\n data-slot=\"event-calendar-week-number\"\n className={cn(\n \"border-e px-2 pt-1 text-muted-foreground tabular-nums\",\n viewConfig.classNames?.weekNumber,\n )}\n >\n {settings.i18n.labels.week(\n getWeek(toZoned(week[0], settings.timeZone), {\n weekStartsOn: settings.weekStartsOn,\n }),\n )}\n </div>\n )}\n {week.map((day, col) => (\n <EventCalendarMonthCell\n key={day.getTime()}\n day={day}\n cap={cap}\n // Reserve lane space only for bars that pass through THIS cell, so a\n // short multi-day event does not push down timed events in unrelated\n // cells of the same row. Reserve down to the deepest covering bar\n // lane so timed events always sit below every bar in their own cell.\n reservedLanes={visibleBars.reduce(\n (max, b) => (covers(b, offsets[col]) ? Math.max(max, (b.lane ?? 0) + 1) : max),\n 0,\n )}\n hiddenBarKeys={hiddenBarKeysByCol[col]}\n isLast={col === week.length - 1}\n autoFit={autoFit}\n contentRef={col === 0 ? contentRef : undefined}\n />\n ))}\n {/* Continuous bar overlay: one element per bar, placed by grid-column so\n a cross-day span is a single unbroken block. pointer-events pass\n through the gaps to the cells below. NOT aria-hidden - these are the\n real interactive bars. */}\n {(visibleBars.length > 0 || (dragGhost && ghostPos && ghostIsBar)) && (\n <div\n data-slot=\"event-calendar-month-bar-overlay\"\n className={cn(\n \"pointer-events-none absolute inset-x-0 top-0 z-10 grid pt-1.5\",\n viewConfig.classNames?.monthBarOverlay,\n )}\n style={{\n gridTemplateColumns,\n gridAutoRows: \"var(--ec-month-bar-h, 1.75rem)\",\n }}\n >\n {visibleBars.map((bar) => {\n const pos = gridPos(bar.colStart ?? 0, bar.colSpan ?? 1);\n if (!pos) return null;\n return (\n <div\n key={bar.occurrence.key}\n className={cn(\"pointer-events-auto min-w-0 px-1\", viewConfig.classNames?.monthBar)}\n style={{\n gridColumn: `${colOffset + pos.col + 1} / span ${pos.span}`,\n gridRow: (bar.lane ?? 0) + 1,\n }}\n >\n {/* lane height minus the 2px inter-lane gap */}\n <EventCalendarEvent\n segment={bar}\n className=\"h-[calc(var(--ec-month-bar-h,1.75rem)-0.125rem)]\"\n />\n </div>\n );\n })}\n {dragGhost && ghostPos && ghostIsBar && (\n <div\n aria-hidden\n className={cn(\"min-w-0 px-1\", viewConfig.classNames?.monthBar)}\n style={{\n gridColumn: `${colOffset + ghostPos.col + 1} / span ${ghostPos.span}`,\n gridRow: ghostLane + 1,\n }}\n >\n <div\n data-slot=\"event-calendar-drag-ghost\"\n data-kind={dragGhost.kind}\n data-drop-invalid={!dragGhost.valid || undefined}\n className={cn(\n \"h-[calc(var(--ec-month-bar-h,1.75rem)-0.125rem)]\",\n dragGhost.kind === \"move\"\n ? // faint drop placeholder only: the cursor-attached\n // carry clone owns the visual during moves\n cn(\n EVENT_CALENDAR_GHOST.move,\n !dragGhost.valid && EVENT_CALENDAR_GHOST.invalid,\n )\n : cn(\n EVENT_CALENDAR_GHOST.resize,\n !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidResize,\n ),\n viewConfig.classNames?.dragGhost,\n )}\n style={\n {\n \"--ec-event-color\": dragGhost.color ?? \"var(--color-primary)\",\n } as CSSProperties\n }\n >\n {dragGhost.kind !== \"move\" && (\n <EventCalendarEvent\n preview\n segment={{\n occurrence: {\n ...dragGhost.occurrence,\n start: dragGhost.proposedStart,\n end: dragGhost.proposedEnd,\n },\n day: week[ghostPos.col] ?? week[0],\n isStart: dragGhost.isStart,\n isEnd: dragGhost.isEnd,\n continuesBefore: !dragGhost.isStart,\n continuesAfter: !dragGhost.isEnd,\n }}\n className={cn(\n \"inset-ring-0 h-full\",\n !dragGhost.valid && EVENT_CALENDAR_GHOST.invalidContent,\n )}\n />\n )}\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n}\n\nfunction EventCalendarMonthCell({\n day,\n cap,\n reservedLanes,\n hiddenBarKeys,\n isLast,\n autoFit,\n contentRef,\n}: {\n day: Date;\n cap: number;\n reservedLanes: number;\n /** Occurrence keys of the bars hidden in THIS column (lane >= cap), from the\n * week row. Lets the cell list hidden bars in its overflow popover without\n * re-listing the bars already visible in the row overlay. */\n hiddenBarKeys: Set<string>;\n /** Last column in the row - drops the right border so the grid's outer edge\n * is owned by the container, not a doubled cell border. Passed explicitly\n * because the bar overlay renders after the cells, so `:last-child` is\n * unreliable on rows that have bars. */\n isLast: boolean;\n /** When true, the \"+N more\" chip is treated as taking a row so the visible\n * chips + indicator always fit the measured cell height. */\n autoFit: boolean;\n /** Set on the first cell only: measured to derive the \"auto\" cap. */\n contentRef?: Ref<HTMLDivElement>;\n}) {\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n const gestures = useEventCalendarGestures();\n const { segments, isToday, isOutside } = useEventCalendarDay(day);\n\n const dayStart = zonedStartOfDay(day, settings.timeZone);\n const dayEnd = addDays(toZoned(dayStart, settings.timeZone), 1);\n const { effective } = useEventCalendarViewSettings();\n const isOff = resolveOffDay(\n day,\n settings.timeZone,\n effective.offDays\n ? typeof viewConfig.offDays === \"object\"\n ? viewConfig.offDays\n : true\n : false,\n );\n const offClassName =\n (typeof viewConfig.offDays === \"object\" && viewConfig.offDays.className) || \"bg-muted/25\";\n\n const isDropTarget = useEventCalendarSelector<unknown, \"valid\" | \"invalid\" | null>((state) => {\n const drag = state.drag;\n if (!drag) return null;\n const covered = drag.proposedStart < dayEnd && drag.proposedEnd > dayStart;\n if (!covered) return null;\n return drag.valid ? \"valid\" : \"invalid\";\n });\n // Hide hover affordances mid-gesture: the only intent is the drop target\n const isInteracting = useEventCalendarSelector<unknown, boolean>(\n (state) => state.drag !== null || state.slotDraft !== null,\n );\n const inDraft = useEventCalendarSelector<unknown, { isStart: boolean; isEnd: boolean } | null>(\n (state) => {\n const draft = state.slotDraft;\n if (!draft?.allDay) return null;\n if (draft.start >= dayEnd || draft.end <= dayStart) return null;\n return {\n isStart: draft.start >= dayStart,\n isEnd: draft.end <= dayEnd,\n };\n },\n {\n isEqual: (a, b) =>\n a === b || (a !== null && b !== null && a.isStart === b.isStart && a.isEnd === b.isEnd),\n },\n );\n // A single-day timed MOVE landing on THIS day: expose the proposed\n // minute-of-day (+ color/validity) so the cell can render a drop placeholder\n // at the correct time-sorted position, instead of the overlay marking a bar\n // over the first chip. Skipped for bars (they keep the overlay ghost) and for\n // a no-op move back onto the event's own day (the dimmed source already marks\n // the spot).\n const inlineDrop = useEventCalendarSelector<\n unknown,\n { min: number; valid: boolean; color?: string } | null\n >(\n (state) => {\n const drag = state.drag;\n if (drag?.kind !== \"move\" || drag.proposedAllDay) return null;\n if (drag.proposedEnd.getTime() - drag.proposedStart.getTime() > 86400000) return null;\n const dropDayMs = zonedStartOfDay(drag.proposedStart, settings.timeZone).getTime();\n if (dropDayMs !== dayStart.getTime()) return null;\n if (\n zonedStartOfDay(drag.occurrence.start, settings.timeZone).getTime() === dayStart.getTime()\n )\n return null;\n return {\n min: (drag.proposedStart.getTime() - dropDayMs) / 60000,\n valid: drag.valid,\n color: drag.occurrence.event.color,\n };\n },\n {\n isEqual: (a, b) =>\n a === b ||\n (a !== null && b !== null && a.min === b.min && a.valid === b.valid && a.color === b.color),\n },\n );\n\n // Bars (allDay/multi-day) are drawn by the week-row overlay; the cell renders\n // only single-day timed events, below the reserved bar lanes.\n const extraHidden = hiddenBarKeys.size;\n const hiddenBarSegs = segments.allDay.filter((s) => hiddenBarKeys.has(s.occurrence.key));\n const m = segments.timed.length;\n const timedSlots = Math.max(0, cap - reservedLanes);\n\n // Static (at-rest) split: what the cell shows with no drag, and - crucially -\n // what the \"+N more\" popover lists. The popover carries ONLY the hidden events\n // (hidden bars + timed past the cap), never the chips already visible in the\n // cell, so it never duplicates them. autoFit gives up one timed row to the\n // \"+N more\" indicator so the visible chips fit the clipped cell height.\n const staticOverflow = extraHidden > 0 || m > timedSlots;\n const staticShown = autoFit && staticOverflow ? Math.max(0, timedSlots - 1) : timedSlots;\n const overflowSegments = [...hiddenBarSegs, ...segments.timed.slice(staticShown)];\n\n // Live split: while a timed chip is dragged onto this day, render the day\n // exactly as it will look AFTER the drop. The dragged chip is a phantom in the\n // time-sorted order and is shown as the placeholder - inline where it lands,\n // or ON the \"+N more\" indicator when it lands in the overflow bucket (so the\n // user sees the drop will push it into \"more\"). The \"+N more\" count always\n // reflects the post-drop hidden total.\n let visibleTimed: EventCalendarSegment[];\n let overflowCount: number;\n let placeholderIndex: number;\n let placeholderAtMore: boolean;\n if (!inlineDrop) {\n visibleTimed = segments.timed.slice(0, staticShown);\n overflowCount = overflowSegments.length;\n placeholderIndex = -1;\n placeholderAtMore = false;\n } else {\n // rank of the dragged chip in the resulting time-sorted list (chips are\n // time-ordered, so this is the count starting at or before its time)\n const insertRank = segments.timed.filter((s) => (s.startMin ?? 0) <= inlineDrop.min).length;\n const dropOverflow = extraHidden > 0 || m + 1 > timedSlots;\n // rows for timed items INCLUDING the phantom, before the \"+N more\" row\n const vis = !dropOverflow ? m + 1 : autoFit ? Math.max(0, timedSlots - 1) : timedSlots;\n placeholderAtMore = insertRank >= vis;\n visibleTimed = placeholderAtMore\n ? segments.timed.slice(0, vis)\n : segments.timed.slice(0, Math.max(0, vis - 1));\n placeholderIndex = placeholderAtMore ? -1 : insertRank;\n overflowCount = extraHidden + (m - visibleTimed.length) + (placeholderAtMore ? 1 : 0);\n }\n\n // Faint dashed drop placeholder, tinted to the dragged event's color, echoing\n // the move ghost (EVENT_CALENDAR_GHOST.move); one chip-height tall so chips\n // shift by exactly one row when it is inserted.\n const dropPlaceholder = inlineDrop ? (\n <div\n key=\"ec-drop-placeholder\"\n aria-hidden\n data-slot=\"event-calendar-drop-placeholder\"\n data-drop-invalid={!inlineDrop.valid || undefined}\n className={cn(\n \"shrink-0 rounded-sm border border-dashed\",\n inlineDrop.valid\n ? \"border-(--ec-event-color)/50 bg-(--ec-event-color)/8\"\n : \"border-destructive/70 bg-destructive/10\",\n viewConfig.classNames?.dragGhost,\n )}\n style={\n {\n \"--ec-event-color\": inlineDrop.color ?? \"var(--color-primary)\",\n height: \"calc(var(--ec-month-bar-h, 1.75rem) - 0.125rem)\",\n } as CSSProperties\n }\n />\n ) : null;\n\n const defaultContent = (\n <>\n <div\n ref={contentRef}\n className={cn(\n // gap-0.5 pairs with the 0.125rem subtraction in the lane spacer\n // below; changing the gap requires renderMonthCell\n // px-1 matches the all-day bar wrapper inset so single-day chips and\n // multi-day bars line up on the same left/right edge in a cell\n \"flex min-h-0 flex-1 flex-col gap-0.5 overflow-hidden px-1 pt-1.5\",\n viewConfig.classNames?.monthCellContent,\n )}\n >\n {reservedLanes > 0 && (\n <div\n aria-hidden\n className=\"shrink-0\"\n style={{\n // lane height already carries the 2px inter-lane gap; subtract\n // it so spacer + the column's own gap-0.5 = the SAME 2px rhythm\n // between the last bar and the first timed chip\n height: `calc(${reservedLanes} * var(--ec-month-bar-h, 1.75rem) - 0.125rem)`,\n }}\n />\n )}\n {visibleTimed.flatMap((segment, i) => {\n const chip = (\n <EventCalendarEvent\n key={segment.occurrence.key}\n segment={segment}\n // Hold a fixed height like the all-day lane above; without this\n // the chip flex-shrinks to whatever room the cell has left, so\n // cells with a reserved bar lane or a second chip render shorter\n // chips.\n className=\"shrink-0\"\n />\n );\n return i === placeholderIndex ? [dropPlaceholder, chip] : [chip];\n })}\n {placeholderIndex >= 0 && placeholderIndex >= visibleTimed.length && dropPlaceholder}\n {overflowCount > 0 && (\n <EventCalendarMoreIndicator\n day={day}\n count={overflowCount}\n segments={overflowSegments}\n dropInto={\n placeholderAtMore && inlineDrop\n ? { color: inlineDrop.color, valid: inlineDrop.valid }\n : undefined\n }\n />\n )}\n </div>\n {/* Day number + add affordance, bottom-right (Notion-style) */}\n <div\n className={cn(\n \"flex items-center justify-end gap-1 px-2 pb-1.5\",\n viewConfig.classNames?.monthCellFooter,\n )}\n >\n {viewConfig.showDayAddButton && !isInteracting && (\n <button\n type=\"button\"\n data-slot=\"event-calendar-day-add\"\n aria-label={settings.i18n.labels.addEvent}\n // a different icon/markup is a renderMonthCell job\n className={cn(\n \"flex size-5 cursor-pointer items-center justify-center rounded-sm bg-primary text-primary-foreground opacity-0 transition-opacity focus-visible:opacity-100 group-hover/ec-cell:opacity-100\",\n viewConfig.classNames?.dayAddButton,\n )}\n onClick={(e) => {\n e.stopPropagation();\n settings.onSlotClick?.({ date: day, allDay: true, view: \"month\" }, e);\n }}\n >\n <PlusIcon className=\"size-3.5\" aria-hidden=\"true\" />\n </button>\n )}\n <span\n data-slot=\"event-calendar-month-day-number\"\n className={cn(\n \"flex size-5 items-center justify-center rounded-full\",\n isOutside && \"text-muted-foreground\",\n // the filled circle already marks today; keep the number the same\n // weight/size as the other days so it does not read as larger\n // Same font-size as every other day; a lighter weight cancels the\n // way white digits on the filled circle read bolder/larger than the\n // dark-on-light numbers around them.\n isToday && \"bg-primary font-light text-primary-foreground\",\n viewConfig.classNames?.monthDayNumber,\n )}\n >\n {format(toZoned(day, settings.timeZone), settings.i18n.formats.monthCellDay, {\n locale: settings.locale,\n })}\n </span>\n </div>\n </>\n );\n\n const content =\n viewConfig.renderMonthCell?.({\n day,\n segments,\n isToday,\n isOutside,\n overflowCount,\n defaultContent,\n }) ?? defaultContent;\n\n return (\n // biome-ignore lint/a11y/useKeyWithClickEvents: pointer/gesture surface; keyboard via toolbar\n <div\n role=\"gridcell\"\n data-slot=\"event-calendar-month-cell\"\n data-today={isToday || undefined}\n data-outside={isOutside || undefined}\n data-weekend={\n settings.weekendDays.includes(toZoned(day, settings.timeZone).getDay()) || undefined\n }\n data-ec-day={dayStart.getTime()}\n data-drop-target={isDropTarget ?? undefined}\n data-off={isOff || undefined}\n data-draft={inDraft ? \"\" : undefined}\n aria-label={format(\n toZoned(day, settings.timeZone),\n settings.i18n.formats.monthCellAriaLabel,\n { locale: settings.locale },\n )}\n className={cn(\n \"group/ec-cell relative flex min-h-0 min-w-0 flex-col overflow-hidden\",\n !isLast && \"border-e\",\n isOutside && !settings.showOutsideDays && \"invisible\",\n isOff && offClassName,\n isToday &&\n cn(\"relative border-b-2 border-b-primary/40 bg-primary/3\", viewConfig.todayClassName),\n viewConfig.dayClassName?.(day),\n // No drop-target bg fill on move/resize - the dragged bar + not-allowed\n // cursor carry the feedback; a cell-wide color wash is too distracting.\n // data-drop-target stays as an opt-in styling hook.\n inDraft && \"bg-primary/5\",\n viewConfig.classNames?.monthCell,\n )}\n onPointerDown={(e) => {\n const target = e.target as HTMLElement;\n if (target.closest(\"[data-slot=event-calendar-event]\")) return;\n if (target.closest(\"[data-slot=event-calendar-more]\")) return;\n gestures.beginCreate(e, day, true);\n }}\n onClick={(e) => {\n if (wasRecentDrag() || wasRecentChipPress()) return;\n settings.onSlotClick?.({ date: day, allDay: true, view: \"month\" }, e);\n }}\n >\n {inDraft && (\n <span\n aria-hidden\n data-slot=\"event-calendar-slot-draft\"\n className={cn(\n \"pointer-events-none absolute inset-0 z-10 border-primary/40 border-y border-dashed\",\n inDraft.isStart && \"border-s\",\n inDraft.isEnd && \"border-e\",\n viewConfig.classNames?.slotDraft,\n )}\n />\n )}\n {content}\n </div>\n );\n}\n\ninterface EventCalendarMoreIndicatorProps {\n day: Date;\n count: number;\n /** The OVERFLOW (hidden) segments for this day - bars first, then timed. The\n * popover lists only these, never the chips already visible in the cell. */\n segments: EventCalendarSegment[];\n /** Set while a timed chip is dragged and will land in THIS overflow bucket:\n * the indicator itself becomes the drop placeholder (dashed, event-tinted) so\n * it reads as \"the chip joins the +N more list\". */\n dropInto?: { color?: string; valid: boolean };\n}\n\n/**\n * \"+N more\" trigger opening a popover with the day's full event list.\n * onMoreClick returning false suppresses the built-in popover.\n */\nfunction EventCalendarMoreIndicator({\n day,\n count,\n segments,\n dropInto,\n}: EventCalendarMoreIndicatorProps) {\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n const [open, setOpen] = useState(false);\n\n // Grabbing a chip from this list starts a drag; close the popover so it does\n // not sit over the drop target while the event is carried to another day.\n const isDragging = useEventCalendarSelector<unknown, boolean>((state) => state.drag !== null);\n useEffect(() => {\n if (isDragging) setOpen(false);\n }, [isDragging]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n data-slot=\"event-calendar-more\"\n data-drop-into={dropInto ? \"\" : undefined}\n data-drop-invalid={dropInto && !dropInto.valid ? \"\" : undefined}\n className={cn(\n \"cursor-pointer truncate rounded-sm px-1.5 text-start text-muted-foreground hover:text-foreground\",\n // While a dragged chip will land in this overflow bucket, the \"+N more\"\n // link itself becomes the drop placeholder: dashed, event-tinted, one\n // chip tall, so the drop target is unmistakable.\n dropInto &&\n cn(\n \"flex shrink-0 items-center border border-dashed\",\n dropInto.valid\n ? \"border-(--ec-event-color)/50 bg-(--ec-event-color)/8 text-foreground\"\n : \"border-destructive/70 bg-destructive/10 text-destructive\",\n ),\n viewConfig.classNames?.moreIndicator,\n )}\n style={\n dropInto\n ? ({\n \"--ec-event-color\": dropInto.color ?? \"var(--color-primary)\",\n height: \"calc(var(--ec-month-bar-h, 1.75rem) - 0.125rem)\",\n } as CSSProperties)\n : undefined\n }\n onClick={(e: React.MouseEvent) => {\n e.stopPropagation();\n const verdict = settings.onMoreClick?.(\n day,\n segments.map((segment) => segment.occurrence),\n e,\n );\n if (verdict === false) {\n e.preventDefault();\n setOpen(false);\n }\n }}\n >\n {viewConfig.renderMoreIndicator?.({ day, count, segments }) ??\n settings.i18n.labels.more(count)}\n </PopoverTrigger>\n <PopoverContent\n data-slot=\"event-calendar-more-popover\"\n align={viewConfig.morePopoverAlign}\n // PopoverContent is unlayered (flex-col gap-4 p-4); override with !.\n // text-xs re-establishes the calendar's base type here because this\n // content is portaled out of the root subtree and cannot inherit it.\n className={cn(\"w-64 gap-1! p-2! text-xs\", viewConfig.classNames?.morePopover)}\n onClick={(e: React.MouseEvent) => e.stopPropagation()}\n >\n {viewConfig.renderMoreContent ? (\n viewConfig.renderMoreContent({\n day,\n segments,\n close: () => setOpen(false),\n })\n ) : (\n <EventCalendarMoreDefaultContent day={day} segments={segments} />\n )}\n </PopoverContent>\n </Popover>\n );\n}\n\n/** Built-in \"+N more\" popover body: day header + the day's chips. */\nfunction EventCalendarMoreDefaultContent({\n day,\n segments,\n}: {\n day: Date;\n segments: EventCalendarSegment[];\n}) {\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n return (\n <>\n <div\n className={cn(\n \"px-1 py-1 font-medium text-muted-foreground text-xs\",\n viewConfig.classNames?.morePopoverHeader,\n )}\n >\n {format(toZoned(day, settings.timeZone), settings.i18n.formats.moreDayHeader, {\n locale: settings.locale,\n })}\n </div>\n {/* The scroll region breaks out of the popover's right padding (-me-2)\n so the scrollbar sits flush in the gutter; the list then pads itself\n back (ps-1 aligns with the header, pe-4 clears the ~10px bar with a\n gap) and adds py-1 so the first/last focus ring is not clipped by\n the overflow. Layout is identical with or without a scrollbar. */}\n {viewConfig.scrollbars === \"native\" ? (\n <div\n data-ec-native-scroll=\"\"\n className=\"-me-2 max-h-(--ec-more-max-height,16rem) min-h-0 overflow-y-auto\"\n >\n <div className=\"flex flex-col gap-1 py-1 ps-1 pe-4\">\n {segments.map((segment) => (\n <EventCalendarEvent\n key={segment.occurrence.key}\n segment={segment}\n className=\"py-0.5\"\n />\n ))}\n </div>\n </div>\n ) : (\n <ScrollArea className=\"-me-2 min-h-0 **:data-[slot=scroll-area-viewport]:max-h-(--ec-more-max-height,16rem)\">\n <div className=\"flex flex-col gap-1 py-1 ps-1 pe-4\">\n {segments.map((segment) => (\n <EventCalendarEvent\n key={segment.occurrence.key}\n segment={segment}\n className=\"py-0.5\"\n />\n ))}\n </div>\n </ScrollArea>\n )}\n </>\n );\n}\n\nexport type { EventCalendarMonthViewProps, EventCalendarMoreIndicatorProps };\nexport { EventCalendarMonthView, EventCalendarMoreIndicator };\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,MAAM,qBAAqB,OAAO,WAAW,cAAc,kBAAkB;AAM7E,SAAS,uBAAuB,EAC9B,WACA,QACA,kBACA,GAAG,SAC2B;CAC9B,MAAM,WAAW,iBAAiB;CAClC,MAAM,WAAW,yBAAyB;CAC1C,MAAM,aAAa,2BAA2B;CAC9C,MAAM,eAAe,0BAClB,UAAU,MAAM,cACjB,EACE,UAAU,GAAG,MAAM,YAAY,CAAC,MAAM,YAAY,CAAC,EACrD,CACF;CACA,MAAM,aAAa,0BAA0B,UAAU,MAAM,IAAI;CAEjE,MAAM,EAAE,cAAc,6BAA6B;CACnD,MAAM,QAAQ,cAAc;EAC1B,MAAM,OAAe,CAAC;EACtB,IAAI,SAAS,gBAAgB,aAAa,OAAO,SAAS,QAAQ;EAClE,OAAO,SAAS,aAAa,KAAK;GAChC,KAAK,KAAK,MAAM;GAChB,SAAS,gBAAgB,QAAQ,QAAQ,QAAQ,SAAS,QAAQ,GAAG,CAAC,GAAG,SAAS,QAAQ;EAC5F;EACA,MAAM,OAAiB,CAAC;EACxB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK,GAAG,KAAK,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC;EACvE,IAAI,UAAU,UAAU,OAAO;EAC/B,OAAO,KAAK,KAAK,QACf,IAAI,QAAQ,QAAQ,CAAC,SAAS,YAAY,SAAS,QAAQ,KAAK,SAAS,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAC9F;CACF,GAAG;EAAC;EAAc,SAAS;EAAU,SAAS;EAAa,UAAU;CAAQ,CAAC;CAE9E,MAAM,aAAa,MAAM,MAAM,CAAC;CAChC,MAAM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AY,WAAW;GAC5E,UAAU,MAAwB,EAAE,gBAAgB;GAEnD,UAAA,WAAW,oBACV,WAAW,kBAAkB;IAC3B;IACA;IACA,aAAa,QAAQ,KAAK;GAC5B,CAAC,IAED,oBAAC,iCAAD;IAAsC;IAAe;GAAW,CAAA;EAEpD,CAAA,CACT;;AAEb;;AAGA,SAAS,gCAAgC,EACvC,KACA,YAIC;CACD,MAAM,WAAW,yBAAyB;CAC1C,MAAM,aAAa,2BAA2B;CAC9C,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,OAAD;EACE,WAAW,GACT,uDACA,WAAW,YAAY,iBACzB;EAEC,UAAA,OAAO,QAAQ,KAAK,SAAS,QAAQ,GAAG,SAAS,KAAK,QAAQ,eAAe,EAC5E,QAAQ,SAAS,OACnB,CAAC;CACE,CAAA,GAMJ,WAAW,eAAe,WACzB,oBAAC,OAAD;EACE,yBAAsB;EACtB,WAAU;EAEV,UAAA,oBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,SAAS,KAAK,YACb,oBAAC,oBAAD;IAEW;IACT,WAAU;GACX,GAHM,QAAQ,WAAW,GAGzB,CACF;EACE,CAAA;CACF,CAAA,IAEL,oBAAC,YAAD;EAAY,WAAU;EACpB,UAAA,oBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,SAAS,KAAK,YACb,oBAAC,oBAAD;IAEW;IACT,WAAU;GACX,GAHM,QAAQ,WAAW,GAGzB,CACF;EACE,CAAA;CACK,CAAA,CAEd,EAAA,CAAA;AAEN"}
@@ -0,0 +1,71 @@
1
+ import { ReactNode } from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ //#region src/components/reui/event-calendar/event-calendar-nav.d.ts
4
+ type NavButtonProps = Omit<useRender.ComponentProps<"button">, "children"> & {
5
+ children?: ReactNode;
6
+ /**
7
+ * Tooltip policy (the part that usually goes wrong on clickable elements):
8
+ * tooltips appear ONLY on hover or keyboard focus-visible - a pointer click
9
+ * never re-triggers them. Buttons that open overlays (the view switcher)
10
+ * use a hover-only tooltip that is force-closed while the overlay is up and
11
+ * ignores focus, so nothing flashes when focus returns after selection.
12
+ * Icon-only buttons default to their accessible label; Today defaults to
13
+ * the actual current date (info the label doesn't carry). Pass null to
14
+ * disable one, or any node to override; viewConfig.navTooltips=false turns
15
+ * them all off (its object form tunes side/delay/closeDelay/timeout).
16
+ */
17
+ tooltip?: ReactNode | null;
18
+ };
19
+ declare function EventCalendarNavToday({ className, render, children, tooltip, ...props }: NavButtonProps): import("react").JSX.Element;
20
+ declare function EventCalendarNavPrev({ className, render, children, tooltip, ...props }: NavButtonProps): import("react").JSX.Element;
21
+ declare function EventCalendarNavNext({ className, render, children, tooltip, ...props }: NavButtonProps): import("react").JSX.Element;
22
+ interface EventCalendarTitleProps extends useRender.ComponentProps<"div"> {
23
+ format?: (ctx: {
24
+ title: string;
25
+ }) => ReactNode;
26
+ }
27
+ declare function EventCalendarTitle({ className, render, format: formatTitle, ...props }: EventCalendarTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
28
+ interface EventCalendarViewSwitcherProps extends Omit<useRender.ComponentProps<"button">, "children"> {
29
+ children?: ReactNode;
30
+ /** Hover/focus-visible hint; defaults to the "Select view" label. Pass
31
+ * null to disable (overlay-opener policy). */
32
+ tooltip?: ReactNode | null;
33
+ }
34
+ declare function EventCalendarViewSwitcher({ className, render, children, tooltip, ...props }: EventCalendarViewSwitcherProps): import("react").JSX.Element;
35
+ interface EventCalendarDatePickerProps extends Omit<useRender.ComponentProps<"button">, "children"> {
36
+ children?: ReactNode;
37
+ /** "auto" (default) resolves per view: range for week/N-days/agenda. */
38
+ mode?: "auto" | "single" | "range";
39
+ /** Hover/focus-visible hint; defaults to null - no tooltip, because the
40
+ * button opens an overlay (see the NavButtonProps tooltip policy). */
41
+ tooltip?: ReactNode | null;
42
+ }
43
+ /**
44
+ * Optional go-to-date picker (shadcn Calendar in a popover), view-aware:
45
+ * week/N-days/agenda highlight the whole active range (any click re-anchors
46
+ * the period), other views select a single date. Not part of the default
47
+ * nav - compose it yourself (or any external picker driving
48
+ * useEventCalendarNavigation().goTo). No tooltip by default: it opens an
49
+ * overlay (see the NavButtonProps tooltip policy); pass `tooltip` to opt in.
50
+ */
51
+ declare function EventCalendarDatePicker({ className, render, children, tooltip, mode, ...props }: EventCalendarDatePickerProps): import("react").JSX.Element;
52
+ type EventCalendarToolbarProps = useRender.ComponentProps<"div">;
53
+ /** Free slot for consumer toolbar buttons; pure layout shell. */
54
+ declare function EventCalendarToolbar({ className, render, ...props }: EventCalendarToolbarProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
55
+ interface EventCalendarNavProps extends useRender.ComponentProps<"div"> {
56
+ /**
57
+ * Render the view switcher in the composed layout. Turn off when the
58
+ * calendar ships with a fixed view (e.g. a month-only embed) and users
59
+ * should not be able to change it.
60
+ * @default true
61
+ */
62
+ showViewSwitcher?: boolean;
63
+ }
64
+ /**
65
+ * Default composed nav: Today, prev/next, title, spacer, view switcher.
66
+ * Pass children to use it as a pure layout shell instead.
67
+ */
68
+ declare function EventCalendarNav({ className, render, children, showViewSwitcher, ...props }: EventCalendarNavProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
69
+ //#endregion
70
+ export { EventCalendarDatePicker, EventCalendarNav, EventCalendarNavNext, EventCalendarNavPrev, type EventCalendarNavProps, EventCalendarNavToday, EventCalendarTitle, type EventCalendarTitleProps, EventCalendarToolbar, type EventCalendarToolbarProps, EventCalendarViewSwitcher, type EventCalendarViewSwitcherProps };
71
+ //# sourceMappingURL=event-calendar-nav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-calendar-nav.d.ts","names":[],"sources":["../../../../src/components/reui/event-calendar/event-calendar-nav.tsx"],"mappings":";;;KAuEK,iBAAiB,KAAK,UAAU;EACnC,WAAW;;;;;;;;;;;;EAYX,UAAU;;iBAwBH,wBAAwB,WAAW,QAAQ,UAAU,YAAY,SAAS,iCAAc,IAAA;iBA6BxF,uBAAuB,WAAW,QAAQ,UAAU,YAAY,SAAS,iCAAc,IAAA;iBAsBvF,uBAAuB,WAAW,QAAQ,UAAU,YAAY,SAAS,iCAAc,IAAA;UAsBtF,gCAAgC,UAAU;EAClD,UAAU;IAAO;QAAoB;;iBAG9B,qBACP,WACA,QACA,QAAQ,gBACL,SACF,0CAAuB,+CAAA;UAoBhB,uCACA,KAAK,UAAU;EACvB,WAAW;;;EAGX,UAAU;;iBAGH,4BACP,WACA,QACA,UACA,YACG,SACF,iDAA8B,IAAA;UAwIvB,qCACA,KAAK,UAAU;EACvB,WAAW;;EAEX;;;EAGA,UAAU;;;;;;;;;;iBAcH,0BACP,WACA,QACA,UACA,SACA,SACG,SACF,+CAA4B,IAAA;KAsE1B,4BAA4B,UAAU;;iBAGlC,uBAAuB,WAAW,WAAW,SAAS,4CAAyB,+CAAA;UAc9E,8BAA8B,UAAU;;;;;;;EAOhD;;;;;;iBAOO,mBACP,WACA,QACA,UACA,qBACG,SACF,wCAAqB,+CAAA"}
@@ -0,0 +1,319 @@
1
+ "use client";
2
+ import { Button } from "../../ui/button.js";
3
+ import { Calendar } from "../../ui/calendar.js";
4
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger } from "../../ui/dropdown-menu.js";
5
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
6
+ import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
7
+ import { toZoned } from "./event-calendar-lib.js";
8
+ import { useEventCalendarNavigation, useEventCalendarSettings, useEventCalendarView, useEventCalendarViewConfig } from "./event-calendar.js";
9
+ import { useState } from "react";
10
+ import { cn } from "@kumix/utils";
11
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
+ import { CalendarIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
13
+ import { mergeProps } from "@base-ui/react/merge-props";
14
+ import { useRender } from "@base-ui/react/use-render";
15
+ import { addDays, format } from "date-fns";
16
+ //#region src/components/reui/event-calendar/event-calendar-nav.tsx
17
+ /** Configured nav button variant/size (viewConfig.navButtonVariant/Size)
18
+ * plus the shared classNames.navButton hook, merged on every nav button. */
19
+ function useNavButtonProps() {
20
+ const viewConfig = useEventCalendarViewConfig();
21
+ return {
22
+ variant: viewConfig.navButtonVariant,
23
+ size: viewConfig.navButtonSize,
24
+ iconSize: viewConfig.navButtonSize === "sm" ? "icon-sm" : "icon",
25
+ className: viewConfig.classNames?.navButton
26
+ };
27
+ }
28
+ /** Resolved nav tooltip policy (viewConfig.navTooltips + classNames.navTooltip). */
29
+ function useNavTooltipConfig() {
30
+ const viewConfig = useEventCalendarViewConfig();
31
+ const config = viewConfig.navTooltips === false ? void 0 : viewConfig.navTooltips;
32
+ return {
33
+ disabled: viewConfig.navTooltips === false,
34
+ side: config?.side ?? "top",
35
+ delay: config?.delay ?? 600,
36
+ closeDelay: config?.closeDelay ?? 0,
37
+ timeout: config?.timeout ?? 300,
38
+ className: viewConfig.classNames?.navTooltip
39
+ };
40
+ }
41
+ /** Hover/focus-visible tooltip wrapper; renders the bare button when disabled
42
+ * (per-button content=null or viewConfig.navTooltips=false). */
43
+ function NavTooltip({ content, children }) {
44
+ const tooltips = useNavTooltipConfig();
45
+ if (tooltips.disabled || content === null || content === void 0) return children;
46
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: children }), /* @__PURE__ */ jsx(TooltipContent, {
47
+ side: tooltips.side,
48
+ className: tooltips.className,
49
+ children: content
50
+ })] });
51
+ }
52
+ function EventCalendarNavToday({ className, render, children, tooltip, ...props }) {
53
+ const { today, isToday } = useEventCalendarNavigation();
54
+ const settings = useEventCalendarSettings();
55
+ const nav = useNavButtonProps();
56
+ const defaultTooltip = format(toZoned(/* @__PURE__ */ new Date(), settings.timeZone), settings.i18n.formats.dayTitle, { locale: settings.locale });
57
+ return /* @__PURE__ */ jsx(NavTooltip, {
58
+ content: tooltip === void 0 ? defaultTooltip : tooltip,
59
+ children: /* @__PURE__ */ jsx(Button, {
60
+ variant: nav.variant,
61
+ size: nav.size,
62
+ "data-slot": "event-calendar-nav-today",
63
+ "data-active": isToday || void 0,
64
+ className: cn(nav.className, className),
65
+ onClick: today,
66
+ render,
67
+ ...props,
68
+ children: children ?? settings.i18n.labels.today
69
+ })
70
+ });
71
+ }
72
+ function EventCalendarNavPrev({ className, render, children, tooltip, ...props }) {
73
+ const { prev } = useEventCalendarNavigation();
74
+ const settings = useEventCalendarSettings();
75
+ const nav = useNavButtonProps();
76
+ return /* @__PURE__ */ jsx(NavTooltip, {
77
+ content: tooltip === void 0 ? settings.i18n.labels.previous : tooltip,
78
+ children: /* @__PURE__ */ jsx(Button, {
79
+ variant: nav.variant,
80
+ size: nav.iconSize,
81
+ "data-slot": "event-calendar-nav-prev",
82
+ "aria-label": settings.i18n.labels.previous,
83
+ className: cn(nav.className, className),
84
+ onClick: prev,
85
+ render,
86
+ ...props,
87
+ children: children ?? /* @__PURE__ */ jsx(ChevronLeftIcon, {
88
+ className: "size-4",
89
+ "aria-hidden": "true"
90
+ })
91
+ })
92
+ });
93
+ }
94
+ function EventCalendarNavNext({ className, render, children, tooltip, ...props }) {
95
+ const { next } = useEventCalendarNavigation();
96
+ const settings = useEventCalendarSettings();
97
+ const nav = useNavButtonProps();
98
+ return /* @__PURE__ */ jsx(NavTooltip, {
99
+ content: tooltip === void 0 ? settings.i18n.labels.next : tooltip,
100
+ children: /* @__PURE__ */ jsx(Button, {
101
+ variant: nav.variant,
102
+ size: nav.iconSize,
103
+ "data-slot": "event-calendar-nav-next",
104
+ "aria-label": settings.i18n.labels.next,
105
+ className: cn(nav.className, className),
106
+ onClick: next,
107
+ render,
108
+ ...props,
109
+ children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {
110
+ className: "size-4",
111
+ "aria-hidden": "true"
112
+ })
113
+ })
114
+ });
115
+ }
116
+ function EventCalendarTitle({ className, render, format: formatTitle, ...props }) {
117
+ const { title } = useEventCalendarNavigation();
118
+ return useRender({
119
+ defaultTagName: "div",
120
+ render,
121
+ props: mergeProps({
122
+ "data-slot": "event-calendar-title",
123
+ "aria-live": "polite",
124
+ className: cn("min-w-0 truncate font-semibold text-sm", useEventCalendarViewConfig().classNames?.title, className),
125
+ children: formatTitle?.({ title }) ?? title
126
+ }, props)
127
+ });
128
+ }
129
+ function EventCalendarViewSwitcher({ className, render, children, tooltip, ...props }) {
130
+ const { view, dayCount, availableViews, setView } = useEventCalendarView();
131
+ const settings = useEventCalendarSettings();
132
+ const viewConfig = useEventCalendarViewConfig();
133
+ const nav = useNavButtonProps();
134
+ const tooltips = useNavTooltipConfig();
135
+ const labels = settings.i18n.labels;
136
+ const [open, setOpen] = useState(false);
137
+ const [tipOpen, setTipOpen] = useState(false);
138
+ const selectView = (v, opts) => {
139
+ setOpen(false);
140
+ setView(v, opts);
141
+ };
142
+ const viewLabel = (v) => v === "days" ? settings.i18n.viewNames.days(dayCount) : settings.i18n.viewNames[v];
143
+ return /* @__PURE__ */ jsxs(DropdownMenu, {
144
+ open,
145
+ onOpenChange: (next) => {
146
+ setOpen(next);
147
+ if (next) setTipOpen(false);
148
+ },
149
+ children: [/* @__PURE__ */ jsxs(Tooltip, {
150
+ open: tipOpen && !open,
151
+ onOpenChange: (next, details) => {
152
+ if (next && details?.reason !== "trigger-hover") return;
153
+ setTipOpen(next);
154
+ },
155
+ children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
156
+ render: /* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Button, {
157
+ variant: nav.variant,
158
+ size: nav.size,
159
+ "data-slot": "event-calendar-view-switcher",
160
+ "aria-label": labels.selectView,
161
+ className: cn("gap-1", nav.className, className)
162
+ }) }),
163
+ ...props,
164
+ children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [viewLabel(view), /* @__PURE__ */ jsx(ChevronDownIcon, {
165
+ className: "size-4 opacity-60",
166
+ "aria-hidden": "true"
167
+ })] })
168
+ }), tipOpen && !open && tooltip !== null && !tooltips.disabled && /* @__PURE__ */ jsx(TooltipContent, {
169
+ side: tooltips.side,
170
+ className: tooltips.className,
171
+ children: tooltip ?? labels.selectView
172
+ })]
173
+ }), /* @__PURE__ */ jsx(DropdownMenuContent, {
174
+ align: "start",
175
+ className: cn("min-w-44", viewConfig.classNames?.viewSwitcherContent),
176
+ children: /* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [/* @__PURE__ */ jsx(DropdownMenuLabel, {
177
+ className: cn("font-normal text-muted-foreground", viewConfig.classNames?.viewSwitcherLabel),
178
+ children: settings.i18n.labels.selectView
179
+ }), availableViews.map((v) => v === "days" ? viewConfig.dayCountPresets.map((count) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
180
+ "data-active": view === "days" && dayCount === count || void 0,
181
+ onClick: () => selectView("days", { dayCount: count }),
182
+ children: [settings.i18n.viewNames.days(count), viewConfig.enableShortcuts && /* @__PURE__ */ jsx(EventCalendarViewShortcut, { children: count })]
183
+ }, `days-${count}`)) : /* @__PURE__ */ jsxs(DropdownMenuItem, {
184
+ "data-active": view === v || void 0,
185
+ onClick: () => selectView(v),
186
+ children: [viewLabel(v), viewConfig.enableShortcuts && /* @__PURE__ */ jsx(EventCalendarViewShortcut, { children: labels.viewShortcuts[v] })]
187
+ }, v))] })
188
+ })]
189
+ });
190
+ }
191
+ /** Outline key badge; theme-token only, so it adapts to every style. */
192
+ function EventCalendarViewShortcut({ children }) {
193
+ return /* @__PURE__ */ jsx("kbd", {
194
+ "data-slot": "event-calendar-view-shortcut",
195
+ className: cn("ms-auto inline-flex size-5 shrink-0 items-center justify-center rounded-sm border font-sans text-muted-foreground text-xs", useEventCalendarViewConfig().classNames?.viewShortcut),
196
+ children
197
+ });
198
+ }
199
+ /** Views whose period reads better as a highlighted range. */
200
+ const RANGE_VIEWS = [
201
+ "week",
202
+ "days",
203
+ "agenda"
204
+ ];
205
+ /**
206
+ * Optional go-to-date picker (shadcn Calendar in a popover), view-aware:
207
+ * week/N-days/agenda highlight the whole active range (any click re-anchors
208
+ * the period), other views select a single date. Not part of the default
209
+ * nav - compose it yourself (or any external picker driving
210
+ * useEventCalendarNavigation().goTo). No tooltip by default: it opens an
211
+ * overlay (see the NavButtonProps tooltip policy); pass `tooltip` to opt in.
212
+ */
213
+ function EventCalendarDatePicker({ className, render, children, tooltip = null, mode, ...props }) {
214
+ const { date, goTo, activeRange } = useEventCalendarNavigation();
215
+ const { view } = useEventCalendarView();
216
+ const settings = useEventCalendarSettings();
217
+ const viewConfig = useEventCalendarViewConfig();
218
+ const nav = useNavButtonProps();
219
+ const [open, setOpen] = useState(false);
220
+ const zoned = toZoned(date, settings.timeZone);
221
+ const configured = mode ?? "auto";
222
+ const resolved = configured === "auto" ? RANGE_VIEWS.includes(view) ? "range" : "single" : configured;
223
+ const pick = (next) => {
224
+ if (!next) return;
225
+ goTo(next);
226
+ setOpen(false);
227
+ };
228
+ return /* @__PURE__ */ jsxs(Popover, {
229
+ open,
230
+ onOpenChange: setOpen,
231
+ children: [/* @__PURE__ */ jsx(NavTooltip, {
232
+ content: tooltip,
233
+ children: /* @__PURE__ */ jsx(PopoverTrigger, {
234
+ render: /* @__PURE__ */ jsx(Button, {
235
+ variant: nav.variant,
236
+ size: nav.iconSize,
237
+ "data-slot": "event-calendar-date-picker",
238
+ "data-mode": resolved,
239
+ "aria-label": settings.i18n.labels.goToDate,
240
+ className: cn(nav.className, className),
241
+ render
242
+ }),
243
+ ...props,
244
+ children: children ?? /* @__PURE__ */ jsx(CalendarIcon, {
245
+ className: "size-4",
246
+ "aria-hidden": "true"
247
+ })
248
+ })
249
+ }), /* @__PURE__ */ jsx(PopoverContent, {
250
+ align: "start",
251
+ className: cn("w-auto p-0!", viewConfig.classNames?.datePickerContent),
252
+ children: resolved === "range" ? /* @__PURE__ */ jsx(Calendar, {
253
+ mode: "range",
254
+ selected: {
255
+ from: toZoned(activeRange.start, settings.timeZone),
256
+ to: toZoned(addDays(activeRange.end, -1), settings.timeZone)
257
+ },
258
+ defaultMonth: zoned,
259
+ onDayClick: pick,
260
+ locale: settings.locale,
261
+ weekStartsOn: settings.weekStartsOn
262
+ }) : /* @__PURE__ */ jsx(Calendar, {
263
+ mode: "single",
264
+ selected: zoned,
265
+ defaultMonth: zoned,
266
+ onSelect: pick,
267
+ locale: settings.locale,
268
+ weekStartsOn: settings.weekStartsOn
269
+ })
270
+ })]
271
+ });
272
+ }
273
+ /** Free slot for consumer toolbar buttons; pure layout shell. */
274
+ function EventCalendarToolbar({ className, render, ...props }) {
275
+ return useRender({
276
+ defaultTagName: "div",
277
+ render,
278
+ props: mergeProps({
279
+ "data-slot": "event-calendar-toolbar",
280
+ className: cn("flex items-center gap-2", useEventCalendarViewConfig().classNames?.toolbar, className),
281
+ children: props.children
282
+ }, props)
283
+ });
284
+ }
285
+ /**
286
+ * Default composed nav: Today, prev/next, title, spacer, view switcher.
287
+ * Pass children to use it as a pure layout shell instead.
288
+ */
289
+ function EventCalendarNav({ className, render, children, showViewSwitcher = true, ...props }) {
290
+ const viewConfig = useEventCalendarViewConfig();
291
+ const tooltips = useNavTooltipConfig();
292
+ return useRender({
293
+ defaultTagName: "div",
294
+ render,
295
+ props: mergeProps({
296
+ "data-slot": "event-calendar-nav",
297
+ className: cn("flex min-w-0 flex-wrap items-center gap-1 px-2 py-2", viewConfig.stickyNav && "sticky top-0 z-30 bg-background", viewConfig.classNames?.nav, className),
298
+ children: children ?? /* @__PURE__ */ jsxs(TooltipProvider, {
299
+ delay: tooltips.delay,
300
+ closeDelay: tooltips.closeDelay,
301
+ timeout: tooltips.timeout,
302
+ children: [
303
+ /* @__PURE__ */ jsx(EventCalendarNavToday, {}),
304
+ showViewSwitcher && /* @__PURE__ */ jsx(EventCalendarViewSwitcher, {}),
305
+ /* @__PURE__ */ jsxs("div", {
306
+ className: "flex items-center",
307
+ children: [/* @__PURE__ */ jsx(EventCalendarNavPrev, {}), /* @__PURE__ */ jsx(EventCalendarNavNext, {})]
308
+ }),
309
+ /* @__PURE__ */ jsx(EventCalendarTitle, { className: "ms-3" }),
310
+ /* @__PURE__ */ jsx("div", { className: "grow" })
311
+ ]
312
+ })
313
+ }, props)
314
+ });
315
+ }
316
+ //#endregion
317
+ export { EventCalendarDatePicker, EventCalendarNav, EventCalendarNavNext, EventCalendarNavPrev, EventCalendarNavToday, EventCalendarTitle, EventCalendarToolbar, EventCalendarViewSwitcher };
318
+
319
+ //# sourceMappingURL=event-calendar-nav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-calendar-nav.js","names":[],"sources":["../../../../src/components/reui/event-calendar/event-calendar-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useState } from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { addDays, format } from \"date-fns\";\nimport { CalendarIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Button } from \"../../ui/button\";\nimport { Calendar } from \"../../ui/calendar\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuTrigger,\n} from \"../../ui/dropdown-menu\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../../ui/popover\";\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"../../ui/tooltip\";\nimport {\n useEventCalendarNavigation,\n useEventCalendarSettings,\n useEventCalendarView,\n useEventCalendarViewConfig,\n} from \"./event-calendar\";\nimport { toZoned } from \"./event-calendar-lib\";\nimport type { CalendarView } from \"./event-calendar-types\";\n\n/** Configured nav button variant/size (viewConfig.navButtonVariant/Size)\n * plus the shared classNames.navButton hook, merged on every nav button. */\nfunction useNavButtonProps(): {\n variant: \"ghost\" | \"outline\" | \"secondary\" | \"default\";\n size: \"sm\" | \"default\";\n iconSize: \"icon-sm\" | \"icon\";\n className: string | undefined;\n} {\n const viewConfig = useEventCalendarViewConfig();\n return {\n variant: viewConfig.navButtonVariant,\n size: viewConfig.navButtonSize,\n iconSize: viewConfig.navButtonSize === \"sm\" ? \"icon-sm\" : \"icon\",\n className: viewConfig.classNames?.navButton,\n };\n}\n\n/** Resolved nav tooltip policy (viewConfig.navTooltips + classNames.navTooltip). */\nfunction useNavTooltipConfig(): {\n disabled: boolean;\n side: \"top\" | \"bottom\" | \"left\" | \"right\";\n delay: number;\n closeDelay: number;\n timeout: number;\n className: string | undefined;\n} {\n const viewConfig = useEventCalendarViewConfig();\n const config = viewConfig.navTooltips === false ? undefined : viewConfig.navTooltips;\n return {\n disabled: viewConfig.navTooltips === false,\n // the nav sits at the top of the calendar, so tooltips open upward by\n // default (away from the grid); collision flipping still drops them below\n // when there is no room above\n side: config?.side ?? \"top\",\n delay: config?.delay ?? 600,\n closeDelay: config?.closeDelay ?? 0,\n timeout: config?.timeout ?? 300,\n className: viewConfig.classNames?.navTooltip,\n };\n}\n\ntype NavButtonProps = Omit<useRender.ComponentProps<\"button\">, \"children\"> & {\n children?: ReactNode;\n /**\n * Tooltip policy (the part that usually goes wrong on clickable elements):\n * tooltips appear ONLY on hover or keyboard focus-visible - a pointer click\n * never re-triggers them. Buttons that open overlays (the view switcher)\n * use a hover-only tooltip that is force-closed while the overlay is up and\n * ignores focus, so nothing flashes when focus returns after selection.\n * Icon-only buttons default to their accessible label; Today defaults to\n * the actual current date (info the label doesn't carry). Pass null to\n * disable one, or any node to override; viewConfig.navTooltips=false turns\n * them all off (its object form tunes side/delay/closeDelay/timeout).\n */\n tooltip?: ReactNode | null;\n};\n\n/** Hover/focus-visible tooltip wrapper; renders the bare button when disabled\n * (per-button content=null or viewConfig.navTooltips=false). */\nfunction NavTooltip({\n content,\n children,\n}: {\n content: ReactNode | null;\n children: React.ReactElement;\n}) {\n const tooltips = useNavTooltipConfig();\n if (tooltips.disabled || content === null || content === undefined) return children;\n return (\n <Tooltip>\n <TooltipTrigger render={children} />\n <TooltipContent side={tooltips.side} className={tooltips.className}>\n {content}\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction EventCalendarNavToday({ className, render, children, tooltip, ...props }: NavButtonProps) {\n const { today, isToday } = useEventCalendarNavigation();\n const settings = useEventCalendarSettings();\n const nav = useNavButtonProps();\n // display-zone \"today\", like every other today derivation in the calendar\n // (a system-zone new Date() can name a different day than Today opens)\n const defaultTooltip = format(\n toZoned(new Date(), settings.timeZone),\n settings.i18n.formats.dayTitle,\n { locale: settings.locale },\n );\n return (\n <NavTooltip content={tooltip === undefined ? defaultTooltip : tooltip}>\n <Button\n variant={nav.variant}\n size={nav.size}\n data-slot=\"event-calendar-nav-today\"\n data-active={isToday || undefined}\n className={cn(nav.className, className)}\n onClick={today}\n render={render}\n {...props}\n >\n {children ?? settings.i18n.labels.today}\n </Button>\n </NavTooltip>\n );\n}\n\nfunction EventCalendarNavPrev({ className, render, children, tooltip, ...props }: NavButtonProps) {\n const { prev } = useEventCalendarNavigation();\n const settings = useEventCalendarSettings();\n const nav = useNavButtonProps();\n return (\n <NavTooltip content={tooltip === undefined ? settings.i18n.labels.previous : tooltip}>\n <Button\n variant={nav.variant}\n size={nav.iconSize}\n data-slot=\"event-calendar-nav-prev\"\n aria-label={settings.i18n.labels.previous}\n className={cn(nav.className, className)}\n onClick={prev}\n render={render}\n {...props}\n >\n {children ?? <ChevronLeftIcon className=\"size-4\" aria-hidden=\"true\" />}\n </Button>\n </NavTooltip>\n );\n}\n\nfunction EventCalendarNavNext({ className, render, children, tooltip, ...props }: NavButtonProps) {\n const { next } = useEventCalendarNavigation();\n const settings = useEventCalendarSettings();\n const nav = useNavButtonProps();\n return (\n <NavTooltip content={tooltip === undefined ? settings.i18n.labels.next : tooltip}>\n <Button\n variant={nav.variant}\n size={nav.iconSize}\n data-slot=\"event-calendar-nav-next\"\n aria-label={settings.i18n.labels.next}\n className={cn(nav.className, className)}\n onClick={next}\n render={render}\n {...props}\n >\n {children ?? <ChevronRightIcon className=\"size-4\" aria-hidden=\"true\" />}\n </Button>\n </NavTooltip>\n );\n}\n\ninterface EventCalendarTitleProps extends useRender.ComponentProps<\"div\"> {\n format?: (ctx: { title: string }) => ReactNode;\n}\n\nfunction EventCalendarTitle({\n className,\n render,\n format: formatTitle,\n ...props\n}: EventCalendarTitleProps) {\n const { title } = useEventCalendarNavigation();\n const viewConfig = useEventCalendarViewConfig();\n const defaultProps = {\n \"data-slot\": \"event-calendar-title\",\n \"aria-live\": \"polite\" as const,\n className: cn(\n \"min-w-0 truncate font-semibold text-sm\",\n viewConfig.classNames?.title,\n className,\n ),\n children: formatTitle?.({ title }) ?? title,\n };\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\ninterface EventCalendarViewSwitcherProps\n extends Omit<useRender.ComponentProps<\"button\">, \"children\"> {\n children?: ReactNode;\n /** Hover/focus-visible hint; defaults to the \"Select view\" label. Pass\n * null to disable (overlay-opener policy). */\n tooltip?: ReactNode | null;\n}\n\nfunction EventCalendarViewSwitcher({\n className,\n render,\n children,\n tooltip,\n ...props\n}: EventCalendarViewSwitcherProps) {\n const { view, dayCount, availableViews, setView } = useEventCalendarView();\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n const nav = useNavButtonProps();\n const tooltips = useNavTooltipConfig();\n const labels = settings.i18n.labels;\n // Controlled open: selecting a view swaps the whole content subtree in the\n // same click, so closing must not depend on the menu's internal handler.\n const [open, setOpen] = useState(false);\n // Hover-only tooltip: when the menu closes, Base UI focuses the trigger\n // again and a focus-opened tooltip would flash - ignore focus opens.\n const [tipOpen, setTipOpen] = useState(false);\n\n const selectView = (v: CalendarView, opts?: { dayCount?: number }) => {\n setOpen(false);\n setView(v, opts);\n };\n\n const viewLabel = (v: CalendarView) =>\n v === \"days\" ? settings.i18n.viewNames.days(dayCount) : settings.i18n.viewNames[v];\n\n return (\n <DropdownMenu\n open={open}\n onOpenChange={(next: boolean) => {\n setOpen(next);\n if (next) setTipOpen(false);\n }}\n >\n {/* Tooltip on an overlay-opener: hover-only (focus opens ignored) and\n force-closed while the menu is up, so it never lingers or flashes\n when focus returns on close. Inherits the nav TooltipProvider's\n delay/closeDelay/timeout. */}\n <Tooltip\n open={tipOpen && !open}\n onOpenChange={(next: boolean, details: { reason?: string }) => {\n // opens are hover-only; the trigger-focus open that follows a\n // menu close is ignored, closes always land\n if (next && details?.reason !== \"trigger-hover\") return;\n setTipOpen(next);\n }}\n >\n <DropdownMenuTrigger\n render={\n <TooltipTrigger\n render={\n <Button\n variant={nav.variant}\n size={nav.size}\n data-slot=\"event-calendar-view-switcher\"\n aria-label={labels.selectView}\n className={cn(\"gap-1\", nav.className, className)}\n />\n }\n />\n }\n {...props}\n >\n {children ?? (\n <>\n {viewLabel(view)}\n <ChevronDownIcon className=\"size-4 opacity-60\" aria-hidden=\"true\" />\n </>\n )}\n </DropdownMenuTrigger>\n {tipOpen && !open && tooltip !== null && !tooltips.disabled && (\n <TooltipContent side={tooltips.side} className={tooltips.className}>\n {tooltip ?? labels.selectView}\n </TooltipContent>\n )}\n </Tooltip>\n <DropdownMenuContent\n align=\"start\"\n className={cn(\"min-w-44\", viewConfig.classNames?.viewSwitcherContent)}\n >\n {/* Base UI contract: GroupLabel must live inside Menu.Group */}\n <DropdownMenuGroup>\n <DropdownMenuLabel\n className={cn(\n \"font-normal text-muted-foreground\",\n viewConfig.classNames?.viewSwitcherLabel,\n )}\n >\n {settings.i18n.labels.selectView}\n </DropdownMenuLabel>\n {availableViews.map((v) =>\n v === \"days\" ? (\n viewConfig.dayCountPresets.map((count) => (\n <DropdownMenuItem\n key={`days-${count}`}\n data-active={(view === \"days\" && dayCount === count) || undefined}\n onClick={() => selectView(\"days\", { dayCount: count })}\n >\n {settings.i18n.viewNames.days(count)}\n {/* hint derived from the preset itself, not i18n's default */}\n {viewConfig.enableShortcuts && (\n <EventCalendarViewShortcut>{count}</EventCalendarViewShortcut>\n )}\n </DropdownMenuItem>\n ))\n ) : (\n <DropdownMenuItem\n key={v}\n data-active={view === v || undefined}\n onClick={() => selectView(v)}\n >\n {viewLabel(v)}\n {viewConfig.enableShortcuts && (\n <EventCalendarViewShortcut>{labels.viewShortcuts[v]}</EventCalendarViewShortcut>\n )}\n </DropdownMenuItem>\n ),\n )}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/** Outline key badge; theme-token only, so it adapts to every style. */\nfunction EventCalendarViewShortcut({ children }: { children: ReactNode }) {\n const viewConfig = useEventCalendarViewConfig();\n return (\n <kbd\n data-slot=\"event-calendar-view-shortcut\"\n className={cn(\n \"ms-auto inline-flex size-5 shrink-0 items-center justify-center rounded-sm border font-sans text-muted-foreground text-xs\",\n viewConfig.classNames?.viewShortcut,\n )}\n >\n {children}\n </kbd>\n );\n}\n\ninterface EventCalendarDatePickerProps\n extends Omit<useRender.ComponentProps<\"button\">, \"children\"> {\n children?: ReactNode;\n /** \"auto\" (default) resolves per view: range for week/N-days/agenda. */\n mode?: \"auto\" | \"single\" | \"range\";\n /** Hover/focus-visible hint; defaults to null - no tooltip, because the\n * button opens an overlay (see the NavButtonProps tooltip policy). */\n tooltip?: ReactNode | null;\n}\n\n/** Views whose period reads better as a highlighted range. */\nconst RANGE_VIEWS: CalendarView[] = [\"week\", \"days\", \"agenda\"];\n\n/**\n * Optional go-to-date picker (shadcn Calendar in a popover), view-aware:\n * week/N-days/agenda highlight the whole active range (any click re-anchors\n * the period), other views select a single date. Not part of the default\n * nav - compose it yourself (or any external picker driving\n * useEventCalendarNavigation().goTo). No tooltip by default: it opens an\n * overlay (see the NavButtonProps tooltip policy); pass `tooltip` to opt in.\n */\nfunction EventCalendarDatePicker({\n className,\n render,\n children,\n tooltip = null,\n mode,\n ...props\n}: EventCalendarDatePickerProps) {\n const { date, goTo, activeRange } = useEventCalendarNavigation();\n const { view } = useEventCalendarView();\n const settings = useEventCalendarSettings();\n const viewConfig = useEventCalendarViewConfig();\n const nav = useNavButtonProps();\n const [open, setOpen] = useState(false);\n const zoned = toZoned(date, settings.timeZone);\n\n const configured = mode ?? \"auto\";\n const resolved =\n configured === \"auto\" ? (RANGE_VIEWS.includes(view) ? \"range\" : \"single\") : configured;\n\n const pick = (next: Date | undefined) => {\n if (!next) return;\n goTo(next);\n setOpen(false);\n };\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <NavTooltip content={tooltip}>\n <PopoverTrigger\n render={\n <Button\n variant={nav.variant}\n size={nav.iconSize}\n data-slot=\"event-calendar-date-picker\"\n data-mode={resolved}\n aria-label={settings.i18n.labels.goToDate}\n className={cn(nav.className, className)}\n render={render}\n />\n }\n {...props}\n >\n {children ?? <CalendarIcon className=\"size-4\" aria-hidden=\"true\" />}\n </PopoverTrigger>\n </NavTooltip>\n <PopoverContent\n align=\"start\"\n className={cn(\"w-auto p-0!\", viewConfig.classNames?.datePickerContent)}\n >\n {resolved === \"range\" ? (\n <Calendar\n mode=\"range\"\n selected={{\n from: toZoned(activeRange.start, settings.timeZone),\n to: toZoned(addDays(activeRange.end, -1), settings.timeZone),\n }}\n defaultMonth={zoned}\n onDayClick={pick}\n locale={settings.locale}\n weekStartsOn={settings.weekStartsOn}\n />\n ) : (\n <Calendar\n mode=\"single\"\n selected={zoned}\n defaultMonth={zoned}\n onSelect={pick}\n locale={settings.locale}\n weekStartsOn={settings.weekStartsOn}\n />\n )}\n </PopoverContent>\n </Popover>\n );\n}\n\ntype EventCalendarToolbarProps = useRender.ComponentProps<\"div\">;\n\n/** Free slot for consumer toolbar buttons; pure layout shell. */\nfunction EventCalendarToolbar({ className, render, ...props }: EventCalendarToolbarProps) {\n const viewConfig = useEventCalendarViewConfig();\n const defaultProps = {\n \"data-slot\": \"event-calendar-toolbar\",\n className: cn(\"flex items-center gap-2\", viewConfig.classNames?.toolbar, className),\n children: props.children,\n };\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\ninterface EventCalendarNavProps extends useRender.ComponentProps<\"div\"> {\n /**\n * Render the view switcher in the composed layout. Turn off when the\n * calendar ships with a fixed view (e.g. a month-only embed) and users\n * should not be able to change it.\n * @default true\n */\n showViewSwitcher?: boolean;\n}\n\n/**\n * Default composed nav: Today, prev/next, title, spacer, view switcher.\n * Pass children to use it as a pure layout shell instead.\n */\nfunction EventCalendarNav({\n className,\n render,\n children,\n showViewSwitcher = true,\n ...props\n}: EventCalendarNavProps) {\n const viewConfig = useEventCalendarViewConfig();\n const tooltips = useNavTooltipConfig();\n const defaultProps = {\n \"data-slot\": \"event-calendar-nav\",\n className: cn(\n \"flex min-w-0 flex-wrap items-center gap-1 px-2 py-2\",\n viewConfig.stickyNav && \"sticky top-0 z-30 bg-background\",\n viewConfig.classNames?.nav,\n className,\n ),\n children: children ?? (\n // Shared provider: first tooltip waits, moving between buttons is instant\n <TooltipProvider\n delay={tooltips.delay}\n closeDelay={tooltips.closeDelay}\n timeout={tooltips.timeout}\n >\n <EventCalendarNavToday />\n {showViewSwitcher && <EventCalendarViewSwitcher />}\n <div className=\"flex items-center\">\n <EventCalendarNavPrev />\n <EventCalendarNavNext />\n </div>\n {/* ms-3 sets the title apart from the tight control cluster so the\n period reads as its own group, not another button */}\n <EventCalendarTitle className=\"ms-3\" />\n <div className=\"grow\" />\n </TooltipProvider>\n ),\n };\n return useRender({\n defaultTagName: \"div\",\n render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\nexport type {\n EventCalendarNavProps,\n EventCalendarTitleProps,\n EventCalendarToolbarProps,\n EventCalendarViewSwitcherProps,\n};\nexport {\n EventCalendarDatePicker,\n EventCalendarNav,\n EventCalendarNavNext,\n EventCalendarNavPrev,\n EventCalendarNavToday,\n EventCalendarTitle,\n EventCalendarToolbar,\n EventCalendarViewSwitcher,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,SAAS,oBAKP;CACA,MAAM,aAAa,2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jB,cAAc,SAAS;GACxB,CAAA;EAEW,CAAA,CACT;;AAEb;;AAKA,SAAS,qBAAqB,EAAE,WAAW,QAAQ,GAAG,SAAoC;CAOxF,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GAPzB,aAAa;GACb,WAAW,GAAG,2BAHG,2BAGiC,CAAC,CAAC,YAAY,SAAS,SAAS;GAClF,UAAU,MAAM;EAKoB,GAAG,KAAK;CAC9C,CAAC;AACH;;;;;AAgBA,SAAS,iBAAiB,EACxB,WACA,QACA,UACA,mBAAmB,MACnB,GAAG,SACqB;CACxB,MAAM,aAAa,2BAA2B;CAC9C,MAAM,WAAW,oBAAoB;CA6BrC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WAAkB;GA9BzB,aAAa;GACb,WAAW,GACT,uDACA,WAAW,aAAa,mCACxB,WAAW,YAAY,KACvB,SACF;GACA,UAAU,YAER,qBAAC,iBAAD;IACE,OAAO,SAAS;IAChB,YAAY,SAAS;IACrB,SAAS,SAAS;IAHpB,UAAA;KAKE,oBAAC,uBAAD,CAAwB,CAAA;KACvB,oBAAoB,oBAAC,2BAAD,CAA4B,CAAA;KACjD,qBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,oBAAC,sBAAD,CAAuB,CAAA,GACvB,oBAAC,sBAAD,CAAuB,CAAA,CACpB;;KAGL,oBAAC,oBAAD,EAAoB,WAAU,OAAQ,CAAA;KACtC,oBAAC,OAAD,EAAK,WAAU,OAAQ,CAAA;IACR;;EAMiB,GAAG,KAAK;CAC9C,CAAC;AACH"}
@@ -0,0 +1,32 @@
1
+ import { CalendarEvent, EventCalendarDateRange, EventCalendarOccurrence, EventCalendarRecurrenceRule } from "./event-calendar-types.js";
2
+ //#region src/components/reui/event-calendar/event-calendar-recurrence.d.ts
3
+ /** Guard: max window-intersecting occurrences per event per expansion. */
4
+ declare const MAX_OCCURRENCES = 1000;
5
+ declare class EventCalendarRecurrenceError extends Error {
6
+ constructor(part: string);
7
+ }
8
+ /**
9
+ * Parses a raw RRULE line (with or without the "RRULE:" prefix) into the
10
+ * structured subset. Pass the display time zone so Z-less UNTIL values are
11
+ * interpreted as wall time in that zone rather than the machine zone.
12
+ */
13
+ declare function parseRRuleString(input: string, timeZone?: string): EventCalendarRecurrenceRule;
14
+ /** Serializes the structured subset back to an RRULE line (without prefix). */
15
+ declare function formatRRuleString(rule: EventCalendarRecurrenceRule): string;
16
+ /**
17
+ * Expands one event into its occurrences intersecting the range.
18
+ * Non-recurring events yield at most one occurrence. Recurrence iteration is
19
+ * wall-time based in the display zone (DST-safe day/week/month steps), and
20
+ * wall-time duration is preserved across DST transitions.
21
+ *
22
+ * exDates remove exactly-matching instants (after COUNT numbering,
23
+ * Google-style: an exception still consumes its COUNT slot); rDates add extra
24
+ * instants with the same duration. RECURRENCE-ID override replacement lives
25
+ * in buildEventIndex, where the override event and its parent series meet.
26
+ */
27
+ declare function expandRecurrence<TData>(event: CalendarEvent<TData>, range: EventCalendarDateRange, ctx: {
28
+ timeZone: string;
29
+ }): EventCalendarOccurrence<TData>[];
30
+ //#endregion
31
+ export { EventCalendarRecurrenceError, MAX_OCCURRENCES, expandRecurrence, formatRRuleString, parseRRuleString };
32
+ //# sourceMappingURL=event-calendar-recurrence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-calendar-recurrence.d.ts","names":[],"sources":["../../../../src/components/reui/event-calendar/event-calendar-recurrence.tsx"],"mappings":";;;cAcM;cAeA,qCAAqC;EAC7B,YAAA;;;;;;;iBAaL,iBAAiB,eAAe,oBAAoB;;iBA6EpD,kBAAkB,MAAM;;;;;;;;;;;;iBA0CxB,iBAAiB,OACxB,OAAO,cAAc,QACrB,OAAO,wBACP;EAAO;IACN,wBAAwB"}