1 | import type { ComponentPublicInstance, TeleportProps } from 'vue';
|
2 | import type { LoadingType } from '../loading';
|
3 | import type { Numeric } from '../utils';
|
4 | export type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
|
5 | export type ToastPosition = 'top' | 'middle' | 'bottom';
|
6 | export type ToastWordBreak = 'break-all' | 'break-word' | 'normal';
|
7 | export type ToastOptions = {
|
8 | icon?: string;
|
9 | type?: ToastType;
|
10 | mask?: boolean;
|
11 | message?: Numeric;
|
12 | overlay?: boolean;
|
13 | duration?: number;
|
14 | teleport?: TeleportProps['to'];
|
15 | iconSize?: Numeric;
|
16 | position?: ToastPosition;
|
17 | className?: unknown;
|
18 | transition?: string;
|
19 | iconPrefix?: string;
|
20 | wordBreak?: ToastWordBreak;
|
21 | loadingType?: LoadingType;
|
22 | forbidClick?: boolean;
|
23 | closeOnClick?: boolean;
|
24 | overlayClass?: unknown;
|
25 | overlayStyle?: Record<string, any>;
|
26 | closeOnClickOverlay?: boolean;
|
27 | zIndex?: Numeric;
|
28 | onClose?: () => void;
|
29 | onOpened?: () => void;
|
30 | };
|
31 | export type ToastWrapperInstance = ComponentPublicInstance<{
|
32 | message: Numeric;
|
33 | }, {
|
34 | close: () => void;
|
35 | |
36 |
|
37 |
|
38 | open: (props: Record<string, any>) => void;
|
39 | }>;
|
40 | export type ToastThemeVars = {
|
41 | toastMaxWidth?: string;
|
42 | toastFontSize?: string;
|
43 | toastTextColor?: string;
|
44 | toastLoadingIconColor?: string;
|
45 | toastLineHeight?: number | string;
|
46 | toastRadius?: string;
|
47 | toastBackground?: string;
|
48 | toastIconSize?: string;
|
49 | toastTextMinWidth?: string;
|
50 | toastTextPadding?: string;
|
51 | toastDefaultPadding?: string;
|
52 | toastDefaultWidth?: string;
|
53 | toastDefaultMinHeight?: string;
|
54 | toastPositionTopDistance?: string;
|
55 | toastPositionBottomDistance?: string;
|
56 | };
|