@jetbrains/ring-ui-built 6.0.40 → 6.0.42

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 (69) hide show
  1. package/components/_helpers/heading.js +1 -1
  2. package/components/alert/alert.js +1 -1
  3. package/components/alert-service/alert-service.js +1 -1
  4. package/components/auth/auth.js +1 -1
  5. package/components/auth/auth__core.js +1 -1
  6. package/components/auth/down-notification.js +1 -1
  7. package/components/auth/iframe-flow.js +1 -1
  8. package/components/auth/storage.js +1 -1
  9. package/components/auth-dialog/auth-dialog.js +1 -1
  10. package/components/auth-dialog-service/auth-dialog-service.js +1 -1
  11. package/components/badge/badge.js +7 -0
  12. package/components/button/button.js +2 -2
  13. package/components/clipboard/clipboard.js +1 -1
  14. package/components/confirm/confirm.js +1 -1
  15. package/components/confirm-service/confirm-service.js +1 -1
  16. package/components/data-list/data-list.js +0 -1
  17. package/components/data-list/data-list.mock.js +1 -0
  18. package/components/data-list/item.js +0 -1
  19. package/components/date-picker/date-input.d.ts +1 -1
  20. package/components/date-picker/date-input.js +9 -2
  21. package/components/date-picker/date-popup.js +1 -1
  22. package/components/dialog/dialog.js +1 -1
  23. package/components/dropdown/anchor.js +1 -0
  24. package/components/dropdown/dropdown.js +1 -0
  25. package/components/dropdown-menu/dropdown-menu.js +1 -0
  26. package/components/editable-heading/editable-heading.js +1 -1
  27. package/components/form/form.js +1 -1
  28. package/components/header/header.js +2 -1
  29. package/components/header/profile.js +2 -1
  30. package/components/header/services.js +1 -0
  31. package/components/header/smart-profile.js +2 -1
  32. package/components/header/smart-services.js +2 -1
  33. package/components/header/tray-icon.js +1 -1
  34. package/components/heading/heading.d.ts +7 -4
  35. package/components/heading/heading.js +39 -26
  36. package/components/input/input-legacy.js +1 -1
  37. package/components/input/input.js +1 -1
  38. package/components/input-size/input-size.js +1 -1
  39. package/components/login-dialog/login-dialog.js +1 -1
  40. package/components/login-dialog/service.js +1 -1
  41. package/components/message/message.js +1 -1
  42. package/components/pager/pager.js +2 -2
  43. package/components/query-assist/query-assist.js +1 -1
  44. package/components/select/select__filter.js +1 -1
  45. package/components/select/select__popup.js +1 -1
  46. package/components/storage/storage.js +1 -1
  47. package/components/storage/storage__local.js +1 -1
  48. package/components/style.css +1 -1
  49. package/components/tab-trap/tab-trap.js +7 -12
  50. package/components/table/row-with-focus-sensor.js +0 -1
  51. package/components/table/row.js +0 -1
  52. package/components/tabs/collapsible-more.js +1 -0
  53. package/components/tabs/collapsible-tabs.js +1 -0
  54. package/components/tabs/dumb-tabs.js +1 -0
  55. package/components/tabs/smart-tabs.js +1 -0
  56. package/components/tabs/tabs.js +1 -0
  57. package/components/tag/tag.js +9 -2
  58. package/components/tags-list/tags-list.js +2 -2
  59. package/components/text/text.d.ts +1 -0
  60. package/components/text/text.js +4 -2
  61. package/components/toggle/toggle.d.ts +1 -2
  62. package/components/toggle/toggle.js +15 -9
  63. package/components/user-agreement/service.js +1 -1
  64. package/components/user-agreement/user-agreement.js +1 -1
  65. package/components/user-card/card.js +1 -1
  66. package/components/user-card/smart-user-card-tooltip.js +1 -0
  67. package/components/user-card/tooltip.js +1 -0
  68. package/components/user-card/user-card.js +2 -1
  69. package/package.json +2 -2
