@jetbrains/ring-ui-built 7.0.66 → 7.0.70

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 (231) hide show
  1. package/components/_helpers/anchor.js +12 -17
  2. package/components/_helpers/avatar-info.js +4 -5
  3. package/components/_helpers/button.classes.js +20 -21
  4. package/components/_helpers/caption.js +3 -3
  5. package/components/_helpers/card.js +26 -32
  6. package/components/_helpers/dialog-body-scroll-preventer.js +1 -2
  7. package/components/_helpers/icon-svg.js +9 -12
  8. package/components/_helpers/input.js +78 -86
  9. package/components/_helpers/loader-core.js +260 -0
  10. package/components/_helpers/query-assist-suggestions.js +0 -1
  11. package/components/_helpers/select-filter.js +19 -26
  12. package/components/_helpers/services-link.js +9 -12
  13. package/components/_helpers/sidebar.js +36 -44
  14. package/components/_helpers/tab-link.js +9 -11
  15. package/components/_helpers/theme.js +20 -24
  16. package/components/_helpers/title.js +12 -17
  17. package/components/alert/alert.js +41 -49
  18. package/components/alert/container.js +9 -12
  19. package/components/alert-service/alert-service.js +23 -32
  20. package/components/analytics/analytics-custom-plugin.js +12 -17
  21. package/components/analytics/analytics.js +1 -3
  22. package/components/auth/auth-core.js +128 -170
  23. package/components/auth/auth.js +3 -10
  24. package/components/auth/background-flow.js +5 -8
  25. package/components/auth/down-notification.js +9 -17
  26. package/components/auth/iframe-flow.js +13 -19
  27. package/components/auth/request-builder.js +4 -9
  28. package/components/auth/response-parser.js +9 -12
  29. package/components/auth/storage.js +12 -18
  30. package/components/auth/token-validator.js +19 -30
  31. package/components/auth/window-flow.js +22 -27
  32. package/components/auth-dialog/auth-dialog.js +40 -48
  33. package/components/auth-dialog-service/auth-dialog-service.js +10 -13
  34. package/components/avatar/avatar.figma.js +6 -6
  35. package/components/avatar/avatar.js +58 -59
  36. package/components/avatar/fallback-avatar.js +8 -11
  37. package/components/avatar-stack/avatar-stack.figma.js +10 -11
  38. package/components/avatar-stack/avatar-stack.js +25 -31
  39. package/components/banner/banner.js +0 -6
  40. package/components/breadcrumbs/breadcrumbs.figma.js +8 -6
  41. package/components/breadcrumbs/breadcrumbs.js +4 -5
  42. package/components/button/button.figma.js +15 -10
  43. package/components/button/button.js +59 -64
  44. package/components/button-group/button-group.js +11 -15
  45. package/components/button-group/caption.js +0 -1
  46. package/components/button-set/button-set.js +9 -12
  47. package/components/button-toolbar/button-toolbar.js +8 -11
  48. package/components/caret/caret.js +20 -28
  49. package/components/checkbox/checkbox-group.figma.js +8 -10
  50. package/components/checkbox/checkbox.figma.js +5 -5
  51. package/components/checkbox/checkbox.js +27 -35
  52. package/components/clipboard/clipboard-fallback.js +3 -3
  53. package/components/clipboard/clipboard.js +3 -16
  54. package/components/code/code.js +8 -14
  55. package/components/collapse/collapse-content.js +10 -15
  56. package/components/collapse/collapse-control.js +5 -7
  57. package/components/collapse/collapse.js +9 -11
  58. package/components/collapse/utils.js +1 -1
  59. package/components/confirm/confirm.js +17 -26
  60. package/components/confirm-service/confirm-service.js +30 -31
  61. package/components/content-layout/content-layout.js +21 -28
  62. package/components/content-layout/sidebar.js +0 -2
  63. package/components/contenteditable/contenteditable.js +23 -28
  64. package/components/control-help/control-help.js +8 -10
  65. package/components/control-label/control-label.js +12 -17
  66. package/components/data-list/data-list.js +57 -65
  67. package/components/data-list/data-list.mock.js +0 -4
  68. package/components/data-list/item.js +65 -72
  69. package/components/data-list/selection.js +11 -19
  70. package/components/data-list/title.js +0 -4
  71. package/components/date-picker/consts.js +3 -4
  72. package/components/date-picker/date-input.js +25 -33
  73. package/components/date-picker/date-picker.js +179 -193
  74. package/components/date-picker/date-popup.js +135 -127
  75. package/components/date-picker/day.d.ts +1 -1
  76. package/components/date-picker/day.js +24 -30
  77. package/components/date-picker/month-names.js +7 -12
  78. package/components/date-picker/month-slider.js +16 -22
  79. package/components/date-picker/month.js +3 -5
  80. package/components/date-picker/months.js +6 -6
  81. package/components/date-picker/weekdays.js +0 -1
  82. package/components/date-picker/years.js +20 -26
  83. package/components/dialog/dialog-body-scroll-preventer.js +0 -1
  84. package/components/dialog/dialog.js +73 -83
  85. package/components/dropdown/anchor.js +0 -4
  86. package/components/dropdown/dropdown.js +98 -114
  87. package/components/dropdown-menu/dropdown-menu.js +80 -79
  88. package/components/editable-heading/editable-heading.js +48 -54
  89. package/components/error-bubble/error-bubble.figma.js +4 -4
  90. package/components/error-bubble/error-bubble.js +9 -13
  91. package/components/error-message/error-message.js +1 -6
  92. package/components/footer/footer.js +11 -15
  93. package/components/global/compose-refs.js +1 -4
  94. package/components/global/compose.js +1 -4
  95. package/components/global/configuration.js +3 -3
  96. package/components/global/controls-height.js +0 -1
  97. package/components/global/create-stateful-context.js +10 -14
  98. package/components/global/data-tests.js +2 -10
  99. package/components/global/dom.js +6 -19
  100. package/components/global/focus-sensor-hoc.js +74 -87
  101. package/components/global/fuzzy-highlight.js +3 -8
  102. package/components/global/get-uid.js +1 -1
  103. package/components/global/inject-styles.js +5 -6
  104. package/components/global/listeners.js +2 -11
  105. package/components/global/memoize.js +0 -2
  106. package/components/global/normalize-indent.js +2 -6
  107. package/components/global/promise-with-timeout.js +4 -5
  108. package/components/global/react-dom-renderer.js +4 -9
  109. package/components/global/rerender-hoc.js +8 -11
  110. package/components/global/schedule-raf.js +1 -2
  111. package/components/global/theme.js +0 -5
  112. package/components/global/trivial-template-tag.js +1 -6
  113. package/components/global/url.js +2 -6
  114. package/components/global/use-event-callback.js +2 -3
  115. package/components/grid/col.js +7 -18
  116. package/components/grid/grid.js +9 -14
  117. package/components/grid/row.js +7 -11
  118. package/components/group/group.js +9 -12
  119. package/components/header/header-icon.js +8 -13
  120. package/components/header/header.js +16 -27
  121. package/components/header/links.js +7 -10
  122. package/components/header/logo.js +12 -16
  123. package/components/header/profile.js +73 -83
  124. package/components/header/services-link.js +0 -2
  125. package/components/header/services.js +32 -43
  126. package/components/header/smart-profile.js +44 -59
  127. package/components/header/smart-services.js +33 -45
  128. package/components/header/tray.js +8 -10
  129. package/components/heading/heading.js +27 -27
  130. package/components/http/http.js +120 -125
  131. package/components/http/http.mock.js +6 -10
  132. package/components/hub-source/hub-source-user.js +6 -13
  133. package/components/hub-source/hub-source-users-groups.js +8 -12
  134. package/components/hub-source/hub-source.js +8 -10
  135. package/components/i18n/i18n-context.js +4 -7
  136. package/components/i18n/i18n.js +5 -5
  137. package/components/icon/icon-svg.js +0 -4
  138. package/components/icon/icon.js +28 -32
  139. package/components/icon/index.js +0 -4
  140. package/components/input/input.figma.js +8 -8
  141. package/components/input/input.js +0 -4
  142. package/components/island/adaptive-island-hoc.js +19 -23
  143. package/components/island/content.js +70 -75
  144. package/components/island/header.js +21 -21
  145. package/components/island/island.js +11 -14
  146. package/components/link/clickable-link.js +30 -37
  147. package/components/link/link.js +27 -29
  148. package/components/list/list-custom.js +6 -11
  149. package/components/list/list-item.js +49 -56
  150. package/components/list/list-separator.js +0 -1
  151. package/components/list/list-title.js +0 -1
  152. package/components/list/list-users-groups-source.js +14 -22
  153. package/components/list/list.classes.js +8 -9
  154. package/components/list/list.js +387 -404
  155. package/components/loader/loader-core.js +2 -265
  156. package/components/loader/loader.d.ts +8 -0
  157. package/components/loader/loader.js +43 -29
  158. package/components/loader-inline/loader-inline.js +9 -12
  159. package/components/loader-screen/loader-screen.js +10 -14
  160. package/components/login-dialog/login-dialog.js +46 -54
  161. package/components/login-dialog/service.js +13 -15
  162. package/components/message/message.js +65 -79
  163. package/components/old-browsers-message/old-browsers-message-stop.js +0 -3
  164. package/components/old-browsers-message/old-browsers-message.js +1 -4
  165. package/components/old-browsers-message/white-list.js +5 -7
  166. package/components/pager/pager.js +73 -88
  167. package/components/panel/panel.js +9 -12
  168. package/components/permissions/permissions-cache.js +6 -8
  169. package/components/permissions/permissions.js +19 -21
  170. package/components/popup/popup.js +136 -145
  171. package/components/popup/popup.target.js +8 -10
  172. package/components/popup/position-css.js +19 -27
  173. package/components/popup/position.js +22 -28
  174. package/components/popup-menu/popup-menu.js +27 -37
  175. package/components/progress-bar/progress-bar.js +26 -32
  176. package/components/query-assist/query-assist-suggestions.js +0 -6
  177. package/components/query-assist/query-assist.js +432 -468
  178. package/components/radio/radio-item.js +30 -40
  179. package/components/radio/radio.js +6 -10
  180. package/components/scrollable-section/scrollable-section.js +7 -10
  181. package/components/select/select-filter.js +0 -6
  182. package/components/select/select-popup.js +155 -174
  183. package/components/select/select.js +464 -479
  184. package/components/shortcuts/core.js +40 -45
  185. package/components/shortcuts/shortcut-title.js +0 -1
  186. package/components/shortcuts/shortcuts-hoc.js +9 -15
  187. package/components/shortcuts/shortcuts.js +3 -5
  188. package/components/slider/slider.js +53 -66
  189. package/components/slider/slider.utils.js +1 -4
  190. package/components/storage/storage-local.js +2 -8
  191. package/components/storage/storage.js +0 -5
  192. package/components/style.css +1 -1
  193. package/components/tab-trap/tab-trap.js +21 -30
  194. package/components/table/cell.js +3 -4
  195. package/components/table/disable-hover-hoc.js +24 -28
  196. package/components/table/header-cell.js +30 -38
  197. package/components/table/header.js +20 -28
  198. package/components/table/multitable.js +81 -101
  199. package/components/table/row-with-focus-sensor.js +17 -28
  200. package/components/table/row.js +89 -99
  201. package/components/table/selection-adapter.js +0 -2
  202. package/components/table/selection-shortcuts-hoc.js +159 -161
  203. package/components/table/selection.js +23 -31
  204. package/components/table/simple-table.js +16 -22
  205. package/components/table/smart-table.js +19 -26
  206. package/components/table/table.js +137 -146
  207. package/components/tabs/collapsible-more.js +34 -47
  208. package/components/tabs/collapsible-tab.js +28 -33
  209. package/components/tabs/collapsible-tabs.js +16 -24
  210. package/components/tabs/custom-item.js +3 -6
  211. package/components/tabs/dumb-tabs.js +48 -64
  212. package/components/tabs/smart-tabs.js +14 -23
  213. package/components/tabs/tab-link.js +0 -2
  214. package/components/tabs/tab.js +0 -1
  215. package/components/tabs/tabs.js +0 -7
  216. package/components/tag/tag.js +30 -35
  217. package/components/tags-input/tags-input.js +192 -218
  218. package/components/tags-list/tags-list.js +26 -31
  219. package/components/text/text.js +16 -19
  220. package/components/toggle/toggle.js +19 -23
  221. package/components/tooltip/tooltip.js +110 -121
  222. package/components/upload/upload.js +19 -28
  223. package/components/user-agreement/service.js +247 -252
  224. package/components/user-agreement/toolbox.eula.js +160 -1
  225. package/components/user-agreement/user-agreement.js +23 -32
  226. package/components/user-card/card.js +0 -5
  227. package/components/user-card/smart-user-card-tooltip.js +41 -50
  228. package/components/user-card/tooltip.js +32 -38
  229. package/components/user-card/user-card.js +0 -5
  230. package/package.json +9 -3
  231. package/components/_helpers/_rollupPluginBabelHelpers.js +0 -72
