@jetbrains/ring-ui-built 7.0.123 → 8.0.0-beta.10

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 (257) hide show
  1. package/components/_helpers/anchor.js +1 -1
  2. package/components/_helpers/avatar-info.js +3 -5
  3. package/components/_helpers/icon-svg.js +2 -2
  4. package/components/_helpers/legacy-table.js +3 -0
  5. package/components/_helpers/tab-link.js +1 -1
  6. package/components/_helpers/table.js +2 -2
  7. package/components/_helpers/theme.js +49 -37
  8. package/components/alert/alert-actions.js +1 -1
  9. package/components/alert/alert-heading.js +1 -1
  10. package/components/alert/alert.js +1 -1
  11. package/components/alert-service/alert-service.js +1 -1
  12. package/components/auth/auth-core.js +1 -1
  13. package/components/auth/auth.js +1 -1
  14. package/components/auth/down-notification.js +1 -1
  15. package/components/auth/iframe-flow.js +1 -1
  16. package/components/auth/storage.js +1 -1
  17. package/components/auth-dialog/auth-dialog.js +2 -2
  18. package/components/auth-dialog-service/auth-dialog-service.js +2 -2
  19. package/components/avatar/avatar-info.js +1 -1
  20. package/components/avatar/avatar-size.d.ts +0 -4
  21. package/components/avatar/avatar-size.js +0 -4
  22. package/components/avatar/avatar.js +1 -8
  23. package/components/avatar/fallback-avatar.js +3 -48
  24. package/components/avatar-stack/avatar-stack.js +4 -4
  25. package/components/banner/banner.js +1 -1
  26. package/components/button/button.d.ts +0 -4
  27. package/components/button/button.js +3 -9
  28. package/components/button-group/button-group.js +1 -1
  29. package/components/checkbox/checkbox.d.ts +1 -1
  30. package/components/checkbox/checkbox.js +1 -1
  31. package/components/clipboard/clipboard.js +1 -1
  32. package/components/collapse/collapse-content.js +35 -43
  33. package/components/collapse/collapse-context.d.ts +1 -0
  34. package/components/collapse/collapse-context.js +1 -0
  35. package/components/collapse/collapse-control.js +5 -5
  36. package/components/collapse/collapse.js +34 -25
  37. package/components/collapsible-group/collapsible-group.d.ts +5 -1
  38. package/components/collapsible-group/collapsible-group.js +80 -97
  39. package/components/components/util-stories.js +63 -1
  40. package/components/confirm/confirm.js +2 -2
  41. package/components/confirm-service/confirm-service.js +3 -3
  42. package/components/contenteditable/contenteditable.js +1 -1
  43. package/components/control-help/control-help.js +1 -1
  44. package/components/control-label/control-label.js +1 -1
  45. package/components/data-list/data-list.d.ts +4 -4
  46. package/components/data-list/data-list.js +4 -4
  47. package/components/data-list/data-list.mock.d.ts +1 -1
  48. package/components/data-list/data-list.mock.js +1 -1
  49. package/components/data-list/item.d.ts +1 -1
  50. package/components/data-list/item.js +2 -2
  51. package/components/data-list/selection.d.ts +1 -1
  52. package/components/data-list/selection.js +2 -2
  53. package/components/data-list/title.js +1 -1
  54. package/components/date-picker/date-input.js +2 -2
  55. package/components/date-picker/date-picker.js +2 -3
  56. package/components/date-picker/date-popup.js +3 -4
  57. package/components/date-picker/month-names.js +1 -1
  58. package/components/date-picker/month-slider.js +1 -1
  59. package/components/date-picker/month.d.ts +0 -2
  60. package/components/date-picker/month.js +17 -18
  61. package/components/date-picker/months.js +43 -36
  62. package/components/date-picker/use-scroll-behavior.js +45 -45
  63. package/components/date-picker/weekdays.js +1 -1
  64. package/components/date-picker/years.js +61 -55
  65. package/components/dialog/dialog.d.ts +2 -2
  66. package/components/dialog/dialog.js +4 -4
  67. package/components/dropdown/anchor.js +2 -2
  68. package/components/dropdown/dropdown.js +2 -2
  69. package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
  70. package/components/dropdown-menu/dropdown-menu.js +62 -57
  71. package/components/editable-heading/editable-heading.d.ts +1 -2
  72. package/components/editable-heading/editable-heading.js +13 -12
  73. package/components/error-bubble/error-bubble.js +1 -1
  74. package/components/error-message/error-message.js +1 -1
  75. package/components/footer/footer.js +1 -1
  76. package/components/global/compose-refs.d.ts +2 -1
  77. package/components/global/compose-refs.js +44 -8
  78. package/components/global/create-stateful-context.js +11 -11
  79. package/components/global/focus-sensor-hoc.js +1 -0
  80. package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
  81. package/components/global/focus-with-temporary-tabindex.js +23 -0
  82. package/components/global/intersection-observer-context.d.ts +46 -0
  83. package/components/global/intersection-observer-context.js +138 -0
  84. package/components/global/is-within-interactive-element.d.ts +6 -0
  85. package/components/global/is-within-interactive-element.js +11 -0
  86. package/components/global/is-within-navigable-element.d.ts +6 -0
  87. package/components/global/is-within-navigable-element.js +11 -0
  88. package/components/global/parse-css-duration.d.ts +5 -0
  89. package/components/global/parse-css-duration.js +14 -0
  90. package/components/global/rerender-hoc.d.ts +4 -2
  91. package/components/global/rerender-hoc.js +11 -24
  92. package/components/global/schedule-with-cleanup.d.ts +12 -0
  93. package/components/global/schedule-with-cleanup.js +36 -0
  94. package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
  95. package/components/{table/selection.js → global/table-selection.js} +5 -5
  96. package/components/global/theme.d.ts +4 -3
  97. package/components/global/theme.js +1 -1
  98. package/components/global/variables.interface.d.ts +0 -4
  99. package/components/header/header-icon.js +2 -2
  100. package/components/header/header.js +2 -2
  101. package/components/header/links.js +1 -1
  102. package/components/header/logo.js +1 -1
  103. package/components/header/profile.js +4 -4
  104. package/components/header/services.js +2 -2
  105. package/components/header/smart-profile.js +2 -2
  106. package/components/header/smart-services.js +2 -2
  107. package/components/heading/heading.js +1 -1
  108. package/components/i18n/i18n-context.js +4 -4
  109. package/components/icon/icon-svg.js +1 -1
  110. package/components/icon/icon.d.ts +0 -1
  111. package/components/icon/icon.js +2 -5
  112. package/components/icon/index.js +1 -1
  113. package/components/input/input.d.ts +1 -1
  114. package/components/input/input.js +2 -2
  115. package/components/internal/reorder-animation-context.js +159 -0
  116. package/components/internal/reorder-handle.js +750 -0
  117. package/components/internal/reorder-layout-context.js +141 -0
  118. package/components/internal/table-header.js +685 -0
  119. package/components/internal/virtualization.js +368 -0
  120. package/components/island/adaptive-island-hoc.js +3 -3
  121. package/components/island/content.d.ts +7 -2
  122. package/components/island/content.js +27 -18
  123. package/components/island/header.js +1 -1
  124. package/components/island/island.js +1 -1
  125. package/components/{table → legacy-table}/cell.js +1 -1
  126. package/components/{table → legacy-table}/header-cell.js +2 -2
  127. package/components/{table → legacy-table}/header.js +2 -2
  128. package/components/{table → legacy-table}/multitable.d.ts +1 -1
  129. package/components/{table → legacy-table}/row-with-focus-sensor.js +2 -2
  130. package/components/{table → legacy-table}/row.d.ts +1 -1
  131. package/components/{table → legacy-table}/row.js +4 -4
  132. package/components/legacy-table/selection-adapter.d.ts +6 -0
  133. package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
  134. package/components/{table → legacy-table}/simple-table.d.ts +2 -2
  135. package/components/{table → legacy-table}/simple-table.js +4 -4
  136. package/components/{table → legacy-table}/smart-table.d.ts +5 -5
  137. package/components/{table → legacy-table}/smart-table.js +5 -5
  138. package/components/legacy-table/table.d.ts +109 -0
  139. package/components/legacy-table/table.js +369 -0
  140. package/components/list/consts.d.ts +0 -1
  141. package/components/list/consts.js +0 -1
  142. package/components/list/list-item.js +3 -4
  143. package/components/list/list-users-groups-source.js +1 -1
  144. package/components/list/list.d.ts +0 -4
  145. package/components/list/list.js +1 -1
  146. package/components/login-dialog/login-dialog.js +2 -2
  147. package/components/login-dialog/service.js +2 -2
  148. package/components/message/message.js +1 -1
  149. package/components/pager/pager.js +3 -3
  150. package/components/popup/popup.js +1 -1
  151. package/components/popup/popup.target.d.ts +3 -2
  152. package/components/popup/popup.target.js +32 -28
  153. package/components/popup-menu/popup-menu.js +1 -1
  154. package/components/query-assist/query-assist-suggestions.js +1 -1
  155. package/components/query-assist/query-assist.d.ts +3 -1
  156. package/components/query-assist/query-assist.js +2 -2
  157. package/components/radio/radio-item.d.ts +3 -3
  158. package/components/radio/radio-item.js +33 -19
  159. package/components/radio/radio.d.ts +2 -2
  160. package/components/radio/radio.js +2 -2
  161. package/components/scrollable-section/scrollable-section.js +1 -1
  162. package/components/select/chevron-button.js +2 -2
  163. package/components/select/select-filter.js +2 -2
  164. package/components/select/select-popup.d.ts +3 -2
  165. package/components/select/select-popup.js +9 -4
  166. package/components/select/select.d.ts +6 -2
  167. package/components/select/select.js +5 -4
  168. package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
  169. package/components/selection-toolbar/selection-toolbar.js +200 -0
  170. package/components/slider/slider.js +100 -97
  171. package/components/storage/storage-local.js +1 -1
  172. package/components/storage/storage.js +1 -1
  173. package/components/style.css +1 -1
  174. package/components/tab-trap/tab-trap.d.ts +3 -3
  175. package/components/tab-trap/tab-trap.js +83 -80
  176. package/components/table/default-item-renderer.d.ts +55 -0
  177. package/components/table/default-item-renderer.js +240 -0
  178. package/components/table/internal/reorder-animation-context.d.ts +21 -0
  179. package/components/table/internal/reorder-handle.d.ts +9 -0
  180. package/components/table/internal/reorder-layout-context.d.ts +16 -0
  181. package/components/table/internal/table-header.d.ts +1 -0
  182. package/components/table/internal/virtualization.d.ts +41 -0
  183. package/components/table/item-virtualization.d.ts +37 -0
  184. package/components/table/item-virtualization.js +73 -0
  185. package/components/table/reorder-animation.d.ts +37 -0
  186. package/components/table/reorder-animation.js +18 -0
  187. package/components/table/reorder-item-layout.d.ts +32 -0
  188. package/components/table/reorder-item-layout.js +57 -0
  189. package/components/table/table-const.d.ts +10 -0
  190. package/components/table/table-const.js +13 -0
  191. package/components/table/table-primitives.d.ts +64 -0
  192. package/components/table/table-primitives.js +180 -0
  193. package/components/table/table-props.d.ts +304 -0
  194. package/components/table/table-props.js +1 -0
  195. package/components/table/table.d.ts +231 -107
  196. package/components/table/table.js +351 -346
  197. package/components/tabs/collapsible-more.js +1 -1
  198. package/components/tabs/collapsible-tab.js +1 -1
  199. package/components/tabs/collapsible-tabs.js +1 -1
  200. package/components/tabs/dumb-tabs.js +1 -1
  201. package/components/tabs/smart-tabs.js +1 -1
  202. package/components/tabs/tab-link.js +1 -1
  203. package/components/tabs/tabs.js +1 -1
  204. package/components/tag/tag.js +1 -1
  205. package/components/tags-input/tags-input.d.ts +3 -1
  206. package/components/tags-input/tags-input.js +3 -3
  207. package/components/tags-list/tags-list.js +1 -1
  208. package/components/toggle/toggle.js +1 -1
  209. package/components/tooltip/tooltip.d.ts +2 -1
  210. package/components/tooltip/tooltip.js +5 -3
  211. package/components/upload/upload.d.ts +4 -3
  212. package/components/upload/upload.js +7 -29
  213. package/components/user-agreement/service.js +2 -2
  214. package/components/user-agreement/user-agreement.js +2 -2
  215. package/components/user-card/card.js +4 -4
  216. package/components/user-card/smart-user-card-tooltip.js +2 -2
  217. package/components/user-card/tooltip.js +2 -2
  218. package/components/user-card/user-card.js +4 -4
  219. package/components/util-stories.d.ts +26 -0
  220. package/package.json +6 -7
  221. package/components/__mocks__/old-browsers-message.js +0 -3
  222. package/components/_helpers/grid.js +0 -3
  223. package/components/_helpers/sidebar.js +0 -110
  224. package/components/content-layout/content-layout.d.ts +0 -20
  225. package/components/content-layout/content-layout.js +0 -50
  226. package/components/content-layout/sidebar.d.ts +0 -26
  227. package/components/content-layout/sidebar.js +0 -5
  228. package/components/date-picker/use-intersection-observer.d.ts +0 -6
  229. package/components/date-picker/use-intersection-observer.js +0 -93
  230. package/components/expand/collapsible-group.d.ts +0 -8
  231. package/components/expand/collapsible-group.js +0 -51
  232. package/components/global/composeRefs.d.ts +0 -6
  233. package/components/global/composeRefs.js +0 -9
  234. package/components/global/use-event-callback.d.ts +0 -4
  235. package/components/global/use-event-callback.js +0 -49
  236. package/components/grid/col.d.ts +0 -16
  237. package/components/grid/col.js +0 -63
  238. package/components/grid/grid.d.ts +0 -13
  239. package/components/grid/grid.js +0 -27
  240. package/components/grid/row.d.ts +0 -21
  241. package/components/grid/row.js +0 -72
  242. package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
  243. package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
  244. package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
  245. package/components/old-browsers-message/old-browsers-message.js +0 -89
  246. package/components/old-browsers-message/white-list.d.ts +0 -2
  247. package/components/old-browsers-message/white-list.js +0 -30
  248. package/components/table/selection-adapter.d.ts +0 -6
  249. /package/components/{table → legacy-table}/cell.d.ts +0 -0
  250. /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
  251. /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
  252. /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
  253. /package/components/{table → legacy-table}/header.d.ts +0 -0
  254. /package/components/{table → legacy-table}/multitable.js +0 -0
  255. /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
  256. /package/components/{table → legacy-table}/selection-adapter.js +0 -0
  257. /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
