@jetbrains/ring-ui 5.0.59 → 5.0.60

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 (135) hide show
  1. package/components/alert/container.d.ts +1 -1
  2. package/components/analytics/analytics.d.ts +1 -1
  3. package/components/auth/auth__core.d.ts +1 -1
  4. package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
  5. package/components/avatar/avatar.d.ts +1 -1
  6. package/components/button/button.d.ts +3 -3
  7. package/components/button-group/button-group.css +14 -0
  8. package/components/confirm/confirm.d.ts +1 -1
  9. package/components/confirm-service/confirm-service.d.ts +1 -1
  10. package/components/contenteditable/contenteditable.d.ts +2 -2
  11. package/components/data-list/data-list.d.ts +2 -2
  12. package/components/date-picker/consts.d.ts +1 -1
  13. package/components/date-picker/date-picker.d.ts +2 -2
  14. package/components/date-picker/date-popup.d.ts +1 -1
  15. package/components/dialog/dialog.d.ts +1 -1
  16. package/components/dropdown/dropdown.d.ts +1 -1
  17. package/components/editable-heading/editable-heading.css +1 -0
  18. package/components/editable-heading/editable-heading.d.ts +1 -1
  19. package/components/error-bubble/error-bubble.d.ts +1 -1
  20. package/components/footer/footer.d.ts +2 -2
  21. package/components/global/create-stateful-context.d.ts +1 -1
  22. package/components/global/data-tests.d.ts +1 -1
  23. package/components/global/focus-sensor-hoc.d.ts +2 -2
  24. package/components/global/fuzzy-highlight.d.ts +1 -1
  25. package/components/global/listeners.d.ts +1 -1
  26. package/components/grid/row.d.ts +1 -1
  27. package/components/header/header.d.ts +1 -1
  28. package/components/header/profile.d.ts +1 -1
  29. package/components/http/http.d.ts +1 -1
  30. package/components/hub-source/hub-source.d.ts +1 -1
  31. package/components/icon/icon.d.ts +2 -2
  32. package/components/input/input.d.ts +8 -8
  33. package/components/island/adaptive-island-hoc.d.ts +1 -1
  34. package/components/link/link.d.ts +2 -2
  35. package/components/list/consts.d.ts +2 -2
  36. package/components/list/list.d.ts +1 -1
  37. package/components/loader-inline/loader-inline.d.ts +1 -1
  38. package/components/login-dialog/login-dialog.d.ts +1 -1
  39. package/components/markdown/markdown.d.ts +1 -1
  40. package/components/message/message.d.ts +1 -1
  41. package/components/pager/pager.d.ts +1 -1
  42. package/components/popup/popup.d.ts +2 -2
  43. package/components/popup-menu/popup-menu.d.ts +1 -1
  44. package/components/progress-bar/progress-bar.d.ts +1 -1
  45. package/components/query-assist/query-assist.d.ts +1 -1
  46. package/components/select/select-popup.css +18 -3
  47. package/components/select/select.d.ts +7 -7
  48. package/components/select/select.js +1 -2
  49. package/components/select/select__filter.d.ts +1 -1
  50. package/components/select/select__filter.js +1 -2
  51. package/components/select/select__popup.d.ts +2 -2
  52. package/components/select/select__popup.js +4 -3
  53. package/components/shortcuts/core.d.ts +2 -2
  54. package/components/table/disable-hover-hoc.d.ts +1 -1
  55. package/components/table/header.d.ts +1 -1
  56. package/components/table/row.d.ts +1 -1
  57. package/components/table/selection-shortcuts-hoc.d.ts +1 -1
  58. package/components/table/table.d.ts +1 -1
  59. package/components/tabs/dumb-tabs.d.ts +2 -2
  60. package/components/tag/tag.d.ts +1 -1
  61. package/components/tags-input/tags-input.css +6 -0
  62. package/components/tags-input/tags-input.d.ts +1 -1
  63. package/components/tags-list/tags-list.d.ts +1 -1
  64. package/components/toggle/toggle.d.ts +1 -1
  65. package/components/tooltip/tooltip.d.ts +1 -1
  66. package/components/user-agreement/user-agreement.d.ts +1 -1
  67. package/components/user-card/card.d.ts +1 -1
  68. package/components/user-card/tooltip.d.ts +1 -1
  69. package/dist/_helpers/select__filter.js +1 -3
  70. package/dist/alert/container.d.ts +1 -1
  71. package/dist/analytics/analytics.d.ts +1 -1
  72. package/dist/auth/auth__core.d.ts +1 -1
  73. package/dist/auth-dialog-service/auth-dialog-service.d.ts +1 -1
  74. package/dist/avatar/avatar.d.ts +1 -1
  75. package/dist/button/button.d.ts +3 -3
  76. package/dist/confirm/confirm.d.ts +1 -1
  77. package/dist/confirm-service/confirm-service.d.ts +1 -1
  78. package/dist/contenteditable/contenteditable.d.ts +2 -2
  79. package/dist/data-list/data-list.d.ts +2 -2
  80. package/dist/date-picker/consts.d.ts +1 -1
  81. package/dist/date-picker/date-picker.d.ts +2 -2
  82. package/dist/date-picker/date-popup.d.ts +1 -1
  83. package/dist/dialog/dialog.d.ts +1 -1
  84. package/dist/dropdown/dropdown.d.ts +1 -1
  85. package/dist/editable-heading/editable-heading.d.ts +1 -1
  86. package/dist/error-bubble/error-bubble.d.ts +1 -1
  87. package/dist/footer/footer.d.ts +2 -2
  88. package/dist/global/create-stateful-context.d.ts +1 -1
  89. package/dist/global/data-tests.d.ts +1 -1
  90. package/dist/global/focus-sensor-hoc.d.ts +2 -2
  91. package/dist/global/fuzzy-highlight.d.ts +1 -1
  92. package/dist/global/listeners.d.ts +1 -1
  93. package/dist/grid/row.d.ts +1 -1
  94. package/dist/header/header.d.ts +1 -1
  95. package/dist/header/profile.d.ts +1 -1
  96. package/dist/http/http.d.ts +1 -1
  97. package/dist/hub-source/hub-source.d.ts +1 -1
  98. package/dist/icon/icon.d.ts +2 -2
  99. package/dist/input/input.d.ts +8 -8
  100. package/dist/island/adaptive-island-hoc.d.ts +1 -1
  101. package/dist/link/link.d.ts +2 -2
  102. package/dist/list/consts.d.ts +2 -2
  103. package/dist/list/list.d.ts +1 -1
  104. package/dist/loader-inline/loader-inline.d.ts +1 -1
  105. package/dist/login-dialog/login-dialog.d.ts +1 -1
  106. package/dist/markdown/markdown.d.ts +1 -1
  107. package/dist/message/message.d.ts +1 -1
  108. package/dist/pager/pager.d.ts +1 -1
  109. package/dist/popup/popup.d.ts +2 -2
  110. package/dist/popup-menu/popup-menu.d.ts +1 -1
  111. package/dist/progress-bar/progress-bar.d.ts +1 -1
  112. package/dist/query-assist/query-assist.d.ts +1 -1
  113. package/dist/select/select.d.ts +7 -7
  114. package/dist/select/select.js +1 -4
  115. package/dist/select/select__filter.d.ts +1 -1
  116. package/dist/select/select__filter.js +1 -1
  117. package/dist/select/select__popup.d.ts +2 -2
  118. package/dist/select/select__popup.js +7 -3
  119. package/dist/shortcuts/core.d.ts +2 -2
  120. package/dist/style.css +1 -1
  121. package/dist/table/disable-hover-hoc.d.ts +1 -1
  122. package/dist/table/header.d.ts +1 -1
  123. package/dist/table/row.d.ts +1 -1
  124. package/dist/table/selection-shortcuts-hoc.d.ts +1 -1
  125. package/dist/table/table.d.ts +1 -1
  126. package/dist/tabs/dumb-tabs.d.ts +2 -2
  127. package/dist/tag/tag.d.ts +1 -1
  128. package/dist/tags-input/tags-input.d.ts +1 -1
  129. package/dist/tags-list/tags-list.d.ts +1 -1
  130. package/dist/toggle/toggle.d.ts +1 -1
  131. package/dist/tooltip/tooltip.d.ts +1 -1
  132. package/dist/user-agreement/user-agreement.d.ts +1 -1
  133. package/dist/user-card/card.d.ts +1 -1
  134. package/dist/user-card/tooltip.d.ts +1 -1
  135. package/package.json +25 -25
