@jetbrains/ring-ui-built 7.0.0-beta.2 → 7.0.0-beta.3

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 (236) hide show
  1. package/components/_helpers/_rollupPluginBabelHelpers.js +1 -504
  2. package/components/_helpers/anchor.js +7 -5
  3. package/components/_helpers/button__classes.js +15 -13
  4. package/components/_helpers/caption.js +11 -17
  5. package/components/_helpers/card.js +92 -96
  6. package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
  7. package/components/_helpers/icon__svg.js +27 -23
  8. package/components/_helpers/input.js +150 -171
  9. package/components/_helpers/query-assist__suggestions.js +78 -93
  10. package/components/_helpers/select__filter.js +56 -67
  11. package/components/_helpers/services-link.js +23 -29
  12. package/components/_helpers/sidebar.js +91 -93
  13. package/components/_helpers/tab-link.js +8 -6
  14. package/components/_helpers/theme.js +41 -50
  15. package/components/_helpers/title.js +59 -69
  16. package/components/alert/alert.js +112 -156
  17. package/components/alert/container.js +32 -39
  18. package/components/alert-service/alert-service.js +104 -161
  19. package/components/analytics/analytics.js +12 -20
  20. package/components/analytics/analytics__custom-plugin.js +52 -68
  21. package/components/auth/auth.js +2 -27
  22. package/components/auth/auth__core.d.ts +1 -1
  23. package/components/auth/auth__core.js +742 -1428
  24. package/components/auth/background-flow.js +84 -121
  25. package/components/auth/down-notification.js +31 -69
  26. package/components/auth/iframe-flow.js +70 -123
  27. package/components/auth/request-builder.js +46 -77
  28. package/components/auth/response-parser.js +84 -112
  29. package/components/auth/storage.js +160 -318
  30. package/components/auth/token-validator.js +132 -227
  31. package/components/auth/window-flow.js +84 -121
  32. package/components/auth-dialog/auth-dialog.js +99 -150
  33. package/components/auth-dialog-service/auth-dialog-service.js +6 -26
  34. package/components/avatar/avatar-example-datauri.js +1 -1
  35. package/components/avatar/avatar.js +94 -123
  36. package/components/avatar/fallback-avatar.js +20 -34
  37. package/components/badge/badge.js +32 -38
  38. package/components/breadcrumbs/breadcrumbs.js +13 -17
  39. package/components/button/button.js +67 -80
  40. package/components/button-group/button-group.js +27 -36
  41. package/components/button-set/button-set.js +19 -27
  42. package/components/button-toolbar/button-toolbar.js +17 -25
  43. package/components/caret/caret.js +184 -211
  44. package/components/checkbox/checkbox.js +69 -86
  45. package/components/clipboard/clipboard-fallback.js +7 -7
  46. package/components/clipboard/clipboard.js +36 -128
  47. package/components/code/code.js +83 -151
  48. package/components/collapse/collapse-content.js +42 -60
  49. package/components/collapse/collapse-context.js +2 -2
  50. package/components/collapse/collapse-control.js +12 -12
  51. package/components/collapse/collapse.js +12 -17
  52. package/components/collapse/consts.js +4 -4
  53. package/components/collapse/utils.js +1 -3
  54. package/components/confirm/confirm.js +57 -87
  55. package/components/confirm-service/confirm-service.js +23 -44
  56. package/components/content-layout/content-layout.js +41 -56
  57. package/components/content-layout/sidebar.js +1 -1
  58. package/components/contenteditable/contenteditable.js +38 -46
  59. package/components/control-help/control-help.js +5 -3
  60. package/components/control-label/control-label.js +9 -8
  61. package/components/data-list/data-list.js +113 -156
  62. package/components/data-list/data-list.mock.js +3 -5
  63. package/components/data-list/item.js +120 -140
  64. package/components/data-list/selection.js +77 -135
  65. package/components/data-list/title.js +2 -10
  66. package/components/date-picker/consts.js +16 -22
  67. package/components/date-picker/date-input.js +99 -124
  68. package/components/date-picker/date-picker.js +140 -184
  69. package/components/date-picker/date-popup.js +280 -327
  70. package/components/date-picker/day.js +71 -94
  71. package/components/date-picker/month-names.js +41 -59
  72. package/components/date-picker/month-slider.js +42 -61
  73. package/components/date-picker/month.js +17 -24
  74. package/components/date-picker/months.js +44 -49
  75. package/components/date-picker/weekdays.js +12 -21
  76. package/components/date-picker/years.js +77 -98
  77. package/components/dialog/dialog.js +151 -187
  78. package/components/dialog/dialog__body-scroll-preventer.js +0 -3
  79. package/components/dropdown/anchor.js +0 -6
  80. package/components/dropdown/dropdown.js +134 -154
  81. package/components/dropdown-menu/dropdown-menu.js +59 -87
  82. package/components/editable-heading/editable-heading.js +69 -116
  83. package/components/error-bubble/error-bubble.js +29 -54
  84. package/components/error-message/error-message.js +34 -49
  85. package/components/footer/footer.js +27 -28
  86. package/components/global/compose.js +1 -8
  87. package/components/global/composeRefs.d.ts +0 -3
  88. package/components/global/composeRefs.js +8 -15
  89. package/components/global/controls-height.js +2 -2
  90. package/components/global/create-stateful-context.js +14 -13
  91. package/components/global/data-tests.js +7 -12
  92. package/components/global/dom.js +49 -82
  93. package/components/global/focus-sensor-hoc.js +99 -106
  94. package/components/global/fuzzy-highlight.js +23 -34
  95. package/components/global/get-event-key.js +8 -8
  96. package/components/global/get-uid.js +3 -7
  97. package/components/global/inject-styles.js +7 -14
  98. package/components/global/listeners.js +28 -47
  99. package/components/global/memoize.js +6 -10
  100. package/components/global/normalize-indent.js +19 -46
  101. package/components/global/promise-with-timeout.js +6 -8
  102. package/components/global/prop-types.js +3 -5
  103. package/components/global/react-dom-renderer.js +29 -40
  104. package/components/global/rerender-hoc.js +16 -32
  105. package/components/global/schedule-raf.js +4 -4
  106. package/components/global/sniffer.js +1 -1
  107. package/components/global/theme.js +1 -18
  108. package/components/global/trivial-template-tag.js +4 -9
  109. package/components/global/typescript-utils.js +2 -6
  110. package/components/global/url.js +20 -23
  111. package/components/global/use-event-callback.js +7 -4
  112. package/components/grid/col.js +27 -39
  113. package/components/grid/grid.js +18 -27
  114. package/components/grid/row.js +23 -30
  115. package/components/group/group.js +16 -22
  116. package/components/header/header-icon.js +19 -31
  117. package/components/header/header.d.ts +0 -1
  118. package/components/header/header.js +30 -64
  119. package/components/header/links.js +6 -3
  120. package/components/header/logo.js +15 -26
  121. package/components/header/profile.js +124 -150
  122. package/components/header/services-link.js +1 -3
  123. package/components/header/services.js +64 -97
  124. package/components/header/smart-profile.js +101 -178
  125. package/components/header/smart-services.js +55 -90
  126. package/components/header/tray.js +21 -30
  127. package/components/heading/heading.js +21 -20
  128. package/components/http/http.js +162 -319
  129. package/components/http/http.mock.js +50 -98
  130. package/components/hub-source/hub-source.js +77 -182
  131. package/components/hub-source/hub-source__user.js +9 -37
  132. package/components/hub-source/hub-source__users-groups.js +34 -60
  133. package/components/i18n/i18n-context.js +7 -8
  134. package/components/i18n/i18n.js +3 -6
  135. package/components/icon/icon.js +60 -74
  136. package/components/icon/icon__svg.js +0 -5
  137. package/components/icon/index.js +0 -5
  138. package/components/input/input.js +1 -11
  139. package/components/island/adaptive-island-hoc.js +29 -37
  140. package/components/island/content.js +100 -110
  141. package/components/island/header.js +56 -66
  142. package/components/island/island.js +25 -33
  143. package/components/island-legacy/content-legacy.js +16 -22
  144. package/components/island-legacy/header-legacy.js +19 -25
  145. package/components/island-legacy/island-legacy.js +16 -22
  146. package/components/link/clickableLink.js +33 -42
  147. package/components/link/link.js +47 -55
  148. package/components/list/consts.js +2 -2
  149. package/components/list/list.js +399 -486
  150. package/components/list/list__custom.js +51 -61
  151. package/components/list/list__hint.js +9 -17
  152. package/components/list/list__item.js +147 -178
  153. package/components/list/list__link.js +38 -47
  154. package/components/list/list__separator.js +15 -24
  155. package/components/list/list__title.js +25 -34
  156. package/components/list/list__users-groups-source.js +55 -121
  157. package/components/loader/loader.js +38 -60
  158. package/components/loader/loader__core.js +123 -184
  159. package/components/loader-inline/loader-inline.js +24 -32
  160. package/components/loader-screen/loader-screen.js +24 -40
  161. package/components/login-dialog/login-dialog.js +81 -121
  162. package/components/login-dialog/service.js +6 -29
  163. package/components/markdown/markdown.js +16 -24
  164. package/components/message/message.js +170 -201
  165. package/components/old-browsers-message/old-browsers-message.js +11 -14
  166. package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
  167. package/components/old-browsers-message/white-list.js +8 -13
  168. package/components/pager/pager.js +212 -257
  169. package/components/panel/panel.js +16 -22
  170. package/components/permissions/permissions.js +118 -161
  171. package/components/permissions/permissions__cache.js +191 -218
  172. package/components/popup/popup.consts.js +1 -1
  173. package/components/popup/popup.js +237 -288
  174. package/components/popup/popup.target.js +9 -7
  175. package/components/popup/position.js +94 -101
  176. package/components/popup-menu/popup-menu.js +33 -67
  177. package/components/progress-bar/progress-bar.js +57 -68
  178. package/components/query-assist/query-assist.js +583 -652
  179. package/components/query-assist/query-assist__suggestions.js +2 -26
  180. package/components/radio/radio.js +15 -27
  181. package/components/radio/radio__item.js +52 -62
  182. package/components/scrollable-section/scrollable-section.js +22 -32
  183. package/components/select/select.js +693 -793
  184. package/components/select/select__filter.js +1 -26
  185. package/components/select/select__popup.js +316 -413
  186. package/components/shortcuts/core.js +147 -195
  187. package/components/shortcuts/shortcut-title.js +6 -10
  188. package/components/shortcuts/shortcuts-hoc.js +23 -41
  189. package/components/shortcuts/shortcuts.js +41 -64
  190. package/components/slider/slider.js +93 -112
  191. package/components/slider/slider.utils.js +16 -23
  192. package/components/storage/storage.js +3 -27
  193. package/components/storage/storage__fallback.js +137 -210
  194. package/components/storage/storage__local.js +89 -147
  195. package/components/style.css +1 -1
  196. package/components/tab-trap/tab-trap.js +35 -53
  197. package/components/table/cell.js +11 -21
  198. package/components/table/disable-hover-hoc.js +27 -42
  199. package/components/table/header-cell.js +59 -75
  200. package/components/table/header.js +89 -110
  201. package/components/table/multitable.js +83 -89
  202. package/components/table/row-with-focus-sensor.js +25 -57
  203. package/components/table/row.js +169 -200
  204. package/components/table/selection-adapter.js +2 -2
  205. package/components/table/selection-shortcuts-hoc.js +108 -113
  206. package/components/table/selection.js +150 -217
  207. package/components/table/simple-table.js +19 -55
  208. package/components/table/smart-table.js +42 -76
  209. package/components/table/table.js +267 -327
  210. package/components/tabs/collapsible-more.js +47 -73
  211. package/components/tabs/collapsible-tab.js +32 -36
  212. package/components/tabs/collapsible-tabs.js +89 -148
  213. package/components/tabs/custom-item.js +4 -2
  214. package/components/tabs/dumb-tabs.js +60 -92
  215. package/components/tabs/smart-tabs.js +29 -61
  216. package/components/tabs/tab-link.js +1 -3
  217. package/components/tabs/tab.js +15 -24
  218. package/components/tabs/tabs.js +1 -26
  219. package/components/tag/tag.d.ts +0 -2
  220. package/components/tag/tag.js +120 -162
  221. package/components/tags-input/tags-input.js +222 -304
  222. package/components/tags-list/tags-list.js +45 -61
  223. package/components/text/text.js +28 -37
  224. package/components/toggle/toggle.js +51 -61
  225. package/components/tooltip/tooltip.js +109 -141
  226. package/components/user-agreement/service.js +259 -400
  227. package/components/user-agreement/user-agreement.js +80 -108
  228. package/components/user-card/card.js +1 -25
  229. package/components/user-card/smart-user-card-tooltip.js +52 -103
  230. package/components/user-card/tooltip.js +35 -65
  231. package/components/user-card/user-card.js +1 -25
  232. package/package.json +1 -1
  233. package/components/global/react-render-adapter.d.ts +0 -1
  234. package/components/global/react-render-adapter.js +0 -6
  235. package/components/header/tray-icon.d.ts +0 -1
  236. package/components/header/tray-icon.js +0 -26
