@jetbrains/ring-ui 5.1.26 → 5.1.27

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.
@@ -35,10 +35,12 @@ export interface ProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSe
35
35
  showApplyChangedUser?: boolean | null | undefined;
36
36
  onRevertPostponement?: (() => void) | null | undefined;
37
37
  menuProps?: PopupMenuAttrs | null | undefined;
38
+ activeClassName?: string | null | undefined;
38
39
  }
39
40
  export default class Profile extends PureComponent<ProfileProps> {
40
41
  static propTypes: {
41
42
  className: PropTypes.Requireable<string>;
43
+ activeClassName: PropTypes.Requireable<string>;
42
44
  closeOnSelect: PropTypes.Requireable<boolean>;
43
45
  hasUpdates: PropTypes.Requireable<boolean>;
44
46
  loading: PropTypes.Requireable<boolean>;
@@ -12,6 +12,7 @@ const rgItemType = PopupMenu.ListProps.Type.LINK;
12
12
  export default class Profile extends PureComponent {
13
13
  static propTypes = {
14
14
  className: PropTypes.string,
15
+ activeClassName: PropTypes.string,
15
16
  closeOnSelect: PropTypes.bool,
16
17
  hasUpdates: PropTypes.bool,
17
18
  loading: PropTypes.bool,
@@ -63,7 +64,7 @@ export default class Profile extends PureComponent {
63
64
  static contextType = I18nContext;
64
65
  static Size = Size;
65
66
  render() {
66
- const { className, closeOnSelect, hasUpdates, onLogout, user, profileUrl, LinkComponent, onSwitchUser, renderPopupItems, onRevertPostponement, showApplyChangedUser, showName, showLogIn, showLogOut, showSwitchUser, renderGuest, translations, size, round, loading, onLogin, menuProps, ...props } = this.props;
67
+ const { className, activeClassName, closeOnSelect, hasUpdates, onLogout, user, profileUrl, LinkComponent, onSwitchUser, renderPopupItems, onRevertPostponement, showApplyChangedUser, showName, showLogIn, showLogOut, showSwitchUser, renderGuest, translations, size, round, loading, onLogin, menuProps, ...props } = this.props;
67
68
  const { translate } = this.context;
68
69
  if (!user) {
69
70
  return (<div {...props} className={classNames(styles.profileEmpty, className)}>
@@ -114,7 +115,7 @@ export default class Profile extends PureComponent {
114
115
  onClick: onLogout
115
116
  }
116
117
  ].filter(isTruthy);
117
- return (<DropdownMenu {...props} title={user.name} anchor={anchor} data={renderPopupItems(items)} data-test="ring-profile" className={classNames(styles.profile, className)} menuProps={{
118
+ return (<DropdownMenu {...props} title={user.name} anchor={anchor} data={renderPopupItems(items)} data-test="ring-profile" className={classNames(styles.profile, className)} activeClassName={activeClassName} menuProps={{
118
119
  closeOnSelect,
119
120
  left: -2,
120
121
  top: -8,
@@ -35,10 +35,12 @@ export interface ProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSe
35
35
  showApplyChangedUser?: boolean | null | undefined;
36
36
  onRevertPostponement?: (() => void) | null | undefined;
37
37
  menuProps?: PopupMenuAttrs | null | undefined;
38
+ activeClassName?: string | null | undefined;
38
39
  }
39
40
  export default class Profile extends PureComponent<ProfileProps> {
40
41
  static propTypes: {
41
42
  className: PropTypes.Requireable<string>;
43
+ activeClassName: PropTypes.Requireable<string>;
42
44
  closeOnSelect: PropTypes.Requireable<boolean>;
43
45
  hasUpdates: PropTypes.Requireable<boolean>;
44
46
  loading: PropTypes.Requireable<boolean>;
@@ -94,7 +94,7 @@ import '../popup/popup.consts.js';
94
94
  import '../popup/popup.target.js';
95
95
  import '../i18n/i18n.js';
96
96
 
97
- var _excluded = ["className", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showName", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin", "menuProps"];
97
+ var _excluded = ["className", "activeClassName", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showName", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin", "menuProps"];
98
98
  var rgItemType = PopupMenu.ListProps.Type.LINK;
99
99
  var Profile = /*#__PURE__*/function (_PureComponent) {
100
100
  _inherits(Profile, _PureComponent);
@@ -109,6 +109,7 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
109
109
  var _translations$applyCh, _translations$login, _translations$profile, _translations$switchU, _translations$logout;
110
110
  var _this$props = this.props,
111
111
  className = _this$props.className,
112
+ activeClassName = _this$props.activeClassName,
112
113
  closeOnSelect = _this$props.closeOnSelect,
113
114
  hasUpdates = _this$props.hasUpdates,
114
115
  onLogout = _this$props.onLogout,
@@ -189,6 +190,7 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
189
190
  data: renderPopupItems(items),
190
191
  "data-test": "ring-profile",
191
192
  className: classNames(modules_47759f5e.profile, className),
193
+ activeClassName: activeClassName,
192
194
  menuProps: _objectSpread2({
193
195
  closeOnSelect,
194
196
  left: -2,
@@ -202,6 +204,7 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
202
204
  }(PureComponent);
203
205
  _defineProperty(Profile, "propTypes", {
204
206
  className: PropTypes.string,
207
+ activeClassName: PropTypes.string,
205
208
  closeOnSelect: PropTypes.bool,
206
209
  hasUpdates: PropTypes.bool,
207
210
  loading: PropTypes.bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.1.26",
3
+ "version": "5.1.27",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",