UNPKG

vuestic-ui

Version:
187 lines (186 loc) 5.4 kB
import { VNode, AppContext } from 'vue'; import type { ToastOptions } from './types'; export declare const VaToast: import("vue").DefineComponent<{ title: { type: StringConstructor; default: string; }; offsetY: { type: (StringConstructor | NumberConstructor)[]; default: number; }; offsetX: { type: (StringConstructor | NumberConstructor)[]; default: number; }; message: { type: (StringConstructor | FunctionConstructor)[]; default: string; }; dangerouslyUseHtmlString: { type: BooleanConstructor; default: boolean; }; icon: { type: StringConstructor; default: string; }; customClass: { type: StringConstructor; default: string; }; duration: { type: (StringConstructor | NumberConstructor)[]; default: number; }; color: { type: StringConstructor; default: string; }; closeable: { type: BooleanConstructor; default: boolean; }; onClose: { type: FunctionConstructor; }; onClick: { type: FunctionConstructor; }; multiLine: { type: BooleanConstructor; default: boolean; }; position: { type: import("vue").PropType<import("./types").ToastPosition>; default: string; validator: (value: string) => boolean; }; render: { type: FunctionConstructor; }; ariaCloseLabel: { type: import("vue").PropType<import("../../composables").TranslationProp>; default: import("../../composables").TranslationProp; }; role: { type: import("vue").PropType<import("../../utils/types/prop-type").StringWithAutocomplete<"alert" | "alertdialog" | "status">>; default: undefined; }; inline: { type: BooleanConstructor; default: boolean; }; preset: { type: import("vue").PropType<import("../../composables").PresetPropValue>; default: undefined; }; }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { "on-click": (...args: any[]) => void; "on-close": (...args: any[]) => void; }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ title: { type: StringConstructor; default: string; }; offsetY: { type: (StringConstructor | NumberConstructor)[]; default: number; }; offsetX: { type: (StringConstructor | NumberConstructor)[]; default: number; }; message: { type: (StringConstructor | FunctionConstructor)[]; default: string; }; dangerouslyUseHtmlString: { type: BooleanConstructor; default: boolean; }; icon: { type: StringConstructor; default: string; }; customClass: { type: StringConstructor; default: string; }; duration: { type: (StringConstructor | NumberConstructor)[]; default: number; }; color: { type: StringConstructor; default: string; }; closeable: { type: BooleanConstructor; default: boolean; }; onClose: { type: FunctionConstructor; }; onClick: { type: FunctionConstructor; }; multiLine: { type: BooleanConstructor; default: boolean; }; position: { type: import("vue").PropType<import("./types").ToastPosition>; default: string; validator: (value: string) => boolean; }; render: { type: FunctionConstructor; }; ariaCloseLabel: { type: import("vue").PropType<import("../../composables").TranslationProp>; default: import("../../composables").TranslationProp; }; role: { type: import("vue").PropType<import("../../utils/types/prop-type").StringWithAutocomplete<"alert" | "alertdialog" | "status">>; default: undefined; }; inline: { type: BooleanConstructor; default: boolean; }; preset: { type: import("vue").PropType<import("../../composables").PresetPropValue>; default: undefined; }; }>> & { "onOn-click"?: ((...args: any[]) => any) | undefined; "onOn-close"?: ((...args: any[]) => any) | undefined; }, { title: string; preset: import("../../composables").PresetPropValue; color: string; icon: string; closeable: boolean; message: string | Function; ariaCloseLabel: import("../../composables").TranslationProp; multiLine: boolean; role: import("../../utils/types/prop-type").StringWithAutocomplete<"alert" | "alertdialog" | "status">; position: import("./types").ToastPosition; inline: boolean; offsetY: string | number; offsetX: string | number; dangerouslyUseHtmlString: boolean; customClass: string; duration: string | number; }, {}>; declare global { interface Window { vaToastInstances: VNode[]; } } export type VaToastId = string; export declare const closeAllNotifications: (appContext?: AppContext) => void; export declare const closeById: (id: string) => void; export declare const createToastInstance: (customProps: ToastOptions | string, appContext?: AppContext) => VaToastId | null; export type { ToastOptions as NotificationOptions } from './types';