@svgrid/grid 1.2.34 → 2.0.1

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 (444) hide show
  1. package/README.md +6 -5
  2. package/dist/SvAccordion.svelte +109 -0
  3. package/dist/SvAccordion.svelte.d.ts +28 -0
  4. package/dist/SvAlert.svelte +92 -0
  5. package/dist/SvAlert.svelte.d.ts +27 -0
  6. package/dist/SvAutoComplete.svelte +47 -18
  7. package/dist/SvAutoComplete.svelte.d.ts +2 -5
  8. package/dist/SvAvatar.svelte +75 -0
  9. package/dist/SvAvatar.svelte.d.ts +14 -0
  10. package/dist/SvAvatarGroup.svelte +48 -0
  11. package/dist/SvAvatarGroup.svelte.d.ts +16 -0
  12. package/dist/SvBadge.svelte +54 -0
  13. package/dist/SvBadge.svelte.d.ts +23 -0
  14. package/dist/SvBreadcrumb.svelte +88 -0
  15. package/dist/SvBreadcrumb.svelte.d.ts +23 -0
  16. package/dist/SvButtonGroup.svelte +121 -0
  17. package/dist/SvButtonGroup.svelte.d.ts +16 -0
  18. package/dist/SvCalendar.svelte +72 -9
  19. package/dist/SvCalendar.svelte.d.ts +34 -1
  20. package/dist/SvCard.svelte +71 -0
  21. package/dist/SvCard.svelte.d.ts +28 -0
  22. package/dist/SvCarousel.svelte +134 -0
  23. package/dist/SvCarousel.svelte.d.ts +28 -0
  24. package/dist/SvCheckBox.svelte +36 -21
  25. package/dist/SvCheckBox.svelte.d.ts +2 -5
  26. package/dist/SvChip.svelte +88 -0
  27. package/dist/SvChip.svelte.d.ts +31 -0
  28. package/dist/SvCircularProgress.svelte +109 -0
  29. package/dist/SvCircularProgress.svelte.d.ts +31 -0
  30. package/dist/SvColorInput.svelte +54 -27
  31. package/dist/SvColorInput.svelte.d.ts +10 -6
  32. package/dist/SvComboBox.svelte +119 -33
  33. package/dist/SvComboBox.svelte.d.ts +18 -6
  34. package/dist/SvCommand.svelte +197 -0
  35. package/dist/SvCommand.svelte.d.ts +26 -0
  36. package/dist/SvContextMenu.svelte +96 -0
  37. package/dist/SvContextMenu.svelte.d.ts +25 -0
  38. package/dist/SvCountryInput.svelte +56 -21
  39. package/dist/SvCountryInput.svelte.d.ts +9 -5
  40. package/dist/SvDateRangeInput.svelte +256 -0
  41. package/dist/SvDateRangeInput.svelte.d.ts +37 -0
  42. package/dist/SvDateTimePicker.svelte +57 -20
  43. package/dist/SvDateTimePicker.svelte.d.ts +12 -4
  44. package/dist/SvDivider.svelte +61 -0
  45. package/dist/SvDivider.svelte.d.ts +22 -0
  46. package/dist/SvDrawer.svelte +226 -0
  47. package/dist/SvDrawer.svelte.d.ts +43 -0
  48. package/dist/SvDropDownList.svelte +114 -35
  49. package/dist/SvDropDownList.svelte.d.ts +7 -6
  50. package/dist/SvDurationInput.svelte +108 -0
  51. package/dist/SvDurationInput.svelte.d.ts +15 -0
  52. package/dist/SvEmptyState.svelte +59 -0
  53. package/dist/SvEmptyState.svelte.d.ts +25 -0
  54. package/dist/SvField.svelte +85 -0
  55. package/dist/SvField.svelte.d.ts +30 -0
  56. package/dist/SvFileUpload.svelte +169 -0
  57. package/dist/SvFileUpload.svelte.d.ts +24 -0
  58. package/dist/SvForm.svelte +7 -1
  59. package/dist/SvForm.svelte.d.ts +3 -0
  60. package/dist/SvGauge.svelte +7 -1
  61. package/dist/SvGauge.svelte.d.ts +11 -0
  62. package/dist/SvGrid.controller.svelte.d.ts +6 -0
  63. package/dist/SvGrid.controller.svelte.js +64 -9
  64. package/dist/SvGrid.css +33 -0
  65. package/dist/SvGrid.svelte +116 -3
  66. package/dist/SvGrid.types.d.ts +366 -0
  67. package/dist/SvGridBoard.svelte +2281 -0
  68. package/dist/SvGridBoard.svelte.d.ts +31 -0
  69. package/dist/SvGridDropdown.svelte +2 -1
  70. package/dist/SvGridSelect.svelte +255 -0
  71. package/dist/SvGridSelect.svelte.d.ts +32 -0
  72. package/dist/SvGroupCell.svelte +109 -0
  73. package/dist/SvGroupCell.svelte.d.ts +41 -0
  74. package/dist/SvListBox.svelte +123 -36
  75. package/dist/SvListBox.svelte.d.ts +12 -8
  76. package/dist/SvMaskedInput.svelte +53 -13
  77. package/dist/SvMaskedInput.svelte.d.ts +16 -6
  78. package/dist/SvMenu.svelte +101 -0
  79. package/dist/SvMenu.svelte.d.ts +26 -0
  80. package/dist/SvMenuList.svelte +143 -0
  81. package/dist/SvMenuList.svelte.d.ts +24 -0
  82. package/dist/SvModal.svelte +220 -0
  83. package/dist/SvModal.svelte.d.ts +31 -0
  84. package/dist/SvMultiSelect.svelte +277 -0
  85. package/dist/SvMultiSelect.svelte.d.ts +31 -0
  86. package/dist/SvNavPane.svelte +314 -0
  87. package/dist/SvNavPane.svelte.d.ts +59 -0
  88. package/dist/SvNumberInput.svelte +23 -9
  89. package/dist/SvNumberInput.svelte.d.ts +2 -0
  90. package/dist/SvOtpInput.svelte +157 -0
  91. package/dist/SvOtpInput.svelte.d.ts +16 -0
  92. package/dist/SvPagination.svelte +100 -0
  93. package/dist/SvPagination.svelte.d.ts +16 -0
  94. package/dist/SvPasswordInput.svelte +42 -12
  95. package/dist/SvPasswordInput.svelte.d.ts +13 -6
  96. package/dist/SvPhoneInput.svelte +43 -11
  97. package/dist/SvPhoneInput.svelte.d.ts +10 -11
  98. package/dist/SvPopover.svelte +127 -0
  99. package/dist/SvPopover.svelte.d.ts +35 -0
  100. package/dist/SvProgress.svelte +116 -0
  101. package/dist/SvProgress.svelte.d.ts +32 -0
  102. package/dist/SvRadioGroup.svelte +40 -22
  103. package/dist/SvRadioGroup.svelte.d.ts +2 -10
  104. package/dist/SvRating.svelte +51 -30
  105. package/dist/SvRating.svelte.d.ts +10 -7
  106. package/dist/SvRichText.svelte +192 -0
  107. package/dist/SvRichText.svelte.d.ts +16 -0
  108. package/dist/SvRowGroupPanel.svelte +147 -0
  109. package/dist/SvRowGroupPanel.svelte.d.ts +17 -0
  110. package/dist/SvScrollArea.svelte +50 -0
  111. package/dist/SvScrollArea.svelte.d.ts +22 -0
  112. package/dist/SvSkeleton.svelte +76 -0
  113. package/dist/SvSkeleton.svelte.d.ts +25 -0
  114. package/dist/SvSlider.svelte +41 -9
  115. package/dist/SvSlider.svelte.d.ts +4 -4
  116. package/dist/SvSparkline.svelte +77 -0
  117. package/dist/SvSparkline.svelte.d.ts +28 -0
  118. package/dist/SvSplitter.svelte +138 -0
  119. package/dist/SvSplitter.svelte.d.ts +32 -0
  120. package/dist/SvStat.svelte +86 -0
  121. package/dist/SvStat.svelte.d.ts +30 -0
  122. package/dist/SvStepper.svelte +91 -0
  123. package/dist/SvStepper.svelte.d.ts +24 -0
  124. package/dist/SvSwitchButton.svelte +39 -24
  125. package/dist/SvSwitchButton.svelte.d.ts +2 -5
  126. package/dist/SvTabs.svelte +147 -28
  127. package/dist/SvTabs.svelte.d.ts +16 -4
  128. package/dist/SvTagsInput.svelte +59 -22
  129. package/dist/SvTagsInput.svelte.d.ts +9 -4
  130. package/dist/SvTextArea.svelte +113 -0
  131. package/dist/SvTextArea.svelte.d.ts +18 -0
  132. package/dist/SvTextInput.svelte +115 -0
  133. package/dist/SvTextInput.svelte.d.ts +20 -0
  134. package/dist/SvTimePicker.svelte +19 -5
  135. package/dist/SvTimePicker.svelte.d.ts +12 -0
  136. package/dist/SvTimeline.svelte +75 -0
  137. package/dist/SvTimeline.svelte.d.ts +24 -0
  138. package/dist/SvToaster.svelte +124 -0
  139. package/dist/SvToaster.svelte.d.ts +10 -0
  140. package/dist/SvToggleButton.svelte +37 -12
  141. package/dist/SvToggleButton.svelte.d.ts +2 -4
  142. package/dist/SvTooltip.svelte +113 -0
  143. package/dist/SvTooltip.svelte.d.ts +22 -0
  144. package/dist/SvTour.svelte +151 -0
  145. package/dist/SvTour.svelte.d.ts +25 -0
  146. package/dist/SvTree.svelte +286 -44
  147. package/dist/SvTree.svelte.d.ts +26 -9
  148. package/dist/SvTreeSelect.svelte +222 -0
  149. package/dist/SvTreeSelect.svelte.d.ts +24 -0
  150. package/dist/a11y/dismissable.d.ts +32 -0
  151. package/dist/a11y/dismissable.js +54 -0
  152. package/dist/a11y/focus-trap.d.ts +39 -0
  153. package/dist/a11y/focus-trap.js +142 -0
  154. package/dist/a11y/live-region.d.ts +8 -0
  155. package/dist/a11y/live-region.js +60 -0
  156. package/dist/a11y/scroll-lock.d.ts +4 -0
  157. package/dist/a11y/scroll-lock.js +41 -0
  158. package/dist/a11y.d.ts +3 -1
  159. package/dist/a11y.js +1 -1
  160. package/dist/avatar.d.ts +10 -0
  161. package/dist/avatar.js +22 -0
  162. package/dist/builtin-editors.d.ts +5 -0
  163. package/dist/builtin-editors.js +55 -0
  164. package/dist/cdn/svgrid.js +16021 -8234
  165. package/dist/cdn/svgrid.svelte-external.js +14542 -6764
  166. package/dist/columns.js +3 -2
  167. package/dist/core.d.ts +7 -1
  168. package/dist/countries.d.ts +12 -0
  169. package/dist/countries.js +24 -0
  170. package/dist/createAccordion.svelte.d.ts +71 -0
  171. package/dist/createAccordion.svelte.js +99 -0
  172. package/dist/createAutocomplete.svelte.d.ts +13 -4
  173. package/dist/createAutocomplete.svelte.js +11 -1
  174. package/dist/createButtonGroup.svelte.d.ts +62 -0
  175. package/dist/createButtonGroup.svelte.js +154 -0
  176. package/dist/createCalendar.svelte.d.ts +5 -0
  177. package/dist/createCalendar.svelte.js +2 -0
  178. package/dist/createCheckbox.svelte.d.ts +9 -17
  179. package/dist/createCheckbox.svelte.js +28 -1
  180. package/dist/createColorInput.svelte.d.ts +12 -22
  181. package/dist/createColorInput.svelte.js +13 -0
  182. package/dist/createCombobox.svelte.d.ts +16 -5
  183. package/dist/createCombobox.svelte.js +13 -2
  184. package/dist/createCountryInput.svelte.d.ts +14 -3
  185. package/dist/createCountryInput.svelte.js +12 -2
  186. package/dist/createDateTimePicker.svelte.d.ts +17 -2
  187. package/dist/createDateTimePicker.svelte.js +12 -2
  188. package/dist/createDropdownList.svelte.d.ts +14 -5
  189. package/dist/createDropdownList.svelte.js +50 -1
  190. package/dist/createFileUpload.svelte.d.ts +68 -0
  191. package/dist/createFileUpload.svelte.js +122 -0
  192. package/dist/createListbox.svelte.d.ts +10 -1
  193. package/dist/createListbox.svelte.js +48 -1
  194. package/dist/createMaskedInput.svelte.d.ts +11 -2
  195. package/dist/createMaskedInput.svelte.js +11 -1
  196. package/dist/createNumberInput.svelte.d.ts +1 -0
  197. package/dist/createNumberInput.svelte.js +1 -0
  198. package/dist/createPasswordInput.svelte.d.ts +19 -21
  199. package/dist/createPasswordInput.svelte.js +16 -4
  200. package/dist/createPhoneInput.svelte.d.ts +26 -7
  201. package/dist/createPhoneInput.svelte.js +24 -3
  202. package/dist/createPopoverSelect.svelte.d.ts +86 -0
  203. package/dist/createPopoverSelect.svelte.js +196 -0
  204. package/dist/createRadioGroup.svelte.d.ts +9 -0
  205. package/dist/createRadioGroup.svelte.js +11 -1
  206. package/dist/createRating.svelte.d.ts +11 -0
  207. package/dist/createRating.svelte.js +12 -1
  208. package/dist/createSlider.svelte.d.ts +2 -0
  209. package/dist/createSlider.svelte.js +16 -5
  210. package/dist/createSplitter.svelte.d.ts +67 -0
  211. package/dist/createSplitter.svelte.js +99 -0
  212. package/dist/createSwitch.svelte.d.ts +9 -16
  213. package/dist/createSwitch.svelte.js +28 -1
  214. package/dist/createTabs.svelte.d.ts +7 -0
  215. package/dist/createTabs.svelte.js +17 -2
  216. package/dist/createTagsInput.svelte.d.ts +13 -1
  217. package/dist/createTagsInput.svelte.js +12 -3
  218. package/dist/createToggle.svelte.d.ts +9 -0
  219. package/dist/createToggle.svelte.js +12 -1
  220. package/dist/createTree.svelte.d.ts +19 -0
  221. package/dist/createTree.svelte.js +108 -15
  222. package/dist/debounce.d.ts +11 -0
  223. package/dist/debounce.js +30 -0
  224. package/dist/duration.d.ts +15 -0
  225. package/dist/duration.js +51 -0
  226. package/dist/editor-contract.d.ts +62 -7
  227. package/dist/editor-contract.js +45 -5
  228. package/dist/editor-registry.d.ts +67 -0
  229. package/dist/editor-registry.js +38 -0
  230. package/dist/editors/cell-editors.d.ts +1 -1
  231. package/dist/editors/cell-editors.js +5 -0
  232. package/dist/fuzzy.d.ts +3 -0
  233. package/dist/fuzzy.js +41 -0
  234. package/dist/grid-select.d.ts +9 -0
  235. package/dist/grid-select.js +8 -0
  236. package/dist/index.d.ts +79 -6
  237. package/dist/index.js +78 -4
  238. package/dist/keyboard-handlers.js +19 -0
  239. package/dist/list-option.d.ts +36 -0
  240. package/dist/list-option.js +68 -0
  241. package/dist/otp.d.ts +16 -0
  242. package/dist/otp.js +26 -0
  243. package/dist/paginate.d.ts +20 -0
  244. package/dist/paginate.js +40 -0
  245. package/dist/popover.d.ts +15 -1
  246. package/dist/popover.js +29 -3
  247. package/dist/recurrence.d.ts +36 -0
  248. package/dist/recurrence.js +90 -0
  249. package/dist/server-data-source.d.ts +89 -0
  250. package/dist/server-data-source.js +4 -0
  251. package/dist/server-group-model.d.ts +98 -0
  252. package/dist/server-group-model.js +263 -0
  253. package/dist/toast-store.svelte.d.ts +41 -0
  254. package/dist/toast-store.svelte.js +113 -0
  255. package/dist/tree-select.d.ts +19 -0
  256. package/dist/tree-select.js +40 -0
  257. package/dist/ui-app.types.d.ts +80 -0
  258. package/dist/ui-app.types.js +7 -0
  259. package/dist/validators.d.ts +43 -0
  260. package/dist/validators.js +53 -0
  261. package/dist/virtual.d.ts +35 -0
  262. package/dist/virtual.js +34 -0
  263. package/package.json +1 -1
  264. package/src/SvAccordion.svelte +109 -0
  265. package/src/SvAccordion.test.ts +66 -0
  266. package/src/SvAlert.svelte +92 -0
  267. package/src/SvAutoComplete.svelte +47 -18
  268. package/src/SvAvatar.svelte +75 -0
  269. package/src/SvAvatarGroup.svelte +48 -0
  270. package/src/SvBadge.svelte +54 -0
  271. package/src/SvBreadcrumb.svelte +88 -0
  272. package/src/SvButtonGroup.svelte +121 -0
  273. package/src/SvButtonGroup.test.ts +72 -0
  274. package/src/SvCalendar.svelte +72 -9
  275. package/src/SvCard.svelte +71 -0
  276. package/src/SvCarousel.svelte +134 -0
  277. package/src/SvCheckBox.svelte +36 -21
  278. package/src/SvChip.svelte +88 -0
  279. package/src/SvCircularProgress.svelte +109 -0
  280. package/src/SvColorInput.svelte +54 -27
  281. package/src/SvComboBox.svelte +119 -33
  282. package/src/SvCommand.svelte +197 -0
  283. package/src/SvContextMenu.svelte +96 -0
  284. package/src/SvCountryInput.svelte +56 -21
  285. package/src/SvDateRangeInput.svelte +256 -0
  286. package/src/SvDateRangeInput.test.ts +80 -0
  287. package/src/SvDateTimePicker.svelte +57 -20
  288. package/src/SvDivider.svelte +61 -0
  289. package/src/SvDrawer.svelte +226 -0
  290. package/src/SvDrawer.test.ts +125 -0
  291. package/src/SvDropDownList.svelte +114 -35
  292. package/src/SvDurationInput.svelte +108 -0
  293. package/src/SvEmptyState.svelte +59 -0
  294. package/src/SvField.svelte +85 -0
  295. package/src/SvFileUpload.svelte +169 -0
  296. package/src/SvFileUpload.test.ts +59 -0
  297. package/src/SvForm.svelte +7 -1
  298. package/src/SvGauge.svelte +7 -1
  299. package/src/SvGrid.controller.svelte.ts +68 -9
  300. package/src/SvGrid.css +33 -0
  301. package/src/SvGrid.svelte +116 -3
  302. package/src/SvGrid.types.ts +374 -0
  303. package/src/SvGridBoard.svelte +2281 -0
  304. package/src/SvGridDropdown.svelte +2 -1
  305. package/src/SvGridSelect.svelte +255 -0
  306. package/src/SvGridSelect.test.ts +100 -0
  307. package/src/SvGroupCell.svelte +109 -0
  308. package/src/SvListBox.svelte +123 -36
  309. package/src/SvMaskedInput.svelte +53 -13
  310. package/src/SvMenu.svelte +101 -0
  311. package/src/SvMenu.test.ts +73 -0
  312. package/src/SvMenuList.svelte +143 -0
  313. package/src/SvModal.svelte +220 -0
  314. package/src/SvMultiSelect.svelte +277 -0
  315. package/src/SvMultiSelect.test.ts +167 -0
  316. package/src/SvNavPane.svelte +314 -0
  317. package/src/SvNavPane.test.ts +70 -0
  318. package/src/SvNumberInput.svelte +23 -9
  319. package/src/SvOtpInput.svelte +157 -0
  320. package/src/SvPagination.svelte +100 -0
  321. package/src/SvPasswordInput.svelte +42 -12
  322. package/src/SvPhoneInput.svelte +43 -11
  323. package/src/SvPopover.svelte +127 -0
  324. package/src/SvProgress.svelte +116 -0
  325. package/src/SvRadioGroup.svelte +40 -22
  326. package/src/SvRating.svelte +51 -30
  327. package/src/SvRichText.svelte +192 -0
  328. package/src/SvRowGroupPanel.svelte +147 -0
  329. package/src/SvScrollArea.svelte +50 -0
  330. package/src/SvSkeleton.svelte +76 -0
  331. package/src/SvSlider.svelte +41 -9
  332. package/src/SvSparkline.svelte +77 -0
  333. package/src/SvSplitter.svelte +138 -0
  334. package/src/SvSplitter.test.ts +55 -0
  335. package/src/SvStat.svelte +86 -0
  336. package/src/SvStepper.svelte +91 -0
  337. package/src/SvSwitchButton.svelte +39 -24
  338. package/src/SvTabs.svelte +147 -28
  339. package/src/SvTagsInput.svelte +59 -22
  340. package/src/SvTextArea.svelte +113 -0
  341. package/src/SvTextInput.svelte +115 -0
  342. package/src/SvTimePicker.svelte +19 -5
  343. package/src/SvTimeline.svelte +75 -0
  344. package/src/SvToaster.svelte +124 -0
  345. package/src/SvToaster.test.ts +63 -0
  346. package/src/SvToggleButton.svelte +37 -12
  347. package/src/SvTooltip.svelte +113 -0
  348. package/src/SvTour.svelte +151 -0
  349. package/src/SvTree.svelte +286 -44
  350. package/src/SvTreeSelect.svelte +222 -0
  351. package/src/SvTreeSelect.test.ts +87 -0
  352. package/src/a11y/dismissable.test.ts +95 -0
  353. package/src/a11y/dismissable.ts +94 -0
  354. package/src/a11y/focus-trap.test.ts +110 -0
  355. package/src/a11y/focus-trap.ts +134 -0
  356. package/src/a11y/live-region.test.ts +40 -0
  357. package/src/a11y/live-region.ts +65 -0
  358. package/src/a11y/scroll-lock.test.ts +38 -0
  359. package/src/a11y/scroll-lock.ts +41 -0
  360. package/src/a11y.ts +3 -1
  361. package/src/avatar.test.ts +32 -0
  362. package/src/avatar.ts +21 -0
  363. package/src/board.test.ts +927 -0
  364. package/src/builtin-editors.grid.test.ts +85 -0
  365. package/src/builtin-editors.test.ts +58 -0
  366. package/src/builtin-editors.ts +56 -0
  367. package/src/columns.ts +3 -2
  368. package/src/core.ts +10 -0
  369. package/src/countries.ts +25 -0
  370. package/src/createAccordion.svelte.ts +126 -0
  371. package/src/createAutocomplete.svelte.ts +18 -1
  372. package/src/createButtonGroup.svelte.ts +166 -0
  373. package/src/createCalendar.svelte.ts +6 -0
  374. package/src/createCheckbox.svelte.ts +23 -1
  375. package/src/createColorInput.svelte.ts +20 -0
  376. package/src/createCombobox.svelte.ts +22 -2
  377. package/src/createCountryInput.svelte.ts +21 -2
  378. package/src/createDateTimePicker.svelte.ts +23 -2
  379. package/src/createDropdownList.svelte.ts +31 -2
  380. package/src/createFileUpload.svelte.ts +144 -0
  381. package/src/createListbox.svelte.ts +35 -3
  382. package/src/createMaskedInput.svelte.ts +18 -1
  383. package/src/createNumberInput.svelte.ts +2 -0
  384. package/src/createPasswordInput.svelte.ts +31 -5
  385. package/src/createPhoneInput.svelte.ts +38 -4
  386. package/src/createPopoverSelect.svelte.ts +208 -0
  387. package/src/createRadioGroup.svelte.ts +23 -1
  388. package/src/createRating.svelte.ts +26 -1
  389. package/src/createSlider.svelte.ts +14 -3
  390. package/src/createSplitter.svelte.ts +119 -0
  391. package/src/createSwitch.svelte.ts +26 -3
  392. package/src/createTabs.svelte.ts +20 -3
  393. package/src/createTagsInput.svelte.ts +24 -3
  394. package/src/createToggle.svelte.ts +25 -2
  395. package/src/createTree.svelte.ts +104 -14
  396. package/src/debounce.test.ts +50 -0
  397. package/src/debounce.ts +41 -0
  398. package/src/duration.test.ts +41 -0
  399. package/src/duration.ts +51 -0
  400. package/src/editor-contract.ts +87 -8
  401. package/src/editor-registry.grid.test.ts +98 -0
  402. package/src/editor-registry.test.ts +86 -0
  403. package/src/editor-registry.ts +106 -0
  404. package/src/editors/cell-editors.ts +10 -1
  405. package/src/fuzzy.test.ts +40 -0
  406. package/src/fuzzy.ts +39 -0
  407. package/src/grid-select.test.ts +28 -0
  408. package/src/grid-select.ts +20 -0
  409. package/src/index.ts +150 -5
  410. package/src/keyboard-handlers.ts +20 -0
  411. package/src/list-option.ts +74 -0
  412. package/src/list-power.test.ts +71 -0
  413. package/src/otp.test.ts +28 -0
  414. package/src/otp.ts +28 -0
  415. package/src/overlays.test.ts +85 -0
  416. package/src/paginate.test.ts +41 -0
  417. package/src/paginate.ts +61 -0
  418. package/src/phone-valid.test.ts +26 -0
  419. package/src/popover.ts +31 -3
  420. package/src/progress.test.ts +55 -0
  421. package/src/recurrence.test.ts +91 -0
  422. package/src/recurrence.ts +111 -0
  423. package/src/server-data-source.ts +102 -0
  424. package/src/server-group-model.test.ts +294 -0
  425. package/src/server-group-model.ts +370 -0
  426. package/src/svgrid.responsive.test.ts +72 -0
  427. package/src/toast-store.svelte.ts +148 -0
  428. package/src/toast-store.test.ts +86 -0
  429. package/src/tree-edit.test.ts +49 -0
  430. package/src/tree-filter.test.ts +56 -0
  431. package/src/tree-select.test.ts +48 -0
  432. package/src/tree-select.ts +62 -0
  433. package/src/ui-app.test.ts +130 -0
  434. package/src/ui-app.types.ts +88 -0
  435. package/src/ui-display.test.ts +79 -0
  436. package/src/ui-inputs.test.ts +1 -1
  437. package/src/ui-status.test.ts +141 -0
  438. package/src/ui-tier1.test.ts +142 -0
  439. package/src/ui-tier2.test.ts +124 -0
  440. package/src/ui-tier3.test.ts +139 -0
  441. package/src/validators.test.ts +58 -0
  442. package/src/validators.ts +105 -0
  443. package/src/virtual.test.ts +72 -0
  444. package/src/virtual.ts +67 -0
