@jetbrains/ring-ui-built 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>;
@@ -290,13 +290,14 @@ var DatePicker = /*#__PURE__*/function (_PureComponent) {
290
290
  disabled: (_this$props$disabled = this.props.disabled) !== null && _this$props$disabled !== void 0 ? _this$props$disabled : false,
291
291
  pseudo: true,
292
292
  children: this.getAnchorText()
293
- }) : /*#__PURE__*/jsx(Button, {
293
+ }) : /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
294
294
  "data-test-ring-dropdown-anchor": true,
295
295
  className: modules_0c7b7d96.anchor,
296
296
  text: false,
297
- disabled: (_this$props$disabled2 = this.props.disabled) !== null && _this$props$disabled2 !== void 0 ? _this$props$disabled2 : false,
297
+ disabled: (_this$props$disabled2 = this.props.disabled) !== null && _this$props$disabled2 !== void 0 ? _this$props$disabled2 : false
298
+ }, this.props.buttonAttributes), {}, {
298
299
  children: anchorContent
299
- })
300
+ }))
300
301
  }, dropdownProps), {}, {
301
302
  children: /*#__PURE__*/jsx(PopupComponent, {
302
303
  className: popupClassName,
@@ -340,7 +341,8 @@ _defineProperty(DatePicker, "propTypes", {
340
341
  maxDate: dateType,
341
342
  translations: PropTypes.object,
342
343
  locale: PropTypes.object,
343
- size: PropTypes.oneOf(Object.values(Size))
344
+ size: PropTypes.oneOf(Object.values(Size)),
345
+ buttonAttributes: PropTypes.object
344
346
  });
345
347
  _defineProperty(DatePicker, "defaultProps", {
346
348
  className: '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui-built",
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",