@@ -1,7 +1,5 @@
1
- import { c as _taggedTemplateLiteral } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import figma from '@figma/code-connect';
3
2
 
4
- var _templateObject;
5
3
  const instance = figma.selectedInstance;
6
4
  const size = instance.getString('Size');
7
5
  const state = instance.getString('State');
@@ -22,7 +20,7 @@ const DEFAULT_SIZE = 'M';
22
20
  const isDefaultSize = size === DEFAULT_SIZE;
23
21
  if (!isDefaultSize) {
24
22
  imports.push("import {ControlsHeight} from '@jetbrains/ring-ui/components/global/controls-height'");
25
- props.push("height={ControlsHeight.".concat(size, "}"));
23
+ props.push(`height={ControlsHeight.${size}}`);
26
24
  }
27
25
  switch (state) {
28
26
  case 'disabled':
@@ -44,20 +42,22 @@ if (clearable) {
44
42
  props.push('onClear={() => {}}');
45
43
  }
46
44
  if (hasLabel) {
47
- props.push("label=\"".concat(label, "\""));
45
+ props.push(`label="${label}"`);
48
46
  }
49
47
  if (hasHelpText) {
50
- props.push("help=\"".concat(helpText, "\""));
48
+ props.push(`help="${helpText}"`);
51
49
  }
52
50
  if (hasText) {
53
- props.push("defaultValue=\"".concat(text, "\""));
51
+ props.push(`defaultValue="${text}"`);
54
52
  }
55
53
  if (hasPlaceholder) {
56
- props.push("placeholder=\"".concat(placeholder, "\""));
54
+ props.push(`placeholder="${placeholder}"`);
57
55
  }
58
56
  var input_figma = {
59
57
  id: 'input',
60
- example: figma.code(_templateObject || (_templateObject = _taggedTemplateLiteral(["", "\n\n<Input ", "/>"])), imports.join('\n'), props.map(prop => "".concat(prop, " ")).join(''))
58
+ example: figma.code`${imports.join('\n')}
59
+
60
+ <Input ${props.map(prop => `${prop} `).join('')}/>`
61
61
  };
62
62
 
63
63
  export { input_figma as default };
@@ -1,5 +1,3 @@
1
- import '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
1
  import 'react/jsx-runtime';
4
2
  import 'react';
5
3
  import 'classnames';
@@ -20,8 +18,6 @@ import '../link/clickable-link.js';
20
18
  import '../_helpers/button.classes.js';
21
19
  import '../icon/icon.constants.js';
22
20
  import '../_helpers/icon-svg.js';
23
- import 'core-js/modules/es.regexp.exec.js';
24
- import 'core-js/modules/es.string.replace.js';
25
21
  import '../global/memoize.js';
26
22
  import '../global/configuration.js';
27
23
  import '../i18n/i18n.js';
@@ -1,5 +1,3 @@
1
- import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
1
  import { jsx } from 'react/jsx-runtime';
4
2
  import { createContext, Component } from 'react';
5
3
  import { interpolateLinear } from '../global/linear-function.js';
@@ -10,32 +8,30 @@ const PhaseContext = /*#__PURE__*/createContext(null);
10
8
  const ScrollHandlerContext = /*#__PURE__*/createContext(null);
11
9
  function adaptiveIslandHOC(ComposedComponent) {
12
10
  return class AdaptiveIsland extends Component {
13
- constructor() {
14
- super(...arguments);
15
- _defineProperty(this, "state", {
16
- phase: null
17
- });
18
- _defineProperty(this, "onContentScroll", _ref => {
19
- var _this$state$phase;
20
- let {
21
- scrollTop,
22
- scrollHeight,
23
- clientHeight
24
- } = _ref;
25
- if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, (_this$state$phase = this.state.phase) !== null && _this$state$phase !== void 0 ? _this$state$phase : 0)) {
26
- const phase = Math.min(1, Math.max(0, scrollTop) / TITLE_RESIZE_END);
27
- this.setState({
28
- phase
29
- });
30
- }
31
- });
32
- }
11
+ state = {
12
+ phase: null
13
+ };
14
+ onContentScroll = ({
15
+ scrollTop,
16
+ scrollHeight,
17
+ clientHeight
18
+ }) => {
19
+ var _this$state$phase;
20
+ if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, (_this$state$phase = this.state.phase) !== null && _this$state$phase !== void 0 ? _this$state$phase : 0)) {
21
+ const phase = Math.min(1, Math.max(0, scrollTop) / TITLE_RESIZE_END);
22
+ this.setState({
23
+ phase
24
+ });
25
+ }
26
+ };
33
27
  render() {
34
28
  return jsx(PhaseContext.Provider, {
35
29
  value: this.state.phase,
36
30
  children: jsx(ScrollHandlerContext.Provider, {
37
31
  value: this.onContentScroll,
38
- children: jsx(ComposedComponent, _objectSpread2({}, this.props))
32
+ children: jsx(ComposedComponent, {
33
+ ...this.props
34
+ })
39
35
  })
40
36
  });
41
37
  }
