@jetbrains/ring-ui-built 8.0.0-beta.2 → 8.0.0-beta.3

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 (174) hide show
  1. package/components/_helpers/anchor.js +1 -1
  2. package/components/_helpers/avatar-info.js +1 -1
  3. package/components/_helpers/icon-svg.js +1 -1
  4. package/components/_helpers/legacy-table.js +3 -0
  5. package/components/_helpers/tab-link.js +1 -1
  6. package/components/_helpers/theme.js +49 -37
  7. package/components/alert/alert.js +1 -1
  8. package/components/alert-service/alert-service.js +1 -1
  9. package/components/auth/auth-core.js +1 -1
  10. package/components/auth/auth.js +1 -1
  11. package/components/auth/down-notification.js +1 -1
  12. package/components/auth/iframe-flow.js +1 -1
  13. package/components/auth/storage.js +1 -1
  14. package/components/auth-dialog/auth-dialog.js +1 -1
  15. package/components/auth-dialog-service/auth-dialog-service.js +2 -2
  16. package/components/avatar/avatar-info.js +1 -1
  17. package/components/avatar/avatar.js +1 -1
  18. package/components/avatar/fallback-avatar.js +1 -1
  19. package/components/avatar-stack/avatar-stack.js +1 -1
  20. package/components/banner/banner.js +1 -1
  21. package/components/button/button.js +1 -1
  22. package/components/button-group/button-group.js +1 -1
  23. package/components/checkbox/checkbox.js +1 -1
  24. package/components/clipboard/clipboard.js +1 -1
  25. package/components/collapse/collapse-content.js +5 -5
  26. package/components/collapse/collapse-control.js +5 -5
  27. package/components/collapse/collapse.js +4 -4
  28. package/components/confirm/confirm.js +1 -1
  29. package/components/confirm-service/confirm-service.js +2 -2
  30. package/components/contenteditable/contenteditable.js +1 -1
  31. package/components/control-help/control-help.js +1 -1
  32. package/components/control-label/control-label.js +1 -1
  33. package/components/data-list/data-list.d.ts +1 -1
  34. package/components/data-list/data-list.js +1 -1
  35. package/components/data-list/data-list.mock.d.ts +1 -1
  36. package/components/data-list/data-list.mock.js +1 -1
  37. package/components/data-list/item.d.ts +1 -1
  38. package/components/data-list/item.js +1 -1
  39. package/components/data-list/selection.d.ts +1 -1
  40. package/components/data-list/selection.js +2 -2
  41. package/components/data-list/title.js +1 -1
  42. package/components/date-picker/date-input.js +1 -1
  43. package/components/date-picker/date-picker.js +1 -2
  44. package/components/date-picker/date-popup.js +1 -2
  45. package/components/date-picker/month-names.js +1 -1
  46. package/components/date-picker/month-slider.js +1 -1
  47. package/components/date-picker/month.js +1 -1
  48. package/components/date-picker/months.js +4 -5
  49. package/components/date-picker/use-intersection-observer.js +1 -1
  50. package/components/date-picker/use-scroll-behavior.js +45 -44
  51. package/components/date-picker/weekdays.js +1 -1
  52. package/components/date-picker/years.js +6 -7
  53. package/components/dialog/dialog.d.ts +2 -2
  54. package/components/dialog/dialog.js +3 -3
  55. package/components/dropdown/anchor.js +1 -1
  56. package/components/dropdown/dropdown.js +1 -1
  57. package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
  58. package/components/dropdown-menu/dropdown-menu.js +62 -57
  59. package/components/editable-heading/editable-heading.d.ts +1 -2
  60. package/components/editable-heading/editable-heading.js +13 -12
  61. package/components/error-bubble/error-bubble.js +1 -1
  62. package/components/error-message/error-message.js +1 -1
  63. package/components/expand/collapsible-group.d.ts +5 -1
  64. package/components/expand/collapsible-group.js +15 -14
  65. package/components/footer/footer.js +1 -1
  66. package/components/global/create-stateful-context.js +11 -11
  67. package/components/global/intersection-observer-context.d.ts +2 -2
  68. package/components/global/intersection-observer-context.js +12 -12
  69. package/components/global/rerender-hoc.d.ts +4 -2
  70. package/components/global/rerender-hoc.js +10 -24
  71. package/components/{legacy-table/selection.d.ts → global/table-selection.d.ts} +14 -14
  72. package/components/{legacy-table/selection.js → global/table-selection.js} +3 -3
  73. package/components/global/theme.d.ts +4 -3
  74. package/components/global/theme.js +1 -1
  75. package/components/header/header-icon.js +1 -1
  76. package/components/header/header.js +1 -1
  77. package/components/header/links.js +1 -1
  78. package/components/header/logo.js +1 -1
  79. package/components/header/profile.js +1 -1
  80. package/components/header/services.js +1 -1
  81. package/components/header/smart-profile.js +1 -1
  82. package/components/header/smart-services.js +1 -1
  83. package/components/heading/heading.js +1 -1
  84. package/components/i18n/i18n-context.js +4 -4
  85. package/components/icon/icon-svg.js +1 -1
  86. package/components/icon/icon.js +1 -1
  87. package/components/icon/index.js +1 -1
  88. package/components/input/input.js +1 -1
  89. package/components/island/adaptive-island-hoc.js +3 -3
  90. package/components/island/content.d.ts +7 -2
  91. package/components/island/content.js +27 -18
  92. package/components/island/header.js +1 -1
  93. package/components/island/island.js +1 -1
  94. package/components/legacy-table/cell.js +1 -1
  95. package/components/legacy-table/header-cell.js +2 -2
  96. package/components/legacy-table/header.js +2 -2
  97. package/components/legacy-table/multitable.d.ts +1 -1
  98. package/components/legacy-table/row-with-focus-sensor.js +2 -2
  99. package/components/legacy-table/row.js +4 -4
  100. package/components/legacy-table/selection-adapter.d.ts +3 -3
  101. package/components/legacy-table/selection-shortcuts-hoc.d.ts +5 -5
  102. package/components/legacy-table/simple-table.d.ts +2 -2
  103. package/components/legacy-table/simple-table.js +4 -4
  104. package/components/legacy-table/smart-table.d.ts +5 -5
  105. package/components/legacy-table/smart-table.js +5 -5
  106. package/components/legacy-table/table.js +2 -2
  107. package/components/list/list-item.js +1 -1
  108. package/components/list/list-users-groups-source.js +1 -1
  109. package/components/list/list.js +1 -1
  110. package/components/login-dialog/login-dialog.js +1 -1
  111. package/components/login-dialog/service.js +2 -2
  112. package/components/message/message.js +1 -1
  113. package/components/pager/pager.js +1 -1
  114. package/components/popup/popup.js +1 -1
  115. package/components/popup/popup.target.d.ts +3 -2
  116. package/components/popup/popup.target.js +32 -28
  117. package/components/popup-menu/popup-menu.js +1 -1
  118. package/components/query-assist/query-assist-suggestions.js +1 -1
  119. package/components/query-assist/query-assist.d.ts +3 -1
  120. package/components/query-assist/query-assist.js +2 -2
  121. package/components/radio/radio-item.d.ts +3 -3
  122. package/components/radio/radio-item.js +32 -18
  123. package/components/radio/radio.d.ts +2 -2
  124. package/components/radio/radio.js +2 -2
  125. package/components/scrollable-section/scrollable-section.js +1 -1
  126. package/components/select/chevron-button.js +1 -1
  127. package/components/select/select-filter.js +1 -1
  128. package/components/select/select-popup.js +1 -1
  129. package/components/select/select.d.ts +3 -1
  130. package/components/select/select.js +1 -1
  131. package/components/slider/slider.js +100 -96
  132. package/components/storage/storage-local.js +1 -1
  133. package/components/storage/storage.js +1 -1
  134. package/components/style.css +1 -1
  135. package/components/tab-trap/tab-trap.d.ts +3 -3
  136. package/components/tab-trap/tab-trap.js +83 -80
  137. package/components/table/default-item-renderer.d.ts +20 -9
  138. package/components/table/default-item-renderer.js +83 -142
  139. package/components/table/table-component.d.ts +43 -16
  140. package/components/table/table-component.js +162 -188
  141. package/components/table/table-primitives.d.ts +28 -0
  142. package/components/table/{table-base.js → table-primitives.js} +110 -98
  143. package/components/table/table-row-focus.d.ts +4 -0
  144. package/components/table/table-row-focus.js +41 -0
  145. package/components/table/table-virtualize.d.ts +3 -3
  146. package/components/table/table-virtualize.js +111 -112
  147. package/components/table/table.d.ts +9 -24
  148. package/components/table/table.js +4 -3
  149. package/components/tabs/collapsible-more.js +1 -1
  150. package/components/tabs/collapsible-tab.js +1 -1
  151. package/components/tabs/collapsible-tabs.js +1 -1
  152. package/components/tabs/dumb-tabs.js +1 -1
  153. package/components/tabs/smart-tabs.js +1 -1
  154. package/components/tabs/tab-link.js +1 -1
  155. package/components/tabs/tabs.js +1 -1
  156. package/components/tag/tag.js +1 -1
  157. package/components/tags-input/tags-input.d.ts +3 -1
  158. package/components/tags-input/tags-input.js +1 -1
  159. package/components/tags-list/tags-list.js +1 -1
  160. package/components/toggle/toggle.js +1 -1
  161. package/components/tooltip/tooltip.js +2 -2
  162. package/components/upload/upload.d.ts +4 -3
  163. package/components/upload/upload.js +7 -29
  164. package/components/user-agreement/service.js +2 -2
  165. package/components/user-agreement/user-agreement.js +1 -1
  166. package/components/user-card/card.js +1 -1
  167. package/components/user-card/smart-user-card-tooltip.js +1 -1
  168. package/components/user-card/tooltip.js +1 -1
  169. package/components/user-card/user-card.js +1 -1
  170. package/package.json +6 -6
  171. package/components/_helpers/table2.js +0 -3
  172. package/components/global/use-event-callback.d.ts +0 -1
  173. package/components/global/use-event-callback.js +0 -44
  174. package/components/table/table-base.d.ts +0 -24
