@jetbrains/ring-ui 5.0.127 → 5.0.129

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 (310) hide show
  1. package/components/alert/alert.js +2 -1
  2. package/components/alert/container.js +2 -1
  3. package/components/auth/auth__core.js +2 -1
  4. package/components/auth/request-builder.js +2 -1
  5. package/components/auth/response-parser.js +2 -1
  6. package/components/auth/token-validator.js +2 -1
  7. package/components/auth-dialog/auth-dialog.js +2 -1
  8. package/components/avatar/avatar.js +2 -1
  9. package/components/badge/badge.js +2 -1
  10. package/components/button/button.js +2 -1
  11. package/components/button-group/button-group.js +2 -1
  12. package/components/button-group/caption.js +2 -1
  13. package/components/button-set/button-set.js +2 -1
  14. package/components/button-toolbar/button-toolbar.js +2 -1
  15. package/components/caret/caret.js +2 -1
  16. package/components/checkbox/checkbox.js +2 -1
  17. package/components/code/code.js +2 -1
  18. package/components/confirm/confirm.js +2 -1
  19. package/components/content-layout/content-layout.js +2 -1
  20. package/components/content-layout/sidebar.js +2 -1
  21. package/components/data-list/data-list.js +2 -1
  22. package/components/data-list/item.js +2 -1
  23. package/components/date-picker/date-input.js +2 -1
  24. package/components/date-picker/date-picker.js +2 -1
  25. package/components/date-picker/date-popup.js +2 -1
  26. package/components/date-picker/day.js +2 -1
  27. package/components/date-picker/month-slider.js +2 -1
  28. package/components/date-picker/years.js +2 -1
  29. package/components/dialog/dialog.d.ts +4 -16
  30. package/components/dialog/dialog.js +6 -3
  31. package/components/dropdown/dropdown.js +2 -1
  32. package/components/error-bubble/error-bubble.js +2 -1
  33. package/components/error-message/error-message.js +2 -1
  34. package/components/footer/footer.js +1 -0
  35. package/components/global/react-dom-renderer.js +2 -1
  36. package/components/grid/col.js +2 -1
  37. package/components/grid/grid.js +2 -1
  38. package/components/grid/row.js +2 -1
  39. package/components/group/group.js +2 -1
  40. package/components/header/logo.js +2 -1
  41. package/components/header/profile.js +2 -1
  42. package/components/header/services-link.js +2 -1
  43. package/components/header/services.js +2 -1
  44. package/components/header/smart-profile.js +2 -1
  45. package/components/header/smart-services.js +2 -1
  46. package/components/header/tray-icon.js +2 -1
  47. package/components/header/tray.js +2 -1
  48. package/components/hub-source/hub-source.js +2 -1
  49. package/components/icon/icon.js +2 -1
  50. package/components/input/input.js +2 -1
  51. package/components/island/island.js +2 -1
  52. package/components/island-legacy/content-legacy.js +2 -1
  53. package/components/island-legacy/header-legacy.js +2 -1
  54. package/components/island-legacy/island-legacy.js +2 -1
  55. package/components/link/clickableLink.js +2 -1
  56. package/components/list/list.js +2 -1
  57. package/components/list/list__hint.js +2 -1
  58. package/components/list/list__users-groups-source.js +2 -1
  59. package/components/loader/loader.js +2 -1
  60. package/components/loader/loader__core.js +2 -1
  61. package/components/loader-screen/loader-screen.js +2 -1
  62. package/components/login-dialog/login-dialog.js +2 -1
  63. package/components/message/message.js +2 -1
  64. package/components/pager/pager.js +2 -1
  65. package/components/panel/panel.js +2 -1
  66. package/components/permissions/permissions.js +2 -1
  67. package/components/permissions/permissions__cache.js +2 -1
  68. package/components/popup/popup.js +2 -1
  69. package/components/popup-menu/popup-menu.js +2 -1
  70. package/components/progress-bar/progress-bar.js +2 -1
  71. package/components/query-assist/query-assist.js +4 -3
  72. package/components/radio/radio.js +2 -1
  73. package/components/radio/radio__item.js +2 -1
  74. package/components/select/select.js +2 -1
  75. package/components/select/select__filter.js +2 -1
  76. package/components/select/select__popup.js +4 -2
  77. package/components/shortcuts/shortcuts.js +2 -1
  78. package/components/storage/storage__fallback.js +2 -1
  79. package/components/tab-trap/tab-trap.js +2 -1
  80. package/components/table/cell.js +2 -1
  81. package/components/table/header-cell.js +2 -1
  82. package/components/table/header.js +2 -1
  83. package/components/table/multitable.js +2 -1
  84. package/components/table/row.d.ts +1 -0
  85. package/components/table/row.js +6 -4
  86. package/components/table/smart-table.d.ts +1 -0
  87. package/components/table/table.d.ts +2 -0
  88. package/components/table/table.js +8 -4
  89. package/components/tabs/smart-tabs.js +2 -1
  90. package/components/tabs/tab.js +2 -1
  91. package/components/tag/tag.js +2 -1
  92. package/components/tags-input/tags-input.d.ts +1 -1
  93. package/components/tags-input/tags-input.js +3 -2
  94. package/components/tags-list/tags-list.js +2 -1
  95. package/components/text/text.js +2 -1
  96. package/components/tooltip/tooltip.js +2 -1
  97. package/components/user-agreement/user-agreement.js +2 -1
  98. package/components/user-card/card.js +2 -1
  99. package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
  100. package/components/user-card/smart-user-card-tooltip.js +2 -1
  101. package/components/user-card/tooltip.js +2 -1
  102. package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
  103. package/dist/_helpers/anchor.js +1 -1
  104. package/dist/_helpers/card.js +44 -47
  105. package/dist/_helpers/footer.js +1 -0
  106. package/dist/_helpers/select__filter.js +10 -13
  107. package/dist/_helpers/services-link.js +10 -10
  108. package/dist/_helpers/sidebar.js +34 -37
  109. package/dist/_helpers/theme.js +1 -1
  110. package/dist/_helpers/title.js +12 -16
  111. package/dist/alert/alert.js +63 -66
  112. package/dist/alert/container.js +5 -5
  113. package/dist/alert-service/alert-service.js +5 -7
  114. package/dist/analytics/analytics.js +1 -2
  115. package/dist/analytics/analytics__custom-plugin.js +6 -8
  116. package/dist/auth/auth.js +1 -1
  117. package/dist/auth/auth__core.js +26 -26
  118. package/dist/auth/background-flow.js +4 -5
  119. package/dist/auth/iframe-flow.js +12 -12
  120. package/dist/auth/landing.js +1 -1
  121. package/dist/auth/request-builder.js +3 -5
  122. package/dist/auth/response-parser.js +5 -6
  123. package/dist/auth/storage.js +12 -12
  124. package/dist/auth/token-validator.js +13 -16
  125. package/dist/auth/window-flow.js +18 -19
  126. package/dist/auth-dialog/auth-dialog.js +54 -57
  127. package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
  128. package/dist/auth-ng/auth-ng.js +1 -1
  129. package/dist/avatar/avatar.js +30 -33
  130. package/dist/avatar-ng/avatar-ng.js +1 -1
  131. package/dist/badge/badge.js +10 -10
  132. package/dist/badge-ng/badge-ng.js +1 -1
  133. package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
  134. package/dist/button/button.js +24 -27
  135. package/dist/button-group/button-group.js +5 -5
  136. package/dist/button-group/caption.js +4 -4
  137. package/dist/button-ng/button-ng.js +68 -69
  138. package/dist/button-set/button-set.js +6 -6
  139. package/dist/button-toolbar/button-toolbar.js +6 -6
  140. package/dist/caret/caret.js +2 -4
  141. package/dist/checkbox/checkbox.js +27 -30
  142. package/dist/checkbox-ng/checkbox-ng.js +0 -1
  143. package/dist/code/code.js +17 -21
  144. package/dist/confirm/confirm.js +31 -34
  145. package/dist/confirm-ng/confirm-ng.js +1 -1
  146. package/dist/confirm-service/confirm-service.js +1 -1
  147. package/dist/content-layout/content-layout.js +17 -20
  148. package/dist/contenteditable/contenteditable.js +11 -11
  149. package/dist/data-list/data-list.js +49 -55
  150. package/dist/data-list/item.js +64 -67
  151. package/dist/data-list/selection.js +0 -1
  152. package/dist/data-list/title.js +1 -1
  153. package/dist/data-list-ng/data-list-ng.js +1 -1
  154. package/dist/date-picker/date-input.js +39 -42
  155. package/dist/date-picker/date-picker.js +162 -165
  156. package/dist/date-picker/date-popup.js +119 -119
  157. package/dist/date-picker/day.js +34 -38
  158. package/dist/date-picker/month-names.js +11 -14
  159. package/dist/date-picker/month-slider.js +24 -28
  160. package/dist/date-picker/month.js +1 -1
  161. package/dist/date-picker/months.js +1 -1
  162. package/dist/date-picker/years.js +9 -13
  163. package/dist/dialog/dialog.d.ts +4 -16
  164. package/dist/dialog/dialog.js +68 -65
  165. package/dist/dialog-ng/dialog-ng.js +21 -22
  166. package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
  167. package/dist/dropdown/dropdown.js +101 -104
  168. package/dist/dropdown-menu/dropdown-menu.js +1 -1
  169. package/dist/editable-heading/editable-heading.js +1 -1
  170. package/dist/error-bubble/error-bubble.js +6 -6
  171. package/dist/error-message/error-message.js +10 -10
  172. package/dist/error-message-ng/error-message-ng.js +0 -1
  173. package/dist/footer-ng/footer-ng.js +19 -21
  174. package/dist/global/angular-component-factory.js +2 -3
  175. package/dist/global/dom.js +1 -5
  176. package/dist/global/focus-sensor-hoc.js +58 -61
  177. package/dist/global/listeners.js +1 -5
  178. package/dist/global/react-dom-renderer.js +8 -12
  179. package/dist/global/rerender-hoc.js +1 -5
  180. package/dist/global/ring-angular-component.js +1 -3
  181. package/dist/grid/col.js +13 -14
  182. package/dist/grid/grid.js +5 -5
  183. package/dist/grid/row.js +16 -17
  184. package/dist/group/group.js +5 -5
  185. package/dist/header/header.js +10 -10
  186. package/dist/header/logo.js +9 -9
  187. package/dist/header/profile.js +58 -58
  188. package/dist/header/services.js +19 -22
  189. package/dist/header/smart-profile.js +40 -43
  190. package/dist/header/smart-services.js +28 -31
  191. package/dist/header/tray-icon.js +6 -6
  192. package/dist/header/tray.js +5 -5
  193. package/dist/heading/heading.js +1 -1
  194. package/dist/heading-ng/heading-ng.js +1 -1
  195. package/dist/http/http.js +111 -107
  196. package/dist/http/http.mock.js +3 -4
  197. package/dist/hub-source/hub-source.js +7 -9
  198. package/dist/hub-source/hub-source__user.js +0 -1
  199. package/dist/hub-source/hub-source__users-groups.js +4 -5
  200. package/dist/icon/icon.js +18 -18
  201. package/dist/icon/icon__svg.js +1 -1
  202. package/dist/icon-ng/icon-ng.js +0 -1
  203. package/dist/input/input.js +35 -38
  204. package/dist/input-ng/input-ng.js +25 -26
  205. package/dist/island/adaptive-island-hoc.js +21 -25
  206. package/dist/island/content.js +62 -65
  207. package/dist/island/header.js +11 -11
  208. package/dist/island/island.js +8 -8
  209. package/dist/island-legacy/content-legacy.js +5 -5
  210. package/dist/island-legacy/header-legacy.js +5 -5
  211. package/dist/island-legacy/island-legacy.js +5 -5
  212. package/dist/link/clickableLink.js +27 -30
  213. package/dist/link/link.js +16 -16
  214. package/dist/list/list.js +389 -391
  215. package/dist/list/list__custom.js +6 -10
  216. package/dist/list/list__hint.js +3 -4
  217. package/dist/list/list__item.js +4 -7
  218. package/dist/list/list__link.js +1 -1
  219. package/dist/list/list__users-groups-source.js +3 -3
  220. package/dist/loader/loader.js +16 -19
  221. package/dist/loader/loader__core.js +62 -62
  222. package/dist/loader-inline/loader-inline.js +6 -6
  223. package/dist/loader-ng/loader-ng.js +3 -4
  224. package/dist/loader-screen/loader-screen.js +6 -6
  225. package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
  226. package/dist/login-dialog/login-dialog.js +55 -58
  227. package/dist/login-dialog/service.js +1 -1
  228. package/dist/markdown/code.js +0 -1
  229. package/dist/markdown/markdown.js +1 -1
  230. package/dist/message/message.js +22 -25
  231. package/dist/old-browsers-message/white-list.js +2 -2
  232. package/dist/pager/pager.js +55 -58
  233. package/dist/pager-ng/pager-ng.js +1 -1
  234. package/dist/panel/panel.js +5 -5
  235. package/dist/panel-ng/panel-ng.js +0 -1
  236. package/dist/permissions/permissions.js +14 -16
  237. package/dist/permissions/permissions__cache.js +4 -6
  238. package/dist/permissions-ng/permissions-ng.js +1 -1
  239. package/dist/place-under-ng/place-under-ng.js +0 -1
  240. package/dist/popup/popup.js +118 -121
  241. package/dist/popup/popup.target.js +1 -1
  242. package/dist/popup/position.js +0 -1
  243. package/dist/popup-menu/popup-menu.js +19 -22
  244. package/dist/progress-bar/progress-bar.js +41 -44
  245. package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
  246. package/dist/promised-click-ng/promised-click-ng.js +0 -1
  247. package/dist/query-assist/query-assist.js +507 -501
  248. package/dist/query-assist/query-assist__suggestions.js +1 -1
  249. package/dist/query-assist-ng/query-assist-ng.js +1 -1
  250. package/dist/radio/radio.js +10 -13
  251. package/dist/radio/radio__item.js +19 -22
  252. package/dist/select/select.js +350 -349
  253. package/dist/select/select__popup.js +148 -152
  254. package/dist/select-ng/select-ng.js +1 -1
  255. package/dist/select-ng/select-ng__lazy.js +4 -4
  256. package/dist/select-ng/select-ng__options.js +14 -15
  257. package/dist/shortcuts/core.js +35 -36
  258. package/dist/shortcuts/shortcuts-hoc.js +7 -11
  259. package/dist/shortcuts/shortcuts.js +10 -11
  260. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
  261. package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
  262. package/dist/sidebar-ng/sidebar-ng.js +0 -1
  263. package/dist/storage/storage.js +1 -1
  264. package/dist/storage/storage__fallback.js +8 -10
  265. package/dist/storage/storage__local.js +2 -2
  266. package/dist/style.css +1 -1
  267. package/dist/tab-trap/tab-trap.js +84 -86
  268. package/dist/table/cell.js +6 -6
  269. package/dist/table/disable-hover-hoc.js +23 -25
  270. package/dist/table/header-cell.js +28 -31
  271. package/dist/table/header.js +58 -61
  272. package/dist/table/multitable.js +91 -95
  273. package/dist/table/row-with-focus-sensor.js +15 -18
  274. package/dist/table/row.d.ts +1 -0
  275. package/dist/table/row.js +54 -55
  276. package/dist/table/selection-shortcuts-hoc.js +145 -147
  277. package/dist/table/selection.js +7 -9
  278. package/dist/table/smart-table.d.ts +1 -0
  279. package/dist/table/smart-table.js +21 -24
  280. package/dist/table/table.d.ts +2 -0
  281. package/dist/table/table.js +107 -109
  282. package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
  283. package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
  284. package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
  285. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
  286. package/dist/table-ng/smart-table-ng.js +1 -1
  287. package/dist/table-ng/table-ng.js +1 -1
  288. package/dist/tabs/collapsible-more.js +1 -1
  289. package/dist/tabs/collapsible-tab.js +1 -1
  290. package/dist/tabs/dumb-tabs.js +46 -49
  291. package/dist/tabs/smart-tabs.js +10 -10
  292. package/dist/tabs/tab.js +7 -8
  293. package/dist/tag/tag.js +42 -45
  294. package/dist/tags-input/tags-input.d.ts +1 -1
  295. package/dist/tags-input/tags-input.js +214 -213
  296. package/dist/tags-input-ng/tags-input-ng.js +1 -1
  297. package/dist/tags-list/tags-list.js +20 -20
  298. package/dist/template-ng/template-ng.js +25 -26
  299. package/dist/text/text.js +6 -6
  300. package/dist/toggle/toggle.js +19 -19
  301. package/dist/toggle-ng/toggle-ng.js +1 -1
  302. package/dist/tooltip/tooltip.js +86 -89
  303. package/dist/tooltip-ng/tooltip-ng.js +1 -1
  304. package/dist/user-agreement/service.js +207 -205
  305. package/dist/user-agreement/user-agreement.js +39 -42
  306. package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
  307. package/dist/user-card/smart-user-card-tooltip.js +32 -35
  308. package/dist/user-card/tooltip.js +26 -26
  309. package/dist/user-card-ng/user-card-ng.js +1 -1
  310. package/package.json +17 -17
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { Component, cloneElement } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -22,82 +22,112 @@ import '../_helpers/button__classes.js';
22
22
  * @name Dropdown
