@ngfly/carousel
Version:
A smooth, customizable carousel component for Angular 17+ applications
73 lines (72 loc) • 2.5 kB
TypeScript
import { NavButtonShape, IndicatorStyle } from '../interfaces/carousel-config.interface';
import * as i0 from "@angular/core";
/**
* Default carousel configuration values
*/
export declare const CAROUSEL_DEFAULTS: {
NAVIGATION_SIZE: string;
CONTENT_PADDING: string;
ANIMATION_DURATION: string;
ANIMATION_TIMING: string;
EMPTY_STATE_HEIGHT: string;
NAVIGATION_PREV_ICON: string;
NAVIGATION_NEXT_ICON: string;
INDICATOR_SIZE: string;
INDICATOR_SPACING: string;
INDICATOR_ACTIVE_COLOR: string;
INDICATOR_INACTIVE_COLOR: string;
INDICATOR_ACTIVE_OPACITY: string;
INDICATOR_INACTIVE_OPACITY: string;
INDICATOR_ANIMATION_DURATION: string;
INDICATOR_ANIMATION_TIMING: string;
INDICATOR_TRANSITION: string;
};
/**
* Service for carousel-related functionality and state management
*/
export declare class CarouselService {
private isVisibleSubject;
isVisible$: import("rxjs").Observable<boolean>;
/**
* Set carousel visibility
* @param visible Whether carousel is visible
*/
setVisibility(visible: boolean): void;
/**
* Get button shape styles based on the configured shape
* @param shape Button shape type
* @returns Style object
*/
getButtonShapeStyles(shape?: NavButtonShape): Record<string, string>;
/**
* Get indicator styles
* @param config Indicator style configuration
* @param isActive Whether to get active or inactive styles
* @returns Style object
*/
getIndicatorStyles(config?: IndicatorStyle, isActive?: boolean): Record<string, string>;
/**
* Get indicator container styles based on configuration
* @param config Indicator style configuration
* @returns Style object for container
*/
getIndicatorContainerStyles(config?: IndicatorStyle): Record<string, string>;
/**
* Get navigation icons based on orientation
* @param isVertical Whether carousel is vertical
* @param icons Custom icon configuration
* @returns Previous and next icons
*/
getNavigationIcons(isVertical: boolean, icons?: any): {
prev: string;
next: string;
};
/**
* Parse time string to milliseconds
* @param time Time string (e.g., '300ms', '0.5s')
* @returns Time in milliseconds
*/
parseTimeToMs(time: string): number;
static ɵfac: i0.ɵɵFactoryDeclaration<CarouselService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CarouselService>;
}