@jetbrains/ring-ui 6.0.34 → 6.0.36

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 (294) hide show
  1. package/babel.config.js +4 -1
  2. package/components/alert/alert.css +0 -7
  3. package/components/alert/alert.d.ts +2 -1
  4. package/components/alert/alert.js +2 -1
  5. package/components/alert/container.d.ts +2 -2
  6. package/components/alert/container.js +1 -1
  7. package/components/alert-service/alert-service.d.ts +2 -2
  8. package/components/alert-service/alert-service.js +0 -1
  9. package/components/auth/down-notification.d.ts +1 -1
  10. package/components/auth/down-notification.js +1 -1
  11. package/components/auth/iframe-flow.js +0 -1
  12. package/components/auth-dialog/auth-dialog.d.ts +2 -2
  13. package/components/auth-dialog/auth-dialog.js +1 -1
  14. package/components/auth-dialog-service/auth-dialog-service.js +0 -1
  15. package/components/avatar/avatar.d.ts +2 -2
  16. package/components/avatar/avatar.js +1 -1
  17. package/components/avatar/fallback-avatar.d.ts +2 -2
  18. package/components/avatar/fallback-avatar.js +1 -1
  19. package/components/badge/badge.d.ts +2 -2
  20. package/components/badge/badge.js +1 -1
  21. package/components/breadcrumbs/breadcrumbs.css +7 -0
  22. package/components/breadcrumbs/breadcrumbs.d.ts +6 -0
  23. package/components/breadcrumbs/breadcrumbs.js +11 -0
  24. package/components/button/button.d.ts +2 -1
  25. package/components/button/button.js +2 -1
  26. package/components/button-group/button-group.css +12 -11
  27. package/components/button-group/button-group.d.ts +4 -2
  28. package/components/button-group/button-group.js +9 -3
  29. package/components/button-group/caption.d.ts +2 -2
  30. package/components/button-group/caption.js +1 -1
  31. package/components/button-set/button-set.d.ts +2 -2
  32. package/components/button-set/button-set.js +1 -1
  33. package/components/button-toolbar/button-toolbar.d.ts +2 -2
  34. package/components/button-toolbar/button-toolbar.js +1 -1
  35. package/components/checkbox/checkbox.css +16 -20
  36. package/components/checkbox/checkbox.d.ts +3 -2
  37. package/components/checkbox/checkbox.js +12 -6
  38. package/components/code/code.d.ts +3 -3
  39. package/components/code/code.js +1 -1
  40. package/components/collapse/collapse-content.d.ts +2 -1
  41. package/components/collapse/collapse-content.js +2 -1
  42. package/components/collapse/collapse-control.d.ts +1 -1
  43. package/components/collapse/collapse-control.js +2 -1
  44. package/components/collapse/collapse.d.ts +2 -1
  45. package/components/collapse/collapse.js +2 -1
  46. package/components/confirm/confirm.d.ts +2 -1
  47. package/components/confirm/confirm.js +2 -1
  48. package/components/confirm-service/confirm-service.js +0 -1
  49. package/components/content-layout/content-layout.d.ts +2 -2
  50. package/components/content-layout/content-layout.js +2 -2
  51. package/components/content-layout/sidebar.d.ts +2 -2
  52. package/components/content-layout/sidebar.js +1 -1
  53. package/components/contenteditable/contenteditable.d.ts +3 -3
  54. package/components/contenteditable/contenteditable.js +1 -1
  55. package/components/control-help/control-help.css +8 -0
  56. package/components/control-help/control-help.d.ts +4 -0
  57. package/components/control-help/control-help.js +5 -0
  58. package/components/control-label/control-label.d.ts +2 -1
  59. package/components/control-label/control-label.js +1 -1
  60. package/components/data-list/data-list.d.ts +11 -11
  61. package/components/data-list/data-list.js +1 -1
  62. package/components/data-list/data-list.mock.d.ts +2 -2
  63. package/components/data-list/data-list.mock.js +0 -2
  64. package/components/data-list/item.d.ts +3 -3
  65. package/components/data-list/item.js +1 -1
  66. package/components/data-list/title.d.ts +3 -3
  67. package/components/data-list/title.js +1 -1
  68. package/components/date-picker/date-input.d.ts +1 -1
  69. package/components/date-picker/date-input.js +1 -1
  70. package/components/date-picker/date-picker.d.ts +2 -1
  71. package/components/date-picker/date-picker.js +2 -1
  72. package/components/date-picker/date-popup.d.ts +2 -1
  73. package/components/date-picker/date-popup.js +2 -1
  74. package/components/date-picker/day.d.ts +2 -2
  75. package/components/date-picker/day.js +1 -1
  76. package/components/date-picker/month-names.d.ts +2 -2
  77. package/components/date-picker/month-names.js +1 -1
  78. package/components/date-picker/month-slider.d.ts +2 -2
  79. package/components/date-picker/month-slider.js +1 -1
  80. package/components/date-picker/month.d.ts +2 -2
  81. package/components/date-picker/month.js +0 -1
  82. package/components/date-picker/months.d.ts +2 -2
  83. package/components/date-picker/months.js +1 -1
  84. package/components/date-picker/weekdays.d.ts +2 -2
  85. package/components/date-picker/weekdays.js +0 -1
  86. package/components/date-picker/years.d.ts +3 -3
  87. package/components/date-picker/years.js +1 -1
  88. package/components/dialog/dialog.d.ts +2 -1
  89. package/components/dialog/dialog.js +2 -1
  90. package/components/dropdown/anchor.d.ts +3 -3
  91. package/components/dropdown/anchor.js +1 -1
  92. package/components/dropdown/dropdown.d.ts +2 -1
  93. package/components/dropdown/dropdown.js +2 -1
  94. package/components/dropdown-menu/dropdown-menu.d.ts +3 -3
  95. package/components/dropdown-menu/dropdown-menu.js +2 -2
  96. package/components/editable-heading/editable-heading.d.ts +2 -1
  97. package/components/editable-heading/editable-heading.js +2 -1
  98. package/components/error-bubble/error-bubble.d.ts +2 -2
  99. package/components/error-bubble/error-bubble.js +1 -1
  100. package/components/error-message/error-message.d.ts +2 -2
  101. package/components/error-message/error-message.js +1 -1
  102. package/components/footer/footer.css +1 -1
  103. package/components/footer/footer.d.ts +2 -2
  104. package/components/footer/footer.js +1 -1
  105. package/components/form/form.css +1 -1
  106. package/components/form/form.stories.js +0 -1
  107. package/components/global/create-stateful-context.d.ts +5 -5
  108. package/components/global/create-stateful-context.js +1 -1
  109. package/components/global/focus-sensor-hoc.js +1 -1
  110. package/components/global/get-event-key.d.ts +1 -1
  111. package/components/global/react-dom-renderer.d.ts +2 -2
  112. package/components/global/react-dom-renderer.js +1 -1
  113. package/components/global/rerender-hoc.d.ts +2 -2
  114. package/components/global/rerender-hoc.js +1 -1
  115. package/components/global/theme.d.ts +3 -3
  116. package/components/global/theme.js +1 -1
  117. package/components/grid/col.d.ts +2 -2
  118. package/components/grid/col.js +1 -1
  119. package/components/grid/grid.d.ts +2 -2
  120. package/components/grid/grid.js +1 -1
  121. package/components/grid/row.d.ts +2 -2
  122. package/components/grid/row.js +1 -1
  123. package/components/group/group.d.ts +2 -2
  124. package/components/group/group.js +1 -1
  125. package/components/header/header.d.ts +2 -2
  126. package/components/header/header.js +1 -1
  127. package/components/header/logo.d.ts +2 -2
  128. package/components/header/logo.js +1 -1
  129. package/components/header/profile.d.ts +4 -3
  130. package/components/header/profile.js +2 -1
  131. package/components/header/services-link.d.ts +2 -2
  132. package/components/header/services-link.js +1 -1
  133. package/components/header/services.d.ts +2 -2
  134. package/components/header/services.js +1 -1
  135. package/components/header/smart-profile.d.ts +2 -2
  136. package/components/header/smart-profile.js +1 -1
  137. package/components/header/smart-services.d.ts +2 -2
  138. package/components/header/smart-services.js +1 -1
  139. package/components/header/tray-icon.d.ts +2 -2
  140. package/components/header/tray-icon.js +1 -1
  141. package/components/header/tray.d.ts +2 -2
  142. package/components/header/tray.js +1 -1
  143. package/components/heading/heading.d.ts +6 -6
  144. package/components/heading/heading.js +1 -1
  145. package/components/http/http.mock.js +1 -0
  146. package/components/i18n/i18n-context.d.ts +1 -1
  147. package/components/i18n/i18n-context.js +2 -1
  148. package/components/icon/icon.d.ts +2 -2
  149. package/components/icon/icon.js +1 -1
  150. package/components/icon/icon__svg.d.ts +3 -3
  151. package/components/icon/icon__svg.js +1 -1
  152. package/components/input/input.css +5 -1
  153. package/components/input/input.d.ts +3 -2
  154. package/components/input/input.js +8 -6
  155. package/components/input-size/input-size.stories.js +0 -1
  156. package/components/island/adaptive-island-hoc.d.ts +11 -11
  157. package/components/island/adaptive-island-hoc.js +1 -1
  158. package/components/island/content.d.ts +3 -3
  159. package/components/island/content.js +1 -1
  160. package/components/island/header.d.ts +2 -2
  161. package/components/island/header.js +1 -1
  162. package/components/island/island.css +1 -1
  163. package/components/island/island.d.ts +10 -10
  164. package/components/island/island.js +1 -1
  165. package/components/island-legacy/content-legacy.d.ts +2 -2
  166. package/components/island-legacy/content-legacy.js +1 -1
  167. package/components/island-legacy/header-legacy.d.ts +2 -2
  168. package/components/island-legacy/header-legacy.js +1 -1
  169. package/components/island-legacy/island-legacy.d.ts +2 -2
  170. package/components/island-legacy/island-legacy.js +1 -1
  171. package/components/link/clickableLink.d.ts +2 -1
  172. package/components/link/clickableLink.js +2 -1
  173. package/components/link/link.d.ts +15 -15
  174. package/components/link/link.js +1 -1
  175. package/components/list/consts.d.ts +2 -1
  176. package/components/list/list.d.ts +10 -10
  177. package/components/list/list.js +1 -1
  178. package/components/list/list__custom.d.ts +2 -1
  179. package/components/list/list__custom.js +2 -1
  180. package/components/list/list__hint.d.ts +2 -2
  181. package/components/list/list__hint.js +1 -1
  182. package/components/list/list__item.d.ts +2 -2
  183. package/components/list/list__item.js +2 -2
  184. package/components/list/list__link.d.ts +2 -2
  185. package/components/list/list__link.js +1 -1
  186. package/components/list/list__separator.d.ts +2 -2
  187. package/components/list/list__separator.js +1 -1
  188. package/components/list/list__title.d.ts +2 -2
  189. package/components/list/list__title.js +1 -1
  190. package/components/loader/loader.d.ts +2 -2
  191. package/components/loader/loader.js +1 -1
  192. package/components/loader-inline/loader-inline.d.ts +2 -2
  193. package/components/loader-inline/loader-inline.js +1 -1
  194. package/components/loader-screen/loader-screen.d.ts +2 -2
  195. package/components/loader-screen/loader-screen.js +1 -1
  196. package/components/login-dialog/login-dialog.d.ts +2 -2
  197. package/components/login-dialog/login-dialog.js +1 -1
  198. package/components/login-dialog/service.js +0 -1
  199. package/components/markdown/markdown.d.ts +2 -2
  200. package/components/markdown/markdown.js +1 -1
  201. package/components/message/message.d.ts +2 -2
  202. package/components/message/message.js +1 -1
  203. package/components/pager/pager.d.ts +2 -1
  204. package/components/pager/pager.js +2 -1
  205. package/components/panel/panel.d.ts +2 -2
  206. package/components/panel/panel.js +1 -1
  207. package/components/popup/popup.d.ts +2 -1
  208. package/components/popup/popup.js +2 -1
  209. package/components/popup/popup.target.d.ts +3 -3
  210. package/components/popup/popup.target.js +1 -1
  211. package/components/popup-menu/popup-menu.d.ts +2 -2
  212. package/components/popup-menu/popup-menu.js +0 -1
  213. package/components/progress-bar/progress-bar.d.ts +2 -2
  214. package/components/progress-bar/progress-bar.js +1 -1
  215. package/components/query-assist/query-assist.d.ts +3 -2
  216. package/components/query-assist/query-assist.js +4 -3
  217. package/components/query-assist/query-assist__suggestions.d.ts +2 -2
  218. package/components/query-assist/query-assist__suggestions.js +0 -1
  219. package/components/radio/radio.d.ts +3 -3
  220. package/components/radio/radio.js +1 -1
  221. package/components/radio/radio__item.d.ts +9 -6
  222. package/components/radio/radio__item.js +10 -6
  223. package/components/select/select-popup.css +1 -0
  224. package/components/select/select.css +1 -1
  225. package/components/select/select.d.ts +5 -2
  226. package/components/select/select.js +5 -3
  227. package/components/select/select__filter.d.ts +2 -2
  228. package/components/select/select__filter.js +1 -1
  229. package/components/select/select__popup.d.ts +6 -4
  230. package/components/select/select__popup.js +4 -3
  231. package/components/shortcuts/core.d.ts +0 -1
  232. package/components/shortcuts/shortcuts-hoc.d.ts +8 -8
  233. package/components/shortcuts/shortcuts-hoc.js +2 -2
  234. package/components/slider/slider.d.ts +2 -1
  235. package/components/slider/slider.js +2 -1
  236. package/components/tab-trap/tab-trap.d.ts +2 -1
  237. package/components/tab-trap/tab-trap.js +2 -1
  238. package/components/table/cell.d.ts +2 -2
  239. package/components/table/cell.js +1 -1
  240. package/components/table/disable-hover-hoc.d.ts +9 -9
  241. package/components/table/disable-hover-hoc.js +1 -1
  242. package/components/table/header-cell.d.ts +2 -2
  243. package/components/table/header-cell.js +1 -1
  244. package/components/table/header.d.ts +3 -3
  245. package/components/table/header.js +1 -1
  246. package/components/table/multitable.d.ts +2 -2
  247. package/components/table/multitable.js +1 -1
  248. package/components/table/row-with-focus-sensor.d.ts +3 -3
  249. package/components/table/row-with-focus-sensor.js +1 -1
  250. package/components/table/row.d.ts +2 -1
  251. package/components/table/row.js +2 -1
  252. package/components/table/selection-shortcuts-hoc.js +1 -1
  253. package/components/table/smart-table.d.ts +44 -44
  254. package/components/table/smart-table.js +1 -1
  255. package/components/table/table.d.ts +2 -1
  256. package/components/table/table.js +2 -1
  257. package/components/table-legacy/table-legacy.css +1 -1
  258. package/components/tabs/collapsible-more.d.ts +4 -4
  259. package/components/tabs/collapsible-more.js +8 -8
  260. package/components/tabs/collapsible-tab.d.ts +2 -1
  261. package/components/tabs/collapsible-tab.js +1 -1
  262. package/components/tabs/collapsible-tabs.d.ts +4 -4
  263. package/components/tabs/collapsible-tabs.js +14 -14
  264. package/components/tabs/dumb-tabs.d.ts +2 -1
  265. package/components/tabs/dumb-tabs.js +2 -1
  266. package/components/tabs/smart-tabs.d.ts +2 -2
  267. package/components/tabs/smart-tabs.js +1 -1
  268. package/components/tabs/tab-link.d.ts +3 -3
  269. package/components/tabs/tab-link.js +1 -1
  270. package/components/tabs/tab.d.ts +2 -2
  271. package/components/tabs/tab.js +1 -1
  272. package/components/tag/tag.d.ts +2 -1
  273. package/components/tag/tag.js +2 -1
  274. package/components/tags-input/tags-input.d.ts +3 -2
  275. package/components/tags-input/tags-input.js +2 -1
  276. package/components/tags-list/tags-list.d.ts +2 -1
  277. package/components/tags-list/tags-list.js +2 -1
  278. package/components/text/text.d.ts +2 -2
  279. package/components/text/text.js +1 -1
  280. package/components/toggle/toggle.d.ts +2 -2
  281. package/components/toggle/toggle.js +1 -1
  282. package/components/tooltip/tooltip.d.ts +2 -1
  283. package/components/tooltip/tooltip.js +2 -1
  284. package/components/user-agreement/service.js +2 -3
  285. package/components/user-agreement/user-agreement.d.ts +2 -2
  286. package/components/user-agreement/user-agreement.js +1 -1
  287. package/components/user-card/card.d.ts +2 -1
  288. package/components/user-card/card.js +2 -1
  289. package/components/user-card/smart-user-card-tooltip.d.ts +3 -3
  290. package/components/user-card/smart-user-card-tooltip.js +1 -1
  291. package/components/user-card/tooltip.d.ts +3 -3
  292. package/components/user-card/tooltip.js +1 -1
  293. package/components/user-card/user-card.css +1 -1
  294. package/package.json +27 -26
