@jetbrains/ring-ui 4.0.53 → 4.0.57
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/alert/container.css +1 -1
- package/components/avatar/avatar.css +3 -1
- package/components/avatar-editor-ng/avatar-editor-ng.css +2 -2
- package/components/button/button.css +2 -2
- package/components/checkbox/checkbox.css +1 -1
- package/components/content-layout/content-layout.css +1 -1
- package/components/data-list/data-list.css +1 -1
- package/components/date-picker/date-input.js +5 -4
- package/components/date-picker/date-picker.css +10 -6
- package/components/date-picker/date-picker.js +16 -14
- package/components/date-picker/date-popup.js +8 -4
- package/components/date-picker/month-names.js +8 -5
- package/components/date-picker/month.js +6 -2
- package/components/date-picker/weekdays.js +10 -2
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/error-page/error-page.css +2 -2
- package/components/form/form.css +2 -2
- package/components/global/global.css +1 -1
- package/components/global/variables.css +8 -1
- package/components/grid/grid.css +10 -9
- package/components/header/header.css +1 -1
- package/components/icon/icon.css +5 -4
- package/components/island/island.css +4 -3
- package/components/island-legacy/island-legacy.css +3 -1
- package/components/loader-inline/loader-inline.css +1 -1
- package/components/loader-screen/loader-screen.css +1 -1
- package/components/message/message.css +1 -1
- package/components/progress-bar/progress-bar.css +1 -1
- package/components/query-assist/query-assist.css +1 -1
- package/components/select/select.css +4 -0
- package/components/select/select.examples.js +7 -0
- package/components/select/select.js +6 -2
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/sidebar/sidebar.css +1 -0
- package/components/table-legacy/table-legacy.css +2 -2
- package/components/tag/tag.css +5 -2
- package/components/user-agreement/user-agreement.css +1 -1
- package/package.json +48 -48
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
object-fit: cover;
|
|
6
6
|
object-position: center;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/* This is a "graceful degradation" fallback, while the real value is controlled by JS */
|
|
9
|
+
|
|
10
|
+
border-radius: var(--ring-border-radius);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
.subavatar {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
width: 0;
|
|
20
20
|
height: calc(unit * 5);
|
|
21
21
|
|
|
22
|
-
content:
|
|
22
|
+
content: "";
|
|
23
23
|
vertical-align: middle;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
width: 100%;
|
|
50
50
|
height: 100%;
|
|
51
51
|
|
|
52
|
-
content:
|
|
52
|
+
content: "";
|
|
53
53
|
|
|
54
54
|
background-color: rgba(0, 0, 0, 0.8);
|
|
55
55
|
}
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
width: calc(100% + loaderWidth);
|
|
452
452
|
height: 100%;
|
|
453
453
|
|
|
454
|
-
content:
|
|
454
|
+
content: "";
|
|
455
455
|
animation: progress 1s linear infinite;
|
|
456
456
|
|
|
457
457
|
background-repeat: repeat;
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
.delayed .content::after {
|
|
463
|
-
content:
|
|
463
|
+
content: "…";
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
.short {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
/* stylelint-disable-next-line selector-max-specificity */
|
|
90
90
|
&:checked + .cell,
|
|
91
91
|
&:indeterminate[checked] + .cell,
|
|
92
|
-
&:indeterminate[data-checked=true] + .cell {
|
|
92
|
+
&:indeterminate[data-checked="true"] + .cell {
|
|
93
93
|
border-color: var(--ring-border-hover-color);
|
|
94
94
|
background-color: var(--ring-selected-background-color);
|
|
95
95
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
-
@value unit, extra-small-screen-media, small-screen-media from
|
|
3
|
+
@value unit, extra-small-screen-media, small-screen-media from "../global/global.css";
|
|
4
4
|
@value sidebarWidth: calc(unit * 30);
|
|
5
5
|
|
|
6
6
|
.contentLayout {
|
|
@@ -25,7 +25,8 @@ export default class DateInput extends React.PureComponent {
|
|
|
25
25
|
onInput: PropTypes.func,
|
|
26
26
|
onActivate: PropTypes.func,
|
|
27
27
|
onConfirm: PropTypes.func,
|
|
28
|
-
onClear: PropTypes.func
|
|
28
|
+
onClear: PropTypes.func,
|
|
29
|
+
locale: PropTypes.object
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
static defaultProps = {
|
|
@@ -78,16 +79,16 @@ export default class DateInput extends React.PureComponent {
|
|
|
78
79
|
time, name, hoverDate,
|
|
79
80
|
date, displayFormat, translations,
|
|
80
81
|
onActivate, onClear,
|
|
81
|
-
fromPlaceholder, toPlaceholder, timePlaceholder
|
|
82
|
+
fromPlaceholder, toPlaceholder, timePlaceholder, locale
|
|
82
83
|
} = this.props;
|
|
83
84
|
|
|
84
85
|
let displayText = '';
|
|
85
86
|
if (active && hoverDate) {
|
|
86
|
-
displayText = displayFormat(hoverDate);
|
|
87
|
+
displayText = displayFormat(hoverDate, locale);
|
|
87
88
|
} else if (active && text != null) {
|
|
88
89
|
displayText = text;
|
|
89
90
|
} else if (date) {
|
|
90
|
-
displayText = displayFormat(date);
|
|
91
|
+
displayText = displayFormat(date, locale);
|
|
91
92
|
} else if (name === 'time') {
|
|
92
93
|
displayText = time || '';
|
|
93
94
|
}
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
position: absolute;
|
|
97
97
|
right: unit;
|
|
98
98
|
|
|
99
|
-
content:
|
|
99
|
+
content: "—";
|
|
100
100
|
|
|
101
101
|
line-height: calc(4 * unit - 2px);
|
|
102
102
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
position: absolute;
|
|
124
124
|
left: calc(-1 * unit);
|
|
125
125
|
|
|
126
|
-
content:
|
|
126
|
+
content: ",";
|
|
127
127
|
|
|
128
128
|
line-height: calc(4 * unit - 3px);
|
|
129
129
|
}
|
|
@@ -198,6 +198,8 @@
|
|
|
198
198
|
|
|
199
199
|
text-align: left;
|
|
200
200
|
|
|
201
|
+
text-transform: capitalize;
|
|
202
|
+
|
|
201
203
|
font-weight: bold;
|
|
202
204
|
|
|
203
205
|
@supports (flex-basis: 1px) {
|
|
@@ -280,7 +282,7 @@
|
|
|
280
282
|
width: calc(unit * 2);
|
|
281
283
|
height: 100%;
|
|
282
284
|
|
|
283
|
-
content:
|
|
285
|
+
content: "";
|
|
284
286
|
transition: background-color var(--ring-ease);
|
|
285
287
|
}
|
|
286
288
|
|
|
@@ -323,7 +325,7 @@
|
|
|
323
325
|
width: calc(unit * 23);
|
|
324
326
|
height: calc(unit * 8);
|
|
325
327
|
|
|
326
|
-
content:
|
|
328
|
+
content: "";
|
|
327
329
|
transition: background-color var(--ring-ease);
|
|
328
330
|
}
|
|
329
331
|
|
|
@@ -355,7 +357,7 @@
|
|
|
355
357
|
width: calc(unit * 2);
|
|
356
358
|
height: 100%;
|
|
357
359
|
|
|
358
|
-
content:
|
|
360
|
+
content: "";
|
|
359
361
|
transition: background-color var(--ring-ease);
|
|
360
362
|
}
|
|
361
363
|
}
|
|
@@ -407,7 +409,7 @@
|
|
|
407
409
|
top: 0;
|
|
408
410
|
left: calc(unit * 0.5);
|
|
409
411
|
|
|
410
|
-
content:
|
|
412
|
+
content: "•";
|
|
411
413
|
|
|
412
414
|
font-size: var(--ring-font-size-smaller);
|
|
413
415
|
}
|
|
@@ -449,6 +451,8 @@
|
|
|
449
451
|
height: cellSize;
|
|
450
452
|
padding-left: calc(unit * 1.5);
|
|
451
453
|
|
|
454
|
+
text-transform: capitalize;
|
|
455
|
+
|
|
452
456
|
line-height: cellSize;
|
|
453
457
|
}
|
|
454
458
|
|
|
@@ -90,7 +90,8 @@ export default class DatePicker extends PureComponent {
|
|
|
90
90
|
disabled: PropTypes.bool,
|
|
91
91
|
minDate: dateType,
|
|
92
92
|
maxDate: dateType,
|
|
93
|
-
translations: PropTypes.object
|
|
93
|
+
translations: PropTypes.object,
|
|
94
|
+
locale: PropTypes.object
|
|
94
95
|
};
|
|
95
96
|
|
|
96
97
|
static defaultProps = {
|
|
@@ -101,10 +102,10 @@ export default class DatePicker extends PureComponent {
|
|
|
101
102
|
from: null,
|
|
102
103
|
to: null,
|
|
103
104
|
clear: false,
|
|
104
|
-
displayFormat: date => (date ? formatDate(date, 'd MMM yyyy') : ''),
|
|
105
|
-
displayMonthFormat: date => (date ? formatDate(date, 'd MMM') : ''),
|
|
106
|
-
displayDayFormat: date => (date ? formatDate(date, 'd') : ''),
|
|
107
|
-
displayTimeFormat: date => (date ? formatDate(date, 'HH:mm') : ''),
|
|
105
|
+
displayFormat: (date, locale) => (date ? formatDate(date, 'd MMM yyyy', {locale}) : ''),
|
|
106
|
+
displayMonthFormat: (date, locale) => (date ? formatDate(date, 'd MMM', {locale}) : ''),
|
|
107
|
+
displayDayFormat: (date, locale) => (date ? formatDate(date, 'd', {locale}) : ''),
|
|
108
|
+
displayTimeFormat: (date, locale) => (date ? formatDate(date, 'HH:mm', {locale}) : ''),
|
|
108
109
|
datePlaceholder: 'Set a date',
|
|
109
110
|
dateTimePlaceholder: 'Set date and time',
|
|
110
111
|
rangePlaceholder: 'Set a period',
|
|
@@ -194,7 +195,8 @@ export default class DatePicker extends PureComponent {
|
|
|
194
195
|
displayFormat,
|
|
195
196
|
displayMonthFormat,
|
|
196
197
|
displayDayFormat,
|
|
197
|
-
translations
|
|
198
|
+
translations,
|
|
199
|
+
locale
|
|
198
200
|
} = this.props;
|
|
199
201
|
|
|
200
202
|
const date = this.parse(this.props.date);
|
|
@@ -204,27 +206,27 @@ export default class DatePicker extends PureComponent {
|
|
|
204
206
|
|
|
205
207
|
let text;
|
|
206
208
|
if (!range && !withTime) {
|
|
207
|
-
text = date ? displayFormat(date) : datePlaceholder || translations.setDate;
|
|
209
|
+
text = date ? displayFormat(date, locale) : datePlaceholder || translations.setDate;
|
|
208
210
|
} else if (!range && withTime) {
|
|
209
211
|
if (!date && !time) {
|
|
210
212
|
text = dateTimePlaceholder || translations.setDateTime;
|
|
211
213
|
} else {
|
|
212
|
-
text = `${date && displayFormat(date) || '—'}, ${time || '—'}`;
|
|
214
|
+
text = `${date && displayFormat(date, locale) || '—'}, ${time || '—'}`;
|
|
213
215
|
}
|
|
214
216
|
} else if (!from && !to) {
|
|
215
217
|
text = rangePlaceholder || translations.setPeriod;
|
|
216
218
|
} else if (!to) {
|
|
217
|
-
text = `${displayFormat(from)} —`;
|
|
219
|
+
text = `${displayFormat(from, locale)} —`;
|
|
218
220
|
} else if (!from) {
|
|
219
|
-
text = `— ${displayFormat(to)}`;
|
|
221
|
+
text = `— ${displayFormat(to, locale)}`;
|
|
220
222
|
} else if (!isSameYear(from, to)) {
|
|
221
|
-
text = `${displayFormat(from)} — ${displayFormat(to)}`;
|
|
223
|
+
text = `${displayFormat(from, locale)} — ${displayFormat(to, locale)}`;
|
|
222
224
|
} else if (!isSameMonth(from, to)) {
|
|
223
|
-
text = `${displayMonthFormat(from)} — ${displayFormat(to)}`;
|
|
225
|
+
text = `${displayMonthFormat(from, locale)} — ${displayFormat(to, locale)}`;
|
|
224
226
|
} else if (!isSameDay(from, to)) {
|
|
225
|
-
text = `${displayDayFormat(from)} — ${displayFormat(to)}`;
|
|
227
|
+
text = `${displayDayFormat(from, locale)} — ${displayFormat(to, locale)}`;
|
|
226
228
|
} else {
|
|
227
|
-
text = `${displayFormat(to)}`;
|
|
229
|
+
text = `${displayFormat(to, locale)}`;
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
return text;
|
|
@@ -47,7 +47,8 @@ export default class DatePopup extends Component {
|
|
|
47
47
|
hidden: PropTypes.bool,
|
|
48
48
|
fromPlaceholder: PropTypes.string,
|
|
49
49
|
toPlaceholder: PropTypes.string,
|
|
50
|
-
timePlaceholder: PropTypes.string
|
|
50
|
+
timePlaceholder: PropTypes.string,
|
|
51
|
+
locale: PropTypes.object
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
static defaultProps = {
|
|
@@ -77,7 +78,7 @@ export default class DatePopup extends Component {
|
|
|
77
78
|
|
|
78
79
|
componentDidMount() {
|
|
79
80
|
if (this.componentRef.current) {
|
|
80
|
-
this.componentRef.current.addEventListener('wheel', this.handleWheel);
|
|
81
|
+
this.componentRef.current.addEventListener('wheel', this.handleWheel, {passive: true});
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -297,7 +298,7 @@ export default class DatePopup extends Component {
|
|
|
297
298
|
};
|
|
298
299
|
|
|
299
300
|
render() {
|
|
300
|
-
const {range, hidden, withTime, time} = this.props;
|
|
301
|
+
const {range, hidden, withTime, time, locale} = this.props;
|
|
301
302
|
const parsedDate = this.parse(this.props.date, 'date');
|
|
302
303
|
const parsedTo = this.parse(this.props.to, 'to');
|
|
303
304
|
|
|
@@ -391,6 +392,7 @@ export default class DatePopup extends Component {
|
|
|
391
392
|
onInput={this.handleInput}
|
|
392
393
|
onConfirm={this.handleConfirm(name)}
|
|
393
394
|
onClear={onClear}
|
|
395
|
+
locale={locale}
|
|
394
396
|
/>
|
|
395
397
|
);
|
|
396
398
|
})}
|
|
@@ -413,12 +415,13 @@ export default class DatePopup extends Component {
|
|
|
413
415
|
onInput={this.handleInput}
|
|
414
416
|
onConfirm={this.handleConfirm('time')}
|
|
415
417
|
onClear={clearable && this.onClear || undefined}
|
|
418
|
+
locale={locale}
|
|
416
419
|
/>
|
|
417
420
|
)
|
|
418
421
|
: ('')
|
|
419
422
|
}
|
|
420
423
|
</div>
|
|
421
|
-
<Weekdays/>
|
|
424
|
+
<Weekdays locale={locale}/>
|
|
422
425
|
<div
|
|
423
426
|
className={styles.calendar}
|
|
424
427
|
>
|
|
@@ -426,6 +429,7 @@ export default class DatePopup extends Component {
|
|
|
426
429
|
{...calendarProps}
|
|
427
430
|
onHover={this.hoverHandler}
|
|
428
431
|
onSelect={this.selectHandler}
|
|
432
|
+
locale={locale}
|
|
429
433
|
/>
|
|
430
434
|
<Years {...calendarProps}/>
|
|
431
435
|
</div>
|
|
@@ -21,7 +21,7 @@ class MonthName extends PureComponent {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
render() {
|
|
24
|
-
const {month} = this.props;
|
|
24
|
+
const {month, locale} = this.props;
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<button
|
|
@@ -34,7 +34,7 @@ class MonthName extends PureComponent {
|
|
|
34
34
|
)}
|
|
35
35
|
onClick={this.handleClick}
|
|
36
36
|
>
|
|
37
|
-
{format(month, '
|
|
37
|
+
{format(month, 'LLL', {locale})}
|
|
38
38
|
</button>
|
|
39
39
|
);
|
|
40
40
|
}
|
|
@@ -42,11 +42,12 @@ class MonthName extends PureComponent {
|
|
|
42
42
|
|
|
43
43
|
MonthName.propTypes = {
|
|
44
44
|
month: dateType,
|
|
45
|
-
onScrollChange: PropTypes.func
|
|
45
|
+
onScrollChange: PropTypes.func,
|
|
46
|
+
locale: PropTypes.string
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
export default function MonthNames(props) {
|
|
49
|
-
const {scrollDate} = props;
|
|
50
|
+
const {scrollDate, locale} = props;
|
|
50
51
|
const months = [];
|
|
51
52
|
for (let i = 0; i < YEAR; i++) {
|
|
52
53
|
const middleDay = set(scrollDate, {month: i, date: MIDDLE_DAY});
|
|
@@ -73,6 +74,7 @@ export default function MonthNames(props) {
|
|
|
73
74
|
key={+month}
|
|
74
75
|
month={month}
|
|
75
76
|
onScrollChange={props.onScrollChange}
|
|
77
|
+
locale={locale}
|
|
76
78
|
/>
|
|
77
79
|
))}
|
|
78
80
|
{props.currentRange &&
|
|
@@ -97,5 +99,6 @@ export default function MonthNames(props) {
|
|
|
97
99
|
MonthNames.propTypes = {
|
|
98
100
|
scrollDate: dateType,
|
|
99
101
|
onScrollChange: PropTypes.func,
|
|
100
|
-
currentRange: PropTypes.arrayOf(dateType)
|
|
102
|
+
currentRange: PropTypes.arrayOf(dateType),
|
|
103
|
+
locale: PropTypes.string
|
|
101
104
|
};
|
|
@@ -5,6 +5,8 @@ import format from 'date-fns/format';
|
|
|
5
5
|
import getDay from 'date-fns/getDay';
|
|
6
6
|
import setDay from 'date-fns/setDay';
|
|
7
7
|
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
|
|
8
10
|
import Day from './day';
|
|
9
11
|
import {dateType, WEEK, weekdays} from './consts';
|
|
10
12
|
import styles from './date-picker.css';
|
|
@@ -12,6 +14,7 @@ import styles from './date-picker.css';
|
|
|
12
14
|
export default function Month(props) {
|
|
13
15
|
const start = props.month;
|
|
14
16
|
const end = endOfMonth(start);
|
|
17
|
+
const {locale} = props;
|
|
15
18
|
|
|
16
19
|
// pad with empty cells starting from last friday
|
|
17
20
|
const weekday = getDay(start);
|
|
@@ -25,7 +28,7 @@ export default function Month(props) {
|
|
|
25
28
|
return (
|
|
26
29
|
<div className={styles.month}>
|
|
27
30
|
<span className={styles.monthTitle}>
|
|
28
|
-
{format(props.month, '
|
|
31
|
+
{format(props.month, 'LLLL', {locale})}
|
|
29
32
|
</span>
|
|
30
33
|
{days.map(date => (
|
|
31
34
|
<Day
|
|
@@ -40,5 +43,6 @@ export default function Month(props) {
|
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
Month.propTypes = {
|
|
43
|
-
month: dateType
|
|
46
|
+
month: dateType,
|
|
47
|
+
locale: PropTypes.string
|
|
44
48
|
};
|
|
@@ -5,13 +5,17 @@ import format from 'date-fns/format';
|
|
|
5
5
|
import setDay from 'date-fns/setDay';
|
|
6
6
|
import startOfDay from 'date-fns/startOfDay';
|
|
7
7
|
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
|
|
8
10
|
import {weekdays} from './consts';
|
|
9
11
|
import styles from './date-picker.css';
|
|
10
12
|
|
|
11
|
-
export default function Weekdays() {
|
|
13
|
+
export default function Weekdays(props) {
|
|
12
14
|
const days = Object.keys(weekdays).
|
|
13
15
|
map(key => startOfDay(setDay(new Date(), weekdays[key])));
|
|
14
16
|
|
|
17
|
+
const {locale} = props;
|
|
18
|
+
|
|
15
19
|
return (
|
|
16
20
|
<div className={styles.weekdays}>
|
|
17
21
|
{days.map(day => (
|
|
@@ -24,9 +28,13 @@ export default function Weekdays() {
|
|
|
24
28
|
)}
|
|
25
29
|
key={+day}
|
|
26
30
|
>
|
|
27
|
-
{format(day, 'EEEEEE')}
|
|
31
|
+
{format(day, 'EEEEEE', {locale})}
|
|
28
32
|
</span>
|
|
29
33
|
))}
|
|
30
34
|
</div>
|
|
31
35
|
);
|
|
32
36
|
}
|
|
37
|
+
|
|
38
|
+
Weekdays.propTypes = {
|
|
39
|
+
locale: PropTypes.string
|
|
40
|
+
};
|
package/components/form/form.css
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
display: block;
|
|
97
97
|
clear: both;
|
|
98
98
|
|
|
99
|
-
content:
|
|
99
|
+
content: "";
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
:global(.ring-form__group_united) {
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
height: calc(unit * 3);
|
|
169
169
|
|
|
170
|
-
content:
|
|
170
|
+
content: "";
|
|
171
171
|
vertical-align: middle;
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -87,7 +87,14 @@
|
|
|
87
87
|
--ring-ease: 0.3s ease-out;
|
|
88
88
|
--ring-fast-ease: 0.15s ease-out;
|
|
89
89
|
--ring-font-family: system-ui, Arial, sans-serif;
|
|
90
|
-
--ring-font-family-monospace:
|
|
90
|
+
--ring-font-family-monospace:
|
|
91
|
+
Menlo,
|
|
92
|
+
"Bitstream Vera Sans Mono",
|
|
93
|
+
"Ubuntu Mono",
|
|
94
|
+
Consolas,
|
|
95
|
+
"Courier New",
|
|
96
|
+
Courier,
|
|
97
|
+
monospace;
|
|
91
98
|
|
|
92
99
|
/* Common z-index-values */
|
|
93
100
|
|
package/components/grid/grid.css
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
-
@value unit, breakpoint-small, breakpoint-middle, breakpoint-large
|
|
3
|
+
@value unit, breakpoint-small, breakpoint-middle, breakpoint-large from "../global/global.css";
|
|
4
|
+
@value large-screen-media, middle-screen-media, small-screen-media from "../global/global.css";
|
|
4
5
|
@value gutterWidth: (unit*2);
|
|
5
6
|
@value gutterCompensation: calc(gutterWidth / -2);
|
|
6
7
|
@value outerMargin: calc(unit*2);
|
|
7
8
|
@value containerSmall: calc(breakpoint-small + gutterWidth);
|
|
8
9
|
@value containerMedium: calc(breakpoint-middle + gutterWidth);
|
|
9
10
|
@value containerLarge: calc(breakpoint-large + gutterWidth);
|
|
10
|
-
@value width-1: 8.
|
|
11
|
-
@value width-2: 16.
|
|
11
|
+
@value width-1: 8.3333%;
|
|
12
|
+
@value width-2: 16.6667%;
|
|
12
13
|
@value width-3: 25%;
|
|
13
|
-
@value width-4: 33.
|
|
14
|
-
@value width-5: 41.
|
|
14
|
+
@value width-4: 33.3333%;
|
|
15
|
+
@value width-5: 41.6667%;
|
|
15
16
|
@value width-6: 50%;
|
|
16
|
-
@value width-7: 58.
|
|
17
|
-
@value width-8: 66.
|
|
17
|
+
@value width-7: 58.3333%;
|
|
18
|
+
@value width-8: 66.6667%;
|
|
18
19
|
@value width-9: 75%;
|
|
19
|
-
@value width-10: 83.
|
|
20
|
-
@value width-11: 91.
|
|
20
|
+
@value width-10: 83.3333%;
|
|
21
|
+
@value width-11: 91.6667%;
|
|
21
22
|
@value width-12: 100%;
|
|
22
23
|
|
|
23
24
|
.container-fluid,
|
package/components/icon/icon.css
CHANGED
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
|
|
17
17
|
pointer-events: none;
|
|
18
18
|
|
|
19
|
-
&[width=
|
|
19
|
+
&[width="10"] {
|
|
20
20
|
vertical-align: -1px;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
&[width=
|
|
23
|
+
&[width="14"] {
|
|
24
24
|
margin-right: -2px;
|
|
25
25
|
margin-left: 0;
|
|
26
26
|
|
|
27
27
|
vertical-align: -3px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
&[width=
|
|
30
|
+
&[width="16"] {
|
|
31
31
|
vertical-align: -3px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
&[width=
|
|
34
|
+
&[width="20"] {
|
|
35
35
|
vertical-align: -2px;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/* HACK: This media query hack makes styles applied for WebKit browsers only */
|
|
47
|
+
/* stylelint-disable-next-line media-feature-name-no-vendor-prefix */
|
|
47
48
|
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
|
48
49
|
.glyph {
|
|
49
50
|
width: auto; /* Safari size bug workaround, see https://youtrack.jetbrains.com/issue/RG-1983 */
|
|
@@ -96,12 +96,13 @@
|
|
|
96
96
|
width: 100%;
|
|
97
97
|
height: calc(unit * 3);
|
|
98
98
|
|
|
99
|
-
content:
|
|
99
|
+
content: "";
|
|
100
100
|
|
|
101
101
|
pointer-events: none;
|
|
102
102
|
|
|
103
103
|
opacity: 0.8;
|
|
104
|
-
|
|
104
|
+
|
|
105
|
+
background: linear-gradient(to top, gradientStart, gradientStop);
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
.contentWithTopFade:first-child::before {
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
width: 100%;
|
|
120
121
|
height: calc(unit * 3);
|
|
121
122
|
|
|
122
|
-
content:
|
|
123
|
+
content: "";
|
|
123
124
|
pointer-events: none;
|
|
124
125
|
|
|
125
126
|
opacity: 0.8;
|
|
@@ -70,7 +70,9 @@
|
|
|
70
70
|
|
|
71
71
|
:global(.ring-island__header-btn),
|
|
72
72
|
:global(.ring-island__header-button:hover) {
|
|
73
|
-
background:
|
|
73
|
+
background:
|
|
74
|
+
var(--ring-hover-background-color)
|
|
75
|
+
linear-gradient(to top, var(--ring-hover-background-color), var(--ring-content-background-color));
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
:global(.ring-island__header-btn),
|
|
@@ -36,6 +36,7 @@ export default {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export const withAFilterAndTags = args => <Select {...args}/>;
|
|
39
|
+
export const withAvatars = args => <Select {...args}/>;
|
|
39
40
|
|
|
40
41
|
{
|
|
41
42
|
const avatarUrl = `${hubConfig.serverUri}/api/rest/avatar/default?username=blue`;
|
|
@@ -77,6 +78,12 @@ export const withAFilterAndTags = args => <Select {...args}/>;
|
|
|
77
78
|
data: tags,
|
|
78
79
|
selected: [tags[0]]
|
|
79
80
|
};
|
|
81
|
+
|
|
82
|
+
withAvatars.args = {
|
|
83
|
+
data: tags,
|
|
84
|
+
selected: tags[4],
|
|
85
|
+
type: Select.Type.BUTTON
|
|
86
|
+
};
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
withAFilterAndTags.storyName = 'with a filter and tags';
|
|
@@ -220,6 +220,7 @@ export default class Select extends Component {
|
|
|
220
220
|
|
|
221
221
|
static propTypes = {
|
|
222
222
|
className: PropTypes.string,
|
|
223
|
+
buttonClassName: PropTypes.string,
|
|
223
224
|
id: PropTypes.string,
|
|
224
225
|
multiple: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
225
226
|
allowAny: PropTypes.bool,
|
|
@@ -1034,10 +1035,12 @@ export default class Select extends Component {
|
|
|
1034
1035
|
}
|
|
1035
1036
|
|
|
1036
1037
|
_getAvatar() {
|
|
1037
|
-
return this.state.selected &&
|
|
1038
|
+
return this.state.selected &&
|
|
1039
|
+
(this.state.selected.avatar || this.state.selected.showGeneratedAvatar) && (
|
|
1038
1040
|
<Avatar
|
|
1039
1041
|
className={styles.avatar}
|
|
1040
1042
|
url={this.state.selected.avatar}
|
|
1043
|
+
username={this.state.selected.username}
|
|
1041
1044
|
size={AvatarSize.Size20}
|
|
1042
1045
|
/>
|
|
1043
1046
|
);
|
|
@@ -1152,6 +1155,7 @@ export default class Select extends Component {
|
|
|
1152
1155
|
id={this.props.id}
|
|
1153
1156
|
onClick={this._clickHandler}
|
|
1154
1157
|
className={classNames(
|
|
1158
|
+
this.props.buttonClassName,
|
|
1155
1159
|
styles.buttonValue,
|
|
1156
1160
|
{
|
|
1157
1161
|
[styles.buttonValueOpen]: this.state.showPopup
|
|
@@ -1192,7 +1196,7 @@ export default class Select extends Component {
|
|
|
1192
1196
|
onClick={this._clickHandler}
|
|
1193
1197
|
type="button"
|
|
1194
1198
|
disabled={this.props.disabled}
|
|
1195
|
-
className={classNames(styles.value, {
|
|
1199
|
+
className={classNames(this.props.buttonClassName, styles.value, {
|
|
1196
1200
|
[styles.open]: this.state.showPopup,
|
|
1197
1201
|
[styles.label]: this._selectionIsEmpty()
|
|
1198
1202
|
})}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
:global(.ring-table__title_border::after) {
|
|
78
|
-
content:
|
|
78
|
+
content: "";
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
:global(.ring-table__title_nested) {
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
:global(.ring-table__column-list:not(:last-child)::after) {
|
|
242
|
-
content:
|
|
242
|
+
content: ", ";
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
:global(.ring-table__row) {
|
package/components/tag/tag.css
CHANGED
|
@@ -56,7 +56,10 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.tagAngled {
|
|
59
|
-
|
|
59
|
+
/* it needs to fix vertical alignment broken by "overflow: hidden". Remove this class, when IE11 will be deprecated */
|
|
60
|
+
|
|
61
|
+
margin-bottom: -5px !important;
|
|
62
|
+
|
|
60
63
|
margin-left: unit;
|
|
61
64
|
padding-left: calc(unit / 2);
|
|
62
65
|
|
|
@@ -73,7 +76,7 @@
|
|
|
73
76
|
width: 12px;
|
|
74
77
|
height: 12px;
|
|
75
78
|
|
|
76
|
-
content:
|
|
79
|
+
content: "";
|
|
77
80
|
transform: scaleY(1.177) rotate(45deg);
|
|
78
81
|
transform-origin: 0 0;
|
|
79
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.57",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"test-ci": "karma start karma-ci.conf.js",
|
|
56
56
|
"test-watch": "karma start karma-watch.conf.js",
|
|
57
57
|
"prerelease-ci": "git pull",
|
|
58
|
-
"release-ci": "lerna publish --yes",
|
|
58
|
+
"release-ci": "lerna publish --no-verify-access --yes",
|
|
59
59
|
"prepublishOnly": "pinst --disable",
|
|
60
60
|
"postpublish": "pinst --enable"
|
|
61
61
|
},
|
|
@@ -65,29 +65,29 @@
|
|
|
65
65
|
},
|
|
66
66
|
"readmeFilename": "README.md",
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@babel/cli": "^7.
|
|
69
|
-
"@babel/eslint-parser": "^7.
|
|
68
|
+
"@babel/cli": "^7.16.0",
|
|
69
|
+
"@babel/eslint-parser": "^7.16.0",
|
|
70
70
|
"@jetbrains/eslint-config": "^5.3.1",
|
|
71
|
-
"@jetbrains/generator-ring-ui": "^4.0.
|
|
72
|
-
"@jetbrains/stylelint-config": "^
|
|
73
|
-
"@primer/octicons": "^16.
|
|
74
|
-
"@storybook/addon-a11y": "6.3.
|
|
75
|
-
"@storybook/addon-docs": "6.3.
|
|
76
|
-
"@storybook/addon-essentials": "6.3.
|
|
71
|
+
"@jetbrains/generator-ring-ui": "^4.0.44",
|
|
72
|
+
"@jetbrains/stylelint-config": "^3.0.1",
|
|
73
|
+
"@primer/octicons": "^16.1.1",
|
|
74
|
+
"@storybook/addon-a11y": "6.3.12",
|
|
75
|
+
"@storybook/addon-docs": "6.3.12",
|
|
76
|
+
"@storybook/addon-essentials": "6.3.12",
|
|
77
77
|
"@storybook/addon-storyshots": "6.3.2",
|
|
78
78
|
"@storybook/addon-storyshots-puppeteer": "6.3.2",
|
|
79
|
-
"@storybook/addon-storysource": "6.3.
|
|
80
|
-
"@storybook/addons": "6.3.
|
|
79
|
+
"@storybook/addon-storysource": "6.3.12",
|
|
80
|
+
"@storybook/addons": "6.3.12",
|
|
81
81
|
"@storybook/builder-webpack5": "6.3.12",
|
|
82
82
|
"@storybook/client-api": "6.3.12",
|
|
83
|
-
"@storybook/core": "6.3.
|
|
84
|
-
"@storybook/html": "6.3.
|
|
85
|
-
"@storybook/manager-webpack5": "^6.3.
|
|
86
|
-
"@storybook/source-loader": "6.3.
|
|
87
|
-
"@storybook/theming": "6.3.
|
|
83
|
+
"@storybook/core": "6.3.12",
|
|
84
|
+
"@storybook/html": "6.3.12",
|
|
85
|
+
"@storybook/manager-webpack5": "^6.3.12",
|
|
86
|
+
"@storybook/source-loader": "6.3.12",
|
|
87
|
+
"@storybook/theming": "6.3.12",
|
|
88
88
|
"@testing-library/react": "^12.1.2",
|
|
89
|
-
"@testing-library/user-event": "^13.
|
|
90
|
-
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.
|
|
89
|
+
"@testing-library/user-event": "^13.5.0",
|
|
90
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.5",
|
|
91
91
|
"angular": "^1.8.2",
|
|
92
92
|
"angular-mocks": "^1.8.2",
|
|
93
93
|
"angular-route": "^1.8.2",
|
|
@@ -98,32 +98,32 @@
|
|
|
98
98
|
"chai-dom": "^1.10.0",
|
|
99
99
|
"chai-enzyme": "1.0.0-beta.1",
|
|
100
100
|
"cheerio": "^0.22.0",
|
|
101
|
-
"core-js": "^3.
|
|
101
|
+
"core-js": "^3.19.1",
|
|
102
102
|
"enzyme": "^3.11.0",
|
|
103
103
|
"eslint": "^7.32.0",
|
|
104
|
-
"eslint-import-resolver-webpack": "^0.13.
|
|
104
|
+
"eslint-import-resolver-webpack": "^0.13.2",
|
|
105
105
|
"eslint-plugin-angular": "^4.1.0",
|
|
106
106
|
"eslint-plugin-bdd": "^2.1.1",
|
|
107
|
-
"eslint-plugin-import": "^2.25.
|
|
107
|
+
"eslint-plugin-import": "^2.25.2",
|
|
108
108
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
109
109
|
"eslint-plugin-react": "^7.26.1",
|
|
110
110
|
"events": "^3.3.0",
|
|
111
|
-
"html-webpack-plugin": "^5.
|
|
112
|
-
"husky": "^7.0.
|
|
111
|
+
"html-webpack-plugin": "^5.5.0",
|
|
112
|
+
"husky": "^7.0.4",
|
|
113
113
|
"identity-obj-proxy": "^3.0.0",
|
|
114
|
-
"imports-loader": "^3.
|
|
115
|
-
"jest": "~27.
|
|
114
|
+
"imports-loader": "^3.1.1",
|
|
115
|
+
"jest": "~27.3.1",
|
|
116
116
|
"jest-teamcity": "^1.10.0",
|
|
117
|
-
"karma": "^6.3.
|
|
117
|
+
"karma": "^6.3.8",
|
|
118
118
|
"karma-chrome-launcher": "3.1.0",
|
|
119
119
|
"karma-mocha": "^2.0.1",
|
|
120
120
|
"karma-sourcemap-loader": "^0.3.8",
|
|
121
121
|
"karma-teamcity-reporter": "^2.0.0",
|
|
122
122
|
"karma-webpack": "^5.0.0",
|
|
123
123
|
"lerna": "^4.0.0",
|
|
124
|
-
"lint-staged": "^11.2.
|
|
124
|
+
"lint-staged": "^11.2.6",
|
|
125
125
|
"merge-options": "^3.0.4",
|
|
126
|
-
"mocha": "^9.1.
|
|
126
|
+
"mocha": "^9.1.3",
|
|
127
127
|
"pinst": "^2.1.6",
|
|
128
128
|
"puppeteer": "^10.4.0",
|
|
129
129
|
"raw-loader": "^4.0.2",
|
|
@@ -131,16 +131,16 @@
|
|
|
131
131
|
"react-dom": "^17.0.2",
|
|
132
132
|
"react-test-renderer": "^17.0.2",
|
|
133
133
|
"regenerator-runtime": "^0.13.9",
|
|
134
|
-
"sinon": "^
|
|
134
|
+
"sinon": "^12.0.1",
|
|
135
135
|
"sinon-chai": "^3.7.0",
|
|
136
136
|
"storage-mock": "^2.1.0",
|
|
137
|
-
"stylelint": "^
|
|
137
|
+
"stylelint": "^14.0.1",
|
|
138
138
|
"svg-inline-loader": "^0.8.2",
|
|
139
139
|
"teamcity-service-messages": "^0.1.11",
|
|
140
140
|
"terser-webpack-plugin": "^5.2.4",
|
|
141
141
|
"wallaby-webpack": "^3.9.16",
|
|
142
|
-
"webpack": "^5.
|
|
143
|
-
"webpack-cli": "^4.9.
|
|
142
|
+
"webpack": "^5.62.1",
|
|
143
|
+
"webpack-cli": "^4.9.1",
|
|
144
144
|
"xmlappend": "^1.0.4",
|
|
145
145
|
"yo": "^4.3.0"
|
|
146
146
|
},
|
|
@@ -148,17 +148,17 @@
|
|
|
148
148
|
"core-js": ">=3.0.0",
|
|
149
149
|
"react": ">=16.8.0",
|
|
150
150
|
"react-dom": ">=16.8.0",
|
|
151
|
-
"webpack": "^5.
|
|
151
|
+
"webpack": "^5.62.1"
|
|
152
152
|
},
|
|
153
153
|
"dependencies": {
|
|
154
|
-
"@babel/core": "^7.
|
|
154
|
+
"@babel/core": "^7.16.0",
|
|
155
155
|
"@jetbrains/angular-elastic": "^2.5.1",
|
|
156
156
|
"@jetbrains/babel-preset-jetbrains": "^2.3.1",
|
|
157
|
-
"@jetbrains/icons": "^3.
|
|
158
|
-
"@jetbrains/logos": "^1.4.
|
|
157
|
+
"@jetbrains/icons": "^3.18.0",
|
|
158
|
+
"@jetbrains/logos": "^1.4.25",
|
|
159
159
|
"@jetbrains/postcss-require-hover": "^0.1.2",
|
|
160
160
|
"@ungap/url-search-params": "^0.2.2",
|
|
161
|
-
"babel-loader": "^8.2.
|
|
161
|
+
"babel-loader": "^8.2.3",
|
|
162
162
|
"babel-plugin-transform-define": "^2.0.1",
|
|
163
163
|
"browserslist": "^4.16.6",
|
|
164
164
|
"change-case": "^4.1.1",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"combokeys": "^3.0.1",
|
|
167
167
|
"compile-code-loader": "^1.0.0",
|
|
168
168
|
"conic-gradient": "^1.0.0",
|
|
169
|
-
"css-loader": "^6.
|
|
169
|
+
"css-loader": "^6.5.1",
|
|
170
170
|
"date-fns": "^2.25.0",
|
|
171
171
|
"deep-equal": "^2.0.4",
|
|
172
172
|
"element-resize-detector": "^1.2.3",
|
|
@@ -178,28 +178,28 @@
|
|
|
178
178
|
"focus-trap": "^6.7.1",
|
|
179
179
|
"focus-visible": "^5.2.0",
|
|
180
180
|
"highlight.js": "^10.7.2",
|
|
181
|
-
"html-loader": "^
|
|
181
|
+
"html-loader": "^3.0.1",
|
|
182
182
|
"interpolate-loader": "^2.0.1",
|
|
183
|
-
"just-debounce-it": "^1.
|
|
184
|
-
"memoize-one": "^
|
|
185
|
-
"postcss": "^8.3.
|
|
183
|
+
"just-debounce-it": "^2.1.1",
|
|
184
|
+
"memoize-one": "^6.0.0",
|
|
185
|
+
"postcss": "^8.3.11",
|
|
186
186
|
"postcss-calc": "^8.0.0",
|
|
187
187
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
188
188
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
189
|
-
"postcss-loader": "^6.
|
|
189
|
+
"postcss-loader": "^6.2.0",
|
|
190
190
|
"postcss-modules-values-replace": "^3.4.0",
|
|
191
191
|
"postcss-preset-env": "^6.7.0",
|
|
192
192
|
"prop-types": "^15.7.2",
|
|
193
193
|
"react-markdown": "^5.0.3",
|
|
194
|
-
"react-movable": "^
|
|
194
|
+
"react-movable": "^3.0.2",
|
|
195
195
|
"react-virtualized": "^9.22.3",
|
|
196
196
|
"react-waypoint": "^10.1.0",
|
|
197
|
-
"remark-breaks": "^3.0.
|
|
197
|
+
"remark-breaks": "^3.0.2",
|
|
198
198
|
"remark-gfm": "^1.0.0",
|
|
199
199
|
"scrollbar-width": "^3.1.1",
|
|
200
200
|
"simply-uuid": "^1.0.1",
|
|
201
201
|
"sniffr": "^1.2.0",
|
|
202
|
-
"style-loader": "~3.3.
|
|
202
|
+
"style-loader": "~3.3.1",
|
|
203
203
|
"url-loader": "^4.1.1",
|
|
204
204
|
"util-deprecate": "^1.0.2"
|
|
205
205
|
},
|
|
@@ -207,5 +207,5 @@
|
|
|
207
207
|
"node": ">=7.4",
|
|
208
208
|
"npm": ">=6.0.0"
|
|
209
209
|
},
|
|
210
|
-
"gitHead": "
|
|
210
|
+
"gitHead": "736f0f0c8252b75e92b902a12cea670c864787ad"
|
|
211
211
|
}
|