@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,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 getUID from '../global/get-uid.js';
4
4
  import { Size } from './avatar-size.js';
@@ -15,15 +15,6 @@ const SizesSquare = {
15
15
  fontSize: '8px',
16
16
  textAnchor: 'middle'
17
17
  },
18
- [Size.Size18]: {
19
- radius: 4,
20
- text: {
21
- x: 9,
22
- y: 13
23
- },
24
- fontSize: '11px',
25
- textAnchor: 'middle'
26
- },
27
18
  [Size.Size20]: {
28
19
  radius: 4,
29
20
  text: {
@@ -96,21 +87,6 @@ const SizesSquare = {
96
87
  height: 2.5
97
88
  }
98
89
  },
99
- [Size.Size48]: {
100
- radius: 4,
101
- text: {
102
- x: 3,
103
- y: 21
104
- },
105
- fontSize: '19px',
106
- letterSpacing: 1,
107
- underscore: {
108
- x: 5,
109
- y: 32,
110
- width: 15,
111
- height: 2.5
112
- }
113
- },
114
90
  [Size.Size56]: {
115
91
  radius: 4,
116
92
  text: {
@@ -138,16 +114,6 @@ const SizesRound = {
138
114
  textAnchor: 'middle',
139
115
  dominantBaseline: 'middle'
140
116
  },
141
- [Size.Size18]: {
142
- radius: 4,
143
- fontSize: '11px',
144
- text: {
145
- x: '50%',
146
- y: '54%'
147
- },
148
- textAnchor: 'middle',
149
- dominantBaseline: 'middle'
150
- },
151
117
  [Size.Size20]: {
152
118
  radius: 4,
153
119
  fontSize: '9px',
@@ -200,17 +166,6 @@ const SizesRound = {
200
166
  textAnchor: 'middle',
201
167
  dominantBaseline: 'middle'
202
168
  },
203
- [Size.Size48]: {
204
- radius: 4,
205
- fontSize: '19px',
206
- letterSpacing: 1,
207
- text: {
208
- x: '50%',
209
- y: '54%'
210
- },
211
- textAnchor: 'middle',
212
- dominantBaseline: 'middle'
213
- },
214
169
  [Size.Size56]: {
215
170
  radius: 4,
216
171
  fontSize: '26px',
@@ -247,11 +202,11 @@ function hashCode(s) {
247
202
  }
248
203
  function FallbackAvatar(t0) {
249
204
  const $ = c(38);
250
- if ($[0] !== "b668230117e1d8da4bff753c3c60cfa65c2cb38b8160a7b90f4e36892987cdc5") {
205
+ if ($[0] !== "1a4ecd5a43a79807aefab02d5c9ac8b224f24139f867e5804d91fecdd9285808") {
251
206
  for (let $i = 0; $i < 38; $i += 1) {
252
207
  $[$i] = Symbol.for("react.memo_cache_sentinel");
253
208
  }
254
- $[0] = "b668230117e1d8da4bff753c3c60cfa65c2cb38b8160a7b90f4e36892987cdc5";
209
+ $[0] = "1a4ecd5a43a79807aefab02d5c9ac8b224f24139f867e5804d91fecdd9285808";
255
210
  }
256
211
  const {
257
212
  username,
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { useState, Children } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import DropdownMenu from '../dropdown-menu/dropdown-menu.js';
@@ -32,7 +32,6 @@ import '@jetbrains/icons/remove-12px';
32
32
  import '../icon/icon.js';
33
33
  import '../icon/icon.constants.js';
34
34
  import '../_helpers/icon-svg.js';
35
- import '../global/configuration.js';
36
35
  import '../global/compose-refs.js';
37
36
  import '../control-help/control-help.js';
38
37
  import '../link/link.js';
@@ -55,6 +54,7 @@ import '../button/button.js';
55
54
  import '@jetbrains/icons/chevron-down';
56
55
  import '@jetbrains/icons/chevron-12px-down';
57
56
  import '../global/controls-height.js';
57
+ import '../global/configuration.js';
58
58
  import '../_helpers/button.classes.js';
59
59
  import '../popup-menu/popup-menu.js';
60
60
  import '../popup/popup.js';
@@ -70,11 +70,11 @@ var styles = {"avatarStack":"ring-avatar-stack-avatarStack","extraText":"ring-av
70
70
 
71
71
  function AvatarStack(t0) {
72
72
  const $ = c(28);
73
- if ($[0] !== "7c1a1eb1e78b51cf2e869808174f0a400bcb10f038b5fe22275d5cdc8f4f1bb3") {
73
+ if ($[0] !== "f469d96d157850b6a22cfb2dd7b1d71f151ee90317dbfd199eb6713e97a9ce55") {
74
74
  for (let $i = 0; $i < 28; $i += 1) {
75
75
  $[$i] = Symbol.for("react.memo_cache_sentinel");
76
76
  }
77
- $[0] = "7c1a1eb1e78b51cf2e869808174f0a400bcb10f038b5fe22275d5cdc8f4f1bb3";
77
+ $[0] = "f469d96d157850b6a22cfb2dd7b1d71f151ee90317dbfd199eb6713e97a9ce55";
78
78
  }
79
79
  let children;
80
80
  let className;
@@ -108,7 +108,7 @@ function AvatarStack(t0) {
108
108
  }
109
109
  const size = t1 === undefined ? Size.Size20 : t1;
110
110
  const [dropdownOpen, setDropdownOpen] = useState(false);
111
- const sizeClass = size !== Size.Size16 && size !== Size.Size18 && size !== Size.Size48 ? styles[`size${size}`] : undefined;
111
+ const sizeClass = size !== Size.Size16 ? styles[`size${size}`] : undefined;
112
112
  let t2;
113
113
  if ($[8] !== className || $[9] !== dropdownOpen || $[10] !== sizeClass) {
114
114
  t2 = classNames(styles.avatarStack, className, sizeClass, {
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import React__default from 'react';
3
3
  import classNames from 'classnames';
4
4
  import infoIcon from '@jetbrains/icons/info-filled';
@@ -13,7 +13,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
13
13
  import 'util-deprecate';
14
14
  import '../icon/icon.constants.js';
15
15
  import '../_helpers/icon-svg.js';
16
- import '../global/configuration.js';
17
16
  import '../global/memoize.js';
18
17
  import '../global/data-tests.js';
19
18
  import '../link/clickable-link.js';
@@ -30,6 +29,7 @@ import 'combokeys';
30
29
  import '../global/sniffer.js';
31
30
  import 'sniffr';
32
31
  import '../tab-trap/tab-trap.js';
32
+ import '../global/configuration.js';
33
33
  import '../popup/position.js';
34
34
  import '../popup/popup.consts.js';
35
35
  import '../popup/popup.target.js';
@@ -15,10 +15,6 @@ export interface ButtonBaseProps {
15
15
  secondary?: boolean | null | undefined;
16
16
  ghost?: boolean | null | undefined;
17
17
  short?: boolean | null | undefined;
18
- /**
19
- * @deprecated Use inline instead
20
- */
21
- text?: boolean | null | undefined;
22
18
  inline?: boolean | null | undefined;
23
19
  dropdown?: boolean | null | undefined;
24
20
  disabled?: boolean | undefined;
@@ -2,19 +2,18 @@ import { PureComponent, createRef } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import chevronDownIcon from '@jetbrains/icons/chevron-down';
4
4
  import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
5
- import deprecate from 'util-deprecate';
6
5
  import Icon from '../icon/icon.js';
7
6
  import ClickableLink from '../link/clickable-link.js';
8
7
  import { ControlsHeightContext } from '../global/controls-height.js';
9
8
  import { g as getButtonClasses, s as styles } from '../_helpers/button.classes.js';
10
9
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
10
  import { Size } from '../icon/icon.constants.js';
11
+ import 'util-deprecate';
12
12
  import '../_helpers/icon-svg.js';
13
- import 'react-compiler-runtime';
14
- import '../global/configuration.js';
13
+ import 'react/compiler-runtime';
15
14
  import '../global/memoize.js';
15
+ import '../global/configuration.js';
16
16
 
17
- const warnText = deprecate(() => {}, 'Button: "text" prop is deprecated and will be removed in 8.0. Use inline instead.');
18
17
  function removeLinkProps(props) {
19
18
  const {
20
19
  download,
@@ -46,7 +45,6 @@ class Button extends PureComponent {
46
45
  static contextType = ControlsHeightContext;
47
46
  buttonRef = /*#__PURE__*/createRef();
48
47
  render() {
49
- var _ref;
50
48
  const {
51
49
  // Modifiers
52
50
  active,
@@ -59,7 +57,6 @@ class Button extends PureComponent {
59
57
  secondary,
60
58
  ghost,
61
59
  short,
62
- text,
63
60
  dropdown,
64
61
  height,
65
62
  // Props
@@ -75,10 +72,7 @@ class Button extends PureComponent {
75
72
  disabled,
76
73
  ...props
77
74
  } = this.props;
78
- const isInline = (_ref = inline !== null && inline !== void 0 ? inline : text) !== null && _ref !== void 0 ? _ref : !!icon;
79
- if (text) {
80
- warnText();
81
- }
75
+ const isInline = inline !== null && inline !== void 0 ? inline : !!icon;
82
76
  const classes = getButtonClasses({
83
77
  ...this.props,
84
78
  inline: isInline,
@@ -6,7 +6,7 @@ import ControlHelp from '../control-help/control-help.js';
6
6
  import { s as styles } from '../_helpers/caption.js';
7
7
  export { C as Caption } from '../_helpers/caption.js';
8
8
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
9
- import 'react-compiler-runtime';
9
+ import 'react/compiler-runtime';
10
10
 
11
11
  function allChildrenDisabled(children) {
12
12
  if (!children || typeof children !== 'object') return false;
@@ -3,7 +3,7 @@ import classNames from 'classnames';
3
3
  import joinDataTestAttributes from '../global/data-tests.js';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
6
- var styles = {"buttonClass":"ring-button-button","buttonToolbar":"ring-button-toolbar-buttonToolbar","buttonGroup":"ring-button-toolbar-buttonGroup","split":"ring-button-toolbar-split"};
6
+ var styles = {"button":"ring-button-button","buttonToolbar":"ring-button-toolbar-buttonToolbar","buttonGroup":"ring-button-toolbar-buttonGroup","split":"ring-button-toolbar-split"};
7
7
 
8
8
  class ButtonToolbar extends PureComponent {
9
9
  render() {
@@ -24,6 +24,6 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
24
24
  componentDidUpdate(prevProps: CheckboxProps): void;
25
25
  input?: HTMLInputElement | null;
26
26
  inputRef: (el: HTMLInputElement | null) => void;
27
- composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => void>;
27
+ composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => () => void>;
28
28
  render(): import("react").JSX.Element;
29
29
  }
@@ -10,8 +10,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
10
10
  import 'util-deprecate';
11
11
  import '../icon/icon.constants.js';
12
12
  import '../_helpers/icon-svg.js';
13
- import 'react-compiler-runtime';
14
- import '../global/configuration.js';
13
+ import 'react/compiler-runtime';
15
14
  import '../global/memoize.js';
16
15
  import 'memoize-one';
17
16
 
@@ -14,8 +14,7 @@ import '../icon/icon.js';
14
14
  import 'util-deprecate';
15
15
  import '../icon/icon.constants.js';
16
16
  import '../_helpers/icon-svg.js';
17
- import 'react-compiler-runtime';
18
- import '../global/configuration.js';
17
+ import 'react/compiler-runtime';
19
18
  import '../global/memoize.js';
20
19
  import 'react/jsx-runtime';
21
20
  import '../loader-inline/loader-inline.js';
@@ -26,6 +25,7 @@ import '@jetbrains/icons/chevron-down';
26
25
  import '@jetbrains/icons/chevron-12px-down';
27
26
  import '../link/clickable-link.js';
28
27
  import '../global/controls-height.js';
28
+ import '../global/configuration.js';
29
29
  import '../_helpers/button.classes.js';
30
30
  import '../_helpers/theme.js';
31
31
  import '../alert/alert-heading.js';
@@ -1,8 +1,9 @@
1
- import { c } from 'react-compiler-runtime';
2
- import React__default, { useContext, useRef, useState, useEffect } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { use, useRef, useState, useEffect } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import joinDataTestAttributes from '../global/data-tests.js';
5
5
  import { getRect } from '../global/dom.js';
6
+ import { parseCssDuration } from '../global/parse-css-duration.js';
6
7
  import { toPx } from './utils.js';
7
8
  import { CollapseContext } from './collapse-context.js';
8
9
  import { COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID } from './consts.js';
@@ -10,30 +11,22 @@ import { jsx, jsxs } from 'react/jsx-runtime';
10
11
 
11
12
  var styles = {"container":"ring-collapse-container","transition":"ring-collapse-transition","summary":"ring-collapse-summary","trigger":"ring-collapse-trigger","fade":"ring-collapse-fade"};
12
13
 
13
- const DURATION_FACTOR = 0.5;
14
14
  const DEFAULT_HEIGHT = 0;
15
15
  const VISIBLE = 1;
16
16
  const HIDDEN = 0;
17
17
  // margin for the hide fallback timer, so it fires only if transitionend never did
18
18
  const HIDE_FALLBACK_EXTRA_DELAY = 100;
19
- // React 18 renders unknown attributes from strings only, while React 19 treats `inert`
20
- // as a real boolean and removes the attribute when it gets ''
21
- // TODO drop the React 18 branch in develop-8.0 — Ring UI 8.0 supports React 19 only
22
- const REACT_MAJOR_WITH_INERT_SUPPORT = 19;
23
- const getInertAttributeValue = reactMajor => reactMajor >= REACT_MAJOR_WITH_INERT_SUPPORT ? true : '';
24
- // the cast is confined to the JSX assignment: React 18 actually receives the string form
25
- const INERT = getInertAttributeValue(Number(React__default.version.split('.')[0]));
26
19
  const isFullyCollapsed = (collapsed, initialContentHeight) => collapsed && initialContentHeight <= DEFAULT_HEIGHT;
27
20
  /**
28
21
  * @name CollapseContent
29
22
  */
30
23
  const CollapseContent = t0 => {
31
24
  const $ = c(33);
32
- if ($[0] !== "47b29aa882db3160a9eb92f6edb4f7c80dfcfaaa3f079e25b6f03c957cb3c632") {
25
+ if ($[0] !== "e3da703013c1e2308afa08a0649f729dead9cb8e25336ece00ca1a0416bee9c3") {
33
26
  for (let $i = 0; $i < 33; $i += 1) {
34
27
  $[$i] = Symbol.for("react.memo_cache_sentinel");
35
28
  }
36
- $[0] = "47b29aa882db3160a9eb92f6edb4f7c80dfcfaaa3f079e25b6f03c957cb3c632";
29
+ $[0] = "e3da703013c1e2308afa08a0649f729dead9cb8e25336ece00ca1a0416bee9c3";
37
30
  }
38
31
  const {
39
32
  children,
@@ -45,9 +38,10 @@ const CollapseContent = t0 => {
45
38
  collapsed,
46
39
  duration,
47
40
  id,
41
+ animate,
48
42
  disableAnimation,
49
43
  keepMounted
50
- } = useContext(CollapseContext);
44
+ } = use(CollapseContext);
51
45
  const containerRef = useRef(null);
52
46
  const contentRef = useRef(null);
53
47
  const [initialContentHeight] = useState(minHeight);
@@ -79,7 +73,7 @@ const CollapseContent = t0 => {
79
73
  }
80
74
  };
81
75
  container?.addEventListener("transitionend", onTransitionEnd);
82
- const cssDuration = parseFloat(container?.style.getPropertyValue("--duration") || "") || 0;
76
+ const cssDuration = parseCssDuration(container?.style.getPropertyValue("--duration") || "");
83
77
  const fallbackTimeout = window.setTimeout(finalizeCollapse, cssDuration + HIDE_FALLBACK_EXTRA_DELAY);
84
78
  return () => {
85
79
  container?.removeEventListener("transitionend", onTransitionEnd);
@@ -121,8 +115,7 @@ const CollapseContent = t0 => {
121
115
  t6 = $[8];
122
116
  }
123
117
  useEffect(t5, t6);
124
- const calculatedDuration = duration + contentHeight * DURATION_FACTOR;
125
- const t7 = `${calculatedDuration}ms`;
118
+ const t7 = `${duration}ms`;
126
119
  const t8 = collapsed && !minHeight ? HIDDEN : VISIBLE;
127
120
  let t9;
128
121
  if ($[9] !== height || $[10] !== t7 || $[11] !== t8) {
@@ -151,7 +144,7 @@ const CollapseContent = t0 => {
151
144
  } else {
152
145
  t11 = $[13];
153
146
  }
154
- const t12 = !disableAnimation;
147
+ const t12 = animate && !disableAnimation;
155
148
  let t13;
156
149
  if ($[14] !== t12) {
157
150
  t13 = classNames(styles.container, {
@@ -180,55 +173,54 @@ const CollapseContent = t0 => {
180
173
  } else {
181
174
  t15 = $[19];
182
175
  }
183
- const t16 = contentInert ? INERT : undefined;
184
- const t17 = keepMounted || contentVisible ? children : null;
185
- let t18;
186
- if ($[20] !== t14 || $[21] !== t15 || $[22] !== t16 || $[23] !== t17) {
187
- t18 = /*#__PURE__*/jsx("div", {
176
+ const t16 = keepMounted || contentVisible ? children : null;
177
+ let t17;
178
+ if ($[20] !== contentInert || $[21] !== t14 || $[22] !== t15 || $[23] !== t16) {
179
+ t17 = /*#__PURE__*/jsx("div", {
188
180
  ref: contentRef,
189
181
  "data-test": t14,
190
182
  style: t15,
191
- inert: t16,
192
- children: t17
183
+ inert: contentInert,
184
+ children: t16
193
185
  });
194
- $[20] = t14;
195
- $[21] = t15;
196
- $[22] = t16;
197
- $[23] = t17;
198
- $[24] = t18;
186
+ $[20] = contentInert;
187
+ $[21] = t14;
188
+ $[22] = t15;
189
+ $[23] = t16;
190
+ $[24] = t17;
199
191
  } else {
200
- t18 = $[24];
192
+ t17 = $[24];
201
193
  }
202
- let t19;
194
+ let t18;
203
195
  if ($[25] !== fadeShouldBeVisible) {
204
- t19 = fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
196
+ t18 = fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
205
197
  className: styles.fade
206
198
  });
207
199
  $[25] = fadeShouldBeVisible;
208
- $[26] = t19;
200
+ $[26] = t18;
209
201
  } else {
210
- t19 = $[26];
202
+ t18 = $[26];
211
203
  }
212
- let t20;
213
- if ($[27] !== style || $[28] !== t10 || $[29] !== t13 || $[30] !== t18 || $[31] !== t19) {
214
- t20 = /*#__PURE__*/jsxs("div", {
204
+ let t19;
205
+ if ($[27] !== style || $[28] !== t10 || $[29] !== t13 || $[30] !== t17 || $[31] !== t18) {
206
+ t19 = /*#__PURE__*/jsxs("div", {
215
207
  ref: containerRef,
216
208
  id: t10,
217
209
  "data-test": t11,
218
210
  className: t13,
219
211
  style: style,
220
- children: [t18, t19]
212
+ children: [t17, t18]
221
213
  });
222
214
  $[27] = style;
223
215
  $[28] = t10;
224
216
  $[29] = t13;
225
- $[30] = t18;
226
- $[31] = t19;
227
- $[32] = t20;
217
+ $[30] = t17;
218
+ $[31] = t18;
219
+ $[32] = t19;
228
220
  } else {
229
- t20 = $[32];
221
+ t19 = $[32];
230
222
  }
231
- return t20;
223
+ return t19;
232
224
  };
233
225
 
234
226
  export { CollapseContent, CollapseContent as default };
@@ -1,6 +1,7 @@
1
1
  interface CollapseContextInterface {
2
2
  collapsed: boolean;
3
3
  duration: number;
4
+ animate: boolean;
4
5
  disableAnimation: boolean;
5
6
  keepMounted?: boolean;
6
7
  setCollapsed: () => void;
@@ -4,6 +4,7 @@ import { BASE_ANIMATION_DURATION } from './consts.js';
4
4
  const CollapseContext = /*#__PURE__*/createContext({
5
5
  collapsed: true,
6
6
  duration: BASE_ANIMATION_DURATION,
7
+ animate: false,
7
8
  disableAnimation: false,
8
9
  keepMounted: false,
9
10
  setCollapsed: () => {},
@@ -1,5 +1,5 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { useContext, cloneElement } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { use, cloneElement } from 'react';
3
3
  import joinDataTestAttributes from '../global/data-tests.js';
4
4
  import { CollapseContext } from './collapse-context.js';
5
5
  import { COLLAPSE_CONTROL_TEST_ID } from './consts.js';
@@ -7,11 +7,11 @@ import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  const CollapseControl = t0 => {
9
9
  const $ = c(13);
10
- if ($[0] !== "37a6daba1dc720b937e7d2a844af157177f8338140503553968cf8ae1ecf6263") {
10
+ if ($[0] !== "10418ecc7774e31a4915bc1ad8a8ad001213057f5df8fc3f9a59adab69451dd6") {
11
11
  for (let $i = 0; $i < 13; $i += 1) {
12
12
  $[$i] = Symbol.for("react.memo_cache_sentinel");
13
13
  }
14
- $[0] = "37a6daba1dc720b937e7d2a844af157177f8338140503553968cf8ae1ecf6263";
14
+ $[0] = "10418ecc7774e31a4915bc1ad8a8ad001213057f5df8fc3f9a59adab69451dd6";
15
15
  }
16
16
  const {
17
17
  children,
@@ -21,7 +21,7 @@ const CollapseControl = t0 => {
21
21
  setCollapsed,
22
22
  collapsed,
23
23
  id
24
- } = useContext(CollapseContext);
24
+ } = use(CollapseContext);
25
25
  let t1;
26
26
  let t2;
27
27
  if ($[1] !== children || $[2] !== collapsed || $[3] !== dataTest || $[4] !== id || $[5] !== setCollapsed) {
@@ -1,16 +1,16 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { useState, useId } from 'react';
3
3
  import { CollapseContext } from './collapse-context.js';
4
4
  import { BASE_ANIMATION_DURATION } from './consts.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
7
  const Collapse = t0 => {
8
- const $ = c(17);
9
- if ($[0] !== "3330160d096e3f437f4f27543e39ff405e76a4e1f92b7ab6836337ac8d11cb7e") {
10
- for (let $i = 0; $i < 17; $i += 1) {
8
+ const $ = c(18);
9
+ if ($[0] !== "dd05ee204290a7a80b9dd7bc0906391032441237b921ff3f0a33117d0cb388ac") {
10
+ for (let $i = 0; $i < 18; $i += 1) {
11
11
  $[$i] = Symbol.for("react.memo_cache_sentinel");
12
12
  }
13
- $[0] = "3330160d096e3f437f4f27543e39ff405e76a4e1f92b7ab6836337ac8d11cb7e";
13
+ $[0] = "dd05ee204290a7a80b9dd7bc0906391032441237b921ff3f0a33117d0cb388ac";
14
14
  }
15
15
  const {
16
16
  children,
@@ -32,9 +32,16 @@ const Collapse = t0 => {
32
32
  const [innerCollapsed, setInnerCollapsed] = useState(defaultCollapsed);
33
33
  const id = useId();
34
34
  const finalCollapsedValue = collapsed !== null && collapsed !== void 0 ? collapsed : innerCollapsed;
35
+ const [previousCollapsedValue, setPreviousCollapsedValue] = useState(finalCollapsedValue);
36
+ const [animate, setAnimate] = useState(false);
37
+ if (previousCollapsedValue !== finalCollapsedValue) {
38
+ setPreviousCollapsedValue(finalCollapsedValue);
39
+ setAnimate(true);
40
+ }
35
41
  let t8;
36
42
  if ($[1] !== finalCollapsedValue || $[2] !== onChange) {
37
43
  t8 = () => {
44
+ setAnimate(true);
38
45
  setInnerCollapsed(!finalCollapsedValue);
39
46
  onChange(!finalCollapsedValue);
40
47
  };
@@ -46,48 +53,50 @@ const Collapse = t0 => {
46
53
  }
47
54
  const setCollapsed = t8;
48
55
  let t9;
49
- if ($[4] !== disableAnimation || $[5] !== duration || $[6] !== finalCollapsedValue || $[7] !== id || $[8] !== keepMounted || $[9] !== setCollapsed) {
56
+ if ($[4] !== animate || $[5] !== disableAnimation || $[6] !== duration || $[7] !== finalCollapsedValue || $[8] !== id || $[9] !== keepMounted || $[10] !== setCollapsed) {
50
57
  t9 = {
51
58
  collapsed: finalCollapsedValue,
52
59
  setCollapsed,
53
60
  duration,
61
+ animate,
54
62
  disableAnimation,
55
63
  keepMounted,
56
64
  id
57
65
  };
58
- $[4] = disableAnimation;
59
- $[5] = duration;
60
- $[6] = finalCollapsedValue;
61
- $[7] = id;
62
- $[8] = keepMounted;
63
- $[9] = setCollapsed;
64
- $[10] = t9;
66
+ $[4] = animate;
67
+ $[5] = disableAnimation;
68
+ $[6] = duration;
69
+ $[7] = finalCollapsedValue;
70
+ $[8] = id;
71
+ $[9] = keepMounted;
72
+ $[10] = setCollapsed;
73
+ $[11] = t9;
65
74
  } else {
66
- t9 = $[10];
75
+ t9 = $[11];
67
76
  }
68
77
  let t10;
69
- if ($[11] !== children || $[12] !== t9) {
70
- t10 = /*#__PURE__*/jsx(CollapseContext.Provider, {
78
+ if ($[12] !== children || $[13] !== t9) {
79
+ t10 = /*#__PURE__*/jsx(CollapseContext, {
71
80
  value: t9,
72
81
  children: children
73
82
  });
74
- $[11] = children;
75
- $[12] = t9;
76
- $[13] = t10;
83
+ $[12] = children;
84
+ $[13] = t9;
85
+ $[14] = t10;
77
86
  } else {
78
- t10 = $[13];
87
+ t10 = $[14];
79
88
  }
80
89
  let t11;
81
- if ($[14] !== className || $[15] !== t10) {
90
+ if ($[15] !== className || $[16] !== t10) {
82
91
  t11 = /*#__PURE__*/jsx("div", {
83
92
  className: className,
84
93
  children: t10
85
94
  });
86
- $[14] = className;
87
- $[15] = t10;
88
- $[16] = t11;
95
+ $[15] = className;
96
+ $[16] = t10;
97
+ $[17] = t11;
89
98
  } else {
90
- t11 = $[16];
99
+ t11 = $[17];
91
100
  }
92
101
  return t11;
93
102
  };
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface CollapsibleGroupProps {
3
+ ref?: React.Ref<HTMLDivElement>;
3
4
  avatar?: React.ReactNode;
4
5
  title: React.ReactNode;
5
6
  subtitle?: React.ReactNode;
@@ -25,5 +26,8 @@ export interface CollapsibleGroupProps {
25
26
  headingLevel?: 2 | 3 | 4 | 5 | 6;
26
27
  'data-test'?: string | null | undefined;
27
28
  }
28
- declare const CollapsibleGroup: React.ForwardRefExoticComponent<CollapsibleGroupProps & React.RefAttributes<HTMLDivElement>>;
29
+ declare const CollapsibleGroup: {
30
+ ({ ref, avatar, title, subtitle, children, className, defaultExpanded, expanded, onChange, disableAnimation, interactive, keepMounted, headingLevel, "data-test": dataTest, }: CollapsibleGroupProps): React.JSX.Element;
31
+ displayName: string;
32
+ };
29
33
  export default CollapsibleGroup;