import * as React from 'react'; import { InteractiveSurface, InteractiveSurfaceProps } from '../InteractiveSurface'; import { StandardProps } from '../../common'; export interface CarouselChangeEvent { /** * The previously selected page index. */ previousIndex: number; /** * The currently selected page index. */ selectedIndex: number; } export interface CarouselStopEvent { /** * The reason for stopping the autoplay mode. */ reason: 'ended' | 'manual'; /** * Resumes execution of the autoplay mode. */ resume(): void; } export interface CarouselProps extends StandardProps { /** * The default page index - only set for use in automatic mode. */ defaultIndex?: number; /** * The currently selected page index - used in the controlled mode. */ selectedIndex?: number; /** * Notification callback if the selected page index should change. */ onPageChange?(e: CarouselChangeEvent): void; /** * The children, usually passed as a collection of elements. */ children?: React.ReactNode; /** * Overrides the default container for bullets. */ bulletsContainer?: React.ComponentType; /** * Overrides the default bullet point component. */ bullet?: React.ComponentType; /** * Displays the previous / next arrow. By default disabled. * @default false */ arrows?: boolean; /** * Event emitted once the Carousel autoplay stops. */ onStop?(e: CarouselStopEvent): void; /** * Activate the autoplay mode, potentially with the time per slide * in milliseconds. By default 3000. * @default false */ autoplay?: boolean | number; /** * Whether the Carousel can loop without stopping. * @default false */ infinite?: boolean; /** * Whether the Carousel can stop propagation so that links can be clicked * @default false */ opaque?: InteractiveSurfaceProps['opaque']; } export interface DragStatus { isDragging: boolean; start?: Point; } export interface Point { x: number; y: number; } export interface CarouselState { /** * The currently selected page index. */ selectedIndex: number; /** * Determines if the tab component is controlled from the outside or not. */ controlled: boolean; /** * Status of the current swipe move. */ dragStatus: DragStatus; } export interface BulletProps extends StandardProps { /** * Determines if the bullet is active or not. */ active: boolean; /** * Fired once the bullet has been clicked. */ onClick(): void; /** * Sets the bullet's index. */ index: number; } /** * The Carousel component displays a toggling list of content. Page can be changed using bullet * controls or swiping gestures. */ export declare class Carousel extends React.PureComponent { private selects; private pagesContainer; private autoPlayTimeout; constructor(props: CarouselProps); UNSAFE_componentWillReceiveProps(nextProps: CarouselProps): void; componentDidMount(): void; componentWillUnmount(): void; private tryToPlay; private play; private stop; private resume; private changePage; private dragTile; private checkPageChange; private setDragStyle; private resetInitialStyle; private swipe; private swipeLeft; private swipeRight; private swipeRightAuto; private handleKeyDown; render(): JSX.Element; static inner: { readonly PageItem: any; readonly RootContainer: any; readonly Mask: any; readonly InteractiveSurface: typeof InteractiveSurface; readonly PagesContainer: any; readonly ArrowLeft: any; readonly Icon: React.FC & { inner: { readonly StyledIcon: any; }; }; readonly ArrowRight: any; }; }