package/babel.config.js CHANGED
@@ -8,7 +8,10 @@ module.exports = function config(api) {
8
8
  ['@jetbrains/babel-preset-jetbrains', {
9
9
  typeScript: true,
10
10
  useBuiltIns: 'usage',
11
- corejs: '3'
11
+ corejs: '3',
12
+ react: {
13
+ runtime: 'automatic'
14
+ }
12
15
  }]
13
16
  ],
14
17
  plugins: [
@@ -1,6 +1,5 @@
1
1
  @import "../global/variables.css";
2
2
 
3
- @value link from "../link/link.css";
4
3
  @value animation-duration: 300ms;
5
4
  @value animation-easing: ease-out;
6
5
 
@@ -57,12 +56,6 @@
57
56
 
58
57
  line-height: 20px;
59
58
 
60
- & :global(.ring-link),
61
- /* This link styles are used in link.css */
62
- & .link {
63
- color: var(--ring-main-color);
64
- }
65
-
66
59
  &.withCloseButton {
67
60
  margin-right: calc(var(--ring-unit) * 5);
68
61
  }
@@ -1,4 +1,5 @@
1
- import React, { PureComponent, ReactNode } from 'react';
1
+ import { PureComponent, ReactNode } from 'react';
2
+ import * as React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Theme from '../global/theme';
4
5
  export declare const ANIMATION_TIME = 500;
@@ -1,4 +1,5 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
+ import * as React from 'react';
2
3
  import classNames from 'classnames';
3
4
  import PropTypes from 'prop-types';
4
5
  import exceptionIcon from '@jetbrains/icons/exception';
@@ -1,4 +1,4 @@
1
- import React, { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, HTMLAttributes } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  /**
4
4
  * @name Alert Container
@@ -11,5 +11,5 @@ export default class Alerts extends PureComponent<AlertContainerProps> {
11
11
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
12
  className: PropTypes.Requireable<string>;
13
13
  };
14
- render(): React.ReactPortal | null;
14
+ render(): import("react").ReactPortal | null;
15
15
  }
@@ -1,4 +1,4 @@
1
- import React, { Children, cloneElement, PureComponent, isValidElement } from 'react';
1
+ import { Children, cloneElement, PureComponent, isValidElement } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import classNames from 'classnames';
4
4
  import PropTypes from 'prop-types';
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, Ref } from 'react';
1
+ import { ReactNode, Ref } from 'react';
2
2
  import Alert, { AlertProps, AlertType } from '../alert/alert';
3
3
  export interface AlertItem extends Partial<Omit<AlertProps, 'children'>> {
4
4
  key: string | number;
@@ -14,7 +14,7 @@ declare class AlertService {
14
14
  containerElement: HTMLDivElement;
15
15
  reactRoot: import("react-dom/client").Root;
16
16
  _getShowingAlerts(): AlertItem[];
17
- renderAlertContainer(alerts: readonly AlertItem[]): React.JSX.Element;
17
+ renderAlertContainer(alerts: readonly AlertItem[]): import("react").JSX.Element;
18
18
  /**
19
19
  * Renders alert container into virtual node to skip maintaining container
20
20
  */
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { createRoot } from 'react-dom/client';
3
2
  import getUID from '../global/get-uid';
4
3
  import Alert, { ANIMATION_TIME, Container as AlertContainer } from '../alert/alert';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  export interface BackendDownTranslations {
3
3
  backendIsNotAvailable: string;
4
4
  checkAgain: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import alertService from '../alert-service/alert-service';
4
4
  import Alert from '../alert/alert';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import loginDialogService from '../login-dialog/service';
3
2
  import Link from '../link/link';
4
3
  import AuthResponseParser from './response-parser';
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  /**
4
4
  * @name Auth Dialog
@@ -56,5 +56,5 @@ export default class AuthDialog extends Component<AuthDialogProps> {
56
56
  componentWillUnmount(): void;
57
57
  onEscPress: () => void;
58
58
  onRetryPress: () => Promise<void>;
59
- render(): React.JSX.Element;
59
+ render(): import("react").JSX.Element;
60
60
  }
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import { Content } from '../island/island';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { createRoot } from 'react-dom/client';
3
2
  import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height';
4
3
  import AuthDialog from '../auth-dialog/auth-dialog';
@@ -1,4 +1,4 @@
1
- import React, { PureComponent, ImgHTMLAttributes } from 'react';
1
+ import { PureComponent, ImgHTMLAttributes } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  /**
4
4
  * @name Avatar
@@ -47,6 +47,6 @@ export default class Avatar extends PureComponent<AvatarProps> {
47
47
  };
48
48
  handleError: () => void;
49
49
  handleSuccess: () => void;
50
- render(): React.JSX.Element;
50
+ render(): import("react").JSX.Element;
51
51
  }
52
52
  export type AvatarAttrs = JSX.LibraryManagedAttributes<typeof Avatar, AvatarProps>;
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import { encodeURL, isDataURI, parseQueryString } from '../global/url';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
3
  import { Size } from './avatar';
4
4
  export interface FallbackAvatarProps {
@@ -6,7 +6,7 @@ export interface FallbackAvatarProps {
6
6
  size: Size;
7
7
  round: boolean | null | undefined;
8
8
  }
9
- declare function FallbackAvatar({ username, size, round }: FallbackAvatarProps): React.JSX.Element;
9
+ declare function FallbackAvatar({ username, size, round }: FallbackAvatarProps): import("react").JSX.Element;
10
10
  declare namespace FallbackAvatar {
11
11
  var propTypes: {
12
12
  username: PropTypes.Validator<string>;
@@ -1,4 +1,4 @@
1
- import React, { useMemo } from 'react';
1
+ import { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import getUID from '../global/get-uid';
4
4
  const colorPairs = [
@@ -1,4 +1,4 @@
1
- import React, { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, HTMLAttributes } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export interface BadgeProps extends HTMLAttributes<HTMLElement> {
4
4
  gray?: boolean | null | undefined;
@@ -20,5 +20,5 @@ export default class Badge extends PureComponent<BadgeProps> {
20
20
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
21
21
  'data-test': PropTypes.Requireable<string>;
22
22
  };
23
- render(): React.JSX.Element;
23
+ render(): import("react").JSX.Element;
24
24
  }
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import dataTests from '../global/data-tests';
@@ -0,0 +1,7 @@
1
+ .separator {
2
+ margin: 0 var(--ring-unit);
3
+
4
+ color: var(--ring-borders-color);
5
+
6
+ font-size: 16px;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export interface BreadcrumbsSeparatorAttrs {
3
+ separatorClassName?: string | null | undefined;
4
+ children?: ReactNode;
5
+ }
6
+ export default function Breadcrumbs({ separatorClassName, children }: BreadcrumbsSeparatorAttrs): import("react").JSX.Element[];
@@ -0,0 +1,11 @@
1
+ import classNames from 'classnames';
2
+ import { Children, Fragment } from 'react';
3
+ import styles from './breadcrumbs.css';
4
+ export default function Breadcrumbs({ separatorClassName, children }) {
5
+ return Children.toArray(children).map((child, index) => (
6
+ // eslint-disable-next-line react/no-array-index-key
7
+ <Fragment key={index}>
8
+ {index > 0 && <span className={classNames(styles.separator, separatorClassName)}>{'/'}</span>}
9
+ {child}
10
+ </Fragment>));
11
+ }
@@ -1,4 +1,5 @@
1
- import React, { PureComponent, ButtonHTMLAttributes } from 'react';
1
+ import { PureComponent, ButtonHTMLAttributes } from 'react';
2
+ import * as React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import { IconProps, IconType, Size } from '../icon/icon';
4
5
  import { ClickableLinkProps } from '../link/clickableLink';
@@ -1,4 +1,5 @@
1
- import React, { createRef, PureComponent } from 'react';
1
+ import { createRef, PureComponent } from 'react';
2
+ import * as React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import classNames from 'classnames';
4
5
  import chevronDown from '@jetbrains/icons/chevron-10px';
@@ -40,7 +40,7 @@
40
40
  .buttonGroup .button[disabled] {
41
41
  --ring-button-group-button-border-color: var(--ring-border-disabled-color);
42
42
 
43
- /* stylelint-disable-next-line selector-max-specificity */
43
+ /* stylelint-disable selector-max-specificity */
44
44
  &::before,
45
45
  &::after {
46
46
  position: absolute;
@@ -57,15 +57,14 @@
57
57
  box-shadow: 0 1px var(--ring-border-disabled-color) inset, 0 -1px var(--ring-border-disabled-color) inset;
58
58
  }
59
59
 
60
- /* stylelint-disable-next-line selector-max-specificity */
61
60
  &::before {
62
61
  left: calc(var(--ring-border-radius) * -1);
63
62
  }
64
63
 
65
- /* stylelint-disable-next-line selector-max-specificity */
66
64
  &::after {
67
65
  right: calc(var(--ring-border-radius) * -1);
68
66
  }
67
+ /* stylelint-enable */
69
68
  }
70
69
 
71
70
  .buttonGroup > .button:first-child,
@@ -102,36 +101,32 @@
102
101
  }
