@jetbrains/ring-ui 7.0.5 → 7.0.6

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.
@@ -1,5 +1,7 @@
1
1
  @import "../global/variables.css";
2
2
 
3
+ @value glyph from "../icon/icon.css";
4
+
3
5
  :root {
4
6
  --ring-button-focus-border-color: var(--ring-border-hover-color);
5
7
  --ring-button-shadow: inset 0 0 0 1px;
@@ -341,17 +343,20 @@
341
343
  }
342
344
 
343
345
  .dropdownIcon {
344
- margin-left: 2px;
345
-
346
- transition: color var(--ring-ease);
347
-
348
346
  .block & {
349
347
  margin-top: -1px;
350
348
  margin-right: calc(var(--ring-unit) * -0.5);
349
+ margin-left: 2px;
350
+
351
+ transition: color var(--ring-ease);
351
352
 
352
353
  color: var(--ring-icon-secondary-color);
353
354
  }
354
355
 
356
+ .inline & .glyph {
357
+ vertical-align: -2px;
358
+ }
359
+
355
360
  .primary & {
356
361
  color: unset;
357
362
  }
@@ -359,7 +364,7 @@
359
364
  line-height: var(--ring-button-icon-line-height);
360
365
  }
361
366
 
362
- .button:hover .dropdownIcon {
367
+ .block:hover .dropdownIcon {
363
368
  transition: none;
364
369
 
365
370
  color: var(--ring-main-color);
@@ -2,6 +2,7 @@ import { createRef, PureComponent } from 'react';
2
2
  import * as React from 'react';
3
3
  import classNames from 'classnames';
4
4
  import chevronDown from '@jetbrains/icons/chevron-down';
5
+ import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
5
6
  import deprecate from 'util-deprecate';
6
7
  import Icon, { Size } from '../icon/icon';
7
8
  import ClickableLink from '../link/clickableLink';
@@ -37,7 +38,7 @@ export class Button extends PureComponent {
37
38
  const content = (<>
38
39
  {icon && (<Icon className={classNames(styles.icon, iconClassName)} glyph={icon} size={iconSize} loading={loader && isInline} suppressSizeWarning={iconSuppressSizeWarning}/>)}
39
40
  {children}
40
- {dropdown && <Icon glyph={chevronDown} className={styles.dropdownIcon}/>}
41
+ {dropdown && <Icon glyph={isInline ? chevron12pxDown : chevronDown} className={styles.dropdownIcon}/>}
41
42
  </>);
42
43
  const commonProps = {
43
44
  tabIndex: loader ? -1 : 0,
@@ -1,11 +1,8 @@
1
1
  import { memo } from 'react';
2
- import chevronDown from '@jetbrains/icons/chevron-10px';
3
2
  import classNames from 'classnames';
4
- import Icon from '../icon/icon';
5
3
  import Button from '../button/button';
6
4
  import styles from './dropdown.css';
7
- const Anchor = ({ children, className, ...restProps }) => (<Button data-test-ring-dropdown-anchor text className={classNames(styles.anchor, className)} {...restProps}>
5
+ const Anchor = ({ children, className, ...restProps }) => (<Button data-test-ring-dropdown-anchor inline dropdown className={classNames(styles.anchor, className)} {...restProps}>
8
6
  {children}
9
- <Icon glyph={chevronDown} className={styles.chevron}/>
10
7
  </Button>);
11
8
  export default memo(Anchor);
@@ -8,9 +8,3 @@
8
8
  margin-inline: -3px;
9
9
  padding-inline: 3px;
10
10
  }
11
-
12
- .chevron {
13
- margin-left: 2px;
14
-
15
- line-height: normal;
16
- }
@@ -167,6 +167,7 @@
167
167
  --ring-font-family-monospace: Menlo, "Bitstream Vera Sans Mono", "Ubuntu Mono", Consolas, "Courier New", Courier,
168
168
  monospace;
169
169
  --ring-font-weight-bold: 600;
170
+ --ring-font-variant-numeric: lining-nums tabular-nums slashed-zero;
170
171
 
171
172
  /* Common z-index-values */
172
173
 
@@ -11,6 +11,7 @@
11
11
 
12
12
  pointer-events: none;
13
13
 
14
+ /* TODO remove in 8.0 */
14
15
  &[width="10"] {
15
16
  vertical-align: -1px;
16
17
  }
@@ -66,7 +66,7 @@
66
66
  padding: 0;
67
67
 
68
68
  list-style-position: inside;
69
- font-variant-numeric: tabular-nums;
69
+ font-variant-numeric: var(--ring-font-variant-numeric);
70
70
  }
71
71
 
72
72
  & ul {
@@ -723,7 +723,7 @@ export default class QueryAssist extends Component {
723
723
  {this.state.query && <span>{this.renderQuery()}</span>}
724
724
  </ContentEditable>
725
725
 
726
- {renderPlaceholder && (<button type="button" className={placeholderStyles} ref={this.placeholderRef} onClick={this.handleCaretMove} data-test="query-assist-placeholder" disabled={this.props.disabled}>
726
+ {renderPlaceholder && (<button type="button" className={placeholderStyles} ref={this.placeholderRef} onClick={this.handleCaretMove} data-test="query-assist-placeholder" disabled={this.props.disabled} tabIndex={-1}>
727
727
  {this.props.placeholder}
728
728
  </button>)}
729
729
 
@@ -1,7 +1,7 @@
1
1
  import { PureComponent } from 'react';
2
2
  import classNames from 'classnames';
3
- import sortableIcon from '@jetbrains/icons/unsorted-10px';
4
- import sortedIcon from '@jetbrains/icons/chevron-10px';
3
+ import sortableIcon from '@jetbrains/icons/unsorted-12px';
4
+ import sortedIcon from '@jetbrains/icons/chevron-12px-down';
5
5
  import Icon from '../icon/icon';
6
6
  import dataTests from '../global/data-tests';
7
7
  import style from './table.css';
@@ -6,6 +6,7 @@
6
6
  --ring-table-top: -3px;
7
7
 
8
8
  position: relative;
9
+ font-variant-numeric: var(--ring-font-variant-numeric);
9
10
  }
10
11
 
11
12
  .table {
@@ -57,10 +58,11 @@
57
58
 
58
59
  .headerCell .sorter {
59
60
  position: absolute;
61
+ top: 5px;
60
62
 
61
63
  display: none;
62
64
 
63
- margin-left: 6px;
65
+ margin-left: 5px;
64
66
 
65
67
  user-select: none;
66
68
  }
@@ -71,7 +73,7 @@
71
73
 
72
74
  .sortedUp .icon {
73
75
  transform: rotate(180deg);
74
- transform-origin: center 53%;
76
+ transform-origin: center 44%;
75
77
  }
76
78
 
77
79
  .caption {
@@ -1,12 +1,12 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { LinkProps } from '../link/link';
2
+ import { ButtonButtonProps, ContainerProps } from '../button/button';
3
3
  import { TabProps } from './tab';
4
4
  export interface FakeMoreButtonProps {
5
5
  hasActiveChildren: boolean;
6
6
  moreClassName?: string | null | undefined;
7
7
  moreActiveClassName?: string | null | undefined;
8
8
  }
9
- export declare const AnchorLink: ({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }: Omit<LinkProps, "children"> & FakeMoreButtonProps) => import("react").JSX.Element;
9
+ export declare const AnchorLink: ({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }: Omit<ContainerProps<ButtonButtonProps>, "children"> & FakeMoreButtonProps) => import("react").JSX.Element;
10
10
  export interface MoreButtonProps {
11
11
  items: ReactElement<TabProps>[];
12
12
  selected?: string | undefined;
@@ -1,20 +1,17 @@
1
1
  import { memo, useCallback, useMemo } from 'react';
2
2
  import classNames from 'classnames';
3
- import chevronDownIcon from '@jetbrains/icons/chevron-10px';
4
3
  import { Directions } from '../popup/popup.consts';
5
4
  import PopupMenu, { ListProps } from '../popup-menu/popup-menu';
6
5
  import Dropdown from '../dropdown/dropdown';
7
- import Link from '../link/link';
8
- import Icon from '../icon/icon';
6
+ import Anchor from '../dropdown/anchor';
9
7
  import styles from './tabs.css';
10
8
  import getTabTitles from './collapsible-tab';
11
9
  import { CustomItem } from './custom-item';
12
10
  export const AnchorLink = ({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }) => {
13
11
  const classnames = classNames(styles.title, hasActiveChildren && styles.selected, hasActiveChildren && moreActiveClassName, moreClassName);
14
- return (<Link title={'More'} className={classnames} {...restProps}>
12
+ return (<Anchor title={'More'} className={classnames} {...restProps}>
15
13
  {'More'}
16
- <Icon glyph={chevronDownIcon} className={styles.chevron}/>
17
- </Link>);
14
+ </Anchor>);
18
15
  };
19
16
  const morePopupDirections = [Directions.BOTTOM_CENTER, Directions.BOTTOM_LEFT, Directions.BOTTOM_RIGHT];
20
17
  export const MoreButton = memo(({ items, selected, onSelect, moreClassName, moreActiveClassName, morePopupClassName, morePopupItemClassName, morePopupBeforeEnd, }) => {
@@ -205,10 +205,6 @@
205
205
  text-align: left;
206
206
  }
207
207
 
208
- .chevron {
209
- padding-left: 4px;
210
- }
211
-
212
208
  .morePopupBeforeEnd.morePopupBeforeEnd.morePopupBeforeEnd {
213
209
  padding: 0;
214
210
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "7.0.5",
3
+ "version": "7.0.6",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -82,7 +82,7 @@
82
82
  "@babel/plugin-syntax-import-assertions": "^7.26.0",
83
83
  "@csstools/css-parser-algorithms": "^3.0.4",
84
84
  "@csstools/stylelint-no-at-nest-rule": "^4.0.0",
85
- "@eslint/compat": "^1.2.2",
85
+ "@eslint/compat": "^1.2.3",
86
86
  "@eslint/eslintrc": "^3.1.0",
87
87
  "@eslint/js": "^9.14.0",
88
88
  "@jetbrains/eslint-config": "^6.0.4",
@@ -94,18 +94,18 @@
94
94
  "@rollup/plugin-json": "^6.1.0",
95
95
  "@rollup/plugin-node-resolve": "^15.3.0",
96
96
  "@rollup/plugin-replace": "^6.0.1",
97
- "@storybook/addon-a11y": "8.4.2",
98
- "@storybook/addon-docs": "8.4.2",
99
- "@storybook/addon-essentials": "8.4.2",
100
- "@storybook/addon-themes": "^8.4.2",
101
- "@storybook/components": "8.4.2",
97
+ "@storybook/addon-a11y": "8.4.4",
98
+ "@storybook/addon-docs": "8.4.4",
99
+ "@storybook/addon-essentials": "8.4.4",
100
+ "@storybook/addon-themes": "^8.4.4",
101
+ "@storybook/components": "8.4.4",
102
102
  "@storybook/csf": "^0.1.11",
103
- "@storybook/manager-api": "8.4.2",
104
- "@storybook/preview-api": "8.4.2",
105
- "@storybook/react": "8.4.2",
106
- "@storybook/react-webpack5": "8.4.2",
103
+ "@storybook/manager-api": "8.4.4",
104
+ "@storybook/preview-api": "8.4.4",
105
+ "@storybook/react": "8.4.4",
106
+ "@storybook/react-webpack5": "8.4.4",
107
107
  "@storybook/test-runner": "^0.19.1",
108
- "@storybook/theming": "8.4.2",
108
+ "@storybook/theming": "8.4.4",
109
109
  "@testing-library/dom": "^10.4.0",
110
110
  "@testing-library/react": "^16.0.1",
111
111
  "@testing-library/user-event": "^14.5.2",
@@ -122,7 +122,7 @@
122
122
  "@types/sinon-chai": "^4.0.0",
123
123
  "@types/webpack-env": "^1.18.5",
124
124
  "@vitejs/plugin-react": "^4.3.3",
125
- "@vitest/eslint-plugin": "^1.1.6",
125
+ "@vitest/eslint-plugin": "^1.1.10",
126
126
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
127
127
  "acorn": "^8.14.0",
128
128
  "axe-playwright": "^2.0.3",
@@ -167,19 +167,19 @@
167
167
  "react-test-renderer": "^18.3.1",
168
168
  "regenerator-runtime": "^0.14.1",
169
169
  "rimraf": "^6.0.1",
170
- "rollup": "^4.24.4",
170
+ "rollup": "^4.26.0",
171
171
  "rollup-plugin-clear": "^2.0.7",
172
172
  "sinon": "^19.0.2",
173
173
  "sinon-chai": "^4.0.0",
174
174
  "storage-mock": "^2.1.0",
175
- "storybook": "8.4.2",
175
+ "storybook": "8.4.4",
176
176
  "stylelint": "^16.10.0",
177
177
  "svg-inline-loader": "^0.8.2",
178
178
  "teamcity-service-messages": "^0.1.14",
179
179
  "terser-webpack-plugin": "^5.3.10",
180
180
  "typescript": "~5.6.3",
181
- "typescript-eslint": "^8.13.0",
182
- "vitest": "^2.1.4",
181
+ "typescript-eslint": "^8.14.0",
182
+ "vitest": "^2.1.5",
183
183
  "vitest-teamcity-reporter": "^0.3.1",
184
184
  "wallaby-webpack": "^3.9.16",
185
185
  "webpack": "^5.96.1",
@@ -209,7 +209,7 @@
209
209
  "@babel/core": "^7.26.0",
210
210
  "@babel/preset-typescript": "^7.26.0",
211
211
  "@jetbrains/babel-preset-jetbrains": "^2.4.0",
212
- "@jetbrains/icons": "^4.11.0",
212
+ "@jetbrains/icons": "^5.2.0",
213
213
  "@jetbrains/postcss-require-hover": "^0.1.2",
214
214
  "@types/combokeys": "^2.4.9",
215
215
  "@types/element-resize-detector": "^1.1.6",
@@ -233,13 +233,13 @@
233
233
  "highlight.js": "^10.7.2",
234
234
  "just-debounce-it": "^3.2.0",
235
235
  "memoize-one": "^6.0.0",
236
- "postcss": "^8.4.47",
236
+ "postcss": "^8.4.49",
237
237
  "postcss-calc": "^10.0.2",
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",
241
241
  "postcss-modules-values-replace": "^4.2.0",
242
- "postcss-preset-env": "^10.0.9",
242
+ "postcss-preset-env": "^10.1.0",
243
243
  "react-movable": "^3.3.1",
244
244
  "react-virtualized": "^9.22.5",
245
245
  "react-waypoint": "^10.3.0",