@jetbrains/ring-ui 5.0.67 → 5.0.68

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.
@@ -8,6 +8,7 @@ export interface ErrorMessageProps {
8
8
  message?: string | null | undefined;
9
9
  description?: string | null | undefined;
10
10
  className?: string | null | undefined;
11
+ 'data-test'?: string | null | undefined;
11
12
  }
12
13
  /**
13
14
  * @name Error Message
@@ -20,6 +21,7 @@ export default class ErrorMessage extends Component<ErrorMessageProps> {
20
21
  description: PropTypes.Requireable<string>;
21
22
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
22
23
  className: PropTypes.Requireable<string>;
24
+ 'data-test': PropTypes.Requireable<string>;
23
25
  };
24
26
  render(): JSX.Element;
25
27
  }
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import Icon from '../icon/icon';
5
5
  import { Size } from '../icon/icon__constants';
6
+ import dataTests from '../global/data-tests';
6
7
  import styles from './error-message.css';
7
8
  /**
8
9
  * @name Error Message
@@ -14,12 +15,13 @@ export default class ErrorMessage extends Component {
14
15
  message: PropTypes.string,
15
16
  description: PropTypes.string,
16
17
  children: PropTypes.node,
17
- className: PropTypes.string
18
+ className: PropTypes.string,
19
+ 'data-test': PropTypes.string
18
20
  };
19
21
  render() {
20
- const { className, icon, code, message, description, children } = this.props;
22
+ const { className, icon, code, message, description, children, 'data-test': dataTest } = this.props;
21
23
  const classes = classNames(styles.errorMessage, className);
22
- return (<div className={classes}>
24
+ return (<div className={classes} data-test={dataTests('ring-error-message', dataTest)}>
23
25
  {icon && (<Icon className={styles.icon} glyph={icon} size={Size.Size64} suppressSizeWarning/>)}
24
26
  <div className={styles.content}>
25
27
  <div className={styles.title}>
@@ -46,6 +46,7 @@ export interface QueryAssistProps {
46
46
  clear?: boolean | null | undefined;
47
47
  className?: string | null | undefined;
48
48
  popupClassName?: string | null | undefined;
49
+ inputClassName?: string | null | undefined;
49
50
  dataSource: (params: QueryAssistRequestParams) => Promise<QueryAssistResponse> | QueryAssistResponse;
50
51
  delay?: number | null | undefined;
51
52
  disabled?: boolean | undefined;
@@ -147,6 +148,10 @@ export default class QueryAssist extends Component<QueryAssistProps> {
147
148
  * Additional class for the popup
148
149
  */
149
150
  popupClassName: PropTypes.Requireable<string>;
151
+ /**
152
+ * Additional class for the input
153
+ */
154
+ inputClassName: PropTypes.Requireable<string>;
150
155
  /**
151
156
  * Data source function
152
157
  */
@@ -89,6 +89,10 @@ export default class QueryAssist extends Component {
89
89
  * Additional class for the popup
90
90
  */
91
91
  popupClassName: PropTypes.string,
92
+ /**
93
+ * Additional class for the input
94
+ */
95
+ inputClassName: PropTypes.string,
92
96
  /**
93
97
  * Data source function
94
98
  */
@@ -769,7 +773,7 @@ export default class QueryAssist extends Component {
769
773
  [styles.withIcon]: (renderGlass && !huge) || renderLoader,
770
774
  [styles.huge]: huge
771
775
  });
