@jetbrains/ring-ui 7.0.72 → 7.0.73

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 (282) hide show
  1. package/babel.config.js +14 -8
  2. package/components/alert/alert.d.ts +1 -1
  3. package/components/alert/{alert.js → alert.jsx} +14 -8
  4. package/components/alert/{container.js → container.jsx} +4 -3
  5. package/components/alert-service/alert-service.d.ts +1 -1
  6. package/components/alert-service/{alert-service.js → alert-service.jsx} +8 -5
  7. package/components/auth/auth-core.js +6 -7
  8. package/components/auth/{down-notification.js → down-notification.jsx} +12 -4
  9. package/components/auth/{iframe-flow.js → iframe-flow.jsx} +6 -5
  10. package/components/auth/storage.js +1 -1
  11. package/components/auth/token-validator.js +1 -1
  12. package/components/auth/window-flow.js +2 -2
  13. package/components/auth-dialog/auth-dialog.d.ts +1 -1
  14. package/components/auth-dialog/{auth-dialog.js → auth-dialog.jsx} +18 -2
  15. package/components/auth-dialog-service/{auth-dialog-service.js → auth-dialog-service.jsx} +3 -2
  16. package/components/avatar/avatar-info.d.ts +1 -1
  17. package/components/avatar/{avatar-info.js → avatar-info.jsx} +4 -3
  18. package/components/avatar/avatar.d.ts +1 -1
  19. package/components/avatar/{avatar.js → avatar.jsx} +11 -6
  20. package/components/avatar/fallback-avatar.d.ts +1 -1
  21. package/components/avatar/{fallback-avatar.js → fallback-avatar.jsx} +16 -2
  22. package/components/avatar-stack/avatar-stack.d.ts +1 -1
  23. package/components/avatar-stack/avatar-stack.jsx +24 -0
  24. package/components/banner/banner.d.ts +1 -1
  25. package/components/banner/{banner.js → banner.jsx} +15 -3
  26. package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
  27. package/components/breadcrumbs/{breadcrumbs.js → breadcrumbs.jsx} +4 -2
  28. package/components/button/button.d.ts +1 -1
  29. package/components/button/{button.js → button.jsx} +13 -5
  30. package/components/button-group/button-group.d.ts +1 -1
  31. package/components/button-group/{button-group.js → button-group.jsx} +5 -2
  32. package/components/button-group/caption.d.ts +1 -1
  33. package/components/button-group/{caption.js → caption.jsx} +1 -2
  34. package/components/button-set/button-set.d.ts +1 -1
  35. package/components/button-set/{button-set.js → button-set.jsx} +3 -2
  36. package/components/button-toolbar/button-toolbar.d.ts +1 -1
  37. package/components/button-toolbar/{button-toolbar.js → button-toolbar.jsx} +1 -2
  38. package/components/checkbox/checkbox.d.ts +1 -1
  39. package/components/checkbox/{checkbox.js → checkbox.jsx} +13 -2
  40. package/components/code/code.d.ts +1 -1
  41. package/components/code/{code.js → code.jsx} +8 -5
  42. package/components/collapse/collapse-content.jsx +65 -0
  43. package/components/collapse/{collapse-control.js → collapse-control.jsx} +6 -3
  44. package/components/collapse/{collapse.js → collapse.jsx} +12 -8
  45. package/components/confirm/confirm.d.ts +1 -1
  46. package/components/confirm/{confirm.js → confirm.jsx} +13 -2
  47. package/components/confirm-service/{confirm-service.js → confirm-service.jsx} +3 -2
  48. package/components/content-layout/content-layout.d.ts +1 -1
  49. package/components/content-layout/{content-layout.js → content-layout.jsx} +6 -2
  50. package/components/content-layout/sidebar.d.ts +1 -1
  51. package/components/content-layout/{sidebar.js → sidebar.jsx} +11 -2
  52. package/components/contenteditable/contenteditable.d.ts +2 -2
  53. package/components/contenteditable/{contenteditable.js → contenteditable.jsx} +5 -6
  54. package/components/control-help/control-help.d.ts +1 -1
  55. package/components/control-help/{control-help.js → control-help.jsx} +1 -2
  56. package/components/control-label/{control-label.js → control-label.jsx} +5 -3
  57. package/components/data-list/data-list.d.ts +1 -1
  58. package/components/data-list/{data-list.js → data-list.jsx} +17 -8
  59. package/components/data-list/data-list.mock.d.ts +1 -1
  60. package/components/data-list/data-list.mock.jsx +215 -0
  61. package/components/data-list/item.d.ts +2 -2
  62. package/components/data-list/{item.js → item.jsx} +23 -7
  63. package/components/data-list/title.d.ts +1 -1
  64. package/components/data-list/{title.js → title.jsx} +11 -2
  65. package/components/date-picker/consts.js +1 -1
  66. package/components/date-picker/date-input.d.ts +1 -1
  67. package/components/date-picker/{date-input.js → date-input.jsx} +1 -2
  68. package/components/date-picker/date-picker.d.ts +1 -1
  69. package/components/date-picker/{date-picker.js → date-picker.jsx} +24 -12
  70. package/components/date-picker/date-popup.d.ts +1 -1
  71. package/components/date-picker/{date-popup.js → date-popup.jsx} +20 -9
  72. package/components/date-picker/day.d.ts +1 -1
  73. package/components/date-picker/{day.js → day.jsx} +4 -3
  74. package/components/date-picker/month-names.d.ts +1 -1
  75. package/components/date-picker/{month-names.js → month-names.jsx} +12 -7
  76. package/components/date-picker/month-slider.d.ts +1 -1
  77. package/components/date-picker/{month-slider.js → month-slider.jsx} +4 -3
  78. package/components/date-picker/month.d.ts +1 -1
  79. package/components/date-picker/{month.js → month.jsx} +4 -3
  80. package/components/date-picker/months.d.ts +1 -1
  81. package/components/date-picker/{months.js → months.jsx} +9 -6
  82. package/components/date-picker/weekdays.d.ts +1 -1
  83. package/components/date-picker/{weekdays.js → weekdays.jsx} +6 -3
  84. package/components/date-picker/years.d.ts +1 -1
  85. package/components/date-picker/{years.js → years.jsx} +9 -6
  86. package/components/dialog/dialog.d.ts +1 -1
  87. package/components/dialog/{dialog.js → dialog.jsx} +39 -16
  88. package/components/dropdown/anchor.d.ts +1 -1
  89. package/components/dropdown/anchor.jsx +8 -0
  90. package/components/dropdown/dropdown.d.ts +1 -1
  91. package/components/dropdown/{dropdown.js → dropdown.jsx} +10 -7
  92. package/components/dropdown-menu/{dropdown-menu.js → dropdown-menu.jsx} +10 -5
  93. package/components/editable-heading/editable-heading.d.ts +2 -2
  94. package/components/editable-heading/{editable-heading.js → editable-heading.jsx} +31 -3
  95. package/components/error-bubble/error-bubble.d.ts +1 -1
  96. package/components/error-bubble/error-bubble.jsx +23 -0
  97. package/components/error-message/error-message.d.ts +1 -1
  98. package/components/error-message/error-message.jsx +25 -0
  99. package/components/footer/{footer.js → footer.jsx} +14 -7
  100. package/components/global/create-stateful-context.d.ts +1 -1
  101. package/components/global/{create-stateful-context.js → create-stateful-context.jsx} +3 -2
  102. package/components/global/{focus-sensor-hoc.js → focus-sensor-hoc.jsx} +1 -2
  103. package/components/global/get-uid.js +1 -1
  104. package/components/global/react-dom-renderer.d.ts +1 -1
  105. package/components/global/{react-dom-renderer.js → react-dom-renderer.jsx} +1 -2
  106. package/components/global/{rerender-hoc.js → rerender-hoc.jsx} +2 -3
  107. package/components/global/{theme.js → theme.jsx} +12 -4
  108. package/components/grid/col.d.ts +1 -1
  109. package/components/grid/{col.js → col.jsx} +3 -2
  110. package/components/grid/grid.d.ts +1 -1
  111. package/components/grid/{grid.js → grid.jsx} +3 -2
  112. package/components/grid/row.d.ts +1 -1
  113. package/components/grid/{row.js → row.jsx} +3 -2
  114. package/components/group/group.d.ts +1 -1
  115. package/components/group/{group.js → group.jsx} +3 -2
  116. package/components/header/header-icon.d.ts +1 -1
  117. package/components/header/{header-icon.js → header-icon.jsx} +1 -2
  118. package/components/header/header.d.ts +1 -1
  119. package/components/header/{header.js → header.jsx} +4 -3
  120. package/components/header/links.d.ts +1 -1
  121. package/components/header/{links.js → links.jsx} +1 -2
  122. package/components/header/logo.d.ts +1 -1
  123. package/components/header/{logo.js → logo.jsx} +3 -2
  124. package/components/header/{profile.js → profile.jsx} +19 -6
  125. package/components/header/services-link.d.ts +1 -1
  126. package/components/header/services-link.jsx +16 -0
  127. package/components/header/services.d.ts +1 -1
  128. package/components/header/{services.js → services.jsx} +16 -11
  129. package/components/header/smart-profile.d.ts +1 -1
  130. package/components/header/{smart-profile.js → smart-profile.jsx} +1 -2
  131. package/components/header/smart-services.d.ts +1 -1
  132. package/components/header/{smart-services.js → smart-services.jsx} +1 -2
  133. package/components/header/tray.d.ts +1 -1
  134. package/components/header/{tray.js → tray.jsx} +4 -3
  135. package/components/heading/{heading.js → heading.jsx} +16 -9
  136. package/components/i18n/{i18n-context.js → i18n-context.jsx} +1 -2
  137. package/components/icon/icon-svg.d.ts +1 -1
  138. package/components/icon/{icon-svg.js → icon-svg.jsx} +2 -3
  139. package/components/icon/icon.d.ts +1 -1
  140. package/components/icon/{icon.js → icon.jsx} +4 -3
  141. package/components/input/input.d.ts +1 -1
  142. package/components/input/{input.js → input.jsx} +16 -2
  143. package/components/island/{adaptive-island-hoc.js → adaptive-island-hoc.jsx} +5 -2
  144. package/components/island/content.d.ts +1 -1
  145. package/components/island/{content.js → content.jsx} +13 -6
  146. package/components/island/header.d.ts +1 -1
  147. package/components/island/{header.js → header.jsx} +13 -6
  148. package/components/island/island.d.ts +1 -1
  149. package/components/island/{island.js → island.jsx} +3 -2
  150. package/components/link/clickable-link.d.ts +1 -1
  151. package/components/link/{clickable-link.js → clickable-link.jsx} +4 -2
  152. package/components/link/{link.js → link.jsx} +6 -3
  153. package/components/list/list-custom.d.ts +1 -1
  154. package/components/list/{list-custom.js → list-custom.jsx} +4 -2
  155. package/components/list/list-hint.d.ts +1 -1
  156. package/components/list/{list-hint.js → list-hint.jsx} +3 -2
  157. package/components/list/list-item.d.ts +1 -1
  158. package/components/list/{list-item.js → list-item.jsx} +33 -5
  159. package/components/list/list-separator.d.ts +1 -1
  160. package/components/list/{list-separator.js → list-separator.jsx} +3 -2
  161. package/components/list/list-title.d.ts +1 -1
  162. package/components/list/list-title.jsx +19 -0
  163. package/components/list/list-users-groups-source.js +1 -1
  164. package/components/list/list.classes.js +1 -1
  165. package/components/list/list.d.ts +6 -6
  166. package/components/list/{list.js → list.jsx} +45 -23
  167. package/components/loader/loader.d.ts +1 -1
  168. package/components/loader/{loader.js → loader.jsx} +12 -6
  169. package/components/loader-inline/loader-inline.d.ts +1 -1
  170. package/components/loader-inline/{loader-inline.js → loader-inline.jsx} +5 -3
  171. package/components/loader-screen/loader-screen.d.ts +1 -1
  172. package/components/loader-screen/{loader-screen.js → loader-screen.jsx} +3 -2
  173. package/components/login-dialog/login-dialog.d.ts +1 -1
  174. package/components/login-dialog/{login-dialog.js → login-dialog.jsx} +9 -2
  175. package/components/login-dialog/{service.js → service.jsx} +3 -2
  176. package/components/markdown/markdown.d.ts +1 -1
  177. package/components/markdown/{markdown.js → markdown.jsx} +3 -2
  178. package/components/message/message.d.ts +1 -1
  179. package/components/message/{message.js → message.jsx} +21 -2
  180. package/components/pager/pager.d.ts +5 -5
  181. package/components/pager/{pager.js → pager.jsx} +56 -12
  182. package/components/panel/panel.d.ts +1 -1
  183. package/components/panel/{panel.js → panel.jsx} +3 -2
  184. package/components/popup/popup.d.ts +2 -2
  185. package/components/popup/{popup.js → popup.jsx} +26 -14
  186. package/components/popup/popup.target.jsx +10 -0
  187. package/components/popup-menu/popup-menu.d.ts +1 -1
  188. package/components/popup-menu/{popup-menu.js → popup-menu.jsx} +3 -2
  189. package/components/progress-bar/progress-bar.d.ts +1 -1
  190. package/components/progress-bar/{progress-bar.js → progress-bar.jsx} +3 -2
  191. package/components/query-assist/query-assist-suggestions.d.ts +1 -1
  192. package/components/query-assist/{query-assist-suggestions.js → query-assist-suggestions.jsx} +10 -5
  193. package/components/query-assist/query-assist.d.ts +2 -2
  194. package/components/query-assist/{query-assist.js → query-assist.jsx} +46 -8
  195. package/components/radio/radio-item.d.ts +1 -1
  196. package/components/radio/{radio-item.js → radio-item.jsx} +11 -3
  197. package/components/radio/radio.d.ts +1 -1
  198. package/components/radio/{radio.js → radio.jsx} +1 -2
  199. package/components/scrollable-section/scrollable-section.d.ts +1 -1
  200. package/components/scrollable-section/{scrollable-section.js → scrollable-section.jsx} +2 -3
  201. package/components/select/select-filter.d.ts +1 -1
  202. package/components/select/{select-filter.js → select-filter.jsx} +5 -2
  203. package/components/select/select-popup.d.ts +7 -7
  204. package/components/select/{select-popup.js → select-popup.jsx} +43 -13
  205. package/components/select/select.d.ts +3 -3
  206. package/components/select/{select.js → select.jsx} +92 -44
  207. package/components/shortcuts/{shortcuts-hoc.js → shortcuts-hoc.jsx} +3 -2
  208. package/components/slider/{slider.js → slider.jsx} +50 -32
  209. package/components/tab-trap/{tab-trap.js → tab-trap.jsx} +39 -33
  210. package/components/table/cell.d.ts +1 -1
  211. package/components/table/{cell.js → cell.jsx} +3 -2
  212. package/components/table/{disable-hover-hoc.js → disable-hover-hoc.jsx} +2 -3
  213. package/components/table/header-cell.d.ts +1 -1
  214. package/components/table/{header-cell.js → header-cell.jsx} +12 -2
  215. package/components/table/header.d.ts +2 -2
  216. package/components/table/{header.js → header.jsx} +19 -6
  217. package/components/table/multitable.d.ts +1 -1
  218. package/components/table/{multitable.js → multitable.jsx} +4 -3
  219. package/components/table/row-with-focus-sensor.d.ts +1 -1
  220. package/components/table/{row-with-focus-sensor.js → row-with-focus-sensor.jsx} +1 -2
  221. package/components/table/row.d.ts +1 -1
  222. package/components/table/{row.js → row.jsx} +24 -5
  223. package/components/table/{selection-shortcuts-hoc.js → selection-shortcuts-hoc.jsx} +1 -2
  224. package/components/table/simple-table.d.ts +1 -1
  225. package/components/table/{simple-table.js → simple-table.jsx} +2 -3
  226. package/components/table/smart-table.d.ts +1 -1
  227. package/components/table/{smart-table.js → smart-table.jsx} +1 -2
  228. package/components/table/table.d.ts +2 -2
  229. package/components/table/{table.js → table.jsx} +30 -9
  230. package/components/tabs/collapsible-more.d.ts +3 -3
  231. package/components/tabs/{collapsible-more.js → collapsible-more.jsx} +14 -7
  232. package/components/tabs/collapsible-tab.d.ts +1 -1
  233. package/components/tabs/{collapsible-tab.js → collapsible-tab.jsx} +3 -4
  234. package/components/tabs/collapsible-tabs.d.ts +2 -2
  235. package/components/tabs/{collapsible-tabs.js → collapsible-tabs.jsx} +11 -3
  236. package/components/tabs/dumb-tabs.d.ts +2 -2
  237. package/components/tabs/{dumb-tabs.js → dumb-tabs.jsx} +10 -4
  238. package/components/tabs/smart-tabs.d.ts +1 -1
  239. package/components/tabs/{smart-tabs.js → smart-tabs.jsx} +3 -2
  240. package/components/tabs/tab-link.d.ts +1 -1
  241. package/components/tabs/tab-link.jsx +16 -0
  242. package/components/tabs/tab.d.ts +1 -1
  243. package/components/tabs/{tab.js → tab.jsx} +3 -2
  244. package/components/tag/tag.d.ts +5 -5
  245. package/components/tag/{tag.js → tag.jsx} +24 -16
  246. package/components/tags-input/tags-input.d.ts +1 -1
  247. package/components/tags-input/{tags-input.js → tags-input.jsx} +13 -5
  248. package/components/tags-list/tags-list.d.ts +2 -2
  249. package/components/tags-list/{tags-list.js → tags-list.jsx} +8 -4
  250. package/components/text/text.d.ts +1 -1
  251. package/components/text/{text.js → text.jsx} +3 -2
  252. package/components/toggle/toggle.d.ts +1 -1
  253. package/components/toggle/toggle.jsx +37 -0
  254. package/components/tooltip/tooltip.d.ts +1 -1
  255. package/components/tooltip/{tooltip.js → tooltip.jsx} +12 -3
  256. package/components/upload/{upload.js → upload.jsx} +7 -4
  257. package/components/user-agreement/{service.js → service.jsx} +13 -4
  258. package/components/user-agreement/user-agreement.d.ts +1 -1
  259. package/components/user-agreement/user-agreement.jsx +61 -0
  260. package/components/user-card/card.d.ts +1 -1
  261. package/components/user-card/card.jsx +64 -0
  262. package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
  263. package/components/user-card/{smart-user-card-tooltip.js → smart-user-card-tooltip.jsx} +6 -3
  264. package/components/user-card/tooltip.d.ts +2 -2
  265. package/components/user-card/{tooltip.js → tooltip.jsx} +12 -9
  266. package/package.json +28 -33
  267. package/components/avatar-stack/avatar-stack.js +0 -18
  268. package/components/collapse/collapse-content.js +0 -76
  269. package/components/data-list/data-list.mock.js +0 -170
  270. package/components/dropdown/anchor.js +0 -7
  271. package/components/error-bubble/error-bubble.js +0 -17
  272. package/components/error-message/error-message.js +0 -17
  273. package/components/header/services-link.js +0 -15
  274. package/components/list/list-title.js +0 -13
  275. package/components/popup/popup.target.js +0 -7
  276. package/components/tabs/tab-link.js +0 -9
  277. package/components/toggle/toggle.js +0 -22
  278. package/components/user-agreement/user-agreement.js +0 -33
  279. package/components/user-card/card.js +0 -31
  280. /package/components/global/{controls-height.js → controls-height.jsx} +0 -0
  281. /package/components/link/{clickableLink.js → clickableLink.jsx} +0 -0
  282. /package/components/tabs/{custom-item.js → custom-item.jsx} +0 -0
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { Component, createContext, forwardRef } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import getUID from '../global/get-uid';
@@ -18,10 +17,19 @@ export class RadioItemInner extends Component {
18
17
  render() {
19
18
  const { className, children, help, ...restProps } = this.props;
20
19
  const classes = classNames(styles.radio, className);
21
- return (_jsxs("label", { ref: this.labelRef, className: classes, htmlFor: this.uid, children: [_jsx("input", { id: this.uid, ...restProps, ref: this.inputRef, className: styles.input, type: 'radio' }), _jsx("span", { className: styles.circle }), _jsxs("span", { className: styles.label, children: [children, help && _jsx(ControlHelp, { children: help })] })] }));
20
+ return (<label ref={this.labelRef} className={classes} htmlFor={this.uid}>
21
+ <input id={this.uid} {...restProps} ref={this.inputRef} className={styles.input} type='radio'/>
22
+ <span className={styles.circle}/>
23
+ <span className={styles.label}>
24
+ {children}
25
+ {help && <ControlHelp>{help}</ControlHelp>}
26
+ </span>
27
+ </label>);
22
28
  }
23
29
  }
