diff --git a/components/dock/Dock.d.ts b/components/dock/Dock.d.ts index a73e543ac..a2258e03d 100644 --- a/components/dock/Dock.d.ts +++ b/components/dock/Dock.d.ts @@ -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 { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type DockPositionType = 'bottom' | 'top' | 'left' | 'right' | undefined; - -type DockTooltipEventType = 'hover' | 'focus' | undefined; - +/** + * Defines tooltip options + */ export interface DockTooltipOptions { /** * Event to show the tooltip, valid values are hover and focus. - * @see DockTooltipEventType */ - event: string; + event: 'hover' | 'focus' | undefined; /** * Position of element. - * @see DockPositionType - * Default value is 'bottom'. + * @defaultValue bottom */ - position: string; + position: 'bottom' | 'top' | 'left' | 'right' | undefined; /** * Optional options. */ - [key: string]: string; + [key: string]: any; } +/** + * Defines valid properties in Dock component. + */ export interface DockProps { /** * MenuModel instance to define the action items. @@ -31,10 +40,9 @@ export interface DockProps { model?: MenuItem[] | undefined; /** * Position of element. - * @see DockPositionType - * Default value is 'bottom'. + * @defaultValue bottom */ - position?: DockPositionType; + position?: 'bottom' | 'top' | 'left' | 'right' | undefined; /** * Style class of the element. */ @@ -45,12 +53,12 @@ export interface DockProps { style?: any; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. - * Default value is true. + * @defaultValue true */ 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'. - * @see DockTooltipOptions + * @type {DockTooltipOptions} */ tooltipOptions?: DockTooltipOptions; /** @@ -71,12 +79,15 @@ export interface DockProps { 'aria-label'?: string | undefined; } +/** + * Defines valid slots in Dock component. + */ export interface DockSlots { /** * Custom item content. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Custom content for item. */ @@ -85,32 +96,47 @@ export interface DockSlots { * Index of the menuitem */ index: number; - }) => VNode[]; + }): VNode[]; /** * Custom icon content. * @param {Object} scope - icon slot's params. */ - icon: (scope: { + icon(scope: { /** * Custom content for icon. */ 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. * @param {Event} event - Browser event. */ - focus: (event: Event) => void; + focus(event: Event): void; /** * Callback to invoke when the component loses focus. * @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 {} 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;