UNPKG

naive-ui

Version:

A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast

375 lines (374 loc) 13.5 kB
import { type ImgHTMLAttributes, type PropType } from 'vue'; import type { ExtractPublicPropTypes } from '../../_utils'; import type { IntersectionObserverOptions } from './utils'; export interface ImageInst { click: () => void; } export declare const imageProps: { onPreviewPrev: PropType<() => void>; onPreviewNext: PropType<() => void>; showToolbar: { type: BooleanConstructor; default: boolean; }; showToolbarTooltip: BooleanConstructor; renderToolbar: PropType<import("./public-types").ImageRenderToolbar>; theme: PropType<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>; themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>>; builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>>; alt: StringConstructor; height: PropType<string | number>; imgProps: PropType<ImgHTMLAttributes>; previewedImgProps: PropType<ImgHTMLAttributes>; lazy: BooleanConstructor; intersectionObserverOptions: PropType<IntersectionObserverOptions>; objectFit: { type: PropType<"fill" | "contain" | "cover" | "none" | "scale-down">; default: string; }; previewSrc: StringConstructor; fallbackSrc: StringConstructor; width: PropType<string | number>; src: StringConstructor; previewDisabled: BooleanConstructor; loadDescription: StringConstructor; onError: PropType<(e: Event) => void>; onLoad: PropType<(e: Event) => void>; }; export type ImageProps = ExtractPublicPropTypes<typeof imageProps>; declare const _default: import("vue").DefineComponent<{ onPreviewPrev: PropType<() => void>; onPreviewNext: PropType<() => void>; showToolbar: { type: BooleanConstructor; default: boolean; }; showToolbarTooltip: BooleanConstructor; renderToolbar: PropType<import("./public-types").ImageRenderToolbar>; theme: PropType<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>; themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>>; builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>>; alt: StringConstructor; height: PropType<string | number>; imgProps: PropType<ImgHTMLAttributes>; previewedImgProps: PropType<ImgHTMLAttributes>; lazy: BooleanConstructor; intersectionObserverOptions: PropType<IntersectionObserverOptions>; objectFit: { type: PropType<"fill" | "contain" | "cover" | "none" | "scale-down">; default: string; }; previewSrc: StringConstructor; fallbackSrc: StringConstructor; width: PropType<string | number>; src: StringConstructor; previewDisabled: BooleanConstructor; loadDescription: StringConstructor; onError: PropType<(e: Event) => void>; onLoad: PropType<(e: Event) => void>; }, { click: () => void; mergedClsPrefix: import("vue").Ref<string>; groupId: string | undefined; previewInstRef: import("vue").Ref<{ setThumbnailEl: (e: HTMLImageElement | null) => void; setPreviewSrc: (src?: string) => void; toggleShow: () => void; } | null>; imageRef: import("vue").Ref<HTMLImageElement | null>; showError: import("vue").Ref<boolean>; shouldStartLoading: import("vue").Ref<boolean>; loaded: import("vue").Ref<boolean>; mergedOnClick: (e: MouseEvent) => void; mergedOnError: (e: Event) => void; mergedOnLoad: (e: Event) => void; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ onPreviewPrev: PropType<() => void>; onPreviewNext: PropType<() => void>; showToolbar: { type: BooleanConstructor; default: boolean; }; showToolbarTooltip: BooleanConstructor; renderToolbar: PropType<import("./public-types").ImageRenderToolbar>; theme: PropType<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>; themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>>; builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Image", { toolbarIconColor: string; toolbarColor: string; toolbarBoxShadow: string; toolbarBorderRadius: string; }, { Tooltip: import("../../_mixins").Theme<"Tooltip", { borderRadius: string; boxShadow: string; color: string; textColor: string; padding: string; }, { Popover: import("../../_mixins").Theme<"Popover", { fontSize: string; borderRadius: string; color: string; dividerColor: string; textColor: string; boxShadow: string; space: string; spaceArrow: string; arrowOffset: string; arrowOffsetVertical: string; arrowHeight: string; padding: string; }, any>; }>; }>>>; alt: StringConstructor; height: PropType<string | number>; imgProps: PropType<ImgHTMLAttributes>; previewedImgProps: PropType<ImgHTMLAttributes>; lazy: BooleanConstructor; intersectionObserverOptions: PropType<IntersectionObserverOptions>; objectFit: { type: PropType<"fill" | "contain" | "cover" | "none" | "scale-down">; default: string; }; previewSrc: StringConstructor; fallbackSrc: StringConstructor; width: PropType<string | number>; src: StringConstructor; previewDisabled: BooleanConstructor; loadDescription: StringConstructor; onError: PropType<(e: Event) => void>; onLoad: PropType<(e: Event) => void>; }>>, { lazy: boolean; objectFit: "fill" | "none" | "contain" | "cover" | "scale-down"; showToolbar: boolean; showToolbarTooltip: boolean; previewDisabled: boolean; }, {}>; export default _default;