diff --git a/components/contextmenu/ContextMenu.d.ts b/components/contextmenu/ContextMenu.d.ts index 219515f7a..ab3dd55af 100755 --- a/components/contextmenu/ContextMenu.d.ts +++ b/components/contextmenu/ContextMenu.d.ts @@ -1,9 +1,20 @@ +/** + * + * ContextMenu displays an overlay menu on right click of its target. Note that components like DataTable has special integration with ContextMenu. + * Refer to documentation of the individual documentation of the with context menu support. + * + * [Live Demo](https://www.primevue.org/contextmenu/) + * + * @module contextmenu + * + */ import { VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type ContextMenuAppendTo = 'body' | 'self' | string | undefined | HTMLElement; - +/** + * Defines valid properties in ContextMenu component. + */ export interface ContextMenuProps { /** * An array of menuitems. @@ -11,27 +22,27 @@ export interface ContextMenuProps { model?: MenuItem[] | undefined; /** * A valid query selector or an HTMLElement to specify where the overlay gets attached. - * @see ContextMenuAppendTo - * Default value is 'body' + * @defaultValue body */ - appendTo?: ContextMenuAppendTo; + appendTo?: 'body' | 'self' | string | undefined | HTMLElement; /** * Whether to automatically manage layering. - * Default value is true. + * @defaultValue true */ autoZIndex?: boolean | undefined; /** * Base zIndex value to use in layering. - * Default value is 0. + * @defaultValue 0 */ baseZIndex?: number | undefined; /** * Attaches the menu to document instead of a particular item. + * @defaultValue false */ global?: boolean | undefined; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. - * Default value is true. + * @defaultValue true */ exact?: boolean | undefined; /** @@ -48,48 +59,67 @@ export interface ContextMenuProps { 'aria-labelledby'?: string | undefined; } +/** + * Defines valid slots in ContextMenu component. + */ export interface ContextMenuSlots { /** * Custom item template. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type ContextMenuEmits = { +/** + * Defines valid emits in ContextMenu component. + */ +export interface ContextMenuEmits { /** * 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; /** * Callback to invoke before the popup is shown. */ - 'before-show': () => void; + 'before-show'(): void; /** * Callback to invoke before the popup is hidden. */ - 'before-hide': () => void; + 'before-hide'(): void; /** * Callback to invoke when the popup is shown. */ - show: () => void; + show(): void; /** * Callback to invoke when the popup is hidden. */ - hide: () => void; -}; + hide(): void; +} +/** + * **PrimeVue - ContextMenu** + * + * _ContextMenu displays an overlay menu on right click of its target. Note that components like DataTable has special integration with ContextMenu. + * Refer to documentation of the individual documentation of the with context menu support._ + * + * [Live Demo](https://www.primevue.org/contextmenu/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class ContextMenu extends ClassComponent { /** * Toggles the visibility of the menu. @@ -97,20 +127,20 @@ declare class ContextMenu extends ClassComponent void; + toggle(event: Event): void; /** * Shows the menu. * @param {Event} event - Browser event. * * @memberof ContextMenu */ - show: (event: Event) => void; + show(event: Event): void; /** * Hides the menu. * * @memberof ContextMenu */ - hide: () => void; + hide(): void; } declare module '@vue/runtime-core' { @@ -119,18 +149,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * ContextMenu displays an overlay menu on right click of its target. Note that components like DataTable has special integration with ContextMenu. - * Refer to documentation of the individual documentation of the with context menu support. - * - * Helper API: - * - * - [MenuItem](https://www.primefaces.org/primevue/menumodel) - * - * Demos: - * - * - [ContextMenu](https://www.primefaces.org/primevue/contextmenu) - * - */ export default ContextMenu; 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; diff --git a/components/dropdown/Dropdown.d.ts b/components/dropdown/Dropdown.d.ts index 21fe0f005..a3f31fd39 100755 --- a/components/dropdown/Dropdown.d.ts +++ b/components/dropdown/Dropdown.d.ts @@ -2,7 +2,7 @@ * * Dropdown also known as Select, is used to choose an item from a collection of options. * - * [Live Demo](https://www.primereact.org/dropdown/) + * [Live Demo](https://www.primevue.org/dropdown/) * * @module dropdown * diff --git a/components/megamenu/MegaMenu.d.ts b/components/megamenu/MegaMenu.d.ts index 87d48b1d2..feeb19f37 100755 --- a/components/megamenu/MegaMenu.d.ts +++ b/components/megamenu/MegaMenu.d.ts @@ -1,9 +1,19 @@ +/** + * + * MegaMenu is navigation component that displays submenus together. + * + * [Live Demo](https://www.primevue.org/megamenu/) + * + * @module megamenu + * + */ import { VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type MegaMenuOrientationType = 'horizontal' | 'vertical' | undefined; - +/** + * Defines valid properties in MegaMenu component. + */ export interface MegaMenuProps { /** * An array of menuitems. @@ -11,17 +21,17 @@ export interface MegaMenuProps { model?: MenuItem[] | undefined; /** * Defines the orientation. - * @see MegaMenuOrientationType - * Default value is 'horizontal'. + * @defaultValue horizontal */ - orientation?: MegaMenuOrientationType; + orientation?: 'horizontal' | 'vertical' | undefined; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. - * Default value is true. + * @defaultValue true */ exact?: boolean | undefined; /** * When present, it specifies that the component should be disabled. + * @defaultValue false */ disabled?: boolean | undefined; /** @@ -38,40 +48,58 @@ export interface MegaMenuProps { 'aria-labelledby'?: string | undefined; } +/** + * Defines valid slots in MegaMenu component. + */ export interface MegaMenuSlots { /** * Custom start template. */ - start: () => VNode[]; + start(): VNode[]; /** * Custom end template. */ - end: () => VNode[]; + end(): VNode[]; /** * Custom item template. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type MegaMenuEmits = { +/** + * Defines valid emits in MegaMenu component. + */ +export interface MegaMenuEmits { /** * 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 - MegaMenu** + * + * _MegaMenu is navigation component that displays submenus together._ + * + * [Live Demo](https://www.primevue.org/megamenu/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class MegaMenu extends ClassComponent {} declare module '@vue/runtime-core' { @@ -80,17 +108,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * MegaMenu is navigation component that displays submenus together. - * - * Helper API: - * - * - [MenuItem](https://www.primefaces.org/primevue/menumodel) - * - * Demos: - * - * - [MegaMenu](https://www.primefaces.org/primevue/megamenu) - * - */ export default MegaMenu; diff --git a/components/menu/Menu.d.ts b/components/menu/Menu.d.ts index a36795045..f157a6c8b 100755 --- a/components/menu/Menu.d.ts +++ b/components/menu/Menu.d.ts @@ -1,9 +1,19 @@ +/** + * + * Menu is a navigation / command component that supports dynamic and static positioning. + * + * [Live Demo](https://www.primevue.org/menu/) + * + * @module menu + * + */ import { VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type MenuAppendToType = 'body' | 'self' | string | undefined | HTMLElement; - +/** + * Defines valid properties in Menu component. + */ export interface MenuProps { /** * An array of menuitems. @@ -11,27 +21,27 @@ export interface MenuProps { model?: MenuItem[] | undefined; /** * Defines if menu would displayed as a popup. + * @defaultValue false */ popup?: boolean | undefined; /** * A valid query selector or an HTMLElement to specify where the overlay gets attached. - * @see MenuAppendToType - * Default value is 'body'. + * @defaultValue body */ - appendTo?: MenuAppendToType; + appendTo?: 'body' | 'self' | string | undefined | HTMLElement; /** * Whether to automatically manage layering. - * Default value is true. + * @defaultValue true */ autoZIndex?: boolean | undefined; /** * Base zIndex value to use in layering. - * Default value is 0. + * @defaultValue 0 */ baseZIndex?: number | undefined; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. - * Default value is true. + * @defaultValue true */ exact?: boolean | undefined; /** @@ -48,35 +58,58 @@ export interface MenuProps { 'aria-labelledby'?: string | undefined; } +/** + * Defines valid slots in Menu component. + */ export interface MenuSlots { /** * Custom start template. */ - start: () => VNode[]; + start(): VNode[]; /** * Custom end template. */ - end: () => VNode[]; + end(): VNode[]; /** * Custom item template. * @param {Object} scope - item slot's params. */ - item: (scope: { item: MenuItem }) => VNode[]; + item(scope: { + /** + * Menuitem instance + */ + item: MenuItem; + }): VNode[]; } -export declare type MenuEmits = { +/** + * Defines valid emits in Menu component. + */ +export interface MenuEmits { /** * 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 - Menu** + * + * _Menu is a navigation / command component that supports dynamic and static positioning._ + * + * [Live Demo](https://www.primevue.org/menu/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class Menu extends ClassComponent { /** * Toggles the visibility of the overlay. @@ -84,14 +117,15 @@ declare class Menu extends ClassComponent { * * @memberof Menu */ - toggle: (event: Event) => void; + toggle(event: Event): void; /** * Shows the overlay. * @param {Event} event - Browser event. + * @param {*} [target] - Target element * * @memberof Menu */ - show: (event: Event, target?: any) => void; + show(event: Event, target?: any): void; /** * Hides the overlay. * @@ -106,17 +140,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * Menu is a navigation / command component that supports dynamic and static positioning. - * - * Helper API: - * - * - [MenuItem](https://www.primefaces.org/primevue/menumodel) - * - * Demos: - * - * - [Menu](https://www.primefaces.org/primevue/menu) - * - */ export default Menu; diff --git a/components/menubar/Menubar.d.ts b/components/menubar/Menubar.d.ts index d3f3eafb0..92e88310d 100755 --- a/components/menubar/Menubar.d.ts +++ b/components/menubar/Menubar.d.ts @@ -1,7 +1,19 @@ +/** + * + * Menubar is a horizontal menu component. + * + * [Live Demo](https://www.primevue.org/menubar/) + * + * @module menubar + * + */ import { ButtonHTMLAttributes, VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +/** + * Defines valid properties in Menubar component. + */ export interface MenubarProps { /** * An array of menuitems. @@ -9,7 +21,7 @@ export interface MenubarProps { model?: MenuItem[] | undefined; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. - * Default value is true. + * @defaultValue true */ exact?: boolean | undefined; /** @@ -26,29 +38,47 @@ export interface MenubarProps { 'aria-labelledby'?: string | undefined; } +/** + * Defines valid slots in Menubar component. + */ export interface MenubarSlots { /** * Custom start template. */ - start: () => VNode[]; + start(): VNode[]; /** * Custom end template. */ - end: () => VNode[]; + end(): VNode[]; /** * Custom item template. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type MenubarEmits = {}; +/** + * Defines valid emits in Menubar component. + */ +export interface MenubarEmits {} +/** + * **PrimeVue - Menubar** + * + * _Menubar is a horizontal menu component._ + * + * [Live Demo](https://www.primevue.org/menubar/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class Menubar extends ClassComponent {} declare module '@vue/runtime-core' { @@ -57,17 +87,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * Menubar is a horizontal menu component. - * - * Helper API: - * - * - [MenuItem](https://www.primefaces.org/primevue/menumodel) - * - * Demos: - * - * - [Menubar](https://www.primefaces.org/primevue/menubar) - * - */ export default Menubar; diff --git a/components/panelmenu/PanelMenu.d.ts b/components/panelmenu/PanelMenu.d.ts index d08a31036..d4146e87d 100755 --- a/components/panelmenu/PanelMenu.d.ts +++ b/components/panelmenu/PanelMenu.d.ts @@ -1,11 +1,28 @@ +/** + * + * PanelMenu is a hybrid of Accordion and Tree components. + * + * [Live Demo](https://www.primevue.org/panelmenu/) + * + * @module panelmenu + * + */ import { VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +/** + * Custom expanded keys metadata. + * @see {@link PanelMenuProps.expandedKeys} + */ export interface PanelMenuExpandedKeys { [key: string]: any; } +/** + * Custom panel open event. + * @see {@link PanelMenuEmits['panel-open']} + */ export interface PanelMenuPanelOpenEvent { /** * Browser mouse event. @@ -19,10 +36,15 @@ export interface PanelMenuPanelOpenEvent { } /** + * Custom panel close event. + * @see {@link PanelMenuEmits['panel-close']} * @extends {PanelMenuPanelOpenEvent} */ export interface PanelMenuPanelCloseEvent extends PanelMenuPanelOpenEvent {} +/** + * Defines valid properties in PanelMenu component. + */ export interface PanelMenuProps { /** * An array of menuitems. @@ -30,11 +52,12 @@ export interface PanelMenuProps { model?: MenuItem[] | undefined; /** * A map of keys to represent the expansion state in controlled mode. - * @see PanelMenuExpandedKeys + * @type {PanelMenuExpandedKeys} */ expandedKeys?: PanelMenuExpandedKeys; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. + * @defaultValue true */ exact?: boolean | undefined; /** @@ -43,37 +66,55 @@ export interface PanelMenuProps { tabindex?: number | string | undefined; } +/** + * Defines valid slots in PanelMenu component. + */ export interface PanelMenuSlots { /** * Custom content for each item. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type PanelMenuEmits = { +/** + * Defines valid emits in PanelMenu component. + */ +export interface PanelMenuEmits { /** * Emitted when the expandedKeys changes. * @param {*} value - New value. */ - 'update:expandedKeys': (value: any) => void; + 'update:expandedKeys'(value: any): void; /** * Callback to invoke when a panel gets expanded. * @param {PanelMenuPanelOpenEvent} event - Custom panel open event. */ - 'panel-open': (event: PanelMenuPanelOpenEvent) => void; + 'panel-open'(event: PanelMenuPanelOpenEvent): void; /** * Callback to invoke when an active panel is collapsed by clicking on the header. * @param {PanelMenuPanelCloseEvent} event - Custom panel close event. */ - 'panel-close': (event: PanelMenuPanelCloseEvent) => void; -}; + 'panel-close'(event: PanelMenuPanelCloseEvent): void; +} +/** + * **PrimeVue - PanelMenu** + * + * _PanelMenu is a hybrid of Accordion and Tree components._ + * + * [Live Demo](https://www.primevue.org/panelmenu/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class PanelMenu extends ClassComponent {} declare module '@vue/runtime-core' { @@ -82,17 +123,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * PanelMenu is a hybrid of Accordion and Tree components. - * - * Helper API: - * - * - [MenuItem](https://www.primefaces.org/primevue/menumodel) - * - * Demos: - * - * - [PanelMenu](https://www.primefaces.org/primevue/panelmenu) - * - */ export default PanelMenu; diff --git a/components/splitbutton/SplitButton.d.ts b/components/splitbutton/SplitButton.d.ts index 90ad9519c..6253d63be 100755 --- a/components/splitbutton/SplitButton.d.ts +++ b/components/splitbutton/SplitButton.d.ts @@ -2,7 +2,7 @@ * * SplitButton groups a set of commands in an overlay with a default command. * - * [Live Demo](https://www.primevue.org/autocomplete/) + * [Live Demo](https://www.primevue.org/splitbutton/) * * @module splitbutton * diff --git a/components/steps/Steps.d.ts b/components/steps/Steps.d.ts index 8adb6dbd9..9fa8c79b7 100755 --- a/components/steps/Steps.d.ts +++ b/components/steps/Steps.d.ts @@ -1,7 +1,19 @@ +/** + * + * Steps components is an indicator for the steps in a wizard workflow. Example below uses nested routes with Steps. + * + * [Live Demo](https://www.primevue.org/steps/) + * + * @module steps + * + */ import { VNode } from 'vue'; -import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { MenuItem } from '../menuitem'; +import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +/** + * Defines valid properties in Steps component. + */ export interface StepsProps { /** * Unique identifier of the element. @@ -13,31 +25,49 @@ export interface StepsProps { model?: MenuItem[] | undefined; /** * Whether the items are clickable or not. - * Default value is true. + * @defaultValue true */ readonly?: boolean | undefined; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. - * Default value is true. + * @defaultValue true */ exact?: boolean | undefined; } +/** + * Defines valid slots in Steps component. + */ export interface StepsSlots { /** * Custom item template. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type StepsEmits = {}; +/** + * Defines valid emits in Steps component. + */ +export interface StepsEmits {} +/** + * **PrimeVue - Steps** + * + * _Steps components is an indicator for the steps in a wizard workflow. Example below uses nested routes with Steps._ + * + * [Live Demo](https://www.primevue.org/steps/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class Steps extends ClassComponent {} declare module '@vue/runtime-core' { @@ -46,13 +76,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * Steps components is an indicator for the steps in a wizard workflow. Example below uses nested routes with Steps. - * - * Demos: - * - * - [Steps](https://www.primefaces.org/primevue/steps) - * - */ export default Steps; diff --git a/components/tabmenu/TabMenu.d.ts b/components/tabmenu/TabMenu.d.ts index a6c4a68ca..80251a332 100755 --- a/components/tabmenu/TabMenu.d.ts +++ b/components/tabmenu/TabMenu.d.ts @@ -1,7 +1,20 @@ +/** + * + * TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu. + * + * [Live Demo](https://www.primevue.org/tabmenu/) + * + * @module tabmenu + * + */ import { VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +/** + * Custom change event. + * @see {@link TabMenuEmits['tab-change']} + */ export interface TabMenuChangeEvent { /** * Browser event @@ -13,6 +26,9 @@ export interface TabMenuChangeEvent { index: number; } +/** + * Defines valid properties in TabMenu component. + */ export interface TabMenuProps { /** * An array of menuitems. @@ -20,12 +36,12 @@ export interface TabMenuProps { model?: MenuItem[] | undefined; /** * Defines if active route highlight should match the exact route path. - * Default value is true. + * @defaultValue true */ exact?: boolean | undefined; /** * Active index of menuitem. - * Default value is 0. + * @defaultValue 0 */ activeIndex?: number | undefined; /** @@ -38,27 +54,45 @@ export interface TabMenuProps { 'aria-labelledby'?: string | undefined; } +/** + * Defines valid slots in TabMenu component. + */ export interface TabMenuSlots { /** * Custom content for each item. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type TabMenuEmits = { +/** + * Defines valid emits in TabMenu component. + */ +export interface TabMenuEmits { /** * Callback to invoke when an active tab is changed. * @param {TabMenuChangeEvent} event - Custom tab change event. */ - 'tab-change': (event: TabMenuChangeEvent) => void; -}; + 'tab-change'(event: TabMenuChangeEvent): void; +} +/** + * **PrimeVue - TabMenu** + * + * _TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu._ + * + * [Live Demo](https://www.primevue.org/tabmenu/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class TabMenu extends ClassComponent {} declare module '@vue/runtime-core' { @@ -67,13 +101,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * TabMenu is a navigation component that displays items as tab headers. Example below uses nested routes with TabMenu. - * - * Demos: - * - * - [TabMenu](https://www.primefaces.org/primevue/tabmenu) - * - */ export default TabMenu; diff --git a/components/toast/Toast.d.ts b/components/toast/Toast.d.ts index a6f2c1292..76cd4f6b1 100755 --- a/components/toast/Toast.d.ts +++ b/components/toast/Toast.d.ts @@ -1,17 +1,21 @@ +/** + * + * Toast is used to display messages in an overlay. + * + * [Live Demo](https://www.primevue.org/toast/) + * + * @module toast + * + */ import { ButtonHTMLAttributes, VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; -type ToastPositionType = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center' | undefined; - -type ToastMessageSeverityType = 'success' | 'info' | 'warn' | 'error' | undefined; - export interface ToastMessageOptions { /** * Severity level of the message. - * @see ToastMessageSeverityType * Default value is 'info'. */ - severity?: any | undefined; + severity?: 'success' | 'info' | 'warn' | 'error' | undefined; /** * Summary content of the message. */ @@ -56,6 +60,9 @@ export interface ToastBreakpointsType { [key: string]: any; } +/** + * Defines valid properties in Toast component. + */ export interface ToastProps { /** * Unique identifier of a message group. @@ -63,18 +70,17 @@ export interface ToastProps { group?: string | undefined; /** * Position of the toast in viewport. - * @see ToastPositionType - * Default value is 'top-right'. + * @defaultValue top-right */ - position?: ToastPositionType; + position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center' | undefined; /** * Whether to automatically manage layering. - * Default value is true. + * @defaultValue true */ autoZIndex?: boolean | undefined; /** * Base zIndex value to use in layering. - * Default value is 0. + * @defaultValue 0 */ baseZIndex?: number | undefined; /** @@ -84,27 +90,27 @@ export interface ToastProps { breakpoints?: ToastBreakpointsType; /** * Icon to display in the toast close button. - * Default value is 'pi pi-times'. + * @defaultValue pi pi-times */ closeIcon?: string | undefined; /** * Icon to display in the toast with info severity. - * Default value is 'pi pi-info-circle'. + * @defaultValue pi pi-info-circle */ infoIcon?: string | undefined; /** * Icon to display in the toast with warn severity. - * Default value is 'pi pi-exclamation-triangle'. + * @defaultValue pi pi-exclamation-triangle */ warnIcon?: string | undefined; /** * Icon to display in the toast with error severity. - * Default value is 'pi pi-times'. + * @defaultValue pi pi-times */ errorIcon?: string | undefined; /** * Icon to display in the toast with success severity. - * Default value is 'pi pi-check'. + * @defaultValue pi pi-check */ successIcon?: string | undefined; /** @@ -118,16 +124,28 @@ export interface ToastSlots { * Custom message template. * @param {Object} scope - message slot's params. */ - message: (scope: { + message(scope: { /** * Message of the component */ message: any; - }) => VNode[]; + }): VNode[]; } -export declare type ToastEmits = {}; +export interface ToastEmits {} +/** + * **PrimeVue - Toast** + * + * _Toast is used to display messages in an overlay._ + * + * [Live Demo](https://www.primevue.org/toast/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class Toast extends ClassComponent {} declare module '@vue/runtime-core' { @@ -136,17 +154,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * Toast is used to display messages in an overlay. - * - * Helper API: - * - * - ToastService - * - * Demos: - * - * - [Toast](https://www.primefaces.org/primevue/toast) - * - */ export default Toast;