@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.
- package/components/_helpers/anchor.js +1 -1
- package/components/_helpers/avatar-info.js +1 -1
- package/components/_helpers/icon-svg.js +1 -1
- package/components/_helpers/legacy-table.js +3 -0
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/theme.js +49 -37
- package/components/alert/alert.js +1 -1
- package/components/alert-service/alert-service.js +1 -1
- package/components/auth/auth-core.js +1 -1
- package/components/auth/auth.js +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/storage.js +1 -1
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +2 -2
- package/components/avatar/avatar-info.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/fallback-avatar.js +1 -1
- package/components/avatar-stack/avatar-stack.js +1 -1
- package/components/banner/banner.js +1 -1
- package/components/button/button.js +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard.js +1 -1
- package/components/collapse/collapse-content.js +5 -5
- package/components/collapse/collapse-control.js +5 -5
- package/components/collapse/collapse.js +4 -4
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.js +2 -2
- package/components/contenteditable/contenteditable.js +1 -1
- package/components/control-help/control-help.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/data-list.js +1 -1
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +1 -1
- package/components/data-list/item.d.ts +1 -1
- package/components/data-list/item.js +1 -1
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +2 -2
- package/components/data-list/title.js +1 -1
- package/components/date-picker/date-input.js +1 -1
- package/components/date-picker/date-picker.js +1 -2
- package/components/date-picker/date-popup.js +1 -2
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.js +1 -1
- package/components/date-picker/months.js +4 -5
- package/components/date-picker/use-intersection-observer.js +1 -1
- package/components/date-picker/use-scroll-behavior.js +45 -44
- package/components/date-picker/weekdays.js +1 -1
- package/components/date-picker/years.js +6 -7
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +3 -3
- package/components/dropdown/anchor.js +1 -1
- package/components/dropdown/dropdown.js +1 -1
- package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
- package/components/dropdown-menu/dropdown-menu.js +62 -57
- package/components/editable-heading/editable-heading.d.ts +1 -2
- package/components/editable-heading/editable-heading.js +13 -12
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.js +1 -1
- package/components/expand/collapsible-group.d.ts +5 -1
- package/components/expand/collapsible-group.js +15 -14
- package/components/footer/footer.js +1 -1
- package/components/global/create-stateful-context.js +11 -11
- package/components/global/intersection-observer-context.d.ts +2 -2
- package/components/global/intersection-observer-context.js +12 -12
- package/components/global/rerender-hoc.d.ts +4 -2
- package/components/global/rerender-hoc.js +10 -24
- package/components/{legacy-table/selection.d.ts → global/table-selection.d.ts} +14 -14
- package/components/{legacy-table/selection.js → global/table-selection.js} +3 -3
- package/components/global/theme.d.ts +4 -3
- package/components/global/theme.js +1 -1
- package/components/header/header-icon.js +1 -1
- package/components/header/header.js +1 -1
- package/components/header/links.js +1 -1
- package/components/header/logo.js +1 -1
- package/components/header/profile.js +1 -1
- package/components/header/services.js +1 -1
- package/components/header/smart-profile.js +1 -1
- package/components/header/smart-services.js +1 -1
- package/components/heading/heading.js +1 -1
- package/components/i18n/i18n-context.js +4 -4
- package/components/icon/icon-svg.js +1 -1
- package/components/icon/icon.js +1 -1
- package/components/icon/index.js +1 -1
- package/components/input/input.js +1 -1
- package/components/island/adaptive-island-hoc.js +3 -3
- package/components/island/content.d.ts +7 -2
- package/components/island/content.js +27 -18
- package/components/island/header.js +1 -1
- package/components/island/island.js +1 -1
- package/components/legacy-table/cell.js +1 -1
- package/components/legacy-table/header-cell.js +2 -2
- package/components/legacy-table/header.js +2 -2
- package/components/legacy-table/multitable.d.ts +1 -1
- package/components/legacy-table/row-with-focus-sensor.js +2 -2
- package/components/legacy-table/row.js +4 -4
- package/components/legacy-table/selection-adapter.d.ts +3 -3
- package/components/legacy-table/selection-shortcuts-hoc.d.ts +5 -5
- package/components/legacy-table/simple-table.d.ts +2 -2
- package/components/legacy-table/simple-table.js +4 -4
- package/components/legacy-table/smart-table.d.ts +5 -5
- package/components/legacy-table/smart-table.js +5 -5
- package/components/legacy-table/table.js +2 -2
- package/components/list/list-item.js +1 -1
- package/components/list/list-users-groups-source.js +1 -1
- package/components/list/list.js +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.js +2 -2
- package/components/message/message.js +1 -1
- package/components/pager/pager.js +1 -1
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.target.d.ts +3 -2
- package/components/popup/popup.target.js +32 -28
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/query-assist/query-assist-suggestions.js +1 -1
- package/components/query-assist/query-assist.d.ts +3 -1
- package/components/query-assist/query-assist.js +2 -2
- package/components/radio/radio-item.d.ts +3 -3
- package/components/radio/radio-item.js +32 -18
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +2 -2
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/chevron-button.js +1 -1
- package/components/select/select-filter.js +1 -1
- package/components/select/select-popup.js +1 -1
- package/components/select/select.d.ts +3 -1
- package/components/select/select.js +1 -1
- package/components/slider/slider.js +100 -96
- package/components/storage/storage-local.js +1 -1
- package/components/storage/storage.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +3 -3
- package/components/tab-trap/tab-trap.js +83 -80
- package/components/table/default-item-renderer.d.ts +20 -9
- package/components/table/default-item-renderer.js +83 -142
- package/components/table/table-component.d.ts +43 -16
- package/components/table/table-component.js +162 -188
- package/components/table/table-primitives.d.ts +28 -0
- package/components/table/{table-base.js → table-primitives.js} +110 -98
- package/components/table/table-row-focus.d.ts +4 -0
- package/components/table/table-row-focus.js +41 -0
- package/components/table/table-virtualize.d.ts +3 -3
- package/components/table/table-virtualize.js +111 -112
- package/components/table/table.d.ts +9 -24
- package/components/table/table.js +4 -3
- package/components/tabs/collapsible-more.js +1 -1
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.js +1 -1
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.d.ts +3 -1
- package/components/tags-input/tags-input.js +1 -1
- package/components/tags-list/tags-list.js +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.js +2 -2
- package/components/upload/upload.d.ts +4 -3
- package/components/upload/upload.js +7 -29
- package/components/user-agreement/service.js +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.js +1 -1
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.js +1 -1
- package/components/user-card/user-card.js +1 -1
- package/package.json +6 -6
- package/components/_helpers/table2.js +0 -3
- package/components/global/use-event-callback.d.ts +0 -1
- package/components/global/use-event-callback.js +0 -44
- 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
|
|
15
|
+
export interface TabTrapObject {
|
|
15
16
|
node: HTMLElement | null;
|
|
16
17
|
}
|
|
17
|
-
|
|
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
|
|
2
|
-
import {
|
|
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
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
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] = "
|
|
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] =
|
|
36
|
-
$[4] =
|
|
37
|
-
$[5] =
|
|
38
|
-
$[6] =
|
|
39
|
-
$[7] =
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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 ($[
|
|
65
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
63
66
|
t5 = () => ({
|
|
64
67
|
node: nodeRef.current
|
|
65
68
|
});
|
|
66
69
|
t6 = [];
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
70
|
+
$[9] = t5;
|
|
71
|
+
$[10] = t6;
|
|
69
72
|
} else {
|
|
70
|
-
t5 = $[
|
|
71
|
-
t6 = $[
|
|
73
|
+
t5 = $[9];
|
|
74
|
+
t6 = $[10];
|
|
72
75
|
}
|
|
73
76
|
useImperativeHandle(ref, t5, t6);
|
|
74
77
|
let t7;
|
|
75
|
-
if ($[
|
|
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
|
-
$[
|
|
89
|
+
$[11] = t7;
|
|
87
90
|
} else {
|
|
88
|
-
t7 = $[
|
|
91
|
+
t7 = $[11];
|
|
89
92
|
}
|
|
90
93
|
const restoreFocusIfUnmounted = t7;
|
|
91
94
|
let t8;
|
|
92
|
-
if ($[
|
|
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
|
-
$[
|
|
108
|
+
$[12] = t8;
|
|
106
109
|
} else {
|
|
107
|
-
t8 = $[
|
|
110
|
+
t8 = $[12];
|
|
108
111
|
}
|
|
109
112
|
const focusElement = t8;
|
|
110
113
|
let t9;
|
|
111
|
-
if ($[
|
|
114
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
115
|
t9 = () => focusElement(true);
|
|
113
|
-
$[
|
|
116
|
+
$[13] = t9;
|
|
114
117
|
} else {
|
|
115
|
-
t9 = $[
|
|
118
|
+
t9 = $[13];
|
|
116
119
|
}
|
|
117
120
|
const focusFirst = t9;
|
|
118
121
|
let t10;
|
|
119
|
-
if ($[
|
|
122
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
120
123
|
t10 = () => focusElement(false);
|
|
121
|
-
$[
|
|
124
|
+
$[14] = t10;
|
|
122
125
|
} else {
|
|
123
|
-
t10 = $[
|
|
126
|
+
t10 = $[14];
|
|
124
127
|
}
|
|
125
128
|
const focusLast = t10;
|
|
126
129
|
let t11;
|
|
127
130
|
let t12;
|
|
128
|
-
if ($[
|
|
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
|
-
$[
|
|
137
|
-
$[
|
|
139
|
+
$[15] = t11;
|
|
140
|
+
$[16] = t12;
|
|
138
141
|
} else {
|
|
139
|
-
t11 = $[
|
|
140
|
-
t12 = $[
|
|
142
|
+
t11 = $[15];
|
|
143
|
+
t12 = $[16];
|
|
141
144
|
}
|
|
142
145
|
useEffect(t11, t12);
|
|
143
146
|
let t13;
|
|
144
147
|
let t14;
|
|
145
|
-
if ($[
|
|
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
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
169
|
+
$[17] = autoFocusFirst;
|
|
170
|
+
$[18] = focusBackOnClose;
|
|
171
|
+
$[19] = trapDisabled;
|
|
172
|
+
$[20] = t13;
|
|
173
|
+
$[21] = t14;
|
|
171
174
|
} else {
|
|
172
|
-
t13 = $[
|
|
173
|
-
t14 = $[
|
|
175
|
+
t13 = $[20];
|
|
176
|
+
t14 = $[21];
|
|
174
177
|
}
|
|
175
178
|
useEffect(t13, t14);
|
|
176
179
|
let t15;
|
|
177
|
-
if ($[
|
|
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
|
-
$[
|
|
192
|
-
$[
|
|
194
|
+
$[22] = focusBackOnExit;
|
|
195
|
+
$[23] = t15;
|
|
193
196
|
} else {
|
|
194
|
-
t15 = $[
|
|
197
|
+
t15 = $[23];
|
|
195
198
|
}
|
|
196
199
|
const focusLastIfEnabled = t15;
|
|
197
200
|
let t16;
|
|
198
|
-
if ($[
|
|
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
|
-
$[
|
|
216
|
+
$[24] = t16;
|
|
214
217
|
} else {
|
|
215
|
-
t16 = $[
|
|
218
|
+
t16 = $[24];
|
|
216
219
|
}
|
|
217
220
|
const handleBlurIfWithoutFocus = t16;
|
|
218
221
|
let t17;
|
|
219
|
-
if ($[
|
|
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
|
-
$[
|
|
228
|
-
$[
|
|
230
|
+
$[25] = focusBackOnExit;
|
|
231
|
+
$[26] = t17;
|
|
229
232
|
} else {
|
|
230
|
-
t17 = $[
|
|
233
|
+
t17 = $[26];
|
|
231
234
|
}
|
|
232
235
|
const restoreFocusOrFocusFirst = t17;
|
|
233
236
|
if (trapDisabled) {
|
|
234
237
|
let t18;
|
|
235
|
-
if ($[
|
|
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
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
+
$[27] = children;
|
|
245
|
+
$[28] = restProps;
|
|
246
|
+
$[29] = t18;
|
|
244
247
|
} else {
|
|
245
|
-
t18 = $[
|
|
248
|
+
t18 = $[29];
|
|
246
249
|
}
|
|
247
250
|
return t18;
|
|
248
251
|
}
|
|
249
252
|
let t18;
|
|
250
|
-
if ($[
|
|
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
|
-
$[
|
|
260
|
-
$[
|
|
262
|
+
$[30] = focusLastIfEnabled;
|
|
263
|
+
$[31] = t18;
|
|
261
264
|
} else {
|
|
262
|
-
t18 = $[
|
|
265
|
+
t18 = $[31];
|
|
263
266
|
}
|
|
264
267
|
let t19;
|
|
265
|
-
if ($[
|
|
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
|
-
$[
|
|
272
|
-
$[
|
|
274
|
+
$[32] = restoreFocusOrFocusFirst;
|
|
275
|
+
$[33] = t19;
|
|
273
276
|
} else {
|
|
274
|
-
t19 = $[
|
|
277
|
+
t19 = $[33];
|
|
275
278
|
}
|
|
276
279
|
let t20;
|
|
277
|
-
if ($[
|
|
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
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
286
|
+
$[34] = children;
|
|
287
|
+
$[35] = restProps;
|
|
288
|
+
$[36] = t18;
|
|
289
|
+
$[37] = t19;
|
|
290
|
+
$[38] = t20;
|
|
288
291
|
} else {
|
|
289
|
-
t20 = $[
|
|
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
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
2
|
export interface DefaultItemRendererProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The index of the `data` item to render.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
index: number;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
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
|
-
|
|
16
|
+
keyboardFocusable?: boolean;
|
|
11
17
|
/**
|
|
12
|
-
* Changes the
|
|
13
|
-
* Note that `false`
|
|
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
|
|
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>({
|
|
36
|
+
export declare function DefaultItemRenderer<T>({ index, keyboardFocusable, clickable, selected, level, ref: userRef, className, ...restProps }: DefaultItemRendererProps & ComponentPropsWithRef<'tr'>): import("react").JSX.Element | null;
|