@jetbrains/ring-ui 6.0.57 → 6.0.58

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.
@@ -1,4 +1,4 @@
1
- import { PureComponent } from 'react';
1
+ import { PureComponent, ButtonHTMLAttributes } from 'react';
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import type { Locale } from 'date-fns';
@@ -29,6 +29,7 @@ export type DatePickerProps = Omit<DatePopupProps, 'translations' | 'parseDateIn
29
29
  disabled?: boolean | null | undefined;
30
30
  parseDateInput: (input: string | null | undefined) => Date | null;
31
31
  size?: Size;
32
+ buttonAttributes?: Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'>;
32
33
  };
33
34
  /**
34
35
  * @name Date Picker
@@ -61,6 +62,7 @@ export default class DatePicker extends PureComponent<DatePickerProps> {
61
62
  translations: PropTypes.Requireable<object>;
62
63
  locale: PropTypes.Requireable<object>;
63
64
  size: PropTypes.Requireable<Size>;
65
+ buttonAttributes: PropTypes.Requireable<object>;
64
66
  };
65
67
  static defaultProps: DatePickerProps;
66
68
  static contextType: React.Context<import("../i18n/i18n-context").I18nContextProps>;
@@ -69,7 +69,8 @@ export default class DatePicker extends PureComponent {
69
69
  maxDate: dateType,
70
70
  translations: PropTypes.object,
71
71
  locale: PropTypes.object,
72
- size: PropTypes.oneOf(Object.values(Size))
72
+ size: PropTypes.oneOf(Object.values(Size)),
73
+ buttonAttributes: PropTypes.object
73
74
  };
74
75
  static defaultProps = {
75
76
  className: '',
@@ -204,7 +205,7 @@ export default class DatePicker extends PureComponent {
204
205
  ? (<Link data-test-ring-dropdown-anchor className={styles.anchor} disabled={this.props.disabled ?? false} pseudo>
205
206
  {this.getAnchorText()}
206
207
  </Link>)
207
- : (<Button data-test-ring-dropdown-anchor className={styles.anchor} text={false} disabled={this.props.disabled ?? false}>
208
+ : (<Button data-test-ring-dropdown-anchor className={styles.anchor} text={false} disabled={this.props.disabled ?? false} {...this.props.buttonAttributes}>
208
209
  {anchorContent}
209
210
  </Button>)} {...dropdownProps}>
210
211
  <PopupComponent className={popupClassName} popupRef={this.popupRef} onClear={clear ? this.clear : null} datePopupProps={{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.57",
3
+ "version": "6.0.58",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",