24
30
  const RadioItem = forwardRef(function RadioItem(props, ref) {
25
- return (_jsx(RadioContext.Consumer, { children: ({ value, onChange, ...restContext }) => (_jsx(RadioItemInner, { ref: ref, ...restContext, checked: value !== undefined ? value === props.value : undefined, onChange: onChange ? () => onChange(props.value) : undefined, ...props })) }));
31
+ return (<RadioContext.Consumer>
32
+ {({ value, onChange, ...restContext }) => (<RadioItemInner ref={ref} {...restContext} checked={value !== undefined ? value === props.value : undefined} onChange={onChange ? () => onChange(props.value) : undefined} {...props}/>)}
33
+ </RadioContext.Consumer>);
26
34
  });
27
35
  export default RadioItem;
@@ -6,5 +6,5 @@ import { type RadioProps } from './radio-item';
6
6
  export default class Radio extends Component<RadioProps> {
7
7
  static Item: import("react").ForwardRefExoticComponent<import("./radio-item").RadioItemProps & import("react").RefAttributes<import("./radio-item").RadioItemInner>>;
8
8
  uid: string;
9
- render(): import("react/jsx-runtime").JSX.Element;
9
+ render(): import("react").JSX.Element;
10
10
  }
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Component } from 'react';
3
2
  import getUID from '../global/get-uid';
