@jetbrains/ring-ui-built 7.0.66 → 7.0.71

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,15 +1,7 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
-
3
1
  function expandMap(attrsMap) {
4
- return Object.entries(attrsMap).reduce((result, _ref) => {
5
- let [key, value] = _ref;
6
- return value ? [...result, key] : result;
7
- }, []);
2
+ return Object.entries(attrsMap).reduce((result, [key, value]) => value ? [...result, key] : result, []);
8
3
  }
9
- function joinDataTestAttributes() {
10
- for (var _len = arguments.length, attrs = new Array(_len), _key = 0; _key < _len; _key++) {
11
- attrs[_key] = arguments[_key];
12
- }
4
+ function joinDataTestAttributes(...attrs) {
13
5
  return attrs.reduce((result, attr) => {
14
6
  if (!attr) {
15
7
  return result;
@@ -1,7 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.regexp.exec.js';
3
- import 'core-js/modules/web.dom-collections.iterator.js';
4
-
5
1
  /**
6
2
  * @name DOM
7
3
  */
@@ -65,33 +61,24 @@ function getDocumentScrollTop() {
65
61
  function getDocumentScrollLeft() {
66
62
  return document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft;
67
63
  }
68
- const applyMethodToClasses = method => function (classList) {
69
- let classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
64
+ const applyMethodToClasses = method => (classList, classes = '') => {
70
65
  classes.split(/\s+/g).filter(className => !!className).forEach(className => classList[method](className));
71
66
  };
72
67
  const addClasses = applyMethodToClasses('add');
73
68
  const removeClasses = applyMethodToClasses('remove');
74
- const toggleClasses = (classList, classes) => Object.entries(classes).forEach(_ref => {
75
- let [className, on] = _ref;
76
- return classList.toggle(className, on);
77
- });
78
- function setRootStyleProperties() {
79
- let properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
69
+ const toggleClasses = (classList, classes) => Object.entries(classes).forEach(([className, on]) => classList.toggle(className, on));
70
+ function setRootStyleProperties(properties = {}) {
80
71
  const rootStyle = document.documentElement.style;
81
- Object.entries(properties).forEach(_ref2 => {
82
- let [key, value] = _ref2;
72
+ Object.entries(properties).forEach(([key, value]) => {
83
73
  rootStyle.setProperty(key, value);
84
74
  });
85
75
  }
86
- function resetRootStyleProperties() {
87
- let properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
76
+ function resetRootStyleProperties(properties = {}) {
88
77
  const rootStyle = document.documentElement.style;
89
78
  Object.keys(properties).forEach(key => rootStyle.removeProperty(key));
90
79
  }
91
80
  class Listeners {
92
- constructor() {
93
- _defineProperty(this, "_all", new Set());
94
- }
81
+ _all = new Set();
95
82
  add(el, event, handler, options) {
96
83
  el.addEventListener(event, handler, options);
97
84
  const dispatchFn = () => el.removeEventListener(event, handler, options);
@@ -1,79 +1,13 @@
1
- import { b as _objectSpread2, _ as _defineProperty, a as _objectWithoutProperties } 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 { Component } from 'react';
5
3
  import { createComposedRef } from './compose-refs.js';
6
4
  import 'memoize-one';
7
5
 
8
- const _excluded = ["autofocus", "focused", "onFocus", "onBlur", "innerRef", "scrollOnTableFocus"];
9
6
  function focusSensorHOC(ComposedComponent) {
10
7
  class FocusSensor extends Component {
11
- constructor() {
12
- super(...arguments);
13
- _defineProperty(this, "state", {
14
- focused: this.props.focused
15
- });
16
- _defineProperty(this, "node", void 0);
17
- _defineProperty(this, "_skipNextCapture", false);
18
- _defineProperty(this, "onRefUpdate", node => {
19
- if (node) {
20
- this.node = node;
21
- }
22
- });
23
- _defineProperty(this, "composedRef", createComposedRef());
24
- _defineProperty(this, "onFocusCapture", _ref => {
25
- var _this$node;
26
- let {
27
- target
28
- } = _ref;
29
- if (this._skipNextCapture) {
30
- this._skipNextCapture = false;
31
- return;
32
- }
33
- const focused = target instanceof Node && ((_this$node = this.node) === null || _this$node === void 0 ? void 0 : _this$node.contains(target));
34
- if (focused && !this.state.focused) {
35
- var _this$props$onFocus, _this$props;
36
- this.setState({
37
- focused: true
38
- });
39
- (_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus === void 0 || _this$props$onFocus.call(_this$props);
40
- }
41
- });
42
- _defineProperty(this, "onBlurCapture", _ref2 => {
43
- let {
44
- target
45
- } = _ref2;
46
- const {
47
- state: {
48
- focused
49
- },
50
- node
51
- } = this;
52
- if (focused) {
53
- setTimeout(() => {
54
- const blurred = target instanceof Node && (node === null || node === void 0 ? void 0 : node.contains(target)) && !node.contains(document.activeElement);
55
- if (blurred) {
56
- var _this$props$onBlur, _this$props2;
57
- this.setState({
58
- focused: false
59
- });
60
- (_this$props$onBlur = (_this$props2 = this.props).onBlur) === null || _this$props$onBlur === void 0 || _this$props$onBlur.call(_this$props2);
61
- }
62
- }, 1);
63
- }
64
- });
65
- _defineProperty(this, "onFocusRestore", () => {
66
- var _this$node2;
67
- this._skipNextCapture = true;
68
- (_this$node2 = this.node) === null || _this$node2 === void 0 || _this$node2.focus({
69
- preventScroll: !this.props.scrollOnTableFocus
70
- });
71
- });
72
- _defineProperty(this, "onFocusReset", () => {
73
- var _this$node3;
74
- (_this$node3 = this.node) === null || _this$node3 === void 0 || _this$node3.blur();
75
- });
76
- }
8
+ state = {
9
+ focused: this.props.focused
10
+ };
77
11
  componentDidMount() {
78
12
  const {
79
13
  props: {
@@ -82,24 +16,23 @@ function focusSensorHOC(ComposedComponent) {
82
16
  },
83
17
  node
84
18
  } = this;
85
- node === null || node === void 0 || node.setAttribute('tabindex', '0');
19
+ node?.setAttribute('tabindex', '0');
86
20
  if (node) {
87
21
  node.style.outline = 'none';
88
22
  }
89
23
  document.addEventListener('focus', this.onFocusCapture, true);
90
24
  document.addEventListener('blur', this.onBlurCapture, true);
91
25
  if (autofocus) {
92
- node === null || node === void 0 || node.focus({
26
+ node?.focus({
93
27
  preventScroll: !scrollOnTableFocus
94
28
  });
95
29
  }
96
30
  }
97
31
  componentDidUpdate(prevProps) {
98
- var _this$node4;
99
32
  const {
100
33
  focused
101
34
  } = this.props;
102
- const isInFocus = (_this$node4 = this.node) === null || _this$node4 === void 0 ? void 0 : _this$node4.contains(document.activeElement);
35
+ const isInFocus = this.node?.contains(document.activeElement);
103
36
  if (focused && (!isInFocus || !prevProps.focused)) {
104
37
  this.onFocusRestore();
105
38
  } else if (!focused && prevProps.focused) {
@@ -110,32 +43,86 @@ function focusSensorHOC(ComposedComponent) {
110
43
  document.removeEventListener('focus', this.onFocusCapture, true);
111
44
  document.removeEventListener('blur', this.onBlurCapture, true);
112
45
  }
46
+ node;
47
+ _skipNextCapture = false;
48
+ onRefUpdate = node => {
49
+ if (node) {
50
+ this.node = node;
51
+ }
52
+ };
53
+ composedRef = createComposedRef();
54
+ onFocusCapture = ({
55
+ target
56
+ }) => {
57
+ if (this._skipNextCapture) {
58
+ this._skipNextCapture = false;
59
+ return;
60
+ }
61
+ const focused = target instanceof Node && this.node?.contains(target);
62
+ if (focused && !this.state.focused) {
63
+ this.setState({
64
+ focused: true
65
+ });
66
+ this.props.onFocus?.();
67
+ }
68
+ };
69
+ onBlurCapture = ({
70
+ target
71
+ }) => {
72
+ const {
73
+ state: {
74
+ focused
75
+ },
76
+ node
77
+ } = this;
78
+ if (focused) {
79
+ setTimeout(() => {
80
+ const blurred = target instanceof Node && node?.contains(target) && !node.contains(document.activeElement);
81
+ if (blurred) {
82
+ this.setState({
83
+ focused: false
84
+ });
85
+ this.props.onBlur?.();
86
+ }
87
+ }, 1);
88
+ }
89
+ };
90
+ onFocusRestore = () => {
91
+ this._skipNextCapture = true;
92
+ this.node?.focus({
93
+ preventScroll: !this.props.scrollOnTableFocus
94
+ });
95
+ };
96
+ onFocusReset = () => {
97
+ this.node?.blur();
98
+ };
113
99
  render() {
114
- const _this$props3 = this.props,
115
- {
116
- autofocus,
117
- focused,
118
- onFocus,
119
- onBlur,
120
- innerRef,
121
- scrollOnTableFocus
122
- } = _this$props3,
123
- rest = _objectWithoutProperties(_this$props3, _excluded);
124
- return jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, rest), {}, {
100
+ const {
101
+ autofocus,
102
+ focused,
103
+ onFocus,
104
+ onBlur,
105
+ innerRef,
106
+ scrollOnTableFocus,
107
+ ...rest
108
+ } = this.props;
109
+ return jsx(ComposedComponent, {
110
+ ...rest,
125
111
  innerRef: this.composedRef(innerRef, this.onRefUpdate),
126
112
  focused: this.state.focused,
127
113
  onFocusReset: this.onFocusReset,
128
114
  onFocusRestore: this.onFocusRestore
129
- }));
115
+ });
130
116
  }
131
117
  }
132
- FocusSensor.defaultProps = _objectSpread2(_objectSpread2({}, ComposedComponent.defaultProps), {}, {
118
+ FocusSensor.defaultProps = {
119
+ ...ComposedComponent.defaultProps,
133
120
  focused: false,
134
121
  autofocus: false,
135
122
  scrollOnTableFocus: true,
136
123
  onFocus: () => {},
137
124
  onBlur: () => {}
138
- });
125
+ };
139
126
  return FocusSensor;
140
127
  }
141
128
 
@@ -1,13 +1,8 @@
1
- import 'core-js/modules/es.regexp.exec.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
-
4
1
  /** https://github.com/bevacqua/fuzzysearch + highlighting with Markdown */
5
- function fuzzyHighlight(needle, haystack) {
6
- let caseSensitive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2
+ function fuzzyHighlight(needle, haystack, caseSensitive = false) {
7
3
  const ndl = caseSensitive ? needle : needle.toLowerCase();
8
4
  const hstck = caseSensitive ? haystack : haystack.toLowerCase();
9
- const result = function (matched) {
10
- let matches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
5
+ const result = (matched, matches = []) => {
11
6
  let highlight = haystack;
12
7
  if (matches.length > 0) {
13
8
  highlight = '';
@@ -15,7 +10,7 @@ function fuzzyHighlight(needle, haystack) {
15
10
  to: 0
16
11
  };
17
12
  for (const match of matches) {
18
- highlight += "".concat(haystack.slice(prevMatch.to, match.from), "**").concat(haystack.slice(match.from, match.to), "**");
13
+ highlight += `${haystack.slice(prevMatch.to, match.from)}**${haystack.slice(match.from, match.to)}**`;
19
14
  prevMatch = match;
20
15
  }
21
16
  highlight += haystack.slice(prevMatch.to);
@@ -12,7 +12,7 @@ function getUID(name) {
12
12
  idCounters[name] = 0;
13
13
  }
14
14
  const id = String(idCounters[name]++);
15
- return "".concat(name).concat(id, "-").concat(salt);
15
+ return `${name}${id}-${salt}`;
16
16
  }
17
17
 
18
18
  export { getUID as default };
@@ -1,5 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
-
3
1
  const injectStyleSheet = styles => {
4
2
  const styleTag = document.createElement('style');
5
3
  styleTag.setAttribute('type', 'text/css');
@@ -7,9 +5,10 @@ const injectStyleSheet = styles => {
7
5
  document.head.appendChild(styleTag);
8
6
  return styleTag;
9
7
  };
10
- const injectRuleSet = (selector, declarations) => injectStyleSheet("\n".concat(selector, " {\n ").concat(Object.entries(declarations).map(_ref => {
11
- let [property, value] = _ref;
12
- return "".concat(property, ": ").concat(value, ";");
13
- }).join("\n "), "\n}"));
8
+ const injectRuleSet = (selector, declarations) => injectStyleSheet(`
9
+ ${selector} {
10
+ ${Object.entries(declarations).map(([property, value]) => `${property}: ${value};`).join(`
11
+ `)}
12
+ }`);
14
13
 
15
14
  export { injectRuleSet, injectStyleSheet };
@@ -1,15 +1,6 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/web.dom-collections.iterator.js';
3
-
4
1
  class Listeners {
5
- constructor() {
6
- _defineProperty(this, "_all", new Map());
7
- }
8
- trigger() {
9
- for (var _len = arguments.length, _ref = new Array(_len), _key = 0; _key < _len; _key++) {
10
- _ref[_key] = arguments[_key];
11
- }
12
- let [event, data] = _ref;
2
+ _all = new Map();
3
+ trigger(...[event, data]) {
13
4
  const handlers = this._all.get(event);
14
5
  if (handlers) {
15
6
  return Promise.all([...handlers].map(fn => fn(data)));
@@ -1,5 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
-
3
1
  function memoize(fn) {
4
2
  const primitiveCache = new Map();
5
3
  const objectCache = new WeakMap();
@@ -1,7 +1,3 @@
1
- import 'core-js/modules/es.array.reverse.js';
2
- import 'core-js/modules/es.regexp.exec.js';
3
- import 'core-js/modules/web.dom-collections.iterator.js';
4
-
5
1
  function normalizeIndent(string) {
6
2
  const nonemptyRE = /\S/;
7
3
  const indentRE = /^\s*/;
@@ -23,8 +19,8 @@ function normalizeIndent(string) {
23
19
  }
24
20
  }
25
21
  const indents = lines.filter(line => nonemptyRE.test(line)).map(line => {
26
- var _line$match$0$length, _line$match;
27
- return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match === void 0 ? void 0 : _line$match[0].length) !== null && _line$match$0$length !== void 0 ? _line$match$0$length : 0;
22
+ var _line$match$0$length;
23
+ return (_line$match$0$length = line.match(indentRE)?.[0].length) !== null && _line$match$0$length !== void 0 ? _line$match$0$length : 0;
28
24
  });
29
25
  const minIndent = Math.min(...indents);
30
26
  return lines.map(line => line.slice(minIndent)).join('\n');
@@ -1,10 +1,9 @@
1
1
  // Useful for using fetch with timeout
2
2
  // https://github.com/github/fetch/issues/175#issuecomment-284787564
3
- function promiseWithTimeout(promise, timeout, _ref) {
4
- let {
5
- error,
6
- onTimeout = () => {}
7
- } = _ref;
3
+ function promiseWithTimeout(promise, timeout, {
4
+ error,
5
+ onTimeout = () => {}
6
+ }) {
8
7
  return new Promise((resolve, reject) => {
9
8
  setTimeout(() => {
10
9
  onTimeout();
@@ -1,16 +1,7 @@
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 { Component } from 'react';
5
3
 
6
4
  class Renderer extends Component {
7
- constructor() {
8
- super(...arguments);
9
- _defineProperty(this, "node", void 0);
10
- _defineProperty(this, "nodeRef", node => {
11
- this.node = node;
12
- });
13
- }
14
5
  componentDidMount() {
15
6
  const {
16
7
  node
@@ -23,6 +14,10 @@ class Renderer extends Component {
23
14
  }
24
15
  Array.from(this.props.nodes).forEach(nodeToRender => node.appendChild(nodeToRender));
25
16
  }
17
+ node;
18
+ nodeRef = node => {
19
+ this.node = node;
20
+ };
26
21
  render() {
27
22
  const {
28
23
  className
@@ -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 { forwardRef, Component } from 'react';
5
3
  import { createComposedRef } from './compose-refs.js';
@@ -7,18 +5,17 @@ import 'memoize-one';
7
5
 
8
6
  function rerenderHOC(ComposedComponent) {
9
7
  class Rerenderer extends Component {
10
- constructor() {
11
- super(...arguments);
12
- _defineProperty(this, "state", this.props.props);
13
- _defineProperty(this, "composedRef", createComposedRef());
14
- }
8
+ state = this.props.props;
9
+ composedRef = createComposedRef();
15
10
  render() {
16
11
  const ref = this.composedRef(this.props.forwardedRef);
17
- return jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, this.state), {}, {
18
- ref: instance => ref(instance ? _objectSpread2(_objectSpread2({}, instance), {}, {
12
+ return jsx(ComposedComponent, {
13
+ ...this.state,
14
+ ref: instance => ref(instance ? {
15
+ ...instance,
19
16
  rerender: this.setState.bind(this)
20
- }) : null)
21
- }));
17
+ } : null)
18
+ });
22
19
  }
23
20
  }
24
21
  return /*#__PURE__*/forwardRef(function RerendererForwardRef(props, ref) {
@@ -4,8 +4,7 @@ function scheduleRAF(trailingCall) {
4
4
  let trailingCallScheduled = false;
5
5
  function doSchedule() {
6
6
  RAF = window.requestAnimationFrame(() => {
7
- var _scheduledCb;
8
- (_scheduledCb = scheduledCb) === null || _scheduledCb === void 0 || _scheduledCb();
7
+ scheduledCb?.();
9
8
  if (trailingCallScheduled) {
10
9
  trailingCallScheduled = false;
11
10
  doSchedule();
@@ -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';
@@ -8,8 +6,6 @@ import '../popup/popup.target.js';
8
6
  import '../popup/popup.js';
9
7
  export { G as GLOBAL_DARK_CLASS_NAME, b as ThemeContext, a as ThemeProvider, W as WithThemeClasses, e as applyTheme, T as default, u as useTheme, c as useThemeClasses } from '../_helpers/theme.js';
10
8
  import './get-uid.js';
11
- import 'core-js/modules/es.regexp.exec.js';
12
- import 'core-js/modules/es.string.replace.js';
13
9
  import './schedule-raf.js';
14
10
  import './dom.js';
15
11
  import '../shortcuts/shortcuts.js';
@@ -21,6 +17,5 @@ import './data-tests.js';
21
17
  import '../tab-trap/tab-trap.js';
22
18
  import './configuration.js';
23
19
  import '../popup/position.js';
24
- import 'core-js/modules/es.array.sort.js';
25
20
  import '../popup/popup.consts.js';
26
21
  import '../popup/position-css.js';
@@ -1,13 +1,8 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
-
3
1
  const TWO = 2;
4
2
  function trivialTemplateTag(f) {
5
- return function (strings) {
3
+ return (strings, ...interpolations) => {
6
4
  const chunks = [...strings];
7
5
  // insert the interpolations where they belong to
8
- for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
9
- interpolations[_key - 1] = arguments[_key];
10
- }
11
6
  interpolations.forEach((value, i) => chunks.splice(TWO * i + 1, 0, value));
12
7
  return f(chunks.join(''));
13
8
  };
@@ -1,6 +1,3 @@
1
- import 'core-js/modules/es.regexp.exec.js';
2
- import 'core-js/modules/es.string.replace.js';
3
-
4
1
  /**
5
2
  * @description Provides a set of utilities for URL manipulation.
6
3
  */
@@ -30,7 +27,7 @@ function getBaseURI() {
30
27
  */
31
28
  function getAbsoluteBaseURL() {
32
29
  const baseUrl = getBaseURI();
33
- const host = "".concat(window.location.protocol, "//").concat(window.location.host);
30
+ const host = `${window.location.protocol}//${window.location.host}`;
34
31
  let uri;
35
32
  if (baseUrl) {
36
33
  uri = ABSOLUTE_URL_PATTERN.test(baseUrl) ? baseUrl : host + baseUrl;
@@ -66,8 +63,7 @@ function getAbsoluteURL() {
66
63
  * @param {Function} baseURIGetter a function that returns base URI
67
64
  * @return {string} fixed URL
68
65
  */
69
- function fixUrl(url) {
70
- let baseURIGetter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getBaseURI;
66
+ function fixUrl(url, baseURIGetter = getBaseURI) {
71
67
  if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1 && url.indexOf('/') !== 0) {
72
68
  const baseUrl = baseURIGetter();
73
69
  if (baseUrl) {
@@ -1,4 +1,3 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
1
  import { useRef, useLayoutEffect, useCallback } from 'react';
3
2
 
4
3
  function useEventCallback(fn) {
@@ -6,14 +5,14 @@ function useEventCallback(fn) {
6
5
  useLayoutEffect(() => {
7
6
  ref.current = fn;
8
7
  });
9
- return useCallback(function () {
8
+ return useCallback((...args) => {
10
9
  const {
11
10
  current
12
11
  } = ref;
13
12
  if (current === null || current === undefined) {
14
13
  throw new Error('callback created in useEventCallback can only be called from event handlers');
15
14
  }
16
- return current(...arguments);
15
+ return current(...args);
17
16
  }, []);
18
17
  }
19
18
 
@@ -1,12 +1,8 @@
1
- import { a as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.reverse.js';
3
- import 'core-js/modules/web.dom-collections.iterator.js';
4
1
  import { jsx } from 'react/jsx-runtime';
5
2
  import { Component } from 'react';
6
3
  import classNames from 'classnames';
7
4
  import { s as styles } from '../_helpers/grid.js';
8
5
 
9
- const _excluded = ["children", "className", "reverse"];
10
6
  const classMap = {
11
7
  xs: 'col-xs',
12
8
  sm: 'col-sm',
@@ -23,23 +19,16 @@ const classMap = {
23
19
  * @mockReturnValue {Array} result classnames
24
20
  */
25
21
  function getClassNames(props) {
26
- return Object.entries(props).filter(_ref => {
27
- let [key] = _ref;
28
- return classMap[key];
29
- }).map(_ref2 => {
30
- let [key, value] = _ref2;
31
- return styles[Number.isInteger(value) ? "".concat(classMap[key], "-").concat(value) : classMap[key]];
32
- });
22
+ return Object.entries(props).filter(([key]) => classMap[key]).map(([key, value]) => styles[Number.isInteger(value) ? `${classMap[key]}-${value}` : classMap[key]]);
33
23
  }
34
24
  class Col extends Component {
35
25
  render() {
36
- const _this$props = this.props,
37
- {
38
- children,
39
- className,
40
- reverse
41
- } = _this$props,
42
- restProps = _objectWithoutProperties(_this$props, _excluded);
26
+ const {
27
+ children,
28
+ className,
29
+ reverse,
30
+ ...restProps
31
+ } = this.props;
43
32
  const classes = classNames(styles.col, className, getClassNames(restProps), {
44
33
  [styles.reverse]: reverse
45
34
  });
@@ -1,32 +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 { Component } from 'react';
4
3
  import classNames from 'classnames';
5
4
  import { s as styles } from '../_helpers/grid.js';
6
5
  export { default as Row } from './row.js';
7
6
  export { default as Col } from './col.js';
8
- import 'core-js/modules/es.array.reverse.js';
9
- import 'core-js/modules/web.dom-collections.iterator.js';
10
7
 
11
- const _excluded = ["children", "className"];
12
8
  /**
13
9
  * @name Grid
14
10
  */
15
11
  class Grid extends Component {
16
12
  render() {
17
- const _this$props = this.props,
18
- {
19
- children,
20
- className
21
- } = _this$props,
22
- restProps = _objectWithoutProperties(_this$props, _excluded);
13
+ const {
14
+ children,
15
+ className,
16
+ ...restProps
17
+ } = this.props;
23
18
  const classes = classNames(styles['container-fluid'], className);
24
- return jsx("div", _objectSpread2(_objectSpread2({
25
- "data-test": 'ring-grid'
26
- }, restProps), {}, {
19
+ return jsx("div", {
20
+ "data-test": 'ring-grid',
21
+ ...restProps,
27
22
  className: classes,
28
23
  children: children
29
- }));
24
+ });
30
25
  }
31
26
  }
32
27