@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
@@ -20,14 +20,14 @@ 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';
28
- import '../global/configuration.js';
27
+ import 'react/compiler-runtime';
29
28
  import '../link/clickable-link.js';
30
29
  import '../global/controls-height.js';
30
+ import '../global/configuration.js';
31
31
  import '../_helpers/button.classes.js';
32
32
  import '../global/get-uid.js';
33
33
  import '../i18n/i18n-context.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 };
@@ -1,20 +1,18 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { useState, useRef, useEffect, useLayoutEffect } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useState, useRef, useEffectEvent, useEffect, useLayoutEffect } from 'react';
3
3
  import units, { isSafariOnIPhone, scrollerReRenderDelayIPhone } from './consts.js';
4
- import useEventCallback from '../global/use-event-callback.js';
5
4
  import 'date-fns/add';
6
5
  import 'date-fns';
7
6
  import '../global/sniffer.js';
8
7
  import 'sniffr';
9
- import 'util-deprecate';
10
8
 
11
9
  function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDateSource, arith, scheduleScroll) {
12
- const $ = c(39);
13
- if ($[0] !== "5ce72fbec5594f0e31b7b5703cf53349d817d9722b565bfa743aaa359a97033d") {
14
- for (let $i = 0; $i < 39; $i += 1) {
10
+ const $ = c(38);
11
+ if ($[0] !== "a3a62d0eaf68edc8b0ddbd21981a78487012d4433139cd433e355b8f989ab2de") {
12
+ for (let $i = 0; $i < 38; $i += 1) {
15
13
  $[$i] = Symbol.for("react.memo_cache_sentinel");
16
14
  }
17
- $[0] = "5ce72fbec5594f0e31b7b5703cf53349d817d9722b565bfa743aaa359a97033d";
15
+ $[0] = "a3a62d0eaf68edc8b0ddbd21981a78487012d4433139cd433e355b8f989ab2de";
18
16
  }
19
17
  let t0;
20
18
  if ($[1] !== arith || $[2] !== scrollDate.date) {
@@ -61,7 +59,7 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
61
59
  } else {
62
60
  t2 = $[12];
63
61
  }
64
- const syncSelfState = useEventCallback(t2);
62
+ const syncSelfState = useEffectEvent(t2);
65
63
  const didMountRef = useRef(false);
66
64
  let t3;
67
65
  if ($[13] !== scrollDate.date || $[14] !== scrollDate.source || $[15] !== selfScrollDateSource || $[16] !== syncSelfState) {
@@ -88,19 +86,18 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
88
86
  t3 = $[17];
89
87
  }
90
88
  let t4;
91
- if ($[18] !== scrollDate || $[19] !== selfScrollDateSource || $[20] !== syncSelfState) {
92
- t4 = [scrollDate, selfScrollDateSource, syncSelfState];
89
+ if ($[18] !== scrollDate || $[19] !== selfScrollDateSource) {
90
+ t4 = [scrollDate, selfScrollDateSource];
93
91
  $[18] = scrollDate;
94
92
  $[19] = selfScrollDateSource;
95
- $[20] = syncSelfState;
96
- $[21] = t4;
93
+ $[20] = t4;
97
94
  } else {
98
- t4 = $[21];
95
+ t4 = $[20];
99
96
  }
100
97
  useEffect(t3, t4);
101
98
  const ignoreNextScrollEventRef = useRef(true);
102
99
  let t5;
103
- if ($[22] !== scrollTop) {
100
+ if ($[21] !== scrollTop) {
104
101
  t5 = function setContainerScrollFromState() {
105
102
  const container_0 = containerRef.current;
106
103
  if (!container_0) {
@@ -109,24 +106,24 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
109
106
  ignoreNextScrollEventRef.current = true;
110
107
  container_0.scrollTop = scrollTop;
111
108
  };
112
- $[22] = scrollTop;
113
- $[23] = t5;
109
+ $[21] = scrollTop;
110
+ $[22] = t5;
114
111
  } else {
115
- t5 = $[23];
112
+ t5 = $[22];
116
113
  }
117
114
  let t6;
118
- if ($[24] !== items || $[25] !== scrollTop) {
115
+ if ($[23] !== items || $[24] !== scrollTop) {
119
116
  t6 = [items, scrollTop];
120
- $[24] = items;
121
- $[25] = scrollTop;
122
- $[26] = t6;
117
+ $[23] = items;
118
+ $[24] = scrollTop;
119
+ $[25] = t6;
123
120
  } else {
124
- t6 = $[26];
121
+ t6 = $[25];
125
122
  }
126
123
  useLayoutEffect(t5, t6);
127
124
  const updateStateTimerRef = useRef(null);
128
125
  let t7;
129
- if ($[27] !== arith || $[28] !== items || $[29] !== locale || $[30] !== onContainerScroll || $[31] !== scheduleScroll || $[32] !== selfScrollDateSource) {
126
+ if ($[26] !== arith || $[27] !== items || $[28] !== locale || $[29] !== onContainerScroll || $[30] !== scheduleScroll || $[31] !== selfScrollDateSource) {
130
127
  t7 = () => {
131
128
  scheduleScroll(() => {
132
129
  if (updateStateTimerRef.current != null) {
@@ -165,20 +162,19 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
165
162
  }
166
163
  });
167
164
  };
168
- $[27] = arith;
169
- $[28] = items;
170
- $[29] = locale;
171
- $[30] = onContainerScroll;
172
- $[31] = scheduleScroll;
173
- $[32] = selfScrollDateSource;
174
- $[33] = t7;
165
+ $[26] = arith;
166
+ $[27] = items;
167
+ $[28] = locale;
168
+ $[29] = onContainerScroll;
169
+ $[30] = scheduleScroll;
170
+ $[31] = selfScrollDateSource;
171
+ $[32] = t7;
175
172
  } else {
176
- t7 = $[33];
173
+ t7 = $[32];
177
174
  }
178
- const handleScroll = useEventCallback(t7);
175
+ const handleScroll = useEffectEvent(t7);
179
176
  let t8;
180
- let t9;
181
- if ($[34] !== handleScroll) {
177
+ if ($[33] !== handleScroll) {
182
178
  t8 = () => {
183
179
  const container_2 = containerRef.current;
184
180
  if (!container_2) {
@@ -193,25 +189,29 @@ function useScrollBehavior(scrollDate, onContainerScroll, locale, selfScrollDate
193
189
  }
194
190
  };
195
191
  };
196
- t9 = [handleScroll];
197
- $[34] = handleScroll;
198
- $[35] = t8;
199
- $[36] = t9;
192
+ $[33] = handleScroll;
193
+ $[34] = t8;
194
+ } else {
195
+ t8 = $[34];
196
+ }
197
+ let t9;
198
+ if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
199
+ t9 = [];
200
+ $[35] = t9;
200
201
  } else {
201
- t8 = $[35];
202
- t9 = $[36];
202
+ t9 = $[35];
203
203
  }
204
204
  useEffect(t8, t9);
205
205
  let t10;
206
- if ($[37] !== items) {
206
+ if ($[36] !== items) {
207
207
  t10 = {
208
208
  containerRef,
209
209
  items
210
210
  };
211
- $[37] = items;
212
- $[38] = t10;
211
+ $[36] = items;
212
+ $[37] = t10;
213
213
  } else {
214
- t10 = $[38];
214
+ t10 = $[37];
215
215
  }
216
216
  return t10;
217
217
  }
@@ -1,5 +1,5 @@
1
1
  import 'core-js/modules/es.array.includes.js';
2
- import { c } from 'react-compiler-runtime';
2
+ import { c } from 'react/compiler-runtime';
3
3
  import classNames from 'classnames';
4
4
  import { getDay } from 'date-fns/getDay';
5
5
  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, useRef, useEffect } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { addYears } from 'date-fns/addYears';
@@ -13,15 +13,13 @@ import { ScrollArith } from './scroll-arith.js';
13
13
  import { useScrollBehavior } from './use-scroll-behavior.js';
14
14
  import { animateDate } from './animate-date.js';
15
15
  import scheduleRAF from '../global/schedule-raf.js';
16
- import { useIntersectionObserver, useVisibility } from './use-intersection-observer.js';
16
+ import { useIntersectionObserverHandle, IntersectionObserverContext, useIsIntersecting } from '../global/intersection-observer-context.js';
17
17
  import { s as styles } from '../_helpers/date-picker.js';
18
18
  import { jsx } from 'react/jsx-runtime';
19
19
  import 'date-fns/add';
20
20
  import 'date-fns';
21
21
  import '../global/sniffer.js';
22
22
  import 'sniffr';
23
- import '../global/use-event-callback.js';
24
- import 'util-deprecate';
25
23
 
26
24
  const {
27
25
  yearHeight
@@ -36,14 +34,14 @@ const scheduleScroll = scheduleRAF();
36
34
  /**
37
35
  * Reduces "empty" years during fast scrolling.
38
36
  */
39
- const intersectionObserverScrollMargin = units.calHeight / 2;
37
+ const intersectionObserverRootMargin = units.calHeight / 2;
40
38
  function Years(t0) {
41
- const $ = c(24);
42
- if ($[0] !== "aa5edf1b8146bb2f5048c50f376e591fc6fc5fcb5e70e35dc076528241c541c9") {
43
- for (let $i = 0; $i < 24; $i += 1) {
39
+ const $ = c(25);
40
+ if ($[0] !== "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702") {
41
+ for (let $i = 0; $i < 25; $i += 1) {
44
42
  $[$i] = Symbol.for("react.memo_cache_sentinel");
45
43
  }
46
- $[0] = "aa5edf1b8146bb2f5048c50f376e591fc6fc5fcb5e70e35dc076528241c541c9";
44
+ $[0] = "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702";
47
45
  }
48
46
  const {
49
47
  scrollDate,
@@ -154,81 +152,89 @@ function Years(t0) {
154
152
  containerRef,
155
153
  items
156
154
  } = useScrollBehavior(localScrollDate, syncCalendarScrollDate, undefined, "yearsScroll", scrollArith, scheduleScroll);
157
- const intersectionObserverHandle = useIntersectionObserver(containerRef, intersectionObserverScrollMargin);
158
- let t7;
159
- if ($[12] !== handleYearClick || $[13] !== intersectionObserverHandle || $[14] !== items || $[15] !== localScrollDate.date) {
160
- let t8;
161
- if ($[17] !== handleYearClick || $[18] !== intersectionObserverHandle || $[19] !== localScrollDate.date) {
162
- t8 = year_0 => /*#__PURE__*/jsx(Year, {
155
+ const t7 = useIntersectionObserverHandle(containerRef, intersectionObserverRootMargin);
156
+ let t8;
157
+ if ($[12] !== handleYearClick || $[13] !== items || $[14] !== localScrollDate.date) {
158
+ let t9;
159
+ if ($[16] !== handleYearClick || $[17] !== localScrollDate.date) {
160
+ t9 = year_0 => /*#__PURE__*/jsx(Year, {
163
161
  year: year_0,
164
162
  scrollDate: localScrollDate.date,
165
- handleYearClick: handleYearClick,
166
- intersectionObserverHandle: intersectionObserverHandle
163
+ handleYearClick: handleYearClick
167
164
  }, +year_0);
168
- $[17] = handleYearClick;
169
- $[18] = intersectionObserverHandle;
170
- $[19] = localScrollDate.date;
171
- $[20] = t8;
165
+ $[16] = handleYearClick;
166
+ $[17] = localScrollDate.date;
167
+ $[18] = t9;
172
168
  } else {
173
- t8 = $[20];
169
+ t9 = $[18];
174
170
  }
175
- t7 = items.map(t8);
171
+ t8 = items.map(t9);
176
172
  $[12] = handleYearClick;
177
- $[13] = intersectionObserverHandle;
178
- $[14] = items;
179
- $[15] = localScrollDate.date;
180
- $[16] = t7;
173
+ $[13] = items;
174
+ $[14] = localScrollDate.date;
175
+ $[15] = t8;
181
176
  } else {
182
- t7 = $[16];
177
+ t8 = $[15];
183
178
  }
184
- let t8;
185
- if ($[21] !== containerRef || $[22] !== t7) {
186
- t8 = /*#__PURE__*/jsx("div", {
179
+ let t9;
180
+ if ($[19] !== containerRef || $[20] !== t8) {
181
+ t9 = /*#__PURE__*/jsx("div", {
187
182
  className: styles.years,
188
183
  ref: containerRef,
189
184
  "data-test": "ring-date-popup--years",
190
- children: t7
185
+ children: t8
186
+ });
187
+ $[19] = containerRef;
188
+ $[20] = t8;
189
+ $[21] = t9;
190
+ } else {
191
+ t9 = $[21];
192
+ }
193
+ let t10;
194
+ if ($[22] !== t7 || $[23] !== t9) {
195
+ t10 = /*#__PURE__*/jsx(IntersectionObserverContext, {
196
+ value: t7,
197
+ children: t9
191
198
  });
192
- $[21] = containerRef;
193
199
  $[22] = t7;
194
- $[23] = t8;
200
+ $[23] = t9;
201
+ $[24] = t10;
195
202
  } else {
196
- t8 = $[23];
203
+ t10 = $[24];
197
204
  }
198
- return t8;
205
+ return t10;
199
206
  }
200
207
  function Year(t0) {
201
208
  const $ = c(24);
202
- if ($[0] !== "aa5edf1b8146bb2f5048c50f376e591fc6fc5fcb5e70e35dc076528241c541c9") {
209
+ if ($[0] !== "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702") {
203
210
  for (let $i = 0; $i < 24; $i += 1) {
204
211
  $[$i] = Symbol.for("react.memo_cache_sentinel");
205
212
  }
206
- $[0] = "aa5edf1b8146bb2f5048c50f376e591fc6fc5fcb5e70e35dc076528241c541c9";
213
+ $[0] = "d83f39ae52d8a31382391108984551694ebcf0097c6e55663ca967ea74179702";
207
214
  }
208
215
  const {
209
216
  year,
210
217
  scrollDate,
211
- handleYearClick,
212
- intersectionObserverHandle
218
+ handleYearClick
213
219
  } = t0;
214
220
  const buttonRef = useRef(null);
215
- const visible = useVisibility(intersectionObserverHandle, buttonRef);
221
+ const isIntersecting = useIsIntersecting(buttonRef);
216
222
  const t1 = +year;
217
- const t2 = !visible;
223
+ const t2 = !isIntersecting;
218
224
  let t3;
219
- if ($[1] !== scrollDate || $[2] !== visible || $[3] !== year) {
220
- t3 = visible && isSameYear(year, scrollDate) && styles.currentYear;
221
- $[1] = scrollDate;
222
- $[2] = visible;
225
+ if ($[1] !== isIntersecting || $[2] !== scrollDate || $[3] !== year) {
226
+ t3 = isIntersecting && isSameYear(year, scrollDate) && styles.currentYear;
227
+ $[1] = isIntersecting;
228
+ $[2] = scrollDate;
223
229
  $[3] = year;
224
230
  $[4] = t3;
225
231
  } else {
226
232
  t3 = $[4];
227
233
  }
228
234
  let t4;
229
- if ($[5] !== visible || $[6] !== year) {
230
- t4 = visible && isThisYear(year) && styles.today;
231
- $[5] = visible;
235
+ if ($[5] !== isIntersecting || $[6] !== year) {
236
+ t4 = isIntersecting && isThisYear(year) && styles.today;
237
+ $[5] = isIntersecting;
232
238
  $[6] = year;
233
239
  $[7] = t4;
234
240
  } else {
@@ -244,19 +250,19 @@ function Year(t0) {
244
250
  t5 = $[10];
245
251
  }
246
252
  let t6;
247
- if ($[11] !== handleYearClick || $[12] !== visible || $[13] !== year) {
248
- t6 = visible ? () => handleYearClick(year) : undefined;
253
+ if ($[11] !== handleYearClick || $[12] !== isIntersecting || $[13] !== year) {
254
+ t6 = isIntersecting ? () => handleYearClick(year) : undefined;
249
255
  $[11] = handleYearClick;
250
- $[12] = visible;
256
+ $[12] = isIntersecting;
251
257
  $[13] = year;
252
258
  $[14] = t6;
253
259
  } else {
254
260
  t6 = $[14];
255
261
  }
256
262
  let t7;
257
- if ($[15] !== visible || $[16] !== year) {
258
- t7 = visible ? format(year, "yyyy") : "\xA0";
259
- $[15] = visible;
263
+ if ($[15] !== isIntersecting || $[16] !== year) {
264
+ t7 = isIntersecting ? format(year, "yyyy") : "\xA0";
265
+ $[15] = isIntersecting;
260
266
  $[16] = year;
261
267
  $[17] = t7;
262
268
  } else {
@@ -1,6 +1,6 @@
1
1
  import { PureComponent } from 'react';
2
2
  import * as React from 'react';
3
- import TabTrap, { type TabTrapProps } from '../tab-trap/tab-trap';
3
+ import { type TabTrapObject, type TabTrapProps } from '../tab-trap/tab-trap';
4
4
  import type { ShortcutsScopeOptions } from '../shortcuts/core';
5
5
  export interface DialogProps extends Partial<TabTrapProps> {
6
6
  show: boolean;
@@ -43,7 +43,7 @@ export default class Dialog extends PureComponent<DialogProps> {
43
43
  esc: (event: KeyboardEvent) => void;
44
44
  };
45
45
  dialog?: HTMLElement | null;
46
- dialogRef: (tabTrap: TabTrap | null) => void;
46
+ dialogRef: (tabTrapObj: TabTrapObject | null) => void;
47
47
  nativeDialog: React.RefObject<HTMLDialogElement | null>;
48
48
  render(): false | React.JSX.Element;
49
49
  }