UNPKG

maz-ui

Version:

A standalone components library for Vue.Js 3 & Nuxt.Js 3

79 lines (78 loc) 2.69 kB
import { HTMLAttributes } from 'vue'; import { VLazyImgOptions } from '../directives/vLazyImg'; interface Source { srcset?: string; media?: string; } interface DataImage { sources?: Source[]; } export type MazImage = DataImage | string; export interface MazLazyImgProps { /** The style of the component */ style?: HTMLAttributes['style']; /** The class of the component */ class?: HTMLAttributes['class']; /** * The source of the image * @type {string | Image | null} */ src?: MazImage | null; /** The alt of the image */ alt?: string; /** Remove the loader */ hideLoader?: boolean; /** Remove the observer once the image is loaded */ observerOnce?: boolean; /** Remove the observer once the image is loaded */ loadOnce?: boolean; /** Make the image height full */ imageHeightFull?: boolean; /** The options of the observer */ observerOptions?: VLazyImgOptions['observerOptions']; /** The fallback src to replace the src on loading error */ fallbackSrc?: string; /** The classes of the image element */ imgClass?: HTMLAttributes['class']; /** The image will be displayed in full width */ block?: boolean; } declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: {}): any; }; refs: {}; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<MazLazyImgProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { error: (el: Element) => any; loaded: (el: Element) => any; loading: (el: Element) => any; intersecting: (el: Element) => any; }, string, import('vue').PublicProps, Readonly<MazLazyImgProps> & Readonly<{ onError?: ((el: Element) => any) | undefined; onLoaded?: ((el: Element) => any) | undefined; onLoading?: ((el: Element) => any) | undefined; onIntersecting?: ((el: Element) => any) | undefined; }>, { src: MazImage | null; style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null; class: HTMLAttributes["class"]; alt: string; observerOnce: boolean; observerOptions: { root?: HTMLElement | null; threshold: number; rootMargin?: string; }; fallbackSrc: string; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };