@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
@@ -2,6 +2,7 @@ import { type HTMLAttributes, type ReactNode } from 'react';
2
2
  import * as React from 'react';
3
3
  export declare const FOCUSABLE_ELEMENTS = "input, button, select, textarea, a[href], *[tabindex]:not([data-trap-button]):not([data-scrollable-container])";
4
4
  export interface TabTrapProps extends HTMLAttributes<HTMLElement> {
5
+ ref?: React.Ref<TabTrapObject>;
5
6
  children: ReactNode;
6
7
  trapDisabled?: boolean;
7
8
  autoFocusFirst?: boolean;
@@ -11,8 +12,7 @@ export interface TabTrapProps extends HTMLAttributes<HTMLElement> {
11
12
  /**
12
13
  * @name TabTrap
13
14
  */
14
- interface TabTrap {
15
+ export interface TabTrapObject {
15
16
  node: HTMLElement | null;
16
17
  }
17
- declare const TabTrap: React.ForwardRefExoticComponent<TabTrapProps & React.RefAttributes<TabTrap>>;
18
- export default TabTrap;
18
+ export default function TabTrap({ ref, children, trapDisabled, autoFocusFirst, focusBackOnClose, focusBackOnExit, ...restProps }: TabTrapProps): React.JSX.Element;
@@ -1,21 +1,21 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useRef, useImperativeHandle, useEffect } from 'react';
3
3
  import { isNodeInVisiblePartOfPage } from '../global/dom.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
6
6
  var styles = {"trapButton":"ring-tab-trap-trapButton"};
7
7
 
8
8
  const FOCUSABLE_ELEMENTS = 'input, button, select, textarea, a[href], *[tabindex]:not([data-trap-button]):not([data-scrollable-container])';
9
- // eslint-disable-next-line no-shadow
10
- const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
11
- const $ = c(38);
12
- if ($[0] !== "2100b1464fbf6825dd3f080feb9e20c095c3f9f9256eec8ae18adf474c19d1f2") {
13
- for (let $i = 0; $i < 38; $i += 1) {
9
+ function TabTrap(t0) {
10
+ const $ = c(39);
11
+ if ($[0] !== "daf3c9f73144edaae4842be22241426b0a063f37615637c8bca095939d2fdeaf") {
12
+ for (let $i = 0; $i < 39; $i += 1) {
14
13
  $[$i] = Symbol.for("react.memo_cache_sentinel");
15
14
  }
16
- $[0] = "2100b1464fbf6825dd3f080feb9e20c095c3f9f9256eec8ae18adf474c19d1f2";
15
+ $[0] = "daf3c9f73144edaae4842be22241426b0a063f37615637c8bca095939d2fdeaf";
17
16
  }
18
17
  let children;
18
+ let ref;
19
19
  let restProps;
20
20
  let t1;
21
21
  let t2;
@@ -23,6 +23,7 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
23
23
  let t4;
24
24
  if ($[1] !== t0) {
25
25
  ({
26
+ ref,
26
27
  children,
27
28
  trapDisabled: t1,
28
29
  autoFocusFirst: t2,
@@ -32,18 +33,20 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
32
33
  } = t0);
33
34
  $[1] = t0;
34
35
  $[2] = children;
35
- $[3] = restProps;
36
- $[4] = t1;
37
- $[5] = t2;
38
- $[6] = t3;
39
- $[7] = t4;
36
+ $[3] = ref;
37
+ $[4] = restProps;
38
+ $[5] = t1;
39
+ $[6] = t2;
40
+ $[7] = t3;
41
+ $[8] = t4;
40
42
  } else {
41
43
  children = $[2];
42
- restProps = $[3];
43
- t1 = $[4];
44
- t2 = $[5];
45
- t3 = $[6];
46
- t4 = $[7];
44
+ ref = $[3];
45
+ restProps = $[4];
46
+ t1 = $[5];
47
+ t2 = $[6];
48
+ t3 = $[7];
49
+ t4 = $[8];
47
50
  }
48
51
  const trapDisabled = t1 === undefined ? false : t1;
49
52
  const autoFocusFirst = t2 === undefined ? true : t2;
@@ -59,20 +62,20 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
59
62
  }
60
63
  let t5;
61
64
  let t6;
62
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
65
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
63
66
  t5 = () => ({
64
67
  node: nodeRef.current
65
68
  });
66
69
  t6 = [];
67
- $[8] = t5;
68
- $[9] = t6;
70
+ $[9] = t5;
71
+ $[10] = t6;
69
72
  } else {
70
- t5 = $[8];
71
- t6 = $[9];
73
+ t5 = $[9];
74
+ t6 = $[10];
72
75
  }
73
76
  useImperativeHandle(ref, t5, t6);
74
77
  let t7;
75
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
78
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
76
79
  t7 = function restoreFocusIfUnmounted(orElse) {
77
80
  const previousFocusedNode = previousFocusedNodeRef.current;
78
81
  if (previousFocusedNode instanceof HTMLElement && previousFocusedNode.focus && isNodeInVisiblePartOfPage(previousFocusedNode) && mountedRef.current === false) {
@@ -83,13 +86,13 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
83
86
  orElse?.();
84
87
  }
85
88
  };
86
- $[10] = t7;
89
+ $[11] = t7;
87
90
  } else {
88
- t7 = $[10];
91
+ t7 = $[11];
89
92
  }
90
93
  const restoreFocusIfUnmounted = t7;
91
94
  let t8;
92
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
95
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
93
96
  t8 = function focusElement(t9) {
94
97
  const first = t9 === undefined ? true : t9;
95
98
  const node = nodeRef.current;
@@ -102,30 +105,30 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
102
105
  toBeFocused.focus();
103
106
  }
104
107
  };
105
- $[11] = t8;
108
+ $[12] = t8;
106
109
  } else {
107
- t8 = $[11];
110
+ t8 = $[12];
108
111
  }
