@kumix/ui 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +115 -95
  2. package/dist/components/reui/alert.d.ts +12 -0
  3. package/dist/components/reui/alert.d.ts.map +1 -0
  4. package/dist/components/reui/alert.js +58 -0
  5. package/dist/components/reui/alert.js.map +1 -0
  6. package/dist/components/reui/autocomplete.d.ts +43 -0
  7. package/dist/components/reui/autocomplete.d.ts.map +1 -0
  8. package/dist/components/reui/autocomplete.js +165 -0
  9. package/dist/components/reui/autocomplete.js.map +1 -0
  10. package/dist/components/reui/badge.d.ts +17 -0
  11. package/dist/components/reui/badge.d.ts.map +1 -0
  12. package/dist/components/reui/badge.js +75 -0
  13. package/dist/components/reui/badge.js.map +1 -0
  14. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +17 -0
  15. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -0
  16. package/dist/components/reui/data-grid/data-grid-column-filter.js +127 -0
  17. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -0
  18. package/dist/components/reui/data-grid/data-grid-column-header.d.ts +18 -0
  19. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -0
  20. package/dist/components/reui/data-grid/data-grid-column-header.js +228 -0
  21. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -0
  22. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +10 -0
  23. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -0
  24. package/dist/components/reui/data-grid/data-grid-column-visibility.js +28 -0
  25. package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -0
  26. package/dist/components/reui/data-grid/data-grid-pagination.d.ts +22 -0
  27. package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -0
  28. package/dist/components/reui/data-grid/data-grid-pagination.js +144 -0
  29. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -0
  30. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts +12 -0
  31. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -0
  32. package/dist/components/reui/data-grid/data-grid-scroll-area.js +289 -0
  33. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -0
  34. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +14 -0
  35. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -0
  36. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +166 -0
  37. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -0
  38. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +10 -0
  39. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -0
  40. package/dist/components/reui/data-grid/data-grid-table-dnd.js +171 -0
  41. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -0
  42. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +29 -0
  43. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -0
  44. package/dist/components/reui/data-grid/data-grid-table-virtual.js +269 -0
  45. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -0
  46. package/dist/components/reui/data-grid/data-grid-table.d.ts +116 -0
  47. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -0
  48. package/dist/components/reui/data-grid/data-grid-table.js +864 -0
  49. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -0
  50. package/dist/components/reui/data-grid/data-grid.d.ts +112 -0
  51. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -0
  52. package/dist/components/reui/data-grid/data-grid.js +134 -0
  53. package/dist/components/reui/data-grid/data-grid.js.map +1 -0
  54. package/dist/components/reui/date-selector.d.ts +131 -0
  55. package/dist/components/reui/date-selector.d.ts.map +1 -0
  56. package/dist/components/reui/date-selector.js +783 -0
  57. package/dist/components/reui/date-selector.js.map +1 -0
  58. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts +7 -0
  59. package/dist/components/reui/event-calendar/event-calendar-agenda-view.d.ts.map +1 -0
  60. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +108 -0
  61. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -0
  62. package/dist/components/reui/event-calendar/event-calendar-content.d.ts +15 -0
  63. package/dist/components/reui/event-calendar/event-calendar-content.d.ts.map +1 -0
  64. package/dist/components/reui/event-calendar/event-calendar-content.js +44 -0
  65. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -0
  66. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts +30 -0
  67. package/dist/components/reui/event-calendar/event-calendar-dnd.d.ts.map +1 -0
  68. package/dist/components/reui/event-calendar/event-calendar-dnd.js +581 -0
  69. package/dist/components/reui/event-calendar/event-calendar-dnd.js.map +1 -0
  70. package/dist/components/reui/event-calendar/event-calendar-event.d.ts +73 -0
  71. package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -0
  72. package/dist/components/reui/event-calendar/event-calendar-event.js +299 -0
  73. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -0
  74. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +103 -0
  75. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -0
  76. package/dist/components/reui/event-calendar/event-calendar-i18n.js +141 -0
  77. package/dist/components/reui/event-calendar/event-calendar-i18n.js.map +1 -0
  78. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +111 -0
  79. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts.map +1 -0
  80. package/dist/components/reui/event-calendar/event-calendar-lib.js +398 -0
  81. package/dist/components/reui/event-calendar/event-calendar-lib.js.map +1 -0
  82. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +29 -0
  83. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts.map +1 -0
  84. package/dist/components/reui/event-calendar/event-calendar-month-view.js +530 -0
  85. package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -0
  86. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts +71 -0
  87. package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -0
  88. package/dist/components/reui/event-calendar/event-calendar-nav.js +319 -0
  89. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -0
  90. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts +32 -0
  91. package/dist/components/reui/event-calendar/event-calendar-recurrence.d.ts.map +1 -0
  92. package/dist/components/reui/event-calendar/event-calendar-recurrence.js +300 -0
  93. package/dist/components/reui/event-calendar/event-calendar-recurrence.js.map +1 -0
  94. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts +14 -0
  95. package/dist/components/reui/event-calendar/event-calendar-resource-view.d.ts.map +1 -0
  96. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +355 -0
  97. package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -0
  98. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +35 -0
  99. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts.map +1 -0
  100. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +651 -0
  101. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -0
  102. package/dist/components/reui/event-calendar/event-calendar-types.d.ts +236 -0
  103. package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -0
  104. package/dist/components/reui/event-calendar/event-calendar-types.js +2 -0
  105. package/dist/components/reui/event-calendar/event-calendar.d.ts +561 -0
  106. package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -0
  107. package/dist/components/reui/event-calendar/event-calendar.js +817 -0
  108. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -0
  109. package/dist/components/reui/filters.d.ts +176 -0
  110. package/dist/components/reui/filters.d.ts.map +1 -0
  111. package/dist/components/reui/filters.js +1216 -0
  112. package/dist/components/reui/filters.js.map +1 -0
  113. package/dist/components/reui/frame.d.ts +32 -0
  114. package/dist/components/reui/frame.d.ts.map +1 -0
  115. package/dist/components/reui/frame.js +115 -0
  116. package/dist/components/reui/frame.js.map +1 -0
  117. package/dist/components/reui/gantt/gantt-bar.d.ts +44 -0
  118. package/dist/components/reui/gantt/gantt-bar.d.ts.map +1 -0
  119. package/dist/components/reui/gantt/gantt-bar.js +229 -0
  120. package/dist/components/reui/gantt/gantt-bar.js.map +1 -0
  121. package/dist/components/reui/gantt/gantt-dnd.d.ts +36 -0
  122. package/dist/components/reui/gantt/gantt-dnd.d.ts.map +1 -0
  123. package/dist/components/reui/gantt/gantt-dnd.js +615 -0
  124. package/dist/components/reui/gantt/gantt-dnd.js.map +1 -0
  125. package/dist/components/reui/gantt/gantt-i18n.d.ts +91 -0
  126. package/dist/components/reui/gantt/gantt-i18n.d.ts.map +1 -0
  127. package/dist/components/reui/gantt/gantt-i18n.js +131 -0
  128. package/dist/components/reui/gantt/gantt-i18n.js.map +1 -0
  129. package/dist/components/reui/gantt/gantt-lib.d.ts +123 -0
  130. package/dist/components/reui/gantt/gantt-lib.d.ts.map +1 -0
  131. package/dist/components/reui/gantt/gantt-lib.js +354 -0
  132. package/dist/components/reui/gantt/gantt-lib.js.map +1 -0
  133. package/dist/components/reui/gantt/gantt-nav.d.ts +60 -0
  134. package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -0
  135. package/dist/components/reui/gantt/gantt-nav.js +266 -0
  136. package/dist/components/reui/gantt/gantt-nav.js.map +1 -0
  137. package/dist/components/reui/gantt/gantt-recurrence.d.ts +37 -0
  138. package/dist/components/reui/gantt/gantt-recurrence.d.ts.map +1 -0
  139. package/dist/components/reui/gantt/gantt-recurrence.js +230 -0
  140. package/dist/components/reui/gantt/gantt-recurrence.js.map +1 -0
  141. package/dist/components/reui/gantt/gantt-types.d.ts +251 -0
  142. package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -0
  143. package/dist/components/reui/gantt/gantt-types.js +2 -0
  144. package/dist/components/reui/gantt/gantt-view.d.ts +10 -0
  145. package/dist/components/reui/gantt/gantt-view.d.ts.map +1 -0
  146. package/dist/components/reui/gantt/gantt-view.js +2193 -0
  147. package/dist/components/reui/gantt/gantt-view.js.map +1 -0
  148. package/dist/components/reui/gantt/gantt.d.ts +602 -0
  149. package/dist/components/reui/gantt/gantt.d.ts.map +1 -0
  150. package/dist/components/reui/gantt/gantt.js +796 -0
  151. package/dist/components/reui/gantt/gantt.js.map +1 -0
  152. package/dist/components/reui/icon-stack.d.ts +7 -0
  153. package/dist/components/reui/icon-stack.d.ts.map +1 -0
  154. package/dist/components/reui/icon-stack.js +76 -0
  155. package/dist/components/reui/icon-stack.js.map +1 -0
  156. package/dist/components/reui/kanban.d.ts +70 -0
  157. package/dist/components/reui/kanban.d.ts.map +1 -0
  158. package/dist/components/reui/kanban.js +519 -0
  159. package/dist/components/reui/kanban.js.map +1 -0
  160. package/dist/components/reui/number-field.d.ts +29 -0
  161. package/dist/components/reui/number-field.d.ts.map +1 -0
  162. package/dist/components/reui/number-field.js +127 -0
  163. package/dist/components/reui/number-field.js.map +1 -0
  164. package/dist/components/reui/phone-input.d.ts +13 -0
  165. package/dist/components/reui/phone-input.d.ts.map +1 -0
  166. package/dist/components/reui/phone-input.js +126 -0
  167. package/dist/components/reui/phone-input.js.map +1 -0
  168. package/dist/components/reui/rating.d.ts +34 -0
  169. package/dist/components/reui/rating.d.ts.map +1 -0
  170. package/dist/components/reui/rating.js +94 -0
  171. package/dist/components/reui/rating.js.map +1 -0
  172. package/dist/components/reui/scrollspy.d.ts +17 -0
  173. package/dist/components/reui/scrollspy.d.ts.map +1 -0
  174. package/dist/components/reui/scrollspy.js +130 -0
  175. package/dist/components/reui/scrollspy.js.map +1 -0
  176. package/dist/components/reui/sortable.d.ts +48 -0
  177. package/dist/components/reui/sortable.d.ts.map +1 -0
  178. package/dist/components/reui/sortable.js +230 -0
  179. package/dist/components/reui/sortable.js.map +1 -0
  180. package/dist/components/reui/stepper.d.ts +63 -0
  181. package/dist/components/reui/stepper.d.ts.map +1 -0
  182. package/dist/components/reui/stepper.js +234 -0
  183. package/dist/components/reui/stepper.js.map +1 -0
  184. package/dist/components/reui/timeline.d.ts +24 -0
  185. package/dist/components/reui/timeline.d.ts.map +1 -0
  186. package/dist/components/reui/timeline.js +123 -0
  187. package/dist/components/reui/timeline.js.map +1 -0
  188. package/dist/components/reui/tree.d.ts +23 -0
  189. package/dist/components/reui/tree.d.ts.map +1 -0
  190. package/dist/components/reui/tree.js +115 -0
  191. package/dist/components/reui/tree.js.map +1 -0
  192. package/dist/components/ui/accordion.d.ts +9 -0
  193. package/dist/components/ui/accordion.d.ts.map +1 -0
  194. package/dist/components/ui/accordion.js +56 -0
  195. package/dist/components/ui/accordion.js.map +1 -0
  196. package/dist/components/ui/alert-dialog.d.ts +21 -0
  197. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  198. package/dist/components/ui/alert-dialog.js +96 -0
  199. package/dist/components/ui/alert-dialog.js.map +1 -0
  200. package/dist/components/ui/alert.d.ts +13 -0
  201. package/dist/components/ui/alert.d.ts.map +1 -0
  202. package/dist/components/ui/alert.js +45 -0
  203. package/dist/components/ui/alert.js.map +1 -0
  204. package/dist/components/ui/aspect-ratio.d.ts +8 -0
  205. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  206. package/dist/components/ui/aspect-ratio.js +16 -0
  207. package/dist/components/ui/aspect-ratio.js.map +1 -0
  208. package/dist/components/ui/attachment.d.ts +26 -0
  209. package/dist/components/ui/attachment.d.ts.map +1 -0
  210. package/dist/components/ui/attachment.js +106 -0
  211. package/dist/components/ui/attachment.js.map +1 -0
  212. package/dist/components/ui/avatar.d.ts +14 -0
  213. package/dist/components/ui/avatar.d.ts.map +1 -0
  214. package/dist/components/ui/avatar.js +52 -0
  215. package/dist/components/ui/avatar.js.map +1 -0
  216. package/dist/components/ui/badge.d.ts +10 -0
  217. package/dist/components/ui/badge.d.ts.map +1 -0
  218. package/dist/components/ui/badge.js +32 -0
  219. package/dist/components/ui/badge.js.map +1 -0
  220. package/dist/components/ui/breadcrumb.d.ts +13 -0
  221. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  222. package/dist/components/ui/breadcrumb.js +72 -0
  223. package/dist/components/ui/breadcrumb.js.map +1 -0
  224. package/dist/components/ui/bubble.d.ts +19 -0
  225. package/dist/components/ui/bubble.d.ts.map +1 -0
  226. package/dist/components/ui/bubble.js +75 -0
  227. package/dist/components/ui/bubble.js.map +1 -0
  228. package/dist/components/ui/button-group.d.ts +14 -0
  229. package/dist/components/ui/button-group.d.ts.map +1 -0
  230. package/dist/components/ui/button-group.js +44 -0
  231. package/dist/components/ui/button-group.js.map +1 -0
  232. package/dist/components/ui/button.d.ts +11 -0
  233. package/dist/components/ui/button.d.ts.map +1 -0
  234. package/dist/components/ui/button.js +47 -0
  235. package/dist/components/ui/button.js.map +1 -0
  236. package/dist/components/ui/calendar.d.ts +13 -0
  237. package/dist/components/ui/calendar.d.ts.map +1 -0
  238. package/dist/components/ui/calendar.js +110 -0
  239. package/dist/components/ui/calendar.js.map +1 -0
  240. package/dist/components/ui/card.d.ts +14 -0
  241. package/dist/components/ui/card.d.ts.map +1 -0
  242. package/dist/components/ui/card.js +58 -0
  243. package/dist/components/ui/card.js.map +1 -0
  244. package/dist/components/ui/carousel.d.ts +31 -0
  245. package/dist/components/ui/carousel.d.ts.map +1 -0
  246. package/dist/components/ui/carousel.js +135 -0
  247. package/dist/components/ui/carousel.js.map +1 -0
  248. package/dist/components/ui/chart.d.ts +47 -0
  249. package/dist/components/ui/chart.d.ts.map +1 -0
  250. package/dist/components/ui/chart.js +151 -0
  251. package/dist/components/ui/chart.js.map +1 -0
  252. package/dist/components/ui/checkbox.d.ts +6 -0
  253. package/dist/components/ui/checkbox.d.ts.map +1 -0
  254. package/dist/components/ui/checkbox.js +22 -0
  255. package/dist/components/ui/checkbox.js.map +1 -0
  256. package/dist/components/ui/collapsible.d.ts +8 -0
  257. package/dist/components/ui/collapsible.d.ts.map +1 -0
  258. package/dist/components/ui/collapsible.js +26 -0
  259. package/dist/components/ui/collapsible.js.map +1 -0
  260. package/dist/components/ui/combobox.d.ts +27 -0
  261. package/dist/components/ui/combobox.d.ts.map +1 -0
  262. package/dist/components/ui/combobox.js +164 -0
  263. package/dist/components/ui/combobox.js.map +1 -0
  264. package/dist/components/ui/command.d.ts +22 -0
  265. package/dist/components/ui/command.d.ts.map +1 -0
  266. package/dist/components/ui/command.js +89 -0
  267. package/dist/components/ui/command.js.map +1 -0
  268. package/dist/components/ui/context-menu.d.ts +32 -0
  269. package/dist/components/ui/context-menu.d.ts.map +1 -0
  270. package/dist/components/ui/context-menu.js +134 -0
  271. package/dist/components/ui/context-menu.js.map +1 -0
  272. package/dist/components/ui/dialog.d.ts +20 -0
  273. package/dist/components/ui/dialog.d.ts.map +1 -0
  274. package/dist/components/ui/dialog.js +93 -0
  275. package/dist/components/ui/dialog.js.map +1 -0
  276. package/dist/components/ui/direction.d.ts +2 -0
  277. package/dist/components/ui/direction.js +3 -0
  278. package/dist/components/ui/drawer.d.ts +19 -0
  279. package/dist/components/ui/drawer.d.ts.map +1 -0
  280. package/dist/components/ui/drawer.js +125 -0
  281. package/dist/components/ui/drawer.js.map +1 -0
  282. package/dist/components/ui/dropdown-menu.d.ts +32 -0
  283. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  284. package/dist/components/ui/dropdown-menu.js +138 -0
  285. package/dist/components/ui/dropdown-menu.js.map +1 -0
  286. package/dist/components/ui/empty.d.ts +15 -0
  287. package/dist/components/ui/empty.d.ts.map +1 -0
  288. package/dist/components/ui/empty.js +62 -0
  289. package/dist/components/ui/empty.js.map +1 -0
  290. package/dist/components/ui/field.d.ts +28 -0
  291. package/dist/components/ui/field.d.ts.map +1 -0
  292. package/dist/components/ui/field.js +112 -0
  293. package/dist/components/ui/field.js.map +1 -0
  294. package/dist/components/ui/hover-card.d.ts +8 -0
  295. package/dist/components/ui/hover-card.d.ts.map +1 -0
  296. package/dist/components/ui/hover-card.js +38 -0
  297. package/dist/components/ui/hover-card.js.map +1 -0
  298. package/dist/components/ui/input-group.d.ts +21 -0
  299. package/dist/components/ui/input-group.d.ts.map +1 -0
  300. package/dist/components/ui/input-group.js +80 -0
  301. package/dist/components/ui/input-group.js.map +1 -0
  302. package/dist/components/ui/input-otp.d.ts +14 -0
  303. package/dist/components/ui/input-otp.d.ts.map +1 -0
  304. package/dist/components/ui/input-otp.js +49 -0
  305. package/dist/components/ui/input-otp.js.map +1 -0
  306. package/dist/components/ui/input.d.ts +6 -0
  307. package/dist/components/ui/input.d.ts.map +1 -0
  308. package/dist/components/ui/input.js +17 -0
  309. package/dist/components/ui/input.js.map +1 -0
  310. package/dist/components/ui/item.d.ts +25 -0
  311. package/dist/components/ui/item.d.ts.map +1 -0
  312. package/dist/components/ui/item.js +123 -0
  313. package/dist/components/ui/item.js.map +1 -0
  314. package/dist/components/ui/kbd.d.ts +7 -0
  315. package/dist/components/ui/kbd.d.ts.map +1 -0
  316. package/dist/components/ui/kbd.js +22 -0
  317. package/dist/components/ui/kbd.js.map +1 -0
  318. package/dist/components/ui/label.d.ts +6 -0
  319. package/dist/components/ui/label.d.ts.map +1 -0
  320. package/dist/components/ui/label.js +15 -0
  321. package/dist/components/ui/label.js.map +1 -0
  322. package/dist/components/ui/marker.d.ts +13 -0
  323. package/dist/components/ui/marker.d.ts.map +1 -0
  324. package/dist/components/ui/marker.js +45 -0
  325. package/dist/components/ui/marker.js.map +1 -0
  326. package/dist/components/ui/menubar.d.ts +32 -0
  327. package/dist/components/ui/menubar.d.ts.map +1 -0
  328. package/dist/components/ui/menubar.js +137 -0
  329. package/dist/components/ui/menubar.js.map +1 -0
  330. package/dist/components/ui/message-scroller.d.ts +13 -0
  331. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  332. package/dist/components/ui/message-scroller.js +62 -0
  333. package/dist/components/ui/message-scroller.js.map +1 -0
  334. package/dist/components/ui/message.d.ts +13 -0
  335. package/dist/components/ui/message.d.ts.map +1 -0
  336. package/dist/components/ui/message.js +51 -0
  337. package/dist/components/ui/message.js.map +1 -0
  338. package/dist/components/ui/native-select.d.ts +11 -0
  339. package/dist/components/ui/native-select.d.ts.map +1 -0
  340. package/dist/components/ui/native-select.js +40 -0
  341. package/dist/components/ui/native-select.js.map +1 -0
  342. package/dist/components/ui/navigation-menu.d.ts +15 -0
  343. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  344. package/dist/components/ui/navigation-menu.js +85 -0
  345. package/dist/components/ui/navigation-menu.js.map +1 -0
  346. package/dist/components/ui/pagination.d.ts +20 -0
  347. package/dist/components/ui/pagination.d.ts.map +1 -0
  348. package/dist/components/ui/pagination.js +81 -0
  349. package/dist/components/ui/pagination.js.map +1 -0
  350. package/dist/components/ui/popover.d.ts +12 -0
  351. package/dist/components/ui/popover.d.ts.map +1 -0
  352. package/dist/components/ui/popover.js +56 -0
  353. package/dist/components/ui/popover.js.map +1 -0
  354. package/dist/components/ui/progress.d.ts +10 -0
  355. package/dist/components/ui/progress.d.ts.map +1 -0
  356. package/dist/components/ui/progress.js +46 -0
  357. package/dist/components/ui/progress.js.map +1 -0
  358. package/dist/components/ui/radio-group.d.ts +8 -0
  359. package/dist/components/ui/radio-group.d.ts.map +1 -0
  360. package/dist/components/ui/radio-group.js +29 -0
  361. package/dist/components/ui/radio-group.js.map +1 -0
  362. package/dist/components/ui/resizable.d.ts +10 -0
  363. package/dist/components/ui/resizable.d.ts.map +1 -0
  364. package/dist/components/ui/resizable.js +30 -0
  365. package/dist/components/ui/resizable.js.map +1 -0
  366. package/dist/components/ui/scroll-area.d.ts +7 -0
  367. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  368. package/dist/components/ui/scroll-area.js +38 -0
  369. package/dist/components/ui/scroll-area.js.map +1 -0
  370. package/dist/components/ui/select.d.ts +18 -0
  371. package/dist/components/ui/select.d.ts.map +1 -0
  372. package/dist/components/ui/select.js +99 -0
  373. package/dist/components/ui/select.js.map +1 -0
  374. package/dist/components/ui/separator.d.ts +6 -0
  375. package/dist/components/ui/separator.d.ts.map +1 -0
  376. package/dist/components/ui/separator.js +17 -0
  377. package/dist/components/ui/separator.js.map +1 -0
  378. package/dist/components/ui/sheet.d.ts +17 -0
  379. package/dist/components/ui/sheet.d.ts.map +1 -0
  380. package/dist/components/ui/sheet.js +90 -0
  381. package/dist/components/ui/sheet.js.map +1 -0
  382. package/dist/components/ui/sidebar.d.ts +66 -0
  383. package/dist/components/ui/sidebar.d.ts.map +1 -0
  384. package/dist/components/ui/sidebar.js +383 -0
  385. package/dist/components/ui/sidebar.js.map +1 -0
  386. package/dist/components/ui/skeleton.d.ts +6 -0
  387. package/dist/components/ui/skeleton.d.ts.map +1 -0
  388. package/dist/components/ui/skeleton.js +15 -0
  389. package/dist/components/ui/skeleton.js.map +1 -0
  390. package/dist/components/ui/slider.d.ts +6 -0
  391. package/dist/components/ui/slider.d.ts.map +1 -0
  392. package/dist/components/ui/slider.js +36 -0
  393. package/dist/components/ui/slider.js.map +1 -0
  394. package/dist/components/ui/sonner.d.ts +7 -0
  395. package/dist/components/ui/sonner.d.ts.map +1 -0
  396. package/dist/components/ui/sonner.js +32 -0
  397. package/dist/components/ui/sonner.js.map +1 -0
  398. package/dist/components/ui/spinner.d.ts +6 -0
  399. package/dist/components/ui/spinner.d.ts.map +1 -0
  400. package/dist/components/ui/spinner.js +18 -0
  401. package/dist/components/ui/spinner.js.map +1 -0
  402. package/dist/components/ui/switch.d.ts +8 -0
  403. package/dist/components/ui/switch.d.ts.map +1 -0
  404. package/dist/components/ui/switch.js +21 -0
  405. package/dist/components/ui/switch.js.map +1 -0
  406. package/dist/components/ui/table.d.ts +13 -0
  407. package/dist/components/ui/table.d.ts.map +1 -0
  408. package/dist/components/ui/table.js +68 -0
  409. package/dist/components/ui/table.js.map +1 -0
  410. package/dist/components/ui/tabs.d.ts +13 -0
  411. package/dist/components/ui/tabs.d.ts.map +1 -0
  412. package/dist/components/ui/tabs.js +47 -0
  413. package/dist/components/ui/tabs.js.map +1 -0
  414. package/dist/components/ui/textarea.d.ts +6 -0
  415. package/dist/components/ui/textarea.d.ts.map +1 -0
  416. package/dist/components/ui/textarea.js +15 -0
  417. package/dist/components/ui/textarea.js.map +1 -0
  418. package/dist/components/ui/toggle-group.d.ts +14 -0
  419. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  420. package/dist/components/ui/toggle-group.js +54 -0
  421. package/dist/components/ui/toggle-group.js.map +1 -0
  422. package/dist/components/ui/toggle.d.ts +11 -0
  423. package/dist/components/ui/toggle.d.ts.map +1 -0
  424. package/dist/components/ui/toggle.js +38 -0
  425. package/dist/components/ui/toggle.js.map +1 -0
  426. package/dist/components/ui/tooltip.d.ts +9 -0
  427. package/dist/components/ui/tooltip.d.ts.map +1 -0
  428. package/dist/components/ui/tooltip.js +43 -0
  429. package/dist/components/ui/tooltip.js.map +1 -0
  430. package/dist/hooks/use-body-classes.d.ts +27 -0
  431. package/dist/hooks/use-body-classes.d.ts.map +1 -0
  432. package/dist/hooks/use-body-classes.js +52 -0
  433. package/dist/hooks/use-body-classes.js.map +1 -0
  434. package/dist/hooks/use-copy-to-clipboard.d.ts +43 -0
  435. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  436. package/dist/hooks/use-copy-to-clipboard.js +69 -0
  437. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  438. package/dist/hooks/use-file-upload.d.ts +49 -0
  439. package/dist/hooks/use-file-upload.d.ts.map +1 -0
  440. package/dist/hooks/use-file-upload.js +227 -0
  441. package/dist/hooks/use-file-upload.js.map +1 -0
  442. package/dist/hooks/use-hydrated.d.ts +37 -0
  443. package/dist/hooks/use-hydrated.d.ts.map +1 -0
  444. package/dist/hooks/use-hydrated.js +50 -0
  445. package/dist/hooks/use-hydrated.js.map +1 -0
  446. package/dist/hooks/use-intersection-observer.d.ts +55 -0
  447. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  448. package/dist/hooks/use-intersection-observer.js +144 -0
  449. package/dist/hooks/use-intersection-observer.js.map +1 -0
  450. package/dist/hooks/use-is-mac.d.ts +28 -0
  451. package/dist/hooks/use-is-mac.d.ts.map +1 -0
  452. package/dist/hooks/use-is-mac.js +38 -0
  453. package/dist/hooks/use-is-mac.js.map +1 -0
  454. package/dist/hooks/use-media-query.d.ts +44 -0
  455. package/dist/hooks/use-media-query.d.ts.map +1 -0
  456. package/dist/hooks/use-media-query.js +58 -0
  457. package/dist/hooks/use-media-query.js.map +1 -0
  458. package/dist/hooks/use-meta-color.d.ts +78 -0
  459. package/dist/hooks/use-meta-color.d.ts.map +1 -0
  460. package/dist/hooks/use-meta-color.js +138 -0
  461. package/dist/hooks/use-meta-color.js.map +1 -0
  462. package/dist/hooks/use-mobile.d.ts +5 -0
  463. package/dist/hooks/use-mobile.d.ts.map +1 -0
  464. package/dist/hooks/use-mobile.js +21 -0
  465. package/dist/hooks/use-mobile.js.map +1 -0
  466. package/dist/hooks/use-mutation-observer.d.ts +61 -0
  467. package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
  468. package/dist/hooks/use-mutation-observer.js +96 -0
  469. package/dist/hooks/use-mutation-observer.js.map +1 -0
  470. package/dist/hooks/use-scroll-position.d.ts +76 -0
  471. package/dist/hooks/use-scroll-position.d.ts.map +1 -0
  472. package/dist/hooks/use-scroll-position.js +97 -0
  473. package/dist/hooks/use-scroll-position.js.map +1 -0
  474. package/dist/hooks/use-slider-input.d.ts +94 -0
  475. package/dist/hooks/use-slider-input.d.ts.map +1 -0
  476. package/dist/hooks/use-slider-input.js +116 -0
  477. package/dist/hooks/use-slider-input.js.map +1 -0
  478. package/dist/hooks/use-viewport.d.ts +72 -0
  479. package/dist/hooks/use-viewport.d.ts.map +1 -0
  480. package/dist/hooks/use-viewport.js +91 -0
  481. package/dist/hooks/use-viewport.js.map +1 -0
  482. package/dist/style.css +0 -247
  483. package/dist/theme.css +244 -0
  484. package/dist/theme.css.d.ts +3 -0
  485. package/package.json +101 -40
  486. package/dist/hooks.d.ts +0 -957
  487. package/dist/hooks.d.ts.map +0 -1
  488. package/dist/hooks.js +0 -1391
  489. package/dist/hooks.js.map +0 -1
  490. package/dist/index.d.ts +0 -1993
  491. package/dist/index.d.ts.map +0 -1
  492. package/dist/index.js +0 -10647
  493. package/dist/index.js.map +0 -1
  494. package/dist/source.css +0 -1
  495. package/dist/source.css.d.ts +0 -3
  496. package/dist/use-is-mobile-Dln4-L1O.js +0 -210
  497. package/dist/use-is-mobile-Dln4-L1O.js.map +0 -1