@@ -25,6 +25,12 @@
25
25
  import { buildSparkline, toSparklineValues } from "./sparkline";
26
26
  import SvGridDropdown from "./SvGridDropdown.svelte";
27
27
  import SvDateTimePicker from "./SvDateTimePicker.svelte";
28
+ import {
29
+ hasCellEditor,
30
+ getCellEditor,
31
+ resolveEditorProps,
32
+ type CellEditorContext,
33
+ } from "./editor-registry";
28
34
  import { timeStringToDate, dateToTimeString } from "./SvGrid.helpers";
29
35
  import type {
30
36
  Props,
@@ -49,8 +55,20 @@
49
55
  import { createSvGridController } from "./SvGrid.controller.svelte";
50
56
  import GridMenus from "./GridMenus.svelte";
51
57
  import GridFooter from "./GridFooter.svelte";
58
+ import SvGridBoard from "./SvGridBoard.svelte";
52
59
  let props: Props<TFeatures, TData> = $props();
53
60
  const ctrl = createSvGridController(props);
61
+ // Kanban board mode: when `board` is set the grid renders lanes of cards
62
+ // instead of the table (see SvGridBoard). Narrowed derived so the template
63
+ // branch can pass it non-null.
64
+ const boardConfig = $derived(props.board);
65
+ // The board renders the grid's FILTERED + SORTED rows (not raw data), so the
66
+ // search box / column filters / sort all flow through to the lanes.
67
+ const boardData = $derived(
68
+ ctrl.allRowsBeforePagination
69
+ .filter((r) => !ctrl.isGroupRow(r))
70
+ .map((r) => r.original),
71
+ );
54
72
 
55
73
  // ---- View facade: re-bind the controller's reactive members as locals so the
56
74
  // markup stays identical. Assignable state + bindings + DOM refs use c.* directly.
@@ -127,6 +145,16 @@
127
145
  const hasConditionalFormats = $derived(ctrl.hasConditionalFormats);
128
146
  const cellConditionalFormat = $derived(ctrl.cellConditionalFormat);
129
147
  const isGroupRow = $derived(ctrl.isGroupRow);
148
+ // Server-side group / tree a11y: aria-level on every tree row, aria-expanded
149
+ // on the expandable ones. Undefined (attribute omitted) when serverGroup is off.
150
+ const serverGroup = $derived(props.serverGroup);
151
+ function sgAriaLevel(row: Row<TData>): number | undefined {
152
+ return serverGroup ? serverGroup.level(row.original as TData) + 1 : undefined;
153
+ }
154
+ function sgAriaExpanded(row: Row<TData>): boolean | undefined {
155
+ if (!serverGroup || !serverGroup.isGroup(row.original as TData)) return undefined;
156
+ return serverGroup.expanded?.(row.original as TData) ?? false;
157
+ }
130
158
  const sortDirectionByColumn = $derived(ctrl.sortDirectionByColumn);
131
159
  const groupingColumns = $derived(ctrl.groupingColumns);
132
160
  const paginationState = $derived(ctrl.paginationState);
@@ -202,6 +230,22 @@
202
230
  return "sv-grid-cell-flash";
203
231
  }
