UNPKG

@coreui/vue

Version:

UI Components Library for Vue.js

232 lines (231 loc) 8.16 kB
import { PropType } from 'vue'; import type { Placement } from '@popperjs/core'; import type { Triggers } from '../../types'; import type { Alignments } from './types'; declare const CDropdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ /** * Set aligment of dropdown menu. * * @values { 'start' | 'end' | { xs: 'start' | 'end' } | { sm: 'start' | 'end' } | { md: 'start' | 'end' } | { lg: 'start' | 'end' } | { xl: 'start' | 'end'} | { xxl: 'start' | 'end'} } */ alignment: { type: PropType<string | Alignments>; validator: (value: string | any) => boolean; }; /** * Configure the auto close behavior of the dropdown: * - `true` - the dropdown will be closed by clicking outside or inside the dropdown menu. * - `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key) * - `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu. * - `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu. */ autoClose: { type: (StringConstructor | BooleanConstructor)[]; default: boolean; validator: (value: boolean | string) => boolean; }; /** * Appends the vue dropdown menu 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; }; /** * Sets a darker color scheme to match a dark navbar. */ dark: BooleanConstructor; /** * Sets a specified direction and location of the dropdown menu. * * @values 'center', 'dropup', 'dropup-center', 'dropend', 'dropstart' */ direction: { type: StringConstructor; validator: (value: string) => boolean; }; /** * Toggle the disabled state for the component. */ disabled: BooleanConstructor; /** * Offset of the dropdown menu relative to its target. * * @since 4.9.0 */ 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. * * @values 'auto', 'top-end', 'top', 'top-start', 'bottom-end', 'bottom', 'bottom-start', 'right-start', 'right', 'right-end', 'left-start', 'left', 'left-end' */ placement: { type: PropType<Placement>; default: string; }; /** * If you want to disable dynamic positioning set this property to `true`. */ popper: { type: BooleanConstructor; default: boolean; }; /** * Generates dropdown menu using Teleport. * * @since 5.0.0 */ teleport: { type: BooleanConstructor; default: boolean; }; /** * Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. */ trigger: { type: PropType<Triggers>; default: string; }; /** * Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. * * @values 'btn-group', 'dropdown', 'input-group', 'nav-item' */ variant: { type: StringConstructor; default: string; validator: (value: string) => boolean; }; /** * Toggle the visibility of dropdown menu component. */ visible: BooleanConstructor; }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }> | (import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { [key: string]: any; }>[] | undefined)[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show")[], "hide" | "show", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** * Set aligment of dropdown menu. * * @values { 'start' | 'end' | { xs: 'start' | 'end' } | { sm: 'start' | 'end' } | { md: 'start' | 'end' } | { lg: 'start' | 'end' } | { xl: 'start' | 'end'} | { xxl: 'start' | 'end'} } */ alignment: { type: PropType<string | Alignments>; validator: (value: string | any) => boolean; }; /** * Configure the auto close behavior of the dropdown: * - `true` - the dropdown will be closed by clicking outside or inside the dropdown menu. * - `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key) * - `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu. * - `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu. */ autoClose: { type: (StringConstructor | BooleanConstructor)[]; default: boolean; validator: (value: boolean | string) => boolean; }; /** * Appends the vue dropdown menu 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; }; /** * Sets a darker color scheme to match a dark navbar. */ dark: BooleanConstructor; /** * Sets a specified direction and location of the dropdown menu. * * @values 'center', 'dropup', 'dropup-center', 'dropend', 'dropstart' */ direction: { type: StringConstructor; validator: (value: string) => boolean; }; /** * Toggle the disabled state for the component. */ disabled: BooleanConstructor; /** * Offset of the dropdown menu relative to its target. * * @since 4.9.0 */ 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. * * @values 'auto', 'top-end', 'top', 'top-start', 'bottom-end', 'bottom', 'bottom-start', 'right-start', 'right', 'right-end', 'left-start', 'left', 'left-end' */ placement: { type: PropType<Placement>; default: string; }; /** * If you want to disable dynamic positioning set this property to `true`. */ popper: { type: BooleanConstructor; default: boolean; }; /** * Generates dropdown menu using Teleport. * * @since 5.0.0 */ teleport: { type: BooleanConstructor; default: boolean; }; /** * Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. */ trigger: { type: PropType<Triggers>; default: string; }; /** * Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. * * @values 'btn-group', 'dropdown', 'input-group', 'nav-item' */ variant: { type: StringConstructor; default: string; validator: (value: string) => boolean; }; /** * Toggle the visibility of dropdown menu component. */ visible: BooleanConstructor; }>> & Readonly<{ onHide?: ((...args: any[]) => any) | undefined; onShow?: ((...args: any[]) => any) | undefined; }>, { visible: boolean; dark: boolean; disabled: boolean; variant: string; container: string | HTMLElement | (() => HTMLElement); teleport: boolean; placement: Placement; autoClose: string | boolean; offset: unknown[]; popper: boolean; trigger: Triggers; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export { CDropdown };