@jetbrains/ring-ui-built 7.0.124 → 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 (262) hide show
  1. package/components/_helpers/anchor.js +1 -1
  2. package/components/_helpers/avatar-info.js +3 -5
  3. package/components/_helpers/caption.js +1 -1
  4. package/components/_helpers/icon-svg.js +37 -52
  5. package/components/_helpers/legacy-table.js +3 -0
  6. package/components/_helpers/tab-link.js +1 -1
  7. package/components/_helpers/table.js +2 -2
  8. package/components/_helpers/theme.js +49 -37
  9. package/components/alert/alert-actions.js +1 -1
  10. package/components/alert/alert-heading.js +1 -1
  11. package/components/alert/alert.js +2 -2
  12. package/components/alert-service/alert-service.js +2 -2
  13. package/components/auth/auth-core.js +2 -2
  14. package/components/auth/auth.js +2 -2
  15. package/components/auth/down-notification.js +2 -2
  16. package/components/auth/iframe-flow.js +1 -1
  17. package/components/auth/storage.js +2 -2
  18. package/components/auth-dialog/auth-dialog.js +2 -2
  19. package/components/auth-dialog-service/auth-dialog-service.js +2 -2
  20. package/components/avatar/avatar-info.js +1 -1
  21. package/components/avatar/avatar-size.d.ts +0 -4
  22. package/components/avatar/avatar-size.js +0 -4
  23. package/components/avatar/avatar.js +1 -8
  24. package/components/avatar/fallback-avatar.js +3 -48
  25. package/components/avatar-stack/avatar-stack.js +5 -5
  26. package/components/banner/banner.js +2 -2
  27. package/components/button/button.d.ts +0 -4
  28. package/components/button/button.js +4 -10
  29. package/components/button-group/button-group.js +1 -1
  30. package/components/button-toolbar/button-toolbar.js +1 -1
  31. package/components/checkbox/checkbox.d.ts +1 -1
  32. package/components/checkbox/checkbox.js +1 -2
  33. package/components/clipboard/clipboard.js +2 -2
  34. package/components/collapse/collapse-content.js +35 -43
  35. package/components/collapse/collapse-context.d.ts +1 -0
  36. package/components/collapse/collapse-context.js +1 -0
  37. package/components/collapse/collapse-control.js +5 -5
  38. package/components/collapse/collapse.js +34 -25
  39. package/components/collapsible-group/collapsible-group.d.ts +5 -1
  40. package/components/collapsible-group/collapsible-group.js +80 -98
  41. package/components/components/util-stories.js +63 -1
  42. package/components/confirm/confirm.js +2 -2
  43. package/components/confirm-service/confirm-service.js +4 -4
  44. package/components/contenteditable/contenteditable.js +4 -5
  45. package/components/control-help/control-help.js +1 -1
  46. package/components/control-label/control-label.js +1 -1
  47. package/components/data-list/data-list.d.ts +4 -4
  48. package/components/data-list/data-list.js +5 -5
  49. package/components/data-list/data-list.mock.d.ts +1 -1
  50. package/components/data-list/data-list.mock.js +2 -2
  51. package/components/data-list/item.d.ts +1 -1
  52. package/components/data-list/item.js +3 -3
  53. package/components/data-list/selection.d.ts +1 -1
  54. package/components/data-list/selection.js +2 -2
  55. package/components/data-list/title.js +1 -2
  56. package/components/date-picker/date-input.js +2 -2
  57. package/components/date-picker/date-picker.js +2 -3
  58. package/components/date-picker/date-popup.js +4 -5
  59. package/components/date-picker/month-names.js +1 -1
  60. package/components/date-picker/month-slider.js +1 -1
  61. package/components/date-picker/month.d.ts +0 -2
  62. package/components/date-picker/month.js +17 -18
  63. package/components/date-picker/months.js +43 -36
  64. package/components/date-picker/use-scroll-behavior.js +45 -45
  65. package/components/date-picker/weekdays.js +1 -1
  66. package/components/date-picker/years.js +61 -55
  67. package/components/dialog/dialog.d.ts +2 -2
  68. package/components/dialog/dialog.js +5 -5
  69. package/components/dropdown/anchor.js +3 -3
  70. package/components/dropdown/dropdown.js +3 -3
  71. package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
  72. package/components/dropdown-menu/dropdown-menu.js +63 -58
  73. package/components/editable-heading/editable-heading.d.ts +1 -2
  74. package/components/editable-heading/editable-heading.js +14 -13
  75. package/components/error-bubble/error-bubble.js +1 -1
  76. package/components/error-message/error-message.js +1 -2
  77. package/components/footer/footer.js +1 -1
  78. package/components/global/compose-refs.d.ts +2 -1
  79. package/components/global/compose-refs.js +44 -8
  80. package/components/global/configuration.d.ts +0 -5
  81. package/components/global/configuration.js +2 -10
  82. package/components/global/controls-height.js +1 -1
  83. package/components/global/create-stateful-context.js +11 -11
  84. package/components/global/focus-sensor-hoc.js +1 -0
  85. package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
  86. package/components/global/focus-with-temporary-tabindex.js +23 -0
  87. package/components/global/intersection-observer-context.d.ts +46 -0
  88. package/components/global/intersection-observer-context.js +138 -0
  89. package/components/global/is-within-interactive-element.d.ts +6 -0
  90. package/components/global/is-within-interactive-element.js +11 -0
  91. package/components/global/is-within-navigable-element.d.ts +6 -0
  92. package/components/global/is-within-navigable-element.js +11 -0
  93. package/components/global/parse-css-duration.d.ts +5 -0
  94. package/components/global/parse-css-duration.js +14 -0
  95. package/components/global/rerender-hoc.d.ts +4 -2
  96. package/components/global/rerender-hoc.js +11 -24
  97. package/components/global/schedule-with-cleanup.d.ts +12 -0
  98. package/components/global/schedule-with-cleanup.js +36 -0
  99. package/components/{table/selection.d.ts → global/table-selection.d.ts} +15 -15
  100. package/components/{table/selection.js → global/table-selection.js} +5 -5
  101. package/components/global/theme.d.ts +4 -3
  102. package/components/global/theme.js +1 -1
  103. package/components/global/variables.interface.d.ts +0 -4
  104. package/components/header/header-icon.js +3 -3
  105. package/components/header/header.js +3 -3
  106. package/components/header/links.js +1 -1
  107. package/components/header/logo.js +1 -2
  108. package/components/header/profile.js +5 -5
  109. package/components/header/services.js +3 -3
  110. package/components/header/smart-profile.js +3 -3
  111. package/components/header/smart-services.js +3 -3
  112. package/components/heading/heading.js +1 -1
  113. package/components/i18n/i18n-context.js +4 -4
  114. package/components/icon/icon-svg.js +1 -2
  115. package/components/icon/icon.d.ts +0 -1
  116. package/components/icon/icon.js +2 -6
  117. package/components/icon/index.js +1 -2
  118. package/components/input/input.d.ts +1 -1
  119. package/components/input/input.js +3 -3
  120. package/components/internal/reorder-animation-context.js +159 -0
  121. package/components/internal/reorder-handle.js +750 -0
  122. package/components/internal/reorder-layout-context.js +141 -0
  123. package/components/internal/table-header.js +685 -0
  124. package/components/internal/virtualization.js +368 -0
  125. package/components/island/adaptive-island-hoc.js +3 -3
  126. package/components/island/content.d.ts +7 -2
  127. package/components/island/content.js +27 -18
  128. package/components/island/header.js +1 -1
  129. package/components/island/island.js +1 -1
  130. package/components/{table → legacy-table}/cell.js +1 -1
  131. package/components/{table → legacy-table}/header-cell.js +2 -3
  132. package/components/{table → legacy-table}/header.js +2 -3
  133. package/components/{table → legacy-table}/multitable.d.ts +1 -1
  134. package/components/{table → legacy-table}/row-with-focus-sensor.js +3 -3
  135. package/components/{table → legacy-table}/row.d.ts +1 -1
  136. package/components/{table → legacy-table}/row.js +5 -5
  137. package/components/legacy-table/selection-adapter.d.ts +6 -0
  138. package/components/{table → legacy-table}/selection-shortcuts-hoc.d.ts +5 -5
  139. package/components/{table → legacy-table}/simple-table.d.ts +2 -2
  140. package/components/{table → legacy-table}/simple-table.js +5 -5
  141. package/components/{table → legacy-table}/smart-table.d.ts +5 -5
  142. package/components/{table → legacy-table}/smart-table.js +6 -6
  143. package/components/legacy-table/table.d.ts +109 -0
  144. package/components/legacy-table/table.js +369 -0
  145. package/components/list/consts.d.ts +0 -1
  146. package/components/list/consts.js +0 -1
  147. package/components/list/list-item.js +3 -5
  148. package/components/list/list-users-groups-source.js +1 -2
  149. package/components/list/list.d.ts +0 -4
  150. package/components/list/list.js +1 -2
  151. package/components/login-dialog/login-dialog.js +3 -3
  152. package/components/login-dialog/service.js +2 -2
  153. package/components/message/message.js +1 -1
  154. package/components/pager/pager.js +3 -3
  155. package/components/popup/popup.js +1 -1
  156. package/components/popup/popup.target.d.ts +3 -2
  157. package/components/popup/popup.target.js +32 -28
  158. package/components/popup-menu/popup-menu.js +1 -1
  159. package/components/query-assist/query-assist-suggestions.js +1 -2
  160. package/components/query-assist/query-assist.d.ts +3 -1
  161. package/components/query-assist/query-assist.js +2 -2
  162. package/components/radio/radio-item.d.ts +3 -3
  163. package/components/radio/radio-item.js +33 -19
  164. package/components/radio/radio.d.ts +2 -2
  165. package/components/radio/radio.js +2 -2
  166. package/components/scrollable-section/scrollable-section.js +1 -1
  167. package/components/select/chevron-button.js +3 -3
  168. package/components/select/select-filter.js +3 -3
  169. package/components/select/select-popup.d.ts +3 -2
  170. package/components/select/select-popup.js +9 -4
  171. package/components/select/select.d.ts +6 -2
  172. package/components/select/select.js +5 -4
  173. package/components/selection-toolbar/selection-toolbar.d.ts +11 -0
  174. package/components/selection-toolbar/selection-toolbar.js +200 -0
  175. package/components/slider/slider.js +100 -97
  176. package/components/storage/storage-local.js +2 -2
  177. package/components/storage/storage.js +2 -2
  178. package/components/style.css +1 -1
  179. package/components/tab-trap/tab-trap.d.ts +3 -3
  180. package/components/tab-trap/tab-trap.js +83 -80
  181. package/components/table/default-item-renderer.d.ts +55 -0
  182. package/components/table/default-item-renderer.js +240 -0
  183. package/components/table/internal/reorder-animation-context.d.ts +21 -0
  184. package/components/table/internal/reorder-handle.d.ts +9 -0
  185. package/components/table/internal/reorder-layout-context.d.ts +16 -0
  186. package/components/table/internal/table-header.d.ts +1 -0
  187. package/components/table/internal/virtualization.d.ts +41 -0
  188. package/components/table/item-virtualization.d.ts +37 -0
  189. package/components/table/item-virtualization.js +73 -0
  190. package/components/table/reorder-animation.d.ts +37 -0
  191. package/components/table/reorder-animation.js +18 -0
  192. package/components/table/reorder-item-layout.d.ts +32 -0
  193. package/components/table/reorder-item-layout.js +57 -0
  194. package/components/table/table-const.d.ts +10 -0
  195. package/components/table/table-const.js +13 -0
  196. package/components/table/table-primitives.d.ts +64 -0
  197. package/components/table/table-primitives.js +180 -0
  198. package/components/table/table-props.d.ts +304 -0
  199. package/components/table/table-props.js +1 -0
  200. package/components/table/table.d.ts +231 -107
  201. package/components/table/table.js +351 -346
  202. package/components/tabs/collapsible-more.js +1 -1
  203. package/components/tabs/collapsible-tab.js +1 -1
  204. package/components/tabs/collapsible-tabs.js +1 -1
  205. package/components/tabs/dumb-tabs.js +1 -1
  206. package/components/tabs/smart-tabs.js +1 -1
  207. package/components/tabs/tab-link.js +1 -1
  208. package/components/tabs/tabs.js +1 -1
  209. package/components/tag/tag.js +1 -1
  210. package/components/tags-input/tags-input.d.ts +3 -1
  211. package/components/tags-input/tags-input.js +4 -4
  212. package/components/tags-list/tags-list.js +2 -2
  213. package/components/toggle/toggle.js +1 -1
  214. package/components/tooltip/tooltip.d.ts +2 -1
  215. package/components/tooltip/tooltip.js +5 -3
  216. package/components/upload/upload.d.ts +4 -3
  217. package/components/upload/upload.js +7 -30
  218. package/components/user-agreement/service.js +3 -3
  219. package/components/user-agreement/user-agreement.js +2 -2
  220. package/components/user-card/card.js +4 -4
  221. package/components/user-card/smart-user-card-tooltip.js +3 -3
  222. package/components/user-card/tooltip.js +3 -3
  223. package/components/user-card/user-card.js +5 -5
  224. package/components/util-stories.d.ts +26 -0
  225. package/package.json +8 -9
  226. package/components/__mocks__/old-browsers-message.js +0 -3
  227. package/components/_helpers/grid.js +0 -3
  228. package/components/_helpers/sidebar.js +0 -110
  229. package/components/content-layout/content-layout.d.ts +0 -20
  230. package/components/content-layout/content-layout.js +0 -50
  231. package/components/content-layout/sidebar.d.ts +0 -26
  232. package/components/content-layout/sidebar.js +0 -5
  233. package/components/date-picker/use-intersection-observer.d.ts +0 -6
  234. package/components/date-picker/use-intersection-observer.js +0 -93
  235. package/components/expand/collapsible-group.d.ts +0 -8
  236. package/components/expand/collapsible-group.js +0 -52
  237. package/components/global/composeRefs.d.ts +0 -6
  238. package/components/global/composeRefs.js +0 -9
  239. package/components/global/use-event-callback.d.ts +0 -4
  240. package/components/global/use-event-callback.js +0 -49
  241. package/components/grid/col.d.ts +0 -16
  242. package/components/grid/col.js +0 -63
  243. package/components/grid/grid.d.ts +0 -13
  244. package/components/grid/grid.js +0 -27
  245. package/components/grid/row.d.ts +0 -21
  246. package/components/grid/row.js +0 -72
  247. package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
  248. package/components/old-browsers-message/old-browsers-message-stop.js +0 -5
  249. package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
  250. package/components/old-browsers-message/old-browsers-message.js +0 -89
  251. package/components/old-browsers-message/white-list.d.ts +0 -2
  252. package/components/old-browsers-message/white-list.js +0 -30
  253. package/components/table/selection-adapter.d.ts +0 -6
  254. /package/components/{table → legacy-table}/cell.d.ts +0 -0
  255. /package/components/{table → legacy-table}/disable-hover-hoc.d.ts +0 -0
  256. /package/components/{table → legacy-table}/disable-hover-hoc.js +0 -0
  257. /package/components/{table → legacy-table}/header-cell.d.ts +0 -0
  258. /package/components/{table → legacy-table}/header.d.ts +0 -0
  259. /package/components/{table → legacy-table}/multitable.js +0 -0
  260. /package/components/{table → legacy-table}/row-with-focus-sensor.d.ts +0 -0
  261. /package/components/{table → legacy-table}/selection-adapter.js +0 -0
  262. /package/components/{table → legacy-table}/selection-shortcuts-hoc.js +0 -0