@@ -0,0 +1,354 @@
1
+ "use client";
2
+ import { expandRecurrence } from "./gantt-recurrence.js";
3
+ import { addDays, addMonths, addWeeks, addYears, differenceInMinutes, format, startOfDay, startOfMonth, startOfQuarter, startOfWeek, startOfYear } from "date-fns";
4
+ import { TZDate } from "@date-fns/tz";
5
+ //#region src/components/reui/gantt/gantt-lib.tsx
6
+ /**
7
+ * Packing-effective minimum in minutes so tiny events do not stack invisibly.
8
+ * It is a packing FOOTPRINT, not a render size: two schedules less than this
9
+ * apart are treated as concurrent and split into separate lanes even though
10
+ * their real ranges do not touch.
11
+ */
12
+ const MIN_PACK_SLOT = 30;
13
+ /** The instant re-expressed in the display time zone (TZDate extends Date). */
14
+ function toZoned(date, timeZone) {
15
+ return new TZDate(date.getTime(), timeZone);
16
+ }
17
+ /** Zoned midnight of the day containing the instant. */
18
+ function zonedStartOfDay(date, timeZone) {
19
+ return startOfDay(toZoned(date, timeZone));
20
+ }
21
+ /** Stable per-day key in the display time zone. */
22
+ function getDayKey(date, timeZone) {
23
+ return format(toZoned(date, timeZone), "yyyy-MM-dd");
24
+ }
25
+ /** Day length in minutes; 1380/1500 on DST transition days - never assume 1440. */
26
+ function getDayTotalMinutes(dayStart, timeZone) {
27
+ return differenceInMinutes(zonedStartOfDay(addDays(toZoned(dayStart, timeZone), 1), timeZone), dayStart);
28
+ }
29
+ function snapMinutes(minutes, snap) {
30
+ return Math.round(minutes / snap) * snap;
31
+ }
32
+ /** Axis range for the anchor date at the given scale. */
33
+ function getGanttDateRange(scale, date, opts) {
34
+ const { timeZone, weekStartsOn } = opts;
35
+ const zoned = toZoned(date, timeZone);
36
+ if (scale === "week") {
37
+ const start = startOfWeek(zoned, { weekStartsOn });
38
+ const range = {
39
+ start,
40
+ end: addWeeks(start, 1)
41
+ };
42
+ return {
43
+ activeRange: range,
44
+ visibleRange: range
45
+ };
46
+ }
47
+ if (scale === "month") {
48
+ const range = {
49
+ start: startOfMonth(zoned),
50
+ end: startOfMonth(addMonths(zoned, 1))
51
+ };
52
+ return {
53
+ activeRange: range,
54
+ visibleRange: range
55
+ };
56
+ }
57
+ if (scale === "quarter") {
58
+ const quarterStart = startOfQuarter(zoned);
59
+ const quarterEnd = startOfQuarter(addMonths(zoned, 3));
60
+ const start = startOfWeek(quarterStart, { weekStartsOn });
61
+ let end = startOfWeek(quarterEnd, { weekStartsOn });
62
+ if (end < quarterEnd) end = addWeeks(end, 1);
63
+ return {
64
+ activeRange: {
65
+ start: quarterStart,
66
+ end: quarterEnd
67
+ },
68
+ visibleRange: {
69
+ start,
70
+ end
71
+ }
72
+ };
73
+ }
74
+ if (scale === "year") {
75
+ const range = {
76
+ start: startOfYear(zoned),
77
+ end: startOfYear(addYears(zoned, 1))
78
+ };
79
+ return {
80
+ activeRange: range,
81
+ visibleRange: range
82
+ };
83
+ }
84
+ const start = startOfDay(zoned);
85
+ const range = {
86
+ start,
87
+ end: addDays(start, 1)
88
+ };
89
+ return {
90
+ activeRange: range,
91
+ visibleRange: range
92
+ };
93
+ }
94
+ /** The anchor date stepped one period forward or backward for the scale. */
95
+ function stepGanttDate(scale, date, direction, opts) {
96
+ const zoned = toZoned(date, opts.timeZone);
97
+ if (scale === "week") return addWeeks(zoned, direction);
98
+ if (scale === "month") return addMonths(zoned, direction);
99
+ if (scale === "quarter") return addMonths(zoned, direction * 3);
100
+ if (scale === "year") return addYears(zoned, direction);
101
+ return addDays(zoned, direction);
102
+ }
103
+ function rangesIntersect(a, b) {
104
+ return a.start < b.end && a.end > b.start;
105
+ }
106
+ function eventsOverlap(a, b) {
107
+ return a.start < b.end && a.end > b.start;
108
+ }
109
+ function spansMultipleDays(occ) {
110
+ return occ.end.getTime() - occ.start.getTime() > 1440 * 60 * 1e3;
111
+ }
112
+ /**
113
+ * Identity of a schedule ACROSS time edits. `occurrence.key` embeds the start
114
+ * instant, so it changes the moment a schedule is moved or start-resized -
115
+ * useless as lane memory. This key survives the edit: the event id plus, for a
116
+ * recurring series, the occurrence's position in it.
117
+ */
118
+ function getLaneKey(occurrence) {
119
+ return `${occurrence.eventId}::${occurrence.recurrenceIndex ?? 0}`;
120
+ }
121
+ /**
122
+ * Overlap packing for one row's timed segments.
123
+ * Mutates column/columnCount/columnSpan on the segments, in place.
124
+ * z resolution happens at render: event.zIndex verbatim, else 10 + column.
125
+ */
126
+ function packTimedSegments(segments, options = {}) {
127
+ if (segments.length === 0) return;
128
+ if (options.mode === "single") {
129
+ for (const seg of segments) {
130
+ seg.column = 0;
131
+ seg.columnCount = 1;
132
+ seg.columnSpan = 1;
133
+ }
134
+ return;
135
+ }
136
+ const preferredLanes = options.preferredLanes;
137
+ const items = segments.map((seg) => {
138
+ const startMin = seg.startMin ?? 0;
139
+ const endMin = seg.endMin ?? startMin;
140
+ return {
141
+ seg,
142
+ startMin,
143
+ effEnd: Math.max(endMin, startMin + 30),
144
+ lane: -1
145
+ };
146
+ }).sort((a, b) => a.startMin - b.startMin || b.effEnd - b.startMin - (a.effEnd - a.startMin) || a.seg.occurrence.key.localeCompare(b.seg.occurrence.key));
147
+ const clusters = [];
148
+ let current = [];
149
+ let clusterEnd = -Infinity;
150
+ for (const item of items) {
151
+ if (item.startMin >= clusterEnd) {
152
+ current = [];
153
+ clusters.push(current);
154
+ clusterEnd = -Infinity;
155
+ }
156
+ current.push(item);
157
+ clusterEnd = Math.max(clusterEnd, item.effEnd);
158
+ }
159
+ for (const cluster of clusters) {
160
+ const laneIntervals = [];
161
+ const isFree = (lane, item) => !(laneIntervals[lane] ?? []).some((iv) => iv.from < item.effEnd && iv.to > item.startMin);
162
+ const claim = (lane, item) => {
163
+ while (laneIntervals.length <= lane) laneIntervals.push([]);
164
+ const interval = {
165
+ from: item.startMin,
166
+ to: item.effEnd
167
+ };
168
+ laneIntervals[lane].push(interval);
169
+ item.lane = lane;
170
+ item.interval = interval;
171
+ };
172
+ const release = (item) => {
173
+ const occupants = laneIntervals[item.lane] ?? [];
174
+ const at = occupants.indexOf(item.interval);
175
+ if (at >= 0) occupants.splice(at, 1);
176
+ };
177
+ const pending = [];
178
+ for (const item of cluster) {
179
+ const memo = preferredLanes?.get(getLaneKey(item.seg.occurrence));
180
+ if (memo !== void 0 && memo.startMs === item.seg.occurrence.start.getTime() && memo.endMs === item.seg.occurrence.end.getTime() && memo.lane >= 0 && isFree(memo.lane, item)) claim(memo.lane, item);
181
+ else pending.push(item);
182
+ }
183
+ for (const item of pending) {
184
+ let lane = 0;
185
+ while (!isFree(lane, item)) lane++;
186
+ claim(lane, item);
187
+ }
188
+ const byLane = [...cluster].sort((a, b) => a.lane - b.lane || a.startMin - b.startMin);
189
+ for (const item of byLane) {
190
+ if (item.lane === 0) continue;
191
+ let lane = 0;
192
+ while (lane < item.lane && !isFree(lane, item)) lane++;
193
+ if (lane < item.lane) {
194
+ release(item);
195
+ claim(lane, item);
196
+ }
197
+ }
198
+ }
199
+ const used = [...new Set(items.map((item) => item.lane))].sort((a, b) => a - b);
200
+ const compacted = new Map(used.map((lane, index) => [lane, index]));
201
+ const columnCount = used.length;
202
+ for (const item of items) {
203
+ item.lane = compacted.get(item.lane) ?? 0;
204
+ item.seg.column = item.lane;
205
+ item.seg.columnCount = columnCount;
206
+ }
207
+ for (const cluster of clusters) for (const item of cluster) {
208
+ let span = 1;
209
+ while (item.lane + span < columnCount) {
210
+ if (cluster.some((other) => other !== item && other.lane === item.lane + span && other.startMin < item.effEnd && other.effEnd > item.startMin)) break;
211
+ span++;
212
+ }
213
+ item.seg.columnSpan = span;
214
+ }
215
+ }
216
+ function defaultEventOrder(a, b) {
217
+ return a.start.getTime() - b.start.getTime() || b.end.getTime() - b.start.getTime() - (a.end.getTime() - a.start.getTime()) || a.key.localeCompare(b.key);
218
+ }
219
+ function buildEventIndex(events, visibleRange, opts) {
220
+ const { timeZone } = opts;
221
+ const order = opts.eventOrder ?? defaultEventOrder;
222
+ const overrideTimes = /* @__PURE__ */ new Map();
223
+ for (const event of events) {
224
+ if (!event.recurringEventId || !event.originalStart) continue;
225
+ let times = overrideTimes.get(event.recurringEventId);
226
+ if (!times) {
227
+ times = /* @__PURE__ */ new Set();
228
+ overrideTimes.set(event.recurringEventId, times);
229
+ }
230
+ times.add(event.originalStart.getTime());
231
+ }
232
+ const occurrences = [];
233
+ for (const event of events) {
234
+ const custom = opts.getOccurrences?.(event, visibleRange, { timeZone });
235
+ if (custom) {
236
+ custom.forEach((occ, i) => {
237
+ if (!rangesIntersect({
238
+ start: occ.start,
239
+ end: occ.end
240
+ }, visibleRange)) return;
241
+ occurrences.push({
242
+ key: `${event.id}::${occ.start.toISOString()}`,
243
+ eventId: event.id,
244
+ event,
245
+ start: occ.start,
246
+ end: occ.end,
247
+ allDay: event.allDay ?? false,
248
+ isRecurring: true,
249
+ recurrenceIndex: i
250
+ });
251
+ });
252
+ continue;
253
+ }
254
+ const replaced = overrideTimes.get(event.id);
255
+ const expanded = expandRecurrence(event, visibleRange, { timeZone });
256
+ occurrences.push(...replaced ? expanded.filter((occ) => !replaced.has(occ.start.getTime())) : expanded);
257
+ }
258
+ occurrences.sort(order);
259
+ return { occurrences };
260
+ }
261
+ /** Cache key for index memoization; cheap string compare. */
262
+ function getRangeKey(range) {
263
+ return `${range.start.getTime()}-${range.end.getTime()}`;
264
+ }
265
+ /** Depth-first flatten of the resource tree (parents included). */
266
+ function flattenResources(resources, depth = 0) {
267
+ const rows = [];
268
+ for (const resource of resources) {
269
+ rows.push({
270
+ resource,
271
+ depth
272
+ });
273
+ if (resource.children?.length) rows.push(...flattenResources(resource.children, depth + 1));
274
+ }
275
+ return rows;
276
+ }
277
+ /** Depth-first lookup of one node in the tree. */
278
+ function findResource(resources, id) {
279
+ for (const resource of resources) {
280
+ if (resource.id === id) return resource;
281
+ const found = resource.children?.length ? findResource(resource.children, id) : null;
282
+ if (found) return found;
283
+ }
284
+ return null;
285
+ }
286
+ /**
287
+ * Pure tree move: removes `resourceId` from wherever it sits and reinserts it
288
+ * under `parentId` (null = root) at `index`. Returns a new tree; the original
289
+ * is untouched. Returns null for impossible moves (unknown ids, or dropping a
290
+ * node into its own subtree).
291
+ */
292
+ function reorderResources(resources, resourceId, parentId, index) {
293
+ let moved = null;
294
+ const strip = (nodes) => nodes.flatMap((node) => {
295
+ if (node.id === resourceId) {
296
+ moved = node;
297
+ return [];
298
+ }
299
+ if (!node.children?.length) return [node];
300
+ return [{
301
+ ...node,
302
+ children: strip(node.children)
303
+ }];
304
+ });
305
+ const stripped = strip(resources);
306
+ if (!moved) return null;
307
+ const contains = (node, id) => node.id === id || !!node.children?.some((child) => contains(child, id));
308
+ if (parentId !== null && contains(moved, parentId)) return null;
309
+ const insert = (nodes) => {
310
+ if (parentId === null) {
311
+ const next = [...nodes];
312
+ next.splice(Math.min(Math.max(index, 0), next.length), 0, moved);
313
+ return next;
314
+ }
315
+ return nodes.map((node) => {
316
+ if (node.id === parentId) {
317
+ const children = [...node.children ?? []];
318
+ children.splice(Math.min(Math.max(index, 0), children.length), 0, moved);
319
+ return {
320
+ ...node,
321
+ children
322
+ };
323
+ }
324
+ if (!node.children?.length) return node;
325
+ return {
326
+ ...node,
327
+ children: insert(node.children)
328
+ };
329
+ });
330
+ };
331
+ const next = insert(stripped);
332
+ if (parentId !== null) {
333
+ if (!flattenResources(next).some(({ resource }) => resource.id === resourceId)) return null;
334
+ }
335
+ return next;
336
+ }
337
+ const DEFAULT_WEEKEND_DAYS = [0, 6];
338
+ /** Resolves whether a day is an off day (non-working) in the display zone. */
339
+ function resolveOffDay(day, timeZone, config) {
340
+ if (!config) return false;
341
+ const resolved = config === true ? {} : config;
342
+ const weekendDays = resolved.weekendDays ?? DEFAULT_WEEKEND_DAYS;
343
+ const zoned = toZoned(day, timeZone);
344
+ if (weekendDays.includes(zoned.getDay())) return true;
345
+ if (resolved.dates?.length) {
346
+ const key = getDayKey(day, timeZone);
347
+ if (resolved.dates.some((date) => getDayKey(date, timeZone) === key)) return true;
348
+ }
349
+ return resolved.isOffDay?.(day) ?? false;
350
+ }
351
+ //#endregion
352
+ export { MIN_PACK_SLOT, buildEventIndex, defaultEventOrder, eventsOverlap, findResource, flattenResources, getDayKey, getDayTotalMinutes, getGanttDateRange, getLaneKey, getRangeKey, packTimedSegments, rangesIntersect, reorderResources, resolveOffDay, snapMinutes, spansMultipleDays, stepGanttDate, toZoned, zonedStartOfDay };
353
+
354
+ //# sourceMappingURL=gantt-lib.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gantt-lib.js","names":[],"sources":["../../../../src/components/reui/gantt/gantt-lib.tsx"],"sourcesContent":["\"use client\";\n\nimport { TZDate } from \"@date-fns/tz\";\nimport {\n addDays,\n addMonths,\n addWeeks,\n addYears,\n differenceInMinutes,\n format,\n startOfDay,\n startOfMonth,\n startOfQuarter,\n startOfWeek,\n startOfYear,\n} from \"date-fns\";\n\nimport { expandRecurrence } from \"./gantt-recurrence\";\nimport type {\n GanttDateRange,\n GanttEvent,\n GanttOccurrence,\n GanttOffDaysConfig,\n GanttResource,\n GanttScale,\n GanttSegment,\n} from \"./gantt-types\";\n\ntype WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n/**\n * Packing-effective minimum in minutes so tiny events do not stack invisibly.\n * It is a packing FOOTPRINT, not a render size: two schedules less than this\n * apart are treated as concurrent and split into separate lanes even though\n * their real ranges do not touch.\n */\nconst MIN_PACK_SLOT = 30;\n\n/** The instant re-expressed in the display time zone (TZDate extends Date). */\nfunction toZoned(date: Date, timeZone: string): TZDate {\n return new TZDate(date.getTime(), timeZone);\n}\n\n/** Zoned midnight of the day containing the instant. */\nfunction zonedStartOfDay(date: Date, timeZone: string): TZDate {\n return startOfDay(toZoned(date, timeZone));\n}\n\n/** Stable per-day key in the display time zone. */\nfunction getDayKey(date: Date, timeZone: string): string {\n return format(toZoned(date, timeZone), \"yyyy-MM-dd\");\n}\n\n/** Day length in minutes; 1380/1500 on DST transition days - never assume 1440. */\nfunction getDayTotalMinutes(dayStart: Date, timeZone: string): number {\n const next = zonedStartOfDay(addDays(toZoned(dayStart, timeZone), 1), timeZone);\n return differenceInMinutes(next, dayStart);\n}\n\nfunction snapMinutes(minutes: number, snap: number): number {\n return Math.round(minutes / snap) * snap;\n}\n\ninterface ViewRangeOptions {\n timeZone: string;\n weekStartsOn: WeekStartsOn;\n}\n\ninterface ViewDateRanges {\n visibleRange: GanttDateRange;\n activeRange: GanttDateRange;\n}\n\n/** Axis range for the anchor date at the given scale. */\nfunction getGanttDateRange(scale: GanttScale, date: Date, opts: ViewRangeOptions): ViewDateRanges {\n const { timeZone, weekStartsOn } = opts;\n const zoned = toZoned(date, timeZone);\n\n if (scale === \"week\") {\n const start = startOfWeek(zoned, { weekStartsOn });\n const range = { start, end: addWeeks(start, 1) };\n return { activeRange: range, visibleRange: range };\n }\n if (scale === \"month\") {\n // exact month: no outside days on the horizontal axis\n const start = startOfMonth(zoned);\n const range = { start, end: startOfMonth(addMonths(zoned, 1)) };\n return { activeRange: range, visibleRange: range };\n }\n if (scale === \"quarter\") {\n // week-aligned so the axis partitions into uniform week units\n const quarterStart = startOfQuarter(zoned);\n const quarterEnd = startOfQuarter(addMonths(zoned, 3));\n const start = startOfWeek(quarterStart, { weekStartsOn });\n let end = startOfWeek(quarterEnd, { weekStartsOn });\n if (end < quarterEnd) end = addWeeks(end, 1);\n return {\n activeRange: { start: quarterStart, end: quarterEnd },\n visibleRange: { start, end },\n };\n }\n if (scale === \"year\") {\n const start = startOfYear(zoned);\n const range = { start, end: startOfYear(addYears(zoned, 1)) };\n return { activeRange: range, visibleRange: range };\n }\n const start = startOfDay(zoned);\n const range = { start, end: addDays(start, 1) };\n return { activeRange: range, visibleRange: range };\n}\n\n/** The anchor date stepped one period forward or backward for the scale. */\nfunction stepGanttDate(\n scale: GanttScale,\n date: Date,\n direction: 1 | -1,\n opts: Pick<ViewRangeOptions, \"timeZone\">,\n): Date {\n const zoned = toZoned(date, opts.timeZone);\n if (scale === \"week\") return addWeeks(zoned, direction);\n if (scale === \"month\") return addMonths(zoned, direction);\n if (scale === \"quarter\") return addMonths(zoned, direction * 3);\n if (scale === \"year\") return addYears(zoned, direction);\n return addDays(zoned, direction);\n}\n\nfunction rangesIntersect(a: GanttDateRange, b: GanttDateRange): boolean {\n return a.start < b.end && a.end > b.start;\n}\n\nfunction eventsOverlap(a: { start: Date; end: Date }, b: { start: Date; end: Date }): boolean {\n return a.start < b.end && a.end > b.start;\n}\n\nfunction spansMultipleDays(occ: { start: Date; end: Date }): boolean {\n // An event ending exactly at the next midnight is still single-day\n // (exclusive end), so compare against a strictly-later instant.\n return occ.end.getTime() - occ.start.getTime() > 24 * 60 * 60 * 1000;\n}\n\n/**\n * Identity of a schedule ACROSS time edits. `occurrence.key` embeds the start\n * instant, so it changes the moment a schedule is moved or start-resized -\n * useless as lane memory. This key survives the edit: the event id plus, for a\n * recurring series, the occurrence's position in it.\n */\nfunction getLaneKey(occurrence: { eventId: string; recurrenceIndex?: number }): string {\n return `${occurrence.eventId}::${occurrence.recurrenceIndex ?? 0}`;\n}\n\n/**\n * What one schedule held on the previous layout pass. The TIMES are what make\n * this more than a lane number: they are how the packer tells the schedule the\n * user just edited apart from the ones that merely sat still.\n */\ninterface GanttLaneMemo {\n lane: number;\n startMs: number;\n endMs: number;\n}\n\ninterface PackOptions {\n /**\n * Where each schedule sat on the previous pass, by getLaneKey.\n *\n * A schedule whose times are UNCHANGED keeps its lane if that lane is still\n * free, so editing one schedule never re-indexes the ones around it. A\n * schedule whose times CHANGED - the one the user just dragged or resized -\n * deliberately forfeits its pin and re-seeks the lowest free lane. That is\n * what makes the arrangement live rather than frozen: a schedule dragged\n * onto its neighbours stacks DOWN into the first free lane, and one dragged\n * clear of them comes back UP inline. Only the edited schedule moves.\n */\n preferredLanes?: Map<string, GanttLaneMemo>;\n /** \"single\" collapses the row to one track; see GanttScheduleMode. */\n mode?: \"single\" | \"multiple\";\n}\n\n/**\n * Overlap packing for one row's timed segments.\n * Mutates column/columnCount/columnSpan on the segments, in place.\n * z resolution happens at render: event.zIndex verbatim, else 10 + column.\n */\nfunction packTimedSegments<TData>(\n segments: GanttSegment<TData>[],\n options: PackOptions = {},\n): void {\n if (segments.length === 0) return;\n\n if (options.mode === \"single\") {\n // one track: every schedule shares lane 0 and the row never grows\n for (const seg of segments) {\n seg.column = 0;\n seg.columnCount = 1;\n seg.columnSpan = 1;\n }\n return;\n }\n\n const preferredLanes = options.preferredLanes;\n\n type Working = {\n seg: GanttSegment<TData>;\n startMin: number;\n effEnd: number;\n lane: number;\n /** The occupancy entry this item added, so a settle can take it back. */\n interval?: { from: number; to: number };\n };\n\n const items: Working[] = segments\n .map((seg) => {\n const startMin = seg.startMin ?? 0;\n const endMin = seg.endMin ?? startMin;\n return {\n seg,\n startMin,\n effEnd: Math.max(endMin, startMin + MIN_PACK_SLOT),\n lane: -1,\n };\n })\n .sort(\n (a, b) =>\n a.startMin - b.startMin ||\n b.effEnd - b.startMin - (a.effEnd - a.startMin) ||\n a.seg.occurrence.key.localeCompare(b.seg.occurrence.key),\n );\n\n // Sweep into connected clusters\n const clusters: Working[][] = [];\n let current: Working[] = [];\n let clusterEnd = -Infinity;\n for (const item of items) {\n if (item.startMin >= clusterEnd) {\n current = [];\n clusters.push(current);\n clusterEnd = -Infinity;\n }\n current.push(item);\n clusterEnd = Math.max(clusterEnd, item.effEnd);\n }\n\n for (const cluster of clusters) {\n // Per-lane occupancy INTERVALS, not a single running end: pass 1 claims\n // remembered lanes out of time order, so a lane can be free before an\n // occupant and busy after it.\n const laneIntervals: Array<Array<{ from: number; to: number }>> = [];\n const isFree = (lane: number, item: Working) =>\n !(laneIntervals[lane] ?? []).some((iv) => iv.from < item.effEnd && iv.to > item.startMin);\n const claim = (lane: number, item: Working) => {\n while (laneIntervals.length <= lane) laneIntervals.push([]);\n const interval = { from: item.startMin, to: item.effEnd };\n laneIntervals[lane].push(interval);\n item.lane = lane;\n item.interval = interval;\n };\n const release = (item: Working) => {\n const occupants = laneIntervals[item.lane] ?? [];\n const at = occupants.indexOf(item.interval!);\n if (at >= 0) occupants.splice(at, 1);\n };\n\n // pass 1: schedules that did not move keep the lane they had. The one the\n // user just edited is NOT pinned - its times differ from the memo, so it\n // falls through to pass 2 and re-seeks a lane against its new span.\n const pending: Working[] = [];\n for (const item of cluster) {\n const memo = preferredLanes?.get(getLaneKey(item.seg.occurrence));\n const untouched =\n memo !== undefined &&\n memo.startMs === item.seg.occurrence.start.getTime() &&\n memo.endMs === item.seg.occurrence.end.getTime();\n if (untouched && memo.lane >= 0 && isFree(memo.lane, item)) {\n claim(memo.lane, item);\n } else {\n pending.push(item);\n }\n }\n // pass 2: the rest take the lowest free lane - overlapping goes DOWN into\n // the first lane with room, fitting comes back UP to lane 0\n for (const item of pending) {\n let lane = 0;\n while (!isFree(lane, item)) lane++;\n claim(lane, item);\n }\n\n // pass 3: nothing floats above an empty lane. A pin only survives while\n // something above it still needs the space - once the schedule that was\n // there moves away or is deleted, its neighbour settles down into the\n // gap. Without this a row keeps a permanently blank top lane and never\n // shrinks back. Settling in lane order, and only ever DOWNWARD into space\n // that is genuinely free, means two schedules can never trade places -\n // so an edit still moves at most the schedule it touched.\n const byLane = [...cluster].sort((a, b) => a.lane - b.lane || a.startMin - b.startMin);\n for (const item of byLane) {\n if (item.lane === 0) continue;\n let lane = 0;\n while (lane < item.lane && !isFree(lane, item)) lane++;\n if (lane < item.lane) {\n release(item);\n claim(lane, item);\n }\n }\n }\n\n // Lane memory can leave holes (the schedule that held lane 0 was deleted or\n // moved away). Collapse the row's USED lanes onto 0..n-1: relative stacking\n // order survives, so nothing reshuffles, but the row cannot creep taller\n // than the lanes it actually needs.\n const used = [...new Set(items.map((item) => item.lane))].sort((a, b) => a - b);\n const compacted = new Map(used.map((lane, index) => [lane, index]));\n const columnCount = used.length;\n for (const item of items) {\n item.lane = compacted.get(item.lane) ?? 0;\n item.seg.column = item.lane;\n item.seg.columnCount = columnCount;\n }\n\n // Partial-overlap expansion: widen rightward into free lanes\n for (const cluster of clusters) {\n for (const item of cluster) {\n let span = 1;\n while (item.lane + span < columnCount) {\n const blocked = cluster.some(\n (other) =>\n other !== item &&\n other.lane === item.lane + span &&\n other.startMin < item.effEnd &&\n other.effEnd > item.startMin,\n );\n if (blocked) break;\n span++;\n }\n item.seg.columnSpan = span;\n }\n }\n}\n\nfunction defaultEventOrder(a: GanttOccurrence, b: GanttOccurrence): number {\n return (\n a.start.getTime() - b.start.getTime() ||\n b.end.getTime() - b.start.getTime() - (a.end.getTime() - a.start.getTime()) ||\n a.key.localeCompare(b.key)\n );\n}\n\ninterface BuildIndexOptions<TData = unknown> {\n timeZone: string;\n /** Escape hatch for exotic recurrence: return the expanded occurrences. */\n getOccurrences?: (\n event: GanttEvent<TData>,\n range: GanttDateRange,\n ctx: { timeZone: string },\n ) => Array<{ start: Date; end: Date }> | null | undefined;\n eventOrder?: (a: GanttOccurrence<TData>, b: GanttOccurrence<TData>) => number;\n}\n\ninterface GanttIndex<TData = unknown> {\n occurrences: GanttOccurrence<TData>[];\n}\n\nfunction buildEventIndex<TData>(\n events: GanttEvent<TData>[],\n visibleRange: GanttDateRange,\n opts: BuildIndexOptions<TData>,\n): GanttIndex<TData> {\n const { timeZone } = opts;\n const order = opts.eventOrder ?? defaultEventOrder;\n\n // RECURRENCE-ID override replacement: an event carrying recurringEventId +\n // originalStart is an edited single occurrence of that series. The parent's\n // expansion drops the replaced instant; the override renders as its own\n // occurrence through the normal path below.\n const overrideTimes = new Map<string, Set<number>>();\n for (const event of events) {\n if (!event.recurringEventId || !event.originalStart) continue;\n let times = overrideTimes.get(event.recurringEventId);\n if (!times) {\n times = new Set();\n overrideTimes.set(event.recurringEventId, times);\n }\n times.add(event.originalStart.getTime());\n }\n\n const occurrences: GanttOccurrence<TData>[] = [];\n for (const event of events) {\n const custom = opts.getOccurrences?.(event, visibleRange, { timeZone });\n if (custom) {\n custom.forEach((occ, i) => {\n if (!rangesIntersect({ start: occ.start, end: occ.end }, visibleRange)) return;\n occurrences.push({\n key: `${event.id}::${occ.start.toISOString()}`,\n eventId: event.id,\n event,\n start: occ.start,\n end: occ.end,\n allDay: event.allDay ?? false,\n isRecurring: true,\n recurrenceIndex: i,\n });\n });\n continue;\n }\n const replaced = overrideTimes.get(event.id);\n const expanded = expandRecurrence(event, visibleRange, { timeZone });\n occurrences.push(\n ...(replaced ? expanded.filter((occ) => !replaced.has(occ.start.getTime())) : expanded),\n );\n }\n occurrences.sort(order);\n return { occurrences };\n}\n\n/** Cache key for index memoization; cheap string compare. */\nfunction getRangeKey(range: GanttDateRange): string {\n return `${range.start.getTime()}-${range.end.getTime()}`;\n}\n\n/** Depth-first flatten of the resource tree (parents included). */\nfunction flattenResources(\n resources: GanttResource[],\n depth = 0,\n): Array<{ resource: GanttResource; depth: number }> {\n const rows: Array<{ resource: GanttResource; depth: number }> = [];\n for (const resource of resources) {\n rows.push({ resource, depth });\n if (resource.children?.length) {\n rows.push(...flattenResources(resource.children, depth + 1));\n }\n }\n return rows;\n}\n\n/** Depth-first lookup of one node in the tree. */\nfunction findResource(resources: GanttResource[], id: string): GanttResource | null {\n for (const resource of resources) {\n if (resource.id === id) return resource;\n const found = resource.children?.length ? findResource(resource.children, id) : null;\n if (found) return found;\n }\n return null;\n}\n\n/**\n * Pure tree move: removes `resourceId` from wherever it sits and reinserts it\n * under `parentId` (null = root) at `index`. Returns a new tree; the original\n * is untouched. Returns null for impossible moves (unknown ids, or dropping a\n * node into its own subtree).\n */\nfunction reorderResources(\n resources: GanttResource[],\n resourceId: string,\n parentId: string | null,\n index: number,\n): GanttResource[] | null {\n let moved: GanttResource | null = null;\n\n const strip = (nodes: GanttResource[]): GanttResource[] =>\n nodes.flatMap((node) => {\n if (node.id === resourceId) {\n moved = node;\n return [];\n }\n if (!node.children?.length) return [node];\n return [{ ...node, children: strip(node.children) }];\n });\n\n const stripped = strip(resources);\n if (!moved) return null;\n\n const contains = (node: GanttResource, id: string): boolean =>\n node.id === id || !!node.children?.some((child) => contains(child, id));\n if (parentId !== null && contains(moved, parentId)) return null;\n\n const insert = (nodes: GanttResource[]): GanttResource[] => {\n if (parentId === null) {\n const next = [...nodes];\n next.splice(Math.min(Math.max(index, 0), next.length), 0, moved!);\n return next;\n }\n return nodes.map((node) => {\n if (node.id === parentId) {\n const children = [...(node.children ?? [])];\n children.splice(Math.min(Math.max(index, 0), children.length), 0, moved!);\n return { ...node, children };\n }\n if (!node.children?.length) return node;\n return { ...node, children: insert(node.children) };\n });\n };\n\n const next = insert(stripped);\n // unknown parentId: the node vanished - reject\n if (parentId !== null) {\n const flat = flattenResources(next);\n if (!flat.some(({ resource }) => resource.id === resourceId)) return null;\n }\n return next;\n}\n\nconst DEFAULT_WEEKEND_DAYS = [0, 6];\n\n/** Resolves whether a day is an off day (non-working) in the display zone. */\nfunction resolveOffDay(\n day: Date,\n timeZone: string,\n config: boolean | GanttOffDaysConfig | undefined,\n): boolean {\n if (!config) return false;\n const resolved: GanttOffDaysConfig = config === true ? {} : config;\n const weekendDays = resolved.weekendDays ?? DEFAULT_WEEKEND_DAYS;\n const zoned = toZoned(day, timeZone);\n if (weekendDays.includes(zoned.getDay())) return true;\n if (resolved.dates?.length) {\n const key = getDayKey(day, timeZone);\n if (resolved.dates.some((date) => getDayKey(date, timeZone) === key)) {\n return true;\n }\n }\n return resolved.isOffDay?.(day) ?? false;\n}\n\nexport type {\n BuildIndexOptions,\n GanttIndex,\n GanttLaneMemo,\n PackOptions,\n ViewDateRanges,\n ViewRangeOptions,\n WeekStartsOn,\n};\nexport {\n buildEventIndex,\n defaultEventOrder,\n eventsOverlap,\n findResource,\n flattenResources,\n getDayKey,\n getDayTotalMinutes,\n getGanttDateRange,\n getLaneKey,\n getRangeKey,\n MIN_PACK_SLOT,\n packTimedSegments,\n rangesIntersect,\n reorderResources,\n resolveOffDay,\n snapMinutes,\n spansMultipleDays,\n stepGanttDate,\n toZoned,\n zonedStartOfDay,\n};\n"],"mappings":";;;;;;;;;;;AAoCA,MAAM,gBAAgB;;AAGtB,SAAS,QAAQ,MAAY,UAA0B;CACrD,OAAO,IAAI,OAAO,KAAK,QAAQ,GAAG,QAAQ;AAC5C;;AAGA,SAAS,gBAAgB,MAAY,UAA0B;CAC7D,OAAO,WAAW,QAAQ,MAAM,QAAQ,CAAC;AAC3C;;AAGA,SAAS,UAAU,MAAY,UAA0B;CACvD,OAAO,OAAO,QAAQ,MAAM,QAAQ,GAAG,YAAY;AACrD;;AAGA,SAAS,mBAAmB,UAAgB,UAA0B;CAEpE,OAAO,oBADM,gBAAgB,QAAQ,QAAQ,UAAU,QAAQ,GAAG,CAAC,GAAG,QACxC,GAAG,QAAQ;AAC3C;AAEA,SAAS,YAAY,SAAiB,MAAsB;CAC1D,OAAO,KAAK,MAAM,UAAU,IAAI,IAAI;AACtC;;AAaA,SAAS,kBAAkB,OAAmB,MAAY,MAAwC;CAChG,MAAM,EAAE,UAAU,iBAAiB;CACnC,MAAM,QAAQ,QAAQ,MAAM,QAAQ;CAEpC,IAAI,UAAU,QAAQ;EACpB,MAAM,QAAQ,YAAY,OAAO,EAAE,aAAa,CAAC;EACjD,MAAM,QAAQ;GAAE;GAAO,KAAK,SAAS,OAAO,CAAC;EAAE;EAC/C,OAAO;GAAE,aAAa;GAAO,cAAc;EAAM;CACnD;CACA,IAAI,UAAU,SAAS;EAGrB,MAAM,QAAQ;GAAE,OADF,aAAa,KACP;GAAG,KAAK,aAAa,UAAU,OAAO,CAAC,CAAC;EAAE;EAC9D,OAAO;GAAE,aAAa;GAAO,cAAc;EAAM;CACnD;CACA,IAAI,UAAU,WAAW;EAEvB,MAAM,eAAe,eAAe,KAAK;EACzC,MAAM,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AA;CAEvE,OAAO;AACT;AAEA,MAAM,uBAAuB,CAAC,GAAG,CAAC;;AAGlC,SAAS,cACP,KACA,UACA,QACS;CACT,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,WAA+B,WAAW,OAAO,CAAC,IAAI;CAC5D,MAAM,cAAc,SAAS,eAAe;CAC5C,MAAM,QAAQ,QAAQ,KAAK,QAAQ;CACnC,IAAI,YAAY,SAAS,MAAM,OAAO,CAAC,GAAG,OAAO;CACjD,IAAI,SAAS,OAAO,QAAQ;EAC1B,MAAM,MAAM,UAAU,KAAK,QAAQ;EACnC,IAAI,SAAS,MAAM,MAAM,SAAS,UAAU,MAAM,QAAQ,MAAM,GAAG,GACjE,OAAO;CAEX;CACA,OAAO,SAAS,WAAW,GAAG,KAAK;AACrC"}
@@ -0,0 +1,60 @@
1
+ import { GanttScale } from "./gantt-types.js";
2
+ import { ReactNode } from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ //#region src/components/reui/gantt/gantt-nav.d.ts
5
+ declare const GANTT_SCALES: GanttScale[];
6
+ type NavButtonProps = Omit<useRender.ComponentProps<"button">, "children"> & {
7
+ children?: ReactNode;
8
+ /**
9
+ * Tooltip policy (the part that usually goes wrong on clickable elements):
10
+ * tooltips appear ONLY on hover or keyboard focus-visible - a pointer click
11
+ * never re-triggers them, and buttons that open overlays (the period
12
+ * selector, consumer dialog buttons) get NO tooltip at all so nothing
13
+ * flashes when focus returns. Icon-only buttons default to their accessible
14
+ * label; Today defaults to the actual current date. Pass null to disable.
15
+ */
16
+ tooltip?: ReactNode | null;
17
+ };
18
+ declare function GanttNavToday({ className, render, children, tooltip, ...props }: NavButtonProps): import("react").JSX.Element;
19
+ declare function GanttNavPrev({ className, render, children, tooltip, ...props }: NavButtonProps): import("react").JSX.Element;
20
+ declare function GanttNavNext({ className, render, children, tooltip, ...props }: NavButtonProps): import("react").JSX.Element;
21
+ interface GanttTitleProps extends useRender.ComponentProps<"div"> {
22
+ format?: (ctx: {
23
+ title: string;
24
+ }) => ReactNode;
25
+ }
26
+ declare function GanttTitle({ className, render, format: formatTitle, ...props }: GanttTitleProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
27
+ interface GanttScaleSwitcherProps extends Omit<useRender.ComponentProps<"button">, "children"> {
28
+ children?: ReactNode;
29
+ /** Hover/focus-visible hint; defaults to the "Select view" label. Pass
30
+ * null to disable (overlay-opener policy). */
31
+ tooltip?: ReactNode | null;
32
+ /** The offered scales, in menu order. Default: all five. */
33
+ scales?: GanttScale[];
34
+ }
35
+ /**
36
+ * Scale switcher ("Select view"): Day / Week / Month / Quarter / Year, a ghost
37
+ * dropdown button (same shape as the event-calendar view switcher).
38
+ */
39
+ declare function GanttScaleSwitcher({ className, render, children, tooltip, scales, ...props }: GanttScaleSwitcherProps): import("react").JSX.Element;
40
+ interface GanttDatePickerProps {
41
+ className?: string;
42
+ }
43
+ /**
44
+ * Compact go-to-date picker (shadcn Calendar in a popover). No tooltip by
45
+ * design: it opens an overlay (see the NavButtonProps tooltip policy).
46
+ */
47
+ declare function GanttDatePicker({ className }: GanttDatePickerProps): import("react").JSX.Element;
48
+ type GanttToolbarProps = useRender.ComponentProps<"div">;
49
+ /** Free slot for consumer toolbar buttons; pure layout shell. */
50
+ declare function GanttToolbar({ className, render, ...props }: GanttToolbarProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
51
+ interface GanttNavProps extends useRender.ComponentProps<"div"> {}
52
+ /**
53
+ * Default composed nav (event-calendar parity): Today, time-period switcher,
54
+ * prev/next, title, spacer. GanttDatePicker stays available for custom
55
+ * compositions. Pass children to use it as a pure layout shell instead.
56
+ */
57
+ declare function GanttNav({ className, render, children, ...props }: GanttNavProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
58
+ //#endregion
59
+ export { GANTT_SCALES, GanttDatePicker, GanttNav, GanttNavNext, GanttNavPrev, type GanttNavProps, GanttNavToday, GanttScaleSwitcher, type GanttScaleSwitcherProps, GanttTitle, type GanttTitleProps, GanttToolbar, type GanttToolbarProps };
60
+ //# sourceMappingURL=gantt-nav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gantt-nav.d.ts","names":[],"sources":["../../../../src/components/reui/gantt/gantt-nav.tsx"],"mappings":";;;;cAyBM,cAAc;KAgBf,iBAAiB,KAAK,UAAU;EACnC,WAAW;;;;;;;;;EASX,UAAU;;iBAoBH,gBAAgB,WAAW,QAAQ,UAAU,YAAY,SAAS,iCAAc,IAAA;iBA4BhF,eAAe,WAAW,QAAQ,UAAU,YAAY,SAAS,iCAAc,IAAA;iBAsB/E,eAAe,WAAW,QAAQ,UAAU,YAAY,SAAS,iCAAc,IAAA;UAsB9E,wBAAwB,UAAU;EAC1C,UAAU;IAAO;QAAoB;;iBAG9B,aAAa,WAAW,QAAQ,QAAQ,gBAAgB,SAAS,kCAAe,+CAAA;UAe/E,gCAAgC,KAAK,UAAU;EACvD,WAAW;;;EAGX,UAAU;;EAEV,SAAS;;;;;;iBAOF,qBACP,WACA,QACA,UACA,SACA,WACG,SACF,0CAAuB,IAAA;UAqFhB;EACR;;;;;;iBAOO,kBAAkB,aAAa,uCAAoB,IAAA;KAyCvD,oBAAoB,UAAU;;iBAG1B,eAAe,WAAW,WAAW,SAAS,oCAAiB,+CAAA;UAc9D,sBAAsB,UAAU;;;;;;iBAOjC,WAAW,WAAW,QAAQ,aAAa,SAAS,gCAAa,+CAAA"}