@jetbrains/ring-ui 7.0.74 → 7.0.76

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.
Files changed (160) hide show
  1. package/babel.config.js +1 -0
  2. package/components/banner/{banner.jsx → banner.js} +2 -1
  3. package/components/content-layout/content-layout.d.ts +1 -0
  4. package/components/content-layout/{content-layout.jsx → content-layout.js} +1 -0
  5. package/components/content-layout/sidebar.d.ts +4 -0
  6. package/components/content-layout/{sidebar.jsx → sidebar.js} +4 -0
  7. package/components/date-picker/consts.d.ts +1 -1
  8. package/components/date-picker/{date-popup.jsx → date-popup.js} +8 -9
  9. package/components/grid/grid.d.ts +1 -0
  10. package/components/grid/{grid.jsx → grid.js} +1 -0
  11. package/components/popup/popup.d.ts +3 -1
  12. package/components/popup/{popup.jsx → popup.js} +13 -3
  13. package/components/tabs/{collapsible-tab.jsx → collapsible-tab.js} +1 -4
  14. package/components/upload/{upload.jsx → upload.js} +2 -1
  15. package/package.json +24 -27
  16. package/components/avatar/avatar.figma.js +0 -45
  17. package/components/avatar-stack/avatar-stack.figma.js +0 -33
  18. package/components/breadcrumbs/breadcrumbs.figma.js +0 -31
  19. package/components/button/button.figma.js +0 -95
  20. package/components/checkbox/checkbox-group.figma.js +0 -31
  21. package/components/checkbox/checkbox.figma.js +0 -38
  22. package/components/error-bubble/error-bubble.figma.js +0 -15
  23. package/components/input/input.figma.js +0 -74
  24. /package/components/alert/{alert.jsx → alert.js} +0 -0
  25. /package/components/alert/{container.jsx → container.js} +0 -0
  26. /package/components/alert-service/{alert-service.jsx → alert-service.js} +0 -0
  27. /package/components/auth/{down-notification.jsx → down-notification.js} +0 -0
  28. /package/components/auth/{iframe-flow.jsx → iframe-flow.js} +0 -0
  29. /package/components/auth-dialog/{auth-dialog.jsx → auth-dialog.js} +0 -0
  30. /package/components/auth-dialog-service/{auth-dialog-service.jsx → auth-dialog-service.js} +0 -0
  31. /package/components/avatar/{avatar-info.jsx → avatar-info.js} +0 -0
  32. /package/components/avatar/{avatar.jsx → avatar.js} +0 -0
  33. /package/components/avatar/{fallback-avatar.jsx → fallback-avatar.js} +0 -0
  34. /package/components/avatar-stack/{avatar-stack.jsx → avatar-stack.js} +0 -0
  35. /package/components/breadcrumbs/{breadcrumbs.jsx → breadcrumbs.js} +0 -0
  36. /package/components/button/{button.jsx → button.js} +0 -0
  37. /package/components/button-group/{button-group.jsx → button-group.js} +0 -0
  38. /package/components/button-group/{caption.jsx → caption.js} +0 -0
  39. /package/components/button-set/{button-set.jsx → button-set.js} +0 -0
  40. /package/components/button-toolbar/{button-toolbar.jsx → button-toolbar.js} +0 -0
  41. /package/components/checkbox/{checkbox.jsx → checkbox.js} +0 -0
  42. /package/components/code/{code.jsx → code.js} +0 -0
  43. /package/components/collapse/{collapse-content.jsx → collapse-content.js} +0 -0
  44. /package/components/collapse/{collapse-control.jsx → collapse-control.js} +0 -0
  45. /package/components/collapse/{collapse.jsx → collapse.js} +0 -0
  46. /package/components/confirm/{confirm.jsx → confirm.js} +0 -0
  47. /package/components/confirm-service/{confirm-service.jsx → confirm-service.js} +0 -0
  48. /package/components/contenteditable/{contenteditable.jsx → contenteditable.js} +0 -0
  49. /package/components/control-help/{control-help.jsx → control-help.js} +0 -0
  50. /package/components/control-label/{control-label.jsx → control-label.js} +0 -0
  51. /package/components/data-list/{data-list.jsx → data-list.js} +0 -0
  52. /package/components/data-list/{data-list.mock.jsx → data-list.mock.js} +0 -0
  53. /package/components/data-list/{item.jsx → item.js} +0 -0
  54. /package/components/data-list/{title.jsx → title.js} +0 -0
  55. /package/components/date-picker/{date-input.jsx → date-input.js} +0 -0
  56. /package/components/date-picker/{date-picker.jsx → date-picker.js} +0 -0
  57. /package/components/date-picker/{day.jsx → day.js} +0 -0
  58. /package/components/date-picker/{month-names.jsx → month-names.js} +0 -0
  59. /package/components/date-picker/{month-slider.jsx → month-slider.js} +0 -0
  60. /package/components/date-picker/{month.jsx → month.js} +0 -0
  61. /package/components/date-picker/{months.jsx → months.js} +0 -0
  62. /package/components/date-picker/{weekdays.jsx → weekdays.js} +0 -0
  63. /package/components/date-picker/{years.jsx → years.js} +0 -0
  64. /package/components/dialog/{dialog.jsx → dialog.js} +0 -0
  65. /package/components/dropdown/{anchor.jsx → anchor.js} +0 -0
  66. /package/components/dropdown/{dropdown.jsx → dropdown.js} +0 -0
  67. /package/components/dropdown-menu/{dropdown-menu.jsx → dropdown-menu.js} +0 -0
  68. /package/components/editable-heading/{editable-heading.jsx → editable-heading.js} +0 -0
  69. /package/components/error-bubble/{error-bubble.jsx → error-bubble.js} +0 -0
  70. /package/components/error-message/{error-message.jsx → error-message.js} +0 -0
  71. /package/components/footer/{footer.jsx → footer.js} +0 -0
  72. /package/components/global/{controls-height.jsx → controls-height.js} +0 -0
  73. /package/components/global/{create-stateful-context.jsx → create-stateful-context.js} +0 -0
  74. /package/components/global/{focus-sensor-hoc.jsx → focus-sensor-hoc.js} +0 -0
  75. /package/components/global/{react-dom-renderer.jsx → react-dom-renderer.js} +0 -0
  76. /package/components/global/{rerender-hoc.jsx → rerender-hoc.js} +0 -0
  77. /package/components/global/{theme.jsx → theme.js} +0 -0
  78. /package/components/grid/{col.jsx → col.js} +0 -0
  79. /package/components/grid/{row.jsx → row.js} +0 -0
  80. /package/components/group/{group.jsx → group.js} +0 -0
  81. /package/components/header/{header-icon.jsx → header-icon.js} +0 -0
  82. /package/components/header/{header.jsx → header.js} +0 -0
  83. /package/components/header/{links.jsx → links.js} +0 -0
  84. /package/components/header/{logo.jsx → logo.js} +0 -0
  85. /package/components/header/{profile.jsx → profile.js} +0 -0
  86. /package/components/header/{services-link.jsx → services-link.js} +0 -0
  87. /package/components/header/{services.jsx → services.js} +0 -0
  88. /package/components/header/{smart-profile.jsx → smart-profile.js} +0 -0
  89. /package/components/header/{smart-services.jsx → smart-services.js} +0 -0
  90. /package/components/header/{tray.jsx → tray.js} +0 -0
  91. /package/components/heading/{heading.jsx → heading.js} +0 -0
  92. /package/components/i18n/{i18n-context.jsx → i18n-context.js} +0 -0
  93. /package/components/icon/{icon-svg.jsx → icon-svg.js} +0 -0
  94. /package/components/icon/{icon.jsx → icon.js} +0 -0
  95. /package/components/input/{input.jsx → input.js} +0 -0
  96. /package/components/island/{adaptive-island-hoc.jsx → adaptive-island-hoc.js} +0 -0
  97. /package/components/island/{content.jsx → content.js} +0 -0
  98. /package/components/island/{header.jsx → header.js} +0 -0
  99. /package/components/island/{island.jsx → island.js} +0 -0
  100. /package/components/link/{clickable-link.jsx → clickable-link.js} +0 -0
  101. /package/components/link/{clickableLink.jsx → clickableLink.js} +0 -0
  102. /package/components/link/{link.jsx → link.js} +0 -0
  103. /package/components/list/{list-custom.jsx → list-custom.js} +0 -0
  104. /package/components/list/{list-hint.jsx → list-hint.js} +0 -0
  105. /package/components/list/{list-item.jsx → list-item.js} +0 -0
  106. /package/components/list/{list-separator.jsx → list-separator.js} +0 -0
  107. /package/components/list/{list-title.jsx → list-title.js} +0 -0
  108. /package/components/list/{list.jsx → list.js} +0 -0
  109. /package/components/loader/{loader.jsx → loader.js} +0 -0
  110. /package/components/loader-inline/{loader-inline.jsx → loader-inline.js} +0 -0
  111. /package/components/loader-screen/{loader-screen.jsx → loader-screen.js} +0 -0
  112. /package/components/login-dialog/{login-dialog.jsx → login-dialog.js} +0 -0
  113. /package/components/login-dialog/{service.jsx → service.js} +0 -0
  114. /package/components/markdown/{markdown.jsx → markdown.js} +0 -0
  115. /package/components/message/{message.jsx → message.js} +0 -0
  116. /package/components/pager/{pager.jsx → pager.js} +0 -0
  117. /package/components/panel/{panel.jsx → panel.js} +0 -0
  118. /package/components/popup/{popup.target.jsx → popup.target.js} +0 -0
  119. /package/components/popup-menu/{popup-menu.jsx → popup-menu.js} +0 -0
  120. /package/components/progress-bar/{progress-bar.jsx → progress-bar.js} +0 -0
  121. /package/components/query-assist/{query-assist-suggestions.jsx → query-assist-suggestions.js} +0 -0
  122. /package/components/query-assist/{query-assist.jsx → query-assist.js} +0 -0
  123. /package/components/radio/{radio-item.jsx → radio-item.js} +0 -0
  124. /package/components/radio/{radio.jsx → radio.js} +0 -0
  125. /package/components/scrollable-section/{scrollable-section.jsx → scrollable-section.js} +0 -0
  126. /package/components/select/{select-filter.jsx → select-filter.js} +0 -0
  127. /package/components/select/{select-popup.jsx → select-popup.js} +0 -0
  128. /package/components/select/{select.jsx → select.js} +0 -0
  129. /package/components/shortcuts/{shortcuts-hoc.jsx → shortcuts-hoc.js} +0 -0
  130. /package/components/slider/{slider.jsx → slider.js} +0 -0
  131. /package/components/tab-trap/{tab-trap.jsx → tab-trap.js} +0 -0
  132. /package/components/table/{cell.jsx → cell.js} +0 -0
  133. /package/components/table/{disable-hover-hoc.jsx → disable-hover-hoc.js} +0 -0
  134. /package/components/table/{header-cell.jsx → header-cell.js} +0 -0
  135. /package/components/table/{header.jsx → header.js} +0 -0
  136. /package/components/table/{multitable.jsx → multitable.js} +0 -0
  137. /package/components/table/{row-with-focus-sensor.jsx → row-with-focus-sensor.js} +0 -0
  138. /package/components/table/{row.jsx → row.js} +0 -0
  139. /package/components/table/{selection-shortcuts-hoc.jsx → selection-shortcuts-hoc.js} +0 -0
  140. /package/components/table/{simple-table.jsx → simple-table.js} +0 -0
  141. /package/components/table/{smart-table.jsx → smart-table.js} +0 -0
  142. /package/components/table/{table.jsx → table.js} +0 -0
  143. /package/components/tabs/{collapsible-more.jsx → collapsible-more.js} +0 -0
  144. /package/components/tabs/{collapsible-tabs.jsx → collapsible-tabs.js} +0 -0
  145. /package/components/tabs/{custom-item.jsx → custom-item.js} +0 -0
  146. /package/components/tabs/{dumb-tabs.jsx → dumb-tabs.js} +0 -0
  147. /package/components/tabs/{smart-tabs.jsx → smart-tabs.js} +0 -0
  148. /package/components/tabs/{tab-link.jsx → tab-link.js} +0 -0
  149. /package/components/tabs/{tab.jsx → tab.js} +0 -0
  150. /package/components/tag/{tag.jsx → tag.js} +0 -0
  151. /package/components/tags-input/{tags-input.jsx → tags-input.js} +0 -0
  152. /package/components/tags-list/{tags-list.jsx → tags-list.js} +0 -0
  153. /package/components/text/{text.jsx → text.js} +0 -0
  154. /package/components/toggle/{toggle.jsx → toggle.js} +0 -0
  155. /package/components/tooltip/{tooltip.jsx → tooltip.js} +0 -0
  156. /package/components/user-agreement/{service.jsx → service.js} +0 -0
  157. /package/components/user-agreement/{user-agreement.jsx → user-agreement.js} +0 -0
  158. /package/components/user-card/{card.jsx → card.js} +0 -0
  159. /package/components/user-card/{smart-user-card-tooltip.jsx → smart-user-card-tooltip.js} +0 -0
  160. /package/components/user-card/{tooltip.jsx → tooltip.js} +0 -0
