hongluan-ui
Version:
Hongluan Component Library for Vue 3
168 lines (167 loc) • 4.47 kB
TypeScript
import type { ExtractPropTypes, PropType } from 'vue';
declare type DoneFn = (cancel?: boolean) => void;
export declare type DialogBeforeCloseFn = (done: DoneFn) => void;
export declare const dialogProps: {
borderless: BooleanConstructor;
outlineless: BooleanConstructor;
collapsed: BooleanConstructor;
fullscreen: {
type: PropType<boolean | Record<"left" | "right" | "top" | "bottom", string>>;
default: boolean;
};
radius: StringConstructor;
headerHeight: StringConstructor;
padding: StringConstructor;
bodyPadding: StringConstructor;
footerPadding: StringConstructor;
headerClass: StringConstructor;
headerStyle: StringConstructor;
bodyClass: StringConstructor;
bodyStyle: StringConstructor;
footerClass: StringConstructor;
footerStyle: StringConstructor;
fullBody: BooleanConstructor;
showAs: {
type: PropType<import("./dialog-content").DialogShowAs>;
default: string;
};
showClose: {
type: BooleanConstructor;
default: boolean;
};
customClass: {
type: StringConstructor;
default: string;
};
placement: {
type: PropType<import("./dialog-content").DialogPlacement>;
default: string;
};
top: {
type: StringConstructor;
default: string;
};
title: {
type: StringConstructor;
default: string;
};
height: {
type: StringConstructor;
};
width: {
type: StringConstructor;
};
resizable: BooleanConstructor;
draggable: BooleanConstructor;
ariaLevel: {
type: StringConstructor;
default: string;
};
/**
* @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`
*/
appendToBody: BooleanConstructor;
/**
* @description which element the Dialog appends to
*/
appendTo: {
type: (StringConstructor | {
new (): HTMLElement;
prototype: HTMLElement;
})[];
default: string;
};
/**
* @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog
*/
beforeClose: {
type: PropType<DialogBeforeCloseFn>;
};
/**
* @description destroy elements in Dialog when closed
*/
destroyOnClose: BooleanConstructor;
/**
* @description whether the Dialog can be closed by clicking the mask
*/
closeOnClickModal: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description whether the Dialog can be closed by pressing ESC
*/
closeOnPressEscape: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description whether scroll of body is disabled while Dialog is displayed
*/
lockScroll: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description whether a mask is displayed
*/
modal: {
type: BooleanConstructor;
default: boolean;
};
animationName: {
type: StringConstructor;
default: string;
};
/**
* @description the Time(milliseconds) before open
*/
openDelay: {
type: NumberConstructor;
default: number;
};
/**
* @description the Time(milliseconds) before close
*/
closeDelay: {
type: NumberConstructor;
default: number;
};
/**
* @description visibility of Dialog
*/
modelValue: {
type: BooleanConstructor;
default: boolean;
};
/**
* @description custom class names for mask
*/
modalClass: StringConstructor;
/**
* @description same as z-index in native CSS, z-order of dialog
*/
zIndex: {
type: NumberConstructor;
};
trapFocus: BooleanConstructor;
/**
* @description header's aria-level attribute
*/
headerAriaLevel: {
type: StringConstructor;
default: string;
};
};
export declare type DialogProps = ExtractPropTypes<typeof dialogProps>;
export declare const dialogEmits: {
open: () => boolean;
opened: () => boolean;
close: () => boolean;
closed: () => boolean;
"update:modelValue": (value: boolean) => boolean;
openAutoFocus: () => boolean;
closeAutoFocus: () => boolean;
};
export declare type DialogEmits = typeof dialogEmits;
export {};