pull/3689/head
Tuğçe Küçükoğlu 2023-03-01 16:12:40 +03:00
commit bcb757f551
11 changed files with 394 additions and 233 deletions

View File

@ -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 { VNode } from 'vue';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type ContextMenuAppendTo = 'body' | 'self' | string | undefined | HTMLElement; /**
* Defines valid properties in ContextMenu component.
*/
export interface ContextMenuProps { export interface ContextMenuProps {
/** /**
* An array of menuitems. * An array of menuitems.
@ -11,27 +22,27 @@ export interface ContextMenuProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* 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 ContextMenuAppendTo * @defaultValue body
* Default value is 'body'
*/ */
appendTo?: ContextMenuAppendTo; appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
/** /**
* Whether to automatically manage layering. * Whether to automatically manage layering.
* Default value is true. * @defaultValue true
*/ */
autoZIndex?: boolean | undefined; autoZIndex?: boolean | undefined;
/** /**
* Base zIndex value to use in layering. * Base zIndex value to use in layering.
* Default value is 0. * @defaultValue 0
*/ */
baseZIndex?: number | undefined; baseZIndex?: number | undefined;
/** /**
* Attaches the menu to document instead of a particular item. * Attaches the menu to document instead of a particular item.
* @defaultValue false
*/ */
global?: boolean | undefined; global?: boolean | undefined;
/** /**
* 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;
/** /**
@ -48,48 +59,67 @@ export interface ContextMenuProps {
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
} }
/**
* Defines valid slots in ContextMenu component.
*/
export interface ContextMenuSlots { export interface ContextMenuSlots {
/** /**
* Custom item template. * Custom item template.
* @param {Object} scope - item slot's params. * @param {Object} scope - item slot's params.
*/ */
item: (scope: { item(scope: {
/** /**
* Menuitem instance * Menuitem instance
*/ */
item: MenuItem; 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. * 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;
/** /**
* Callback to invoke before the popup is shown. * Callback to invoke before the popup is shown.
*/ */
'before-show': () => void; 'before-show'(): void;
/** /**
* Callback to invoke before the popup is hidden. * Callback to invoke before the popup is hidden.
*/ */
'before-hide': () => void; 'before-hide'(): void;
/** /**
* Callback to invoke when the popup is shown. * Callback to invoke when the popup is shown.
*/ */
show: () => void; show(): void;
/** /**
* Callback to invoke when the popup is hidden. * 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<ContextMenuProps, ContextMenuSlots, ContextMenuEmits> { declare class ContextMenu extends ClassComponent<ContextMenuProps, ContextMenuSlots, ContextMenuEmits> {
/** /**
* Toggles the visibility of the menu. * Toggles the visibility of the menu.
@ -97,20 +127,20 @@ declare class ContextMenu extends ClassComponent<ContextMenuProps, ContextMenuSl
* *
* @memberof ContextMenu * @memberof ContextMenu
*/ */
toggle: (event: Event) => void; toggle(event: Event): void;
/** /**
* Shows the menu. * Shows the menu.
* @param {Event} event - Browser event. * @param {Event} event - Browser event.
* *
* @memberof ContextMenu * @memberof ContextMenu
*/ */
show: (event: Event) => void; show(event: Event): void;
/** /**
* Hides the menu. * Hides the menu.
* *
* @memberof ContextMenu * @memberof ContextMenu
*/ */
hide: () => void; hide(): void;
} }
declare module '@vue/runtime-core' { 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; export default ContextMenu;

View File

@ -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;

View File

@ -2,7 +2,7 @@
* *
* Dropdown also known as Select, is used to choose an item from a collection of options. * 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 * @module dropdown
* *

View File

@ -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 { VNode } from 'vue';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type MegaMenuOrientationType = 'horizontal' | 'vertical' | undefined; /**
* Defines valid properties in MegaMenu component.
*/
export interface MegaMenuProps { export interface MegaMenuProps {
/** /**
* An array of menuitems. * An array of menuitems.
@ -11,17 +21,17 @@ export interface MegaMenuProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* Defines the orientation. * Defines the orientation.
* @see MegaMenuOrientationType * @defaultValue horizontal
* Default value is 'horizontal'.
*/ */
orientation?: MegaMenuOrientationType; orientation?: 'horizontal' | 'vertical' | undefined;
/** /**
* 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;
/** /**
* When present, it specifies that the component should be disabled. * When present, it specifies that the component should be disabled.
* @defaultValue false
*/ */
disabled?: boolean | undefined; disabled?: boolean | undefined;
/** /**
@ -38,40 +48,58 @@ export interface MegaMenuProps {
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
} }
/**
* Defines valid slots in MegaMenu component.
*/
export interface MegaMenuSlots { export interface MegaMenuSlots {
/** /**
* Custom start template. * Custom start template.
*/ */
start: () => VNode[]; start(): VNode[];
/** /**
* Custom end template. * Custom end template.
*/ */
end: () => VNode[]; end(): VNode[];
/** /**
* Custom item template. * Custom item template.
* @param {Object} scope - item slot's params. * @param {Object} scope - item slot's params.
*/ */
item: (scope: { item(scope: {
/** /**
* Menuitem instance * Menuitem instance
*/ */
item: MenuItem; 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. * 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 - 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<MegaMenuProps, MegaMenuSlots, MegaMenuEmits> {} declare class MegaMenu extends ClassComponent<MegaMenuProps, MegaMenuSlots, MegaMenuEmits> {}
declare module '@vue/runtime-core' { 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; export default MegaMenu;

View File

@ -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 { VNode } from 'vue';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type MenuAppendToType = 'body' | 'self' | string | undefined | HTMLElement; /**
* Defines valid properties in Menu component.
*/
export interface MenuProps { export interface MenuProps {
/** /**
* An array of menuitems. * An array of menuitems.
@ -11,27 +21,27 @@ export interface MenuProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* Defines if menu would displayed as a popup. * Defines if menu would displayed as a popup.
* @defaultValue false
*/ */
popup?: boolean | undefined; popup?: boolean | undefined;
/** /**
* 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 MenuAppendToType * @defaultValue body
* Default value is 'body'.
*/ */
appendTo?: MenuAppendToType; appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
/** /**
* Whether to automatically manage layering. * Whether to automatically manage layering.
* Default value is true. * @defaultValue true
*/ */
autoZIndex?: boolean | undefined; autoZIndex?: boolean | undefined;
/** /**
* Base zIndex value to use in layering. * Base zIndex value to use in layering.
* Default value is 0. * @defaultValue 0
*/ */
baseZIndex?: number | undefined; baseZIndex?: number | undefined;
/** /**
* 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;
/** /**
@ -48,35 +58,58 @@ export interface MenuProps {
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
} }
/**
* Defines valid slots in Menu component.
*/
export interface MenuSlots { export interface MenuSlots {
/** /**
* Custom start template. * Custom start template.
*/ */
start: () => VNode[]; start(): VNode[];
/** /**
* Custom end template. * Custom end template.
*/ */
end: () => VNode[]; end(): VNode[];
/** /**
* Custom item template. * Custom item template.
* @param {Object} scope - item slot's params. * @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. * 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 - 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<MenuProps, MenuSlots, MenuEmits> { declare class Menu extends ClassComponent<MenuProps, MenuSlots, MenuEmits> {
/** /**
* Toggles the visibility of the overlay. * Toggles the visibility of the overlay.
@ -84,14 +117,15 @@ declare class Menu extends ClassComponent<MenuProps, MenuSlots, MenuEmits> {
* *
* @memberof Menu * @memberof Menu
*/ */
toggle: (event: Event) => void; toggle(event: Event): void;
/** /**
* Shows the overlay. * Shows the overlay.
* @param {Event} event - Browser event. * @param {Event} event - Browser event.
* @param {*} [target] - Target element
* *
* @memberof Menu * @memberof Menu
*/ */
show: (event: Event, target?: any) => void; show(event: Event, target?: any): void;
/** /**
* Hides the overlay. * 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; export default Menu;

View File

@ -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 { ButtonHTMLAttributes, VNode } from 'vue';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Defines valid properties in Menubar component.
*/
export interface MenubarProps { export interface MenubarProps {
/** /**
* An array of menuitems. * An array of menuitems.
@ -9,7 +21,7 @@ export interface MenubarProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* 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;
/** /**
@ -26,29 +38,47 @@ export interface MenubarProps {
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
} }
/**
* Defines valid slots in Menubar component.
*/
export interface MenubarSlots { export interface MenubarSlots {
/** /**
* Custom start template. * Custom start template.
*/ */
start: () => VNode[]; start(): VNode[];
/** /**
* Custom end template. * Custom end template.
*/ */
end: () => VNode[]; end(): VNode[];
/** /**
* Custom item template. * Custom item template.
* @param {Object} scope - item slot's params. * @param {Object} scope - item slot's params.
*/ */
item: (scope: { item(scope: {
/** /**
* Menuitem instance * Menuitem instance
*/ */
item: MenuItem; 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<MenubarProps, MenubarSlots, MenubarEmits> {} declare class Menubar extends ClassComponent<MenubarProps, MenubarSlots, MenubarEmits> {}
declare module '@vue/runtime-core' { 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; export default Menubar;

View File

@ -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 { VNode } from 'vue';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom expanded keys metadata.
* @see {@link PanelMenuProps.expandedKeys}
*/
export interface PanelMenuExpandedKeys { export interface PanelMenuExpandedKeys {
[key: string]: any; [key: string]: any;
} }
/**
* Custom panel open event.
* @see {@link PanelMenuEmits['panel-open']}
*/
export interface PanelMenuPanelOpenEvent { export interface PanelMenuPanelOpenEvent {
/** /**
* Browser mouse event. * Browser mouse event.
@ -19,10 +36,15 @@ export interface PanelMenuPanelOpenEvent {
} }
/** /**
* Custom panel close event.
* @see {@link PanelMenuEmits['panel-close']}
* @extends {PanelMenuPanelOpenEvent} * @extends {PanelMenuPanelOpenEvent}
*/ */
export interface PanelMenuPanelCloseEvent extends PanelMenuPanelOpenEvent {} export interface PanelMenuPanelCloseEvent extends PanelMenuPanelOpenEvent {}
/**
* Defines valid properties in PanelMenu component.
*/
export interface PanelMenuProps { export interface PanelMenuProps {
/** /**
* An array of menuitems. * An array of menuitems.
@ -30,11 +52,12 @@ export interface PanelMenuProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* A map of keys to represent the expansion state in controlled mode. * A map of keys to represent the expansion state in controlled mode.
* @see PanelMenuExpandedKeys * @type {PanelMenuExpandedKeys}
*/ */
expandedKeys?: PanelMenuExpandedKeys; expandedKeys?: PanelMenuExpandedKeys;
/** /**
* 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.
* @defaultValue true
*/ */
exact?: boolean | undefined; exact?: boolean | undefined;
/** /**
@ -43,37 +66,55 @@ export interface PanelMenuProps {
tabindex?: number | string | undefined; tabindex?: number | string | undefined;
} }
/**
* Defines valid slots in PanelMenu component.
*/
export interface PanelMenuSlots { export interface PanelMenuSlots {
/** /**
* Custom content for each item. * Custom content for each item.
* @param {Object} scope - item slot's params. * @param {Object} scope - item slot's params.
*/ */
item: (scope: { item(scope: {
/** /**
* Menuitem instance * Menuitem instance
*/ */
item: MenuItem; item: MenuItem;
}) => VNode[]; }): VNode[];
} }
export declare type PanelMenuEmits = { /**
* Defines valid emits in PanelMenu component.
*/
export interface PanelMenuEmits {
/** /**
* Emitted when the expandedKeys changes. * Emitted when the expandedKeys changes.
* @param {*} value - New value. * @param {*} value - New value.
*/ */
'update:expandedKeys': (value: any) => void; 'update:expandedKeys'(value: any): void;
/** /**
* Callback to invoke when a panel gets expanded. * Callback to invoke when a panel gets expanded.
* @param {PanelMenuPanelOpenEvent} event - Custom panel open event. * @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. * Callback to invoke when an active panel is collapsed by clicking on the header.
* @param {PanelMenuPanelCloseEvent} event - Custom panel close event. * @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<PanelMenuProps, PanelMenuSlots, PanelMenuEmits> {} declare class PanelMenu extends ClassComponent<PanelMenuProps, PanelMenuSlots, PanelMenuEmits> {}
declare module '@vue/runtime-core' { 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; export default PanelMenu;

View File

@ -2,7 +2,7 @@
* *
* SplitButton groups a set of commands in an overlay with a default command. * 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 * @module splitbutton
* *

View File

@ -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 { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Defines valid properties in Steps component.
*/
export interface StepsProps { export interface StepsProps {
/** /**
* Unique identifier of the element. * Unique identifier of the element.
@ -13,31 +25,49 @@ export interface StepsProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* Whether the items are clickable or not. * Whether the items are clickable or not.
* Default value is true. * @defaultValue true
*/ */
readonly?: boolean | undefined; readonly?: boolean | undefined;
/** /**
* 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;
} }
/**
* Defines valid slots in Steps component.
*/
export interface StepsSlots { export interface StepsSlots {
/** /**
* Custom item template. * Custom item template.
* @param {Object} scope - item slot's params. * @param {Object} scope - item slot's params.
*/ */
item: (scope: { item(scope: {
/** /**
* Menuitem instance * Menuitem instance
*/ */
item: MenuItem; 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<StepsProps, StepsSlots, StepsEmits> {} declare class Steps extends ClassComponent<StepsProps, StepsSlots, StepsEmits> {}
declare module '@vue/runtime-core' { 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; export default Steps;

View File

@ -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 { VNode } from 'vue';
import { MenuItem } from '../menuitem'; import { MenuItem } from '../menuitem';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom change event.
* @see {@link TabMenuEmits['tab-change']}
*/
export interface TabMenuChangeEvent { export interface TabMenuChangeEvent {
/** /**
* Browser event * Browser event
@ -13,6 +26,9 @@ export interface TabMenuChangeEvent {
index: number; index: number;
} }
/**
* Defines valid properties in TabMenu component.
*/
export interface TabMenuProps { export interface TabMenuProps {
/** /**
* An array of menuitems. * An array of menuitems.
@ -20,12 +36,12 @@ export interface TabMenuProps {
model?: MenuItem[] | undefined; model?: MenuItem[] | undefined;
/** /**
* Defines if active route highlight should match the exact route path. * Defines if active route highlight should match the exact route path.
* Default value is true. * @defaultValue true
*/ */
exact?: boolean | undefined; exact?: boolean | undefined;
/** /**
* Active index of menuitem. * Active index of menuitem.
* Default value is 0. * @defaultValue 0
*/ */
activeIndex?: number | undefined; activeIndex?: number | undefined;
/** /**
@ -38,27 +54,45 @@ export interface TabMenuProps {
'aria-labelledby'?: string | undefined; 'aria-labelledby'?: string | undefined;
} }
/**
* Defines valid slots in TabMenu component.
*/
export interface TabMenuSlots { export interface TabMenuSlots {
/** /**
* Custom content for each item. * Custom content for each item.
* @param {Object} scope - item slot's params. * @param {Object} scope - item slot's params.
*/ */
item: (scope: { item(scope: {
/** /**
* Menuitem instance * Menuitem instance
*/ */
item: MenuItem; 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. * Callback to invoke when an active tab is changed.
* @param {TabMenuChangeEvent} event - Custom tab change event. * @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<TabMenuProps, TabMenuSlots, TabMenuEmits> {} declare class TabMenu extends ClassComponent<TabMenuProps, TabMenuSlots, TabMenuEmits> {}
declare module '@vue/runtime-core' { 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; export default TabMenu;

View File

@ -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 { ButtonHTMLAttributes, VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; 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 { export interface ToastMessageOptions {
/** /**
* Severity level of the message. * Severity level of the message.
* @see ToastMessageSeverityType
* Default value is 'info'. * Default value is 'info'.
*/ */
severity?: any | undefined; severity?: 'success' | 'info' | 'warn' | 'error' | undefined;
/** /**
* Summary content of the message. * Summary content of the message.
*/ */
@ -56,6 +60,9 @@ export interface ToastBreakpointsType {
[key: string]: any; [key: string]: any;
} }
/**
* Defines valid properties in Toast component.
*/
export interface ToastProps { export interface ToastProps {
/** /**
* Unique identifier of a message group. * Unique identifier of a message group.
@ -63,18 +70,17 @@ export interface ToastProps {
group?: string | undefined; group?: string | undefined;
/** /**
* Position of the toast in viewport. * Position of the toast in viewport.
* @see ToastPositionType * @defaultValue top-right
* Default value is 'top-right'.
*/ */
position?: ToastPositionType; position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center' | undefined;
/** /**
* Whether to automatically manage layering. * Whether to automatically manage layering.
* Default value is true. * @defaultValue true
*/ */
autoZIndex?: boolean | undefined; autoZIndex?: boolean | undefined;
/** /**
* Base zIndex value to use in layering. * Base zIndex value to use in layering.
* Default value is 0. * @defaultValue 0
*/ */
baseZIndex?: number | undefined; baseZIndex?: number | undefined;
/** /**
@ -84,27 +90,27 @@ export interface ToastProps {
breakpoints?: ToastBreakpointsType; breakpoints?: ToastBreakpointsType;
/** /**
* Icon to display in the toast close button. * Icon to display in the toast close button.
* Default value is 'pi pi-times'. * @defaultValue pi pi-times
*/ */
closeIcon?: string | undefined; closeIcon?: string | undefined;
/** /**
* Icon to display in the toast with info severity. * Icon to display in the toast with info severity.
* Default value is 'pi pi-info-circle'. * @defaultValue pi pi-info-circle
*/ */
infoIcon?: string | undefined; infoIcon?: string | undefined;
/** /**
* Icon to display in the toast with warn severity. * Icon to display in the toast with warn severity.
* Default value is 'pi pi-exclamation-triangle'. * @defaultValue pi pi-exclamation-triangle
*/ */
warnIcon?: string | undefined; warnIcon?: string | undefined;
/** /**
* Icon to display in the toast with error severity. * Icon to display in the toast with error severity.
* Default value is 'pi pi-times'. * @defaultValue pi pi-times
*/ */
errorIcon?: string | undefined; errorIcon?: string | undefined;
/** /**
* Icon to display in the toast with success severity. * Icon to display in the toast with success severity.
* Default value is 'pi pi-check'. * @defaultValue pi pi-check
*/ */
successIcon?: string | undefined; successIcon?: string | undefined;
/** /**
@ -118,16 +124,28 @@ export interface ToastSlots {
* Custom message template. * Custom message template.
* @param {Object} scope - message slot's params. * @param {Object} scope - message slot's params.
*/ */
message: (scope: { message(scope: {
/** /**
* Message of the component * Message of the component
*/ */
message: any; 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<ToastProps, ToastSlots, ToastEmits> {} declare class Toast extends ClassComponent<ToastProps, ToastSlots, ToastEmits> {}
declare module '@vue/runtime-core' { 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; export default Toast;