import * as _siemens_element_translate_ng_translate from '@siemens/element-translate-ng/translate'; import * as _angular_core from '@angular/core'; import { ElementRef } from '@angular/core'; declare class SiCarouselItemDirective { protected readonly carousel: SiCarouselComponent; protected readonly isVisible: _angular_core.Signal; /** @internal */ readonly elementRef: ElementRef; /** @internal */ readonly order: _angular_core.WritableSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * A carousel component for displaying slides with navigation controls and auto-play. * * Features horizontal scrolling with snap behavior, pagination dots, and ARIA accessibility. * Suitable for dashboards, image galleries, and content showcases. * * @example * * ```typescript * import { SiCarouselComponent, SiCarouselItemDirective } from '@siemens/element-ng/carousel'; * * @Component({ * imports: [SiCarouselComponent, SiCarouselItemDirective], * template: ` * *

Slide 1

*

Slide 2

*

Slide 3

*
* ` * }) * export class MyComponent {} * ``` */ declare class SiCarouselComponent { /** * Controls whether pagination controls are shown. * When `true`, the carousel shows one slide per page and hides pagination controls. * @defaultValue false * */ readonly hidePageControls: _angular_core.InputSignalWithTransform; /** * Enables or configures auto-play for the carousel. When set to `true`, the carousel automatically * navigates to the next slide every 5000 milliseconds (5 seconds). Pass a positive number to set a * custom interval in milliseconds. Pass `false` to disable auto-play. * @defaultValue false * */ readonly autoPlay: _angular_core.InputSignal; /** * Aria role of the carousel element. Can be set to 'region' or 'group' depending on the desired accessibility semantics. * @defaultValue 'region' * */ readonly ariaRole: _angular_core.InputSignal<"group" | "region">; /** * Aria label for the previous button, used for accessibility purposes. * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.PREVIOUS:Previous slide`) * ``` */ readonly previousButtonAriaLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Aria label for the next button, used for accessibility purposes. * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.NEXT:Next slide`) * ``` */ readonly nextButtonAriaLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.SLIDE_PAGE:Slide {{page}} of {{total}}`) * ``` */ readonly slidePageAriaLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Label for the play button when autoplay is paused. * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.PLAY:Play`) * ``` */ readonly playButtonLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Label for the pause button when autoplay is active. * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.PAUSE:Pause`) * ``` */ readonly pauseButtonLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Role description for the carousel container, used for accessibility purposes. * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.ROLE_DESCRIPTION:carousel`) * ``` */ readonly carouselRoleDescription: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Role description for each slide, used for accessibility purposes. * @defaultValue * ``` * t(() => $localize`:@@SI_CAROUSEL.SLIDE_ROLE_DESCRIPTION:Slide`) * ``` */ readonly slideRoleDescription: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** @internal */ readonly translatedSlideRoleDescription: _angular_core.Signal; /** @internal */ readonly currentActiveSlide: _angular_core.Signal | null>; protected readonly translatedCarouselRoleDescription: _angular_core.Signal; protected readonly items: _angular_core.Signal; protected readonly currentPage: _angular_core.WritableSignal; protected readonly isPaused: _angular_core.WritableSignal; protected readonly totalPages: _angular_core.Signal; protected readonly edgeLeftIndex: _angular_core.WritableSignal; protected readonly edgeRightIndex: _angular_core.WritableSignal; protected readonly insufficientSpace: _angular_core.WritableSignal; protected readonly pageControlContainerMinWidth: _angular_core.WritableSignal; protected readonly icons: Record<"elementLeft2" | "elementRight2" | "elementPlay" | "elementPause", string>; private readonly autoPlayDuration; private intervalId; private scrollObserver; /** requestAnimationFrame id of the running scroll animation, or null when idle. */ private animationFrameId; /** Scroll position (`scrollLeft`) the running animation is easing towards. */ private animationTargetLeft; /** Timestamp of the previous animation frame, used to make the easing frame-rate independent. */ private lastFrameTime; /** Whether any slide's CSS order has been changed from its natural (source-index) position. */ private ordersModified; private readonly destroyRef; private readonly viewport; private readonly pageControl; private readonly playPauseBtn; private readonly translateService; private cdRef; constructor(); protected goToPage(page: number, forceScroll?: boolean): void; protected next(): void; protected previous(): void; /** Navigates directly to a specific slide, used by the pagination dots. */ protected goToSlide(index: number): void; protected toggleAutoPlay(): void; protected onResize(size: { width: number; height: number; }): void; /** * Navigates a single slide forward (`1`) or backward (`-1`). Rapid clicks are intentionally not * queued or throttled: each click advances {@link currentPage} immediately and retargets the * running scroll animation (see {@link animateTo}) towards the new slide, so the carousel keeps * gliding in the click direction without waiting for the previous scroll to finish. * * To keep the first/last wrap a continuous one-slide glide instead of a jump across the whole * track, the target slide's CSS order is placed exactly one slot away from the current slide in * the click direction (so it sits adjacent to it). The viewport scroll is compensated so this * reorder is invisible. Orders may extend while the user keeps clicking; they are silently * normalized once the animation settles (see {@link normalizeOrders}). */ private step; /** * Changes a slide's CSS order while keeping the picture stable. Reordering shifts slides along * the flex track, so the scroll position is adjusted by the exact amount the anchor slide moved, * making the relocation invisible and letting any in-flight animation continue seamlessly. */ private reorderSlide; /** * Sets the CSS order of a slide. The value is written to the DOM synchronously in addition to * the signal, so a subsequent reflow/scroll uses the new order immediately instead of waiting * for the asynchronous, signal-driven change detection update. */ private setSlideOrder; /** * Silently restores the canonical slide order (each slide's CSS order equals its source index). * Reordering shifts the track, so it anchors on the current slide and compensates the scroll * position to avoid any visible jump. Called once the scroll animation settles. */ private normalizeOrders; /** Animates the viewport so the given slide is horizontally centered. */ private animateToSlide; /** * Eases `scrollLeft` towards `targetLeft` using a frame-rate independent exponential smoothing * loop. The target can be updated mid-flight (rapid clicks), so the same animation simply chases * the latest slide. Native scroll-snap and smooth scroll-behavior are disabled while animating so * they do not fight the manual scrolling, and the scroll observer is paused to avoid feedback. */ private animateTo; private animationFrame; /** Finalizes the animation: normalizes orders, restores native scrolling and the observer. */ private endAnimation; /** Stops the running scroll animation and restores native scrolling, without normalizing. */ private cancelAnimation; private scheduleAutoPlay; private stopAutoPlay; private setupScrollObserver; private updateEdgeIndices; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { SiCarouselComponent, SiCarouselItemDirective };