UNPKG

@wix/design-system

Version:

@wix/design-system

98 lines 3.89 kB
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { CarouselWIPProps } from './CarouselWIP.types'; type CarouselWIPState = { visibleSlides: number[]; isAnimating: boolean; isLoading: boolean; isLeftArrowDisabled: boolean; isRightArrowDisabled: boolean; isShowStartGradient: boolean; isShowEndGradient: boolean; isDragging: boolean; }; /** The carousel component creates a slideshow for cycling through a series of content. */ declare class CarouselWIP extends PureComponent<CarouselWIPProps, CarouselWIPState> { static displayName: string; static propTypes: { dataHook: PropTypes.Requireable<any>; className: PropTypes.Requireable<any>; children: PropTypes.Requireable<any>; images: PropTypes.Requireable<any>; controlsSkin: PropTypes.Requireable<any>; showControlsShadow: PropTypes.Requireable<any>; infinite: PropTypes.Requireable<any>; initialSlideIndex: PropTypes.Requireable<any>; afterChange: PropTypes.Requireable<any>; beforeChange: PropTypes.Requireable<any>; controlsPosition: PropTypes.Requireable<any>; controlsSize: PropTypes.Requireable<any>; controlsStartEnd: PropTypes.Requireable<any>; slidingType: PropTypes.Requireable<any>; startEndOffset: PropTypes.Requireable<any>; gutter: PropTypes.Requireable<any>; sidesGradientColor: PropTypes.Requireable<any>; imagesPosition: PropTypes.Requireable<any>; imagesFit: PropTypes.Requireable<any>; autoplay: PropTypes.Requireable<any>; hideDots: PropTypes.Requireable<any>; variableWidth: PropTypes.Requireable<any>; animationDuration: PropTypes.Requireable<any>; easing: PropTypes.Requireable<any>; }; static defaultProps: { children: never[]; infinite: boolean; controlsSkin: string; controlsStartEnd: string; showControlsShadow: boolean; images: never[]; initialSlideIndex: number; controlsPosition: string; controlsSize: string; slidingType: string; startEndOffset: number; gutter: undefined; hideDots: boolean; autoplay: boolean; }; loadingImagesCount: number; childCount: number; autoplayTimer: number; carousel?: HTMLDivElement; dragStartX: number | null; initialScrollLeft: number; capturedPointerId: number | null; hasSetPointerCapture: boolean; constructor(props: CarouselWIPProps); componentDidMount(): void; componentDidUpdate(prevProps: CarouselWIPProps): void; _setImagesOnLoadHandlers: () => void; _updateChildCount: () => void; _onImageLoad: () => void; _setAutoplayTimer: (active?: boolean) => void; _setVisibleSlides: () => void; private _slideTo; _next: () => Promise<void>; _prev: () => Promise<void>; _setRef: (r: HTMLDivElement) => void; _renderLeftControl: () => false | React.JSX.Element; _renderRightControl: () => false | React.JSX.Element; _handlePointerDown: (e: React.PointerEvent) => void; private requestAnimationFrameId; _handlePointerMove: (e: React.PointerEvent) => void; _handlePointerUp: (e: React.PointerEvent) => void; _handlePointerCancel: (e: React.PointerEvent) => void; _handleSwipeEnd: (e: React.PointerEvent) => void; _releasePointerCapture: (capturedPointerId: number) => void; _resetDragState: () => void; _renderSlides: () => React.JSX.Element; _renderLoader: () => React.JSX.Element; _renderDots: () => React.JSX.Element; _renderStartGradient: () => React.JSX.Element; _renderEndGradient: () => React.JSX.Element; render(): React.JSX.Element; componentWillUnmount(): void; } export default CarouselWIP; //# sourceMappingURL=CarouselWIP.d.ts.map