@jetbrains/ring-ui 5.0.107 → 5.0.109

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.
@@ -15,7 +15,7 @@ export declare const LOGOUT_POSTPONED_EVENT = "logoutPostponed";
15
15
  export declare const USER_CHANGE_POSTPONED_EVENT = "changePostponed";
16
16
  export interface AuthUser {
17
17
  guest?: boolean;
18
- id: number | string;
18
+ id: string;
19
19
  name: string;
20
20
  login: string;
21
21
  banned?: boolean;
@@ -5,7 +5,7 @@ export interface HubSourceUsersGroupsOptions {
5
5
  searchSideThreshold: number;
6
6
  }
7
7
  export interface UserGroup extends Item {
8
- id: number;
8
+ id: string;
9
9
  total?: number;
10
10
  userCount: number;
11
11
  iconUrl?: string;
@@ -295,7 +295,7 @@ Popup.propTypes = {
295
295
  autoCorrectTopOverflow: PropTypes.bool,
296
296
  left: PropTypes.number,
297
297
  top: PropTypes.number,
298
- maxHeight: PropTypes.number,
298
+ maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
299
299
  minWidth: PropTypes.number,
300
300
  sidePadding: PropTypes.number,
301
301
  attached: PropTypes.bool,
@@ -9,6 +9,7 @@ export interface TabsProps extends Omit<CollapsibleTabsProps, 'onSelect' | 'chil
9
9
  children: Children;
10
10
  onSelect: (key: string) => void;
11
11
  className?: string | null | undefined;
12
+ tabContainerClassName?: string | null | undefined;
12
13
  autoCollapse?: boolean | null | undefined;
13
14
  'data-test'?: string | null | undefined;
14
15
  }
@@ -16,6 +17,7 @@ declare class Tabs extends PureComponent<TabsProps> {
16
17
  static propTypes: {
17
18
  selected: PropTypes.Requireable<string>;
18
19
  className: PropTypes.Requireable<string>;
20
+ tabContainerClassName: PropTypes.Requireable<string>;
19
21
  href: PropTypes.Requireable<string>;
20
22
  children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
21
23
  onSelect: PropTypes.Requireable<(...args: any[]) => any>;
@@ -12,6 +12,7 @@ class Tabs extends PureComponent {
12
12
  static propTypes = {
13
13
  selected: PropTypes.string,
14
14
  className: PropTypes.string,
15
+ tabContainerClassName: PropTypes.string,
15
16
  href: PropTypes.string,
16
17
  children: PropTypes.node.isRequired,
17
18
  onSelect: PropTypes.func,
@@ -36,7 +37,7 @@ class Tabs extends PureComponent {
36
37
  return (<TabLink title={title} isSelected={isSelected} key={key} href={href} innerClassName={titleClasses} className={titleClasses} disabled={disabled} onPlainLeftClick={this.handleSelect(key)} {...titleProps}/>);
37
38
  };
38
39
  render() {
39
- const { className, children, selected, autoCollapse, 'data-test': dataTest, ...restProps } = this.props;
40
+ const { className, tabContainerClassName, children, selected, autoCollapse, 'data-test': dataTest, ...restProps } = this.props;
40
41
  const classes = classNames(styles.tabs, className);
41
42
  const childrenArray = React.Children.toArray(children).
42
43
  filter(Boolean);
@@ -46,7 +47,7 @@ class Tabs extends PureComponent {
46
47
  : (<div className={styles.titles}>
47
48
  {childrenArray.map(this.getTabTitle)}
48
49
  </div>)}
49
- <div className={styles.tab}>
50
+ <div className={classNames(tabContainerClassName)}>
50
51
  {childrenArray.find(({ props }, i) => (props.id || String(i)) === selected)}
51
52
  </div>
52
53
  </div>);
@@ -2,7 +2,6 @@ import React, { 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 styles from './tabs.css';
6
5
  export default class Tab extends PureComponent {
7
6
  static propTypes = {
8
7
  title: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
@@ -13,7 +12,8 @@ export default class Tab extends PureComponent {
13
12
  };
14
13
  render() {
15
14
  const { className, children, 'data-test': dataTest } = this.props;
16
- const classes = classNames(styles.tab, className);
17
- return (<div data-test={dataTests('ring-tab', dataTest)} className={classes}>{children}</div>);
15
+ return (<div data-test={dataTests('ring-tab', dataTest)} className={classNames(className)}>
16
+ {children}
17
+ </div>);
18
18
  }
19
19
  }
@@ -15,7 +15,7 @@ export declare const LOGOUT_POSTPONED_EVENT = "logoutPostponed";
15
15
  export declare const USER_CHANGE_POSTPONED_EVENT = "changePostponed";
16
16
  export interface AuthUser {
17
17
  guest?: boolean;
18
- id: number | string;
18
+ id: string;
19
19
  name: string;
20
20
  login: string;
21
21
  banned?: boolean;
@@ -5,7 +5,7 @@ export interface HubSourceUsersGroupsOptions {
5
5
  searchSideThreshold: number;
6
6
  }
7
7
  export interface UserGroup extends Item {
8
- id: number;
8
+ id: string;
9
9
  total?: number;
10
10
  userCount: number;
11
11
  iconUrl?: string;
@@ -5,11 +5,11 @@ const MAJOR_VERSION_INDEX = 0;
5
5
  /**
6
6
  * SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
7
7
  */
8
- if (!["and_chr 109", "and_uc 13.4", "chrome 108", "chrome 107", "edge 108", "edge 107", "firefox 107", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "safari 15.6", "samsung 19.0"]) {
8
+ if (!["and_chr 109", "chrome 109", "chrome 108", "edge 109", "edge 108", "firefox 108", "ios_saf 16.2", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "op_mini all", "safari 15.6", "samsung 19.0"]) {
9
9
  // eslint-disable-next-line no-console
10
10
  console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
11
11
  }
12
- const SUPPORTED = ["and_chr 109", "and_uc 13.4", "chrome 108", "chrome 107", "edge 108", "edge 107", "firefox 107", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "safari 15.6", "samsung 19.0"] || [];
12
+ const SUPPORTED = ["and_chr 109", "chrome 109", "chrome 108", "edge 109", "edge 108", "firefox 108", "ios_saf 16.2", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "op_mini all", "safari 15.6", "samsung 19.0"] || [];
13
13
  const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
14
14
  const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
15
15
  var _item$match;
@@ -338,7 +338,7 @@ Popup.propTypes = {
338
338
  autoCorrectTopOverflow: PropTypes.bool,
339
339
  left: PropTypes.number,
340
340
  top: PropTypes.number,
341
- maxHeight: PropTypes.number,
341
+ maxHeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
342
342
  minWidth: PropTypes.number,
343
343
  sidePadding: PropTypes.number,
344
344
  attached: PropTypes.bool,