@@ -1,3 +1,65 @@
1
+ /* eslint-disable no-magic-numbers */
1
2
  const hideAddonsPanelParam = 'hideAddonsPanel';
3
+ function createRandom(seed) {
4
+ const u64Mask = 2n ** 64n - 1n;
5
+ const u64Range = 2n ** 64n;
6
+ const scrambleConst = 2685821657736338717n;
7
+ let x = seed & u64Mask;
8
+ if (!x) throw new Error('Seed must be non-zero');
9
+ function nextFractional() {
10
+ x ^= x >> 12n;
11
+ x ^= x << 25n & u64Mask;
12
+ x ^= x >> 27n;
13
+ const scrambled = x * scrambleConst & u64Mask;
14
+ return Number(scrambled) / Number(u64Range);
15
+ }
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ return (...args) => {
18
+ if (!args.length) {
19
+ return nextFractional();
20
+ }
21
+ if (args.length === 1) {
22
+ const [a] = args;
23
+ if (typeof a === 'number') {
24
+ return Math.floor(nextFractional() * a);
25
+ }
26
+ if (Array.isArray(a)) {
27
+ return a[Math.floor(nextFractional() * a.length)];
28
+ }
29
+ }
30
+ if (args.length === 2) {
31
+ const [a, b] = args;
32
+ let fromNum;
33
+ let toNum;
34
+ let isDate = false;
35
+ if (typeof a === 'number' && typeof b === 'number') {
36
+ fromNum = a;
37
+ toNum = b;
38
+ }
39
+ if (a instanceof Date && b instanceof Date) {
40
+ fromNum = a.getTime();
41
+ toNum = b.getTime();
42
+ isDate = true;
43
+ }
44
+ if (fromNum != null && toNum != null && fromNum < toNum) {
45
+ const r = Math.floor(nextFractional() * (toNum - fromNum)) + fromNum;
46
+ return isDate ? new Date(r) : r;
47
+ }
48
+ if (Array.isArray(a) && typeof b === 'number') {
49
+ const aIndices = Array.from({
50
+ length: a.length
51
+ }, (_, i) => i);
52
+ const sample = [];
53
+ for (let i = 0; i < b && aIndices.length; i++) {
54
+ const indexIndex = Math.floor(nextFractional() * aIndices.length);
55
+ const [aIndex] = aIndices.splice(indexIndex, 1);
56
+ sample.push(a[aIndex]);
57
+ }
58
+ return sample;
59
+ }
60
+ }
61
+ throw new Error(`Bad args: ${JSON.stringify(args)}`);
62
+ };
63
+ }
2
64
 
3
- export { hideAddonsPanelParam };
65
+ export { createRandom, hideAddonsPanelParam };
@@ -13,7 +13,7 @@ import '../island/island.js';
13
13
  import '../global/data-tests.js';
14
14
  import '../island/adaptive-island-hoc.js';
15
15
  import '../global/linear-function.js';
16
- import 'react-compiler-runtime';
16
+ import 'react/compiler-runtime';
17
17
  import 'element-resize-detector';
18
18
  import '../global/schedule-raf.js';
19
19
  import '../global/get-uid.js';
@@ -36,8 +36,8 @@ import '../_helpers/dialog-body-scroll-preventer.js';
36
36
  import 'scrollbar-width';
37
37
  import '@jetbrains/icons/chevron-down';
38
38
  import '@jetbrains/icons/chevron-12px-down';
39
- import 'util-deprecate';
40
39
  import '../icon/icon.js';
40
+ import 'util-deprecate';
41
41
  import '../icon/icon.constants.js';
42
42
  import '../_helpers/icon-svg.js';
43
43
  import '../global/memoize.js';
@@ -13,7 +13,7 @@ import '../island/adaptive-island-hoc.js';
13
13
  import '../global/linear-function.js';
14
14
  import '../_helpers/island.js';
15
15
  import '../island/header.js';