103
102
  }
104
103
 
105
- /* stylelint-disable-next-line selector-max-specificity */
104
+ /* stylelint-disable selector-max-specificity */
106
105
  .buttonGroup .button.button:hover:not(:disabled),
107
- /* stylelint-disable-next-line selector-max-specificity */
108
106
  .buttonGroup .button.button:active:not(:disabled) {
109
107
  border-radius: var(--ring-border-radius);
110
108
  box-shadow: button-shadow var(--ring-border-hover-color);
111
109
  }
112
110
 
113
- /* stylelint-disable-next-line selector-max-specificity */
114
111
  .buttonGroup .button.button:focus-visible {
115
112
  border-radius: var(--ring-border-radius);
116
113
  box-shadow: button-shadow var(--ring-border-hover-color), 0 0 0 1px var(--ring-border-hover-color);
117
114
  }
118
115
 
119
- /* stylelint-disable-next-line selector-max-specificity */
120
116
  .buttonGroup .button.button.active {
121
117
  border-radius: var(--ring-border-radius);
122
118
  box-shadow: button-shadow var(--ring-main-color);
123
119
  }
124
120
 
125
- /* stylelint-disable-next-line selector-max-specificity */
126
121
  .buttonGroup .button:focus-visible.active {
127
122
  border-radius: var(--ring-border-radius);
128
123
  box-shadow: button-shadow var(--ring-main-color), 0 0 0 1px var(--ring-border-hover-color);
129
124
  }
