react-slideshow-image 4.3.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"react-slideshow-image.esm.js","sources":["../src/helpers.tsx","../src/props.ts","../src/fadezoom.tsx","../src/fade.tsx","../src/zoom.tsx","../src/slide.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n ButtonClick,\n FadeProps,\n IndicatorPropsType,\n Responsive,\n SlideProps,\n TweenEasingFn,\n ZoomProps,\n} from './types';\nimport { Easing } from '@tweenjs/tween.js';\n\nexport const getStartingIndex = (children: ReactNode, defaultIndex?: number): number => {\n if (defaultIndex && defaultIndex < React.Children.count(children)) {\n return defaultIndex;\n }\n return 0;\n};\n\nexport const getResponsiveSettings = (\n wrapperWidth: number,\n responsive?: Array<Responsive>\n): Responsive | undefined => {\n if (typeof window !== 'undefined' && Array.isArray(responsive)) {\n return responsive.find((each) => each.breakpoint <= wrapperWidth);\n }\n return;\n};\n\nconst EASING_METHODS: { [key: string]: TweenEasingFn } = {\n linear: Easing.Linear.None,\n ease: Easing.Quadratic.InOut,\n 'ease-in': Easing.Quadratic.In,\n 'ease-out': Easing.Quadratic.Out,\n cubic: Easing.Cubic.InOut,\n 'cubic-in': Easing.Cubic.In,\n 'cubic-out': Easing.Cubic.Out,\n};\n\nexport const getEasing = (easeMethod?: string): TweenEasingFn => {\n if (easeMethod) {\n return EASING_METHODS[easeMethod];\n }\n return EASING_METHODS.linear;\n};\n\nexport const showPreviousArrow = (\n { prevArrow, infinite }: FadeProps | SlideProps | ZoomProps,\n currentIndex: number,\n moveSlides: ButtonClick\n): ReactNode => {\n const isDisabled = currentIndex <= 0 && !infinite;\n const props = {\n 'data-type': 'prev',\n 'aria-label': 'Previous Slide',\n disabled: isDisabled,\n onClick: moveSlides,\n };\n if (prevArrow) {\n return React.cloneElement(prevArrow, {\n className: `${prevArrow.props.className || ''} nav ${isDisabled ? 'disabled' : ''}`,\n ...props,\n });\n }\n const className = `nav default-nav ${isDisabled ? 'disabled' : ''}`;\n return (\n <button type=\"button\" className={className} {...props}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path d=\"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z\" />\n </svg>\n </button>\n );\n};\n\nexport const showNextArrow = (\n properties: FadeProps | SlideProps | ZoomProps,\n currentIndex: number,\n moveSlides: ButtonClick,\n responsiveSettings?: Responsive\n) => {\n const { nextArrow, infinite, children } = properties;\n let slidesToScroll = 1;\n if (responsiveSettings) {\n slidesToScroll = responsiveSettings?.settings.slidesToScroll;\n } else if ('slidesToScroll' in properties) {\n slidesToScroll = properties.slidesToScroll || 1;\n }\n const isDisabled = currentIndex >= React.Children.count(children) - slidesToScroll && !infinite;\n const props = {\n 'data-type': 'next',\n 'aria-label': 'Next Slide',\n disabled: isDisabled,\n onClick: moveSlides,\n };\n if (nextArrow) {\n return React.cloneElement(nextArrow, {\n className: `${nextArrow.props.className || ''} nav ${isDisabled ? 'disabled' : ''}`,\n ...props,\n });\n }\n const className = `nav default-nav ${isDisabled ? 'disabled' : ''}`;\n return (\n <button type=\"button\" className={className} {...props}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path d=\"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z\" />\n </svg>\n </button>\n );\n};\n\nconst showDefaultIndicator = (\n isCurrentPageActive: boolean,\n key: number,\n indicatorProps: IndicatorPropsType\n) => {\n return (\n <li key={key}>\n <button\n type=\"button\"\n className={`each-slideshow-indicator ${isCurrentPageActive ? 'active' : ''}`}\n {...indicatorProps}\n />\n </li>\n );\n};\n\nconst showCustomIndicator = (\n isCurrentPageActive: boolean,\n key: number,\n indicatorProps: any,\n eachIndicator: any\n) => {\n return React.cloneElement(eachIndicator, {\n className: `${eachIndicator.props.className} ${isCurrentPageActive ? 'active' : ''}`,\n key,\n ...indicatorProps,\n });\n};\n\nexport const showIndicators = (\n props: FadeProps | SlideProps | ZoomProps,\n currentIndex: number,\n navigate: ButtonClick,\n responsiveSettings?: Responsive\n): ReactNode => {\n const { children, indicators } = props;\n let slidesToScroll = 1;\n if (responsiveSettings) {\n slidesToScroll = responsiveSettings?.settings.slidesToScroll;\n } else if ('slidesToScroll' in props) {\n slidesToScroll = props.slidesToScroll || 1;\n }\n const pages = Math.ceil(React.Children.count(children) / slidesToScroll);\n return (\n <ul className=\"indicators\">\n {Array.from({ length: pages }, (_, key) => {\n const indicatorProps: IndicatorPropsType = {\n 'data-key': key,\n 'aria-label': `Go to slide ${key + 1}`,\n onClick: navigate,\n };\n const isCurrentPageActive =\n Math.floor((currentIndex + slidesToScroll - 1) / slidesToScroll) === key;\n if (typeof indicators === 'function') {\n return showCustomIndicator(\n isCurrentPageActive,\n key,\n indicatorProps,\n indicators(key)\n );\n }\n return showDefaultIndicator(isCurrentPageActive, key, indicatorProps);\n })}\n </ul>\n );\n};\n","export const defaultProps = {\n duration: 5000,\n transitionDuration: 1000,\n defaultIndex: 0,\n infinite: true,\n autoplay: true,\n indicators: false,\n arrows: true,\n pauseOnHover: true,\n easing: 'linear',\n canSwipe: true,\n cssClass: '',\n responsive: [],\n};\n","import React, {\n useState,\n useRef,\n useEffect,\n useMemo,\n useImperativeHandle,\n useCallback,\n} from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { Group, Tween } from '@tweenjs/tween.js';\nimport {\n getEasing,\n getStartingIndex,\n showIndicators,\n showNextArrow,\n showPreviousArrow,\n} from './helpers';\nimport { ButtonClick, SlideshowRef, ZoomProps } from './types';\nimport { defaultProps } from './props';\n\nexport const FadeZoom = React.forwardRef<SlideshowRef, ZoomProps>((props, ref) => {\n const [index, setIndex] = useState<number>(\n getStartingIndex(props.children, props.defaultIndex)\n );\n const wrapperRef = useRef<HTMLDivElement>(null);\n const innerWrapperRef = useRef<any>(null);\n const tweenGroup = useRef(new Group());\n const timeout = useRef<NodeJS.Timeout>();\n const resizeObserver = useRef<any>();\n const childrenCount = useMemo(() => React.Children.count(props.children), [props.children]);\n\n const applyStyle = useCallback(() => {\n if (innerWrapperRef.current && wrapperRef.current) {\n const wrapperWidth = wrapperRef.current.clientWidth;\n const fullwidth = wrapperWidth * childrenCount;\n innerWrapperRef.current.style.width = `${fullwidth}px`;\n for (let index = 0; index < innerWrapperRef.current.children.length; index++) {\n const eachDiv = innerWrapperRef.current.children[index];\n if (eachDiv) {\n eachDiv.style.width = `${wrapperWidth}px`;\n eachDiv.style.left = `${index * -wrapperWidth}px`;\n eachDiv.style.display = `block`;\n }\n }\n }\n }, [wrapperRef, innerWrapperRef, childrenCount]);\n\n const initResizeObserver = useCallback(() => {\n if (wrapperRef.current) {\n resizeObserver.current = new ResizeObserver((entries) => {\n if (!entries) return;\n applyStyle();\n });\n resizeObserver.current.observe(wrapperRef.current);\n }\n }, [wrapperRef, applyStyle]);\n\n const play = useCallback(() => {\n const { autoplay, children, duration, infinite } = props;\n if (\n autoplay &&\n React.Children.count(children) > 1 &&\n (infinite || index < React.Children.count(children) - 1)\n ) {\n timeout.current = setTimeout(moveNext, duration);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props, index]);\n\n useEffect(() => {\n initResizeObserver();\n return () => {\n tweenGroup.current.removeAll();\n clearTimeout(timeout.current);\n removeResizeObserver();\n };\n }, [initResizeObserver, tweenGroup]);\n\n useEffect(() => {\n clearTimeout(timeout.current);\n play();\n }, [index, props.autoplay, play]);\n\n useEffect(() => {\n applyStyle();\n }, [childrenCount, applyStyle]);\n\n useImperativeHandle(ref, () => ({\n goNext: () => {\n moveNext();\n },\n goBack: () => {\n moveBack();\n },\n goTo: (index: number, options?: { skipTransition?: boolean }) => {\n if (options?.skipTransition) {\n setIndex(index);\n } else {\n moveTo(index);\n }\n },\n }));\n\n const removeResizeObserver = () => {\n if (resizeObserver.current && wrapperRef.current) {\n resizeObserver.current.unobserve(wrapperRef.current);\n }\n };\n\n const pauseSlides = () => {\n if (props.pauseOnHover) {\n clearTimeout(timeout.current);\n }\n };\n\n const startSlides = () => {\n const { pauseOnHover, autoplay, duration } = props;\n if (pauseOnHover && autoplay) {\n timeout.current = setTimeout(() => moveNext(), duration);\n }\n };\n\n const moveNext = () => {\n const { children, infinite } = props;\n if (!infinite && index === React.Children.count(children) - 1) {\n return;\n }\n transitionSlide((index + 1) % React.Children.count(children));\n };\n\n const moveBack = () => {\n const { children, infinite } = props;\n if (!infinite && index === 0) {\n return;\n }\n transitionSlide(index === 0 ? React.Children.count(children) - 1 : index - 1);\n };\n\n const preTransition: ButtonClick = (event) => {\n const { currentTarget } = event;\n if (currentTarget.dataset.type === 'prev') {\n moveBack();\n } else {\n moveNext();\n }\n };\n\n const animate = () => {\n requestAnimationFrame(animate);\n tweenGroup.current.update();\n };\n\n const transitionSlide = (newIndex: number) => {\n const existingTweens = tweenGroup.current.getAll();\n if (!existingTweens.length) {\n if (!innerWrapperRef.current?.children[newIndex]) {\n newIndex = 0;\n }\n clearTimeout(timeout.current);\n const value = { opacity: 0, scale: 1 };\n\n animate();\n\n const tween = new Tween(value, tweenGroup.current)\n .to({ opacity: 1, scale: props.scale }, props.transitionDuration)\n .onUpdate((value) => {\n if (!innerWrapperRef.current) {\n return;\n }\n innerWrapperRef.current.children[newIndex].style.opacity = value.opacity;\n innerWrapperRef.current.children[index].style.opacity = 1 - value.opacity;\n innerWrapperRef.current.children[\n index\n ].style.transform = `scale(${value.scale})`;\n });\n tween.easing(getEasing(props.easing));\n tween.onStart(() => {\n if (typeof props.onStartChange === 'function') {\n props.onStartChange(index, newIndex);\n }\n });\n tween.onComplete(() => {\n if (innerWrapperRef.current) {\n setIndex(newIndex);\n innerWrapperRef.current.children[index].style.transform = `scale(1)`;\n }\n if (typeof props.onChange === 'function') {\n props.onChange(index, newIndex);\n }\n });\n tween.start();\n }\n };\n\n const moveTo = (gotoIndex: number) => {\n if (gotoIndex !== index) {\n transitionSlide(gotoIndex);\n }\n };\n\n const navigate: ButtonClick = (event) => {\n const { currentTarget } = event;\n if (!currentTarget.dataset.key) {\n return;\n }\n if (parseInt(currentTarget.dataset.key) !== index) {\n moveTo(parseInt(currentTarget.dataset.key));\n }\n };\n\n return (\n <div dir=\"ltr\" aria-roledescription=\"carousel\">\n <div\n className={`react-slideshow-container ${props.cssClass || ''}`}\n onMouseEnter={pauseSlides}\n onMouseOver={pauseSlides}\n onMouseLeave={startSlides}\n >\n {props.arrows && showPreviousArrow(props, index, preTransition)}\n <div\n className={`react-slideshow-fadezoom-wrapper ${props.cssClass}`}\n ref={wrapperRef}\n >\n <div className=\"react-slideshow-fadezoom-images-wrap\" ref={innerWrapperRef}>\n {(React.Children.map(props.children, (thisArg) => thisArg) || []).map(\n (each, key) => (\n <div\n style={{\n opacity: key === index ? '1' : '0',\n zIndex: key === index ? '1' : '0',\n }}\n data-index={key}\n key={key}\n aria-roledescription=\"slide\"\n aria-hidden={key === index ? 'false' : 'true'}\n >\n {each}\n </div>\n )\n )}\n </div>\n </div>\n {props.arrows && showNextArrow(props, index, preTransition)}\n </div>\n {props.indicators && showIndicators(props, index, navigate)}\n </div>\n );\n});\n\nFadeZoom.defaultProps = defaultProps;\n","import React from 'react';\nimport { FadeZoom } from './fadezoom';\nimport { defaultProps } from './props';\nimport { FadeProps, SlideshowRef } from './types';\n\nexport const Fade = React.forwardRef<SlideshowRef, FadeProps>((props, ref) => {\n return <FadeZoom {...props} scale={1} ref={ref} />;\n});\n\nFade.defaultProps = defaultProps;\n","import React from 'react';\nimport { FadeZoom } from './fadezoom';\nimport { defaultProps } from './props';\nimport { SlideshowRef, ZoomProps } from './types';\n\nexport const Zoom = React.forwardRef<SlideshowRef, ZoomProps>((props, ref) => {\n return <FadeZoom {...props} ref={ref} />;\n});\n\nZoom.defaultProps = defaultProps;\n","import React, {\n useState,\n useRef,\n useEffect,\n useMemo,\n useImperativeHandle,\n useCallback,\n} from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { Group, Tween } from '@tweenjs/tween.js';\nimport {\n getEasing,\n getResponsiveSettings,\n getStartingIndex,\n showIndicators,\n showNextArrow,\n showPreviousArrow,\n} from './helpers';\nimport { ButtonClick, SlideshowRef, SlideProps } from './types';\nimport { defaultProps } from './props';\n\nexport const Slide = React.forwardRef<SlideshowRef, SlideProps>((props, ref) => {\n const [index, setIndex] = useState(getStartingIndex(props.children, props.defaultIndex));\n const [wrapperSize, setWrapperSize] = useState<number>(0);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const innerWrapperRef = useRef<any>(null);\n const tweenGroup = useRef(new Group());\n const responsiveSettings = useMemo(\n () => getResponsiveSettings(wrapperSize, props.responsive),\n [wrapperSize, props.responsive]\n );\n const slidesToScroll = useMemo(() => {\n if (responsiveSettings) {\n return responsiveSettings.settings.slidesToScroll;\n }\n return props.slidesToScroll || 1;\n }, [responsiveSettings, props.slidesToScroll]);\n const slidesToShow = useMemo(() => {\n if (responsiveSettings) {\n return responsiveSettings.settings.slidesToShow;\n }\n return props.slidesToShow || 1;\n }, [responsiveSettings, props.slidesToShow]);\n const childrenCount = useMemo(() => React.Children.count(props.children), [props.children]);\n const eachChildSize = useMemo(() => wrapperSize / slidesToShow, [wrapperSize, slidesToShow]);\n const timeout = useRef<NodeJS.Timeout>();\n const resizeObserver = useRef<any>();\n let startingSwipePosition: number;\n let dragging: boolean = false;\n let distanceSwiped: number = 0;\n const translateType = props.vertical ? 'translateY' : 'translateX';\n const swipeAttributeType = props.vertical ? 'clientY' : 'clientX';\n const swipePageAttributeType = props.vertical ? 'pageY' : 'pageX';\n\n const applyStyle = useCallback(() => {\n if (innerWrapperRef.current) {\n const fullSize = wrapperSize * innerWrapperRef.current.children.length;\n const attribute = props.vertical ? 'height' : 'width';\n innerWrapperRef.current.style[attribute] = `${fullSize}px`;\n if (props.vertical && wrapperRef.current) {\n wrapperRef.current.style[attribute] = `${wrapperSize}px`;\n }\n for (let index = 0; index < innerWrapperRef.current.children.length; index++) {\n const eachDiv = innerWrapperRef.current.children[index];\n if (eachDiv) {\n if (!props.vertical) {\n eachDiv.style[attribute] = `${eachChildSize}px`;\n }\n eachDiv.style.display = `block`;\n }\n }\n }\n }, [wrapperSize, eachChildSize]);\n\n const initResizeObserver = useCallback(() => {\n if (wrapperRef.current) {\n resizeObserver.current = new ResizeObserver((entries) => {\n if (!entries) return;\n setSize();\n });\n resizeObserver.current.observe(wrapperRef.current);\n }\n }, [wrapperRef]);\n\n const play = useCallback(() => {\n const { autoplay, infinite, duration } = props;\n if (autoplay && (infinite || index < childrenCount - 1)) {\n timeout.current = setTimeout(moveNext, duration);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props, childrenCount, index]);\n\n useEffect(() => {\n applyStyle();\n }, [wrapperSize, applyStyle]);\n\n useEffect(() => {\n initResizeObserver();\n return () => {\n tweenGroup.current.removeAll();\n clearTimeout(timeout.current);\n removeResizeObserver();\n };\n }, [wrapperRef, initResizeObserver, tweenGroup]);\n\n useEffect(() => {\n clearTimeout(timeout.current);\n play();\n }, [index, wrapperSize, props.autoplay, play]);\n\n useImperativeHandle(ref, () => ({\n goNext: () => {\n moveNext();\n },\n goBack: () => {\n moveBack();\n },\n goTo: (index: number, options?: { skipTransition?: boolean }) => {\n if (options?.skipTransition) {\n setIndex(index);\n } else {\n moveTo(index);\n }\n },\n }));\n\n const removeResizeObserver = () => {\n if (resizeObserver && wrapperRef.current) {\n resizeObserver.current.unobserve(wrapperRef.current);\n }\n };\n\n const pauseSlides = () => {\n if (props.pauseOnHover) {\n clearTimeout(timeout.current);\n }\n };\n\n const swipe = (event: React.MouseEvent | React.TouchEvent) => {\n if (props.canSwipe && dragging) {\n let position;\n if (window.TouchEvent && event.nativeEvent instanceof TouchEvent) {\n position = event.nativeEvent.touches[0][swipePageAttributeType];\n } else {\n position = (event.nativeEvent as MouseEvent)[swipeAttributeType];\n }\n if (position && startingSwipePosition) {\n let translateValue = eachChildSize * (index + getOffset());\n const distance = position - startingSwipePosition;\n if (!props.infinite && index === childrenCount - slidesToScroll && distance < 0) {\n // if it is the last and infinite is false and you're swiping left\n // then nothing happens\n return;\n }\n if (!props.infinite && index === 0 && distance > 0) {\n // if it is the first and infinite is false and you're swiping right\n // then nothing happens\n return;\n }\n distanceSwiped = distance;\n translateValue -= distanceSwiped;\n innerWrapperRef.current.style.transform = `${translateType}(-${translateValue}px)`;\n }\n }\n };\n\n const moveNext = () => {\n if (!props.infinite && index === childrenCount - slidesToScroll) {\n return;\n }\n const nextIndex = calculateIndex(index + slidesToScroll);\n transitionSlide(nextIndex);\n };\n\n const moveBack = () => {\n if (!props.infinite && index === 0) {\n return;\n }\n let previousIndex = index - slidesToScroll;\n if (previousIndex % slidesToScroll) {\n previousIndex = Math.ceil(previousIndex / slidesToScroll) * slidesToScroll;\n }\n transitionSlide(previousIndex);\n };\n\n const goToSlide: ButtonClick = ({ currentTarget }) => {\n if (!currentTarget.dataset.key) {\n return;\n }\n const datasetKey = parseInt(currentTarget.dataset.key);\n moveTo(datasetKey * slidesToScroll);\n };\n\n const moveTo = (index: number) => {\n transitionSlide(calculateIndex(index));\n };\n\n const calculateIndex = (nextIndex: number): number => {\n if (nextIndex < childrenCount && nextIndex + slidesToScroll > childrenCount) {\n if ((childrenCount - slidesToScroll) % slidesToScroll) {\n return childrenCount - slidesToScroll;\n }\n return nextIndex;\n }\n return nextIndex;\n };\n\n const startSlides = () => {\n if (dragging) {\n endSwipe();\n } else if (props.pauseOnHover && props.autoplay) {\n timeout.current = setTimeout(moveNext, props.duration);\n }\n };\n\n const moveSlides: ButtonClick = ({ currentTarget: { dataset } }) => {\n if (dataset.type === 'next') {\n moveNext();\n } else {\n moveBack();\n }\n };\n\n const renderPreceedingSlides = () => {\n return React.Children.toArray(props.children)\n .slice(-slidesToShow)\n .map((each, index) => (\n <div\n data-index={index - slidesToShow}\n aria-roledescription=\"slide\"\n aria-hidden=\"true\"\n key={index - slidesToShow}\n >\n {each}\n </div>\n ));\n };\n\n const renderTrailingSlides = () => {\n if (!props.infinite && slidesToShow === slidesToScroll) {\n return;\n }\n return React.Children.toArray(props.children)\n .slice(0, slidesToShow)\n .map((each, index) => (\n <div\n data-index={childrenCount + index}\n aria-roledescription=\"slide\"\n aria-hidden=\"true\"\n key={childrenCount + index}\n >\n {each}\n </div>\n ));\n };\n\n const setSize = () => {\n const attribute = props.vertical ? 'clientHeight' : 'clientWidth';\n if (props.vertical) {\n if (innerWrapperRef.current) {\n setWrapperSize(innerWrapperRef.current.children[0][attribute]);\n }\n } else {\n if (wrapperRef.current) {\n setWrapperSize(wrapperRef.current[attribute]);\n }\n }\n };\n\n const startSwipe = (event: React.MouseEvent | React.TouchEvent) => {\n if (props.canSwipe) {\n if (window.TouchEvent && event.nativeEvent instanceof TouchEvent) {\n startingSwipePosition = event.nativeEvent.touches[0][swipePageAttributeType];\n } else {\n startingSwipePosition = (event.nativeEvent as MouseEvent)[swipeAttributeType];\n }\n clearTimeout(timeout.current);\n dragging = true;\n }\n };\n\n const endSwipe = () => {\n if (props.canSwipe) {\n dragging = false;\n if (Math.abs(distanceSwiped) / wrapperSize > 0.2) {\n if (distanceSwiped < 0) {\n moveNext();\n } else {\n moveBack();\n }\n } else {\n if (Math.abs(distanceSwiped) > 0) {\n transitionSlide(index, 300);\n }\n }\n }\n };\n\n const animate = () => {\n requestAnimationFrame(animate);\n tweenGroup.current.update();\n };\n\n const transitionSlide = (toIndex: number, animationDuration?: number) => {\n const transitionDuration = animationDuration || props.transitionDuration;\n const currentIndex = index;\n const existingTweens = tweenGroup.current.getAll();\n if (!wrapperRef.current) {\n return;\n }\n const attribute = props.vertical ? 'clientHeight' : 'clientWidth';\n const childSize = wrapperRef.current[attribute] / slidesToShow;\n if (!existingTweens.length) {\n clearTimeout(timeout.current);\n const value = {\n margin: -childSize * (currentIndex + getOffset()) + distanceSwiped,\n };\n const tween = new Tween(value, tweenGroup.current)\n .to({ margin: -childSize * (toIndex + getOffset()) }, transitionDuration)\n .onUpdate((value) => {\n if (innerWrapperRef.current) {\n innerWrapperRef.current.style.transform = `${translateType}(${value.margin}px)`;\n }\n });\n tween.easing(getEasing(props.easing));\n\n animate();\n\n let newIndex = toIndex;\n if (newIndex < 0) {\n newIndex = childrenCount - slidesToScroll;\n } else if (newIndex >= childrenCount) {\n newIndex = 0;\n }\n\n tween.onStart(() => {\n if (typeof props.onStartChange === 'function') {\n props.onStartChange(index, newIndex);\n }\n });\n\n tween.onComplete(() => {\n distanceSwiped = 0;\n if (typeof props.onChange === 'function') {\n props.onChange(index, newIndex);\n }\n setIndex(newIndex);\n });\n\n tween.start();\n }\n };\n\n const isSlideActive = (key: number) => {\n return key < index + slidesToShow && key >= index;\n };\n\n const getOffset = (): number => {\n if (!props.infinite) {\n return 0;\n }\n return slidesToShow;\n };\n\n const style = {\n transform: `${translateType}(-${(index + getOffset()) * eachChildSize}px)`,\n };\n return (\n <div dir=\"ltr\" aria-roledescription=\"carousel\">\n <div\n className=\"react-slideshow-container\"\n onMouseEnter={pauseSlides}\n onMouseOver={pauseSlides}\n onMouseLeave={startSlides}\n onMouseDown={startSwipe}\n onMouseUp={endSwipe}\n onMouseMove={swipe}\n onTouchStart={startSwipe}\n onTouchEnd={endSwipe}\n onTouchCancel={endSwipe}\n onTouchMove={swipe}\n >\n {props.arrows && showPreviousArrow(props, index, moveSlides)}\n <div\n className={`react-slideshow-wrapper slide ${props.cssClass || ''}`}\n ref={wrapperRef}\n >\n <div\n className={`images-wrap ${props.vertical ? 'vertical' : 'horizontal'}`}\n style={style}\n ref={innerWrapperRef}\n >\n {props.infinite && renderPreceedingSlides()}\n {(React.Children.map(props.children, (thisArg) => thisArg) || []).map(\n (each, key) => {\n const isThisSlideActive = isSlideActive(key);\n return (\n <div\n data-index={key}\n key={key}\n className={isThisSlideActive ? 'active' : ''}\n aria-roledescription=\"slide\"\n aria-hidden={isThisSlideActive ? 'false' : 'true'}\n >\n {each}\n </div>\n );\n }\n )}\n {renderTrailingSlides()}\n </div>\n </div>\n {props.arrows && showNextArrow(props, index, moveSlides, responsiveSettings)}\n </div>\n {!!props.indicators && showIndicators(props, index, goToSlide, responsiveSettings)}\n </div>\n );\n});\n\nSlide.defaultProps = defaultProps;\n"],"names":["getStartingIndex","children","defaultIndex","React","Children","count","getResponsiveSettings","wrapperWidth","responsive","window","Array","isArray","find","each","breakpoint","EASING_METHODS","linear","Easing","Linear","None","ease","Quadratic","InOut","In","Out","cubic","Cubic","getEasing","easeMethod","showPreviousArrow","_ref","currentIndex","moveSlides","prevArrow","infinite","isDisabled","props","disabled","onClick","cloneElement","_extends","className","type","width","height","viewBox","d","showNextArrow","properties","responsiveSettings","nextArrow","slidesToScroll","settings","showDefaultIndicator","isCurrentPageActive","key","indicatorProps","showCustomIndicator","eachIndicator","showIndicators","navigate","indicators","pages","Math","ceil","from","length","_","floor","defaultProps","duration","transitionDuration","autoplay","arrows","pauseOnHover","easing","canSwipe","cssClass","FadeZoom","forwardRef","ref","_useState","useState","index","setIndex","wrapperRef","useRef","innerWrapperRef","tweenGroup","Group","timeout","resizeObserver","childrenCount","useMemo","applyStyle","useCallback","current","clientWidth","fullwidth","style","eachDiv","left","display","initResizeObserver","ResizeObserver","entries","observe","play","setTimeout","moveNext","useEffect","removeAll","clearTimeout","removeResizeObserver","useImperativeHandle","goNext","goBack","moveBack","goTo","options","skipTransition","moveTo","unobserve","pauseSlides","startSlides","transitionSlide","preTransition","event","currentTarget","dataset","animate","requestAnimationFrame","update","newIndex","existingTweens","getAll","_innerWrapperRef$curr","value","opacity","scale","tween","Tween","to","onUpdate","transform","onStart","onStartChange","onComplete","onChange","start","gotoIndex","parseInt","dir","onMouseEnter","onMouseOver","onMouseLeave","map","thisArg","zIndex","Fade","Zoom","Slide","_useState2","wrapperSize","setWrapperSize","slidesToShow","eachChildSize","startingSwipePosition","dragging","distanceSwiped","translateType","vertical","swipeAttributeType","swipePageAttributeType","fullSize","attribute","setSize","swipe","position","TouchEvent","nativeEvent","touches","translateValue","getOffset","distance","nextIndex","calculateIndex","previousIndex","goToSlide","datasetKey","endSwipe","_ref2","renderPreceedingSlides","toArray","slice","renderTrailingSlides","startSwipe","abs","toIndex","animationDuration","childSize","margin","isSlideActive","onMouseDown","onMouseUp","onMouseMove","onTouchStart","onTouchEnd","onTouchCancel","onTouchMove","isThisSlideActive"],"mappings":";;;;;;;;;;;;;;;;;;;AAYO,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,QAAmB,EAAEC,YAAqB;EACvE,IAAIA,YAAY,IAAIA,YAAY,GAAGC,KAAK,CAACC,QAAQ,CAACC,KAAK,CAACJ,QAAQ,CAAC,EAAE;IAC/D,OAAOC,YAAY;;EAEvB,OAAO,CAAC;AACZ,CAAC;AAEM,IAAMI,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAC9BC,YAAoB,EACpBC,UAA8B;EAE9B,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAIC,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC5D,OAAOA,UAAU,CAACI,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACC,UAAU,IAAIP,YAAY;MAAC;;EAErE;AACJ,CAAC;AAED,IAAMQ,cAAc,GAAqC;EACrDC,MAAM,EAAEC,MAAM,CAACC,MAAM,CAACC,IAAI;EAC1BC,IAAI,EAAEH,MAAM,CAACI,SAAS,CAACC,KAAK;EAC5B,SAAS,EAAEL,MAAM,CAACI,SAAS,CAACE,EAAE;EAC9B,UAAU,EAAEN,MAAM,CAACI,SAAS,CAACG,GAAG;EAChCC,KAAK,EAAER,MAAM,CAACS,KAAK,CAACJ,KAAK;EACzB,UAAU,EAAEL,MAAM,CAACS,KAAK,CAACH,EAAE;EAC3B,WAAW,EAAEN,MAAM,CAACS,KAAK,CAACF;CAC7B;AAEM,IAAMG,SAAS,GAAG,SAAZA,SAASA,CAAIC,UAAmB;EACzC,IAAIA,UAAU,EAAE;IACZ,OAAOb,cAAc,CAACa,UAAU,CAAC;;EAErC,OAAOb,cAAc,CAACC,MA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GAEb,CACJ,EACAsL,oBAAoB,EAAE,CACrB,CACJ,EACL/J,KAAK,CAACqC,MAAM,IAAI1B,aAAa,CAACX,KAAK,EAAE+C,KAAK,EAAEnD,UAAU,EAAEiB,kBAAkB,CAAC,CAC1E,EACL,CAAC,CAACb,KAAK,CAACyB,UAAU,IAAIF,cAAc,CAACvB,KAAK,EAAE+C,KAAK,EAAEyG,SAAS,EAAE3I,kBAAkB,CAAC,CAChF;AAEd,CAAC,CAAC;AAEFgH,KAAK,CAAC5F,YAAY,GAAGA,YAAY;;;;"}
1
+ {"version":3,"file":"react-slideshow-image.esm.js","sources":["../src/helpers.tsx","../src/fadezoom.tsx","../src/types.ts","../src/fade.tsx","../src/zoom.tsx","../src/slide.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n ButtonClick,\n FadeProps,\n IndicatorPropsType,\n Responsive,\n SlideProps,\n TweenEasingFn,\n ZoomProps,\n} from './types';\nimport { Easing } from '@tweenjs/tween.js';\n\nexport const getStartingIndex = (children: ReactNode, defaultIndex?: number): number => {\n if (defaultIndex && defaultIndex < React.Children.count(children)) {\n return defaultIndex;\n }\n return 0;\n};\n\nexport const getResponsiveSettings = (\n wrapperWidth: number,\n responsive?: Array<Responsive>\n): Responsive | undefined => {\n if (typeof window !== 'undefined' && Array.isArray(responsive)) {\n return responsive.find((each) => each.breakpoint <= wrapperWidth);\n }\n return;\n};\n\nconst EASING_METHODS: { [key: string]: TweenEasingFn } = {\n linear: Easing.Linear.None,\n ease: Easing.Quadratic.InOut,\n 'ease-in': Easing.Quadratic.In,\n 'ease-out': Easing.Quadratic.Out,\n cubic: Easing.Cubic.InOut,\n 'cubic-in': Easing.Cubic.In,\n 'cubic-out': Easing.Cubic.Out,\n};\n\nexport const getEasing = (easeMethod?: string): TweenEasingFn => {\n if (easeMethod) {\n return EASING_METHODS[easeMethod];\n }\n return EASING_METHODS.linear;\n};\n\nexport const showPreviousArrow = (\n { prevArrow, infinite }: FadeProps | SlideProps | ZoomProps,\n currentIndex: number,\n moveSlides: ButtonClick\n): ReactNode => {\n const isDisabled = currentIndex <= 0 && !infinite;\n const props = {\n 'data-type': 'prev',\n 'aria-label': 'Previous Slide',\n disabled: isDisabled,\n onClick: moveSlides,\n };\n if (prevArrow) {\n return React.cloneElement(prevArrow, {\n className: `${prevArrow.props.className || ''} nav ${isDisabled ? 'disabled' : ''}`,\n ...props,\n });\n }\n const className = `nav default-nav ${isDisabled ? 'disabled' : ''}`;\n return (\n <button type=\"button\" className={className} {...props}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path d=\"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z\" />\n </svg>\n </button>\n );\n};\n\nexport const showNextArrow = (\n properties: FadeProps | SlideProps | ZoomProps,\n currentIndex: number,\n moveSlides: ButtonClick,\n responsiveSettings?: Responsive\n) => {\n const { nextArrow, infinite, children } = properties;\n let slidesToScroll = 1;\n if (responsiveSettings) {\n slidesToScroll = responsiveSettings?.settings.slidesToScroll;\n } else if ('slidesToScroll' in properties) {\n slidesToScroll = properties.slidesToScroll || 1;\n }\n const isDisabled = currentIndex >= React.Children.count(children) - slidesToScroll && !infinite;\n const props = {\n 'data-type': 'next',\n 'aria-label': 'Next Slide',\n disabled: isDisabled,\n onClick: moveSlides,\n };\n if (nextArrow) {\n return React.cloneElement(nextArrow, {\n className: `${nextArrow.props.className || ''} nav ${isDisabled ? 'disabled' : ''}`,\n ...props,\n });\n }\n const className = `nav default-nav ${isDisabled ? 'disabled' : ''}`;\n return (\n <button type=\"button\" className={className} {...props}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path d=\"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z\" />\n </svg>\n </button>\n );\n};\n\nconst showDefaultIndicator = (\n isCurrentPageActive: boolean,\n key: number,\n indicatorProps: IndicatorPropsType\n) => {\n return (\n <li key={key}>\n <button\n type=\"button\"\n className={`each-slideshow-indicator ${isCurrentPageActive ? 'active' : ''}`}\n {...indicatorProps}\n />\n </li>\n );\n};\n\nconst showCustomIndicator = (\n isCurrentPageActive: boolean,\n key: number,\n indicatorProps: any,\n eachIndicator: any\n) => {\n return React.cloneElement(eachIndicator, {\n className: `${eachIndicator.props.className} ${isCurrentPageActive ? 'active' : ''}`,\n key,\n ...indicatorProps,\n });\n};\n\nexport const showIndicators = (\n props: FadeProps | SlideProps | ZoomProps,\n currentIndex: number,\n navigate: ButtonClick,\n responsiveSettings?: Responsive\n): ReactNode => {\n const { children, indicators } = props;\n let slidesToScroll = 1;\n if (responsiveSettings) {\n slidesToScroll = responsiveSettings?.settings.slidesToScroll;\n } else if ('slidesToScroll' in props) {\n slidesToScroll = props.slidesToScroll || 1;\n }\n const pages = Math.ceil(React.Children.count(children) / slidesToScroll);\n return (\n <ul className=\"indicators\">\n {Array.from({ length: pages }, (_, key) => {\n const indicatorProps: IndicatorPropsType = {\n 'data-key': key,\n 'aria-label': `Go to slide ${key + 1}`,\n onClick: navigate,\n };\n const isCurrentPageActive =\n Math.floor((currentIndex + slidesToScroll - 1) / slidesToScroll) === key;\n if (typeof indicators === 'function') {\n return showCustomIndicator(\n isCurrentPageActive,\n key,\n indicatorProps,\n indicators(key)\n );\n }\n return showDefaultIndicator(isCurrentPageActive, key, indicatorProps);\n })}\n </ul>\n );\n};\n","import React, {\n useState,\n useRef,\n useEffect,\n useMemo,\n useImperativeHandle,\n useCallback,\n} from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { Group, Tween } from '@tweenjs/tween.js';\nimport {\n getEasing,\n getStartingIndex,\n showIndicators,\n showNextArrow,\n showPreviousArrow,\n} from './helpers';\nimport { ButtonClick, SlideshowRef, ZoomProps } from './types';\n\nexport const FadeZoom = React.forwardRef<SlideshowRef, ZoomProps>((props, ref) => {\n const {\n duration = 5000,\n transitionDuration = 1000,\n defaultIndex = 0,\n infinite = true,\n autoplay = true,\n indicators = false,\n arrows = true,\n pauseOnHover = true,\n easing = 'linear',\n cssClass = '',\n ...others\n } = props;\n const [index, setIndex] = useState<number>(getStartingIndex(others.children, defaultIndex));\n const wrapperRef = useRef<HTMLDivElement>(null);\n const innerWrapperRef = useRef<any>(null);\n const tweenGroup = useRef(new Group());\n const timeout = useRef<NodeJS.Timeout | undefined>(undefined);\n const resizeObserver = useRef<any>(undefined);\n const childrenCount = useMemo(() => React.Children.count(others.children), [others.children]);\n\n const applyStyle = useCallback(() => {\n if (innerWrapperRef.current && wrapperRef.current) {\n const wrapperWidth = wrapperRef.current.clientWidth;\n const fullwidth = wrapperWidth * childrenCount;\n innerWrapperRef.current.style.width = `${fullwidth}px`;\n for (let index = 0; index < innerWrapperRef.current.children.length; index++) {\n const eachDiv = innerWrapperRef.current.children[index];\n if (eachDiv) {\n eachDiv.style.width = `${wrapperWidth}px`;\n eachDiv.style.left = `${index * -wrapperWidth}px`;\n eachDiv.style.display = `block`;\n }\n }\n }\n }, [wrapperRef, innerWrapperRef, childrenCount]);\n\n const initResizeObserver = useCallback(() => {\n if (wrapperRef.current) {\n resizeObserver.current = new ResizeObserver((entries) => {\n if (!entries) return;\n applyStyle();\n });\n resizeObserver.current.observe(wrapperRef.current);\n }\n }, [wrapperRef, applyStyle]);\n\n const play = useCallback(() => {\n if (\n autoplay &&\n React.Children.count(others.children) > 1 &&\n (infinite || index < React.Children.count(others.children) - 1)\n ) {\n timeout.current = setTimeout(moveNext, duration);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [autoplay, duration, infinite, others.children, index]);\n\n useEffect(() => {\n initResizeObserver();\n const tweenGroupRef = tweenGroup.current;\n return () => {\n tweenGroupRef.removeAll();\n clearTimeout(timeout.current);\n removeResizeObserver();\n };\n }, [initResizeObserver, tweenGroup]);\n\n useEffect(() => {\n clearTimeout(timeout.current);\n play();\n }, [index, autoplay, play]);\n\n useEffect(() => {\n applyStyle();\n }, [childrenCount, applyStyle]);\n\n useImperativeHandle(ref, () => ({\n goNext: () => {\n moveNext();\n },\n goBack: () => {\n moveBack();\n },\n goTo: (index: number, options?: { skipTransition?: boolean }) => {\n if (options?.skipTransition) {\n setIndex(index);\n } else {\n moveTo(index);\n }\n },\n }));\n\n const removeResizeObserver = () => {\n if (resizeObserver.current && wrapperRef.current) {\n resizeObserver.current.unobserve(wrapperRef.current);\n }\n };\n\n const pauseSlides = () => {\n if (pauseOnHover) {\n clearTimeout(timeout.current);\n }\n };\n\n const startSlides = () => {\n if (pauseOnHover && autoplay) {\n timeout.current = setTimeout(() => moveNext(), duration);\n }\n };\n\n const moveNext = () => {\n if (!infinite && index === React.Children.count(others.children) - 1) {\n return;\n }\n transitionSlide((index + 1) % React.Children.count(others.children));\n };\n\n const moveBack = () => {\n if (!infinite && index === 0) {\n return;\n }\n transitionSlide(index === 0 ? React.Children.count(others.children) - 1 : index - 1);\n };\n\n const preTransition: ButtonClick = (event) => {\n const { currentTarget } = event;\n if (currentTarget.dataset.type === 'prev') {\n moveBack();\n } else {\n moveNext();\n }\n };\n\n const animate = () => {\n requestAnimationFrame(animate);\n tweenGroup.current.update();\n };\n\n const transitionSlide = (newIndex: number) => {\n const existingTweens = tweenGroup.current.getAll();\n if (!existingTweens.length) {\n if (!innerWrapperRef.current?.children[newIndex]) {\n newIndex = 0;\n }\n clearTimeout(timeout.current);\n const value = { opacity: 0, scale: 1 };\n\n animate();\n\n const tween = new Tween(value, tweenGroup.current)\n .to({ opacity: 1, scale: others.scale }, transitionDuration)\n .onUpdate((value) => {\n if (!innerWrapperRef.current) {\n return;\n }\n innerWrapperRef.current.children[newIndex].style.opacity = value.opacity;\n innerWrapperRef.current.children[index].style.opacity = 1 - value.opacity;\n innerWrapperRef.current.children[\n index\n ].style.transform = `scale(${value.scale})`;\n });\n tween.easing(getEasing(easing));\n tween.onStart(() => {\n if (typeof others.onStartChange === 'function') {\n others.onStartChange(index, newIndex);\n }\n });\n tween.onComplete(() => {\n if (innerWrapperRef.current) {\n setIndex(newIndex);\n innerWrapperRef.current.children[index].style.transform = `scale(1)`;\n }\n if (typeof others.onChange === 'function') {\n others.onChange(index, newIndex);\n }\n });\n tween.start();\n }\n };\n\n const moveTo = (gotoIndex: number) => {\n if (gotoIndex !== index) {\n transitionSlide(gotoIndex);\n }\n };\n\n const navigate: ButtonClick = (event) => {\n const { currentTarget } = event;\n if (!currentTarget.dataset.key) {\n return;\n }\n if (parseInt(currentTarget.dataset.key) !== index) {\n moveTo(parseInt(currentTarget.dataset.key));\n }\n };\n\n return (\n <div dir=\"ltr\" aria-roledescription=\"carousel\">\n <div\n className={`react-slideshow-container ${cssClass || ''}`}\n onMouseEnter={pauseSlides}\n onMouseOver={pauseSlides}\n onMouseLeave={startSlides}\n >\n {arrows && showPreviousArrow({ ...props, infinite }, index, preTransition)}\n <div className={`react-slideshow-fadezoom-wrapper ${cssClass}`} ref={wrapperRef}>\n <div className=\"react-slideshow-fadezoom-images-wrap\" ref={innerWrapperRef}>\n {(React.Children.map(others.children, (thisArg) => thisArg) || []).map(\n (each, key) => (\n <div\n style={{\n opacity: key === index ? '1' : '0',\n zIndex: key === index ? '1' : '0',\n }}\n data-index={key}\n key={key}\n aria-roledescription=\"slide\"\n aria-hidden={key === index ? 'false' : 'true'}\n >\n {each}\n </div>\n )\n )}\n </div>\n </div>\n {arrows && showNextArrow({ ...props, infinite }, index, preTransition)}\n </div>\n {indicators && showIndicators({ ...props, indicators }, index, navigate)}\n </div>\n );\n});\n","import React, { ReactElement, ReactNode } from 'react';\n\nexport interface Responsive {\n breakpoint: number;\n settings: {\n slidesToShow: number;\n slidesToScroll: number;\n };\n}\n\nexport interface BaseProps {\n /** the content of the component */\n children: ReactNode;\n /** The time it takes (milliseconds) before next transition starts\n * @default 5000\n */\n duration?: number;\n /** Determines how long the transition takes\n * @default 1000\n */\n transitionDuration?: number;\n /** Specifies the first slide to display\n * @default 0\n */\n defaultIndex?: number;\n /** For specifying if there should be dots below the slideshow. If function; it will render the returned element\n * @default false\n */\n indicators?: boolean | ((index?: number) => ReactNode);\n /** A custom element to serve as previous arrow */\n prevArrow?: ReactElement<any>;\n /** A custom element to serve as next arrow */\n nextArrow?: ReactElement<any>;\n /** Determines if there should be a navigational arrow for going to the next or previous slide\n * @default true\n */\n arrows?: boolean;\n /** Responsible for determining if the slideshow should start automatically\n * @default true\n */\n autoplay?: boolean;\n /** Specifies if the transition should loop infinitely\n * @default true\n */\n infinite?: boolean;\n /** Determines whether the transition effect applies when the mouse hovers the slider\n * @default true\n */\n pauseOnHover?: boolean;\n /** Determines whether the user can go to next or previous slide by the mouse or by touching\n * @default true\n */\n canSwipe?: boolean;\n /** The timing transition function to use. You can use one of linear, ease, ease-in, ease-out, cubic, cubic-in, cubic-out\n * @default \"linear\"\n */\n easing?: string;\n /** Use this prop to add your custom css to the wrapper containing the sliders. Pass your css className as value for the cssClass prop\n * @default \"\"\n */\n cssClass?: string;\n /** Callback that gets triggered at the start of every transition. The oldIndex and newIndex are passed as arguments */\n onStartChange?: (from: number, to: number) => void;\n /** Callback that gets triggered at the end of every transition. The oldIndex and newIndex are passed as arguments */\n onChange?: (from: number, to: number) => void;\n /** Ref for the slideshow (carousel). This is useful for executing methods like goBack, goNext and goTo on the slideshow */\n ref?: any;\n}\n\nexport interface FadeProps extends BaseProps {}\nexport interface ZoomProps extends BaseProps {\n /** Required when using zoom to specify the scale the current slide should be zoomed to. A number greater than 1 indicates zoom in. A number less than 1, indicates zoom out */\n scale: number;\n}\nexport interface SlideProps extends BaseProps {\n /** Set slidesToShow & slidesToScroll based on screen size. */\n responsive?: Array<Responsive>;\n /** The number of slides to show on each page\n * @default 1\n */\n slidesToShow?: number;\n /** The number of slides to scroll\n * @default 1\n */\n slidesToScroll?: number;\n /** If slide should scroll vertically\n * @default false\n */\n vertical?: boolean;\n}\n\nexport type ButtonClick = (event: React.SyntheticEvent<HTMLButtonElement>) => void;\n\nexport type IndicatorPropsType = {\n 'data-key': number;\n 'aria-label': string;\n onClick: ButtonClick;\n};\n\nexport type TweenEasingFn = (amount: number) => number;\n\nexport const defaultProps = {\n duration: 5000,\n transitionDuration: 1000,\n defaultIndex: 0,\n infinite: true,\n autoplay: true,\n indicators: false,\n arrows: true,\n pauseOnHover: true,\n easing: 'linear',\n canSwipe: true,\n cssClass: '',\n};\n\nexport type SlideshowRef = {\n goNext: () => void;\n goBack: () => void;\n goTo: (index: number, options?: { skipTransition?: boolean }) => void;\n};\n","import React from 'react';\nimport { FadeZoom } from './fadezoom';\nimport { defaultProps, FadeProps, SlideshowRef } from './types';\n\nexport const Fade = React.forwardRef<SlideshowRef, FadeProps>((props, ref) => {\n return <FadeZoom {...defaultProps} {...props} scale={1} ref={ref} />;\n});\n","import React from 'react';\nimport { FadeZoom } from './fadezoom';\nimport { defaultProps, SlideshowRef, ZoomProps } from './types';\n\nexport const Zoom = React.forwardRef<SlideshowRef, ZoomProps>((props, ref) => {\n return <FadeZoom {...defaultProps} {...props} ref={ref} />;\n});\n","import React, {\n useState,\n useRef,\n useEffect,\n useMemo,\n useImperativeHandle,\n useCallback,\n} from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { Group, Tween } from '@tweenjs/tween.js';\nimport {\n getEasing,\n getResponsiveSettings,\n getStartingIndex,\n showIndicators,\n showNextArrow,\n showPreviousArrow,\n} from './helpers';\nimport { ButtonClick, SlideshowRef, SlideProps } from './types';\n\nexport const Slide = React.forwardRef<SlideshowRef, SlideProps>((props, ref) => {\n const {\n duration = 5000,\n transitionDuration = 1000,\n defaultIndex = 0,\n infinite = true,\n autoplay = true,\n indicators = false,\n arrows = true,\n pauseOnHover = true,\n easing = 'linear',\n canSwipe = true,\n cssClass = '',\n responsive = [],\n slidesToShow: slidesToShowDefault = 1,\n slidesToScroll: slidesToScrollDefault = 1,\n ...others\n } = props;\n const newTransitionDuration = transitionDuration;\n const [index, setIndex] = useState(getStartingIndex(others.children, defaultIndex));\n const [wrapperSize, setWrapperSize] = useState<number>(0);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const innerWrapperRef = useRef<any>(null);\n const tweenGroup = useRef(new Group());\n const responsiveSettings = useMemo(\n () => getResponsiveSettings(wrapperSize, responsive),\n [wrapperSize, responsive]\n );\n const slidesToScroll = useMemo(() => {\n if (responsiveSettings) {\n return responsiveSettings.settings.slidesToScroll;\n }\n return slidesToScrollDefault;\n }, [responsiveSettings, slidesToScrollDefault]);\n const slidesToShow = useMemo(() => {\n if (responsiveSettings) {\n return responsiveSettings.settings.slidesToShow;\n }\n return slidesToShowDefault;\n }, [responsiveSettings, slidesToShowDefault]);\n const childrenCount = useMemo(() => React.Children.count(others.children), [others.children]);\n const eachChildSize = useMemo(() => wrapperSize / slidesToShow, [wrapperSize, slidesToShow]);\n const timeout = useRef<NodeJS.Timeout | undefined>(undefined);\n const resizeObserver = useRef<any>(undefined);\n let startingSwipePosition: number;\n let dragging: boolean = false;\n let distanceSwiped: number = 0;\n const translateType = others.vertical ? 'translateY' : 'translateX';\n const swipeAttributeType = others.vertical ? 'clientY' : 'clientX';\n const swipePageAttributeType = others.vertical ? 'pageY' : 'pageX';\n\n const applyStyle = useCallback(() => {\n if (innerWrapperRef.current) {\n const fullSize = wrapperSize * innerWrapperRef.current.children.length;\n const attribute = others.vertical ? 'height' : 'width';\n innerWrapperRef.current.style[attribute] = `${fullSize}px`;\n if (others.vertical && wrapperRef.current) {\n wrapperRef.current.style[attribute] = `${wrapperSize}px`;\n }\n for (let index = 0; index < innerWrapperRef.current.children.length; index++) {\n const eachDiv = innerWrapperRef.current.children[index];\n if (eachDiv) {\n if (!others.vertical) {\n eachDiv.style[attribute] = `${eachChildSize}px`;\n }\n eachDiv.style.display = `block`;\n }\n }\n }\n }, [wrapperSize, eachChildSize, others.vertical]);\n\n const setSize = useCallback(() => {\n const attribute = others.vertical ? 'clientHeight' : 'clientWidth';\n if (others.vertical) {\n if (innerWrapperRef.current) {\n setWrapperSize(innerWrapperRef.current.children[0][attribute]);\n }\n } else {\n if (wrapperRef.current) {\n setWrapperSize(wrapperRef.current[attribute]);\n }\n }\n }, [others.vertical]);\n\n const initResizeObserver = useCallback(() => {\n if (wrapperRef.current) {\n resizeObserver.current = new ResizeObserver((entries) => {\n if (!entries) return;\n setSize();\n });\n resizeObserver.current.observe(wrapperRef.current);\n }\n }, [wrapperRef, setSize]);\n\n const play = useCallback(() => {\n if (autoplay && (infinite || index < childrenCount - 1)) {\n timeout.current = setTimeout(moveNext, duration);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [autoplay, infinite, duration, childrenCount, index]);\n\n useEffect(() => {\n applyStyle();\n }, [wrapperSize, applyStyle]);\n\n useEffect(() => {\n initResizeObserver();\n const tweenGroupRef = tweenGroup.current;\n return () => {\n tweenGroupRef.removeAll();\n clearTimeout(timeout.current);\n removeResizeObserver();\n };\n }, [wrapperRef, initResizeObserver, tweenGroup]);\n\n useEffect(() => {\n clearTimeout(timeout.current);\n play();\n }, [index, wrapperSize, autoplay, play]);\n\n useImperativeHandle(ref, () => ({\n goNext: () => {\n moveNext();\n },\n goBack: () => {\n moveBack();\n },\n goTo: (index: number, options?: { skipTransition?: boolean }) => {\n if (options?.skipTransition) {\n setIndex(index);\n } else {\n moveTo(index);\n }\n },\n }));\n\n const removeResizeObserver = () => {\n if (resizeObserver && wrapperRef.current) {\n resizeObserver.current.unobserve(wrapperRef.current);\n }\n };\n\n const pauseSlides = () => {\n if (pauseOnHover) {\n clearTimeout(timeout.current);\n }\n };\n\n const swipe = (event: React.MouseEvent | React.TouchEvent) => {\n if (canSwipe && dragging) {\n let position;\n if (window.TouchEvent && event.nativeEvent instanceof TouchEvent) {\n position = event.nativeEvent.touches[0][swipePageAttributeType];\n } else {\n position = (event.nativeEvent as MouseEvent)[swipeAttributeType];\n }\n if (position && startingSwipePosition) {\n let translateValue = eachChildSize * (index + getOffset());\n const distance = position - startingSwipePosition;\n if (!infinite && index === childrenCount - slidesToScroll && distance < 0) {\n // if it is the last and infinite is false and you're swiping left\n // then nothing happens\n return;\n }\n if (!infinite && index === 0 && distance > 0) {\n // if it is the first and infinite is false and you're swiping right\n // then nothing happens\n return;\n }\n distanceSwiped = distance;\n translateValue -= distanceSwiped;\n innerWrapperRef.current.style.transform = `${translateType}(-${translateValue}px)`;\n }\n }\n };\n\n const moveNext = () => {\n if (!infinite && index === childrenCount - slidesToScroll) {\n return;\n }\n const nextIndex = calculateIndex(index + slidesToScroll);\n transitionSlide(nextIndex);\n };\n\n const moveBack = () => {\n if (!infinite && index === 0) {\n return;\n }\n let previousIndex = index - slidesToScroll;\n if (previousIndex % slidesToScroll) {\n previousIndex = Math.ceil(previousIndex / slidesToScroll) * slidesToScroll;\n }\n transitionSlide(previousIndex);\n };\n\n const goToSlide: ButtonClick = ({ currentTarget }) => {\n if (!currentTarget.dataset.key) {\n return;\n }\n const datasetKey = parseInt(currentTarget.dataset.key);\n moveTo(datasetKey * slidesToScroll);\n };\n\n const moveTo = (index: number) => {\n transitionSlide(calculateIndex(index));\n };\n\n const calculateIndex = (nextIndex: number): number => {\n if (nextIndex < childrenCount && nextIndex + slidesToScroll > childrenCount) {\n if ((childrenCount - slidesToScroll) % slidesToScroll) {\n return childrenCount - slidesToScroll;\n }\n return nextIndex;\n }\n return nextIndex;\n };\n\n const startSlides = () => {\n if (dragging) {\n endSwipe();\n } else if (pauseOnHover && autoplay) {\n timeout.current = setTimeout(moveNext, duration);\n }\n };\n\n const moveSlides: ButtonClick = ({ currentTarget: { dataset } }) => {\n if (dataset.type === 'next') {\n moveNext();\n } else {\n moveBack();\n }\n };\n\n const renderPreceedingSlides = () => {\n return React.Children.toArray(others.children)\n .slice(-slidesToShow)\n .map((each, index) => (\n <div\n data-index={index - slidesToShow}\n aria-roledescription=\"slide\"\n aria-hidden=\"true\"\n key={index - slidesToShow}\n >\n {each}\n </div>\n ));\n };\n\n const renderTrailingSlides = () => {\n if (!infinite && slidesToShow === slidesToScroll) {\n return;\n }\n return React.Children.toArray(others.children)\n .slice(0, slidesToShow)\n .map((each, index) => (\n <div\n data-index={childrenCount + index}\n aria-roledescription=\"slide\"\n aria-hidden=\"true\"\n key={childrenCount + index}\n >\n {each}\n </div>\n ));\n };\n\n const startSwipe = (event: React.MouseEvent | React.TouchEvent) => {\n if (canSwipe) {\n if (window.TouchEvent && event.nativeEvent instanceof TouchEvent) {\n startingSwipePosition = event.nativeEvent.touches[0][swipePageAttributeType];\n } else {\n startingSwipePosition = (event.nativeEvent as MouseEvent)[swipeAttributeType];\n }\n clearTimeout(timeout.current);\n dragging = true;\n }\n };\n\n const endSwipe = () => {\n if (canSwipe) {\n dragging = false;\n if (Math.abs(distanceSwiped) / wrapperSize > 0.2) {\n if (distanceSwiped < 0) {\n moveNext();\n } else {\n moveBack();\n }\n } else {\n if (Math.abs(distanceSwiped) > 0) {\n transitionSlide(index, 300);\n }\n }\n }\n };\n\n const animate = () => {\n requestAnimationFrame(animate);\n tweenGroup.current.update();\n };\n\n const transitionSlide = (toIndex: number, animationDuration?: number) => {\n const transitionDuration = animationDuration || newTransitionDuration;\n const currentIndex = index;\n const existingTweens = tweenGroup.current.getAll();\n if (!wrapperRef.current) {\n return;\n }\n const attribute = others.vertical ? 'clientHeight' : 'clientWidth';\n const childSize = wrapperRef.current[attribute] / slidesToShow;\n if (!existingTweens.length) {\n clearTimeout(timeout.current);\n const value = {\n margin: -childSize * (currentIndex + getOffset()) + distanceSwiped,\n };\n const tween = new Tween(value, tweenGroup.current)\n .to({ margin: -childSize * (toIndex + getOffset()) }, transitionDuration)\n .onUpdate((value) => {\n if (innerWrapperRef.current) {\n innerWrapperRef.current.style.transform = `${translateType}(${value.margin}px)`;\n }\n });\n tween.easing(getEasing(easing));\n\n animate();\n\n let newIndex = toIndex;\n if (newIndex < 0) {\n newIndex = childrenCount - slidesToScroll;\n } else if (newIndex >= childrenCount) {\n newIndex = 0;\n }\n\n tween.onStart(() => {\n if (typeof others.onStartChange === 'function') {\n others.onStartChange(index, newIndex);\n }\n });\n\n tween.onComplete(() => {\n distanceSwiped = 0;\n if (typeof others.onChange === 'function') {\n others.onChange(index, newIndex);\n }\n setIndex(newIndex);\n });\n\n tween.start();\n }\n };\n\n const isSlideActive = (key: number) => {\n return key < index + slidesToShow && key >= index;\n };\n\n const getOffset = (): number => {\n if (!infinite) {\n return 0;\n }\n return slidesToShow;\n };\n\n const style = {\n transform: `${translateType}(-${(index + getOffset()) * eachChildSize}px)`,\n };\n return (\n <div dir=\"ltr\" aria-roledescription=\"carousel\">\n <div\n className=\"react-slideshow-container\"\n onMouseEnter={pauseSlides}\n onMouseOver={pauseSlides}\n onMouseLeave={startSlides}\n onMouseDown={startSwipe}\n onMouseUp={endSwipe}\n onMouseMove={swipe}\n onTouchStart={startSwipe}\n onTouchEnd={endSwipe}\n onTouchCancel={endSwipe}\n onTouchMove={swipe}\n >\n {arrows && showPreviousArrow({ ...props, infinite }, index, moveSlides)}\n <div className={`react-slideshow-wrapper slide ${cssClass || ''}`} ref={wrapperRef}>\n <div\n className={`images-wrap ${others.vertical ? 'vertical' : 'horizontal'}`}\n style={style}\n ref={innerWrapperRef}\n >\n {infinite && renderPreceedingSlides()}\n {(React.Children.map(others.children, (thisArg) => thisArg) || []).map(\n (each, key) => {\n const isThisSlideActive = isSlideActive(key);\n return (\n <div\n data-index={key}\n key={key}\n className={isThisSlideActive ? 'active' : ''}\n aria-roledescription=\"slide\"\n aria-hidden={isThisSlideActive ? 'false' : 'true'}\n >\n {each}\n </div>\n );\n }\n )}\n {renderTrailingSlides()}\n </div>\n </div>\n {arrows &&\n showNextArrow({ ...props, infinite }, index, moveSlides, responsiveSettings)}\n </div>\n {!!indicators &&\n showIndicators({ ...props, indicators }, index, goToSlide, responsiveSettings)}\n </div>\n );\n});\n"],"names":["getStartingIndex","children","defaultIndex","React","Children","count","getResponsiveSettings","wrapperWidth","responsive","window","Array","isArray","find","each","breakpoint","EASING_METHODS","linear","Easing","Linear","None","ease","Quadratic","InOut","In","Out","cubic","Cubic","getEasing","easeMethod","showPreviousArrow","_ref","currentIndex","moveSlides","prevArrow","infinite","isDisabled","props","disabled","onClick","cloneElement","_extends","className","type","width","height","viewBox","d","showNextArrow","properties","responsiveSettings","nextArrow","slidesToScroll","settings","showDefaultIndicator","isCurrentPageActive","key","indicatorProps","showCustomIndicator","eachIndicator","showIndicators","navigate","indicators","pages","Math","ceil","from","length","_","floor","FadeZoom","forwardRef","ref","_props$duration","duration","_props$transitionDura","transitionDuration","_props$defaultIndex","_props$infinite","_props$autoplay","autoplay","_props$indicators","_props$arrows","arrows","_props$pauseOnHover","pauseOnHover","_props$easing","easing","_props$cssClass","cssClass","others","_objectWithoutPropertiesLoose","_excluded","_useState","useState","index","setIndex","wrapperRef","useRef","innerWrapperRef","tweenGroup","Group","timeout","undefined","resizeObserver","childrenCount","useMemo","applyStyle","useCallback","current","clientWidth","fullwidth","style","eachDiv","left","display","initResizeObserver","ResizeObserver","entries","observe","play","setTimeout","moveNext","useEffect","tweenGroupRef","removeAll","clearTimeout","removeResizeObserver","useImperativeHandle","goNext","goBack","moveBack","goTo","options","skipTransition","moveTo","unobserve","pauseSlides","startSlides","transitionSlide","preTransition","event","currentTarget","dataset","animate","requestAnimationFrame","update","newIndex","existingTweens","getAll","_innerWrapperRef$curr","value","opacity","scale","tween","Tween","to","onUpdate","transform","onStart","onStartChange","onComplete","onChange","start","gotoIndex","parseInt","dir","onMouseEnter","onMouseOver","onMouseLeave","map","thisArg","zIndex","defaultProps","canSwipe","Fade","Zoom","Slide","_props$canSwipe","_props$responsive","_props$slidesToShow","slidesToShow","slidesToShowDefault","_props$slidesToScroll","slidesToScrollDefault","newTransitionDuration","_useState2","wrapperSize","setWrapperSize","eachChildSize","startingSwipePosition","dragging","distanceSwiped","translateType","vertical","swipeAttributeType","swipePageAttributeType","fullSize","attribute","setSize","swipe","position","TouchEvent","nativeEvent","touches","translateValue","getOffset","distance","nextIndex","calculateIndex","previousIndex","goToSlide","datasetKey","endSwipe","_ref2","renderPreceedingSlides","toArray","slice","renderTrailingSlides","startSwipe","abs","toIndex","animationDuration","childSize","margin","isSlideActive","onMouseDown","onMouseUp","onMouseMove","onTou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AAE,EACpC,CAACnN,KAAK,CAACC,QAAQ,CAACqK,GAAG,CAAChF,MAAM,CAACxF,QAAQ,EAAE,UAACyK,OAAO;IAAA,OAAKA,OAAO;IAAC,IAAI,EAAE,EAAED,GAAG,CAClE,UAAC5J,IAAI,EAAE0C,GAAG;IACN,IAAMiL,iBAAiB,GAAGR,aAAa,CAACzK,GAAG,CAAC;IAC5C,oBACIpD;oBACgBoD,GAAG;MACfA,GAAG,EAAEA,GAAG;MACRd,SAAS,EAAE+L,iBAAiB,GAAG,QAAQ,GAAG,EAAE;8BACvB,OAAO;qBACfA,iBAAiB,GAAG,OAAO,GAAG;OAE1C3N,IAAI,CACH;GAEb,CACJ,EACA4M,oBAAoB,EAAE,CACrB,CACJ,EACLvI,MAAM,IACHnC,aAAa,CAAAP,QAAA,KAAMJ,KAAK;IAAEF,QAAQ,EAARA;MAAY4D,KAAK,EAAE9D,UAAU,EAAEiB,kBAAkB,CAAC,CAC9E,EACL,CAAC,CAACY,UAAU,IACTF,cAAc,CAAAnB,QAAA,KAAMJ,KAAK;IAAEyB,UAAU,EAAVA;MAAciC,KAAK,EAAEoH,SAAS,EAAEjK,kBAAkB,CAAC,CAChF;AAEd,CAAC,CAAC;;;;"}
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- .react-slideshow-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative}.react-slideshow-container .nav{z-index:10;position:absolute;cursor:pointer}.react-slideshow-container .nav:first-of-type{left:0}.react-slideshow-container .nav:last-of-type{right:0}.react-slideshow-container .default-nav{height:30px;background:rgba(255,255,255,0.6);width:30px;border:0;text-align:center;color:#fff;border-radius:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.react-slideshow-container .default-nav:hover,.react-slideshow-container .default-nav:focus{background:#fff;color:#666;outline:0}.react-slideshow-container .default-nav.disabled:hover{cursor:not-allowed}.react-slideshow-container .default-nav:first-of-type{margin-right:-30px;border-right:0;border-top:0}.react-slideshow-container .default-nav:last-of-type{margin-left:-30px}.react-slideshow-container+ul.indicators{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:20px}.react-slideshow-container+ul.indicators li{display:inline-block;position:relative;width:7px;height:7px;padding:5px;margin:0}.react-slideshow-container+ul.indicators .each-slideshow-indicator{border:0;opacity:.25;cursor:pointer;background:transparent;color:transparent}.react-slideshow-container+ul.indicators .each-slideshow-indicator:before{position:absolute;top:0;left:0;width:7px;height:7px;border-radius:50%;content:'';background:#000;text-align:center}.react-slideshow-container+ul.indicators .each-slideshow-indicator:hover,.react-slideshow-container+ul.indicators .each-slideshow-indicator.active{opacity:.75;outline:0}.react-slideshow-fadezoom-wrapper{width:100%;overflow:hidden}.react-slideshow-fadezoom-wrapper .react-slideshow-fadezoom-images-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.react-slideshow-fadezoom-wrapper .react-slideshow-fadezoom-images-wrap>div{position:relative;opacity:0}.react-slideshow-wrapper .react-slideshow-fade-images-wrap>div[aria-hidden='true']{display:none}.react-slideshow-wrapper.slide{width:100%;overflow:hidden}.react-slideshow-wrapper .images-wrap.horizontal{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.react-slideshow-wrapper .images-wrap>div[aria-hidden='true']{display:none}
1
+ .react-slideshow-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative}.react-slideshow-container .nav{z-index:10;position:absolute;cursor:pointer}.react-slideshow-container .nav:first-of-type{left:0}.react-slideshow-container .nav:last-of-type{right:0}.react-slideshow-container .default-nav{height:30px;background:rgba(255,255,255,0.6);width:30px;border:0;text-align:center;color:#fff;border-radius:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.react-slideshow-container .default-nav:hover,.react-slideshow-container .default-nav:focus{background:#fff;color:#666;outline:0}.react-slideshow-container .default-nav.disabled:hover{cursor:not-allowed}.react-slideshow-container .default-nav:first-of-type{margin-right:-30px;border-right:0;border-top:0}.react-slideshow-container .default-nav:last-of-type{margin-left:-30px}.react-slideshow-container+ul.indicators{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:20px}.react-slideshow-container+ul.indicators li{display:inline-block;position:relative;width:7px;height:7px;padding:5px;margin:0}.react-slideshow-container+ul.indicators .each-slideshow-indicator{border:0;opacity:.25;cursor:pointer;background:transparent;color:transparent}.react-slideshow-container+ul.indicators .each-slideshow-indicator:before{position:absolute;top:0;left:0;width:7px;height:7px;border-radius:50%;content:'';background:#000;text-align:center}.react-slideshow-container+ul.indicators .each-slideshow-indicator:hover,.react-slideshow-container+ul.indicators .each-slideshow-indicator.active{opacity:.75;outline:0}.react-slideshow-fadezoom-wrapper{width:100%;overflow:hidden}.react-slideshow-fadezoom-wrapper .react-slideshow-fadezoom-images-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.react-slideshow-fadezoom-wrapper .react-slideshow-fadezoom-images-wrap>div{position:relative;opacity:0}.react-slideshow-wrapper .react-slideshow-fade-images-wrap>div[aria-hidden='true']{display:none}.react-slideshow-wrapper.slide{width:100%;overflow:hidden}.react-slideshow-wrapper .images-wrap.horizontal{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:auto}.react-slideshow-wrapper .images-wrap>div[aria-hidden='true']{display:none}
package/dist/types.d.ts CHANGED
@@ -9,31 +9,53 @@ export interface Responsive {
9
9
  export interface BaseProps {
10
10
  /** the content of the component */
11
11
  children: ReactNode;
12
- /** The time it takes (milliseconds) before next transition starts */
12
+ /** The time it takes (milliseconds) before next transition starts
13
+ * @default 5000
14
+ */
13
15
  duration?: number;
14
- /** Determines how long the transition takes */
16
+ /** Determines how long the transition takes
17
+ * @default 1000
18
+ */
15
19
  transitionDuration?: number;
16
- /** Specifies the first slide to display */
20
+ /** Specifies the first slide to display
21
+ * @default 0
22
+ */
17
23
  defaultIndex?: number;
18
- /** For specifying if there should be dots below the slideshow. If function; it will render the returned element */
24
+ /** For specifying if there should be dots below the slideshow. If function; it will render the returned element
25
+ * @default false
26
+ */
19
27
  indicators?: boolean | ((index?: number) => ReactNode);
20
28
  /** A custom element to serve as previous arrow */
21
- prevArrow?: ReactElement;
29
+ prevArrow?: ReactElement<any>;
22
30
  /** A custom element to serve as next arrow */
23
- nextArrow?: ReactElement;
24
- /** Determines if there should be a navigational arrow for going to the next or previous slide */
31
+ nextArrow?: ReactElement<any>;
32
+ /** Determines if there should be a navigational arrow for going to the next or previous slide
33
+ * @default true
34
+ */
25
35
  arrows?: boolean;
26
- /** Responsible for determining if the slideshow should start automatically */
36
+ /** Responsible for determining if the slideshow should start automatically
37
+ * @default true
38
+ */
27
39
  autoplay?: boolean;
28
- /** Specifies if the transition should loop infinitely */
40
+ /** Specifies if the transition should loop infinitely
41
+ * @default true
42
+ */
29
43
  infinite?: boolean;
30
- /** Determines whether the transition effect applies when the mouse hovers the slider */
44
+ /** Determines whether the transition effect applies when the mouse hovers the slider
45
+ * @default true
46
+ */
31
47
  pauseOnHover?: boolean;
32
- /** Determines whether the user can go to next or previous slide by the mouse or by touching */
48
+ /** Determines whether the user can go to next or previous slide by the mouse or by touching
49
+ * @default true
50
+ */
33
51
  canSwipe?: boolean;
34
- /** The timing transition function to use. You can use one of linear, ease, ease-in, ease-out, cubic, cubic-in, cubic-out */
52
+ /** The timing transition function to use. You can use one of linear, ease, ease-in, ease-out, cubic, cubic-in, cubic-out
53
+ * @default "linear"
54
+ */
35
55
  easing?: string;
36
- /** Use this prop to add your custom css to the wrapper containing the sliders. Pass your css className as value for the cssClass prop */
56
+ /** Use this prop to add your custom css to the wrapper containing the sliders. Pass your css className as value for the cssClass prop
57
+ * @default ""
58
+ */
37
59
  cssClass?: string;
38
60
  /** Callback that gets triggered at the start of every transition. The oldIndex and newIndex are passed as arguments */
39
61
  onStartChange?: (from: number, to: number) => void;
@@ -51,11 +73,17 @@ export interface ZoomProps extends BaseProps {
51
73
  export interface SlideProps extends BaseProps {
52
74
  /** Set slidesToShow & slidesToScroll based on screen size. */
53
75
  responsive?: Array<Responsive>;
54
- /** The number of slides to show on each page */
76
+ /** The number of slides to show on each page
77
+ * @default 1
78
+ */
55
79
  slidesToShow?: number;
56
- /** The number of slides to scroll */
80
+ /** The number of slides to scroll
81
+ * @default 1
82
+ */
57
83
  slidesToScroll?: number;
58
- /** If slide should scroll vertically */
84
+ /** If slide should scroll vertically
85
+ * @default false
86
+ */
59
87
  vertical?: boolean;
60
88
  }
61
89
  export declare type ButtonClick = (event: React.SyntheticEvent<HTMLButtonElement>) => void;
@@ -65,6 +93,19 @@ export declare type IndicatorPropsType = {
65
93
  onClick: ButtonClick;
66
94
  };
67
95
  export declare type TweenEasingFn = (amount: number) => number;
96
+ export declare const defaultProps: {
97
+ duration: number;
98
+ transitionDuration: number;
99
+ defaultIndex: number;
100
+ infinite: boolean;
101
+ autoplay: boolean;
102
+ indicators: boolean;
103
+ arrows: boolean;
104
+ pauseOnHover: boolean;
105
+ easing: string;
106
+ canSwipe: boolean;
107
+ cssClass: string;
108
+ };
68
109
  export declare type SlideshowRef = {
69
110
  goNext: () => void;
70
111
  goBack: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-slideshow-image",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
4
  "description": "An image slideshow with react",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -8,7 +8,7 @@
8
8
  "files": [
9
9
  "dist"
10
10
  ],
11
- "homepage": "https://react-slideshow-image.netlify.com",
11
+ "homepage": "https://react-slideshow-image.netlify.app",
12
12
  "keywords": [
13
13
  "image",
14
14
  "react",
@@ -30,8 +30,8 @@
30
30
  "prepare": "tsdx build && uglifycss src/css/styles.css > dist/styles.css",
31
31
  "size": "size-limit",
32
32
  "analyze": "size-limit --why",
33
- "storybook": "start-storybook -p 6006",
34
- "build-storybook": "build-storybook",
33
+ "storybook": "storybook dev -p 6006",
34
+ "build-storybook": "storybook build",
35
35
  "cypress": "cypress open",
36
36
  "e2e": "cypress run"
37
37
  },
@@ -66,28 +66,34 @@
66
66
  "resize-observer-polyfill": "^1.5.1"
67
67
  },
68
68
  "devDependencies": {
69
- "@babel/core": "^7.18.0",
69
+ "@babel/core": "^7.29.0",
70
+ "@babel/preset-react": "^7.26.0",
71
+ "@babel/preset-typescript": "^7.28.5",
70
72
  "@size-limit/preset-small-lib": "^7.0.8",
71
- "@storybook/addon-a11y": "^6.5.9",
72
- "@storybook/addon-essentials": "^6.5.9",
73
- "@storybook/addon-links": "^6.5.9",
74
- "@storybook/addons": "^6.5.9",
75
- "@storybook/react": "^6.5.9",
76
- "@testing-library/react": "^12.1.5",
77
- "@types/mdx": "^2.0.2",
78
- "@types/react": "^18.0.9",
79
- "@types/react-dom": "^18.0.4",
73
+ "@storybook/addon-a11y": "^8.0.0",
74
+ "@storybook/addon-essentials": "^8.0.0",
75
+ "@storybook/addon-links": "^8.0.0",
76
+ "@storybook/react": "^8.0.0",
77
+ "@storybook/react-vite": "^8.0.0",
78
+ "@testing-library/dom": "^10.4.1",
79
+ "@testing-library/react": "^16.3.2",
80
+ "@types/mdx": "^2.0.13",
81
+ "@types/react": "^19.2.14",
82
+ "@types/react-dom": "^19.2.3",
83
+ "@vitejs/plugin-react": "^4.0.0",
80
84
  "babel-loader": "^8.2.5",
81
- "cypress": "^13.3.0",
85
+ "cypress": "^15.10.0",
82
86
  "cypress-iframe": "^1.0.1",
83
87
  "husky": "^8.0.1",
84
- "react": "^17.0.0",
85
- "react-dom": "^17.0.0",
86
- "react-is": "^17.0.0",
88
+ "react": "^19.2.4",
89
+ "react-dom": "^19.2.4",
90
+ "react-is": "^19.2.4",
87
91
  "size-limit": "^7.0.8",
92
+ "storybook": "^8.0.0",
88
93
  "tsdx": "^0.14.1",
89
- "tslib": "^2.4.0",
90
- "typescript": "^4.6.4",
91
- "uglifycss": "0.0.29"
94
+ "tslib": "^2.8.1",
95
+ "typescript": "^5.9.3",
96
+ "uglifycss": "0.0.29",
97
+ "vite": "^5.0.0"
92
98
  }
93
99
  }
package/dist/props.d.ts DELETED
@@ -1,14 +0,0 @@
1
- export declare const defaultProps: {
2
- duration: number;
3
- transitionDuration: number;
4
- defaultIndex: number;
5
- infinite: boolean;
6
- autoplay: boolean;
7
- indicators: boolean;
8
- arrows: boolean;
9
- pauseOnHover: boolean;
10
- easing: string;
11
- canSwipe: boolean;
12
- cssClass: string;
13
- responsive: never[];
14
- };