primevue-mirror/components/galleria/Galleria.d.ts

247 lines
6.2 KiB
TypeScript
Raw Normal View History

2023-03-01 15:05:23 +00:00
/**
*
* Galleria is an advanced content gallery component.
*
* [Live Demo](https://www.primevue.org/galleria/)
*
* @module galleria
*
*/
2022-12-08 11:04:25 +00:00
import { ButtonHTMLAttributes, HTMLAttributes, VNode } from 'vue';
2022-09-06 12:03:37 +00:00
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export interface GalleriaResponsiveOptions {
/**
* Breakpoint for responsive mode. Exp; @media screen and (max-width: ${breakpoint}) {...}
*/
breakpoint: string;
/**
* The number of visible items on breakpoint.
*/
numVisible: number;
}
2023-03-01 15:05:23 +00:00
/**
* Defines valid properties in Galleria component.
*/
2022-09-06 12:03:37 +00:00
export interface GalleriaProps {
/**
* Unique identifier of the element.
*/
id?: string | undefined;
/**
* An array of objects to display.
*/
value?: any[];
/**
* Index of the first item.
2023-03-01 15:05:23 +00:00
* @defaultValue 0
2022-09-06 12:03:37 +00:00
*/
activeIndex?: number | undefined;
/**
* Whether to display the component on fullscreen.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
fullScreen?: boolean | undefined;
/**
* Specifies the visibility of the mask on fullscreen mode.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
visible?: boolean | undefined;
/**
* Number of items per page.
2023-03-01 15:05:23 +00:00
* @defaultValue 3
2022-09-06 12:03:37 +00:00
*/
numVisible?: number | undefined;
/**
* An array of options for responsive design.
* @see GalleriaResponsiveOptions
*/
responsiveOptions?: GalleriaResponsiveOptions[];
/**
* Whether to display navigation buttons in item section.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
showItemNavigators?: boolean | undefined;
/**
* Whether to display navigation buttons in thumbnail container.
2023-03-01 15:05:23 +00:00
* @defaultValue true
2022-09-06 12:03:37 +00:00
*/
showThumbnailNavigators?: boolean | undefined;
/**
* Whether to display navigation buttons on item hover.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
showItemNavigatorsOnHover?: boolean | undefined;
/**
* When enabled, item is changed on indicator hover.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
changeItemOnIndicatorHover?: boolean | undefined;
/**
* Defines if scrolling would be infinite.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
circular?: boolean | undefined;
/**
* Items are displayed with a slideshow in autoPlay mode.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
autoPlay?: boolean | undefined;
/**
* Time in milliseconds to scroll items.
2023-03-01 15:05:23 +00:00
* @defaultValue 4000
2022-09-06 12:03:37 +00:00
*/
transitionInterval?: number | undefined;
/**
* Whether to display thumbnail container.
2023-03-01 15:05:23 +00:00
* @defaultValue true
2022-09-06 12:03:37 +00:00
*/
showThumbnails?: boolean | undefined;
/**
* Position of thumbnails.
2023-03-08 10:51:52 +00:00
* @defaultValue bottom
2022-09-06 12:03:37 +00:00
*/
2023-03-01 15:05:23 +00:00
thumbnailsPosition?: 'bottom' | 'top' | 'left' | 'right' | undefined;
2022-09-06 12:03:37 +00:00
/**
* Height of the viewport in vertical thumbnail.
2023-03-08 10:51:52 +00:00
* @defaultValue 300px
2022-09-06 12:03:37 +00:00
*/
verticalThumbnailViewPortHeight?: string | undefined;
/**
* Whether to display indicator container.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
showIndicators?: boolean | undefined;
/**
* When enabled, indicator container is displayed on item container.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
showIndicatorsOnItem?: boolean | undefined;
/**
* Position of indicators.
2023-03-08 10:51:52 +00:00
* @defaultValue bottom
2022-09-06 12:03:37 +00:00
*/
2023-03-01 15:05:23 +00:00
indicatorsPosition?: 'bottom' | 'top' | 'left' | 'right' | undefined;
2022-09-06 12:03:37 +00:00
/**
* Base zIndex value to use in layering.
2023-03-01 15:05:23 +00:00
* @defaultValue 0
2022-09-06 12:03:37 +00:00
*/
baseZIndex?: number | undefined;
/**
* Style class of the mask on fullscreen mode.
*/
maskClass?: string | undefined;
/**
* Inline style of the component on fullscreen mode. Otherwise, the 'style' property can be used.
*/
2022-12-08 11:04:25 +00:00
containerStyle?: any | undefined;
2022-09-06 12:03:37 +00:00
/**
* Style class of the component on fullscreen mode. Otherwise, the 'class' property can be used.
*/
2022-12-08 11:04:25 +00:00
containerClass?: any | undefined;
/**
* Uses to pass all properties of the HTMLDivElement to the container element on fullscreen mode.
*/
containerProps?: HTMLAttributes | undefined;
/**
* Uses to pass all properties of the HTMLButtonElement to the previous navigation button.
*/
prevButtonProps?: ButtonHTMLAttributes | undefined;
/**
* Uses to pass all properties of the HTMLButtonElement to the next navigation button.
*/
nextButtonProps?: ButtonHTMLAttributes | undefined;
2022-09-06 12:03:37 +00:00
}
2023-03-01 15:05:23 +00:00
/**
* Defines valid slots in Galleria slots.
*/
2022-09-06 12:03:37 +00:00
export interface GalleriaSlots {
/**
* Custom header template.
*/
2023-03-01 15:05:23 +00:00
header(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom footer template.
*/
2023-03-01 15:05:23 +00:00
footer(): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom item template.
* @param {Object} scope - item slot's params.
*/
2023-03-01 15:05:23 +00:00
item(scope: {
2022-09-06 12:03:37 +00:00
/**
* Item instance
*/
item: any;
2023-03-01 15:05:23 +00:00
}): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom caption template.
* @param {Object} scope - caption slot's params.
*/
2023-03-01 15:05:23 +00:00
caption(scope: {
2022-09-06 12:03:37 +00:00
/**
* Item instance
*/
item: any;
2023-03-01 15:05:23 +00:00
}): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom indicator template.
* @param {Object} scope - indicator slot's params.
*/
2023-03-01 15:05:23 +00:00
indicator(scope: {
2022-09-06 12:03:37 +00:00
/**
* Index of the indicator item
*/
index: number;
2023-03-01 15:05:23 +00:00
}): VNode[];
2022-09-06 12:03:37 +00:00
/**
* Custom thumbnail template.
* @param {Object} scope - thumbnail slot's params.
*/
2023-03-01 15:05:23 +00:00
thumbnail(scope: {
2022-09-06 12:03:37 +00:00
/**
* Item instance
*/
item: any;
2023-03-01 15:05:23 +00:00
}): VNode[];
2022-09-06 12:03:37 +00:00
}
2023-03-01 15:05:23 +00:00
/**
* Defines valid emits in Galleria component.
*/
export interface GalleriaEmits {
2022-09-06 12:03:37 +00:00
/**
* Emitted when the active index changes.
* @param {number} value - Index of new active item.
*/
2023-03-01 15:05:23 +00:00
'update:activeIndex'(value: number): void;
2022-09-06 12:03:37 +00:00
/**
* Emitted when the visible changes.
* @param {boolean} value - New value.
*/
2023-03-01 15:05:23 +00:00
'update:visible'(value: boolean): void;
}
2022-09-06 12:03:37 +00:00
2023-03-01 15:05:23 +00:00
/**
* **PrimeVue - Galleria**
*
* _Galleria is an advanced content gallery component._
*
* [Live Demo](https://www.primevue.org/galleria/)
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-03-01 15:05:23 +00:00
*
* @group Component
*
*/
2022-09-14 11:26:01 +00:00
declare class Galleria extends ClassComponent<GalleriaProps, GalleriaSlots, GalleriaEmits> {}
2022-09-06 12:03:37 +00:00
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Galleria: GlobalComponentConstructor<Galleria>;
2022-09-06 12:03:37 +00:00
}
}
export default Galleria;