@jetbrains/ring-ui-built 8.0.0-beta.3 → 8.0.0-beta.4
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/heading.js +2 -2
- package/components/_helpers/table.js +1 -1
- package/components/_helpers/theme.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/collapsible-group/collapsible-group.d.ts +20 -0
- package/components/collapsible-group/collapsible-group.js +382 -0
- package/components/components/util-stories.js +63 -1
- package/components/data-list/data-list.js +1 -1
- package/components/data-list/title.js +1 -1
- package/components/date-picker/date-popup.js +3 -3
- package/components/dropdown-menu/dropdown-menu.js +6 -6
- package/components/editable-heading/editable-heading.js +122 -109
- package/components/expand/collapsible-group.d.ts +8 -20
- package/components/expand/collapsible-group.js +34 -365
- package/components/global/compose-refs.d.ts +2 -1
- package/components/global/compose-refs.js +44 -8
- package/components/global/focus-sensor-hoc.js +1 -0
- package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
- package/components/global/focus-with-temporary-tabindex.js +23 -0
- package/components/global/intersection-observer-context.d.ts +29 -9
- package/components/global/intersection-observer-context.js +50 -52
- package/components/global/is-within-interactive-element.d.ts +6 -0
- package/components/global/is-within-interactive-element.js +11 -0
- package/components/global/is-within-navigable-element.d.ts +6 -0
- package/components/global/is-within-navigable-element.js +11 -0
- package/components/global/parse-css-duration.d.ts +5 -0
- package/components/global/parse-css-duration.js +14 -0
- package/components/global/rerender-hoc.js +1 -0
- package/components/global/schedule-with-cleanup.d.ts +12 -0
- package/components/global/schedule-with-cleanup.js +36 -0
- package/components/global/table-selection.js +1 -1
- package/components/global/theme.js +1 -1
- package/components/header/header.js +1 -1
- package/components/heading/heading.js +3 -3
- package/components/input/input.d.ts +1 -1
- package/components/internal/column-animation.js +133 -0
- package/components/internal/table-header.js +1109 -0
- package/components/{table/table-virtualize.js → internal/virtual-items.js} +108 -84
- package/components/legacy-table/header-cell.js +2 -2
- package/components/legacy-table/row-with-focus-sensor.js +1 -1
- package/components/legacy-table/row.d.ts +1 -1
- package/components/legacy-table/simple-table.js +1 -1
- package/components/legacy-table/smart-table.js +1 -1
- package/components/legacy-table/table.js +1 -1
- package/components/markdown/markdown.js +2 -2
- package/components/message/message.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/popup/popup.d.ts +2 -0
- package/components/popup/popup.js +5 -1
- package/components/select/select-popup.d.ts +1 -1
- package/components/select/select.d.ts +1 -1
- package/components/style.css +1 -1
- package/components/table/default-item-renderer.d.ts +23 -10
- package/components/table/default-item-renderer.js +104 -98
- package/components/table/internal/column-animation.d.ts +16 -0
- package/components/table/internal/table-header.d.ts +4 -0
- package/components/table/internal/virtual-items.d.ts +34 -0
- package/components/table/item-virtualization.d.ts +35 -0
- package/components/table/item-virtualization.js +71 -0
- package/components/table/table-const.d.ts +40 -6
- package/components/table/table-const.js +15 -6
- package/components/table/table-primitives.d.ts +9 -16
- package/components/table/table-primitives.js +11 -211
- package/components/table/table-props.d.ts +280 -0
- package/components/table/table-props.js +1 -0
- package/components/table/table.d.ts +205 -209
- package/components/table/table.js +356 -15
- package/components/tooltip/tooltip.js +1 -1
- package/components/user-agreement/service.js +6 -6
- package/components/util-stories.d.ts +26 -0
- package/package.json +2 -2
- package/components/date-picker/use-intersection-observer.d.ts +0 -6
- package/components/date-picker/use-intersection-observer.js +0 -93
- package/components/global/composeRefs.d.ts +0 -6
- package/components/global/composeRefs.js +0 -9
- package/components/table/table-component.d.ts +0 -80
- package/components/table/table-component.js +0 -290
- package/components/table/table-row-focus.d.ts +0 -4
- package/components/table/table-row-focus.js +0 -41
- package/components/table/table-virtualize.d.ts +0 -32
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { useRef, useState, useEffect } from 'react';
|
|
2
|
+
import { createContext, useRef, useState, useEffect } from 'react';
|
|
3
3
|
import { useIntersectionObserverHandle } from '../global/intersection-observer-context.js';
|
|
4
|
+
import { setTimeoutWithCleanup } from '../global/schedule-with-cleanup.js';
|
|
4
5
|
import { s as styles } from '../_helpers/table.js';
|
|
5
6
|
import { jsx } from 'react/jsx-runtime';
|
|
6
7
|
|
|
8
|
+
const CollapseItemIntoSpacerContext = /*#__PURE__*/createContext(() => {});
|
|
9
|
+
/**
|
|
10
|
+
* RAF is somewhat too frequent. Most updates happen on virtualization boundaries
|
|
11
|
+
* within the invisible overscroll area, so they don't require such a high update rate.
|
|
12
|
+
* Therefore, we throttle with a custom delay.
|
|
13
|
+
*/
|
|
7
14
|
const virtualizationThrottleDelay = 50;
|
|
8
|
-
function
|
|
9
|
-
const $ = c(
|
|
10
|
-
if ($[0] !== "
|
|
11
|
-
for (let $i = 0; $i <
|
|
15
|
+
function useVirtualItems(t0) {
|
|
16
|
+
const $ = c(41);
|
|
17
|
+
if ($[0] !== "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d") {
|
|
18
|
+
for (let $i = 0; $i < 41; $i += 1) {
|
|
12
19
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
20
|
}
|
|
14
|
-
$[0] = "
|
|
21
|
+
$[0] = "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d";
|
|
15
22
|
}
|
|
16
23
|
const {
|
|
17
24
|
enabled,
|
|
@@ -36,17 +43,11 @@ function useTableVirtualize(t0) {
|
|
|
36
43
|
}
|
|
37
44
|
const itemsMaterialization = useRef(t2);
|
|
38
45
|
let t3;
|
|
39
|
-
if ($[2] !== data || $[3] !==
|
|
40
|
-
t3 = () => [
|
|
41
|
-
type: "spacer",
|
|
42
|
-
from: 0,
|
|
43
|
-
to: length,
|
|
44
|
-
height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
|
|
45
|
-
key: `${styles.spacerRow}-0`
|
|
46
|
-
}];
|
|
46
|
+
if ($[2] !== data || $[3] !== enabled || $[4] !== estimateHeight) {
|
|
47
|
+
t3 = () => enabled ? getAllVirtualizedItems(data, estimateHeight) : [];
|
|
47
48
|
$[2] = data;
|
|
48
|
-
$[3] =
|
|
49
|
-
$[4] =
|
|
49
|
+
$[3] = enabled;
|
|
50
|
+
$[4] = estimateHeight;
|
|
50
51
|
$[5] = t3;
|
|
51
52
|
} else {
|
|
52
53
|
t3 = $[5];
|
|
@@ -55,37 +56,36 @@ function useTableVirtualize(t0) {
|
|
|
55
56
|
let t4;
|
|
56
57
|
if ($[6] !== data || $[7] !== estimateHeight || $[8] !== lookaheadPx || $[9] !== scrollerRef || $[10] !== tableRef) {
|
|
57
58
|
t4 = () => {
|
|
58
|
-
var
|
|
59
|
+
var _scrollerRect$top;
|
|
59
60
|
if (!tableRef.current) {
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
const
|
|
63
|
+
const scrollerRect = scrollerRef?.current?.getBoundingClientRect();
|
|
64
|
+
const visibleStart = (_scrollerRect$top = scrollerRect?.top) !== null && _scrollerRect$top !== void 0 ? _scrollerRect$top : 0;
|
|
65
|
+
const visibleEnd = scrollerRect ? Math.min(scrollerRect.bottom, window.innerHeight) : window.innerHeight;
|
|
66
|
+
const materializeStart = visibleStart - lookaheadPx;
|
|
67
|
+
const materializeEnd = visibleEnd + lookaheadPx;
|
|
63
68
|
for (const spacerRow of tableRef.current.querySelectorAll(`.${styles.spacerRow}`)) {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
if (!spacerIntersectsLookaheadArea) {
|
|
69
|
+
const spacerRect = spacerRow.getBoundingClientRect();
|
|
70
|
+
if (spacerRect.bottom < materializeStart || spacerRect.top > materializeEnd) {
|
|
67
71
|
continue;
|
|
68
72
|
}
|
|
69
|
-
const visibleOffsetStart = Math.max(0, -rect.top);
|
|
70
|
-
const visibleOffsetEnd = Math.min(rect.height, containerHeight - rect.top);
|
|
71
|
-
const materializeOffsetStart = visibleOffsetStart - lookaheadPx;
|
|
72
|
-
const materializeOffsetEnd = visibleOffsetEnd + lookaheadPx;
|
|
73
|
-
let offsetInSpacer = 0;
|
|
74
73
|
const from = Number(spacerRow.dataset.from);
|
|
75
74
|
const to = Number(spacerRow.dataset.to);
|
|
75
|
+
let currentTop = spacerRect.top;
|
|
76
76
|
for (let i = from; i < to; i++) {
|
|
77
77
|
const itemMaterialization = itemsMaterialization.current[i];
|
|
78
78
|
const itemHeight = typeof itemMaterialization === "number" ? itemMaterialization : estimateHeight(data[i], i, data);
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
79
|
+
const itemTop = currentTop;
|
|
80
|
+
const itemBottom = currentTop + itemHeight;
|
|
81
|
+
if (itemBottom >= materializeStart && itemTop <= materializeEnd) {
|
|
82
82
|
itemsMaterialization.current[i] = true;
|
|
83
83
|
} else {
|
|
84
|
-
if (
|
|
84
|
+
if (itemTop > materializeEnd) {
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
currentTop = currentTop + itemHeight;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
};
|
|
@@ -108,7 +108,7 @@ function useTableVirtualize(t0) {
|
|
|
108
108
|
const itemMaterialization_0 = itemsMaterialization.current[i_0];
|
|
109
109
|
if (itemMaterialization_0 === true) {
|
|
110
110
|
newVirtualItems.push({
|
|
111
|
-
type: "
|
|
111
|
+
type: "materialized",
|
|
112
112
|
index: i_0
|
|
113
113
|
});
|
|
114
114
|
} else {
|
|
@@ -124,7 +124,7 @@ function useTableVirtualize(t0) {
|
|
|
124
124
|
from: i_0,
|
|
125
125
|
to: i_0 + 1,
|
|
126
126
|
height,
|
|
127
|
-
key:
|
|
127
|
+
key: spacerKey(spacerCounter++)
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -164,10 +164,12 @@ function useTableVirtualize(t0) {
|
|
|
164
164
|
t6 = $[16];
|
|
165
165
|
}
|
|
166
166
|
const throttle = t6;
|
|
167
|
+
const prevEnabledRef = useRef(enabled);
|
|
167
168
|
let t7;
|
|
168
|
-
|
|
169
|
-
if ($[17] !== enabled || $[18] !== materializeVisibleSpacerItems || $[19] !== minScrollAndResizeDeltaPx || $[20] !== recomputeVirtualItems || $[21] !== scrollerRef) {
|
|
169
|
+
if ($[17] !== data || $[18] !== enabled || $[19] !== estimateHeight || $[20] !== materializeVisibleSpacerItems || $[21] !== minScrollAndResizeDeltaPx || $[22] !== recomputeVirtualItems || $[23] !== scrollerRef) {
|
|
170
170
|
t7 = () => {
|
|
171
|
+
const prevEnabled = prevEnabledRef.current;
|
|
172
|
+
prevEnabledRef.current = enabled;
|
|
171
173
|
if (!enabled) {
|
|
172
174
|
return;
|
|
173
175
|
}
|
|
@@ -193,88 +195,110 @@ function useTableVirtualize(t0) {
|
|
|
193
195
|
const resizeObserver = new ResizeObserver(handleViewportChange);
|
|
194
196
|
const resizeTarget = scroller !== null && scroller !== void 0 ? scroller : document.documentElement;
|
|
195
197
|
resizeObserver.observe(resizeTarget);
|
|
196
|
-
|
|
198
|
+
let timeoutCleanup;
|
|
199
|
+
if (!prevEnabled) {
|
|
200
|
+
timeoutCleanup = setTimeoutWithCleanup(() => {
|
|
201
|
+
itemsMaterialization.current = [];
|
|
202
|
+
setVirtualItems(getAllVirtualizedItems(data, estimateHeight));
|
|
203
|
+
handleViewportChange();
|
|
204
|
+
});
|
|
205
|
+
} else {
|
|
206
|
+
handleViewportChange();
|
|
207
|
+
}
|
|
197
208
|
return () => {
|
|
209
|
+
timeoutCleanup?.();
|
|
198
210
|
scrollTarget.removeEventListener("scroll", handleViewportChange);
|
|
199
211
|
resizeObserver.unobserve(resizeTarget);
|
|
200
212
|
resizeObserver.disconnect();
|
|
213
|
+
if (timerIdRef.current != null) {
|
|
214
|
+
window.clearTimeout(timerIdRef.current);
|
|
215
|
+
timerIdRef.current = null;
|
|
216
|
+
callbacksRef.current = null;
|
|
217
|
+
}
|
|
201
218
|
};
|
|
202
219
|
};
|
|
203
|
-
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
220
|
+
$[17] = data;
|
|
221
|
+
$[18] = enabled;
|
|
222
|
+
$[19] = estimateHeight;
|
|
223
|
+
$[20] = materializeVisibleSpacerItems;
|
|
224
|
+
$[21] = minScrollAndResizeDeltaPx;
|
|
225
|
+
$[22] = recomputeVirtualItems;
|
|
226
|
+
$[23] = scrollerRef;
|
|
227
|
+
$[24] = t7;
|
|
228
|
+
} else {
|
|
229
|
+
t7 = $[24];
|
|
230
|
+
}
|
|
231
|
+
let t8;
|
|
232
|
+
if ($[25] !== data || $[26] !== enabled || $[27] !== estimateHeight || $[28] !== length || $[29] !== materializeVisibleSpacerItems || $[30] !== minScrollAndResizeDeltaPx || $[31] !== recomputeVirtualItems || $[32] !== scrollerRef) {
|
|
233
|
+
t8 = [data, enabled, estimateHeight, length, materializeVisibleSpacerItems, minScrollAndResizeDeltaPx, recomputeVirtualItems, scrollerRef, throttle];
|
|
234
|
+
$[25] = data;
|
|
235
|
+
$[26] = enabled;
|
|
236
|
+
$[27] = estimateHeight;
|
|
237
|
+
$[28] = length;
|
|
238
|
+
$[29] = materializeVisibleSpacerItems;
|
|
239
|
+
$[30] = minScrollAndResizeDeltaPx;
|
|
240
|
+
$[31] = recomputeVirtualItems;
|
|
241
|
+
$[32] = scrollerRef;
|
|
242
|
+
$[33] = t8;
|
|
211
243
|
} else {
|
|
212
|
-
|
|
213
|
-
t8 = $[23];
|
|
244
|
+
t8 = $[33];
|
|
214
245
|
}
|
|
215
246
|
useEffect(t7, t8);
|
|
216
247
|
const intersectionObserverHandle = useIntersectionObserverHandle(scrollerRef, scrollerRef ? retentionMarginPx : undefined, !scrollerRef ? retentionMarginPx : undefined);
|
|
217
248
|
let t9;
|
|
218
|
-
if ($[
|
|
219
|
-
t9 = (
|
|
249
|
+
if ($[34] !== enabled || $[35] !== recomputeVirtualItems) {
|
|
250
|
+
t9 = (index, height_1) => {
|
|
220
251
|
if (!enabled) {
|
|
221
252
|
return;
|
|
222
253
|
}
|
|
223
|
-
itemsMaterialization.current[
|
|
254
|
+
itemsMaterialization.current[index] = height_1;
|
|
224
255
|
throttle(recomputeVirtualItems);
|
|
225
256
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
257
|
+
$[34] = enabled;
|
|
258
|
+
$[35] = recomputeVirtualItems;
|
|
259
|
+
$[36] = t9;
|
|
229
260
|
} else {
|
|
230
|
-
t9 = $[
|
|
261
|
+
t9 = $[36];
|
|
231
262
|
}
|
|
232
263
|
const collapseItemIntoSpacer = t9;
|
|
233
264
|
let t10;
|
|
234
|
-
if ($[
|
|
235
|
-
t10 =
|
|
236
|
-
|
|
237
|
-
}, _temp2);
|
|
238
|
-
$[27] = enabled;
|
|
239
|
-
$[28] = length;
|
|
240
|
-
$[29] = t10;
|
|
241
|
-
} else {
|
|
242
|
-
t10 = $[29];
|
|
243
|
-
}
|
|
244
|
-
const allVisibleVirtualItems = t10;
|
|
245
|
-
const t11 = enabled ? virtualItems : allVisibleVirtualItems;
|
|
246
|
-
let t12;
|
|
247
|
-
if ($[30] !== collapseItemIntoSpacer || $[31] !== intersectionObserverHandle || $[32] !== t11) {
|
|
248
|
-
t12 = {
|
|
249
|
-
virtualItems: t11,
|
|
265
|
+
if ($[37] !== collapseItemIntoSpacer || $[38] !== intersectionObserverHandle || $[39] !== virtualItems) {
|
|
266
|
+
t10 = {
|
|
267
|
+
virtualItems,
|
|
250
268
|
intersectionObserverHandle,
|
|
251
269
|
collapseItemIntoSpacer
|
|
252
270
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
271
|
+
$[37] = collapseItemIntoSpacer;
|
|
272
|
+
$[38] = intersectionObserverHandle;
|
|
273
|
+
$[39] = virtualItems;
|
|
274
|
+
$[40] = t10;
|
|
257
275
|
} else {
|
|
258
|
-
|
|
276
|
+
t10 = $[40];
|
|
259
277
|
}
|
|
260
|
-
return
|
|
261
|
-
}
|
|
262
|
-
function _temp2(_, index_1) {
|
|
263
|
-
return {
|
|
264
|
-
type: "rendered",
|
|
265
|
-
index: index_1
|
|
266
|
-
};
|
|
278
|
+
return t10;
|
|
267
279
|
}
|
|
268
280
|
function _temp(cb_0) {
|
|
269
281
|
return cb_0();
|
|
270
282
|
}
|
|
283
|
+
function getAllVirtualizedItems(data, estimateHeight) {
|
|
284
|
+
return [{
|
|
285
|
+
type: 'spacer',
|
|
286
|
+
from: 0,
|
|
287
|
+
to: data.length,
|
|
288
|
+
height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
|
|
289
|
+
key: spacerKey(0)
|
|
290
|
+
}];
|
|
291
|
+
}
|
|
292
|
+
function spacerKey(index) {
|
|
293
|
+
return `__${styles.spacerRow}-${index}`;
|
|
294
|
+
}
|
|
271
295
|
function SpacerRow(t0) {
|
|
272
296
|
const $ = c(10);
|
|
273
|
-
if ($[0] !== "
|
|
297
|
+
if ($[0] !== "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d") {
|
|
274
298
|
for (let $i = 0; $i < 10; $i += 1) {
|
|
275
299
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
276
300
|
}
|
|
277
|
-
$[0] = "
|
|
301
|
+
$[0] = "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d";
|
|
278
302
|
}
|
|
279
303
|
const {
|
|
280
304
|
spacer: t1,
|
|
@@ -326,4 +350,4 @@ function SpacerRow(t0) {
|
|
|
326
350
|
return t4;
|
|
327
351
|
}
|
|
328
352
|
|
|
329
|
-
export { SpacerRow,
|
|
353
|
+
export { CollapseItemIntoSpacerContext, SpacerRow, useVirtualItems };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import sortableIcon from '@jetbrains/icons/unsorted-12px';
|
|
4
4
|
import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
|
|
5
5
|
import Icon from '../icon/icon.js';
|
|
6
6
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
@@ -46,7 +46,7 @@ class HeaderCell extends PureComponent {
|
|
|
46
46
|
} = this.props;
|
|
47
47
|
this.sortable = column.sortable === true;
|
|
48
48
|
this.sorted = sortKey === column.id;
|
|
49
|
-
const glyph = this.sorted ? chevron12pxDown :
|
|
49
|
+
const glyph = this.sorted ? chevron12pxDown : sortableIcon;
|
|
50
50
|
const classes = classNames(className, column.headerClassName, {
|
|
51
51
|
[style.headerCell]: true,
|
|
52
52
|
[style.headerCellSortable]: this.sortable,
|
|
@@ -3,8 +3,8 @@ import focusSensorHOC from '../global/focus-sensor-hoc.js';
|
|
|
3
3
|
import Row from './row.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import '../global/compose-refs.js';
|
|
6
|
-
import 'memoize-one';
|
|
7
6
|
import 'react/compiler-runtime';
|
|
7
|
+
import 'memoize-one';
|
|
8
8
|
import 'classnames';
|
|
9
9
|
import '@jetbrains/icons/chevron-right';
|
|
10
10
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -55,7 +55,7 @@ export default class Row<T extends object> extends PureComponent<RowProps<T>> {
|
|
|
55
55
|
onDoubleClick: () => void;
|
|
56
56
|
row?: HTMLElement | null;
|
|
57
57
|
rowRef: (el: HTMLElement | null) => void;
|
|
58
|
-
composedRowRef: import("memoize-one").MemoizedFn<(...refs: (React.Ref<HTMLElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
58
|
+
composedRowRef: import("memoize-one").MemoizedFn<(...refs: (React.Ref<HTMLElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
59
59
|
render(): React.JSX.Element;
|
|
60
60
|
}
|
|
61
61
|
export type RowAttrs<T extends object> = React.JSX.LibraryManagedAttributes<typeof Row, RowProps<T>>;
|
|
@@ -7,6 +7,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
7
7
|
import 'react-movable';
|
|
8
8
|
import '../global/focus-sensor-hoc.js';
|
|
9
9
|
import '../global/compose-refs.js';
|
|
10
|
+
import 'react/compiler-runtime';
|
|
10
11
|
import 'memoize-one';
|
|
11
12
|
import '../global/get-uid.js';
|
|
12
13
|
import '../shortcuts/shortcuts.js';
|
|
@@ -26,7 +27,6 @@ import '../icon/icon.js';
|
|
|
26
27
|
import 'util-deprecate';
|
|
27
28
|
import '../icon/icon.constants.js';
|
|
28
29
|
import '../_helpers/icon-svg.js';
|
|
29
|
-
import 'react/compiler-runtime';
|
|
30
30
|
import '../global/memoize.js';
|
|
31
31
|
import '../control-help/control-help.js';
|
|
32
32
|
import '../global/data-tests.js';
|
|
@@ -6,6 +6,7 @@ import 'classnames';
|
|
|
6
6
|
import 'react-movable';
|
|
7
7
|
import '../global/focus-sensor-hoc.js';
|
|
8
8
|
import '../global/compose-refs.js';
|
|
9
|
+
import 'react/compiler-runtime';
|
|
9
10
|
import 'memoize-one';
|
|
10
11
|
import '../global/get-uid.js';
|
|
11
12
|
import '../shortcuts/shortcuts.js';
|
|
@@ -25,7 +26,6 @@ import '../icon/icon.js';
|
|
|
25
26
|
import 'util-deprecate';
|
|
26
27
|
import '../icon/icon.constants.js';
|
|
27
28
|
import '../_helpers/icon-svg.js';
|
|
28
|
-
import 'react/compiler-runtime';
|
|
29
29
|
import '../global/memoize.js';
|
|
30
30
|
import '../control-help/control-help.js';
|
|
31
31
|
import '../global/data-tests.js';
|
|
@@ -12,6 +12,7 @@ import RowWithFocusSensorCallbacks from './row-with-focus-sensor.js';
|
|
|
12
12
|
import { s as style } from '../_helpers/legacy-table.js';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
import '../global/compose-refs.js';
|
|
15
|
+
import 'react/compiler-runtime';
|
|
15
16
|
import 'memoize-one';
|
|
16
17
|
import '../shortcuts/core.js';
|
|
17
18
|
import 'core-js/modules/es.array.includes.js';
|
|
@@ -27,7 +28,6 @@ import '../icon/icon.js';
|
|
|
27
28
|
import 'util-deprecate';
|
|
28
29
|
import '../icon/icon.constants.js';
|
|
29
30
|
import '../_helpers/icon-svg.js';
|
|
30
|
-
import 'react/compiler-runtime';
|
|
31
31
|
import '../global/memoize.js';
|
|
32
32
|
import '../control-help/control-help.js';
|
|
33
33
|
import '../global/data-tests.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { h as headingStyles } from '../_helpers/heading.js';
|
|
4
4
|
import { l as linkStyles } from '../_helpers/link.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ class Markdown extends PureComponent {
|
|
|
13
13
|
children,
|
|
14
14
|
inline
|
|
15
15
|
} = this.props;
|
|
16
|
-
const classes = classNames(className,
|
|
16
|
+
const classes = classNames(className, headingStyles.contentWithHeadings, linkStyles.withLinks, {
|
|
17
17
|
[styles.markdown]: !inline,
|
|
18
18
|
[styles.inline]: inline
|
|
19
19
|
});
|
|
@@ -7,7 +7,7 @@ import { Directions } from '../popup/popup.consts.js';
|
|
|
7
7
|
import Icon from '../icon/icon.js';
|
|
8
8
|
import { Button } from '../button/button.js';
|
|
9
9
|
import { I18nContext } from '../i18n/i18n-context.js';
|
|
10
|
-
import { T as Theme, d as darkStyles, W as WithThemeClasses,
|
|
10
|
+
import { T as Theme, d as darkStyles, W as WithThemeClasses, a as ThemeProvider } from '../_helpers/theme.js';
|
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
12
|
import 'react-dom';
|
|
13
13
|
import '../global/get-uid.js';
|
|
@@ -6,11 +6,11 @@ const MAJOR_VERSION_INDEX = 0;
|
|
|
6
6
|
/**
|
|
7
7
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
|
8
8
|
*/
|
|
9
|
-
if (!["and_chr
|
|
9
|
+
if (!["and_chr 149", "and_ff 151", "and_qq 14.9", "and_uc 15.5", "android 149", "chrome 149", "chrome 148", "chrome 147", "chrome 146", "chrome 145", "chrome 144", "chrome 143", "chrome 142", "chrome 141", "chrome 140", "chrome 139", "chrome 138", "chrome 137", "chrome 136", "chrome 135", "chrome 134", "chrome 133", "chrome 132", "chrome 131", "chrome 130", "chrome 129", "chrome 128", "chrome 127", "chrome 126", "chrome 125", "chrome 124", "chrome 123", "chrome 122", "chrome 121", "chrome 120", "chrome 118", "chrome 116", "chrome 112", "chrome 109", "edge 149", "edge 148", "edge 147", "edge 146", "edge 145", "edge 144", "edge 143", "edge 142", "edge 141", "edge 140", "edge 139", "edge 138", "edge 137", "edge 136", "edge 135", "edge 134", "edge 133", "edge 132", "edge 131", "edge 130", "edge 129", "edge 128", "edge 127", "edge 126", "edge 125", "edge 124", "edge 123", "edge 122", "edge 121", "edge 120", "firefox 151", "firefox 150", "firefox 149", "firefox 148", "firefox 147", "firefox 146", "firefox 145", "firefox 144", "firefox 143", "firefox 142", "firefox 141", "firefox 140", "firefox 139", "firefox 138", "firefox 137", "firefox 136", "firefox 135", "firefox 134", "firefox 133", "firefox 132", "firefox 131", "firefox 130", "firefox 129", "firefox 128", "firefox 127", "firefox 126", "firefox 125", "firefox 124", "firefox 123", "firefox 122", "firefox 121", "ios_saf 26.5", "ios_saf 26.4", "ios_saf 26.3", "ios_saf 26.2", "ios_saf 26.1", "ios_saf 26.0", "ios_saf 18.5-18.7", "ios_saf 18.4", "ios_saf 18.3", "ios_saf 18.2", "ios_saf 18.1", "ios_saf 18.0", "ios_saf 17.6-17.7", "ios_saf 17.5", "ios_saf 17.4", "ios_saf 17.3", "ios_saf 17.2", "kaios 3.0-3.1", "kaios 2.5", "op_mini all", "op_mob 80", "opera 131", "opera 127", "safari 26.4", "safari 26.3", "safari 26.2", "safari 26.1", "safari 26.0", "safari 18.5-18.7", "safari 18.4", "safari 18.3", "safari 18.2", "safari 18.1", "safari 18.0", "safari 17.6", "safari 17.5", "safari 17.4", "safari 17.3", "safari 17.2", "samsung 30", "samsung 29"]) {
|
|
10
10
|
// eslint-disable-next-line no-console
|
|
11
11
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
|
12
12
|
}
|
|
13
|
-
const SUPPORTED = ["and_chr
|
|
13
|
+
const SUPPORTED = ["and_chr 149", "and_ff 151", "and_qq 14.9", "and_uc 15.5", "android 149", "chrome 149", "chrome 148", "chrome 147", "chrome 146", "chrome 145", "chrome 144", "chrome 143", "chrome 142", "chrome 141", "chrome 140", "chrome 139", "chrome 138", "chrome 137", "chrome 136", "chrome 135", "chrome 134", "chrome 133", "chrome 132", "chrome 131", "chrome 130", "chrome 129", "chrome 128", "chrome 127", "chrome 126", "chrome 125", "chrome 124", "chrome 123", "chrome 122", "chrome 121", "chrome 120", "chrome 118", "chrome 116", "chrome 112", "chrome 109", "edge 149", "edge 148", "edge 147", "edge 146", "edge 145", "edge 144", "edge 143", "edge 142", "edge 141", "edge 140", "edge 139", "edge 138", "edge 137", "edge 136", "edge 135", "edge 134", "edge 133", "edge 132", "edge 131", "edge 130", "edge 129", "edge 128", "edge 127", "edge 126", "edge 125", "edge 124", "edge 123", "edge 122", "edge 121", "edge 120", "firefox 151", "firefox 150", "firefox 149", "firefox 148", "firefox 147", "firefox 146", "firefox 145", "firefox 144", "firefox 143", "firefox 142", "firefox 141", "firefox 140", "firefox 139", "firefox 138", "firefox 137", "firefox 136", "firefox 135", "firefox 134", "firefox 133", "firefox 132", "firefox 131", "firefox 130", "firefox 129", "firefox 128", "firefox 127", "firefox 126", "firefox 125", "firefox 124", "firefox 123", "firefox 122", "firefox 121", "ios_saf 26.5", "ios_saf 26.4", "ios_saf 26.3", "ios_saf 26.2", "ios_saf 26.1", "ios_saf 26.0", "ios_saf 18.5-18.7", "ios_saf 18.4", "ios_saf 18.3", "ios_saf 18.2", "ios_saf 18.1", "ios_saf 18.0", "ios_saf 17.6-17.7", "ios_saf 17.5", "ios_saf 17.4", "ios_saf 17.3", "ios_saf 17.2", "kaios 3.0-3.1", "kaios 2.5", "op_mini all", "op_mob 80", "opera 131", "opera 127", "safari 26.4", "safari 26.3", "safari 26.2", "safari 26.1", "safari 26.0", "safari 18.5-18.7", "safari 18.4", "safari 18.3", "safari 18.2", "safari 18.1", "safari 18.0", "safari 17.6", "safari 17.5", "safari 17.4", "safari 17.3", "safari 17.2", "samsung 30", "samsung 29"] || [];
|
|
14
14
|
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
|
15
15
|
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
|
16
16
|
var _item$match;
|
|
@@ -45,6 +45,8 @@ export interface BasePopupProps {
|
|
|
45
45
|
onMouseUp?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
46
46
|
onMouseOver?: ((e: React.SyntheticEvent<HTMLElement>) => void) | undefined;
|
|
47
47
|
onMouseOut?: ((e: React.SyntheticEvent<HTMLElement>) => void) | undefined;
|
|
48
|
+
onMouseEnter?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
49
|
+
onMouseLeave?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
48
50
|
onContextMenu?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
49
51
|
onDirectionChange?: ((direction: Directions) => void) | null | undefined;
|
|
50
52
|
onShow?: (() => void) | null | undefined;
|
|
@@ -12,7 +12,7 @@ import position from './position.js';
|
|
|
12
12
|
import { DEFAULT_DIRECTIONS, Display, MaxHeight, MinWidth, Dimension, Directions } from './popup.consts.js';
|
|
13
13
|
import { PopupTargetContext, normalizePopupTarget, PopupTarget } from './popup.target.js';
|
|
14
14
|
import { supportsCSSAnchorPositioning, setCSSAnchorPositioning } from './position-css.js';
|
|
15
|
-
import {
|
|
15
|
+
import { b as ThemeContext, W as WithThemeClasses } from '../_helpers/theme.js';
|
|
16
16
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
17
17
|
import '../shortcuts/core.js';
|
|
18
18
|
import 'core-js/modules/es.array.includes.js';
|
|
@@ -315,6 +315,8 @@ class Popup extends PureComponent {
|
|
|
315
315
|
onMouseUp,
|
|
316
316
|
onMouseOver,
|
|
317
317
|
onMouseOut,
|
|
318
|
+
onMouseEnter,
|
|
319
|
+
onMouseLeave,
|
|
318
320
|
onContextMenu,
|
|
319
321
|
'data-test': dataTest,
|
|
320
322
|
largeBorderRadius
|
|
@@ -349,6 +351,8 @@ class Popup extends PureComponent {
|
|
|
349
351
|
onFocus: onMouseOver,
|
|
350
352
|
onMouseOut: onMouseOut,
|
|
351
353
|
onBlur: onMouseOut,
|
|
354
|
+
onMouseEnter: onMouseEnter,
|
|
355
|
+
onMouseLeave: onMouseLeave,
|
|
352
356
|
onContextMenu: onContextMenu,
|
|
353
357
|
children: /*#__PURE__*/jsx("div", {
|
|
354
358
|
"data-test": joinDataTestAttributes('ring-popup', dataTest),
|
|
@@ -127,7 +127,7 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
|
|
|
127
127
|
list?: List<T> | null;
|
|
128
128
|
listRef: (el: List<T> | null) => void;
|
|
129
129
|
filterRef: (el: HTMLInputElement | null) => void;
|
|
130
|
-
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
130
|
+
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
131
131
|
shortcutsScope: string;
|
|
132
132
|
shortcutsMap: {
|
|
133
133
|
tab: (event: Event) => void;
|
|
@@ -264,7 +264,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
|
264
264
|
private _getAvatar;
|
|
265
265
|
filter?: HTMLInputElement | null;
|
|
266
266
|
filterRef: (el: HTMLInputElement | null) => void;
|
|
267
|
-
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
267
|
+
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
268
268
|
getShortcutsMap(): {
|
|
269
269
|
enter: () => true | undefined;
|
|
270
270
|
esc: (event: KeyboardEvent) => boolean | undefined;
|