@jetbrains/ring-ui 6.0.36 → 6.0.38

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 (42) hide show
  1. package/components/alert/container.css +4 -0
  2. package/components/auth/request-builder.d.ts +0 -1
  3. package/components/auth/token-validator.d.ts +1 -1
  4. package/components/auth-dialog-service/auth-dialog-service.d.ts +0 -1
  5. package/components/avatar/fallback-avatar.d.ts +0 -1
  6. package/components/code/code.d.ts +0 -1
  7. package/components/collapse/collapse-context.d.ts +0 -1
  8. package/components/confirm/confirm.d.ts +1 -0
  9. package/components/confirm/confirm.js +2 -2
  10. package/components/data-list/data-list.d.ts +4 -4
  11. package/components/date-picker/day.d.ts +1 -1
  12. package/components/date-picker/month-names.d.ts +0 -1
  13. package/components/date-picker/month.d.ts +0 -1
  14. package/components/date-picker/months.d.ts +0 -1
  15. package/components/date-picker/weekdays.d.ts +0 -1
  16. package/components/dialog/dialog.css +14 -3
  17. package/components/dialog/dialog.d.ts +5 -1
  18. package/components/dialog/dialog.js +48 -17
  19. package/components/dropdown/anchor.d.ts +0 -1
  20. package/components/dropdown-menu/dropdown-menu.d.ts +2 -2
  21. package/components/global/composeRefs.d.ts +2 -2
  22. package/components/global/composeRefs.js +14 -8
  23. package/components/global/controls-height.d.ts +0 -1
  24. package/components/global/dom.d.ts +2 -2
  25. package/components/global/typescript-utils.d.ts +1 -1
  26. package/components/input/input.d.ts +1 -0
  27. package/components/input/input.js +3 -2
  28. package/components/island/adaptive-island-hoc.d.ts +4 -4
  29. package/components/island/content.js +2 -5
  30. package/components/island/island.d.ts +4 -4
  31. package/components/link/link.d.ts +8 -8
  32. package/components/list/list.d.ts +1 -1
  33. package/components/popup/popup.d.ts +2 -2
  34. package/components/query-assist/query-assist__suggestions.d.ts +0 -1
  35. package/components/select/select__popup.d.ts +1 -34
  36. package/components/shortcuts/shortcuts-hoc.d.ts +4 -4
  37. package/components/table/disable-hover-hoc.d.ts +4 -4
  38. package/components/table/smart-table.d.ts +1 -1
  39. package/components/table/table.d.ts +4 -4
  40. package/components/tabs/collapsible-more.d.ts +1 -1
  41. package/components/tabs/custom-item.d.ts +1 -1
  42. package/package.json +22 -22
@@ -11,6 +11,8 @@
11
11
  align-items: flex-end;
12
12
  flex-direction: column;
13
13
 
14
+ max-height: calc(100vh - 2 * var(--ring-unit));
15
+
14
16
  pointer-events: none;
15
17
 
16
18
  font-family: var(--ring-font-family);