130
125
 
131
- /* stylelint-disable-next-line selector-max-specificity */
132
126
  .buttonGroup .button.active[disabled] {
133
127
  box-shadow: button-shadow var(--ring-border-selected-disabled-color);
134
128
  }
129
+ /* stylelint-enable */
135
130
 
136
131
  .split {
137
132
  composes: common;
@@ -172,13 +167,14 @@
172
167
  border-bottom-left-radius: var(--ring-border-radius);
173
168
  }
174
169
 
175
- /* stylelint-disable-next-line selector-max-specificity */
170
+ /* stylelint-disable selector-max-specificity */
176
171
  .common > button:first-child > div:first-child,
177
172
  .common > .button:first-child > div:first-child,
178
173
  .common > :first-child .button > div:first-child {
179
174
  border-top-right-radius: 0;
180
175
  border-bottom-right-radius: 0;
181
176
  }
177
+ /* stylelint-enable */
182
178
 
183
179
  .common > .button:last-child,
184
180
  .common > button:last-child,
@@ -187,13 +183,14 @@
187
183
  border-bottom-right-radius: var(--ring-border-radius);
188
184
  }
189
185
 
190
- /* stylelint-disable-next-line selector-max-specificity */
186
+ /* stylelint-disable selector-max-specificity */
191
187
  .common > .button:last-child > div:first-child,
