@jetbrains/ring-ui 7.0.30 → 7.0.31
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,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
color: var(--ring-text-color);
|
|
11
11
|
|
|
12
|
-
font-family: -
|
|
12
|
+
font-family: system-ui, Ubuntu, "Helvetica Neue", Arial, sans-serif;
|
|
13
13
|
font-size: var(--ring-font-size-larger);
|
|
14
14
|
line-height: calc(2.5 * var(--ring-unit));
|
|
15
15
|
}
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
+
:root {
|
|
4
|
+
--ring-tooltip-background-color: var(--ring-content-background-color);
|
|
5
|
+
--ring-tooltip-text-color: var(--ring-text-color);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:global(.ring-ui-theme-dark) {
|
|
9
|
+
--ring-tooltip-background-color: var(--ring-tag-background-color);
|
|
10
|
+
--ring-tooltip-text-color: var(--ring-white-text-color);
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
.tooltip {
|
|
4
14
|
max-width: calc(var(--ring-unit) * 50);
|
|
5
|
-
padding: var(--ring-unit);
|
|
15
|
+
padding: 6px var(--ring-unit);
|
|
6
16
|
|
|
7
17
|
text-align: left;
|
|
8
18
|
|
|
19
|
+
color: var(--ring-tooltip-text-color);
|
|
20
|
+
border-color: var(--ring-line-color);
|
|
21
|
+
background-color: var(--ring-tooltip-background-color);
|
|
22
|
+
box-shadow: 0 2px 8px var(--ring-popup-shadow-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.inheritedTheme {
|
|
9
26
|
color: var(--ring-text-color);
|
|
27
|
+
background-color: var(--ring-content-background-color);
|
|
28
|
+
box-shadow: var(--ring-popup-shadow);
|
|
10
29
|
}
|
|
11
30
|
|
|
12
31
|
.long {
|
|
13
|
-
padding: var(--ring-unit) calc(var(--ring-unit) * 1.5);
|
|
14
|
-
|
|
15
32
|
font-size: var(--ring-font-size-smaller);
|
|
16
33
|
line-height: var(--ring-line-height-lowest);
|
|
17
34
|
}
|
|
@@ -13,7 +13,7 @@ export interface TooltipProps extends Omit<AllHTMLAttributes<HTMLSpanElement>, '
|
|
|
13
13
|
selfOverflowOnly?: boolean | null | undefined;
|
|
14
14
|
popupProps?: Partial<PopupAttrs> | null | undefined;
|
|
15
15
|
title?: ReactNode | null | undefined;
|
|
16
|
-
theme?: Theme;
|
|
16
|
+
theme?: Theme | 'inherit';
|
|
17
17
|
'data-test'?: string | null | undefined;
|
|
18
18
|
long?: boolean | null | undefined;
|
|
19
19
|
}
|
|
@@ -119,6 +119,7 @@ export default class Tooltip extends Component {
|
|
|
119
119
|
const { children, 'data-test': dataTest, title, delay, theme, selfOverflowOnly, popupProps, long, ...restProps } = this.props;
|
|
120
120
|
const ariaProps = typeof title === 'string' && !!title ? { 'aria-label': title, role: 'tooltip' } : {};
|
|
121
121
|
const { onNestedTooltipShow, onNestedTooltipHide } = this;
|
|
122
|
-
|
|
122
|
+
const popup = (_jsx(Popup, { trapFocus: false, anchorElement: this.containerNode, hidden: !this.state.showPopup || this.state.showNestedPopup, onCloseAttempt: this.hidePopup, maxHeight: 400, attached: false, onMouseOut: this.hideIfMovedOutsidePopup, top: 4, dontCloseOnAnchorClick: true, ref: this.popupRef, ...popupProps, className: classNames(styles.tooltip, { [styles.long]: long, [styles.inheritedTheme]: theme === 'inherit' }, popupProps?.className), children: title }));
|
|
123
|
+
return (_jsx(TooltipContext.Provider, { value: { onNestedTooltipShow, onNestedTooltipHide }, children: _jsxs("span", { ...ariaProps, ...restProps, ref: this.containerRef, "data-test": dataTests('ring-tooltip', dataTest), "data-test-title": typeof title === 'string' ? title : undefined, children: [children, theme === 'inherit' ? (popup) : (_jsx(ThemeProvider, { theme: theme, passToPopups: true, WrapperComponent: props => _jsx("span", { ...props }), children: popup }))] }) }));
|
|
123
124
|
}
|
|
124
125
|
}
|
|
@@ -23,7 +23,7 @@ export default class UserCard extends PureComponent {
|
|
|
23
23
|
const translations = this.props.translations;
|
|
24
24
|
const classes = classNames(className, {});
|
|
25
25
|
const userActiveStatusClasses = classNames(styles.userActiveStatus, user.online ? styles.online : '');
|
|
26
|
-
return (_jsx("div", { className: classes,
|
|
26
|
+
return (_jsx("div", { ...restProps, className: classes, children: _jsxs("div", { className: styles.userInformationContainer, children: [_jsxs("div", { className: styles.userAvatar, children: [_jsx(Avatar, { size: AvatarSize.Size56, url: user.avatarUrl, username: user.name, round: true }), !!avatarInfo && avatarInfo] }), _jsxs("div", { className: styles.userInformation, children: [_jsxs("div", { className: styles.userInformationGeneral, children: [_jsxs("div", { className: styles.userNameLine, children: [user.href && (_jsx(Link, { href: user.href, className: styles.userName, "data-test": "user-card-link", children: user.name })), !user.href && _jsx("span", { className: styles.userName, children: user.name }), typeof user.online === 'boolean' && (_jsx("span", { className: userActiveStatusClasses, title: user.online
|
|
27
27
|
? (translations?.online ?? translate('online'))
|
|
28
28
|
: (translations?.offline ?? translate('offline')) })), !!info && _jsx("span", { className: styles.userNameInfo, children: info }), user.banned && (_jsx(Tooltip, { title: user.banReason, children: _jsx(Tag, { className: styles.banLabel, children: translations?.banned ?? translate('banned') }) }))] }), _jsx("div", { className: styles.userLogin, children: user.login }), user.email && (_jsxs("span", { className: styles.userEmailWrapper, children: [_jsx(Link, { href: `mailto:${user.email}`, title: `mailto:${user.email}`, target: "_blank", className: styles.userEmail, children: user.email }), user.unverifiedEmail && (_jsx("span", { className: styles.unverifiedLabel, children: translations?.unverified ?? translate('unverified') })), _jsx(Icon, { title: translations?.copyToClipboard ?? translate('copyToClipboard'), className: styles.userCopyIcon, onClick: this.copyEmail, glyph: copyIcon, size: IconSize.Size14, suppressSizeWarning: true })] }))] }), children] })] }) }));
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.31",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@eslint/compat": "^1.2.6",
|
|
94
94
|
"@eslint/eslintrc": "^3.2.0",
|
|
95
95
|
"@eslint/js": "^9.20.0",
|
|
96
|
-
"@figma/code-connect": "^1.
|
|
96
|
+
"@figma/code-connect": "^1.3.1",
|
|
97
97
|
"@jetbrains/eslint-config": "^6.0.4",
|
|
98
98
|
"@jetbrains/logos": "3.0.0-canary.734b213.0",
|
|
99
99
|
"@jetbrains/rollup-css-plugin": "./packages/rollup-css-plugin",
|
|
@@ -103,18 +103,18 @@
|
|
|
103
103
|
"@rollup/plugin-json": "^6.1.0",
|
|
104
104
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
105
105
|
"@rollup/plugin-replace": "^6.0.2",
|
|
106
|
-
"@storybook/addon-a11y": "8.5.
|
|
107
|
-
"@storybook/addon-docs": "8.5.
|
|
108
|
-
"@storybook/addon-essentials": "8.5.
|
|
109
|
-
"@storybook/addon-themes": "^8.5.
|
|
110
|
-
"@storybook/components": "8.5.
|
|
106
|
+
"@storybook/addon-a11y": "8.5.6",
|
|
107
|
+
"@storybook/addon-docs": "8.5.6",
|
|
108
|
+
"@storybook/addon-essentials": "8.5.6",
|
|
109
|
+
"@storybook/addon-themes": "^8.5.6",
|
|
110
|
+
"@storybook/components": "8.5.6",
|
|
111
111
|
"@storybook/csf": "^0.1.13",
|
|
112
|
-
"@storybook/manager-api": "8.5.
|
|
113
|
-
"@storybook/preview-api": "8.5.
|
|
114
|
-
"@storybook/react": "8.5.
|
|
115
|
-
"@storybook/react-webpack5": "8.5.
|
|
116
|
-
"@storybook/test-runner": "^0.21.
|
|
117
|
-
"@storybook/theming": "8.5.
|
|
112
|
+
"@storybook/manager-api": "8.5.6",
|
|
113
|
+
"@storybook/preview-api": "8.5.6",
|
|
114
|
+
"@storybook/react": "8.5.6",
|
|
115
|
+
"@storybook/react-webpack5": "8.5.6",
|
|
116
|
+
"@storybook/test-runner": "^0.21.1",
|
|
117
|
+
"@storybook/theming": "8.5.6",
|
|
118
118
|
"@testing-library/dom": "^10.4.0",
|
|
119
119
|
"@testing-library/react": "^16.2.0",
|
|
120
120
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
"acorn": "^8.14.0",
|
|
137
137
|
"axe-playwright": "^2.1.0",
|
|
138
138
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
139
|
-
"caniuse-lite": "^1.0.
|
|
140
|
-
"chai": "^5.
|
|
139
|
+
"caniuse-lite": "^1.0.30001700",
|
|
140
|
+
"chai": "^5.2.0",
|
|
141
141
|
"chai-as-promised": "^8.0.1",
|
|
142
142
|
"chai-dom": "^1.10.0",
|
|
143
143
|
"chai-enzyme": "1.0.0-beta.1",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"eslint-plugin-prettier": "^5.2.3",
|
|
157
157
|
"eslint-plugin-react": "^7.37.4",
|
|
158
158
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
159
|
-
"eslint-plugin-storybook": "^0.11.
|
|
159
|
+
"eslint-plugin-storybook": "^0.11.3",
|
|
160
160
|
"events": "^3.3.0",
|
|
161
161
|
"glob": "^11.0.1",
|
|
162
162
|
"globals": "^15.15.0",
|
|
@@ -178,18 +178,18 @@
|
|
|
178
178
|
"react-test-renderer": "^19.0.0",
|
|
179
179
|
"regenerator-runtime": "^0.14.1",
|
|
180
180
|
"rimraf": "^6.0.1",
|
|
181
|
-
"rollup": "^4.34.
|
|
181
|
+
"rollup": "^4.34.8",
|
|
182
182
|
"rollup-plugin-clear": "^2.0.7",
|
|
183
183
|
"sinon": "^19.0.2",
|
|
184
184
|
"sinon-chai": "^4.0.0",
|
|
185
185
|
"storage-mock": "^2.1.0",
|
|
186
|
-
"storybook": "8.5.
|
|
186
|
+
"storybook": "8.5.6",
|
|
187
187
|
"stylelint": "^16.14.1",
|
|
188
188
|
"svg-inline-loader": "^0.8.2",
|
|
189
189
|
"teamcity-service-messages": "^0.1.14",
|
|
190
190
|
"terser-webpack-plugin": "^5.3.11",
|
|
191
191
|
"typescript": "~5.7.3",
|
|
192
|
-
"typescript-eslint": "^8.24.
|
|
192
|
+
"typescript-eslint": "^8.24.1",
|
|
193
193
|
"vitest": "^3.0.5",
|
|
194
194
|
"vitest-teamcity-reporter": "^0.3.1",
|
|
195
195
|
"wallaby-webpack": "^3.9.16",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"dependencies": {
|
|
220
|
-
"@babel/core": "^7.26.
|
|
220
|
+
"@babel/core": "^7.26.9",
|
|
221
221
|
"@babel/preset-typescript": "^7.26.0",
|
|
222
222
|
"@jetbrains/babel-preset-jetbrains": "^2.4.0",
|
|
223
223
|
"@jetbrains/icons": "^5.6.0",
|