@@ -1,5 +1,3 @@
1
- import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
1
  import { jsx, jsxs } from 'react/jsx-runtime';
4
2
  import { forwardRef, Component } from 'react';
5
3
  import classNames from 'classnames';
@@ -9,61 +7,20 @@ import { s as styles } from '../_helpers/island.js';
9
7
  import { ScrollHandlerContext } from './adaptive-island-hoc.js';
10
8
  import '../global/linear-function.js';
11
9
 
12
- const _excluded = ["children", "className", "bottomBorder", "scrollableWrapperClassName", "onScroll", "onScrollToBottom", "fade", "tabIndex"];
13
10
  const scheduleScrollAction = scheduleRAF();
14
11
  const noop = () => {};
15
12
  const END_DISTANCE = 16;
16
13
  class Content extends Component {
17
- constructor() {
18
- super(...arguments);
19
- _defineProperty(this, "state", {
20
- scrolledToTop: true,
21
- scrolledToBottom: false
22
- });
23
- _defineProperty(this, "resizeDetector", createResizeDetector({
24
- strategy: 'scroll'
25
- }));
26
- _defineProperty(this, "wrapperNode", void 0);
27
- _defineProperty(this, "setWrapper", node => {
28
- if (!node) {
29
- return;
30
- }
31
- this.wrapperNode = node;
32
- this.resizeDetector.listenTo(node, this.calculateScrollPosition);
33
- });
34
- _defineProperty(this, "calculateScrollPosition", () => scheduleScrollAction(() => {
35
- const {
36
- scrollableNode
37
- } = this;
38
- if (!scrollableNode) {
39
- return;
40
- }
41
- this.props.onScroll(scrollableNode);
42
- const {
43
- scrollTop,
44
- scrollHeight,
45
- offsetHeight
46
- } = scrollableNode;
47
- const scrolledToTop = scrollTop === 0;
48
- const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
49
- if (scrolledToBottom) {
50
- var _this$props$onScrollT, _this$props;
51
- (_this$props$onScrollT = (_this$props = this.props).onScrollToBottom) === null || _this$props$onScrollT === void 0 || _this$props$onScrollT.call(_this$props);
52
- }
53
- this.setState({
54
- scrolledToTop,
55
- scrolledToBottom
56
- });
57
- }));
58
- _defineProperty(this, "scrollableNode", void 0);
59
- _defineProperty(this, "setScrollableNodeAndCalculatePosition", node => {
60
- if (!node) {
61
- return;
62
- }
63
- this.scrollableNode = node;
64
- this.calculateScrollPosition();
65
- });
66
- }
14
+ static defaultProps = {
15
+ fade: true,
16
+ bottomBorder: false,
17
+ onScroll: noop,
18
+ onScrollToBottom: noop
19
+ };
20
+ state = {
21
+ scrolledToTop: true,
22
+ scrolledToBottom: false
23
+ };
67
24
  componentWillUnmount() {
68
25
  this.scrollableNode = null;
69
26
  if (!this.wrapperNode) {
@@ -71,19 +28,60 @@ class Content extends Component {
71
28
  }
72
29
  this.resizeDetector.removeAllListeners(this.wrapperNode);
73
30
  }
31
+ resizeDetector = createResizeDetector({
32
+ strategy: 'scroll'
33
+ });
34
+ wrapperNode;
35
+ setWrapper = node => {
36
+ if (!node) {
37
+ return;
38
+ }
39
+ this.wrapperNode = node;
40
+ this.resizeDetector.listenTo(node, this.calculateScrollPosition);
41
+ };
42
+ calculateScrollPosition = () => scheduleScrollAction(() => {
43
+ const {
44
+ scrollableNode
45
+ } = this;
46
+ if (!scrollableNode) {
47
+ return;
48
+ }
49
+ this.props.onScroll(scrollableNode);
50
+ const {
51
+ scrollTop,
52
+ scrollHeight,
53
+ offsetHeight
54
+ } = scrollableNode;
55
+ const scrolledToTop = scrollTop === 0;
56
+ const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
57
+ if (scrolledToBottom) {
58
+ this.props.onScrollToBottom?.();
59
+ }
60
+ this.setState({
61
+ scrolledToTop,
62
+ scrolledToBottom
63
+ });
64
+ });
65
+ scrollableNode;
66
+ setScrollableNodeAndCalculatePosition = node => {
67
+ if (!node) {
68
+ return;
69
+ }
70
+ this.scrollableNode = node;
71
+ this.calculateScrollPosition();
72
+ };
74
73
  render() {
75
- const _this$props2 = this.props,
76
- {
77
- children,
78
- className,
79
- bottomBorder,
80
- scrollableWrapperClassName,
81
- onScroll,
82
- onScrollToBottom,
83
- fade,
84
- tabIndex
85
- } = _this$props2,
86
- restProps = _objectWithoutProperties(_this$props2, _excluded);
74
+ const {
75
+ children,
76
+ className,
77
+ bottomBorder,
78
+ scrollableWrapperClassName,
79
+ onScroll,
80
+ onScrollToBottom,
81
+ fade,
82
+ tabIndex,
83
+ ...restProps
84
+ } = this.props;
87
85
  const {
88
86
  scrolledToTop,
89
87
  scrolledToBottom
@@ -95,7 +93,8 @@ class Content extends Component {
95
93
  [styles.withBottomBorder]: bottomBorder && !scrolledToBottom
96
94
  });
97
95
  const scrollableWrapperClasses = classNames(styles.scrollableWrapper, scrollableWrapperClassName);
98
- return jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
96
+ return jsx("div", {
97
+ ...restProps,
99
98
  "data-test": 'ring-island-content',
100
99
  className: classes,
101
100
  children: jsxs("div", {
@@ -108,24 +107,20 @@ class Content extends Component {
108
107
  children: children
109
108
  }), !fade && children]
110
109
  })
111
- }));
110
+ });
112
111
  }
