@jetbrains/ring-ui 7.0.36 → 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 {
@@ -28,7 +28,7 @@ export class Button extends PureComponent {
28
28
  // Modifiers
29
29
  active, danger, delayed, loader, primary, success, error, secondary, ghost, short, text, dropdown, height,
30
30
  // Props
31
- icon, iconSize, iconClassName, iconSuppressSizeWarning, className, children, inline, ...props } = this.props;
31
+ icon, iconRight, iconSize, iconClassName, iconRightClassName, iconSuppressSizeWarning, className, children, inline, ...props } = this.props;
32
32
  const isInline = inline ?? text ?? icon != null;
33
33
  if (text != null) {
34
34
  warnText();
@@ -38,7 +38,7 @@ export class Button extends PureComponent {
38
38
  inline: isInline,
39
39
  height: height ?? this.context,
40
40
  });
41
- 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 })] }));
42
42
  const commonProps = {
43
43
  tabIndex: loader ? -1 : 0,
44
44
  ...props,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "7.0.36",
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,20 +103,20 @@
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",
@@ -129,11 +129,11 @@
129
129
  "@types/sinon-chai": "^4.0.0",
130
130
  "@types/webpack-env": "^1.18.8",
131
131
  "@vitejs/plugin-react": "^4.3.4",
132
- "@vitest/eslint-plugin": "^1.1.38",
132
+ "@vitest/eslint-plugin": "^1.1.39",
133
133
  "acorn": "^8.14.1",
134
134
  "axe-playwright": "^2.1.0",
135
135
  "babel-plugin-require-context-hook": "^1.0.0",
136
- "caniuse-lite": "^1.0.30001707",
136
+ "caniuse-lite": "^1.0.30001709",
137
137
  "chai": "^5.2.0",
138
138
  "chai-as-promised": "^8.0.1",
139
139
  "chai-dom": "^1.10.0",
@@ -148,7 +148,7 @@
148
148
  "eslint-import-resolver-webpack": "^0.13.10",
149
149
  "eslint-plugin-import": "^2.31.0",
150
150
  "eslint-plugin-jsx-a11y": "^6.10.2",
151
- "eslint-plugin-prettier": "^5.2.5",
151
+ "eslint-plugin-prettier": "^5.2.6",
152
152
  "eslint-plugin-react": "^7.37.4",
153
153
  "eslint-plugin-react-hooks": "^5.2.0",
154
154
  "eslint-plugin-storybook": "^0.12.0",
@@ -173,12 +173,12 @@
173
173
  "react-test-renderer": "^19.1.0",
174
174
  "regenerator-runtime": "^0.14.1",
175
175
  "rimraf": "^6.0.1",
176
- "rollup": "^4.38.0",
176
+ "rollup": "^4.39.0",
177
177
  "rollup-plugin-clear": "^2.0.7",
178
178
  "sinon": "^20.0.0",
179
179
  "sinon-chai": "^4.0.0",
180
180
  "storage-mock": "^2.1.0",
181
- "storybook": "8.6.11",
181
+ "storybook": "8.6.12",
182
182
  "stylelint": "^16.17.0",
183
183
  "svg-inline-loader": "^0.8.2",
184
184
  "teamcity-service-messages": "^0.1.14",