@cube-dev/ui-kit 0.156.0 → 0.157.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 (637) hide show
  1. package/dist/CHANGELOG.md +237 -0
  2. package/dist/_internal/hooks/use-chained-callback.js +1 -1
  3. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  4. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  5. package/dist/_internal/hooks/use-event.js +1 -1
  6. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  7. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  8. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  9. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  10. package/dist/_internal/hooks/use-warn.js +1 -1
  11. package/dist/components/Block.js +1 -1
  12. package/dist/components/CollectionItem.js +1 -1
  13. package/dist/components/GlobalStyles.js +1 -1
  14. package/dist/components/GridProvider.js +1 -1
  15. package/dist/components/HiddenInput.js +1 -1
  16. package/dist/components/Root.js +1 -1
  17. package/dist/components/actions/Action/Action.js +1 -1
  18. package/dist/components/actions/Banner/Banner.js +1 -1
  19. package/dist/components/actions/Button/Button.js +1 -1
  20. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  21. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  22. package/dist/components/actions/ButtonSplit/context.js +1 -1
  23. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
  24. package/dist/components/actions/CommandMenu/styled.js +1 -1
  25. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  26. package/dist/components/actions/ItemActionContext.js +1 -1
  27. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  28. package/dist/components/actions/Link/Link.js +1 -1
  29. package/dist/components/actions/Menu/Menu.js +1 -1
  30. package/dist/components/actions/Menu/MenuItem.js +1 -1
  31. package/dist/components/actions/Menu/MenuSection.js +1 -1
  32. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  33. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  34. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  35. package/dist/components/actions/Menu/context.js +1 -1
  36. package/dist/components/actions/Menu/styled.js +1 -1
  37. package/dist/components/actions/index.js +1 -1
  38. package/dist/components/actions/use-action.js +1 -1
  39. package/dist/components/actions/use-anchored-menu.js +1 -1
  40. package/dist/components/actions/use-context-menu.js +42 -44
  41. package/dist/components/actions/use-context-menu.js.map +1 -1
  42. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  43. package/dist/components/content/Alert/Alert.js +1 -1
  44. package/dist/components/content/Alert/use-alert.js +1 -1
  45. package/dist/components/content/Avatar/Avatar.js +1 -1
  46. package/dist/components/content/Badge/Badge.js +1 -1
  47. package/dist/components/content/Card/Card.js +1 -1
  48. package/dist/components/content/Content.js +1 -1
  49. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  50. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  51. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  52. package/dist/components/content/Divider.js +1 -1
  53. package/dist/components/content/Footer.js +1 -1
  54. package/dist/components/content/Header.js +1 -1
  55. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  56. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  57. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  58. package/dist/components/content/Item/Item.js +1 -1
  59. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  60. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  61. package/dist/components/content/Layout/GridLayout.js +1 -1
  62. package/dist/components/content/Layout/Layout.js +1 -1
  63. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  64. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  65. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  66. package/dist/components/content/Layout/LayoutContent.js +1 -1
  67. package/dist/components/content/Layout/LayoutContext.js +1 -1
  68. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  69. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  70. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  71. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  72. package/dist/components/content/Layout/LayoutPane.js +1 -1
  73. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  74. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  75. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  76. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  77. package/dist/components/content/Layout/index.js +1 -1
  78. package/dist/components/content/Layout/utils.js +1 -1
  79. package/dist/components/content/Paragraph.js +1 -1
  80. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  81. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  82. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  83. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  84. package/dist/components/content/Result/Result.js +1 -1
  85. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  86. package/dist/components/content/Tag/Tag.js +2 -2
  87. package/dist/components/content/Tag/Tag.js.map +1 -1
  88. package/dist/components/content/Text.js +1 -1
  89. package/dist/components/content/TextItem/TextItem.js +1 -1
  90. package/dist/components/content/Title.js +1 -1
  91. package/dist/components/content/Tree/Tree.js +1 -1
  92. package/dist/components/content/Tree/TreeNode.js +1 -1
  93. package/dist/components/content/Tree/styled.js +1 -1
  94. package/dist/components/content/Tree/tree-index.js +1 -1
  95. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  96. package/dist/components/content/Tree/use-load-data.js +1 -1
  97. package/dist/components/content/highlightText.js +1 -1
  98. package/dist/components/content/use-auto-tooltip.js +1 -1
  99. package/dist/components/data/DataTable/DataTable.d.ts +13 -0
  100. package/dist/components/data/DataTable/DataTable.js +246 -0
  101. package/dist/components/data/DataTable/DataTable.js.map +1 -0
  102. package/dist/components/data/DataTable/index.d.ts +3 -0
  103. package/dist/components/data/DataTable/types.d.ts +145 -0
  104. package/dist/components/data/ItemTable/ItemTable.d.ts +19 -0
  105. package/dist/components/data/ItemTable/ItemTable.js +350 -0
  106. package/dist/components/data/ItemTable/ItemTable.js.map +1 -0
  107. package/dist/components/data/ItemTable/ItemTableBulkBar.d.ts +23 -0
  108. package/dist/components/data/ItemTable/ItemTableBulkBar.js +131 -0
  109. package/dist/components/data/ItemTable/ItemTableBulkBar.js.map +1 -0
  110. package/dist/components/data/ItemTable/ItemTableDragPreview.js +46 -0
  111. package/dist/components/data/ItemTable/ItemTableDragPreview.js.map +1 -0
  112. package/dist/components/data/ItemTable/ItemTableFooter.js +79 -0
  113. package/dist/components/data/ItemTable/ItemTableFooter.js.map +1 -0
  114. package/dist/components/data/ItemTable/ItemTableToolbar.d.ts +34 -0
  115. package/dist/components/data/ItemTable/ItemTableToolbar.js +91 -0
  116. package/dist/components/data/ItemTable/ItemTableToolbar.js.map +1 -0
  117. package/dist/components/data/ItemTable/index.d.ts +4 -0
  118. package/dist/components/data/ItemTable/types.d.ts +327 -0
  119. package/dist/components/data/TableBase/ColumnResizer.js +70 -0
  120. package/dist/components/data/TableBase/ColumnResizer.js.map +1 -0
  121. package/dist/components/data/TableBase/RowCollection.js +99 -0
  122. package/dist/components/data/TableBase/RowCollection.js.map +1 -0
  123. package/dist/components/data/TableBase/TableRow.js +89 -0
  124. package/dist/components/data/TableBase/TableRow.js.map +1 -0
  125. package/dist/components/data/TableBase/TableView.d.ts +22 -0
  126. package/dist/components/data/TableBase/TableView.js +921 -0
  127. package/dist/components/data/TableBase/TableView.js.map +1 -0
  128. package/dist/components/data/TableBase/index.d.ts +5 -0
  129. package/dist/components/data/TableBase/row-menu.js +40 -0
  130. package/dist/components/data/TableBase/row-menu.js.map +1 -0
  131. package/dist/components/data/TableBase/styled.d.ts +5 -0
  132. package/dist/components/data/TableBase/styled.js +532 -0
  133. package/dist/components/data/TableBase/styled.js.map +1 -0
  134. package/dist/components/data/TableBase/types.d.ts +160 -0
  135. package/dist/components/data/TableBase/types.js +31 -0
  136. package/dist/components/data/TableBase/types.js.map +1 -0
  137. package/dist/components/data/TableBase/use-cell-selection.d.ts +3 -0
  138. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  139. package/dist/components/data/TableBase/use-cell-selection.js.map +1 -0
  140. package/dist/components/data/TableBase/use-container-width.js +35 -0
  141. package/dist/components/data/TableBase/use-container-width.js.map +1 -0
  142. package/dist/components/data/TableBase/use-row-move-animation.js +90 -0
  143. package/dist/components/data/TableBase/use-row-move-animation.js.map +1 -0
  144. package/dist/components/data/TableBase/use-scrollability.js +49 -0
  145. package/dist/components/data/TableBase/use-scrollability.js.map +1 -0
  146. package/dist/components/data/TableBase/use-table-columns.d.ts +2 -0
  147. package/dist/components/data/TableBase/use-table-columns.js +166 -0
  148. package/dist/components/data/TableBase/use-table-columns.js.map +1 -0
  149. package/dist/components/data/TableBase/use-table-search.js +64 -0
  150. package/dist/components/data/TableBase/use-table-search.js.map +1 -0
  151. package/dist/components/data/TableBase/use-table-selection.d.ts +4 -0
  152. package/dist/components/data/TableBase/use-table-selection.js +233 -0
  153. package/dist/components/data/TableBase/use-table-selection.js.map +1 -0
  154. package/dist/components/data/TableBase/use-table-sort.js +91 -0
  155. package/dist/components/data/TableBase/use-table-sort.js.map +1 -0
  156. package/dist/components/data/TableBase/use-table-sorts.js +97 -0
  157. package/dist/components/data/TableBase/use-table-sorts.js.map +1 -0
  158. package/dist/components/data/TableBase/use-table-storage.d.ts +8 -0
  159. package/dist/components/data/TableBase/use-table-storage.js +58 -0
  160. package/dist/components/data/TableBase/use-table-storage.js.map +1 -0
  161. package/dist/components/data/index.d.ts +10 -0
  162. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  163. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  164. package/dist/components/fields/Checkbox/context.js +1 -1
  165. package/dist/components/fields/ColorInput/ColorInput.d.ts +67 -0
  166. package/dist/components/fields/ColorInput/ColorInput.js +230 -0
  167. package/dist/components/fields/ColorInput/ColorInput.js.map +1 -0
  168. package/dist/components/fields/ColorInput/index.d.ts +2 -0
  169. package/dist/components/fields/ColorPicker/ColorPicker.d.ts +34 -37
  170. package/dist/components/fields/ColorPicker/ColorPicker.js +131 -182
  171. package/dist/components/fields/ColorPicker/ColorPicker.js.map +1 -1
  172. package/dist/components/fields/ColorPicker/index.d.ts +1 -3
  173. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.d.ts +50 -0
  174. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +269 -0
  175. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js.map +1 -0
  176. package/dist/components/fields/ColorSwatchGroup/index.d.ts +2 -0
  177. package/dist/components/fields/ComboBox/ComboBox.js +1 -1
  178. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  179. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  180. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  181. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  182. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  183. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  184. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  185. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  186. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  187. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  188. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  189. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  190. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  191. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  192. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  193. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  194. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  195. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  196. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  197. package/dist/components/fields/DatePicker/period.js +1 -1
  198. package/dist/components/fields/DatePicker/props.js +1 -1
  199. package/dist/components/fields/DatePicker/utils.js +1 -1
  200. package/dist/components/fields/FileInput/FileInput.js +1 -1
  201. package/dist/components/fields/FilterListBox/FilterListBox.js +2 -1
  202. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  203. package/dist/components/fields/FilterPicker/FilterPicker.js +6 -1
  204. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  205. package/dist/components/fields/Input/Input.js +2 -2
  206. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  207. package/dist/components/fields/ListBox/ListBox.d.ts +7 -0
  208. package/dist/components/fields/ListBox/ListBox.js +4 -3
  209. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  210. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  211. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  212. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  213. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  214. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  215. package/dist/components/fields/PasswordInput/PasswordInput.d.ts +2 -2
  216. package/dist/components/fields/PasswordInput/PasswordInput.js +12 -2
  217. package/dist/components/fields/PasswordInput/PasswordInput.js.map +1 -1
  218. package/dist/components/fields/Picker/Picker.js +6 -1
  219. package/dist/components/fields/Picker/Picker.js.map +1 -1
  220. package/dist/components/fields/RadioGroup/Radio.d.ts +2 -2
  221. package/dist/components/fields/RadioGroup/Radio.js +4 -4
  222. package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
  223. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  224. package/dist/components/fields/RadioGroup/context.js +1 -1
  225. package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
  226. package/dist/components/fields/SearchInput/SearchInput.d.ts +2 -2
  227. package/dist/components/fields/SearchInput/SearchInput.js +17 -4
  228. package/dist/components/fields/SearchInput/SearchInput.js.map +1 -1
  229. package/dist/components/fields/Select/Select.js +1 -1
  230. package/dist/components/fields/Slider/Gradation.js +1 -1
  231. package/dist/components/fields/Slider/HueSlider.js +1 -1
  232. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  233. package/dist/components/fields/Slider/Slider.js +1 -1
  234. package/dist/components/fields/Slider/SliderBase.js +1 -1
  235. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  236. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  237. package/dist/components/fields/Slider/elements.js +1 -1
  238. package/dist/components/fields/Slider/index.js +1 -1
  239. package/dist/components/fields/Switch/Switch.js +1 -1
  240. package/dist/components/fields/TextArea/TextArea.d.ts +2 -2
  241. package/dist/components/fields/TextArea/TextArea.js +12 -5
  242. package/dist/components/fields/TextArea/TextArea.js.map +1 -1
  243. package/dist/components/fields/TextInput/TextInput.d.ts +2 -2
  244. package/dist/components/fields/TextInput/TextInput.js +15 -3
  245. package/dist/components/fields/TextInput/TextInput.js.map +1 -1
  246. package/dist/components/fields/TextInput/TextInputBase.d.ts +17 -1
  247. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  248. package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
  249. package/dist/components/fields/TextInput/index.d.ts +1 -1
  250. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  251. package/dist/components/fields/{ColorPicker/ColorPickerPanel.js → color/ColorPanel.js} +14 -11
  252. package/dist/components/fields/color/ColorPanel.js.map +1 -0
  253. package/dist/components/fields/color/ColorSwatch.d.ts +22 -0
  254. package/dist/components/fields/color/ColorSwatch.js +58 -0
  255. package/dist/components/fields/color/ColorSwatch.js.map +1 -0
  256. package/dist/components/fields/{ColorPicker → color}/channels.d.ts +1 -1
  257. package/dist/components/fields/{ColorPicker → color}/channels.js +2 -2
  258. package/dist/components/fields/color/channels.js.map +1 -0
  259. package/dist/components/fields/color/color.d.ts +21 -0
  260. package/dist/components/fields/{ColorPicker → color}/color.js +2 -2
  261. package/dist/components/fields/color/color.js.map +1 -0
  262. package/dist/components/fields/color/context.js +20 -0
  263. package/dist/components/fields/color/context.js.map +1 -0
  264. package/dist/components/fields/color/index.d.ts +4 -0
  265. package/dist/components/fields/index.d.ts +10 -4
  266. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  267. package/dist/components/form/Form/Field.js +1 -1
  268. package/dist/components/form/Form/Form.js +1 -1
  269. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  270. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  271. package/dist/components/form/Form/SubmitError.js +1 -1
  272. package/dist/components/form/Form/index.js +1 -1
  273. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  274. package/dist/components/form/Form/use-field/use-field.js +1 -1
  275. package/dist/components/form/Form/use-form.js +1 -1
  276. package/dist/components/form/Form/validation.js +1 -1
  277. package/dist/components/form/Label.js +1 -1
  278. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  279. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  280. package/dist/components/form/validation/use-validation-props.js +1 -1
  281. package/dist/components/form/wrapper.js +1 -1
  282. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  283. package/dist/components/helpers/IconSwitch/IconSwitch.d.ts +26 -0
  284. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  285. package/dist/components/layout/Board/Board.d.ts +8 -0
  286. package/dist/components/layout/Board/Board.js +6 -5
  287. package/dist/components/layout/Board/Board.js.map +1 -1
  288. package/dist/components/layout/Board/BoardProvider.js +1 -1
  289. package/dist/components/layout/Board/BoardResponsive.js +1 -1
  290. package/dist/components/layout/Board/Widget.js +1 -1
  291. package/dist/components/layout/Board/WidgetHost.js +1 -1
  292. package/dist/components/layout/Board/board-context.js +1 -1
  293. package/dist/components/layout/Board/board-store.js +1 -1
  294. package/dist/components/layout/Board/grid-core/calculate.js +1 -1
  295. package/dist/components/layout/Board/grid-core/collision.js +1 -1
  296. package/dist/components/layout/Board/grid-core/compactors.js +2 -2
  297. package/dist/components/layout/Board/grid-core/constraints.js +1 -1
  298. package/dist/components/layout/Board/grid-core/group-move.js +84 -4
  299. package/dist/components/layout/Board/grid-core/group-move.js.map +1 -1
  300. package/dist/components/layout/Board/grid-core/layout.js +1 -1
  301. package/dist/components/layout/Board/grid-core/sort.js +1 -1
  302. package/dist/components/layout/Board/index.js +1 -1
  303. package/dist/components/layout/Board/responsive-utils.js +1 -1
  304. package/dist/components/layout/Board/use-board-layout.js +1 -1
  305. package/dist/components/layout/Board/use-board-registry.js +1 -1
  306. package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
  307. package/dist/components/layout/Board/use-board-selection.js +1 -1
  308. package/dist/components/layout/Flex.js +1 -1
  309. package/dist/components/layout/Flow.js +1 -1
  310. package/dist/components/layout/Grid.js +1 -1
  311. package/dist/components/layout/Panel.js +1 -1
  312. package/dist/components/layout/Prefix.js +1 -1
  313. package/dist/components/layout/ResizablePanel.js +1 -1
  314. package/dist/components/layout/Space.js +1 -1
  315. package/dist/components/layout/Suffix.js +1 -1
  316. package/dist/components/navigation/Pagination/Pagination.d.ts +9 -0
  317. package/dist/components/navigation/Pagination/Pagination.js +258 -0
  318. package/dist/components/navigation/Pagination/Pagination.js.map +1 -0
  319. package/dist/components/navigation/Pagination/index.d.ts +4 -0
  320. package/dist/components/navigation/Pagination/types.d.ts +81 -0
  321. package/dist/components/navigation/Pagination/use-pagination.d.ts +52 -0
  322. package/dist/components/navigation/Pagination/use-pagination.js +83 -0
  323. package/dist/components/navigation/Pagination/use-pagination.js.map +1 -0
  324. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  325. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  326. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  327. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  328. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  329. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  330. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  331. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  332. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  333. package/dist/components/navigation/Tabs/styled.js +1 -1
  334. package/dist/components/navigation/Tabs/types.js +1 -1
  335. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  336. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  337. package/dist/components/navigation/index.d.ts +5 -1
  338. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  339. package/dist/components/other/Calendar/Calendar.js +1 -1
  340. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  341. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  342. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  343. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  344. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  345. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  346. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  347. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  348. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  349. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  350. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  351. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  352. package/dist/components/overlays/Dialog/context.js +1 -1
  353. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  354. package/dist/components/overlays/Modal/Modal.js +1 -1
  355. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  356. package/dist/components/overlays/Modal/Overlay.js +1 -1
  357. package/dist/components/overlays/Modal/Popover.js +1 -1
  358. package/dist/components/overlays/Modal/Tray.js +1 -1
  359. package/dist/components/overlays/Modal/Underlay.js +1 -1
  360. package/dist/components/overlays/Notifications/Notification.js +1 -1
  361. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  362. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  363. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  364. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  365. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  366. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  367. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  368. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  369. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  370. package/dist/components/overlays/Notifications/index.js +1 -1
  371. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  372. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  373. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  374. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  375. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  376. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  377. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  378. package/dist/components/overlays/Toast/index.js +1 -1
  379. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  380. package/dist/components/overlays/Toast/useToast.js +1 -1
  381. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  382. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  383. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  384. package/dist/components/overlays/Tooltip/context.js +1 -1
  385. package/dist/components/portal/Portal.js +1 -1
  386. package/dist/components/portal/PortalProvider.js +1 -1
  387. package/dist/components/portal/usePortal.js +1 -1
  388. package/dist/components/shared/DraggableCollection.js +24 -8
  389. package/dist/components/shared/DraggableCollection.js.map +1 -1
  390. package/dist/components/shared/InvalidIcon.js +1 -1
  391. package/dist/components/shared/ValidIcon.js +1 -1
  392. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  393. package/dist/components/status/Spin/Cube.js +1 -1
  394. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  395. package/dist/components/status/Spin/Spin.js +1 -1
  396. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  397. package/dist/data/item-themes.js +1 -1
  398. package/dist/data/themes.js +1 -1
  399. package/dist/eslint-plugin/defaults.generated.js +223 -5
  400. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  401. package/dist/eslint-plugin/index.js +1 -1
  402. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  403. package/dist/i18n/I18nProvider.js +1 -1
  404. package/dist/i18n/createFormatter.js +1 -1
  405. package/dist/i18n/index.js +1 -1
  406. package/dist/i18n/instance.js +1 -1
  407. package/dist/i18n/locales/de-DE/uikit.js +36 -1
  408. package/dist/i18n/locales/en-US/uikit.js +36 -1
  409. package/dist/i18n/locales/en-US/uikit.json.d.ts +41 -1
  410. package/dist/i18n/locales/es-ES/uikit.js +36 -1
  411. package/dist/i18n/locales/es-MX/uikit.js +36 -1
  412. package/dist/i18n/locales/fr-FR/uikit.js +36 -1
  413. package/dist/i18n/locales/it-IT/uikit.js +36 -1
  414. package/dist/i18n/locales/ja-JP/uikit.js +36 -1
  415. package/dist/i18n/locales/nb-NO/uikit.js +36 -1
  416. package/dist/i18n/locales/pt-BR/uikit.js +36 -1
  417. package/dist/i18n/locales/pt-PT/uikit.js +36 -1
  418. package/dist/i18n/locales/sv-SE/uikit.js +36 -1
  419. package/dist/i18n/locales/vi-VN/uikit.js +36 -1
  420. package/dist/i18n/locales.js +1 -1
  421. package/dist/i18n/useFormatter.js +1 -1
  422. package/dist/i18n/useI18n.js +1 -1
  423. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  424. package/dist/icons/AdjustmentsIcon.js +1 -1
  425. package/dist/icons/AiIcon.js +1 -1
  426. package/dist/icons/AreaChartIcon.js +1 -1
  427. package/dist/icons/BackwardIcon.js +1 -1
  428. package/dist/icons/BarChartIcon.js +1 -1
  429. package/dist/icons/BellFilledIcon.js +1 -1
  430. package/dist/icons/BellIcon.js +1 -1
  431. package/dist/icons/BooleanIcon.js +1 -1
  432. package/dist/icons/CalendarEditIcon.js +1 -1
  433. package/dist/icons/CalendarIcon.js +1 -1
  434. package/dist/icons/CaretDownIcon.js +1 -1
  435. package/dist/icons/CaretUpIcon.js +1 -1
  436. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  437. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  438. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  439. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  440. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  441. package/dist/icons/ChartBarLineIcon.js +1 -1
  442. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  443. package/dist/icons/ChartBarStackedIcon.js +1 -1
  444. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  445. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  446. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  447. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  448. package/dist/icons/ChartBubbleIcon.js +1 -1
  449. package/dist/icons/ChartDonut2Icon.js +1 -1
  450. package/dist/icons/ChartFunnelIcon.js +1 -1
  451. package/dist/icons/ChartHeatmapIcon.js +1 -1
  452. package/dist/icons/ChartKPIIcon.js +1 -1
  453. package/dist/icons/ChartPie2Icon.js +1 -1
  454. package/dist/icons/ChartScatterIcon.js +1 -1
  455. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  456. package/dist/icons/CheckCircleIcon.js +1 -1
  457. package/dist/icons/CheckIcon.js +1 -1
  458. package/dist/icons/CircleFilledIcon.js +1 -1
  459. package/dist/icons/ClearIcon.js +1 -1
  460. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  461. package/dist/icons/CloseCircleIcon.js +1 -1
  462. package/dist/icons/CloseIcon.js +1 -1
  463. package/dist/icons/CodeIcon.js +1 -1
  464. package/dist/icons/ColumnTotalIcon.js +1 -1
  465. package/dist/icons/CopyIcon.js +1 -1
  466. package/dist/icons/CountIcon.js +1 -1
  467. package/dist/icons/CubeIcon.js +1 -1
  468. package/dist/icons/CubePauseIcon.js +1 -1
  469. package/dist/icons/CubePlayIcon.js +1 -1
  470. package/dist/icons/CurrencyDollarIcon.js +1 -1
  471. package/dist/icons/DangerIcon.js +1 -1
  472. package/dist/icons/DashboardIcon.js +1 -1
  473. package/dist/icons/DatabaseIcon.js +1 -1
  474. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  475. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  476. package/dist/icons/DirectionIcon.js +1 -1
  477. package/dist/icons/DonutIcon.js +1 -1
  478. package/dist/icons/DownIcon.js +1 -1
  479. package/dist/icons/EditIcon.js +1 -1
  480. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  481. package/dist/icons/ExclamationCircleIcon.js +1 -1
  482. package/dist/icons/ExclamationIcon.js +1 -1
  483. package/dist/icons/EyeIcon.js +1 -1
  484. package/dist/icons/EyeInvisibleIcon.js +1 -1
  485. package/dist/icons/FilterIcon.js +1 -1
  486. package/dist/icons/FolderFilledIcon.js +1 -1
  487. package/dist/icons/FolderIcon.js +1 -1
  488. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  489. package/dist/icons/FolderOpenIcon.js +1 -1
  490. package/dist/icons/ForwardIcon.js +1 -1
  491. package/dist/icons/GripVerticalIcon.js +1 -1
  492. package/dist/icons/HierarchyIcon.js +1 -1
  493. package/dist/icons/HierarchyOpenIcon.js +1 -1
  494. package/dist/icons/Icon.js +1 -1
  495. package/dist/icons/InfoCircleIcon.js +1 -1
  496. package/dist/icons/InfoIcon.js +1 -1
  497. package/dist/icons/KeyIcon.js +1 -1
  498. package/dist/icons/LeftIcon.js +1 -1
  499. package/dist/icons/LineChartIcon.js +1 -1
  500. package/dist/icons/LoadingIcon.js +1 -1
  501. package/dist/icons/LockFilledIcon.js +1 -1
  502. package/dist/icons/LockIcon.js +1 -1
  503. package/dist/icons/MoreIcon.js +1 -1
  504. package/dist/icons/NotAllowedIcon.js +1 -1
  505. package/dist/icons/Number123Icon.js +1 -1
  506. package/dist/icons/NumberIcon.js +1 -1
  507. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  508. package/dist/icons/PauseCircleIcon.js +1 -1
  509. package/dist/icons/PauseIcon.js +1 -1
  510. package/dist/icons/PercentageIcon.js +1 -1
  511. package/dist/icons/PieChartIcon.js +1 -1
  512. package/dist/icons/PipetteIcon.js +1 -1
  513. package/dist/icons/PlayCircleIcon.js +1 -1
  514. package/dist/icons/PlayIcon.js +1 -1
  515. package/dist/icons/PlusIcon.js +1 -1
  516. package/dist/icons/ProgressBarIcon.js +1 -1
  517. package/dist/icons/ReloadIcon.js +1 -1
  518. package/dist/icons/ReportIcon.js +1 -1
  519. package/dist/icons/ReturnIcon.js +1 -1
  520. package/dist/icons/RightIcon.js +1 -1
  521. package/dist/icons/RowTotalsIcon.js +1 -1
  522. package/dist/icons/SchemeIcon.js +1 -1
  523. package/dist/icons/SearchIcon.js +1 -1
  524. package/dist/icons/SemanticQueryIcon.js +1 -1
  525. package/dist/icons/SettingsIcon.js +1 -1
  526. package/dist/icons/ShieldFilledIcon.js +1 -1
  527. package/dist/icons/ShieldIcon.js +1 -1
  528. package/dist/icons/SlashIcon.js +1 -1
  529. package/dist/icons/SparklesIcon.js +1 -1
  530. package/dist/icons/SqlIcon.js +1 -1
  531. package/dist/icons/StatsIcon.js +1 -1
  532. package/dist/icons/StopIcon.js +1 -1
  533. package/dist/icons/StringIcon.js +1 -1
  534. package/dist/icons/SubtotalsIcon.js +1 -1
  535. package/dist/icons/SwitchIcon.js +1 -1
  536. package/dist/icons/TableIcon.js +1 -1
  537. package/dist/icons/ThumbsDownIcon.js +1 -1
  538. package/dist/icons/ThumbsUpIcon.js +1 -1
  539. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  540. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  541. package/dist/icons/ThunderboltIcon.js +1 -1
  542. package/dist/icons/TimeIcon.js +1 -1
  543. package/dist/icons/TrashIcon.js +1 -1
  544. package/dist/icons/UnlockIcon.js +1 -1
  545. package/dist/icons/UpIcon.js +1 -1
  546. package/dist/icons/UserGroupIcon.js +1 -1
  547. package/dist/icons/UserIcon.js +1 -1
  548. package/dist/icons/UserLockIcon.js +1 -1
  549. package/dist/icons/ViewIcon.js +1 -1
  550. package/dist/icons/WarningFilledIcon.js +1 -1
  551. package/dist/icons/WarningIcon.js +1 -1
  552. package/dist/icons/wrap-icon.js +1 -1
  553. package/dist/index.d.ts +28 -14
  554. package/dist/index.js +15 -7
  555. package/dist/index.js.map +1 -1
  556. package/dist/provider.js +1 -1
  557. package/dist/providers/TrackingProvider.js +1 -1
  558. package/dist/providers/navigationAdapter.default.js +1 -1
  559. package/dist/tokens/base.js +1 -1
  560. package/dist/tokens/colors.js +1 -1
  561. package/dist/tokens/index.js +1 -1
  562. package/dist/tokens/layout.js +1 -1
  563. package/dist/tokens/lazy-styles.js +1 -1
  564. package/dist/tokens/palette-config.js +1 -1
  565. package/dist/tokens/palette.js +1 -1
  566. package/dist/tokens/shadows.js +1 -1
  567. package/dist/tokens/sizes.js +1 -1
  568. package/dist/tokens/spacing.js +1 -1
  569. package/dist/tokens/typography.d.ts +1 -1
  570. package/dist/tokens/typography.js +11 -2
  571. package/dist/tokens/typography.js.map +1 -1
  572. package/dist/utils/ResizeSensor.js +1 -1
  573. package/dist/utils/index.d.ts +1 -0
  574. package/dist/utils/is-dev-env.js +1 -1
  575. package/dist/utils/modules.js +1 -1
  576. package/dist/utils/promise.js +1 -1
  577. package/dist/utils/raf.js +1 -1
  578. package/dist/utils/random.js +1 -1
  579. package/dist/utils/range.js +1 -1
  580. package/dist/utils/react/RenderCache.js +1 -1
  581. package/dist/utils/react/Slots.js +1 -1
  582. package/dist/utils/react/chain.js +1 -1
  583. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  584. package/dist/utils/react/index.d.ts +1 -0
  585. package/dist/utils/react/index.js +2 -1
  586. package/dist/utils/react/interactions.js +1 -1
  587. package/dist/utils/react/isTextOnly.js +1 -1
  588. package/dist/utils/react/mapProps.js +1 -1
  589. package/dist/utils/react/mergeProps.js +1 -1
  590. package/dist/utils/react/nullableValue.js +1 -1
  591. package/dist/utils/react/resolveIcon.js +1 -1
  592. package/dist/utils/react/sharedStore.js +1 -1
  593. package/dist/utils/react/useBufferedValue.d.ts +56 -0
  594. package/dist/utils/react/useBufferedValue.js +86 -0
  595. package/dist/utils/react/useBufferedValue.js.map +1 -0
  596. package/dist/utils/react/useCombinedRefs.js +1 -1
  597. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  598. package/dist/utils/react/useEventBus.js +1 -1
  599. package/dist/utils/react/useId.js +1 -1
  600. package/dist/utils/react/useIsDarwin.js +1 -1
  601. package/dist/utils/react/useKeySymbols.js +1 -1
  602. package/dist/utils/react/useLayoutEffect.js +1 -1
  603. package/dist/utils/react/useLocalStorage.js +1 -1
  604. package/dist/utils/react/useMergeStyles.js +1 -1
  605. package/dist/utils/react/usePopoverSync.js +1 -1
  606. package/dist/utils/react/useQaProps.js +1 -1
  607. package/dist/utils/react/useViewportSize.js +1 -1
  608. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  609. package/dist/utils/selection.js +1 -1
  610. package/dist/utils/styles.js +1 -1
  611. package/dist/utils/tree.js +1 -1
  612. package/dist/utils/warnings.js +1 -1
  613. package/dist/version.js +2 -2
  614. package/docs/components/actions/ButtonGroup.md +1 -1
  615. package/docs/components/data/DataTable.md +298 -0
  616. package/docs/components/data/ItemTable.md +984 -0
  617. package/docs/components/fields/ColorInput.md +284 -0
  618. package/docs/components/fields/ColorPicker.md +85 -144
  619. package/docs/components/fields/ColorSwatchGroup.md +206 -0
  620. package/docs/components/fields/FilterPicker.md +1 -1
  621. package/docs/components/fields/ListBox.md +4 -0
  622. package/docs/components/fields/PasswordInput.md +1 -0
  623. package/docs/components/fields/Picker.md +1 -1
  624. package/docs/components/fields/SearchInput.md +1 -0
  625. package/docs/components/fields/TextArea.md +1 -0
  626. package/docs/components/fields/TextInput.md +1 -0
  627. package/docs/components/layout/Board.md +2 -1
  628. package/docs/components/navigation/Pagination.md +245 -0
  629. package/package.json +8 -3
  630. package/dist/components/fields/ColorPicker/ColorPickerPanel.js.map +0 -1
  631. package/dist/components/fields/ColorPicker/channels.js.map +0 -1
  632. package/dist/components/fields/ColorPicker/color.d.ts +0 -15
  633. package/dist/components/fields/ColorPicker/color.js.map +0 -1
  634. package/dist/components/organisms/FileTabs/FileTabs.d.ts +0 -54
  635. package/dist/components/organisms/FileTabs/FileTabs.js +0 -282
  636. package/dist/components/organisms/FileTabs/FileTabs.js.map +0 -1
  637. package/docs/components/organisms/FileTabs.md +0 -51
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableView.js","names":["Checkbox","MenuTrigger","Menu"],"sources":["../../../../src/components/data/TableBase/TableView.tsx"],"sourcesContent":["import { useVirtualizer } from '@tanstack/react-virtual';\nimport {\n Fragment,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { VisuallyHidden } from 'react-aria';\n\nimport { useEvent } from '../../../_internal/hooks';\nimport { useI18n } from '../../../i18n';\nimport { MoreIcon, UpIcon } from '../../../icons';\nimport { Action } from '../../actions/Action/Action';\nimport { ItemAction } from '../../actions/ItemAction/ItemAction';\nimport { Menu, MenuTrigger } from '../../actions/Menu';\nimport { useContextMenu } from '../../actions/use-context-menu';\nimport { Placeholder } from '../../content/Placeholder/Placeholder';\nimport { Skeleton } from '../../content/Skeleton/Skeleton';\nimport { TextItem } from '../../content/TextItem';\nimport { Checkbox } from '../../fields/Checkbox';\nimport { useToast } from '../../overlays/Toast';\nimport { TooltipProvider } from '../../overlays/Tooltip/TooltipProvider';\n\nimport { ColumnResizer } from './ColumnResizer';\nimport {\n isMenuEmpty,\n normalizeMenuAction,\n ROW_MENU_COLUMN_KEY,\n} from './row-menu';\nimport { TableElement, TableHeaderItem } from './styled';\nimport { TableRow, TableRowDropIndicator } from './TableRow';\nimport { selectionRowKey } from './types';\nimport { toTsv } from './use-cell-selection';\nimport { useRowMoveAnimation } from './use-row-move-animation';\nimport { useScrollability } from './use-scrollability';\nimport { getColumnText, getColumnValue } from './use-table-columns';\nimport {\n ROW_NUMBER_COLUMN_KEY,\n SELECTION_COLUMN_KEY,\n} from './use-table-selection';\n\nimport type { Key } from '@react-types/shared';\nimport type { Styles } from '@tenphi/tasty';\nimport type {\n CSSProperties,\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n PointerEvent as ReactPointerEvent,\n RefObject,\n} from 'react';\nimport type { NavigateArg } from '../../../providers/navigation.types';\nimport type {\n CubeResolvedColumn,\n CubeTableCellContext,\n CubeTableColumnLayout,\n CubeTableHeaderContext,\n CubeTableLoadingIndicator,\n CubeTableRowContext,\n CubeTableRowSection,\n CubeTableSort,\n} from './types';\nimport type { useCellSelection } from './use-cell-selection';\nimport type { CubeTableSelectionState } from './use-table-selection';\n\n/** Visual/behavioural overrides a table adapter may attach to a single row. */\nexport interface CubeTableRowRenderProps {\n isDimmed?: boolean;\n mods?: Record<string, boolean | undefined>;\n styles?: Styles;\n height?: number;\n qa?: string;\n tooltip?: string;\n}\n\nexport interface TableViewProps<T = any> {\n qa?: string;\n rows: readonly T[];\n getRowKey: (row: T, index: number) => Key;\n layout: CubeTableColumnLayout<T>;\n /**\n * Receives the scroll container once it exists. A callback rather than a ref\n * because the virtualized path does not create the element itself — Virtuoso\n * does, and hands it over after mount.\n */\n onScrollerRef: (element: HTMLDivElement | null) => void;\n /** Attached to the table's root frame. */\n rootRef?: RefObject<HTMLDivElement | null>;\n\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n shape?: 'plain' | 'card';\n rowHeight?: number;\n headerHeight?: number;\n isHeaderHidden?: boolean;\n isStriped?: boolean;\n /**\n * Vertical rules between columns.\n *\n * A list reads across a row and wants nothing in the way; a grid is read down\n * a column, and the rule is what tells you which column a figure is in when\n * the header has scrolled far to the left. So `ItemTable` leaves it off and\n * `DataTable` turns it on — the same split ag-grid's `columnBorder` gives the\n * Cloud grids today.\n */\n hasColumnDividers?: boolean;\n /**\n * Slide rows to their new positions when the order changes, instead of\n * teleporting them.\n *\n * On by default, and only ever on a pure reorder — see\n * `use-row-move-animation`. Suppressed under `prefers-reduced-motion`.\n */\n isRowMoveAnimated?: boolean;\n /** @default true */\n isHeaderSticky?: boolean;\n /** @default 'auto' — on above `virtualizeThreshold` rows, needs a bounded height. */\n isVirtualized?: boolean | 'auto';\n /** @default 50 */\n virtualizeThreshold?: number;\n /** Rows rendered beyond each edge of the viewport. @default 20 */\n overscan?: number;\n\n /* status */\n isLoading?: boolean;\n loadingIndicator?: CubeTableLoadingIndicator;\n skeletonRowCount?: number;\n selection?: CubeTableSelectionState<T>;\n selectionTooltip?: string | ((row: T) => string | undefined);\n /** Rendered in the root frame, over the body. For the floating bulk bar. */\n overlay?: ReactNode;\n /** Already normalised by the adapter into a per-row resolver. */\n rowMenu?: (row: T, ctx: CubeTableRowContext<T>) => ReactNode | null;\n rowContextMenu?: boolean | 'context-only';\n onRowMenuAction?: (action: string, row: T, key: Key) => void;\n rowMenuTriggerProps?: Record<string, any>;\n rowLink?: (row: T, index: number) => NavigateArg | undefined;\n onRowAction?: (row: T, key: Key) => void;\n /** Infinite scroll: fires once the end of the list comes into view. */\n onLoadMore?: () => void;\n hasMore?: boolean;\n isLoadingMore?: boolean;\n /**\n * How far before the end to start fetching, in px.\n *\n * Defaults to one viewport height, so the next batch is requested a whole\n * screen before the user could reach the bottom. A fixed 200px — about five\n * rows — meant a fast scroll arrived at the end before the request did, which\n * is the stall this is meant to avoid.\n */\n loadMoreMargin?: number;\n /**\n * Rows pinned above and below the scrolling ones — totals, subtotals.\n *\n * Rendered inside `<tbody>` rather than `<thead>`/`<tfoot>` so they keep the\n * body's own row and cell styling; the sub-element chains are anchored to\n * `Body`. Stickiness comes from the row itself.\n */\n pinnedTopRows?: readonly T[];\n pinnedBottomRows?: readonly T[];\n /**\n * Rectangular cell selection, from `use-cell-selection`.\n *\n * `DataTable` only. A list is acted on by row; a result grid is read by cell,\n * and the block of figures is the thing the user wants out of it.\n */\n cellSelection?: ReturnType<typeof useCellSelection<T>> | null;\n /** 1-based number of the first row, so paging keeps the count continuous. */\n rowNumberOffset?: number;\n /**\n * Rows of the full result that precede this page, and the size of that full\n * result.\n *\n * ARIA row indices are document-absolute by contract: `aria-rowindex` is a\n * row's position in the WHOLE grid and `aria-rowcount` the whole grid's size,\n * so a paged grid has to say \"row 21 of 240\" rather than restarting at 1 and\n * claiming a count of 25. Without them a screen reader hears colliding\n * indices against a larger count, which is worse than saying nothing.\n *\n * Defaults keep an unpaged table correct: no offset, and a count taken from\n * the rows actually given.\n */\n rowIndexOffset?: number;\n totalRowCount?: number;\n isReorderable?: boolean;\n /** Provided by `DraggableCollection` when reordering is on. */\n dragState?: any;\n dropState?: any;\n /**\n * Drop handling from `useDroppableCollection`. Must land on the element that\n * directly contains the rows — the `<tbody>` — or drops are never received.\n */\n collectionProps?: Record<string, any>;\n bodyRef?: RefObject<HTMLTableSectionElement | null>;\n isResizable?: boolean;\n onColumnResize?: (columnKey: string, width: number) => void;\n onColumnResizeEnd?: (columnKey: string) => void;\n emptyLabel?: ReactNode;\n noResultsLabel?: ReactNode;\n error?: ReactNode;\n /** Selects `noResultsLabel` over `emptyLabel` when there is nothing to show. */\n isFiltered?: boolean;\n\n /* sorting */\n /** @default 'off' */\n sortMode?: 'client' | 'server' | 'off';\n sort?: CubeTableSort | null;\n /**\n * Multi-column sort. Takes precedence over `sort` when given, and the array\n * order is the precedence — `DataTable` uses it, `ItemTable` uses `sort`.\n */\n sorts?: CubeTableSort[];\n onColumnSort?: (columnKey: string) => void;\n\n /* per-row hooks */\n getRowProps?: (\n ctx: CubeTableRowContext<T>,\n ) => CubeTableRowRenderProps | undefined;\n\n /**\n * Typography preset for the column header. A per-adapter default rather than\n * a table-wide constant: `ItemTable` uses the uppercase caption look (`c2`),\n * while an analytics grid wants its headers to read at body size.\n * `headerCellStyles` still wins over it.\n */\n headerPreset?: string;\n /**\n * Typography for the body. `ItemTable` reads as a list at `t3`; a result grid\n * packs more in and wants `t4`.\n */\n contentPreset?: string;\n\n /** Chrome rendered above the table, in the frame's first grid row. */\n toolbar?: ReactNode;\n /** Chrome rendered below the table, in the frame's last grid row. */\n footer?: ReactNode;\n\n ariaLabel?: string;\n styles?: Styles;\n headerStyles?: Styles;\n headerCellStyles?: Styles;\n bodyStyles?: Styles;\n rowStyles?: Styles;\n cellStyles?: Styles;\n mods?: Record<string, boolean | undefined>;\n}\n\n/**\n * The same block as an HTML table, so a spreadsheet keeps the cell boundaries.\n *\n * Pasting `text/plain` TSV works, but Excel and Sheets then re-guess the types\n * of every field; the HTML flavour is what makes a value that looks like a date\n * stay the text it was on screen.\n */\nfunction toClipboardHtml(matrix: string[][]) {\n const rows = matrix\n .map(\n (row) =>\n `<tr>${row.map((cell) => `<td>${escapeHtml(cell)}</td>`).join('')}</tr>`,\n )\n .join('');\n\n return `<table>${rows}</table>`;\n}\n\nfunction escapeHtml(value: string) {\n return value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\n\nconst ARIA_SORT = { asc: 'ascending', desc: 'descending' } as const;\n\nexport interface TableViewProps<T = any> {\n qa?: string;\n rows: readonly T[];\n getRowKey: (row: T, index: number) => Key;\n layout: CubeTableColumnLayout<T>;\n /**\n * Receives the scroll container once it exists. A callback rather than a ref\n * because the virtualized path does not create the element itself — Virtuoso\n * does, and hands it over after mount.\n */\n onScrollerRef: (element: HTMLDivElement | null) => void;\n /** Attached to the table's root frame. */\n rootRef?: RefObject<HTMLDivElement | null>;\n\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n shape?: 'plain' | 'card';\n rowHeight?: number;\n headerHeight?: number;\n isHeaderHidden?: boolean;\n isStriped?: boolean;\n /** @default true */\n isHeaderSticky?: boolean;\n /** @default 'auto' — on above `virtualizeThreshold` rows, needs a bounded height. */\n isVirtualized?: boolean | 'auto';\n /** @default 50 */\n virtualizeThreshold?: number;\n /** Rows rendered beyond each edge of the viewport. @default 20 */\n overscan?: number;\n\n /* status */\n isLoading?: boolean;\n loadingIndicator?: CubeTableLoadingIndicator;\n skeletonRowCount?: number;\n emptyLabel?: ReactNode;\n noResultsLabel?: ReactNode;\n error?: ReactNode;\n /** Selects `noResultsLabel` over `emptyLabel` when there is nothing to show. */\n isFiltered?: boolean;\n\n /* sorting */\n /** @default 'off' */\n sortMode?: 'client' | 'server' | 'off';\n sort?: CubeTableSort | null;\n /**\n * Multi-column sort. Takes precedence over `sort` when given, and the array\n * order is the precedence — `DataTable` uses it, `ItemTable` uses `sort`.\n */\n sorts?: CubeTableSort[];\n onColumnSort?: (columnKey: string) => void;\n\n /* per-row hooks */\n getRowProps?: (\n ctx: CubeTableRowContext<T>,\n ) => CubeTableRowRenderProps | undefined;\n\n /**\n * Typography preset for the column header. A per-adapter default rather than\n * a table-wide constant: `ItemTable` uses the uppercase caption look (`c2`),\n * while an analytics grid wants its headers to read at body size.\n * `headerCellStyles` still wins over it.\n */\n headerPreset?: string;\n /**\n * Typography for the body. `ItemTable` reads as a list at `t3`; a result grid\n * packs more in and wants `t4`.\n */\n contentPreset?: string;\n\n /** Chrome rendered above the table, in the frame's first grid row. */\n toolbar?: ReactNode;\n /** Chrome rendered below the table, in the frame's last grid row. */\n footer?: ReactNode;\n\n ariaLabel?: string;\n styles?: Styles;\n headerStyles?: Styles;\n headerCellStyles?: Styles;\n bodyStyles?: Styles;\n rowStyles?: Styles;\n cellStyles?: Styles;\n mods?: Record<string, boolean | undefined>;\n}\n\n/**\n * Content height per size step, mirroring `$row-height` in `styled.ts`. Only the\n * initial estimate — every rendered row is measured, so a wrong guess costs a\n * scrollbar adjustment, not a layout bug. The `+ 1` is the row separator.\n */\n/** Enough to read as \"more is coming\" without pretending to know how much. */\n/**\n * Ceiling on the load-more placeholder burst.\n *\n * These rows are not virtualized — they sit after the window, at the end of the\n * body — so the count is real DOM. 50 rows is already taller than any viewport,\n * which is all the burst has to be.\n */\nconst MAX_LOAD_MORE_SKELETON_ROWS = 50;\n\n/**\n * Floor on the prefetch distance, for a table too short to measure usefully —\n * an unbounded one reports a viewport of nearly zero before it has any rows.\n */\nconst MIN_LOAD_MORE_MARGIN = 200;\n\nconst ESTIMATED_ROW_HEIGHT = {\n xsmall: 28,\n small: 32,\n medium: 40,\n large: 48,\n xlarge: 56,\n} as const;\n\nfunction pinStyle(column: CubeResolvedColumn): CSSProperties | undefined {\n if (column.pinOffset == null) return undefined;\n\n return { ['--pin-offset' as any]: `${column.pinOffset}px` };\n}\n\n/**\n * The one place table DOM exists. Both `ItemTable` and `DataTable` resolve their\n * props into the shape above and hand it here, so the markup, the ARIA\n * bookkeeping and the tasty sub-element contract have a single implementation.\n */\nexport function TableView<T = any>(props: TableViewProps<T>) {\n const {\n qa,\n rows,\n getRowKey,\n layout,\n onScrollerRef,\n rootRef,\n size = 'medium',\n shape = 'plain',\n rowHeight,\n headerHeight,\n isHeaderHidden = false,\n isStriped = false,\n hasColumnDividers,\n isRowMoveAnimated = true,\n isHeaderSticky = true,\n isVirtualized = 'auto',\n virtualizeThreshold = 50,\n overscan = 20,\n isLoading = false,\n loadingIndicator = 'overlay',\n skeletonRowCount = 6,\n selection,\n selectionTooltip,\n overlay,\n rowMenu,\n rowContextMenu = false,\n onRowMenuAction,\n rowMenuTriggerProps,\n rowLink,\n onRowAction,\n onLoadMore,\n hasMore = false,\n isLoadingMore = false,\n loadMoreMargin,\n pinnedTopRows,\n pinnedBottomRows,\n cellSelection,\n rowNumberOffset = 0,\n rowIndexOffset = 0,\n totalRowCount,\n isReorderable = false,\n dragState,\n dropState,\n collectionProps,\n bodyRef,\n isResizable = false,\n onColumnResize,\n onColumnResizeEnd,\n emptyLabel,\n noResultsLabel,\n error,\n isFiltered = false,\n sortMode = 'off',\n sort,\n sorts,\n onColumnSort,\n getRowProps,\n headerPreset,\n contentPreset,\n toolbar,\n footer,\n ariaLabel,\n styles,\n headerStyles,\n headerCellStyles,\n bodyStyles,\n rowStyles,\n cellStyles,\n mods,\n } = props;\n\n const { columns } = layout;\n const columnCount = columns.length;\n\n // The element is held here as well as reported upwards: the virtualizer needs\n // it locally, and the adapter needs it to measure column widths.\n const { t } = useI18n();\n const toast = useToast();\n\n const [scrollerEl, setScrollerEl] = useState<HTMLDivElement | null>(null);\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n // `bodyRef` is optional — only the drag-and-drop path supplies one — but the\n // move animation needs the `<tbody>` either way, so it keeps its own and both\n // are filled from one callback.\n const localBodyRef = useRef<HTMLTableSectionElement | null>(null);\n const handleBodyRef = useCallback(\n (element: HTMLTableSectionElement | null) => {\n localBodyRef.current = element;\n if (bodyRef) bodyRef.current = element;\n },\n [bodyRef],\n );\n const handleScrollerRef = useCallback(\n (element: HTMLDivElement | null) => {\n scrollerRef.current = element;\n setScrollerEl(element);\n onScrollerRef(element);\n },\n [onScrollerRef],\n );\n\n // Header rows count towards `aria-rowcount`, which must be document-absolute.\n const headerRowCount = isHeaderHidden ? 0 : 1;\n\n /* ── the ARIA row index space ───────────────────────────────────────────\n * Four bands, in the order a screen reader walks them:\n *\n * 1 the header row\n * 2 … 1+top pinned top rows\n * … the body, offset by the pages before this one\n * after the whole body pinned bottom rows\n *\n * Derived once here rather than at each of the four render sites, which is\n * how the body came to be numbered as though the pinned rows above it did\n * not exist while `aria-rowcount` counted them.\n * ─────────────────────────────────────────────────────────────────────── */\n const pinnedTopCount = pinnedTopRows?.length ?? 0;\n const pinnedBottomCount = pinnedBottomRows?.length ?? 0;\n // The whole result, not this page. `rows.length` is the honest fallback when\n // the adapter does not know a total.\n const bodyRowCount = Math.max(\n totalRowCount ?? rows.length,\n rowIndexOffset + rows.length,\n );\n\n /** 1-based `aria-rowindex` for the i-th body row of the current page. */\n const bodyRowIndex = (rowIndex: number) =>\n headerRowCount + pinnedTopCount + rowIndexOffset + rowIndex + 1;\n /** 1-based `aria-rowindex` for the i-th pinned row at `edge`. */\n const pinnedRowIndex = (index: number, edge: 'top' | 'bottom') =>\n edge === 'top'\n ? headerRowCount + index + 1\n : headerRowCount + pinnedTopCount + bodyRowCount + index + 1;\n\n const mergedStyles = useMemo(\n () => ({\n ...styles,\n ...(contentPreset ? { Table: { preset: contentPreset } } : null),\n ...(headerStyles ? { HeadRow: headerStyles } : null),\n ...(headerPreset || headerCellStyles\n ? {\n HeaderCell: {\n ...(headerPreset ? { preset: headerPreset } : null),\n ...headerCellStyles,\n },\n }\n : null),\n ...(bodyStyles ? { Body: bodyStyles } : null),\n ...(rowStyles ? { Row: rowStyles } : null),\n ...(cellStyles ? { Cell: cellStyles } : null),\n ...(rowHeight != null ? { '$row-height': `${rowHeight}px` } : null),\n ...(headerHeight != null\n ? { '$header-height': `${headerHeight}px` }\n : null),\n }),\n [\n styles,\n headerStyles,\n headerCellStyles,\n headerPreset,\n contentPreset,\n bodyStyles,\n rowStyles,\n cellStyles,\n rowHeight,\n headerHeight,\n ],\n );\n\n /**\n * Whether a cell is inside the current range.\n *\n * Pinned rows take part: they sit in the range's row order at the position\n * they occupy on screen, so a selection down a column of figures reaches its\n * total instead of leaving it to be copied separately. (ag-grid excludes\n * pinned rows outright; this is a deliberate departure.)\n */\n function isCellSelected(rowKey: Key, columnKey: string) {\n if (!cellSelection?.isEnabled) return false;\n\n return cellSelection.isSelected(rowKey, columnKey);\n }\n\n /**\n * Press and drag for the range.\n *\n * `pointerdown` rather than `click`: the range has to start before the drag\n * does, and a click only lands after the button comes back up — by which time\n * the gesture is over. `pointerenter` grows it while the button is held, which\n * is the same shape ag-grid's `onCellMouseOver` gives the Cloud grids.\n */\n function cellSelectionProps(\n rowKey: Key,\n columnKey: string,\n pinnedEdge?: 'top' | 'bottom',\n ) {\n // A vetoed cell gets no handlers at all, so it is inert rather than merely\n // unpainted: pressing it neither starts a range nor disturbs the standing\n // one, which is how ag-grid treats a press on its row-number column.\n if (!cellSelection?.canSelectCell(rowKey, columnKey)) return undefined;\n\n return {\n onPointerDown: (event: ReactPointerEvent<HTMLTableCellElement>) => {\n // Right-click keeps whatever is selected, so a context menu can act on\n // the range the user has already built.\n if (event.button !== 0) return;\n\n if (event.shiftKey) {\n // Otherwise the browser paints a text selection from the anchor to\n // here, on top of the cell range.\n event.preventDefault();\n cellSelection.extendTo(rowKey, columnKey);\n } else {\n cellSelection.select(rowKey, columnKey);\n }\n\n // The range's keyboard affordances — Escape to clear, ⌘/Ctrl+C to copy\n // — are handled on the scroller, and a `<td>` takes no focus of its\n // own, so a press would otherwise leave focus on `<body>` and neither\n // would ever fire.\n scrollerRef.current?.focus({ preventScroll: true });\n\n cellSelection.isDraggingRef.current = true;\n setIsRangeDragging(true);\n },\n onPointerEnter: () => {\n if (!cellSelection.isDraggingRef.current) return;\n\n // Reachable by press and by shift-click, but never by dragging THROUGH.\n // A pinned row sits over the scrolling ones, so a downward drag brushes\n // it long before reaching the end of the data — and being last in the\n // row order, that would snap the range to the whole rest of the grid.\n if (pinnedEdge) return;\n\n cellSelection.extendTo(rowKey, columnKey);\n },\n };\n }\n\n /**\n * Marks the trailing column.\n *\n * Two things hang off it. Its resize handle tucks fully inside rather than\n * straddling a boundary that is not there — left hanging it puts half its\n * width past the table, and the scroller gains a few pixels of horizontal\n * scroll onto blank space. And it draws no vertical rule: that rule would\n * land flush against the frame and read as a doubled edge.\n */\n /** The pinned edge a row was rendered at, as the documented section name. */\n function sectionOf(pinnedEdge?: 'top' | 'bottom'): CubeTableRowSection {\n if (pinnedEdge === 'top') return 'pinnedTop';\n if (pinnedEdge === 'bottom') return 'pinnedBottom';\n\n return 'body';\n }\n\n function lastColumnFlag(column: CubeResolvedColumn<T>) {\n return column.index === columns.length - 1 ? '' : undefined;\n }\n\n /**\n * Which frame corner, if any, this cell sits in.\n *\n * Only the two bottom ones, and only when the card's rounded edge is what the\n * row actually meets — a footer below it means the row ends against a straight\n * line instead. Without this a selected cell in that row has its ring sliced\n * off at 45° by the frame's radius, which reads as a rendering fault rather\n * than as a corner.\n *\n * Decided here rather than in CSS: the renderer already knows about the\n * footer, the shape and the pinned rows, and expressing\n * `card × no-footer × visually-last-row × outer-column` as a state map is how\n * a border map turns into a combinatorial one.\n */\n function bottomCornerFlag(\n column: CubeResolvedColumn<T>,\n rowIndex: number,\n isLastRow: boolean,\n pinnedEdge?: 'top' | 'bottom',\n ) {\n if (shape !== 'card' || footer != null) return undefined;\n\n const pinnedBottomCount = pinnedBottomRows?.length ?? 0;\n const isVisualLastRow =\n pinnedEdge === 'bottom'\n ? rowIndex === pinnedBottomCount - 1\n : pinnedEdge == null && isLastRow && pinnedBottomCount === 0;\n\n if (!isVisualLastRow) return undefined;\n if (column.index === 0) return 'start';\n if (column.index === columns.length - 1) return 'end';\n\n return undefined;\n }\n\n function renderStateRow(content: ReactNode) {\n return (\n <tr data-element=\"Row\" role=\"row\" aria-rowindex={headerRowCount + 1}>\n <td\n data-element=\"StateCell\"\n data-state=\"\"\n role=\"gridcell\"\n colSpan={Math.max(columnCount, 1)}\n aria-colindex={1}\n >\n <div data-element=\"StateContent\">{content}</div>\n </td>\n </tr>\n );\n }\n\n function renderSkeletonRows(\n count = skeletonRowCount,\n keyPrefix = 'skeleton',\n ) {\n return Array.from({ length: count }, (_, rowIndex) => (\n <tr\n key={`${keyPrefix}-${rowIndex}`}\n data-element=\"Row\"\n data-placeholder=\"\"\n role=\"row\"\n aria-rowindex={bodyRowIndex(rowIndex)}\n aria-busy=\"true\"\n >\n {columns.map((column) => (\n <td\n key={column.key}\n data-element=\"Cell\"\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-align={column.align}\n role=\"gridcell\"\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n >\n <Placeholder size=\"2x\" />\n </td>\n ))}\n </tr>\n ));\n }\n\n function renderSelectionHeaderCell(column: CubeResolvedColumn<T>) {\n return (\n <th\n key={column.key}\n data-element=\"HeaderCell\"\n data-key={column.key}\n data-kind=\"selection\"\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-last-column={lastColumnFlag(column)}\n role=\"columnheader\"\n scope=\"col\"\n tabIndex={-1}\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n >\n {selection && selection.selectionMode === 'multiple' ? (\n <div data-element=\"SelectionBox\">\n <Checkbox\n aria-label={\n selection.selectAllState === 'all'\n ? t('itemTable.deselectAll', 'Deselect all')\n : t('itemTable.selectAll', 'Select all')\n }\n isSelected={selection.selectAllState === 'all'}\n isIndeterminate={selection.selectAllState === 'some'}\n onChange={selection.toggleSelectAll}\n />\n </div>\n ) : null}\n </th>\n );\n }\n\n function renderSelectionCell(\n column: CubeResolvedColumn<T>,\n row: T,\n rowIndex: number,\n rowKey: Key,\n isLastRow: boolean,\n pinnedEdge?: 'top' | 'bottom',\n ) {\n const canSelect = selection!.canSelect(rowKey);\n const tooltip =\n typeof selectionTooltip === 'function'\n ? selectionTooltip(row)\n : selectionTooltip;\n\n const checkbox = (\n <Checkbox\n aria-label={t('itemTable.selectRow', 'Select row')}\n isSelected={selection!.isSelected(rowKey)}\n isDisabled={!canSelect}\n onChange={() => selection!.toggleRow(rowKey)}\n />\n );\n\n return (\n <td\n key={column.key}\n data-element=\"Cell\"\n data-key={column.key}\n data-kind=\"selection\"\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-last-row={isLastRow ? '' : undefined}\n data-pinned={pinnedEdge}\n data-last-column={lastColumnFlag(column)}\n data-corner={bottomCornerFlag(column, rowIndex, isLastRow, pinnedEdge)}\n role=\"gridcell\"\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n // `Checkbox` reports only the next value, so the modifier that decides\n // toggle-vs-extend is read off the event that produced it.\n //\n // `click` rather than `pointerdown`: capture on the cell still runs\n // before the checkbox's own `change` handler, and unlike pointer events\n // it carries the modifier state in every environment — including\n // keyboard activation and jsdom.\n onClickCapture={selection!.captureShift}\n onKeyDownCapture={selection!.captureShift}\n >\n <div data-element=\"SelectionBox\">\n {!canSelect && tooltip ? (\n <TooltipProvider title={tooltip}>{checkbox}</TooltipProvider>\n ) : (\n checkbox\n )}\n </div>\n </td>\n );\n }\n\n function renderRowMenuCell(\n column: CubeResolvedColumn<T>,\n row: T,\n rowIndex: number,\n rowKey: Key,\n isLastRow: boolean,\n pinnedEdge?: 'top' | 'bottom',\n ) {\n const items = resolveRowMenu(row, rowIndex, rowKey);\n\n return (\n <td\n key={column.key}\n data-element=\"Cell\"\n data-key={column.key}\n data-kind=\"actions\"\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-last-row={isLastRow ? '' : undefined}\n data-pinned={pinnedEdge}\n data-last-column={lastColumnFlag(column)}\n data-corner={bottomCornerFlag(column, rowIndex, isLastRow, pinnedEdge)}\n role=\"gridcell\"\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n >\n {isMenuEmpty(items) ? null : (\n <div data-element=\"RowActions\">\n <MenuTrigger>\n <ItemAction\n // The grid is one tab stop; in-cell controls are reached with\n // arrow keys, matching `TreeNode`.\n tabIndex={-1}\n icon={<MoreIcon />}\n aria-label={t('itemTable.rowActions', 'Row actions')}\n {...rowMenuTriggerProps}\n />\n <Menu onAction={menuActionHandler(row, rowKey, false)}>\n {items}\n </Menu>\n </MenuTrigger>\n </div>\n )}\n </td>\n );\n }\n\n function renderHeaderCell(column: CubeResolvedColumn<T>) {\n if (column.key === SELECTION_COLUMN_KEY) {\n return renderSelectionHeaderCell(column);\n }\n\n if (column.key === ROW_NUMBER_COLUMN_KEY) {\n // Deliberately unnamed: the numbers are a reading aid, not data, and a\n // column header would invite sorting by them.\n return (\n <th\n key={column.key}\n data-element=\"HeaderCell\"\n data-key={column.key}\n data-kind=\"row-number\"\n data-last-column={lastColumnFlag(column)}\n role=\"columnheader\"\n scope=\"col\"\n tabIndex={-1}\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n />\n );\n }\n\n if (column.key === ROW_MENU_COLUMN_KEY) {\n // An empty header keeps the column in the ARIA geometry without\n // announcing a name for a column that holds no data.\n return (\n <th\n key={column.key}\n data-element=\"HeaderCell\"\n data-key={column.key}\n data-kind=\"actions\"\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-last-column={lastColumnFlag(column)}\n role=\"columnheader\"\n scope=\"col\"\n tabIndex={-1}\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n />\n );\n }\n\n const header = column.header;\n // One resolution path for both shapes, so every consumer of `isSorted`\n // below stays unaware of which one the caller supplied.\n const activeSorts = sorts ?? (sort ? [sort] : []);\n const sortIndex = activeSorts.findIndex(\n (entry) => entry.columnKey === column.key,\n );\n const activeSort = sortIndex === -1 ? null : activeSorts[sortIndex];\n const isSorted = activeSort != null;\n // Only worth showing when more than one column is sorted — a lone \"1\"\n // beside an arrow is noise.\n const sortRank = activeSorts.length > 1 ? sortIndex + 1 : null;\n const isSortable =\n sortMode !== 'off' && !column.isStructural && column.isSortable === true;\n\n // A structural column has no content to make room for, and resizing needs\n // somewhere to write the result.\n const canResize =\n !column.isStructural &&\n (column.isResizable ?? isResizable) &&\n onColumnResize != null &&\n onColumnResizeEnd != null;\n\n const ctx: CubeTableHeaderContext = {\n columnKey: column.key,\n columnIndex: column.index,\n sort: activeSort?.direction ?? null,\n isSortable,\n isResizing: false,\n width: column.width,\n };\n\n // The arrow keeps its slot even when unsorted, so turning a sort on and off\n // never shifts the label.\n const sortIndicator = isSortable ? (\n <div\n data-element=\"SortIndicator\"\n data-rank={sortRank ?? undefined}\n data-sorted={isSorted ? '' : undefined}\n data-dir={activeSort?.direction}\n aria-hidden=\"true\"\n >\n <UpIcon />\n </div>\n ) : null;\n\n // The arrow belongs in the `rightIcon` slot: that slot is sized and aligned\n // for an icon, while `suffix` is a text slot and puts the glyph on the\n // label's baseline.\n //\n // A `header.rightIcon` the consumer asked for keeps the slot, and the arrow\n // falls back to `suffix` — rare, and better than dropping either one.\n const hasCustomRightIcon = header?.rightIcon != null;\n const rightIcon = hasCustomRightIcon ? header!.rightIcon : sortIndicator;\n\n const suffixContent = hasCustomRightIcon ? sortIndicator : null;\n const suffix =\n header?.suffix != null || suffixContent ? (\n <>\n {header?.suffix}\n {suffixContent}\n </>\n ) : undefined;\n\n const content = header?.render ? (\n header.render(ctx)\n ) : column.title == null && !header ? null : (\n <TableHeaderItem\n icon={header?.icon}\n rightIcon={rightIcon}\n prefix={header?.prefix}\n suffix={suffix}\n description={header?.description}\n descriptionPlacement={header?.descriptionPlacement}\n tooltip={header?.tooltip ?? true}\n theme={header?.theme}\n actions={header?.actions}\n autoHideActions={header?.autoHideActions ?? true}\n styles={header?.styles}\n >\n {column.title}\n </TableHeaderItem>\n );\n\n return (\n <th\n key={column.key}\n data-element=\"HeaderCell\"\n data-key={column.key}\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-align={header?.align ?? column.align}\n data-sortable={isSortable ? '' : undefined}\n data-resizable={canResize ? '' : undefined}\n data-last-column={lastColumnFlag(column)}\n data-sorted={isSorted ? '' : undefined}\n role=\"columnheader\"\n scope=\"col\"\n // A sortable header is a control, so it takes a tab stop. Row/cell\n // keyboard navigation lands in a follow-up and will move this to the\n // grid's roving-tabindex model.\n tabIndex={isSortable ? 0 : -1}\n aria-colindex={column.ariaColIndex}\n aria-sort={activeSort ? ARIA_SORT[activeSort.direction] : undefined}\n style={pinStyle(column)}\n onClick={isSortable ? () => onColumnSort?.(column.key) : undefined}\n onKeyDown={\n isSortable\n ? (event) => {\n if (event.key !== 'Enter' && event.key !== ' ') return;\n // Space would scroll the grid otherwise.\n event.preventDefault();\n onColumnSort?.(column.key);\n }\n : undefined\n }\n >\n {content}\n {canResize ? (\n <ColumnResizer<T>\n column={column}\n label={t('itemTable.resizeColumn', 'Resize column')}\n onResize={onColumnResize!}\n onResizeEnd={onColumnResizeEnd!}\n />\n ) : null}\n </th>\n );\n }\n\n function renderCell(\n column: CubeResolvedColumn<T>,\n row: T,\n rowIndex: number,\n rowKey: Key,\n isLastRow: boolean,\n // The row's pinned edge, mirrored onto its cells. Cells are what draw the\n // borders and the fill, and a sub-element cannot ask about its DOM parent's\n // mods — state keys inside `Cell` resolve against the table root.\n pinnedEdge?: 'top' | 'bottom',\n ) {\n // Section-qualified, because the same record is routinely pinned at both\n // edges. `rowKey` below stays the consumer's own — this identity is the\n // range's alone.\n const rangeKey = selectionRowKey(sectionOf(pinnedEdge), rowKey);\n if (column.key === SELECTION_COLUMN_KEY) {\n return renderSelectionCell(\n column,\n row,\n rowIndex,\n rowKey,\n isLastRow,\n pinnedEdge,\n );\n }\n\n if (column.key === ROW_NUMBER_COLUMN_KEY) {\n return (\n <td\n key={column.key}\n data-element=\"Cell\"\n data-key={column.key}\n data-kind=\"row-number\"\n data-last-row={isLastRow ? '' : undefined}\n data-pinned={pinnedEdge}\n data-last-column={lastColumnFlag(column)}\n data-corner={bottomCornerFlag(\n column,\n rowIndex,\n isLastRow,\n pinnedEdge,\n )}\n role=\"gridcell\"\n aria-colindex={column.ariaColIndex}\n style={pinStyle(column)}\n >\n {/*\n A pinned row is not numbered. It sits outside the sequence — a\n total is not row 1 — and numbering it would repeat a number the\n scrolling rows already own.\n */}\n {pinnedEdge ? null : rowNumberOffset + rowIndex + 1}\n </td>\n );\n }\n\n if (column.key === ROW_MENU_COLUMN_KEY) {\n return renderRowMenuCell(\n column,\n row,\n rowIndex,\n rowKey,\n isLastRow,\n pinnedEdge,\n );\n }\n\n const ctx: CubeTableCellContext<T> = {\n row,\n rowKey,\n rowIndex,\n columnKey: column.key,\n columnIndex: column.index,\n section: sectionOf(pinnedEdge),\n // The ROW's selection, matching the field's siblings (`isRowFocused`).\n // Cell-range membership is a different question and has its own answer in\n // `data-cell-selected`.\n isSelected: selection?.isSelected(rowKey) ?? false,\n };\n\n const value = column.isStructural\n ? undefined\n : getColumnValue(column, row, rowIndex);\n\n // Without `render`, the cell shows the column's display text — which is\n // what `format` produces, and what client sort, search and copy all agree\n // on. `getColumnText` returns null for a value it cannot turn into text\n // (an object with no `format`), so we render nothing rather than\n // \"[object Object]\".\n const rendered = column.render\n ? column.render(value, row, rowIndex, ctx)\n : column.isStructural\n ? null\n : getColumnText(column, row, rowIndex);\n\n const isText =\n typeof rendered === 'string' ||\n typeof rendered === 'number' ||\n typeof rendered === 'bigint';\n\n // Bare text gets ellipsis + an automatic tooltip when it overflows.\n // `TextItem` rather than `Item` deliberately: `Item` runs `useHotkeys` on\n // every instance, which at one per cell would be hundreds of subscriptions\n // churned on every scroll tick.\n //\n // An `autoHeight` column skips it — `TextItem` exists to truncate, and this\n // column has opted into wrapping instead.\n const content =\n isText && !column.autoHeight ? (\n <TextItem>{String(rendered)}</TextItem>\n ) : isText ? (\n String(rendered)\n ) : (\n (rendered as ReactNode)\n );\n\n const resolvedCellStyles =\n typeof column.cellStyles === 'function'\n ? column.cellStyles(ctx)\n : column.cellStyles;\n\n const CellTag = column.isRowHeader ? 'th' : 'td';\n\n // The link lives in the row-header cell but stretches over the whole row:\n // a `<tr>` cannot be wrapped in an `<a>`, and this is the one cell whose\n // text is the row's accessible name. ⌘-click, middle-click and \"Open in\n // new tab\" then work natively, which an onClick handler can never give.\n const link = column.isRowHeader ? rowLink?.(row, rowIndex) : undefined;\n\n return (\n <CellTag\n key={column.key}\n data-element=\"Cell\"\n data-key={column.key}\n data-pin={column.pin}\n data-pin-edge={column.isPinEdge ? '' : undefined}\n data-align={column.align}\n data-wrap={column.autoHeight ? '' : undefined}\n data-link={link !== undefined ? '' : undefined}\n data-last-row={isLastRow ? '' : undefined}\n data-pinned={pinnedEdge}\n data-last-column={lastColumnFlag(column)}\n data-corner={bottomCornerFlag(column, rowIndex, isLastRow, pinnedEdge)}\n data-cell-selected={\n isCellSelected(rangeKey, column.key) ? '' : undefined\n }\n {...(column.isRowHeader\n ? { scope: 'row' as const }\n : { role: 'gridcell' as const })}\n {...cellSelectionProps(rangeKey, column.key, pinnedEdge)}\n aria-colindex={column.ariaColIndex}\n style={{\n ...pinStyle(column),\n ...(resolvedCellStyles as CSSProperties),\n }}\n {...column.cellProps?.(ctx)}\n >\n {content}\n {link !== undefined ? (\n <Action\n data-element=\"RowLink\"\n to={link}\n // The row is the tab stop; the link is reached through it.\n tabIndex={-1}\n aria-label={getColumnText(column, row, rowIndex) ?? undefined}\n />\n ) : null}\n </CellTag>\n );\n }\n\n /**\n * A pinned row — a total or subtotal.\n *\n * Rendered inside `<tbody>` rather than `<thead>`/`<tfoot>` so it keeps the\n * body's own row and cell styling: the sub-element chains are anchored to\n * `Body`, and a row in the head would match none of them. `data-pinned`\n * carries the stickiness instead.\n */\n function renderPinnedRow(row: T, index: number, edge: 'top' | 'bottom') {\n // The consumer's own key, not a positional one: a cell range spans pinned\n // and scrolling rows alike, so both have to answer to the same identity.\n const rowKey = getRowKey(row, index);\n\n return (\n <tr\n key={`pinned-${edge}-${rowKey}`}\n data-element=\"Row\"\n data-pinned={edge}\n role=\"row\"\n aria-rowindex={pinnedRowIndex(index, edge)}\n >\n {columns.map((column) =>\n renderCell(column, row, index, rowKey, false, edge),\n )}\n </tr>\n );\n }\n\n /** The cells of one body row. Shared by both render paths. */\n function renderRowCells(row: T, rowIndex: number) {\n const rowKey = getRowKey(row, rowIndex);\n\n return columns.map((column) =>\n renderCell(column, row, rowIndex, rowKey, rowIndex === rows.length - 1),\n );\n }\n\n /**\n * The `<tr>` shell. Virtuoso owns the element in the virtualized path (it\n * needs its own `style` and measurement attributes), so this returns the\n * props rather than the element.\n */\n function getRowElementProps(row: T, rowIndex: number) {\n const rowKey = getRowKey(row, rowIndex);\n const isSelected = selection?.isSelected(rowKey) ?? false;\n const ctx: CubeTableRowContext<T> = {\n row,\n rowKey,\n rowIndex,\n section: 'body',\n isSelected,\n };\n const extra = getRowProps?.(ctx);\n\n return {\n 'data-element': 'Row',\n 'data-key': String(rowKey),\n // Lets a pointer or keyboard event resolve back to its row without a\n // closure per row.\n 'data-row-index': rowIndex,\n 'data-qa': extra?.qa,\n 'data-odd': isStriped && rowIndex % 2 === 1 ? '' : undefined,\n 'data-dimmed': extra?.isDimmed ? '' : undefined,\n 'data-selected': isSelected ? '' : undefined,\n 'data-disabled': selection?.isRowDisabled(rowKey) ? '' : undefined,\n role: 'row',\n // Only the resting row takes a tab stop; the rest are reached with the\n // arrow keys. Off entirely when nothing on the row is operable.\n tabIndex: isReorderable\n ? rowIndex === focusedRowIndex\n ? 0\n : -1\n : undefined,\n // Only meaningful in a selectable grid; announcing \"not selected\" on\n // every row of a plain table is noise.\n 'aria-selected': selection?.isEnabled ? isSelected : undefined,\n 'aria-rowindex': bodyRowIndex(rowIndex),\n title: extra?.tooltip,\n height: extra?.height,\n 'data-clickable':\n onRowAction != null || rowLink?.(row, rowIndex) !== undefined\n ? ''\n : undefined,\n onClick:\n onRowAction != null\n ? (event: ReactMouseEvent) => {\n // A click that landed on a control inside the cell belongs to\n // that control — the row must not also act on it.\n if (\n (event.target as HTMLElement).closest(\n 'a, button, input, select, textarea, [role=\"button\"], [role=\"menuitem\"]',\n )\n ) {\n return;\n }\n\n onRowAction(row, rowKey);\n }\n : undefined,\n onContextMenu: isMenuEnabled\n ? (event: ReactMouseEvent) =>\n openContextMenuFor(row, rowIndex, rowKey, event)\n : undefined,\n ...Object.fromEntries(\n Object.entries(extra?.mods ?? {})\n .filter(([, active]) => active)\n .map(([name]) => [`data-${name}`, '']),\n ),\n } as Record<string, any>;\n }\n\n function renderRow(row: T, rowIndex: number, isVirtual = false) {\n const { height, ...rowProps } = getRowElementProps(row, rowIndex);\n const rowKey = getRowKey(row, rowIndex);\n\n return (\n <TableRow\n key={rowProps['data-key']}\n rowKey={rowKey}\n rowProps={rowProps}\n height={height}\n index={isVirtual ? rowIndex : undefined}\n measureRef={isVirtual ? virtualizer.measureElement : undefined}\n dragState={isReorderable ? dragState : undefined}\n dropState={isReorderable ? dropState : undefined}\n >\n {renderRowCells(row, rowIndex)}\n </TableRow>\n );\n }\n\n function renderSpacerRow(height: number, position: 'top' | 'bottom') {\n if (height <= 0) return null;\n\n return (\n <tr aria-hidden=\"true\" data-spacer={position}>\n <td colSpan={Math.max(columnCount, 1)} style={{ height }} />\n </tr>\n );\n }\n\n /**\n * A row, preceded by the line showing a drop above it — and followed by one\n * for the very last row, which has nothing after it to carry a \"before\".\n *\n * The indicators render nothing unless a drag is in flight, so a table that\n * is merely *capable* of dragging keeps its ordinary structure.\n */\n function withDropIndicators(row: T, index: number, isVirtual = false) {\n const rowKey = getRowKey(row, index);\n const rowNode = renderRow(row, index, isVirtual);\n\n if (!isReorderable || !dropState) return rowNode;\n\n return (\n <Fragment key={`row-${String(rowKey)}`}>\n <TableRowDropIndicator\n rowKey={rowKey}\n dropPosition=\"before\"\n dropState={dropState}\n columnCount={columnCount}\n />\n {rowNode}\n {index === rows.length - 1 ? (\n <TableRowDropIndicator\n rowKey={rowKey}\n dropPosition=\"after\"\n dropState={dropState}\n columnCount={columnCount}\n />\n ) : null}\n </Fragment>\n );\n }\n\n const hasRows = rows.length > 0;\n\n // How a refresh over an existing result is presented. `overlay` keeps the\n // previous rows on screen (dimmed, behind a spinner) so a server page or a\n // re-sort does not blank the table; `skeleton` discards them; `none` leaves\n // the visuals entirely to the consumer and only sets `aria-busy`.\n // `overlay` is the only behaviour that paints: the rows dim and a spinner\n // sits over them. `none` deliberately leaves them untouched.\n const isStale = isLoading && hasRows && loadingIndicator === 'overlay';\n const showSkeleton =\n isLoading &&\n loadingIndicator !== 'none' &&\n (!hasRows || loadingIndicator === 'skeleton');\n // Without rows and without an indicator there is nothing to say yet —\n // rendering the empty state would flash \"No items\" before the first response.\n const showBlank = isLoading && !hasRows && loadingIndicator === 'none';\n\n const shouldVirtualize =\n hasRows &&\n error == null &&\n (isVirtualized === true ||\n (isVirtualized === 'auto' && rows.length > virtualizeThreshold));\n\n const rowsRef = useRef(rows);\n\n rowsRef.current = rows;\n\n // `getScrollElement` is read from a ref, not the state value: the virtualizer\n // consults it from a layout effect, and a closure over state can still hold\n // the `null` from the first render.\n const virtualizer = useVirtualizer({\n count: shouldVirtualize ? rows.length : 0,\n getScrollElement: () => scrollerRef.current,\n getItemKey: (index) => String(getRowKey(rowsRef.current[index], index)),\n estimateSize: () =>\n (rowHeight ?? ESTIMATED_ROW_HEIGHT[size ?? 'medium']) + 1,\n measureElement: (element) => element.getBoundingClientRect().height,\n // Rows beyond each viewport edge. Higher than a list's, because a fast\n // flick outruns React's re-render and the gap shows as blank rows — and a\n // table row is one element, not one per column, so the extra ones are\n // cheap.\n overscan,\n });\n\n // `scrollerEl` is referenced only to re-render on the pass where the scroller\n // first exists, so the virtualizer re-reads `getScrollElement` and attaches.\n void scrollerEl;\n\n const scrollability = useScrollability(scrollerEl);\n\n /**\n * Roving tabindex over the rows, so a reorderable table can be operated from\n * the keyboard at all.\n *\n * React Aria's `dragProps` already describe \"press Enter to start dragging\"\n * and implement the whole keyboard drag — but a `<tr>` is not focusable, so\n * without this the description is announced for a row nobody can reach. One\n * tab stop for the grid, arrows to move within it, matching how every other\n * collection in the kit behaves.\n */\n // Not while a drag is in flight: React Aria is already moving the row under\n // the pointer, and a second transform fighting it reads as a stutter.\n useRowMoveAnimation({\n isEnabled: isRowMoveAnimated && !dragState?.draggingKeys?.size,\n bodyRef: localBodyRef,\n });\n\n /**\n * How many rows the next batch is likely to bring, measured across the last\n * fetch that actually happened.\n *\n * The placeholder burst is sized to this so the scroll height is right both\n * before and after the load: a short burst under a long batch makes the\n * content jump the moment the rows land, and leaves the user stopped at the\n * bottom of the list in the meantime with nothing left to scroll into.\n *\n * Measured across `isLoadingMore`, not from any growth in `rows`. Plenty of\n * things lengthen the list without being a fetch — clearing a client search\n * over an infinite list restores every filtered-out row at once — and reading\n * that as a batch of ninety sized the next burst at ninety.\n *\n * Measured at all, rather than taken from `pageSize`, because infinite-scroll\n * consumers often do not set it.\n */\n const lastBatchSizeRef = useRef(0);\n const rowCountBeforeFetchRef = useRef<number | null>(null);\n\n useEffect(() => {\n if (isLoadingMore) {\n rowCountBeforeFetchRef.current = rows.length;\n\n return;\n }\n\n const before = rowCountBeforeFetchRef.current;\n\n if (before != null && rows.length > before) {\n lastBatchSizeRef.current = rows.length - before;\n }\n\n rowCountBeforeFetchRef.current = null;\n // Deliberately keyed on the flag alone: the row count wanted is the one at\n // each edge of the fetch, not every value it passes through.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLoadingMore]);\n\n const loadMoreSkeletonCount = Math.min(\n // Until a fetch has been measured, the rows already loaded are the best\n // guess at what the next batch brings — that IS the first page.\n Math.max(lastBatchSizeRef.current || rows.length || skeletonRowCount, 1),\n MAX_LOAD_MORE_SKELETON_ROWS,\n );\n\n const [focusedRowIndex, setFocusedRowIndex] = useState(0);\n // Only used to suppress text selection during the gesture; the range itself\n // lives in a ref so growing it does not re-render on every cell crossed.\n const [isRangeDragging, setIsRangeDragging] = useState(false);\n\n // The button can come up outside the grid — over the footer, over another\n // component, off the window entirely — so the end of the gesture is watched\n // globally rather than on the cell the drag started in.\n useEffect(() => {\n if (!isRangeDragging) return;\n\n const end = () => {\n if (cellSelection) cellSelection.isDraggingRef.current = false;\n setIsRangeDragging(false);\n };\n\n window.addEventListener('pointerup', end);\n window.addEventListener('pointercancel', end);\n\n return () => {\n window.removeEventListener('pointerup', end);\n window.removeEventListener('pointercancel', end);\n };\n }, [isRangeDragging, cellSelection]);\n\n const moveRowFocus = useEvent((from: HTMLElement, delta: number) => {\n const current = from.closest('tr[data-element=\"Row\"]');\n const all = Array.from(\n scrollerRef.current?.querySelectorAll<HTMLTableRowElement>(\n 'tbody tr[data-element=\"Row\"]:not([data-placeholder])',\n ) ?? [],\n );\n\n if (!all.length) return false;\n\n const index = current ? all.indexOf(current as HTMLTableRowElement) : -1;\n const next = Math.min(\n Math.max((index === -1 ? focusedRowIndex : index) + delta, 0),\n all.length - 1,\n );\n\n setFocusedRowIndex(next);\n all[next]?.focus();\n\n return true;\n });\n\n /* ── infinite scroll ────────────────────────────────────────────────────\n * An `IntersectionObserver` on a sentinel row rather than a scroll handler:\n * `rootMargin` expresses \"prefetch this far before the end\" directly, it\n * costs nothing per scroll tick, and it works on both render paths — under\n * virtualization the trailing spacer holds the remaining height, so the\n * sentinel after it still marks the true end of the list.\n * ──────────────────────────────────────────────────────────────────────── */\n const sentinelRef = useRef<HTMLDivElement>(null);\n const onLoadMoreEvent = useEvent(() => onLoadMore?.());\n\n useEffect(() => {\n const sentinel = sentinelRef.current;\n\n // Re-armed whenever `isLoadingMore` flips, so a request in flight cannot be\n // fired again by the sentinel still sitting in view.\n if (!onLoadMore || !hasMore || isLoadingMore || !scrollerEl || !sentinel) {\n return;\n }\n\n // One screen ahead by default: the request goes out while the user still\n // has a viewport of rows left to read, so the batch is usually there before\n // they arrive. Read at arm time rather than tracked — a resize mid-scroll\n // leaves the margin slightly stale, which costs nothing.\n const margin =\n loadMoreMargin ?? Math.max(scrollerEl.clientHeight, MIN_LOAD_MORE_MARGIN);\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) onLoadMoreEvent();\n },\n { root: scrollerEl, rootMargin: `0px 0px ${margin}px 0px` },\n );\n\n observer.observe(sentinel);\n\n return () => observer.disconnect();\n }, [\n onLoadMore,\n hasMore,\n isLoadingMore,\n scrollerEl,\n loadMoreMargin,\n onLoadMoreEvent,\n rows.length,\n ]);\n\n /* ── row menu ───────────────────────────────────────────────────────────\n * One instance for the whole table rather than one per row: a table can hold\n * thousands of rows, and only ever one context menu is open.\n *\n * `targetRef` is deliberately left unattached, which keeps the hook's own\n * `contextmenu` listener unbound — it would open with fixed props, and the\n * items depend on which row was right-clicked. The handler below resolves the\n * row first and then opens with that row's items; with no target, the hook\n * positions from the event's viewport coordinates, which is what a\n * pointer-anchored menu wants anyway.\n * ──────────────────────────────────────────────────────────────────────── */\n const contextMenu = useContextMenu<HTMLDivElement, any>(Menu, {\n placement: 'bottom start',\n });\n\n const isMenuEnabled = rowMenu != null && rowContextMenu !== false;\n const hasMenuColumn = isMenuEnabled && rowContextMenu !== 'context-only';\n\n function resolveRowMenu(row: T, rowIndex: number, rowKey: Key) {\n if (!rowMenu) return null;\n\n return rowMenu(row, {\n row,\n rowKey,\n rowIndex,\n section: 'body',\n isSelected: selection?.isSelected(rowKey) ?? false,\n isFocused: false,\n isDropTarget: false,\n });\n }\n\n function menuActionHandler(row: T, rowKey: Key, closeAfter: boolean) {\n return (action: Key) => {\n onRowMenuAction?.(normalizeMenuAction(action), row, rowKey);\n\n // `useContextMenu` leaves its popover open after an action — the same\n // happens in `Tree`, so it is the hook's behaviour rather than this\n // table's. Closing here keeps the row menu correct meanwhile; drop this\n // once the hook closes on select itself.\n if (closeAfter) contextMenu.close();\n };\n }\n\n const openContextMenuFor = useEvent(\n (\n row: T,\n rowIndex: number,\n rowKey: Key,\n event: ReactMouseEvent | ReactKeyboardEvent,\n ) => {\n const items = resolveRowMenu(row, rowIndex, rowKey);\n\n // No items means no menu — falling through to the browser's own context\n // menu is more useful than opening an empty popover.\n if (isMenuEmpty(items)) return;\n\n event.preventDefault();\n contextMenu.open(\n { children: items, onAction: menuActionHandler(row, rowKey, true) },\n undefined,\n // Shift+F10 carries no coordinates; the hook then anchors on the\n // element that produced the event, which is the row.\n 'clientX' in event.nativeEvent\n ? (event.nativeEvent as MouseEvent)\n : undefined,\n );\n },\n );\n\n /** Resolves the row a pointer or keyboard event landed in. */\n function rowFromEvent(target: EventTarget | null) {\n const element = (target as HTMLElement | null)?.closest?.(\n 'tr[data-element=\"Row\"][data-key]',\n );\n\n if (!element) return null;\n\n const index = Number(element.getAttribute('data-row-index'));\n\n if (!Number.isInteger(index)) return null;\n\n const row = rows[index];\n\n return row === undefined ? null : { row, index };\n }\n\n const virtualItems = shouldVirtualize ? virtualizer.getVirtualItems() : [];\n const paddingTop = virtualItems.length ? virtualItems[0].start : 0;\n const paddingBottom = virtualItems.length\n ? virtualizer.getTotalSize() - virtualItems[virtualItems.length - 1].end\n : 0;\n\n const colGroup = (\n <colgroup>\n {columns.map((column) => (\n <col\n key={column.key}\n style={column.width != null ? { width: column.width } : undefined}\n />\n ))}\n </colgroup>\n );\n\n const headerRow = isHeaderHidden ? null : (\n <tr data-element=\"HeadRow\" role=\"row\" aria-rowindex={1}>\n {columns.map(renderHeaderCell)}\n </tr>\n );\n\n const tableProps = {\n 'data-element': 'Table',\n role: 'grid',\n 'aria-label': ariaLabel,\n 'aria-busy': isLoading || undefined,\n 'aria-rowcount':\n headerRowCount + pinnedTopCount + bodyRowCount + pinnedBottomCount,\n 'aria-colcount': columnCount,\n 'aria-multiselectable':\n selection?.selectionMode === 'multiple' ? true : undefined,\n } as const;\n\n let bodyContent: ReactNode;\n\n if (error != null) {\n bodyContent = renderStateRow(error);\n } else if (showSkeleton) {\n bodyContent = renderSkeletonRows();\n } else if (showBlank) {\n bodyContent = null;\n } else if (!hasRows) {\n bodyContent = renderStateRow(isFiltered ? noResultsLabel : emptyLabel);\n } else if (shouldVirtualize) {\n bodyContent = (\n <>\n {renderSpacerRow(paddingTop, 'top')}\n {virtualItems.map((v) =>\n withDropIndicators(rows[v.index], v.index, true),\n )}\n {renderSpacerRow(paddingBottom, 'bottom')}\n </>\n );\n } else {\n bodyContent = rows.map((row, index) => withDropIndicators(row, index));\n }\n\n // Before the first measure there are no columns to lay out yet — show the\n // generic table skeleton rather than an empty frame.\n //\n // Returned HERE, below every hook, not at the point in the render where the\n // condition is known. Returning early skipped sixteen hooks — the virtualizer,\n // the scrollability observer, the move animation, the context menu, two\n // `useState`s — so the first render with columns called more hooks than the\n // last one without them, and React threw \"Rendered more hooks than during the\n // previous render\". A consumer that mounts with `columns={[]}` while loading\n // and fills them in from a response is the ordinary case, not an exotic one.\n if (columnCount === 0 && isLoading) {\n return (\n <TableElement\n ref={rootRef}\n qa={qa || 'Table'}\n styles={mergedStyles}\n mods={{ size, shape, ...mods }}\n >\n {toolbar}\n <div data-element=\"Scroller\" ref={handleScrollerRef}>\n <Skeleton layout=\"table\" />\n </div>\n </TableElement>\n );\n }\n\n return (\n <TableElement\n ref={rootRef}\n qa={qa || 'Table'}\n styles={mergedStyles}\n mods={{\n size,\n shape,\n 'sticky-header': isHeaderSticky,\n 'column-dividers': hasColumnDividers,\n 'range-dragging': isRangeDragging,\n // The footer's top border is the closing edge, so the last row must not\n // draw one as well.\n 'has-footer': footer != null,\n 'scroll-x': scrollability.x,\n 'scroll-y': scrollability.y,\n stale: isStale,\n ...mods,\n }}\n >\n {toolbar}\n <div\n data-element=\"Scroller\"\n ref={handleScrollerRef}\n // Focusable only programmatically: a cell press moves focus here so the\n // range's shortcuts land, but the grid stays a single tab stop.\n tabIndex={cellSelection?.isEnabled ? -1 : undefined}\n // Escape is the standard way out of a selection, and it must work from\n // wherever focus happens to be inside the table.\n onKeyDown={(event) => {\n // Shift+F10 is the standard way to reach a context menu from the\n // keyboard, and the only way when there is no `⋮` trigger.\n if (event.key === 'F10' && event.shiftKey && isMenuEnabled) {\n const found = rowFromEvent(event.target);\n\n if (found) {\n event.stopPropagation();\n openContextMenuFor(\n found.row,\n found.index,\n getRowKey(found.row, found.index),\n event,\n );\n }\n\n return;\n }\n\n if (event.key === 'Enter' && onRowAction) {\n const found = rowFromEvent(event.target);\n\n // Enter on a control inside the cell belongs to that control.\n if (\n found &&\n !(event.target as HTMLElement).closest(\n 'a, button, input, select, textarea, [role=\"button\"]',\n )\n ) {\n onRowAction(found.row, getRowKey(found.row, found.index));\n }\n\n return;\n }\n\n if (\n isReorderable &&\n (event.key === 'ArrowDown' || event.key === 'ArrowUp')\n ) {\n // Not while a drag is in flight — the arrows then belong to React\n // Aria, which uses them to choose the drop position.\n if (dragState?.draggingKeys?.size) return;\n\n if (\n moveRowFocus(\n event.target as HTMLElement,\n event.key === 'ArrowDown' ? 1 : -1,\n )\n ) {\n event.preventDefault();\n }\n\n return;\n }\n\n if (event.key === 'Escape') {\n if (cellSelection?.range) {\n event.stopPropagation();\n cellSelection.clear();\n\n return;\n }\n\n if (selection?.isEnabled && selection.selectedCount > 0) {\n event.stopPropagation();\n selection.clearSelection();\n }\n }\n }}\n // `onCopy` rather than a ⌘/Ctrl+C keydown: it is the event the browser\n // already fires for the shortcut AND for Edit ▸ Copy, and writing\n // through `clipboardData` needs no permission prompt. Both `text/plain`\n // and `text/html` go on, so Excel and Sheets paste a grid rather than\n // one run of text.\n onCopy={(event) => {\n if (!cellSelection?.range) return;\n\n const matrix = cellSelection.getSelectionMatrix(\n (column, row, rowIndex) =>\n column.isStructural\n ? ''\n : getColumnText(column, row, rowIndex) ?? '',\n );\n\n if (!matrix.length) return;\n\n // Both formats from the same matrix. Building the HTML by re-parsing\n // the TSV tore any cell whose value contained a tab or a newline —\n // exactly the values the TSV had to quote in the first place.\n event.preventDefault();\n event.clipboardData.setData('text/plain', toTsv(matrix));\n event.clipboardData.setData('text/html', toClipboardHtml(matrix));\n\n // A copy that writes to the clipboard leaves nothing on screen to say\n // it worked — the range looks the same before and after. The count is\n // what confirms the right block went, which matters most when the\n // selection runs past the bottom of the viewport.\n toast.success({\n title: t('itemTable.copiedToClipboard', 'Copied to clipboard'),\n description: t('itemTable.copiedCells', '{{count}} cells copied', {\n count: cellSelection.cellCount,\n }),\n });\n }}\n >\n <table\n {...tableProps}\n style={\n layout.totalWidth != null ? { width: layout.totalWidth } : undefined\n }\n >\n {colGroup}\n {isHeaderHidden ? null : (\n <thead data-element=\"Head\">{headerRow}</thead>\n )}\n <tbody data-element=\"Body\" {...collectionProps} ref={handleBodyRef}>\n {pinnedTopRows?.map((row, index) =>\n renderPinnedRow(row, index, 'top'),\n )}\n {bodyContent}\n {pinnedBottomRows?.map((row, index) =>\n renderPinnedRow(row, index, 'bottom'),\n )}\n {/*\n Skeleton rows rather than a spinner: they keep the row grid, say\n \"more rows of this shape are coming\", and grow the scroll height\n smoothly instead of a block that appears and vanishes. It also\n matches what the first load already shows.\n\n Sized to the batch that is coming (see `loadMoreSkeletonCount`),\n not to a fixed few: the point is that the list keeps its length\n through the load, so the user can carry on scrolling into it and\n nothing lurches when the rows arrive.\n */}\n {isLoadingMore\n ? renderSkeletonRows(loadMoreSkeletonCount, 'load-more')\n : null}\n {onLoadMore && hasRows ? (\n <tr data-sentinel=\"\" aria-hidden=\"true\">\n <td\n colSpan={Math.max(columnCount, 1)}\n style={{ height: 1, padding: 0, border: 0 }}\n >\n {/*\n A plain block with real height, not the `<tr>` or `<td>`\n itself: an `IntersectionObserver` given a zero-area table\n part produced no entries at all — not even the initial one\n every observer is supposed to emit on `observe`.\n */}\n <div ref={sentinelRef} style={{ height: 1 }} />\n </td>\n </tr>\n ) : null}\n </tbody>\n </table>\n </div>\n {/*\n A refresh is shown by sweeping the table itself, not by parking a\n spinner over it — the rows stay readable, which is the whole point of\n keeping the previous result on screen. This is what announces it.\n\n Always mounted, with the TEXT appearing and disappearing: a live region\n announces changes to its CONTENT, so an empty node that merely carries\n an `aria-label` says nothing, and one that is inserted already-populated\n is unreliable across screen readers. The region has to be there first\n and then fill.\n */}\n <VisuallyHidden>\n <span role=\"status\">\n {isStale ? t('itemTable.refreshing', 'Refreshing') : ''}\n </span>\n </VisuallyHidden>\n {overlay}\n {contextMenu.rendered}\n {footer}\n </TableElement>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+PA,SAAS,gBAAgB,QAAoB;AAQ3C,QAAO,UAPM,OACV,KACE,QACC,OAAO,IAAI,KAAK,SAAS,OAAO,WAAW,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,OACrE,CACA,KAAK,GAAG,CAEW;;AAGxB,SAAS,WAAW,OAAe;AACjC,QAAO,MACJ,QAAQ,MAAM,QAAQ,CACtB,QAAQ,MAAM,OAAO,CACrB,QAAQ,MAAM,OAAO;;AAG1B,MAAM,YAAY;CAAE,KAAK;CAAa,MAAM;CAAc;;;;;;;;;;;;;;AAkG1D,MAAM,8BAA8B;;;;;AAMpC,MAAM,uBAAuB;AAE7B,MAAM,uBA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,eAAe,KAAK,KAAK,UACxB,gBAAgB,KAAK,OAAO,MAAM,CACnC;QACA;QACA,kBAAkB,KAAK,KAAK,UAC3B,gBAAgB,KAAK,OAAO,SAAS,CACtC;QAYA,gBACG,mBAAmB,uBAAuB,YAAY,GACtD;QACH,cAAc,UACb,oBAAC;SAAG,iBAAc;SAAG,eAAY;mBAC/B,oBAAC;UACC,SAAS,KAAK,IAAI,aAAa,EAAE;UACjC,OAAO;WAAE,QAAQ;WAAG,SAAS;WAAG,QAAQ;WAAG;oBAQ3C,oBAAC;WAAI,KAAK;WAAa,OAAO,EAAE,QAAQ,GAAG;YAAI;WAC5C;UACF,GACH;;QACE;;MACF;KACJ;GAYN,oBAAC,4BACC,oBAAC;IAAK,MAAK;cACR,UAAU,EAAE,wBAAwB,aAAa,GAAG;KAChD,GACQ;GAChB;GACA,YAAY;GACZ;;GACY"}
@@ -0,0 +1,5 @@
1
+
2
+ import { CubeTableAlign, CubeTableCellContext, CubeTableColumn, CubeTableColumnHeader, CubeTableHeaderContext, CubeTableRowContext, CubeTableRowSection, CubeTableSort, CubeTableSortDirection } from "./types.js";
3
+ import { CubeTableRowRenderProps } from "./TableView.js";
4
+ import "./styled.js";
5
+ import "./use-table-columns.js";
@@ -0,0 +1,40 @@
1
+ /** @license MIT | @cube-dev/ui-kit v0.157.1 | Cube Dev Team */
2
+ import { Children } from "react";
3
+
4
+ //#region src/components/data/TableBase/row-menu.ts
5
+ /**
6
+ * Reserved key for the `⋮` trigger column. Prefixed so it cannot collide with
7
+ * a real data key, and structural so the value pipeline, sorting and search all
8
+ * skip it.
9
+ */
10
+ const ROW_MENU_COLUMN_KEY = "__cube-row-menu__";
11
+ /** Wide enough for one `ItemAction`, with no content width to spare. */
12
+ const ROW_MENU_COLUMN_WIDTH = {
13
+ xsmall: 32,
14
+ small: 36,
15
+ medium: 44,
16
+ large: 48,
17
+ xlarge: 52
18
+ };
19
+ /**
20
+ * Whether a resolved `rowMenu` actually contains anything.
21
+ *
22
+ * A row whose resolver returns `null` — or an empty fragment — gets no trigger
23
+ * at all, rather than one that opens an empty popover.
24
+ */
25
+ function isMenuEmpty(menu) {
26
+ if (menu == null || menu === false) return true;
27
+ return Children.toArray(menu).length === 0;
28
+ }
29
+ /**
30
+ * Strips the `.$` prefix React adds to keys when children pass through
31
+ * `Children.toArray`, so the consumer sees the key it wrote on `Menu.Item`.
32
+ */
33
+ function normalizeMenuAction(action) {
34
+ const value = String(action);
35
+ return value.startsWith(".$") ? value.slice(2) : value;
36
+ }
37
+
38
+ //#endregion
39
+ export { ROW_MENU_COLUMN_KEY, ROW_MENU_COLUMN_WIDTH, isMenuEmpty, normalizeMenuAction };
40
+ //# sourceMappingURL=row-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-menu.js","names":[],"sources":["../../../../src/components/data/TableBase/row-menu.ts"],"sourcesContent":["import { Children } from 'react';\n\nimport type { ReactNode } from 'react';\n\n/**\n * Reserved key for the `⋮` trigger column. Prefixed so it cannot collide with\n * a real data key, and structural so the value pipeline, sorting and search all\n * skip it.\n */\nexport const ROW_MENU_COLUMN_KEY = '__cube-row-menu__';\n\n/** Wide enough for one `ItemAction`, with no content width to spare. */\nexport const ROW_MENU_COLUMN_WIDTH: Record<string, number> = {\n xsmall: 32,\n small: 36,\n medium: 44,\n large: 48,\n xlarge: 52,\n};\n\n/**\n * Whether a resolved `rowMenu` actually contains anything.\n *\n * A row whose resolver returns `null` — or an empty fragment — gets no trigger\n * at all, rather than one that opens an empty popover.\n */\nexport function isMenuEmpty(menu: ReactNode): boolean {\n if (menu == null || menu === false) return true;\n\n return Children.toArray(menu).length === 0;\n}\n\n/**\n * Strips the `.$` prefix React adds to keys when children pass through\n * `Children.toArray`, so the consumer sees the key it wrote on `Menu.Item`.\n */\nexport function normalizeMenuAction(action: unknown): string {\n const value = String(action);\n\n return value.startsWith('.$') ? value.slice(2) : value;\n}\n"],"mappings":";;;;;;;;;AASA,MAAa,sBAAsB;;AAGnC,MAAa,wBAAgD;CAC3D,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACT;;;;;;;AAQD,SAAgB,YAAY,MAA0B;AACpD,KAAI,QAAQ,QAAQ,SAAS,MAAO,QAAO;AAE3C,QAAO,SAAS,QAAQ,KAAK,CAAC,WAAW;;;;;;AAO3C,SAAgB,oBAAoB,QAAyB;CAC3D,MAAM,QAAQ,OAAO,OAAO;AAE5B,QAAO,MAAM,WAAW,KAAK,GAAG,MAAM,MAAM,EAAE,GAAG"}
@@ -0,0 +1,5 @@
1
+
2
+ import "../../content/Item/index.js";
3
+ import "../../../data/item-themes.js";
4
+ import "../../../index.js";
5
+ import { Styles } from "@tenphi/tasty";