4
3
  import RadioItem, { RadioContext } from './radio-item';
@@ -9,6 +8,6 @@ export default class Radio extends Component {
9
8
  static Item = RadioItem;
10
9
  uid = getUID('ring-radio-');
11
10
  render() {
12
- return _jsx(RadioContext.Provider, { value: { name: this.uid, ...this.props }, children: this.props.children });
11
+ return <RadioContext.Provider value={{ name: this.uid, ...this.props }}>{this.props.children}</RadioContext.Provider>;
13
12
  }
14
13
  }
@@ -1,2 +1,2 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- export default function ScrollableSection({ className, ...restProps }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
2
+ export default function ScrollableSection({ className, ...restProps }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { useCallback, useEffect, useRef, useState } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import styles from './scrollable-section.css';
@@ -22,10 +21,10 @@ export default function ScrollableSection({ className, ...restProps }) {
22
21
  window.addEventListener('resize', calculateScrollPosition);
23
22
  return () => window.removeEventListener('resize', calculateScrollPosition);
24
23
  }, [calculateScrollPosition]);
25
- return (_jsx("div", { ...restProps, className: classNames(styles.scrollableSection, className, {
24
+ return (<div {...restProps} className={classNames(styles.scrollableSection, className, {
26
25
  [styles.withTopBorder]: !scrolledToTop,
27
26
  [styles.withRightBorder]: !scrolledToRight,
28
27
  [styles.withBottomBorder]: !scrolledToBottom,
29
28
  [styles.withLeftBorder]: !scrolledToLeft,
30
- }), ref: ref, onScroll: calculateScrollPosition }));
29
+ })} ref={ref} onScroll={calculateScrollPosition}/>);
31
30
  }