204
232
 
233
+ // Keyboard-accessible column resize (#79): focus a resize handle and use the
234
+ // arrow keys (Shift = fine 1px step). Complements the pointer-drag resize.
235
+ function resizeColumnByKeyboard(e: KeyboardEvent, columnId: string) {
236
+ let delta = 0;
237
+ const step = e.shiftKey ? 1 : 10;
238
+ if (e.key === "ArrowLeft") delta = -step;
239
+ else if (e.key === "ArrowRight") delta = step;
240
+ else return;
241
+ e.preventDefault();
242
+ const current = ctrl.getColumnWidth(columnId);
243
+ ctrl.columnWidths = {
244
+ ...ctrl.columnWidths,
245
+ [columnId]: Math.max(40, current + delta),
246
+ };
247
+ }
248
+
205
249
  // ---- Full-row editing -------------------------------------------------
206
250
  const fullRowEdit = $derived(ctrl.fullRowEdit);
207
251
  // Commit the whole row when the user clicks away from its editors (Excel /
@@ -282,6 +326,27 @@
282
326
  const updateEditingCellValue = $derived(ctrl.updateEditingCellValue);
283
327
  const onEditorKeyDown = $derived(ctrl.onEditorKeyDown);
284
328
  const focusOnMount = $derived(ctrl.focusOnMount);
