@jetbrains/ring-ui 5.0.80 → 5.0.82
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.
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
--ring-input-icon-offset: calc(unit * 2.5);
|
|
10
10
|
--ring-input-padding-inline: unit;
|
|
11
11
|
--ring-input-padding-block: 1px;
|
|
12
|
-
--ring-input-padding-start: var(--ring-input-padding-inline);
|
|
13
|
-
--ring-input-padding-end: var(--ring-input-padding-inline);
|
|
14
12
|
|
|
15
13
|
position: relative;
|
|
16
14
|
|
|
@@ -18,8 +16,13 @@
|
|
|
18
16
|
align-items: center;
|
|
19
17
|
|
|
20
18
|
box-sizing: border-box;
|
|
19
|
+
min-height: calc(var(--ring-input-padding-inline) * 3);
|
|
20
|
+
padding: var(--ring-input-padding-block) var(--ring-input-padding-inline);
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
transition: border-color var(--ring-ease);
|
|
23
|
+
|
|
24
|
+
border: 1px solid var(--ring-borders-color);
|
|
25
|
+
border-radius: var(--ring-border-radius);
|
|
23
26
|
|
|
24
27
|
font-size: var(--ring-font-size);
|
|
25
28
|
line-height: var(--ring-line-height);
|
|
@@ -27,32 +30,78 @@
|
|
|
27
30
|
& * {
|
|
28
31
|
box-sizing: border-box;
|
|
29
32
|
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
transition: none;
|
|
36
|
+
|
|
37
|
+
border-color: var(--ring-border-hover-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:focus-within {
|
|
41
|
+
transition: none;
|
|
42
|
+
|
|
43
|
+
border-color: var(--ring-main-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/*
|
|
47
|
+
Kill yellow/blue webkit autocomplete
|
|
48
|
+
https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/
|
|
49
|
+
*/
|
|
50
|
+
&:-webkit-autofill {
|
|
51
|
+
&,
|
|
52
|
+
&:hover,
|
|
53
|
+
&:focus {
|
|
54
|
+
transition: background-color 50000s ease-in-out 0s;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@nest .error & {
|
|
59
|
+
border-color: var(--ring-icon-error-color);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.queryAssistDisabled {
|
|
64
|
+
color: var(--ring-disabled-color);
|
|
65
|
+
border-color: var(--ring-border-disabled-color);
|
|
66
|
+
background-color: var(--ring-disabled-background-color);
|
|
67
|
+
|
|
68
|
+
-webkit-text-fill-color: var(--ring-disabled-color); /* Required for Safari, see RG-2063 for details */
|
|
30
69
|
}
|
|
31
70
|
|
|
32
71
|
.huge {
|
|
33
72
|
--ring-input-padding-block: 5px;
|
|
34
73
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
74
|
+
max-height: calc(var(--ring-input-padding-inline) * 4);
|
|
75
|
+
|
|
76
|
+
padding: 0 0 0 var(--ring-input-padding-inline);
|
|
77
|
+
|
|
78
|
+
border-right: 0;
|
|
40
79
|
|
|
41
80
|
& .actions {
|
|
42
|
-
right:
|
|
81
|
+
padding-right: var(--ring-input-padding-inline);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
& .placeholder {
|
|
85
|
+
padding-left: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@nest [dir=rtl] & {
|
|
89
|
+
padding: 0 var(--ring-input-padding-inline) 0 0;
|
|
90
|
+
|
|
91
|
+
border: 1px solid var(--ring-borders-color);
|
|
92
|
+
|
|
93
|
+
& .actions {
|
|
94
|
+
padding: 0 var(--ring-input-padding-inline);
|
|
95
|
+
}
|
|
43
96
|
}
|
|
44
97
|
}
|
|
45
98
|
|
|
46
99
|
.input {
|
|
47
|
-
overflow:
|
|
100
|
+
overflow: hidden;
|
|
48
101
|
|
|
49
|
-
|
|
102
|
+
flex-grow: 1;
|
|
50
103
|
|
|
51
104
|
margin: 0;
|
|
52
|
-
padding-top: var(--ring-input-padding-block);
|
|
53
|
-
padding-right: var(--ring-input-padding-end);
|
|
54
|
-
padding-bottom: var(--ring-input-padding-block);
|
|
55
|
-
padding-left: var(--ring-input-padding-start);
|
|
56
105
|
|
|
57
106
|
cursor: text;
|
|
58
107
|
|
|
@@ -60,8 +109,6 @@
|
|
|
60
109
|
white-space: nowrap;
|
|
61
110
|
|
|
62
111
|
color: var(--ring-text-color);
|
|
63
|
-
border: 1px solid var(--ring-borders-color);
|
|
64
|
-
border-radius: var(--ring-border-radius);
|
|
65
112
|
outline: none;
|
|
66
113
|
background: transparent;
|
|
67
114
|
|
|
@@ -69,51 +116,6 @@
|
|
|
69
116
|
scrollbar-width: none;
|
|
70
117
|
|
|
71
118
|
caret-color: var(--ring-main-color);
|
|
72
|
-
|
|
73
|
-
@nest [dir=rtl] & {
|
|
74
|
-
padding-right: var(--ring-input-padding-start);
|
|
75
|
-
padding-left: var(--ring-input-padding-end);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&:hover {
|
|
79
|
-
transition: none;
|
|
80
|
-
|
|
81
|
-
border-color: var(--ring-border-hover-color);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@nest .error & {
|
|
85
|
-
border-color: var(--ring-icon-error-color);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:focus {
|
|
89
|
-
transition: none;
|
|
90
|
-
|
|
91
|
-
border-color: var(--ring-main-color);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&[disabled] {
|
|
95
|
-
color: var(--ring-disabled-color);
|
|
96
|
-
border-color: var(--ring-border-disabled-color);
|
|
97
|
-
background-color: var(--ring-disabled-background-color);
|
|
98
|
-
|
|
99
|
-
-webkit-text-fill-color: var(--ring-disabled-color); /* Required for Safari, see RG-2063 for details */
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/*
|
|
103
|
-
Kill yellow/blue webkit autocomplete
|
|
104
|
-
https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/
|
|
105
|
-
*/
|
|
106
|
-
&:-webkit-autofill {
|
|
107
|
-
&,
|
|
108
|
-
&:hover,
|
|
109
|
-
&:focus {
|
|
110
|
-
transition: background-color 50000s ease-in-out 0s;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.withIcon {
|
|
116
|
-
--ring-input-padding-start: calc(var(--ring-input-padding-inline) + var(--ring-input-icon-offset));
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
.letter-text {
|
|
@@ -151,13 +153,12 @@
|
|
|
151
153
|
composes: resetButton from "../global/global.css";
|
|
152
154
|
|
|
153
155
|
position: absolute;
|
|
154
|
-
left: 1px;
|
|
155
156
|
|
|
156
157
|
display: block;
|
|
157
158
|
overflow: hidden;
|
|
158
159
|
|
|
159
|
-
width: calc(100% -
|
|
160
|
-
padding-left: var(--ring-input-padding-
|
|
160
|
+
width: calc(100% - var(--ring-input-padding-inline) * 4);
|
|
161
|
+
padding-left: calc(var(--ring-input-padding-inline) * 3 - var(--ring-input-padding-block));
|
|
161
162
|
|
|
162
163
|
white-space: nowrap;
|
|
163
164
|
|
|
@@ -166,6 +167,12 @@
|
|
|
166
167
|
pointer-events: none;
|
|
167
168
|
|
|
168
169
|
color: var(--ring-disabled-color);
|
|
170
|
+
|
|
171
|
+
@nest [dir=rtl] & {
|
|
172
|
+
padding-right: calc(var(--ring-input-padding-inline) * 3 - var(--ring-input-padding-block));
|
|
173
|
+
|
|
174
|
+
text-align: right;
|
|
175
|
+
}
|
|
169
176
|
}
|
|
170
177
|
|
|
171
178
|
.letter {
|
|
@@ -173,28 +180,28 @@
|
|
|
173
180
|
}
|
|
174
181
|
|
|
175
182
|
.actions {
|
|
176
|
-
|
|
177
|
-
|
|
183
|
+
display: inline-flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: center;
|
|
178
186
|
|
|
179
|
-
height:
|
|
187
|
+
height: 100%;
|
|
188
|
+
max-height: calc(var(--ring-input-padding-inline) * 2);
|
|
189
|
+
padding-left: var(--ring-input-padding-inline);
|
|
180
190
|
|
|
181
191
|
line-height: inherit;
|
|
182
192
|
|
|
183
193
|
@nest [dir=rtl] & {
|
|
184
|
-
|
|
185
|
-
left: unit;
|
|
194
|
+
padding: 0 var(--ring-input-padding-inline) 0 0;
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
197
|
|
|
189
198
|
.icon {
|
|
190
|
-
|
|
191
|
-
left: var(--ring-input-padding-inline);
|
|
199
|
+
padding-right: var(--ring-input-padding-inline);
|
|
192
200
|
|
|
193
201
|
color: var(--ring-icon-secondary-color);
|
|
194
202
|
|
|
195
203
|
@nest [dir=rtl] & {
|
|
196
|
-
|
|
197
|
-
left: auto;
|
|
204
|
+
padding: 0 0 0 var(--ring-input-padding-inline);
|
|
198
205
|
}
|
|
199
206
|
}
|
|
200
207
|
|
|
@@ -226,7 +233,14 @@
|
|
|
226
233
|
}
|
|
227
234
|
|
|
228
235
|
.clear {
|
|
236
|
+
top: 1px;
|
|
237
|
+
|
|
229
238
|
padding-right: 0;
|
|
239
|
+
|
|
240
|
+
@nest [dir=rtl] & {
|
|
241
|
+
padding-right: var(--ring-input-padding-inline);
|
|
242
|
+
padding-left: 0;
|
|
243
|
+
}
|
|
230
244
|
}
|
|
231
245
|
|
|
232
246
|
.loaderOnTheRight {
|
|
@@ -238,3 +252,11 @@
|
|
|
238
252
|
.input::-webkit-scrollbar {
|
|
239
253
|
display: none;
|
|
240
254
|
}
|
|
255
|
+
|
|
256
|
+
.withoutGlass {
|
|
257
|
+
padding-left: 0;
|
|
258
|
+
|
|
259
|
+
@nest [dir=rtl] & {
|
|
260
|
+
padding-right: 0;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
@@ -771,14 +771,18 @@ export default class QueryAssist extends Component {
|
|
|
771
771
|
const containerClasses = classNames(className, inputStyles[`size${huge ? Size.FULL : size}`], {
|
|
772
772
|
[styles.queryAssist]: true,
|
|
773
773
|
[styles.withIcon]: (renderGlass && !huge) || renderLoader,
|
|
774
|
-
[styles.huge]: huge
|
|
774
|
+
[styles.huge]: huge,
|
|
775
|
+
[styles.queryAssistDisabled]: this.props.disabled
|
|
775
776
|
});
|
|
776
777
|
const inputClasses = classNames(this.props.inputClassName, {
|
|
777
778
|
[`${styles.input} ring-js-shortcuts`]: true,
|
|
778
779
|
[styles.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
|
|
779
780
|
[styles.inputGap2]: actions.length === 2,
|
|
780
|
-
[styles.inputLeftGap]: this.isRenderingGlassOrLoader() && glass
|
|
781
|
-
|
|
781
|
+
[styles.inputLeftGap]: this.isRenderingGlassOrLoader() && glass
|
|
782
|
+
});
|
|
783
|
+
const placeholderStyles = classNames({
|
|
784
|
+
[styles.placeholder]: true,
|
|
785
|
+
[styles.withoutGlass]: !renderGlass
|
|
782
786
|
});
|
|
783
787
|
return (<ControlsHeightContext.Provider value={ControlsHeight.M}>
|
|
784
788
|
<div data-test={dataTests('ring-query-assist', dataTest)} className={containerClasses} role="presentation" ref={this.nodeRef}>
|
|
@@ -796,7 +800,7 @@ export default class QueryAssist extends Component {
|
|
|
796
800
|
onKeyUp={this.handleInput} // to handle input and key up
|
|
797
801
|
onKeyDown={this.handleEnter} onPaste={this.handlePaste} spellCheck="false">{this.state.query && <span>{this.renderQuery()}</span>}</ContentEditable>
|
|
798
802
|
|
|
799
|
-
{renderPlaceholder && (<button type="button" className={
|
|
803
|
+
{renderPlaceholder && (<button type="button" className={placeholderStyles} ref={this.placeholderRef} onClick={this.handleCaretMove} data-test="query-assist-placeholder">
|
|
800
804
|
{this.props.placeholder}
|
|
801
805
|
</button>)}
|
|
802
806
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import List from '../list/list.js';
|
|
3
3
|
|
|
4
|
-
var modules_da7ab055 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","height":"var(--ring-button-height)","loaderWidth":"64px","overInputZIndex":"2","inputGap":"24px","light":"light_rui_d22e","heightS":"heightS_rui_d22e","heightM":"heightM_rui_d22e","heightL":"heightL_rui_d22e","button":"button_rui_d22e","active":"active_rui_d22e","withIcon":"withIcon_rui_d22e","icon":"icon_rui_d22e","primary":"primary_rui_d22e","loader":"loader_rui_d22e","loaderBackground":"loaderBackground_rui_d22e","danger":"danger_rui_d22e","text":"text_rui_d22e","content":"content_rui_d22e","text-loading":"text-loading_rui_d22e","inline":"inline_rui_d22e","withNormalIcon":"withNormalIcon_rui_d22e","withDangerIcon":"withDangerIcon_rui_d22e","progress":"progress_rui_d22e","delayed":"delayed_rui_d22e","short":"short_rui_d22e","dropdownIcon":"dropdownIcon_rui_d22e","queryAssist":"queryAssist_rui_d22e","
|
|
4
|
+
var modules_da7ab055 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","height":"var(--ring-button-height)","loaderWidth":"64px","overInputZIndex":"2","inputGap":"24px","light":"light_rui_d22e","heightS":"heightS_rui_d22e","heightM":"heightM_rui_d22e","heightL":"heightL_rui_d22e","button":"button_rui_d22e","active":"active_rui_d22e","withIcon":"withIcon_rui_d22e","icon":"icon_rui_d22e","primary":"primary_rui_d22e","loader":"loader_rui_d22e","loaderBackground":"loaderBackground_rui_d22e","danger":"danger_rui_d22e","text":"text_rui_d22e","content":"content_rui_d22e","text-loading":"text-loading_rui_d22e","inline":"inline_rui_d22e","withNormalIcon":"withNormalIcon_rui_d22e","withDangerIcon":"withDangerIcon_rui_d22e","progress":"progress_rui_d22e","delayed":"delayed_rui_d22e","short":"short_rui_d22e","dropdownIcon":"dropdownIcon_rui_d22e","queryAssist":"queryAssist_rui_d22e","error":"error_rui_d22e","queryAssistDisabled":"queryAssistDisabled_rui_d22e","huge":"huge_rui_d22e","actions":"actions_rui_d22e","placeholder":"placeholder_rui_d22e resetButton_rui_8bff","input":"input_rui_d22e","letter-text":"letter-text_rui_d22e","letterDefault":"letterDefault_rui_d22e","letter-field-name":"letter-field-name_rui_d22e","letter-field-value":"letter-field-value_rui_d22e","letter-operator":"letter-operator_rui_d22e","letter-error":"letter-error_rui_d22e","highlight":"highlight_rui_d22e","service":"service_rui_d22e","letter":"letter_rui_d22e","rightSearchButton":"rightSearchButton_rui_d22e","clear":"clear_rui_d22e","loaderOnTheRight":"loaderOnTheRight_rui_d22e","withoutGlass":"withoutGlass_rui_d22e"};
|
|
5
5
|
|
|
6
6
|
const ICON_ID_LENGTH = 44;
|
|
7
7
|
class QueryAssistSuggestions {
|
|
@@ -782,14 +782,18 @@ class QueryAssist extends Component {
|
|
|
782
782
|
const containerClasses = classNames(className, modules_88cfaf40[`size${huge ? Size.FULL : size}`], {
|
|
783
783
|
[modules_da7ab055.queryAssist]: true,
|
|
784
784
|
[modules_da7ab055.withIcon]: renderGlass && !huge || renderLoader,
|
|
785
|
-
[modules_da7ab055.huge]: huge
|
|
785
|
+
[modules_da7ab055.huge]: huge,
|
|
786
|
+
[modules_da7ab055.queryAssistDisabled]: this.props.disabled
|
|
786
787
|
});
|
|
787
788
|
const inputClasses = classNames(this.props.inputClassName, {
|
|
788
789
|
[`${modules_da7ab055.input} ring-js-shortcuts`]: true,
|
|
789
790
|
[modules_da7ab055.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
|
|
790
791
|
[modules_da7ab055.inputGap2]: actions.length === 2,
|
|
791
|
-
[modules_da7ab055.inputLeftGap]: this.isRenderingGlassOrLoader() && glass
|
|
792
|
-
|
|
792
|
+
[modules_da7ab055.inputLeftGap]: this.isRenderingGlassOrLoader() && glass
|
|
793
|
+
});
|
|
794
|
+
const placeholderStyles = classNames({
|
|
795
|
+
[modules_da7ab055.placeholder]: true,
|
|
796
|
+
[modules_da7ab055.withoutGlass]: !renderGlass
|
|
793
797
|
});
|
|
794
798
|
return /*#__PURE__*/React.createElement(ControlsHeightContext.Provider, {
|
|
795
799
|
value: ControlsHeight.M
|
|
@@ -835,7 +839,7 @@ class QueryAssist extends Component {
|
|
|
835
839
|
spellCheck: "false"
|
|
836
840
|
}, this.state.query && /*#__PURE__*/React.createElement("span", null, this.renderQuery())), renderPlaceholder && /*#__PURE__*/React.createElement("button", {
|
|
837
841
|
type: "button",
|
|
838
|
-
className:
|
|
842
|
+
className: placeholderStyles,
|
|
839
843
|
ref: this.placeholderRef,
|
|
840
844
|
onClick: this.handleCaretMove,
|
|
841
845
|
"data-test": "query-assist-placeholder"
|