UNPKG

@alyle/ui

Version:

Minimal Design, a set of components for Angular

141 lines (140 loc) 6.38 kB
import { QueryList, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, OnInit, Renderer2 } from '@angular/core'; import { LyTheme2, ThemeVariables, ThemeRef, StyleCollection, LyClasses, StyleTemplate, StyleRenderer } from '@alyle/ui'; import { Platform } from '@angular/cdk/platform'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i0 from "@angular/core"; export interface LyCarouselTheme { /** Styles for Carousel Component */ root?: StyleCollection<((classes: LyClasses<typeof STYLES>) => StyleTemplate)> | ((classes: LyClasses<typeof STYLES>) => StyleTemplate); } export interface LyCarouselVariables { carousel?: LyCarouselTheme; } export declare const STYLES: (theme: ThemeVariables & LyCarouselVariables, ref: ThemeRef) => { $priority: number; $global: (_className: string) => string; root: () => (_className: string) => string; actions: (_className: string) => string; actionIcon: (_className: string) => string; slideContainer: (_className: string) => string; slide: (_className: string) => string; slideContent: (_className: string) => string; slideAnim: (_className: string) => string; slideNoEvent: (_className: string) => string; indicators: () => (_className: string) => string; indicator: () => (_className: string) => string; indicatorIcon: () => (_className: string) => string; indicatorActive: () => (_className: string) => string; barContainer: (_className: string) => string; bar: (_className: string) => string; }; /** @docs-private */ export declare enum CarouselMode { /** full */ default = 0, inline = 1 } export declare class LyCarousel implements OnInit, AfterViewInit, OnDestroy { private _el; private _cd; private _theme; private _renderer; readonly sRenderer: StyleRenderer; private _platform; /** @docs-private */ readonly classes: LyClasses<(theme: ThemeVariables & LyCarouselVariables, ref: ThemeRef) => { $priority: number; $global: (_className: string) => string; root: () => (_className: string) => string; actions: (_className: string) => string; actionIcon: (_className: string) => string; slideContainer: (_className: string) => string; slide: (_className: string) => string; slideContent: (_className: string) => string; slideAnim: (_className: string) => string; slideNoEvent: (_className: string) => string; indicators: () => (_className: string) => string; indicator: () => (_className: string) => string; indicatorIcon: () => (_className: string) => string; indicatorActive: () => (_className: string) => string; barContainer: (_className: string) => string; bar: (_className: string) => string; }>; private _intervalFn; slideContainer: ElementRef; _slide: ElementRef; _progressBar: ElementRef<HTMLDivElement>; lyItems: QueryList<LyCarouselItem>; /** @docs-private */ mode: CarouselMode; selectedIndex: number; darkIconActived: boolean; set darkIcon(val: BooleanInput); get darkIcon(): boolean; private _darkIcon; _selectedElement: HTMLElement; private _touch; private _autoplay; private _hasProgressBar; private _interval; private _slideClass; /** Emits whenever the component is destroyed. */ private readonly _destroy; /** @internal */ get _isIntervalFn(): boolean; /** * It will pause the slide change when the mouse cursor passes * through the carousel. */ get pauseOnHover(): BooleanInput; set pauseOnHover(val: BooleanInput); private _pauseOnHover; set touch(val: BooleanInput); get touch(): BooleanInput; set autoplay(val: BooleanInput); get autoplay(): BooleanInput; set hasProgressBar(val: BooleanInput); get hasProgressBar(): BooleanInput; set interval(val: number); get interval(): number; set hasNavigationArrows(val: BooleanInput); get hasNavigationArrows(): BooleanInput; private _hasNavigationArrows; set hasNavigationIndicators(val: BooleanInput); get hasNavigationIndicators(): BooleanInput; private _hasNavigationIndicators; constructor(_el: ElementRef, _cd: ChangeDetectorRef, _theme: LyTheme2, _renderer: Renderer2, sRenderer: StyleRenderer, _platform: Platform); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; _onMouseEnter(): void; _onMouseLeave(): void; /** @docs-private */ _onDragStart(): void; _onDrag(e: any): void; _onDragEnd(e: any): void; _onDragCancel(): void; _select(val: number, notResetInterval?: boolean): void; prev(): void; next(notResetInterval?: boolean): void; stop(): void; private _resetInterval; private _restartProgressBarAnimation; private _onPan; private _markForCheck; static ɵfac: i0.ɵɵFactoryDeclaration<LyCarousel, never>; static ɵcmp: i0.ɵɵComponentDeclaration<LyCarousel, "ly-carousel", never, { "mode": { "alias": "mode"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "darkIcon": { "alias": "darkIcon"; "required": false; }; "pauseOnHover": { "alias": "pauseOnHover"; "required": false; }; "touch": { "alias": "touch"; "required": false; }; "autoplay": { "alias": "autoplay"; "required": false; }; "hasProgressBar": { "alias": "hasProgressBar"; "required": false; }; "interval": { "alias": "interval"; "required": false; }; "hasNavigationArrows": { "alias": "hasNavigationArrows"; "required": false; }; "hasNavigationIndicators": { "alias": "hasNavigationIndicators"; "required": false; }; }, {}, ["lyItems"], ["*"], false, never>; } export declare class LyCarouselItem { private _theme; private _className; readonly sRenderer: StyleRenderer; set darkIcon(val: boolean | null); get darkIcon(): boolean | null; private _darkIcon; set srcImg(value: string); _nativeElement: HTMLElement; constructor(_theme: LyTheme2, _el: ElementRef); static ɵfac: i0.ɵɵFactoryDeclaration<LyCarouselItem, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<LyCarouselItem, "ly-carousel-item", never, { "darkIcon": { "alias": "darkIcon"; "required": false; }; "srcImg": { "alias": "srcImg"; "required": false; }; }, {}, never, never, false, never>; }