@opencloud-eu/design-system
Version:
OpenCloud Design System is used to design OpenCloud UI components
99 lines (98 loc) • 2.98 kB
TypeScript
import { Props as TippyProps } from 'tippy.js';
import { SizeType } from '../../helpers';
export interface Props {
/**
* @docs Determines if the drop should close when clicked.
* @default false
*/
closeOnClick?: boolean;
/**
* @docs The element ID of the drop.
*/
dropId?: string;
/**
* @docs Determines if the drop is nested.
* @default false
*/
isNested?: boolean;
/**
* @docs Determines the event that triggers the drop.
* @default 'click'
*/
mode?: 'click' | 'hover' | 'manual';
/**
* @docs The visual offset of the drop.
*/
offset?: string;
/**
* @docs The padding size of the drop.
* @default 'medium'
*/
paddingSize?: SizeType | 'remove';
/**
* @docs The popper options of the drop. Please refer to the component source for more information.
*/
popperOptions?: TippyProps['popperOptions'];
/**
* @docs The position of the drop.
* @default 'bottom-start'
*/
position?: 'top-start' | 'right-start' | 'bottom-start' | 'left-start' | 'auto-start' | 'top-end' | 'right-end' | 'bottom-end' | 'left-end' | 'auto-end';
/**
* @docs Element selector that can be used as a target of the drop.
*/
target?: string;
/**
* @docs CSS selector for the element to be used as toggle. By default, the preceding element is used.
*/
toggle?: string;
}
export interface Emits {
/**
* @docs Emitted when the drop has been hidden.
*/
(e: 'hideDrop'): void;
/**
* @docs Emitted when the drop has been displayed.
*/
(e: 'showDrop'): void;
}
export interface Slots {
/**
* @docs Content of the drop that is displayed in a card-style.
*/
default?: () => unknown;
/**
* @docs This slot can be used if you don't want the drop to be displayed in a card-style.
*/
special?: () => unknown;
}
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: Readonly<Slots> & Slots;
refs: {
drop: HTMLDivElement;
};
rootEl: HTMLDivElement;
};
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare const __VLS_component: import('vue').DefineComponent<Props, {
show: (duration?: number) => void;
hide: (duration?: number) => void;
tippy: import('vue').Ref<any, any>;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
hideDrop: () => any;
showDrop: () => any;
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
onHideDrop?: () => any;
onShowDrop?: () => any;
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
drop: HTMLDivElement;
}, HTMLDivElement>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};