16
- import 'react-compiler-runtime';
16
+ import 'react/compiler-runtime';
17
17
  import '../island/content.js';
18
18
  import 'element-resize-detector';
19
19
  import '../global/schedule-raf.js';
@@ -29,8 +29,8 @@ import '../global/dom.js';
29
29
  import '../button/button.js';
30
30
  import '@jetbrains/icons/chevron-down';
31
31
  import '@jetbrains/icons/chevron-12px-down';
32
- import 'util-deprecate';
33
32
  import '../icon/icon.js';
33
+ import 'util-deprecate';
34
34
  import '../icon/icon.constants.js';
35
35
  import '../_helpers/icon-svg.js';
36
36
  import '../global/memoize.js';
@@ -57,7 +57,7 @@ function renderConfirm(props) {
57
57
  buttonsHeight = getGlobalControlsHeight(),
58
58
  ...restProps
59
59
  } = props;
60
- reactRoot.render(/*#__PURE__*/jsx(ControlsHeightContext.Provider, {
60
+ reactRoot.render(/*#__PURE__*/jsx(ControlsHeightContext, {
61
61
  value: buttonsHeight,
62
62
  children: /*#__PURE__*/jsx(Confirm, {
63
63
  ...restProps
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { Component } from 'react';
3
3
  import { renderToStaticMarkup } from 'react-dom/server';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import classNames from 'classnames';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import 'react';
3
3
  import classNames from 'classnames';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -3,9 +3,9 @@
3
3
  */
4
4
  import { Component } from 'react';
5
5
  import { type FocusSensorOuterProps } from '../global/focus-sensor-hoc';
6
- import { type SelectionShortcutsAddProps, type SelectionShortcutsOuterProps } from '../table/selection-shortcuts-hoc';
7
- import { type DisableHoverAddProps } from '../table/disable-hover-hoc';
8
- import { type SelectionItem } from '../table/selection';
6
+ import { type SelectionShortcutsAddProps, type SelectionShortcutsOuterProps } from '../legacy-table/selection-shortcuts-hoc';
7
+ import { type DisableHoverAddProps } from '../legacy-table/disable-hover-hoc';
8
+ import { type SelectionItem } from '../global/table-selection';
9
9
  import { type FormattedItem, moreLessButtonStates } from './item';
10
10
  export interface DataListBaseProps<T extends SelectionItem> {
11
11
  data: readonly T[];
@@ -20,7 +20,7 @@ export interface DataListBaseProps<T extends SelectionItem> {
20
20
  type FocusableProps<T extends SelectionItem> = DataListBaseProps<T> & DisableHoverAddProps & FocusSensorOuterProps<HTMLDivElement> & SelectionShortcutsAddProps<T>;
21
21
  export type DataListContainerProps<T extends SelectionItem> = DataListBaseProps<T> & FocusSensorOuterProps<HTMLDivElement> & SelectionShortcutsOuterProps<T>;
22
22
  export default class DataListContainer<T extends SelectionItem> extends Component<DataListContainerProps<T>> {
23
- DataList: import("react").ComponentClass<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>, any>;
23
+ DataList: import("react").ComponentClass<import("../legacy-table/disable-hover-hoc").DisableHoverProps<import("../legacy-table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>, any>;
24
24
  render(): import("react").JSX.Element;
25
25
  }
26
26
  export {};
@@ -1,8 +1,8 @@
1
1
  import { Component, PureComponent } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import focusSensorHOC from '../global/focus-sensor-hoc.js';
4
- import selectionShortcutsHOC from '../table/selection-shortcuts-hoc.js';
5
- import disableHoverHOC from '../table/disable-hover-hoc.js';
4
+ import selectionShortcutsHOC from '../legacy-table/selection-shortcuts-hoc.js';
5
+ import disableHoverHOC from '../legacy-table/disable-hover-hoc.js';
6
6
  import getUID from '../global/get-uid.js';
7
7
  import Shortcuts from '../shortcuts/shortcuts.js';
8
8
  import Loader from '../loader/loader.js';
@@ -10,6 +10,7 @@ import Item, { moreLessButtonStates } from './item.js';
10
10
  import { s as styles } from '../_helpers/title.js';
11
11
  import { jsx, jsxs } from 'react/jsx-runtime';
12
12
  import '../global/compose-refs.js';
13
+ import 'react/compiler-runtime';
13
14
  import 'memoize-one';
14
15
  import 'core-js/modules/es.array.includes.js';
15
16
  import '../shortcuts/core.js';
@@ -28,11 +29,10 @@ import '../text/text.js';
28
29
  import '../loader-inline/loader-inline.js';
29
30
  import '../button/button.js';
30
31
  import '@jetbrains/icons/chevron-12px-down';
31
- import 'util-deprecate';
32
32
  import '../icon/icon.js';
33
+ import 'util-deprecate';
33
34
  import '../icon/icon.constants.js';
34
35
  import '../_helpers/icon-svg.js';
35
- import 'react-compiler-runtime';
36
36
  import '../global/memoize.js';
37
37
  import '../global/controls-height.js';
38
38
  import '../global/configuration.js';
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type SelectionItem } from '../table/selection';
2
+ import { type SelectionItem } from '../global/table-selection';
3
3
  export interface Item extends SelectionItem {
4
4
  title: ReactNode;
5
5
  collapsible?: boolean;
@@ -11,7 +11,7 @@ import '../icon/icon.js';
11
11
  import 'util-deprecate';
12
12
  import '../icon/icon.constants.js';
13
13
  import '../_helpers/icon-svg.js';
14
- import 'react-compiler-runtime';
14
+ import 'react/compiler-runtime';
15
15
  import '../global/memoize.js';
16
16
  import '../button/button.js';
17
17
  import '@jetbrains/icons/chevron-down';
@@ -1,5 +1,5 @@
1
1
  import { PureComponent, type ReactNode } from 'react';
2
- import { type SelectionItem } from '../table/selection';
2
+ import { type SelectionItem } from '../global/table-selection';
3
3
  import type Selection from './selection';
4
4
  export declare enum moreLessButtonStates {
5
5
  UNUSED = 0,
@@ -12,11 +12,11 @@ import '../global/data-tests.js';
12
12
  import '../link/clickable-link.js';
13
13
  import '../_helpers/link.js';
14
14
  import '@jetbrains/icons/chevron-12px-down';
15
- import 'util-deprecate';
16
15
  import '../icon/icon.js';
16
+ import 'util-deprecate';
17
17
  import '../icon/icon.constants.js';
18
18
  import '../_helpers/icon-svg.js';
19
- import 'react-compiler-runtime';
19
+ import 'react/compiler-runtime';
20
20
  import '../global/memoize.js';
21
21
  import '../global/controls-height.js';
22
22
  import '../global/configuration.js';
@@ -1,4 +1,4 @@
1
- import TableSelection, { type CloneWithConfig, type SelectionItem, type TableSelectionConfig } from '../table/selection';
1
+ import TableSelection, { type CloneWithConfig, type SelectionItem, type TableSelectionConfig } from '../global/table-selection';
2
2
  interface DataListSelectionConfig<T extends SelectionItem> extends TableSelectionConfig<T> {
3
3
  partialSelected?: Set<T> | undefined;
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import 'core-js/modules/es.array.includes.js';
2
- import Selection$1 from '../table/selection.js';
2
+ import TableSelection from '../global/table-selection.js';
3
3
 
4
- class Selection extends Selection$1 {
4
+ class Selection extends TableSelection {
5
5
  _partialSelected;
6
6
  constructor({
7
7
  partialSelected = new Set(),
@@ -6,6 +6,7 @@ import '../global/get-uid.js';
6
6
  export { T as default } from '../_helpers/title.js';
7
7
  import 'react/jsx-runtime';
8
8
  import '../global/compose-refs.js';
9
+ import 'react/compiler-runtime';
9
10
  import 'memoize-one';
10
11
  import '@jetbrains/icons/checkmark-12px';
11
12
  import '@jetbrains/icons/remove-12px';
@@ -13,7 +14,6 @@ import '../icon/icon.js';
13
14
  import 'util-deprecate';
14
15
  import '../icon/icon.constants.js';
15
16
  import '../_helpers/icon-svg.js';
16
- import 'react-compiler-runtime';
17
17
  import '../global/memoize.js';
18
18
  import '../control-help/control-help.js';
19
19
  import '../global/data-tests.js';
@@ -10,11 +10,11 @@ import '@jetbrains/icons/close-12px';
10
10
  import '../button/button.js';
11
11
  import '@jetbrains/icons/chevron-down';
12
12
  import '@jetbrains/icons/chevron-12px-down';
13
- import 'util-deprecate';
14
13
  import '../icon/icon.js';
14
+ import 'util-deprecate';
15
15
  import '../icon/icon.constants.js';
16
16
  import '../_helpers/icon-svg.js';
17
- import 'react-compiler-runtime';
17
+ import 'react/compiler-runtime';
18
18
  import '../global/memoize.js';
19
19
  import '../link/clickable-link.js';
20
20
  import '../_helpers/button.classes.js';
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { PureComponent } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { format } from 'date-fns/format';
@@ -72,10 +72,9 @@ import 'date-fns/getDate';
72
72
  import 'date-fns/isToday';
73
73
  import './consts.js';
74
74
  import 'date-fns/add';
75
- import './use-intersection-observer.js';
75
+ import '../global/intersection-observer-context.js';
76
76
  import './scroll-arith.js';
77
77
  import './use-scroll-behavior.js';
78
- import '../global/use-event-callback.js';
79
78
  import './years.js';
80
79
  import 'date-fns/addYears';
81
80
  import 'date-fns/getYear';
@@ -20,11 +20,11 @@ import '@jetbrains/icons/close-12px';
20
20
  import '../button/button.js';
21
21
  import '@jetbrains/icons/chevron-down';
22
22
  import '@jetbrains/icons/chevron-12px-down';
23
- import 'util-deprecate';
24
23
  import '../icon/icon.js';
24
+ import 'util-deprecate';
25
25
  import '../icon/icon.constants.js';
26
26
  import '../_helpers/icon-svg.js';
27
- import 'react-compiler-runtime';
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';
@@ -47,10 +47,9 @@ import 'date-fns/addDays';
47
47
  import 'date-fns/getDate';
48
48
  import 'date-fns/isSameDay';
49
49
  import 'date-fns/isToday';
50
- import './use-intersection-observer.js';
50
+ import '../global/intersection-observer-context.js';
51
51
  import './scroll-arith.js';
52
52
  import './use-scroll-behavior.js';
53
- import '../global/use-event-callback.js';
54
53
  import '../global/schedule-raf.js';
55
54
  import 'date-fns/addYears';
56
55
  import 'date-fns/getYear';
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { PureComponent } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { format } from 'date-fns/format';
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { useState } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { addYears } from 'date-fns/addYears';
@@ -1,9 +1,7 @@
1
1
  import { type Locale } from 'date-fns';
2
2
  import { type MonthsProps } from './consts';
3
- import { type IntersectionObserverHandle } from './use-intersection-observer';
4
3
  export interface MonthProps extends MonthsProps {
5
4
  month: Date;
6
- intersectionObserverHandle: IntersectionObserverHandle | null;
7
5
  }
8
6
  export default function Month(props: MonthProps): import("react").JSX.Element;
9
7
  export declare function getMonthHeight(monthStart: Date | number, locale: Locale | undefined): number;
@@ -1,11 +1,11 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { format } from 'date-fns/format';
3
3
  import { getDay } from 'date-fns/getDay';
4
4
  import { getDaysInMonth, setDate } from 'date-fns';
5
5
  import { useRef, createElement } from 'react';
6
6
  import Day from './day.js';
7
7
  import units, { getWeekStartsOn, WEEK } from './consts.js';
8
- import { useVisibility } from './use-intersection-observer.js';
8
+ import { useIsIntersecting } from '../global/intersection-observer-context.js';
9
9
  import { s as styles } from '../_helpers/date-picker.js';
10
10
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
11
  import 'core-js/modules/es.array.includes.js';
@@ -23,34 +23,33 @@ import 'sniffr';
23
23
 
24
24
  function Month(props) {
25
25
  const $ = c(13);
26
- if ($[0] !== "2f6fe4553edaada7486df2c003273bf4ae27149a404d6c91c9c721f7d6c02b8b") {
26
+ if ($[0] !== "f69b6ec913368865656f465501e81a8f3fab6df87b3d741c6b878c75ad08c0c9") {
27
27
  for (let $i = 0; $i < 13; $i += 1) {
28
28
  $[$i] = Symbol.for("react.memo_cache_sentinel");
29
29
  }
30
- $[0] = "2f6fe4553edaada7486df2c003273bf4ae27149a404d6c91c9c721f7d6c02b8b";
30
+ $[0] = "f69b6ec913368865656f465501e81a8f3fab6df87b3d741c6b878c75ad08c0c9";
31
31
  }
32
32
  const {
33
33
  month,
34
- locale,
35
- intersectionObserverHandle
34
+ locale
36
35
  } = props;
37
36
  const containerRef = useRef(null);
38
- const visible = useVisibility(intersectionObserverHandle, containerRef);
37
+ const isIntersecting = useIsIntersecting(containerRef);
39
38
  let t0;
40
- if ($[1] !== locale || $[2] !== month || $[3] !== visible) {
41
- t0 = visible ? {} : {
39
+ if ($[1] !== isIntersecting || $[2] !== locale || $[3] !== month) {
40
+ t0 = isIntersecting ? {} : {
42
41
  height: getMonthHeight(month, locale)
43
42
  };
44
- $[1] = locale;
45
- $[2] = month;
46
- $[3] = visible;
43
+ $[1] = isIntersecting;
44
+ $[2] = locale;
45
+ $[3] = month;
47
46
  $[4] = t0;
48
47
  } else {
49
48
  t0 = $[4];
50
49
  }
51
50
  let t1;
52
- if ($[5] !== locale || $[6] !== month || $[7] !== props || $[8] !== visible) {
53
- t1 = visible && /*#__PURE__*/jsxs(Fragment, {
51
+ if ($[5] !== isIntersecting || $[6] !== locale || $[7] !== month || $[8] !== props) {
52
+ t1 = isIntersecting && /*#__PURE__*/jsxs(Fragment, {
54
53
  children: [/*#__PURE__*/jsx("span", {
55
54
  className: styles.monthTitle,
56
55
  children: format(month, "LLLL", {
@@ -72,10 +71,10 @@ function Month(props) {
72
71
  key: i_0
73
72
  }))]
74
73
  });
75
- $[5] = locale;
76
- $[6] = month;
77
- $[7] = props;
78
- $[8] = visible;
74
+ $[5] = isIntersecting;
75
+ $[6] = locale;
76
+ $[7] = month;
77
+ $[8] = props;
79
78
  $[9] = t1;
80
79
  } else {
81
80
  t1 = $[9];
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
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';
@@ -6,7 +6,7 @@ import units from './consts.js';
6
6
  import { ScrollArith } from './scroll-arith.js';
7
7
  import { useScrollBehavior } from './use-scroll-behavior.js';
8
8
  import scheduleRAF from '../global/schedule-raf.js';
9
- import { useIntersectionObserver } from './use-intersection-observer.js';
9
+ import { useIntersectionObserverHandle, IntersectionObserverContext } from '../global/intersection-observer-context.js';
10
10
  import { s as styles } from '../_helpers/date-picker.js';
11
11
  import { createElement } from 'react';
12
12
  import { jsx } from 'react/jsx-runtime';
@@ -26,8 +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
- import 'util-deprecate';
31
29
 
32
30
  function getMonthHeightWithMargin(date, locale) {
33
31
  return units.unit * 2 + getMonthHeight(date, locale);
@@ -45,16 +43,16 @@ const scheduleScroll = scheduleRAF();
45
43
  *
46
44
  * To avoid an unpainted gap at the viewport boundary, the next month must be reported
47
45
  * as visible slightly before it actually enters the viewport. We achieve this by
48
- * extending the IntersectionObserver scrollMargin.
46
+ * extending the IntersectionObserver rootMargin.
49
47
  */
50
- const intersectionObserverScrollMargin = units.cellSize * 2;
48
+ const intersectionObserverRootMargin = units.cellSize * 2;
51
49
  function Months(props) {
52
- const $ = c(11);
53
- if ($[0] !== "4aa546d8594d34e20d23ddb1ac60f352dda8d4f0089b69b199ba5199e1f35dd5") {
54
- for (let $i = 0; $i < 11; $i += 1) {
50
+ const $ = c(12);
51
+ if ($[0] !== "b514d0ab3a898922fd1a8992e74c2054d3bf131f57e16e7ad928f67f5c608db9") {
52
+ for (let $i = 0; $i < 12; $i += 1) {
55
53
  $[$i] = Symbol.for("react.memo_cache_sentinel");
56
54
  }
57
- $[0] = "4aa546d8594d34e20d23ddb1ac60f352dda8d4f0089b69b199ba5199e1f35dd5";
55
+ $[0] = "b514d0ab3a898922fd1a8992e74c2054d3bf131f57e16e7ad928f67f5c608db9";
58
56
  }
59
57
  const {
60
58
  scrollDate,
@@ -65,46 +63,55 @@ function Months(props) {
65
63
  containerRef,
66
64
  items
67
65
  } = useScrollBehavior(scrollDate, setScrollDate, locale, "monthsScroll", scrollArith, scheduleScroll);
68
- const intersectionObserverHandle = useIntersectionObserver(containerRef, intersectionObserverScrollMargin);
69
- let t0;
70
- if ($[1] !== intersectionObserverHandle || $[2] !== items || $[3] !== props) {
71
- let t1;
72
- if ($[5] !== intersectionObserverHandle || $[6] !== props) {
73
- t1 = month => /*#__PURE__*/createElement(Month, {
66
+ const t0 = useIntersectionObserverHandle(containerRef, intersectionObserverRootMargin);
67
+ let t1;
68
+ if ($[1] !== items || $[2] !== props) {
69
+ let t2;
70
+ if ($[4] !== props) {
71
+ t2 = month => /*#__PURE__*/createElement(Month, {
74
72
  ...props,
75
73
  month: month,
76
- key: +month,
77
- intersectionObserverHandle: intersectionObserverHandle
74
+ key: +month
78
75
  });
79
- $[5] = intersectionObserverHandle;
80
- $[6] = props;
81
- $[7] = t1;
76
+ $[4] = props;
77
+ $[5] = t2;
82
78
  } else {
83
- t1 = $[7];
79
+ t2 = $[5];
84
80
  }
85
- t0 = items.map(t1);
86
- $[1] = intersectionObserverHandle;
87
- $[2] = items;
88
- $[3] = props;
89
- $[4] = t0;
81
+ t1 = items.map(t2);
82
+ $[1] = items;
83
+ $[2] = props;
84
+ $[3] = t1;
90
85
  } else {
91
- t0 = $[4];
86
+ t1 = $[3];
92
87
  }
93
- let t1;
94
- if ($[8] !== containerRef || $[9] !== t0) {
95
- t1 = /*#__PURE__*/jsx("div", {
88
+ let t2;
89
+ if ($[6] !== containerRef || $[7] !== t1) {
90
+ t2 = /*#__PURE__*/jsx("div", {
96
91
  className: styles.months,
97
92
  ref: containerRef,
98
93
  "data-test": "ring-date-popup--months",
99
- children: t0
94
+ children: t1
95
+ });
96
+ $[6] = containerRef;
97
+ $[7] = t1;
98
+ $[8] = t2;
99
+ } else {
100
+ t2 = $[8];
101
+ }
102
+ let t3;
103
+ if ($[9] !== t0 || $[10] !== t2) {
104
+ t3 = /*#__PURE__*/jsx(IntersectionObserverContext, {
105
+ value: t0,
106
+ children: t2
100
107
  });
101
- $[8] = containerRef;
102
108
  $[9] = t0;
103
- $[10] = t1;
109
+ $[10] = t2;
110
+ $[11] = t3;
104
111
  } else {
105
- t1 = $[10];
112
+ t3 = $[11];
106
113
  }
107
- return t1;
114
+ return t3;
108
115
  }
109
116
 
110
117
  export { Months as default };