@@ -83,18 +83,13 @@ var TabTrap = /*#__PURE__*/forwardRef(function TabTrap(_ref, ref) {
83
83
  function restoreFocus() {
84
84
  var previousFocusedNode = previousFocusedNodeRef.current;
85
85
  if (previousFocusedNode instanceof HTMLElement && previousFocusedNode.focus && isNodeInVisiblePartOfPage(previousFocusedNode)) {
86
- // If no delay is added, restoring focus caused by pressing Enter will trigger
87
- // the onClick event on the previousFocusedNode, e.g.
88
- // https://youtrack.jetbrains.com/issue/RG-2450/Anchor-should-be-focused-after-closing-datepicker#focus=Comments-27-10044234.0-0.
89
- setTimeout(function () {
90
- // This is to prevent the focus from being restored the first time
91
- // componentWillUnmount is called in StrictMode.
92
- if (!mountedRef.current) {
93
- previousFocusedNode.focus({
94
- preventScroll: true
95
- });
96
- }
97
- });
86
+ // This is to prevent the focus from being restored the first time
87
+ // componentWillUnmount is called in StrictMode.
88
+ if (!mountedRef.current) {
89
+ previousFocusedNode.focus({
90
+ preventScroll: true
91
+ });
92
+ }
98
93
  }
99
94
  }
100
95
  function focusElement() {
@@ -32,7 +32,6 @@ import 'core-js/modules/es.weak-map.js';
32
32
  import 'core-js/modules/web.dom-collections.iterator.js';
33
33
  import '../control-help/control-help.js';
34
34
  import '../button/button.js';
35
- import '@jetbrains/icons/chevron-10px';
36
35
  import '../link/clickableLink.js';
37
36
  import '../global/controls-height.js';
38
37
  import '../_helpers/button__classes.js';
@@ -33,7 +33,6 @@ import 'core-js/modules/es.weak-map.js';
33
33
  import 'core-js/modules/web.dom-collections.iterator.js';
34
34
  import '../global/prop-types.js';
35
35
  import '../control-help/control-help.js';
36
- import '@jetbrains/icons/chevron-10px';
37
36
  import '../link/clickableLink.js';
38
37
  import '../global/controls-height.js';
39
38
  import '../_helpers/button__classes.js';
@@ -85,6 +85,7 @@ import '../list/consts.js';
85
85
  import '../global/typescript-utils.js';
86
86
  import '../_helpers/anchor.js';
87
87
  import '../button/button.js';
88
+ import '@jetbrains/icons/chevron-down';
88
89
  import '../link/clickableLink.js';
89
90
  import '../global/controls-height.js';
90
91
  import '../_helpers/button__classes.js';
@@ -91,6 +91,7 @@ import '../dropdown/dropdown.js';
91
91
  import '../global/typescript-utils.js';
92
92
  import '../_helpers/anchor.js';
93
93
  import '../button/button.js';
94
+ import '@jetbrains/icons/chevron-down';
94
95
  import '../global/controls-height.js';
95
96
  import '../_helpers/button__classes.js';
96
97
  import './custom-item.js';
@@ -94,6 +94,7 @@ import '../dropdown/dropdown.js';
94
94
  import '../global/typescript-utils.js';
95
95
  import '../_helpers/anchor.js';
96
96
  import '../button/button.js';
97
+ import '@jetbrains/icons/chevron-down';
97
98
  import '../global/controls-height.js';
98
99
  import '../_helpers/button__classes.js';
99
100
  import './collapsible-tab.js';
@@ -93,6 +93,7 @@ import '../dropdown/dropdown.js';
93
93
  import '../global/typescript-utils.js';
94
94
  import '../_helpers/anchor.js';
95
95
  import '../button/button.js';
96
+ import '@jetbrains/icons/chevron-down';
96
97
  import '../global/controls-height.js';
97
98
  import '../_helpers/button__classes.js';
98
99
  import './collapsible-tab.js';
@@ -96,6 +96,7 @@ import '../dropdown/dropdown.js';
96
96
  import '../global/typescript-utils.js';
97
97
  import '../_helpers/anchor.js';
98
98
  import '../button/button.js';
99
+ import '@jetbrains/icons/chevron-down';
99
100
  import '../global/controls-height.js';
100
101
  import '../_helpers/button__classes.js';
101
102
  import './collapsible-tab.js';
@@ -4,11 +4,11 @@ import { PureComponent } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import closeIcon from '@jetbrains/icons/close-12px';
7
+ import deprecate from 'util-deprecate';
7
8
  import Icon from '../icon/icon.js';
8
9
  import { Button } from '../button/button.js';
9
10
  import { ControlsHeight } from '../global/controls-height.js';
10
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
- import 'util-deprecate';
12
12
  import '../icon/icon__constants.js';
13
13
  import '../_helpers/icon__svg.js';
14
14
  import 'core-js/modules/es.regexp.exec.js';
@@ -20,12 +20,16 @@ import 'core-js/modules/es.map.js';
20
20
  import 'core-js/modules/es.object.to-string.js';
21
21
  import 'core-js/modules/es.weak-map.js';
22
22
  import 'core-js/modules/web.dom-collections.iterator.js';
23
- import '@jetbrains/icons/chevron-10px';
23
+ import '@jetbrains/icons/chevron-down';
24
24
  import '../link/clickableLink.js';
25
25
  import '../_helpers/button__classes.js';
26
26
 
27
27
  var modules_2f9be069 = {"max-height":"20px","tag":"tag_rui_5765 resetButton_rui_f295","tagAngled":"tagAngled_rui_5765","light":"light_rui_2ac4","withRemove":"withRemove_rui_5765","container":"container_rui_5765","focused":"focused_rui_5765","content":"content_rui_5765 ellipsis_rui_f295","disabled":"disabled_rui_5765","remove":"remove_rui_5765","removeIcon":"removeIcon_rui_5765","icon":"icon_rui_5765","avatarContainer":"avatarContainer_rui_5765","customIcon":"customIcon_rui_5765","avatarIcon":"avatarIcon_rui_5765"};
28
28
 
29
+ var warnAngled = deprecate(function () {}, 'Tag angled prop is deprecated and will be removed in Ring UI 7.0');
30
+ /**
31
+ * @name Tag
32
+ */
29
33
  var Tag = /*#__PURE__*/function (_PureComponent) {
30
34
  function Tag() {
31
35
  var _this;
@@ -148,6 +152,9 @@ var Tag = /*#__PURE__*/function (_PureComponent) {
148
152
  }, {
149
153
  key: "render",
150
154
  value: function render() {
155
+ if (this.props.angled) {
156
+ warnAngled();
157
+ }
151
158
  var classes = classNames('ring-js-shortcuts', modules_2f9be069.tag, {
152
159
  [modules_2f9be069.focused]: this.state.focused,
153
160
  [modules_2f9be069.disabled]: this.props.disabled,
@@ -7,8 +7,8 @@ import Tag from '../tag/tag.js';
7
7
  import { jsxs } from 'react/jsx-runtime';
8
8
  import 'core-js/modules/es.array.concat.js';
9
9
  import '@jetbrains/icons/close-12px';
10
- import '../icon/icon.js';
11
10
  import 'util-deprecate';
11
+ import '../icon/icon.js';
12
12
  import '../icon/icon__constants.js';
13
13
  import '../_helpers/icon__svg.js';
14
14
  import 'core-js/modules/es.regexp.exec.js';
@@ -21,7 +21,7 @@ import 'core-js/modules/es.object.to-string.js';
21
21
  import 'core-js/modules/es.weak-map.js';
22
22
  import 'core-js/modules/web.dom-collections.iterator.js';
23
23
  import '../button/button.js';
24
- import '@jetbrains/icons/chevron-10px';
24
+ import '@jetbrains/icons/chevron-down';
25
25
  import '../link/clickableLink.js';
26
26
  import '../global/controls-height.js';
27
27
  import '../_helpers/button__classes.js';
@@ -5,6 +5,7 @@ export interface TextProps extends HTMLAttributes<HTMLElement> {
5
5
  info?: boolean | null | undefined;
6
6
  size?: TextSize;
7
7
  'data-test'?: string | null | undefined;
8
+ bold?: boolean | null | undefined;
8
9
  }
9
10
  declare const TextSize: Record<string, TextSize>;
10
11
  /**
@@ -5,9 +5,9 @@ import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
- var modules_78d1bce6 = {"light":"light_rui_2ac4","text":"text_rui_2f31","sizeS":"sizeS_rui_2f31","sizeM":"sizeM_rui_2f31","sizeL":"sizeL_rui_2f31","info":"info_rui_2f31"};
8
+ var modules_78d1bce6 = {"light":"light_rui_2ac4","text":"text_rui_2f31","sizeS":"sizeS_rui_2f31","sizeM":"sizeM_rui_2f31","sizeL":"sizeL_rui_2f31","info":"info_rui_2f31","bold":"bold_rui_2f31"};
9
9
 
10
- var _excluded = ["children", "className", "info", "size"];
10
+ var _excluded = ["children", "className", "info", "size", "bold"];
11
11
  var TextSize = {
12
12
  S: 's',
13
13
  M: 'm',
@@ -30,9 +30,11 @@ var Text = /*#__PURE__*/function (_Component) {
30
30
  className = _this$props.className,
31
31
  info = _this$props.info,
32
32
  size = _this$props.size,
33
+ bold = _this$props.bold,
33
34
  restProps = _objectWithoutProperties(_this$props, _excluded);
34
35
  var classes = classNames(modules_78d1bce6.text, className, {
35
36
  [modules_78d1bce6.info]: info,
37
+ [modules_78d1bce6.bold]: bold,
36
38
  [modules_78d1bce6.sizeS]: size === Text.Size.S,
37
39
  [modules_78d1bce6.sizeM]: size === Text.Size.M,
38
40
  [modules_78d1bce6.sizeL]: size === Text.Size.L
@@ -10,9 +10,9 @@ export declare const Size: {
10
10
  */
11
11
  export interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
12
12
  size: string;
13
- pale?: boolean | null | undefined;
14
13
  leftLabel?: ReactNode;
15
14
  'data-test'?: string | null | undefined;
15
+ help?: ReactNode;
16
16
  }
17
17
  declare class Toggle extends PureComponent<ToggleProps> {
18
18
  static propTypes: {
@@ -24,7 +24,6 @@ declare class Toggle extends PureComponent<ToggleProps> {
24
24
  defaultChecked: PropTypes.Requireable<boolean>;
25
25
  checked: PropTypes.Requireable<boolean>;
26
26
  disabled: PropTypes.Requireable<boolean>;
27
- pale: PropTypes.Requireable<boolean>;
28
27
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
29
28
  onTransitionEnd: PropTypes.Requireable<(...args: any[]) => any>;
30
29
  size: PropTypes.Requireable<string>;
@@ -4,15 +4,16 @@ import { PureComponent } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import joinDataTestAttributes from '../global/data-tests.js';
7
+ import ControlHelp from '../control-help/control-help.js';
7
8
  import { jsxs, jsx } from 'react/jsx-runtime';
8
9
  import 'core-js/modules/es.array.concat.js';
9
10
  import 'core-js/modules/es.array.reduce.js';
10
11
  import 'core-js/modules/es.object.entries.js';
11
12
  import 'core-js/modules/es.object.to-string.js';
12
13
 
13
- var modules_331c5aa7 = {"padding":"2px","duration":"300ms","timing-function":"cubic-bezier(0.23, 1, 0.32, 1)","light":"light_rui_2ac4","toggle":"toggle_rui_21f9","switch":"switch_rui_21f9","disabled":"disabled_rui_21f9","label":"label_rui_21f9","leftLabel":"leftLabel_rui_21f9","switchWrapper":"switchWrapper_rui_21f9","input":"input_rui_21f9","size16":"size16_rui_21f9","size14":"size14_rui_21f9","size20":"size20_rui_21f9","paleSwitch":"paleSwitch_rui_21f9"};
14
+ var modules_331c5aa7 = {"padding":"2px","duration":"300ms","timing-function":"cubic-bezier(0.23, 1, 0.32, 1)","light":"light_rui_2ac4","toggle":"toggle_rui_21f9","switch":"switch_rui_21f9","disabled":"disabled_rui_21f9","label":"label_rui_21f9","leftLabel":"leftLabel_rui_21f9","switchWrapper":"switchWrapper_rui_21f9","input":"input_rui_21f9","size16":"size16_rui_21f9","size14":"size14_rui_21f9","size20":"size20_rui_21f9"};
14
15
 
15
- var _excluded = ["className", "children", "disabled", "pale", "title", "leftLabel", "size", "data-test", "onTransitionEnd"];
16
+ var _excluded = ["className", "children", "disabled", "title", "leftLabel", "size", "data-test", "help", "onTransitionEnd"];
16
17
  var Size = {
17
18
  Size14: modules_331c5aa7.size14,
18
19
  Size16: modules_331c5aa7.size16,
@@ -31,12 +32,12 @@ var Toggle = /*#__PURE__*/function (_PureComponent) {
31
32
  className = _this$props.className,
32
33
  children = _this$props.children,
33
34
  disabled = _this$props.disabled,
34
- pale = _this$props.pale,
35
35
  title = _this$props.title,
36
36
  leftLabel = _this$props.leftLabel,
37
37
  _this$props$size = _this$props.size,
38
38
  size = _this$props$size === void 0 ? Size.Size16 : _this$props$size,
39
39
  dataTest = _this$props['data-test'],
40
+ help = _this$props.help,
40
41
  onTransitionEnd = _this$props.onTransitionEnd,
41
42
  restProps = _objectWithoutProperties(_this$props, _excluded);
42
43
  var classes = classNames(className, size, modules_331c5aa7.toggle, disabled && modules_331c5aa7.disabled);
@@ -44,9 +45,12 @@ var Toggle = /*#__PURE__*/function (_PureComponent) {
44
45
  className: classes,
45
46
  title: title,
46
47
  "data-test": joinDataTestAttributes('ring-toggle', dataTest),
47
- children: [leftLabel && /*#__PURE__*/jsx("span", {
48
+ children: [leftLabel && /*#__PURE__*/jsxs("span", {
48
49
  className: modules_331c5aa7.leftLabel,
49
- children: leftLabel
50
+ children: [leftLabel, help && /*#__PURE__*/jsx(ControlHelp, {
51
+ className: modules_331c5aa7.help,
52
+ children: help
53
+ })]
50
54
  }), /*#__PURE__*/jsxs("span", {
51
55
  className: modules_331c5aa7.switchWrapper,
52
56
  children: [/*#__PURE__*/jsx("input", _objectSpread2(_objectSpread2({
@@ -56,12 +60,15 @@ var Toggle = /*#__PURE__*/function (_PureComponent) {
56
60
  disabled: disabled,
57
61
  className: modules_331c5aa7.input
58
62
  })), /*#__PURE__*/jsx("span", {
59
- className: classNames(modules_331c5aa7.switch, pale && modules_331c5aa7.paleSwitch),
63
+ className: modules_331c5aa7.switch,
60
64
  onTransitionEnd: onTransitionEnd
61
65
  })]
62
- }), children && /*#__PURE__*/jsx("span", {
66
+ }), children && /*#__PURE__*/jsxs("div", {
63
67
  className: modules_331c5aa7.label,
64
- children: children
68
+ children: [children, help && /*#__PURE__*/jsx(ControlHelp, {
69
+ className: modules_331c5aa7.help,
70
+ children: help
71
+ })]
65
72
  })]
66
73
  });
67
74
  }
@@ -76,7 +83,6 @@ _defineProperty(Toggle, "propTypes", {
76
83
  defaultChecked: PropTypes.bool,
77
84
  checked: PropTypes.bool,
78
85
  disabled: PropTypes.bool,
79
- pale: PropTypes.bool,
80
86
  onChange: PropTypes.func,
81
87
  onTransitionEnd: PropTypes.func,
82
88
  size: PropTypes.oneOf(Object.values(Size)),
@@ -54,7 +54,7 @@ import 'core-js/modules/es.set.js';
54
54
  import 'core-js/modules/es.string.split.js';
55
55
  import 'core-js/modules/web.dom-collections.for-each.js';
56
56
  import '../button/button.js';
57
- import '@jetbrains/icons/chevron-10px';
57
+ import '@jetbrains/icons/chevron-down';
58
58
  import '../_helpers/button__classes.js';
59
59
  import '../_helpers/theme.js';
60
60
  import '../popup/popup.target.js';
@@ -49,7 +49,7 @@ import '../global/linear-function.js';
49
49
  import '../_helpers/island.js';
50
50
  import 'element-resize-detector';
51
51
  import '../global/schedule-raf.js';
52
- import '@jetbrains/icons/chevron-10px';
52
+ import '@jetbrains/icons/chevron-down';
53
53
  import '../icon/icon.js';
54
54
  import 'util-deprecate';
55
55
  import '../icon/icon__constants.js';
@@ -49,7 +49,7 @@ import '@jetbrains/icons/warning';
49
49
  import '@jetbrains/icons/close';
50
50
  import '../loader-inline/loader-inline.js';
51
51
  import '../button/button.js';
52
- import '@jetbrains/icons/chevron-10px';
52
+ import '@jetbrains/icons/chevron-down';
53
53
  import '../global/controls-height.js';
54
54
  import '../_helpers/button__classes.js';
55
55
  import 'util-deprecate';
@@ -28,6 +28,7 @@ import 'core-js/modules/es.map.js';
28
28
  import 'core-js/modules/es.weak-map.js';
29
29
  import 'core-js/modules/web.dom-collections.iterator.js';
30
30
  import '../button/button.js';
31
+ import '@jetbrains/icons/chevron-down';
31
32
  import '../link/clickableLink.js';
32
33
  import '../global/controls-height.js';
33
34
  import '../_helpers/button__classes.js';
@@ -27,6 +27,7 @@ import 'core-js/modules/es.map.js';
27
27
  import 'core-js/modules/es.weak-map.js';
28
28
  import 'core-js/modules/web.dom-collections.iterator.js';
29
29
  import '../button/button.js';
30
+ import '@jetbrains/icons/chevron-down';
30
31
  import '../link/clickableLink.js';
31
32
  import '../global/controls-height.js';
32
33
  import '../_helpers/button__classes.js';
@@ -55,7 +55,7 @@ import 'core-js/modules/es.map.js';
55
55
  import 'core-js/modules/es.weak-map.js';
56
56
  import '../loader-inline/loader-inline.js';
57
57
  import '../button/button.js';
58
- import '@jetbrains/icons/chevron-10px';
58
+ import '@jetbrains/icons/chevron-down';
59
59
  import '../global/controls-height.js';
60
60
  import '../_helpers/button__classes.js';
61
61
  import '../_helpers/theme.js';
@@ -84,3 +84,4 @@ import '../i18n/i18n.js';
84
84
  import '../dropdown/dropdown.js';
85
85
  import '../global/typescript-utils.js';
86
86
  import '../_helpers/anchor.js';
87
+ import '@jetbrains/icons/chevron-10px';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui-built",
3
- "version": "6.0.40",
3
+ "version": "6.0.42",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "scripts": {
30
30
  "apply-resolutions": "npx npm-force-resolutions@0.0.10",
31
- "_postinstall": "husky install",
31
+ "_postinstall": "husky",
32
32
  "prepare": "webpack -c .storybook/custom-header/webpack.config.js",
33
33
  "prea11y-audit": "playwright install",
34
34
  "a11y-audit": "test-storybook --url http://localhost:9999",