109
112
  const focusElement = t8;
110
113
  let t9;
111
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
114
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
112
115
  t9 = () => focusElement(true);
113
- $[12] = t9;
116
+ $[13] = t9;
114
117
  } else {
115
- t9 = $[12];
118
+ t9 = $[13];
116
119
  }
117
120
  const focusFirst = t9;
118
121
  let t10;
119
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
122
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
120
123
  t10 = () => focusElement(false);
121
- $[13] = t10;
124
+ $[14] = t10;
122
125
  } else {
123
- t10 = $[13];
126
+ t10 = $[14];
124
127
  }
125
128
  const focusLast = t10;
126
129
  let t11;
127
130
  let t12;
128
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
131
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
129
132
  t11 = () => {
130
133
  mountedRef.current = true;
131
134
  return () => {
@@ -133,16 +136,16 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
133
136
  };
134
137
  };
135
138
  t12 = [];
136
- $[14] = t11;
137
- $[15] = t12;
139
+ $[15] = t11;
140
+ $[16] = t12;
138
141
  } else {
139
- t11 = $[14];
140
- t12 = $[15];
142
+ t11 = $[15];
143
+ t12 = $[16];
141
144
  }
142
145
  useEffect(t11, t12);
143
146
  let t13;
144
147
  let t14;