package/babel.config.js CHANGED
@@ -9,6 +9,7 @@ module.exports = function config(api) {
9
9
  'babel-plugin-react-compiler',
10
10
  {
11
11
  target: '18', // should be the minimal supported version from peerDependencies
12
+ panicThreshold: 'all_errors',
12
13
  },
13
14
  ],
14
15
  [
@@ -10,9 +10,10 @@ import Link from '../link/link';
10
10
  import Tooltip from '../tooltip/tooltip';
11
11
  import styles from './banner.css';
12
12
  export function Banner(props) {
13
- const { title, children, mode = 'info', withIcon = false, inline = false, onClose, closeButtonTitle, className, ['data-test']: dataTest, translations = {
13
+ const { title, children, mode = 'info', withIcon = false, inline = false, onClose, closeButtonTitle, className, translations = {
14
14
  close: 'Close',
15
15
  }, } = props;
16
+ const dataTest = props['data-test'];
16
17
  let icon = infoIcon;
17
18
  if (mode === 'error') {
18
19
  icon = exceptionIcon;
@@ -5,6 +5,7 @@ export interface ContentLayoutProps extends HTMLAttributes<HTMLElement> {
5
5
  }
6
6
  /**
7
7
  * @name Content Layout
8
+ * @deprecated Will be removed in Ring UI 8.0.
8
9
  */
9
10
  export default class ContentLayout extends Component<ContentLayoutProps> {
10
11
  static defaultProps: {
@@ -4,6 +4,7 @@ import Sidebar from './sidebar';
4
4
  import styles from './content-layout.css';
5
5
  /**
6
6
  * @name Content Layout
7
+ * @deprecated Will be removed in Ring UI 8.0.
7
8
  */
8
9
  export default class ContentLayout extends Component {
9
10
  static defaultProps = {
@@ -6,6 +6,10 @@ export interface SidebarProps extends HTMLAttributes<HTMLElement> {
6
6
  fixedClassName?: string | null | undefined;
7
7
  contentNode?: HTMLElement | null | undefined;
8
8
  }
9
+ /**
10
+ * @name Sidebar
11
+ * @deprecated Will be removed in Ring UI 8.0.
12
+ */
9
13
  export default class Sidebar extends Component<SidebarProps> {
10
14
  state: {
11
15
  topIsOutside: boolean;
@@ -4,6 +4,10 @@ import { Waypoint } from 'react-waypoint';
4
4
  import styles from './content-layout.css';
5
5
  const ABOVE = 'above';
6
6
  const INSIDE = 'inside';
7
+ /**
8
+ * @name Sidebar
9
+ * @deprecated Will be removed in Ring UI 8.0.
10
+ */
7
11
  export default class Sidebar extends Component {
8
12
  state = {
9
13
  topIsOutside: true,
@@ -59,7 +59,7 @@ export interface DatePopupState {
59
59
  active: Field;
60
60
  text: string | null;
61
61
  hoverDate: Date | null;
62
- scrollDate: number | null;
62
+ scrollDate: number | Date | null;
63
63
  }
64
64
  export interface DatePopupBaseProps {
65
65
  date?: Date | number | string | null | undefined;
@@ -35,13 +35,14 @@ export default class DatePopup extends Component {
35
35
  if (!range) {
36
36
  const parsedDate = this.parse(props.date, 'date');
37
37
  const active = withTime && parsedDate && !props.time ? 'time' : 'date';
38
- this.state = { ...defaultState, active };
39
- }
40
- else if (props.from && !props.to) {
41
- this.state = { ...defaultState, active: 'to' };
38
+ this.state = { ...defaultState, active, scrollDate: parsedDate };
42
39
  }
43
40
  else {
44
- this.state = { ...defaultState, active: 'from' };
41
+ this.state = {
42
+ ...defaultState,
43
+ active: props.from && !props.to ? 'to' : 'from',
44
+ scrollDate: this.parse(props.from, 'from'),
45
+ };
45
46
  }
46
47
  }
47
48
  componentDidMount() {
@@ -245,7 +246,7 @@ export default class DatePopup extends Component {
245
246
  };
246
247
  // eslint-disable-next-line complexity
247
248
  render() {
248
- const { range, withTime, locale } = this.props;
249
+ const { range, locale } = this.props;
249
250
  const { from, to, date, time, ...restProps } = this.props;
250
251
  const parsedDate = this.parse(this.props.date, 'date');
251
252
  const parsedTo = this.parse(this.props.to, 'to');
@@ -284,9 +285,7 @@ export default class DatePopup extends Component {
284
285
  break;
285
286
  }
286
287
  }
287
- const scrollDate = withTime && !range
288
- ? this.state.scrollDate || dates.date || new Date()
289
- : this.state.scrollDate || dates[this.state.active] || new Date();
288
+ const scrollDate = this.state.scrollDate || new Date();
290
289
  const calendarProps = {
291
290
  ...restProps,
292
291
  ...dates,
@@ -1,6 +1,7 @@
1
1
  import { Component, type HTMLAttributes } from 'react';
2
2
  /**
3
3
  * @name Grid
4
+ * @deprecated Will be removed in Ring UI 8.0. Use flexbox or another layout library instead.
4
5
  */
5
6
  export declare class Grid extends Component<HTMLAttributes<HTMLDivElement>> {
6
7
  render(): import("react").JSX.Element;
@@ -3,6 +3,7 @@ import classNames from 'classnames';
3
3
  import styles from './grid.css';
4
4
  /**
5
5
  * @name Grid
6
+ * @deprecated Will be removed in Ring UI 8.0. Use flexbox or another layout library instead.
6
7
  */
7
8
  export class Grid extends Component {
8
9
  render() {
@@ -94,6 +94,7 @@ export default class Popup<P extends BasePopupProps = PopupProps> extends PureCo
94
94
  parent?: HTMLElement | null;
95
95
  container?: HTMLElement | null;
96
96
  ringPopupTarget?: string | Element;
97
+ clickStartedInsidePopup: boolean;
97
98
  shouldUseShortcuts(): boolean;
98
99
  listeners: Listeners;
99
100
  redrawScheduler: (cb: () => void) => void;
@@ -136,8 +137,9 @@ export default class Popup<P extends BasePopupProps = PopupProps> extends PureCo
136
137
  isVisible(): boolean;
137
138
  _onCloseAttempt(evt?: Event | SyntheticEvent, isEsc?: boolean): void;
138
139
  private _onEscPress;
140
+ private _onDocumentPointerDown;
139
141
  /**
140
- * @param {jQuery.Event} evt
142
+ * @param {MouseEvent} evt
141
143
  * @private
142
144
  */
143
145
  private _onDocumentClick;
@@ -41,7 +41,7 @@ const stop = (event) => {
41
41
  event.stopPropagation();
42
42
  }
43
43
  };
44
- export const getPopupContainer = (target) => (typeof target === 'string' ? document.querySelector(`[data-portaltarget=${target}]`) : target);
44
+ export const getPopupContainer = (target) => typeof target === 'string' ? document.querySelector(`[data-portaltarget=${target}]`) : target;
45
45
  /**
46
46
  * @constructor
47
47
  * @name Popup
@@ -100,6 +100,7 @@ export default class Popup extends PureComponent {
100
100
  parent;
101
101
  container;
102
102
  ringPopupTarget;
103
+ clickStartedInsidePopup = false;
103
104
  shouldUseShortcuts() {
104
105
  const { shortcuts, hidden } = this.props;
105
106
  return shortcuts && !hidden;
@@ -239,7 +240,8 @@ export default class Popup extends PureComponent {
239
240
  el = el.parentElement;
240
241
  }
241
242
  }
242
- this.listeners.add(document, 'pointerdown', this._onDocumentClick, true);
243
+ this.listeners.add(document, 'pointerdown', this._onDocumentPointerDown, true);
244
+ this.listeners.add(document, 'click', this._onDocumentClick, true);
243
245
  }, 0);
244
246
  return;
245
247
  }
@@ -263,12 +265,20 @@ export default class Popup extends PureComponent {
263
265
  this.props.onEscPress(evt);
264
266
  this._onCloseAttempt(evt, true);
265
267
  };
268
+ _onDocumentPointerDown = (evt) => {
269
+ this.clickStartedInsidePopup = !!(evt.target instanceof Node &&
270
+ this.container &&
271
+ this.container.contains(evt.target));
272
+ };
266
273
  /**
267
- * @param {jQuery.Event} evt
274
+ * @param {MouseEvent} evt
268
275
  * @private
269
276
  */
270
277
  _onDocumentClick = (evt) => {
278
+ const clickStartedInsidePopup = this.clickStartedInsidePopup;
279
+ this.clickStartedInsidePopup = false;
271
280
  if ((this.container && evt.target instanceof Node && this.container.contains(evt.target)) ||
281
+ clickStartedInsidePopup ||
272
282
  !this._listenersEnabled ||
273
283
  (this.props.dontCloseOnAnchorClick && evt.target instanceof Node && this._getAnchor()?.contains(evt.target)) ||
274
284
  // ignore clicks in shadow DOM, e.g., Grammarly suggestions
@@ -8,12 +8,9 @@ const TabTitle = React.memo(function TabTitle({ selected, child, handleSelect, c
8
8
  return child;
9
9
  }
10
10
  const { title, titleProps, disabled, href, className, activeClassName, collapsedClassName, collapsedActiveClassName } = child.props;
11
- const titleClasses = classNames(styles.title, className, {
11
+ const titleClasses = classNames(styles.title, className, selected && activeClassName, collapsed && collapsedClassName, collapsed && selected && collapsedActiveClassName, {
12
12
  [styles.selected]: selected,
13
13
  [styles.collapsed]: collapsed,
14
- [activeClassName ?? '']: selected,
15
- [collapsedClassName ?? '']: collapsed,
16
- [collapsedActiveClassName ?? '']: collapsed && selected,
17
14
  });
18
15
  return (<TabLink title={title} isSelected={selected} active href={href} className={titleClasses} disabled={disabled} onPlainLeftClick={handleSelect} tabIndex={tabIndex} collapsed={collapsed} {...titleProps}/>);
19
16
  });
@@ -3,7 +3,8 @@ import classNames from 'classnames';
3
3
  import attachmentIcon from '@jetbrains/icons/attachment';
4
4
  import Icon from '../icon';
5
5
  import styles from './upload.css';
6
- export const Upload = forwardRef(function Upload({ children, className, onFilesSelected, onFilesRejected, validate = () => true, variant = 'empty', multiple, renderIcon = () => <Icon className={styles.attachmentIcon} glyph={attachmentIcon}/>, accept, disabled, }, ref) {
6
+ const defaultRenderIcon = () => <Icon className={styles.attachmentIcon} glyph={attachmentIcon}/>;
7
+ export const Upload = forwardRef(function Upload({ children, className, onFilesSelected, onFilesRejected, validate = () => true, variant = 'empty', multiple, renderIcon = defaultRenderIcon, accept, disabled, }, ref) {
7
8
  const fileInputRef = useRef(null);
8
9
  const [dragOver, setDragOver] = useState(false);
9
10
  useImperativeHandle(ref, () => ({ openFilePicker: () => fileInputRef.current?.click() }), []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "7.0.74",
3
+ "version": "7.0.76",
4
4
  "description": "JetBrains UI library",
5
5
  "author": {
6
6
  "name": "JetBrains"
@@ -63,7 +63,7 @@
63
63
  "postpublish": "pinst --enable",
64
64
  "postrelease-ci": "git push --follow-tags",
65
65
  "prea11y-audit": "playwright install",
66
- "prebuild": "rimraf components && tsc --project tsconfig-build.json && cpy './**/*' '!**/*.stories.*' '!**/*.ts' '!**/*.tsx' '!**/test-helpers/mocks/**' ../components --parents --cwd=src/",
66
+ "prebuild": "rimraf components && tsc --project tsconfig-build.json && cpy './**/*' '!**/*.stories.*' '!**/*.figma.*' '!**/*.ts' '!**/*.tsx' '!**/test-helpers/mocks/**' ../components --parents --cwd=src/",
67
67
  "prepare": "webpack -c .storybook/custom-header/webpack.config.js",
68
68
  "prepublishOnly": "pinst --disable",
69
69
  "prerelease-built-ci": "node scripts/prepare-built-package.js",
@@ -93,31 +93,30 @@
93
93
  "@babel/eslint-parser": "^7.28.5",
94
94
  "@csstools/css-parser-algorithms": "^3.0.4",
95
95
  "@csstools/stylelint-no-at-nest-rule": "^4.0.0",
96
- "@eslint/compat": "^1.4.0",
96
+ "@eslint/compat": "^1.4.1",
97
97
  "@eslint/eslintrc": "^3.2.0",
98
- "@eslint/js": "^9.38.0",
99
- "@figma/code-connect": "^1.3.7",
98
+ "@eslint/js": "^9.39.1",
99
+ "@figma/code-connect": "^1.3.8",
100
100
  "@jetbrains/eslint-config": "^6.0.5",
101
101
  "@jetbrains/logos": "3.0.0-canary.734b213.0",
102
102
  "@jetbrains/rollup-css-plugin": "./packages/rollup-css-plugin",
103
103
  "@jetbrains/stylelint-config": "^4.0.2",
104
- "@primer/octicons": "^19.19.0",
104
+ "@primer/octicons": "^19.20.0",
105
105
  "@rollup/plugin-babel": "^6.1.0",
106
106
  "@rollup/plugin-json": "^6.1.0",
107
107
  "@rollup/plugin-node-resolve": "^16.0.3",
108
- "@rollup/plugin-replace": "^6.0.2",
109
- "@storybook/addon-a11y": "9.1.15",
110
- "@storybook/addon-docs": "^9.1.15",
111
- "@storybook/addon-themes": "^9.1.15",
108
+ "@rollup/plugin-replace": "^6.0.3",
109
+ "@storybook/addon-a11y": "10.0.6",
110
+ "@storybook/addon-docs": "^10.0.6",
111
+ "@storybook/addon-themes": "^10.0.6",
112
112
  "@storybook/csf": "^0.1.13",
113
- "@storybook/react-webpack5": "9.1.15",
114
- "@storybook/test-runner": "^0.23.0",
113
+ "@storybook/react-webpack5": "10.0.6",
114
+ "@storybook/test-runner": "^0.24.1",
115
115
  "@testing-library/dom": "^10.4.1",
116
116
  "@testing-library/react": "^16.3.0",
117
117
  "@testing-library/user-event": "^14.6.1",
118
118
  "@types/chai-as-promised": "^8.0.2",
119
119
  "@types/chai-dom": "1.11.3",
120
- "@types/eslint__js": "^9.14.0",
121
120
  "@types/markdown-it": "^14.1.2",
122
121
  "@types/react": "^19.2.2",
123
122
  "@types/react-dom": "^19.2.2",
@@ -125,16 +124,15 @@
125
124
  "@vitejs/plugin-react": "^5.0.4",
126
125
  "@vitest/eslint-plugin": "^1.3.23",
127
126
  "acorn": "^8.15.0",
128
- "babel-plugin-react-compiler": "^1.0.0",
129
127
  "babel-plugin-require-context-hook": "^1.0.0",
130
- "caniuse-lite": "^1.0.30001751",
128
+ "caniuse-lite": "^1.0.30001754",
131
129
  "chai-as-promised": "^8.0.2",
132
130
  "chai-dom": "^1.12.1",
133
131
  "cheerio": "^1.1.2",
134
132
  "core-js": "^3.46.0",
135
133
  "cpy-cli": "^6.0.0",
136
- "dotenv-cli": "^10.0.0",
137
- "eslint": "^9.38.0",
134
+ "dotenv-cli": "^11.0.0",
135
+ "eslint": "^9.39.1",
138
136
  "eslint-config-prettier": "^10.1.8",
139
137
  "eslint-import-resolver-exports": "^1.0.0-beta.5",
140
138
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -144,11 +142,11 @@
144
142
  "eslint-plugin-prettier": "^5.5.4",
145
143
  "eslint-plugin-react": "^7.37.5",
146
144
  "eslint-plugin-react-hooks": "^7.0.1",
147
- "eslint-plugin-storybook": "^9.1.15",
145
+ "eslint-plugin-storybook": "^10.0.6",
148
146
  "eslint-plugin-unicorn": "^62.0.0",
149
147
  "events": "^3.3.0",
150
148
  "glob": "^11.0.3",
151
- "globals": "^16.4.0",
149
+ "globals": "^16.5.0",
152
150
  "html-webpack-plugin": "^5.6.4",
153
151
  "http-server": "^14.1.1",
154
152
  "husky": "^9.1.7",
@@ -165,24 +163,22 @@
165
163
  "react": "^19.2.0",
166
164
  "react-dom": "^19.2.0",
167
165
  "regenerator-runtime": "^0.14.1",
168
- "rimraf": "^6.0.1",
169
- "rollup": "^4.52.5",
166
+ "rimraf": "^6.1.0",
167
+ "rollup": "^4.53.1",
170
168
  "rollup-plugin-clear": "^2.0.7",
171
169
  "storage-mock": "^2.1.0",
172
- "storybook": "9.1.15",
170
+ "storybook": "10.0.6",
173
171
  "stylelint": "^16.25.0",
174
172
  "stylelint-config-sass-guidelines": "^12.1.0",
175
173
  "svg-inline-loader": "^0.8.2",
176
174
  "teamcity-service-messages": "^0.1.14",
177
175
  "terser-webpack-plugin": "^5.3.14",
178
176
  "typescript": "~5.9.3",
179
- "typescript-eslint": "^8.46.2",
177
+ "typescript-eslint": "^8.46.3",
180
178
  "vitest": "^3.2.4",
181
179
  "vitest-teamcity-reporter": "^0.3.1",
182
- "wallaby-webpack": "^3.9.16",
183
180
  "webpack": "^5.102.1",
184
- "webpack-cli": "^6.0.1",
185
- "xmlappend": "^1.0.4"
181
+ "webpack-cli": "^6.0.1"
186
182
  },
187
183
  "peerDependencies": {
188
184
  "@types/react": ">=18.0.0",
@@ -214,6 +210,7 @@
214
210
  "@types/react-virtualized": "9.22.3",
215
211
  "@types/util-deprecate": "^1.0.4",
216
212
  "babel-loader": "10.0.0",
213
+ "babel-plugin-react-compiler": "^1.0.0",
217
214
  "babel-plugin-transform-define": "^2.1.4",
218
215
  "browserslist": "^4.27.0",
219
216
  "change-case": "^4.1.1",
@@ -226,7 +223,7 @@
226
223
  "element-resize-detector": "^1.2.4",
227
224
  "fastdom": "^1.0.12",
228
225
  "file-loader": "^6.2.0",
229
- "focus-trap": "^7.6.5",
226
+ "focus-trap": "^7.6.6",
230
227
  "highlight.js": "^10.7.2",
231
228
  "just-debounce-it": "^3.2.0",
232
229
  "memoize-one": "^6.0.0",
@@ -1,45 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-522
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
-
6
- const round = instance.getBoolean('Round');
7
- const size = parseInt(instance.getString('Size'), 10);
8
- const content = instance.getString('Content');
9
-
10
- const props = [];
11
- const DEFAULT_SIZE = 20;
12
- const isDefaultSize = size === DEFAULT_SIZE;
13
- const imports = [`import Avatar${isDefaultSize ? '' : ', {Size}'} from '@jetbrains/ring-ui/components/avatar/avatar'`];
14
- if (!isDefaultSize) {
15
- props.push(`size={Size.Size${size}}`);
16
- }
17
- switch (content) {
18
- case 'color/image':
19
- props.push('url="avatar.png"');
20
- break;
21
- case 'name':
22
- props.push('username="Samuel Morse"');
23
- break;
24
- case 'label':
25
- props.push(`info="${instance.findText('Content').textContent}"`);
26
- break;
27
- case 'icon':
28
- imports.push(
29
- "import Icon from '@jetbrains/ring-ui/components/icon/icon'",
30
- "import warningIcon from '@jetbrains/icons/warning.svg'",
31
- );
32
- props.push('info={<Icon glyph={warningIcon} />}');
33
- break;
34
- default:
35
- }
36
- if (round) {
37
- props.push('round');
38
- }
39
-
40
- export default {
41
- id: 'avatar',
42
- example: figma.code`${imports.join('\n')}
43
-
44
- <Avatar ${props.map(prop => `${prop} `).join('')}/>`,
45
- };
@@ -1,33 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-752
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
- const sizeString = instance.getString('Size');
6
- const [sizeSubstring] = sizeString.match(/\d+/) ?? [];
7
- const size = parseInt(sizeSubstring, 10);
8
- const children = instance.findConnectedInstances(() => true);
9
-
10
- const imports = ["import AvatarStack from '@jetbrains/ring-ui/components/avatar-stack/avatar-stack'"];
11
- const props = [];
12
-
13
- const DEFAULT_SIZE = 20;
14
- const isDefaultSize = size === DEFAULT_SIZE;
15
- if (!isDefaultSize) {
16
- props.push(`size={Size.Size${size}}`);
17
- }
18
-
19
- const renderedChildren = children.map(child => {
20
- const {example} = child.executeTemplate();
21
- const [childImports, code] = example[0].code.split('\n\n');
22
- return {imports: childImports, code};
23
- });
24
-
25
- export default {
26
- id: 'avatar-stack',
27
- example: figma.code`${imports.join('\n')}
28
- ${renderedChildren[0].imports}
29
-
30
- <AvatarStack ${props.map(prop => `${prop} `).join('')}>
31
- ${renderedChildren.map(({code}) => code).join('\n ')}
32
- </AvatarStack>`,
33
- };
@@ -1,31 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=460%3A2730
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
-
6
- const imports = [
7
- "import Breadcrumbs from '@jetbrains/ring-ui/components/breadcrumbs/breadcrumbs'",
8
- "import Link from '@jetbrains/ring-ui/components/link/link'",
9
- ];
10
-
11
- const children = instance
12
- .findLayers(() => true)
13
- .map(layer => layer.textContent)
14
- .filter(text => text !== '/');
15
-
16
- export default {
17
- id: 'breadcrumbs',
18
- example: figma.code`${imports.join('\n')}
19
-
20
- <Breadcrumbs>
21
- ${children
22
- .map((text, index) => {
23
- const props = [`href="/page${index + 1}"`];
24
- if (index === children.length - 1) {
25
- props.push('active');
26
- }
27
- return `<Link ${props.map(prop => `${prop} `).join('')}>${text}</Link>`;
28
- })
29
- .join('\n ')}
30
- </Breadcrumbs>`,
31
- };
@@ -1,95 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=9954-528
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
-
6
- const size = instance.getString('Size');
7
- const type = instance.getString('Type');
8
- const state = instance.getString('State');
9
- const variant = instance.getString('Variant');
10
-
11
- const imports = ["import Button from '@jetbrains/ring-ui/components/button/button'"];
12
- const props = [];
13
- const DEFAULT_SIZE = 'M';
14
- const isDefaultSize = size === DEFAULT_SIZE;
15
-
16
- if (!isDefaultSize) {
17
- imports.push("import {ControlsHeight} from '@jetbrains/ring-ui/components/global/controls-height'");
18
- props.push(`height={ControlsHeight.${size}}`);
19
- }
20
-
21
- switch (variant) {
22
- case 'Red outlined':
23
- props.push('danger');
24
- break;
25
- case 'Main':
26
- props.push('primary');
27
- break;
28
- case 'Green':
29
- props.push('success');
30
- break;
31
- case 'Red solid':
32
- props.push('error');
33
- break;
34
- case 'Gray':
35
- props.push('secondary');
36
- break;
37
- case 'Ghost':
38
- props.push('ghost');
39
- break;
40
- case 'Text':
41
- props.push('inline');
42
- break;
43
- default:
44
- }
45
-
46
- const children = instance.findLayers(() => true)[0].findText('Button').textContent;
47
- const use12pxIcon = size === 'S' && variant !== 'Text';
48
- let useButtonGroup = false;
49
- switch (type) {
50
- case 'R-Icon-Label':
51
- props.push('dropdown');
52
- break;
53
- case 'L-Icon-Label':
54
- imports.push(`import downloadIcon from '@jetbrains/icons/download${use12pxIcon ? '-12px' : ''}'`);
55
- props.push('icon={downloadIcon}');
56
- break;
57
- case 'Icon':
58
- imports.push(`import addIcon from '@jetbrains/icons/add${use12pxIcon ? '-12px' : ''}'`);
59
- props.push('icon={addIcon}');
60
- break;
61
- case 'Split':
62
- imports.push("import ButtonGroup from '@jetbrains/ring-ui/components/button-group/button-group'");
63
- imports.push(`import chevronDownIcon from '@jetbrains/icons/chevron-down${use12pxIcon ? '-12px' : ''}'`);
64
- useButtonGroup = true;
65
- break;
66
- default:
67
- }
68
-
69
- switch (state) {
70
- case 'Disabled':
71
- props.push('disabled');
72
- break;
73
- default:
74
- }
75
-
76
- const joinedProps = props.map(prop => `${prop} `).join('');
77
- // prettier-ignore
78
- const button = children ?
79
- `<Button ${joinedProps}>
80
- ${children}
81
- </Button>` : `<Button ${joinedProps}/>`;
82
-
83
- export default {
84
- id: 'button',
85
- example: figma.code`${imports.join('\n')}
86
-
87
- ${
88
- // prettier-ignore
89
- useButtonGroup ?
90
- `<ButtonGroup>
91
- ${button}
92
- <Button ${joinedProps} icon={chevronDownIcon} />
93
- </ButtonGroup>` : button
94
- }`,
95
- };
@@ -1,31 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=226-2666
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
- const labelType = instance.getString('Label');
6
- const children = instance.findConnectedInstances(() => true);
7
- const label = instance.findText('Group description').textContent;
8
-
9
- const isFormLabel = labelType === 'form';
10
- const imports = [
11
- `import ControlLabel${isFormLabel ? ', {LabelType}' : ''} from '@jetbrains/ring-ui/components/control-label/control-label'`,
12
- ];
13
- const labelProps = [];
14
- if (isFormLabel) {
15
- labelProps.push('type={LabelType.FORM}');
16
- }
17
-
18
- const renderedChildren = children.map(child => {
19
- const {example} = child.executeTemplate();
20
- const [childImports, code] = example[0].code.split('\n\n');
21
- return {imports: childImports, code};
22
- });
23
-
24
- export default {
25
- id: 'checkbox-group',
26
- example: figma.code`${imports.join('\n')}
27
- ${renderedChildren[0].imports}
28
-
29
- <ControlLabel ${labelProps.map(prop => `${prop} `).join('')}>${label}</ControlLabel>
30
- ${renderedChildren.map(({code}) => code).join('\n<br />\n')}`,
31
- };
@@ -1,38 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=224%3A1943
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
- const selected = instance.getString('Selected');
6
- const hasLabel = instance.getBoolean('Label');
7
- const label = instance.findText('Label').textContent;
8
- const hasHelpText = instance.getBoolean('Help Text');
9
- const helpText = instance.findText('Description').textContent;
10
- const state = instance.getString('State');
11
-
12
- const imports = ["import Checkbox from '@jetbrains/ring-ui/components/checkbox/checkbox'"];
13
- const props = [];
14
- switch (selected) {
15
- case 'selected':
16
- props.push('defaultChecked');
17
- break;
18
- case 'intermediate':
19
- props.push('indeterminate', 'defaultChecked');
20
- break;
21
- default:
22
- }
23
- if (hasLabel) {
24
- props.push(`label="${label}"`);
25
- }
26
- if (hasHelpText) {
27
- props.push(`help="${helpText}"`);
28
- }
29
- if (state === 'Disabled') {
30
- props.push('disabled');
31
- }
32
-
33
- export default {
34
- id: 'checkbox',
35
- example: figma.code`${imports.join('\n')}
36
-
37
- <Checkbox ${props.map(prop => `${prop} `).join('')}/>`,
38
- };
@@ -1,15 +0,0 @@
1
- // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=1228-2869
2
- import figma from '@figma/code-connect';
3
-
4
- const instance = figma.selectedInstance;
5
- const error = instance.findLayers(() => true)[0].textContent;
6
-
7
- const imports = ["import ErrorBubble from '@jetbrains/ring-ui/components/error-bubble/error-bubble'"];
8
- const props = [`error={\`${error}\``];
9
-
10
- export default {
11
- id: 'error-bubble',
12
- example: figma.code`${imports.join('\n')}
13
-
14
- <ErrorBubble ${props.map(prop => `${prop} `).join('')}/>`,
15
- };