@jetbrains/ring-ui 7.0.37 → 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.
- package/components/button/button.js +4 -3
- package/components/button/button__classes.d.ts +1 -1
- package/components/button/button__classes.js +2 -2
- package/components/error-bubble/error-bubble-legacy.css +4 -2
- package/components/error-bubble/error-bubble.css +10 -2
- package/components/user-agreement/service.js +8 -7
- package/package.json +14 -15
|
@@ -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,2 +1,2 @@
|
|
|
1
1
|
import { ButtonProps } from './button';
|
|
2
|
-
export declare function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, height, children, }: ButtonProps): string;
|
|
2
|
+
export declare function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, iconRight, height, children, }: ButtonProps): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import styles from './button.css';
|
|
3
|
-
export function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, height, children, }) {
|
|
4
|
-
const iconOnly = icon && !children;
|
|
3
|
+
export function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, iconRight, height, children, }) {
|
|
4
|
+
const iconOnly = (icon || iconRight) && !children;
|
|
5
5
|
const primaryBlock = primary && !inline;
|
|
6
6
|
const withNormalIcon = iconOnly && inline && !active && !danger && !primary && !disabled;
|
|
7
7
|
return classNames(styles.button, className, styles[`height${height}`], inline ? styles.inline : styles.block, {
|
|
@@ -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,13 +87,12 @@
|
|
|
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",
|
|
94
93
|
"@eslint/eslintrc": "^3.2.0",
|
|
95
94
|
"@eslint/js": "^9.20.0",
|
|
96
|
-
"@figma/code-connect": "^1.3.
|
|
95
|
+
"@figma/code-connect": "^1.3.2",
|
|
97
96
|
"@jetbrains/eslint-config": "^6.0.4",
|
|
98
97
|
"@jetbrains/logos": "3.0.0-canary.734b213.0",
|
|
99
98
|
"@jetbrains/rollup-css-plugin": "./packages/rollup-css-plugin",
|
|
@@ -120,7 +119,7 @@
|
|
|
120
119
|
"@testing-library/user-event": "^14.6.1",
|
|
121
120
|
"@types/chai": "^5.2.1",
|
|
122
121
|
"@types/chai-as-promised": "^8.0.2",
|
|
123
|
-
"@types/chai-dom": "
|
|
122
|
+
"@types/chai-dom": "1.11.3",
|
|
124
123
|
"@types/eslint__js": "^8.42.3",
|
|
125
124
|
"@types/markdown-it": "^14.1.2",
|
|
126
125
|
"@types/react": "^18.3.12",
|
|
@@ -129,27 +128,27 @@
|
|
|
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",
|
|
136
135
|
"caniuse-lite": "^1.0.30001709",
|
|
137
136
|
"chai": "^5.2.0",
|
|
138
137
|
"chai-as-promised": "^8.0.1",
|
|
139
|
-
"chai-dom": "^1.
|
|
140
|
-
"cheerio": "^1.0.0
|
|
141
|
-
"chromatic": "^11.
|
|
138
|
+
"chai-dom": "^1.12.1",
|
|
139
|
+
"cheerio": "^1.0.0",
|
|
140
|
+
"chromatic": "^11.28.0",
|
|
142
141
|
"core-js": "^3.41.0",
|
|
143
142
|
"cpy-cli": "^5.0.0",
|
|
144
143
|
"dotenv-cli": "^8.0.0",
|
|
145
|
-
"eslint": "^9.
|
|
146
|
-
"eslint-config-prettier": "^10.1.
|
|
144
|
+
"eslint": "^9.24.0",
|
|
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",
|
|
150
149
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
151
150
|
"eslint-plugin-prettier": "^5.2.6",
|
|
152
|
-
"eslint-plugin-react": "^7.37.
|
|
151
|
+
"eslint-plugin-react": "^7.37.5",
|
|
153
152
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
154
153
|
"eslint-plugin-storybook": "^0.12.0",
|
|
155
154
|
"events": "^3.3.0",
|
|
@@ -179,16 +178,16 @@
|
|
|
179
178
|
"sinon-chai": "^4.0.0",
|
|
180
179
|
"storage-mock": "^2.1.0",
|
|
181
180
|
"storybook": "8.6.12",
|
|
182
|
-
"stylelint": "^16.
|
|
181
|
+
"stylelint": "^16.18.0",
|
|
183
182
|
"svg-inline-loader": "^0.8.2",
|
|
184
183
|
"teamcity-service-messages": "^0.1.14",
|
|
185
184
|
"terser-webpack-plugin": "^5.3.14",
|
|
186
|
-
"typescript": "~5.8.
|
|
187
|
-
"typescript-eslint": "^8.29.
|
|
185
|
+
"typescript": "~5.8.3",
|
|
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
|
},
|