@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.
- package/components/alert/container.d.ts +1 -1
- package/components/analytics/analytics.d.ts +1 -1
- package/components/auth/auth__core.d.ts +1 -1
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/button/button.d.ts +3 -3
- package/components/button-group/button-group.css +14 -0
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm-service/confirm-service.d.ts +1 -1
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/data-list/data-list.d.ts +2 -2
- package/components/date-picker/consts.d.ts +1 -1
- package/components/date-picker/date-picker.d.ts +2 -2
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/editable-heading/editable-heading.css +1 -0
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/footer/footer.d.ts +2 -2
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/data-tests.d.ts +1 -1
- package/components/global/focus-sensor-hoc.d.ts +2 -2
- package/components/global/fuzzy-highlight.d.ts +1 -1
- package/components/global/listeners.d.ts +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/header/header.d.ts +1 -1
- package/components/header/profile.d.ts +1 -1
- package/components/http/http.d.ts +1 -1
- package/components/hub-source/hub-source.d.ts +1 -1
- package/components/icon/icon.d.ts +2 -2
- package/components/input/input.d.ts +8 -8
- package/components/island/adaptive-island-hoc.d.ts +1 -1
- package/components/link/link.d.ts +2 -2
- package/components/list/consts.d.ts +2 -2
- package/components/list/list.d.ts +1 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/markdown/markdown.d.ts +1 -1
- package/components/message/message.d.ts +1 -1
- package/components/pager/pager.d.ts +1 -1
- package/components/popup/popup.d.ts +2 -2
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/query-assist/query-assist.d.ts +1 -1
- package/components/select/select-popup.css +18 -3
- package/components/select/select.d.ts +7 -7
- package/components/select/select.js +1 -2
- package/components/select/select__filter.d.ts +1 -1
- package/components/select/select__filter.js +1 -2
- package/components/select/select__popup.d.ts +2 -2
- package/components/select/select__popup.js +4 -3
- package/components/shortcuts/core.d.ts +2 -2
- package/components/table/disable-hover-hoc.d.ts +1 -1
- package/components/table/header.d.ts +1 -1
- package/components/table/row.d.ts +1 -1
- package/components/table/selection-shortcuts-hoc.d.ts +1 -1
- package/components/table/table.d.ts +1 -1
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tag/tag.d.ts +1 -1
- package/components/tags-input/tags-input.css +6 -0
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-list/tags-list.d.ts +1 -1
- package/components/toggle/toggle.d.ts +1 -1
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/tooltip.d.ts +1 -1
- package/dist/_helpers/select__filter.js +1 -3
- package/dist/alert/container.d.ts +1 -1
- package/dist/analytics/analytics.d.ts +1 -1
- package/dist/auth/auth__core.d.ts +1 -1
- package/dist/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/dist/avatar/avatar.d.ts +1 -1
- package/dist/button/button.d.ts +3 -3
- package/dist/confirm/confirm.d.ts +1 -1
- package/dist/confirm-service/confirm-service.d.ts +1 -1
- package/dist/contenteditable/contenteditable.d.ts +2 -2
- package/dist/data-list/data-list.d.ts +2 -2
- package/dist/date-picker/consts.d.ts +1 -1
- package/dist/date-picker/date-picker.d.ts +2 -2
- package/dist/date-picker/date-popup.d.ts +1 -1
- package/dist/dialog/dialog.d.ts +1 -1
- package/dist/dropdown/dropdown.d.ts +1 -1
- package/dist/editable-heading/editable-heading.d.ts +1 -1
- package/dist/error-bubble/error-bubble.d.ts +1 -1
- package/dist/footer/footer.d.ts +2 -2
- package/dist/global/create-stateful-context.d.ts +1 -1
- package/dist/global/data-tests.d.ts +1 -1
- package/dist/global/focus-sensor-hoc.d.ts +2 -2
- package/dist/global/fuzzy-highlight.d.ts +1 -1
- package/dist/global/listeners.d.ts +1 -1
- package/dist/grid/row.d.ts +1 -1
- package/dist/header/header.d.ts +1 -1
- package/dist/header/profile.d.ts +1 -1
- package/dist/http/http.d.ts +1 -1
- package/dist/hub-source/hub-source.d.ts +1 -1
- package/dist/icon/icon.d.ts +2 -2
- package/dist/input/input.d.ts +8 -8
- package/dist/island/adaptive-island-hoc.d.ts +1 -1
- package/dist/link/link.d.ts +2 -2
- package/dist/list/consts.d.ts +2 -2
- package/dist/list/list.d.ts +1 -1
- package/dist/loader-inline/loader-inline.d.ts +1 -1
- package/dist/login-dialog/login-dialog.d.ts +1 -1
- package/dist/markdown/markdown.d.ts +1 -1
- package/dist/message/message.d.ts +1 -1
- package/dist/pager/pager.d.ts +1 -1
- package/dist/popup/popup.d.ts +2 -2
- package/dist/popup-menu/popup-menu.d.ts +1 -1
- package/dist/progress-bar/progress-bar.d.ts +1 -1
- package/dist/query-assist/query-assist.d.ts +1 -1
- package/dist/select/select.d.ts +7 -7
- package/dist/select/select.js +1 -4
- package/dist/select/select__filter.d.ts +1 -1
- package/dist/select/select__filter.js +1 -1
- package/dist/select/select__popup.d.ts +2 -2
- package/dist/select/select__popup.js +7 -3
- package/dist/shortcuts/core.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/table/disable-hover-hoc.d.ts +1 -1
- package/dist/table/header.d.ts +1 -1
- package/dist/table/row.d.ts +1 -1
- package/dist/table/selection-shortcuts-hoc.d.ts +1 -1
- package/dist/table/table.d.ts +1 -1
- package/dist/tabs/dumb-tabs.d.ts +2 -2
- package/dist/tag/tag.d.ts +1 -1
- package/dist/tags-input/tags-input.d.ts +1 -1
- package/dist/tags-list/tags-list.d.ts +1 -1
- package/dist/toggle/toggle.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts +1 -1
- package/dist/user-agreement/user-agreement.d.ts +1 -1
- package/dist/user-card/card.d.ts +1 -1
- package/dist/user-card/tooltip.d.ts +1 -1
- 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
|
|
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
|
|
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
|
|
58
|
+
export type MessageAttrs = JSX.LibraryManagedAttributes<typeof Message, MessageProps>;
|
|
59
59
|
export {};
|
package/dist/pager/pager.d.ts
CHANGED
|
@@ -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
|
|
82
|
+
export type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
|
|
83
83
|
export {};
|
package/dist/popup/popup.d.ts
CHANGED
|
@@ -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
|
|
147
|
-
export
|
|
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
|
|
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
|
|
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
|
|
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>;
|
package/dist/select/select.d.ts
CHANGED
|
@@ -19,12 +19,12 @@ declare enum Type {
|
|
|
19
19
|
INLINE = "INLINE",
|
|
20
20
|
INPUT_WITHOUT_CONTROLS = "INPUT_WITHOUT_CONTROLS"
|
|
21
21
|
}
|
|
22
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
260
|
-
export
|
|
261
|
-
export
|
|
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>;
|
package/dist/select/select.js
CHANGED
|
@@ -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 = [
|
|
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
|
-
|
|
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
|
|
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
|
|
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)
|
package/dist/shortcuts/core.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface ShortcutsScope {
|
|
|
6
6
|
scopeId: string;
|
|
7
7
|
options: ShortcutsScopeOptions;
|
|
8
8
|
}
|
|
9
|
-
|
|
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
|
|
18
|
+
export type ShortcutsMap = Record<string, ShortcutsHandler>;
|
|
19
19
|
declare class Shortcuts {
|
|
20
20
|
ALLOW_SHORTCUTS_SELECTOR: string;
|
|
21
21
|
ROOT_SCOPE: {
|