UNPKG

@fifteen/design-system-vue

Version:

Vue 3 (Composition API + Typescript) implementation of the Fifteen Design System

111 lines (110 loc) 2.91 kB
export type FPopupOptionValue = any; export interface FPopupOption { label: string; value: FPopupOptionValue; description?: string; } export interface FPopupProps { /** * Control menu visibility state from parent * @model */ modelValue?: boolean; /** * If true, clicking outside the menu won't close it */ persistent?: boolean; /** * Width of the menu */ width?: number | string; /** * Disable the menu */ disabled?: boolean; /** * Disable fade transitions */ inanimated?: boolean; /** * Loading state of the menu */ loading?: boolean; /** * Force the menu to be positioned as `absolute` instead of `fixed` by default */ absolute?: boolean; /** * Set the z-index of the menu */ zIndex?: number | string; /** * Offset in pixels along the activator element */ offsetSkid?: number | string; /** * Offset in pixels away from the trigger element */ offsetDistance?: number | string; /** * Prevent the activator to automatically toggle the menu on click, enter or space */ preventActivation?: boolean; } /** * Toggle the menu */ declare function toggle(): Promise<void>; /** * Open the menu */ declare function open(): void; /** * Close the menu */ declare function close(): void; declare function __VLS_template(): { slots: { activator?(_: { toggle: typeof toggle; open: typeof open; close: typeof close; }): any; default?(_: { toggle: typeof toggle; open: typeof open; close: typeof close; }): any; }; refs: { popupRef: HTMLDivElement; activatorRef: HTMLDivElement; contentRef: HTMLDivElement; }; attrs: Partial<{}>; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<FPopupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { "update:modelValue": (value: boolean) => any; }, string, import('vue').PublicProps, Readonly<FPopupProps> & Readonly<{ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined; }>, { width: number | string; loading: boolean; disabled: boolean; modelValue: boolean; persistent: boolean; inanimated: boolean; absolute: boolean; zIndex: number | string; offsetSkid: number | string; offsetDistance: number | string; preventActivation: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };