@jetbrains/ring-ui 6.0.41 → 6.0.43
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.
|
@@ -43,6 +43,6 @@ export default class DateInput extends React.PureComponent<DateInputProps> {
|
|
|
43
43
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
44
44
|
updateInput({ text, active }: UpdateInputConfig): void;
|
|
45
45
|
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
46
|
-
handleKeyDown: (e: React.KeyboardEvent) =>
|
|
46
|
+
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
47
47
|
render(): React.JSX.Element;
|
|
48
48
|
}
|
|
@@ -56,7 +56,16 @@ export default class DateInput extends React.PureComponent {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
handleChange = (e) => this.props.onInput(e.currentTarget.value, e.currentTarget.dataset.name);
|
|
59
|
-
handleKeyDown = (e) =>
|
|
59
|
+
handleKeyDown = (e) => {
|
|
60
|
+
if (e.key === 'Enter') {
|
|
61
|
+
// We have to prevent the default behavior, because restoring focus by TabTrap caused by
|
|
62
|
+
// pressing Enter will trigger the onClick event on the DatePicker Dropdown anchor,
|
|
63
|
+
// so DatePicker will be open again.
|
|
64
|
+
// https://youtrack.jetbrains.com/issue/RG-2450/Anchor-should-be-focused-after-closing-datepicker#focus=Comments-27-10044234.0-0.
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
this.props.onConfirm();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
60
69
|
render() {
|
|
61
70
|
const { active, divider, text, time, name, hoverDate, date, displayFormat, translations, onActivate, onClear, fromPlaceholder, toPlaceholder, timePlaceholder, locale } = this.props;
|
|
62
71
|
const { translate } = this.context;
|
|
@@ -799,9 +799,13 @@ export default class Select extends Component {
|
|
|
799
799
|
[styles[`size${this.props.size}`]]: this.props.type !== Type.INLINE,
|
|
800
800
|
[styles.disabled]: this.props.disabled
|
|
801
801
|
});
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
802
|
+
let style;
|
|
803
|
+
let iconsNode;
|
|
804
|
+
if (this.props.type === Type.INPUT || this.props.type === Type.BUTTON) {
|
|
805
|
+
const icons = this._getIcons();
|
|
806
|
+
style = getStyle(icons.length);
|
|
807
|
+
iconsNode = <div className={styles.icons}>{icons}</div>;
|
|
808
|
+
}
|
|
805
809
|
const ariaProps = this.state.showPopup
|
|
806
810
|
? {
|
|
807
811
|
'aria-owns': this.listId,
|
|
@@ -823,7 +827,7 @@ export default class Select extends Component {
|
|
|
823
827
|
...this.getShortcutsMap(),
|
|
824
828
|
...this._popup?.list?.shortcutsMap
|
|
825
829
|
})
|
|
826
|
-
: undefined} icon={this.props.filterIcon} afterInput={
|
|
830
|
+
: undefined} icon={this.props.filterIcon} afterInput={iconsNode}/>
|
|
827
831
|
{this._renderPopup()}
|
|
828
832
|
</div>
|
|
829
833
|
{this.props.error && (<div className={classNames(inputStyles.errorText, inputStyles[`size${this.props.size}`])}>
|
|
@@ -55,16 +55,11 @@ const TabTrap = forwardRef(function TabTrap({ children, trapDisabled = false, au
|
|
|
55
55
|
if (previousFocusedNode instanceof HTMLElement &&
|
|
56
56
|
previousFocusedNode.focus &&
|
|
57
57
|
isNodeInVisiblePartOfPage(previousFocusedNode)) {
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// componentWillUnmount is called in StrictMode.
|
|
64
|
-
if (!mountedRef.current) {
|
|
65
|
-
previousFocusedNode.focus({ preventScroll: true });
|
|
66
|
-
}
|
|
67
|
-
});
|
|
58
|
+
// This is to prevent the focus from being restored the first time
|
|
59
|
+
// componentWillUnmount is called in StrictMode.
|
|
60
|
+
if (!mountedRef.current) {
|
|
61
|
+
previousFocusedNode.focus({ preventScroll: true });
|
|
62
|
+
}
|
|
68
63
|
}
|
|
69
64
|
}
|
|
70
65
|
function focusElement(first = true) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.43",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -88,16 +88,16 @@
|
|
|
88
88
|
"@rollup/plugin-json": "^6.1.0",
|
|
89
89
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
90
90
|
"@rollup/plugin-replace": "^5.0.7",
|
|
91
|
-
"@storybook/addon-a11y": "8.
|
|
92
|
-
"@storybook/addon-docs": "8.
|
|
93
|
-
"@storybook/addon-essentials": "8.
|
|
94
|
-
"@storybook/components": "8.
|
|
95
|
-
"@storybook/manager-api": "8.
|
|
96
|
-
"@storybook/preview-api": "8.
|
|
97
|
-
"@storybook/react": "8.
|
|
98
|
-
"@storybook/react-webpack5": "8.
|
|
99
|
-
"@storybook/test-runner": "^0.
|
|
100
|
-
"@storybook/theming": "8.
|
|
91
|
+
"@storybook/addon-a11y": "8.2.0",
|
|
92
|
+
"@storybook/addon-docs": "8.2.0",
|
|
93
|
+
"@storybook/addon-essentials": "8.2.0",
|
|
94
|
+
"@storybook/components": "8.2.0",
|
|
95
|
+
"@storybook/manager-api": "8.2.0",
|
|
96
|
+
"@storybook/preview-api": "8.2.0",
|
|
97
|
+
"@storybook/react": "8.2.0",
|
|
98
|
+
"@storybook/react-webpack5": "8.2.0",
|
|
99
|
+
"@storybook/test-runner": "^0.19.0",
|
|
100
|
+
"@storybook/theming": "8.2.0",
|
|
101
101
|
"@testing-library/dom": "^10.3.1",
|
|
102
102
|
"@testing-library/react": "^16.0.0",
|
|
103
103
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -112,14 +112,14 @@
|
|
|
112
112
|
"@types/sinon": "^17.0.3",
|
|
113
113
|
"@types/sinon-chai": "^3.2.12",
|
|
114
114
|
"@types/webpack-env": "^1.18.5",
|
|
115
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
116
|
-
"@typescript-eslint/parser": "^7.
|
|
115
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
116
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
117
117
|
"@vitejs/plugin-react": "^4.3.1",
|
|
118
118
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
119
119
|
"acorn": "^8.12.1",
|
|
120
120
|
"axe-playwright": "^2.0.1",
|
|
121
121
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
122
|
-
"caniuse-lite": "^1.0.
|
|
122
|
+
"caniuse-lite": "^1.0.30001641",
|
|
123
123
|
"chai": "^5.1.1",
|
|
124
124
|
"chai-as-promised": "^8.0.0",
|
|
125
125
|
"chai-dom": "^1.10.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
138
138
|
"eslint-plugin-storybook": "^0.8.0",
|
|
139
139
|
"events": "^3.3.0",
|
|
140
|
-
"glob": "^
|
|
140
|
+
"glob": "^11.0.0",
|
|
141
141
|
"html-webpack-plugin": "^5.6.0",
|
|
142
142
|
"http-server": "^14.1.1",
|
|
143
143
|
"husky": "^9.0.11",
|
|
@@ -155,21 +155,21 @@
|
|
|
155
155
|
"react-dom": "^18.3.1",
|
|
156
156
|
"react-test-renderer": "^18.3.1",
|
|
157
157
|
"regenerator-runtime": "^0.14.1",
|
|
158
|
-
"rimraf": "^
|
|
159
|
-
"rollup": "^4.18.
|
|
158
|
+
"rimraf": "^6.0.0",
|
|
159
|
+
"rollup": "^4.18.1",
|
|
160
160
|
"rollup-plugin-clear": "^2.0.7",
|
|
161
161
|
"rollup-plugin-styles": "^4.0.0",
|
|
162
162
|
"sinon": "^18.0.0",
|
|
163
163
|
"sinon-chai": "^3.7.0",
|
|
164
164
|
"storage-mock": "^2.1.0",
|
|
165
|
-
"storybook": "8.
|
|
165
|
+
"storybook": "8.2.0",
|
|
166
166
|
"storybook-addon-themes": "^6.1.0",
|
|
167
167
|
"stylelint": "^16.6.1",
|
|
168
168
|
"svg-inline-loader": "^0.8.2",
|
|
169
169
|
"teamcity-service-messages": "^0.1.14",
|
|
170
170
|
"terser-webpack-plugin": "^5.3.10",
|
|
171
171
|
"typescript": "~5.5.3",
|
|
172
|
-
"vitest": "^
|
|
172
|
+
"vitest": "^2.0.1",
|
|
173
173
|
"vitest-teamcity-reporter": "^0.3.0",
|
|
174
174
|
"wallaby-webpack": "^3.9.16",
|
|
175
175
|
"webpack": "^5.92.1",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"@ungap/url-search-params": "^0.2.2",
|
|
211
211
|
"babel-loader": "9.1.3",
|
|
212
212
|
"babel-plugin-transform-define": "^2.1.4",
|
|
213
|
-
"browserslist": "^4.23.
|
|
213
|
+
"browserslist": "^4.23.2",
|
|
214
214
|
"change-case": "^4.1.1",
|
|
215
215
|
"classnames": "^2.5.1",
|
|
216
216
|
"combokeys": "^3.0.1",
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
233
233
|
"postcss-loader": "^8.1.1",
|
|
234
234
|
"postcss-modules-values-replace": "^4.2.0",
|
|
235
|
-
"postcss-preset-env": "^9.
|
|
235
|
+
"postcss-preset-env": "^9.6.0",
|
|
236
236
|
"prop-types": "^15.8.1",
|
|
237
237
|
"react-movable": "^3.2.0",
|
|
238
238
|
"react-virtualized": "^9.22.5",
|