@jetbrains/ring-ui 6.0.22 → 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.
@@ -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}
@@ -44,10 +44,6 @@
44
44
  overscroll-behavior: contain;
45
45
  }
46
46
 
47
- .popupOverscrollNone {
48
- overscroll-behavior: none;
49
- }
50
-
51
47
  .filterWrapper {
52
48
  position: relative;
53
49
 
@@ -252,9 +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} className={this.props.preventListOverscroll
256
- ? styles.popupOverscrollNone
257
- : undefined} 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}/>);
258
256
  }
259
257
  return null;
260
258
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.22",
3
+ "version": "6.0.23",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",