OverlayPanel d.ts updated

pull/3689/head
Tuğçe Küçükoğlu 2023-03-01 13:19:01 +03:00
parent e25ee1e553
commit e57700ca6b
1 changed files with 47 additions and 27 deletions

View File

@ -1,8 +1,18 @@
/**
*
* OverlayPanel is a container component positioned as connected to its target.
*
* - [Live Demo](https://www.primefaces.org/primevue/overlaypanel)
*
* @module overlaypanel
*
*/
import { VNode } from 'vue'; import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type OverlayPanelAppendToType = 'body' | 'self' | string | undefined | HTMLElement; /**
* OverlayPanel breakpoint metadata.
*/
export interface OverlayPanelBreakpoints { export interface OverlayPanelBreakpoints {
/** /**
* Breakpoint for responsive mode. * Breakpoint for responsive mode.
@ -22,58 +32,77 @@ export interface OverlayPanelBreakpoints {
[key: string]: string; [key: string]: string;
} }
/**
* Defines valid properties in OverlayPanel component.
*/
export interface OverlayPanelProps { export interface OverlayPanelProps {
/** /**
* Enables to hide the overlay when outside is clicked. * Enables to hide the overlay when outside is clicked.
* Default value is true. * @defaultValue true
*/ */
dismissable?: boolean; dismissable?: boolean;
/** /**
* When enabled, displays a close icon at top right corner. * When enabled, displays a close icon at top right corner.
* @defaultValue false
*/ */
showCloseIcon?: boolean; showCloseIcon?: boolean;
/** /**
* A valid query selector or an HTMLElement to specify where the overlay gets attached. * A valid query selector or an HTMLElement to specify where the overlay gets attached.
* @see OverlayPanelAppendToType * @defaultValue body
* Default value is 'body'.
*/ */
appendTo?: OverlayPanelAppendToType; appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
/** /**
* Base zIndex value to use in layering. * Base zIndex value to use in layering.
* Default value is 0. * @defaultValue 0
*/ */
baseZIndex?: number; baseZIndex?: number;
/** /**
* Whether to automatically manage layering. * Whether to automatically manage layering.
* Default value is true. * @defaultValue true
*/ */
autoZIndex?: boolean; autoZIndex?: boolean;
/** /**
* Object literal to define widths per screen size. * Object literal to define widths per screen size.
* @see OverlayPanelBreakpoints
*/ */
breakpoints?: OverlayPanelBreakpoints; breakpoints?: OverlayPanelBreakpoints;
} }
/**
* Defines valid slots in OverlayPanel component.
*/
export interface OverlayPanelSlots { export interface OverlayPanelSlots {
/** /**
* Custom content template. * Custom content template.
*/ */
default: () => VNode[]; default(): VNode[];
} }
export declare type OverlayPanelEmits = { /**
* Defines valid emits in OverlayPanel component.
*/
export interface OverlayPanelEmits {
/** /**
* Callback to invoke when the overlay is shown. * Callback to invoke when the overlay is shown.
*/ */
show: () => void; show(): void;
/** /**
* Callback to invoke when the overlay is hidden. * Callback to invoke when the overlay is hidden.
*/ */
hide: () => void; hide(): void;
}; }
declare class OverlayPanel extends ClassComponent<OverlayPanelProps, OverlayPanelSlots, OverlayPanelEmits> { /**
* **PrimeVue - OverlayPanel**
*
* _OverlayPanel, also known as Popover, is a container component that can overlay other components on page._
*
* [Live Demo](https://www.primevue.org/overlaypanel/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
*
* @group Component
*/
export declare class OverlayPanel extends ClassComponent<OverlayPanelProps, OverlayPanelSlots, OverlayPanelEmits> {
/** /**
* Toggles the visibility of the overlay. * Toggles the visibility of the overlay.
* @param {Event} event - Browser event. * @param {Event} event - Browser event.
@ -81,7 +110,7 @@ declare class OverlayPanel extends ClassComponent<OverlayPanelProps, OverlayPane
* *
* @memberof OverlayPanel * @memberof OverlayPanel
*/ */
toggle: (event: Event, target?: any) => void; toggle(event: Event, target?: any): void;
/** /**
* Shows the overlay. * Shows the overlay.
* @param {Event} event - Browser event. * @param {Event} event - Browser event.
@ -89,13 +118,13 @@ declare class OverlayPanel extends ClassComponent<OverlayPanelProps, OverlayPane
* *
* @memberof OverlayPanel * @memberof OverlayPanel
*/ */
show: (event: Event, target?: any) => void; show(event: Event, target?: any): void;
/** /**
* Hides the overlay. * Hides the overlay.
* *
* @memberof OverlayPanel * @memberof OverlayPanel
*/ */
hide: () => void; hide(): void;
} }
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
@ -104,13 +133,4 @@ declare module '@vue/runtime-core' {
} }
} }
/**
*
* OverlayPanel is a container component positioned as connected to its target.
*
* Demos:
*
* - [OverlayPanel](https://www.primefaces.org/primevue/overlaypanel)
*
*/
export default OverlayPanel; export default OverlayPanel;