@jetbrains/ring-ui 6.0.21 → 6.0.23

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
 
@@ -291,6 +291,10 @@
291
291
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--ring-content-background-color));
292
292
  }
293
293
 
294
+ .overscrollNone {
295
+ overscroll-behavior: none;
296
+ }
297
+
294
298
  .disabled {
295
299
  pointer-events: none;
296
300
 
@@ -45,6 +45,7 @@ export interface ListProps<T = unknown> {
45
45
  compact?: boolean | null | undefined;
46
46
  disableScrollToActive?: boolean | null | undefined;
47
47
  hidden?: boolean | null | undefined;
48
+ preventListOverscroll?: boolean | undefined;
48
49
  }
49
50
  export declare const ActiveItemContext: {
50
51
  ValueContext: React.Context<string | undefined>;
@@ -114,6 +115,7 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
114
115
  disableScrollToActive: PropTypes.Requireable<boolean>;
115
116
  hidden: PropTypes.Requireable<boolean>;
116
117
  ariaLabel: PropTypes.Requireable<string>;
118
+ preventListOverscroll: PropTypes.Requireable<boolean>;
117
119
  };
118
120
  static defaultProps: {
119
121
  data: never[];
@@ -86,7 +86,8 @@ export default class List extends Component {
86
86
  compact: PropTypes.bool,
87
87
  disableScrollToActive: PropTypes.bool,
88
88
  hidden: PropTypes.bool,
89
- ariaLabel: PropTypes.string
89
+ ariaLabel: PropTypes.string,
90
+ preventListOverscroll: PropTypes.bool
90
91
  };
91
92
  static defaultProps = {
92
93
  data: [],
@@ -515,7 +516,7 @@ export default class List extends Component {
515
516
  const dirOverride = { direction: 'inherit' }; // Virtualized sets "direction: ltr" by default https://github.com/bvaughn/react-virtualized/issues/457
516
517
  return (<AutoSizer disableHeight onResize={this.props.onResize}>
517
518
  {({ width }) => (<div ref={registerChild}>
518
- <VirtualizedList aria-label={this.props.ariaLabel} ref={this.virtualizedListRef} className="ring-list__i" autoHeight={autoHeight} style={maxHeight ? { maxHeight, height: 'auto', ...dirOverride } : dirOverride} autoContainerWidth height={height} width={width} isScrolling={isScrolling} onScroll={e => {
519
+ <VirtualizedList aria-label={this.props.ariaLabel} ref={this.virtualizedListRef} className={classNames('ring-list__i', { [styles.overscrollNone]: this.props.preventListOverscroll })} autoHeight={autoHeight} style={maxHeight ? { maxHeight, height: 'auto', ...dirOverride } : dirOverride} autoContainerWidth height={height} width={width} isScrolling={isScrolling} onScroll={e => {
519
520
  onChildScroll(e);
520
521
  this.scrollEndHandler();
521
522
  }} scrollTop={scrollTop} rowCount={rowCount} estimatedRowSize={this.defaultItemHeight()} rowHeight={this._cache.rowHeight} rowRenderer={this.renderItem} overscanRowCount={this._bufferSize}
@@ -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,7 @@ 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} preventListOverscroll={this.props.preventListOverscroll} renderOptimization={this.props.renderOptimization}/>);
256
256
  }
257
257
  return null;
258
258
  }
@@ -404,5 +404,6 @@ SelectPopup.propTypes = {
404
404
  tags: PropTypes.object,
405
405
  toolbar: PropTypes.node,
406
406
  topbar: PropTypes.node,
407
- top: PropTypes.number
407
+ top: PropTypes.number,
408
+ preventListOverscroll: PropTypes.bool
408
409
  };
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.23",
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",