@@ -13,6 +13,6 @@ export default class SelectFilter extends Component<SelectFilterProps> {
13
13
  blur(): void;
14
14
  input?: HTMLInputElement | HTMLTextAreaElement | null;
15
15
  inputRef: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;
16
- render(): import("react/jsx-runtime").JSX.Element;
16
+ render(): import("react").JSX.Element;
17
17
  }
18
18
  export {};
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Component } from 'react';
3
2
  import classNames from 'classnames';
4
3
  import Input from '../input/input';
@@ -35,6 +34,10 @@ export default class SelectFilter extends Component {
35
34
  render() {
36
35
  const { className, listId, ...restProps } = this.props;
37
36
  const classes = classNames(styles.filter, className);
38
- return (_jsx(ActiveItemContext.ValueContext.Consumer, { children: activeItemId => (_jsx(I18nContext.Consumer, { children: ({ translate }) => (_jsx(Input, { ...restProps, placeholder: restProps.placeholder ?? translate('filterItems'), "aria-owns": listId, "aria-activedescendant": activeItemId, autoComplete: 'off', autoFocus: true, borderless: true, inputRef: this.inputRef, className: classes })) })) }));
37
+ return (<ActiveItemContext.ValueContext.Consumer>
38
+ {activeItemId => (<I18nContext.Consumer>
39
+ {({ translate }) => (<Input {...restProps} placeholder={restProps.placeholder ?? translate('filterItems')} aria-owns={listId} aria-activedescendant={activeItemId} autoComplete='off' autoFocus borderless inputRef={this.inputRef} className={classes}/>)}
40
+ </I18nContext.Consumer>)}
41
+ </ActiveItemContext.ValueContext.Consumer>);
39
42
  }
40
43
  }
@@ -110,17 +110,17 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
110
110
  onListSelect: (selected: ListDataItem<T>, event?: Event | SyntheticEvent, opts?: SelectHandlerParams) => void;
111
111
  tabPress: (event: Event) => void;
112
112
  onClickHandler: () => void | undefined;
113
- getFilter(): import("react/jsx-runtime").JSX.Element | null;
113
+ getFilter(): React.JSX.Element | null;
114
114
  handleRemoveTag: (arg: ListDataItem<T>) => (event: SyntheticEvent) => void;
115
115
  handleTagClick: (arg: ListDataItem<T>) => () => void;
116
116
  getCustomTag(tags: Tags | boolean | null): ((tag: TagAttrs) => ReactNode) | undefined;
117
- getTags(): false | import("react/jsx-runtime").JSX.Element;
118
- getFilterWithTags(): import("react/jsx-runtime").JSX.Element | null;
119
- getBottomLine(): "" | import("react/jsx-runtime").JSX.Element | null;
117
+ getTags(): false | React.JSX.Element;
118
+ getFilterWithTags(): React.JSX.Element | null;
119
+ getBottomLine(): "" | React.JSX.Element | null;
120
120
  handleListResize: () => void;
121
- getList(ringPopupTarget: string | Element | undefined): import("react/jsx-runtime").JSX.Element | null;
121
+ getList(ringPopupTarget: string | Element | undefined): React.JSX.Element | null;
122
122
  handleSelectAll: () => void;
123
- getSelectAll: () => false | import("react/jsx-runtime").JSX.Element;
123
+ getSelectAll: () => false | React.JSX.Element;
124
124
  private _adjustListMaxHeight;
125
125
  popupRef: (el: Popup | null) => void;
126
126
  list?: List<T> | null;
@@ -132,6 +132,6 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
132
132
  tab: (event: Event) => void;
133
133
  };
134
134
  popupFilterShortcutsMap: ShortcutsMap;
135
- render(): import("react/jsx-runtime").JSX.Element;
135
+ render(): React.JSX.Element;
136
136
  }
137
137
  export type SelectPopupAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof SelectPopup, SelectPopupProps<T>>;
@@ -1,9 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  /* eslint-disable max-lines */
3
2
  /**
4
3
  * @description Displays a popup with select's options.
5
4
  */
6
5
  import { PureComponent, } from 'react';
6
+ import * as React from 'react';
7
7
  import classNames from 'classnames';
8
8
  import searchIcon from '@jetbrains/icons/search';
9
9
  import memoizeOne from 'memoize-one';