@@ -1,6 +1,7 @@
1
1
  import { Component } from 'react';
2
2
  import { createComposedRef } from './compose-refs.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
+ import 'react/compiler-runtime';
4
5
  import 'memoize-one';
5
6
 
6
7
  function focusSensorHOC(ComposedComponent) {
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Focuses an element, temporarily adding `tabindex="0"` if necessary.
3
+ *
4
+ * If the element does not already have a `tabindex` attribute, one is
5
+ * added before focusing and automatically removed when the element loses
6
+ * focus.
7
+ *
8
+ * This is useful when implementing roving tabindex patterns on elements
9
+ * that are not normally focusable.
10
+ */
11
+ export declare function focusWithTemporaryTabIndex(element: HTMLElement): void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Focuses an element, temporarily adding `tabindex="0"` if necessary.
3
+ *
4
+ * If the element does not already have a `tabindex` attribute, one is
5
+ * added before focusing and automatically removed when the element loses
6
+ * focus.
7
+ *
8
+ * This is useful when implementing roving tabindex patterns on elements
9
+ * that are not normally focusable.
10
+ */
11
+ function focusWithTemporaryTabIndex(element) {
12
+ if (!element.hasAttribute('tabindex')) {
13
+ element.tabIndex = 0;
14
+ function onBlur() {
15
+ element.removeAttribute('tabindex');
16
+ element.removeEventListener('blur', onBlur);
17
+ }
18
+ element.addEventListener('blur', onBlur);
19
+ }
20
+ element.focus();
21
+ }
22
+
23
+ export { focusWithTemporaryTabIndex };
@@ -0,0 +1,46 @@
1
+ import { type RefObject } from 'react';
2
+ /**
3
+ * Provides access to a shared `IntersectionObserver` instance
4
+ * via the {@link IntersectionObserverContext} context.
5
+ *
6
+ * @see IntersectionObserverContext
7
+ */
8
+ export interface IntersectionObserverHandle {
9
+ /**
10
+ * Starts observing an element.
11
+ *
12
+ * Returns a cleanup function that stops observing it.
13
+ */
14
+ observe(element: Element, isIntersecting: (isIntersecting: boolean) => void): () => void;
15
+ }
16
+ /**
17
+ * Multiple components can share a single `IntersectionObserver` instance through this context.
18
+ *
19
+ * Usage:
20
+ *
21
+ * ```tsx
22
+ * <IntersectionObserverContext value={useIntersectionObserverHandle()}>
23
+ * <YourComponent />
24
+ * </IntersectionObserverContext>
25
+ *
26
+ * function YourComponent() {
27
+ * // Contains the current isIntersecting value
28
+ * const isIntersecting = useIsIntersecting(elementRef);
29
+ *
30
+ * // Or, to manually work with the IntersectionObserverHandle:
31
+ * const handle = use(IntersectionObserverContext);
32
+ * useEffect(() => {
33
+ * return handle.observe(elementRef.current, isIntersecting => { ... })
34
+ * })
35
+ * }
36
+ * ```
37
+ */
38
+ export declare const IntersectionObserverContext: import("react").Context<IntersectionObserverHandle>;
39
+ /**
40
+ * Creates an IntersectionObserverHandle suitable for {@link IntersectionObserverContext}.
41
+ */
42
+ export declare function useIntersectionObserverHandle(rootRef?: RefObject<HTMLElement | null>, rootMargin?: number, scrollMargin?: number): IntersectionObserverHandle;
43
+ /**
44
+ * Returns whether the referenced element is currently intersecting.
45
+ */
46
+ export declare function useIsIntersecting(elementRef: RefObject<Element | null>): boolean;
@@ -0,0 +1,138 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useState, useEffect, use, createContext } from 'react';
3
+
4
+ /**
5
+ * @internal
6
+ */
7
+ const noopIntersectionObserverHandle = {
8
+ observe: () => () => {}
9
+ };
10
+ /**
11
+ * Multiple components can share a single `IntersectionObserver` instance through this context.
12
+ *
13
+ * Usage:
14
+ *
15
+ * ```tsx
16
+ * <IntersectionObserverContext value={useIntersectionObserverHandle()}>
17
+ * <YourComponent />
18
+ * </IntersectionObserverContext>
19
+ *
20
+ * function YourComponent() {
21
+ * // Contains the current isIntersecting value
22
+ * const isIntersecting = useIsIntersecting(elementRef);
23
+ *
24
+ * // Or, to manually work with the IntersectionObserverHandle:
25
+ * const handle = use(IntersectionObserverContext);
26
+ * useEffect(() => {
27
+ * return handle.observe(elementRef.current, isIntersecting => { ... })
28
+ * })
29
+ * }
30
+ * ```
31
+ */
32
+ const IntersectionObserverContext = /*#__PURE__*/createContext(noopIntersectionObserverHandle);
33
+ /**
34
+ * Creates an IntersectionObserverHandle suitable for {@link IntersectionObserverContext}.
35
+ */
36
+ function useIntersectionObserverHandle(rootRef, rootMargin, scrollMargin) {
37
+ const $ = c(6);
38
+ if ($[0] !== "22e72f21c77e0579b51b95d0c9cf49c7e0027190e5186ad64aa7f2054bb7eb35") {
39
+ for (let $i = 0; $i < 6; $i += 1) {
40
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
41
+ }
42
+ $[0] = "22e72f21c77e0579b51b95d0c9cf49c7e0027190e5186ad64aa7f2054bb7eb35";
43
+ }
44
+ const [handle, setHandle] = useState(noopIntersectionObserverHandle);
45
+ let t0;
46
+ let t1;
47
+ if ($[1] !== rootMargin || $[2] !== rootRef || $[3] !== scrollMargin) {
48
+ t0 = () => {
49
+ const root = rootRef?.current;
50
+ const callbacksByElement = new Map();
51
+ const observer = new IntersectionObserver(entries => {
52
+ for (const entry of entries) {
53
+ const callbacks = callbacksByElement.get(entry.target);
54
+ callbacks?.forEach(cb => cb(entry.isIntersecting));
55
+ }
56
+ }, {
57
+ root,
58
+ rootMargin: rootMargin != null ? `${rootMargin}px` : undefined,
59
+ scrollMargin: scrollMargin != null ? `${scrollMargin}px` : undefined
60
+ });
61
+ setHandle({
62
+ observe(element, onChange) {
63
+ if (!callbacksByElement.has(element)) {
64
+ callbacksByElement.set(element, []);
65
+ observer.observe(element);
66
+ }
67
+ callbacksByElement.get(element).push(onChange);
68
+ return () => {
69
+ const callbacks_0 = callbacksByElement.get(element);
70
+ if (!callbacks_0) {
71
+ return;
72
+ }
73
+ const index = callbacks_0.indexOf(onChange);
74
+ if (index !== -1) {
75
+ callbacks_0.splice(index, 1);
76
+ }
77
+ if (!callbacks_0.length) {
78
+ callbacksByElement.delete(element);
79
+ observer.unobserve(element);
80
+ }
81
+ };
82
+ }
83
+ });
84
+ return () => {
85
+ observer.disconnect();
86
+ setHandle(noopIntersectionObserverHandle);
87
+ };
88
+ };
89
+ t1 = [rootRef, rootMargin, scrollMargin];
90
+ $[1] = rootMargin;
91
+ $[2] = rootRef;
92
+ $[3] = scrollMargin;
93
+ $[4] = t0;
94
+ $[5] = t1;
95
+ } else {
96
+ t0 = $[4];
97
+ t1 = $[5];
98
+ }
99
+ useEffect(t0, t1);
100
+ return handle;
101
+ }
102
+ /**
103
+ * Returns whether the referenced element is currently intersecting.
104
+ */
105
+ function useIsIntersecting(elementRef) {
106
+ const $ = c(5);
107
+ if ($[0] !== "22e72f21c77e0579b51b95d0c9cf49c7e0027190e5186ad64aa7f2054bb7eb35") {
108
+ for (let $i = 0; $i < 5; $i += 1) {
109
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
110
+ }
111
+ $[0] = "22e72f21c77e0579b51b95d0c9cf49c7e0027190e5186ad64aa7f2054bb7eb35";
112
+ }
113
+ const handle = use(IntersectionObserverContext);
114
+ const [isIntersecting, setIsIntersecting] = useState(false);
115
+ let t0;
116
+ let t1;
117
+ if ($[1] !== elementRef || $[2] !== handle) {
118
+ t0 = () => {
119
+ const element = elementRef.current;
120
+ if (!element) {
121
+ return;
122
+ }
123
+ return handle.observe(element, setIsIntersecting);
124
+ };
125
+ t1 = [handle, elementRef];
126
+ $[1] = elementRef;
127
+ $[2] = handle;
128
+ $[3] = t0;
129
+ $[4] = t1;
130
+ } else {
131
+ t0 = $[3];
132
+ t1 = $[4];
133
+ }
134
+ useEffect(t0, t1);
135
+ return isIntersecting;
136
+ }
137
+
138
+ export { IntersectionObserverContext, useIntersectionObserverHandle, useIsIntersecting };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * If this function returns `false`, the event may be interpreted as a click
3
+ * or tap on a "empty space" rather than on an interactive element such as
4
+ * a button or a link.
5
+ */
6
+ export declare function isWithinInteractiveElement(target: EventTarget | null): boolean;
@@ -0,0 +1,11 @@
1
+ const interactiveSelector = ['a', 'button', 'details', 'input', 'label', 'option', 'select', 'summary', 'textarea', '[contenteditable]', '[role="button"]', '[role="checkbox"]', '[role="link"]', '[role="radio"]', '[role="switch"]', '[role="tab"]'].join();
2
+ /**
3
+ * If this function returns `false`, the event may be interpreted as a click
4
+ * or tap on a "empty space" rather than on an interactive element such as
5
+ * a button or a link.
6
+ */
7
+ function isWithinInteractiveElement(target) {
8
+ return target instanceof Element && target.closest(interactiveSelector) != null;
9
+ }
10
+
11
+ export { isWithinInteractiveElement };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns whether the event target is within an element that is expected to
3
+ * handle keyboard navigation itself, so container-level keyboard shortcuts
4
+ * should generally be ignored.
5
+ */
6
+ export declare function isWithinNavigableElement(target: EventTarget | null): boolean;
@@ -0,0 +1,11 @@
1
+ const navigableSelector = ['input:not([type="button"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="reset"]):not([type="submit"])', 'textarea', 'select', '[contenteditable]', '[role="combobox"]', '[role="grid"]', '[role="listbox"]', '[role="menu"]', '[role="menubar"]', '[role="radiogroup"]', '[role="searchbox"]', '[role="slider"]', '[role="spinbutton"]', '[role="tablist"]', '[role="textbox"]', '[role="tree"]', '[role="treegrid"]'].join();
2
+ /**
3
+ * Returns whether the event target is within an element that is expected to
4
+ * handle keyboard navigation itself, so container-level keyboard shortcuts
5
+ * should generally be ignored.
6
+ */
7
+ function isWithinNavigableElement(target) {
8
+ return target instanceof Element && target.closest(navigableSelector) != null;
9
+ }
10
+
11
+ export { isWithinNavigableElement };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Parses a CSS duration string (e.g., "500ms", "2s") and returns the duration in milliseconds.
3
+ * Returns the `defaultVal` if the input string is not a valid CSS duration.
4
+ */
5
+ export declare function parseCssDuration(duration: string, defaultVal?: number): number;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Parses a CSS duration string (e.g., "500ms", "2s") and returns the duration in milliseconds.
3
+ * Returns the `defaultVal` if the input string is not a valid CSS duration.
4
+ */
5
+ function parseCssDuration(duration, defaultVal = 0) {
6
+ const match = duration.match(/(\d+(\.\d+)?)(s|ms)/);
7
+ if (!match) return defaultVal;
8
+ const value = parseFloat(match[1]);
9
+ const unit = match[3];
10
+ // eslint-disable-next-line no-magic-numbers
11
+ return unit === 's' ? value * 1000 : value;
12
+ }
13
+
14
+ export { parseCssDuration };
@@ -1,4 +1,4 @@
1
- import { Component, type PropsWithoutRef } from 'react';
1
+ import { Component, type Ref, type PropsWithoutRef } from 'react';
2
2
  export interface RerenderableComponent<P, S> extends Component<P, S> {
3
3
  node?: HTMLElement | null;
4
4
  }
@@ -7,4 +7,6 @@ export interface RerenderableComponentClass<P, S> {
7
7
  }
8
8
  export default function rerenderHOC<P extends {}, C extends Component<P, unknown>>(ComposedComponent: {
9
9
  new (props: P): C;
10
- }): import("react").ForwardRefExoticComponent<PropsWithoutRef<P> & import("react").RefAttributes<C>>;
10
+ }): ({ ref, ...props }: PropsWithoutRef<P> & {
11
+ ref?: Ref<C>;
12
+ }) => import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { forwardRef, Component } from 'react';
1
+ import { Component } from 'react';
3
2
  import { createComposedRef } from './compose-refs.js';
4
3
  import { jsx } from 'react/jsx-runtime';
4
+ import 'react/compiler-runtime';
5
5
  import 'memoize-one';
6
6
 
7
7
  function rerenderHOC(ComposedComponent) {
@@ -19,28 +19,15 @@ function rerenderHOC(ComposedComponent) {
19
19
  });
20
20
  }
21
21
  }
22
- return /*#__PURE__*/forwardRef(function RerendererForwardRef(props, ref) {
23
- const $ = c(4);
24
- if ($[0] !== "ac36aeaece54c7d00df3e23ff1d0deb675c0bc1bf4659806ffc7c8497029aeb7") {
25
- for (let $i = 0; $i < 4; $i += 1) {
26
- $[$i] = Symbol.for("react.memo_cache_sentinel");
27
- }
28
- $[0] = "ac36aeaece54c7d00df3e23ff1d0deb675c0bc1bf4659806ffc7c8497029aeb7";
29
- }
30
- let t0;
31
- if ($[1] !== props || $[2] !== ref) {
32
- t0 = /*#__PURE__*/jsx(Rerenderer, {
33
- props: props,
34
- forwardedRef: ref
35
- });
36
- $[1] = props;
37
- $[2] = ref;
38
- $[3] = t0;
39
- } else {
40
- t0 = $[3];
41
- }
42
- return t0;
43
- });
22
+ return function RerendererForwardRef({
23
+ ref,
24
+ ...props
25
+ }) {
26
+ return /*#__PURE__*/jsx(Rerenderer, {
27
+ props: props,
28
+ forwardedRef: ref !== null && ref !== void 0 ? ref : null
29
+ });
30
+ };
44
31
  }
