@jetbrains/ring-ui 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,9 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import {
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import flattenChildren from 'react-keyed-flatten-children';
|
|
3
4
|
import styles from './breadcrumbs.css';
|
|
4
5
|
export default function Breadcrumbs({ separatorClassName, children }) {
|
|
5
|
-
return
|
|
6
|
+
return flattenChildren(children).map((child, index) => (
|
|
6
7
|
// eslint-disable-next-line react/no-array-index-key
|
|
7
8
|
<Fragment key={index}>
|
|
8
9
|
{index > 0 && <span className={classNames(styles.separator, separatorClassName)}>{'/'}</span>}
|
|
@@ -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.
|
|
3
|
+
"version": "6.0.59",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -234,6 +234,7 @@
|
|
|
234
234
|
"postcss-modules-values-replace": "^4.2.0",
|
|
235
235
|
"postcss-preset-env": "^9.6.0",
|
|
236
236
|
"prop-types": "^15.8.1",
|
|
237
|
+
"react-keyed-flatten-children": "^3.0.2",
|
|
237
238
|
"react-movable": "^3.3.1",
|
|
238
239
|
"react-virtualized": "^9.22.5",
|
|
239
240
|
"react-waypoint": "^10.3.0",
|