@@ -183,7 +183,10 @@ export default class SelectPopup extends PureComponent {
183
183
  onClickHandler = () => this.filter?.focus();
184
184
  getFilter() {
185
185
  if (this.props.filter || this.props.tags) {
186
- return (_jsxs("div", { className: styles.filterWrapper, "data-test": 'ring-select-popup-filter', children: [!this.props.tags && (_jsx(Icon, { glyph: this.props.filterIcon ?? searchIcon, className: styles.filterIcon, "data-test-custom": 'ring-select-popup-filter-icon' })), _jsx(FilterWithShortcuts, { rgShortcutsOptions: this.state.popupFilterShortcutsOptions, rgShortcutsMap: this.popupFilterShortcutsMap, value: this.props.filterValue, inputRef: this.composedFilterRef(this.filterRef, this.props.filterRef), onBlur: this.popupFilterOnBlur, onFocus: this.onFilterFocus, className: 'ring-js-shortcuts', inputClassName: classNames({ [styles.filterWithTagsInput]: this.props.tags }), placeholder: typeof this.props.filter === 'object' ? this.props.filter.placeholder : undefined, height: this.props.tags ? ControlsHeight.S : ControlsHeight.L, onChange: this.props.onFilter, onClick: this.onClickHandler, onClear: this.props.tags ? undefined : this.props.onClear, "data-test-custom": 'ring-select-popup-filter-input', listId: this.props.listId, enableShortcuts: Object.keys(this.popupFilterShortcutsMap) })] }));
186
+ return (<div className={styles.filterWrapper} data-test='ring-select-popup-filter'>
187
+ {!this.props.tags && (<Icon glyph={this.props.filterIcon ?? searchIcon} className={styles.filterIcon} data-test-custom='ring-select-popup-filter-icon'/>)}
188
+ <FilterWithShortcuts rgShortcutsOptions={this.state.popupFilterShortcutsOptions} rgShortcutsMap={this.popupFilterShortcutsMap} value={this.props.filterValue} inputRef={this.composedFilterRef(this.filterRef, this.props.filterRef)} onBlur={this.popupFilterOnBlur} onFocus={this.onFilterFocus} className='ring-js-shortcuts' inputClassName={classNames({ [styles.filterWithTagsInput]: this.props.tags })} placeholder={typeof this.props.filter === 'object' ? this.props.filter.placeholder : undefined} height={this.props.tags ? ControlsHeight.S : ControlsHeight.L} onChange={this.props.onFilter} onClick={this.onClickHandler} onClear={this.props.tags ? undefined : this.props.onClear} data-test-custom='ring-select-popup-filter-input' listId={this.props.listId} enableShortcuts={Object.keys(this.popupFilterShortcutsMap)}/>
189
+ </div>);
187
190
  }
188
191
  return null;
189
192
  }
@@ -202,7 +205,9 @@ export default class SelectPopup extends PureComponent {
202
205
  return undefined;
203
206
  }
204
207
  getTags() {
205
- return (Array.isArray(this.props.selected) && (_jsx("div", { children: _jsx(TagsList, { tags: this.props.selected, activeIndex: this.state.tagsActiveIndex, handleRemove: this.handleRemoveTag, handleClick: this.handleTagClick, disabled: this.props.disabled, customTagComponent: this.getCustomTag(this.props.tags) }) })));
208
+ return (Array.isArray(this.props.selected) && (<div>
209
+ <TagsList tags={this.props.selected} activeIndex={this.state.tagsActiveIndex} handleRemove={this.handleRemoveTag} handleClick={this.handleTagClick} disabled={this.props.disabled} customTagComponent={this.getCustomTag(this.props.tags)}/>
210
+ </div>));
206
211
  }
207
212
  getFilterWithTags() {
208
213
  if (this.props.tags) {
@@ -212,16 +217,23 @@ export default class SelectPopup extends PureComponent {
212
217
  [styles.filterWithTagsFocused]: !this.state.popupFilterShortcutsOptions.disabled,
213
218
  },
214
219
  ]);
215
- return (_jsxs("div", { className: classes, children: [this.getTags(), this.getFilter()] }));
220
+ return (<div className={classes}>
221
+ {this.getTags()}
222
+ {this.getFilter()}
223
+ </div>);
216
224
  }
217
225
  return this.getFilter();
218
226
  }
219
227
  getBottomLine() {
220
228
  const { loading, message, data } = this.props;
221
229
  const hasMoreThanOneItem = data.length > 1;
222
- return ((loading || message) && (_jsxs("div", { className: classNames(styles.bottomLine, {
230
+ return ((loading || message) && (<div className={classNames(styles.bottomLine, {
223
231
  [styles.bottomLineOverItem]: hasMoreThanOneItem,
224
- }), children: [loading && _jsx(LoaderInline, {}), message && _jsx("div", { className: styles.message, children: message })] })));
232
+ })}>
233
+ {loading && <LoaderInline />}
234
+
235
+ {message && <div className={styles.message}>{message}</div>}
236
+ </div>));
225
237
  }
226
238
  handleListResize = () => {
227
239
  this.forceUpdate();
@@ -238,7 +250,7 @@ export default class SelectPopup extends PureComponent {
238
250
  if (this.props.toolbar) {
239
251
  maxHeight -= TOOLBAR_HEIGHT;
240
252
  }
241
- return (_jsx(List, { id: this.props.listId, maxHeight: maxHeight, data: this.props.data, activeIndex: this.props.activeIndex, ref: this.listRef, restoreActiveIndex: true, activateFirstItem: true, 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, preventListOverscroll: this.props.preventListOverscroll, renderOptimization: this.props.renderOptimization }));
253
+ 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} preventListOverscroll={this.props.preventListOverscroll} renderOptimization={this.props.renderOptimization}/>);
242
254
  }
243
255
  return null;
244
256
  }
