@coreui/vue
Version:
UI Components Library for Vue.js
181 lines (180 loc) • 6.4 kB
TypeScript
import { PropType, RendererElement } from 'vue';
import type { Placement } from '@popperjs/core';
import type { Placements, Triggers } from '../../types';
declare const CPopover: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* Apply a CSS fade transition to the popover.
*
* @since 4.9.0
*/
animation: {
type: BooleanConstructor;
default: boolean;
};
/**
* Appends the vue popover to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`.
*
* @since 5.0.0
*/
container: {
type: PropType<HTMLElement | (() => HTMLElement) | string>;
default: string;
};
/**
* Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
*/
content: StringConstructor;
/**
* The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
*
* @since 4.9.0
*/
delay: {
type: PropType<number | {
show: number;
hide: number;
}>;
default: number;
};
/**
* Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
*
* @since 4.9.0
*/
fallbackPlacements: {
type: PropType<Placements | Placements[]>;
default: () => string[];
validator: (value: Placements | Placements[]) => boolean;
};
/**
* Offset of the popover relative to its target.
*/
offset: {
type: ArrayConstructor;
default: () => number[];
};
/**
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
*/
placement: {
type: PropType<Placement>;
default: string;
validator: (value: string) => boolean;
};
/**
* Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
*/
title: StringConstructor;
/**
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
*
* @values 'click', 'focus', 'hover'
*/
trigger: {
type: PropType<Triggers | Triggers[]>;
default: string;
validator: (value: Triggers | Triggers[]) => boolean;
};
/**
* Toggle the visibility of popover component.
*/
visible: BooleanConstructor;
}>, () => (import("vue").VNode<import("vue").RendererNode, RendererElement, {
[key: string]: any;
}> | import("vue").VNode<import("vue").RendererNode, RendererElement, {
[key: string]: any;
}>[] | undefined)[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show")[], "hide" | "show", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* Apply a CSS fade transition to the popover.
*
* @since 4.9.0
*/
animation: {
type: BooleanConstructor;
default: boolean;
};
/**
* Appends the vue popover to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`.
*
* @since 5.0.0
*/
container: {
type: PropType<HTMLElement | (() => HTMLElement) | string>;
default: string;
};
/**
* Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
*/
content: StringConstructor;
/**
* The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`.
*
* @since 4.9.0
*/
delay: {
type: PropType<number | {
show: number;
hide: number;
}>;
default: number;
};
/**
* Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference.
*
* @since 4.9.0
*/
fallbackPlacements: {
type: PropType<Placements | Placements[]>;
default: () => string[];
validator: (value: Placements | Placements[]) => boolean;
};
/**
* Offset of the popover relative to its target.
*/
offset: {
type: ArrayConstructor;
default: () => number[];
};
/**
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
*/
placement: {
type: PropType<Placement>;
default: string;
validator: (value: string) => boolean;
};
/**
* Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
*/
title: StringConstructor;
/**
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
*
* @values 'click', 'focus', 'hover'
*/
trigger: {
type: PropType<Triggers | Triggers[]>;
default: string;
validator: (value: Triggers | Triggers[]) => boolean;
};
/**
* Toggle the visibility of popover component.
*/
visible: BooleanConstructor;
}>> & Readonly<{
onHide?: ((...args: any[]) => any) | undefined;
onShow?: ((...args: any[]) => any) | undefined;
}>, {
visible: boolean;
container: string | HTMLElement | (() => HTMLElement);
placement: Placement;
offset: unknown[];
trigger: Triggers | Triggers[];
animation: boolean;
delay: number | {
show: number;
hide: number;
};
fallbackPlacements: string | string[];
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export { CPopover };