329
+
330
+ // Build the interaction context handed to a CUSTOM cell editor registered via
331
+ // `registerCellEditor`. Maps the grid's editing lifecycle onto the uniform
332
+ // change / commit / cancel contract every registered editor speaks.
333
+ function buildRegisteredEditorContext(): CellEditorContext {
334
+ const cell = ctrl.editingCell;
335
+ return {
336
+ value: cell?.value,
337
+ rowId: cell?.rowId ?? "",
338
+ columnId: cell?.columnId ?? "",
339
+ onChange: (v: unknown) => updateEditingCellValue(v),
340
+ onCommit: (v?: unknown) => {
341
+ if (v !== undefined) updateEditingCellValue(v);
342
+ saveEditingCell();
343
+ },
344
+ onCancel: () => {
345
+ ctrl.editingCell = null;
346
+ ctrl.gridRootEl?.focus({ preventScroll: true });
347
+ },
348
+ };
349
+ }
285
350
  const onHeaderSortClick = $derived(ctrl.onHeaderSortClick);
286
351
  const onGridKeyDown = $derived(ctrl.onGridKeyDown);
287
352
  const onGridPaste = $derived(ctrl.onGridPaste);
@@ -323,6 +388,39 @@
323
388
  <div class="sv-grid-state sv-grid-state-error" role="alert">
324
389
  {props.error}
325
390
  </div>
391
+ {:else if boardConfig}
392
+ <div
393
+ class="sv-grid-root sv-grid-board-root"
394
+ class:sv-grid-root-fill={props.containerHeight === "100%"}
395
+ style={`height: ${
396
+ typeof props.containerHeight === "string"
397
+ ? props.containerHeight
398
+ : `${props.containerHeight ?? 520}px`
399
+ }; display: flex; flex-direction: column;`}
400
+ >
401
+ {#if boardConfig.searchable !== false}
402
+ <label class="sv-grid-board-search">
403
+ <svg viewBox="0 0 16 16" aria-hidden="true" width="14" height="14">
404
+ <circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" stroke-width="1.5" />
405
+ <line x1="10.2" y1="10.2" x2="14" y2="14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
406
+ </svg>
407
+ <input
408
+ type="search"
409
+ placeholder={boardConfig.searchPlaceholder ?? "Search cards..."}
410
+ bind:value={ctrl.globalFilter}
411
+ aria-label="Search cards"
412
+ />
413
+ </label>
414
+ {/if}
415
+ <div style="flex: 1 1 auto; min-height: 0;">
416
+ <SvGridBoard
417
+ data={boardData}
418
+ columns={props.columns}
419
+ board={boardConfig}
420
+ getRowId={props.getRowId}
421
+ />
422
+ </div>
423
+ </div>
326
424
  {:else}
327
425
  {#snippet icon(name: string)}
328
426
  <svg
@@ -874,6 +972,12 @@
874
972
  onblur={() => saveEditingCell()}
875
973
  onkeydown={onEditorKeyDown}
876
974
  />
975
+ {:else if hasCellEditor(String(ctrl.editingCell?.editorType ?? ""))}
976
+ <!-- Custom editor registered via `registerCellEditor(type, Component)`:
977
+ mount it and hand it the uniform change / commit / cancel context. -->
978
+ {@const _reg = getCellEditor(String(ctrl.editingCell?.editorType))!}
979
+ {@const CustomCellEditor = _reg.component}
980
+ <CustomCellEditor {...resolveEditorProps(_reg, buildRegisteredEditorContext())} />
877
981
  {:else}
878
982
  <input
879
983
  use:focusOnMount
@@ -1246,6 +1350,7 @@
1246
1350
  <div
1247
1351
  class="sv-grid-container sv-grid-container-custom-scrollbars"
1248
1352
  class:sv-grid-has-vscroll={hasMeasured && hasVerticalOverflow}
1353
+ class:sv-grid-narrow={ctrl.isNarrowResponsive}
1249
1354
  bind:this={ctrl.scrollContainer}
1250
1355
  onscroll={onBodyScroll}
1251
1356
  style={`overflow: auto; position: relative; height: calc(100% - ${hasMeasured && hasHorizontalOverflow ? 16 : 0}px);`}
@@ -1258,6 +1363,7 @@
1258
1363
  activeDescendantId,
1259
1364
  rowCount: allRows.length,
1260
1365
  colCount: allColumns.length,
1366
+ treegrid: !!props.serverGroup,
1261
1367
  })}
1262
1368
  onkeydown={onGridKeyDown}
1263
1369
  onpaste={onGridPaste}
@@ -1544,7 +1650,7 @@
1544
1650
  class:is-active={isColumnFiltered(
1545
1651
  header.column.id,
1546
1652
  )}
1547
- aria-label="Filter"
1653
+ aria-label={`Filter ${toolPanelHeaderLabel(header.column)}`}
1548
1654
  aria-haspopup="menu"
1549
1655
  onclick={(event) =>
1550
1656
  openFilterMenu(event, header.column.id)}
@@ -1556,7 +1662,7 @@
1556
1662
  type="button"
1557
1663
  class="sv-grid-col-menu-btn"
1558
1664
  class:is-open={columnMenuFor === header.column.id}
1559
- aria-label="Column menu"
1665
+ aria-label={`${toolPanelHeaderLabel(header.column)} column menu`}
1560
1666
  aria-haspopup="menu"
1561
1667
  onclick={(event) =>
1562
1668
  openColumnMenu(event, header.column.id)}
@@ -1595,9 +1701,12 @@
1595
1701
  header.column.id}