772
- const inputClasses = classNames({
776
+ const inputClasses = classNames(this.props.inputClassName, {
773
777
  [`${styles.input} ring-js-shortcuts`]: true,
774
778
  [styles.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
775
779
  [styles.inputGap2]: actions.length === 2,
@@ -8,6 +8,7 @@ export interface ErrorMessageProps {
8
8
  message?: string | null | undefined;
9
9
  description?: string | null | undefined;
10
10
  className?: string | null | undefined;
11
+ 'data-test'?: string | null | undefined;
11
12
  }
12
13
  /**
13
14
  * @name Error Message
@@ -20,6 +21,7 @@ export default class ErrorMessage extends Component<ErrorMessageProps> {
20
21
  description: PropTypes.Requireable<string>;
21
22
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
22
23
  className: PropTypes.Requireable<string>;
24
+ 'data-test': PropTypes.Requireable<string>;
23
25
  };
24
26
  render(): JSX.Element;
25
27
  }
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
  import Icon from '../icon/icon.js';
6
6
  import { Size } from '../icon/icon__constants.js';
7
+ import joinDataTestAttributes from '../global/data-tests.js';
7
8
  import { m as modules_2c5e8509 } from '../_helpers/error-message.js';
8
9
  import 'util-deprecate';
9
10
  import '../_helpers/icon.js';
@@ -21,11 +22,13 @@ class ErrorMessage extends Component {
21
22
  code,
22
23
  message,
23
24
  description,
24
- children
25
+ children,
26
+ 'data-test': dataTest
25
27
  } = this.props;
26
28
  const classes = classNames(modules_2c5e8509.errorMessage, className);
27
29
  return /*#__PURE__*/React.createElement("div", {
28
- className: classes
30
+ className: classes,
31
+ "data-test": joinDataTestAttributes('ring-error-message', dataTest)
29
32
  }, icon && /*#__PURE__*/React.createElement(Icon, {
30
33
  className: modules_2c5e8509.icon,
31
34
  glyph: icon,
@@ -46,7 +49,8 @@ _defineProperty(ErrorMessage, "propTypes", {
46
49
  message: PropTypes.string,
47
50
  description: PropTypes.string,
48
51
  children: PropTypes.node,
49
- className: PropTypes.string
52
+ className: PropTypes.string,
53
+ 'data-test': PropTypes.string
50
54
  });
51
55
 
52
56
  export { ErrorMessage as default };
@@ -46,6 +46,7 @@ export interface QueryAssistProps {
46
46
  clear?: boolean | null | undefined;
47
47
  className?: string | null | undefined;
48
48
  popupClassName?: string | null | undefined;
49
+ inputClassName?: string | null | undefined;
49
50
  dataSource: (params: QueryAssistRequestParams) => Promise<QueryAssistResponse> | QueryAssistResponse;
50
51
  delay?: number | null | undefined;
51
52
  disabled?: boolean | undefined;
@@ -147,6 +148,10 @@ export default class QueryAssist extends Component<QueryAssistProps> {
147
148
  * Additional class for the popup
148
149
  */
149
150
  popupClassName: PropTypes.Requireable<string>;
151
+ /**
152
+ * Additional class for the input
153
+ */
154
+ inputClassName: PropTypes.Requireable<string>;
150
155
  /**
151
156
  * Data source function
152
157
  */
@@ -784,7 +784,7 @@ class QueryAssist extends Component {
784
784
  [modules_da7ab055.withIcon]: renderGlass && !huge || renderLoader,
785
785
  [modules_da7ab055.huge]: huge
786
786
  });
787
- const inputClasses = classNames({
787
+ const inputClasses = classNames(this.props.inputClassName, {
788
788
  [`${modules_da7ab055.input} ring-js-shortcuts`]: true,
789
789
  [modules_da7ab055.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
790
790
  [modules_da7ab055.inputGap2]: actions.length === 2,
@@ -894,6 +894,10 @@ _defineProperty(QueryAssist, "propTypes", {
894
894
  * Additional class for the popup
895
895
  */
896
896
  popupClassName: PropTypes.string,
897
+ /**
898
+ * Additional class for the input
899
+ */
900
+ inputClassName: PropTypes.string,
897
901
  /**
898
902
  * Data source function
899
903
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.0.67",
3
+ "version": "5.0.68",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -78,7 +78,7 @@
78
78
  "@jetbrains/eslint-config": "^5.4.1",
79
79
  "@jetbrains/stylelint-config": "^3.0.2",
80
80
  "@primer/octicons": "^17.9.0",
81
- "@rollup/plugin-babel": "^6.0.2",
81
+ "@rollup/plugin-babel": "^6.0.3",
82
82
  "@rollup/plugin-node-resolve": "^15.0.1",
83
83
  "@rollup/plugin-replace": "^5.0.1",
84
84
  "@storybook/addon-a11y": "6.5.13",
@@ -146,7 +146,7 @@
146
146
  "karma-teamcity-reporter": "^2.0.0",
147
147
  "karma-webpack": "^5.0.0",
148
148
  "lerna": "^6.0.3",
149
- "lint-staged": "^13.0.3",
149
+ "lint-staged": "^13.0.4",
150
150
  "merge-options": "^3.0.4",
151
151
  "mocha": "^10.1.0",
152
152
  "pinst": "^3.0.0",
@@ -259,5 +259,5 @@
259
259
  "node": ">=14.0",
260
260
  "npm": ">=6.0.0"
261
261
  },
262
- "gitHead": "caa26de972f902f5f818ab42c5f06296c7c65fdf"
262
+ "gitHead": "a528ede5f45d01ee371f966c86b4e9bcabc35d67"
263
263
  }