45
32
 
46
33
  export { rerenderHOC as default };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Schedules a timeout and returns a function that cancels it.
3
+ *
4
+ * Useful from React effects.
5
+ */
6
+ export declare function setTimeoutWithCleanup(callback: () => void, delay?: number): () => void;
7
+ /**
8
+ * Schedules an animation frame and returns a function that cancels it.
9
+ *
10
+ * Useful from React effects.
11
+ */
12
+ export declare function requestAnimationFrameWithCleanup(callback: () => void): () => void;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Schedules a timeout and returns a function that cancels it.
3
+ *
4
+ * Useful from React effects.
5
+ */
6
+ function setTimeoutWithCleanup(callback, delay = 0) {
7
+ let timerId = window.setTimeout(() => {
8
+ callback();
9
+ timerId = null;
10
+ }, delay);
11
+ return () => {
12
+ if (timerId != null) {
13
+ window.clearTimeout(timerId);
14
+ timerId = null;
15
+ }
16
+ };
17
+ }
18
+ /**
19
+ * Schedules an animation frame and returns a function that cancels it.
20
+ *
21
+ * Useful from React effects.
22
+ */
23
+ function requestAnimationFrameWithCleanup(callback) {
24
+ let rafId = requestAnimationFrame(() => {
25
+ callback();
26
+ rafId = null;
27
+ });
28
+ return () => {
29
+ if (rafId != null) {
30
+ cancelAnimationFrame(rafId);
31
+ rafId = null;
32
+ }
33
+ };
34
+ }
35
+
36
+ export { requestAnimationFrameWithCleanup, setTimeoutWithCleanup };
@@ -4,7 +4,7 @@
4
4
  export interface SelectionItem {
5
5
  id: string | number;
6
6
  }
