primevue-mirror/components/sidebar/Sidebar.d.ts

94 lines
2.2 KiB
TypeScript
Raw Normal View History

2022-09-06 12:03:37 +00:00
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type SidebarPositionType = 'left' | 'right' | 'top' | 'bottom' | 'full' | undefined;
export interface SidebarProps {
/**
* Specifies the visibility of the dialog.
*/
visible?: boolean | undefined;
/**
* Specifies the position of the sidebar.
* @see SidebarPositionType
* Default value is 'left'.
*/
position?: SidebarPositionType;
/**
* Base zIndex value to use in layering.
* Default value is 0.
*/
baseZIndex?: number | undefined;
/**
* Whether to automatically manage layering.
* Default value is true.
*/
autoZIndex?: boolean | undefined;
/**
* Whether clicking outside closes the panel.
* Default value is true.
*/
dismissable?: boolean | undefined;
/**
* Whether to display a close icon inside the panel.
* Default value is true.
*/
showCloseIcon?: boolean | undefined;
2022-12-08 11:04:25 +00:00
/**
* Icon to display in the sidebar close button.
* Default value is 'pi pi-times'.
*/
closeIcon?: string | undefined;
2022-09-06 12:03:37 +00:00
/**
* Whether to a modal layer behind the sidebar.
* Default value is true.
*/
modal?: boolean | undefined;
}
export interface SidebarSlots {
/**
* Custom content template.
*/
default: () => VNode[];
/**
* Custom header template.
*/
header: () => VNode[];
}
export declare type SidebarEmits = {
/**
* Emitted when the value changes.
* @param {boolean} value - New value.
*/
'update:modelValue': (value: boolean) => void;
/**
* Callback to invoke when sidebar gets shown.
*/
2022-09-14 11:26:01 +00:00
show: () => void;
2022-09-06 12:03:37 +00:00
/**
* Callback to invoke when sidebar gets hidden.
*/
2022-09-14 11:26:01 +00:00
hide: () => void;
};
2022-09-06 12:03:37 +00:00
2022-09-14 11:26:01 +00:00
declare class Sidebar extends ClassComponent<SidebarProps, SidebarSlots, SidebarEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Sidebar: GlobalComponentConstructor<Sidebar>;
2022-09-06 12:03:37 +00:00
}
}
/**
*
* Sidebar is a panel component displayed as an overlay at the edges of the screen.
*
* Demos:
*
2022-09-14 11:26:01 +00:00
* - [Sidebar](https://www.primefaces.org/primevue/sidebar)
2022-09-06 12:03:37 +00:00
*
*/
export default Sidebar;