@accelint/design-toolkit 9.13.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/catalog-info.yaml +1 -1
  2. package/dist/components/accordion/group.d.ts +2 -2
  3. package/dist/components/accordion/index.d.ts +2 -2
  4. package/dist/components/accordion/panel.d.ts +2 -2
  5. package/dist/components/accordion/trigger.d.ts +2 -2
  6. package/dist/components/action-bar/index.d.ts +2 -2
  7. package/dist/components/audio/index.d.ts +2 -2
  8. package/dist/components/avatar/context.d.ts +2 -2
  9. package/dist/components/avatar/index.d.ts +2 -2
  10. package/dist/components/badge/context.d.ts +4 -4
  11. package/dist/components/breadcrumbs/index.d.ts +2 -2
  12. package/dist/components/breadcrumbs/item.d.ts +2 -2
  13. package/dist/components/button/context.d.ts +8 -8
  14. package/dist/components/button/index.d.ts +2 -2
  15. package/dist/components/button/link.d.ts +2 -2
  16. package/dist/components/button/toggle.d.ts +2 -2
  17. package/dist/components/carousel/context.d.ts +4 -4
  18. package/dist/components/carousel/gallery.d.ts +2 -2
  19. package/dist/components/carousel/index.d.ts +2 -2
  20. package/dist/components/carousel/navigation.d.ts +3 -3
  21. package/dist/components/carousel/position.d.ts +2 -2
  22. package/dist/components/carousel/select.d.ts +2 -2
  23. package/dist/components/carousel/viewer.d.ts +2 -2
  24. package/dist/components/checkbox/context.d.ts +3 -3
  25. package/dist/components/checkbox/group.d.ts +2 -2
  26. package/dist/components/checkbox/index.d.ts +2 -2
  27. package/dist/components/chip/context.d.ts +4 -4
  28. package/dist/components/chip/deletable.d.ts +2 -2
  29. package/dist/components/chip/index.d.ts +2 -2
  30. package/dist/components/chip/list.d.ts +4 -4
  31. package/dist/components/chip/selectable.d.ts +2 -2
  32. package/dist/components/classification-badge/context.d.ts +4 -4
  33. package/dist/components/classification-badge/index.d.ts +2 -2
  34. package/dist/components/classification-banner/context.d.ts +4 -4
  35. package/dist/components/classification-banner/index.d.ts +2 -2
  36. package/dist/components/clock/index.d.ts +2 -2
  37. package/dist/components/color-picker/index.d.ts +2 -2
  38. package/dist/components/combobox-field/context.d.ts +4 -4
  39. package/dist/components/combobox-field/index.d.ts +2 -2
  40. package/dist/components/coordinate-field/context.d.ts +6 -6
  41. package/dist/components/coordinate-field/index.d.ts +2 -2
  42. package/dist/components/coordinate-field/segment.d.ts +2 -2
  43. package/dist/components/date-field/index.d.ts +2 -2
  44. package/dist/components/date-field/index.js.map +1 -1
  45. package/dist/components/deferred-collection/index.d.ts +2 -2
  46. package/dist/components/details-list/context.d.ts +4 -4
  47. package/dist/components/details-list/index.d.ts +2 -2
  48. package/dist/components/details-list/label.d.ts +2 -2
  49. package/dist/components/details-list/value.d.ts +2 -2
  50. package/dist/components/dialog/content.d.ts +2 -2
  51. package/dist/components/dialog/context.d.ts +2 -2
  52. package/dist/components/dialog/footer.d.ts +2 -2
  53. package/dist/components/dialog/index.d.ts +2 -2
  54. package/dist/components/dialog/title.d.ts +2 -2
  55. package/dist/components/divider/context.d.ts +4 -4
  56. package/dist/components/divider/index.d.ts +2 -2
  57. package/dist/components/drawer/back.d.ts +2 -2
  58. package/dist/components/drawer/close.d.ts +2 -2
  59. package/dist/components/drawer/content.d.ts +2 -2
  60. package/dist/components/drawer/context.d.ts +2 -2
  61. package/dist/components/drawer/footer.d.ts +2 -2
  62. package/dist/components/drawer/header-title.d.ts +2 -2
  63. package/dist/components/drawer/header.d.ts +2 -2
  64. package/dist/components/drawer/index.d.ts +2 -2
  65. package/dist/components/drawer/layout-main.d.ts +2 -2
  66. package/dist/components/drawer/layout.d.ts +2 -2
  67. package/dist/components/drawer/menu-item.d.ts +2 -2
  68. package/dist/components/drawer/menu.d.ts +2 -2
  69. package/dist/components/drawer/panel.d.ts +2 -2
  70. package/dist/components/drawer/trigger.d.ts +2 -2
  71. package/dist/components/drawer/view.d.ts +2 -2
  72. package/dist/components/flashcard/index.d.ts +9 -9
  73. package/dist/components/floating-card/constants.d.ts +26 -0
  74. package/dist/components/floating-card/constants.js +40 -0
  75. package/dist/components/floating-card/constants.js.map +1 -0
  76. package/dist/components/floating-card/context.d.ts +38 -6
  77. package/dist/components/floating-card/context.js +24 -3
  78. package/dist/components/floating-card/context.js.map +1 -1
  79. package/dist/components/floating-card/hooks/use-card-layout.d.ts +36 -0
  80. package/dist/components/floating-card/hooks/use-card-layout.js +106 -0
  81. package/dist/components/floating-card/hooks/use-card-layout.js.map +1 -0
  82. package/dist/components/floating-card/hooks/use-drag.d.ts +62 -0
  83. package/dist/components/floating-card/hooks/use-drag.js +100 -0
  84. package/dist/components/floating-card/hooks/use-drag.js.map +1 -0
  85. package/dist/components/floating-card/hooks/use-mouse-interaction.d.ts +58 -0
  86. package/dist/components/floating-card/hooks/use-mouse-interaction.js +91 -0
  87. package/dist/components/floating-card/hooks/use-mouse-interaction.js.map +1 -0
  88. package/dist/components/floating-card/hooks/use-resize.d.ts +56 -0
  89. package/dist/components/floating-card/hooks/use-resize.js +98 -0
  90. package/dist/components/floating-card/hooks/use-resize.js.map +1 -0
  91. package/dist/components/floating-card/index.d.ts +6 -2
  92. package/dist/components/floating-card/index.js +24 -32
  93. package/dist/components/floating-card/index.js.map +1 -1
  94. package/dist/components/floating-card/panel.d.ts +69 -0
  95. package/dist/components/floating-card/panel.js +111 -0
  96. package/dist/components/floating-card/panel.js.map +1 -0
  97. package/dist/components/floating-card/provider.d.ts +10 -6
  98. package/dist/components/floating-card/provider.js +159 -153
  99. package/dist/components/floating-card/provider.js.map +1 -1
  100. package/dist/components/floating-card/styles.module.css +93 -39
  101. package/dist/components/floating-card/types.d.ts +51 -10
  102. package/dist/components/floating-card/utils.d.ts +8 -85
  103. package/dist/components/floating-card/utils.js +12 -38
  104. package/dist/components/floating-card/utils.js.map +1 -1
  105. package/dist/components/gantt/components/base-elements/range.d.ts +2 -2
  106. package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +2 -2
  107. package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +2 -2
  108. package/dist/components/gantt/components/containers/internal/index.d.ts +2 -2
  109. package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +2 -2
  110. package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +2 -2
  111. package/dist/components/gantt/components/content-row/block.d.ts +2 -2
  112. package/dist/components/gantt/components/content-row/bracket.d.ts +3 -3
  113. package/dist/components/gantt/components/content-row/icon-marker.d.ts +2 -2
  114. package/dist/components/gantt/components/content-row/index.d.ts +2 -2
  115. package/dist/components/gantt/components/content-row/marker.d.ts +2 -2
  116. package/dist/components/gantt/components/content-row/spacer.d.ts +2 -2
  117. package/dist/components/gantt/components/current-time/index.d.ts +2 -2
  118. package/dist/components/gantt/components/header/index.d.ts +3 -3
  119. package/dist/components/gantt/components/panel-row/index.d.ts +2 -2
  120. package/dist/components/gantt/components/rows-virtualizer/index.d.ts +3 -3
  121. package/dist/components/gantt/components/timeline/index.d.ts +2 -2
  122. package/dist/components/gantt/components/timeline-chunk/index.d.ts +3 -3
  123. package/dist/components/gantt/context/index.d.ts +4 -4
  124. package/dist/components/gantt/context/store/index.d.ts +4 -4
  125. package/dist/components/gantt/context/temporal-data/index.d.ts +4 -4
  126. package/dist/components/gantt/hooks/use-layout-subscription/index.js +8 -8
  127. package/dist/components/gantt/hooks/use-layout-subscription/index.js.map +1 -1
  128. package/dist/components/hero/context.d.ts +2 -2
  129. package/dist/components/hero/index.d.ts +2 -2
  130. package/dist/components/hero/subtitle.d.ts +3 -3
  131. package/dist/components/hero/title.d.ts +2 -2
  132. package/dist/components/hotkey/context.d.ts +4 -4
  133. package/dist/components/hotkey/index.d.ts +2 -2
  134. package/dist/components/hotkey/set.d.ts +2 -2
  135. package/dist/components/icon/context.d.ts +4 -4
  136. package/dist/components/icon/index.d.ts +2 -2
  137. package/dist/components/input/index.d.ts +2 -2
  138. package/dist/components/kanban/card-body.d.ts +2 -2
  139. package/dist/components/kanban/card-header-actions.d.ts +2 -2
  140. package/dist/components/kanban/card-header-title.d.ts +2 -2
  141. package/dist/components/kanban/card-header.d.ts +2 -2
  142. package/dist/components/kanban/card.d.ts +2 -2
  143. package/dist/components/kanban/column-actions.d.ts +2 -2
  144. package/dist/components/kanban/column-container.d.ts +2 -2
  145. package/dist/components/kanban/column-content.d.ts +2 -2
  146. package/dist/components/kanban/column-header-actions.d.ts +2 -2
  147. package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
  148. package/dist/components/kanban/column-header-title.d.ts +2 -2
  149. package/dist/components/kanban/column-header.d.ts +2 -2
  150. package/dist/components/kanban/column.d.ts +2 -2
  151. package/dist/components/kanban/context.d.ts +2 -2
  152. package/dist/components/kanban/header-actions.d.ts +2 -2
  153. package/dist/components/kanban/header-search.d.ts +2 -2
  154. package/dist/components/kanban/header-title.d.ts +2 -2
  155. package/dist/components/kanban/header.d.ts +2 -2
  156. package/dist/components/kanban/kanban.d.ts +2 -2
  157. package/dist/components/label/context.d.ts +4 -4
  158. package/dist/components/label/index.d.ts +2 -2
  159. package/dist/components/lines/index.d.ts +2 -2
  160. package/dist/components/link/context.d.ts +2 -2
  161. package/dist/components/link/index.d.ts +2 -2
  162. package/dist/components/list/context.d.ts +2 -2
  163. package/dist/components/list/index.d.ts +2 -2
  164. package/dist/components/list/item-content.d.ts +2 -2
  165. package/dist/components/list/item-description.d.ts +2 -2
  166. package/dist/components/list/item-title.d.ts +2 -2
  167. package/dist/components/list/item.d.ts +2 -2
  168. package/dist/components/media-controls/context.d.ts +4 -4
  169. package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
  170. package/dist/components/media-controls/index.d.ts +2 -2
  171. package/dist/components/media-controls/mute-button.d.ts +2 -2
  172. package/dist/components/media-controls/play-button.d.ts +2 -2
  173. package/dist/components/media-controls/playback-rate.d.ts +2 -2
  174. package/dist/components/media-controls/seek-button.d.ts +2 -2
  175. package/dist/components/media-controls/time-display.d.ts +2 -2
  176. package/dist/components/media-controls/time-range.d.ts +2 -2
  177. package/dist/components/media-controls/volume-slider.d.ts +2 -2
  178. package/dist/components/menu/context.d.ts +2 -2
  179. package/dist/components/menu/index.d.ts +2 -2
  180. package/dist/components/menu/item-description.d.ts +2 -2
  181. package/dist/components/menu/item-label.d.ts +2 -2
  182. package/dist/components/menu/item.d.ts +2 -2
  183. package/dist/components/menu/section.d.ts +2 -2
  184. package/dist/components/menu/separator.d.ts +2 -2
  185. package/dist/components/menu/submenu.d.ts +2 -2
  186. package/dist/components/notice/index.d.ts +2 -2
  187. package/dist/components/notice/list.d.ts +2 -2
  188. package/dist/components/notice/notice-icon.d.ts +2 -2
  189. package/dist/components/options/context.d.ts +2 -2
  190. package/dist/components/options/index.d.ts +2 -2
  191. package/dist/components/options/item-content.d.ts +2 -2
  192. package/dist/components/options/item-description.d.ts +2 -2
  193. package/dist/components/options/item-label.d.ts +2 -2
  194. package/dist/components/options/item.d.ts +2 -2
  195. package/dist/components/options/section.d.ts +2 -2
  196. package/dist/components/pagination/context.d.ts +2 -2
  197. package/dist/components/pagination/index.d.ts +2 -2
  198. package/dist/components/pagination/next.d.ts +2 -2
  199. package/dist/components/pagination/pages.d.ts +2 -2
  200. package/dist/components/pagination/prev.d.ts +2 -2
  201. package/dist/components/popover/content.d.ts +2 -2
  202. package/dist/components/popover/footer.d.ts +2 -2
  203. package/dist/components/popover/index.d.ts +2 -2
  204. package/dist/components/popover/title.d.ts +2 -2
  205. package/dist/components/popover/trigger.d.ts +2 -2
  206. package/dist/components/query-builder/action-element.d.ts +2 -2
  207. package/dist/components/query-builder/combinator-selector.d.ts +2 -2
  208. package/dist/components/query-builder/index.d.ts +2 -2
  209. package/dist/components/query-builder/rule-group.d.ts +4 -4
  210. package/dist/components/query-builder/rule.d.ts +2 -2
  211. package/dist/components/query-builder/value-editor.d.ts +2 -2
  212. package/dist/components/query-builder/value-selector.d.ts +2 -2
  213. package/dist/components/radio/context.d.ts +3 -3
  214. package/dist/components/radio/group.d.ts +2 -2
  215. package/dist/components/radio/index.d.ts +2 -2
  216. package/dist/components/search-field/context.d.ts +2 -2
  217. package/dist/components/search-field/index.d.ts +2 -2
  218. package/dist/components/select-field/context.d.ts +4 -4
  219. package/dist/components/select-field/index.d.ts +2 -2
  220. package/dist/components/sidenav/avatar.d.ts +2 -2
  221. package/dist/components/sidenav/content.d.ts +2 -2
  222. package/dist/components/sidenav/context.d.ts +2 -2
  223. package/dist/components/sidenav/footer.d.ts +2 -2
  224. package/dist/components/sidenav/header.d.ts +2 -2
  225. package/dist/components/sidenav/index.d.ts +2 -2
  226. package/dist/components/sidenav/item.d.ts +2 -2
  227. package/dist/components/sidenav/link.d.ts +2 -2
  228. package/dist/components/sidenav/menu-item.d.ts +2 -2
  229. package/dist/components/sidenav/menu.d.ts +2 -2
  230. package/dist/components/sidenav/trigger.d.ts +2 -2
  231. package/dist/components/skeleton/index.d.ts +2 -2
  232. package/dist/components/slider/index.d.ts +2 -2
  233. package/dist/components/status-indicator/index.d.ts +2 -2
  234. package/dist/components/stepper/back.d.ts +71 -0
  235. package/dist/components/stepper/back.js +82 -0
  236. package/dist/components/stepper/back.js.map +1 -0
  237. package/dist/components/stepper/context.d.ts +49 -0
  238. package/dist/components/stepper/context.js +56 -0
  239. package/dist/components/stepper/context.js.map +1 -0
  240. package/dist/components/stepper/index.d.ts +22 -0
  241. package/dist/components/stepper/index.js +23 -0
  242. package/dist/components/stepper/list.d.ts +65 -0
  243. package/dist/components/stepper/list.js +121 -0
  244. package/dist/components/stepper/list.js.map +1 -0
  245. package/dist/components/stepper/next.d.ts +80 -0
  246. package/dist/components/stepper/next.js +91 -0
  247. package/dist/components/stepper/next.js.map +1 -0
  248. package/dist/components/stepper/panel.d.ts +66 -0
  249. package/dist/components/stepper/panel.js +77 -0
  250. package/dist/components/stepper/panel.js.map +1 -0
  251. package/dist/components/stepper/step.d.ts +49 -0
  252. package/dist/components/stepper/step.js +89 -0
  253. package/dist/components/stepper/step.js.map +1 -0
  254. package/dist/components/stepper/stepper.d.ts +130 -0
  255. package/dist/components/stepper/stepper.js +154 -0
  256. package/dist/components/stepper/stepper.js.map +1 -0
  257. package/dist/components/stepper/styles.module.css +126 -0
  258. package/dist/components/stepper/types.d.ts +205 -0
  259. package/dist/components/stepper/types.js +12 -0
  260. package/dist/components/stepper/use-stepper-state.d.ts +175 -0
  261. package/dist/components/stepper/use-stepper-state.js +225 -0
  262. package/dist/components/stepper/use-stepper-state.js.map +1 -0
  263. package/dist/components/switch/context.d.ts +4 -4
  264. package/dist/components/switch/index.d.ts +2 -2
  265. package/dist/components/table/body.d.ts +4 -3
  266. package/dist/components/table/body.js.map +1 -1
  267. package/dist/components/table/cell.d.ts +4 -3
  268. package/dist/components/table/cell.js.map +1 -1
  269. package/dist/components/table/context.d.ts +2 -2
  270. package/dist/components/table/features.d.ts +80 -0
  271. package/dist/components/table/features.js +61 -0
  272. package/dist/components/table/features.js.map +1 -0
  273. package/dist/components/table/header-cell.d.ts +4 -3
  274. package/dist/components/table/header-cell.js.map +1 -1
  275. package/dist/components/table/header.d.ts +4 -3
  276. package/dist/components/table/header.js.map +1 -1
  277. package/dist/components/table/index.d.ts +2 -2
  278. package/dist/components/table/index.js +40 -49
  279. package/dist/components/table/index.js.map +1 -1
  280. package/dist/components/table/row-ordering-feature.d.ts +88 -0
  281. package/dist/components/table/row-ordering-feature.js +115 -0
  282. package/dist/components/table/row-ordering-feature.js.map +1 -0
  283. package/dist/components/table/row.d.ts +4 -3
  284. package/dist/components/table/row.js.map +1 -1
  285. package/dist/components/table/types.d.ts +15 -13
  286. package/dist/components/tabs/context.d.ts +6 -6
  287. package/dist/components/tabs/index.d.ts +2 -2
  288. package/dist/components/tabs/list.d.ts +2 -2
  289. package/dist/components/tabs/panel.d.ts +2 -2
  290. package/dist/components/tabs/tab.d.ts +2 -2
  291. package/dist/components/text-area-field/context.d.ts +4 -4
  292. package/dist/components/text-area-field/index.d.ts +2 -2
  293. package/dist/components/text-field/context.d.ts +4 -4
  294. package/dist/components/text-field/index.d.ts +2 -2
  295. package/dist/components/time-field/index.d.ts +2 -2
  296. package/dist/components/tooltip/context.d.ts +2 -2
  297. package/dist/components/tooltip/index.d.ts +2 -2
  298. package/dist/components/tooltip/trigger.d.ts +2 -2
  299. package/dist/components/tree/context.d.ts +3 -3
  300. package/dist/components/tree/index.d.ts +2 -2
  301. package/dist/components/tree/item-actions.d.ts +2 -2
  302. package/dist/components/tree/item-content.d.ts +2 -2
  303. package/dist/components/tree/item-description.d.ts +2 -2
  304. package/dist/components/tree/item-label.d.ts +2 -2
  305. package/dist/components/tree/item-prefix-icon.d.ts +2 -2
  306. package/dist/components/tree/item.d.ts +2 -2
  307. package/dist/components/tree/lines.d.ts +2 -2
  308. package/dist/components/video/index.d.ts +2 -2
  309. package/dist/components/view-stack/context.d.ts +2 -2
  310. package/dist/components/view-stack/index.d.ts +2 -2
  311. package/dist/components/view-stack/trigger.d.ts +2 -2
  312. package/dist/components/view-stack/view.d.ts +2 -2
  313. package/dist/index.d.ts +13 -2
  314. package/dist/index.js +11 -1
  315. package/dist/providers/portal.d.ts +2 -2
  316. package/dist/providers/theme-provider.d.ts +2 -2
  317. package/package.json +28 -12
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { SwitchProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime97 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime180 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/switch/index.d.ts
18
18
 
@@ -38,7 +38,7 @@ import * as react_jsx_runtime97 from "react/jsx-runtime";
38
38
  declare function Switch({
39
39
  ref,
40
40
  ...props
41
- }: SwitchProps): react_jsx_runtime97.JSX.Element;
41
+ }: SwitchProps): react_jsx_runtime180.JSX.Element;
42
42
  //#endregion
