@jetbrains/ring-ui 6.0.21 → 6.0.22

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.
@@ -371,6 +371,10 @@
371
371
 
372
372
  color: var(--ring-icon-secondary-color);
373
373
 
374
+ .primary & {
375
+ color: unset;
376
+ }
377
+
374
378
  line-height: normal;
375
379
  }
376
380
 
@@ -44,6 +44,10 @@
44
44
  overscroll-behavior: contain;
45
45
  }
46
46
 
47
+ .popupOverscrollNone {
48
+ overscroll-behavior: none;
49
+ }
50
+
47
51
  .filterWrapper {
48
52
  position: relative;
49
53
 
@@ -102,6 +102,7 @@ export interface BaseSelectProps<T = unknown> {
102
102
  left?: number | undefined;
103
103
  renderOptimization?: boolean | undefined;
104
104
  ringPopupTarget?: string | null | undefined;
105
+ preventListOverscroll?: boolean | undefined;
105
106
  error?: ReactNode | null | undefined;
106
107
  hint?: ReactNode;
107
108
  add?: Add | null | undefined;
@@ -443,7 +443,7 @@ export default class Select extends Component {
443
443
  message = this.props.notFoundMessage ?? translate('noOptionsFound');
444
444
  }
445
445
  return (<SelectPopup data={_shownData} message={message} toolbar={showPopup && this.getToolbar()} topbar={this.getTopbar()} loading={this.props.loading} activeIndex={this.state.selectedIndex} hidden={!showPopup} ref={this.popupRef} maxHeight={this.props.maxHeight} minWidth={this.props.minWidth} directions={this.props.directions} className={this.props.popupClassName} style={this.props.popupStyle} top={this.props.top} left={this.props.left} filter={this.isInputMode() ? false : this.props.filter} // disable popup filter in INPUT mode
446
- filterIcon={this.props.filterIcon} filterRef={this.props.filterRef} multiple={this.props.multiple} filterValue={this.state.filterValue} anchorElement={anchorElement} onCloseAttempt={this._onCloseAttempt} onOutsideClick={this.props.onOutsideClick} onSelect={this._listSelectHandler} onSelectAll={this._listSelectAllHandler} onFilter={this._filterChangeHandler} onClear={this.clearFilter} onLoadMore={this.props.onLoadMore} isInputMode={this.isInputMode()} selected={this.state.selected} tags={this.props.tags} compact={this.props.compact} renderOptimization={this.props.renderOptimization} ringPopupTarget={this.props.ringPopupTarget} disableMoveOverflow={this.props.disableMoveOverflow} disableScrollToActive={this.props.disableScrollToActive} dir={this.props.dir} onEmptyPopupEnter={this.onEmptyPopupEnter} listId={this.listId}/>);
446
+ filterIcon={this.props.filterIcon} filterRef={this.props.filterRef} multiple={this.props.multiple} filterValue={this.state.filterValue} anchorElement={anchorElement} onCloseAttempt={this._onCloseAttempt} onOutsideClick={this.props.onOutsideClick} onSelect={this._listSelectHandler} onSelectAll={this._listSelectAllHandler} onFilter={this._filterChangeHandler} onClear={this.clearFilter} onLoadMore={this.props.onLoadMore} isInputMode={this.isInputMode()} selected={this.state.selected} tags={this.props.tags} compact={this.props.compact} renderOptimization={this.props.renderOptimization} ringPopupTarget={this.props.ringPopupTarget} disableMoveOverflow={this.props.disableMoveOverflow} disableScrollToActive={this.props.disableScrollToActive} dir={this.props.dir} onEmptyPopupEnter={this.onEmptyPopupEnter} listId={this.listId} preventListOverscroll={this.props.preventListOverscroll}/>);
447
447
  }}
448
448
  </I18nContext.Consumer>);
449
449
  }
