@jetbrains/ring-ui 6.0.20 → 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
 
@@ -480,7 +480,7 @@ export default class List extends Component {
480
480
  default:
481
481
  throw new Error(`Unknown menu element type: ${itemProps.rgItemType}`);
482
482
  }
483
- el = <ItemComponent {...itemProps}/>;
483
+ el = <ItemComponent {...itemProps} key={itemProps.key}/>;
484
484
  }
485
485
  return parent
486
486
  ? (<CellMeasurer cache={this._cache} key={itemKey} parent={parent} rowIndex={index} columnIndex={0}>
@@ -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
  };
@@ -151,7 +151,7 @@ export class Table extends PureComponent {
151
151
  return null;
152
152
  }
153
153
  const { ref, ...restProps } = props;
154
- const row = (<Row innerRef={ref} key={getItemKey(value)} level={getItemLevel(value)} item={value} showFocus={selection.isFocused(value)} autofocus={selection.isFocused(value)} focused={focused && selection.isFocused(value)} selectable={selectable && isItemSelectable(value)} selected={selectable && selection.isSelected(value)} onFocus={this.onRowFocus} onSelect={this.onRowSelect} onDoubleClick={onItemDoubleClick} onClick={onItemClick} collapsible={isItemCollapsible(value)} parentCollapsible={isParentCollapsible(value)} collapsed={isItemCollapsed(value)} onCollapse={onItemCollapse} onExpand={onItemExpand} showDisabledSelection={isDisabledSelectionVisible(value)} checkboxTooltip={getCheckboxTooltip(value)} className={classNames(getItemClassName(value), { [style.draggingRow]: isDragged })} metaColumnClassName={getMetaColumnClassName(value)} draggable={draggable} alwaysShowDragHandle={alwaysShowDragHandle} dragHandleTitle={dragHandleTitle} columns={columns} data-test={getItemDataTest(value)} {...restProps}/>);
154
+ const row = (<Row innerRef={ref} level={getItemLevel(value)} item={value} showFocus={selection.isFocused(value)} autofocus={selection.isFocused(value)} focused={focused && selection.isFocused(value)} selectable={selectable && isItemSelectable(value)} selected={selectable && selection.isSelected(value)} onFocus={this.onRowFocus} onSelect={this.onRowSelect} onDoubleClick={onItemDoubleClick} onClick={onItemClick} collapsible={isItemCollapsible(value)} parentCollapsible={isParentCollapsible(value)} collapsed={isItemCollapsed(value)} onCollapse={onItemCollapse} onExpand={onItemExpand} showDisabledSelection={isDisabledSelectionVisible(value)} checkboxTooltip={getCheckboxTooltip(value)} className={classNames(getItemClassName(value), { [style.draggingRow]: isDragged })} metaColumnClassName={getMetaColumnClassName(value)} draggable={draggable} alwaysShowDragHandle={alwaysShowDragHandle} dragHandleTitle={dragHandleTitle} columns={columns} data-test={getItemDataTest(value)} {...restProps} key={restProps.key ?? getItemKey(value)}/>);
155
155
  return isDragged
156
156
  ? (<table style={{ ...props.style }} className={style.draggingTable}>
157
157
  <tbody>{row}</tbody>
@@ -31,7 +31,7 @@ export default class TagsList extends Component {
31
31
  const readOnly = this.props.disabled || tag.readOnly ||
32
32
  (this.props.canNotBeEmpty && this.props.tags.length === 1);
33
33
  const { tagClassName } = this.props;
34
- return (<TagComponent {...tag} readOnly={readOnly} disabled={this.props.disabled || tag.disabled} focused={focusTag} onClick={this.props.handleClick(tag)} onRemove={this.props.handleRemove(tag)} className={tagClassName}>{tag.label}</TagComponent>);
34
+ return (<TagComponent {...tag} key={tag.key} readOnly={readOnly} disabled={this.props.disabled || tag.disabled} focused={focusTag} onClick={this.props.handleClick(tag)} onRemove={this.props.handleRemove(tag)} className={tagClassName}>{tag.label}</TagComponent>);
35
35
  }
36
36
  render() {
37
37
  const { children, className, customTagComponent, canNotBeEmpty, handleClick, tagClassName, handleRemove, tags, activeIndex, ...props } = this.props;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.20",
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",
@@ -108,12 +108,12 @@
108
108
  "@types/chai-enzyme": "^0.6.13",
109
109
  "@types/enzyme": "^3.10.18",
110
110
  "@types/markdown-it": "^14.0.1",
111
- "@types/react": "^18.2.79",
112
- "@types/react-dom": "^18.2.25",
111
+ "@types/react": "^18.3.1",
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",
@@ -156,14 +156,14 @@
156
156
  "mocha": "^10.4.0",
157
157
  "pinst": "^3.0.0",
158
158
  "prettier": "^3.2.5",
159
- "puppeteer": "^22.7.0",
159
+ "puppeteer": "^22.7.1",
160
160
  "raw-loader": "^4.0.2",
161
- "react": "^18.2.0",
162
- "react-dom": "^18.2.0",
163
- "react-test-renderer": "^18.2.0",
161
+ "react": "^18.3.1",
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.16.4",
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",
@@ -226,7 +226,7 @@
226
226
  "deep-equal": "^2.2.3",
227
227
  "element-resize-detector": "^1.2.4",
228
228
  "es6-error": "^4.1.1",
229
- "eslint-plugin-react-hooks": "^4.6.0",
229
+ "eslint-plugin-react-hooks": "^4.6.2",
230
230
  "fastdom": "^1.0.12",
231
231
  "file-loader": "^6.2.0",
232
232
  "focus-trap": "^7.5.4",
@@ -234,7 +234,7 @@
234
234
  "just-debounce-it": "^3.2.0",
235
235
  "memoize-one": "^6.0.0",
236
236
  "postcss": "^8.4.38",
237
- "postcss-calc": "^9.0.1",
237
+ "postcss-calc": "^10.0.0",
238
238
  "postcss-flexbugs-fixes": "^5.0.2",
239
239
  "postcss-font-family-system-ui": "^5.0.0",
240
240
  "postcss-loader": "^8.1.1",