@jetbrains/ring-ui 7.0.38 → 7.0.39
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.
|
@@ -28,7 +28,7 @@ export class Button extends PureComponent {
|
|
|
28
28
|
// Modifiers
|
|
29
29
|
active, danger, delayed, loader, primary, success, error, secondary, ghost, short, text, dropdown, height,
|
|
30
30
|
// Props
|
|
31
|
-
icon, iconRight, iconSize, iconClassName, iconRightClassName, iconSuppressSizeWarning, className, children, inline, ...props } = this.props;
|
|
31
|
+
icon, iconRight, iconSize, iconClassName, iconRightClassName, iconSuppressSizeWarning, className, children, inline, disabled, href, ...props } = this.props;
|
|
32
32
|
const isInline = inline ?? text ?? icon != null;
|
|
33
33
|
if (text != null) {
|
|
34
34
|
warnText();
|
|
@@ -39,13 +39,14 @@ export class Button extends PureComponent {
|
|
|
39
39
|
height: height ?? this.context,
|
|
40
40
|
});
|
|
41
41
|
const content = (_jsxs(_Fragment, { children: [icon && (_jsx(Icon, { className: classNames(styles.icon, iconClassName), glyph: icon, size: iconSize, suppressSizeWarning: iconSuppressSizeWarning })), children, iconRight && _jsx(Icon, { className: classNames(styles.iconRight, iconRightClassName), glyph: iconRight }), dropdown && _jsx(Icon, { glyph: isInline ? chevron12pxDown : chevronDown, className: styles.dropdownIcon })] }));
|
|
42
|
+
const isDisabled = disabled || loader || undefined;
|
|
42
43
|
const commonProps = {
|
|
43
|
-
tabIndex: loader ? -1 : 0,
|
|
44
44
|
...props,
|
|
45
|
+
href: isDisabled ? undefined : href,
|
|
45
46
|
className: classes,
|
|
46
47
|
children: (_jsxs(_Fragment, { children: [loader && !isInline && _jsx("div", { className: styles.loaderBackground }), content] })),
|
|
47
48
|
};
|
|
48
|
-
return commonProps.href != null ? (_jsx(ClickableLink, { ...commonProps })) : (_jsx("button", { ref: this.buttonRef, type: "button", ...commonProps }));
|
|
49
|
+
return commonProps.href != null ? (_jsx(ClickableLink, { ...commonProps })) : (_jsx("button", { ref: this.buttonRef, type: "button", disabled: isDisabled, ...commonProps }));
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
export { Size as IconSize };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import './error-bubble.css';
|
|
2
|
+
|
|
1
3
|
:global(.ring-error-bubble) {
|
|
2
4
|
position: absolute;
|
|
3
5
|
z-index: 2;
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
border: 1px solid var(--ring-popup-border-color);
|
|
18
20
|
|
|
19
21
|
border-radius: var(--ring-border-radius);
|
|
20
|
-
background: var(--ring-
|
|
22
|
+
background: var(--ring-error-bubble-background-color);
|
|
21
23
|
box-shadow: var(--ring-popup-shadow);
|
|
22
24
|
|
|
23
25
|
font-family: var(--ring-font-family);
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
border-top: none;
|
|
50
52
|
border-right: none;
|
|
51
53
|
|
|
52
|
-
background: var(--ring-
|
|
54
|
+
background: var(--ring-error-bubble-background-color);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
:global(.ring-error-bubble_material) {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
+
:root {
|
|
4
|
+
--ring-error-bubble-background-color: var(--ring-popup-background-color);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:global(.ring-ui-theme-dark) {
|
|
8
|
+
--ring-error-bubble-background-color: var(--ring-secondary-background-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
.errorBubblePopup {
|
|
4
12
|
overflow: visible;
|
|
5
13
|
|
|
@@ -26,7 +34,7 @@
|
|
|
26
34
|
border: 1px solid var(--ring-popup-border-color);
|
|
27
35
|
border-radius: var(--ring-border-radius);
|
|
28
36
|
|
|
29
|
-
background: var(--ring-
|
|
37
|
+
background: var(--ring-error-bubble-background-color);
|
|
30
38
|
box-shadow: var(--ring-popup-shadow);
|
|
31
39
|
|
|
32
40
|
font-size: var(--ring-font-size-smaller);
|
|
@@ -49,5 +57,5 @@
|
|
|
49
57
|
border: 1px solid var(--ring-popup-border-color);
|
|
50
58
|
border-top: none;
|
|
51
59
|
border-right: none;
|
|
52
|
-
background: var(--ring-
|
|
60
|
+
background: var(--ring-error-bubble-background-color);
|
|
53
61
|
}
|
|
@@ -24,6 +24,12 @@ const DEFAULT_AGREEMENT = {
|
|
|
24
24
|
requiredForREST: false,
|
|
25
25
|
content: '',
|
|
26
26
|
};
|
|
27
|
+
function ignorePostponedCatchReason(reason) {
|
|
28
|
+
if (reason === 'Postponed') {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
throw reason;
|
|
32
|
+
}
|
|
27
33
|
export default class UserAgreementService {
|
|
28
34
|
config;
|
|
29
35
|
constructor(config) {
|
|
@@ -55,14 +61,9 @@ export default class UserAgreementService {
|
|
|
55
61
|
userConsent = DEFAULT_CONSENT;
|
|
56
62
|
intervalId;
|
|
57
63
|
startChecking = () => {
|
|
58
|
-
this.intervalId = window.setInterval(() => this.checkConsentAndShowDialog().catch(
|
|
59
|
-
if (reason === 'Postponed') {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
throw reason;
|
|
63
|
-
}), this.interval);
|
|
64
|
+
this.intervalId = window.setInterval(() => this.checkConsentAndShowDialog().catch(ignorePostponedCatchReason), this.interval);
|
|
64
65
|
window.addEventListener('storage', this.onStorageEvent);
|
|
65
|
-
this.checkConsentAndShowDialog();
|
|
66
|
+
this.checkConsentAndShowDialog().catch(ignorePostponedCatchReason);
|
|
66
67
|
};
|
|
67
68
|
stopChecking = () => {
|
|
68
69
|
clearInterval(this.intervalId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.39",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -87,7 +87,6 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@babel/cli": "^7.27.0",
|
|
89
89
|
"@babel/eslint-parser": "^7.27.0",
|
|
90
|
-
"@babel/plugin-syntax-import-assertions": "^7.26.0",
|
|
91
90
|
"@csstools/css-parser-algorithms": "^3.0.4",
|
|
92
91
|
"@csstools/stylelint-no-at-nest-rule": "^4.0.0",
|
|
93
92
|
"@eslint/compat": "^1.2.8",
|
|
@@ -129,7 +128,7 @@
|
|
|
129
128
|
"@types/sinon-chai": "^4.0.0",
|
|
130
129
|
"@types/webpack-env": "^1.18.8",
|
|
131
130
|
"@vitejs/plugin-react": "^4.3.4",
|
|
132
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
131
|
+
"@vitest/eslint-plugin": "^1.1.42",
|
|
133
132
|
"acorn": "^8.14.1",
|
|
134
133
|
"axe-playwright": "^2.1.0",
|
|
135
134
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
@@ -143,7 +142,7 @@
|
|
|
143
142
|
"cpy-cli": "^5.0.0",
|
|
144
143
|
"dotenv-cli": "^8.0.0",
|
|
145
144
|
"eslint": "^9.24.0",
|
|
146
|
-
"eslint-config-prettier": "^10.1.
|
|
145
|
+
"eslint-config-prettier": "^10.1.2",
|
|
147
146
|
"eslint-formatter-jslint-xml": "^8.40.0",
|
|
148
147
|
"eslint-import-resolver-webpack": "^0.13.10",
|
|
149
148
|
"eslint-plugin-import": "^2.31.0",
|
|
@@ -184,11 +183,11 @@
|
|
|
184
183
|
"teamcity-service-messages": "^0.1.14",
|
|
185
184
|
"terser-webpack-plugin": "^5.3.14",
|
|
186
185
|
"typescript": "~5.8.3",
|
|
187
|
-
"typescript-eslint": "^8.29.
|
|
186
|
+
"typescript-eslint": "^8.29.1",
|
|
188
187
|
"vitest": "^3.1.1",
|
|
189
188
|
"vitest-teamcity-reporter": "^0.3.1",
|
|
190
189
|
"wallaby-webpack": "^3.9.16",
|
|
191
|
-
"webpack": "^5.
|
|
190
|
+
"webpack": "^5.99.5",
|
|
192
191
|
"webpack-cli": "^6.0.1",
|
|
193
192
|
"xmlappend": "^1.0.4"
|
|
194
193
|
},
|