primevue
Version:
PrimeVue is a premium UI library for Vue featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, wh
215 lines (202 loc) • 6.04 kB
TypeScript
/**
*
* CarouselIndicator is a helper component for Carousel component.
*
* [Live Demo](https://www.primevue.dev/carousel/)
*
* @module carouselindicator
*
*/
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { PassThroughOptions } from 'primevue/passthrough';
import type { Component, HTMLAttributes, VNode } from 'vue';
export declare type CarouselIndicatorPassThroughOptionType = CarouselIndicatorPassThroughAttributes | ((options: CarouselIndicatorPassThroughMethodOptions) => CarouselIndicatorPassThroughAttributes | string) | string | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface CarouselIndicatorPassThroughMethodOptions {
/**
* Defines instance.
*/
instance: any;
/**
* Defines valid properties.
*/
props: CarouselIndicatorProps;
/**
* Defines valid attributes.
*/
attrs: any;
/**
* Defines parent options.
*/
parent: any;
/**
* Defines passthrough(pt) options in global config.
*/
global: object | undefined;
}
/**
* Custom passthrough(pt) options.
* @see {@link CarouselIndicatorProps.pt}
*/
export interface CarouselIndicatorPassThroughOptions {
/**
* Used to pass attributes to the root's DOM element.
*/
root?: CarouselIndicatorPassThroughOptionType;
/**
* Used to manage all lifecycle hooks.
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface CarouselIndicatorPassThroughAttributes {
[key: string]: any;
}
/**
* Defines valid properties in CarouselIndicator component.
*/
export interface CarouselIndicatorProps {
/**
* Use to change the HTML tag of root element.
* @defaultValue BUTTON
*/
as?: string | Component | undefined;
/**
* When enabled, it changes the default rendered element for the one passed as a child element.
* @defaultValue false
*/
asChild?: boolean | undefined;
/**
* Zero-based page index this indicator represents. Clicking the indicator scrolls the carousel to this page.
*/
page?: number | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
dt?: DesignToken<any>;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {CarouselIndicatorPassThroughOptions}
*/
pt?: PassThrough<CarouselIndicatorPassThroughOptions>;
/**
* Used to configure passthrough(pt) options of the component.
* @type {PassThroughOptions}
*/
ptOptions?: PassThroughOptions;
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}
/**
* Root element attributes forwarded to the consumer when `asChild` is enabled.
*/
export interface CarouselIndicatorA11yAttrs extends HTMLAttributes {
/**
* Button type used by the default rendered element.
*/
type?: 'button';
/**
* Roving tabindex for keyboard navigation.
*/
tabindex?: '0' | '-1';
/**
* Accessible label generated from the parent carousel locale API.
*/
'aria-label'?: string;
/**
* Marks the current page.
*/
'aria-current'?: 'page' | undefined;
/**
* PrimeVue component identifier.
*/
'data-pc-name': 'carouselindicator';
/**
* PrimeVue section identifier within the component.
*/
'data-pc-section': 'root';
/**
* Current orientation of the parent carousel.
*/
'data-orientation'?: 'horizontal' | 'vertical';
/**
* Current alignment of the parent carousel.
*/
'data-align'?: 'start' | 'center' | 'end';
/**
* Current page of the parent carousel.
*/
'data-page'?: number;
/**
* Indicates whether this indicator represents the active page.
*/
'data-active'?: '' | undefined;
/**
* Indicates whether a swipe gesture is in progress.
*/
'data-swiping'?: '' | undefined;
/**
* Click handler that navigates the parent carousel to this indicator's page.
*/
onClick: (event: MouseEvent) => void;
}
/**
* Defines valid slots in CarouselIndicator component.
*/
export interface CarouselIndicatorSlots {
/**
* Custom content template. Receives scope props when `asChild` is enabled.
* @param {Object} scope - default slot's params.
*/
default(scope: {
/**
* Computed class name for the indicator root.
*/
class: string | object | Array<string | object>;
/**
* Attributes and click handler to spread on the consumer's root element.
*/
a11yAttrs: CarouselIndicatorA11yAttrs;
/**
* Whether this indicator represents the currently active page.
*/
active: boolean;
/**
* Click handler that navigates the parent carousel to this indicator's page.
*/
onClick: (event: MouseEvent) => void;
}): VNode[];
}
/**
* Defines valid emits in CarouselIndicator component.
*/
export interface CarouselIndicatorEmitsOptions {}
export declare type CarouselIndicatorEmits = EmitFn<CarouselIndicatorEmitsOptions>;
/**
* **PrimeVue - CarouselIndicator**
*
* _CarouselIndicator is a helper component for Carousel component._
*
* [Live Demo](https://www.primevue.dev/carousel/)
* --- ---
* 
*
* @group Component
*
*/
declare const CarouselIndicator: DefineComponent<CarouselIndicatorProps, CarouselIndicatorSlots, CarouselIndicatorEmits>;
declare module 'vue' {
export interface GlobalComponents {
CarouselIndicator: DefineComponent<CarouselIndicatorProps, CarouselIndicatorSlots, CarouselIndicatorEmits>;
}
}
export default CarouselIndicator;