UNPKG

@indielayer/ui

Version:

Indielayer UI Components with Tailwind CSS build for Vue 3

159 lines (158 loc) 4.99 kB
import { type PropType, type ExtractPublicPropTypes } from 'vue'; import { type ThemeComponent } from '../../composables/useTheme'; declare const notificationsProps: { align: { type: PropType<"left" | "right">; default: string; validator: (value: string) => boolean; }; position: { type: PropType<"top" | "bottom">; default: string; validator: (value: string) => boolean; }; timeout: { type: NumberConstructor; default: number; }; removable: { type: BooleanConstructor; default: boolean; }; pauseOnHover: { type: BooleanConstructor; default: boolean; }; injectKey: { type: (SymbolConstructor | StringConstructor)[]; default: import("vue").InjectionKey<NotificationInjection>; }; color: { readonly type: StringConstructor; readonly default: string | undefined; }; }; declare const validators: { align: readonly ["left", "right"]; position: readonly ["bottom", "top"]; }; export type NotificationsProps = ExtractPublicPropTypes<typeof notificationsProps>; export type NotificationsAlign = typeof validators.align[number]; export type NotificationsPosition = typeof validators.position[number]; export type NotificationsAction = { onClick: () => void; label: string; color?: string; }; export type NotificationEvent = { id?: number; icon?: string; action?: NotificationsAction; iconColor?: string; title?: string; style?: string; message?: string; timer?: ReturnType<typeof setTimeout>; timerStart?: number; timeout?: number; removable?: boolean; align?: NotificationsAlign; position?: NotificationsPosition; }; export type NotificationInjection = { log: (notification: NotificationEvent | string) => void; info: (notification: NotificationEvent | string) => void; warn: (notification: NotificationEvent | string) => void; error: (notification: NotificationEvent | string) => void; warning: (notification: NotificationEvent | string) => void; success: (notification: NotificationEvent | string) => void; }; type InternalClasses = 'wrapper' | 'list' | 'item'; export interface NotificationsTheme extends ThemeComponent<NotificationsProps, InternalClasses> { } declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{ align: { type: PropType<"left" | "right">; default: string; validator: (value: string) => boolean; }; position: { type: PropType<"top" | "bottom">; default: string; validator: (value: string) => boolean; }; timeout: { type: NumberConstructor; default: number; }; removable: { type: BooleanConstructor; default: boolean; }; pauseOnHover: { type: BooleanConstructor; default: boolean; }; injectKey: { type: (SymbolConstructor | StringConstructor)[]; default: import("vue").InjectionKey<NotificationInjection>; }; color: { readonly type: StringConstructor; readonly default: string | undefined; }; }>, { log: (notification: NotificationEvent | string) => void; info: (notification: NotificationEvent | string) => void; success: (notification: NotificationEvent | string) => void; warn: (notification: NotificationEvent | string) => void; warning: (notification: NotificationEvent | string) => void; error: (notification: NotificationEvent | string) => void; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ align: { type: PropType<"left" | "right">; default: string; validator: (value: string) => boolean; }; position: { type: PropType<"top" | "bottom">; default: string; validator: (value: string) => boolean; }; timeout: { type: NumberConstructor; default: number; }; removable: { type: BooleanConstructor; default: boolean; }; pauseOnHover: { type: BooleanConstructor; default: boolean; }; injectKey: { type: (SymbolConstructor | StringConstructor)[]; default: import("vue").InjectionKey<NotificationInjection>; }; color: { readonly type: StringConstructor; readonly default: string | undefined; }; }>> & Readonly<{}>, { removable: boolean; color: string; position: "top" | "bottom"; align: "left" | "right"; timeout: number; pauseOnHover: boolean; injectKey: string | symbol; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, { default?(_: {}): any; }>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };