@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
|
@@ -24,7 +24,7 @@ import 'util-deprecate';
|
|
|
24
24
|
import '../icon/icon.js';
|
|
25
25
|
import '../icon/icon.constants.js';
|
|
26
26
|
import '../_helpers/icon-svg.js';
|
|
27
|
-
import 'react
|
|
27
|
+
import 'react/compiler-runtime';
|
|
28
28
|
import '../link/clickable-link.js';
|
|
29
29
|
import '../global/controls-height.js';
|
|
30
30
|
import '../global/configuration.js';
|
|
@@ -53,7 +53,6 @@ import 'sniffr';
|
|
|
53
53
|
import '../global/intersection-observer-context.js';
|
|
54
54
|
import './scroll-arith.js';
|
|
55
55
|
import './use-scroll-behavior.js';
|
|
56
|
-
import '../global/use-event-callback.js';
|
|
57
56
|
import '../global/schedule-raf.js';
|
|
58
57
|
import 'date-fns/addYears';
|
|
59
58
|
import 'date-fns/getYear';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { addMonths } from 'date-fns/addMonths';
|
|
3
3
|
import { startOfMonth } from 'date-fns/startOfMonth';
|
|
4
4
|
import Month, { getMonthHeight } from './month.js';
|
|
@@ -26,7 +26,6 @@ import 'date-fns/startOfDay';
|
|
|
26
26
|
import 'date-fns/add';
|
|
27
27
|
import '../global/sniffer.js';
|
|
28
28
|
import 'sniffr';
|
|
29
|
-
import '../global/use-event-callback.js';
|
|
30
29
|
|
|
31
30
|
function getMonthHeightWithMargin(date, locale) {
|
|
32
31
|
return units.unit * 2 + getMonthHeight(date, locale);
|
|
@@ -49,11 +48,11 @@ const scheduleScroll = scheduleRAF();
|
|
|
49
48
|
const intersectionObserverRootMargin = units.cellSize * 2;
|
|
50
49
|
function Months(props) {
|
|
51
50
|
const $ = c(12);
|
|
52
|
-
if ($[0] !== "
|
|
51
|
+
if ($[0] !== "b514d0ab3a898922fd1a8992e74c2054d3bf131f57e16e7ad928f67f5c608db9") {
|
|
53
52
|
for (let $i = 0; $i < 12; $i += 1) {
|
|
54
53
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
55
54
|
}
|
|
56
|
-
$[0] = "
|
|
55
|
+
$[0] = "b514d0ab3a898922fd1a8992e74c2054d3bf131f57e16e7ad928f67f5c608db9";
|
|
57
56
|
}
|
|
58
57
|
const {
|
|
59
58
|
scrollDate,
|
|
@@ -102,7 +101,7 @@ function Months(props) {
|
|
|
102
101
|
}
|
|
103
102
|
let t3;
|
|
104
103
|
if ($[9] !== t0 || $[10] !== t2) {
|
|
105
|
-
t3 = /*#__PURE__*/jsx(IntersectionObserverContext
|
|
104
|
+
t3 = /*#__PURE__*/jsx(IntersectionObserverContext, {
|
|
106
105
|
value: t0,
|
|
107
106
|
children: t2
|
|
108
107
|
});
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import { useState, useRef, useEffect, useLayoutEffect } from 'react';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useState, useRef, useEffectEvent, useEffect, useLayoutEffect } from 'react';
|
|
3
3
|
import units, { isSafariOnIPhone, scrollerReRenderDelayIPhone } from './consts.js';
|
|
4
|
-
import useEventCallback from '../global/use-event-callback.js';
|
|
5
4
|
import 'date-fns/add';
|
|
6
5
|
import 'date-fns';
|
|
7
6
|
import '../global/sniffer.js';
|
|
8
7
|
import 'sniffr';
|
|
9
8
|
|
|
10
9
|
function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDateSource, arith, scheduleScroll) {
|
|
11
|
-
const $ = c(
|
|
12
|
-
if ($[0] !== "
|
|
13
|
-
for (let $i = 0; $i <
|
|
10
|
+
const $ = c(38);
|
|
11
|
+
if ($[0] !== "a3a62d0eaf68edc8b0ddbd21981a78487012d4433139cd433e355b8f989ab2de") {
|
|
12
|
+
for (let $i = 0; $i < 38; $i += 1) {
|
|
14
13
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
15
14
|
}
|
|
16
|
-
$[0] = "
|
|
15
|
+
$[0] = "a3a62d0eaf68edc8b0ddbd21981a78487012d4433139cd433e355b8f989ab2de";
|
|
17
16
|
}
|
|
18
17
|
let t0;
|
|
19
18
|
if ($[1] !== arith || $[2] !== scrollDate.date) {
|
|
@@ -60,7 +59,7 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
|
|
|
60
59
|
} else {
|
|
61
60
|
t2 = $[12];
|
|
62
61
|
}
|
|
63
|
-
const syncSelfState =
|
|
62
|
+
const syncSelfState = useEffectEvent(t2);
|
|
64
63
|
const didMountRef = useRef(false);
|
|
65
64
|
let t3;
|
|
66
65
|
if ($[13] !== scrollDate.date || $[14] !== scrollDate.source || $[15] !== selfScrollDateSource || $[16] !== syncSelfState) {
|
|
@@ -87,19 +86,18 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
|
|
|
87
86
|
t3 = $[17];
|
|
88
87
|
}
|
|
89
88
|
let t4;
|
|
90
|
-
if ($[18] !== scrollDate || $[19] !== selfScrollDateSource
|
|
91
|
-
t4 = [scrollDate, selfScrollDateSource
|
|
89
|
+
if ($[18] !== scrollDate || $[19] !== selfScrollDateSource) {
|
|
90
|
+
t4 = [scrollDate, selfScrollDateSource];
|
|
92
91
|
$[18] = scrollDate;
|
|
93
92
|
$[19] = selfScrollDateSource;
|
|
94
|
-
$[20] =
|
|
95
|
-
$[21] = t4;
|
|
93
|
+
$[20] = t4;
|
|
96
94
|
} else {
|
|
97
|
-
t4 = $[
|
|
95
|
+
t4 = $[20];
|
|
98
96
|
}
|
|
99
97
|
useEffect(t3, t4);
|
|
100
98
|
const ignoreNextScrollEventRef = useRef(true);
|
|
101
99
|
let t5;
|
|
102
|
-
if ($[
|
|
100
|
+
if ($[21] !== scrollTop) {
|
|
103
101
|
t5 = function setContainerScrollFromState() {
|
|
104
102
|
const container_0 = containerRef.current;
|
|
105
103
|
if (!container_0) {
|
|
@@ -108,24 +106,24 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
|
|
|
108
106
|
ignoreNextScrollEventRef.current = true;
|
|
109
107
|
container_0.scrollTop = scrollTop;
|
|
110
108
|
};
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
109
|
+
$[21] = scrollTop;
|
|
110
|
+
$[22] = t5;
|
|
113
111
|
} else {
|
|
114
|
-
t5 = $[
|
|
112
|
+
t5 = $[22];
|
|
115
113
|
}
|
|
116
114
|
let t6;
|
|
117
|
-
if ($[
|
|
115
|
+
if ($[23] !== items || $[24] !== scrollTop) {
|
|
118
116
|
t6 = [items, scrollTop];
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
117
|
+
$[23] = items;
|
|
118
|
+
$[24] = scrollTop;
|
|
119
|
+
$[25] = t6;
|
|
122
120
|
} else {
|
|
123
|
-
t6 = $[
|
|
121
|
+
t6 = $[25];
|
|
124
122
|
}
|
|
125
123
|
useLayoutEffect(t5, t6);
|
|
126
124
|
const updateStateTimerRef = useRef(null);
|
|
127
125
|
let t7;
|
|
128
|
-
if ($[
|
|
126
|
+
if ($[26] !== arith || $[27] !== items || $[28] !== locale || $[29] !== onContainerScroll || $[30] !== scheduleScroll || $[31] !== selfScrollDateSource) {
|
|
129
127
|
t7 = () => {
|
|
130
128
|
scheduleScroll(() => {
|
|
131
129
|
if (updateStateTimerRef.current != null) {
|
|
@@ -164,20 +162,19 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
|
|
|
164
162
|
}
|
|
165
163
|
});
|
|
166
164
|
};
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
165
|
+
$[26] = arith;
|
|
166
|
+
$[27] = items;
|
|
167
|
+
$[28] = locale;
|
|
168
|
+
$[29] = onContainerScroll;
|
|
169
|
+
$[30] = scheduleScroll;
|
|
170
|
+
$[31] = selfScrollDateSource;
|
|
171
|
+
$[32] = t7;
|
|
174
172
|
} else {
|
|
175
|
-
t7 = $[
|
|
173
|
+
t7 = $[32];
|
|
176
174
|
}
|
|
177
|
-
const handleScroll =
|
|
175
|
+
const handleScroll = useEffectEvent(t7);
|
|
178
176
|
let t8;
|
|
179
|
-
|
|
180
|
-
if ($[34] !== handleScroll) {
|
|
177
|
+
if ($[33] !== handleScroll) {
|
|
181
178
|
t8 = () => {
|
|
182
179
|
const container_2 = containerRef.current;
|
|
183
180
|
if (!container_2) {
|
|
@@ -192,25 +189,29 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
|
|
|
192
189
|
}
|
|
193
190
|
};
|
|
194
191
|
};
|
|
195
|
-
|
|
196
|
-
$[34] =
|
|
197
|
-
|
|
198
|
-
$[
|
|
192
|
+
$[33] = handleScroll;
|
|
193
|
+
$[34] = t8;
|
|
194
|
+
} else {
|
|
195
|
+
t8 = $[34];
|
|
196
|
+
}
|
|
197
|
+
let t9;
|
|
198
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
199
|
+
t9 = [];
|
|
200
|
+
$[35] = t9;
|
|
199
201
|
} else {
|
|
200
|
-
|
|
201
|
-
t9 = $[36];
|
|
202
|
+
t9 = $[35];
|
|
202
203
|
}
|
|
203
204
|
useEffect(t8, t9);
|
|
204
205
|
let t10;
|
|
205
|
-
if ($[
|
|
206
|
+
if ($[36] !== items) {
|
|
206
207
|
t10 = {
|
|
207
208
|
containerRef,
|
|
208
209
|
items
|
|
209
210
|
};
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
211
|
+
$[36] = items;
|
|
212
|
+
$[37] = t10;
|
|
212
213
|
} else {
|
|
213
|
-
t10 = $[
|
|
214
|
+
t10 = $[37];
|
|
214
215
|
}
|
|
215
216
|
return t10;
|
|
216
217
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { addYears } from 'date-fns/addYears';
|
|
@@ -20,7 +20,6 @@ import 'date-fns/add';
|
|
|
20
20
|
import 'date-fns';
|
|
21
21
|
import '../global/sniffer.js';
|
|
22
22
|
import 'sniffr';
|
|
23
|
-
import '../global/use-event-callback.js';
|
|
24
23
|
|
|
25
24
|
const {
|
|
26
25
|
yearHeight
|
|
@@ -38,11 +37,11 @@ const scheduleScroll = scheduleRAF();
|
|
|
38
37
|
const intersectionObserverRootMargin = units.calHeight / 2;
|
|
39
38
|
function Years(t0) {
|
|
40
39
|
const $ = c(25);
|
|
41
|
-
if ($[0] !== "
|
|
40
|
+
if ($[0] !== "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702") {
|
|
42
41
|
for (let $i = 0; $i < 25; $i += 1) {
|
|
43
42
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
44
43
|
}
|
|
45
|
-
$[0] = "
|
|
44
|
+
$[0] = "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702";
|
|
46
45
|
}
|
|
47
46
|
const {
|
|
48
47
|
scrollDate,
|
|
@@ -193,7 +192,7 @@ function Years(t0) {
|
|
|
193
192
|
}
|
|
194
193
|
let t10;
|
|
195
194
|
if ($[22] !== t7 || $[23] !== t9) {
|
|
196
|
-
t10 = /*#__PURE__*/jsx(IntersectionObserverContext
|
|
195
|
+
t10 = /*#__PURE__*/jsx(IntersectionObserverContext, {
|
|
197
196
|
value: t7,
|
|
198
197
|
children: t9
|
|
199
198
|
});
|
|
@@ -207,11 +206,11 @@ function Years(t0) {
|
|
|
207
206
|
}
|
|
208
207
|
function Year(t0) {
|
|
209
208
|
const $ = c(24);
|
|
210
|
-
if ($[0] !== "
|
|
209
|
+
if ($[0] !== "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702") {
|
|
211
210
|
for (let $i = 0; $i < 24; $i += 1) {
|
|
212
211
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
213
212
|
}
|
|
214
|
-
$[0] = "
|
|
213
|
+
$[0] = "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702";
|
|
215
214
|
}
|
|
216
215
|
const {
|
|
217
216
|
year,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { type TabTrapObject, type TabTrapProps } from '../tab-trap/tab-trap';
|
|
4
4
|
import type { ShortcutsScopeOptions } from '../shortcuts/core';
|
|
5
5
|
export interface DialogProps extends Partial<TabTrapProps> {
|
|
6
6
|
show: boolean;
|
|
@@ -43,7 +43,7 @@ export default class Dialog extends PureComponent<DialogProps> {
|
|
|
43
43
|
esc: (event: KeyboardEvent) => void;
|
|
44
44
|
};
|
|
45
45
|
dialog?: HTMLElement | null;
|
|
46
|
-
dialogRef: (
|
|
46
|
+
dialogRef: (tabTrapObj: TabTrapObject | null) => void;
|
|
47
47
|
nativeDialog: React.RefObject<HTMLDialogElement | null>;
|
|
48
48
|
render(): false | React.JSX.Element;
|
|
49
49
|
}
|
|
@@ -16,7 +16,7 @@ import '../island/adaptive-island-hoc.js';
|
|
|
16
16
|
import '../global/linear-function.js';
|
|
17
17
|
import '../_helpers/island.js';
|
|
18
18
|
import '../island/header.js';
|
|
19
|
-
import 'react
|
|
19
|
+
import 'react/compiler-runtime';
|
|
20
20
|
import '../island/content.js';
|
|
21
21
|
import 'element-resize-detector';
|
|
22
22
|
import '../global/schedule-raf.js';
|
|
@@ -139,8 +139,8 @@ class Dialog extends PureComponent {
|
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
141
|
dialog;
|
|
142
|
-
dialogRef =
|
|
143
|
-
this.dialog =
|
|
142
|
+
dialogRef = tabTrapObj => {
|
|
143
|
+
this.dialog = tabTrapObj && tabTrapObj.node;
|
|
144
144
|
};
|
|
145
145
|
nativeDialog = /*#__PURE__*/createRef();
|
|
146
146
|
render() {
|
|
@@ -4,7 +4,7 @@ import joinDataTestAttributes from '../global/data-tests.js';
|
|
|
4
4
|
import { isArray } from '../global/typescript-utils.js';
|
|
5
5
|
import { s as styles, A as Anchor } from '../_helpers/anchor.js';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
import 'react
|
|
7
|
+
import 'react/compiler-runtime';
|
|
8
8
|
import '../button/button.js';
|
|
9
9
|
import '@jetbrains/icons/chevron-down';
|
|
10
10
|
import '@jetbrains/icons/chevron-12px-down';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactElement, type HTMLAttributes, type SyntheticEvent, type
|
|
1
|
+
import { type ReactElement, type HTMLAttributes, type SyntheticEvent, type ReactNode } from 'react';
|
|
2
2
|
import { type SelectHandlerParams } from '../list/list';
|
|
3
3
|
import { type AnchorProps, type DropdownAttrs, type DropdownChildrenFunction } from '../dropdown/dropdown';
|
|
4
4
|
import PopupMenu, { type PopupMenuAttrs } from '../popup-menu/popup-menu';
|
|
@@ -10,6 +10,7 @@ export interface DropdownAnchorWrapperProps extends AnchorProps {
|
|
|
10
10
|
}
|
|
11
11
|
type OnSelectHandler<T> = ((item: ListDataItem<T>, event: Event | SyntheticEvent, params?: SelectHandlerParams) => void) | undefined;
|
|
12
12
|
export interface DropdownMenuProps<T = unknown> extends Omit<DropdownAttrs, 'anchor' | 'onSelect' | 'children'> {
|
|
13
|
+
ref?: React.Ref<PopupMenu<T> | null>;
|
|
13
14
|
anchor: ReactElement | ReactNode[] | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
|
|
14
15
|
data?: readonly ListDataItem<T>[] | undefined;
|
|
15
16
|
ariaLabel?: string | null | undefined;
|
|
@@ -17,9 +18,8 @@ export interface DropdownMenuProps<T = unknown> extends Omit<DropdownAttrs, 'anc
|
|
|
17
18
|
menuProps?: PopupMenuAttrs<T> | null | undefined;
|
|
18
19
|
children?: DropdownChildrenFunction;
|
|
19
20
|
}
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
}) => ReactElement | null) & {
|
|
21
|
+
declare function DropdownMenu<T = unknown>({ ref, id, anchor, ariaLabel, data, onSelect, menuProps, children, ...restDropdownProps }: DropdownMenuProps<T>): import("react").JSX.Element;
|
|
22
|
+
declare const _default: typeof DropdownMenu & {
|
|
23
23
|
ListProps: {
|
|
24
24
|
Type: typeof import("../list/consts").Type;
|
|
25
25
|
Dimension: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c } from 'react
|
|
2
|
-
import {
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useState, cloneElement } from 'react';
|
|
3
3
|
import List, { ActiveItemContext } from '../list/list.js';
|
|
4
4
|
import Dropdown from '../dropdown/dropdown.js';
|
|
5
5
|
import PopupMenu from '../popup-menu/popup-menu.js';
|
|
@@ -68,11 +68,11 @@ import '../_helpers/theme.js';
|
|
|
68
68
|
const defaultAriaLabel = 'Dropdown menu';
|
|
69
69
|
function DropdownAnchorWrapper(t0) {
|
|
70
70
|
const $ = c(4);
|
|
71
|
-
if ($[0] !== "
|
|
71
|
+
if ($[0] !== "4128e61ebe660e719aaf538d00491953fbdf42de520c353af40602765f42bd6b") {
|
|
72
72
|
for (let $i = 0; $i < 4; $i += 1) {
|
|
73
73
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
74
74
|
}
|
|
75
|
-
$[0] = "
|
|
75
|
+
$[0] = "4128e61ebe660e719aaf538d00491953fbdf42de520c353af40602765f42bd6b";
|
|
76
76
|
}
|
|
77
77
|
let t1;
|
|
78
78
|
let t2;
|
|
@@ -159,13 +159,13 @@ function renderDropdownMenuChildren({
|
|
|
159
159
|
...popupMenuProps
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
const $ = c(
|
|
164
|
-
if ($[0] !== "
|
|
165
|
-
for (let $i = 0; $i <
|
|
162
|
+
function DropdownMenu(t0) {
|
|
163
|
+
const $ = c(36);
|
|
164
|
+
if ($[0] !== "4128e61ebe660e719aaf538d00491953fbdf42de520c353af40602765f42bd6b") {
|
|
165
|
+
for (let $i = 0; $i < 36; $i += 1) {
|
|
166
166
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
167
167
|
}
|
|
168
|
-
$[0] = "
|
|
168
|
+
$[0] = "4128e61ebe660e719aaf538d00491953fbdf42de520c353af40602765f42bd6b";
|
|
169
169
|
}
|
|
170
170
|
let anchor;
|
|
171
171
|
let ariaLabel;
|
|
@@ -174,9 +174,11 @@ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(t0, forwarded
|
|
|
174
174
|
let id;
|
|
175
175
|
let menuProps;
|
|
176
176
|
let onSelect;
|
|
177
|
+
let ref;
|
|
177
178
|
let restDropdownProps;
|
|
178
179
|
if ($[1] !== t0) {
|
|
179
180
|
({
|
|
181
|
+
ref,
|
|
180
182
|
id,
|
|
181
183
|
anchor,
|
|
182
184
|
ariaLabel,
|
|
@@ -194,7 +196,8 @@ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(t0, forwarded
|
|
|
194
196
|
$[6] = id;
|
|
195
197
|
$[7] = menuProps;
|
|
196
198
|
$[8] = onSelect;
|
|
197
|
-
$[9] =
|
|
199
|
+
$[9] = ref;
|
|
200
|
+
$[10] = restDropdownProps;
|
|
198
201
|
} else {
|
|
199
202
|
anchor = $[2];
|
|
200
203
|
ariaLabel = $[3];
|
|
@@ -203,20 +206,22 @@ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(t0, forwarded
|
|
|
203
206
|
id = $[6];
|
|
204
207
|
menuProps = $[7];
|
|
205
208
|
onSelect = $[8];
|
|
206
|
-
|
|
209
|
+
ref = $[9];
|
|
210
|
+
restDropdownProps = $[10];
|
|
207
211
|
}
|
|
208
212
|
const [uid] = useState(_temp);
|
|
209
213
|
const listId = id || uid;
|
|
214
|
+
const t1 = ariaLabel || defaultAriaLabel;
|
|
210
215
|
let T0;
|
|
211
216
|
let T1;
|
|
212
|
-
let t1;
|
|
213
217
|
let t2;
|
|
214
218
|
let t3;
|
|
215
|
-
|
|
219
|
+
let t4;
|
|
220
|
+
if ($[11] !== anchor || $[12] !== children || $[13] !== data || $[14] !== listId || $[15] !== menuProps || $[16] !== onSelect || $[17] !== ref || $[18] !== restDropdownProps || $[19] !== t1) {
|
|
216
221
|
const popupMenuProps = {
|
|
217
|
-
ref
|
|
222
|
+
ref,
|
|
218
223
|
id: listId,
|
|
219
|
-
ariaLabel:
|
|
224
|
+
ariaLabel: t1,
|
|
220
225
|
closeOnSelect: true,
|
|
221
226
|
activateFirstItem: false,
|
|
222
227
|
data,
|
|
@@ -225,13 +230,13 @@ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(t0, forwarded
|
|
|
225
230
|
};
|
|
226
231
|
T1 = ActiveItemContext.Provider;
|
|
227
232
|
T0 = Dropdown;
|
|
228
|
-
if ($[
|
|
229
|
-
|
|
233
|
+
if ($[25] !== anchor || $[26] !== listId) {
|
|
234
|
+
t2 = t5 => {
|
|
230
235
|
const {
|
|
231
236
|
pinned,
|
|
232
237
|
active,
|
|
233
238
|
...restAnchorProps
|
|
234
|
-
} =
|
|
239
|
+
} = t5;
|
|
235
240
|
return /*#__PURE__*/jsx(ActiveItemContext.ValueContext.Consumer, {
|
|
236
241
|
children: activeItemId => /*#__PURE__*/jsx(DropdownAnchorWrapper, {
|
|
237
242
|
anchor: anchor,
|
|
@@ -243,71 +248,71 @@ const DropdownMenu = /*#__PURE__*/forwardRef(function DropdownMenu(t0, forwarded
|
|
|
243
248
|
})
|
|
244
249
|
});
|
|
245
250
|
};
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
251
|
+
$[25] = anchor;
|
|
252
|
+
$[26] = listId;
|
|
253
|
+
$[27] = t2;
|
|
249
254
|
} else {
|
|
250
|
-
|
|
255
|
+
t2 = $[27];
|
|
251
256
|
}
|
|
252
|
-
|
|
253
|
-
|
|
257
|
+
t3 = restDropdownProps;
|
|
258
|
+
t4 = renderDropdownMenuChildren({
|
|
254
259
|
children,
|
|
255
260
|
popupMenuProps
|
|
256
261
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[11] = ariaLabel;
|
|
262
|
+
$[11] = anchor;
|
|
259
263
|
$[12] = children;
|
|
260
264
|
$[13] = data;
|
|
261
|
-
$[14] =
|
|
262
|
-
$[15] =
|
|
263
|
-
$[16] =
|
|
264
|
-
$[17] =
|
|
265
|
+
$[14] = listId;
|
|
266
|
+
$[15] = menuProps;
|
|
267
|
+
$[16] = onSelect;
|
|
268
|
+
$[17] = ref;
|
|
265
269
|
$[18] = restDropdownProps;
|
|
266
|
-
$[19] =
|
|
267
|
-
$[20] =
|
|
268
|
-
$[21] =
|
|
270
|
+
$[19] = t1;
|
|
271
|
+
$[20] = T0;
|
|
272
|
+
$[21] = T1;
|
|
269
273
|
$[22] = t2;
|
|
270
274
|
$[23] = t3;
|
|
275
|
+
$[24] = t4;
|
|
271
276
|
} else {
|
|
272
|
-
T0 = $[
|
|
273
|
-
T1 = $[
|
|
274
|
-
t1 = $[21];
|
|
277
|
+
T0 = $[20];
|
|
278
|
+
T1 = $[21];
|
|
275
279
|
t2 = $[22];
|
|
276
280
|
t3 = $[23];
|
|
281
|
+
t4 = $[24];
|
|
277
282
|
}
|
|
278
|
-
let
|
|
279
|
-
if ($[
|
|
280
|
-
|
|
281
|
-
anchor:
|
|
282
|
-
...
|
|
283
|
-
children:
|
|
283
|
+
let t5;
|
|
284
|
+
if ($[28] !== T0 || $[29] !== t2 || $[30] !== t3 || $[31] !== t4) {
|
|
285
|
+
t5 = /*#__PURE__*/jsx(T0, {
|
|
286
|
+
anchor: t2,
|
|
287
|
+
...t3,
|
|
288
|
+
children: t4
|
|
284
289
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[28] = t1;
|
|
290
|
+
$[28] = T0;
|
|
287
291
|
$[29] = t2;
|
|
288
292
|
$[30] = t3;
|
|
289
293
|
$[31] = t4;
|
|
294
|
+
$[32] = t5;
|
|
290
295
|
} else {
|
|
291
|
-
|
|
296
|
+
t5 = $[32];
|
|
292
297
|
}
|
|
293
|
-
let
|
|
294
|
-
if ($[
|
|
295
|
-
|
|
296
|
-
children:
|
|
298
|
+
let t6;
|
|
299
|
+
if ($[33] !== T1 || $[34] !== t5) {
|
|
300
|
+
t6 = /*#__PURE__*/jsx(T1, {
|
|
301
|
+
children: t5
|
|
297
302
|
});
|
|
298
|
-
$[
|
|
299
|
-
$[33] = t4;
|
|
303
|
+
$[33] = T1;
|
|
300
304
|
$[34] = t5;
|
|
305
|
+
$[35] = t6;
|
|
301
306
|
} else {
|
|
302
|
-
|
|
307
|
+
t6 = $[35];
|
|
303
308
|
}
|
|
304
|
-
return
|
|
305
|
-
}
|
|
306
|
-
var DropdownMenu$1 = Object.assign(DropdownMenu, {
|
|
307
|
-
ListProps: List.ListProps
|
|
308
|
-
});
|
|
309
|
+
return t6;
|
|
310
|
+
}
|
|
309
311
|
function _temp() {
|
|
310
312
|
return getUID("dropdown-menu-list");
|
|
311
313
|
}
|
|
314
|
+
var DropdownMenu$1 = Object.assign(DropdownMenu, {
|
|
315
|
+
ListProps: List.ListProps
|
|
316
|
+
});
|
|
312
317
|
|
|
313
318
|
export { DropdownMenu$1 as default };
|
|
@@ -29,5 +29,4 @@ export type EditableHeadingProps = Omit<InputHTMLAttributes<HTMLInputElement | H
|
|
|
29
29
|
translations?: EditableHeadingTranslations;
|
|
30
30
|
};
|
|
31
31
|
export declare const EditableHeading: (props: EditableHeadingProps) => React.JSX.Element;
|
|
32
|
-
|
|
33
|
-
export default _default;
|
|
32
|
+
export default EditableHeading;
|