@kumix/ui 0.3.10 → 0.3.12

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 (578) hide show
  1. package/README.md +25 -25
  2. package/dist/components/agents/agent-activity/activity-row.d.ts +1 -2
  3. package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
  4. package/dist/components/agents/agent-activity/activity-row.js +1 -1
  5. package/dist/components/agents/agent-activity/index.d.ts +2 -2
  6. package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
  7. package/dist/components/agents/agent-activity/index.js +1 -1
  8. package/dist/components/agents/agent-code.d.ts +8 -9
  9. package/dist/components/agents/agent-code.d.ts.map +1 -1
  10. package/dist/components/agents/agent-code.js +1 -1
  11. package/dist/components/agents/agent-disclosure.d.ts +2 -3
  12. package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
  13. package/dist/components/agents/ai-sidebar.d.ts +8 -9
  14. package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
  15. package/dist/components/agents/ai-sidebar.js +1 -1
  16. package/dist/components/agents/approval-card/index.d.ts +2 -2
  17. package/dist/components/agents/approval-card/index.d.ts.map +1 -1
  18. package/dist/components/agents/approval-card/index.js +1 -1
  19. package/dist/components/agents/chat-app.d.ts +2 -3
  20. package/dist/components/agents/chat-app.d.ts.map +1 -1
  21. package/dist/components/agents/citations.d.ts +10 -11
  22. package/dist/components/agents/citations.d.ts.map +1 -1
  23. package/dist/components/agents/citations.js +1 -1
  24. package/dist/components/agents/code-block.d.ts +3 -4
  25. package/dist/components/agents/code-block.d.ts.map +1 -1
  26. package/dist/components/agents/code-block.js +1 -1
  27. package/dist/components/agents/file-diff.d.ts +5 -6
  28. package/dist/components/agents/file-diff.d.ts.map +1 -1
  29. package/dist/components/agents/file-diff.js +1 -1
  30. package/dist/components/agents/image-generation.d.ts +3 -4
  31. package/dist/components/agents/image-generation.d.ts.map +1 -1
  32. package/dist/components/agents/image-generation.js +1 -1
  33. package/dist/components/agents/loading-states/agent-progress.d.ts +2 -3
  34. package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
  35. package/dist/components/agents/loading-states/reasoning-text.d.ts +3 -4
  36. package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
  37. package/dist/components/agents/loading-states/thinking-shimmer.d.ts +2 -3
  38. package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
  39. package/dist/components/agents/message-bubble.d.ts +10 -11
  40. package/dist/components/agents/message-bubble.d.ts.map +1 -1
  41. package/dist/components/agents/message-bubble.js +1 -1
  42. package/dist/components/agents/message-context.d.ts +2 -3
  43. package/dist/components/agents/message-context.d.ts.map +1 -1
  44. package/dist/components/agents/message-scroller.d.ts +2 -3
  45. package/dist/components/agents/message-scroller.d.ts.map +1 -1
  46. package/dist/components/agents/message.d.ts +18 -18
  47. package/dist/components/agents/message.d.ts.map +1 -1
  48. package/dist/components/agents/prompt-input.d.ts +4 -5
  49. package/dist/components/agents/prompt-input.d.ts.map +1 -1
  50. package/dist/components/agents/prompt-input.js +1 -1
  51. package/dist/components/agents/streaming-response.d.ts +4 -5
  52. package/dist/components/agents/streaming-response.d.ts.map +1 -1
  53. package/dist/components/agents/streaming-response.js +1 -1
  54. package/dist/components/agents/todo-list.d.ts +4 -5
  55. package/dist/components/agents/todo-list.d.ts.map +1 -1
  56. package/dist/components/agents/todo-list.js +1 -1
  57. package/dist/components/agents/tool-approval.d.ts +6 -7
  58. package/dist/components/agents/tool-approval.d.ts.map +1 -1
  59. package/dist/components/agents/tool-approval.js +1 -1
  60. package/dist/components/agents/tool-result.d.ts +6 -7
  61. package/dist/components/agents/tool-result.d.ts.map +1 -1
  62. package/dist/components/agents/tool-result.js +1 -1
  63. package/dist/components/custom/confirm-dialog.d.ts +2 -3
  64. package/dist/components/custom/confirm-dialog.d.ts.map +1 -1
  65. package/dist/components/custom/confirm-dialog.js +1 -1
  66. package/dist/components/custom/toast.d.ts +6 -7
  67. package/dist/components/custom/toast.d.ts.map +1 -1
  68. package/dist/components/motion/action-swap-blur.d.ts +7 -7
  69. package/dist/components/motion/action-swap-blur.d.ts.map +1 -1
  70. package/dist/components/motion/action-swap-cascade.d.ts +7 -7
  71. package/dist/components/motion/action-swap-cascade.d.ts.map +1 -1
  72. package/dist/components/motion/action-swap-roll.d.ts +7 -7
  73. package/dist/components/motion/action-swap-roll.d.ts.map +1 -1
  74. package/dist/components/motion/action-swap.d.ts +10 -11
  75. package/dist/components/motion/action-swap.d.ts.map +1 -1
  76. package/dist/components/motion/adaptive-stepper.d.ts +31 -0
  77. package/dist/components/motion/adaptive-stepper.d.ts.map +1 -0
  78. package/dist/components/motion/adaptive-stepper.js +302 -0
  79. package/dist/components/motion/adaptive-stepper.js.map +1 -0
  80. package/dist/components/motion/animated-badge.d.ts +4 -5
  81. package/dist/components/motion/animated-badge.d.ts.map +1 -1
  82. package/dist/components/motion/animated-badge.js +1 -1
  83. package/dist/components/motion/animated-number.d.ts +2 -3
  84. package/dist/components/motion/animated-number.d.ts.map +1 -1
  85. package/dist/components/motion/animated-sidebar.d.ts +28 -29
  86. package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
  87. package/dist/components/motion/animated-sidebar.js +1 -1
  88. package/dist/components/motion/animated-toast-stack.d.ts +10 -11
  89. package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
  90. package/dist/components/motion/animated-toast-stack.js +1 -1
  91. package/dist/components/motion/attachment-upload.d.ts +7 -8
  92. package/dist/components/motion/attachment-upload.d.ts.map +1 -1
  93. package/dist/components/motion/attachment-upload.js +1 -1
  94. package/dist/components/motion/availability-scheduler/copy-menu.d.ts +1 -2
  95. package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
  96. package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
  97. package/dist/components/motion/availability-scheduler/day-row.d.ts +1 -2
  98. package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
  99. package/dist/components/motion/availability-scheduler/day-row.js +2 -2
  100. package/dist/components/motion/availability-scheduler/icon-button.d.ts +1 -2
  101. package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -1
  102. package/dist/components/motion/availability-scheduler/index.d.ts +3 -3
  103. package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
  104. package/dist/components/motion/availability-scheduler/index.js +1 -1
  105. package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -2
  106. package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
  107. package/dist/components/motion/bloom-menu.d.ts +2 -3
  108. package/dist/components/motion/bloom-menu.d.ts.map +1 -1
  109. package/dist/components/motion/bloom-menu.js +1 -1
  110. package/dist/components/motion/bottom-sheet.d.ts +2 -3
  111. package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
  112. package/dist/components/motion/bounce-sidebar.d.ts +3 -4
  113. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
  114. package/dist/components/motion/bouncy-accordion.d.ts +4 -5
  115. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
  116. package/dist/components/motion/bouncy-accordion.js +1 -1
  117. package/dist/components/motion/button/base.d.ts +6 -7
  118. package/dist/components/motion/button/base.d.ts.map +1 -1
  119. package/dist/components/motion/button/magnetic.d.ts +2 -3
  120. package/dist/components/motion/button/magnetic.d.ts.map +1 -1
  121. package/dist/components/motion/button/metallic.d.ts +2 -3
  122. package/dist/components/motion/button/metallic.d.ts.map +1 -1
  123. package/dist/components/motion/button/stateful.d.ts +3 -4
  124. package/dist/components/motion/button/stateful.d.ts.map +1 -1
  125. package/dist/components/motion/button/stateful.js +1 -1
  126. package/dist/components/motion/center-morph-modal.d.ts +8 -9
  127. package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
  128. package/dist/components/motion/center-morph-modal.js +1 -1
  129. package/dist/components/motion/checkbox.d.ts +2 -3
  130. package/dist/components/motion/checkbox.d.ts.map +1 -1
  131. package/dist/components/motion/chromatic-text-reveal.d.ts +2 -3
  132. package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -1
  133. package/dist/components/motion/combobox/content.d.ts +2 -3
  134. package/dist/components/motion/combobox/content.d.ts.map +1 -1
  135. package/dist/components/motion/combobox/content.js +1 -1
  136. package/dist/components/motion/combobox/context.d.ts +9 -10
  137. package/dist/components/motion/combobox/context.d.ts.map +1 -1
  138. package/dist/components/motion/combobox/context.js +216 -1
  139. package/dist/components/motion/combobox/context.js.map +1 -0
  140. package/dist/components/motion/combobox/list.d.ts +12 -13
  141. package/dist/components/motion/combobox/list.d.ts.map +1 -1
  142. package/dist/components/motion/combobox/list.js +2 -2
  143. package/dist/components/motion/combobox/trigger.d.ts +6 -7
  144. package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
  145. package/dist/components/motion/combobox/trigger.js +2 -2
  146. package/dist/components/motion/combobox.js +1 -1
  147. package/dist/components/motion/command-palette.d.ts +3 -4
  148. package/dist/components/motion/command-palette.d.ts.map +1 -1
  149. package/dist/components/motion/command-palette.js +1 -1
  150. package/dist/components/motion/context-menu.d.ts +20 -21
  151. package/dist/components/motion/context-menu.d.ts.map +1 -1
  152. package/dist/components/motion/context-menu.js +1 -1
  153. package/dist/components/motion/cylinder-carousel.d.ts +2 -3
  154. package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
  155. package/dist/components/motion/dock.d.ts +5 -6
  156. package/dist/components/motion/dock.d.ts.map +1 -1
  157. package/dist/components/motion/drawer.d.ts +2 -3
  158. package/dist/components/motion/drawer.d.ts.map +1 -1
  159. package/dist/components/motion/dynamic-island.d.ts +4 -5
  160. package/dist/components/motion/dynamic-island.d.ts.map +1 -1
  161. package/dist/components/motion/expandable-action-bar.d.ts +6 -7
  162. package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
  163. package/dist/components/motion/expandable-control.d.ts +4 -5
  164. package/dist/components/motion/expandable-control.d.ts.map +1 -1
  165. package/dist/components/motion/expandable-tabs.d.ts +4 -5
  166. package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
  167. package/dist/components/motion/expanding-arrow-button.d.ts +2 -3
  168. package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
  169. package/dist/components/motion/feedback-widget.d.ts +3 -4
  170. package/dist/components/motion/feedback-widget.d.ts.map +1 -1
  171. package/dist/components/motion/feedback-widget.js +1 -1
  172. package/dist/components/motion/file-tree.d.ts +7 -8
  173. package/dist/components/motion/file-tree.d.ts.map +1 -1
  174. package/dist/components/motion/file-tree.js +1 -1
  175. package/dist/components/motion/file-upload.d.ts +7 -8
  176. package/dist/components/motion/file-upload.d.ts.map +1 -1
  177. package/dist/components/motion/file-upload.js +1 -1
  178. package/dist/components/motion/hold-action-button.d.ts +2 -3
  179. package/dist/components/motion/hold-action-button.d.ts.map +1 -1
  180. package/dist/components/motion/infinite-masonry.d.ts +3 -4
  181. package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
  182. package/dist/components/motion/infinite-masonry.js +1 -1
  183. package/dist/components/motion/input.d.ts +5 -4
  184. package/dist/components/motion/input.d.ts.map +1 -1
  185. package/dist/components/motion/input.js +28 -25
  186. package/dist/components/motion/input.js.map +1 -1
  187. package/dist/components/motion/liquid.d.ts +29 -0
  188. package/dist/components/motion/liquid.d.ts.map +1 -0
  189. package/dist/components/motion/liquid.js +248 -0
  190. package/dist/components/motion/liquid.js.map +1 -0
  191. package/dist/components/motion/loader.d.ts +3 -4
  192. package/dist/components/motion/loader.d.ts.map +1 -1
  193. package/dist/components/motion/magnetic.d.ts +2 -3
  194. package/dist/components/motion/magnetic.d.ts.map +1 -1
  195. package/dist/components/motion/marquee.d.ts +2 -3
  196. package/dist/components/motion/marquee.d.ts.map +1 -1
  197. package/dist/components/motion/morphing-modal.d.ts +2 -3
  198. package/dist/components/motion/morphing-modal.d.ts.map +1 -1
  199. package/dist/components/motion/morphing-search.d.ts +3 -4
  200. package/dist/components/motion/morphing-search.d.ts.map +1 -1
  201. package/dist/components/motion/morphing-search.js +1 -1
  202. package/dist/components/motion/morphing-tabs.d.ts +4 -5
  203. package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
  204. package/dist/components/motion/morphing-tabs.js +1 -1
  205. package/dist/components/motion/multi-select/content.d.ts +15 -0
  206. package/dist/components/motion/multi-select/content.d.ts.map +1 -0
  207. package/dist/components/motion/multi-select/content.js +91 -0
  208. package/dist/components/motion/multi-select/content.js.map +1 -0
  209. package/dist/components/motion/multi-select/context.d.ts +63 -0
  210. package/dist/components/motion/multi-select/context.d.ts.map +1 -0
  211. package/dist/{context-BizvUNZv.js → components/motion/multi-select/context.js} +44 -114
  212. package/dist/components/motion/multi-select/context.js.map +1 -0
  213. package/dist/components/motion/multi-select/index.d.ts +5 -0
  214. package/dist/components/motion/multi-select/index.js +6 -0
  215. package/dist/components/motion/multi-select/list.d.ts +39 -0
  216. package/dist/components/motion/multi-select/list.d.ts.map +1 -0
  217. package/dist/components/motion/multi-select/list.js +144 -0
  218. package/dist/components/motion/multi-select/list.js.map +1 -0
  219. package/dist/components/motion/multi-select/trigger.d.ts +21 -0
  220. package/dist/components/motion/multi-select/trigger.d.ts.map +1 -0
  221. package/dist/components/motion/multi-select/trigger.js +185 -0
  222. package/dist/components/motion/multi-select/trigger.js.map +1 -0
  223. package/dist/components/motion/not-found/glitch.d.ts +1 -2
  224. package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
  225. package/dist/components/motion/not-found/magnetic.d.ts +1 -2
  226. package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
  227. package/dist/components/motion/not-found/shared.d.ts +4 -5
  228. package/dist/components/motion/not-found/shared.d.ts.map +1 -1
  229. package/dist/components/motion/not-found/spotlight.d.ts +1 -2
  230. package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
  231. package/dist/components/motion/not-found/stacked.d.ts +1 -2
  232. package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
  233. package/dist/components/motion/not-found/terminal.d.ts +1 -2
  234. package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
  235. package/dist/components/motion/notification-stack.d.ts +4 -5
  236. package/dist/components/motion/notification-stack.d.ts.map +1 -1
  237. package/dist/components/motion/notification-stack.js +1 -1
  238. package/dist/components/motion/number-ticker.d.ts +2 -3
  239. package/dist/components/motion/number-ticker.d.ts.map +1 -1
  240. package/dist/components/motion/otp-input.d.ts +3 -4
  241. package/dist/components/motion/otp-input.d.ts.map +1 -1
  242. package/dist/components/motion/overflow-actions.d.ts +5 -6
  243. package/dist/components/motion/overflow-actions.d.ts.map +1 -1
  244. package/dist/components/motion/overflow-actions.js +1 -1
  245. package/dist/components/motion/parallax.d.ts +2 -3
  246. package/dist/components/motion/parallax.d.ts.map +1 -1
  247. package/dist/components/motion/popover-morph.d.ts +6 -7
  248. package/dist/components/motion/popover-morph.d.ts.map +1 -1
  249. package/dist/components/motion/popover.d.ts +6 -7
  250. package/dist/components/motion/popover.d.ts.map +1 -1
  251. package/dist/components/motion/preview-rail.d.ts +3 -4
  252. package/dist/components/motion/preview-rail.d.ts.map +1 -1
  253. package/dist/components/motion/project-folder.d.ts +3 -4
  254. package/dist/components/motion/project-folder.d.ts.map +1 -1
  255. package/dist/components/motion/project-folder.js +1 -1
  256. package/dist/components/motion/pull-to-refresh.d.ts +3 -4
  257. package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
  258. package/dist/components/motion/radio.d.ts +4 -5
  259. package/dist/components/motion/radio.d.ts.map +1 -1
  260. package/dist/components/motion/range-slider-bubble.d.ts +2 -3
  261. package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
  262. package/dist/components/motion/range-slider-fluid.d.ts +2 -3
  263. package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
  264. package/dist/components/motion/range-slider-ruler.d.ts +2 -3
  265. package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
  266. package/dist/components/motion/range-slider-wave.d.ts +2 -3
  267. package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
  268. package/dist/components/motion/range-slider.d.ts +2 -3
  269. package/dist/components/motion/range-slider.d.ts.map +1 -1
  270. package/dist/components/motion/scroll-progress.d.ts +4 -5
  271. package/dist/components/motion/scroll-progress.d.ts.map +1 -1
  272. package/dist/components/motion/scroll-reveal.d.ts +2 -3
  273. package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
  274. package/dist/components/motion/scroll-to.d.ts +2 -3
  275. package/dist/components/motion/scroll-to.d.ts.map +1 -1
  276. package/dist/components/motion/select-morph.d.ts +10 -11
  277. package/dist/components/motion/select-morph.d.ts.map +1 -1
  278. package/dist/components/motion/select-morph.js +1 -1
  279. package/dist/components/motion/select.d.ts +10 -11
  280. package/dist/components/motion/select.d.ts.map +1 -1
  281. package/dist/components/motion/select.js +1 -1
  282. package/dist/components/motion/shader-background.d.ts +4 -5
  283. package/dist/components/motion/shader-background.d.ts.map +1 -1
  284. package/dist/components/motion/shared-layout-bg.d.ts +2 -3
  285. package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
  286. package/dist/components/motion/signup-form.d.ts +7 -8
  287. package/dist/components/motion/signup-form.d.ts.map +1 -1
  288. package/dist/components/motion/signup-form.js +7 -3
  289. package/dist/components/motion/signup-form.js.map +1 -1
  290. package/dist/components/motion/slide-action-button.d.ts +2 -3
  291. package/dist/components/motion/slide-action-button.d.ts.map +1 -1
  292. package/dist/components/motion/smooth-scroll.d.ts +6 -7
  293. package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
  294. package/dist/components/motion/swipeable-list.d.ts +8 -9
  295. package/dist/components/motion/swipeable-list.d.ts.map +1 -1
  296. package/dist/components/motion/switch.d.ts +2 -3
  297. package/dist/components/motion/switch.d.ts.map +1 -1
  298. package/dist/components/motion/table/editable-cell.d.ts +1 -2
  299. package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
  300. package/dist/components/motion/table/index.d.ts +2 -2
  301. package/dist/components/motion/table/index.d.ts.map +1 -1
  302. package/dist/components/motion/table/index.js.map +1 -1
  303. package/dist/components/motion/table/row-handle.d.ts +1 -2
  304. package/dist/components/motion/table/row-handle.d.ts.map +1 -1
  305. package/dist/components/motion/table/row-handle.js +1 -1
  306. package/dist/components/motion/table/skeleton-rows.d.ts +1 -2
  307. package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
  308. package/dist/components/motion/table/table-header.d.ts +2 -3
  309. package/dist/components/motion/table/table-header.d.ts.map +1 -1
  310. package/dist/components/motion/table/table-header.js +1 -1
  311. package/dist/components/motion/table/table-menu.d.ts +2 -3
  312. package/dist/components/motion/table/table-menu.d.ts.map +1 -1
  313. package/dist/components/motion/tabs.d.ts +4 -5
  314. package/dist/components/motion/tabs.d.ts.map +1 -1
  315. package/dist/components/motion/text-cascade.d.ts +2 -3
  316. package/dist/components/motion/text-cascade.d.ts.map +1 -1
  317. package/dist/components/motion/text-reveal.d.ts +2 -3
  318. package/dist/components/motion/text-reveal.d.ts.map +1 -1
  319. package/dist/components/motion/text-scramble.d.ts +2 -3
  320. package/dist/components/motion/text-scramble.d.ts.map +1 -1
  321. package/dist/components/motion/text-shimmer.d.ts +2 -3
  322. package/dist/components/motion/text-shimmer.d.ts.map +1 -1
  323. package/dist/components/motion/theme-toggle.d.ts +5 -6
  324. package/dist/components/motion/theme-toggle.d.ts.map +1 -1
  325. package/dist/components/motion/theme-toggle.js +1 -1
  326. package/dist/components/motion/tilt-card.d.ts +2 -3
  327. package/dist/components/motion/tilt-card.d.ts.map +1 -1
  328. package/dist/components/motion/tooltip.d.ts +2 -3
  329. package/dist/components/motion/tooltip.d.ts.map +1 -1
  330. package/dist/components/motion/wheel-picker.d.ts +3 -4
  331. package/dist/components/motion/wheel-picker.d.ts.map +1 -1
  332. package/dist/components/reui/alert.d.ts +1 -1
  333. package/dist/components/reui/alert.js +1 -1
  334. package/dist/components/reui/autocomplete.d.ts +3 -3
  335. package/dist/components/reui/autocomplete.d.ts.map +1 -1
  336. package/dist/components/reui/autocomplete.js +1 -1
  337. package/dist/components/reui/badge.d.ts +2 -2
  338. package/dist/components/reui/cascader/cascader-async.d.ts +8 -9
  339. package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
  340. package/dist/components/reui/cascader/cascader-async.js.map +1 -1
  341. package/dist/components/reui/cascader/cascader-columns.d.ts +3 -3
  342. package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
  343. package/dist/components/reui/cascader/cascader-columns.js +1 -1
  344. package/dist/components/reui/cascader/cascader-context.d.ts +13 -13
  345. package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
  346. package/dist/components/reui/cascader/cascader-footer.d.ts +8 -8
  347. package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
  348. package/dist/components/reui/cascader/cascader-footer.js +1 -1
  349. package/dist/components/reui/cascader/cascader-i18n.d.ts +3 -4
  350. package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -1
  351. package/dist/components/reui/cascader/cascader-item.d.ts +9 -9
  352. package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
  353. package/dist/components/reui/cascader/cascader-item.js +1 -1
  354. package/dist/components/reui/cascader/cascader-lib.d.ts +38 -39
  355. package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
  356. package/dist/components/reui/cascader/cascader-nav.d.ts +6 -6
  357. package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
  358. package/dist/components/reui/cascader/cascader-nav.js +1 -1
  359. package/dist/components/reui/cascader/cascader-virtual.d.ts +6 -6
  360. package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
  361. package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
  362. package/dist/components/reui/cascader/cascader.d.ts +19 -19
  363. package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
  364. package/dist/components/reui/cascader/cascader.js +1 -1
  365. package/dist/components/reui/cascader/cascader.js.map +1 -1
  366. package/dist/components/reui/code-block/code-block-highlight.d.ts +32 -33
  367. package/dist/components/reui/code-block/code-block-highlight.d.ts.map +1 -1
  368. package/dist/components/reui/code-block/code-block.d.ts +7 -7
  369. package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
  370. package/dist/components/reui/code-block/code-block.js.map +1 -1
  371. package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts +117 -0
  372. package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -0
  373. package/dist/components/reui/data-grid/data-grid-cell-selection.js +1554 -0
  374. package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -0
  375. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -1
  376. package/dist/components/reui/data-grid/data-grid-column-filter.js +7 -5
  377. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
  378. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
  379. package/dist/components/reui/data-grid/data-grid-column-header.js +19 -13
  380. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
  381. package/dist/components/reui/data-grid/data-grid-column-visibility.js +3 -2
  382. package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
  383. package/dist/components/reui/data-grid/data-grid-i18n.d.ts +2 -0
  384. package/dist/components/reui/data-grid/data-grid-i18n.js +53 -0
  385. package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -0
  386. package/dist/components/reui/data-grid/data-grid-pagination.js +15 -9
  387. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
  388. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
  389. package/dist/components/reui/data-grid/data-grid-scroll-area.js +3 -3
  390. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
  391. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
  392. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +7 -5
  393. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
  394. package/dist/components/reui/data-grid/data-grid-table-dnd.js +3 -3
  395. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
  396. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +17 -1
  397. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
  398. package/dist/components/reui/data-grid/data-grid-table-virtual.js +146 -50
  399. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
  400. package/dist/components/reui/data-grid/data-grid-table.d.ts +23 -4
  401. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
  402. package/dist/components/reui/data-grid/data-grid-table.js +215 -68
  403. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  404. package/dist/components/reui/data-grid/data-grid.d.ts +288 -18
  405. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
  406. package/dist/components/reui/data-grid/data-grid.js +150 -15
  407. package/dist/components/reui/data-grid/data-grid.js.map +1 -1
  408. package/dist/components/reui/date-selector.d.ts +11 -12
  409. package/dist/components/reui/date-selector.d.ts.map +1 -1
  410. package/dist/components/reui/date-selector.js +1 -1
  411. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
  412. package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
  413. package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
  414. package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
  415. package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
  416. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
  417. package/dist/components/reui/filters/filters-advanced.d.ts +6 -7
  418. package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
  419. package/dist/components/reui/filters/filters-advanced.js +1 -1
  420. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  421. package/dist/components/reui/filters/filters-builder.d.ts +5 -5
  422. package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
  423. package/dist/components/reui/filters/filters-builder.js +2 -2
  424. package/dist/components/reui/filters/filters-chip.d.ts +10 -11
  425. package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
  426. package/dist/components/reui/filters/filters-chip.js +1 -1
  427. package/dist/components/reui/filters/filters-chip.js.map +1 -1
  428. package/dist/components/reui/filters/filters-context.d.ts +30 -30
  429. package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
  430. package/dist/components/reui/filters/filters-date.d.ts +13 -14
  431. package/dist/components/reui/filters/filters-date.d.ts.map +1 -1
  432. package/dist/components/reui/filters/filters-dnd.d.ts +15 -16
  433. package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
  434. package/dist/components/reui/filters/filters-editors.d.ts +14 -14
  435. package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
  436. package/dist/components/reui/filters/filters-editors.js +2 -2
  437. package/dist/components/reui/filters/filters-i18n.d.ts +4 -5
  438. package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -1
  439. package/dist/components/reui/filters/filters-lib.d.ts +34 -35
  440. package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
  441. package/dist/components/reui/filters/filters-operators.d.ts +13 -14
  442. package/dist/components/reui/filters/filters-operators.d.ts.map +1 -1
  443. package/dist/components/reui/filters/filters-query.d.ts +29 -30
  444. package/dist/components/reui/filters/filters-query.d.ts.map +1 -1
  445. package/dist/components/reui/filters/filters-types.d.ts +31 -32
  446. package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
  447. package/dist/components/reui/filters/filters.d.ts +5 -5
  448. package/dist/components/reui/filters/filters.d.ts.map +1 -1
  449. package/dist/components/reui/filters/filters.js +1 -1
  450. package/dist/components/reui/filters/filters.js.map +1 -1
  451. package/dist/components/reui/frame.d.ts +1 -1
  452. package/dist/components/reui/frame.js +1 -1
  453. package/dist/components/reui/gantt/gantt-bar.js +1 -1
  454. package/dist/components/reui/gantt/gantt-nav.js +1 -1
  455. package/dist/components/reui/gantt/gantt-view.js +1 -1
  456. package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
  457. package/dist/components/reui/gantt/gantt.js.map +1 -1
  458. package/dist/components/reui/icon-tile.d.ts +2 -2
  459. package/dist/components/reui/kanban.d.ts +11 -11
  460. package/dist/components/reui/kanban.d.ts.map +1 -1
  461. package/dist/components/reui/number-field.d.ts +3 -3
  462. package/dist/components/reui/number-field.js +1 -1
  463. package/dist/components/reui/phone-input.js +1 -1
  464. package/dist/components/reui/rating.d.ts +1 -1
  465. package/dist/components/reui/rating.js +1 -1
  466. package/dist/components/reui/scrollspy.d.ts +1 -2
  467. package/dist/components/reui/scrollspy.d.ts.map +1 -1
  468. package/dist/components/reui/sortable.d.ts +6 -6
  469. package/dist/components/reui/sortable.d.ts.map +1 -1
  470. package/dist/components/reui/tree.js +1 -1
  471. package/dist/components/ui/accordion.js +1 -1
  472. package/dist/components/ui/alert-dialog.js +1 -1
  473. package/dist/components/ui/alert.js +1 -1
  474. package/dist/components/ui/attachment.d.ts +1 -1
  475. package/dist/components/ui/attachment.js +1 -1
  476. package/dist/components/ui/badge.d.ts +1 -1
  477. package/dist/components/ui/breadcrumb.js +1 -1
  478. package/dist/components/ui/bubble.d.ts +1 -1
  479. package/dist/components/ui/bubble.js +1 -1
  480. package/dist/components/ui/button-group.js +1 -1
  481. package/dist/components/ui/button.d.ts +2 -2
  482. package/dist/components/ui/button.js +1 -1
  483. package/dist/components/ui/calendar.js +1 -1
  484. package/dist/components/ui/carousel.js +1 -1
  485. package/dist/components/ui/chart.d.ts +2 -2
  486. package/dist/components/ui/chart.d.ts.map +1 -1
  487. package/dist/components/ui/checkbox.js +1 -1
  488. package/dist/components/ui/combobox.js +1 -1
  489. package/dist/components/ui/command.js +1 -1
  490. package/dist/components/ui/context-menu.js +1 -1
  491. package/dist/components/ui/dialog.js +1 -1
  492. package/dist/components/ui/dropdown-menu.js +1 -1
  493. package/dist/components/ui/empty.js +1 -1
  494. package/dist/components/ui/field.js +1 -1
  495. package/dist/components/ui/input-group.d.ts +1 -1
  496. package/dist/components/ui/input-group.js +1 -1
  497. package/dist/components/ui/input-otp.js +1 -1
  498. package/dist/components/ui/item.d.ts +2 -2
  499. package/dist/components/ui/item.js +1 -1
  500. package/dist/components/ui/marker.js +1 -1
  501. package/dist/components/ui/menubar.js +1 -1
  502. package/dist/components/ui/message-scroller.js +2 -2
  503. package/dist/components/ui/message-scroller.js.map +1 -1
  504. package/dist/components/ui/native-select.js +1 -1
  505. package/dist/components/ui/navigation-menu.js +1 -1
  506. package/dist/components/ui/pagination.js +1 -1
  507. package/dist/components/ui/questionnaire.js +1 -1
  508. package/dist/components/ui/select.js +1 -1
  509. package/dist/components/ui/sheet.js +1 -1
  510. package/dist/components/ui/sidebar.d.ts +2 -2
  511. package/dist/components/ui/sidebar.js +1 -1
  512. package/dist/components/ui/spinner.js +1 -1
  513. package/dist/components/ui/tabs.js +1 -1
  514. package/dist/components/ui/toast.js +1 -1
  515. package/dist/components/ui/toggle.d.ts +2 -2
  516. package/dist/components/ui/toggle.js +1 -1
  517. package/dist/{copy-menu-C5GaT4Z-.js → copy-menu-TIKvPaAZ.js} +2 -2
  518. package/dist/{copy-menu-C5GaT4Z-.js.map → copy-menu-TIKvPaAZ.js.map} +1 -1
  519. package/dist/data-grid-i18n-TQR2PZlU.d.ts +54 -0
  520. package/dist/data-grid-i18n-TQR2PZlU.d.ts.map +1 -0
  521. package/dist/hooks/use-body-classes.d.ts +1 -2
  522. package/dist/hooks/use-body-classes.d.ts.map +1 -1
  523. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -2
  524. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
  525. package/dist/hooks/use-dismiss.d.ts +3 -4
  526. package/dist/hooks/use-dismiss.d.ts.map +1 -1
  527. package/dist/hooks/use-favicon.d.ts +1 -2
  528. package/dist/hooks/use-favicon.d.ts.map +1 -1
  529. package/dist/hooks/use-file-upload.d.ts +7 -8
  530. package/dist/hooks/use-file-upload.d.ts.map +1 -1
  531. package/dist/hooks/use-hover-capable.d.ts +1 -2
  532. package/dist/hooks/use-hover-capable.d.ts.map +1 -1
  533. package/dist/hooks/use-hover-gesture.d.ts +2 -3
  534. package/dist/hooks/use-hover-gesture.d.ts.map +1 -1
  535. package/dist/hooks/use-hydrated.d.ts +1 -2
  536. package/dist/hooks/use-hydrated.d.ts.map +1 -1
  537. package/dist/hooks/use-intersection-observer.d.ts +1 -2
  538. package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
  539. package/dist/hooks/use-is-mac.d.ts +1 -2
  540. package/dist/hooks/use-is-mac.d.ts.map +1 -1
  541. package/dist/hooks/use-media-query.d.ts +1 -2
  542. package/dist/hooks/use-media-query.d.ts.map +1 -1
  543. package/dist/hooks/use-meta-color.d.ts +1 -2
  544. package/dist/hooks/use-meta-color.d.ts.map +1 -1
  545. package/dist/hooks/use-mobile.d.ts +1 -2
  546. package/dist/hooks/use-mobile.d.ts.map +1 -1
  547. package/dist/hooks/use-mutation-observer.d.ts +1 -2
  548. package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
  549. package/dist/hooks/use-on-open.d.ts +1 -2
  550. package/dist/hooks/use-on-open.d.ts.map +1 -1
  551. package/dist/hooks/use-row-cursor.d.ts +1 -2
  552. package/dist/hooks/use-row-cursor.d.ts.map +1 -1
  553. package/dist/hooks/use-scroll-position.d.ts +1 -2
  554. package/dist/hooks/use-scroll-position.d.ts.map +1 -1
  555. package/dist/hooks/use-slider-input.d.ts +1 -2
  556. package/dist/hooks/use-slider-input.d.ts.map +1 -1
  557. package/dist/hooks/use-slider.d.ts +3 -4
  558. package/dist/hooks/use-slider.d.ts.map +1 -1
  559. package/dist/hooks/use-tap-gesture.d.ts +3 -4
  560. package/dist/hooks/use-tap-gesture.d.ts.map +1 -1
  561. package/dist/hooks/use-touch-capable.d.ts +1 -2
  562. package/dist/hooks/use-touch-capable.d.ts.map +1 -1
  563. package/dist/hooks/use-viewport.d.ts +1 -2
  564. package/dist/hooks/use-viewport.d.ts.map +1 -1
  565. package/dist/lib/ease.d.ts +10 -11
  566. package/dist/lib/ease.d.ts.map +1 -1
  567. package/dist/lib/favicon.d.ts +1 -2
  568. package/dist/lib/favicon.d.ts.map +1 -1
  569. package/dist/lib/text-shimmer.d.ts +3 -4
  570. package/dist/lib/text-shimmer.d.ts.map +1 -1
  571. package/dist/lib/tick-sound.d.ts +1 -2
  572. package/dist/lib/tick-sound.d.ts.map +1 -1
  573. package/dist/lib/touch.d.ts +6 -7
  574. package/dist/lib/touch.d.ts.map +1 -1
  575. package/dist/use-active-option-CmX6Z-4S.js +86 -0
  576. package/dist/use-active-option-CmX6Z-4S.js.map +1 -0
  577. package/package.json +6 -6
  578. package/dist/context-BizvUNZv.js.map +0 -1