113
112
  }
114
- _defineProperty(Content, "defaultProps", {
115
- fade: true,
116
- bottomBorder: false,
117
- onScroll: noop,
118
- onScrollToBottom: noop
119
- });
120
113
  const ContentWrapper = /*#__PURE__*/forwardRef((props, ref) => jsx(ScrollHandlerContext.Consumer, {
121
114
  children: onScroll => {
122
115
  const addProps = onScroll ? {
123
116
  onScroll,
124
117
  bottomBorder: true
125
118
  } : {};
126
- return jsx(Content, _objectSpread2(_objectSpread2(_objectSpread2({}, props), addProps), {}, {
119
+ return jsx(Content, {
120
+ ...props,
121
+ ...addProps,
127
122
  ref: ref
128
- }));
123
+ });
129
124
  }
130
125
  }));
131
126
  ContentWrapper.displayName = 'ContentWrapper';
@@ -1,13 +1,10 @@
1
- import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
2
  import { Component } from 'react';
4
3
  import classNames from 'classnames';
5
4
  import { interpolateLinear } from '../global/linear-function.js';
6
5
  import { s as styles } from '../_helpers/island.js';
7
6
  import { PhaseContext } from './adaptive-island-hoc.js';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
7
 
10
- const _excluded = ["children", "className", "wrapWithTitle", "border", "phase"];
11
8
  const Start = {
12
9
  FONT_SIZE: 24,
13
10
  LINE_HEIGHT: 28,
@@ -29,6 +26,9 @@ const End = {
29
26
  };
30
27
  const BORDER_APPEAR_PHASE = 0.5;
31
28
  class Header extends Component {
29
+ static defaultProps = {
30
+ wrapWithTitle: true
31
+ };
32
32
  style(name) {
33
33
  var _this$props$phase;
34
34
  return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
@@ -39,7 +39,7 @@ class Header extends Component {
39
39
  const scaleFont = this.style('FONT_SIZE') / Start.FONT_SIZE;
40
40
  return {
41
41
  fontSize: Start.FONT_SIZE,
42
- transform: "translate(".concat(this.style('X'), "px, ").concat(this.style('Y'), "px) scale(").concat(scaleFont, ")"),
42
+ transform: `translate(${this.style('X')}px, ${this.style('Y')}px) scale(${scaleFont})`,
43
43
  letterSpacing: this.style('SPACING')
44
44
  };
45
45
  }
@@ -48,26 +48,26 @@ class Header extends Component {
48
48
  };
49
49
  }
50
50
  render() {
51
- const _this$props = this.props,
52
- {
53
- children,
54
- className,
55
- wrapWithTitle,
56
- border,
57
- phase
58
- } = _this$props,
59
- restProps = _objectWithoutProperties(_this$props, _excluded);
51
+ const {
52
+ children,
53
+ className,
54
+ wrapWithTitle,
55
+ border,
56
+ phase,
57
+ ...restProps
58
+ } = this.props;
60
59
  const classes = classNames(styles.header, className, {
61
60
  [styles.withBottomBorder]: border || phase && phase >= BORDER_APPEAR_PHASE
62
61
  });
63
62
  const headerStyle = phase !== null && phase !== undefined ? {
64
- lineHeight: "".concat(this.style('LINE_HEIGHT'), "px"),
63
+ lineHeight: `${this.style('LINE_HEIGHT')}px`,
65
64
  // need to append px because number is a valid line-height value
66
65
  paddingTop: this.style('PADDING_TOP'),
67
66
  paddingBottom: this.style('PADDING_BOTTOM')
68
67
  } : undefined;
69
68
  const titleStyle = this.getTitleStyle(phase);
70
- return jsxs("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
69
+ return jsxs("div", {
70
+ ...restProps,
71
71
  "data-test": 'ring-island-header',
72
72
  className: classes,
73
73
  style: headerStyle,
@@ -76,18 +76,18 @@ class Header extends Component {
76
76
  style: titleStyle,
77
77
  children: children
78
78
  }), !wrapWithTitle && children]
79
- }));
79
+ });
80
80
  }