43
43
  export { Switch };
44
44
  //# sourceMappingURL=index.d.ts.map
@@ -11,7 +11,8 @@
11
11
  */
12
12
 
13
13
  import { TableBodyProps } from "./types.js";
14
- import * as react_jsx_runtime101 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime217 from "react/jsx-runtime";
15
+ import { RowData } from "@tanstack/react-table";
15
16
 
16
17
  //#region src/components/table/body.d.ts
17
18
 
@@ -33,13 +34,13 @@ import * as react_jsx_runtime101 from "react/jsx-runtime";
33
34
  * @param props.rows - Array of TanStack table rows to render.
34
35
  * @returns The rendered TableBody component.
35
36
  */
36
- declare function TableBody<T>({
37
+ declare function TableBody<T extends RowData>({
37
38
  children,
38
39
  className,
39
40
  ref,
40
41
  rows,
41
42
  ...rest
42
- }: TableBodyProps<T>): react_jsx_runtime101.JSX.Element;
43
+ }: TableBodyProps<T>): react_jsx_runtime217.JSX.Element;
43
44
  //#endregion
44
45
  export { TableBody };
45
46
  //# sourceMappingURL=body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"body.js","names":[],"sources":["../../../src/components/table/body.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { TableRow } from './row';\nimport type { TableBodyProps } from './types';\n\n/**\n * TableBody - Renders the table body section (`<tbody>`).\n *\n * @example\n * ```tsx\n * <Table>\n * <TableHeader headerGroups={table.getHeaderGroups()} />\n * <TableBody rows={table.getRowModel().rows} />\n * </Table>\n * ```\n *\n * @param props - {@link TableBodyProps}\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the tbody element.\n * @param props.ref - Ref to the tbody element.\n * @param props.rows - Array of TanStack table rows to render.\n * @returns The rendered TableBody component.\n */\nexport function TableBody<T>({\n children,\n className,\n ref,\n rows,\n ...rest\n}: TableBodyProps<T>) {\n return (\n <tbody {...rest} ref={ref} className={clsx('group/tbody', className)}>\n {children || rows?.map((row) => <TableRow key={row.id} row={row} />)}\n </tbody>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,UAAa,EAC3B,UACA,WACA,KACA,MACA,GAAG,QACiB;AACpB,QACE,oBAAC;EAAM,GAAI;EAAW;EAAK,WAAW,KAAK,eAAe,UAAU;YACjE,YAAY,MAAM,KAAK,QAAQ,oBAAC,YAA2B,OAAb,IAAI,GAAgB,CAAC;GAC9D"}
