@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
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
* @description Displays a stack of alerts on top of the page.
|
|
6
6
|
* @extends {PureComponent}
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type AlertContainerProps = HTMLAttributes<HTMLDivElement>;
|
|
9
9
|
export default class Alerts extends PureComponent<AlertContainerProps> {
|
|
10
10
|
static propTypes: {
|
|
11
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -81,7 +81,7 @@ export interface AuthConfig extends TokenValidatorConfig {
|
|
|
81
81
|
userParams?: RequestParams | undefined;
|
|
82
82
|
waitForRedirectTimeout: number;
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
type AuthPayloadMap = {
|
|
85
85
|
userChange: [AuthUser | undefined | void, void];
|
|
86
86
|
logout: [void, void];
|
|
87
87
|
logoutPostponed: [void, void];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import AuthDialog, { AuthDialogProps } from '../auth-dialog/auth-dialog';
|
|
3
|
-
|
|
3
|
+
type AuthDialogAttributes = JSX.LibraryManagedAttributes<typeof AuthDialog, AuthDialogProps>;
|
|
4
4
|
export default function showAuthDialog(props?: AuthDialogAttributes): () => void;
|
|
5
5
|
export {};
|
|
@@ -49,4 +49,4 @@ export default class Avatar extends PureComponent<AvatarProps> {
|
|
|
49
49
|
handleSuccess: () => void;
|
|
50
50
|
render(): JSX.Element;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
52
|
+
export type AvatarAttrs = JSX.LibraryManagedAttributes<typeof Avatar, AvatarProps>;
|
|
@@ -28,7 +28,7 @@ export interface ButtonLinkProps extends ClickableLinkProps, ButtonBaseProps {
|
|
|
28
28
|
autoFocus?: never;
|
|
29
29
|
href: string;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ButtonProps = ButtonButtonProps | ButtonLinkProps;
|
|
32
32
|
/**
|
|
33
33
|
* @name Button
|
|
34
34
|
*/
|
|
@@ -63,6 +63,6 @@ export declare class Button extends PureComponent<ButtonProps> {
|
|
|
63
63
|
render(): JSX.Element;
|
|
64
64
|
}
|
|
65
65
|
export { Size as IconSize };
|
|
66
|
-
export
|
|
67
|
-
export
|
|
66
|
+
export type ContainerProps<T extends ButtonProps> = JSX.LibraryManagedAttributes<typeof Button, T>;
|
|
67
|
+
export type ButtonAttrs = ContainerProps<ButtonButtonProps> | ContainerProps<ButtonLinkProps>;
|
|
68
68
|
export default Button;
|
|
@@ -89,6 +89,20 @@
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
.buttonGroup > .button:only-child,
|
|
93
|
+
.buttonGroup > :only-child .button {
|
|
94
|
+
box-shadow:
|
|
95
|
+
0 1px var(--ring-button-group-button-border-color) inset,
|
|
96
|
+
0 -1px var(--ring-button-group-button-border-color) inset,
|
|
97
|
+
-1px 0 var(--ring-button-group-button-border-color) inset,
|
|
98
|
+
1px 0 var(--ring-button-group-button-border-color) inset;
|
|
99
|
+
|
|
100
|
+
/* stylelint-disable-next-line selector-max-specificity */
|
|
101
|
+
&::before {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
92
106
|
/* stylelint-disable-next-line selector-max-specificity */
|
|
93
107
|
.buttonGroup .button.button:hover,
|
|
94
108
|
.buttonGroup .button.button:active {
|
|
@@ -45,4 +45,4 @@ export default class Confirm extends PureComponent<ConfirmProps> {
|
|
|
45
45
|
onEscPress: () => void;
|
|
46
46
|
render(): JSX.Element;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
48
|
+
export type ConfirmAttributes = JSX.LibraryManagedAttributes<typeof Confirm, ConfirmProps>;
|
|
@@ -4,7 +4,7 @@ import { ControlsHeight } from '../global/controls-height';
|
|
|
4
4
|
/**
|
|
5
5
|
* @name Confirm Service
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type Props = ConfirmAttributes & {
|
|
8
8
|
buttonsHeight?: ControlsHeight;
|
|
9
9
|
};
|
|
10
10
|
export declare const containerElement: HTMLDivElement;
|
|
@@ -30,8 +30,8 @@ declare class ContentEditableBase extends Component<ContentEditableBaseProps> {
|
|
|
30
30
|
componentDidUpdate(prevProps: ContentEditableBaseProps): void;
|
|
31
31
|
render(): JSX.Element;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
export
|
|
33
|
+
type ContentEditableBaseAttrs = JSX.LibraryManagedAttributes<typeof ContentEditableBase, ContentEditableBaseProps>;
|
|
34
|
+
export type ContentEditableProps = Omit<ContentEditableBaseAttrs, '__html'>;
|
|
35
35
|
declare const ContentEditable: {
|
|
36
36
|
({ children, ...props }: ContentEditableProps): JSX.Element;
|
|
37
37
|
propTypes: {
|
|
@@ -17,8 +17,8 @@ export interface DataListBaseProps<T extends SelectionItem> {
|
|
|
17
17
|
className?: string | null | undefined;
|
|
18
18
|
disabledHover?: boolean | null | undefined;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
export
|
|
20
|
+
type FocusableProps<T extends SelectionItem> = DataListBaseProps<T> & DisableHoverAddProps & FocusSensorOuterProps<HTMLDivElement> & SelectionShortcutsAddProps<T>;
|
|
21
|
+
export type DataListContainerProps<T extends SelectionItem> = DataListBaseProps<T> & FocusSensorOuterProps<HTMLDivElement> & SelectionShortcutsOuterProps<T>;
|
|
22
22
|
export default class DataListContainer<T extends SelectionItem> extends Component<DataListContainerProps<T>> {
|
|
23
23
|
static propTypes: React.WeakValidationMap<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<SelectionItem, FocusableProps<SelectionItem>>> | undefined;
|
|
24
24
|
DataList: {
|
|
@@ -10,7 +10,7 @@ export interface DatePickerTranslations extends Partial<DateInputTranslations> {
|
|
|
10
10
|
setDateTime: string;
|
|
11
11
|
setPeriod: string;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type DatePickerProps = Omit<DatePopupProps, 'translations' | 'parseDateInput' | 'onComplete' | 'hidden'> & {
|
|
14
14
|
className: string;
|
|
15
15
|
clear: boolean;
|
|
16
16
|
inline: boolean;
|
|
@@ -69,4 +69,4 @@ export default class DatePicker extends PureComponent<DatePickerProps> {
|
|
|
69
69
|
getAnchorText: () => string;
|
|
70
70
|
render(): JSX.Element;
|
|
71
71
|
}
|
|
72
|
-
export
|
|
72
|
+
export type DatePickerAttrs = JSX.LibraryManagedAttributes<typeof DatePicker, DatePickerProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { DatePickerChange, DatePopupBaseProps, DateSpecificPopupProps, DatePopupState, RangeSpecificPopupProps, TimeSpecificPopupProps, Field } from './consts';
|
|
4
|
-
export
|
|
4
|
+
export type DatePopupProps = DatePopupBaseProps & (DateSpecificPopupProps | TimeSpecificPopupProps | RangeSpecificPopupProps);
|
|
5
5
|
export default class DatePopup extends Component<DatePopupProps, DatePopupState> {
|
|
6
6
|
static sameDay(next: Date | number | null, prev: Date | number | null): boolean;
|
|
7
7
|
static propTypes: {
|
|
@@ -72,5 +72,5 @@ export default class Dialog extends PureComponent<DialogProps> {
|
|
|
72
72
|
dialogRef: (tabTrap: TabTrap | null) => void;
|
|
73
73
|
render(): false | React.ReactPortal;
|
|
74
74
|
}
|
|
75
|
-
export
|
|
75
|
+
export type DialogAttrs = JSX.LibraryManagedAttributes<typeof Dialog, DialogProps>;
|
|
76
76
|
export {};
|
|
@@ -73,5 +73,5 @@ export default class Dropdown extends Component<DropdownProps, DropdownState> {
|
|
|
73
73
|
_clearTimer(): void;
|
|
74
74
|
render(): JSX.Element;
|
|
75
75
|
}
|
|
76
|
-
export
|
|
76
|
+
export type DropdownAttrs = JSX.LibraryManagedAttributes<typeof Dropdown, DropdownProps>;
|
|
77
77
|
export { Anchor };
|
|
@@ -7,7 +7,7 @@ export interface EditableHeadingTranslations {
|
|
|
7
7
|
save: string;
|
|
8
8
|
cancel: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type EditableHeadingProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'size'> & {
|
|
11
11
|
level?: Levels;
|
|
12
12
|
headingClassName?: string | null;
|
|
13
13
|
inputClassName?: string | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent, ReactElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
export
|
|
3
|
+
export type ErrorBubbleProps<P> = Partial<P> & {
|
|
4
4
|
className?: string | null | undefined;
|
|
5
5
|
children: ReactElement<P> | ReactElement<P>[];
|
|
6
6
|
error?: string | null | undefined;
|
|
@@ -15,8 +15,8 @@ export interface FooterLinkItem {
|
|
|
15
15
|
target?: HTMLAttributeAnchorTarget | undefined;
|
|
16
16
|
title?: string | undefined;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
type FooterItem = FooterLinkItem | ReactChild;
|
|
19
|
+
type FooterItems = readonly (FooterItem | readonly FooterItem[])[];
|
|
20
20
|
export interface FooterProps {
|
|
21
21
|
className?: string | null | undefined;
|
|
22
22
|
floating?: boolean | null | undefined;
|
|
@@ -12,7 +12,7 @@ export interface FocusSensorAddProps<T extends HTMLElement> {
|
|
|
12
12
|
onFocusReset: () => void;
|
|
13
13
|
onFocusRestore: () => void;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
export
|
|
15
|
+
type RestProps<P, T extends HTMLElement> = Omit<P, keyof FocusSensorAddProps<T>>;
|
|
16
|
+
export type FocusSensorProps<P extends FocusSensorAddProps<T>, T extends HTMLElement, C extends ComponentType<P>> = RestProps<JSX.LibraryManagedAttributes<C, P>, T> & FocusSensorOuterProps<T>;
|
|
17
17
|
export default function focusSensorHOC<T extends HTMLElement, P extends FocusSensorAddProps<T>, C extends ComponentType<P>>(ComposedComponent: C): ComponentType<FocusSensorProps<P, T, typeof ComposedComponent>>;
|
|
18
18
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Handler<PM extends Record<string, [unknown, unknown]>, E extends keyof PM> = (data: PM[E][0]) => PM[E][1] | Promise<PM[E][1]>;
|
|
2
2
|
export default class Listeners<PM extends Record<string, [unknown, unknown]> = Record<string, [void, unknown]>> {
|
|
3
3
|
_all: Map<keyof PM, Set<Handler<PM, keyof PM>>>;
|
|
4
4
|
trigger<E extends keyof PM>(...[event, data]: PM[E][0] extends void ? [E] : [E, PM[E][0]]): Promise<PM[E][1][]>;
|
package/components/grid/row.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, ReactNode } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
declare const ModifierType: PropTypes.Requireable<string>;
|
|
4
|
-
|
|
4
|
+
type ModifierType = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
5
|
export interface RowProps {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
reverse?: boolean | null | undefined;
|
|
@@ -23,7 +23,7 @@ declare class Header extends Component<HeaderProps> {
|
|
|
23
23
|
};
|
|
24
24
|
render(): JSX.Element;
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export type HeaderAttrs = JSX.LibraryManagedAttributes<typeof Header, HeaderProps>;
|
|
27
27
|
export default Header;
|
|
28
28
|
export { default as Logo } from './logo';
|
|
29
29
|
export { default as Tray } from './tray';
|
|
@@ -70,4 +70,4 @@ export default class Profile extends PureComponent<ProfileProps> {
|
|
|
70
70
|
static Size: typeof Size;
|
|
71
71
|
render(): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
|
|
72
72
|
}
|
|
73
|
-
export
|
|
73
|
+
export type ProfileAttrs = JSX.LibraryManagedAttributes<typeof Profile, ProfileProps>;
|
|
@@ -19,7 +19,7 @@ export interface FetchParams<T = unknown> extends Omit<RequestInit, 'body' | 'he
|
|
|
19
19
|
export interface RequestParams<RawBody extends boolean = true | false> extends FetchParams<RawBody extends true ? (BodyInit | null) : unknown> {
|
|
20
20
|
sendRawBody?: RawBody;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type RequestParamsWithoutMethod<RawBody extends boolean = boolean> = Omit<RequestParams<RawBody>, 'method'>;
|
|
23
23
|
export interface HTTPAuth {
|
|
24
24
|
requestToken(): Promise<string | null> | string | null;
|
|
25
25
|
forceTokenUpdate(): Promise<string | null>;
|
|
@@ -3,7 +3,7 @@ import HTTP from '../http/http';
|
|
|
3
3
|
export interface Item {
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type Response<I extends Item, U extends string> = Partial<Record<U, I[]>> & {
|
|
7
7
|
total: number;
|
|
8
8
|
};
|
|
9
9
|
export interface HubSourceOptions {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { PureComponent, ComponentType, SVGAttributes, HTMLAttributes } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Color, Size } from './icon__constants';
|
|
7
|
-
export
|
|
7
|
+
export type IconType = ComponentType<SVGAttributes<SVGSVGElement>>;
|
|
8
8
|
export interface IconProps extends HTMLAttributes<HTMLElement> {
|
|
9
9
|
color: Color;
|
|
10
10
|
glyph: string | IconType | null;
|
|
@@ -39,5 +39,5 @@ export default class Icon extends PureComponent<IconProps> {
|
|
|
39
39
|
} | undefined;
|
|
40
40
|
render(): JSX.Element | null;
|
|
41
41
|
}
|
|
42
|
-
export
|
|
42
|
+
export type IconAttrs = JSX.LibraryManagedAttributes<typeof Icon, IconProps>;
|
|
43
43
|
export { Color, Size };
|
|
@@ -26,16 +26,16 @@ export interface InputBaseProps {
|
|
|
26
26
|
height?: ControlsHeight | undefined;
|
|
27
27
|
afterInput?: ReactNode;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
export
|
|
29
|
+
type Override<D, S> = Omit<D, keyof S> & S;
|
|
30
|
+
export type InputSpecificProps = Override<InputHTMLAttributes<HTMLInputElement>, InputBaseProps> & {
|
|
31
31
|
multiline?: false | undefined;
|
|
32
32
|
inputRef: Ref<HTMLInputElement>;
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
type TextAreaSpecificProps = Override<TextareaHTMLAttributes<HTMLTextAreaElement>, InputBaseProps> & {
|
|
35
35
|
multiline: true;
|
|
36
36
|
inputRef: Ref<HTMLTextAreaElement>;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type InputProps = InputSpecificProps | TextAreaSpecificProps;
|
|
39
39
|
export declare class Input extends PureComponent<InputProps> {
|
|
40
40
|
static defaultProps: {
|
|
41
41
|
size: Size;
|
|
@@ -63,9 +63,9 @@ export declare class Input extends PureComponent<InputProps> {
|
|
|
63
63
|
handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
64
64
|
render(): JSX.Element;
|
|
65
65
|
}
|
|
66
|
-
export
|
|
67
|
-
export
|
|
68
|
-
export
|
|
69
|
-
export
|
|
66
|
+
export type ContainerProps<P extends InputProps> = JSX.LibraryManagedAttributes<typeof Input, P>;
|
|
67
|
+
export type InputSpecificAttrs = ContainerProps<InputSpecificProps>;
|
|
68
|
+
export type TextAreaSpecificAttrs = ContainerProps<TextAreaSpecificProps>;
|
|
69
|
+
export type InputAttrs = InputSpecificAttrs | TextAreaSpecificAttrs;
|
|
70
70
|
export default Input;
|
|
71
71
|
export { Size };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ComponentType } from 'react';
|
|
2
2
|
export declare const PhaseContext: React.Context<number | null>;
|
|
3
|
-
|
|
3
|
+
type ScrollHandler = (element: Element) => void;
|
|
4
4
|
export declare const ScrollHandlerContext: React.Context<ScrollHandler | null>;
|
|
5
5
|
export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>): {
|
|
6
6
|
new (props: P | Readonly<P>): {
|
|
@@ -7,7 +7,7 @@ export interface WrapTextProps {
|
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
className?: string | null | undefined;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
type ChildrenFunction = (WrapText: ComponentType<WrapTextProps>) => ReactNode;
|
|
11
11
|
export interface LinkBaseProps {
|
|
12
12
|
active?: boolean | null | undefined;
|
|
13
13
|
inherit?: boolean | null | undefined;
|
|
@@ -17,7 +17,7 @@ export interface LinkBaseProps {
|
|
|
17
17
|
'data-test'?: string | null | undefined;
|
|
18
18
|
children: ReactNode | ChildrenFunction;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type LinkProps<P extends ClickableLinkProps = ClickableLinkProps> = Omit<P, keyof LinkBaseProps> & LinkBaseProps;
|
|
21
21
|
export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent: ComponentType<P> | string): {
|
|
22
22
|
new (props: LinkProps<P> | Readonly<LinkProps<P>>): {
|
|
23
23
|
getChildren(): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
|
|
@@ -26,7 +26,7 @@ export declare enum Dimension {
|
|
|
26
26
|
MARGIN = 8
|
|
27
27
|
}
|
|
28
28
|
export declare const DEFAULT_ITEM_TYPE = Type.ITEM;
|
|
29
|
-
export
|
|
29
|
+
export type ListDataItem<T = unknown> = T & Partial<Omit<LinkProps, 'onClick' | 'onMouseUp'>> & {
|
|
30
30
|
rgItemType?: Type | null | undefined;
|
|
31
31
|
key?: string | number | null | undefined;
|
|
32
32
|
disabled?: boolean | undefined;
|
|
@@ -73,4 +73,4 @@ export interface ListDataItemAddProps {
|
|
|
73
73
|
isFirst?: boolean;
|
|
74
74
|
'data-test'?: string | null | undefined;
|
|
75
75
|
}
|
|
76
|
-
export
|
|
76
|
+
export type ListDataItemProps<T = unknown> = Omit<ListDataItem<T>, keyof ListDataItemAddProps> & ListDataItemAddProps;
|
|
@@ -191,4 +191,4 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
|
|
|
191
191
|
/** @override */
|
|
192
192
|
render(): JSX.Element;
|
|
193
193
|
}
|
|
194
|
-
export
|
|
194
|
+
export type ListAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof List, ListProps<T>>;
|
|
@@ -14,5 +14,5 @@ declare class LoaderInline extends PureComponent<LoaderInlineProps> {
|
|
|
14
14
|
};
|
|
15
15
|
render(): JSX.Element;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type LoaderInlineAtrrs = JSX.LibraryManagedAttributes<typeof LoaderInline, LoaderInlineProps>;
|
|
18
18
|
export default LoaderInline;
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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>;
|
|
@@ -6,19 +6,34 @@
|
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
|
|
8
8
|
margin: calc(unit * 2) unit 0;
|
|
9
|
-
padding:
|
|
9
|
+
padding: 3px;
|
|
10
10
|
|
|
11
11
|
text-align: left;
|
|
12
12
|
|
|
13
13
|
border: 1px solid var(--ring-borders-color);
|
|
14
|
+
border-radius: var(--ring-border-radius);
|
|
14
15
|
|
|
15
16
|
& .filterWrapper {
|
|
17
|
+
padding-right: 0;
|
|
18
|
+
padding-left: 0;
|
|
19
|
+
|
|
16
20
|
border-bottom: none;
|
|
17
21
|
}
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
border-color: var(--ring-border-hover-color);
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
|
|
20
|
-
.filterWithTagsFocused
|
|
21
|
-
|
|
28
|
+
.filterWithTagsFocused,
|
|
29
|
+
.filterWithTagsFocused.filterWithTagsFocused:hover {
|
|
30
|
+
border-color: var(--ring-main-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.filterWithTagsInput {
|
|
34
|
+
padding: 0;
|
|
35
|
+
|
|
36
|
+
border: none;
|
|
22
37
|
}
|
|
23
38
|
|
|
24
39
|
.filter {
|
|
@@ -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>;
|
|
@@ -407,9 +407,8 @@ export default class Select extends Component {
|
|
|
407
407
|
}
|
|
408
408
|
_prependResetOption(shownData) {
|
|
409
409
|
const resetOption = this._getResetOption();
|
|
410
|
-
const margin = { rgItemType: List.ListProps.Type.MARGIN };
|
|
411
410
|
if (resetOption) {
|
|
412
|
-
const resetItems = [
|
|
411
|
+
const resetItems = [resetOption];
|
|
413
412
|
if (resetOption.separator) {
|
|
414
413
|
resetItems.push({
|
|
415
414
|
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
|
};
|
|
@@ -4,7 +4,6 @@ import classNames from 'classnames';
|
|
|
4
4
|
import Input from '../input/input';
|
|
5
5
|
import sniffr from '../global/sniffer';
|
|
6
6
|
import { ActiveItemContext } from '../list/list';
|
|
7
|
-
import { ControlsHeight } from '../global/controls-height';
|
|
8
7
|
import styles from './select-popup.css';
|
|
9
8
|
function noop() { }
|
|
10
9
|
export default class SelectFilter extends Component {
|
|
@@ -35,7 +34,7 @@ export default class SelectFilter extends Component {
|
|
|
35
34
|
const { className, listId, ...restProps } = this.props;
|
|
36
35
|
const classes = classNames(styles.filter, className);
|
|
37
36
|
return (<ActiveItemContext.ValueContext.Consumer>
|
|
38
|
-
{activeItemId => (<Input {...restProps} aria-owns={listId} aria-activedescendant={activeItemId} autoComplete="off" autoFocus borderless
|
|
37
|
+
{activeItemId => (<Input {...restProps} aria-owns={listId} aria-activedescendant={activeItemId} autoComplete="off" autoFocus borderless inputRef={this.inputRef} className={classes}/>)}
|
|
39
38
|
</ActiveItemContext.ValueContext.Consumer>);
|
|
40
39
|
}
|
|
41
40
|
}
|