81
81
  }
82
- _defineProperty(Header, "defaultProps", {
83
- wrapWithTitle: true
84
- });
85
82
  const HeaderWrapper = props => jsx(PhaseContext.Consumer, {
86
83
  children: phase => {
87
84
  const addProps = phase !== null && phase !== undefined ? {
88
85
  phase
89
86
  } : {};
90
- return jsx(Header, _objectSpread2(_objectSpread2({}, props), addProps));
87
+ return jsx(Header, {
88
+ ...props,
89
+ ...addProps
90
+ });
91
91
  }
92
92
  });
93
93
 
@@ -1,4 +1,3 @@
1
- import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import { jsx } from 'react/jsx-runtime';
3
2
  import { Component } from 'react';
4
3
  import classNames from 'classnames';
@@ -7,35 +6,33 @@ import adaptiveIslandHOC from './adaptive-island-hoc.js';
7
6
  import { s as styles } from '../_helpers/island.js';
8
7
  export { default as Header } from './header.js';
9
8
  export { default as Content } from './content.js';
10
- import 'core-js/modules/web.dom-collections.iterator.js';
11
9
  import '../global/linear-function.js';
12
10
  import 'element-resize-detector';
13
11
  import '../global/schedule-raf.js';
14
12
 
15
- const _excluded = ["children", "className", "narrow", "withoutPaddings", "data-test"];
16
13
  /**
17
14
  * @name Island
18
15
  */