1
+ {"version":3,"file":"body.js","names":[],"sources":["../../../src/components/table/body.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { TableRow } from './row';\nimport type { RowData } from '@tanstack/react-table';\nimport type { TableBodyProps } from './types';\n\n/**\n * TableBody - Renders the table body section (`<tbody>`).\n *\n * @example\n * ```tsx\n * <Table>\n * <TableHeader headerGroups={table.getHeaderGroups()} />\n * <TableBody rows={table.getRowModel().rows} />\n * </Table>\n * ```\n *\n * @param props - {@link TableBodyProps}\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the tbody element.\n * @param props.ref - Ref to the tbody element.\n * @param props.rows - Array of TanStack table rows to render.\n * @returns The rendered TableBody component.\n */\nexport function TableBody<T extends RowData>({\n children,\n className,\n ref,\n rows,\n ...rest\n}: TableBodyProps<T>) {\n return (\n <tbody {...rest} ref={ref} className={clsx('group/tbody', className)}>\n {children || rows?.map((row) => <TableRow key={row.id} row={row} />)}\n </tbody>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAgB,UAA6B,EAC3C,UACA,WACA,KACA,MACA,GAAG,QACiB;AACpB,QACE,oBAAC;EAAM,GAAI;EAAW;EAAK,WAAW,KAAK,eAAe,UAAU;YACjE,YAAY,MAAM,KAAK,QAAQ,oBAAC,YAA2B,OAAb,IAAI,GAAgB,CAAC;GAC9D"}
@@ -11,7 +11,8 @@
11
11
  */
12
12
 
13
13
  import { TableCellProps } from "./types.js";
14
- import * as react_jsx_runtime98 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime231 from "react/jsx-runtime";
15
+ import { RowData } from "@tanstack/react-table";
15
16
 
16
17
  //#region src/components/table/cell.d.ts
17
18
 
@@ -34,13 +35,13 @@ import * as react_jsx_runtime98 from "react/jsx-runtime";
34
35
  * @param props.cell - TanStack table cell object.
35
36
  * @returns The rendered TableCell component.
36
37
  */
37
- declare function TableCell<T>({
38
+ declare function TableCell<T extends RowData>({
38
39
  children,
39
40
  ref,
40
41
  className,
41
42
  cell,
42
43
  ...rest
43
- }: TableCellProps<T>): react_jsx_runtime98.JSX.Element;
44
+ }: TableCellProps<T>): react_jsx_runtime231.JSX.Element;
44
45
  //#endregion
45
46
  export { TableCell };
46
47
  //# sourceMappingURL=cell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell.js","names":[],"sources":["../../../src/components/table/cell.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { flexRender } from '@tanstack/react-table';\nimport { useContext } from 'react';\nimport { HeaderColumnAction } from './constants/table';\nimport { TableContext } from './context';\nimport styles from './styles.module.css';\nimport type { TableCellProps } from './types';\n\n/**\n * TableCell - Data cell (`<td>`) within a table row.\n *\n * @example\n * ```tsx\n * <TableRow row={row}>\n * {row.getAllCells().map(cell => (\n * <TableCell key={cell.id} cell={cell} />\n * ))}\n * </TableRow>\n * ```\n *\n * @param props - {@link TableCellProps}\n * @param props.children - Custom children content.\n * @param props.ref - Ref to the td element.\n * @param props.className - CSS class for the td element.\n * @param props.cell - TanStack table cell object.\n * @returns The rendered TableCell component.\n */\nexport function TableCell<T>({\n children,\n ref,\n className,\n cell,\n ...rest\n}: TableCellProps<T>) {\n const { columnSelection, persistNumerals } = useContext(TableContext);\n const isNumeral = cell?.column.id === HeaderColumnAction.NUMERAL;\n const isSelected = cell?.column.id === columnSelection;\n const notPersistNums = isNumeral && !persistNumerals;\n\n return (\n <td\n {...rest}\n ref={ref}\n className={clsx(\n styles.cell,\n notPersistNums && styles.hideInRow,\n className,\n )}\n data-selected={isSelected || null}\n style={{ width: cell?.column.getSize() }}\n >\n {children ||\n (cell && flexRender(cell.column.columnDef.cell, cell.getContext()))}\n </td>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,UAAa,EAC3B,UACA,KACA,WACA,MACA,GAAG,QACiB;CACpB,MAAM,EAAE,iBAAiB,oBAAoB,WAAW,aAAa;CACrE,MAAM,YAAY,MAAM,OAAO,OAAO,mBAAmB;CACzD,MAAM,aAAa,MAAM,OAAO,OAAO;CACvC,MAAM,iBAAiB,aAAa,CAAC;AAErC,QACE,oBAAC;EACC,GAAI;EACC;EACL,WAAW,KACT,OAAO,MACP,kBAAkB,OAAO,WACzB,UACD;EACD,iBAAe,cAAc;EAC7B,OAAO,EAAE,OAAO,MAAM,OAAO,SAAS,EAAE;YAEvC,YACE,QAAQ,WAAW,KAAK,OAAO,UAAU,MAAM,KAAK,YAAY,CAAC;GACjE"}
1
+ {"version":3,"file":"cell.js","names":[],"sources":["../../../src/components/table/cell.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { flexRender, type RowData } from '@tanstack/react-table';\nimport { useContext } from 'react';\nimport { HeaderColumnAction } from './constants/table';\nimport { TableContext } from './context';\nimport styles from './styles.module.css';\nimport type { TableCellProps } from './types';\n\n/**\n * TableCell - Data cell (`<td>`) within a table row.\n *\n * @example\n * ```tsx\n * <TableRow row={row}>\n * {row.getAllCells().map(cell => (\n * <TableCell key={cell.id} cell={cell} />\n * ))}\n * </TableRow>\n * ```\n *\n * @param props - {@link TableCellProps}\n * @param props.children - Custom children content.\n * @param props.ref - Ref to the td element.\n * @param props.className - CSS class for the td element.\n * @param props.cell - TanStack table cell object.\n * @returns The rendered TableCell component.\n */\nexport function TableCell<T extends RowData>({\n children,\n ref,\n className,\n cell,\n ...rest\n}: TableCellProps<T>) {\n const { columnSelection, persistNumerals } = useContext(TableContext);\n const isNumeral = cell?.column.id === HeaderColumnAction.NUMERAL;\n const isSelected = cell?.column.id === columnSelection;\n const notPersistNums = isNumeral && !persistNumerals;\n\n return (\n <td\n {...rest}\n ref={ref}\n className={clsx(\n styles.cell,\n notPersistNums && styles.hideInRow,\n className,\n )}\n data-selected={isSelected || null}\n style={{ width: cell?.column.getSize() }}\n >\n {children ||\n (cell && flexRender(cell.column.columnDef.cell, cell.getContext()))}\n </td>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,UAA6B,EAC3C,UACA,KACA,WACA,MACA,GAAG,QACiB;CACpB,MAAM,EAAE,iBAAiB,oBAAoB,WAAW,aAAa;CACrE,MAAM,YAAY,MAAM,OAAO,OAAO,mBAAmB;CACzD,MAAM,aAAa,MAAM,OAAO,OAAO;CACvC,MAAM,iBAAiB,aAAa,CAAC;AAErC,QACE,oBAAC;EACC,GAAI;EACC;EACL,WAAW,KACT,OAAO,MACP,kBAAkB,OAAO,WACzB,UACD;EACD,iBAAe,cAAc;EAC7B,OAAO,EAAE,OAAO,MAAM,OAAO,SAAS,EAAE;YAEvC,YACE,QAAQ,WAAW,KAAK,OAAO,UAAU,MAAM,KAAK,YAAY,CAAC;GACjE"}
@@ -11,11 +11,11 @@
11
11
  */
12
12
 
13
13
  import { TableContextValue } from "./types.js";
14
- import * as react28 from "react";
14
+ import * as react45 from "react";
15
15
 
16
16
  //#region src/components/table/context.d.ts
17
17
  /** Context for sharing table configuration across subcomponents */
18
- declare const TableContext: react28.Context<TableContextValue>;
18
+ declare const TableContext: react45.Context<TableContextValue>;
19
19
  //#endregion
20
20
  export { TableContext };
21
21
  //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import * as _tanstack_react_table0 from "@tanstack/react-table";
14
+ import { RowData } from "@tanstack/react-table";
15
+
16
+ //#region src/components/table/features.d.ts
17
+ /**
18
+ * The TanStack Table feature set registered for every Table instance.
19
+ *
20
+ * Use `typeof tableFeatures` (or {@link TableFeatures}) as the first generic
21
+ * of TanStack types (`ColumnDef`, `CellContext`, etc.) when typing columns
22
+ * for the Table component.
23
+ */
24
+ declare const tableFeatures: {
25
+ rowSortingFeature: _tanstack_react_table0.TableFeature;
26
+ rowSelectionFeature: _tanstack_react_table0.TableFeature;
27
+ rowPinningFeature: _tanstack_react_table0.TableFeature;
28
+ rowPaginationFeature: _tanstack_react_table0.TableFeature;
29
+ rowOrderingFeature: _tanstack_react_table0.TableFeature;
30
+ columnOrderingFeature: _tanstack_react_table0.TableFeature;
31
+ columnSizingFeature: _tanstack_react_table0.TableFeature;
32
+ sortedRowModel: (table: _tanstack_react_table0.Table<any, any>) => () => _tanstack_react_table0.RowModel<any, any>;
33
+ paginatedRowModel: (table: _tanstack_react_table0.Table<any, any>) => () => _tanstack_react_table0.RowModel<any, any>;
34
+ sortFns: {
35
+ alphanumeric: _tanstack_react_table0.CreatedSortFn<any, any>;
36
+ alphanumericCaseSensitive: _tanstack_react_table0.CreatedSortFn<any, any>;
37
+ basic: _tanstack_react_table0.CreatedSortFn<any, any>;
38
+ datetime: _tanstack_react_table0.CreatedSortFn<any, any>;
39
+ text: _tanstack_react_table0.CreatedSortFn<any, any>;
40
+ textCaseSensitive: _tanstack_react_table0.CreatedSortFn<any, any>;
41
+ };
42
+ };
43
+ /**
44
+ * Feature set type of the Table component; first generic parameter for
45
+ * TanStack Table types.
46
+ */
47
+ type TableFeatures = typeof tableFeatures;
48
+ /**
49
+ * Column helper pre-bound to the Table component's feature set.
50
+ *
51
+ * Replacement for TanStack Table v8's `createColumnHelper<TData>()`.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * const columnHelper = createTableColumnHelper<Person>();
56
+ * const columns = [columnHelper.accessor('firstName', { header: 'First Name' })];
57
+ * ```
58
+ */
59
+ declare function createTableColumnHelper<TData extends RowData>(): _tanstack_react_table0.ColumnHelper<{
60
+ rowSortingFeature: _tanstack_react_table0.TableFeature;
61
+ rowSelectionFeature: _tanstack_react_table0.TableFeature;
62
+ rowPinningFeature: _tanstack_react_table0.TableFeature;
63
+ rowPaginationFeature: _tanstack_react_table0.TableFeature;
64
+ rowOrderingFeature: _tanstack_react_table0.TableFeature;
65
+ columnOrderingFeature: _tanstack_react_table0.TableFeature;
66
+ columnSizingFeature: _tanstack_react_table0.TableFeature;
67
+ sortedRowModel: (table: _tanstack_react_table0.Table<any, any>) => () => _tanstack_react_table0.RowModel<any, any>;
68
+ paginatedRowModel: (table: _tanstack_react_table0.Table<any, any>) => () => _tanstack_react_table0.RowModel<any, any>;
69
+ sortFns: {
70
+ alphanumeric: _tanstack_react_table0.CreatedSortFn<any, any>;
71
+ alphanumericCaseSensitive: _tanstack_react_table0.CreatedSortFn<any, any>;
72
+ basic: _tanstack_react_table0.CreatedSortFn<any, any>;
73
+ datetime: _tanstack_react_table0.CreatedSortFn<any, any>;
74
+ text: _tanstack_react_table0.CreatedSortFn<any, any>;
75
+ textCaseSensitive: _tanstack_react_table0.CreatedSortFn<any, any>;
76
+ };
77
+ }, TData>;
78
+ //#endregion
79
+ export { TableFeatures, createTableColumnHelper, tableFeatures };
80
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at https://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+
14
+ import { rowOrderingFeature } from "./row-ordering-feature.js";
15
+ import { columnOrderingFeature, columnSizingFeature, createColumnHelper, createPaginatedRowModel, createSortedRowModel, rowPaginationFeature, rowPinningFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, tableFeatures as tableFeatures$1 } from "@tanstack/react-table";
16
+
17
+ //#region src/components/table/features.ts
18
+ /**
19
+ * The TanStack Table feature set registered for every Table instance.
20
+ *
21
+ * Use `typeof tableFeatures` (or {@link TableFeatures}) as the first generic
22
+ * of TanStack types (`ColumnDef`, `CellContext`, etc.) when typing columns
23
+ * for the Table component.
24
+ */
25
+ const tableFeatures = tableFeatures$1({
26
+ rowSortingFeature,
27
+ rowSelectionFeature,
28
+ rowPinningFeature,
29
+ rowPaginationFeature,
30
+ rowOrderingFeature,
31
+ columnOrderingFeature,
32
+ columnSizingFeature,
33
+ sortedRowModel: createSortedRowModel(),
34
+ paginatedRowModel: createPaginatedRowModel(),
35
+ sortFns: {
36
+ alphanumeric: sortFn_alphanumeric,
37
+ alphanumericCaseSensitive: sortFn_alphanumericCaseSensitive,
38
+ basic: sortFn_basic,
39
+ datetime: sortFn_datetime,
40
+ text: sortFn_text,
41
+ textCaseSensitive: sortFn_textCaseSensitive
42
+ }
43
+ });
44
+ /**
45
+ * Column helper pre-bound to the Table component's feature set.
46
+ *
47
+ * Replacement for TanStack Table v8's `createColumnHelper<TData>()`.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * const columnHelper = createTableColumnHelper<Person>();
52
+ * const columns = [columnHelper.accessor('firstName', { header: 'First Name' })];
53
+ * ```
54
+ */
55
+ function createTableColumnHelper() {
56
+ return createColumnHelper();
57
+ }
58
+
59
+ //#endregion
60
+ export { createTableColumnHelper, tableFeatures };
61
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.js","names":["createTableFeatures"],"sources":["../../../src/components/table/features.ts"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n columnOrderingFeature,\n columnSizingFeature,\n createColumnHelper,\n createPaginatedRowModel,\n createSortedRowModel,\n tableFeatures as createTableFeatures,\n rowPaginationFeature,\n rowPinningFeature,\n rowSelectionFeature,\n rowSortingFeature,\n sortFn_alphanumeric,\n sortFn_alphanumericCaseSensitive,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n sortFn_textCaseSensitive,\n} from '@tanstack/react-table';\nimport { rowOrderingFeature } from './row-ordering-feature';\nimport type { RowData } from '@tanstack/react-table';\n\n/**\n * The TanStack Table feature set registered for every Table instance.\n *\n * Use `typeof tableFeatures` (or {@link TableFeatures}) as the first generic\n * of TanStack types (`ColumnDef`, `CellContext`, etc.) when typing columns\n * for the Table component.\n */\nexport const tableFeatures = createTableFeatures({\n rowSortingFeature,\n rowSelectionFeature,\n rowPinningFeature,\n rowPaginationFeature,\n rowOrderingFeature,\n columnOrderingFeature,\n columnSizingFeature,\n sortedRowModel: createSortedRowModel(),\n paginatedRowModel: createPaginatedRowModel(),\n // all built-in sortFns so column `sortFn` string names (and 'auto') resolve\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n alphanumericCaseSensitive: sortFn_alphanumericCaseSensitive,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n textCaseSensitive: sortFn_textCaseSensitive,\n },\n});\n\n/**\n * Feature set type of the Table component; first generic parameter for\n * TanStack Table types.\n */\nexport type TableFeatures = typeof tableFeatures;\n\n/**\n * Column helper pre-bound to the Table component's feature set.\n *\n * Replacement for TanStack Table v8's `createColumnHelper<TData>()`.\n *\n * @example\n * ```tsx\n * const columnHelper = createTableColumnHelper<Person>();\n * const columns = [columnHelper.accessor('firstName', { header: 'First Name' })];\n * ```\n */\nexport function createTableColumnHelper<TData extends RowData>() {\n return createColumnHelper<TableFeatures, TData>();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,gBAAgBA,gBAAoB;CAC/C;CACA;CACA;CACA;CACA;CACA;CACA;CACA,gBAAgB,sBAAsB;CACtC,mBAAmB,yBAAyB;CAE5C,SAAS;EACP,cAAc;EACd,2BAA2B;EAC3B,OAAO;EACP,UAAU;EACV,MAAM;EACN,mBAAmB;EACpB;CACF,CAAC;;;;;;;;;;;;AAmBF,SAAgB,0BAAiD;AAC/D,QAAO,oBAA0C"}
@@ -11,7 +11,8 @@
11
11
  */
12
12
 
13
13
  import { TableHeaderCellProps } from "./types.js";
14
- import * as react_jsx_runtime100 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime244 from "react/jsx-runtime";
15
+ import { RowData } from "@tanstack/react-table";
15
16
 
16
17
  //#region src/components/table/header-cell.d.ts
17
18
 
@@ -36,13 +37,13 @@ import * as react_jsx_runtime100 from "react/jsx-runtime";
36
37
  * @param props.header - TanStack table header object.
37
38
  * @returns The rendered TableHeaderCell component.
38
39
  */
39
- declare function TableHeaderCell<T>({
40
+ declare function TableHeaderCell<T extends RowData>({
40
41
  ref,
41
42
  children,
42
43
  className,
43
44
  header,
44
45
  ...rest
45
- }: TableHeaderCellProps<T>): react_jsx_runtime100.JSX.Element;
46
+ }: TableHeaderCellProps<T>): react_jsx_runtime244.JSX.Element;
46
47
  //#endregion
47
48
  export { TableHeaderCell };
48
49
  //# sourceMappingURL=header-cell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-cell.js","names":[],"sources":["../../../src/components/table/header-cell.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ArrowDown from '@accelint/icons/arrow-down';\nimport ArrowUp from '@accelint/icons/arrow-up';\nimport Kebab from '@accelint/icons/kebab';\nimport { flexRender, type Header } from '@tanstack/react-table';\nimport { useContext, useState } from 'react';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { Menu } from '../menu';\nimport { MenuItem } from '../menu/item';\nimport { MenuSeparator } from '../menu/separator';\nimport { MenuTrigger } from '../menu/trigger';\nimport {\n HeaderColumnAction,\n headerColumnActionValues,\n SortDirection,\n} from './constants/table';\nimport { TableContext } from './context';\nimport styles from './styles.module.css';\nimport type { TableHeaderCellProps } from './types';\n\nfunction HeaderCellMenu<T>({ header }: { header: Header<T, unknown> }) {\n const {\n enableColumnReordering,\n enableSorting,\n moveColumnLeft,\n moveColumnRight,\n persistHeaderKebabMenu,\n setColumnSelection,\n manualSorting,\n handleSortChange,\n handleColumnReordering,\n } = useContext(TableContext);\n\n const [hoveredArrow, setHoveredArrow] = useState(false);\n const hideHeaderKebab = !persistHeaderKebabMenu;\n\n if (\n headerColumnActionValues.includes(\n header.column.id as 'numeral' | 'kebab' | 'selection',\n ) ||\n !(enableSorting || enableColumnReordering)\n ) {\n return null;\n }\n\n const sort = header.column.getIsSorted();\n\n return (\n <div className={clsx(hideHeaderKebab && styles.hideInHeader)}>\n <MenuTrigger\n onOpenChange={(isOpen) =>\n setColumnSelection(isOpen ? header.column.id : null)\n }\n >\n <Button\n variant='icon'\n aria-label='Menu'\n onHoverChange={setHoveredArrow}\n >\n <Icon>\n {(!sort || hoveredArrow) && <Kebab />}\n {!hoveredArrow && sort === SortDirection.DESC && <ArrowDown />}\n {!hoveredArrow && sort === SortDirection.ASC && <ArrowUp />}\n </Icon>\n </Button>\n <Menu>\n {enableColumnReordering && (\n <>\n <MenuItem\n onAction={() => {\n const index = header.column.getIndex();\n moveColumnLeft(index);\n handleColumnReordering?.(index);\n }}\n isDisabled={header.column.getIsFirstColumn('center')}\n >\n Move Column Left\n </MenuItem>\n <MenuItem\n onAction={() => {\n const index = header.column.getIndex();\n moveColumnRight(index);\n handleColumnReordering?.(index);\n }}\n isDisabled={header.column.getIsLastColumn('center')}\n >\n Move Column Right\n </MenuItem>\n </>\n )}\n {enableColumnReordering && enableSorting && <MenuSeparator />}\n {enableSorting && (\n <>\n <MenuItem\n onAction={() => {\n manualSorting\n ? handleSortChange?.(header.column.id, SortDirection.ASC)\n : header.column.toggleSorting(false);\n }}\n isDisabled={sort === SortDirection.ASC}\n >\n Sort Ascending\n </MenuItem>\n <MenuItem\n onAction={() => {\n manualSorting\n ? handleSortChange?.(header.column.id, SortDirection.DESC)\n : header.column.toggleSorting(true);\n }}\n isDisabled={sort === SortDirection.DESC}\n >\n Sort Descending\n </MenuItem>\n <MenuItem\n onAction={() => {\n manualSorting\n ? handleSortChange?.(header.column.id, null)\n : header.column.clearSorting();\n }}\n isDisabled={!sort}\n >\n Clear Sort\n </MenuItem>\n </>\n )}\n </Menu>\n </MenuTrigger>\n </div>\n );\n}\n\n/**\n * TableHeaderCell - Individual header cell (`<th>`) with optional sorting controls.\n *\n * @example\n * ```tsx\n * <TableHeader headerGroups={headerGroups}>\n * <tr>\n * {headerGroup.headers.map(header => (\n * <TableHeaderCell key={header.id} header={header} />\n * ))}\n * </tr>\n * </TableHeader>\n * ```\n *\n * @param props - {@link TableHeaderCellProps}\n * @param props.ref - Ref to the th element.\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the th element.\n * @param props.header - TanStack table header object.\n * @returns The rendered TableHeaderCell component.\n */\nexport function TableHeaderCell<T>({\n ref,\n children,\n className,\n header,\n ...rest\n}: TableHeaderCellProps<T>) {\n const { columnSelection } = useContext(TableContext);\n const renderProps = header?.getContext();\n const sortLabel =\n header?.column.getIsSorted() === SortDirection.ASC\n ? 'ascending'\n : header?.column.getIsSorted() === SortDirection.DESC\n ? 'descending'\n : undefined;\n\n return (\n <th\n {...rest}\n aria-sort={sortLabel}\n ref={ref}\n style={{ width: header?.getSize() }}\n >\n <div\n className={clsx('group/header-cell', styles.headerCell, className)}\n data-selected={header?.column.id === columnSelection || null}\n >\n {children ||\n (header && (\n <>\n {header.column.id !== HeaderColumnAction.KEBAB &&\n renderProps &&\n flexRender(header.column.columnDef.header, renderProps)}\n <HeaderCellMenu header={header} />\n </>\n ))}\n </div>\n </th>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAS,eAAkB,EAAE,UAA0C;CACrE,MAAM,EACJ,wBACA,eACA,gBACA,iBACA,wBACA,oBACA,eACA,kBACA,2BACE,WAAW,aAAa;CAE5B,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CACvD,MAAM,kBAAkB,CAAC;AAEzB,KACE,yBAAyB,SACvB,OAAO,OAAO,GACf,IACD,EAAE,iBAAiB,wBAEnB,QAAO;CAGT,MAAM,OAAO,OAAO,OAAO,aAAa;AAExC,QACE,oBAAC;EAAI,WAAW,KAAK,mBAAmB,OAAO,aAAa;YAC1D,qBAAC;GACC,eAAe,WACb,mBAAmB,SAAS,OAAO,OAAO,KAAK,KAAK;cAGtD,oBAAC;IACC,SAAQ;IACR,cAAW;IACX,eAAe;cAEf,qBAAC;MACG,CAAC,QAAQ,iBAAiB,oBAAC,UAAQ;KACpC,CAAC,gBAAgB,SAAS,cAAc,QAAQ,oBAAC,cAAY;KAC7D,CAAC,gBAAgB,SAAS,cAAc,OAAO,oBAAC,YAAU;QACtD;KACA,EACT,qBAAC;IACE,0BACC,8CACE,oBAAC;KACC,gBAAgB;MACd,MAAM,QAAQ,OAAO,OAAO,UAAU;AACtC,qBAAe,MAAM;AACrB,+BAAyB,MAAM;;KAEjC,YAAY,OAAO,OAAO,iBAAiB,SAAS;eACrD;MAEU,EACX,oBAAC;KACC,gBAAgB;MACd,MAAM,QAAQ,OAAO,OAAO,UAAU;AACtC,sBAAgB,MAAM;AACtB,+BAAyB,MAAM;;KAEjC,YAAY,OAAO,OAAO,gBAAgB,SAAS;eACpD;MAEU,IACV;IAEJ,0BAA0B,iBAAiB,oBAAC,kBAAgB;IAC5D,iBACC;KACE,oBAAC;MACC,gBAAgB;AACd,uBACI,mBAAmB,OAAO,OAAO,IAAI,cAAc,IAAI,GACvD,OAAO,OAAO,cAAc,MAAM;;MAExC,YAAY,SAAS,cAAc;gBACpC;OAEU;KACX,oBAAC;MACC,gBAAgB;AACd,uBACI,mBAAmB,OAAO,OAAO,IAAI,cAAc,KAAK,GACxD,OAAO,OAAO,cAAc,KAAK;;MAEvC,YAAY,SAAS,cAAc;gBACpC;OAEU;KACX,oBAAC;MACC,gBAAgB;AACd,uBACI,mBAAmB,OAAO,OAAO,IAAI,KAAK,GAC1C,OAAO,OAAO,cAAc;;MAElC,YAAY,CAAC;gBACd;OAEU;QACV;OAEA;IACK;GACV;;;;;;;;;;;;;;;;;;;;;;;AAyBV,SAAgB,gBAAmB,EACjC,KACA,UACA,WACA,QACA,GAAG,QACuB;CAC1B,MAAM,EAAE,oBAAoB,WAAW,aAAa;CACpD,MAAM,cAAc,QAAQ,YAAY;CACxC,MAAM,YACJ,QAAQ,OAAO,aAAa,KAAK,cAAc,MAC3C,cACA,QAAQ,OAAO,aAAa,KAAK,cAAc,OAC7C,eACA;AAER,QACE,oBAAC;EACC,GAAI;EACJ,aAAW;EACN;EACL,OAAO,EAAE,OAAO,QAAQ,SAAS,EAAE;YAEnC,oBAAC;GACC,WAAW,KAAK,qBAAqB,OAAO,YAAY,UAAU;GAClE,iBAAe,QAAQ,OAAO,OAAO,mBAAmB;aAEvD,YACE,UACC,8CACG,OAAO,OAAO,OAAO,mBAAmB,SACvC,eACA,WAAW,OAAO,OAAO,UAAU,QAAQ,YAAY,EACzD,oBAAC,kBAAuB,SAAU,IACjC;IAEH;GACH"}
1
+ {"version":3,"file":"header-cell.js","names":[],"sources":["../../../src/components/table/header-cell.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ArrowDown from '@accelint/icons/arrow-down';\nimport ArrowUp from '@accelint/icons/arrow-up';\nimport Kebab from '@accelint/icons/kebab';\nimport { flexRender, type Header, type RowData } from '@tanstack/react-table';\nimport { useContext, useState } from 'react';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { Menu } from '../menu';\nimport { MenuItem } from '../menu/item';\nimport { MenuSeparator } from '../menu/separator';\nimport { MenuTrigger } from '../menu/trigger';\nimport {\n HeaderColumnAction,\n headerColumnActionValues,\n SortDirection,\n} from './constants/table';\nimport { TableContext } from './context';\nimport styles from './styles.module.css';\nimport type { TableFeatures } from './features';\nimport type { TableHeaderCellProps } from './types';\n\nfunction HeaderCellMenu<T extends RowData>({\n header,\n}: {\n header: Header<TableFeatures, T, unknown>;\n}) {\n const {\n enableColumnReordering,\n enableSorting,\n moveColumnLeft,\n moveColumnRight,\n persistHeaderKebabMenu,\n setColumnSelection,\n manualSorting,\n handleSortChange,\n handleColumnReordering,\n } = useContext(TableContext);\n\n const [hoveredArrow, setHoveredArrow] = useState(false);\n const hideHeaderKebab = !persistHeaderKebabMenu;\n\n if (\n headerColumnActionValues.includes(\n header.column.id as 'numeral' | 'kebab' | 'selection',\n ) ||\n !(enableSorting || enableColumnReordering)\n ) {\n return null;\n }\n\n const sort = header.column.getIsSorted();\n\n return (\n <div className={clsx(hideHeaderKebab && styles.hideInHeader)}>\n <MenuTrigger\n onOpenChange={(isOpen) =>\n setColumnSelection(isOpen ? header.column.id : null)\n }\n >\n <Button\n variant='icon'\n aria-label='Menu'\n onHoverChange={setHoveredArrow}\n >\n <Icon>\n {(!sort || hoveredArrow) && <Kebab />}\n {!hoveredArrow && sort === SortDirection.DESC && <ArrowDown />}\n {!hoveredArrow && sort === SortDirection.ASC && <ArrowUp />}\n </Icon>\n </Button>\n <Menu>\n {enableColumnReordering && (\n <>\n <MenuItem\n onAction={() => {\n const index = header.column.getIndex();\n moveColumnLeft(index);\n handleColumnReordering?.(index);\n }}\n isDisabled={header.column.getIsFirstColumn('center')}\n >\n Move Column Left\n </MenuItem>\n <MenuItem\n onAction={() => {\n const index = header.column.getIndex();\n moveColumnRight(index);\n handleColumnReordering?.(index);\n }}\n isDisabled={header.column.getIsLastColumn('center')}\n >\n Move Column Right\n </MenuItem>\n </>\n )}\n {enableColumnReordering && enableSorting && <MenuSeparator />}\n {enableSorting && (\n <>\n <MenuItem\n onAction={() => {\n manualSorting\n ? handleSortChange?.(header.column.id, SortDirection.ASC)\n : header.column.toggleSorting(false);\n }}\n isDisabled={sort === SortDirection.ASC}\n >\n Sort Ascending\n </MenuItem>\n <MenuItem\n onAction={() => {\n manualSorting\n ? handleSortChange?.(header.column.id, SortDirection.DESC)\n : header.column.toggleSorting(true);\n }}\n isDisabled={sort === SortDirection.DESC}\n >\n Sort Descending\n </MenuItem>\n <MenuItem\n onAction={() => {\n manualSorting\n ? handleSortChange?.(header.column.id, null)\n : header.column.clearSorting();\n }}\n isDisabled={!sort}\n >\n Clear Sort\n </MenuItem>\n </>\n )}\n </Menu>\n </MenuTrigger>\n </div>\n );\n}\n\n/**\n * TableHeaderCell - Individual header cell (`<th>`) with optional sorting controls.\n *\n * @example\n * ```tsx\n * <TableHeader headerGroups={headerGroups}>\n * <tr>\n * {headerGroup.headers.map(header => (\n * <TableHeaderCell key={header.id} header={header} />\n * ))}\n * </tr>\n * </TableHeader>\n * ```\n *\n * @param props - {@link TableHeaderCellProps}\n * @param props.ref - Ref to the th element.\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the th element.\n * @param props.header - TanStack table header object.\n * @returns The rendered TableHeaderCell component.\n */\nexport function TableHeaderCell<T extends RowData>({\n ref,\n children,\n className,\n header,\n ...rest\n}: TableHeaderCellProps<T>) {\n const { columnSelection } = useContext(TableContext);\n const renderProps = header?.getContext();\n const sortLabel =\n header?.column.getIsSorted() === SortDirection.ASC\n ? 'ascending'\n : header?.column.getIsSorted() === SortDirection.DESC\n ? 'descending'\n : undefined;\n\n return (\n <th\n {...rest}\n aria-sort={sortLabel}\n ref={ref}\n style={{ width: header?.getSize() }}\n >\n <div\n className={clsx('group/header-cell', styles.headerCell, className)}\n data-selected={header?.column.id === columnSelection || null}\n >\n {children ||\n (header && (\n <>\n {header.column.id !== HeaderColumnAction.KEBAB &&\n renderProps &&\n flexRender(header.column.columnDef.header, renderProps)}\n <HeaderCellMenu header={header} />\n </>\n ))}\n </div>\n </th>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAS,eAAkC,EACzC,UAGC;CACD,MAAM,EACJ,wBACA,eACA,gBACA,iBACA,wBACA,oBACA,eACA,kBACA,2BACE,WAAW,aAAa;CAE5B,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CACvD,MAAM,kBAAkB,CAAC;AAEzB,KACE,yBAAyB,SACvB,OAAO,OAAO,GACf,IACD,EAAE,iBAAiB,wBAEnB,QAAO;CAGT,MAAM,OAAO,OAAO,OAAO,aAAa;AAExC,QACE,oBAAC;EAAI,WAAW,KAAK,mBAAmB,OAAO,aAAa;YAC1D,qBAAC;GACC,eAAe,WACb,mBAAmB,SAAS,OAAO,OAAO,KAAK,KAAK;cAGtD,oBAAC;IACC,SAAQ;IACR,cAAW;IACX,eAAe;cAEf,qBAAC;MACG,CAAC,QAAQ,iBAAiB,oBAAC,UAAQ;KACpC,CAAC,gBAAgB,SAAS,cAAc,QAAQ,oBAAC,cAAY;KAC7D,CAAC,gBAAgB,SAAS,cAAc,OAAO,oBAAC,YAAU;QACtD;KACA,EACT,qBAAC;IACE,0BACC,8CACE,oBAAC;KACC,gBAAgB;MACd,MAAM,QAAQ,OAAO,OAAO,UAAU;AACtC,qBAAe,MAAM;AACrB,+BAAyB,MAAM;;KAEjC,YAAY,OAAO,OAAO,iBAAiB,SAAS;eACrD;MAEU,EACX,oBAAC;KACC,gBAAgB;MACd,MAAM,QAAQ,OAAO,OAAO,UAAU;AACtC,sBAAgB,MAAM;AACtB,+BAAyB,MAAM;;KAEjC,YAAY,OAAO,OAAO,gBAAgB,SAAS;eACpD;MAEU,IACV;IAEJ,0BAA0B,iBAAiB,oBAAC,kBAAgB;IAC5D,iBACC;KACE,oBAAC;MACC,gBAAgB;AACd,uBACI,mBAAmB,OAAO,OAAO,IAAI,cAAc,IAAI,GACvD,OAAO,OAAO,cAAc,MAAM;;MAExC,YAAY,SAAS,cAAc;gBACpC;OAEU;KACX,oBAAC;MACC,gBAAgB;AACd,uBACI,mBAAmB,OAAO,OAAO,IAAI,cAAc,KAAK,GACxD,OAAO,OAAO,cAAc,KAAK;;MAEvC,YAAY,SAAS,cAAc;gBACpC;OAEU;KACX,oBAAC;MACC,gBAAgB;AACd,uBACI,mBAAmB,OAAO,OAAO,IAAI,KAAK,GAC1C,OAAO,OAAO,cAAc;;MAElC,YAAY,CAAC;gBACd;OAEU;QACV;OAEA;IACK;GACV;;;;;;;;;;;;;;;;;;;;;;;AAyBV,SAAgB,gBAAmC,EACjD,KACA,UACA,WACA,QACA,GAAG,QACuB;CAC1B,MAAM,EAAE,oBAAoB,WAAW,aAAa;CACpD,MAAM,cAAc,QAAQ,YAAY;CACxC,MAAM,YACJ,QAAQ,OAAO,aAAa,KAAK,cAAc,MAC3C,cACA,QAAQ,OAAO,aAAa,KAAK,cAAc,OAC7C,eACA;AAER,QACE,oBAAC;EACC,GAAI;EACJ,aAAW;EACN;EACL,OAAO,EAAE,OAAO,QAAQ,SAAS,EAAE;YAEnC,oBAAC;GACC,WAAW,KAAK,qBAAqB,OAAO,YAAY,UAAU;GAClE,iBAAe,QAAQ,OAAO,OAAO,mBAAmB;aAEvD,YACE,UACC,8CACG,OAAO,OAAO,OAAO,mBAAmB,SACvC,eACA,WAAW,OAAO,OAAO,UAAU,QAAQ,YAAY,EACzD,oBAAC,kBAAuB,SAAU,IACjC;IAEH;GACH"}
@@ -11,7 +11,8 @@
11
11
  */
12
12
 
13
13
  import { TableHeaderProps } from "./types.js";
14
- import * as react_jsx_runtime99 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime198 from "react/jsx-runtime";
15
+ import { RowData } from "@tanstack/react-table";
15
16
 
16
17
  //#region src/components/table/header.d.ts
17
18
 
@@ -34,14 +35,14 @@ import * as react_jsx_runtime99 from "react/jsx-runtime";
34
35
  * @param props.columnSelection - Currently selected column ID.
35
36
  * @returns The rendered TableHeader component.
36
37
  */
37
- declare function TableHeader<T>({
38
+ declare function TableHeader<T extends RowData>({
38
39
  ref,
39
40
  children,
40
41
  className,
41
42
  headerGroups,
42
43
  columnSelection,
43
44
  ...rest
44
- }: TableHeaderProps<T>): react_jsx_runtime99.JSX.Element;
45
+ }: TableHeaderProps<T>): react_jsx_runtime198.JSX.Element;
45
46
  //#endregion
46
47
  export { TableHeader };
47
48
  //# sourceMappingURL=header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","names":[],"sources":["../../../src/components/table/header.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { TableHeaderCell } from './header-cell';\nimport type { TableHeaderProps } from './types';\n\n/**\n * TableHeader - Renders the table header section (`<thead>`).\n *\n * @example\n * ```tsx\n * <Table>\n * <TableHeader headerGroups={table.getHeaderGroups()} />\n * <TableBody rows={table.getRowModel().rows} />\n * </Table>\n * ```\n *\n * @param props - {@link TableHeaderProps}\n * @param props.ref - Ref to the thead element.\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the thead element.\n * @param props.headerGroups - Array of TanStack header groups.\n * @param props.columnSelection - Currently selected column ID.\n * @returns The rendered TableHeader component.\n */\nexport function TableHeader<T>({\n ref,\n children,\n className,\n headerGroups,\n columnSelection,\n ...rest\n}: TableHeaderProps<T>) {\n return (\n <thead {...rest} ref={ref} className={className}>\n {children ||\n headerGroups?.map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <TableHeaderCell key={header.id} header={header} />\n ))}\n </tr>\n ))}\n </thead>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,YAAe,EAC7B,KACA,UACA,WACA,cACA,iBACA,GAAG,QACmB;AACtB,QACE,oBAAC;EAAM,GAAI;EAAW;EAAgB;YACnC,YACC,cAAc,KAAK,gBACjB,oBAAC,kBACE,YAAY,QAAQ,KAAK,WACxB,oBAAC,mBAAwC,UAAnB,OAAO,GAAsB,CACnD,IAHK,YAAY,GAIhB,CACL;GACE"}
1
+ {"version":3,"file":"header.js","names":[],"sources":["../../../src/components/table/header.tsx"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { TableHeaderCell } from './header-cell';\nimport type { RowData } from '@tanstack/react-table';\nimport type { TableHeaderProps } from './types';\n\n/**\n * TableHeader - Renders the table header section (`<thead>`).\n *\n * @example\n * ```tsx\n * <Table>\n * <TableHeader headerGroups={table.getHeaderGroups()} />\n * <TableBody rows={table.getRowModel().rows} />\n * </Table>\n * ```\n *\n * @param props - {@link TableHeaderProps}\n * @param props.ref - Ref to the thead element.\n * @param props.children - Custom children content.\n * @param props.className - CSS class for the thead element.\n * @param props.headerGroups - Array of TanStack header groups.\n * @param props.columnSelection - Currently selected column ID.\n * @returns The rendered TableHeader component.\n */\nexport function TableHeader<T extends RowData>({\n ref,\n children,\n className,\n headerGroups,\n columnSelection,\n ...rest\n}: TableHeaderProps<T>) {\n return (\n <thead {...rest} ref={ref} className={className}>\n {children ||\n headerGroups?.map((headerGroup) => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <TableHeaderCell key={header.id} header={header} />\n ))}\n </tr>\n ))}\n </thead>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAgB,YAA+B,EAC7C,KACA,UACA,WACA,cACA,iBACA,GAAG,QACmB;AACtB,QACE,oBAAC;EAAM,GAAI;EAAW;EAAgB;YACnC,YACC,cAAc,KAAK,gBACjB,oBAAC,kBACE,YAAY,QAAQ,KAAK,WACxB,oBAAC,mBAAwC,UAAnB,OAAO,GAAsB,CACnD,IAHK,YAAY,GAIhB,CACL;GACE"}
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TableProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime102 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime199 from "react/jsx-runtime";
16
16
  import { Key } from "@react-types/shared";
17
17
 
18
18
  //#region src/components/table/index.d.ts
@@ -72,7 +72,7 @@ declare function Table<T extends {
72
72
  defaultPage,
73
73
  onPageChange,
74
74
  ...rest
75
- }: TableProps<T>): react_jsx_runtime102.JSX.Element;
75
+ }: TableProps<T>): react_jsx_runtime199.JSX.Element;
76
76
  //#endregion
77
77
  export { Table };
78
78
  //# sourceMappingURL=index.d.ts.map
@@ -21,6 +21,7 @@ import { MenuItem } from "../menu/item.js";
21
21
  import { MenuSeparator } from "../menu/separator.js";
22
22
  import { MenuTrigger } from "../menu/trigger.js";
23
23
  import { TableContext } from "./context.js";
24
+ import { tableFeatures as tableFeatures$1 } from "./features.js";
24
25
  import { TableBody } from "./body.js";
25
26
  import { TableHeader } from "./header.js";
26
27
  import "client-only";
@@ -30,13 +31,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
30
31
  import Kebab from "@accelint/icons/kebab";
31
32
  import { useControlledState } from "react-stately/useControlledState";
32
33
  import PinIcon from "@accelint/icons/pin";
33
- import { useListData } from "react-stately/useListData";
34
- import { getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
34
+ import { useTable } from "@tanstack/react-table";
35
35
  import styles from "./styles.module.css";
36
36
 
37
37
  //#region src/components/table/index.tsx
38
38
  const META_COLUMN_WIDTH = 32;
39
- function RowActionsMenu({ moveRowsDown, moveRowsUp, row, rows }) {
39
+ function RowActionsMenu({ row }) {
40
40
  const { enableRowActions, persistRowKebabMenu } = useContext(TableContext);
41
41
  const isPinned = !!row.getIsPinned();
42
42
  return enableRowActions && /* @__PURE__ */ jsx("div", {
@@ -52,13 +52,13 @@ function RowActionsMenu({ moveRowsDown, moveRowsUp, row, rows }) {
52
52
  }),
53
53
  /* @__PURE__ */ jsx(MenuSeparator, {}),
54
54
  /* @__PURE__ */ jsx(MenuItem, {
55
- onAction: () => moveRowsUp(row, rows),
56
- isDisabled: isPinned || row.index === 0,
55
+ onAction: () => row.moveUp(),
56
+ isDisabled: !row.getCanMoveUp(),
57
57
  children: "Move Up"
58
58
  }),
59
59
  /* @__PURE__ */ jsx(MenuItem, {
60
- onAction: () => moveRowsDown(row, rows),
61
- isDisabled: isPinned || row.index === rows.length - 1,
60
+ onAction: () => row.moveDown(),
61
+ isDisabled: !row.getCanMoveDown(),
62
62
  children: "Move Down"
63
63
  })
64
64
  ] })] })
