@jetbrains/ring-ui-built 6.0.57 → 6.0.59
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,8 +1,7 @@
|
|
1
1
|
import 'core-js/modules/es.array.map.js';
|
2
|
-
import 'core-js/modules/es.object.to-string.js';
|
3
|
-
import 'core-js/modules/es.promise.js';
|
4
2
|
import classNames from 'classnames';
|
5
|
-
import {
|
3
|
+
import { Fragment } from 'react';
|
4
|
+
import flattenChildren from 'react-keyed-flatten-children';
|
6
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
7
6
|
|
8
7
|
var modules_18e4daa4 = {"separator":"separator_rui_09b2"};
|
@@ -10,7 +9,7 @@ var modules_18e4daa4 = {"separator":"separator_rui_09b2"};
|
|
10
9
|
function Breadcrumbs(_ref) {
|
11
10
|
var separatorClassName = _ref.separatorClassName,
|
12
11
|
children = _ref.children;
|
13
|
-
return
|
12
|
+
return flattenChildren(children).map(function (child, index) {
|
14
13
|
return (
|
15
14
|
/*#__PURE__*/
|
16
15
|
// eslint-disable-next-line react/no-array-index-key
|
@@ -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: '',
|