Dock d.ts updated
parent
d8470f9673
commit
f5aaac6df7
|
@ -1,29 +1,38 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Dock is a navigation component consisting of menuitems.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/dock/)
|
||||||
|
*
|
||||||
|
* @module dock
|
||||||
|
*
|
||||||
|
*/
|
||||||
import { VNode } from 'vue';
|
import { VNode } from 'vue';
|
||||||
import { MenuItem } from '../menuitem';
|
import { MenuItem } from '../menuitem';
|
||||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
|
|
||||||
type DockPositionType = 'bottom' | 'top' | 'left' | 'right' | undefined;
|
/**
|
||||||
|
* Defines tooltip options
|
||||||
type DockTooltipEventType = 'hover' | 'focus' | undefined;
|
*/
|
||||||
|
|
||||||
export interface DockTooltipOptions {
|
export interface DockTooltipOptions {
|
||||||
/**
|
/**
|
||||||
* Event to show the tooltip, valid values are hover and focus.
|
* Event to show the tooltip, valid values are hover and focus.
|
||||||
* @see DockTooltipEventType
|
|
||||||
*/
|
*/
|
||||||
event: string;
|
event: 'hover' | 'focus' | undefined;
|
||||||
/**
|
/**
|
||||||
* Position of element.
|
* Position of element.
|
||||||
* @see DockPositionType
|
* @defaultValue bottom
|
||||||
* Default value is 'bottom'.
|
|
||||||
*/
|
*/
|
||||||
position: string;
|
position: 'bottom' | 'top' | 'left' | 'right' | undefined;
|
||||||
/**
|
/**
|
||||||
* Optional options.
|
* Optional options.
|
||||||
*/
|
*/
|
||||||
[key: string]: string;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid properties in Dock component.
|
||||||
|
*/
|
||||||
export interface DockProps {
|
export interface DockProps {
|
||||||
/**
|
/**
|
||||||
* MenuModel instance to define the action items.
|
* MenuModel instance to define the action items.
|
||||||
|
@ -31,10 +40,9 @@ export interface DockProps {
|
||||||
model?: MenuItem[] | undefined;
|
model?: MenuItem[] | undefined;
|
||||||
/**
|
/**
|
||||||
* Position of element.
|
* Position of element.
|
||||||
* @see DockPositionType
|
* @defaultValue bottom
|
||||||
* Default value is 'bottom'.
|
|
||||||
*/
|
*/
|
||||||
position?: DockPositionType;
|
position?: 'bottom' | 'top' | 'left' | 'right' | undefined;
|
||||||
/**
|
/**
|
||||||
* Style class of the element.
|
* Style class of the element.
|
||||||
*/
|
*/
|
||||||
|
@ -45,12 +53,12 @@ export interface DockProps {
|
||||||
style?: any;
|
style?: any;
|
||||||
/**
|
/**
|
||||||
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||||||
* Default value is true.
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
exact?: boolean | undefined;
|
exact?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to display the tooltip on items. The modifiers of Tooltip can be used like an object in it. Valid keys are 'event' and 'position'.
|
* Whether to display the tooltip on items. The modifiers of Tooltip can be used like an object in it. Valid keys are 'event' and 'position'.
|
||||||
* @see DockTooltipOptions
|
* @type {DockTooltipOptions}
|
||||||
*/
|
*/
|
||||||
tooltipOptions?: DockTooltipOptions;
|
tooltipOptions?: DockTooltipOptions;
|
||||||
/**
|
/**
|
||||||
|
@ -71,12 +79,15 @@ export interface DockProps {
|
||||||
'aria-label'?: string | undefined;
|
'aria-label'?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in Dock component.
|
||||||
|
*/
|
||||||
export interface DockSlots {
|
export interface DockSlots {
|
||||||
/**
|
/**
|
||||||
* Custom item content.
|
* Custom item content.
|
||||||
* @param {Object} scope - item slot's params.
|
* @param {Object} scope - item slot's params.
|
||||||
*/
|
*/
|
||||||
item: (scope: {
|
item(scope: {
|
||||||
/**
|
/**
|
||||||
* Custom content for item.
|
* Custom content for item.
|
||||||
*/
|
*/
|
||||||
|
@ -85,32 +96,47 @@ export interface DockSlots {
|
||||||
* Index of the menuitem
|
* Index of the menuitem
|
||||||
*/
|
*/
|
||||||
index: number;
|
index: number;
|
||||||
}) => VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom icon content.
|
* Custom icon content.
|
||||||
* @param {Object} scope - icon slot's params.
|
* @param {Object} scope - icon slot's params.
|
||||||
*/
|
*/
|
||||||
icon: (scope: {
|
icon(scope: {
|
||||||
/**
|
/**
|
||||||
* Custom content for icon.
|
* Custom content for icon.
|
||||||
*/
|
*/
|
||||||
item: MenuItem;
|
item: MenuItem;
|
||||||
}) => VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare type DockEmits = {
|
/**
|
||||||
|
* Defines valid emits in Dock component.
|
||||||
|
*/
|
||||||
|
export interface DockEmits {
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when the component receives focus.
|
* Callback to invoke when the component receives focus.
|
||||||
* @param {Event} event - Browser event.
|
* @param {Event} event - Browser event.
|
||||||
*/
|
*/
|
||||||
focus: (event: Event) => void;
|
focus(event: Event): void;
|
||||||
/**
|
/**
|
||||||
* Callback to invoke when the component loses focus.
|
* Callback to invoke when the component loses focus.
|
||||||
* @param {Event} event - Browser event.
|
* @param {Event} event - Browser event.
|
||||||
*/
|
*/
|
||||||
blur: (event: Event) => void;
|
blur(event: Event): void;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - Dock**
|
||||||
|
*
|
||||||
|
* _Dock is a navigation component consisting of menuitems._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/dock/)
|
||||||
|
* --- ---
|
||||||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*
|
||||||
|
*/
|
||||||
declare class Dock extends ClassComponent<DockProps, DockSlots, DockEmits> {}
|
declare class Dock extends ClassComponent<DockProps, DockSlots, DockEmits> {}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
|
@ -119,17 +145,4 @@ declare module '@vue/runtime-core' {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Dock is a navigation component consisting of menuitems.
|
|
||||||
*
|
|
||||||
* Helper API:
|
|
||||||
*
|
|
||||||
* - [MenuItem](https://www.primefaces.org/primevue/menumodel)
|
|
||||||
*
|
|
||||||
* Demos:
|
|
||||||
*
|
|
||||||
* - [Dock](https://www.primefaces.org/primevue/dock)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export default Dock;
|
export default Dock;
|
||||||
|
|
Loading…
Reference in New Issue