@jetbrains/ring-ui 4.1.22 → 4.1.25
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/date-picker/date-popup.js +0 -1
- package/components/popup/popup.js +5 -2
- package/components/select/select.js +5 -3
- package/components/tag/tag.js +0 -1
- package/dist/date-picker/date-popup.js +1 -2
- package/dist/popup/popup.js +7 -2
- package/dist/select/select.js +6 -4
- package/dist/tag/tag.js +0 -1
- package/package.json +26 -26
|
@@ -59,6 +59,7 @@ export default class Popup extends PureComponent {
|
|
|
59
59
|
|
|
60
60
|
directions: PropTypes.arrayOf(PropTypes.string),
|
|
61
61
|
autoPositioning: PropTypes.bool,
|
|
62
|
+
autoPositioningOnScroll: PropTypes.bool,
|
|
62
63
|
autoCorrectTopOverflow: PropTypes.bool,
|
|
63
64
|
left: PropTypes.number,
|
|
64
65
|
top: PropTypes.number,
|
|
@@ -91,6 +92,7 @@ export default class Popup extends PureComponent {
|
|
|
91
92
|
|
|
92
93
|
directions: DEFAULT_DIRECTIONS,
|
|
93
94
|
autoPositioning: true,
|
|
95
|
+
autoPositioningOnScroll: true,
|
|
94
96
|
autoCorrectTopOverflow: true,
|
|
95
97
|
left: 0,
|
|
96
98
|
top: 0,
|
|
@@ -110,7 +112,6 @@ export default class Popup extends PureComponent {
|
|
|
110
112
|
|
|
111
113
|
componentDidMount() {
|
|
112
114
|
if (!this.props.client) {
|
|
113
|
-
// eslint-disable-next-line react/no-did-mount-set-state
|
|
114
115
|
this.setState({client: true});
|
|
115
116
|
}
|
|
116
117
|
if (!this.props.hidden) {
|
|
@@ -250,7 +251,9 @@ export default class Popup extends PureComponent {
|
|
|
250
251
|
setTimeout(() => {
|
|
251
252
|
this._listenersEnabled = true;
|
|
252
253
|
this.listeners.add(window, 'resize', this._redraw);
|
|
253
|
-
this.
|
|
254
|
+
if (this.props.autoPositioningOnScroll) {
|
|
255
|
+
this.listeners.add(window, 'scroll', this._redraw);
|
|
256
|
+
}
|
|
254
257
|
this.listeners.add(document, 'pointerdown', this._onDocumentClick, true);
|
|
255
258
|
let el = this._getAnchor();
|
|
256
259
|
while (el) {
|
|
@@ -264,6 +264,7 @@ export default class Select extends Component {
|
|
|
264
264
|
disabled: PropTypes.bool,
|
|
265
265
|
hideSelected: PropTypes.bool,
|
|
266
266
|
label: PropTypes.string,
|
|
267
|
+
renderBottomToolbar: PropTypes.func,
|
|
267
268
|
selectedLabel: PropTypes.oneOfType([
|
|
268
269
|
PropTypes.string,
|
|
269
270
|
PropTypes.arrayOf(PropTypes.node),
|
|
@@ -667,9 +668,9 @@ export default class Select extends Component {
|
|
|
667
668
|
};
|
|
668
669
|
|
|
669
670
|
getToolbar() {
|
|
670
|
-
const {hint} = this.props;
|
|
671
|
+
const {hint, renderBottomToolbar} = this.props;
|
|
671
672
|
const {prefix, label, delayed} = this.state.addButton || {};
|
|
672
|
-
const isToolbarHasElements = this.state.addButton || hint;
|
|
673
|
+
const isToolbarHasElements = this.state.addButton || hint || renderBottomToolbar;
|
|
673
674
|
if (!isToolbarHasElements) {
|
|
674
675
|
return null;
|
|
675
676
|
}
|
|
@@ -677,10 +678,11 @@ export default class Select extends Component {
|
|
|
677
678
|
return (
|
|
678
679
|
<div
|
|
679
680
|
className={classNames({
|
|
680
|
-
[styles.toolbar]:
|
|
681
|
+
[styles.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
|
681
682
|
})}
|
|
682
683
|
data-test="ring-select-toolbar"
|
|
683
684
|
>
|
|
685
|
+
{renderBottomToolbar && renderBottomToolbar()}
|
|
684
686
|
{this.state.addButton && (
|
|
685
687
|
<Button
|
|
686
688
|
text
|
package/components/tag/tag.js
CHANGED
|
@@ -48,7 +48,6 @@ export default class Tag extends PureComponent {
|
|
|
48
48
|
|
|
49
49
|
componentDidUpdate(prevProps) {
|
|
50
50
|
if (this.props.focused !== prevProps.focused) {
|
|
51
|
-
// eslint-disable-next-line react/no-did-update-set-state
|
|
52
51
|
this.setState({focused: this.props.focused});
|
|
53
52
|
}
|
|
54
53
|
if (this.state.focused) {
|
|
@@ -227,8 +227,7 @@ class DatePopup extends Component {
|
|
|
227
227
|
if (this.state.active !== prevState.active) {
|
|
228
228
|
if (this.state.text && prevState.active) {
|
|
229
229
|
this.confirm(prevState.active);
|
|
230
|
-
}
|
|
231
|
-
|
|
230
|
+
}
|
|
232
231
|
|
|
233
232
|
this.setState({
|
|
234
233
|
text: null
|
package/dist/popup/popup.js
CHANGED
|
@@ -137,7 +137,6 @@ class Popup extends PureComponent {
|
|
|
137
137
|
|
|
138
138
|
componentDidMount() {
|
|
139
139
|
if (!this.props.client) {
|
|
140
|
-
// eslint-disable-next-line react/no-did-mount-set-state
|
|
141
140
|
this.setState({
|
|
142
141
|
client: true
|
|
143
142
|
});
|
|
@@ -213,7 +212,11 @@ class Popup extends PureComponent {
|
|
|
213
212
|
setTimeout(() => {
|
|
214
213
|
this._listenersEnabled = true;
|
|
215
214
|
this.listeners.add(window, 'resize', this._redraw);
|
|
216
|
-
|
|
215
|
+
|
|
216
|
+
if (this.props.autoPositioningOnScroll) {
|
|
217
|
+
this.listeners.add(window, 'scroll', this._redraw);
|
|
218
|
+
}
|
|
219
|
+
|
|
217
220
|
this.listeners.add(document, 'pointerdown', this._onDocumentClick, true);
|
|
218
221
|
|
|
219
222
|
let el = this._getAnchor();
|
|
@@ -336,6 +339,7 @@ _defineProperty(Popup, "propTypes", {
|
|
|
336
339
|
// true means that it's never used in SSR
|
|
337
340
|
directions: PropTypes.arrayOf(PropTypes.string),
|
|
338
341
|
autoPositioning: PropTypes.bool,
|
|
342
|
+
autoPositioningOnScroll: PropTypes.bool,
|
|
339
343
|
autoCorrectTopOverflow: PropTypes.bool,
|
|
340
344
|
left: PropTypes.number,
|
|
341
345
|
top: PropTypes.number,
|
|
@@ -370,6 +374,7 @@ _defineProperty(Popup, "defaultProps", {
|
|
|
370
374
|
keepMounted: false,
|
|
371
375
|
directions: DEFAULT_DIRECTIONS,
|
|
372
376
|
autoPositioning: true,
|
|
377
|
+
autoPositioningOnScroll: true,
|
|
373
378
|
autoCorrectTopOverflow: true,
|
|
374
379
|
left: 0,
|
|
375
380
|
top: 0,
|
package/dist/select/select.js
CHANGED
|
@@ -899,14 +899,15 @@ class Select extends Component {
|
|
|
899
899
|
|
|
900
900
|
getToolbar() {
|
|
901
901
|
const {
|
|
902
|
-
hint
|
|
902
|
+
hint,
|
|
903
|
+
renderBottomToolbar
|
|
903
904
|
} = this.props;
|
|
904
905
|
const {
|
|
905
906
|
prefix,
|
|
906
907
|
label,
|
|
907
908
|
delayed
|
|
908
909
|
} = this.state.addButton || {};
|
|
909
|
-
const isToolbarHasElements = this.state.addButton || hint;
|
|
910
|
+
const isToolbarHasElements = this.state.addButton || hint || renderBottomToolbar;
|
|
910
911
|
|
|
911
912
|
if (!isToolbarHasElements) {
|
|
912
913
|
return null;
|
|
@@ -914,10 +915,10 @@ class Select extends Component {
|
|
|
914
915
|
|
|
915
916
|
return /*#__PURE__*/React.createElement("div", {
|
|
916
917
|
className: classNames({
|
|
917
|
-
[modules_9d0de074.toolbar]:
|
|
918
|
+
[modules_9d0de074.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
|
918
919
|
}),
|
|
919
920
|
"data-test": "ring-select-toolbar"
|
|
920
|
-
}, this.state.addButton && /*#__PURE__*/React.createElement(Button, {
|
|
921
|
+
}, renderBottomToolbar && renderBottomToolbar(), this.state.addButton && /*#__PURE__*/React.createElement(Button, {
|
|
921
922
|
text: true,
|
|
922
923
|
delayed: delayed,
|
|
923
924
|
className: classNames(modules_9d0de074.button, modules_9d0de074.buttonSpaced),
|
|
@@ -1261,6 +1262,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
1261
1262
|
disabled: PropTypes.bool,
|
|
1262
1263
|
hideSelected: PropTypes.bool,
|
|
1263
1264
|
label: PropTypes.string,
|
|
1265
|
+
renderBottomToolbar: PropTypes.func,
|
|
1264
1266
|
selectedLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
1265
1267
|
inputPlaceholder: PropTypes.string,
|
|
1266
1268
|
clear: PropTypes.bool,
|
package/dist/tag/tag.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.25",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
},
|
|
68
68
|
"readmeFilename": "README.md",
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@babel/cli": "^7.17.
|
|
70
|
+
"@babel/cli": "^7.17.6",
|
|
71
71
|
"@babel/eslint-parser": "^7.17.0",
|
|
72
|
-
"@jetbrains/eslint-config": "^5.3.
|
|
73
|
-
"@jetbrains/generator-ring-ui": "^4.1.
|
|
72
|
+
"@jetbrains/eslint-config": "^5.3.2",
|
|
73
|
+
"@jetbrains/generator-ring-ui": "^4.1.8",
|
|
74
74
|
"@jetbrains/stylelint-config": "^3.0.2",
|
|
75
|
-
"@primer/octicons": "^
|
|
76
|
-
"@rollup/plugin-babel": "^5.3.
|
|
77
|
-
"@rollup/plugin-replace": "^
|
|
75
|
+
"@primer/octicons": "^17.0.0",
|
|
76
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
77
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
78
78
|
"@storybook/addon-a11y": "6.4.19",
|
|
79
79
|
"@storybook/addon-docs": "6.4.19",
|
|
80
80
|
"@storybook/addon-essentials": "6.4.19",
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
"@storybook/builder-webpack5": "6.4.19",
|
|
86
86
|
"@storybook/client-api": "6.4.19",
|
|
87
87
|
"@storybook/core": "6.4.19",
|
|
88
|
-
"@storybook/html": "6.4.
|
|
88
|
+
"@storybook/html": "6.4.19",
|
|
89
89
|
"@storybook/manager-webpack5": "^6.4.19",
|
|
90
90
|
"@storybook/source-loader": "6.4.19",
|
|
91
91
|
"@storybook/theming": "6.4.19",
|
|
92
|
-
"@testing-library/react": "^12.1.
|
|
92
|
+
"@testing-library/react": "^12.1.4",
|
|
93
93
|
"@testing-library/user-event": "^13.5.0",
|
|
94
94
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
|
|
95
95
|
"angular": "^1.8.2",
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
"cheerio": "^0.22.0",
|
|
105
105
|
"core-js": "^3.21.1",
|
|
106
106
|
"enzyme": "^3.11.0",
|
|
107
|
-
"eslint": "^8.
|
|
107
|
+
"eslint": "^8.11.0",
|
|
108
108
|
"eslint-import-resolver-webpack": "^0.13.2",
|
|
109
109
|
"eslint-plugin-angular": "^4.1.0",
|
|
110
110
|
"eslint-plugin-bdd": "^2.1.1",
|
|
111
111
|
"eslint-plugin-import": "^2.25.4",
|
|
112
112
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
113
|
-
"eslint-plugin-react": "^7.
|
|
113
|
+
"eslint-plugin-react": "^7.29.4",
|
|
114
114
|
"events": "^3.3.0",
|
|
115
115
|
"glob": "^7.2.0",
|
|
116
116
|
"html-webpack-plugin": "^5.5.0",
|
|
@@ -119,35 +119,35 @@
|
|
|
119
119
|
"imports-loader": "^3.1.1",
|
|
120
120
|
"jest": "~27.5.1",
|
|
121
121
|
"jest-teamcity": "^1.10.0",
|
|
122
|
-
"karma": "^6.3.
|
|
123
|
-
"karma-chrome-launcher": "3.1.
|
|
122
|
+
"karma": "^6.3.17",
|
|
123
|
+
"karma-chrome-launcher": "3.1.1",
|
|
124
124
|
"karma-mocha": "^2.0.1",
|
|
125
125
|
"karma-sourcemap-loader": "^0.3.8",
|
|
126
126
|
"karma-teamcity-reporter": "^2.0.0",
|
|
127
127
|
"karma-webpack": "^5.0.0",
|
|
128
128
|
"lerna": "^4.0.0",
|
|
129
|
-
"lint-staged": "^12.3.
|
|
129
|
+
"lint-staged": "^12.3.6",
|
|
130
130
|
"merge-options": "^3.0.4",
|
|
131
|
-
"mocha": "^9.2.
|
|
131
|
+
"mocha": "^9.2.2",
|
|
132
132
|
"pinst": "^3.0.0",
|
|
133
|
-
"puppeteer": "^13.
|
|
133
|
+
"puppeteer": "^13.5.1",
|
|
134
134
|
"raw-loader": "^4.0.2",
|
|
135
135
|
"react": "^17.0.2",
|
|
136
136
|
"react-dom": "^17.0.2",
|
|
137
137
|
"react-test-renderer": "^17.0.2",
|
|
138
138
|
"regenerator-runtime": "^0.13.9",
|
|
139
|
-
"rollup": "^2.
|
|
139
|
+
"rollup": "^2.70.1",
|
|
140
140
|
"rollup-plugin-clear": "^2.0.7",
|
|
141
141
|
"rollup-plugin-styles": "^4.0.0",
|
|
142
142
|
"sinon": "^13.0.1",
|
|
143
143
|
"sinon-chai": "^3.7.0",
|
|
144
144
|
"storage-mock": "^2.1.0",
|
|
145
|
-
"stylelint": "^14.5.
|
|
145
|
+
"stylelint": "^14.5.3",
|
|
146
146
|
"svg-inline-loader": "^0.8.2",
|
|
147
147
|
"teamcity-service-messages": "^0.1.12",
|
|
148
148
|
"terser-webpack-plugin": "^5.3.1",
|
|
149
149
|
"wallaby-webpack": "^3.9.16",
|
|
150
|
-
"webpack": "^5.
|
|
150
|
+
"webpack": "^5.70.0",
|
|
151
151
|
"webpack-cli": "^4.9.2",
|
|
152
152
|
"xmlappend": "^1.0.4",
|
|
153
153
|
"yo": "^4.3.0"
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"core-js": ">=3.0.0",
|
|
157
157
|
"react": ">=16.8.0",
|
|
158
158
|
"react-dom": ">=16.8.0",
|
|
159
|
-
"webpack": "^5.
|
|
159
|
+
"webpack": "^5.70.0"
|
|
160
160
|
},
|
|
161
161
|
"peerDependenciesMeta": {
|
|
162
162
|
"webpack": {
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
"dependencies": {
|
|
167
|
-
"@babel/core": "^7.17.
|
|
167
|
+
"@babel/core": "^7.17.7",
|
|
168
168
|
"@jetbrains/angular-elastic": "^2.5.1",
|
|
169
169
|
"@jetbrains/babel-preset-jetbrains": "^2.3.2",
|
|
170
170
|
"@jetbrains/icons": "^3.18.0",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"combokeys": "^3.0.1",
|
|
180
180
|
"compile-code-loader": "^1.0.0",
|
|
181
181
|
"conic-gradient": "^1.0.0",
|
|
182
|
-
"css-loader": "^6.
|
|
182
|
+
"css-loader": "^6.7.1",
|
|
183
183
|
"date-fns": "^2.28.0",
|
|
184
184
|
"deep-equal": "^2.0.4",
|
|
185
185
|
"element-resize-detector": "^1.2.4",
|
|
@@ -195,16 +195,16 @@
|
|
|
195
195
|
"interpolate-loader": "^2.0.1",
|
|
196
196
|
"just-debounce-it": "^3.0.1",
|
|
197
197
|
"memoize-one": "^6.0.0",
|
|
198
|
-
"postcss": "^8.4.
|
|
198
|
+
"postcss": "^8.4.12",
|
|
199
199
|
"postcss-calc": "^8.2.4",
|
|
200
200
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
201
201
|
"postcss-font-family-system-ui": "^5.0.0",
|
|
202
202
|
"postcss-loader": "^6.2.1",
|
|
203
203
|
"postcss-modules-values-replace": "^3.4.0",
|
|
204
|
-
"postcss-preset-env": "^7.4.
|
|
204
|
+
"postcss-preset-env": "^7.4.2",
|
|
205
205
|
"prop-types": "^15.8.1",
|
|
206
206
|
"react-markdown": "^5.0.3",
|
|
207
|
-
"react-movable": "^3.0.
|
|
207
|
+
"react-movable": "^3.0.4",
|
|
208
208
|
"react-virtualized": "^9.22.3",
|
|
209
209
|
"react-waypoint": "^10.1.0",
|
|
210
210
|
"remark-breaks": "^3.0.2",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"node": ">=7.4",
|
|
222
222
|
"npm": ">=6.0.0"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "d52f95d73b992b26ac69526b0ee3898e0e4ff9f3"
|
|
225
225
|
}
|