19
16
  class Island extends Component {
20
17
  render() {
21
- const _this$props = this.props,
22
- {
23
- children,
24
- className,
25
- narrow,
26
- withoutPaddings,
27
- 'data-test': dataTest
28
- } = _this$props,
29
- restProps = _objectWithoutProperties(_this$props, _excluded);
18
+ const {
19
+ children,
20
+ className,
21
+ narrow,
22
+ withoutPaddings,
23
+ 'data-test': dataTest,
24
+ ...restProps
25
+ } = this.props;
30
26
  const classes = classNames(styles.island, className, {
31
27
  [styles.narrowIsland]: narrow,
32
28
  [styles.withoutPaddings]: withoutPaddings
33
29
  });
34
- return jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
30
+ return jsx("div", {
31
+ ...restProps,
35
32
  className: classes,
36
33
  "data-test": joinDataTestAttributes('ring-island', dataTest),
37
34
  children: children
38
- }));
35
+ });
39
36
  }
40
37
  }
41
38
  const AdaptiveIsland = adaptiveIslandHOC(Island);
@@ -1,50 +1,43 @@
1
- import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
1
  import { jsx } from 'react/jsx-runtime';
4
2
  import { PureComponent } from 'react';
5
3
 
6
- const _excluded = ["onConditionalClick", "onPlainLeftClick", "activeClassName", "href", "children"];
7
4
  const LEFT_BUTTON = 0;