1596
1702
  role="separator"
1597
1703
  aria-orientation="vertical"
1598
- aria-label="Resize column"
1704
+ aria-label={`Resize ${toolPanelHeaderLabel(header.column)}`}
1705
+ tabindex="0"
1599
1706
  onpointerdown={(event) =>
1600
1707
  startColumnResize(event, header.column.id)}
1708
+ onkeydown={(event) =>
1709
+ resizeColumnByKeyboard(event, header.column.id)}
1601
1710
  ondblclick={(event) => event.stopPropagation()}
1602
1711
  ></div>
1603
1712
  {/if}
@@ -1789,6 +1898,8 @@
1789
1898
  rowIndex % 2 === 1}
1790
1899
  class:sv-grid-row-draggable={rowDragManagedEffective}
1791
1900
  {...getGridRowA11yProps(rowIndex + 1)}
1901
+ aria-level={sgAriaLevel(row)}
1902
+ aria-expanded={sgAriaExpanded(row)}
1792
1903
  {...rowDragAttrs(rowIndex)}
1793
1904
  style={`height: ${rowItem.size}px;`}
1794
1905
  >
@@ -2038,6 +2149,8 @@
2038
2149
  rowIndex % 2 === 1}
2039
2150
  class:sv-grid-row-draggable={rowDragManagedEffective}
2040
2151
  {...getGridRowA11yProps(rowIndex + 1)}
2152
+ aria-level={sgAriaLevel(row)}
2153
+ aria-expanded={sgAriaExpanded(row)}
2041
2154
  {...rowDragAttrs(rowIndex)}
2042
2155
  >