@@ -250,9 +262,14 @@ export default class SelectPopup extends PureComponent {
250
262
  getSelectAll = () => {
251
263
  const multiple = this.props.multiple;
252
264
  const activeFilters = this.props.data.filter(item => !item.disabled);
253
- return (Array.isArray(this.props.selected) && (_jsxs("div", { className: styles.selectAll, children: [activeFilters.length === 0 ? (_jsx("span", {})) : (_jsx(Button, { inline: true, onClick: this.handleSelectAll, children: activeFilters.length !== this.props.selected.length
254
- ? multiple.selectAllLabel || 'Select all'
255
- : multiple.deselectAllLabel || 'Deselect all' })), multiple.renderSelectedItemsDescription?.(this.props.selected, activeFilters.length) || (_jsx(Text, { info: true, children: `${this.props.selected.length} selected` }))] })));
265
+ return (Array.isArray(this.props.selected) && (<div className={styles.selectAll}>
266
+ {activeFilters.length === 0 ? (<span />) : (<Button inline onClick={this.handleSelectAll}>
267
+ {activeFilters.length !== this.props.selected.length
268
+ ? multiple.selectAllLabel || 'Select all'
269
+ : multiple.deselectAllLabel || 'Deselect all'}
270
+ </Button>)}
271
+ {multiple.renderSelectedItemsDescription?.(this.props.selected, activeFilters.length) || (<Text info>{`${this.props.selected.length} selected`}</Text>)}
272
+ </div>));
256
273
  };
257
274
  // Cache the value because this method is called
258
275
  // inside `render` function which can be called N times
@@ -308,13 +325,26 @@ export default class SelectPopup extends PureComponent {
308
325
  render() {
309
326
  const { toolbar, topbar, className, multiple, hidden, isInputMode, anchorElement, minWidth, onCloseAttempt, onOutsideClick, directions, top, left, offset, style, dir, filter, } = this.props;
310
327
  const classes = classNames(styles.popup, className);
311
- return (_jsx(PopupTargetContext.Consumer, { children: ringPopupTarget => {
328
+ return (<PopupTargetContext.Consumer>
329
+ {ringPopupTarget => {
312
330
  const filterWithTags = this.getFilterWithTags();
313
331
  const selectAll = multiple && typeof multiple === 'object' && !multiple.limit && multiple.selectAll && this.getSelectAll();
314
332
  const list = this.getList(this.props.ringPopupTarget || ringPopupTarget);
315
333
  const bottomLine = this.getBottomLine();
316
334
  const hasContent = filterWithTags || selectAll || list || bottomLine || toolbar || topbar;
317
- return (_jsx(Popup, { trapFocus: false, ref: this.popupRef, hidden: hidden || !hasContent, attached: isInputMode, className: classes, dontCloseOnAnchorClick: true, anchorElement: anchorElement, minWidth: minWidth, onCloseAttempt: onCloseAttempt, onOutsideClick: onOutsideClick, directions: directions, top: top, left: left, offset: offset, onMouseDown: this.mouseDownHandler, target: this.props.ringPopupTarget, autoCorrectTopOverflow: false, style: style, largeBorderRadius: true, children: _jsxs("div", { dir: dir, children: [!hidden && filter && _jsx(Shortcuts, { map: this.shortcutsMap, scope: this.shortcutsScope }), topbar, hidden ? _jsx("div", {}) : filterWithTags, selectAll, list, bottomLine, toolbar] }) }));
318
- } }));
335
+ return (<Popup trapFocus={false} ref={this.popupRef} hidden={hidden || !hasContent} attached={isInputMode} className={classes} dontCloseOnAnchorClick anchorElement={anchorElement} minWidth={minWidth} onCloseAttempt={onCloseAttempt} onOutsideClick={onOutsideClick} directions={directions} top={top} left={left} offset={offset} onMouseDown={this.mouseDownHandler} target={this.props.ringPopupTarget} autoCorrectTopOverflow={false} style={style} largeBorderRadius>
336
+ <div dir={dir}>
337
+ {!hidden && filter && <Shortcuts map={this.shortcutsMap} scope={this.shortcutsScope}/>}
338
+ {topbar}
339
+ {/* Add empty div to prevent the change of List position in DOM*/}
340
+ {hidden ? <div /> : filterWithTags}
341
+ {selectAll}
342
+ {list}
343
+ {bottomLine}
344
+ {toolbar}
345
+ </div>
346
+ </Popup>);
347
+ }}
348
+ </PopupTargetContext.Consumer>);
319
349
  }
320
350
  }
@@ -235,7 +235,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
235
235
  _showPopup: () => void;
236
236
  _hidePopup: (tryFocusAnchor?: boolean) => void;
237
237
  addHandler: () => void;
238
- getToolbar(): import("react/jsx-runtime").JSX.Element | null;
238
+ getToolbar(): React.JSX.Element | null;
239
239
  getTopbar(): ReactNode;
240
240
  getLowerCaseLabel: typeof getLowerCaseLabel;
241
241
  doesLabelMatch: typeof doesLabelMatch;
@@ -276,8 +276,8 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
276
276
  'shift+down': typeof noop;
277
277
  space: typeof noop;
278
278
  };
279
- renderSelect(activeItemId: string | undefined): import("react/jsx-runtime").JSX.Element;
280
- render(): import("react/jsx-runtime").JSX.Element;
279
+ renderSelect(activeItemId: string | undefined): React.JSX.Element;
280
+ render(): React.JSX.Element;
281
281
  }
282
282
  export type SingleSelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, SingleSelectProps<T>>;
283
283
  export type MultipleSelectAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof Select, MultipleSelectProps<T>>;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
1
  /* eslint-disable max-lines */
3
2
  import { Component, Fragment, } from 'react';
3
+ import * as React from 'react';
4
4
  import classNames from 'classnames';
5
5
  import chevronDownIcon from '@jetbrains/icons/chevron-down';
6
6
  import closeIcon from '@jetbrains/icons/close-12px';
@@ -22,8 +22,8 @@ import { I18nContext } from '../i18n/i18n-context';
22
22
  import { createComposedRef } from '../global/compose-refs';
23
23
  import { isArray } from '../global/typescript-utils';
24
24
  import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
25
- import inputStyles from '../input/input.css';
26
25
  import SelectPopup from './select-popup';
26
+ import inputStyles from '../input/input.css';
27
27
  import styles from './select.css';
