@jetbrains/ring-ui 7.0.43 → 7.0.45
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.
|
@@ -42,8 +42,8 @@ const getSVGFromSource = memoize((src) => {
|
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
function isCompatibilityMode(iconSrc) {
|
|
45
|
-
const hasWidth = /width="
|
|
46
|
-
const hasHeight = /height="
|
|
45
|
+
const hasWidth = /width=".+"/gi.test(iconSrc);
|
|
46
|
+
const hasHeight = /height=".+"/gi.test(iconSrc);
|
|
47
47
|
return !hasWidth || !hasHeight;
|
|
48
48
|
}
|
|
49
49
|
function IconSVG({ src, className, ...rest }) {
|
|
@@ -32,6 +32,7 @@ export interface InputBaseProps {
|
|
|
32
32
|
beforeInput?: ReactNode;
|
|
33
33
|
afterInput?: ReactNode;
|
|
34
34
|
translations?: InputTranslations | null | undefined;
|
|
35
|
+
autogrow?: boolean | undefined;
|
|
35
36
|
}
|
|
36
37
|
type Override<D, S> = Omit<D, keyof S> & S;
|
|
37
38
|
export type InputSpecificProps = Override<InputHTMLAttributes<HTMLInputElement>, InputBaseProps> & {
|
|
@@ -49,6 +50,7 @@ export declare class Input extends PureComponent<InputProps> {
|
|
|
49
50
|
onChange: typeof noop;
|
|
50
51
|
inputRef: typeof noop;
|
|
51
52
|
enableShortcuts: string[];
|
|
53
|
+
autogrow: boolean;
|
|
52
54
|
};
|
|
53
55
|
state: {
|
|
54
56
|
empty: boolean;
|
|
@@ -29,6 +29,7 @@ export class Input extends PureComponent {
|
|
|
29
29
|
onChange: noop,
|
|
30
30
|
inputRef: noop,
|
|
31
31
|
enableShortcuts: ['esc'],
|
|
32
|
+
autogrow: true,
|
|
32
33
|
};
|
|
33
34
|
state = {
|
|
34
35
|
empty: true,
|
|
@@ -55,7 +56,10 @@ export class Input extends PureComponent {
|
|
|
55
56
|
this.setState({
|
|
56
57
|
empty: !this.input?.value,
|
|
57
58
|
});
|
|
58
|
-
if (this.props.multiline &&
|
|
59
|
+
if (this.props.multiline &&
|
|
60
|
+
this.props.autogrow &&
|
|
61
|
+
this.input != null &&
|
|
62
|
+
this.input.scrollHeight >= this.input.clientHeight) {
|
|
59
63
|
this.stretch(this.input);
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -93,7 +97,7 @@ export class Input extends PureComponent {
|
|
|
93
97
|
// Modifiers
|
|
94
98
|
size, multiline, borderless,
|
|
95
99
|
// Props
|
|
96
|
-
label, labelType, error, help, className, inputClassName, children, value, onClear, disabled, inputRef, onChange, enableShortcuts, id, placeholder, icon, translations, height = this.context, beforeInput, afterInput, ...restProps } = this.props;
|
|
100
|
+
label, labelType, error, help, className, inputClassName, children, value, onClear, disabled, inputRef, onChange, enableShortcuts, id, placeholder, icon, translations, height = this.context, beforeInput, afterInput, autogrow, ...restProps } = this.props;
|
|
97
101
|
const { empty } = this.state;
|
|
98
102
|
const clearable = !!onClear;
|
|
99
103
|
const classes = classNames(className, styles.outerContainer, [styles[`size${size}`]], [styles[`height${height}`]], {
|
package/components/link/link.js
CHANGED
|
@@ -23,7 +23,7 @@ export function linkHOC(ComposedComponent) {
|
|
|
23
23
|
if (useButton) {
|
|
24
24
|
return (_jsx("button", { type: "button", ...props, className: classes, onClick: (onClick || onPlainLeftClick), "data-test": dataTests('ring-link', dataTest), children: children }));
|
|
25
25
|
}
|
|
26
|
-
return (_jsx(ComposedComponent, { ...props, href: href, className: classes, onClick: onClick, onPlainLeftClick:
|
|
26
|
+
return (_jsx(ComposedComponent, { ...props, href: href, className: classes, onClick: onClick, ...(typeof ComposedComponent !== 'string' ? { onPlainLeftClick } : {}), "data-test": dataTests('ring-link', dataTest), children: children }));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
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.45",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"./*.json": "./*.json",
|
|
25
25
|
"./*.md": "./*.md",
|
|
26
26
|
"./components/icon": "./components/icon/index.js",
|
|
27
|
+
"./components/icon/icon__svg": "./components/icon/icon__svg.js",
|
|
28
|
+
"./components/icon/icon__svg.js": "./components/icon/icon__svg.js",
|
|
27
29
|
"./*": "./*.js"
|
|
28
30
|
},
|
|
29
31
|
"workspaces": [
|
|
@@ -95,13 +97,13 @@
|
|
|
95
97
|
},
|
|
96
98
|
"readmeFilename": "README.md",
|
|
97
99
|
"devDependencies": {
|
|
98
|
-
"@babel/cli": "^7.27.
|
|
99
|
-
"@babel/eslint-parser": "^7.27.
|
|
100
|
+
"@babel/cli": "^7.27.1",
|
|
101
|
+
"@babel/eslint-parser": "^7.27.1",
|
|
100
102
|
"@csstools/css-parser-algorithms": "^3.0.4",
|
|
101
103
|
"@csstools/stylelint-no-at-nest-rule": "^4.0.0",
|
|
102
|
-
"@eslint/compat": "^1.2.
|
|
104
|
+
"@eslint/compat": "^1.2.9",
|
|
103
105
|
"@eslint/eslintrc": "^3.2.0",
|
|
104
|
-
"@eslint/js": "^9.
|
|
106
|
+
"@eslint/js": "^9.25.1",
|
|
105
107
|
"@figma/code-connect": "^1.3.2",
|
|
106
108
|
"@jetbrains/eslint-config": "^6.0.5",
|
|
107
109
|
"@jetbrains/logos": "3.0.0-canary.734b213.0",
|
|
@@ -133,25 +135,25 @@
|
|
|
133
135
|
"@types/eslint__js": "^8.42.3",
|
|
134
136
|
"@types/markdown-it": "^14.1.2",
|
|
135
137
|
"@types/react": "^19.1.2",
|
|
136
|
-
"@types/react-dom": "^19.1.
|
|
138
|
+
"@types/react-dom": "^19.1.3",
|
|
137
139
|
"@types/sinon": "^17.0.4",
|
|
138
140
|
"@types/sinon-chai": "^4.0.0",
|
|
139
141
|
"@types/webpack-env": "^1.18.8",
|
|
140
|
-
"@vitejs/plugin-react": "^4.4.
|
|
141
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
142
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
143
|
+
"@vitest/eslint-plugin": "^1.1.44",
|
|
142
144
|
"acorn": "^8.14.1",
|
|
143
145
|
"axe-playwright": "^2.1.0",
|
|
144
146
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
145
|
-
"caniuse-lite": "^1.0.
|
|
147
|
+
"caniuse-lite": "^1.0.30001716",
|
|
146
148
|
"chai": "^5.2.0",
|
|
147
149
|
"chai-as-promised": "^8.0.1",
|
|
148
150
|
"chai-dom": "^1.12.1",
|
|
149
151
|
"cheerio": "^1.0.0",
|
|
150
|
-
"chromatic": "^11.28.
|
|
151
|
-
"core-js": "^3.
|
|
152
|
+
"chromatic": "^11.28.2",
|
|
153
|
+
"core-js": "^3.42.0",
|
|
152
154
|
"cpy-cli": "^5.0.0",
|
|
153
155
|
"dotenv-cli": "^8.0.0",
|
|
154
|
-
"eslint": "^9.
|
|
156
|
+
"eslint": "^9.25.1",
|
|
155
157
|
"eslint-config-prettier": "^10.1.2",
|
|
156
158
|
"eslint-formatter-jslint-xml": "^8.40.0",
|
|
157
159
|
"eslint-import-resolver-webpack": "^0.13.10",
|
|
@@ -162,7 +164,7 @@
|
|
|
162
164
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
163
165
|
"eslint-plugin-storybook": "^0.12.0",
|
|
164
166
|
"events": "^3.3.0",
|
|
165
|
-
"glob": "^11.0.
|
|
167
|
+
"glob": "^11.0.2",
|
|
166
168
|
"globals": "^16.0.0",
|
|
167
169
|
"html-webpack-plugin": "^5.6.3",
|
|
168
170
|
"http-server": "^14.1.1",
|
|
@@ -181,22 +183,22 @@
|
|
|
181
183
|
"react-dom": "^19.1.0",
|
|
182
184
|
"regenerator-runtime": "^0.14.1",
|
|
183
185
|
"rimraf": "^6.0.1",
|
|
184
|
-
"rollup": "^4.40.
|
|
186
|
+
"rollup": "^4.40.1",
|
|
185
187
|
"rollup-plugin-clear": "^2.0.7",
|
|
186
188
|
"sinon": "^20.0.0",
|
|
187
189
|
"sinon-chai": "^4.0.0",
|
|
188
190
|
"storage-mock": "^2.1.0",
|
|
189
191
|
"storybook": "8.6.12",
|
|
190
|
-
"stylelint": "^16.
|
|
192
|
+
"stylelint": "^16.19.1",
|
|
191
193
|
"svg-inline-loader": "^0.8.2",
|
|
192
194
|
"teamcity-service-messages": "^0.1.14",
|
|
193
195
|
"terser-webpack-plugin": "^5.3.14",
|
|
194
196
|
"typescript": "~5.8.3",
|
|
195
|
-
"typescript-eslint": "^8.
|
|
196
|
-
"vitest": "^3.1.
|
|
197
|
+
"typescript-eslint": "^8.31.1",
|
|
198
|
+
"vitest": "^3.1.2",
|
|
197
199
|
"vitest-teamcity-reporter": "^0.3.1",
|
|
198
200
|
"wallaby-webpack": "^3.9.16",
|
|
199
|
-
"webpack": "^5.99.
|
|
201
|
+
"webpack": "^5.99.7",
|
|
200
202
|
"webpack-cli": "^6.0.1",
|
|
201
203
|
"xmlappend": "^1.0.4"
|
|
202
204
|
},
|
|
@@ -220,10 +222,10 @@
|
|
|
220
222
|
}
|
|
221
223
|
},
|
|
222
224
|
"dependencies": {
|
|
223
|
-
"@babel/core": "^7.
|
|
224
|
-
"@babel/preset-typescript": "^7.27.
|
|
225
|
+
"@babel/core": "^7.27.1",
|
|
226
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
225
227
|
"@jetbrains/babel-preset-jetbrains": "^2.4.0",
|
|
226
|
-
"@jetbrains/icons": "^5.
|
|
228
|
+
"@jetbrains/icons": "^5.10.0",
|
|
227
229
|
"@jetbrains/postcss-require-hover": "^0.1.3",
|
|
228
230
|
"@types/combokeys": "^2.4.9",
|
|
229
231
|
"@types/element-resize-detector": "^1.1.6",
|
|
@@ -253,7 +255,7 @@
|
|
|
253
255
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
254
256
|
"postcss-loader": "^8.1.1",
|
|
255
257
|
"postcss-modules-values-replace": "^4.2.0",
|
|
256
|
-
"postcss-preset-env": "^10.1.
|
|
258
|
+
"postcss-preset-env": "^10.1.6",
|
|
257
259
|
"react-movable": "^3.4.1",
|
|
258
260
|
"react-virtualized": "^9.22.6",
|
|
259
261
|
"react-waypoint": "^10.3.0",
|