@@ -95,7 +95,26 @@ function RowActionsMenu({ moveRowsDown, moveRowsUp, row, rows }) {
95
95
  * ```
96
96
  */
97
97
  function Table({ children, columns: columnsProp, data: dataProp, showCheckbox, rowSelection: rowSelectionProp, kebabPosition = "right", persistRowKebabMenu = true, persistHeaderKebabMenu = true, persistNumerals = false, enableSorting = true, enableColumnReordering = true, enableRowActions = true, manualSorting = false, onSortChange, onColumnReorderChange, onRowSelectionChange, fullWidth = false, pageSize, page: pageProp, defaultPage = 1, onPageChange, ...rest }) {
98
- const { items: data, moveAfter, moveBefore } = useListData({ initialItems: dataProp });
98
+ const [rowOrdering, setRowOrdering] = useState([]);
99
+ const data = useMemo(() => {
100
+ const items = dataProp ?? [];
101
+ if (!rowOrdering.length) return items;
102
+ const rank = /* @__PURE__ */ new Map();
103
+ rowOrdering.forEach((id, index) => {
104
+ rank.set(id, index);
105
+ });
106
+ const slots = new Array(rowOrdering.length);
107
+ const unranked = [];
108
+ for (const item of items) {
109
+ const slot = rank.get(String(item.id));
110
+ if (slot === void 0 || slots[slot] !== void 0) unranked.push(item);
111
+ else slots[slot] = item;
112
+ }
113
+ const ordered = [];
114
+ for (const slot of slots) if (slot !== void 0) ordered.push(slot);
115
+ for (const item of unranked) ordered.push(item);
116
+ return ordered;
117
+ }, [dataProp, rowOrdering]);
99
118
  const [rowSelection, setRowSelection] = useState(rowSelectionProp ?? {});
100
119
  const [columnSelection, setColumnSelection] = useState(null);
101
120
  const [rowPinning, setRowPinning] = useState({
@@ -112,45 +131,16 @@ function Table({ children, columns: columnsProp, data: dataProp, showCheckbox, r
112
131
  setCurrentPage((typeof updater === "function" ? updater(pagination) : updater).pageIndex + 1);
113
132
  }, [pagination, setCurrentPage]);
114
133
  /**
115
- * moveUpSelectedRows moves the selected rows up in the table.
116
- * It finds the first selected row, determines its index,
117
- * and moves it before the previous row if it exists.
118
- */
119
- const moveRowsUp = useCallback((row, rows) => {
120
- const rowsToMove = rowSelection[row.id] ? rows.filter(({ id }) => rowSelection[id]) : [row];
121
- const firstRowToMove = rowsToMove[0];
122
- if (!firstRowToMove || firstRowToMove.index === 0) return;
123
- const prevRowId = rows[firstRowToMove.index - 1]?.id;
124
- if (!prevRowId) return;
125
- moveBefore(prevRowId, rowsToMove.map(({ id }) => id));
126
- }, [rowSelection, moveBefore]);
127
- /**
128
- * moveDownRows moves the selected or active rows down in the table.
129
- * It finds the last selected row, determines its index,
130
- * and moves it after the next row if it exists.
131
- */
132
- const moveRowsDown = useCallback((row, rows) => {
133
- const rowsToMove = rowSelection[row.id] ? rows.filter(({ id }) => rowSelection[id]) : [row];
134
- const lastRowToMove = rowsToMove[rowsToMove.length - 1];
135
- if (!lastRowToMove || lastRowToMove.index === rows.length - 1) return;
136
- const nextRowId = rows[lastRowToMove.index + 1]?.id;
137
- if (!nextRowId) return;
138
- moveAfter(nextRowId, rowsToMove.map(({ id }) => id));
139
- }, [rowSelection, moveAfter]);
140
- /**
141
134
  * actionColumn defines the actions available in the kebab menu for each row.
142
- * It includes options to move the row up or down in the table.
135
+ * It includes options to move the row up or down in the table. Moves go
136
+ * through the table's rowOrderingFeature APIs, which are identity-stable, so
137
+ * this column def never has to be recreated.
143
138
  */
144
139
  const actionColumn = useMemo(() => ({
145
140
  id: "kebab",
146
- cell: ({ row }) => /* @__PURE__ */ jsx(RowActionsMenu, {
147
- moveRowsUp,
148
- moveRowsDown,
149
- row,
150
- rows: getRowModel().rows
151
- }),
141
+ cell: ({ row }) => /* @__PURE__ */ jsx(RowActionsMenu, { row }),
152
142
  size: META_COLUMN_WIDTH
153
- }), [moveRowsUp, moveRowsDown]);
143
+ }), []);
154
144
  /**
155
145
  * columns defines the structure of the table.
156
146
  * It includes the action column and optionally a checkbox column.
@@ -173,13 +163,13 @@ function Table({ children, columns: columnsProp, data: dataProp, showCheckbox, r
173
163
  id: "selection",
174
164
  header: ({ table }) => /* @__PURE__ */ jsx(Checkbox, {
175
165
  isSelected: table.getIsAllRowsSelected(),
176
- isIndeterminate: table.getIsSomeRowsSelected(),
166
+ isIndeterminate: table.getIsSomeRowsSelected() && !table.getIsAllRowsSelected(),
177
167
  onChange: table.toggleAllRowsSelected
178
168
  }),
179
169
  cell: ({ row }) => /* @__PURE__ */ jsx(Checkbox, {
180
170
  isSelected: row.getIsSelected(),
181
171
  isIndeterminate: row.getIsSomeSelected(),
182
- onChange: row.toggleSelected
172
+ onChange: (isSelected) => row.toggleSelected(isSelected)
183
173
  }),
184
174
  size: META_COLUMN_WIDTH
185
175
  }] : [],
@@ -202,7 +192,8 @@ function Table({ children, columns: columnsProp, data: dataProp, showCheckbox, r
202
192
  setRowSelection(updaterOrValue);
203
193
  onRowSelectionChange?.(updaterOrValue);
204
194
  }, [onRowSelectionChange]);
205
- const { getHeaderGroups, getTopRows, getCenterRows, getBottomRows, getRowModel, setColumnOrder } = useReactTable({
195
+ const { getHeaderGroups, getTopRows, getCenterRows, getBottomRows, setColumnOrder } = useTable({
196
+ features: tableFeatures$1,
206
197
  data,
207
198
  columns,
208
199
  enableSorting,
@@ -213,6 +204,7 @@ function Table({ children, columns: columnsProp, data: dataProp, showCheckbox, r
213
204
  state: {
214
205
  rowSelection,
215
206
  rowPinning,
207
+ rowOrdering,
216
208
  ...pagination != null && { pagination }
217
209
  },
218
210
  getRowId: (row, index) => {
@@ -221,12 +213,11 @@ function Table({ children, columns: columnsProp, data: dataProp, showCheckbox, r
221
213
  enableRowSelection: true,
222
214
  enableRowPinning: true,
223
215
  manualSorting,
216
+ manualPagination: pagination == null,
224
217
  onRowSelectionChange: handleRowSelectionChange,
225
218
  onRowPinningChange: setRowPinning,
226
- onPaginationChange: handlePaginationChange,
227
- getCoreRowModel: getCoreRowModel(),
228
- getSortedRowModel: getSortedRowModel(),
229
- ...pageSize != null && { getPaginationRowModel: getPaginationRowModel() }
219
+ onRowOrderingChange: setRowOrdering,
220
+ onPaginationChange: handlePaginationChange
230
221
  });
231
222
  const moveColumnLeft = useCallback((oldIndex) => {
232
223
  setColumnOrder((order) => {