@jetbrains/ring-ui 7.0.44 → 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"
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
},
|
|
98
98
|
"readmeFilename": "README.md",
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@babel/cli": "^7.27.
|
|
101
|
-
"@babel/eslint-parser": "^7.27.
|
|
100
|
+
"@babel/cli": "^7.27.1",
|
|
101
|
+
"@babel/eslint-parser": "^7.27.1",
|
|
102
102
|
"@csstools/css-parser-algorithms": "^3.0.4",
|
|
103
103
|
"@csstools/stylelint-no-at-nest-rule": "^4.0.0",
|
|
104
|
-
"@eslint/compat": "^1.2.
|
|
104
|
+
"@eslint/compat": "^1.2.9",
|
|
105
105
|
"@eslint/eslintrc": "^3.2.0",
|
|
106
106
|
"@eslint/js": "^9.25.1",
|
|
107
107
|
"@figma/code-connect": "^1.3.2",
|
|
@@ -135,22 +135,22 @@
|
|
|
135
135
|
"@types/eslint__js": "^8.42.3",
|
|
136
136
|
"@types/markdown-it": "^14.1.2",
|
|
137
137
|
"@types/react": "^19.1.2",
|
|
138
|
-
"@types/react-dom": "^19.1.
|
|
138
|
+
"@types/react-dom": "^19.1.3",
|
|
139
139
|
"@types/sinon": "^17.0.4",
|
|
140
140
|
"@types/sinon-chai": "^4.0.0",
|
|
141
141
|
"@types/webpack-env": "^1.18.8",
|
|
142
142
|
"@vitejs/plugin-react": "^4.4.1",
|
|
143
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
143
|
+
"@vitest/eslint-plugin": "^1.1.44",
|
|
144
144
|
"acorn": "^8.14.1",
|
|
145
145
|
"axe-playwright": "^2.1.0",
|
|
146
146
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
147
|
-
"caniuse-lite": "^1.0.
|
|
147
|
+
"caniuse-lite": "^1.0.30001716",
|
|
148
148
|
"chai": "^5.2.0",
|
|
149
149
|
"chai-as-promised": "^8.0.1",
|
|
150
150
|
"chai-dom": "^1.12.1",
|
|
151
151
|
"cheerio": "^1.0.0",
|
|
152
152
|
"chromatic": "^11.28.2",
|
|
153
|
-
"core-js": "^3.
|
|
153
|
+
"core-js": "^3.42.0",
|
|
154
154
|
"cpy-cli": "^5.0.0",
|
|
155
155
|
"dotenv-cli": "^8.0.0",
|
|
156
156
|
"eslint": "^9.25.1",
|
|
@@ -183,22 +183,22 @@
|
|
|
183
183
|
"react-dom": "^19.1.0",
|
|
184
184
|
"regenerator-runtime": "^0.14.1",
|
|
185
185
|
"rimraf": "^6.0.1",
|
|
186
|
-
"rollup": "^4.40.
|
|
186
|
+
"rollup": "^4.40.1",
|
|
187
187
|
"rollup-plugin-clear": "^2.0.7",
|
|
188
188
|
"sinon": "^20.0.0",
|
|
189
189
|
"sinon-chai": "^4.0.0",
|
|
190
190
|
"storage-mock": "^2.1.0",
|
|
191
191
|
"storybook": "8.6.12",
|
|
192
|
-
"stylelint": "^16.19.
|
|
192
|
+
"stylelint": "^16.19.1",
|
|
193
193
|
"svg-inline-loader": "^0.8.2",
|
|
194
194
|
"teamcity-service-messages": "^0.1.14",
|
|
195
195
|
"terser-webpack-plugin": "^5.3.14",
|
|
196
196
|
"typescript": "~5.8.3",
|
|
197
|
-
"typescript-eslint": "^8.31.
|
|
197
|
+
"typescript-eslint": "^8.31.1",
|
|
198
198
|
"vitest": "^3.1.2",
|
|
199
199
|
"vitest-teamcity-reporter": "^0.3.1",
|
|
200
200
|
"wallaby-webpack": "^3.9.16",
|
|
201
|
-
"webpack": "^5.99.
|
|
201
|
+
"webpack": "^5.99.7",
|
|
202
202
|
"webpack-cli": "^6.0.1",
|
|
203
203
|
"xmlappend": "^1.0.4"
|
|
204
204
|
},
|
|
@@ -222,10 +222,10 @@
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
"dependencies": {
|
|
225
|
-
"@babel/core": "^7.
|
|
226
|
-
"@babel/preset-typescript": "^7.27.
|
|
225
|
+
"@babel/core": "^7.27.1",
|
|
226
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
227
227
|
"@jetbrains/babel-preset-jetbrains": "^2.4.0",
|
|
228
|
-
"@jetbrains/icons": "^5.
|
|
228
|
+
"@jetbrains/icons": "^5.10.0",
|
|
229
229
|
"@jetbrains/postcss-require-hover": "^0.1.3",
|
|
230
230
|
"@types/combokeys": "^2.4.9",
|
|
231
231
|
"@types/element-resize-detector": "^1.1.6",
|