vuetify
Version:
Vue Material Component Framework
282 lines (275 loc) • 10.7 kB
TypeScript
import * as vue from 'vue';
import { Ref, EffectScope } from 'vue';
declare const block: readonly ["top", "bottom"];
declare const inline: readonly ["start", "end", "left", "right"];
type Tblock = typeof block[number];
type Tinline = typeof inline[number];
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
declare class Box {
x: number;
y: number;
width: number;
height: number;
constructor({ x, y, width, height }: {
x: number;
y: number;
width: number;
height: number;
});
get top(): number;
get bottom(): number;
get left(): number;
get right(): number;
}
interface LocationStrategyData {
contentEl: Ref<HTMLElement | undefined>;
activatorEl: Ref<HTMLElement | undefined>;
isActive: Ref<boolean>;
isRtl: Ref<boolean>;
}
type LocationStrategyFn = (data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => undefined | {
updateLocation: (e: Event) => void;
};
declare const locationStrategies: {
static: typeof staticLocationStrategy;
connected: typeof connectedLocationStrategy;
};
interface StrategyProps$1 {
locationStrategy: keyof typeof locationStrategies | LocationStrategyFn;
location: Anchor;
origin: Anchor | 'auto' | 'overlap';
offset?: number | string | number[];
maxHeight?: number | string;
maxWidth?: number | string;
minHeight?: number | string;
minWidth?: number | string;
}
declare function staticLocationStrategy(): void;
declare function connectedLocationStrategy(data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>): {
updateLocation: () => {
available: {
x: number;
y: number;
};
contentBox: Box;
} | undefined;
};
interface ScrollStrategyData {
root: Ref<HTMLElement | undefined>;
contentEl: Ref<HTMLElement | undefined>;
activatorEl: Ref<HTMLElement | undefined>;
isActive: Ref<boolean>;
updateLocation: Ref<((e: Event) => void) | undefined>;
}
type ScrollStrategyFn = (data: ScrollStrategyData, props: StrategyProps, scope: EffectScope) => void;
declare const scrollStrategies: {
none: null;
close: typeof closeScrollStrategy;
block: typeof blockScrollStrategy;
reposition: typeof repositionScrollStrategy;
};
interface StrategyProps {
scrollStrategy: keyof typeof scrollStrategies | ScrollStrategyFn;
contained: boolean | undefined;
}
declare function closeScrollStrategy(data: ScrollStrategyData): void;
declare function blockScrollStrategy(data: ScrollStrategyData, props: StrategyProps): void;
declare function repositionScrollStrategy(data: ScrollStrategyData, props: StrategyProps, scope: EffectScope): void;
declare const VOverlay: vue.DefineComponent<{
absolute: boolean;
location: Anchor;
origin: "auto" | Anchor | "overlap";
transition: string | boolean | (vue.TransitionProps & {
component?: vue.Component<any, any, any, vue.ComputedOptions, vue.MethodOptions> | undefined;
});
zIndex: string | number;
eager: boolean;
disabled: boolean;
modelValue: boolean;
activatorProps: Record<string, any>;
openOnHover: boolean;
closeOnContentClick: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
_disableGlobalStack: boolean;
} & {
offset?: string | number | number[] | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
theme?: string | undefined;
contentClass?: any;
activator?: string | Element | vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | undefined;
closeDelay?: string | number | undefined;
openDelay?: string | number | undefined;
openOnClick?: boolean | undefined;
openOnFocus?: boolean | undefined;
contentProps?: any;
attach?: string | boolean | Element | undefined;
} & {
$children?: {} | vue.VNodeChild | {
default?: ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
};
$slots?: {
default?: ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
'v-slots'?: {
default?: false | ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: false | ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
"v-slot:activator"?: false | ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
}, {
activatorEl: Ref<HTMLElement | undefined>;
animateClick: () => void;
contentEl: Ref<HTMLElement | undefined>;
globalTop: Readonly<Ref<boolean>>;
localTop: vue.ComputedRef<boolean>;
updateLocation: Ref<((e: Event) => void) | undefined>;
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'click:outside': (e: MouseEvent) => true;
'update:modelValue': (value: boolean) => true;
afterLeave: () => true;
}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, {
absolute: boolean;
location: Anchor;
origin: "auto" | Anchor | "overlap";
transition: string | boolean | (vue.TransitionProps & {
component?: vue.Component<any, any, any, vue.ComputedOptions, vue.MethodOptions> | undefined;
});
zIndex: string | number;
eager: boolean;
disabled: boolean;
modelValue: boolean;
activatorProps: Record<string, any>;
openOnHover: boolean;
closeOnContentClick: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
_disableGlobalStack: boolean;
} & {
offset?: string | number | number[] | undefined;
height?: string | number | undefined;
width?: string | number | undefined;
maxHeight?: string | number | undefined;
maxWidth?: string | number | undefined;
minHeight?: string | number | undefined;
minWidth?: string | number | undefined;
theme?: string | undefined;
contentClass?: any;
activator?: string | Element | vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | undefined;
closeDelay?: string | number | undefined;
openDelay?: string | number | undefined;
openOnClick?: boolean | undefined;
openOnFocus?: boolean | undefined;
contentProps?: any;
attach?: string | boolean | Element | undefined;
} & {
$children?: {} | vue.VNodeChild | {
default?: ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
};
$slots?: {
default?: ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
'v-slots'?: {
default?: false | ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
activator?: false | ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((args_0: {
isActive: Ref<boolean>;
}) => vue.VNodeChild) | undefined;
"v-slot:activator"?: false | ((args_0: {
isActive: boolean;
props: Record<string, any>;
}) => vue.VNodeChild) | undefined;
} & {
onAfterLeave?: (() => any) | undefined;
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
}, {
absolute: boolean;
location: Anchor;
origin: "auto" | Anchor | "overlap";
transition: string | boolean | (vue.TransitionProps & {
component?: vue.Component<any, any, any, vue.ComputedOptions, vue.MethodOptions> | undefined;
});
zIndex: string | number;
eager: boolean;
disabled: boolean;
modelValue: boolean;
activatorProps: Record<string, any>;
openOnClick: boolean;
openOnHover: boolean;
openOnFocus: boolean;
closeOnContentClick: boolean;
locationStrategy: "connected" | "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
updateLocation: (e: Event) => void;
} | undefined);
scrollStrategy: "none" | "block" | "close" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
closeOnBack: boolean;
contained: boolean;
noClickAnimation: boolean;
persistent: boolean;
scrim: string | boolean;
_disableGlobalStack: boolean;
}>;
type VOverlay = InstanceType<typeof VOverlay>;
export { VOverlay };