@jetbrains/ring-ui 5.0.69 → 5.0.70
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.
|
@@ -40,21 +40,14 @@
|
|
|
40
40
|
|
|
41
41
|
.icons {
|
|
42
42
|
position: absolute;
|
|
43
|
-
top:
|
|
43
|
+
top: 0;
|
|
44
44
|
right: 5px;
|
|
45
|
+
bottom: 0;
|
|
45
46
|
|
|
46
47
|
transition: color var(--ring-ease);
|
|
47
48
|
|
|
48
49
|
color: var(--ring-icon-secondary-color);
|
|
49
50
|
|
|
50
|
-
line-height: calc(unit * 4);
|
|
51
|
-
|
|
52
|
-
& :global(.ring-loader_inline) {
|
|
53
|
-
top: 2px;
|
|
54
|
-
|
|
55
|
-
margin-right: 2px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
51
|
@nest .inputMode & {
|
|
59
52
|
font-size: var(--ring-font-size);
|
|
60
53
|
}
|
|
@@ -235,7 +228,3 @@
|
|
|
235
228
|
|
|
236
229
|
color: inherit;
|
|
237
230
|
}
|
|
238
|
-
|
|
239
|
-
.heightS .icons {
|
|
240
|
-
top: -5px;
|
|
241
|
-
}
|
|
@@ -740,14 +740,15 @@ export default class Select extends Component {
|
|
|
740
740
|
const { selected } = this.state;
|
|
741
741
|
const { disabled, clear, hideArrow } = this.props;
|
|
742
742
|
const icons = [];
|
|
743
|
+
const height = this.props.height || this.context;
|
|
743
744
|
if (!Array.isArray(selected) && selected?.icon) {
|
|
744
745
|
icons.push(<button title="Toggle options popup" type="button" className={styles.selectedIcon} key="selected" disabled={this.props.disabled} onClick={this._clickHandler} style={{ backgroundImage: `url(${selected.icon})` }}/>);
|
|
745
746
|
}
|
|
746
747
|
if (clear && !disabled && !this._selectionIsEmpty()) {
|
|
747
|
-
icons.push(<Button title="Clear selection" data-test="ring-clear-select" className={styles.clearIcon} key="close" disabled={this.props.disabled} onClick={this.clear} icon={closeIcon}/>);
|
|
748
|
+
icons.push(<Button title="Clear selection" data-test="ring-clear-select" className={styles.clearIcon} key="close" disabled={this.props.disabled} onClick={this.clear} height={height} icon={closeIcon}/>);
|
|
748
749
|
}
|
|
749
750
|
if (!hideArrow) {
|
|
750
|
-
icons.push(<Button title="Toggle options popup" className={styles.chevron} iconClassName={styles.chevronIcon} icon={chevronDownIcon} key="hide" disabled={this.props.disabled} onClick={this._clickHandler}/>);
|
|
751
|
+
icons.push(<Button title="Toggle options popup" className={styles.chevron} iconClassName={styles.chevronIcon} icon={chevronDownIcon} key="hide" disabled={this.props.disabled} height={height} onClick={this._clickHandler}/>);
|
|
751
752
|
}
|
|
752
753
|
return icons;
|
|
753
754
|
}
|
|
@@ -782,7 +783,7 @@ export default class Select extends Component {
|
|
|
782
783
|
});
|
|
783
784
|
const icons = this._getIcons();
|
|
784
785
|
const style = getStyle(icons.length);
|
|
785
|
-
const iconsNode = <
|
|
786
|
+
const iconsNode = <div className={styles.icons}>{icons}</div>;
|
|
786
787
|
const ariaProps = this.state.showPopup
|
|
787
788
|
? {
|
|
788
789
|
'aria-owns': this.listId,
|
package/dist/select/select.js
CHANGED
|
@@ -857,6 +857,7 @@ class Select extends Component {
|
|
|
857
857
|
hideArrow
|
|
858
858
|
} = this.props;
|
|
859
859
|
const icons = [];
|
|
860
|
+
const height = this.props.height || this.context;
|
|
860
861
|
if (!Array.isArray(selected) && selected !== null && selected !== void 0 && selected.icon) {
|
|
861
862
|
icons.push( /*#__PURE__*/React.createElement("button", {
|
|
862
863
|
title: "Toggle options popup",
|
|
@@ -878,6 +879,7 @@ class Select extends Component {
|
|
|
878
879
|
key: "close",
|
|
879
880
|
disabled: this.props.disabled,
|
|
880
881
|
onClick: this.clear,
|
|
882
|
+
height: height,
|
|
881
883
|
icon: closeIcon
|
|
882
884
|
}));
|
|
883
885
|
}
|
|
@@ -889,6 +891,7 @@ class Select extends Component {
|
|
|
889
891
|
icon: chevronDownIcon,
|
|
890
892
|
key: "hide",
|
|
891
893
|
disabled: this.props.disabled,
|
|
894
|
+
height: height,
|
|
892
895
|
onClick: this._clickHandler
|
|
893
896
|
}));
|
|
894
897
|
}
|
|
@@ -931,7 +934,7 @@ class Select extends Component {
|
|
|
931
934
|
});
|
|
932
935
|
const icons = this._getIcons();
|
|
933
936
|
const style = getStyle(icons.length);
|
|
934
|
-
const iconsNode = /*#__PURE__*/React.createElement("
|
|
937
|
+
const iconsNode = /*#__PURE__*/React.createElement("div", {
|
|
935
938
|
className: modules_9d0de074.icons
|
|
936
939
|
}, icons);
|
|
937
940
|
const ariaProps = this.state.showPopup ? {
|