@@ -44,4 +44,4 @@ export default class LoginDialog extends Component<LoginDialogProps> {
44
44
  onMessage: (event: MessageEvent) => void;
45
45
  render(): JSX.Element;
46
46
  }
47
- export declare type LoginDialogAttrs = JSX.LibraryManagedAttributes<typeof LoginDialog, LoginDialogProps>;
47
+ export type LoginDialogAttrs = JSX.LibraryManagedAttributes<typeof LoginDialog, LoginDialogProps>;
@@ -4,7 +4,7 @@ export interface BaseMarkdownProps {
4
4
  inline?: boolean | null | undefined;
5
5
  plugins?: Options['remarkPlugins'];
6
6
  }
7
- export declare type MarkdownProps = Options & BaseMarkdownProps;
7
+ export type MarkdownProps = Options & BaseMarkdownProps;
8
8
  /**
9
9
  * @name Markdown
10
10
  */
@@ -55,5 +55,5 @@ export default class Message extends Component<MessageProps> {
55
55
  getTailOffset(): number;
56
56
  render(): JSX.Element;
57
57
  }
58
- export declare type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
58
+ export type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
59
59
  export {};
@@ -79,5 +79,5 @@ export default class Pager extends PureComponent<PagerProps> {
79
79
  getPagerContent(): JSX.Element;
80
80
  render(): JSX.Element;
81
81
  }
