1 | import * as React from "react";
|
2 | import { AbstractPureComponent } from "../../common";
|
3 | import type { DOMMountOptions } from "../../common/utils/mountOptions";
|
4 | import type { OverlayToasterProps } from "./overlayToasterProps";
|
5 | import type { Toaster, ToastOptions } from "./toaster";
|
6 | import type { ToastProps } from "./toastProps";
|
7 | export interface OverlayToasterState {
|
8 | toasts: ToastOptions[];
|
9 | toastRefs: Record<string, React.RefObject<HTMLElement>>;
|
10 | }
|
11 | export type OverlayToasterCreateOptions = DOMMountOptions<OverlayToasterProps>;
|
12 | export declare const OVERLAY_TOASTER_DELAY_MS = 50;
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export declare class OverlayToaster extends AbstractPureComponent<OverlayToasterProps, OverlayToasterState> implements Toaster {
|
19 | static displayName: string;
|
20 | static defaultProps: OverlayToasterProps;
|
21 | |
22 |
|
23 |
|
24 |
|
25 | static create(props?: OverlayToasterProps, container?: HTMLElement): Toaster;
|
26 | |
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | static createAsync(props?: OverlayToasterProps, options?: OverlayToasterCreateOptions): Promise<Toaster>;
|
35 | state: OverlayToasterState;
|
36 | private queue;
|
37 | private toastId;
|
38 | private toastRefs;
|
39 |
|
40 | private getToastRefs;
|
41 | show(props: ToastProps, key?: string): string;
|
42 | private maybeUpdateExistingToast;
|
43 | private immediatelyShowToast;
|
44 | private startQueueTimeout;
|
45 | private handleQueueTimeout;
|
46 | private updateToastsInState;
|
47 | dismiss(key: string, timeoutExpired?: boolean): void;
|
48 | clear(): void;
|
49 | getToasts(): ToastOptions[];
|
50 | render(): React.JSX.Element;
|
51 | protected validateProps({ maxToasts }: OverlayToasterProps): void;
|
52 | |
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | private renderChildren;
|
63 | private dismissIfAtLimit;
|
64 | private renderToast;
|
65 | private createToastOptions;
|
66 | private getPositionClasses;
|
67 | private getDismissHandler;
|
68 | private handleClose;
|
69 | }
|