@jetbrains/ring-ui-built 7.0.72 → 7.0.73

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 (287) hide show
  1. package/components/_helpers/anchor.js +55 -13
  2. package/components/_helpers/avatar-info.js +44 -11
  3. package/components/_helpers/caption.js +2 -2
  4. package/components/_helpers/card.js +21 -21
  5. package/components/_helpers/icon-svg.js +75 -17
  6. package/components/_helpers/input.js +13 -13
  7. package/components/_helpers/query-assist-suggestions.js +5 -5
  8. package/components/_helpers/select-filter.js +5 -5
  9. package/components/_helpers/services-link.js +5 -5
  10. package/components/_helpers/sidebar.js +6 -6
  11. package/components/_helpers/tab-link.js +69 -17
  12. package/components/_helpers/theme.js +231 -54
  13. package/components/_helpers/title.js +5 -5
  14. package/components/alert/alert.d.ts +1 -1
  15. package/components/alert/alert.js +12 -10
  16. package/components/alert/container.js +4 -4
  17. package/components/alert-service/alert-service.d.ts +1 -1
  18. package/components/alert-service/alert-service.js +5 -4
  19. package/components/auth/auth-core.js +8 -8
  20. package/components/auth/auth.js +3 -2
  21. package/components/auth/down-notification.js +61 -17
  22. package/components/auth/iframe-flow.js +7 -6
  23. package/components/auth/storage.js +3 -2
  24. package/components/auth/token-validator.js +1 -1
  25. package/components/auth/window-flow.js +2 -2
  26. package/components/auth-dialog/auth-dialog.d.ts +1 -1
  27. package/components/auth-dialog/auth-dialog.js +15 -14
  28. package/components/auth-dialog-service/auth-dialog-service.js +4 -6
  29. package/components/avatar/avatar-info.d.ts +1 -1
  30. package/components/avatar/avatar-info.js +3 -2
  31. package/components/avatar/avatar.d.ts +1 -1
  32. package/components/avatar/avatar.js +16 -15
  33. package/components/avatar/fallback-avatar.d.ts +1 -1
  34. package/components/avatar/fallback-avatar.js +183 -59
  35. package/components/avatar-stack/avatar-stack.d.ts +1 -1
  36. package/components/avatar-stack/avatar-stack.js +115 -29
  37. package/components/banner/banner.d.ts +1 -1
  38. package/components/banner/banner.js +11 -10
  39. package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
  40. package/components/breadcrumbs/breadcrumbs.js +3 -2
  41. package/components/button/button.d.ts +1 -1
  42. package/components/button/button.js +11 -10
  43. package/components/button-group/button-group.d.ts +1 -1
  44. package/components/button-group/button-group.js +6 -8
  45. package/components/button-group/caption.d.ts +1 -1
  46. package/components/button-group/caption.js +1 -1
  47. package/components/button-set/button-set.d.ts +1 -1
  48. package/components/button-set/button-set.js +2 -5
  49. package/components/button-toolbar/button-toolbar.d.ts +1 -1
  50. package/components/button-toolbar/button-toolbar.js +2 -5
  51. package/components/checkbox/checkbox.d.ts +1 -1
  52. package/components/checkbox/checkbox.js +12 -17
  53. package/components/clipboard/clipboard.js +2 -1
  54. package/components/code/code.d.ts +1 -1
  55. package/components/code/code.js +5 -5
  56. package/components/collapse/collapse-content.js +161 -77
  57. package/components/collapse/collapse-control.js +69 -22
  58. package/components/collapse/collapse.js +83 -31
  59. package/components/confirm/confirm.d.ts +1 -1
  60. package/components/confirm/confirm.js +11 -13
  61. package/components/confirm-service/confirm-service.js +4 -3
  62. package/components/content-layout/content-layout.d.ts +1 -1
  63. package/components/content-layout/content-layout.js +4 -7
  64. package/components/content-layout/sidebar.d.ts +1 -1
  65. package/components/content-layout/sidebar.js +1 -1
  66. package/components/contenteditable/contenteditable.d.ts +2 -2
  67. package/components/contenteditable/contenteditable.js +50 -14
  68. package/components/control-help/control-help.d.ts +1 -1
  69. package/components/control-help/control-help.js +45 -9
  70. package/components/control-label/control-label.js +62 -13
  71. package/components/data-list/data-list.d.ts +1 -1
  72. package/components/data-list/data-list.js +10 -9
  73. package/components/data-list/data-list.mock.d.ts +1 -1
  74. package/components/data-list/data-list.mock.js +79 -78
  75. package/components/data-list/item.d.ts +2 -2
  76. package/components/data-list/item.js +18 -17
  77. package/components/data-list/title.d.ts +1 -1
  78. package/components/data-list/title.js +2 -1
  79. package/components/date-picker/consts.js +1 -1
  80. package/components/date-picker/date-input.d.ts +1 -1
  81. package/components/date-picker/date-input.js +4 -3
  82. package/components/date-picker/date-picker.d.ts +1 -1
  83. package/components/date-picker/date-picker.js +97 -31
  84. package/components/date-picker/date-popup.d.ts +1 -1
  85. package/components/date-picker/date-popup.js +11 -10
  86. package/components/date-picker/day.d.ts +1 -1
  87. package/components/date-picker/day.js +4 -3
  88. package/components/date-picker/month-names.d.ts +1 -1
  89. package/components/date-picker/month-names.js +98 -22
  90. package/components/date-picker/month-slider.d.ts +1 -1
  91. package/components/date-picker/month-slider.js +4 -4
  92. package/components/date-picker/month.d.ts +1 -1
  93. package/components/date-picker/month.js +79 -18
  94. package/components/date-picker/months.d.ts +1 -1
  95. package/components/date-picker/months.js +163 -53
  96. package/components/date-picker/weekdays.d.ts +1 -1
  97. package/components/date-picker/weekdays.js +56 -16
  98. package/components/date-picker/years.d.ts +1 -1
  99. package/components/date-picker/years.js +5 -5
  100. package/components/dialog/dialog.d.ts +1 -1
  101. package/components/dialog/dialog.js +21 -23
  102. package/components/dropdown/anchor.d.ts +1 -1
  103. package/components/dropdown/anchor.js +2 -1
  104. package/components/dropdown/dropdown.d.ts +1 -1
  105. package/components/dropdown/dropdown.js +7 -8
  106. package/components/dropdown-menu/dropdown-menu.js +299 -83
  107. package/components/editable-heading/editable-heading.d.ts +2 -2
  108. package/components/editable-heading/editable-heading.js +523 -174
  109. package/components/error-bubble/error-bubble.d.ts +1 -1
  110. package/components/error-bubble/error-bubble.js +7 -9
  111. package/components/error-message/error-message.d.ts +1 -1
  112. package/components/error-message/error-message.js +8 -10
  113. package/components/footer/footer.js +205 -61
  114. package/components/global/create-stateful-context.d.ts +1 -1
  115. package/components/global/create-stateful-context.js +73 -18
  116. package/components/global/focus-sensor-hoc.js +2 -2
  117. package/components/global/get-uid.js +1 -1
  118. package/components/global/react-dom-renderer.d.ts +1 -1
  119. package/components/global/react-dom-renderer.js +2 -2
  120. package/components/global/rerender-hoc.js +23 -6
  121. package/components/global/theme.js +3 -2
  122. package/components/global/use-event-callback.js +37 -13
  123. package/components/grid/col.d.ts +1 -1
  124. package/components/grid/col.js +3 -3
  125. package/components/grid/grid.d.ts +1 -1
  126. package/components/grid/grid.js +3 -6
  127. package/components/grid/row.d.ts +1 -1
  128. package/components/grid/row.js +3 -3
  129. package/components/group/group.d.ts +1 -1
  130. package/components/group/group.js +3 -6
  131. package/components/header/header-icon.d.ts +1 -1
  132. package/components/header/header-icon.js +3 -2
  133. package/components/header/header.d.ts +1 -1
  134. package/components/header/header.js +7 -12
  135. package/components/header/links.d.ts +1 -1
  136. package/components/header/links.js +45 -10
  137. package/components/header/logo.d.ts +1 -1
  138. package/components/header/logo.js +4 -3
  139. package/components/header/profile.js +17 -16
  140. package/components/header/services-link.d.ts +1 -1
  141. package/components/header/services-link.js +1 -1
  142. package/components/header/services.d.ts +1 -1
  143. package/components/header/services.js +35 -16
  144. package/components/header/smart-profile.d.ts +1 -1
  145. package/components/header/smart-profile.js +6 -5
  146. package/components/header/smart-services.d.ts +1 -1
  147. package/components/header/smart-services.js +3 -2
  148. package/components/header/tray.d.ts +1 -1
  149. package/components/header/tray.js +3 -3
  150. package/components/heading/heading.js +188 -44
  151. package/components/i18n/i18n-context.js +51 -13
  152. package/components/icon/icon-svg.d.ts +1 -1
  153. package/components/icon/icon-svg.js +2 -1
  154. package/components/icon/icon.d.ts +1 -1
  155. package/components/icon/icon.js +6 -5
  156. package/components/icon/index.js +2 -1
  157. package/components/input/input.d.ts +1 -1
  158. package/components/input/input.js +2 -1
  159. package/components/island/adaptive-island-hoc.js +4 -4
  160. package/components/island/content.d.ts +1 -1
  161. package/components/island/content.js +36 -17
  162. package/components/island/header.d.ts +1 -1
  163. package/components/island/header.js +32 -14
  164. package/components/island/island.d.ts +1 -1
  165. package/components/island/island.js +3 -5
  166. package/components/link/clickable-link.d.ts +1 -1
  167. package/components/link/clickable-link.js +2 -2
  168. package/components/link/link.js +4 -4
  169. package/components/list/list-custom.d.ts +1 -1
  170. package/components/list/list-custom.js +2 -2
  171. package/components/list/list-hint.d.ts +1 -1
  172. package/components/list/list-hint.js +3 -7
  173. package/components/list/list-item.d.ts +1 -1
  174. package/components/list/list-item.js +23 -26
  175. package/components/list/list-separator.d.ts +1 -1
  176. package/components/list/list-separator.js +3 -3
  177. package/components/list/list-title.d.ts +1 -1
  178. package/components/list/list-title.js +7 -7
  179. package/components/list/list-users-groups-source.js +6 -5
  180. package/components/list/list.d.ts +6 -6
  181. package/components/list/list.js +33 -31
  182. package/components/loader/loader.d.ts +1 -1
  183. package/components/loader/loader.js +8 -14
  184. package/components/loader-inline/loader-inline.d.ts +1 -1
  185. package/components/loader-inline/loader-inline.js +4 -7
  186. package/components/loader-screen/loader-screen.d.ts +1 -1
  187. package/components/loader-screen/loader-screen.js +3 -6
  188. package/components/login-dialog/login-dialog.d.ts +1 -1
  189. package/components/login-dialog/login-dialog.js +10 -9
  190. package/components/login-dialog/service.js +4 -3
  191. package/components/markdown/markdown.d.ts +1 -1
  192. package/components/markdown/markdown.js +3 -6
  193. package/components/message/message.d.ts +1 -1
  194. package/components/message/message.js +13 -15
  195. package/components/old-browsers-message/white-list.js +2 -2
  196. package/components/pager/pager.d.ts +5 -5
  197. package/components/pager/pager.js +28 -27
  198. package/components/panel/panel.d.ts +1 -1
  199. package/components/panel/panel.js +3 -6
  200. package/components/popup/popup.d.ts +2 -2
  201. package/components/popup/popup.js +14 -11
  202. package/components/popup/popup.target.js +68 -16
  203. package/components/popup-menu/popup-menu.d.ts +1 -1
  204. package/components/popup-menu/popup-menu.js +7 -9
  205. package/components/progress-bar/progress-bar.d.ts +1 -1
  206. package/components/progress-bar/progress-bar.js +4 -7
  207. package/components/query-assist/query-assist-suggestions.d.ts +1 -1
  208. package/components/query-assist/query-assist-suggestions.js +5 -4
  209. package/components/query-assist/query-assist.d.ts +2 -2
  210. package/components/query-assist/query-assist.js +37 -34
  211. package/components/radio/radio-item.d.ts +1 -1
  212. package/components/radio/radio-item.js +40 -20
  213. package/components/radio/radio.d.ts +1 -1
  214. package/components/radio/radio.js +3 -5
  215. package/components/scrollable-section/scrollable-section.d.ts +1 -1
  216. package/components/scrollable-section/scrollable-section.js +100 -38
  217. package/components/select/select-filter.d.ts +1 -1
  218. package/components/select/select-filter.js +5 -4
  219. package/components/select/select-popup.d.ts +7 -7
  220. package/components/select/select-popup.js +26 -25
  221. package/components/select/select.d.ts +3 -3
  222. package/components/select/select.js +52 -52
  223. package/components/shortcuts/shortcuts-hoc.js +3 -3
  224. package/components/slider/slider.js +591 -196
  225. package/components/storage/storage-local.js +2 -1
  226. package/components/storage/storage.js +2 -1
  227. package/components/style.css +1 -1
  228. package/components/tab-trap/tab-trap.js +247 -102
  229. package/components/table/cell.d.ts +1 -1
  230. package/components/table/cell.js +2 -2
  231. package/components/table/disable-hover-hoc.js +3 -3
  232. package/components/table/header-cell.d.ts +1 -1
  233. package/components/table/header-cell.js +7 -6
  234. package/components/table/header.d.ts +2 -2
  235. package/components/table/header.js +14 -13
  236. package/components/table/multitable.d.ts +1 -1
  237. package/components/table/multitable.js +3 -3
  238. package/components/table/row-with-focus-sensor.d.ts +1 -1
  239. package/components/table/row-with-focus-sensor.js +3 -2
  240. package/components/table/row.d.ts +1 -1
  241. package/components/table/row.js +51 -24
  242. package/components/table/selection-shortcuts-hoc.js +2 -2
  243. package/components/table/simple-table.d.ts +1 -1
  244. package/components/table/simple-table.js +4 -3
  245. package/components/table/smart-table.d.ts +1 -1
  246. package/components/table/smart-table.js +4 -3
  247. package/components/table/table.d.ts +2 -2
  248. package/components/table/table.js +21 -23
  249. package/components/tabs/collapsible-more.d.ts +3 -3
  250. package/components/tabs/collapsible-more.js +253 -83
  251. package/components/tabs/collapsible-tab.d.ts +1 -1
  252. package/components/tabs/collapsible-tab.js +4 -3
  253. package/components/tabs/collapsible-tabs.d.ts +2 -2
  254. package/components/tabs/collapsible-tabs.js +450 -188
  255. package/components/tabs/dumb-tabs.d.ts +2 -2
  256. package/components/tabs/dumb-tabs.js +10 -9
  257. package/components/tabs/smart-tabs.d.ts +1 -1
  258. package/components/tabs/smart-tabs.js +6 -5
  259. package/components/tabs/tab-link.d.ts +1 -1
  260. package/components/tabs/tab-link.js +2 -1
  261. package/components/tabs/tab.d.ts +1 -1
  262. package/components/tabs/tab.js +2 -2
  263. package/components/tabs/tabs.js +5 -4
  264. package/components/tag/tag.d.ts +5 -5
  265. package/components/tag/tag.js +14 -13
  266. package/components/tags-input/tags-input.d.ts +1 -1
  267. package/components/tags-input/tags-input.js +10 -9
  268. package/components/tags-list/tags-list.d.ts +2 -2
  269. package/components/tags-list/tags-list.js +4 -3
  270. package/components/text/text.d.ts +1 -1
  271. package/components/text/text.js +2 -2
  272. package/components/toggle/toggle.d.ts +1 -1
  273. package/components/toggle/toggle.js +12 -11
  274. package/components/tooltip/tooltip.d.ts +1 -1
  275. package/components/tooltip/tooltip.js +7 -6
  276. package/components/upload/upload.js +10 -9
  277. package/components/user-agreement/service.js +11 -10
  278. package/components/user-agreement/user-agreement.d.ts +1 -1
  279. package/components/user-agreement/user-agreement.js +19 -18
  280. package/components/user-card/card.d.ts +1 -1
  281. package/components/user-card/card.js +3 -2
  282. package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
  283. package/components/user-card/smart-user-card-tooltip.js +7 -6
  284. package/components/user-card/tooltip.d.ts +2 -2
  285. package/components/user-card/tooltip.js +7 -6
  286. package/components/user-card/user-card.js +4 -3
  287. package/package.json +3 -9