@@ -1,9 +1,10 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { useRef, useContext, useEffect } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useRef, use } from 'react';
3
3
  import classNames from 'classnames';
4
+ import { mergeRefs } from 'react-merge-refs';
4
5
  import { CollapseItemIntoSpacerContext, TablePropsContext } from './table-const.js';
5
6
  import { useIsIntersectingListener } from '../global/intersection-observer-context.js';
6
- import { TableRow, TableCell } from './table-base.js';
7
+ import { TableRow, TableCell } from './table-primitives.js';
7
8
  import { s as styles } from '../_helpers/table.js';
8
9
  import { jsx } from 'react/jsx-runtime';
9
10
  import '@jetbrains/icons/unsorted-12px';
@@ -15,162 +16,107 @@ import 'util-deprecate';
15
16
  import '../icon/icon.constants.js';
16
17
  import '../_helpers/icon-svg.js';
17
18
  import '../global/memoize.js';
19
+ import './table-row-focus.js';
18
20
 
19
21
  const INDENT_SIZE = 24;
20
22
  /**
21
23
  * @see TableProps.renderItem
22
24
  */
23
25
  function DefaultItemRenderer(t0) {
24
- var _userRef;
25
- const $ = c(51);
26
- if ($[0] !== "68402cdde9f06be4c8d26ab88d5718c4da4a28557eb40dcae73e15c87a598408") {
27
- for (let $i = 0; $i < 51; $i += 1) {
26
+ const $ = c(35);
27
+ if ($[0] !== "550d56d2b4709142d4ace07b800bfd11367b60c980b981f1e1be21c6b691222c") {
28
+ for (let $i = 0; $i < 35; $i += 1) {
28
29
  $[$i] = Symbol.for("react.memo_cache_sentinel");
29
30
  }
30
- $[0] = "68402cdde9f06be4c8d26ab88d5718c4da4a28557eb40dcae73e15c87a598408";
31
+ $[0] = "550d56d2b4709142d4ace07b800bfd11367b60c980b981f1e1be21c6b691222c";
31
32
  }
32
33
  let className;
33
34
  let clickable;
34
35
  let index;
36
+ let keyboardFocusable;
35
37
  let level;
36
- let onBlur;
37
- let onKeyDown;
38
38
  let restProps;
39
+ let selected;
39
40
  let userRef;
40
41
  if ($[1] !== t0) {
41
42
  ({
42
- ref: userRef,
43
43
  index,
44
+ keyboardFocusable,
44
45
  clickable,
46
+ selected,
45
47
  level,
48
+ ref: userRef,
46
49
  className,
47
- onKeyDown,
48
- onBlur,
49
50
  ...restProps
50
51
  } = t0);
51
52
  $[1] = t0;
52
53
  $[2] = className;
53
54
  $[3] = clickable;
54
55
  $[4] = index;
55
- $[5] = level;
56
- $[6] = onBlur;
57
- $[7] = onKeyDown;
58
- $[8] = restProps;
56
+ $[5] = keyboardFocusable;
57
+ $[6] = level;
58
+ $[7] = restProps;
59
+ $[8] = selected;
59
60
  $[9] = userRef;
60
61
  } else {
61
62
  className = $[2];
62
63
  clickable = $[3];
63
64
  index = $[4];
64
- level = $[5];
65
- onBlur = $[6];
66
- onKeyDown = $[7];
67
- restProps = $[8];
65
+ keyboardFocusable = $[5];
66
+ level = $[6];
67
+ restProps = $[7];
68
+ selected = $[8];
68
69
  userRef = $[9];
69
70
  }
70
- const selfRef = useRef(null);
71
- const ref = (_userRef = userRef) !== null && _userRef !== void 0 ? _userRef : selfRef;
72
- const collapseItemIntoSpacer = useContext(CollapseItemIntoSpacerContext);
71
+ const localRef = useRef(null);
72
+ const collapseItemIntoSpacer = use(CollapseItemIntoSpacerContext);
73
73
  let t1;
74
- if ($[10] !== collapseItemIntoSpacer || $[11] !== ref) {
74
+ if ($[10] !== collapseItemIntoSpacer) {
75
75
  t1 = isIntersecting => {
76
- if (ref.current && !isIntersecting) {
77
- collapseItemIntoSpacer(ref.current.getBoundingClientRect().height);
76
+ if (localRef.current && !isIntersecting) {
77
+ collapseItemIntoSpacer(localRef.current.getBoundingClientRect().height);
78
78
  }
79
79
  };
80
80
  $[10] = collapseItemIntoSpacer;
81
- $[11] = ref;
82
- $[12] = t1;
81
+ $[11] = t1;
83
82
  } else {
84
- t1 = $[12];
83
+ t1 = $[11];
84
+ }
85
+ useIsIntersectingListener(localRef, t1);
86
+ const tableProps = use(TablePropsContext);
87
+ if (!tableProps) {
88
+ return null;
85
89
  }
86
- useIsIntersectingListener(ref, t1);
87
90
  const {
88
91
  data,
89
- columns,
90
- selection,
91
- isItemKeyboardFocusable,
92
- onItemFocus
93
- } = useContext(TablePropsContext);
92
+ columns
93
+ } = tableProps;
94
94
  const item = data[index];
95
- const selected = selection?.isSelected(item);
96
95
  let t2;
97
- if ($[13] !== data || $[14] !== index || $[15] !== isItemKeyboardFocusable || $[16] !== onItemFocus || $[17] !== onKeyDown) {
98
- t2 = function handleKeyDown(e) {
99
- onKeyDown?.(e);
100
- if (!e.defaultPrevented && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
101
- const step = e.key === "ArrowUp" ? -1 : 1;
102
- for (let i = index + step; 0 <= i && i < data.length; i = i + step, i) {
103
- if (isItemKeyboardFocusable?.(data[i], i, data)) {
104
- onItemFocus?.(data[i], i, data);
105
- break;
106
- }
107
- }
108
- }
109
- };
110
- $[13] = data;
111
- $[14] = index;
112
- $[15] = isItemKeyboardFocusable;
113
- $[16] = onItemFocus;
114
- $[17] = onKeyDown;
115
- $[18] = t2;
116
- } else {
117
- t2 = $[18];
118
- }
119
- const handleKeyDown = t2;
120
- let t3;
121
- if ($[19] !== item || $[20] !== selection) {
122
- t3 = selection?.isFocused(item);
123
- $[19] = item;
124
- $[20] = selection;
125
- $[21] = t3;
96
+ if ($[12] !== userRef) {
97
+ t2 = mergeRefs([userRef, localRef]);
98
+ $[12] = userRef;
99
+ $[13] = t2;
126
100
  } else {
127
- t3 = $[21];
101
+ t2 = $[13];
128
102
  }
129
- const focused = t3;
130
- let t4;
103
+ const t3 = clickable && styles.clickableRow;
104
+ const t4 = selected && styles.selectedRow;
131
105
  let t5;
132
- if ($[22] !== focused || $[23] !== ref) {
133
- t4 = () => {
134
- if (focused) {
135
- ref.current?.focus();
136
- }
137
- };
138
- t5 = [focused, ref];
139
- $[22] = focused;
140
- $[23] = ref;
141
- $[24] = t4;
142
- $[25] = t5;
106
+ if ($[14] !== className || $[15] !== t3 || $[16] !== t4) {
107
+ t5 = classNames(className, t3, t4);
108
+ $[14] = className;
109
+ $[15] = t3;
110
+ $[16] = t4;
111
+ $[17] = t5;
143
112
  } else {
144
- t4 = $[24];
145
- t5 = $[25];
113
+ t5 = $[17];
146
114
  }
147
- useEffect(t4, t5);
148
115
  let t6;
149
- if ($[26] !== data || $[27] !== focused || $[28] !== onBlur || $[29] !== onItemFocus) {
150
- t6 = function handleBlur(e_0) {
151
- onBlur?.(e_0);
152
- if (!e_0.defaultPrevented && focused) {
153
- onItemFocus?.(null, -1, data);
154
- }
155
- };
156
- $[26] = data;
157
- $[27] = focused;
158
- $[28] = onBlur;
159
- $[29] = onItemFocus;
160
- $[30] = t6;
161
- } else {
162
- t6 = $[30];
163
- }
164
- const handleBlur = t6;
165
- const T0 = TableRow;
166
- const t7 = classNames(className, clickable && styles.clickableRow, selected && styles.selectedRow);
167
- const t8 = focused ? 0 : undefined;
168
- const t9 = focused ? handleBlur : undefined;
169
- let t10;
170
- if ($[31] !== columns || $[32] !== data || $[33] !== index || $[34] !== item || $[35] !== level) {
171
- let t11;
172
- if ($[37] !== data || $[38] !== index || $[39] !== item || $[40] !== level) {
173
- t11 = (column, columnIndex) => {
116
+ if ($[18] !== columns || $[19] !== data || $[20] !== index || $[21] !== item || $[22] !== level) {
117
+ let t7;
118
+ if ($[24] !== data || $[25] !== index || $[26] !== item || $[27] !== level) {
119
+ t7 = (column, columnIndex) => {
174
120
  var _column$renderCell;
175
121
  return /*#__PURE__*/jsx(TableCell, {
176
122
  className: column.tdClassName?.(item, index, data),
@@ -180,48 +126,43 @@ function DefaultItemRenderer(t0) {
180
126
  children: (_column$renderCell = column.renderCell?.(item, index, data)) !== null && _column$renderCell !== void 0 ? _column$renderCell : getDefaultCellValue(item, columnIndex)
181
127
  }, column.key);
182
128
  };
183
- $[37] = data;
184
- $[38] = index;
185
- $[39] = item;
186
- $[40] = level;
187
- $[41] = t11;
129
+ $[24] = data;
130
+ $[25] = index;
131
+ $[26] = item;
132
+ $[27] = level;
133
+ $[28] = t7;
188
134
  } else {
189
- t11 = $[41];
135
+ t7 = $[28];
190
136
  }
191
- t10 = columns.map(t11);
192
- $[31] = columns;
193
- $[32] = data;
194
- $[33] = index;
195
- $[34] = item;
196
- $[35] = level;
197
- $[36] = t10;
137
+ t6 = columns.map(t7);
138
+ $[18] = columns;
139
+ $[19] = data;
140
+ $[20] = index;
141
+ $[21] = item;
142
+ $[22] = level;
143
+ $[23] = t6;
198
144
  } else {
199
- t10 = $[36];
145
+ t6 = $[23];
200
146
  }
201
- let t11;
202
- if ($[42] !== T0 || $[43] !== handleKeyDown || $[44] !== ref || $[45] !== restProps || $[46] !== t10 || $[47] !== t7 || $[48] !== t8 || $[49] !== t9) {
203
- t11 = /*#__PURE__*/jsx(T0, {
204
- ref: ref,
205
- className: t7,
206
- onKeyDown: handleKeyDown,
207
- tabIndex: t8,
208
- onBlur: t9,
147
+ let t7;
148
+ if ($[29] !== keyboardFocusable || $[30] !== restProps || $[31] !== t2 || $[32] !== t5 || $[33] !== t6) {
149
+ t7 = /*#__PURE__*/jsx(TableRow, {
150
+ ref: t2,
151
+ keyboardFocusable: keyboardFocusable,
152
+ className: t5,
209
153
  ...restProps,
210
- children: t10
154
+ children: t6
211
155
  });
212
- $[42] = T0;
213
- $[43] = handleKeyDown;
214
- $[44] = ref;
215
- $[45] = restProps;
216
- $[46] = t10;
217
- $[47] = t7;
218
- $[48] = t8;
219
- $[49] = t9;
220
- $[50] = t11;
156
+ $[29] = keyboardFocusable;
157
+ $[30] = restProps;
158
+ $[31] = t2;
159
+ $[32] = t5;
160
+ $[33] = t6;
161
+ $[34] = t7;
221
162
  } else {
222
- t11 = $[50];
163
+ t7 = $[34];
223
164
  }
224
- return t11;
165
+ return t7;
225
166
  }
226
167
  function getDefaultCellValue(item, columnIndex) {
227
168
  if (Array.isArray(item)) {
@@ -1,44 +1,71 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
1
+ import { type ComponentPropsWithRef } from 'react';
2
2
  import type { TableProps } from './table';
3
3
  /**
4
4
  * The new Table component. Use it instead of tables in the `legacy-table` folder.
5
5
  *
6
- * Minimal usage requires the following props:
6
+ * For every prop and component referenced here, see the corresponding docs
7
+ * for detailed behavior.
8
+ *
9
+ * ## Minimal usage
10
+ *
11
+ * You need the following props:
7
12
  * - `data`
8
13
  * - `getKey`
9
14
  * - `columns`
10
15
  * - `key`
11
- * - `renderCell` (not required, but usually needed)
16
+ * - `name` (not required but needed in most cases)
17
+ * - `renderCell` (not required but needed in most cases)
12
18
  *
13
19
  * ## Selection
14
20
  *
15
- * Following three props support the selection:
21
+ * Selection is handled on item level via `renderItem` (often with
22
+ * `DefaultItemRenderer`) and its props:
23
+ *
24
+ * - `clickable`
25
+ * - `selected`
26
+ * - `onClick` or `onPointerUp`, etc.
16
27
  *
17
- * - `selection`
18
- * - `isItemClickable`
19
- * - `DefaultItemRenderer.onClick`
28
+ * You may use the TableSelection from `global/table-selection.ts` for the selection control:
20
29
  *
21
- * Only `selection` is required: you can display and modify selection your way, e.g., via
22
- * checkboxes in cells.
30
+ * - `selected={tableSelection.isSelected(item)}`
31
+ * - `onClick={() => setTableSelection(tableSelection.toggle(item))}`
32
+ *
33
+ * See the stories for examples with this utility.
34
+ *
35
+ * Additionally, for accessibility, you will likely need a cell with a checkbox
36
+ * to toggle item selection.
23
37
  *
24
38
  * ## Sorting
39
+ *
25
40
  * You need the following to support sorting:
26
41
  *
27
42
  * - Include `<SortButton />` in a column header
28
- * - Set initial `Column.sortOrder` to `none`, `ascending`.
29
- * Do not leave `undefined` for the accessibility reasons.
43
+ * - Set initial `Column.sortOrder` to `none`. Do not leave `undefined`
44
+ * for accessibility reasons.
30
45
  * - Handle `TableProps.onSort` callback in the client code. It is expected
31
- * to update `columns`, by setting the new `sortOrder` value for
32
- * the corresponding column, and updating the data accordingly.
46
+ * to update `columns` by setting the new `sortOrder` value for
47
+ * the corresponding column, and updating the data accordingly.
48
+ *
49
+ * ## Focus
50
+ *
51
+ * The table supports the ["roving tabindex"](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Guides/Keyboard-navigable_JavaScript_widgets#technique_1_roving_tabindex)
52
+ * technique to focus rows with the up/down arrow keys and, possibly, with the pointer.
53
+ * To support it, use the following props of the `DefaultItemRenderer`:
54
+ *
55
+ * - `keyboardFocusable`
56
+ * - Possibly `onClick` invoking `focusRow(e.currentTarget)`
57
+ *
58
+ * In your custom row renderer, use `TableRow`, which also has the `keyboardFocusable` prop.
33
59
  *
34
60
  * ## Deleting columns
61
+ *
35
62
  * You need the following to support deleting columns:
36
63
  *
37
64
  * - Make sure the `column` has a proper `name` or `key` prop, which will be
38
- * automatically included in the aria-label of `<DeleteColumnButton />`.
65
+ * automatically included in the aria-label of `<DeleteColumnButton />`.
39
66
  * - Include `<DeleteColumnButton />` in a column header
40
67
  * - Handle `TableProps.onColumnDelete` callback in the client code. It is expected
41
- * to update `columns` by removing the corresponding column.
68
+ * to update `columns` by removing the corresponding column.
42
69
  *
43
70
  * ## Row virtualization
44
71
  *
@@ -50,4 +77,4 @@ import type { TableProps } from './table';
50
77
  * the default height (e.g. multiline or custom content)
51
78
  * - Fine-tuning props: `lookaheadPx`, `retentionMarginPx`, `minScrollAndResizeDeltaPx`
52
79
  */
53
- export default function Table<T>(props: TableProps<T> & ComponentPropsWithoutRef<'table'>): import("react").JSX.Element;
80
+ export default function Table<T>(props: TableProps<T> & ComponentPropsWithRef<'table'>): import("react").JSX.Element;