@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
45 lines (44 loc) • 1.83 kB
TypeScript
import { ESLMixinElement } from '../../../esl-mixin-element/core';
import type { ESLCarousel } from '../../core/esl-carousel';
import type { ESLCarouselSlideTarget } from '../../core/esl-carousel.types';
/**
* ESLCarousel navigation helper to define triggers for carousel navigation.
*
* State attributes applied to the host element:
* - `active` : the related carousel is present and initialized
* - `disabled` : navigation command cannot be executed at the moment (see canNavigate)
* - `current` : navigation command points to the currently active slide/group
* (mirrors {@link ESLCarousel.isCurrent} / utils isCurrent semantics:
* only absolute targets are considered, relative forms like `next`, `prev`, `+1`, etc. never set it)
*
* Example:
* ```
* <div class="esl-carousel-nav-container">
* <button esl-carousel-nav="group:prev">Prev</button>
* <esl-carousel>...</esl-carousel>
* <button esl-carousel-nav="group:next">Next</button>
* </div>
* ```
*/
export declare class ESLCarouselNavMixin extends ESLMixinElement {
static is: string;
/** {@link ESLCarouselSlideTarget} target to navigate in carousel */
command: ESLCarouselSlideTarget;
/** {@link ESLTraversingQuery} string to find {@link ESLCarousel} instance */
carousel: string;
/** @returns ESLCarousel instance; based on {@link carousel} attribute */
get $carousel(): ESLCarousel | null;
/** @returns accessible target ID */
get targetID(): string;
connectedCallback(): void;
disconnectedCallback(): void;
/** Handles carousel state changes */
protected _onUpdate(): void;
/** Handles $host element click */
protected _onClick(e: PointerEvent): void;
}
declare global {
export interface ESLCarouselNS {
Nav: typeof ESLCarouselNavMixin;
}
}