@@ -1,4 +1,4 @@
1
1
  import { PureComponent, type HTMLAttributes } from 'react';
2
2
  export default class Caption extends PureComponent<HTMLAttributes<HTMLElement>> {
3
- render(): import("react/jsx-runtime").JSX.Element;
3
+ render(): import("react").JSX.Element;
4
4
  }
@@ -1,4 +1,4 @@
1
- import 'react/jsx-runtime';
2
1
  import 'react';
3
2
  import 'classnames';
4
3
  export { C as default } from '../_helpers/caption.js';
4
+ import 'react/jsx-runtime';
@@ -6,5 +6,5 @@ export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
6
6
  * @name Button Set
7
7
  */
8
8
  export default class ButtonSet extends PureComponent<ButtonSetProps> {
9
- render(): import("react/jsx-runtime").JSX.Element;
9
+ render(): import("react").JSX.Element;
10
10
  }
@@ -1,13 +1,10 @@
1
- import { jsx } from 'react/jsx-runtime';
2
1
  import { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import joinDataTestAttributes from '../global/data-tests.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  var styles = {"button":"ring-button-button","buttonSet":"ring-button-set-buttonSet"};
7
7
 
8
- /**
9
- * @name Button Set
10
- */
11
8
  class ButtonSet extends PureComponent {
12
9
  render() {
13
10
  const {
@@ -17,7 +14,7 @@ class ButtonSet extends PureComponent {
17
14
  ...restProps
18
15
  } = this.props;
19
16
  const classes = classNames(styles.buttonSet, className);
20
- return jsx("div", {
17
+ return /*#__PURE__*/jsx("div", {
21
18
  ...restProps,
22
19
  "data-test": joinDataTestAttributes('ring-button-set', dataTest),
23
20
  className: classes,
@@ -6,5 +6,5 @@ export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
6
6
  * @name Button Toolbar
7
7
  */
8
8
  export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
9
- render(): import("react/jsx-runtime").JSX.Element;
9
+ render(): import("react").JSX.Element;
10
10
  }
@@ -1,13 +1,10 @@
1
- import { jsx } from 'react/jsx-runtime';
2
1
  import { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import joinDataTestAttributes from '../global/data-tests.js';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
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
- /**
9
- * @name Button Toolbar
10
- */
11
8
  class ButtonToolbar extends PureComponent {
12
9
  render() {
13
10
  const {
@@ -16,7 +13,7 @@ class ButtonToolbar extends PureComponent {
16
13
  ...restProps
17
14
  } = this.props;
18
15
  const classes = classNames(styles.buttonToolbar, className);
19
- return jsx("div", {
16
+ return /*#__PURE__*/jsx("div", {
20
17
  ...restProps,
21
18
  "data-test": joinDataTestAttributes('ring-button-toolbar', dataTest),
22
19
  className: classes
@@ -24,5 +24,5 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
24
24
  input?: HTMLInputElement | null;
25
25
  inputRef: (el: HTMLInputElement | null) => void;
26
26
  composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => void>;
27
- render(): import("react/jsx-runtime").JSX.Element;
27
+ render(): import("react").JSX.Element;
28
28
  }
@@ -1,4 +1,3 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
1
  import { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
@@ -6,20 +5,16 @@ import minusIcon from '@jetbrains/icons/remove-12px';
6
5
  import Icon from '../icon/icon.js';
7
6
  import { createComposedRef } from '../global/compose-refs.js';
8
7
  import ControlHelp from '../control-help/control-help.js';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
9
  import 'util-deprecate';
10
10
  import '../icon/icon.constants.js';
11
11
  import '../_helpers/icon-svg.js';
12
+ import 'react-compiler-runtime';
12
13
  import '../global/memoize.js';
13
14
  import 'memoize-one';
14
15
 
15
16
  var styles = {"checkbox":"ring-checkbox-checkbox","cell":"ring-checkbox-cell","icon":"ring-checkbox-icon","check":"ring-checkbox-check ring-checkbox-icon","minus":"ring-checkbox-minus ring-checkbox-icon","input":"ring-checkbox-input","cellWrapper":"ring-checkbox-cellWrapper","focus":"ring-checkbox-focus","label":"ring-checkbox-label"};
16
17
 
17
- /**
18
- * @name Checkbox
19
- */
20
- /**
21
- * Displays a checkbox.
22
- */
23
18
  class Checkbox extends PureComponent {
24
19
  static defaultProps = {
25
20
  indeterminate: false
@@ -63,31 +58,31 @@ class Checkbox extends PureComponent {
63
58
  const containerClasses = classNames(styles.checkbox, containerClassName);
64
59
  const cellClasses = classNames(styles.cell, cellClassName);
65
60
  const labelClasses = classNames(styles.label, labelClassName);
66
- return jsxs("label", {
61
+ return /*#__PURE__*/jsxs("label", {
67
62
  className: containerClasses,
68
63
  style: containerStyle,
69
- "data-test": 'ring-checkbox',
70
- children: [jsx("input", {
64
+ "data-test": "ring-checkbox",
65
+ children: [/*#__PURE__*/jsx("input", {
71
66
  ...restProps,
72
67
  "data-checked": restProps.checked,
73
68
  ref: this.composedInputRef(this.inputRef, inputRef),
74
- type: 'checkbox',
69
+ type: "checkbox",
75
70
  className: classes
76
- }), jsx("div", {
71
+ }), /*#__PURE__*/jsx("div", {
77
72
  className: styles.cellWrapper,
78
- children: jsxs("span", {
73
+ children: /*#__PURE__*/jsxs("span", {
79
74
  className: cellClasses,
80
- children: [jsx(Icon, {
75
+ children: [/*#__PURE__*/jsx(Icon, {
81
76
  glyph: checkmarkIcon,
82
77
  className: styles.check
83
- }), jsx(Icon, {
78
+ }), /*#__PURE__*/jsx(Icon, {
84
79
  glyph: minusIcon,
85
80
  className: styles.minus
86
81
  })]
87
82
  })
88
- }), jsxs("span", {
83
+ }), /*#__PURE__*/jsxs("span", {
89
84
  className: labelClasses,
90
- children: [label || children, help && jsx(ControlHelp, {
85
+ children: [label || children, help && /*#__PURE__*/jsx(ControlHelp, {
91
86
  children: help
92
87
  })]
93
88
  })]
@@ -1,6 +1,5 @@
1
1
  import alertService from '../alert-service/alert-service.js';
2
2
  import { copyHTMLToClipboard, copyTextToClipboard } from './clipboard-fallback.js';
3
- import 'react/jsx-runtime';
4
3
  import 'react-dom/client';
5
4
  import '../global/get-uid.js';
6
5
  import '../alert/alert.js';
@@ -14,7 +13,9 @@ import '../icon/icon.js';
14
13
  import 'util-deprecate';
15
14
  import '../icon/icon.constants.js';
16
15
  import '../_helpers/icon-svg.js';
16
+ import 'react-compiler-runtime';
17
17
  import '../global/memoize.js';
18
+ import 'react/jsx-runtime';
18
19
  import '../loader-inline/loader-inline.js';
19
20
  import '../global/data-tests.js';
20
21
  import '../global/dom.js';
@@ -25,7 +25,7 @@ export default class Code extends PureComponent<CodeProps> {
25
25
  highlight(): Promise<void>;
26
26
  get codeRef(): HTMLElement | null | undefined;
27
27
  get initCodeRef(): import("react").RefObject<HTMLElement | null> | ((ref: HTMLElement | null) => void);
28
- render(): import("react/jsx-runtime").JSX.Element;
28
+ render(): import("react").JSX.Element;
29
29
  }
30
30
  declare const code: (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
31
31
  export { code, highlight };
@@ -1,4 +1,3 @@
1
- import { jsx } from 'react/jsx-runtime';
2
1
  import { PureComponent } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import highlight from 'highlight.js/lib/core';
@@ -6,6 +5,7 @@ export { default as highlight } from 'highlight.js/lib/core';
6
5
  import normalizeIndent from '../global/normalize-indent.js';
7
6
  import trivialTemplateTag from '../global/trivial-template-tag.js';
8
7
  import memoize from '../global/memoize.js';
8
+ import { jsx } from 'react/jsx-runtime';
9
9
 
10
10
  var styles = {"code":"ring-code-code","inline":"ring-code-inline","softWrap":"ring-code-softWrap"};
11
11
 
@@ -86,10 +86,10 @@ class Code extends PureComponent {
86
86
  [styles.inline]: inline,
87
87
  [styles.softWrap]: softWrap
88
88
  });
89
- return jsx(Tag, {
89
+ return /*#__PURE__*/jsx(Tag, {
90
90
  className: classes,
91
- "data-test": 'ring-code',
92
- children: jsx("code", {
91
+ "data-test": "ring-code",
92
+ children: /*#__PURE__*/jsx("code", {
93
93
  // should be focusable because it can be scrollable
94
94
  tabIndex: inline ? -1 : 0,
95
95
  ref: this.initCodeRef,
@@ -99,7 +99,7 @@ class Code extends PureComponent {
99
99
  });
100
100
  }
101
101
  }
102
- const code = trivialTemplateTag(source => jsx(Code, {
102
+ const code = trivialTemplateTag(source => /*#__PURE__*/jsx(Code, {
103
103
  code: source
104
104
  }));
105
105
 
@@ -1,11 +1,12 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useContext, useRef, useState, useEffect, useMemo } from 'react';
1
+ import { c } from 'react-compiler-runtime';
2
+ import { useContext, 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
6
  import { toPx } from './utils.js';
7
7
  import { CollapseContext } from './collapse-context.js';
8
- import { COLLAPSE_CONTENT_TEST_ID, COLLAPSE_CONTENT_CONTAINER_TEST_ID } from './consts.js';
8
+ import { COLLAPSE_CONTENT_CONTAINER_TEST_ID, COLLAPSE_CONTENT_TEST_ID } from './consts.js';
9
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
10
 
10
11
  var styles = {"container":"ring-collapse-container","transition":"ring-collapse-transition","summary":"ring-collapse-summary","trigger":"ring-collapse-trigger","fade":"ring-collapse-fade"};
11
12
 
@@ -16,11 +17,20 @@ const HIDDEN = 0;
16
17
  /**
17
18
  * @name CollapseContent
18
19
  */
19
- const CollapseContent = ({
20
- children,
21
- minHeight = DEFAULT_HEIGHT,
22
- 'data-test': dataTest
23
- }) => {
20
+ const CollapseContent = t0 => {
21
+ const $ = c(29);
22
+ if ($[0] !== "9f131fd4c1a474c465851e87970886be6fcc71e4c0f7e3864c0cebddbc13aaca") {
23
+ for (let $i = 0; $i < 29; $i += 1) {
24
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
25
+ }
26
+ $[0] = "9f131fd4c1a474c465851e87970886be6fcc71e4c0f7e3864c0cebddbc13aaca";
27
+ }
28
+ const {
29
+ children,
30
+ minHeight: t1,
31
+ "data-test": dataTest
32
+ } = t0;
33
+ const minHeight = t1 === undefined ? DEFAULT_HEIGHT : t1;
24
34
  const {
25
35
  collapsed,
26
36
  duration,
@@ -29,83 +39,157 @@ const CollapseContent = ({
29
39
  } = useContext(CollapseContext);
30
40
  const containerRef = useRef(null);
31
41
  const contentRef = useRef(null);
32
- const initialContentHeight = useRef(minHeight);
33
- const contentHeight = useRef(DEFAULT_HEIGHT);
34
- const [dimensions, setDimensions] = useState({
35
- width: 0,
36
- height: 0
37
- });
38
- const [height, setHeight] = useState(toPx(minHeight));
39
- const [showFade, setShowFade] = useState(collapsed);
42
+ const [initialContentHeight] = useState(minHeight);
43
+ const [contentHeight, setContentHeight] = useState(DEFAULT_HEIGHT);
44
+ const nextHeight = collapsed ? initialContentHeight : contentHeight;
45
+ let t2;
46
+ if ($[1] !== nextHeight) {
47
+ t2 = toPx(nextHeight);
48
+ $[1] = nextHeight;
49
+ $[2] = t2;
50
+ } else {
51
+ t2 = $[2];
52
+ }
53
+ const height = t2;
40
54
  const [shouldHideContent, setShouldHideContent] = useState(collapsed && minHeight <= DEFAULT_HEIGHT);
41
- useEffect(() => {
42
- function onTransitionEnd() {
43
- if (initialContentHeight.current <= DEFAULT_HEIGHT) {
44
- setShouldHideContent(collapsed);
55
+ let t3;
56
+ let t4;
57
+ if ($[3] !== collapsed || $[4] !== initialContentHeight) {
58
+ t3 = () => {
59
+ const onTransitionEnd = function onTransitionEnd() {
60
+ if (initialContentHeight <= DEFAULT_HEIGHT) {
61
+ setShouldHideContent(collapsed);
62
+ }
63
+ };
64
+ const container = containerRef.current;
65
+ container?.addEventListener("transitionend", onTransitionEnd);
66
+ return () => {
67
+ container?.removeEventListener("transitionend", onTransitionEnd);
68
+ };
69
+ };
70
+ t4 = [collapsed, initialContentHeight];
71
+ $[3] = collapsed;
72
+ $[4] = initialContentHeight;
73
+ $[5] = t3;
74
+ $[6] = t4;
75
+ } else {
76
+ t3 = $[5];
77
+ t4 = $[6];
78
+ }
79
+ useEffect(t3, t4);
80
+ if (!collapsed && shouldHideContent) {
81
+ setShouldHideContent(false);
82
+ }
83
+ let t5;
84
+ let t6;
85
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
86
+ t5 = () => {
87
+ if (contentRef.current) {
88
+ const observer = new ResizeObserver(() => {
89
+ setContentHeight(getRect(contentRef.current).height);
90
+ });
91
+ observer.observe(contentRef.current);
45
92
  }
46
- }
47
- const container = containerRef.current;
48
- container?.addEventListener('transitionend', onTransitionEnd);
49
- return () => {
50
- container?.removeEventListener('transitionend', onTransitionEnd);
51
93
  };
52
- }, [collapsed]);
53
- useEffect(() => {
54
- setShowFade(collapsed);
55
- if (!collapsed) setShouldHideContent(false);
56
- }, [collapsed]);
57
- useEffect(() => {
58
- if (contentRef.current) {
59
- contentHeight.current = getRect(contentRef.current).height;
60
- }
61
- }, [minHeight, dimensions.height]);
62
- useEffect(() => {
63
- const nextHeight = collapsed ? initialContentHeight.current : contentHeight.current;
64
- setHeight(toPx(nextHeight));
65
- }, [collapsed, dimensions.height]);
66
- useEffect(() => {
67
- if (contentRef.current) {
68
- const observer = new ResizeObserver(([entry]) => {
69
- if (entry && entry.borderBoxSize) {
70
- const {
71
- inlineSize,
72
- blockSize
73
- } = entry.borderBoxSize[0];
74
- setDimensions({
75
- width: inlineSize,
76
- height: blockSize
77
- });
78
- }
79
- });
80
- observer.observe(contentRef.current);
81
- }
82
- }, []);
83
- const style = useMemo(() => {
84
- const calculatedDuration = duration + contentHeight.current * DURATION_FACTOR;
85
- return {
86
- '--duration': `${calculatedDuration}ms`,
94
+ t6 = [];
95
+ $[7] = t5;
96
+ $[8] = t6;
97
+ } else {
98
+ t5 = $[7];
99
+ t6 = $[8];
100
+ }
101
+ useEffect(t5, t6);
102
+ const calculatedDuration = duration + contentHeight * DURATION_FACTOR;
103
+ const t7 = `${calculatedDuration}ms`;
104
+ const t8 = collapsed && !minHeight ? HIDDEN : VISIBLE;
105
+ let t9;
106
+ if ($[9] !== height || $[10] !== t7 || $[11] !== t8) {
107
+ t9 = {
108
+ "--duration": t7,
87
109
  height,
88
- opacity: collapsed && !minHeight ? HIDDEN : VISIBLE
110
+ opacity: t8
89
111
  };
90
- }, [duration, height, collapsed, minHeight]);
91
- const fadeShouldBeVisible = useMemo(() => Boolean(minHeight && showFade), [minHeight, showFade]);
112
+ $[9] = height;
113
+ $[10] = t7;
114
+ $[11] = t8;
115
+ $[12] = t9;
116
+ } else {
117
+ t9 = $[12];
118
+ }
119
+ const style = t9;
120
+ const fadeShouldBeVisible = Boolean(minHeight && collapsed);
92
121
  const shouldRenderContent = disableAnimation ? !collapsed : !shouldHideContent;
93
- return jsxs("div", {
94
- ref: containerRef,
95
- id: `collapse-content-${id}`,
96
- "data-test": joinDataTestAttributes(COLLAPSE_CONTENT_CONTAINER_TEST_ID),
97
- className: classNames(styles.container, {
98
- [styles.transition]: !disableAnimation
99
- }),
100
- style: style,
101
- children: [jsx("div", {
122
+ const t10 = `collapse-content-${id}`;
123
+ let t11;
124
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
125
+ t11 = joinDataTestAttributes(COLLAPSE_CONTENT_CONTAINER_TEST_ID);
126
+ $[13] = t11;
127
+ } else {
128
+ t11 = $[13];
129
+ }
130
+ const t12 = !disableAnimation;
131
+ let t13;
132
+ if ($[14] !== t12) {
133
+ t13 = classNames(styles.container, {
134
+ [styles.transition]: t12
135
+ });
136
+ $[14] = t12;
137
+ $[15] = t13;
138
+ } else {
139
+ t13 = $[15];
140
+ }
141
+ let t14;
142
+ if ($[16] !== dataTest) {
143
+ t14 = joinDataTestAttributes(COLLAPSE_CONTENT_TEST_ID, dataTest);
144
+ $[16] = dataTest;
145
+ $[17] = t14;
146
+ } else {
147
+ t14 = $[17];
148
+ }
149
+ const t15 = shouldRenderContent ? children : null;
150
+ let t16;
151
+ if ($[18] !== t14 || $[19] !== t15) {
152
+ t16 = /*#__PURE__*/jsx("div", {
102
153
  ref: contentRef,
103
- "data-test": joinDataTestAttributes(COLLAPSE_CONTENT_TEST_ID, dataTest),
104
- children: shouldRenderContent ? children : null
105
- }), fadeShouldBeVisible && jsx("div", {
154
+ "data-test": t14,
155
+ children: t15
156
+ });
157
+ $[18] = t14;
158
+ $[19] = t15;
159
+ $[20] = t16;
160
+ } else {
161
+ t16 = $[20];
162
+ }
163
+ let t17;
164
+ if ($[21] !== fadeShouldBeVisible) {
165
+ t17 = fadeShouldBeVisible && /*#__PURE__*/jsx("div", {
106
166
  className: styles.fade
107
- })]
108
- });
167
+ });
168
+ $[21] = fadeShouldBeVisible;
169
+ $[22] = t17;
170
+ } else {
171
+ t17 = $[22];
172
+ }
173
+ let t18;
174
+ if ($[23] !== style || $[24] !== t10 || $[25] !== t13 || $[26] !== t16 || $[27] !== t17) {
175
+ t18 = /*#__PURE__*/jsxs("div", {
176
+ ref: containerRef,
177
+ id: t10,
178
+ "data-test": t11,
179
+ className: t13,
180
+ style: style,
181
+ children: [t16, t17]
182
+ });
183
+ $[23] = style;
184
+ $[24] = t10;
185
+ $[25] = t13;
186
+ $[26] = t16;
187
+ $[27] = t17;
188
+ $[28] = t18;
189
+ } else {
190
+ t18 = $[28];
191
+ }
192
+ return t18;
109
193
  };
110
194
 
111
195
  export { CollapseContent, CollapseContent as default };
@@ -1,36 +1,83 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useContext, useMemo, cloneElement } from 'react';
1
+ import { c } from 'react-compiler-runtime';
2
+ import { useContext, 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';
6
+ import { jsx } from 'react/jsx-runtime';
6
7
 
7
- /**
8
- * @name CollapseControl
9
- */
10
- const CollapseControl = ({
11
- children,
12
- 'data-test': dataTest
13
- }) => {
8
+ const CollapseControl = t0 => {
9
+ const $ = c(14);
10
+ if ($[0] !== "c08d56828661e71eca0e3f115b12585590bbebb907f6399b722daeb5173d93d4") {
11
+ for (let $i = 0; $i < 14; $i += 1) {
12
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
13
+ }
14
+ $[0] = "c08d56828661e71eca0e3f115b12585590bbebb907f6399b722daeb5173d93d4";
15
+ }
16
+ const {
17
+ children,
18
+ "data-test": dataTest
19
+ } = t0;
14
20
  const {
15
21
  setCollapsed,
16
22
  collapsed,
17
23
  id
18
24
  } = useContext(CollapseContext);
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- const child = useMemo(() => {
21
- if (typeof children === 'function') {
22
- return children(collapsed);
25
+ let t1;
26
+ bb0: {
27
+ if (typeof children === "function") {
28
+ let t2;
29
+ if ($[1] !== children || $[2] !== collapsed) {
30
+ t2 = children(collapsed);
31
+ $[1] = children;
32
+ $[2] = collapsed;
33
+ $[3] = t2;
34
+ } else {
35
+ t2 = $[3];
36
+ }
37
+ t1 = t2;
38
+ break bb0;
23
39
  }
24
- return children;
25
- }, [children, collapsed]);
26
- return jsx("p", {
27
- "data-test": joinDataTestAttributes(COLLAPSE_CONTROL_TEST_ID, dataTest),
28
- children: /*#__PURE__*/cloneElement(child, {
40
+ t1 = children;
41
+ }
42
+ const child = t1;
43
+ let t2;
44
+ if ($[4] !== dataTest) {
45
+ t2 = joinDataTestAttributes(COLLAPSE_CONTROL_TEST_ID, dataTest);
46
+ $[4] = dataTest;
47
+ $[5] = t2;
48
+ } else {
49
+ t2 = $[5];
50
+ }
51
+ const t3 = `collapse-content-${id}`;
52
+ const t4 = String(!collapsed);
53
+ let t5;
54
+ if ($[6] !== child || $[7] !== setCollapsed || $[8] !== t3 || $[9] !== t4) {
55
+ t5 = /*#__PURE__*/cloneElement(child, {
29
56
  onClick: setCollapsed,
30
- 'aria-controls': `collapse-content-${id}`,
31
- 'aria-expanded': String(!collapsed)
32
- })
33
- });
57
+ "aria-controls": t3,
58
+ "aria-expanded": t4
59
+ });
60
+ $[6] = child;
61
+ $[7] = setCollapsed;
62
+ $[8] = t3;
63
+ $[9] = t4;
64
+ $[10] = t5;
65
+ } else {
66
+ t5 = $[10];
67
+ }
68
+ let t6;
69
+ if ($[11] !== t2 || $[12] !== t5) {
70
+ t6 = /*#__PURE__*/jsx("p", {
71
+ "data-test": t2,
72
+ children: t5
73
+ });
74
+ $[11] = t2;
75
+ $[12] = t5;
76
+ $[13] = t6;
77
+ } else {
78
+ t6 = $[13];
79
+ }
80
+ return t6;
34
81
  };
35
82
 
36
83
  export { CollapseControl, CollapseControl as default };