@@ -1,5 +1,6 @@
1
+ import { r as DataGridI18nOverrides, t as DataGridI18nConfig } from "../../../data-grid-i18n-TQR2PZlU.js";
1
2
  import { ReactNode } from "react";
2
- import { Column, ColumnFiltersState, ReactTable, RowData, SortingState, Table, TableFeatures } from "@tanstack/react-table";
3
+ import { Cell, Column, ColumnFiltersState, ReactTable, RowData, SortingState, Table, TableFeatures } from "@tanstack/react-table";
3
4
  //#region src/components/reui/data-grid/data-grid.d.ts
4
5
  /**
5
6
  * Per-column extras the grid reads off `columnDef.meta`.
@@ -9,13 +10,54 @@ import { Column, ColumnFiltersState, ReactTable, RowData, SortingState, Table, T
9
10
  * installing the data grid no longer widens `ColumnMeta` for every other
10
11
  * table in the consuming app.
11
12
  */
12
- interface DataGridColumnMeta<TData> {
13
+ /**
14
+ * Per-column write contract for the spreadsheet operations (paste, fill,
15
+ * clear, cut). Presence marks the column writable; every write still flows
16
+ * through `onCellsChange`, so the consumer's state stays the only data owner.
17
+ */
18
+ export interface DataGridColumnCellEdit<TData> {
19
+ /**
20
+ * Set false for a column that formats clipboard output but is never
21
+ * written; a function decides per row, so locked rows (archived, another
22
+ * user's, a totals row) reject like any read-only cell. Defaults to true.
23
+ */
24
+ editable?: boolean | ((row: TData) => boolean);
25
+ /**
26
+ * Clipboard or fill string to typed value. Return undefined to reject the
27
+ * cell into `rejected`. Without it the raw string passes through unchanged -
28
+ * a deliberate non-coercion, so a number column receives strings only when
29
+ * the consumer chose not to parse.
30
+ */
31
+ parse?: (raw: string, row: TData) => unknown;
32
+ /** Typed value to clipboard string. Fallback: String(value ?? ""). */
33
+ format?: (value: unknown, row: TData) => string;
34
+ /** Value dispatched by Delete/Backspace and cut. Defaults to null. */
35
+ clearValue?: unknown;
36
+ /**
37
+ * Opt into the grid's built-in free-text editor: an overlay input (or
38
+ * auto-growing textarea) flush over the focused cell, opened by Enter, F2,
39
+ * typing, or double-click, committing through `onCellsChange` as source
40
+ * `"edit"` with `parse` applied. Columns without it stay consumer-edited
41
+ * via `onCellEditRequest` or their own cell renderers.
42
+ */
43
+ control?: "text" | "textarea";
44
+ }
45
+ export interface DataGridColumnMeta<TData> {
13
46
  headerTitle?: string;
14
47
  headerClassName?: string;
15
48
  cellClassName?: string;
16
49
  skeleton?: ReactNode;
17
50
  expandedContent?: (row: TData) => ReactNode;
18
51
  autoSize?: boolean;
52
+ cellEdit?: DataGridColumnCellEdit<TData>;
53
+ /**
54
+ * Under `columnsResizable`, this column absorbs the free space the filler
55
+ * strip would otherwise hold, so the grid always reads full-width and the
56
+ * built-in editor covers the whole cell. One column per grid; while free
57
+ * space remains, manual resizing of this column is visually a no-op (the
58
+ * absorbed space compensates), the flex-column trade-off.
59
+ */
60
+ fillWidth?: boolean;
19
61
  }
20
62
  /**
21
63
  * The batteries-included feature bundle every ReUI data-grid example builds
@@ -44,7 +86,7 @@ interface DataGridColumnMeta<TData> {
44
86
  * Or drop it entirely and hand `<DataGrid>` a leaner table - the components
45
87
  * accept any bundle, so you keep full ownership of the TanStack core.
46
88
  */
47
- declare const dataGridFeatures: {
89
+ export declare const dataGridFeatures: {
48
90
  columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
49
91
  columnOrderingFeature: import("@tanstack/react-table").TableFeature;
50
92
  columnPinningFeature: import("@tanstack/react-table").TableFeature;
@@ -58,6 +100,7 @@ declare const dataGridFeatures: {
58
100
  rowSelectionFeature: import("@tanstack/react-table").TableFeature;
59
101
  rowExpandingFeature: import("@tanstack/react-table").TableFeature;
60
102
  rowPinningFeature: import("@tanstack/react-table").TableFeature;
103
+ cellSelectionFeature: import("@tanstack/react-table").TableFeature;
61
104
  sortedRowModel: (table: Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
62
105
  filteredRowModel: (table: Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
63
106
  paginatedRowModel: (table: Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
@@ -75,7 +118,7 @@ declare const dataGridFeatures: {
75
118
  columnMeta: DataGridColumnMeta<any>;
76
119
  };
77
120
  /** The feature set `dataGridFeatures` registers. */
78
- type DataGridFeatures = typeof dataGridFeatures;
121
+ export type DataGridFeatures = typeof dataGridFeatures;
79
122
  /**
80
123
  * The grid's internal view of the table.
81
124
  *
@@ -86,17 +129,43 @@ type DataGridFeatures = typeof dataGridFeatures;
86
129
  * table is widened to this concrete type exactly once, on the way into
87
130
  * context, and every internal component reads it from there.
88
131
  */
89
- type DataGridTableInstance<TData extends object> = ReactTable<DataGridFeatures, TData>;
132
+ export type DataGridTableInstance<TData extends object> = ReactTable<DataGridFeatures, TData>;
90
133
  /** Label for headers / column visibility: `meta.headerTitle`, string `columnDef.header`, or `column.id`. */
91
- declare function getColumnHeaderLabel<TData extends RowData, TValue>(column: Column<DataGridFeatures, TData, TValue>): string;
92
- type DataGridApiFetchParams = {
134
+ export declare function getColumnHeaderLabel<TData extends RowData, TValue>(column: Column<DataGridFeatures, TData, TValue>): string;
135
+ /**
136
+ * The td contract for spreadsheet selection. Call inside a
137
+ * `Subscribe source={table.atoms.cellSelection}` render only: the reads are
138
+ * builder calls whose state dependency React Compiler cannot see, exactly the
139
+ * trap the row-selection checkbox documents.
140
+ */
141
+ export declare function getDataGridCellSelectionCellAttrs<TData extends object>(cell: Cell<DataGridFeatures, TData, unknown>): {
142
+ "aria-selected": boolean;
143
+ "data-col-id": string;
144
+ "data-cell-selected": true | undefined;
145
+ "data-cell-focused": true | undefined;
146
+ "data-cell-edge-top": true | undefined;
147
+ "data-cell-edge-right": true | undefined;
148
+ "data-cell-edge-bottom": true | undefined;
149
+ "data-cell-edge-left": true | undefined;
150
+ };
151
+ /**
152
+ * Selection chrome for a body td, activated by the data attributes above plus
153
+ * the imperatively toggled `data-cell-fill-target` (fill-drag preview, written
154
+ * outside React like the resize indicator). A ::before overlay, not outline
155
+ * or box-shadow: an outline ring hugs the cell box and cannot line up with
156
+ * the gridlines the perimeter paints on, and the pinned-column dividers
157
+ * already own the cell's shadow slot (tailwind-merge would collapse a second
158
+ * shadow-[...] into it).
159
+ */
160
+ export declare const dataGridCellSelectionCellClasses: string;
161
+ export type DataGridApiFetchParams = {
93
162
  pageIndex: number;
94
163
  pageSize: number;
95
164
  sorting?: SortingState;
96
165
  filters?: ColumnFiltersState;
97
166
  searchQuery?: string;
98
167
  };
99
- type DataGridApiResponse<T> = {
168
+ export type DataGridApiResponse<T> = {
100
169
  data: T[];
101
170
  empty: boolean;
102
171
  pagination: {
@@ -109,39 +178,196 @@ type DataGridApiResponse<T> = {
109
178
  * itself. Kept feature-agnostic: layout and messaging never depend on which
110
179
  * TanStack features the consumer registered.
111
180
  */
112
- type DataGridLayoutProps<TData extends object> = Omit<DataGridProps<TableFeatures, TData>, "table" | "children">;
113
- interface DataGridContextProps<TData extends object> {
181
+ export type DataGridLayoutProps<TData extends object> = Omit<DataGridProps<TableFeatures, TData>, "table" | "children">;
182
+ export interface DataGridContextProps<TData extends object> {
114
183
  props: DataGridLayoutProps<TData>;
115
184
  table: DataGridTableInstance<TData>;
116
185
  recordCount: number;
117
186
  isLoading: boolean;
187
+ /** Stable per-grid prefix for the DOM ids ARIA relations point at. */
188
+ gridId: string;
189
+ /** The merged label set; components read `i18n.labels.<key>`. */
190
+ i18n: DataGridI18nConfig;
118
191
  /**
119
192
  * Internal coordinator for `meta.autoSize` columns. Lives at the core level
120
193
  * so every table variant and viewport instance shares one application state.
121
194
  */
122
195
  autoSize?: DataGridAutoSizeController;
123
196
  }
124
- type DataGridAutoSizeController = {
197
+ /**
198
+ * Row and column ids are consumer strings; DOM ids cannot carry spaces or
199
+ * quotes. One shared sanitizer so `aria-activedescendant` writers and the id
200
+ * renderers always agree on the same encoding.
201
+ */
202
+ export declare function toDataGridDomId(value: string): string;
203
+ export type DataGridAutoSizeController = {
125
204
  /**
126
- * Grows the first visible `meta.autoSize` column by the given free space.
127
- * Applies at most once per column id; safe to call from every viewport
128
- * measurement. Returns true when a sizing update was dispatched.
205
+ * Feeds the controller one viewport measurement: the SIGNED free space
206
+ * between the scroll container and the table, negative while the table
207
+ * overflows. The first sight of a `meta.autoSize` column absorbs the
208
+ * free space into its width; after that, every measurement REFLOWS the
209
+ * same growth - a wider window widens the column, a narrower one gives
210
+ * the space back down to the column's `minSize` (or its starting width
211
+ * when none is set) - so the grid tracks its container live. Commits
212
+ * are coalesced for performance: sub-pixel deltas are dropped, a
213
+ * streaming resize gets one leading commit plus one trailing commit at
214
+ * settle, and a width the user dragged is never touched. Safe to call
215
+ * from every viewport measurement; returns true when a sizing update
216
+ * was dispatched.
129
217
  */
130
- apply: (fillWidth: number) => boolean;
218
+ apply: (freeSpace: number) => boolean;
131
219
  };
132
- type DataGridRequestParams = {
220
+ export type DataGridRequestParams = {
133
221
  pageIndex: number;
134
222
  pageSize: number;
135
223
  sorting?: SortingState;
136
224
  columnFilters?: ColumnFiltersState;
137
225
  };
138
- interface DataGridProps<TFeatures extends TableFeatures, TData extends object> {
226
+ /** Which spreadsheet operation produced a cell change batch. */
227
+ export type DataGridCellsChangeSource = "paste" | "cut" | "clear" | "fill" | "edit";
228
+ export interface DataGridCellChange<TData> {
229
+ rowId: string;
230
+ columnId: string;
231
+ /** The consumer's row object, so immutable write-back needs no second lookup. */
232
+ row: TData;
233
+ /** Accessor value at dispatch time; enables consumer-side undo stacks. */
234
+ previousValue: unknown;
235
+ /** Typed value produced by `meta.cellEdit.parse`, or `clearValue` for clear/cut. */
236
+ value: unknown;
237
+ }
238
+ /** What onCellsCopy receives after the grid writes the clipboard. */
239
+ export interface DataGridCopyDetails {
240
+ /** The TSV text that reached the clipboard. */
241
+ text: string;
242
+ /** The same content as a row-major grid of formatted fields. */
243
+ grid: string[][];
244
+ /** True when the write came from a cut, which clears the region next. */
245
+ cut: boolean;
246
+ }
247
+ /** One resolved positive region, in pre-paginated display indexes. */
248
+ export interface DataGridCellSelectionBound {
249
+ minRowIndex: number;
250
+ maxRowIndex: number;
251
+ minColumnIndex: number;
252
+ maxColumnIndex: number;
253
+ }
254
+ /** What onCellSelectionChange receives, resolved from the live selection. */
255
+ export interface DataGridCellSelectionSnapshot {
256
+ /** The virtually focused cell, the active range's anchor. Null when clear. */
257
+ focused: {
258
+ rowId: string;
259
+ columnId: string;
260
+ } | null;
261
+ /** Every positive region, geometric order. */
262
+ bounds: DataGridCellSelectionBound[];
263
+ /** The most recent region, the one copy and paste act on. */
264
+ activeBound: DataGridCellSelectionBound | null;
265
+ /**
266
+ * Cells of the selection the view can show - the count that matches the
267
+ * painted range and what a batch will touch.
268
+ */
269
+ visibleCellCount: number;
270
+ }
271
+ export interface DataGridCellRejection {
272
+ rowId: string;
273
+ columnId: string;
274
+ raw: string;
275
+ reason: "readonly" | "invalid";
276
+ }
277
+ /**
278
+ * Lifecycle of a row for the optional CRUD indications: "new" and "dirty"
279
+ * tint the row, "deleted" mutes and strikes it. Purely presentational - the
280
+ * consumer's state stays the only owner of what the statuses mean.
281
+ */
282
+ export type DataGridRowStatus = "new" | "dirty" | "deleted";
283
+ /**
284
+ * Lifecycle of a cell for the optional CRUD indications: a corner mark in
285
+ * the amber tone for "dirty", the destructive tone for "invalid".
286
+ */
287
+ export type DataGridCellStatus = "dirty" | "invalid";
288
+ /**
289
+ * Asks the consumer to open its editor for the focused cell: Enter or F2, or
290
+ * a typed printable character (then `initialText` carries it, the
291
+ * Notion/Airtable type-to-replace flow). Dispatched only for cells whose
292
+ * column is writable via `meta.cellEdit`.
293
+ */
294
+ export interface DataGridCellEditRequest<TData> {
295
+ rowId: string;
296
+ columnId: string;
297
+ row: TData;
298
+ previousValue: unknown;
299
+ /** The typed character that started the edit; absent for Enter and F2. */
300
+ initialText?: string;
301
+ }
302
+ /**
303
+ * One batch per operation, however many cells it spans: a 10k-cell paste is
304
+ * one callback, one consumer setState, one table rebuild. The grid never
305
+ * writes data itself.
306
+ */
307
+ export interface DataGridCellsChangeDetails<TData> {
308
+ source: DataGridCellsChangeSource;
309
+ changes: DataGridCellChange<TData>[];
310
+ rejected: DataGridCellRejection[];
311
+ }
312
+ export interface DataGridProps<TFeatures extends TableFeatures, TData extends object> {
139
313
  className?: string;
140
314
  table?: Table<TFeatures, TData>;
141
315
  recordCount: number;
142
316
  children?: ReactNode;
143
317
  onRowClick?: (row: TData) => void;
318
+ /**
319
+ * Receives every spreadsheet write batch (paste, cut, clear, fill, edit).
320
+ * Served through the props getter like `onRowClick`, so an inline identity
321
+ * never republishes the context. Absent: copy still works, writes no-op.
322
+ */
323
+ onCellsChange?: (details: DataGridCellsChangeDetails<TData>) => void;
324
+ /**
325
+ * Opens the consumer's editor from the keyboard: Enter, F2, or typing on
326
+ * the focused cell. Absent: Enter keeps moving down, typing does nothing.
327
+ */
328
+ onCellEditRequest?: (request: DataGridCellEditRequest<TData>) => void;
329
+ /**
330
+ * Fires on every cell-selection change (focus moves, ranges grow or
331
+ * clear) with a resolved snapshot, so a selection count, formula bar or
332
+ * context panel needs no reach into TanStack internals.
333
+ */
334
+ onCellSelectionChange?: (snapshot: DataGridCellSelectionSnapshot) => void;
335
+ /**
336
+ * Fires after the grid writes the clipboard (Cmd/Ctrl+C or X, or the
337
+ * native copy and cut events), e.g. to confirm with a toast.
338
+ */
339
+ onCellsCopy?: (details: DataGridCopyDetails) => void;
340
+ /**
341
+ * Renders an "Add row" affordance as the table body's last row; clicking
342
+ * it is the consumer's cue to start creating a row. Absent: no row.
343
+ */
344
+ onRowCreate?: () => void;
345
+ /** Label of the onRowCreate affordance. Defaults to "Add row". */
346
+ rowCreateLabel?: ReactNode;
347
+ /**
348
+ * Rendered inside the table body after the data rows: the slot a DRAFT
349
+ * row lives in while it is being created, before it joins `data` and the
350
+ * pagination math. Supply a `<tr>` of cells; the colgroup sizes them.
351
+ */
352
+ appendRow?: ReactNode;
353
+ /**
354
+ * Optional CRUD indication per row. Return undefined for no indication;
355
+ * omit the prop entirely to render none anywhere.
356
+ */
357
+ getRowStatus?: (row: TData) => DataGridRowStatus | undefined;
358
+ /**
359
+ * Optional CRUD indication per cell: the classic corner mark on cells the
360
+ * consumer tracks as edited or invalid.
361
+ */
362
+ getCellStatus?: (row: TData, columnId: string) => DataGridCellStatus | undefined;
144
363
  isLoading?: boolean;
364
+ /**
365
+ * Overrides for every built-in string: menu items, aria labels,
366
+ * pagination copy, state messages. Merged over the defaults; a more
367
+ * specific component prop (`rowCreateLabel`, `loadingMessage`, the
368
+ * pagination label props) still wins over its `i18n` counterpart.
369
+ */
370
+ i18n?: DataGridI18nOverrides;
145
371
  loadingMode?: "skeleton" | "spinner";
146
372
  loadingMessage?: ReactNode | string;
147
373
  fetchingMoreMessage?: ReactNode | string;
@@ -166,6 +392,36 @@ interface DataGridProps<TFeatures extends TableFeatures, TData extends object> {
166
392
  columnsDraggable?: boolean;
167
393
  rowsDraggable?: boolean;
168
394
  rowsPinnable?: boolean;
395
+ /** Spreadsheet cell range selection: mouse ranges, keyboard, clipboard chrome. */
396
+ cellSelection?: boolean;
397
+ /**
398
+ * "range" (default): drag, Shift and Ctrl/Cmd gestures and Shift+keys
399
+ * grow multi-cell regions. "single": one focused cell only - every
400
+ * gesture collapses to it and Ctrl/Cmd+A is inert.
401
+ */
402
+ cellSelectionMode?: "single" | "range";
403
+ /** Drag-to-fill handle on the selection corner. Requires cellSelection. */
404
+ cellFillHandle?: boolean;
405
+ /**
406
+ * How a cell opens its editor from the mouse: "dblclick" (default,
407
+ * the spreadsheet standard - first click focuses, second edits) or
408
+ * "click", opening the editor as soon as a plain click lands on the
409
+ * focused cell; modifier clicks and drags still select.
410
+ */
411
+ cellEditMode?: "dblclick" | "click";
412
+ /**
413
+ * When true, committing an edit with Enter moves focus down (Shift+Enter
414
+ * up), the Sheets and Excel convention. Off by default: the commit keeps
415
+ * focus on the edited cell. Tab always commits and moves across.
416
+ */
417
+ cellEditEnterAdvance?: boolean;
418
+ /**
419
+ * The handle's look: "dot" is a solid primary dot kept inside the
420
+ * cell corner; "ring" is the Sheets-style hollow circle riding the
421
+ * corner point, clamped at the grid's own boundary; "square" is the
422
+ * Excel-style solid square inside the corner. Default "dot".
423
+ */
424
+ cellFillHandleVariant?: "dot" | "ring" | "square";
169
425
  };
170
426
  tableClassNames?: {
171
427
  base?: string;
@@ -176,6 +432,20 @@ interface DataGridProps<TFeatures extends TableFeatures, TData extends object> {
176
432
  bodyRow?: string;
177
433
  footer?: string;
178
434
  edgeCell?: string;
435
+ /** Override the getRowStatus tints; defaults are the warning-muted set. */
436
+ rowNew?: string;
437
+ rowDirty?: string;
438
+ rowDeleted?: string;
439
+ /**
440
+ * Override the pinned-row chrome (muted tint, boundary shadow). A grid
441
+ * that pins a draft row for quick-create wants it to read as an active
442
+ * row, not a muted one.
443
+ */
444
+ rowPinned?: string;
445
+ /** The onRowCreate affordance row, e.g. to match the grid's row height. */
446
+ rowCreate?: string;
447
+ /** The fill handle, e.g. to restyle or resize it beyond the built-in variants. */
448
+ cellFillHandle?: string;
179
449
  };
180
450
  }
181
451
  /**
@@ -197,5 +467,5 @@ declare function DataGridContainer({ children, className }: {
197
467
  border?: boolean;
198
468
  }): import("react").JSX.Element;
199
469
  //#endregion
200
- export { DataGrid, DataGridApiFetchParams, DataGridApiResponse, DataGridAutoSizeController, DataGridColumnMeta, DataGridContainer, DataGridContextProps, DataGridFeatures, DataGridLayoutProps, DataGridProps, DataGridProvider, DataGridRequestParams, DataGridTableInstance, dataGridFeatures, getColumnHeaderLabel, useDataGrid };
470
+ export { DataGrid, DataGridContainer, DataGridProvider, useDataGrid };
201
471
  //# sourceMappingURL=data-grid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-grid.d.ts","names":[],"sources":["../../../../src/components/reui/data-grid/data-grid.tsx"],"mappings":";;;;;;;;;;;UAqDiB,mBAAmB;EAClC;EACA;EACA;EACA,WAAW;EACX,mBAAmB,KAAK,UAAU;EAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2CD,0BAA0B;;;;;;;;;;;KAY1B,sBAAsB,wBAAwB,WAAW,kBAAkB;;iBAGvE,qBAAqB,cAAc,SAAS,QAC1D,QAAQ,OAAO,kBAAkB,OAAO;KAS9B;EACV;EACA;EACA,UAAU;EACV,UAAU;EACV;;KAGU,oBAAoB;EAC9B,MAAM;EACN;EACA;IACE;IACA;;;;;;;;KASQ,oBAAoB,wBAAwB,KACtD,cAAc,eAAe;UAId,qBAAqB;EACpC,OAAO,oBAAoB;EAC3B,OAAO,sBAAsB;EAC7B;EACA;;;;;EAKA,WAAW;;KAGD;;;;;;EAMV,QAAQ;;KA8EE;EACV;EACA;EACA,UAAU;EACV,gBAAgB;;UAGD,cAAc,kBAAkB,eAAe;EAC9D;EACA,QAAQ,MAAM,WAAW;EACzB;EACA,WAAW;EACX,cAAc,KAAK;EACnB;EACA;EACA,iBAAiB;EACjB,sBAAsB;EACtB,uBAAuB;EACvB,eAAe;EACf;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;;;;;;;iBAeK,YAEP,+BACG,qBAAqB;iBAQjB,iBAAiB,wBACxB,UACA,UACG,SACF,oBAAoB;EACrB,OAAO,sBAAsB;EAC7B,WAAW;oBACZ,IAAA;iBAwEQ,SAAS,kBAAkB,eAAe,wBACjD,UACA,UACG,SACF,cAAc,WAAW,yBAAM,IAAA;iBAuEzB,oBACP,UACA;EAEA,UAAU;EACV;;EAEA;oBACD,IAAA"}
1
+ {"version":3,"file":"data-grid.d.ts","names":[],"sources":["../../../../src/components/reui/data-grid/data-grid.tsx"],"mappings":";;;;;;;;;;;;;;;;;iBAiEiB,uBAAuB;;;;;;EAMtC,uBAAuB,KAAK;;;;;;;EAO5B,SAAS,aAAa,KAAK;;EAE3B,UAAU,gBAAgB,KAAK;;EAE/B;;;;;;;;EAQA;;iBAGe,mBAAmB;EAClC;EACA;EACA;EACA,WAAW;EACX,mBAAmB,KAAK,UAAU;EAClC;EACA,WAAW,uBAAuB;;;;;;;;EAQlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8BW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA+CD,0BAA0B;;;;;;;;;;;YAY1B,sBAAsB,wBAAwB,WAAW,kBAAkB;;wBAGvE,qBAAqB,cAAc,SAAS,QAC1D,QAAQ,OAAO,kBAAkB,OAAO;;;;;;;wBAe1B,kCAAkC,sBAChD,MAAM,KAAK,kBAAkB;EAE7B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;qBAyBW;YAoFD;EACV;EACA;EACA,UAAU;EACV,UAAU;EACV;;YAGU,oBAAoB;EAC9B,MAAM;EACN;EACA;IACE;IACA;;;;;;;;YASQ,oBAAoB,wBAAwB,KACtD,cAAc,eAAe;iBAId,qBAAqB;EACpC,OAAO,oBAAoB;EAC3B,OAAO,sBAAsB;EAC7B;EACA;;EAEA;;EAEA,MAAM;;;;;EAKN,WAAW;;;;;;;wBAQG,gBAAgB;YAIpB;;;;;;;;;;;;;;;EAeV,QAAQ;;YA8KE;EACV;EACA;EACA,UAAU;EACV,gBAAgB;;;YAIN;iBAEK,mBAAmB;EAClC;EACA;;EAEA,KAAK;;EAEL;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;;iBAIe;EACf;EACA;EACA;EACA;;;iBAIe;;EAEf;IAAW;IAAe;;;EAE1B,QAAQ;;EAER,aAAa;;;;;EAKb;;iBAGe;EACf;EACA;EACA;EACA;;;;;;;YAQU;;;;;YAMA;;;;;;;iBAQK,wBAAwB;EACvC;EACA;EACA,KAAK;EACL;;EAEA;;;;;;;iBAQe,2BAA2B;EAC1C,QAAQ;EACR,SAAS,mBAAmB;EAC5B,UAAU;;iBAGK,cAAc,kBAAkB,eAAe;EAC9D;EACA,QAAQ,MAAM,WAAW;EACzB;EACA,WAAW;EACX,cAAc,KAAK;;;;;;EAMnB,iBAAiB,SAAS,2BAA2B;;;;;EAKrD,qBAAqB,SAAS,wBAAwB;;;;;;EAMtD,yBAAyB,UAAU;;;;;EAKnC,eAAe,SAAS;;;;;EAKxB;;EAEA,iBAAiB;;;;;;EAMjB,YAAY;;;;;EAKZ,gBAAgB,KAAK,UAAU;;;;;EAK/B,iBAAiB,KAAK,OAAO,qBAAqB;EAClD;;;;;;;EAOA,OAAO;EACP;EACA,iBAAiB;EACjB,sBAAsB;EACtB,uBAAuB;EACvB,eAAe;EACf;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;;;;;;IAMA;;IAEA;;;;;;;IAOA;;;;;;IAMA;;;;;;;IAOA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;;;;;;IAMA;;IAEA;;IAEA;;;;;;;;;iBAcK,YAEP,+BACG,qBAAqB;iBAQjB,iBAAiB,wBACxB,UACA,UACG,SACF,oBAAoB;EACrB,OAAO,sBAAsB;EAC7B,WAAW;oBACZ,IAAA;iBA4GQ,SAAS,kBAAkB,eAAe,wBACjD,UACA,UACG,SACF,cAAc,WAAW,yBAAM,IAAA;iBAyEzB,oBACP,UACA;EAEA,UAAU;EACV;;EAEA;oBACD,IAAA"}
@@ -1,8 +1,9 @@
1
1
  "use client";
2
- import { createContext, useContext, useEffect, useMemo, useRef } from "react";
2
+ import { mergeDataGridI18n } from "./data-grid-i18n.js";
3
+ import { createContext, useContext, useEffect, useId, useMemo, useRef } from "react";
3
4
  import { cn } from "@kumix/utils";
4
5
  import { jsx } from "react/jsx-runtime";
5
- import { columnFacetingFeature, columnFilteringFeature, columnOrderingFeature, columnPinningFeature, columnResizingFeature, columnSizingFeature, columnVisibilityFeature, createExpandedRowModel, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, globalFilteringFeature, metaHelper, rowExpandingFeature, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, tableFeatures } from "@tanstack/react-table";
6
+ import { cellSelectionFeature, columnFacetingFeature, columnFilteringFeature, columnOrderingFeature, columnPinningFeature, columnResizingFeature, columnSizingFeature, columnVisibilityFeature, createExpandedRowModel, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, globalFilteringFeature, metaHelper, rowExpandingFeature, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, tableFeatures } from "@tanstack/react-table";
6
7
  //#region src/components/reui/data-grid/data-grid.tsx
7
8
  /**
8
9
  * The batteries-included feature bundle every ReUI data-grid example builds
@@ -45,6 +46,7 @@ const dataGridFeatures = tableFeatures({
45
46
  rowSelectionFeature,
46
47
  rowExpandingFeature,
47
48
  rowPinningFeature,
49
+ cellSelectionFeature,
48
50
  sortedRowModel: createSortedRowModel(),
49
51
  filteredRowModel: createFilteredRowModel(),
50
52
  paginatedRowModel: createPaginatedRowModel(),
@@ -69,21 +71,122 @@ function getColumnHeaderLabel(column) {
69
71
  if (typeof defHeader === "string") return defHeader;
70
72
  return String(column.id);
71
73
  }
74
+ /**
75
+ * The td contract for spreadsheet selection. Call inside a
76
+ * `Subscribe source={table.atoms.cellSelection}` render only: the reads are
77
+ * builder calls whose state dependency React Compiler cannot see, exactly the
78
+ * trap the row-selection checkbox documents.
79
+ */
80
+ function getDataGridCellSelectionCellAttrs(cell) {
81
+ const selected = cell.getIsSelected();
82
+ const edges = cell.getSelectionEdges();
83
+ return {
84
+ "aria-selected": selected,
85
+ "data-col-id": cell.column.id,
86
+ "data-cell-selected": selected || void 0,
87
+ "data-cell-focused": cell.getIsFocused() || void 0,
88
+ "data-cell-edge-top": edges.top || void 0,
89
+ "data-cell-edge-right": edges.right || void 0,
90
+ "data-cell-edge-bottom": edges.bottom || void 0,
91
+ "data-cell-edge-left": edges.left || void 0
92
+ };
93
+ }
94
+ /**
95
+ * Selection chrome for a body td, activated by the data attributes above plus
96
+ * the imperatively toggled `data-cell-fill-target` (fill-drag preview, written
97
+ * outside React like the resize indicator). A ::before overlay, not outline
98
+ * or box-shadow: an outline ring hugs the cell box and cannot line up with
99
+ * the gridlines the perimeter paints on, and the pinned-column dividers
100
+ * already own the cell's shadow slot (tailwind-merge would collapse a second
101
+ * shadow-[...] into it).
102
+ */
103
+ const dataGridCellSelectionCellClasses = cn("relative select-none", "data-[cell-selected]:bg-primary/4", "data-[cell-selected]:data-pinned:bg-[color-mix(in_oklab,var(--primary)_4%,var(--background))]", "data-[cell-focused]:bg-transparent!", "data-[cell-focused]:data-pinned:bg-background!", "data-[cell-selected]:before:pointer-events-none data-[cell-selected]:before:absolute data-[cell-selected]:before:start-[var(--data-grid-overlay-start,-1px)] data-[cell-selected]:before:end-[var(--data-grid-overlay-end,-1px)] data-[cell-selected]:before:top-[var(--data-grid-overlay-top,-1px)] data-[cell-selected]:before:bottom-[var(--data-grid-overlay-bottom,-1px)] data-[cell-selected]:before:border-primary data-[cell-selected]:before:content-['']", "data-[cell-focused]:before:pointer-events-none data-[cell-focused]:before:absolute data-[cell-focused]:before:start-[var(--data-grid-overlay-start,-1px)] data-[cell-focused]:before:end-[var(--data-grid-overlay-end,-1px)] data-[cell-focused]:before:top-[var(--data-grid-overlay-top,-1px)] data-[cell-focused]:before:bottom-[var(--data-grid-overlay-bottom,-1px)] data-[cell-focused]:before:border-primary data-[cell-focused]:before:content-['']", "data-[cell-selected]:before:border-e data-[cell-selected]:before:border-b", "data-[cell-selected]:not-data-[cell-edge-right]:before:border-e-border", "data-[cell-selected]:not-data-[cell-edge-bottom]:before:border-b-border", "data-[cell-focused]:not-data-[cell-selected]:before:border", "data-[cell-edge-left]:before:border-s data-[cell-edge-right]:before:border-e data-[cell-edge-top]:before:border-t data-[cell-edge-bottom]:before:border-b", "in-data-[cell-filling]:data-[cell-selected]:before:hidden", "in-data-[cell-filling]:data-[cell-focused]:before:hidden", "in-data-[cell-editing]:data-[cell-focused]:before:hidden", "in-[tr:last-child]:[--data-grid-overlay-bottom:0px]", "in-[tr:first-child]:[--data-grid-overlay-top:0px]", "first:[--data-grid-overlay-start:0px]", "last:[--data-grid-overlay-end:0px]", "[&:has(+td[data-pinned])]:[--data-grid-overlay-end:0px]", "[&:has(+[data-slot=data-grid-table-fill-body-cell]:last-child)]:[--data-grid-overlay-end:0px]", "[&:has(+[data-slot=data-grid-table-fill-body-cell]+td[data-pinned])]:[--data-grid-overlay-end:0px]", "[td[data-pinned]+&]:[--data-grid-overlay-start:0px]", "data-[cell-fill-target]:bg-primary/4", "data-[cell-fill-target]:data-pinned:bg-[color-mix(in_oklab,var(--primary)_4%,var(--background))]");
104
+ /**
105
+ * Row and column ids are consumer strings; DOM ids cannot carry spaces or
106
+ * quotes. One shared sanitizer so `aria-activedescendant` writers and the id
107
+ * renderers always agree on the same encoding.
108
+ */
109
+ function toDataGridDomId(value) {
110
+ return value.replace(/[^\w-]/g, "_");
111
+ }
112
+ /**
113
+ * Bookkeeping keyed on the TABLE STORE, never on a React instance: dev
114
+ * StrictMode double-mounts the tree, so two controller instances serve one
115
+ * page and only the first would remember what it absorbed - the second
116
+ * reads the grown width as a user drag and freezes the column. The store
117
+ * object is the one identity that provably survives that dance (the
118
+ * absorbed sizing rides inside it), and the WeakMap lets a discarded
119
+ * table take its bookkeeping with it.
120
+ */
121
+ const dataGridAutoSizeStates = /* @__PURE__ */ new WeakMap();
122
+ function getDataGridAutoSizeState(store) {
123
+ let state = dataGridAutoSizeStates.get(store);
124
+ if (!state) {
125
+ state = {
126
+ applied: null,
127
+ settleTimer: null,
128
+ pendingFreeSpace: 0,
129
+ lastCommitAt: 0
130
+ };
131
+ dataGridAutoSizeStates.set(store, state);
132
+ }
133
+ return state;
134
+ }
72
135
  function createDataGridAutoSizeController(getTable) {
73
- let applied = null;
74
- return { apply(fillWidth) {
136
+ const SETTLE_MS = 150;
137
+ const reflow = (freeSpace) => {
75
138
  const table = getTable();
76
- const columnSizing = table.state.columnSizing;
77
- if (applied && columnSizing[applied.columnId] === void 0) applied = null;
78
- if (fillWidth <= 0) return false;
139
+ const state = getDataGridAutoSizeState(table.store);
140
+ const columnSizing = table.atoms.columnSizing?.get() ?? table.state.columnSizing;
141
+ if (!state.applied) return false;
142
+ const autoSizeColumn = table.getVisibleLeafColumns().find((column) => column.columnDef.meta?.autoSize && column.getCanResize());
143
+ if (!autoSizeColumn || autoSizeColumn.id !== state.applied.columnId) return false;
144
+ const currentSize = columnSizing[state.applied.columnId];
145
+ if (currentSize !== void 0 && currentSize !== state.applied.grown) return false;
146
+ const freeAtBase = freeSpace + (state.applied.grown - state.applied.base);
147
+ const floor = autoSizeColumn.columnDef.minSize ?? state.applied.base;
148
+ const target = Math.max(floor, state.applied.base + freeAtBase);
149
+ if (Math.abs(target - state.applied.grown) < 1) return false;
150
+ state.applied = {
151
+ ...state.applied,
152
+ grown: target
153
+ };
154
+ table.setColumnSizing((old) => ({
155
+ ...old,
156
+ [state.applied.columnId]: target
157
+ }));
158
+ return true;
159
+ };
160
+ return { apply(freeSpace) {
161
+ const table = getTable();
162
+ const state = getDataGridAutoSizeState(table.store);
163
+ const columnSizing = table.atoms.columnSizing?.get() ?? table.state.columnSizing;
164
+ if (state.applied && columnSizing[state.applied.columnId] === void 0) state.applied = null;
79
165
  const autoSizeColumn = table.getVisibleLeafColumns().find((column) => column.columnDef.meta?.autoSize && column.getCanResize());
80
- if (!autoSizeColumn || applied?.columnId === autoSizeColumn.id) return false;
166
+ if (autoSizeColumn && state.applied?.columnId === autoSizeColumn.id) {
167
+ state.pendingFreeSpace = freeSpace;
168
+ const now = Date.now();
169
+ if (now - state.lastCommitAt > SETTLE_MS) {
170
+ state.lastCommitAt = now;
171
+ return reflow(freeSpace);
172
+ }
173
+ if (state.settleTimer !== null) clearTimeout(state.settleTimer);
174
+ state.settleTimer = setTimeout(() => {
175
+ state.settleTimer = null;
176
+ state.lastCommitAt = Date.now();
177
+ reflow(state.pendingFreeSpace);
178
+ }, SETTLE_MS);
179
+ return false;
180
+ }
181
+ const fillWidth = Math.max(0, freeSpace);
182
+ if (fillWidth <= 0) return false;
183
+ if (!autoSizeColumn) return false;
81
184
  const currentSize = columnSizing[autoSizeColumn.id];
82
- if (currentSize !== void 0 && currentSize !== applied?.grown) return false;
83
- const revert = applied && columnSizing[applied.columnId] === applied.grown ? applied : null;
185
+ if (currentSize !== void 0 && currentSize !== state.applied?.grown) return false;
186
+ const revert = state.applied && columnSizing[state.applied.columnId] === state.applied.grown ? state.applied : null;
84
187
  const base = columnSizing[autoSizeColumn.id] ?? autoSizeColumn.getSize();
85
188
  const grown = base + fillWidth;
86
- applied = {
189
+ state.applied = {
87
190
  columnId: autoSizeColumn.id,
88
191
  base,
89
192
  grown
@@ -112,8 +215,12 @@ function useDataGrid() {
112
215
  return context;
113
216
  }
114
217
  function DataGridProvider({ children, table, ...props }) {
218
+ const gridId = useId();
115
219
  const propsRef = useRef(props);
116
220
  propsRef.current = props;
221
+ const i18n = mergeDataGridI18n(props.i18n);
222
+ const i18nRef = useRef(i18n);
223
+ i18nRef.current = i18n;
117
224
  const tableRef = useRef(table);
118
225
  tableRef.current = table;
119
226
  const resizeMode = props.tableLayout?.columnsResizable && props.tableLayout.columnsResizeMode ? props.tableLayout.columnsResizeMode : void 0;
@@ -125,6 +232,27 @@ function DataGridProvider({ children, table, ...props }) {
125
232
  columnResizeMode: resizeMode
126
233
  }));
127
234
  }, [table, resizeMode]);
235
+ const cellSelectionOn = !!props.tableLayout?.cellSelection;
236
+ useEffect(() => {
237
+ if (!cellSelectionOn || table.atoms.cellSelection == null) return;
238
+ if (table.options.autoResetCellSelection === false) return;
239
+ table.setOptions((old) => ({
240
+ ...old,
241
+ autoResetCellSelection: false
242
+ }));
243
+ }, [table, cellSelectionOn]);
244
+ const pageKey = `${table.state.pagination?.pageIndex}:${table.state.pagination?.pageSize}`;
245
+ const previousPageKeyRef = useRef(pageKey);
246
+ useEffect(() => {
247
+ if (previousPageKeyRef.current === pageKey) return;
248
+ previousPageKeyRef.current = pageKey;
249
+ if (!cellSelectionOn || table.atoms.cellSelection == null) return;
250
+ tableRef.current.resetCellSelection(true);
251
+ }, [
252
+ pageKey,
253
+ cellSelectionOn,
254
+ table.atoms.cellSelection
255
+ ]);
128
256
  const autoSize = useMemo(() => createDataGridAutoSizeController(() => tableRef.current), []);
129
257
  const value = useMemo(() => ({
130
258
  get props() {
@@ -133,13 +261,18 @@ function DataGridProvider({ children, table, ...props }) {
133
261
  get table() {
134
262
  return tableRef.current;
135
263
  },
264
+ get i18n() {
265
+ return i18nRef.current;
266
+ },
136
267
  recordCount: props.recordCount,
137
268
  isLoading: props.isLoading || false,
269
+ gridId,
138
270
  autoSize
139
271
  }), [
140
272
  autoSize,
141
273
  props.recordCount,
142
- props.isLoading
274
+ props.isLoading,
275
+ gridId
143
276
  ]);
144
277
  return /* @__PURE__ */ jsx(DataGridContext.Provider, {
145
278
  value,
@@ -166,7 +299,9 @@ function DataGrid({ children, table, ...props }) {
166
299
  columnsMovable: false,
167
300
  columnsDraggable: false,
168
301
  rowsDraggable: false,
169
- rowsPinnable: false
302
+ rowsPinnable: false,
303
+ cellSelection: false,
304
+ cellFillHandle: false
170
305
  },
171
306
  tableClassNames: {
172
307
  base: "",
@@ -201,11 +336,11 @@ function DataGrid({ children, table, ...props }) {
201
336
  function DataGridContainer({ children, className }) {
202
337
  return /* @__PURE__ */ jsx("div", {
203
338
  "data-slot": "data-grid",
204
- className: cn("w-full overflow-hidden", className),
339
+ className: cn("relative w-full overflow-hidden", className),
205
340
  children
206
341
  });
207
342
  }
208
343
  //#endregion
209
- export { DataGrid, DataGridContainer, DataGridProvider, dataGridFeatures, getColumnHeaderLabel, useDataGrid };
344
+ export { DataGrid, DataGridContainer, DataGridProvider, dataGridCellSelectionCellClasses, dataGridFeatures, getColumnHeaderLabel, getDataGridCellSelectionCellAttrs, toDataGridDomId, useDataGrid };
210
345
 
211
346
  //# sourceMappingURL=data-grid.js.map