82
- export declare type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
82
+ export type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
83
83
  export {};
@@ -143,5 +143,5 @@ export default class Popup<P extends BasePopupProps = PopupProps> extends PureCo
143
143
  };
144
144
  render(): JSX.Element;
145
145
  }
146
- export declare type PopupAttrs = JSX.LibraryManagedAttributes<typeof Popup, PopupProps>;
147
- export declare type BasePopupAttrs = JSX.LibraryManagedAttributes<typeof Popup, BasePopupProps>;
146
+ export type PopupAttrs = JSX.LibraryManagedAttributes<typeof Popup, PopupProps>;
147
+ export type BasePopupAttrs = JSX.LibraryManagedAttributes<typeof Popup, BasePopupProps>;
@@ -53,7 +53,7 @@ export default class PopupMenu<T = unknown> extends Popup<PopupMenuProps<T>> {
53
53
  /** @override */
54
54
  getInternalContent(): JSX.Element;
55
55
  }
56
- export declare type PopupMenuAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof PopupMenu, PopupMenuProps<T>>;
56
+ export type PopupMenuAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof PopupMenu, PopupMenuProps<T>>;
57
57
  export declare const ListProps: {
58
58
  Type: typeof import("../list/consts").Type;
59
59
  Dimension: typeof import("../list/consts").Dimension;
@@ -55,4 +55,4 @@ export default class ProgressBar extends PureComponent<ProgressBarProps> {
55
55
  progressbarRef: (el: HTMLElement | null) => void;
56
56
  render(): JSX.Element;
57
57
  }
58
- export declare type ProgressBarAttrs = JSX.LibraryManagedAttributes<typeof ProgressBar, ProgressBarProps>;
58
+ export type ProgressBarAttrs = JSX.LibraryManagedAttributes<typeof ProgressBar, ProgressBarProps>;
@@ -298,7 +298,7 @@ export default class QueryAssist extends Component<QueryAssistProps> {
298
298
  renderActions(): React.ReactNode[];
299
299
  render(): JSX.Element;
300
300
  }
301
- export declare type QueryAssistAttrs = JSX.LibraryManagedAttributes<typeof QueryAssist, QueryAssistProps>;
301
+ export type QueryAssistAttrs = JSX.LibraryManagedAttributes<typeof QueryAssist, QueryAssistProps>;
302
302
  export declare const RerenderableQueryAssist: {
303
303
  new (props: QueryAssistProps): {
304
304
  _propsCache: QueryAssistProps & React.RefAttributes<unknown>;
@@ -19,12 +19,12 @@ declare enum Type {
19
19
  INLINE = "INLINE",
20
20
  INPUT_WITHOUT_CONTROLS = "INPUT_WITHOUT_CONTROLS"
21
21
  }
22
- declare type SelectItemData<T> = T & {
22
+ type SelectItemData<T> = T & {
23
23
  key: string | number;
24
24
  isResetItem?: boolean | null | undefined;
25
25
  separator?: boolean | null | undefined;
26
26
  };
27
- export declare type SelectItem<T = unknown> = ListDataItem<SelectItemData<T>>;
27
+ export type SelectItem<T = unknown> = ListDataItem<SelectItemData<T>>;
28
28
  declare function getLowerCaseLabel<T>(item: SelectItem<T>): string | null;
29
29
  declare function doesLabelMatch<T>(itemToCheck: SelectItem<T>, fn: (label: string) => boolean): boolean;
30
30
  export interface Add {
@@ -47,7 +47,7 @@ export interface CustomAnchorProps {
47
47
  } & DataTestProps;
48
48
  popup: ReactNode;
49
49
  }
50
- export declare type CustomAnchor = ((props: CustomAnchorProps) => ReactNode);
50
+ export type CustomAnchor = ((props: CustomAnchorProps) => ReactNode);
51
51
  export interface BaseSelectProps<T = unknown> {
52
52
  data: readonly SelectItem<T>[];
53
53
  filter: boolean | Filter<T>;
@@ -116,7 +116,7 @@ export interface MultipleSelectProps<T = unknown> extends BaseSelectProps<T> {
116
116
  onChange: (selected: SelectItem<T>[], event?: Event | SyntheticEvent) => void;
117
117
  tags?: Tags | boolean | null | undefined;
118
118
  }
119
- export declare type SelectProps<T = unknown> = SingleSelectProps<T> | MultipleSelectProps<T>;
119
+ export type SelectProps<T = unknown> = SingleSelectProps<T> | MultipleSelectProps<T>;
120
120
  interface AddButton {
121
121
  prefix: string | null | undefined;
122
122
  label: string;
@@ -256,9 +256,9 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
256
256
  renderSelect(activeItemId: string | undefined): JSX.Element;
257
257
  render(): JSX.Element;
258
258
  }
259
- export declare type SingleSelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SingleSelectProps<T>>;
260
- export declare type MultipleSelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, MultipleSelectProps<T>>;
261
- export declare type SelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SelectProps<T>>;
259
+ export type SingleSelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SingleSelectProps<T>>;
260
+ export type MultipleSelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, MultipleSelectProps<T>>;
261
+ export type SelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SelectProps<T>>;
262
262
  export declare const RerenderableSelect: {
263
263
  new (props: SelectProps<unknown>): {
264
264
  _propsCache: SelectProps<unknown> & React.RefAttributes<unknown>;
@@ -670,11 +670,8 @@ class Select extends Component {
670
670
  }
671
671
  _prependResetOption(shownData) {
672
672
  const resetOption = this._getResetOption();
673
- const margin = {
674
- rgItemType: List.ListProps.Type.MARGIN
675
- };
676
673
  if (resetOption) {
677
- const resetItems = [margin, resetOption, margin];
674
+ const resetItems = [resetOption];
678
675
  if (resetOption.separator) {
679
676
  resetItems.push({
680
677
  rgItemType: List.ListProps.Type.SEPARATOR
@@ -1,7 +1,7 @@
1
1
  import { Component, RefCallback } from 'react';
2
2
  import { InputAttrs } from '../input/input';
3
3
  declare function noop(): void;
4
- declare type SelectFilterProps = InputAttrs & {
4
+ type SelectFilterProps = InputAttrs & {
5
5
  inputRef: RefCallback<HTMLInputElement | HTMLTextAreaElement>;
6
6
  listId?: string | undefined;
7
7
  };
@@ -5,7 +5,6 @@ import 'classnames';
5
5
  import '../input/input.js';
6
6
  import '../global/sniffer.js';
7
7
  import '../list/list.js';
8
- import '../global/controls-height.js';
9
8
  export { S as default } from '../_helpers/select__filter.js';
10
9
  import '@jetbrains/icons/close-12px';
11
10
  import '../global/prop-types.js';
@@ -19,6 +18,7 @@ import '../_helpers/icon.js';
19
18
  import '../icon/icon__svg.js';
20
19
  import '../global/memoize.js';
21
20
  import '../link/clickableLink.js';
21
+ import '../global/controls-height.js';
22
22
  import '../_helpers/button__classes.js';
23
23
  import '../global/get-uid.js';
24
24
  import '../global/composeRefs.js';
@@ -10,7 +10,7 @@ import Caret from '../caret/caret';
10
10
  import { ListDataItem } from '../list/consts';
11
11
  import { ShortcutsMap } from '../shortcuts/core';
12
12
  import { SelectItem } from './select';
13
- export declare type FilterFn<T> = (itemToCheck: SelectItem<T>, checkString: string, data: readonly SelectItem<T>[]) => boolean;
13
+ export type FilterFn<T> = (itemToCheck: SelectItem<T>, checkString: string, data: readonly SelectItem<T>[]) => boolean;
14
14
  export interface Filter<T = unknown> {
15
15
  fn?: FilterFn<T> | null | undefined;
16
16
  fuzzy?: boolean | null | undefined;
@@ -123,4 +123,4 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
123
123
  popupFilterShortcutsMap: ShortcutsMap;
124
124
  render(): JSX.Element;
125
125
  }
126
- export declare type SelectPopupAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof SelectPopup, SelectPopupProps<T>>;
126
+ export type SelectPopupAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof SelectPopup, SelectPopupProps<T>>;
@@ -19,6 +19,7 @@ import Caret from '../caret/caret.js';
19
19
  import Shortcuts from '../shortcuts/shortcuts.js';
20
20
  import { Button } from '../button/button.js';
21
21
  import Text from '../text/text.js';
22
+ import { ControlsHeight } from '../global/controls-height.js';
22
23
  import { DEFAULT_DIRECTIONS } from '../popup/popup.consts.js';
23
24
  import { S as SelectFilter, m as modules_b607bec2 } from '../_helpers/select__filter.js';
24
25
  import 'util-deprecate';
@@ -61,7 +62,6 @@ import '../list/consts.js';
61
62
  import '../_helpers/loader-inline.js';
62
63
  import '../tag/tag.js';
63
64
  import '@jetbrains/icons/close-12px';
64
- import '../global/controls-height.js';
65
65
  import '@jetbrains/icons/chevron-10px';
66
66
  import '../_helpers/button__classes.js';
67
67
  import '../input/input.js';
@@ -287,7 +287,7 @@ class SelectPopup extends PureComponent {
287
287
  return /*#__PURE__*/React.createElement("div", {
288
288
  className: modules_b607bec2.filterWrapper,
289
289
  "data-test": "ring-select-popup-filter"
290
- }, /*#__PURE__*/React.createElement(Icon, {
290
+ }, !this.props.tags && /*#__PURE__*/React.createElement(Icon, {
291
291
  glyph: searchIcon,
292
292
  className: modules_b607bec2.filterIcon,
293
293
  "data-test-custom": "ring-select-popup-filter-icon"
@@ -299,10 +299,14 @@ class SelectPopup extends PureComponent {
299
299
  onBlur: this.popupFilterOnBlur,
300
300
  onFocus: this.onFilterFocus,
301
301
  className: "ring-js-shortcuts",
302
+ inputClassName: classNames({
303
+ [modules_b607bec2.filterWithTagsInput]: this.props.tags
304
+ }),
302
305
  placeholder: typeof this.props.filter === 'object' ? this.props.filter.placeholder : undefined,
306
+ height: this.props.tags ? ControlsHeight.S : ControlsHeight.L,
303
307
  onChange: this.props.onFilter,
304
308
  onClick: this.onClickHandler,
305
- onClear: this.props.onClear,
309
+ onClear: this.props.tags ? undefined : this.props.onClear,
306
310
  "data-test-custom": "ring-select-popup-filter-input",
307
311
  listId: this.props.listId,
308
312
  enableShortcuts: Object.keys(this.popupFilterShortcutsMap)
@@ -6,7 +6,7 @@ export interface ShortcutsScope {
6
6
  scopeId: string;
7
7
  options: ShortcutsScopeOptions;
8
8
  }
9
- declare type ShortcutsHandler = (e: KeyboardEvent, key: string, scopeId: string) => boolean | null | void;
9
+ type ShortcutsHandler = (e: KeyboardEvent, key: string, scopeId: string) => boolean | null | void;
10
10
  export interface ShortcutsOptions {
11
11
  scope?: string | null | undefined;
12
12
  type?: string | undefined;
@@ -15,7 +15,7 @@ export interface ShortcutsParams extends ShortcutsOptions {
15
15
  key: string | string[];
16
16
  handler: ShortcutsHandler;
17
17
  }
18
- export declare type ShortcutsMap = Record<string, ShortcutsHandler>;
18
+ export type ShortcutsMap = Record<string, ShortcutsHandler>;
19
19
  declare class Shortcuts {
20
20
  ALLOW_SHORTCUTS_SELECTOR: string;
21
21
  ROOT_SCOPE: {