@jetbrains/ring-ui 7.0.35 → 7.0.37

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.
@@ -146,7 +146,14 @@
146
146
  line-height: var(--ring-button-icon-line-height);
147
147
  }
148
148
 
149
- .block .icon {
149
+ .iconRight {
150
+ margin-left: calc(var(--ring-unit) * 0.5);
151
+
152
+ line-height: var(--ring-button-icon-line-height);
153
+ }
154
+
155
+ .block .icon,
156
+ .block .iconRight {
150
157
  margin-top: -1px;
151
158
  }
152
159
 
@@ -309,6 +316,10 @@
309
316
  margin-right: 0;
310
317
  }
311
318
 
319
+ & .iconRight {
320
+ margin-left: 0;
321
+ }
322
+
312
323
  &.block {
313
324
  vertical-align: -2px;
314
325
 
@@ -23,11 +23,13 @@ export interface ButtonBaseProps {
23
23
  dropdown?: boolean | null | undefined;
24
24
  disabled?: boolean | undefined;
25
25
  icon?: string | IconType | null | undefined;
26
+ iconRight?: string | IconType | null | undefined;
26
27
  /**
27
28
  * @deprecated Use icons with appropriate intrinsic sizes instead
28
29
  */
29
30
  iconSize?: IconProps['size'];
30
31
  iconClassName?: string | null | undefined;
32
+ iconRightClassName?: string | null | undefined;
31
33
  iconSuppressSizeWarning?: boolean | null | undefined;
32
34
  }
33
35
  export interface ButtonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, ButtonBaseProps {
@@ -45,6 +47,9 @@ export type ButtonProps = ButtonButtonProps | ButtonLinkProps;
45
47
  * A component for displaying variously styled buttons.
46
48
  */
47
49
  export declare class Button extends PureComponent<ButtonProps> {
50
+ /**
51
+ * @deprecated Use icons with appropriate intrinsic sizes instead
52
+ */
48
53
  static IconSize: typeof Size;
49
54
  static contextType: React.Context<ControlsHeight>;
50
55
  context: React.ContextType<typeof ControlsHeightContext>;
@@ -17,6 +17,9 @@ const warnText = deprecate(() => { }, 'Button: "text" prop is deprecated and wil
17
17
  * A component for displaying variously styled buttons.
18
18
  */
19
19
  export class Button extends PureComponent {
20
+ /**
21
+ * @deprecated Use icons with appropriate intrinsic sizes instead
22
+ */
20
23
  static IconSize = Size;
21
24
  static contextType = ControlsHeightContext;
22
25
  buttonRef = createRef();
@@ -25,7 +28,7 @@ export class Button extends PureComponent {
25
28
  // Modifiers
26
29
  active, danger, delayed, loader, primary, success, error, secondary, ghost, short, text, dropdown, height,
27
30
  // Props
28
- icon, iconSize, iconClassName, iconSuppressSizeWarning, className, children, inline, ...props } = this.props;
31
+ icon, iconRight, iconSize, iconClassName, iconRightClassName, iconSuppressSizeWarning, className, children, inline, ...props } = this.props;
29
32
  const isInline = inline ?? text ?? icon != null;
30
33
  if (text != null) {
31
34
  warnText();
@@ -35,7 +38,7 @@ export class Button extends PureComponent {
35
38
  inline: isInline,
36
39
  height: height ?? this.context,
37
40
  });
38
- const content = (_jsxs(_Fragment, { children: [icon && (_jsx(Icon, { className: classNames(styles.icon, iconClassName), glyph: icon, size: iconSize, suppressSizeWarning: iconSuppressSizeWarning })), children, dropdown && _jsx(Icon, { glyph: isInline ? chevron12pxDown : chevronDown, className: styles.dropdownIcon })] }));
41
+ const content = (_jsxs(_Fragment, { children: [icon && (_jsx(Icon, { className: classNames(styles.icon, iconClassName), glyph: icon, size: iconSize, suppressSizeWarning: iconSuppressSizeWarning })), children, iconRight && _jsx(Icon, { className: classNames(styles.iconRight, iconRightClassName), glyph: iconRight }), dropdown && _jsx(Icon, { glyph: isInline ? chevron12pxDown : chevronDown, className: styles.dropdownIcon })] }));
39
42
  const commonProps = {
40
43
  tabIndex: loader ? -1 : 0,
41
44
  ...props,
@@ -29,6 +29,9 @@ export default class Icon extends PureComponent<IconProps> {
29
29
  glyph: string;
30
30
  };
31
31
  static Color: typeof Color;
32
+ /**
33
+ * @deprecated Use icons with appropriate intrinsic sizes instead
34
+ */
32
35
  static Size: typeof Size;
33
36
  warnSize(): void;
34
37
  getStyle(): {
@@ -18,6 +18,9 @@ export default class Icon extends PureComponent {
18
18
  glyph: '',
19
19
  };
20
20
  static Color = Color;
21
+ /**
22
+ * @deprecated Use icons with appropriate intrinsic sizes instead
23
+ */
21
24
  static Size = Size;
22
25
  warnSize() {
23
26
  if (this.props.suppressSizeWarning) {
@@ -13,6 +13,7 @@ export declare enum Color {
13
13
  }
14
14
  /**
15
15
  * @enum {number}
16
+ * @deprecated Use icons with appropriate intrinsic sizes instead
16
17
  */
17
18
  export declare enum Size {
18
19
  Size12 = 12,
@@ -14,6 +14,7 @@ export var Color;
14
14
  })(Color || (Color = {}));
15
15
  /**
16
16
  * @enum {number}
17
+ * @deprecated Use icons with appropriate intrinsic sizes instead
17
18
  */
18
19
  export var Size;
19
20
  (function (Size) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "7.0.35",
3
+ "version": "7.0.37",
4
4
  "description": "JetBrains UI library",
5
5
  "author": {
6
6
  "name": "JetBrains"
@@ -90,7 +90,7 @@
90
90
  "@babel/plugin-syntax-import-assertions": "^7.26.0",
91
91
  "@csstools/css-parser-algorithms": "^3.0.4",
92
92
  "@csstools/stylelint-no-at-nest-rule": "^4.0.0",
93
- "@eslint/compat": "^1.2.7",
93
+ "@eslint/compat": "^1.2.8",
94
94
  "@eslint/eslintrc": "^3.2.0",
95
95
  "@eslint/js": "^9.20.0",
96
96
  "@figma/code-connect": "^1.3.1",
@@ -103,26 +103,24 @@
103
103
  "@rollup/plugin-json": "^6.1.0",
104
104
  "@rollup/plugin-node-resolve": "^16.0.1",
105
105
  "@rollup/plugin-replace": "^6.0.2",
106
- "@storybook/addon-a11y": "8.6.11",
107
- "@storybook/addon-docs": "8.6.11",
108
- "@storybook/addon-essentials": "8.6.11",
109
- "@storybook/addon-themes": "^8.6.11",
110
- "@storybook/components": "8.6.11",
106
+ "@storybook/addon-a11y": "8.6.12",
107
+ "@storybook/addon-docs": "8.6.12",
108
+ "@storybook/addon-essentials": "8.6.12",
109
+ "@storybook/addon-themes": "^8.6.12",
110
+ "@storybook/components": "8.6.12",
111
111
  "@storybook/csf": "^0.1.13",
112
- "@storybook/manager-api": "8.6.11",
113
- "@storybook/preview-api": "8.6.11",
114
- "@storybook/react": "8.6.11",
115
- "@storybook/react-webpack5": "8.6.11",
112
+ "@storybook/manager-api": "8.6.12",
113
+ "@storybook/preview-api": "8.6.12",
114
+ "@storybook/react": "8.6.12",
115
+ "@storybook/react-webpack5": "8.6.12",
116
116
  "@storybook/test-runner": "^0.22.0",
117
- "@storybook/theming": "8.6.11",
117
+ "@storybook/theming": "8.6.12",
118
118
  "@testing-library/dom": "^10.4.0",
119
- "@testing-library/react": "^16.2.0",
119
+ "@testing-library/react": "^16.3.0",
120
120
  "@testing-library/user-event": "^14.6.1",
121
121
  "@types/chai": "^5.2.1",
122
122
  "@types/chai-as-promised": "^8.0.2",
123
123
  "@types/chai-dom": "0.0.10",
124
- "@types/chai-enzyme": "^0.6.13",
125
- "@types/enzyme": "^3.10.18",
126
124
  "@types/eslint__js": "^8.42.3",
127
125
  "@types/markdown-it": "^14.1.2",
128
126
  "@types/react": "^18.3.12",
@@ -131,29 +129,26 @@
131
129
  "@types/sinon-chai": "^4.0.0",
132
130
  "@types/webpack-env": "^1.18.8",
133
131
  "@vitejs/plugin-react": "^4.3.4",
134
- "@vitest/eslint-plugin": "^1.1.38",
135
- "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
132
+ "@vitest/eslint-plugin": "^1.1.39",
136
133
  "acorn": "^8.14.1",
137
134
  "axe-playwright": "^2.1.0",
138
135
  "babel-plugin-require-context-hook": "^1.0.0",
139
- "caniuse-lite": "^1.0.30001707",
136
+ "caniuse-lite": "^1.0.30001709",
140
137
  "chai": "^5.2.0",
141
138
  "chai-as-promised": "^8.0.1",
142
139
  "chai-dom": "^1.10.0",
143
- "chai-enzyme": "1.0.0-beta.1",
144
140
  "cheerio": "^1.0.0-rc.12",
145
141
  "chromatic": "^11.27.0",
146
142
  "core-js": "^3.41.0",
147
143
  "cpy-cli": "^5.0.0",
148
144
  "dotenv-cli": "^8.0.0",
149
- "enzyme": "^3.11.0",
150
145
  "eslint": "^9.23.0",
151
146
  "eslint-config-prettier": "^10.1.1",
152
147
  "eslint-formatter-jslint-xml": "^8.40.0",
153
148
  "eslint-import-resolver-webpack": "^0.13.10",
154
149
  "eslint-plugin-import": "^2.31.0",
155
150
  "eslint-plugin-jsx-a11y": "^6.10.2",
156
- "eslint-plugin-prettier": "^5.2.5",
151
+ "eslint-plugin-prettier": "^5.2.6",
157
152
  "eslint-plugin-react": "^7.37.4",
158
153
  "eslint-plugin-react-hooks": "^5.2.0",
159
154
  "eslint-plugin-storybook": "^0.12.0",
@@ -178,18 +173,18 @@
178
173
  "react-test-renderer": "^19.1.0",
179
174
  "regenerator-runtime": "^0.14.1",
180
175
  "rimraf": "^6.0.1",
181
- "rollup": "^4.38.0",
176
+ "rollup": "^4.39.0",
182
177
  "rollup-plugin-clear": "^2.0.7",
183
178
  "sinon": "^20.0.0",
184
179
  "sinon-chai": "^4.0.0",
185
180
  "storage-mock": "^2.1.0",
186
- "storybook": "8.6.11",
181
+ "storybook": "8.6.12",
187
182
  "stylelint": "^16.17.0",
188
183
  "svg-inline-loader": "^0.8.2",
189
184
  "teamcity-service-messages": "^0.1.14",
190
185
  "terser-webpack-plugin": "^5.3.14",
191
186
  "typescript": "~5.8.2",
192
- "typescript-eslint": "^8.28.0",
187
+ "typescript-eslint": "^8.29.0",
193
188
  "vitest": "^3.1.1",
194
189
  "vitest-teamcity-reporter": "^0.3.1",
195
190
  "wallaby-webpack": "^3.9.16",