192
188
  .common > button:last-child > div:first-child,
193
189
  .common > :last-child .button > div:first-child {
194
190
  border-top-left-radius: 0;
195
191
  border-bottom-left-radius: 0;
196
192
  }
193
+ /* stylelint-enable */
197
194
 
198
195
  .split .primary:not(:last-child) {
199
196
  margin-right: 1px;
@@ -234,3 +231,7 @@
234
231
  }
235
232
  }
236
233
  }
234
+
235
+ .help {
236
+ margin-top: calc(var(--ring-unit) * 0.5);
237
+ }
@@ -1,9 +1,11 @@
1
- import React, { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, HTMLAttributes, ReactNode } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Caption from './caption';
4
4
  export interface ButtonGroupProps extends HTMLAttributes<HTMLElement> {
5
5
  split?: boolean | null | undefined;
6
6
  'data-test'?: string | null | undefined;
7
+ label?: ReactNode;
8
+ help?: ReactNode;
7
9
  }
8
10
  /**
9
11
  * @name Button Group
@@ -13,6 +15,6 @@ export default class ButtonGroup extends PureComponent<ButtonGroupProps> {
13
15
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
16
  className: PropTypes.Requireable<string>;
15
17
  };
16
- render(): React.JSX.Element;
18
+ render(): import("react").JSX.Element;
17
19
  }
18
20
  export { Caption };
@@ -1,7 +1,9 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import dataTests from '../global/data-tests';
5
+ import ControlLabel from '../control-label/control-label';
6
+ import ControlHelp from '../control-help/control-help';
5
7
  import Caption from './caption';
6
8
  import styles from './button-group.css';
7
9
  /**
@@ -13,9 +15,13 @@ export default class ButtonGroup extends PureComponent {
13
15
  className: PropTypes.string
14
16
  };
15
17
  render() {
16
- const { className, split, 'data-test': dataTest, ...restProps } = this.props;
18
+ const { className, split, 'data-test': dataTest, label, help, ...restProps } = this.props;
17
19
  const classes = classNames(split ? styles.split : styles.buttonGroup, className);
18
- return (<div {...restProps} data-test={dataTests('ring-button-group', dataTest)} className={classes}/>);
20
+ return (<>
21
+ {label && <ControlLabel>{label}</ControlLabel>}
22
+ <div {...restProps} data-test={dataTests('ring-button-group', dataTest)} className={classes}/>
23
+ {help && <ControlHelp className={styles.help}>{help}</ControlHelp>}
24
+ </>);
19
25
  }
20
26
  }
21
27
  export { Caption };
@@ -1,8 +1,8 @@
1
- import React, { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, HTMLAttributes } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export default class Caption extends PureComponent<HTMLAttributes<HTMLElement>> {
4
4
  static propTypes: {
5
5
  className: PropTypes.Requireable<PropTypes.ReactNodeLike>;
6
6
  };
7
- render(): React.JSX.Element;
7
+ render(): import("react").JSX.Element;
8
8
  }
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import styles from './button-group.css';
@@ -1,4 +1,4 @@
1
- import React, { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, HTMLAttributes } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
4
4
  'data-test'?: string | null | undefined;
@@ -12,5 +12,5 @@ export default class ButtonSet extends PureComponent<ButtonSetProps> {
12
12
  className: PropTypes.Requireable<string>;
13
13
  'data-test': PropTypes.Requireable<string>;
14
14
  };
15
- render(): React.JSX.Element;
15
+ render(): import("react").JSX.Element;
16
16
  }
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
4
  import dataTests from '../global/data-tests';
@@ -1,4 +1,4 @@
1
- import React, { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, HTMLAttributes } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
4
4
  'data-test'?: string | null | undefined;
@@ -12,5 +12,5 @@ export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
12
12
  className: PropTypes.Requireable<string>;
13
13
  'data-test': PropTypes.Requireable<string>;
14
14
  };
15
- render(): React.JSX.Element;
15
+ render(): import("react").JSX.Element;
16
16
  }
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import dataTests from '../global/data-tests';
@@ -5,7 +5,8 @@
5
5
  .checkbox {
6
6
  position: relative;
7
7
 
8
- display: inline-block;
8
+ display: inline-flex;
9
+ align-items: baseline;
9
10
 
10
11
  text-align: left;
11
12
 
@@ -79,28 +80,26 @@
79
80
 
80
81
  opacity: 0;
81
82
 
82
- /* stylelint-disable-next-line selector-max-specificity */
83
- &:checked + .cell,
84
- &:indeterminate + .cell {
83
+ /* stylelint-disable selector-max-specificity */
84
+ &:checked + .cellWrapper .cell,
85
+ &:indeterminate + .cellWrapper .cell {
85
86
  border-color: transparent;
86
87
  background-color: var(--ring-main-color);
87
88
  }
88
89
 
89
- /* stylelint-disable-next-line selector-max-specificity */
90
- &:checked + .cell .check {
90
+ &:checked + .cellWrapper .check {
91
91
  opacity: 1;
92
92
  }
93
93
 
94
- &:focus-visible + .cell,
95
- &.focus + .cell {
94
+ &:focus-visible + .cellWrapper .cell,
95
+ &.focus + .cellWrapper .cell {
96
96
  transition: background-color var(--ring-ease);
97
97
 
98
98
  border-color: var(--ring-border-hover-color);
99
99
  box-shadow: 0 0 0 1px var(--ring-border-hover-color);
100
100
  }
101
101
 
102
- /* stylelint-disable-next-line selector-max-specificity */
103
- &:indeterminate + .cell .minus {
102
+ &:indeterminate + .cellWrapper .minus {
104
103
  opacity: 1;
105
104
  }
106
105
 
@@ -108,31 +107,28 @@
108
107
  pointer-events: none;
109
108
  }
110
109
 
111
- /* stylelint-disable-next-line selector-max-specificity */
112
- &[disabled][disabled] + .cell {
110
+ &[disabled][disabled] + .cellWrapper .cell {
113
111
  border-color: var(--ring-border-disabled-color);
114
112
  background-color: var(--ring-disabled-background-color);
115
113
  }
116
114
 
117
- /* stylelint-disable-next-line selector-max-specificity */
118
- &[disabled]:checked + .cell,
119
- &[disabled]:indeterminate + .cell {
115
+ &[disabled]:checked + .cellWrapper .cell,
116
+ &[disabled]:indeterminate + .cellWrapper .cell {
120
117
  border-color: var(--ring-border-selected-disabled-color);
121
118
  background-color: var(--ring-border-selected-disabled-color);
122
119
  }
123
120
 
124
- /* stylelint-disable-next-line selector-max-specificity */
125
- &[disabled]:checked + .cell .check,
126
- &[disabled]:indeterminate + .cell .minus {
121
+ &[disabled]:checked + .cellWrapper .check,
122
+ &[disabled]:indeterminate + .cellWrapper .minus {
127
123
  color: var(--ring-disabled-background-color);
128
124
  }
129
125
 
130
- /* stylelint-disable-next-line selector-max-specificity */
131
- &:indeterminate:indeterminate + .cell .check {
126
+ &:indeterminate:indeterminate + .cellWrapper .check {
132
127
  transition: none;
133
128
 
134
129
  opacity: 0;
135
130
  }
131
+ /* stylelint-enable */
136
132
 
137
133
  &[disabled] ~ .label {
138
134
  color: var(--ring-disabled-color);
@@ -1,4 +1,4 @@
1
- import React, { PureComponent, InputHTMLAttributes, CSSProperties, Ref } from 'react';
1
+ import { PureComponent, InputHTMLAttributes, CSSProperties, Ref, ReactNode } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
4
4
  label?: string | null | undefined;
@@ -8,6 +8,7 @@ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
8
8
  labelClassName?: string | null | undefined;
9
9
  indeterminate: boolean;
10
10
  inputRef?: Ref<HTMLInputElement>;
11
+ help?: ReactNode;
11
12
  }
12
13
  /**
13
14
  * @name Checkbox
@@ -41,5 +42,5 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
41
42
  componentDidUpdate(prevProps: CheckboxProps): void;
42
43
  input?: HTMLInputElement | null;
43
44
  inputRef: (el: HTMLInputElement | null) => void;
44
- render(): React.JSX.Element;
45
+ render(): import("react").JSX.Element;
45
46
  }
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
@@ -6,6 +6,7 @@ import minusIcon from '@jetbrains/icons/remove-12px';
6
6
  import Icon from '../icon/icon';
7
7
  import { refObject } from '../global/prop-types';
8
8
  import composeRefs from '../global/composeRefs';
9
+ import ControlHelp from '../control-help/control-help';
9
10
  import styles from './checkbox.css';
10
11
  /**
11
12
  * @name Checkbox
@@ -55,18 +56,23 @@ export default class Checkbox extends PureComponent {
55
56
  this.input = el;
56
57
  };
57
58
  render() {
58
- const { children, label, className, containerClassName, containerStyle, cellClassName, labelClassName, indeterminate, inputRef, ...restProps } = this.props;
59
+ const { children, label, className, containerClassName, containerStyle, cellClassName, labelClassName, indeterminate, inputRef, help, ...restProps } = this.props;
59
60
  const classes = classNames(styles.input, className);
60
61
  const containerClasses = classNames(styles.checkbox, containerClassName);
61
62
  const cellClasses = classNames(styles.cell, cellClassName);
62
63
  const labelClasses = classNames(styles.label, labelClassName);
63
64
  return (<label className={containerClasses} style={containerStyle} data-test="ring-checkbox">
64
65
  <input {...restProps} data-checked={restProps.checked} ref={composeRefs(this.inputRef, inputRef)} type="checkbox" className={classes}/>
65
- <span className={cellClasses}>
66
- <Icon glyph={checkmarkIcon} className={styles.check}/>
67
- <Icon glyph={minusIcon} className={styles.minus}/>
66
+ <div className={styles.cellWrapper}>
67
+ <span className={cellClasses}>
68
+ <Icon glyph={checkmarkIcon} className={styles.check}/>
69
+ <Icon glyph={minusIcon} className={styles.minus}/>
70
+ </span>
71
+ </div>
72
+ <span className={labelClasses}>
73
+ {label || children}
74
+ {help && <ControlHelp>{help}</ControlHelp>}
68
75
  </span>
69
- <span className={labelClasses}>{label || children}</span>
70
76
  </label>);
71
77
  }
72
78
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="highlight.js" />
2
- import React, { PureComponent, Ref } from 'react';
2
+ import { PureComponent, Ref } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import highlight from 'highlight.js/lib/core';
5
5
  declare function noop(): void;
@@ -37,8 +37,8 @@ export default class Code extends PureComponent<CodeProps> {
37
37
  code?: HTMLElement | null;
38
38
  highlight(): Promise<void>;
39
39
  get codeRef(): HTMLElement | null | undefined;
40
- get initCodeRef(): React.RefObject<HTMLElement> | ((ref: HTMLElement | null) => void);
41
- render(): React.JSX.Element;
40
+ get initCodeRef(): import("react").RefObject<HTMLElement> | ((ref: HTMLElement | null) => void);
41
+ render(): import("react").JSX.Element;
42
42
  }
43
43
  declare const code: (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
44
44
  export { code, highlight };
@@ -1,4 +1,4 @@
1
- import React, { PureComponent } from 'react';
1
+ import { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import highlight from 'highlight.js/lib/core';