@@ -925,6 +925,7 @@ Select.propTypes = {
925
925
  directions: PropTypes.array,
926
926
  popupClassName: PropTypes.string,
927
927
  popupStyle: PropTypes.object,
928
+ preventListOverscroll: PropTypes.bool,
928
929
  top: PropTypes.number,
929
930
  left: PropTypes.number,
930
931
  renderOptimization: PropTypes.bool,
@@ -77,6 +77,7 @@ export interface SelectPopupProps<T = unknown> {
77
77
  multiple: boolean | Multiple;
78
78
  selected: ListDataItem<T> | readonly ListDataItem<T>[] | null;
79
79
  tags: Tags | boolean | null;
80
+ preventListOverscroll?: boolean | undefined;
80
81
  }
81
82
  export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupProps<T>> {
82
83
  static defaultProps: SelectPopupProps;
@@ -252,7 +252,9 @@ export default class SelectPopup extends PureComponent {
252
252
  if (this.props.toolbar) {
253
253
  maxHeight -= TOOLBAR_HEIGHT;
254
254
  }
255
- return (<List id={this.props.listId} maxHeight={maxHeight} data={this.props.data} activeIndex={this.props.activeIndex} ref={this.listRef} restoreActiveIndex activateFirstItem onSelect={this.onListSelect} onResize={this.handleListResize} onScrollToBottom={this.props.onLoadMore} hidden={this.props.hidden} shortcuts={!this.props.hidden} disableMoveOverflow={this.props.disableMoveOverflow} disableMoveDownOverflow={this.props.loading} disableScrollToActive={this.props.disableScrollToActive} compact={this.props.compact} renderOptimization={this.props.renderOptimization}/>);
255
+ return (<List id={this.props.listId} maxHeight={maxHeight} data={this.props.data} activeIndex={this.props.activeIndex} ref={this.listRef} restoreActiveIndex activateFirstItem onSelect={this.onListSelect} onResize={this.handleListResize} onScrollToBottom={this.props.onLoadMore} hidden={this.props.hidden} shortcuts={!this.props.hidden} disableMoveOverflow={this.props.disableMoveOverflow} disableMoveDownOverflow={this.props.loading} disableScrollToActive={this.props.disableScrollToActive} compact={this.props.compact} className={this.props.preventListOverscroll
256
+ ? styles.popupOverscrollNone
257
+ : undefined} renderOptimization={this.props.renderOptimization}/>);
256
258
  }
257
259
  return null;
258
260
  }
@@ -404,5 +406,6 @@ SelectPopup.propTypes = {
404
406
  tags: PropTypes.object,
405
407
  toolbar: PropTypes.node,
406
408
  topbar: PropTypes.node,
407
- top: PropTypes.number
409
+ top: PropTypes.number,
410
+ preventListOverscroll: PropTypes.bool
408
411
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.21",
3
+ "version": "6.0.22",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -77,8 +77,8 @@
77
77
  },
78
78
  "readmeFilename": "README.md",
79
79
  "devDependencies": {
80
- "@babel/cli": "^7.24.1",
81
- "@babel/eslint-parser": "^7.24.1",
80
+ "@babel/cli": "^7.24.5",
81
+ "@babel/eslint-parser": "^7.24.5",
82
82
  "@csstools/css-parser-algorithms": "^2.6.1",
83
83
  "@csstools/stylelint-no-at-nest-rule": "^2.0.0",
84
84
  "@jetbrains/eslint-config": "^5.4.2",
@@ -109,11 +109,11 @@
109
109
  "@types/enzyme": "^3.10.18",
110
110
  "@types/markdown-it": "^14.0.1",
111
111
  "@types/react": "^18.3.1",
112
- "@types/react-dom": "^18.2.25",
112
+ "@types/react-dom": "^18.3.0",
113
113
  "@types/sinon": "^17.0.3",
114
114
  "@types/sinon-chai": "^3.2.12",
115
- "@typescript-eslint/eslint-plugin": "^7.7.1",
116
- "@typescript-eslint/parser": "^7.7.1",
115
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
116
+ "@typescript-eslint/parser": "^7.8.0",
117
117
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
118
118
  "acorn": "^8.11.3",
119
119
  "axe-playwright": "^2.0.1",
@@ -159,11 +159,11 @@
159
159
  "puppeteer": "^22.7.1",
160
160
  "raw-loader": "^4.0.2",
161
161
  "react": "^18.3.1",
162
- "react-dom": "^18.2.0",
163
- "react-test-renderer": "^18.2.0",
162
+ "react-dom": "^18.3.1",
163
+ "react-test-renderer": "^18.3.1",
164
164
  "regenerator-runtime": "^0.14.1",
165
165
  "rimraf": "^5.0.5",
166
- "rollup": "^4.17.1",
166
+ "rollup": "^4.17.2",
167
167
  "rollup-plugin-clear": "^2.0.7",
168
168
  "rollup-plugin-styles": "^4.0.0",
169
169
  "sinon": "^17.0.1",
@@ -201,7 +201,7 @@
201
201
  }
202
202
  },
203
203
  "dependencies": {
204
- "@babel/core": "^7.24.4",
204
+ "@babel/core": "^7.24.5",
205
205
  "@babel/preset-typescript": "^7.24.1",
206
206
  "@jetbrains/babel-preset-jetbrains": "^2.3.2",
207
207
  "@jetbrains/icons": "^4.2.0",