@jetbrains/ring-ui 7.0.28 → 7.0.30
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.
|
@@ -23,7 +23,7 @@ export default class Caret {
|
|
|
23
23
|
this.target = target;
|
|
24
24
|
}
|
|
25
25
|
isContentEditable() {
|
|
26
|
-
return this.target.contentEditable === 'true';
|
|
26
|
+
return this.target.contentEditable === 'true' || this.target.getAttribute('contenteditable') === 'true'; // workaround for https://github.com/jsdom/jsdom/issues/1670
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Set focus on target if possible
|
|
@@ -22,7 +22,8 @@ export default class ListItem extends PureComponent {
|
|
|
22
22
|
stopBubbling = (e) => e.stopPropagation();
|
|
23
23
|
_isString = (val) => typeof val === 'string' || val instanceof String;
|
|
24
24
|
render() {
|
|
25
|
-
const { disabled, checkbox, avatar, subavatar, glyph, icon, rightGlyph, description, label, title, details, hover, level, onCheckboxChange, rightNodes, leftNodes, showGeneratedAvatar, username, labelWrapper, rgItemType, scrolling, 'data-test': dataTest, className, url, LinkComponent, compact, hoverClassName, children, ...
|
|
25
|
+
const { disabled, checkbox, avatar, subavatar, glyph, icon, rightGlyph, description, label, title, details, hover, level, tabIndex, onClick, onCheckboxChange, onMouseOver, onMouseDown, onMouseUp, rightNodes, leftNodes, showGeneratedAvatar, username, labelWrapper, rgItemType, scrolling, 'data-test': dataTest, className, url, LinkComponent, compact, hoverClassName, children, ...restLinkProps // TODO use an allow list in 8.0
|
|
26
|
+
} = this.props;
|
|
26
27
|
const checkable = checkbox !== undefined;
|
|
27
28
|
const shouldShowGeneratedAvatar = showGeneratedAvatar && username != null;
|
|
28
29
|
const hasLeftNodes = leftNodes || glyph || avatar || shouldShowGeneratedAvatar;
|
|
@@ -54,14 +55,19 @@ export default class ListItem extends PureComponent {
|
|
|
54
55
|
}, dataTest);
|
|
55
56
|
const labelElement = (_jsx("span", { className: styles.label, title: computedTitle, "data-test": "ring-list-item-label", children: label ?? children }));
|
|
56
57
|
const commonProps = {
|
|
57
|
-
...restProps,
|
|
58
58
|
id: this.id,
|
|
59
|
+
tabIndex,
|
|
60
|
+
onClick,
|
|
61
|
+
onMouseOver,
|
|
62
|
+
onMouseDown,
|
|
63
|
+
onFocus: onMouseOver,
|
|
64
|
+
onMouseUp,
|
|
59
65
|
className: classes,
|
|
60
66
|
style,
|
|
61
67
|
disabled,
|
|
62
68
|
children: (_jsxs(_Fragment, { children: [_jsxs("div", { className: styles.top, onMouseOut: this.stopBubbling, onBlur: this.stopBubbling, children: [!showCheckbox && (_jsxs("div", { className: styles.left, children: [leftNodes, glyph && (_jsx(Icon, { className: styles.glyph, glyph: glyph, size: this.props.iconSize, suppressSizeWarning: this.props.suppressSizeWarning })), (avatar || shouldShowGeneratedAvatar) && (_jsx(Avatar, { className: styles.avatar, url: avatar, size: AvatarSize.Size20, subavatar: subavatar, username: username }))] })), labelWrapper ? labelWrapper(labelElement) : labelElement, description && (_jsx("span", { className: styles.description, "data-test": "ring-list-item-description", children: description })), _jsxs("div", { className: styles.right, children: [rightGlyph && (_jsx(Icon, { className: styles.rightGlyph, glyph: rightGlyph, suppressSizeWarning: this.props.suppressSizeWarning, size: this.props.iconSize })), icon && _jsx("div", { className: styles.icon, style: { backgroundImage: `url("${icon}")` } }), rightNodes] })] }), details && _jsx("div", { className: detailsClasses, children: details })] })),
|
|
63
69
|
};
|
|
64
70
|
const LinkComponentToUse = LinkComponent ? linkHOC(LinkComponent) : Link;
|
|
65
|
-
return (_jsxs("div", { className: styles.itemContainer, "data-test": combinedDataTest, children: [showCheckbox && (_jsx("div", { className: styles.checkboxContainer, children: _jsx(Checkbox, { "aria-labelledby": this.id, checked: checkbox, disabled: disabled, onChange: onCheckboxChange, onClick: this.stopBubbling }) })), isLink ? (_jsx(LinkComponentToUse, { pseudo: !
|
|
71
|
+
return (_jsxs("div", { className: styles.itemContainer, "data-test": combinedDataTest, children: [showCheckbox && (_jsx("div", { className: styles.checkboxContainer, children: _jsx(Checkbox, { "aria-labelledby": this.id, checked: checkbox, disabled: disabled, onChange: onCheckboxChange, onClick: this.stopBubbling }) })), isLink ? (_jsx(LinkComponentToUse, { pseudo: !restLinkProps.href, ...commonProps, ...restLinkProps })) : (_jsx("button", { type: "button", ...commonProps }))] }));
|
|
66
72
|
}
|
|
67
73
|
}
|
|
@@ -126,6 +126,7 @@ export default class QueryAssist extends Component {
|
|
|
126
126
|
state.suggestions !== this.state.suggestions ||
|
|
127
127
|
state.styleRanges !== this.state.styleRanges ||
|
|
128
128
|
state.placeholderEnabled !== this.state.placeholderEnabled ||
|
|
129
|
+
state.shortcuts !== this.state.shortcuts ||
|
|
129
130
|
props.placeholder !== this.props.placeholder ||
|
|
130
131
|
props.disabled !== this.props.disabled ||
|
|
131
132
|
props.clear !== this.props.clear ||
|
|
@@ -133,7 +134,8 @@ export default class QueryAssist extends Component {
|
|
|
133
134
|
props.actions !== this.props.actions ||
|
|
134
135
|
props.loader !== this.props.loader ||
|
|
135
136
|
props.glass !== this.props.glass ||
|
|
136
|
-
props.className !== this.props.className
|
|
137
|
+
props.className !== this.props.className ||
|
|
138
|
+
props.delay !== this.props.delay);
|
|
137
139
|
}
|
|
138
140
|
componentDidUpdate(prevProps) {
|
|
139
141
|
const { caret, delay, query } = this.props;
|
|
@@ -179,7 +181,9 @@ export default class QueryAssist extends Component {
|
|
|
179
181
|
if (!this.mouseIsDownOnPopup) {
|
|
180
182
|
this.props.onFocusChange({ focus });
|
|
181
183
|
}
|
|
182
|
-
this.
|
|
184
|
+
if (this.state.shortcuts !== focus) {
|
|
185
|
+
this.setState({ shortcuts: focus });
|
|
186
|
+
}
|
|
183
187
|
};
|
|
184
188
|
node;
|
|
185
189
|
nodeRef = (node) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.30",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
"readmeFilename": "README.md",
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@babel/cli": "^7.26.4",
|
|
89
|
-
"@babel/eslint-parser": "^7.26.
|
|
89
|
+
"@babel/eslint-parser": "^7.26.8",
|
|
90
90
|
"@babel/plugin-syntax-import-assertions": "^7.26.0",
|
|
91
91
|
"@csstools/css-parser-algorithms": "^3.0.4",
|
|
92
92
|
"@csstools/stylelint-no-at-nest-rule": "^4.0.0",
|
|
93
93
|
"@eslint/compat": "^1.2.6",
|
|
94
94
|
"@eslint/eslintrc": "^3.2.0",
|
|
95
|
-
"@eslint/js": "^9.
|
|
95
|
+
"@eslint/js": "^9.20.0",
|
|
96
96
|
"@figma/code-connect": "^1.2.4",
|
|
97
97
|
"@jetbrains/eslint-config": "^6.0.4",
|
|
98
98
|
"@jetbrains/logos": "3.0.0-canary.734b213.0",
|
|
@@ -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.5",
|
|
107
|
+
"@storybook/addon-docs": "8.5.5",
|
|
108
|
+
"@storybook/addon-essentials": "8.5.5",
|
|
109
|
+
"@storybook/addon-themes": "^8.5.5",
|
|
110
|
+
"@storybook/components": "8.5.5",
|
|
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.
|
|
112
|
+
"@storybook/manager-api": "8.5.5",
|
|
113
|
+
"@storybook/preview-api": "8.5.5",
|
|
114
|
+
"@storybook/react": "8.5.5",
|
|
115
|
+
"@storybook/react-webpack5": "8.5.5",
|
|
116
116
|
"@storybook/test-runner": "^0.21.0",
|
|
117
|
-
"@storybook/theming": "8.5.
|
|
117
|
+
"@storybook/theming": "8.5.5",
|
|
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",
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
"@types/sinon-chai": "^4.0.0",
|
|
132
132
|
"@types/webpack-env": "^1.18.8",
|
|
133
133
|
"@vitejs/plugin-react": "^4.3.4",
|
|
134
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
134
|
+
"@vitest/eslint-plugin": "^1.1.31",
|
|
135
135
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
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.
|
|
139
|
+
"caniuse-lite": "^1.0.30001699",
|
|
140
140
|
"chai": "^5.1.2",
|
|
141
141
|
"chai-as-promised": "^8.0.1",
|
|
142
142
|
"chai-dom": "^1.10.0",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"cpy-cli": "^5.0.0",
|
|
148
148
|
"dotenv-cli": "^8.0.0",
|
|
149
149
|
"enzyme": "^3.11.0",
|
|
150
|
-
"eslint": "^9.
|
|
150
|
+
"eslint": "^9.20.1",
|
|
151
151
|
"eslint-config-prettier": "^10.0.1",
|
|
152
152
|
"eslint-formatter-jslint-xml": "^8.40.0",
|
|
153
153
|
"eslint-import-resolver-webpack": "^0.13.10",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"eslint-plugin-storybook": "^0.11.2",
|
|
160
160
|
"events": "^3.3.0",
|
|
161
161
|
"glob": "^11.0.1",
|
|
162
|
-
"globals": "^15.
|
|
162
|
+
"globals": "^15.15.0",
|
|
163
163
|
"html-webpack-plugin": "^5.6.3",
|
|
164
164
|
"http-server": "^14.1.1",
|
|
165
165
|
"husky": "^9.1.7",
|
|
@@ -171,29 +171,29 @@
|
|
|
171
171
|
"markdown-it": "^14.1.0",
|
|
172
172
|
"merge-options": "^3.0.4",
|
|
173
173
|
"pinst": "^3.0.0",
|
|
174
|
-
"prettier": "^3.
|
|
174
|
+
"prettier": "^3.5.1",
|
|
175
175
|
"raw-loader": "^4.0.2",
|
|
176
176
|
"react": "^18.3.1",
|
|
177
177
|
"react-dom": "^18.3.1",
|
|
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.7",
|
|
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.5",
|
|
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.
|
|
192
|
+
"typescript-eslint": "^8.24.0",
|
|
193
193
|
"vitest": "^3.0.5",
|
|
194
194
|
"vitest-teamcity-reporter": "^0.3.1",
|
|
195
195
|
"wallaby-webpack": "^3.9.16",
|
|
196
|
-
"webpack": "^5.
|
|
196
|
+
"webpack": "^5.98.0",
|
|
197
197
|
"webpack-cli": "^6.0.1",
|
|
198
198
|
"xmlappend": "^1.0.4"
|
|
199
199
|
},
|
|
@@ -217,10 +217,10 @@
|
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"dependencies": {
|
|
220
|
-
"@babel/core": "^7.26.
|
|
220
|
+
"@babel/core": "^7.26.8",
|
|
221
221
|
"@babel/preset-typescript": "^7.26.0",
|
|
222
222
|
"@jetbrains/babel-preset-jetbrains": "^2.4.0",
|
|
223
|
-
"@jetbrains/icons": "^5.
|
|
223
|
+
"@jetbrains/icons": "^5.6.0",
|
|
224
224
|
"@jetbrains/postcss-require-hover": "^0.1.3",
|
|
225
225
|
"@types/combokeys": "^2.4.9",
|
|
226
226
|
"@types/element-resize-detector": "^1.1.6",
|
|
@@ -244,13 +244,13 @@
|
|
|
244
244
|
"highlight.js": "^10.7.2",
|
|
245
245
|
"just-debounce-it": "^3.2.0",
|
|
246
246
|
"memoize-one": "^6.0.0",
|
|
247
|
-
"postcss": "^8.5.
|
|
247
|
+
"postcss": "^8.5.2",
|
|
248
248
|
"postcss-calc": "^10.1.1",
|
|
249
249
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
250
250
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
251
251
|
"postcss-loader": "^8.1.1",
|
|
252
252
|
"postcss-modules-values-replace": "^4.2.0",
|
|
253
|
-
"postcss-preset-env": "^10.1.
|
|
253
|
+
"postcss-preset-env": "^10.1.4",
|
|
254
254
|
"react-movable": "^3.4.0",
|
|
255
255
|
"react-virtualized": "^9.22.6",
|
|
256
256
|
"react-waypoint": "^10.3.0",
|