145
- if ($[16] !== autoFocusFirst || $[17] !== focusBackOnClose || $[18] !== trapDisabled) {
148
+ if ($[17] !== autoFocusFirst || $[18] !== focusBackOnClose || $[19] !== trapDisabled) {
146
149
  t13 = () => {
147
150
  if (autoFocusFirst) {
148
151
  focusFirst();
@@ -163,18 +166,18 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
163
166
  };
164
167
  };
165
168
  t14 = [autoFocusFirst, trapDisabled, focusBackOnClose, focusFirst];
166
- $[16] = autoFocusFirst;
167
- $[17] = focusBackOnClose;
168
- $[18] = trapDisabled;
169
- $[19] = t13;
170
- $[20] = t14;
169
+ $[17] = autoFocusFirst;
170
+ $[18] = focusBackOnClose;
171
+ $[19] = trapDisabled;
172
+ $[20] = t13;
173
+ $[21] = t14;
171
174
  } else {
172
- t13 = $[19];
173
- t14 = $[20];
175
+ t13 = $[20];
176
+ t14 = $[21];
174
177
  }
175
178
  useEffect(t13, t14);
176
179
  let t15;
177
- if ($[21] !== focusBackOnExit) {
180
+ if ($[22] !== focusBackOnExit) {
178
181
  t15 = function focusLastIfEnabled(event) {
179
182
  if (trapWithoutFocusRef.current) {
180
183
  return;
@@ -188,14 +191,14 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
188
191
  focusLast();
189
192
  }
190
193
  };
191
- $[21] = focusBackOnExit;
192
- $[22] = t15;
194
+ $[22] = focusBackOnExit;
195
+ $[23] = t15;
193
196
  } else {
194
- t15 = $[22];
197
+ t15 = $[23];
195
198
  }
196
199
  const focusLastIfEnabled = t15;
197
200
  let t16;
198
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
201
+ if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
199
202
  t16 = function handleBlurIfWithoutFocus(event_0) {
200
203
  if (!trapWithoutFocusRef.current) {
201
204
  return;
@@ -210,13 +213,13 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
210
213
  }
211
214
  focusLast();
212
215
  };
213
- $[23] = t16;
216
+ $[24] = t16;
214
217
  } else {
215
- t16 = $[23];
218
+ t16 = $[24];
216
219
  }
217
220
  const handleBlurIfWithoutFocus = t16;
218
221
  let t17;
219
- if ($[24] !== focusBackOnExit) {
222
+ if ($[25] !== focusBackOnExit) {
220
223
  t17 = function restoreFocusOrFocusFirst() {
221
224
  if (focusBackOnExit) {
222
225
  restoreFocusIfUnmounted(focusFirst);
@@ -224,30 +227,30 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
224
227
  focusFirst();
225
228
  }
226
229
  };
227
- $[24] = focusBackOnExit;
228
- $[25] = t17;
230
+ $[25] = focusBackOnExit;
231
+ $[26] = t17;
229
232
  } else {
230
- t17 = $[25];
233
+ t17 = $[26];
231
234
  }
232
235
  const restoreFocusOrFocusFirst = t17;
233
236
  if (trapDisabled) {
234
237
  let t18;
235
- if ($[26] !== children || $[27] !== restProps) {
238
+ if ($[27] !== children || $[28] !== restProps) {
236
239
  t18 = /*#__PURE__*/jsx("div", {
237
240
  ref: nodeRef,
238
241
  ...restProps,
239
242
  children: children
240
243
  });
241
- $[26] = children;
242
- $[27] = restProps;
243
- $[28] = t18;
244
+ $[27] = children;
245
+ $[28] = restProps;
246
+ $[29] = t18;
244
247
  } else {
245
- t18 = $[28];
248
+ t18 = $[29];
246
249
  }
247
250
  return t18;
248
251
  }
249
252
  let t18;
250
- if ($[29] !== focusLastIfEnabled) {
253
+ if ($[30] !== focusLastIfEnabled) {
251
254
  t18 = /*#__PURE__*/jsx("div", {
252
255
  tabIndex: 0,
253
256
  ref: trapButtonNodeRef,
@@ -256,40 +259,40 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(t0, ref) {
256
259
  onBlur: handleBlurIfWithoutFocus,
257
260
  "data-trap-button": true
258
261
  });
259
- $[29] = focusLastIfEnabled;
260
- $[30] = t18;
262
+ $[30] = focusLastIfEnabled;
263
+ $[31] = t18;
261
264
  } else {
262
- t18 = $[30];
265
+ t18 = $[31];
263
266
  }
264
267
  let t19;
265
- if ($[31] !== restoreFocusOrFocusFirst) {
268
+ if ($[32] !== restoreFocusOrFocusFirst) {
266
269
  t19 = /*#__PURE__*/jsx("div", {
267
270
  tabIndex: 0,
268
271
  onFocus: restoreFocusOrFocusFirst,
269
272
  "data-trap-button": true
270
273
  });
271
- $[31] = restoreFocusOrFocusFirst;
272
- $[32] = t19;
274
+ $[32] = restoreFocusOrFocusFirst;
275
+ $[33] = t19;
273
276
  } else {
274
- t19 = $[32];
277
+ t19 = $[33];
275
278
  }
276
279
  let t20;
277
- if ($[33] !== children || $[34] !== restProps || $[35] !== t18 || $[36] !== t19) {
280
+ if ($[34] !== children || $[35] !== restProps || $[36] !== t18 || $[37] !== t19) {
278
281
  t20 = /*#__PURE__*/jsxs("div", {
279
282
  ref: nodeRef,
280
283
  ...restProps,
281
284
  children: [t18, children, t19]
282
285
  });
283
- $[33] = children;
284
- $[34] = restProps;
285
- $[35] = t18;
286
- $[36] = t19;
287
- $[37] = t20;
286
+ $[34] = children;
287
+ $[35] = restProps;
288
+ $[36] = t18;
289
+ $[37] = t19;
290
+ $[38] = t20;
288
291
  } else {
289
- t20 = $[37];
292
+ t20 = $[38];
290
293
  }
291
294
  return t20;
292
- });
295
+ }
293
296
  function _temp(item) {
294
297
  return item.tabIndex >= 0;
295
298
  }
@@ -1,25 +1,36 @@
1
- import { type ComponentPropsWithoutRef } from 'react';
1
+ import { type ComponentPropsWithRef } from 'react';
2
2
  export interface DefaultItemRendererProps {
3
3
  /**
4
- * Installed on the `<tr>` element
4
+ * The index of the `data` item to render.
5
5
  */
6
- ref?: React.RefObject<HTMLTableRowElement | null>;
6
+ index: number;
7
7
  /**
8
- * The index of the `data` item to render
8
+ * If true, the row will be focusable with up/down arrow keys.
9
+ * Focus is implemented using the
10
+ * ["roving tabindex"](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Guides/Keyboard-navigable_JavaScript_widgets#technique_1_roving_tabindex)
11
+ * technique, that is, only the focused row has `tabIndex={0}`.
12
+ *
13
+ * To focus the row on click or other user interaction, add e.g. `onClick()`
14
+ * and invoke `focusRow(e.currentTarget)` imported from `table-row-focus.ts`.
9
15
  */
10
- index: number;
16
+ keyboardFocusable?: boolean;
11
17
  /**
12
- * Changes the highlight on hover and applies the pointer cursor.
13
- * Note that `false` doesn't mean it cannot handle `onClick`.
18
+ * Changes the background on hover and applies the pointer cursor.
19
+ * Note that `false` does not mean the row cannot handle `onClick`.
14
20
  */
15
21
  clickable?: boolean;
22
+ /**
23
+ * If true, the row is highlighted as selected, that is, with the
24
+ * a different background color.
25
+ */
26
+ selected?: boolean;
16
27
  /**
17
28
  * A level of a nested item. Results in an indent for columns with `indent: true`.
18
- * 0, negative and not set mean no indent.
29
+ * 0, negative values, and an unset value mean no indent.
19
30
  */
20
31
  level?: number;
21
32
  }
22
33
  /**
23
34
  * @see TableProps.renderItem
24
35
  */
25
- export declare function DefaultItemRenderer<T>({ ref: userRef, index, clickable, level, className, onKeyDown, onBlur, ...restProps }: DefaultItemRendererProps & ComponentPropsWithoutRef<'tr'>): import("react").JSX.Element;
36
+ export declare function DefaultItemRenderer<T>({ index, keyboardFocusable, clickable, selected, level, ref: userRef, className, ...restProps }: DefaultItemRendererProps & ComponentPropsWithRef<'tr'>): import("react").JSX.Element | null;