@jetbrains/ring-ui 5.0.124 → 5.0.126
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.
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar-editor-ng/avatar-editor-ng.css +1 -1
- package/components/button/button.d.ts +2 -2
- package/components/icon/icon.d.ts +1 -1
- package/components/query-assist/query-assist.js +2 -2
- package/components/select/select.js +1 -1
- package/dist/avatar/avatar.d.ts +1 -1
- package/dist/button/button.d.ts +2 -2
- package/dist/icon/icon.d.ts +1 -1
- package/dist/query-assist/query-assist.js +2 -1
- package/dist/select/select.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
|
@@ -15,7 +15,7 @@ export declare enum Size {
|
|
|
15
15
|
}
|
|
16
16
|
export interface AvatarProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
17
17
|
dpr: number;
|
|
18
|
-
size: Size;
|
|
18
|
+
size: Size | number;
|
|
19
19
|
subavatarSize: number;
|
|
20
20
|
url?: string | null | undefined;
|
|
21
21
|
round?: boolean | null | undefined;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
float: right;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:global(.ring-avatar-editor:hover:not(:disabled
|
|
31
|
+
:global(.ring-avatar-editor:hover:not(:disabled, .ring-avatar-editor_controlled)) {
|
|
32
32
|
padding: 0;
|
|
33
33
|
|
|
34
34
|
border: 1px solid var(--ring-link-hover-color);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'focus-visible';
|
|
2
2
|
import React, { PureComponent, ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { IconType, Size } from '../icon/icon';
|
|
4
|
+
import { IconProps, IconType, Size } from '../icon/icon';
|
|
5
5
|
import { ClickableLinkProps } from '../link/clickableLink';
|
|
6
6
|
import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
7
7
|
export interface ButtonBaseProps {
|
|
@@ -17,7 +17,7 @@ export interface ButtonBaseProps {
|
|
|
17
17
|
dropdown?: boolean | null | undefined;
|
|
18
18
|
disabled?: boolean | undefined;
|
|
19
19
|
icon?: string | IconType | null | undefined;
|
|
20
|
-
iconSize?:
|
|
20
|
+
iconSize?: IconProps['size'];
|
|
21
21
|
iconClassName?: string | null | undefined;
|
|
22
22
|
iconSuppressSizeWarning?: boolean | null | undefined;
|
|
23
23
|
}
|
|
@@ -9,7 +9,7 @@ export interface IconProps extends HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
color: Color;
|
|
10
10
|
glyph: string | IconType | null;
|
|
11
11
|
height?: number | undefined;
|
|
12
|
-
size?: Size | null | undefined;
|
|
12
|
+
size?: Size | number | null | undefined;
|
|
13
13
|
width?: number | undefined;
|
|
14
14
|
loading?: boolean | null | undefined;
|
|
15
15
|
suppressSizeWarning?: boolean | null | undefined;
|
|
@@ -803,7 +803,7 @@ export default class QueryAssist extends Component {
|
|
|
803
803
|
[styles.withoutGlass]: !glass || (!renderLoader && huge)
|
|
804
804
|
});
|
|
805
805
|
return (<ControlsHeightContext.Provider value={ControlsHeight.M}>
|
|
806
|
-
<div data-test={dataTests('ring-query-assist', dataTest)} className={containerClasses} role="
|
|
806
|
+
<div data-test={dataTests('ring-query-assist', dataTest)} className={containerClasses} role="search" ref={this.nodeRef}>
|
|
807
807
|
{this.state.shortcuts && (<Shortcuts map={this.shortcutsMap} scope={this.shortcutsScope}/>)}
|
|
808
808
|
|
|
809
809
|
{renderGlass && !huge && (<Icon glyph={searchIcon} className={styles.icon} title={this.props.translations.searchTitle} ref={this.glassRef} data-test="query-assist-search-icon"/>)}
|
|
@@ -815,7 +815,7 @@ export default class QueryAssist extends Component {
|
|
|
815
815
|
<LoaderInline />
|
|
816
816
|
</div>)}
|
|
817
817
|
|
|
818
|
-
<ContentEditable aria-label={this.props.translations.searchTitle} className={inputClasses} data-test="ring-query-assist-input" inputRef={this.inputRef} disabled={this.props.disabled} onComponentUpdate={() => this.setCaretPosition({ fromContentEditable: true })} onBlur={this.handleFocusChange} onClick={this.handleCaretMove} onCompositionStart={this.trackCompositionState} onCompositionEnd={this.trackCompositionState} onFocus={this.handleFocusChange} onInput={this.handleInput} // To support IE use the same method
|
|
818
|
+
<ContentEditable aria-label={this.props.translations.searchTitle} role="searchbox" className={inputClasses} data-test="ring-query-assist-input" inputRef={this.inputRef} disabled={this.props.disabled} onComponentUpdate={() => this.setCaretPosition({ fromContentEditable: true })} onBlur={this.handleFocusChange} onClick={this.handleCaretMove} onCompositionStart={this.trackCompositionState} onCompositionEnd={this.trackCompositionState} onFocus={this.handleFocusChange} onInput={this.handleInput} // To support IE use the same method
|
|
819
819
|
onKeyUp={this.handleInput} // to handle input and key up
|
|
820
820
|
onKeyDown={this.handleEnter} onPaste={this.handlePaste} spellCheck="false">{this.state.query && <span>{this.renderQuery()}</span>}</ContentEditable>
|
|
821
821
|
|
|
@@ -245,7 +245,7 @@ export default class Select extends Component {
|
|
|
245
245
|
const selectedIndex = getSelectedIndex(selected, data || prevData);
|
|
246
246
|
Object.assign(nextState, {
|
|
247
247
|
selected,
|
|
248
|
-
|
|
248
|
+
filterValue: getValueForFilter(selected, type, filterValue)
|
|
249
249
|
});
|
|
250
250
|
if (!Array.isArray(prevSelected) || !Array.isArray(selected) ||
|
|
251
251
|
!isSameSelected(prevSelected, selected)) {
|
package/dist/avatar/avatar.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare enum Size {
|
|
|
15
15
|
}
|
|
16
16
|
export interface AvatarProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
17
17
|
dpr: number;
|
|
18
|
-
size: Size;
|
|
18
|
+
size: Size | number;
|
|
19
19
|
subavatarSize: number;
|
|
20
20
|
url?: string | null | undefined;
|
|
21
21
|
round?: boolean | null | undefined;
|
package/dist/button/button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'focus-visible';
|
|
2
2
|
import React, { PureComponent, ButtonHTMLAttributes } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { IconType, Size } from '../icon/icon';
|
|
4
|
+
import { IconProps, IconType, Size } from '../icon/icon';
|
|
5
5
|
import { ClickableLinkProps } from '../link/clickableLink';
|
|
6
6
|
import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
7
7
|
export interface ButtonBaseProps {
|
|
@@ -17,7 +17,7 @@ export interface ButtonBaseProps {
|
|
|
17
17
|
dropdown?: boolean | null | undefined;
|
|
18
18
|
disabled?: boolean | undefined;
|
|
19
19
|
icon?: string | IconType | null | undefined;
|
|
20
|
-
iconSize?:
|
|
20
|
+
iconSize?: IconProps['size'];
|
|
21
21
|
iconClassName?: string | null | undefined;
|
|
22
22
|
iconSuppressSizeWarning?: boolean | null | undefined;
|
|
23
23
|
}
|
package/dist/icon/icon.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface IconProps extends HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
color: Color;
|
|
10
10
|
glyph: string | IconType | null;
|
|
11
11
|
height?: number | undefined;
|
|
12
|
-
size?: Size | null | undefined;
|
|
12
|
+
size?: Size | number | null | undefined;
|
|
13
13
|
width?: number | undefined;
|
|
14
14
|
loading?: boolean | null | undefined;
|
|
15
15
|
suppressSizeWarning?: boolean | null | undefined;
|
|
@@ -808,7 +808,7 @@ class QueryAssist extends Component {
|
|
|
808
808
|
}, /*#__PURE__*/React.createElement("div", {
|
|
809
809
|
"data-test": joinDataTestAttributes('ring-query-assist', dataTest),
|
|
810
810
|
className: containerClasses,
|
|
811
|
-
role: "
|
|
811
|
+
role: "search",
|
|
812
812
|
ref: this.nodeRef
|
|
813
813
|
}, this.state.shortcuts && /*#__PURE__*/React.createElement(Shortcuts, {
|
|
814
814
|
map: this.shortcutsMap,
|
|
@@ -827,6 +827,7 @@ class QueryAssist extends Component {
|
|
|
827
827
|
ref: this.loaderRef
|
|
828
828
|
}, /*#__PURE__*/React.createElement(LoaderInline, null)), /*#__PURE__*/React.createElement(ContentEditable, {
|
|
829
829
|
"aria-label": this.props.translations.searchTitle,
|
|
830
|
+
role: "searchbox",
|
|
830
831
|
className: inputClasses,
|
|
831
832
|
"data-test": "ring-query-assist-input",
|
|
832
833
|
inputRef: this.inputRef,
|
package/dist/select/select.js
CHANGED
|
@@ -573,7 +573,7 @@ class Select extends Component {
|
|
|
573
573
|
const selectedIndex = getSelectedIndex(selected, data || prevData);
|
|
574
574
|
Object.assign(nextState, {
|
|
575
575
|
selected,
|
|
576
|
-
|
|
576
|
+
filterValue: getValueForFilter(selected, type, filterValue)
|
|
577
577
|
});
|
|
578
578
|
if (!Array.isArray(prevSelected) || !Array.isArray(selected) || !isSameSelected(prevSelected, selected)) {
|
|
579
579
|
Object.assign(nextState, {
|