@@ -20,6 +22,8 @@
20
22
  .alertInContainer {
21
23
  composes: alert from "./alert.css";
22
24
 
25
+ overflow-y: auto;
26
+
23
27
  min-width: calc(var(--ring-unit) * 30);
24
28
  max-width: calc(var(--ring-unit) * 50);
25
29
  margin-top: 0;
@@ -1,4 +1,3 @@
1
- /// <reference types="typings" />
2
1
  import uuid from 'simply-uuid';
3
2
  import AuthStorage, { AuthState } from './storage';
4
3
  export interface AuthRequestBuilderConfig {
@@ -68,7 +68,7 @@ export default class TokenValidator {
68
68
  * @param {string} error
69
69
  * @return {boolean}
70
70
  */
71
- static shouldRefreshToken(error: string | undefined): boolean;
71
+ static shouldRefreshToken(error: string | undefined): error is "invalid_grant" | "invalid_request" | "invalid_token";
72
72
  /**
73
73
  * Check scopes
74
74
  * @param {StoredToken} storedToken
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import AuthDialog, { AuthDialogProps } from '../auth-dialog/auth-dialog';
3
2
  export declare const reactRoot: import("react-dom/client").Root;
4
3
  type AuthDialogAttributes = JSX.LibraryManagedAttributes<typeof AuthDialog, AuthDialogProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from 'prop-types';
3
2
  import { Size } from './avatar';
4
3
  export interface FallbackAvatarProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="highlight.js" />
2
1
  import { PureComponent, Ref } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import highlight from 'highlight.js/lib/core';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface CollapseContextInterface {
3
2
  collapsed: boolean;
4
3
  duration: number;
@@ -13,6 +13,7 @@ export interface ConfirmProps {
13
13
  onConfirm: ((event: React.MouseEvent<HTMLButtonElement>) => void);
14
14
  onReject: ((event?: React.MouseEvent<HTMLButtonElement>) => void);
15
15
  className?: string | undefined;
16
+ native?: boolean;
16
17
  }
17
18
  /**
18
19
  * @name Confirm
@@ -41,8 +41,8 @@ export default class Confirm extends PureComponent {
41
41
  }
42
42
  };
43
43
  render() {
44
- const { show, className, inProgress, cancelIsDefault, text, description, confirmLabel, rejectLabel, onConfirm, onReject } = this.props;
45
- return (<Dialog label={text || (typeof description === 'string' ? description : undefined)} className={className} onEscPress={this.onEscPress} show={show} trapFocus data-test="ring-confirm">
44
+ const { show, className, inProgress, cancelIsDefault, text, description, confirmLabel, rejectLabel, onConfirm, onReject, native } = this.props;
45
+ return (<Dialog label={text || (typeof description === 'string' ? description : undefined)} className={className} onEscPress={this.onEscPress} show={show} trapFocus data-test="ring-confirm" native={native}>
46
46
  {text && <Header>{text}</Header>}
47
47
  {description && (<Content>
48
48
  <div className={styles.description}>{description}</div>
@@ -32,7 +32,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
32
32
  onKeyDown: (e: KeyboardEvent) => void;
33
33
  render(): import("react").JSX.Element;
34
34
  context: unknown;
35
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
35
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
36
36
  forceUpdate(callback?: (() => void) | undefined): void;
37
37
  readonly props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>;
38
38
  refs: {
@@ -40,7 +40,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
40
40
  };
41
41
  shouldComponentUpdate?(nextProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, nextState: Readonly<{}>, nextContext: any): boolean;
42
42
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
43
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, prevState: Readonly<{}>): any;
43
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, prevState: Readonly<{}>): any | null;
44
44
  componentDidUpdate?(prevProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, prevState: Readonly<{}>, snapshot?: any): void;
45
45
  componentWillMount?(): void;
46
46
  UNSAFE_componentWillMount?(): void;
@@ -59,7 +59,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
59
59
  onKeyDown: (e: KeyboardEvent) => void;
60
60
  render(): import("react").JSX.Element;
61
61
  context: unknown;
62
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
62
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
63
63
  forceUpdate(callback?: (() => void) | undefined): void;
64
64
  readonly props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>;
65
65
  refs: {
@@ -67,7 +67,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
67
67
  };
68
68
  shouldComponentUpdate?(nextProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, nextState: Readonly<{}>, nextContext: any): boolean;
69
69
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
70
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, prevState: Readonly<{}>): any;
70
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, prevState: Readonly<{}>): any | null;
71
71
  componentDidUpdate?(prevProps: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>, prevState: Readonly<{}>, snapshot?: any): void;
72
72
  componentWillMount?(): void;
73
73
  UNSAFE_componentWillMount?(): void;
@@ -23,7 +23,7 @@ export default class Day extends Component<DayProps> {
23
23
  handleMouseOver: () => void;
24
24
  handleMouseOut: () => void;
25
25
  isDay: (date: Date) => boolean;
26
- is: (name: 'date' | 'from' | 'to' | 'activeDate') => boolean;
26
+ is: (name: "date" | "from" | "to" | "activeDate") => boolean;
27
27
  inRange: (range: [Date, Date] | null) => boolean | null;
28
28
  isDisabled: (date: Date) => boolean;
29
29
  parse(text: string | null | undefined): Date | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from 'prop-types';
3
2
  import { MonthsProps } from './consts';
4
3
  declare function MonthNames(props: MonthsProps): import("react").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from 'prop-types';
3
2
  import { MonthsProps } from './consts';
4
3
  export interface MonthProps extends MonthsProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from 'prop-types';
3
2
  import { MonthsProps } from './consts';
4
3
  declare function Months(props: MonthsProps): import("react").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Locale } from 'date-fns';
3
2
  import PropTypes from 'prop-types';
4
3
  interface WeekdaysProps {
@@ -1,6 +1,6 @@
1
1
  @import "../global/variables.css";
2
2
 
3
- @value header from "../island/island.css";
3
+ @value header, scrollableWrapper from "../island/island.css";
4
4
 
5
5
  .container {
6
6
  position: fixed;
@@ -16,7 +16,18 @@
16
16
  justify-content: center;
17
17
 
18
18
  padding: calc(var(--ring-unit) * 4) var(--ring-unit);
19
+ }
20
+
21
+ .nativeDialog {
22
+ overflow: visible;
23
+
24
+ padding: 0;
25
+
26
+ border: none;
27
+ }
19
28
 
29
+ .container,
30
+ .nativeDialog::backdrop {
20
31
  background-color: rgba(var(--ring-dialog-overlay-components), var(--ring-dialog-overlay-opacity));
21
32
  }
22
33
 
@@ -37,7 +48,7 @@
37
48
  cursor: default;
38
49
  overflow-wrap: break-word;
39
50
 
40
- & [data-scrollable-container] {
51
+ & .scrollableWrapper {
41
52
  padding-bottom: var(--ring-unit);
42
53
  }
43
54
 
@@ -121,7 +132,7 @@
121
132
  }
122
133
  }
123
134
 
124
- .container .header {
135
+ .innerContainer .header {
125
136
  padding-top: calc(var(--ring-unit) * 4);
126
137
 
127
138
  font-size: 24px;
@@ -19,6 +19,8 @@ export interface DialogProps extends Partial<TabTrapProps> {
19
19
  portalTarget?: Element | null | undefined;
20
20
  'data-test'?: string | null | undefined;
21
21
  dense?: boolean | null | undefined;
22
+ native?: boolean;
23
+ modal?: boolean;
22
24
  }
23
25
  export default class Dialog extends PureComponent<DialogProps> {
24
26
  static propTypes: {
@@ -52,6 +54,7 @@ export default class Dialog extends PureComponent<DialogProps> {
52
54
  reset: () => void;
53
55
  };
54
56
  uid: string;
57
+ toggleNativeDialog(): void;
55
58
  toggleScrollPreventer(): void;
56
59
  handleClick: (event: React.MouseEvent<HTMLElement>) => void;
57
60
  onCloseClick: (event: React.MouseEvent<HTMLElement>) => void;
@@ -60,6 +63,7 @@ export default class Dialog extends PureComponent<DialogProps> {
60
63
  };
61
64
  dialog?: HTMLElement | null;
62
65
  dialogRef: (tabTrap: TabTrap | null) => void;
63
- render(): false | React.ReactPortal;
66
+ nativeDialog: React.RefObject<HTMLDialogElement>;
67
+ render(): false | React.JSX.Element;
64
68
  }
65
69
  export type DialogAttrs = JSX.LibraryManagedAttributes<typeof Dialog, DialogProps>;
@@ -1,4 +1,4 @@
1
- import { PureComponent } from 'react';
1
+ import { createRef, PureComponent } from 'react';
2
2
  import * as React from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import PropTypes from 'prop-types';
@@ -53,15 +53,24 @@ export default class Dialog extends PureComponent {
53
53
  closeButtonInside: false,
54
54
  shortcutOptions: { modal: false },
55
55
  trapFocus: false,
56
- autoFocusFirst: true
56
+ autoFocusFirst: true,
57
+ modal: true
57
58
  };
58
59
  state = {
59
60
  shortcutsScope: getUID('ring-dialog-')
60
61
  };
61
62
  componentDidMount() {
63
+ const { show, native } = this.props;
64
+ if (native && show) {
65
+ this.toggleNativeDialog();
66
+ }
62
67
  this.toggleScrollPreventer();
63
68
  }
64
69
  componentDidUpdate(prevProps) {
70
+ const { show, native } = this.props;
71
+ if (native && show !== prevProps.show) {
72
+ this.toggleNativeDialog();
73
+ }
65
74
  if (prevProps.show !== this.props.show) {
66
75
  this.toggleScrollPreventer();
67
76
  }
@@ -71,6 +80,17 @@ export default class Dialog extends PureComponent {
71
80
  }
72
81
  scrollPreventer = scrollPreventerFactory(getUID('preventer-'));
73
82
  uid = getUID('dialog-');
83
+ toggleNativeDialog() {
84
+ const { show, modal } = this.props;
85
+ if (this.nativeDialog.current != null) {
86
+ if (show) {
87
+ modal ? this.nativeDialog.current.showModal() : this.nativeDialog.current.show();
88
+ }
89
+ else {
90
+ this.nativeDialog.current.close();
91
+ }
92
+ }
93
+ }
74
94
  toggleScrollPreventer() {
75
95
  if (this.props.show) {
76
96
  this.scrollPreventer.prevent();
@@ -102,26 +122,37 @@ export default class Dialog extends PureComponent {
102
122
  dialogRef = (tabTrap) => {
103
123
  this.dialog = tabTrap && tabTrap.node;
104
124
  };
125
+ nativeDialog = createRef();
105
126
  render() {
106
- const { show, showCloseButton, onOverlayClick, onCloseAttempt, onEscPress, onCloseClick, children, className, contentClassName, trapFocus, 'data-test': dataTest, closeButtonInside, portalTarget, label, closeButtonTitle, dense, shortcutOptions, ...restProps } = this.props;
127
+ const { show, showCloseButton, onOverlayClick, onCloseAttempt, onEscPress, onCloseClick, children, className, contentClassName, trapFocus, 'data-test': dataTest, closeButtonInside, portalTarget, label, closeButtonTitle, dense, shortcutOptions, native, modal, ...restProps } = this.props;
107
128
  const classes = classNames(styles.container, className);
108
129
  const shortcutsMap = this.getShortcutsMap();
130
+ const content = (<>
131
+ <Shortcuts map={shortcutsMap} scope={this.state.shortcutsScope} options={this.props.shortcutOptions}/>
132
+ {(onOverlayClick !== noop || onCloseAttempt !== noop) && (<div
133
+ // click handler is duplicated in close button
134
+ role="presentation" className={styles.clickableOverlay} onClick={this.handleClick}/>)}
135
+ <div className={styles.innerContainer}>
136
+ <AdaptiveIsland className={classNames(styles.content, contentClassName, { [styles.dense]: dense })} data-test="ring-dialog" role="dialog" aria-label={label}>
137
+ {children}
138
+ {showCloseButton &&
139
+ (<Button icon={closeIcon} data-test="ring-dialog-close-button" className={classNames(styles.closeButton, {
140
+ [styles.closeButtonOutside]: !closeButtonInside,
141
+ [styles.closeButtonInside]: closeButtonInside
142
+ })} iconClassName={styles.closeIcon} onClick={this.onCloseClick} title={closeButtonTitle} aria-label={closeButtonTitle || 'close dialog'}/>)}
143
+ </AdaptiveIsland>
144
+ </div>
145
+ </>);
146
+ if (native) {
147
+ return (<dialog className={classNames(styles.nativeDialog, className)} ref={this.nativeDialog}>
148
+ <PopupTarget id={this.uid} className={styles.popupTarget}>
149
+ {target => <>{content}{target}</>}
150
+ </PopupTarget>
151
+ </dialog>);
152
+ }
109
153
  return show && createPortal(<PopupTarget id={this.uid} className={styles.popupTarget}>
110
154
  {target => (<TabTrap trapDisabled={!trapFocus} data-test={dataTests('ring-dialog-container', dataTest)} ref={this.dialogRef} className={classes} role="presentation" {...restProps}>
111
- <Shortcuts map={shortcutsMap} scope={this.state.shortcutsScope} options={this.props.shortcutOptions}/>
112
- {(onOverlayClick !== noop || onCloseAttempt !== noop) && (<div
113
- // click handler is duplicated in close button
114
- role="presentation" className={styles.clickableOverlay} onClick={this.handleClick}/>)}
115
- <div className={styles.innerContainer}>
116
- <AdaptiveIsland className={classNames(styles.content, contentClassName, { [styles.dense]: dense })} data-test="ring-dialog" role="dialog" aria-label={label}>
117
- {children}
118
- {showCloseButton &&
119
- (<Button icon={closeIcon} data-test="ring-dialog-close-button" className={classNames(styles.closeButton, {
120
- [styles.closeButtonOutside]: !closeButtonInside,
121
- [styles.closeButtonInside]: closeButtonInside
122
- })} iconClassName={styles.closeIcon} onClick={this.onCloseClick} title={closeButtonTitle} aria-label={closeButtonTitle || 'close dialog'}/>)}
123
- </AdaptiveIsland>
124
- </div>
155
+ {content}
125
156
  {target}
126
157
  </TabTrap>)}
127
158
  </PopupTarget>, portalTarget instanceof HTMLElement ? portalTarget : document.body);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from 'prop-types';
3
2
  import { ButtonAttrs } from '../button/button';
4
3
  declare const _default: import("react").MemoExoticComponent<{
@@ -16,8 +16,8 @@ export interface DropdownMenuProps<T = unknown> extends Omit<DropdownAttrs, 'anc
16
16
  menuProps?: PopupMenuAttrs<T> | null | undefined;
17
17
  }
18
18
  declare const _default: (<T = unknown>(props: DropdownMenuProps<T> & {
19
- ref?: Ref<PopupMenu<unknown>> | undefined;
20
- }) => ReactElement<any, string | import("react").JSXElementConstructor<any>> | null) & {
19
+ ref?: Ref<PopupMenu>;
20
+ }) => ReactElement | null) & {
21
21
  ListProps: {
22
22
  Type: typeof import("../list/consts").Type;
23
23
  Dimension: {
@@ -1,3 +1,3 @@
1
1
  import { Ref } from 'react';
2
- declare const _default: <T>(...refs: (Ref<T> | undefined)[]) => (value: T | null) => void;
3
- export default _default;
2
+ export default function composeRefs<T>(...refs: (Ref<T> | undefined)[]): (value: T | null) => void;
3
+ export declare function createComposedRef<T>(): import("memoize-one").MemoizedFn<(...refs: (Ref<T> | undefined)[]) => (value: T | null) => void>;
@@ -1,8 +1,14 @@
1
- export default (...refs) => (value) => refs.forEach(ref => {
2
- if (typeof ref === 'function') {
3
- ref(value);
4
- }
5
- else if (ref != null) {
6
- ref.current = value;
7
- }
8
- });
1
+ import memoizeOne from 'memoize-one';
2
+ export default function composeRefs(...refs) {
3
+ return (value) => refs.forEach(ref => {
4
+ if (typeof ref === 'function') {
5
+ ref(value);
6
+ }
7
+ else if (ref != null) {
8
+ ref.current = value;
9
+ }
10
+ });
11
+ }
12
+ export function createComposedRef() {
13
+ return memoizeOne((composeRefs));
14
+ }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare enum ControlsHeight {
3
2
  S = "S",
4
3
  M = "M",
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { SyntheticEvent } from 'react';
5
5
  import type { PropertiesHyphen } from 'csstype';
6
- export declare const getStyles: ((elt: Element, pseudoElt?: string | null | undefined) => CSSStyleDeclaration) & typeof getComputedStyle;
6
+ export declare const getStyles: ((elt: Element, pseudoElt?: string | null) => CSSStyleDeclaration) & typeof getComputedStyle;
7
7
  export declare function isMounted(node: Node | Range | null | undefined): boolean;
8
8
  export interface Rect {
9
9
  top: number;
@@ -20,7 +20,7 @@ export declare function getWindowWidth(): number;
20
20
  export declare function isNodeInVisiblePartOfPage(node: Element | Range): boolean;
21
21
  export declare function getDocumentScrollTop(): number;
22
22
  export declare function getDocumentScrollLeft(): number;
23
- export declare const applyMethodToClasses: (method: 'add' | 'remove') => (classList: DOMTokenList, classes?: string) => void;
23
+ export declare const applyMethodToClasses: (method: "add" | "remove") => (classList: DOMTokenList, classes?: string) => void;
24
24
  export declare const addClasses: (classList: DOMTokenList, classes?: string) => void;
25
25
  export declare const removeClasses: (classList: DOMTokenList, classes?: string) => void;
26
26
  export declare const toggleClasses: (classList: DOMTokenList, classes: Record<string, boolean>) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const isArray: (arg: unknown) => arg is readonly unknown[];
2
- export declare const isTruthy: <T>(arg: T | false | '' | 0 | null | undefined) => arg is T;
2
+ export declare const isTruthy: <T>(arg: T | false | "" | 0 | null | undefined) => arg is T;
@@ -64,6 +64,7 @@ export declare class Input extends PureComponent<InputProps> {
64
64
  stretch(el: HTMLElement | null | undefined): void;
65
65
  adapt(): void;
66
66
  inputRef: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;
67
+ composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement | HTMLTextAreaElement> | undefined)[]) => (value: HTMLInputElement | HTMLTextAreaElement | null) => void>;
67
68
  clear: (e: React.MouseEvent<HTMLButtonElement>) => void;
68
69
  handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
69
70
  handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
@@ -8,7 +8,7 @@ import Button from '../button/button';
8
8
  import getUID from '../global/get-uid';
9
9
  import Icon from '../icon/icon';
10
10
  import { I18nContext } from '../i18n/i18n-context';
11
- import composeRefs from '../global/composeRefs';
11
+ import { createComposedRef } from '../global/composeRefs';
12
12
  import { ControlsHeightContext } from '../global/controls-height';
13
13
  import { ControlLabel } from '../control-label/control-label';
14
14
  import ControlHelp from '../control-help/control-help';
@@ -75,6 +75,7 @@ export class Input extends PureComponent {
75
75
  inputRef = (el) => {
76
76
  this.input = el;
77
77
  };
78
+ composedInputRef = createComposedRef();
78
79
  clear = (e) => {
79
80
  this.props.onClear && this.props.onClear(e);
80
81
  };
@@ -109,7 +110,7 @@ export class Input extends PureComponent {
109
110
  const inputClasses = classNames(styles.input, inputClassName);
110
111
  const text = value != null ? value : children;
111
112
  const commonProps = {
112
- ref: composeRefs(this.inputRef, inputRef),
113
+ ref: this.composedInputRef(this.inputRef, inputRef),
113
114
  className: inputClasses,
114
115
  value: text,
115
116
  disabled,
@@ -10,7 +10,7 @@ export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>
10
10
  onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
11
11
  render(): import("react").JSX.Element;
12
12
  context: unknown;
13
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
13
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
14
14
  forceUpdate(callback?: (() => void) | undefined): void;
15
15
  readonly props: Readonly<P>;
16
16
  refs: {
@@ -20,7 +20,7 @@ export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>
20
20
  shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): boolean;
21
21
  componentWillUnmount?(): void;
22
22
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
23
- getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any;
23
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any | null;
24
24
  componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>, snapshot?: any): void;
25
25
  componentWillMount?(): void;
26
26
  UNSAFE_componentWillMount?(): void;
@@ -36,7 +36,7 @@ export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>
36
36
  onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
37
37
  render(): import("react").JSX.Element;
38
38
  context: unknown;
39
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
39
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
40
40
  forceUpdate(callback?: (() => void) | undefined): void;
41
41
  readonly props: Readonly<P>;
42
42
  refs: {
@@ -46,7 +46,7 @@ export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>
46
46
  shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): boolean;
47
47
  componentWillUnmount?(): void;
48
48
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
49
- getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any;
49
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any | null;
50
50
  componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>, snapshot?: any): void;
51
51
  componentWillMount?(): void;
52
52
  UNSAFE_componentWillMount?(): void;
@@ -67,7 +67,7 @@ class Content extends Component {
67
67
  this.calculateScrollPosition();
68
68
  };
69
69
  render() {
70
- const { children, className, bottomBorder, scrollableWrapperClassName, onScroll, onScrollToBottom, fade, ...restProps } = this.props;
70
+ const { children, className, bottomBorder, scrollableWrapperClassName, onScroll, onScrollToBottom, fade, tabIndex, ...restProps } = this.props;
71
71
  const { scrolledToTop, scrolledToBottom } = this.state;
72
72
  const classes = classNames(styles.content, className, {
73
73
  [styles.contentWithTopFade]: fade && !scrolledToTop,
@@ -77,10 +77,7 @@ class Content extends Component {
77
77
  });
78
78
  const scrollableWrapperClasses = classNames(styles.scrollableWrapper, scrollableWrapperClassName);
79
79
  return (<div {...restProps} data-test="ring-island-content" className={classes}>
80
- <div
81
- // it has to be focusable because it can be scrollable
82
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
83
- tabIndex={0} data-scrollable-container className={scrollableWrapperClasses} ref={this.setScrollableNodeAndCalculatePosition} onScroll={fade ? this.calculateScrollPosition : noop}>
80
+ <div tabIndex={tabIndex} className={scrollableWrapperClasses} ref={this.setScrollableNodeAndCalculatePosition} onScroll={fade ? this.calculateScrollPosition : noop}>
84
81
  {fade && (<div ref={this.setWrapper}>
85
82
  {children}
86
83
  </div>)}
@@ -26,7 +26,7 @@ export declare const AdaptiveIsland: {
26
26
  onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
27
27
  render(): import("react").JSX.Element;
28
28
  context: unknown;
29
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<IslandProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
29
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<IslandProps>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
30
30
  forceUpdate(callback?: (() => void) | undefined): void;
31
31
  readonly props: Readonly<IslandProps>;
32
32
  refs: {
@@ -36,7 +36,7 @@ export declare const AdaptiveIsland: {
36
36
  shouldComponentUpdate?(nextProps: Readonly<IslandProps>, nextState: Readonly<{}>, nextContext: any): boolean;
37
37
  componentWillUnmount?(): void;
38
38
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
39
- getSnapshotBeforeUpdate?(prevProps: Readonly<IslandProps>, prevState: Readonly<{}>): any;
39
+ getSnapshotBeforeUpdate?(prevProps: Readonly<IslandProps>, prevState: Readonly<{}>): any | null;
40
40
  componentDidUpdate?(prevProps: Readonly<IslandProps>, prevState: Readonly<{}>, snapshot?: any): void;
41
41
  componentWillMount?(): void;
42
42
  UNSAFE_componentWillMount?(): void;
@@ -52,7 +52,7 @@ export declare const AdaptiveIsland: {
52
52
  onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
53
53
  render(): import("react").JSX.Element;
54
54
  context: unknown;
55
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<IslandProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
55
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<IslandProps>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
56
56
  forceUpdate(callback?: (() => void) | undefined): void;
57
57
  readonly props: Readonly<IslandProps>;
58
58
  refs: {
@@ -62,7 +62,7 @@ export declare const AdaptiveIsland: {
62
62
  shouldComponentUpdate?(nextProps: Readonly<IslandProps>, nextState: Readonly<{}>, nextContext: any): boolean;
63
63
  componentWillUnmount?(): void;
64
64
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
65
- getSnapshotBeforeUpdate?(prevProps: Readonly<IslandProps>, prevState: Readonly<{}>): any;
65
+ getSnapshotBeforeUpdate?(prevProps: Readonly<IslandProps>, prevState: Readonly<{}>): any | null;
66
66
  componentDidUpdate?(prevProps: Readonly<IslandProps>, prevState: Readonly<{}>, snapshot?: any): void;
67
67
  componentWillMount?(): void;
68
68
  UNSAFE_componentWillMount?(): void;
@@ -17,7 +17,7 @@ export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent:
17
17
  new (props: LinkProps<P>): {
18
18
  render(): import("react").JSX.Element;
19
19
  context: unknown;
20
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<P>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
20
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<P>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
21
21
  forceUpdate(callback?: (() => void) | undefined): void;
22
22
  readonly props: Readonly<LinkProps<P>>;
23
23
  state: Readonly<{}>;
@@ -28,7 +28,7 @@ export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent:
28
28
  shouldComponentUpdate?(nextProps: Readonly<LinkProps<P>>, nextState: Readonly<{}>, nextContext: any): boolean;
29
29
  componentWillUnmount?(): void;
30
30
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
31
- getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<P>>, prevState: Readonly<{}>): any;
31
+ getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<P>>, prevState: Readonly<{}>): any | null;
32
32
  componentDidUpdate?(prevProps: Readonly<LinkProps<P>>, prevState: Readonly<{}>, snapshot?: any): void;
33
33
  componentWillMount?(): void;
34
34
  UNSAFE_componentWillMount?(): void;
@@ -40,7 +40,7 @@ export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent:
40
40
  new (props: LinkProps<P>, context: any): {
41
41
  render(): import("react").JSX.Element;
42
42
  context: unknown;
43
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<P>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
43
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<P>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
44
44
  forceUpdate(callback?: (() => void) | undefined): void;
45
45
  readonly props: Readonly<LinkProps<P>>;
46
46
  state: Readonly<{}>;
@@ -51,7 +51,7 @@ export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent:
51
51
  shouldComponentUpdate?(nextProps: Readonly<LinkProps<P>>, nextState: Readonly<{}>, nextContext: any): boolean;
52
52
  componentWillUnmount?(): void;
53
53
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
54
- getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<P>>, prevState: Readonly<{}>): any;
54
+ getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<P>>, prevState: Readonly<{}>): any | null;
55
55
  componentDidUpdate?(prevProps: Readonly<LinkProps<P>>, prevState: Readonly<{}>, snapshot?: any): void;
56
56
  componentWillMount?(): void;
57
57
  UNSAFE_componentWillMount?(): void;
@@ -78,7 +78,7 @@ declare const _default: {
78
78
  new (props: LinkProps<ClickableLinkProps>): {
79
79
  render(): import("react").JSX.Element;
80
80
  context: unknown;
81
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<ClickableLinkProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
81
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<ClickableLinkProps>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
82
82
  forceUpdate(callback?: (() => void) | undefined): void;
83
83
  readonly props: Readonly<LinkProps<ClickableLinkProps>>;
84
84
  state: Readonly<{}>;
@@ -89,7 +89,7 @@ declare const _default: {
89
89
  shouldComponentUpdate?(nextProps: Readonly<LinkProps<ClickableLinkProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
90
90
  componentWillUnmount?(): void;
91
91
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
92
- getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<ClickableLinkProps>>, prevState: Readonly<{}>): any;
92
+ getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<ClickableLinkProps>>, prevState: Readonly<{}>): any | null;
93
93
  componentDidUpdate?(prevProps: Readonly<LinkProps<ClickableLinkProps>>, prevState: Readonly<{}>, snapshot?: any): void;
94
94
  componentWillMount?(): void;
95
95
  UNSAFE_componentWillMount?(): void;
@@ -101,7 +101,7 @@ declare const _default: {
101
101
  new (props: LinkProps<ClickableLinkProps>, context: any): {
102
102
  render(): import("react").JSX.Element;
103
103
  context: unknown;
104
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<ClickableLinkProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
104
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<ClickableLinkProps>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
105
105
  forceUpdate(callback?: (() => void) | undefined): void;
106
106
  readonly props: Readonly<LinkProps<ClickableLinkProps>>;
107
107
  state: Readonly<{}>;
@@ -112,7 +112,7 @@ declare const _default: {
112
112
  shouldComponentUpdate?(nextProps: Readonly<LinkProps<ClickableLinkProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
113
113
  componentWillUnmount?(): void;
114
114
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
115
- getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<ClickableLinkProps>>, prevState: Readonly<{}>): any;
115
+ getSnapshotBeforeUpdate?(prevProps: Readonly<LinkProps<ClickableLinkProps>>, prevState: Readonly<{}>): any | null;
116
116
  componentDidUpdate?(prevProps: Readonly<LinkProps<ClickableLinkProps>>, prevState: Readonly<{}>, snapshot?: any): void;
117
117
  componentWillMount?(): void;
118
118
  UNSAFE_componentWillMount?(): void;
@@ -57,7 +57,7 @@ export declare const ActiveItemContext: {
57
57
  };
58
58
  displayName: string;
59
59
  };
60
- useUpdate: (value: string | undefined, skipUpdate?: boolean | undefined) => void;
60
+ useUpdate: (value: string | undefined, skipUpdate?: boolean) => void;
61
61
  Updater: import("react").MemoExoticComponent<{
62
62
  ({ value, skipUpdate }: import("../global/create-stateful-context").UpdaterProps<string | undefined>): null;
63
63
  displayName: string;
@@ -98,8 +98,8 @@ export default class Popup<P extends BasePopupProps = PopupProps> extends PureCo
98
98
  uid: string;
99
99
  calculateDisplay: (prevState: PopupState) => {
100
100
  display: Display;
101
- client?: boolean | undefined;
102
- direction?: Directions | undefined;
101
+ client?: boolean;
102
+ direction?: Directions;
103
103
  };
104
104
  static PopupProps: {
105
105
  Directions: typeof Directions;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ListDataItem } from '../list/consts';
3
2
  export interface QueryAssistSuggestion {
4
3
  description: string;
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { ComponentType, CSSProperties, PureComponent, ReactNode, Ref, SyntheticEvent } from 'react';
5
5
  import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
6
  import { IconType } from '../icon/icon';
8
7
  import Popup from '../popup/popup';
9
8
  import { Directions } from '../popup/position';
@@ -114,39 +113,7 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
114
113
  getFilter(): React.JSX.Element | null;
115
114
  handleRemoveTag: (arg: ListDataItem<T>) => (event: SyntheticEvent) => void;
116
115
  handleTagClick: (arg: ListDataItem<T>) => () => void;
117
- getCustomTag(tags: Tags | boolean | null): ((tag: Pick<Pick<import("../tag/tag").TagProps, keyof import("../tag/tag").TagProps> & Pick<PropTypes.InferProps<{
118
- onRemove: PropTypes.Requireable<(...args: any[]) => any>;
119
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
120
- rgTagIcon: PropTypes.Requireable<NonNullable<PropTypes.ReactComponentLike | null | undefined>>;
121
- icon: PropTypes.Requireable<string>;
122
- avatar: PropTypes.Requireable<string>;
123
- rgTagTitle: PropTypes.Requireable<string>;
124
- readOnly: PropTypes.Requireable<boolean>;
125
- disabled: PropTypes.Requireable<boolean>;
126
- focused: PropTypes.Requireable<boolean>;
127
- angled: PropTypes.Requireable<boolean>;
128
- backgroundColor: PropTypes.Requireable<string>;
129
- textColor: PropTypes.Requireable<string>;
130
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
131
- className: PropTypes.Requireable<string>;
132
- render: PropTypes.Requireable<(...args: any[]) => any>;
133
- }>, never> & Pick<import("../tag/tag").TagProps, never>, never> & {
134
- className?: string | null | undefined;
135
- children?: ReactNode;
136
- onClick?: ((event: React.MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
137
- icon?: string | undefined;
138
- disabled?: boolean | undefined;
139
- avatar?: string | null | undefined;
140
- readOnly?: boolean | undefined;
141
- focused?: boolean | undefined;
142
- render?: ((props: import("../tag/tag").TagRenderProps) => ReactNode) | undefined;
143
- onRemove?: ((event: React.MouseEvent<HTMLElement, MouseEvent>) => void) | undefined;
144
- rgTagIcon?: string | IconType | null | undefined;
145
- rgTagTitle?: string | undefined;
146
- angled?: boolean | null | undefined;
147
- textColor?: string | undefined;
148
- backgroundColor?: string | undefined;
149
- } & {}) => ReactNode) | undefined;
116
+ getCustomTag(tags: Tags | boolean | null): ((tag: TagAttrs) => ReactNode) | undefined;
150
117
  getTags(): false | React.JSX.Element;
151
118
  getFilterWithTags(): React.JSX.Element | null;
152
119
  getBottomLine(): "" | React.JSX.Element | null;
@@ -13,7 +13,7 @@ export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentT
13
13
  _shortcutsScopeUid: string;
14
14
  render(): import("react").JSX.Element;
15
15
  context: unknown;
16
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
16
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
17
17
  forceUpdate(callback?: (() => void) | undefined): void;
18
18
  readonly props: Readonly<P & ShortcutsHOCProps>;
19
19
  state: Readonly<{}>;
@@ -24,7 +24,7 @@ export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentT
24
24
  shouldComponentUpdate?(nextProps: Readonly<P & ShortcutsHOCProps>, nextState: Readonly<{}>, nextContext: any): boolean;
25
25
  componentWillUnmount?(): void;
26
26
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
27
- getSnapshotBeforeUpdate?(prevProps: Readonly<P & ShortcutsHOCProps>, prevState: Readonly<{}>): any;
27
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P & ShortcutsHOCProps>, prevState: Readonly<{}>): any | null;
28
28
  componentDidUpdate?(prevProps: Readonly<P & ShortcutsHOCProps>, prevState: Readonly<{}>, snapshot?: any): void;
29
29
  componentWillMount?(): void;
30
30
  UNSAFE_componentWillMount?(): void;
@@ -37,7 +37,7 @@ export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentT
37
37
  _shortcutsScopeUid: string;
38
38
  render(): import("react").JSX.Element;
39
39
  context: unknown;
40
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
40
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
41
41
  forceUpdate(callback?: (() => void) | undefined): void;
42
42
  readonly props: Readonly<P & ShortcutsHOCProps>;
43
43
  state: Readonly<{}>;
@@ -48,7 +48,7 @@ export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentT
48
48
  shouldComponentUpdate?(nextProps: Readonly<P & ShortcutsHOCProps>, nextState: Readonly<{}>, nextContext: any): boolean;
49
49
  componentWillUnmount?(): void;
50
50
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
51
- getSnapshotBeforeUpdate?(prevProps: Readonly<P & ShortcutsHOCProps>, prevState: Readonly<{}>): any;
51
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P & ShortcutsHOCProps>, prevState: Readonly<{}>): any | null;
52
52
  componentDidUpdate?(prevProps: Readonly<P & ShortcutsHOCProps>, prevState: Readonly<{}>, snapshot?: any): void;
53
53
  componentWillMount?(): void;
54
54
  UNSAFE_componentWillMount?(): void;
@@ -14,7 +14,7 @@ export default function disableHoverHOC<P extends DisableHoverAddProps>(Composed
14
14
  onKeyDown: (e: KeyboardEvent) => void;
15
15
  render(): import("react").JSX.Element;
16
16
  context: unknown;
17
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<P>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
17
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<P>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
18
18
  forceUpdate(callback?: (() => void) | undefined): void;
19
19
  readonly props: Readonly<DisableHoverProps<P>>;
20
20
  refs: {
@@ -22,7 +22,7 @@ export default function disableHoverHOC<P extends DisableHoverAddProps>(Composed
22
22
  };
23
23
  shouldComponentUpdate?(nextProps: Readonly<DisableHoverProps<P>>, nextState: Readonly<{}>, nextContext: any): boolean;
24
24
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
25
- getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<P>>, prevState: Readonly<{}>): any;
25
+ getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<P>>, prevState: Readonly<{}>): any | null;
26
26
  componentDidUpdate?(prevProps: Readonly<DisableHoverProps<P>>, prevState: Readonly<{}>, snapshot?: any): void;
27
27
  componentWillMount?(): void;
28
28
  UNSAFE_componentWillMount?(): void;
@@ -41,7 +41,7 @@ export default function disableHoverHOC<P extends DisableHoverAddProps>(Composed
41
41
  onKeyDown: (e: KeyboardEvent) => void;
42
42
  render(): import("react").JSX.Element;
43
43
  context: unknown;
44
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<P>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
44
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<P>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
45
45
  forceUpdate(callback?: (() => void) | undefined): void;
46
46
  readonly props: Readonly<DisableHoverProps<P>>;
47
47
  refs: {
@@ -49,7 +49,7 @@ export default function disableHoverHOC<P extends DisableHoverAddProps>(Composed
49
49
  };
50
50
  shouldComponentUpdate?(nextProps: Readonly<DisableHoverProps<P>>, nextState: Readonly<{}>, nextContext: any): boolean;
51
51
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
52
- getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<P>>, prevState: Readonly<{}>): any;
52
+ getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<P>>, prevState: Readonly<{}>): any | null;
53
53
  componentDidUpdate?(prevProps: Readonly<DisableHoverProps<P>>, prevState: Readonly<{}>, snapshot?: any): void;
54
54
  componentWillMount?(): void;
55
55
  UNSAFE_componentWillMount?(): void;
@@ -42,7 +42,7 @@ declare class SmartTable<T extends SelectionItem> extends PureComponent<SmartTab
42
42
  onItemCollapse?: import("react").Validator<((item: SelectionItem) => void) | null | undefined> | undefined;
43
43
  onItemExpand?: import("react").Validator<((item: SelectionItem) => void) | null | undefined> | undefined;
44
44
  onItemDoubleClick?: import("react").Validator<((item: SelectionItem) => void) | null | undefined> | undefined;
45
- onItemClick?: import("react").Validator<((item: SelectionItem, e: import("react").MouseEvent<HTMLTableRowElement, MouseEvent>) => void) | null | undefined> | undefined;
45
+ onItemClick?: import("react").Validator<((item: SelectionItem, e: import("react").MouseEvent<HTMLTableRowElement>) => void) | null | undefined> | undefined;
46
46
  isDisabledSelectionVisible?: import("react").Validator<((item: SelectionItem) => boolean) | null | undefined> | undefined;
47
47
  getCheckboxTooltip?: import("react").Validator<((item: SelectionItem) => string | undefined) | null | undefined> | undefined;
48
48
  loaderClassName?: import("react").Validator<string | null | undefined> | undefined;
@@ -109,7 +109,7 @@ export default class TableContainer<T extends SelectionItem> extends Component<T
109
109
  onKeyDown: (e: KeyboardEvent) => void;
110
110
  render(): React.JSX.Element;
111
111
  context: unknown;
112
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
112
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
113
113
  forceUpdate(callback?: (() => void) | undefined): void;
114
114
  readonly props: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>;
115
115
  refs: {
@@ -117,7 +117,7 @@ export default class TableContainer<T extends SelectionItem> extends Component<T
117
117
  };
118
118
  shouldComponentUpdate?(nextProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, nextState: Readonly<{}>, nextContext: any): boolean;
119
119
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
120
- getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, prevState: Readonly<{}>): any;
120
+ getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, prevState: Readonly<{}>): any | null;
121
121
  componentDidUpdate?(prevProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, prevState: Readonly<{}>, snapshot?: any): void;
122
122
  componentWillMount?(): void;
123
123
  UNSAFE_componentWillMount?(): void;
@@ -136,7 +136,7 @@ export default class TableContainer<T extends SelectionItem> extends Component<T
136
136
  onKeyDown: (e: KeyboardEvent) => void;
137
137
  render(): React.JSX.Element;
138
138
  context: unknown;
139
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
139
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
140
140
  forceUpdate(callback?: (() => void) | undefined): void;
141
141
  readonly props: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>;
142
142
  refs: {
@@ -144,7 +144,7 @@ export default class TableContainer<T extends SelectionItem> extends Component<T
144
144
  };
145
145
  shouldComponentUpdate?(nextProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, nextState: Readonly<{}>, nextContext: any): boolean;
146
146
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
147
- getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, prevState: Readonly<{}>): any;
147
+ getSnapshotBeforeUpdate?(prevProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, prevState: Readonly<{}>): any | null;
148
148
  componentDidUpdate?(prevProps: Readonly<DisableHoverProps<SelectionShortcutsProps<T, FocusSensorProps<TableProps<T>, HTMLTableRowElement, typeof Table>>>>, prevState: Readonly<{}>, snapshot?: any): void;
149
149
  componentWillMount?(): void;
150
150
  UNSAFE_componentWillMount?(): void;
@@ -8,7 +8,7 @@ export interface FakeMoreButtonProps {
8
8
  moreActiveClassName?: string | null | undefined;
9
9
  }
10
10
  export declare const AnchorLink: {
11
- ({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }: Omit<LinkProps, 'children'> & FakeMoreButtonProps): import("react").JSX.Element;
11
+ ({ hasActiveChildren, moreClassName, moreActiveClassName, ...restProps }: Omit<LinkProps, "children"> & FakeMoreButtonProps): import("react").JSX.Element;
12
12
  propTypes: {
13
13
  hasActiveChildren: PropTypes.Requireable<boolean>;
14
14
  moreClassName: PropTypes.Requireable<string>;
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import { ReactElement } from 'react';
3
3
  import { TabProps } from './tab';
4
4
  export declare const CustomItem: {
5
- ({ children }: TabProps): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
5
+ ({ children }: TabProps): ReactElement;
6
6
  propTypes: {
7
7
  children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.36",
3
+ "version": "6.0.38",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -83,22 +83,22 @@
83
83
  "@jetbrains/eslint-config": "^5.4.2",
84
84
  "@jetbrains/logos": "3.0.0-canary.734b213.0",
85
85
  "@jetbrains/stylelint-config": "^4.0.2",
86
- "@primer/octicons": "^19.9.0",
86
+ "@primer/octicons": "^19.10.0",
87
87
  "@rollup/plugin-babel": "^6.0.4",
88
88
  "@rollup/plugin-json": "^6.1.0",
89
89
  "@rollup/plugin-node-resolve": "^15.2.3",
90
90
  "@rollup/plugin-replace": "^5.0.7",
91
- "@storybook/addon-a11y": "8.1.9",
92
- "@storybook/addon-docs": "8.1.9",
93
- "@storybook/addon-essentials": "8.1.9",
94
- "@storybook/components": "8.1.9",
95
- "@storybook/manager-api": "8.1.9",
96
- "@storybook/preview-api": "8.1.9",
97
- "@storybook/react": "8.1.9",
98
- "@storybook/react-webpack5": "8.1.9",
91
+ "@storybook/addon-a11y": "8.1.10",
92
+ "@storybook/addon-docs": "8.1.10",
93
+ "@storybook/addon-essentials": "8.1.10",
94
+ "@storybook/components": "8.1.10",
95
+ "@storybook/manager-api": "8.1.10",
96
+ "@storybook/preview-api": "8.1.10",
97
+ "@storybook/react": "8.1.10",
98
+ "@storybook/react-webpack5": "8.1.10",
99
99
  "@storybook/test-runner": "^0.18.2",
100
- "@storybook/theming": "8.1.9",
101
- "@testing-library/dom": "^10.1.0",
100
+ "@storybook/theming": "8.1.10",
101
+ "@testing-library/dom": "^10.2.0",
102
102
  "@testing-library/react": "^16.0.0",
103
103
  "@testing-library/user-event": "^14.5.2",
104
104
  "@types/chai": "^4.3.16",
@@ -112,14 +112,14 @@
112
112
  "@types/sinon": "^17.0.3",
113
113
  "@types/sinon-chai": "^3.2.12",
114
114
  "@types/webpack-env": "^1.18.5",
115
- "@typescript-eslint/eslint-plugin": "^7.13.0",
116
- "@typescript-eslint/parser": "^7.13.0",
115
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
116
+ "@typescript-eslint/parser": "^7.14.1",
117
117
  "@vitejs/plugin-react": "^4.3.1",
118
118
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
119
119
  "acorn": "^8.12.0",
120
120
  "axe-playwright": "^2.0.1",
121
121
  "babel-plugin-require-context-hook": "^1.0.0",
122
- "caniuse-lite": "^1.0.30001636",
122
+ "caniuse-lite": "^1.0.30001638",
123
123
  "chai": "^5.1.1",
124
124
  "chai-as-promised": "^8.0.0",
125
125
  "chai-dom": "^1.10.0",
@@ -132,18 +132,18 @@
132
132
  "eslint-import-resolver-webpack": "^0.13.8",
133
133
  "eslint-plugin-bdd": "^2.1.1",
134
134
  "eslint-plugin-import": "^2.29.1",
135
- "eslint-plugin-jsx-a11y": "^6.8.0",
136
- "eslint-plugin-react": "^7.34.2",
135
+ "eslint-plugin-jsx-a11y": "^6.9.0",
136
+ "eslint-plugin-react": "^7.34.3",
137
137
  "eslint-plugin-storybook": "^0.8.0",
138
138
  "events": "^3.3.0",
139
- "glob": "^10.4.1",
139
+ "glob": "^10.4.2",
140
140
  "html-webpack-plugin": "^5.6.0",
141
141
  "http-server": "^14.1.1",
142
142
  "husky": "^9.0.11",
143
143
  "identity-obj-proxy": "^3.0.0",
144
144
  "jest": "~29.7.0",
145
145
  "jest-environment-jsdom": "^29.7.0",
146
- "jest-teamcity": "^1.10.0",
146
+ "jest-teamcity": "^1.12.0",
147
147
  "lint-staged": "^15.2.7",
148
148
  "markdown-it": "^14.1.0",
149
149
  "merge-options": "^3.0.4",
@@ -161,17 +161,17 @@
161
161
  "sinon": "^18.0.0",
162
162
  "sinon-chai": "^3.7.0",
163
163
  "storage-mock": "^2.1.0",
164
- "storybook": "8.1.9",
164
+ "storybook": "8.1.10",
165
165
  "storybook-addon-themes": "^6.1.0",
166
166
  "stylelint": "^16.6.1",
167
167
  "svg-inline-loader": "^0.8.2",
168
168
  "teamcity-service-messages": "^0.1.14",
169
169
  "terser-webpack-plugin": "^5.3.10",
170
- "typescript": "~5.4.5",
170
+ "typescript": "~5.5.2",
171
171
  "vitest": "^1.6.0",
172
172
  "vitest-teamcity-reporter": "^0.3.0",
173
173
  "wallaby-webpack": "^3.9.16",
174
- "webpack": "^5.92.0",
174
+ "webpack": "^5.92.1",
175
175
  "webpack-cli": "^5.1.4",
176
176
  "xmlappend": "^1.0.4"
177
177
  },