@@ -1,15 +1,15 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, c as _objectWithoutProperties, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.concat.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
3
2
  import { Component } from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import classNames from 'classnames';
6
5
  import { interpolateLinear } from '../global/linear-function.js';
7
6
  import { m as modules_e6a056e1 } from '../_helpers/island.js';
8
7
  import { PhaseContext } from './adaptive-island-hoc.js';
9
- import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+ import 'core-js/modules/web.dom-collections.iterator.js';
10
10
 
11
- var _excluded = ["children", "className", "wrapWithTitle", "border", "phase"];
12
- var Start = {
11
+ const _excluded = ["children", "className", "wrapWithTitle", "border", "phase"];
12
+ const Start = {
13
13
  FONT_SIZE: 24,
14
14
  LINE_HEIGHT: 28,
15
15
  PADDING_TOP: 24,
@@ -18,7 +18,7 @@ var Start = {
18
18
  Y: 0,
19
19
  SPACING: 0
20
20
  };
21
- var End = {
21
+ const End = {
22
22
  FONT_SIZE: 13,
23
23
  LINE_HEIGHT: 20,
24
24
  PADDING_TOP: 16,
@@ -28,57 +28,49 @@ var End = {
28
28
  Y: 0.1,
29
29
  SPACING: 1.09
30
30
  };
31
- var BORDER_APPEAR_PHASE = 0.5;
32
- var Header = /*#__PURE__*/function (_Component) {
33
- function Header() {
34
- _classCallCheck(this, Header);
35
- return _callSuper(this, Header, arguments);
31
+ const BORDER_APPEAR_PHASE = 0.5;
32
+ class Header extends Component {
33
+ style(name) {
34
+ var _this$props$phase;
35
+ return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
36
36
  }
37
- _inherits(Header, _Component);
38
- return _createClass(Header, [{
39
- key: "style",
40
- value: function style(name) {
41
- var _this$props$phase;
42
- return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
43
- }
44
- }, {
45
- key: "render",
46
- value: function render() {
47
- var _this$props = this.props,
48
- children = _this$props.children,
49
- className = _this$props.className,
50
- wrapWithTitle = _this$props.wrapWithTitle,
51
- border = _this$props.border,
52
- phase = _this$props.phase,
53
- restProps = _objectWithoutProperties(_this$props, _excluded);
54
- var classes = classNames(modules_e6a056e1.header, className, {
55
- [modules_e6a056e1.withBottomBorder]: border || phase != null && phase >= BORDER_APPEAR_PHASE
56
- });
57
- var headerStyle = phase != null ? {
58
- lineHeight: "".concat(this.style('LINE_HEIGHT'), "px"),
59
- // need to append px because number is a valid line-height value
60
- paddingTop: this.style('PADDING_TOP'),
61
- paddingBottom: this.style('PADDING_BOTTOM')
62
- } : undefined;
63
- var scaleFont = phase != null && this.style('FONT_SIZE') / Start.FONT_SIZE;
64
- var titleStyle = phase != null && phase < 1 ? {
65
- fontSize: Start.FONT_SIZE,
66
- transform: "translate(".concat(this.style('X'), "px, ").concat(this.style('Y'), "px) scale(").concat(scaleFont, ")"),
67
- letterSpacing: this.style('SPACING')
68
- } : undefined;
69
- return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
70
- "data-test": "ring-island-header",
71
- className: classes,
72
- style: headerStyle,
73
- children: [wrapWithTitle && /*#__PURE__*/jsx("h2", {
74
- className: modules_e6a056e1.title,
75
- style: titleStyle,
76
- children: children
77
- }), !wrapWithTitle && children]
78
- }));
79
- }
80
- }]);
81
- }(Component);
37
+ render() {
38
+ const _this$props = this.props,
39
+ {
40
+ children,
41
+ className,
42
+ wrapWithTitle,
43
+ border,
44
+ phase
45
+ } = _this$props,
46
+ restProps = _objectWithoutProperties(_this$props, _excluded);
47
+ const classes = classNames(modules_e6a056e1.header, className, {
48
+ [modules_e6a056e1.withBottomBorder]: border || phase != null && phase >= BORDER_APPEAR_PHASE
49
+ });
50
+ const headerStyle = phase != null ? {
51
+ lineHeight: "".concat(this.style('LINE_HEIGHT'), "px"),
52
+ // need to append px because number is a valid line-height value
53
+ paddingTop: this.style('PADDING_TOP'),
54
+ paddingBottom: this.style('PADDING_BOTTOM')
55
+ } : undefined;
56
+ const scaleFont = phase != null && this.style('FONT_SIZE') / Start.FONT_SIZE;
57
+ const titleStyle = phase != null && phase < 1 ? {
58
+ fontSize: Start.FONT_SIZE,
59
+ transform: "translate(".concat(this.style('X'), "px, ").concat(this.style('Y'), "px) scale(").concat(scaleFont, ")"),
60
+ letterSpacing: this.style('SPACING')
61
+ } : undefined;
62
+ return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
63
+ "data-test": "ring-island-header",
64
+ className: classes,
65
+ style: headerStyle,
66
+ children: [wrapWithTitle && /*#__PURE__*/jsx("h2", {
67
+ className: modules_e6a056e1.title,
68
+ style: titleStyle,
69
+ children: children
70
+ }), !wrapWithTitle && children]
71
+ }));
72
+ }
73
+ }
82
74
  _defineProperty(Header, "propTypes", {
83
75
  children: PropTypes.node,
84
76
  className: PropTypes.string,
@@ -89,15 +81,13 @@ _defineProperty(Header, "propTypes", {
89
81
  _defineProperty(Header, "defaultProps", {
90
82
  wrapWithTitle: true
91
83
  });
92
- var HeaderWrapper = function HeaderWrapper(props) {
93
- return /*#__PURE__*/jsx(PhaseContext.Consumer, {
94
- children: function children(phase) {
95
- var addProps = phase != null ? {
96
- phase
97
- } : {};
98
- return /*#__PURE__*/jsx(Header, _objectSpread2(_objectSpread2({}, props), addProps));
99
- }
100
- });
101
- };
84
+ const HeaderWrapper = props => /*#__PURE__*/jsx(PhaseContext.Consumer, {
85
+ children: phase => {
86
+ const addProps = phase != null ? {
87
+ phase
88
+ } : {};
89
+ return /*#__PURE__*/jsx(Header, _objectSpread2(_objectSpread2({}, props), addProps));
90
+ }
91
+ });
102
92
 
103
93
  export { HeaderWrapper as default };
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { Component } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -8,43 +8,35 @@ import { m as modules_e6a056e1 } from '../_helpers/island.js';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
  export { default as Header } from './header.js';
10
10
  export { default as Content } from './content.js';
11
- import 'core-js/modules/es.array.concat.js';
12
11
  import 'core-js/modules/es.array.reduce.js';
13
- import 'core-js/modules/es.object.entries.js';
14
- import 'core-js/modules/es.object.to-string.js';
12
+ import 'core-js/modules/web.dom-collections.iterator.js';
15
13
  import '../global/linear-function.js';
16
14
  import 'element-resize-detector';
17
15
  import '../global/schedule-raf.js';
18
16
 
19
- var _excluded = ["children", "className", "narrow", "withoutPaddings", "data-test"];
20
- var Island = /*#__PURE__*/function (_Component) {
21
- function Island() {
22
- _classCallCheck(this, Island);
23
- return _callSuper(this, Island, arguments);
17
+ const _excluded = ["children", "className", "narrow", "withoutPaddings", "data-test"];
18
+ class Island extends Component {
19
+ render() {
20
+ const _this$props = this.props,
21
+ {
22
+ children,
23
+ className,
24
+ narrow,
25
+ withoutPaddings,
26
+ 'data-test': dataTest
27
+ } = _this$props,
28
+ restProps = _objectWithoutProperties(_this$props, _excluded);
29
+ const classes = classNames(modules_e6a056e1.island, className, {
30
+ [modules_e6a056e1.narrowIsland]: narrow,
31
+ [modules_e6a056e1.withoutPaddings]: withoutPaddings
32
+ });
33
+ return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
34
+ className: classes,
35
+ "data-test": joinDataTestAttributes('ring-island', dataTest),
36
+ children: children
37
+ }));
24
38
  }
25
- _inherits(Island, _Component);
26
- return _createClass(Island, [{
27
- key: "render",
28
- value: function render() {
29
- var _this$props = this.props,
30
- children = _this$props.children,
31
- className = _this$props.className,
32
- narrow = _this$props.narrow,
33
- withoutPaddings = _this$props.withoutPaddings,
34
- dataTest = _this$props['data-test'],
35
- restProps = _objectWithoutProperties(_this$props, _excluded);
36
- var classes = classNames(modules_e6a056e1.island, className, {
37
- [modules_e6a056e1.narrowIsland]: narrow,
38
- [modules_e6a056e1.withoutPaddings]: withoutPaddings
39
- });
40
- return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
41
- className: classes,
42
- "data-test": joinDataTestAttributes('ring-island', dataTest),
43
- children: children
44
- }));
45
- }
46
- }]);
47
- }(Component);
39
+ }
48
40
  _defineProperty(Island, "propTypes", {
49
41
  children: PropTypes.node,
50
42
  className: PropTypes.string,
@@ -52,6 +44,6 @@ _defineProperty(Island, "propTypes", {
52
44
  withoutPaddings: PropTypes.bool,
53
45
  'data-test': PropTypes.string
54
46
  });
55
- var AdaptiveIsland = adaptiveIslandHOC(Island);
47
+ const AdaptiveIsland = adaptiveIslandHOC(Island);
56
48
 
57
49
  export { AdaptiveIsland, Island as default };
@@ -1,31 +1,25 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
- var _excluded = ["children", "className"];
8
- var Content = /*#__PURE__*/function (_PureComponent) {
9
- function Content() {
10
- _classCallCheck(this, Content);
11
- return _callSuper(this, Content, arguments);
7
+ const _excluded = ["children", "className"];
8
+ class Content extends PureComponent {
9
+ render() {
10
+ const _this$props = this.props,
11
+ {
12
+ children,
13
+ className
14
+ } = _this$props,
15
+ restProps = _objectWithoutProperties(_this$props, _excluded);
16
+ const classes = classNames('ring-island__content', className);
17
+ return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
18
+ className: classes,
19
+ children: children
20
+ }));
12
21
  }
13
- _inherits(Content, _PureComponent);
14
- return _createClass(Content, [{
15
- key: "render",
16
- value: function render() {
17
- var _this$props = this.props,
18
- children = _this$props.children,
19
- className = _this$props.className,
20
- restProps = _objectWithoutProperties(_this$props, _excluded);
21
- var classes = classNames('ring-island__content', className);
22
- return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
23
- className: classes,
24
- children: children
25
- }));
26
- }
27
- }]);
28
- }(PureComponent);
22
+ }
29
23
  _defineProperty(Content, "propTypes", {
30
24
  className: PropTypes.string,
31
25
  children: PropTypes.node
@@ -1,34 +1,28 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
- var _excluded = ["children", "className"];
8
- var Header = /*#__PURE__*/function (_PureComponent) {
9
- function Header() {
10
- _classCallCheck(this, Header);
11
- return _callSuper(this, Header, arguments);
7
+ const _excluded = ["children", "className"];
8
+ class Header extends PureComponent {
9
+ render() {
10
+ const _this$props = this.props,
11
+ {
12
+ children,
13
+ className
14
+ } = _this$props,
15
+ restProps = _objectWithoutProperties(_this$props, _excluded);
16
+ const classes = classNames('ring-island__header', className);
17
+ return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
18
+ className: classes,
19
+ children: /*#__PURE__*/jsx("div", {
20
+ className: "ring-island__title",
21
+ children: children
22
+ })
23
+ }));
12
24
  }
13
- _inherits(Header, _PureComponent);
14
- return _createClass(Header, [{
15
- key: "render",
16
- value: function render() {
17
- var _this$props = this.props,
18
- children = _this$props.children,
19
- className = _this$props.className,
20
- restProps = _objectWithoutProperties(_this$props, _excluded);
21
- var classes = classNames('ring-island__header', className);
22
- return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
23
- className: classes,
24
- children: /*#__PURE__*/jsx("div", {
25
- className: "ring-island__title",
26
- children: children
27
- })
28
- }));
29
- }
30
- }]);
31
- }(PureComponent);
25
+ }
32
26
  _defineProperty(Header, "propTypes", {
33
27
  className: PropTypes.string,
34
28
  children: PropTypes.node
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -6,28 +6,22 @@ import { jsx } from 'react/jsx-runtime';
6
6
  export { default as Header } from './header-legacy.js';
7
7
  export { default as Content } from './content-legacy.js';
8
8
 
9
- var _excluded = ["children", "className"];
10
- var Island = /*#__PURE__*/function (_PureComponent) {
11
- function Island() {
12
- _classCallCheck(this, Island);
13
- return _callSuper(this, Island, arguments);
9
+ const _excluded = ["children", "className"];
10
+ class Island extends PureComponent {
11
+ render() {
12
+ const _this$props = this.props,
13
+ {
14
+ children,
15
+ className
16
+ } = _this$props,
17
+ restProps = _objectWithoutProperties(_this$props, _excluded);
18
+ const classes = classNames('ring-island', className);
19
+ return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
20
+ className: classes,
21
+ children: children
22
+ }));
14
23
  }
15
- _inherits(Island, _PureComponent);
16
- return _createClass(Island, [{
17
- key: "render",
18
- value: function render() {
19
- var _this$props = this.props,
20
- children = _this$props.children,
21
- className = _this$props.className,
22
- restProps = _objectWithoutProperties(_this$props, _excluded);
23
- var classes = classNames('ring-island', className);
24
- return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
25
- className: classes,
26
- children: children
27
- }));
28
- }
29
- }]);
30
- }(PureComponent);
24
+ }
31
25
  _defineProperty(Island, "propTypes", {
32
26
  className: PropTypes.string,
33
27
  children: PropTypes.node
@@ -1,29 +1,23 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.concat.js';
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
3
  import { PureComponent } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
- var _excluded = ["onConditionalClick", "onPlainLeftClick", "activeClassName", "href", "children"];
8
- var LEFT_BUTTON = 0;
7
+ const _excluded = ["onConditionalClick", "onPlainLeftClick", "activeClassName", "href", "children"];
8
+ const LEFT_BUTTON = 0;
9
9
  // Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
10
- var isPlainLeftClick = function isPlainLeftClick(e) {
11
- return e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
12
- };
13
- var ClickableLink = /*#__PURE__*/function (_PureComponent) {
14
- function ClickableLink() {
15
- var _this;
16
- _classCallCheck(this, ClickableLink);
17
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
18
- args[_key] = arguments[_key];
19
- }
20
- _this = _callSuper(this, ClickableLink, [].concat(args));
21
- _defineProperty(_this, "onClick", function (e) {
22
- var _this$props = _this.props,
23
- onClick = _this$props.onClick,
24
- onConditionalClick = _this$props.onConditionalClick,
25
- onPlainLeftClick = _this$props.onPlainLeftClick;
26
- var isPlainLeft = isPlainLeftClick(e);
10
+ const isPlainLeftClick = e => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
11
+ class ClickableLink extends PureComponent {
12
+ constructor() {
13
+ super(...arguments);
14
+ _defineProperty(this, "onClick", e => {
15
+ const {
16
+ onClick,
17
+ onConditionalClick,
18
+ onPlainLeftClick
19
+ } = this.props;
20
+ const isPlainLeft = isPlainLeftClick(e);
27
21
  if (onClick) {
28
22
  onClick(e);
29
23
  }
@@ -35,28 +29,25 @@ var ClickableLink = /*#__PURE__*/function (_PureComponent) {
35
29
  onPlainLeftClick(e);
36
30
  }
37
31
  });
38
- return _this;
39
32
  }
40
- _inherits(ClickableLink, _PureComponent);
41
- return _createClass(ClickableLink, [{
42
- key: "render",
43
- value: function render() {
44
- var _this$props2 = this.props;
45
- _this$props2.onConditionalClick;
46
- _this$props2.onPlainLeftClick;
47
- _this$props2.activeClassName;
48
- var href = _this$props2.href,
49
- children = _this$props2.children,
50
- restProps = _objectWithoutProperties(_this$props2, _excluded);
51
- return /*#__PURE__*/jsx("a", _objectSpread2(_objectSpread2({
52
- href: href
53
- }, restProps), {}, {
54
- onClick: this.onClick,
55
- children: children
56
- }));
57
- }
58
- }]);
59
- }(PureComponent);
33
+ render() {
34
+ const _this$props = this.props,
35
+ {
36
+ onConditionalClick,
37
+ onPlainLeftClick,
38
+ activeClassName,
39
+ href,
40
+ children
41
+ } = _this$props,
42
+ restProps = _objectWithoutProperties(_this$props, _excluded);
43
+ return /*#__PURE__*/jsx("a", _objectSpread2(_objectSpread2({
44
+ href: href
45
+ }, restProps), {}, {
46
+ onClick: this.onClick,
47
+ children: children
48
+ }));
49
+ }
50
+ }
60
51
  _defineProperty(ClickableLink, "propTypes", {
61
52
  onClick: PropTypes.func,
62
53
  onPlainLeftClick: PropTypes.func,
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -6,70 +6,62 @@ import joinDataTestAttributes from '../global/data-tests.js';
6
6
  import ClickableLink from './clickableLink.js';
7
7
  import { m as modules_607b0772 } from '../_helpers/link.js';
8
8
  import { jsx } from 'react/jsx-runtime';
9
- import 'core-js/modules/es.array.concat.js';
10
9
  import 'core-js/modules/es.array.reduce.js';
11
- import 'core-js/modules/es.object.entries.js';
12
- import 'core-js/modules/es.object.to-string.js';
10
+ import 'core-js/modules/web.dom-collections.iterator.js';
13
11
 
14
- var _excluded = ["active", "inherit", "pseudo", "hover", "className", "data-test", "href", "children", "onPlainLeftClick", "onClick"];
12
+ const _excluded = ["active", "inherit", "pseudo", "hover", "className", "data-test", "href", "children", "onPlainLeftClick", "onClick"];
15
13
  function linkHOC(ComposedComponent) {
16
14
  var _Link;
17
- var isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
18
- return _Link = /*#__PURE__*/function (_PureComponent) {
19
- function Link() {
20
- _classCallCheck(this, Link);
21
- return _callSuper(this, Link, arguments);
22
- }
23
- _inherits(Link, _PureComponent);
24
- return _createClass(Link, [{
25
- key: "render",
26
- value: function render() {
27
- var _this$props = this.props,
28
- active = _this$props.active,
29
- inherit = _this$props.inherit,
30
- pseudo = _this$props.pseudo,
31
- hover = _this$props.hover,
32
- className = _this$props.className,
33
- dataTest = _this$props['data-test'],
34
- href = _this$props.href,
35
- children = _this$props.children,
36
- onPlainLeftClick = _this$props.onPlainLeftClick,
37
- onClick = _this$props.onClick,
38
- restProps = _objectWithoutProperties(_this$props, _excluded);
39
- var useButton = pseudo || !isCustom && href == null;
40
- var classes = classNames(modules_607b0772.link, className, {
41
- [modules_607b0772.active]: active,
42
- [modules_607b0772.inherit]: inherit,
43
- [modules_607b0772.hover]: hover,
44
- [modules_607b0772.pseudo]: useButton
15
+ const isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
16
+ return _Link = class Link extends PureComponent {
17
+ render() {
18
+ const _this$props = this.props,
19
+ {
20
+ active,
21
+ inherit,
22
+ pseudo,
23
+ hover,
24
+ className,
25
+ 'data-test': dataTest,
26
+ href,
27
+ children,
28
+ onPlainLeftClick,
29
+ onClick
30
+ } = _this$props,
31
+ restProps = _objectWithoutProperties(_this$props, _excluded);
32
+ const useButton = pseudo || !isCustom && href == null;
33
+ const classes = classNames(modules_607b0772.link, className, {
34
+ [modules_607b0772.active]: active,
35
+ [modules_607b0772.inherit]: inherit,
36
+ [modules_607b0772.hover]: hover,
37
+ [modules_607b0772.pseudo]: useButton
38
+ });
39
+ let props = restProps;
40
+ if (isCustom && !props.activeClassName) {
41
+ props = _objectSpread2(_objectSpread2({}, props), {}, {
42
+ activeClassName: modules_607b0772.active
45
43
  });
46
- var props = restProps;
47
- if (isCustom && !props.activeClassName) {
48
- props = _objectSpread2(_objectSpread2({}, props), {}, {
49
- activeClassName: modules_607b0772.active
50
- });
51
- }
52
- if (useButton) {
53
- return /*#__PURE__*/jsx("button", _objectSpread2(_objectSpread2({
54
- type: "button"
55
- }, props), {}, {
56
- className: classes,
57
- onClick: onClick || onPlainLeftClick,
58
- "data-test": joinDataTestAttributes('ring-link', dataTest),
59
- children: children
60
- }));
61
- }
62
- return /*#__PURE__*/jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, props), {}, {
63
- href: href,
44
+ }
45
+ if (useButton) {
46
+ return /*#__PURE__*/jsx("button", _objectSpread2(_objectSpread2({
47
+ type: "button"
48
+ }, props), {}, {
64
49
  className: classes,
65
- onClick: onClick,
66
- onPlainLeftClick: onPlainLeftClick,
50
+ onClick: onClick || onPlainLeftClick,
67
51
  "data-test": joinDataTestAttributes('ring-link', dataTest),
68
52
  children: children
69
53
  }));
70
54
  }
71
- }]);
72
- }(PureComponent), _defineProperty(_Link, "propTypes", {
55
+ return /*#__PURE__*/jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, props), {}, {
56
+ href: href,
57
+ className: classes,
58
+ onClick: onClick,
59
+ onPlainLeftClick: onPlainLeftClick,
60
+ "data-test": joinDataTestAttributes('ring-link', dataTest),
61
+ children: children
62
+ }));
63
+ }
64
+ }, _defineProperty(_Link, "propTypes", {
73
65
  className: PropTypes.string,
74
66
  active: PropTypes.bool,
75
67
  inherit: PropTypes.bool,
@@ -11,7 +11,7 @@ var Type;
11
11
  Type[Type["TITLE"] = 5] = "TITLE";
12
12
  Type[Type["MARGIN"] = 6] = "MARGIN";
13
13
  })(Type || (Type = {}));
14
- var Dimension = {
14
+ const Dimension = {
15
15
  ITEM_PADDING: 16,
16
16
  ITEM_HEIGHT: 32,
17
17
  COMPACT_ITEM_HEIGHT: 24,
@@ -22,6 +22,6 @@ var Dimension = {
22
22
  INNER_PADDING: 8,
23
23
  MARGIN: 8
24
24
  };
25
- var DEFAULT_ITEM_TYPE = Type.ITEM;
25
+ const DEFAULT_ITEM_TYPE = Type.ITEM;
26
26
 
27
27
  export { DEFAULT_ITEM_TYPE, Dimension, Type };