7
- export interface TableSelectionConfig<T extends object> {
7
+ export interface TableSelectionConfig<T> {
8
8
  data?: readonly T[] | undefined;
9
9
  selected?: Set<T> | undefined;
10
10
  focused?: T | null | undefined;
@@ -17,7 +17,7 @@ export interface CloneWithConfig<T> {
17
17
  selected?: Set<T> | readonly T[] | null | undefined;
18
18
  focused?: T | null | undefined;
19
19
  }
20
- export default class Selection<T extends object> {
20
+ export default class TableSelection<T> {
21
21
  protected _rawData: readonly T[];
22
22
  protected _getChildren: (item: T) => readonly T[];
23
23
  protected _data: Set<T>;
@@ -28,19 +28,19 @@ export default class Selection<T extends object> {
28
28
  constructor({ data, selected, focused, getKey, getChildren, isItemSelectable, }?: TableSelectionConfig<T>);
29
29
  protected _buildData(data: readonly T[] | null | undefined): Set<T>;
30
30
  protected _buildSelected(data: Set<T>, selected: Set<T>): Set<T>;
31
- cloneWith({ data, selected, focused }: CloneWithConfig<T>): Selection<T>;
32
- focus(value: T | null | undefined): Selection<T>;
33
- moveUp(): Selection<T> | undefined;
34
- moveDown(): Selection<T> | undefined;
35
- moveStart(): Selection<T> | undefined;
36
- moveEnd(): Selection<T> | undefined;
37
- select(value?: T | null): Selection<T>;
38
- deselect(value?: T | null): Selection<T>;
39
- toggleSelection(value?: T | null): Selection<T>;
40
- selectAll(): Selection<T>;
41
- resetFocus(): Selection<T>;
42
- resetSelection(): Selection<T>;
43
- reset(): Selection<T>;
31
+ cloneWith({ data, selected, focused }: CloneWithConfig<T>): TableSelection<T>;
32
+ focus(value: T | null | undefined): TableSelection<T>;
33
+ moveUp(): TableSelection<T> | undefined;
34
+ moveDown(): TableSelection<T> | undefined;
35
+ moveStart(): TableSelection<T> | undefined;
36
+ moveEnd(): TableSelection<T> | undefined;
37
+ select(value?: T | null): TableSelection<T>;
38
+ deselect(value?: T | null): TableSelection<T>;
39
+ toggleSelection(value?: T | null): TableSelection<T>;
40
+ selectAll(): TableSelection<T>;
41
+ resetFocus(): TableSelection<T>;
42
+ resetSelection(): TableSelection<T>;
43
+ reset(): TableSelection<T>;
44
44
  isFocused(value: T | null): boolean;
45
45
  isSelected(value: T | null): boolean;
46
46
  getFocused(): T | null;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @deprecated SelectionItem is deprecated. Use your own item type and provide a `getKey` function instead if there is no `id` identifier in your item type.
3
3
  */
4
- let Selection$1 = class Selection {
4
+ class TableSelection {
5
5
  _rawData;
6
6
  _getChildren;
7
7
  _data;
@@ -15,11 +15,11 @@ let Selection$1 = class Selection {
15
15
  focused = null,
16
16
  getKey = item => {
17
17
  // Default behavior stays backward compatible: use item's "id" if present
18
- if ('id' in item) {
18
+ if (item && typeof item === 'object' && 'id' in item) {
19
19
  return item.id;
20
20
  }
21
21
  // If there's no id provided on item and no getKey supplied, fail fast with a clear message
22
- throw new Error('Selection: getKey is required when items have no "id" property');
22
+ throw new Error('TableSelection: getKey is required when items have no "id" property');
23
23
  },
24
24
  getChildren = () => [],
25
25
  isItemSelectable = () => true
@@ -185,6 +185,6 @@ let Selection$1 = class Selection {
185
185
  }
186
186
  return new Set();
187
187
  }
188
- };
188
+ }
189
189
 
190
- export { Selection$1 as default };
190
+ export { TableSelection as default };
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributes, type ReactElement, type FunctionComponent } from 'react';
1
+ import { type HTMLAttributes, type Ref, type ReactElement, type FunctionComponent } from 'react';
2
2
  declare enum Theme {
3
3
  AUTO = "auto",
4
4
  LIGHT = "light",
@@ -18,11 +18,12 @@ export interface WithThemeClassesProps {
18
18
  export declare function WithThemeClasses({ theme, children }: WithThemeClassesProps): ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
19
19
  export declare function applyTheme(theme: Theme.DARK | Theme.LIGHT, container: HTMLElement): void;
20
20
  type WrapperType = FunctionComponent<HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
21
- export interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
21
+ export interface ThemeProviderProps extends HTMLAttributes<HTMLElement> {
22
+ ref?: Ref<HTMLElement>;
22
23
  theme?: Theme;
23
24
  passToPopups?: boolean;
24
25
  WrapperComponent?: WrapperType;
25
26
  target?: HTMLElement;
26
27
  }
27
- export declare const ThemeProvider: import("react").ForwardRefExoticComponent<ThemeProviderProps & import("react").RefAttributes<HTMLElement>>;
28
+ export declare function ThemeProvider({ ref, ...props }: ThemeProviderProps): import("react").JSX.Element;
28
29
  export default Theme;
@@ -1,4 +1,4 @@
1
- import 'react-compiler-runtime';
1
+ import 'react/compiler-runtime';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  export { G as GLOBAL_DARK_CLASS_NAME, b as ThemeContext, a as ThemeProvider, W as WithThemeClasses, c as applyTheme, T as default, u as useTheme, e as useThemeClasses } from '../_helpers/theme.js';
@@ -19,11 +19,9 @@ export interface RingCSSProperties {
19
19
  '--ring-popup-border-color'?: Property.BorderColor;
20
20
  '--ring-popup-shadow-color'?: Property.Color;
21
21
  '--ring-message-shadow-color'?: Property.Color;
22
- '--ring-pinned-shadow-color'?: Property.Color;
23
22
  '--ring-button-danger-hover-color'?: Property.Color;
24
23
  '--ring-button-primary-border-color'?: Property.Color;
25
24
  '--ring-search-color'?: Property.Color;
26
- '--ring-hint-color'?: Property.Color;
27
25
  '--ring-link-color'?: Property.Color;
28
26
  '--ring-link-hover-color'?: Property.Color;
29
27
  '--ring-error-color'?: Property.Color;
@@ -49,8 +47,6 @@ export interface RingCSSProperties {
49
47
  '--ring-disabled-background-color'?: Property.BackgroundColor;
50
48
  '--ring-disabled-selected-background-color'?: Property.BackgroundColor;
51
49
  '--ring-button-danger-active-color'?: Property.BackgroundColor;
52
- '--ring-button-loader-background'?: Property.BackgroundColor;
53
- '--ring-button-primary-background-color'?: Property.BackgroundColor;
54
50
  '--ring-code-background-color'?: Property.BackgroundColor;
55
51
  '--ring-code-color'?: Property.Color;
56
52
  '--ring-code-comment-color'?: Property.Color;
@@ -5,15 +5,15 @@ import { s as styles } from '../_helpers/header.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
  import '@jetbrains/icons/chevron-down';
7
7
  import '@jetbrains/icons/chevron-12px-down';
8
- import 'util-deprecate';
9
8
  import '../icon/icon.js';
9
+ import 'util-deprecate';
10
10
  import '../icon/icon.constants.js';
11
11
  import '../_helpers/icon-svg.js';
12
- import 'react-compiler-runtime';
13
- import '../global/configuration.js';
12
+ import 'react/compiler-runtime';
14
13
  import '../global/memoize.js';
15
14
  import '../link/clickable-link.js';
16
15
  import '../global/controls-height.js';
16
+ import '../global/configuration.js';
17
17
  import '../_helpers/button.classes.js';
18
18
 
19
19
  class HeaderIcon extends Component {
@@ -10,21 +10,20 @@ export { default as Profile } from './profile.js';
10
10
  export { default as SmartProfile } from './smart-profile.js';
11
11
  export { default as Services } from './services.js';
12
12
  export { default as SmartServices } from './smart-services.js';
13
- import 'react-compiler-runtime';
13
+ import 'react/compiler-runtime';
14
14
  import '../icon/icon.js';
15
15
  import 'util-deprecate';
16
16
  import '../icon/icon.constants.js';
17
17
  import '../_helpers/icon-svg.js';
18
- import '../global/configuration.js';
19
18
  import '../global/memoize.js';
20
19
  import '../button/button.js';
21
20
  import '@jetbrains/icons/chevron-down';
22
21
  import '@jetbrains/icons/chevron-12px-down';
23
22
  import '../link/clickable-link.js';
24
23
  import '../global/controls-height.js';
24
+ import '../global/configuration.js';
25
25
  import '../_helpers/button.classes.js';
26
26
  import '../avatar/avatar.js';
27
- import 'core-js/modules/es.array.includes.js';
28
27
  import '../global/url.js';
29
28
  import '../global/dom.js';
30
29
  import '../avatar/fallback-avatar.js';
@@ -33,6 +32,7 @@ import '../avatar/avatar-size.js';
33
32
  import '../_helpers/avatar-info.js';
34
33
  import '../dropdown-menu/dropdown-menu.js';
35
34
  import '../list/list.js';
35
+ import 'core-js/modules/es.array.includes.js';
36
36
  import 'react-virtualized/dist/es/List';
37
37
  import 'react-virtualized/dist/es/AutoSizer';
38
38
  import 'react-virtualized/dist/es/WindowScroller';
@@ -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 ScrollableSection from '../scrollable-section/scrollable-section.js';
4
4
  import { s as styles } from '../_helpers/header.js';
@@ -6,8 +6,7 @@ import { jsx } from 'react/jsx-runtime';
6
6
  import { Size } from '../icon/icon.constants.js';
7
7
  import 'util-deprecate';
8
8
  import '../_helpers/icon-svg.js';
9
- import 'react-compiler-runtime';
10
- import '../global/configuration.js';
9
+ import 'react/compiler-runtime';
11
10
  import '../global/memoize.js';
12
11
 
13
12
  class Logo extends PureComponent {
@@ -9,25 +9,25 @@ import { isTruthy } from '../global/typescript-utils.js';
9
9
  import { s as styles } from '../_helpers/header.js';
10
10
  import { jsx, jsxs } from 'react/jsx-runtime';
11
11
  import { Size } from '../avatar/avatar-size.js';
12
- import 'core-js/modules/es.array.includes.js';
13
- import 'util-deprecate';
14
12
  import '../global/url.js';
15
13
  import '../global/dom.js';
16
- import '../global/memoize.js';
17
14
  import '../avatar/fallback-avatar.js';
18
- import 'react-compiler-runtime';
15
+ import 'react/compiler-runtime';
19
16
  import '../global/get-uid.js';
20
17
  import '../_helpers/avatar-info.js';
21
18
  import '@jetbrains/icons/chevron-down';
22
19
  import '@jetbrains/icons/chevron-12px-down';
23
20
  import '../icon/icon.js';
21
+ import 'util-deprecate';
24
22
  import '../icon/icon.constants.js';
25
23
  import '../_helpers/icon-svg.js';
26
- import '../global/configuration.js';
24
+ import '../global/memoize.js';
27
25
  import '../link/clickable-link.js';
28
26
  import '../global/controls-height.js';
27
+ import '../global/configuration.js';
29
28
  import '../_helpers/button.classes.js';
30
29
  import '../list/list.js';
30
+ import 'core-js/modules/es.array.includes.js';
31
31
  import 'react-virtualized/dist/es/List';
32
32
  import 'react-virtualized/dist/es/AutoSizer';
33
33
  import 'react-virtualized/dist/es/WindowScroller';