23
23
  */
24
24
  class Dropdown extends Component {
25
- constructor() {
26
- super(...arguments);
27
- _defineProperty(this, "state", {
28
- show: this.props.initShown,
29
- pinned: false
30
- });
31
- _defineProperty(this, "onClick", () => {
32
- if (this.props.disabled) {
33
- return;
34
- }
35
- const {
36
- show,
37
- pinned
38
- } = this.state;
39
- let nextPinned = pinned;
40
- if (this.props.hoverMode) {
41
- if (!pinned) {
42
- nextPinned = true;
43
- if (show) {
44
- this.setState({
45
- pinned: true
46
- });
47
- return;
48
- }
49
- } else {
50
- nextPinned = false;
25
+ static propTypes = {
26
+ /**
27
+ * Can be string, React element, or a function accepting an object with {active, pinned} properties and returning a React element
28
+ * React element should render some interactive HTML element like `button` or `a`
29
+ */
30
+ anchor: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
31
+ children: PropTypes.oneOfType([PropTypes.element, PropTypes.func]).isRequired,
32
+ initShown: PropTypes.bool,
33
+ className: PropTypes.string,
34
+ activeClassName: PropTypes.string,
35
+ clickMode: PropTypes.bool,
36
+ hoverMode: PropTypes.bool,
37
+ hoverShowTimeOut: PropTypes.number,
38
+ hoverHideTimeOut: PropTypes.number,
39
+ disabled: PropTypes.bool,
40
+ onShow: PropTypes.func,
41
+ onHide: PropTypes.func,
42
+ onMouseEnter: PropTypes.func,
43
+ onMouseLeave: PropTypes.func,
44
+ 'data-test': PropTypes.string
45
+ };
46
+ static defaultProps = {
47
+ initShown: false,
48
+ clickMode: true,
49
+ hoverMode: false,
50
+ hoverShowTimeOut: 300,
51
+ hoverHideTimeOut: 600,
52
+ disabled: false,
53
+ onShow: () => {},
54
+ onHide: () => {},
55
+ onMouseEnter: () => {},
56
+ onMouseLeave: () => {}
57
+ };
58
+ state = {
59
+ show: this.props.initShown,
60
+ pinned: false
61
+ };
62
+ onClick = () => {
63
+ if (this.props.disabled) {
64
+ return;
65
+ }
66
+ const {
67
+ show,
68
+ pinned
69
+ } = this.state;
70
+ let nextPinned = pinned;
71
+ if (this.props.hoverMode) {
72
+ if (!pinned) {
73
+ nextPinned = true;
74
+ if (show) {
75
+ this.setState({
76
+ pinned: true
77
+ });
78
+ return;
51
79
  }
52
- }
53
- this._toggle(!show, nextPinned);
54
- });
55
- _defineProperty(this, "onChildCloseAttempt", () => {
56
- let nextPinned = this.state.pinned;
57
- if (this.props.hoverMode) {
80
+ } else {
58
81
  nextPinned = false;
59
82
  }
60
- this._toggle(false, nextPinned);
61
- });
62
- _defineProperty(this, "hoverTimer", void 0);
63
- _defineProperty(this, "onMouseEnter", event => {
64
- if (this.props.disabled) {
65
- return;
66
- }
67
- this._clearTimer();
68
- this.props.onMouseEnter?.(event);
69
- this.hoverTimer = window.setTimeout(() => {
70
- if (!this.state.show) {
71
- this._toggle(true);
72
- }
73
- }, this.props.hoverShowTimeOut);
74
- });
75
- _defineProperty(this, "onMouseLeave", event => {
76
- if (this.props.disabled) {
77
- return;
83
+ }
84
+ this._toggle(!show, nextPinned);
85
+ };
86
+ onChildCloseAttempt = () => {
87
+ let nextPinned = this.state.pinned;
88
+ if (this.props.hoverMode) {
89
+ nextPinned = false;
90
+ }
91
+ this._toggle(false, nextPinned);
92
+ };
93
+ hoverTimer;
94
+ onMouseEnter = event => {
95
+ if (this.props.disabled) {
96
+ return;
97
+ }
98
+ this._clearTimer();
99
+ this.props.onMouseEnter?.(event);
100
+ this.hoverTimer = window.setTimeout(() => {
101
+ if (!this.state.show) {
102
+ this._toggle(true);
78
103
  }
79
- this.props.onMouseLeave?.(event);
80
- if (this.state.pinned) {
81
- return;
104
+ }, this.props.hoverShowTimeOut);
105
+ };
106
+ onMouseLeave = event => {
107
+ if (this.props.disabled) {
108
+ return;
109
+ }
110
+ this.props.onMouseLeave?.(event);
111
+ if (this.state.pinned) {
112
+ return;
113
+ }
114
+ this._clearTimer();
115
+ this.hoverTimer = window.setTimeout(() => {
116
+ if (this.state.show) {
117
+ this._toggle(false);
82
118
  }
83
- this._clearTimer();
84
- this.hoverTimer = window.setTimeout(() => {
85
- if (this.state.show) {
86
- this._toggle(false);
87
- }
88
- }, this.props.hoverHideTimeOut);
89
- });
90
- _defineProperty(this, "handlePopupInteraction", () => {
91
- this.setState(_ref => {
92
- let {
93
- pinned
94
- } = _ref;
95
- return pinned ? null : {
96
- pinned: true
97
- };
98
- });
119
+ }, this.props.hoverHideTimeOut);
120
+ };
121
+ handlePopupInteraction = () => {
122
+ this.setState(_ref => {
123
+ let {
124
+ pinned
125
+ } = _ref;
126
+ return pinned ? null : {
127
+ pinned: true
128
+ };
99
129
  });
100
- }
130
+ };
101
131
  toggle() {
102
132
  let show = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.state.show;
103
133
  this._toggle(show);
@@ -182,38 +212,5 @@ class Dropdown extends Component {
182
212
  }), anchorElement, typeof children === 'function' ? children(childProps) : /*#__PURE__*/cloneElement(children, childProps));
183
213
  }
184
214
  }
185
- _defineProperty(Dropdown, "propTypes", {
186
- /**
187
- * Can be string, React element, or a function accepting an object with {active, pinned} properties and returning a React element
188
- * React element should render some interactive HTML element like `button` or `a`
189
- */
190
- anchor: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
191
- children: PropTypes.oneOfType([PropTypes.element, PropTypes.func]).isRequired,
192
- initShown: PropTypes.bool,
193
- className: PropTypes.string,
194
- activeClassName: PropTypes.string,
195
- clickMode: PropTypes.bool,
196
- hoverMode: PropTypes.bool,
197
- hoverShowTimeOut: PropTypes.number,
198
- hoverHideTimeOut: PropTypes.number,
199
- disabled: PropTypes.bool,
200
- onShow: PropTypes.func,
201
- onHide: PropTypes.func,
202
- onMouseEnter: PropTypes.func,
203
- onMouseLeave: PropTypes.func,
204
- 'data-test': PropTypes.string
205
- });
206
- _defineProperty(Dropdown, "defaultProps", {
207
- initShown: false,
208
- clickMode: true,
209
- hoverMode: false,
210
- hoverShowTimeOut: 300,
211
- hoverHideTimeOut: 600,
212
- disabled: false,
213
- onShow: () => {},
214
- onHide: () => {},
215
- onMouseEnter: () => {},
216
- onMouseLeave: () => {}
217
- });
218
215
 
219
216
  export { Anchor, Dropdown as default };
@@ -1,4 +1,4 @@
1
- import { a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { useMemo, cloneElement } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import List, { ActiveItemContext } from '../list/list.js';
@@ -1,4 +1,4 @@
1
- import { a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React from 'react';
3
3
  import classNames from 'classnames';
4
4
  import Heading, { Levels } from '../heading/heading.js';
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { PureComponent, Children, cloneElement } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
@@ -15,6 +14,7 @@ import '../global/sniffer.js';
15
14
  import 'sniffr';
16
15
  import '../global/data-tests.js';
17
16
  import '../tab-trap/tab-trap.js';
17
+ import '../_helpers/_rollupPluginBabelHelpers.js';
18
18
  import '../popup/position.js';
19
19
  import '../popup/popup.target.js';
20
20
 
@@ -24,6 +24,11 @@ var modules_ee284100 = {"unit":"i__const_unit_0","light":"light_rui_b075","error
24
24
  * @name Error Bubble
25
25
  */
26
26
  class ErrorBubble extends PureComponent {
27
+ static propTypes = {
28
+ error: PropTypes.string,
29
+ className: PropTypes.string,
30
+ children: PropTypes.node
31
+ };
27
32
  render() {
28
33
  const {
29
34
  children,
@@ -48,10 +53,5 @@ class ErrorBubble extends PureComponent {
48
53
  }, restProps.error)));
49
54
  }
50
55
  }
51
- _defineProperty(ErrorBubble, "propTypes", {
52
- error: PropTypes.string,
53
- className: PropTypes.string,
54
- children: PropTypes.node
55
- });
56
56
 
57
57
  export { ErrorBubble as default };
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { Component } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
@@ -6,6 +5,7 @@ import Icon from '../icon/icon.js';
6
5
  import { Size } from '../icon/icon__constants.js';
7
6
  import joinDataTestAttributes from '../global/data-tests.js';
8
7
  import { m as modules_2c5e8509 } from '../_helpers/error-message.js';
8
+ import '../_helpers/_rollupPluginBabelHelpers.js';
9
9
  import 'util-deprecate';
10
10
  import '../_helpers/icon.js';
11
11
  import '../icon/icon__svg.js';
@@ -15,6 +15,15 @@ import '../global/memoize.js';
15
15
  * @name Error Message
16
16
  */
17
17
  class ErrorMessage extends Component {
18
+ static propTypes = {
19
+ icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
20
+ code: PropTypes.string,
21
+ message: PropTypes.string,
22
+ description: PropTypes.string,
23
+ children: PropTypes.node,
24
+ className: PropTypes.string,
25
+ 'data-test': PropTypes.string
26
+ };
18
27
  render() {
19
28
  const {
20
29
  className,
@@ -43,14 +52,5 @@ class ErrorMessage extends Component {
43
52
  }, description), children));
44
53
  }
45
54
  }
46
- _defineProperty(ErrorMessage, "propTypes", {
47
- icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
48
- code: PropTypes.string,
49
- message: PropTypes.string,
50
- description: PropTypes.string,
51
- children: PropTypes.node,
52
- className: PropTypes.string,
53
- 'data-test': PropTypes.string
54
- });
55
55
 
56
56
  export { ErrorMessage as default };
@@ -4,7 +4,6 @@ import LinkModule from '../link-ng/link-ng.js';
4
4
  import { m as modules_2c5e8509 } from '../_helpers/error-message.js';
5
5
  import '../icon/icon__constants.js';
6
6
  import '../template-ng/template-ng.js';
7
- import '../_helpers/_rollupPluginBabelHelpers.js';
8
7
  import '../global/ring-angular-component.js';
9
8
  import '../_helpers/icon.js';
10
9
  import '../_helpers/link.js';
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import angular from 'angular';
3
2
  import RingAngularComponent from '../global/ring-angular-component.js';
4
3
  import { m as modules_7385b3fd, c as copyright } from '../_helpers/footer.js';
@@ -6,6 +5,7 @@ import 'react';
6
5
  import 'prop-types';
7
6
  import 'classnames';
8
7
  import '../link/link.js';
8
+ import '../_helpers/_rollupPluginBabelHelpers.js';
9
9
  import 'focus-visible';
10
10
  import '../global/memoize.js';
11
11
  import '../global/data-tests.js';
@@ -18,17 +18,13 @@ import '../_helpers/link.js';
18
18
 
19
19
  const angularModule = angular.module('Ring.footer', []);
20
20
  class rgFooterComponent extends RingAngularComponent {
21
- constructor() {
22
- super(...arguments);
23
- _defineProperty(this, "styles", modules_7385b3fd);
24
- }
25
- }
26
- _defineProperty(rgFooterComponent, "transclude", {
27
- left: '?rgFooterLeft',
28
- center: '?rgFooterCenter',
29
- right: '?rgFooterRight'
30
- });
31
- _defineProperty(rgFooterComponent, "template", `<footer ng-class=":: $ctrl.styles.footer" data-test="ring-footer">
21
+ styles = modules_7385b3fd;
22
+ static transclude = {
23
+ left: '?rgFooterLeft',
24
+ center: '?rgFooterCenter',
25
+ right: '?rgFooterRight'
26
+ };
27
+ static template = `<footer ng-class=":: $ctrl.styles.footer" data-test="ring-footer">
32
28
  <div ng-class=":: $ctrl.styles.columnLeft">
33
29
  <div ng-transclude="left" ng-class=":: $ctrl.styles.columnItem"></div>
34
30
  </div>
@@ -40,20 +36,22 @@ _defineProperty(rgFooterComponent, "template", `<footer ng-class=":: $ctrl.style
40
36
  <div ng-class=":: $ctrl.styles.columnRight">
41
37
  <div ng-transclude="right" ng-class=":: $ctrl.styles.columnItem"></div>
42
38
  </div>
43
- </footer>`);
44
- class rgFooterLineComponent extends RingAngularComponent {}
45
- _defineProperty(rgFooterLineComponent, "transclude", true);
46
- _defineProperty(rgFooterLineComponent, "template", `<div class="${modules_7385b3fd.line}" ng-transclude></div>`);
39
+ </footer>`;
40
+ }
41
+ class rgFooterLineComponent extends RingAngularComponent {
42
+ static transclude = true;
43
+ static template = `<div class="${modules_7385b3fd.line}" ng-transclude></div>`;
44
+ }
47
45
  class rgFooterCopyrightComponent extends RingAngularComponent {
46
+ static template = '<span>{{:: $ctrl.copyrightYears}} {{:: $ctrl.companyName}}</span>';
47
+ static bindings = {
48
+ year: '@',
49
+ companyName: '@'
50
+ };
48
51
  $onInit() {
49
52
  this.copyrightYears = copyright(this.year);
50
53
  }
51
54
  }
52
- _defineProperty(rgFooterCopyrightComponent, "template", '<span>{{:: $ctrl.copyrightYears}} {{:: $ctrl.companyName}}</span>');
53
- _defineProperty(rgFooterCopyrightComponent, "bindings", {
54
- year: '@',
55
- companyName: '@'
56
- });
57
55
  angularModule.component('rgFooter', rgFooterComponent);
58
56
  angularModule.component('rgFooterLine', rgFooterLineComponent);
59
57
  angularModule.component('rgFooterCopyright', rgFooterCopyrightComponent);
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import angular from 'angular';
3
2
  import React from 'react';
4
3
  import { unmountComponentAtNode, render } from './react-render-adapter.js';
@@ -17,6 +16,8 @@ function createAngularComponent(Component) {
17
16
  bindings[key] = '<';
18
17
  });
19
18
  class AngularComponent extends RingAngularComponent {
19
+ static bindings = bindings;
20
+ static transclude = true;
20
21
  $postLink() {
21
22
  const {
22
23
  $transclude
@@ -63,8 +64,6 @@ function createAngularComponent(Component) {
63
64
  }) : null), container);
64
65
  }
65
66
  }
66
- _defineProperty(AngularComponent, "bindings", bindings);
67
- _defineProperty(AngularComponent, "transclude", true);
68
67
  AngularComponent.$inject = ['$scope', '$element', '$transclude'];
69
68
  return AngularComponent;
70
69
  }
@@ -1,5 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
-
3
1
  /**
4
2
  * @name DOM
5
3
  */
@@ -88,9 +86,7 @@ function resetRootStyleProperties() {
88
86
  Object.keys(properties).forEach(key => rootStyle.removeProperty(key));
89
87
  }
90
88
  class Listeners {
91
- constructor() {
92
- _defineProperty(this, "_all", new Set());
93
- }
89
+ _all = new Set();
94
90
  add(el, event, handler, options) {
95
91
  el.addEventListener(event, handler, options);
96
92
  const dispatchFn = () => el.removeEventListener(event, handler, options);
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { Component } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { refObject } from './prop-types.js';
@@ -22,66 +22,9 @@ function extractPropTypes(_ref) {
22
22
  }
23
23
  function focusSensorHOC(ComposedComponent) {
24
24
  class FocusSensor extends Component {
25
- constructor() {
26
- super(...arguments);
27
- _defineProperty(this, "state", {
28
- focused: this.props.focused
29
- });
30
- _defineProperty(this, "node", void 0);
31
- _defineProperty(this, "_skipNextCapture", false);
32
- _defineProperty(this, "onRefUpdate", node => {
33
- if (node) {
34
- this.node = node;
35
- }
36
- });
37
- _defineProperty(this, "onFocusCapture", _ref2 => {
38
- let {
39
- target
40
- } = _ref2;
41
- if (this._skipNextCapture) {
42
- this._skipNextCapture = false;
43
- return;
44
- }
45
- const focused = target instanceof Node && this.node?.contains(target);
46
- if (focused && !this.state.focused) {
47
- this.setState({
48
- focused: true
49
- });
50
- this.props.onFocus?.();
51
- }
52
- });
53
- _defineProperty(this, "onBlurCapture", _ref3 => {
54
- let {
55
- target
56
- } = _ref3;
57
- const {
58
- state: {
59
- focused
60
- },
61
- node
62
- } = this;
63
- if (focused) {
64
- setTimeout(() => {
65
- const blurred = target instanceof Node && node?.contains(target) && !node.contains(document.activeElement);
66
- if (blurred) {
67
- this.setState({
68
- focused: false
69
- });
70
- this.props.onBlur?.();
71
- }
72
- }, 1);
73
- }
74
- });
75
- _defineProperty(this, "onFocusRestore", () => {
76
- this._skipNextCapture = true;
77
- this.node?.focus({
78
- preventScroll: !this.props.scrollOnTableFocus
79
- });
80
- });
81
- _defineProperty(this, "onFocusReset", () => {
82
- this.node?.blur();
83
- });
84
- }
25
+ state = {
26
+ focused: this.props.focused
27
+ };
85
28
  componentDidMount() {
86
29
  const {
87
30
  props: {
@@ -116,6 +59,60 @@ function focusSensorHOC(ComposedComponent) {
116
59
  document.removeEventListener('focus', this.onFocusCapture, true);
117
60
  document.removeEventListener('blur', this.onBlurCapture, true);
118
61
  }
62
+ node;
63
+ _skipNextCapture = false;
64
+ onRefUpdate = node => {
65
+ if (node) {
66
+ this.node = node;
67
+ }
68
+ };
69
+ onFocusCapture = _ref2 => {
70
+ let {
71
+ target
72
+ } = _ref2;
73
+ if (this._skipNextCapture) {
74
+ this._skipNextCapture = false;
75
+ return;
76
+ }
77
+ const focused = target instanceof Node && this.node?.contains(target);
78
+ if (focused && !this.state.focused) {
79
+ this.setState({
80
+ focused: true
81
+ });
82
+ this.props.onFocus?.();
83
+ }
84
+ };
85
+ onBlurCapture = _ref3 => {
86
+ let {
87
+ target
88
+ } = _ref3;
89
+ const {
90
+ state: {
91
+ focused
92
+ },
93
+ node
94
+ } = this;
95
+ if (focused) {
96
+ setTimeout(() => {
97
+ const blurred = target instanceof Node && node?.contains(target) && !node.contains(document.activeElement);
98
+ if (blurred) {
99
+ this.setState({
100
+ focused: false
101
+ });
102
+ this.props.onBlur?.();
103
+ }
104
+ }, 1);
105
+ }
106
+ };
107
+ onFocusRestore = () => {
108
+ this._skipNextCapture = true;
109
+ this.node?.focus({
110
+ preventScroll: !this.props.scrollOnTableFocus
111
+ });
112
+ };
113
+ onFocusReset = () => {
114
+ this.node?.blur();
115
+ };
119
116
  render() {
120
117
  const {
121
118
  autofocus,
@@ -1,9 +1,5 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
-
3
1
  class Listeners {
4
- constructor() {
5
- _defineProperty(this, "_all", new Map());
6
- }
2
+ _all = new Map();
7
3
  trigger() {
8
4
  for (var _len = arguments.length, _ref = new Array(_len), _key = 0; _key < _len; _key++) {
9
5
  _ref[_key] = arguments[_key];
@@ -1,15 +1,11 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { Component } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
 
5
4
  class Renderer extends Component {
6
- constructor() {
7
- super(...arguments);
8
- _defineProperty(this, "node", void 0);
9
- _defineProperty(this, "nodeRef", node => {
10
- this.node = node;
11
- });
12
- }
5
+ static propTypes = {
6
+ className: PropTypes.string,
7
+ nodes: PropTypes.array
8
+ };
13
9
  componentDidMount() {
14
10
  const {
15
11
  nodes
@@ -21,6 +17,10 @@ class Renderer extends Component {
21
17
  nodes.forEach(nodeToRender => fragment.appendChild(nodeToRender));
22
18
  this.node.appendChild(fragment);
23
19
  }
20
+ node;
21
+ nodeRef = node => {
22
+ this.node = node;
23
+ };
24
24
  render() {
25
25
  const {
26
26
  className
@@ -31,9 +31,5 @@ class Renderer extends Component {
31
31
  });
32
32
  }
33
33
  }
34
- _defineProperty(Renderer, "propTypes", {
35
- className: PropTypes.string,
36
- nodes: PropTypes.array
37
- });
38
34
 
39
35
  export { Renderer as default };
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import { createElement } from 'react';
3
2
  import { render } from './react-render-adapter.js';
4
3
  import composeRefs from './composeRefs.js';
@@ -12,10 +11,7 @@ import 'react-dom';
12
11
  */
13
12
  function rerenderHOC(ComposedComponent) {
14
13
  return class Rerenderer extends ComposedComponent {
15
- constructor() {
16
- super(...arguments);
17
- _defineProperty(this, "_propsCache", this.props);
18
- }
14
+ _propsCache = this.props;
19
15
  rerender() {
20
16
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
21
17
  let callback = arguments.length > 1 ? arguments[1] : undefined;
@@ -1,15 +1,13 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
-
3
1
  class RingAngularComponent {
4
2
  static get controller() {
5
3
  return this;
6
4
  }
5
+ $inject = {};
7
6
  constructor() {
8
7
  var _this$constructor$$in;
9
8
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10
9
  args[_key] = arguments[_key];
11
10
  }
12
- _defineProperty(this, "$inject", {});
13
11
  ((_this$constructor$$in = this.constructor.$inject) !== null && _this$constructor$$in !== void 0 ? _this$constructor$$in : []).forEach((injectName, i) => {
14
12
  this.$inject[injectName] = args[i];
15
13
  });