2043
2156
  {#if showRowNumbersEffective}
@@ -1,6 +1,48 @@
1
1
  import type { Snippet } from "svelte";
2
2
  import type { CellEditorType, ColumnDef, RowData, SvGridApi, TableFeatures } from "./index";
3
3
  import type { ConditionalFormat } from "./conditional-formatting";
4
+ import type { MenuItem } from "./SvMenuList.svelte";
5
+ /**
6
+ * The built-in card detail drawer. Set `board.drawer` (`true` for all fields,
7
+ * or this object to customize) and opening a card shows a drawer with an
8
+ * `SvForm` of its fields, rendered with the UI-kit editors.
9
+ */
10
+ export type BoardDrawerConfig<TData extends RowData = RowData> = {
11
+ /** Fields to show, in order. Omit for every column that has a `field`. */
12
+ fields?: ReadonlyArray<keyof TData & string>;
13
+ /** Drawer title - a string or derived from the row. Defaults to the title field. */
14
+ title?: string | ((row: TData) => string);
15
+ /** Which edge the drawer opens from. Defaults to `'right'`. */
16
+ side?: "right" | "left" | "top" | "bottom";
17
+ /** Drawer size (any CSS length). Defaults to `'380px'`. */
18
+ size?: string;
19
+ /** Save button label. Defaults to `'Save'`. */
20
+ submitLabel?: string;
21
+ /** Form columns inside the drawer. Defaults to `1`. */
22
+ columns?: number;
23
+ };
24
+ /** Board-native helpers passed to `board.cardMenu` for building context items. */
25
+ export type BoardMenuContext<TData extends RowData = RowData> = {
26
+ /** The board's lanes (id + title). */
27
+ lanes: BoardLane[];
28
+ /** Move this card to a lane (board-native; fires onCardMove). */
29
+ moveTo: (laneId: string) => void;
30
+ /** Open this card's editor (inline, or your `onCardEdit`). */
31
+ edit: () => void;
32
+ };
33
+ /** Board-native helpers passed to `board.laneMenu` for building lane context items. */
34
+ export type BoardLaneMenuContext<TData extends RowData = RowData> = {
35
+ /** The lane's id. */
36
+ laneId: string;
37
+ /** The lane's current cards (this swimlane's, if any). */
38
+ cards: TData[];
39
+ /** Whether the lane is collapsed. */
40
+ collapsed: boolean;
41
+ /** Collapse / expand the lane (needs `collapsibleLanes`). */
42
+ toggleCollapse: () => void;
43
+ /** Add a card to the lane (fires `onCardAdd`). */
44
+ addCard: (title?: string) => void;
45
+ };
4
46
  /** The cell a context menu was opened on. Passed to every item's callbacks. */
5
47
  export type ContextMenuTarget<TData extends RowData = RowData> = {
6
48
  rowIndex: number;
@@ -25,9 +67,297 @@ export type ContextMenuItem<TData extends RowData = RowData> = string | {
25
67
  /** Invoked on click. The menu closes afterwards. */
26
68
  action: (target: ContextMenuTarget<TData>) => void;
27
69
  };
70
+ /** A single Kanban lane (board column). {@link BoardConfig}. */
71
+ export type BoardLane = {
72
+ /** Lane id - equals the `groupBy` field value of the cards it holds. */
73
+ id: string;
74
+ /** Header title. Defaults to the id (or `(empty)` for a blank value). */
75
+ title?: string;
76
+ /** Accent color (any CSS color) for the lane header bar + card ring. */
77
+ color?: string;
78
+ /**
79
+ * Soft max number of cards. When exceeded the lane header is flagged
80
+ * over-limit. Enforcement/styling is an enterprise concern; the count is
81
+ * always shown.
82
+ */
83
+ wipLimit?: number;
84
+ };
85
+ /** A checklist item inside a card. See {@link BoardConfig.subtasks}. */
86
+ export type BoardSubtask = {
87
+ id: string | number;
88
+ title: string;
89
+ done: boolean;
90
+ };
91
+ /** A comment on a card. See {@link BoardConfig.commentsField}. */
92
+ export type BoardComment = {
93
+ id: string | number;
94
+ text: string;
95
+ author?: string;
96
+ /** Timestamp label (any string). */
97
+ at?: string;
98
+ };
99
+ /**
100
+ * The serializable board layout - the per-card position/edit overlay plus
101
+ * collapsed lanes. Persisted by `board.persistKey` and passed to
102
+ * `board.onLayoutChange`.
103
+ */
104
+ export type BoardLayout = {
105
+ /** rowId -> lane id. */
106
+ laneOf?: Record<string, string>;
107
+ /** rowId -> sort order within its lane. */
108
+ orderOf?: Record<string, number>;
109
+ /** rowId -> swimlane id. */
110
+ swimOf?: Record<string, string>;
111
+ /** rowId -> edited field values. */
112
+ edits?: Record<string, Record<string, unknown>>;
113
+ /** lane id -> collapsed. */
114
+ collapsed?: Record<string, boolean>;
115
+ /** swimlane id -> collapsed. */
116
+ collapsedSwim?: Record<string, boolean>;
117
+ /** Explicit lane order (ids), when lanes have been drag-reordered. */
118
+ laneOrder?: string[];
119
+ /** rowId -> subtaskId -> done override. */
120
+ subDone?: Record<string, Record<string, boolean>>;
121
+ /** rowId -> subtasks added on the card. */
122
+ subAdded?: Record<string, BoardSubtask[]>;
123
+ };
124
+ /** Emitted when a card's built-in editor is saved. */
125
+ export type BoardCardCommitEvent<TData extends RowData = RowData> = {
126
+ /** The edited row. */
127
+ row: TData;
128
+ /** Only the fields that changed, `{ field: newValue }`. */
129
+ changes: Record<string, unknown>;
130
+ /** The full set of edited field values. */
131
+ values: Record<string, unknown>;
132
+ };
133
+ /** Emitted when a card is dragged to a new lane and/or position. */
134
+ export type BoardCardMoveEvent<TData extends RowData = RowData> = {
135
+ /** The dragged row. */
136
+ row: TData;
137
+ /** Lane the card came from. */
138
+ fromLane: string;
139
+ /** Lane the card was dropped on. */
140
+ toLane: string;
141
+ /** Insertion index within the destination lane. */
142
+ toIndex: number;
143
+ /** Swimlane the card came from (only when `swimlaneBy` is set). */
144
+ fromSwimlane?: string;
145
+ /** Swimlane the card was dropped on (only when `swimlaneBy` is set). */
146
+ toSwimlane?: string;
147
+ };
148
+ /**
149
+ * Turns the grid into a Kanban board. Set `board` and the grid renders its
150
+ * rows as cards in horizontal lanes (bucketed by the `groupBy` field) instead
151
+ * of a table. Dragging a card between lanes fires {@link BoardConfig.onCardMove}
152
+ * where you reassign the `groupBy` field on your own data.
153
+ */
154
+ export type BoardConfig<TFeatures extends TableFeatures = TableFeatures, TData extends RowData = RowData> = {
155
+ /** Field whose value buckets each row into a lane. */
156
+ groupBy: keyof TData & string;
157
+ /**
158
+ * Explicit, ordered lanes. Omit to derive lanes from the distinct
159
+ * `groupBy` values found in the data (first-seen order).
160
+ */
161
+ lanes?: ReadonlyArray<BoardLane>;
162
+ /** Custom card body. Receives the row. Omit for the built-in default card. */
163
+ card?: Snippet<[TData]>;
164
+ /**
165
+ * Fired when a card is dragged to a new lane/position. Update your data
166
+ * here (reassign the `groupBy` field, and optionally reorder). Without it
167
+ * the board is display-only.
168
+ */
169
+ onCardMove?: (event: BoardCardMoveEvent<TData>) => void;
170
+ /**
171
+ * Add-card affordance. A `+` in the lane header (or, with `composer`, a
172
+ * type-a-title box at the bottom of the lane) fires this with the lane id
173
+ * and - from the composer - the typed title.
174
+ */
175
+ onCardAdd?: (laneId: string, title?: string) => void;
176
+ /**
177
+ * Show a quick-add composer at the bottom of each lane (a "+ Add a card"
178
+ * button that opens an inline title input; Enter calls `onCardAdd(lane,
179
+ * title)`). Without it, `onCardAdd` shows a plain `+` in the header.
180
+ */
181
+ composer?: boolean;
182
+ /**
183
+ * Field holding a card's checklist of sub-tasks (`BoardSubtask[]`). The card
184
+ * shows a progress chip + bar and expands to an inline checklist with a
185
+ * quick-add. Toggles/adds run through an overlay (never mutating your data)
186
+ * and fire the callbacks below.
187
+ */
188
+ subtasks?: keyof TData & string;
189
+ /** Fired when a sub-task checkbox is toggled. */
190
+ onSubtaskToggle?: (row: TData, subtaskId: string | number, done: boolean) => void;
191
+ /** Fired when a sub-task is added from the card. */
192
+ onSubtaskAdd?: (row: TData, title: string) => void;
193
+ /**
194
+ * Field holding label/tag strings (or `{ text, color }`) shown as chips on
195
+ * the default card's badge row.
196
+ */
197
+ labelsField?: keyof TData & string;
198
+ /** Field holding a due date (Date | ISO string); shown as a badge, red when overdue. */
199
+ dueField?: keyof TData & string;
200
+ /**
201
+ * Field holding one or more assignee names (string | string[]); shown as
202
+ * avatar(s) on the default card's badge row.
203
+ */
204
+ assigneesField?: keyof TData & string;
205
+ /**
206
+ * Enable the built-in card editor: double-click a card (or press F2 while
207
+ * it is focused) to edit its fields inline. Fields are rendered from the
208
+ * columns that declare an `editorType` (or all fields if none do). Ignored
209
+ * when `onCardEdit` is set.
210
+ */
211
+ editable?: boolean;
212
+ /**
213
+ * Open your own editor instead of the built-in one. Called on double-click /
214
+ * F2 with the row; you might open a drawer or route to a detail screen.
215
+ */
216
+ onCardEdit?: (row: TData) => void;
217
+ /**
218
+ * Built-in **detail drawer**: opening a card (double-click / F2) shows an
219
+ * `SvDrawer` with an `SvForm` of its fields (kit editors). `true` = all
220
+ * fields; pass a {@link BoardDrawerConfig} to pick a subset / customize.
221
+ * Ignored when `onCardEdit` is set.
222
+ */
223
+ drawer?: boolean | BoardDrawerConfig<TData>;
224
+ /** Fired when the built-in editor is saved. Persist / mirror the changes. */
225
+ onCardCommit?: (event: BoardCardCommitEvent<TData>) => void;
226
+ /** Field used as the card title. Defaults to the first column's field. */
227
+ titleField?: keyof TData & string;
228
+ /**
229
+ * Column fields shown as label:value meta lines on the default card
230
+ * (max 4). Defaults to the first few non-title, non-groupBy columns.
231
+ */
232
+ cardFields?: ReadonlyArray<keyof TData & string>;
233
+ /**
234
+ * Second grouping axis: split the board into horizontal **swimlanes** by
235
+ * this field. Each swimlane band shows the full lane set with only its own
236
+ * cards. Dragging a card into another band reassigns this field too.
237
+ */
238
+ swimlaneBy?: keyof TData & string;
239
+ /** Let users collapse a swimlane band via its header chevron. */
240
+ collapsibleSwimlanes?: boolean;
241
+ /**
242
+ * Field holding a card's comments - `BoardComment[]` (or plain strings, or a
243
+ * number for a count only). Renders a comment-count badge that expands to a
244
+ * thread; provide the callbacks below to let users write / delete comments.
245
+ */
246
+ commentsField?: keyof TData & string;
247
+ /** Fired when a comment is added on the card; append it to your data. */
248
+ onCommentAdd?: (row: TData, text: string) => void;
249
+ /** Fired when a comment's delete button is pressed; remove it from your data. */
250
+ onCommentDelete?: (row: TData, commentId: string | number) => void;
251
+ /**
252
+ * Field holding a card's attachments - an array or a number. Renders an
253
+ * attachment-count badge on the default card.
254
+ */
255
+ attachmentsField?: keyof TData & string;
256
+ /**
257
+ * Field holding a cover colour (any CSS colour string) shown as a strip
258
+ * across the top of the default card.
259
+ */
260
+ coverField?: keyof TData & string;
261
+ /**
262
+ * Enforce `wipLimit`: reject a drop / keyboard move that would push a lane
263
+ * past its limit (the card snaps back). Off by default (the limit is a
264
+ * soft, visual flag only).
265
+ */
266
+ enforceWip?: boolean;
267
+ /** Let users collapse a lane to a slim strip by clicking its header. */
268
+ collapsibleLanes?: boolean;
269
+ /** Let users drag lane headers to reorder lanes (persisted with `persistKey`). */
270
+ reorderableLanes?: boolean;
271
+ /** Fired after a lane drag-reorder, with the new ordered lane ids. */
272
+ onLaneReorder?: (orderedIds: string[]) => void;
273
+ /**
274
+ * Enable inline lane rename: double-click a lane title to edit it. Fires
275
+ * with the lane id and new title - update your own lane config / data.
276
+ */
277
+ onLaneRename?: (laneId: string, title: string) => void;
278
+ /**
279
+ * Per-swimlane summary shown in the band header (e.g. a points/$ total or a
280
+ * WIP count). Receives the swimlane's cards and its id; return a short string.
281
+ */
282
+ swimlaneSummary?: (rows: TData[], swimId: string) => string;
283
+ /**
284
+ * Right-click (or long-press) a card to open a context menu. Return the
285
+ * menu items for that card; `ctx` gives board-native `moveTo(laneId)` and
286
+ * `edit()` helpers plus the lane list. Return empty/undefined for no menu.
287
+ */
288
+ cardMenu?: (row: TData, ctx: BoardMenuContext<TData>) => ReadonlyArray<MenuItem> | undefined;
289
+ /** Right-click a lane header for a lane context menu (rename / clear / add / collapse). */
290
+ laneMenu?: (laneId: string, ctx: BoardLaneMenuContext<TData>) => ReadonlyArray<MenuItem> | undefined;
291
+ /**
292
+ * Truthy field marks a card as **blocked** (waiting on a dependency): a red
293
+ * corner + a "Blocked" badge on the card. If the value is a non-empty string
294
+ * it is used as the blocked **reason** (shown in the badge tooltip). A blocked
295
+ * card is **locked from moving** (drag + keyboard) until it is unblocked - set
296
+ * {@link BoardConfig.flagBlocksMoves} `false` for a purely visual flag.
297
+ */
298
+ flagField?: keyof TData & string;
299
+ /** Whether a blocked (`flagField`) card is locked from moving. Defaults to `true`. */
300
+ flagBlocksMoves?: boolean;
301
+ /**
302
+ * Field holding a created/started date (Date | ISO string); shown as a
303
+ * relative **age** badge (e.g. `3d`).
304
+ */
305
+ ageField?: keyof TData & string;
306
+ /**
307
+ * Fields to expose as a **facet filter bar** above the board - a chip per
308
+ * distinct value; selecting chips filters the visible cards.
309
+ */
310
+ facets?: ReadonlyArray<keyof TData & string>;
311
+ /**
312
+ * Enable card **multi-select**: click to select, Ctrl/Cmd-click to toggle,
313
+ * and dragging a selected card moves the whole selection. Fires
314
+ * `onSelectionChange`.
315
+ */
316
+ selectable?: boolean;
317
+ /** Fired when the selection changes, with the selected rows. */
318
+ onSelectionChange?: (rows: TData[]) => void;
319
+ /**
320
+ * Field holding a card's **child rows** (`TData[]`) - the card gets a
321
+ * children count and expands to show them as nested mini-cards (epic ->
322
+ * stories). Each child renders its title and, if present, its `groupBy` value.
323
+ */
324
+ childrenField?: keyof TData & string;
325
+ /**
326
+ * Optional per-lane summary shown in the lane header (e.g. a story-point or
327
+ * dollar total). Receives the lane's cards (the current swimlane's, when
328
+ * `swimlaneBy` is set) and the lane id; return a short string.
329
+ */
330
+ laneSummary?: (rows: TData[], laneId: string) => string;
331
+ /** Show the built-in card search box (default `true`). */
332
+ searchable?: boolean;
333
+ /** Placeholder for the search box. Defaults to `"Search cards..."`. */
334
+ searchPlaceholder?: string;
335
+ /**
336
+ * Virtualize each lane so only the cards in view are in the DOM - for boards
337
+ * with thousands of cards per lane. Assumes roughly uniform card height; set
338
+ * `cardHeight` to match your cards.
339
+ */
340
+ virtualized?: boolean;
341
+ /** Estimated card height in px used by `virtualized` windowing (default 76). */
342
+ cardHeight?: number;
343
+ /**
344
+ * Persist the board layout (card positions, edits, collapsed lanes) to
345
+ * `localStorage` under this key, restored on load. Requires `getRowId` for
346
+ * stable identity across reloads.
347
+ */
348
+ persistKey?: string;
349
+ /** Called whenever the board layout changes, with the serializable state. */
350
+ onLayoutChange?: (layout: BoardLayout) => void;
351
+ };
28
352
  export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends RowData = RowData> = {
29
353
  data: ReadonlyArray<TData>;
30
354
  columns: Array<ColumnDef<TFeatures, TData>>;
355
+ /**
356
+ * Kanban board mode. When set, the grid renders its rows as cards in
357
+ * horizontal lanes (bucketed by `board.groupBy`) instead of a table. See
358
+ * {@link BoardConfig}.
359
+ */
360
+ board?: BoardConfig<TFeatures, TData>;
31
361
  /**
32
362
  * Right-click context menu. `true` shows the default item set (copy, cut,
33
363
  * paste, clear, insert row above/below, remove row, remove column). Pass an
@@ -163,6 +493,17 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
163
493
  * win once they happen.
164
494
  */
165
495
  fitColumns?: boolean;
496
+ /**
497
+ * Make the grid usable on narrow screens. When the grid's own width drops
498
+ * below the breakpoint (default `640`px), pinned columns are un-pinned so the
499
+ * whole grid pans, `fitColumns` scaling is suspended (columns keep their
500
+ * natural widths and scroll), touch panning is smoothed, and columns whose
501
+ * `hideBelow` exceeds the width are hidden. `true` uses the default
502
+ * breakpoint; pass `{ breakpoint }` to change it. Off by default.
503
+ */
504
+ responsive?: boolean | {
505
+ breakpoint?: number;
506
+ };
166
507
  showFilterMenu?: boolean;
167
508
  showFilterRow?: boolean;
168
509
  enableCellSelection?: boolean;
@@ -444,6 +785,31 @@ export type Props<TFeatures extends TableFeatures = TableFeatures, TData extends
444
785
  row: TData;
445
786
  rowIndex: number;
446
787
  }]>;
788
+ /**
789
+ * Server-side group / tree keyboard + accessibility, built into the grid. When
790
+ * set, the grid uses the treegrid role and marks matching rows with
791
+ * `aria-level` / `aria-expanded`, and ArrowRight / ArrowLeft expand / collapse
792
+ * the focused group row (no app-level key handling). Pair with `serverGroupRows`
793
+ * + `SvGroupCell` for the visual expander. Every accessor receives the row data.
794
+ */
795
+ serverGroup?: {
796
+ /** Whether a row is an expandable group / branch. */
797
+ isGroup: (row: TData) => boolean;
798
+ /** Tree depth of the row (0 = top level), for `aria-level`. */
799
+ level: (row: TData) => number;
800
+ /** Whether an expandable row is currently expanded. */
801
+ expanded?: (row: TData) => boolean;
802
+ /** Expand / collapse a group row. Called on ArrowRight / ArrowLeft. */
803
+ onToggle: (row: TData) => void;
804
+ };
805
+ /**
806
+ * Server-side set-filter values. When set, a column's filter checklist is
807
+ * populated by fetching the distinct values from the server (once per column,
808
+ * cached) instead of deriving them from the loaded page - so the checklist
809
+ * shows every value, not just those on screen. Return the distinct string
810
+ * values for the column id.
811
+ */
812
+ serverFilterValues?: (columnId: string) => Promise<string[]>;
447
813
  /**
448
814
  * Rows to pin to the TOP of the grid - rendered above the regular
449
815
  * rows and sticky-positioned so they stay visible while the user