import { VariantProps } from 'class-variance-authority'; import * as i0 from '@angular/core'; import { ElementRef, TemplateRef, InputSignal, InputSignalWithTransform, ModelSignal, Signal, WritableSignal } from '@angular/core'; /** Template context for custom previous-button template. */ interface CarouselPrevContext { /** Whether the carousel can navigate to the previous slide. */ $implicit: boolean; /** Callback to navigate to the previous slide. */ prev: () => void; } /** Template context for custom next-button template. */ interface CarouselNextContext { /** Whether the carousel can navigate to the next slide. */ $implicit: boolean; /** Callback to navigate to the next slide. */ next: () => void; } /** Template context for custom pagination dot template. */ interface CarouselPaginationContext { /** The page index (0-based). */ $implicit: number; /** Whether this page is currently active. */ active: boolean; /** Total number of pages. */ total: number; /** Same as $implicit — the page index. */ index: number; } declare const carouselContainerVariants: () => string; declare const carouselNavButtonVariants: (props?: { position?: 'prev' | 'next'; }) => string; type CarouselNavButtonVariants = VariantProps; declare const carouselDotVariants: (props?: { active?: boolean; }) => string; type CarouselDotVariants = VariantProps; /** * Marks an element as a carousel slide item. * * Apply this directive to each direct child element that should be * treated as a slide within ``. * * @tokens none * * @example * ```html * *
Slide 1
*
Slide 2
*
* ``` */ declare class ComCarouselItem { readonly elementRef: ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Template directive for a custom "previous" navigation button. * * The template receives a boolean context (`$implicit`) indicating * whether the carousel can navigate backward. * * @tokens none * * @example * ```html * *
Slide 1
* * * *
* ``` */ declare class ComCarouselPrevTpl { readonly templateRef: TemplateRef; static ngTemplateContextGuard(_dir: ComCarouselPrevTpl, _ctx: unknown): _ctx is CarouselPrevContext; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Template directive for a custom "next" navigation button. * * The template receives a boolean context (`$implicit`) indicating * whether the carousel can navigate forward. * * @tokens none * * @example * ```html * *
Slide 1
* * * *
* ``` */ declare class ComCarouselNextTpl { readonly templateRef: TemplateRef; static ngTemplateContextGuard(_dir: ComCarouselNextTpl, _ctx: unknown): _ctx is CarouselNextContext; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Template directive for custom pagination indicators. * * Rendered once per "page" in the carousel. The template receives * a context with the page index, active state, and total count. * * @tokens none * * @example * ```html * *
Slide 1
*
Slide 2
* * * *
* ``` */ declare class ComCarouselPaginationTpl { readonly templateRef: TemplateRef; static ngTemplateContextGuard(_dir: ComCarouselPaginationTpl, _ctx: unknown): _ctx is CarouselPaginationContext; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Carousel component — a horizontal slider that navigates content screens * using percentage-based CSS `transform: translateX()`. * * Items are projected via `ng-content` and marked with `comCarouselItem`. * Navigation is screen-based: each index step moves one full viewport of items. * Supports multi-item views, auto-play, loop, touch/swipe, keyboard * navigation, and custom templates for navigation and pagination. * * @tokens `--color-background`, `--color-foreground`, `--color-muted`, * `--color-muted-hover`, `--color-primary`, `--color-border-subtle`, * `--color-ring`, `--color-disabled`, `--color-disabled-foreground` * * @example Basic usage * ```html * *
Slide 1
*
Slide 2
*
Slide 3
*
* ``` * * @example Multiple items per view * ```html * * @for (product of products(); track product.id) { * {{ product.name }} * } * * ``` * * @example Auto-play with loop * ```html * * @for (img of images(); track img.url) { * * } * * ``` * * @example Two-way index binding * ```html * *
A
*
B
*
* ``` * * @example Custom navigation * ```html * *
Slide 1
* * * * * * *
* ``` * * @example Custom pagination * ```html * *
Slide 1
* * * *
* ``` */ declare class ComCarouselComponent { private readonly destroyRef; private readonly renderer; private readonly platform; private readonly hostEl; /** Number of items visible at once. */ readonly slidesPerView: InputSignal; /** Wrap from last to first and vice versa. */ readonly loop: InputSignalWithTransform; /** Enable auto-advancing slides. */ readonly autoPlay: InputSignalWithTransform; /** Auto-play interval in milliseconds. */ readonly autoPlayInterval: InputSignal; /** Slide transition duration in milliseconds. */ readonly transitionDuration: InputSignal; /** Show prev/next navigation buttons. */ readonly showNavigation: InputSignalWithTransform; /** Show pagination dot indicators. */ readonly showPagination: InputSignalWithTransform; /** Accessible label for the carousel region. */ readonly ariaLabel: InputSignal; /** Two-way bindable current screen index. */ readonly index: ModelSignal; readonly items: Signal; readonly customPrev: Signal; readonly customNext: Signal; readonly customPagination: Signal; readonly trackEl: Signal | undefined>; private readonly paused; readonly animating: WritableSignal; private autoPlayTimerId; readonly totalSlides: Signal; /** Total number of screens (pages). */ readonly totalScreens: Signal; readonly maxIndex: Signal; /** Clamp index when items or slidesPerView changes. */ readonly clampedIndex: Signal; readonly canGoPrev: Signal; readonly canGoNext: Signal; readonly pages: Signal; /** Percentage-based translateX — each screen step moves by 100%. */ readonly translateX: Signal; /** Item width as a percentage string. */ private readonly itemWidth; readonly ariaLiveMode: Signal; readonly containerClasses: Signal; readonly prevButtonClasses: Signal; readonly nextButtonClasses: Signal; readonly prevContext: Signal; readonly nextContext: Signal; constructor(); /** Navigate to the next screen. */ next(): void; /** Navigate to the previous screen. */ prev(): void; /** Navigate to a specific page index. */ goToPage(pageIndex: number): void; /** Get CVA classes for a pagination dot at the given index. */ getDotClasses(pageIndex: number): string; /** Build template context for a custom pagination dot. */ getPaginationContext(pageIndex: number): CarouselPaginationContext; /** Handle keyboard navigation on pagination dots. */ onPaginationKeydown(event: KeyboardEvent, currentIndex: number): void; protected pauseAutoPlay(): void; protected resumeAutoPlay(): void; private clearAutoPlay; private swipeCleanupFns; private pointerStartX; private pointerStartY; private isSwiping; private setupSwipe; private cleanupSwipe; private focusDotAt; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { ComCarouselComponent, ComCarouselItem, ComCarouselNextTpl, ComCarouselPaginationTpl, ComCarouselPrevTpl, carouselContainerVariants, carouselDotVariants, carouselNavButtonVariants }; export type { CarouselDotVariants, CarouselNavButtonVariants, CarouselNextContext, CarouselPaginationContext, CarouselPrevContext };