8
5
  // Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
9
6
  const isPlainLeftClick = e => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
10
7
  class ClickableLink extends PureComponent {
11
- constructor() {
12
- super(...arguments);
13
- _defineProperty(this, "onClick", e => {
14
- const {
15
- onClick,
16
- onConditionalClick,
17
- onPlainLeftClick
18
- } = this.props;
19
- const isPlainLeft = isPlainLeftClick(e);
20
- if (onClick) {
21
- onClick(e);
22
- }
23
- if (onConditionalClick) {
24
- onConditionalClick(isPlainLeft, e);
25
- }
26
- if (onPlainLeftClick && isPlainLeft) {
27
- e.preventDefault();
28
- onPlainLeftClick(e);
29
- }
30
- });
31
- }
8
+ onClick = e => {
9
+ const {
10
+ onClick,
11
+ onConditionalClick,
12
+ onPlainLeftClick
13
+ } = this.props;
14
+ const isPlainLeft = isPlainLeftClick(e);
15
+ if (onClick) {
16
+ onClick(e);
17
+ }
18
+ if (onConditionalClick) {
19
+ onConditionalClick(isPlainLeft, e);
20
+ }
21
+ if (onPlainLeftClick && isPlainLeft) {
22
+ e.preventDefault();
23
+ onPlainLeftClick(e);
24
+ }
25
+ };
32
26
  render() {
33
- const _this$props = this.props,
34
- {
35
- onConditionalClick,
36
- onPlainLeftClick,
37
- activeClassName,
38
- href,
39
- children
40
- } = _this$props,
41
- restProps = _objectWithoutProperties(_this$props, _excluded);
42
- return jsx("a", _objectSpread2(_objectSpread2({
43
- href: href
44
- }, restProps), {}, {
27
+ const {
28
+ onConditionalClick,
29
+ onPlainLeftClick,
30
+ activeClassName,
31
+ href,
32
+ children,
33
+ ...restProps
34
+ } = this.props;
35
+ return jsx("a", {
36
+ href: href,
37
+ ...restProps,
45
38
  onClick: this.onClick,
46
39
  children: children
47
- }));
40
+ });
48
41
  }
49
42
  }