28
28
  /**
29
29
  * @name Select
@@ -408,7 +408,9 @@ export default class Select extends Component {
408
408
  separator: reset.separator,
409
409
  key: reset.label,
410
410
  rgItemType: List.ListProps.Type.CUSTOM,
411
- template: (_jsx(Button, { inline: true, className: styles.button, "data-test": 'ring-select-reset-tags-button', height: ControlsHeight.S, children: reset.label })),
411
+ template: (<Button inline className={styles.button} data-test='ring-select-reset-tags-button' height={ControlsHeight.S}>
412
+ {reset.label}
413
+ </Button>),
412
414
  glyph: reset.glyph,
413
415
  onClick: resetHandler,
414
416
  };
@@ -432,7 +434,8 @@ export default class Select extends Component {
432
434
  // eslint-disable-next-line no-underscore-dangle
433
435
  const _shownData = this._prependResetOption(shownData);
434
436
  const activeIndex = this._getActiveIndex(_shownData);
435
- return (_jsx(I18nContext.Consumer, { children: ({ translate }) => {
437
+ return (<I18nContext.Consumer>
438
+ {({ translate }) => {
436
439
  let message;
437
440
  if (this.props.loading) {
438
441
  message = this.props.loadingMessage ?? translate('loading');
@@ -440,8 +443,10 @@ export default class Select extends Component {
440
443
  else if (!shownData.length) {
441
444
  message = this.props.notFoundMessage ?? translate('noOptionsFound');
442
445
  }
443
- return (_jsx(SelectPopup, { data: _shownData, message: message, toolbar: showPopup && this.getToolbar(), topbar: this.getTopbar(), loading: this.props.loading, activeIndex: activeIndex, 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, offset: this.props.offset, filter: this.isInputMode() ? false : this.props.filter, 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 }));
444
- } }));
446
+ return (<SelectPopup data={_shownData} message={message} toolbar={showPopup && this.getToolbar()} topbar={this.getTopbar()} loading={this.props.loading} activeIndex={activeIndex} 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} offset={this.props.offset} filter={this.isInputMode() ? false : this.props.filter} // disable popup filter in INPUT mode
447
+ 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}/>);
448
+ }}
449
+ </I18nContext.Consumer>);
445
450
  }
446
451
  _showPopup = () => {
447
452
  if (!this.node) {
@@ -477,9 +482,15 @@ export default class Select extends Component {
477
482
  if (!isToolbarHasElements) {
478
483
  return null;
479
484
  }
480
- return (_jsxs("div", { className: classNames({
485
+ return (<div className={classNames({
481
486
  [styles.toolbar]: Boolean(this.state.addButton || renderBottomToolbar),
482
- }), "data-test": 'ring-select-toolbar', children: [renderBottomToolbar && renderBottomToolbar(), this.state.addButton && (_jsx(Button, { inline: true, delayed: delayed, className: classNames(styles.button, styles.buttonSpaced), onClick: this.addHandler, "data-test": 'ring-select-toolbar-button', children: prefix ? `${prefix} ${label}` : label })), hint && _jsx(List.ListHint, { label: hint, "data-test": 'ring-select-toolbar-hint' })] }));
487
+ })} data-test='ring-select-toolbar'>
488
+ {renderBottomToolbar && renderBottomToolbar()}
489
+ {this.state.addButton && (<Button inline delayed={delayed} className={classNames(styles.button, styles.buttonSpaced)} onClick={this.addHandler} data-test='ring-select-toolbar-button'>
490
+ {prefix ? `${prefix} ${label}` : label}
491
+ </Button>)}
492
+ {hint && <List.ListHint label={hint} data-test='ring-select-toolbar-hint'/>}
493
+ </div>);
483
494
  }
484
495
  getTopbar() {
485
496
  return this.props.renderTopToolbar?.();
@@ -743,19 +754,19 @@ export default class Select extends Component {
743
754
  const icons = [];
744
755
  const height = this.getHeight();
745
756
  if (!Array.isArray(selected) && selected?.icon) {
746
- icons.push(_jsx("button", { title: 'Toggle options popup', type: 'button', className: styles.selectedIcon, disabled: this.props.disabled, onClick: this._clickHandler, style: { backgroundImage: `url(${selected.icon})` } }, 'selected'));
757
+ icons.push(<button title='Toggle options popup' type='button' className={styles.selectedIcon} key='selected' disabled={this.props.disabled} onClick={this._clickHandler} style={{ backgroundImage: `url(${selected.icon})` }}/>);
747
758
  }
748
759
  if (clear && !disabled && !this._selectionIsEmpty()) {
749
- icons.push(_jsx(Button, { title: 'Clear selection', "data-test": 'ring-clear-select', className: styles.clearIcon, disabled: this.props.disabled, onClick: this.clear, height: height, icon: closeIcon }, 'close'));
760
+ icons.push(<Button title='Clear selection' data-test='ring-clear-select' className={styles.clearIcon} key='close' disabled={this.props.disabled} onClick={this.clear} height={height} icon={closeIcon}/>);
750
761
  }
751
762
  if (!hideArrow) {
752
- icons.push(_jsx(Button, { title: 'Toggle options popup', className: styles.chevron, iconClassName: styles.chevronIcon, icon: chevronDownIcon, disabled: this.props.disabled, height: height, onClick: this._clickHandler }, 'hide'));
763
+ icons.push(<Button title='Toggle options popup' className={styles.chevron} iconClassName={styles.chevronIcon} icon={chevronDownIcon} key='hide' disabled={this.props.disabled} height={height} onClick={this._clickHandler}/>);
753
764
  }
754
765
  return icons;
755
766
  }
756
767
  _getAvatar() {
757
768
  return (!Array.isArray(this.state.selected) &&
758
- (this.state.selected?.avatar || this.state.selected?.showGeneratedAvatar) && (_jsx(Avatar, { className: styles.avatar, url: this.state.selected.avatar, username: this.state.selected.username, size: AvatarSize.Size20 })));
769
+ (this.state.selected?.avatar || this.state.selected?.showGeneratedAvatar) && (<Avatar className={styles.avatar} url={this.state.selected.avatar} username={this.state.selected.username} size={AvatarSize.Size20}/>));
759
770
  }
760
771
  filter;
761
772
  filterRef = (el) => {
@@ -789,7 +800,7 @@ export default class Select extends Component {
789
800
  if (this.props.type === Type.INPUT || this.props.type === Type.BUTTON) {
790
801
  const icons = this._getIcons();
791
802
  style = getStyle(icons.length);
792
- iconsNode = _jsx("div", { className: styles.icons, children: icons });
803
+ iconsNode = <div className={styles.icons}>{icons}</div>;
793
804
  }
794
805
  const ariaProps = {
795
806
  role: 'combobox',
@@ -801,45 +812,82 @@ export default class Select extends Component {
801
812
  switch (this.props.type) {
802
813
  case Type.INPUT_WITHOUT_CONTROLS:
803
814
  case Type.INPUT:
804
- return (_jsxs(_Fragment, { children: [_jsxs("div", { ref: this.nodeRef, className: classNames(classes, styles.inputMode), "data-test": dataTests('ring-select', dataTest), role: 'presentation' // has interactive elements inside
805
- , onMouseDown: this.mouseDownHandler, onMouseUp: this.mouseUpHandler, children: [shortcutsEnabled && _jsx(Shortcuts, { map: this.getShortcutsMap(), scope: this.shortcutsScope }), _jsx(Input, { ...ariaProps, height: this.props.height, autoComplete: 'off', id: this.props.id, onClick: this._clickHandler, inputRef: this.composedFilterRef(this.filterRef, this.props.filterRef), disabled: this.props.disabled, value: this.state.filterValue, borderless: this.props.type === Type.INPUT_WITHOUT_CONTROLS, style: style, size: Size.FULL, onChange: this._filterChangeHandler, onFocus: this._focusHandler, onBlur: this._blurHandler,
806
- // Input with error style without description
807
- error: this.props.error ? '' : null, label: this.props.type === Type.INPUT ? this._getLabel() : null, placeholder: this.props.inputPlaceholder, onKeyDown: this.props.onKeyDown, "data-test": 'ring-select__focus', enableShortcuts: shortcutsEnabled
808
- ? Object.keys({
809
- ...this.getShortcutsMap(),
810
- ...this._popup?.list?.shortcutsMap,
811
- })
812
- : undefined, icon: this.props.filterIcon, afterInput: iconsNode }), this._renderPopup()] }), this.props.error && (_jsx("div", { className: classNames(inputStyles.errorText, inputStyles[`size${this.props.size}`]), children: this.props.error }))] }));
815
+ return (<>
816
+ <div ref={this.nodeRef} className={classNames(classes, styles.inputMode)} data-test={dataTests('ring-select', dataTest)} role='presentation' // has interactive elements inside
817
+ onMouseDown={this.mouseDownHandler} onMouseUp={this.mouseUpHandler}>
818
+ {shortcutsEnabled && <Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>}
819
+ <Input {...ariaProps} height={this.props.height} autoComplete='off' id={this.props.id} onClick={this._clickHandler} inputRef={this.composedFilterRef(this.filterRef, this.props.filterRef)} disabled={this.props.disabled} value={this.state.filterValue} borderless={this.props.type === Type.INPUT_WITHOUT_CONTROLS} style={style} size={Size.FULL} onChange={this._filterChangeHandler} onFocus={this._focusHandler} onBlur={this._blurHandler}
820
+ // Input with error style without description
821
+ error={this.props.error ? '' : null} label={this.props.type === Type.INPUT ? this._getLabel() : null} placeholder={this.props.inputPlaceholder} onKeyDown={this.props.onKeyDown} data-test='ring-select__focus' enableShortcuts={shortcutsEnabled
822
+ ? Object.keys({
823
+ ...this.getShortcutsMap(),
824
+ ...this._popup?.list?.shortcutsMap,
825
+ })
826
+ : undefined} icon={this.props.filterIcon} afterInput={iconsNode}/>
827
+ {this._renderPopup()}
828
+ </div>
829
+ {this.props.error && (<div className={classNames(inputStyles.errorText, inputStyles[`size${this.props.size}`])}>
830
+ {this.props.error}
831
+ </div>)}
832
+ </>);
813
833
  case Type.BUTTON:
814
- return (_jsxs("div", { ref: this.nodeRef, className: classNames(classes, styles.buttonMode), "data-test": dataTests('ring-select', dataTest), children: [selectedLabel && (_jsx(ControlLabel, { type: this.props.labelType, disabled: this.props.disabled, htmlFor: this.props.id, children: selectedLabel })), shortcutsEnabled && _jsx(Shortcuts, { map: this.getShortcutsMap(), scope: this.shortcutsScope }), _jsxs("div", { className: styles.buttonContainer, children: [_jsxs(Button, { ...ariaProps, height: this.props.height, id: this.props.id, onClick: this._clickHandler, className: classNames(this.props.buttonClassName, styles.buttonValue, {
815
- [styles.buttonValueOpen]: this.state.showPopup,
816
- [styles.buttonValueEmpty]: this._selectionIsEmpty(),
817
- }), disabled: this.props.disabled, style: style, "data-test": 'ring-select__button ring-select__focus', children: [this._getAvatar(), this._getPlaceholder()] }), iconsNode] }), this._renderPopup()] }));
834
+ return (<div ref={this.nodeRef} className={classNames(classes, styles.buttonMode)} data-test={dataTests('ring-select', dataTest)}>
835
+ {selectedLabel && (<ControlLabel type={this.props.labelType} disabled={this.props.disabled} htmlFor={this.props.id}>
836
+ {selectedLabel}
837
+ </ControlLabel>)}
838
+ {shortcutsEnabled && <Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>}
839
+ <div className={styles.buttonContainer}>
840
+ <Button {...ariaProps} height={this.props.height} id={this.props.id} onClick={this._clickHandler} className={classNames(this.props.buttonClassName, styles.buttonValue, {
841
+ [styles.buttonValueOpen]: this.state.showPopup,
842
+ [styles.buttonValueEmpty]: this._selectionIsEmpty(),
843
+ })} disabled={this.props.disabled} style={style} data-test='ring-select__button ring-select__focus'>
844
+ {this._getAvatar()}
845
+ {this._getPlaceholder()}
846
+ </Button>
847
+ {iconsNode}
848
+ </div>
849
+ {this._renderPopup()}
850
+ </div>);
818
851
  case Type.INLINE:
819
- return (_jsxs("div", { className: classes, ref: this.nodeRef, "data-test": dataTests('ring-select', dataTest), children: [shortcutsEnabled && _jsx(Shortcuts, { map: this.getShortcutsMap(), scope: this.shortcutsScope }), _jsx(Anchor, { ...ariaProps, className: this.props.buttonClassName ?? undefined, id: this.props.id, onClick: this._clickHandler, "data-test": 'ring-select__focus', disabled: this.props.disabled, active: this.state.showPopup, children: this._getPlaceholder() }), this._renderPopup()] }));
852
+ return (<div className={classes} ref={this.nodeRef} data-test={dataTests('ring-select', dataTest)}>
853
+ {shortcutsEnabled && <Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>}
854
+ <Anchor {...ariaProps} className={this.props.buttonClassName ?? undefined} id={this.props.id} onClick={this._clickHandler} data-test='ring-select__focus' disabled={this.props.disabled} active={this.state.showPopup}>
855
+ {this._getPlaceholder()}
856
+ </Anchor>
857
+ {this._renderPopup()}
858
+ </div>);
820
859
  default:
821
860
  if (this.props.customAnchor) {
822
- return (_jsxs(Fragment, { children: [shortcutsEnabled && _jsx(Shortcuts, { map: this.getShortcutsMap(), scope: this.shortcutsScope }), this.props.customAnchor({
823
- wrapperProps: {
824
- ref: this.nodeRef,
825
- 'data-test': dataTests('ring-select', dataTest),
826
- },
827
- buttonProps: {
828
- ...ariaProps,
829
- id: this.props.id,
830
- onClick: this._clickHandler,
831
- disabled: this.props.disabled,
832
- children: this._getPlaceholder(),
833
- 'data-test': 'ring-select__focus',
834
- },
835
- popup: this._renderPopup(),
836
- })] }));
861
+ return (<Fragment>
862
+ {shortcutsEnabled && <Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>}
863
+ {this.props.customAnchor({
864
+ wrapperProps: {
865
+ ref: this.nodeRef,
866
+ 'data-test': dataTests('ring-select', dataTest),
867
+ },
868
+ buttonProps: {
869
+ ...ariaProps,
870
+ id: this.props.id,
871
+ onClick: this._clickHandler,
872
+ disabled: this.props.disabled,
873
+ children: this._getPlaceholder(),
874
+ 'data-test': 'ring-select__focus',
875
+ },
876
+ popup: this._renderPopup(),
877
+ })}
878
+ </Fragment>);
837
879
  }
838
- return (_jsx("span", { id: this.props.id, ref: this.nodeRef, "data-test": 'ring-select', children: this._renderPopup() }));
880
+ return (<span id={this.props.id} ref={this.nodeRef} data-test='ring-select'>
881
+ {this._renderPopup()}
882
+ </span>);
839
883
  }
840
884
  }
841
885
  render() {
842
- return (_jsx(ActiveItemContext.Provider, { children: _jsx(ActiveItemContext.ValueContext.Consumer, { children: activeItemId => this.renderSelect(activeItemId) }) }));
886
+ return (<ActiveItemContext.Provider>
887
+ <ActiveItemContext.ValueContext.Consumer>
888
+ {activeItemId => this.renderSelect(activeItemId)}
889
+ </ActiveItemContext.ValueContext.Consumer>
890
+ </ActiveItemContext.Provider>);
843
891
  }
844
892
  }
845
893
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Component } from 'react';
3
2
  import getUID from '../global/get-uid';
4
3
  import Shortcuts from './shortcuts';
@@ -7,7 +6,9 @@ export default function shortcutsHOC(ComposedComponent) {
7
6
  _shortcutsScopeUid = getUID('rg-shortcuts-');
8
7
  render() {
9
8
  const { rgShortcutsOptions, rgShortcutsMap, ...props } = this.props;
10
- return (_jsx(Shortcuts, { scope: this._shortcutsScopeUid, map: rgShortcutsMap, options: rgShortcutsOptions, disabled: rgShortcutsOptions.disabled, children: _jsx(ComposedComponent, { ...props }) }));
9
+ return (<Shortcuts scope={this._shortcutsScopeUid} map={rgShortcutsMap} options={rgShortcutsOptions} disabled={rgShortcutsOptions.disabled}>
10
+ <ComposedComponent {...props}/>
11
+ </Shortcuts>);
11
12
  }
12
13
  };
13
14
  }