@jetbrains/ring-ui 7.0.118 → 7.0.120
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/alert-actions.d.ts +4 -0
- package/components/alert/alert-actions.js +5 -0
- package/components/alert/alert-heading.d.ts +4 -0
- package/components/alert/alert-heading.js +6 -0
- package/components/alert/alert.css +63 -22
- package/components/alert/alert.d.ts +14 -1
- package/components/alert/alert.js +34 -19
- package/components/alert/container.css +1 -2
- package/components/alert-service/alert-service.d.ts +2 -1
- package/components/alert-service/alert-service.js +8 -4
- package/components/button-group/button-group.css +5 -5
- package/components/date-picker/consts.d.ts +1 -0
- package/components/date-picker/date-input.js +6 -2
- package/components/header/header.css +3 -3
- package/components/i18n/i18n.d.ts +1 -0
- package/components/i18n/messages.json +1 -0
- package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import Heading, { Levels } from '../heading/heading';
|
|
3
|
+
import styles from './alert.css';
|
|
4
|
+
export default function AlertHeading({ level = Levels.H3, className, ...restProps }) {
|
|
5
|
+
return <Heading level={level} className={classNames(styles.heading, className)} {...restProps}/>;
|
|
6
|
+
}
|
|
@@ -8,11 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: baseline;
|
|
11
|
+
gap: var(--ring-unit);
|
|
11
12
|
|
|
12
13
|
box-sizing: border-box;
|
|
13
|
-
|
|
14
|
+
width: calc(var(--ring-unit) * 45);
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
min-height: calc(var(--ring-unit) * 5.5);
|
|
14
17
|
margin: var(--ring-unit) auto;
|
|
15
|
-
padding:
|
|
18
|
+
padding: calc(var(--ring-unit) * 1.5);
|
|
16
19
|
|
|
17
20
|
transition:
|
|
18
21
|
transform var(--ring-alert-animation-duration) var(--ring-alert-animation-easing),
|
|
@@ -21,16 +24,18 @@
|
|
|
21
24
|
white-space: nowrap;
|
|
22
25
|
pointer-events: auto;
|
|
23
26
|
|
|
24
|
-
border-radius: var(--ring-border-radius);
|
|
27
|
+
border-radius: var(--ring-border-radius-large);
|
|
25
28
|
background-color: var(--ring-popup-background-color);
|
|
26
29
|
box-shadow: var(--ring-popup-shadow);
|
|
27
30
|
|
|
28
31
|
font-size: var(--ring-font-size);
|
|
29
|
-
line-height:
|
|
32
|
+
line-height: 20px;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
.alertInline {
|
|
33
36
|
margin: var(--ring-unit);
|
|
37
|
+
/* Keep the margin box within narrow parents despite the fixed width */
|
|
38
|
+
max-width: calc(100% - var(--ring-unit) * 2);
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
.error {
|
|
@@ -39,26 +44,42 @@
|
|
|
39
44
|
color: var(--ring-error-color);
|
|
40
45
|
}
|
|
41
46
|
|
|
42
|
-
.icon {
|
|
43
|
-
|
|
47
|
+
.error .icon {
|
|
48
|
+
color: var(--ring-icon-error-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.success .icon {
|
|
52
|
+
color: var(--ring-icon-success-color);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.warning .icon {
|
|
56
|
+
color: var(--ring-icon-warning-color);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.info .icon {
|
|
60
|
+
color: var(--ring-link-color);
|
|
44
61
|
}
|
|
45
62
|
|
|
46
63
|
.caption {
|
|
47
64
|
overflow: hidden;
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
flex-grow: 1;
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
min-width: 0;
|
|
52
69
|
|
|
53
70
|
white-space: normal;
|
|
54
71
|
|
|
55
72
|
color: var(--ring-active-text-color);
|
|
73
|
+
}
|
|
56
74
|
|
|
57
|
-
|
|
75
|
+
.afterMessage {
|
|
76
|
+
overflow: hidden;
|
|
58
77
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
78
|
+
min-width: 0;
|
|
79
|
+
|
|
80
|
+
white-space: normal;
|
|
81
|
+
|
|
82
|
+
color: var(--ring-active-text-color);
|
|
62
83
|
}
|
|
63
84
|
|
|
64
85
|
.badge {
|
|
@@ -68,21 +89,17 @@
|
|
|
68
89
|
}
|
|
69
90
|
|
|
70
91
|
.loader {
|
|
71
|
-
top:
|
|
92
|
+
top: 3px;
|
|
72
93
|
|
|
73
|
-
margin-
|
|
94
|
+
margin-top: -1px;
|
|
74
95
|
}
|
|
75
96
|
|
|
97
|
+
/* Padding restores a comfortable hit target around the bare 16px glyph
|
|
98
|
+
of the inline icon-only Button; negative margin keeps the glyph where
|
|
99
|
+
the flex layout would put it without the padding */
|
|
76
100
|
.close.close {
|
|
77
|
-
|
|
78
|
-
top: 2px;
|
|
79
|
-
right: 0;
|
|
80
|
-
|
|
81
|
-
margin: calc(var(--ring-unit) / 2);
|
|
101
|
+
margin: calc(var(--ring-unit) * -1);
|
|
82
102
|
padding: var(--ring-unit);
|
|
83
|
-
|
|
84
|
-
font-size: 0;
|
|
85
|
-
line-height: 0;
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
@keyframes show {
|
|
@@ -135,5 +152,29 @@
|
|
|
135
152
|
|
|
136
153
|
.animationShaking {
|
|
137
154
|
animation-name: shaking;
|
|
155
|
+
|
|
138
156
|
animation-duration: 500ms;
|
|
139
157
|
}
|
|
158
|
+
|
|
159
|
+
/* Doubled to override the Heading component's level-based styles, so the
|
|
160
|
+
level prop stays semantic and doesn't change the alert design: Heading's
|
|
161
|
+
:is(hN) selectors have higher specificity than a single class */
|
|
162
|
+
.heading.heading {
|
|
163
|
+
margin: 0 0 calc(var(--ring-unit) / 2);
|
|
164
|
+
|
|
165
|
+
letter-spacing: normal;
|
|
166
|
+
text-transform: none;
|
|
167
|
+
|
|
168
|
+
color: inherit;
|
|
169
|
+
|
|
170
|
+
font-size: var(--ring-font-size);
|
|
171
|
+
font-weight: var(--ring-font-weight-bold);
|
|
172
|
+
line-height: var(--ring-line-height);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.actions {
|
|
176
|
+
display: flex;
|
|
177
|
+
gap: calc(var(--ring-unit)*2);
|
|
178
|
+
|
|
179
|
+
margin: calc(var(--ring-unit) * 2) 0 calc(var(--ring-unit) / 2);
|
|
180
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PureComponent, type ReactNode } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import Theme from '../global/theme';
|
|
4
|
+
import AlertHeading from './alert-heading';
|
|
5
|
+
import AlertActions from './alert-actions';
|
|
4
6
|
export declare const ANIMATION_TIME = 500;
|
|
5
7
|
/**
|
|
6
8
|
* @name Alert
|
|
@@ -14,8 +16,16 @@ export declare enum AlertType {
|
|
|
14
16
|
MESSAGE = "message",
|
|
15
17
|
SUCCESS = "success",
|
|
16
18
|
WARNING = "warning",
|
|
17
|
-
LOADING = "loading"
|
|
19
|
+
LOADING = "loading",
|
|
20
|
+
INFO = "info"
|
|
18
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Maps the values React renders as nothing (except empty arrays/fragments,
|
|
24
|
+
* which are not worth chasing here) to undefined, so that they neither create
|
|
25
|
+
* the afterMessage wrapper nor distinguish alerts in the alert-service
|
|
26
|
+
* duplicate check
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeAfterMessage(afterMessage: ReactNode): ReactNode;
|
|
19
29
|
export interface AlertProps {
|
|
20
30
|
theme: Theme;
|
|
21
31
|
timeout: number;
|
|
@@ -39,6 +49,7 @@ export interface AlertProps {
|
|
|
39
49
|
captionClassName?: string | null | undefined;
|
|
40
50
|
closeButtonClassName?: string | null | undefined;
|
|
41
51
|
'data-test'?: string | null | undefined;
|
|
52
|
+
afterMessage?: ReactNode;
|
|
42
53
|
}
|
|
43
54
|
interface State {
|
|
44
55
|
height: number | null;
|
|
@@ -74,6 +85,8 @@ export default class Alert extends PureComponent<AlertProps, State> {
|
|
|
74
85
|
node?: HTMLDivElement | null;
|
|
75
86
|
hideTimeout?: number;
|
|
76
87
|
static Type: typeof AlertType;
|
|
88
|
+
static Heading: typeof AlertHeading;
|
|
89
|
+
static Actions: typeof AlertActions;
|
|
77
90
|
closeRequest: (event: React.MouseEvent<HTMLElement>) => void;
|
|
78
91
|
startCloseAnimation: () => void;
|
|
79
92
|
private _close;
|
|
@@ -2,15 +2,18 @@ import { PureComponent } from 'react';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import exceptionIcon from '@jetbrains/icons/exception';
|
|
5
|
-
import
|
|
5
|
+
import successIcon from '@jetbrains/icons/success';
|
|
6
6
|
import warningIcon from '@jetbrains/icons/warning';
|
|
7
|
+
import infoIcon from '@jetbrains/icons/info-filled';
|
|
7
8
|
import closeIcon from '@jetbrains/icons/close';
|
|
8
|
-
import Icon
|
|
9
|
+
import Icon from '../icon/icon';
|
|
9
10
|
import Loader from '../loader-inline/loader-inline';
|
|
10
11
|
import { getRect } from '../global/dom';
|
|
11
12
|
import dataTests from '../global/data-tests';
|
|
12
13
|
import Button from '../button/button';
|
|
13
14
|
import Theme, { ThemeProvider } from '../global/theme';
|
|
15
|
+
import AlertHeading from './alert-heading';
|
|
16
|
+
import AlertActions from './alert-actions';
|
|
14
17
|
import styles from './alert.css';
|
|
15
18
|
export const ANIMATION_TIME = 500;
|
|
16
19
|
/**
|
|
@@ -27,6 +30,7 @@ export var AlertType;
|
|
|
27
30
|
AlertType["SUCCESS"] = "success";
|
|
28
31
|
AlertType["WARNING"] = "warning";
|
|
29
32
|
AlertType["LOADING"] = "loading";
|
|
33
|
+
AlertType["INFO"] = "info";
|
|
30
34
|
})(AlertType || (AlertType = {}));
|
|
31
35
|
/**
|
|
32
36
|
* Lookup table of alert type to icon modifier.
|
|
@@ -34,18 +38,19 @@ export var AlertType;
|
|
|
34
38
|
*/
|
|
35
39
|
const TypeToIcon = {
|
|
36
40
|
[AlertType.ERROR]: exceptionIcon,
|
|
37
|
-
[AlertType.SUCCESS]:
|
|
41
|
+
[AlertType.SUCCESS]: successIcon,
|
|
38
42
|
[AlertType.WARNING]: warningIcon,
|
|
43
|
+
[AlertType.INFO]: infoIcon,
|
|
39
44
|
};
|
|
40
45
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
46
|
+
* Maps the values React renders as nothing (except empty arrays/fragments,
|
|
47
|
+
* which are not worth chasing here) to undefined, so that they neither create
|
|
48
|
+
* the afterMessage wrapper nor distinguish alerts in the alert-service
|
|
49
|
+
* duplicate check
|
|
43
50
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
[AlertType.WARNING]: Color.WHITE,
|
|
48
|
-
};
|
|
51
|
+
export function normalizeAfterMessage(afterMessage) {
|
|
52
|
+
return afterMessage == null || typeof afterMessage === 'boolean' || afterMessage === '' ? undefined : afterMessage;
|
|
53
|
+
}
|
|
49
54
|
/**
|
|
50
55
|
* @constructor
|
|
51
56
|
* @name Alert
|
|
@@ -87,6 +92,8 @@ export default class Alert extends PureComponent {
|
|
|
87
92
|
node;
|
|
88
93
|
hideTimeout;
|
|
89
94
|
static Type = AlertType;
|
|
95
|
+
static Heading = AlertHeading;
|
|
96
|
+
static Actions = AlertActions;
|
|
90
97
|
closeRequest = (event) => {
|
|
91
98
|
this.startCloseAnimation();
|
|
92
99
|
return this.props.onCloseRequest(event);
|
|
@@ -106,7 +113,8 @@ export default class Alert extends PureComponent {
|
|
|
106
113
|
* @private
|
|
107
114
|
*/
|
|
108
115
|
_handleCaptionsLinksClick = (evt) => {
|
|
109
|
-
|
|
116
|
+
const link = evt.target instanceof Element ? evt.target.closest('a') : null;
|
|
117
|
+
if (link != null && evt.currentTarget.contains(link)) {
|
|
110
118
|
this.closeRequest(evt);
|
|
111
119
|
}
|
|
112
120
|
};
|
|
@@ -114,13 +122,11 @@ export default class Alert extends PureComponent {
|
|
|
114
122
|
* @private
|
|
115
123
|
*/
|
|
116
124
|
_getCaption() {
|
|
117
|
-
return (<
|
|
118
|
-
[styles.withCloseButton]: this.props.closeable,
|
|
119
|
-
})} onClick={this._handleCaptionsLinksClick}
|
|
125
|
+
return (<div className={classNames(styles.caption, this.props.captionClassName)} onClick={this._handleCaptionsLinksClick}
|
|
120
126
|
// We only process clicks on `a` elements, see above
|
|
121
127
|
role='presentation'>
|
|
122
128
|
{this.props.children}
|
|
123
|
-
</
|
|
129
|
+
</div>);
|
|
124
130
|
}
|
|
125
131
|
/**
|
|
126
132
|
* @private
|
|
@@ -129,7 +135,7 @@ export default class Alert extends PureComponent {
|
|
|
129
135
|
_getIcon() {
|
|
130
136
|
const glyph = TypeToIcon[this.props.type];
|
|
131
137
|
if (glyph) {
|
|
132
|
-
return <Icon glyph={glyph} className={styles.icon}
|
|
138
|
+
return <Icon glyph={glyph} className={styles.icon}/>;
|
|
133
139
|
}
|
|
134
140
|
if (this.props.type === AlertType.LOADING) {
|
|
135
141
|
return <Loader className={styles.loader}/>;
|
|
@@ -140,21 +146,30 @@ export default class Alert extends PureComponent {
|
|
|
140
146
|
this.node = node;
|
|
141
147
|
};
|
|
142
148
|
render() {
|
|
143
|
-
const { type, inline, isClosing, isShaking, closeButtonClassName, showWithAnimation, className, 'data-test': dataTest, theme, } = this.props;
|
|
149
|
+
const { type, inline, isClosing, isShaking, closeButtonClassName, showWithAnimation, className, 'data-test': dataTest, theme, afterMessage, } = this.props;
|
|
144
150
|
const classes = classNames(className, {
|
|
145
151
|
[styles.alert]: true,
|
|
146
152
|
[styles.animationOpen]: showWithAnimation,
|
|
147
|
-
[styles.error]: type ===
|
|
153
|
+
[styles.error]: type === AlertType.ERROR,
|
|
154
|
+
[styles.success]: type === AlertType.SUCCESS,
|
|
155
|
+
[styles.warning]: type === AlertType.WARNING,
|
|
156
|
+
[styles.info]: type === AlertType.INFO,
|
|
148
157
|
[styles.alertInline]: inline,
|
|
149
158
|
[styles.animationClosing]: isClosing,
|
|
150
159
|
[styles.animationShaking]: isShaking,
|
|
151
160
|
});
|
|
152
161
|
const height = this.state.height;
|
|
153
162
|
const style = height ? { marginBottom: -height } : undefined;
|
|
163
|
+
const shownAfterMessage = normalizeAfterMessage(afterMessage);
|
|
154
164
|
return (<ThemeProvider theme={theme} className={classes} data-test={dataTests('alert', dataTest)} data-test-type={type} style={style} ref={this.storeAlertRef}>
|
|
155
165
|
{this._getIcon()}
|
|
156
166
|
{this._getCaption()}
|
|
157
|
-
{
|
|
167
|
+
{shownAfterMessage != null && (<div className={styles.afterMessage} onClick={this._handleCaptionsLinksClick}
|
|
168
|
+
// We only process clicks on `a` elements, see above
|
|
169
|
+
role='presentation'>
|
|
170
|
+
{shownAfterMessage}
|
|
171
|
+
</div>)}
|
|
172
|
+
{this.props.closeable ? (<Button icon={closeIcon} className={classNames(styles.close, closeButtonClassName)} data-test='alert-close' aria-label='close alert' onClick={this.closeRequest}/>) : null}
|
|
158
173
|
</ThemeProvider>);
|
|
159
174
|
}
|
|
160
175
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
align-items: flex-end;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
|
|
14
|
+
max-width: calc(100vw - var(--ring-unit) * 4);
|
|
14
15
|
max-height: calc(100vh - 2 * var(--ring-unit));
|
|
15
16
|
|
|
16
17
|
pointer-events: none;
|
|
@@ -24,7 +25,5 @@
|
|
|
24
25
|
|
|
25
26
|
overflow-y: auto;
|
|
26
27
|
|
|
27
|
-
min-width: calc(var(--ring-unit) * 30);
|
|
28
|
-
max-width: calc(var(--ring-unit) * 50);
|
|
29
28
|
margin-top: 0;
|
|
30
29
|
}
|
|
@@ -20,7 +20,7 @@ export declare class AlertService {
|
|
|
20
20
|
* Renders alert container into virtual node to skip maintaining container
|
|
21
21
|
*/
|
|
22
22
|
renderAlerts(): void;
|
|
23
|
-
findSameAlert(message: ReactNode, type: AlertType | undefined): AlertItem;
|
|
23
|
+
findSameAlert(message: ReactNode, type: AlertType | undefined, afterMessage?: ReactNode): AlertItem | undefined;
|
|
24
24
|
startAlertClosing(alert: AlertItem): void;
|
|
25
25
|
remove(key: string | number | null | undefined): void;
|
|
26
26
|
removeWithoutAnimation(key: string | number): void;
|
|
@@ -31,6 +31,7 @@ export declare class AlertService {
|
|
|
31
31
|
message(message: ReactNode, timeout?: number): string | number;
|
|
32
32
|
warning(message: ReactNode, timeout?: number): string | number;
|
|
33
33
|
successMessage(message: ReactNode, timeout?: number): string | number;
|
|
34
|
+
infoMessage(message: ReactNode, timeout?: number): string | number;
|
|
34
35
|
loadingMessage(message: ReactNode, timeout?: number): string | number;
|
|
35
36
|
}
|
|
36
37
|
declare const alertService: AlertService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRoot } from 'react-dom/client';
|
|
2
2
|
import getUID from '../global/get-uid';
|
|
3
|
-
import Alert, { ANIMATION_TIME, Container as AlertContainer } from '../alert/alert';
|
|
3
|
+
import Alert, { ANIMATION_TIME, Container as AlertContainer, normalizeAfterMessage, } from '../alert/alert';
|
|
4
4
|
export const DEFAULT_ALERT_TIMEOUT = 10000; // 10 seconds
|
|
5
5
|
/**
|
|
6
6
|
* @name Alert Service
|
|
@@ -33,8 +33,9 @@ export class AlertService {
|
|
|
33
33
|
renderAlerts() {
|
|
34
34
|
this.reactRoot.render(this.renderAlertContainer(this.showingAlerts));
|
|
35
35
|
}
|
|
36
|
-
findSameAlert(message, type) {
|
|
37
|
-
|
|
36
|
+
findSameAlert(message, type, afterMessage) {
|
|
37
|
+
const normalizedAfterMessage = normalizeAfterMessage(afterMessage);
|
|
38
|
+
return this.showingAlerts.find(it => it.type === type && it.message === message && normalizeAfterMessage(it.afterMessage) === normalizedAfterMessage);
|
|
38
39
|
}
|
|
39
40
|
startAlertClosing(alert) {
|
|
40
41
|
alert.isClosing = true;
|
|
@@ -60,7 +61,7 @@ export class AlertService {
|
|
|
60
61
|
}
|
|
61
62
|
addAlert(message, type, timeout = this.defaultTimeout, options = {}) {
|
|
62
63
|
const { onCloseRequest, onClose, ...restOptions } = options;
|
|
63
|
-
const sameAlert = this.findSameAlert(message, type);
|
|
64
|
+
const sameAlert = this.findSameAlert(message, type, options.afterMessage);
|
|
64
65
|
if (sameAlert) {
|
|
65
66
|
sameAlert.isShaking = true;
|
|
66
67
|
this.renderAlerts();
|
|
@@ -102,6 +103,9 @@ export class AlertService {
|
|
|
102
103
|
successMessage(message, timeout) {
|
|
103
104
|
return this.addAlert(message, Alert.Type.SUCCESS, timeout);
|
|
104
105
|
}
|
|
106
|
+
infoMessage(message, timeout) {
|
|
107
|
+
return this.addAlert(message, Alert.Type.INFO, timeout);
|
|
108
|
+
}
|
|
105
109
|
loadingMessage(message, timeout) {
|
|
106
110
|
return this.addAlert(message, Alert.Type.LOADING, timeout);
|
|
107
111
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import '../global/variables.css';
|
|
2
2
|
|
|
3
|
-
@value button, active, flat from '../button/button.css';
|
|
3
|
+
@value button, active as buttonActive, flat from '../button/button.css';
|
|
4
4
|
|
|
5
5
|
:root,
|
|
6
6
|
:host {
|
|
@@ -133,14 +133,14 @@
|
|
|
133
133
|
0 0 0 1px var(--ring-border-hover-color);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.buttonGroup .button.button.
|
|
136
|
+
.buttonGroup .button.button.buttonActive {
|
|
137
137
|
--ring-button-border-radius-left: var(--ring-border-radius);
|
|
138
138
|
--ring-button-border-radius-right: var(--ring-border-radius);
|
|
139
139
|
|
|
140
140
|
box-shadow: var(--ring-button-shadow) var(--ring-button-border-color);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.buttonGroup .button:focus-visible.
|
|
143
|
+
.buttonGroup .button:focus-visible.buttonActive {
|
|
144
144
|
--ring-button-border-radius-left: var(--ring-border-radius);
|
|
145
145
|
--ring-button-border-radius-right: var(--ring-border-radius);
|
|
146
146
|
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
0 0 0 1px var(--ring-border-hover-color);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
.buttonGroup .button.
|
|
152
|
+
.buttonGroup .button.buttonActive[disabled] {
|
|
153
153
|
box-shadow: var(--ring-button-shadow) var(--ring-border-hover-color);
|
|
154
154
|
}
|
|
155
155
|
/* stylelint-enable */
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
& .
|
|
243
|
+
& .buttonActive {
|
|
244
244
|
z-index: var(--ring-button-group-active-z-index);
|
|
245
245
|
|
|
246
246
|
&[disabled] {
|
|
@@ -47,7 +47,7 @@ export default class DateInput extends React.PureComponent {
|
|
|
47
47
|
};
|
|
48
48
|
render() {
|
|
49
49
|
const { active, divider, text, time, name, hoverDate, date, displayFormat, translations, onActivate, onClear, fromPlaceholder, toPlaceholder, timePlaceholder, locale, } = this.props;
|
|
50
|
-
const { translate } = this.context;
|
|
50
|
+
const { messages, translate } = this.context;
|
|
51
51
|
let displayText = '';
|
|
52
52
|
if (active && hoverDate) {
|
|
53
53
|
displayText = displayFormat(hoverDate, locale);
|
|
@@ -70,7 +70,11 @@ export default class DateInput extends React.PureComponent {
|
|
|
70
70
|
case 'time':
|
|
71
71
|
return timePlaceholder || (translations?.addTime ?? translate('addTime'));
|
|
72
72
|
default:
|
|
73
|
-
return (translations?.
|
|
73
|
+
return (translations?.selectDate ??
|
|
74
|
+
translations?.selectName ??
|
|
75
|
+
messages.selectDate ??
|
|
76
|
+
messages.selectName ??
|
|
77
|
+
translate('selectDate'))
|
|
74
78
|
.replace('%name%', name)
|
|
75
79
|
.replace('{{name}}', name);
|
|
76
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import '../global/variables.css';
|
|
2
2
|
|
|
3
|
-
@value link, active from '../link/link.css';
|
|
3
|
+
@value link, active as linkActive from '../link/link.css';
|
|
4
4
|
|
|
5
5
|
:root,
|
|
6
6
|
:host {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
color: var(--ring-header-link-color);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
& .
|
|
44
|
+
& .linkActive {
|
|
45
45
|
color: var(--ring-active-text-color);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
color: var(--ring-header-link-color);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
& .
|
|
75
|
+
& .linkActive {
|
|
76
76
|
color: var(--ring-active-text-color);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -10,6 +10,6 @@ export default class SmartUserCardTooltip extends Component<SmartUserCardTooltip
|
|
|
10
10
|
loading: boolean;
|
|
11
11
|
};
|
|
12
12
|
loadUser: () => Promise<void>;
|
|
13
|
-
renderNoUser: () =>
|
|
13
|
+
renderNoUser: () => import("react").JSX.Element | "";
|
|
14
14
|
render(): import("react").JSX.Element;
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.120",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@types/react": "^19.2.17",
|
|
133
133
|
"@types/react-dom": "^19.2.3",
|
|
134
134
|
"@types/webpack-env": "^1.18.8",
|
|
135
|
-
"@vitejs/plugin-react": "^6.0.
|
|
135
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
136
136
|
"@vitest/eslint-plugin": "^1.6.20",
|
|
137
137
|
"acorn": "^8.17.0",
|
|
138
138
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
@@ -155,10 +155,10 @@
|
|
|
155
155
|
"eslint-plugin-react": "^7.37.5",
|
|
156
156
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
157
157
|
"eslint-plugin-storybook": "^10.4.6",
|
|
158
|
-
"eslint-plugin-unicorn": "^
|
|
158
|
+
"eslint-plugin-unicorn": "^70.0.0",
|
|
159
159
|
"events": "^3.3.0",
|
|
160
160
|
"glob": "^13.0.6",
|
|
161
|
-
"globals": "^17.
|
|
161
|
+
"globals": "^17.7.0",
|
|
162
162
|
"html-webpack-plugin": "^5.6.7",
|
|
163
163
|
"http-server": "^14.1.1",
|
|
164
164
|
"husky": "^9.1.7",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"markdown-it": "^14.2.0",
|
|
171
171
|
"merge-options": "^3.0.4",
|
|
172
172
|
"pinst": "^3.0.0",
|
|
173
|
-
"prettier": "^3.
|
|
173
|
+
"prettier": "^3.9.4",
|
|
174
174
|
"raw-loader": "^4.0.2",
|
|
175
175
|
"react": "^19.2.7",
|
|
176
176
|
"react-dom": "^19.2.7",
|
|
@@ -180,19 +180,19 @@
|
|
|
180
180
|
"rollup-plugin-clear": "^2.0.7",
|
|
181
181
|
"storage-mock": "^2.1.0",
|
|
182
182
|
"storybook": "10.4.6",
|
|
183
|
-
"stylelint": "^17.
|
|
183
|
+
"stylelint": "^17.14.0",
|
|
184
184
|
"stylelint-config-sass-guidelines": "^13.0.0",
|
|
185
185
|
"svg-inline-loader": "^0.8.2",
|
|
186
186
|
"teamcity-service-messages": "^0.1.14",
|
|
187
187
|
"terser-webpack-plugin": "^5.6.1",
|
|
188
188
|
"typed-css-modules": "^0.9.1",
|
|
189
189
|
"typescript": "~6.0.3",
|
|
190
|
-
"typescript-eslint": "^8.
|
|
191
|
-
"vite": "^8.0
|
|
190
|
+
"typescript-eslint": "^8.62.1",
|
|
191
|
+
"vite": "^8.1.0",
|
|
192
192
|
"vitest": "^4.1.9",
|
|
193
193
|
"vitest-teamcity-reporter": "^0.4.1",
|
|
194
|
-
"webpack": "^5.
|
|
195
|
-
"webpack-cli": "^7.0
|
|
194
|
+
"webpack": "^5.108.1",
|
|
195
|
+
"webpack-cli": "^7.1.0",
|
|
196
196
|
"xmlappend": "^1.0.4"
|
|
197
197
|
},
|
|
198
198
|
"peerDependencies": {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"babel-loader": "10.1.1",
|
|
228
228
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
229
229
|
"babel-plugin-transform-define": "^2.1.4",
|
|
230
|
-
"browserslist": "^4.28.
|
|
230
|
+
"browserslist": "^4.28.4",
|
|
231
231
|
"change-case": "^4.1.1",
|
|
232
232
|
"classnames": "^2.5.1",
|
|
233
233
|
"combokeys": "^3.0.1",
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"element-resize-detector": "^1.2.4",
|
|
239
239
|
"fastdom": "^1.0.12",
|
|
240
240
|
"file-loader": "^6.2.0",
|
|
241
|
-
"focus-trap": "^8.2.
|
|
241
|
+
"focus-trap": "^8.2.2",
|
|
242
242
|
"highlight.js": "^10.7.2",
|
|
243
243
|
"just-debounce-it": "^3.2.0",
|
|
244
244
|
"memoize-one": "^6.0.0",
|