50
43
 
@@ -1,31 +1,27 @@
1
- import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import { jsx } from 'react/jsx-runtime';
3
2
  import { PureComponent } from 'react';
4
3
  import classNames from 'classnames';
5
4
  import joinDataTestAttributes from '../global/data-tests.js';
6
5
  import ClickableLink from './clickable-link.js';
7
6
  import { l as linkStyles } from '../_helpers/link.js';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
7
 
10
- const _excluded = ["active", "inherit", "pseudo", "hover", "className", "data-test", "href", "children", "onPlainLeftClick", "onClick"];
11
8
  function linkHOC(ComposedComponent) {
12
9
  const isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
13
10
  return class Link extends PureComponent {
14
11
  render() {
15
- const _this$props = this.props,
16
- {
17
- active,
18
- inherit,
19
- pseudo,
20
- hover,
21
- className,
22
- 'data-test': dataTest,
23
- href,
24
- children,
25
- onPlainLeftClick,
26
- onClick
27
- } = _this$props,
28
- restProps = _objectWithoutProperties(_this$props, _excluded);
12
+ const {
13
+ active,
14
+ inherit,
15
+ pseudo,
16
+ hover,
17
+ className,
18
+ 'data-test': dataTest,
19
+ href,
20
+ children,
21
+ onPlainLeftClick,
22
+ onClick,
23
+ ...restProps
24
+ } = this.props;
29
25
  const useButton = pseudo || !isCustom && (href === null || href === undefined);
30
26
  const classes = classNames(linkStyles.link, className, {
31
27
  [linkStyles.active]: active,
@@ -35,30 +31,32 @@ function linkHOC(ComposedComponent) {
35
31
  });
36
32
  let props = restProps;
37
33
  if (isCustom && !props.activeClassName) {
38
- props = _objectSpread2(_objectSpread2({}, props), {}, {
34
+ props = {
35
+ ...props,
39
36
  activeClassName: linkStyles.active
40
- });
37
+ };
41
38
  }
42
39
  if (useButton) {
43
- return jsx("button", _objectSpread2(_objectSpread2({
44
- type: 'button'
45
- }, props), {}, {
40
+ return jsx("button", {
41
+ type: 'button',
42
+ ...props,
46
43
  className: classes,
47
44
  onClick: onClick || onPlainLeftClick,
48
45
  "data-test": joinDataTestAttributes('ring-link', dataTest),
49
46
  children: children
50
- }));
47
+ });
51
48
  }
52
- return jsx(ComposedComponent, _objectSpread2(_objectSpread2(_objectSpread2({}, props), {}, {
49
+ return jsx(ComposedComponent, {
50
+ ...props,
53
51
  href: href,
54
52
  className: classes,
55
- onClick: onClick
56
- }, typeof ComposedComponent !== 'string' ? {
57
- onPlainLeftClick
58
- } : {}), {}, {
53
+ onClick: onClick,
54
+ ...(typeof ComposedComponent !== 'string' ? {
55
+ onPlainLeftClick
56
+ } : {}),
59
57
  "data-test": joinDataTestAttributes('ring-link', dataTest),
60
58
  children: children
61
- }));
59
+ });
62
60
  }
63
61
  };
64
62
  }
@@ -1,5 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
1
  import { jsx } from 'react/jsx-runtime';
4
2
  import { PureComponent } from 'react';
5
3
  import joinDataTestAttributes from '../global/data-tests.js';
@@ -10,15 +8,12 @@ import './consts.js';
10
8
  import '../_helpers/list.js';
11
9
 
12
10
  class ListCustom extends PureComponent {
13
- constructor() {
14
- super(...arguments);
15
- _defineProperty(this, "handleKeyPress", event => {
16
- const key = getEventKey(event);
17
- if (key === 'Enter' || key === ' ') {
18
- this.props.onClick(event);
19
- }
20
- });
21
- }
11
+ handleKeyPress = event => {
12
+ const key = getEventKey(event);
13
+ if (key === 'Enter' || key === ' ') {
14
+ this.props.onClick(event);
15
+ }
16
+ };
22
17
  render() {
23
18
  const {
24
19
  disabled,