@lumx/react 2.2.8 → 2.2.9
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.
- package/esm/_internal/Icon2.js +3 -1
- package/esm/_internal/Icon2.js.map +1 -1
- package/esm/_internal/{SlideshowControls.js → Slides.js} +234 -139
- package/esm/_internal/Slides.js.map +1 -0
- package/esm/_internal/TableRow.js +1 -1
- package/esm/_internal/Thumbnail2.js +1 -1
- package/esm/_internal/getRootClassName.js +2 -1
- package/esm/_internal/getRootClassName.js.map +1 -1
- package/esm/_internal/slideshow.js +2 -1
- package/esm/_internal/slideshow.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +4 -4
- package/src/components/slideshow/Slides.tsx +115 -0
- package/src/components/slideshow/Slideshow.stories.tsx +34 -0
- package/src/components/slideshow/Slideshow.test.tsx +1 -1
- package/src/components/slideshow/Slideshow.tsx +69 -90
- package/src/components/slideshow/SlideshowControls.stories.tsx +76 -40
- package/src/components/slideshow/SlideshowControls.tsx +35 -3
- package/src/components/slideshow/SlideshowItem.tsx +19 -3
- package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +124 -232
- package/src/components/slideshow/index.ts +1 -0
- package/src/hooks/useFocusWithin.ts +1 -1
- package/src/hooks/useSlideshowControls.ts +26 -9
- package/src/stories/generated/Thumbnail/Demos.stories.tsx +3 -1
- package/types.d.ts +57 -16
- package/esm/_internal/SlideshowControls.js.map +0 -1
|
@@ -4,8 +4,6 @@ import { useInterval } from '@lumx/react/hooks/useInterval';
|
|
|
4
4
|
import uniqueId from 'lodash/uniqueId';
|
|
5
5
|
import { AUTOPLAY_DEFAULT_INTERVAL } from '@lumx/react/components/slideshow/constants';
|
|
6
6
|
|
|
7
|
-
import { useFocusWithin } from './useFocusWithin';
|
|
8
|
-
|
|
9
7
|
export interface UseSlideshowControlsOptions {
|
|
10
8
|
/** default active index to be displayed */
|
|
11
9
|
defaultActiveIndex?: number;
|
|
@@ -52,12 +50,20 @@ export interface UseSlideshowControls {
|
|
|
52
50
|
onPaginationClick: (index: number) => void;
|
|
53
51
|
/** whether the slideshow is autoplaying or not */
|
|
54
52
|
isAutoPlaying: boolean;
|
|
53
|
+
/** whether the slideshow was force paused or not */
|
|
54
|
+
isForcePaused: boolean;
|
|
55
|
+
/** callback to enable/disable the force pause feature */
|
|
56
|
+
setIsForcePaused: (isForcePaused: boolean) => void;
|
|
55
57
|
/** callback to change whether the slideshow is autoplaying or not */
|
|
56
58
|
setIsAutoPlaying: (isAutoPlaying: boolean) => void;
|
|
57
59
|
/** current active slide index */
|
|
58
60
|
activeIndex: number;
|
|
59
61
|
/** set the current index as the active one */
|
|
60
62
|
setActiveIndex: (index: number) => void;
|
|
63
|
+
/** callback that stops the auto play */
|
|
64
|
+
stopAutoPlay: () => void;
|
|
65
|
+
/** callback that starts the auto play */
|
|
66
|
+
startAutoPlay: () => void;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
export const DEFAULT_OPTIONS: Partial<UseSlideshowControlsOptions> = {
|
|
@@ -122,8 +128,11 @@ export const useSlideshowControls = ({
|
|
|
122
128
|
|
|
123
129
|
// Auto play
|
|
124
130
|
const [isAutoPlaying, setIsAutoPlaying] = useState(Boolean(autoPlay));
|
|
131
|
+
const [isForcePaused, setIsForcePaused] = useState(false);
|
|
132
|
+
|
|
133
|
+
const isSlideshowAutoPlaying = isForcePaused ? false : isAutoPlaying;
|
|
125
134
|
// Start
|
|
126
|
-
useInterval(goToNextSlide,
|
|
135
|
+
useInterval(goToNextSlide, isSlideshowAutoPlaying && slidesCount > 1 ? (interval as number) : null);
|
|
127
136
|
|
|
128
137
|
// Reset current index if it become invalid.
|
|
129
138
|
useEffect(() => {
|
|
@@ -184,11 +193,15 @@ export const useSlideshowControls = ({
|
|
|
184
193
|
setIsAutoPlaying(false);
|
|
185
194
|
};
|
|
186
195
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
const forcePause = (isPaused: boolean) => {
|
|
197
|
+
setIsForcePaused(isPaused);
|
|
198
|
+
|
|
199
|
+
if (isPaused) {
|
|
200
|
+
stopAutoPlay();
|
|
201
|
+
} else {
|
|
202
|
+
startAutoPlay();
|
|
203
|
+
}
|
|
204
|
+
};
|
|
192
205
|
|
|
193
206
|
// Start index and end index of visible slides.
|
|
194
207
|
const startIndexVisible = currentIndex * (groupBy as number);
|
|
@@ -204,10 +217,14 @@ export const useSlideshowControls = ({
|
|
|
204
217
|
onPreviousClick,
|
|
205
218
|
onNextClick,
|
|
206
219
|
onPaginationClick,
|
|
207
|
-
isAutoPlaying,
|
|
220
|
+
isAutoPlaying: isSlideshowAutoPlaying,
|
|
208
221
|
setIsAutoPlaying,
|
|
209
222
|
activeIndex: currentIndex,
|
|
210
223
|
slidesCount,
|
|
211
224
|
setActiveIndex: setCurrentIndex,
|
|
225
|
+
startAutoPlay,
|
|
226
|
+
stopAutoPlay,
|
|
227
|
+
isForcePaused,
|
|
228
|
+
setIsForcePaused: forcePause,
|
|
212
229
|
};
|
|
213
230
|
};
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
export default { title: 'LumX components/thumbnail/Thumbnail Demos' };
|
|
5
5
|
|
|
6
6
|
export { App as Combined } from './combined';
|
|
7
|
-
export { App as
|
|
7
|
+
export { App as ErrorFallback } from './error-fallback';
|
|
8
|
+
export { App as Error } from './error';
|
|
9
|
+
export { App as Loading } from './loading';
|
|
8
10
|
export { App as Ratios } from './ratios';
|
|
9
11
|
export { App as Sizes } from './sizes';
|
|
10
12
|
export { App as Variants } from './variants';
|
package/types.d.ts
CHANGED
|
@@ -2082,27 +2082,13 @@ export declare const clamp: (value: number, min: number, max: number) => number;
|
|
|
2082
2082
|
/**
|
|
2083
2083
|
* Defines the props of the component.
|
|
2084
2084
|
*/
|
|
2085
|
-
export interface SlideshowProps extends GenericProps {
|
|
2086
|
-
/** Index of the current slide. */
|
|
2087
|
-
activeIndex?: number;
|
|
2088
|
-
/** Whether the automatic rotation of the slideshow is enabled or not. */
|
|
2089
|
-
autoPlay?: boolean;
|
|
2090
|
-
/** Whether the image has to fill its container height or not. */
|
|
2091
|
-
fillHeight?: boolean;
|
|
2092
|
-
/** Number of slides to group together. */
|
|
2093
|
-
groupBy?: number;
|
|
2085
|
+
export interface SlideshowProps extends GenericProps, Pick<SlidesProps, "activeIndex" | "autoPlay" | "fillHeight" | "slidesId" | "id" | "theme" | "fillHeight" | "groupBy"> {
|
|
2094
2086
|
/** Interval between each slide when automatic rotation is enabled. */
|
|
2095
2087
|
interval?: number;
|
|
2096
2088
|
/** Props to pass to the slideshow controls (minus those already set by the Slideshow props). */
|
|
2097
2089
|
slideshowControlsProps?: Pick<SlideshowControlsProps, "nextButtonProps" | "previousButtonProps"> & Omit<SlideshowControlsProps, "activeIndex" | "onPaginationClick" | "onNextClick" | "onPreviousClick" | "slidesCount" | "parentRef" | "theme">;
|
|
2098
|
-
/** Theme adapting the component to light or dark background. */
|
|
2099
|
-
theme?: Theme;
|
|
2100
2090
|
/** Callback when slide changes */
|
|
2101
2091
|
onChange?(index: number): void;
|
|
2102
|
-
/** slideshow HTML id attribute */
|
|
2103
|
-
id?: string;
|
|
2104
|
-
/** slides wrapper HTML id attribute */
|
|
2105
|
-
slidesId?: string;
|
|
2106
2092
|
}
|
|
2107
2093
|
/**
|
|
2108
2094
|
* Slideshow component.
|
|
@@ -2115,7 +2101,12 @@ export declare const Slideshow: Comp<SlideshowProps, HTMLDivElement>;
|
|
|
2115
2101
|
/**
|
|
2116
2102
|
* Defines the props of the component.
|
|
2117
2103
|
*/
|
|
2118
|
-
export
|
|
2104
|
+
export interface SlideshowItemProps extends GenericProps {
|
|
2105
|
+
/** whether the slideshow item is currently visible */
|
|
2106
|
+
isCurrentlyVisible?: boolean;
|
|
2107
|
+
/** interval in which slides are automatically shown */
|
|
2108
|
+
interval?: number;
|
|
2109
|
+
}
|
|
2119
2110
|
/**
|
|
2120
2111
|
* SlideshowItem component.
|
|
2121
2112
|
*
|
|
@@ -2169,12 +2160,20 @@ export interface UseSlideshowControls {
|
|
|
2169
2160
|
onPaginationClick: (index: number) => void;
|
|
2170
2161
|
/** whether the slideshow is autoplaying or not */
|
|
2171
2162
|
isAutoPlaying: boolean;
|
|
2163
|
+
/** whether the slideshow was force paused or not */
|
|
2164
|
+
isForcePaused: boolean;
|
|
2165
|
+
/** callback to enable/disable the force pause feature */
|
|
2166
|
+
setIsForcePaused: (isForcePaused: boolean) => void;
|
|
2172
2167
|
/** callback to change whether the slideshow is autoplaying or not */
|
|
2173
2168
|
setIsAutoPlaying: (isAutoPlaying: boolean) => void;
|
|
2174
2169
|
/** current active slide index */
|
|
2175
2170
|
activeIndex: number;
|
|
2176
2171
|
/** set the current index as the active one */
|
|
2177
2172
|
setActiveIndex: (index: number) => void;
|
|
2173
|
+
/** callback that stops the auto play */
|
|
2174
|
+
stopAutoPlay: () => void;
|
|
2175
|
+
/** callback that starts the auto play */
|
|
2176
|
+
startAutoPlay: () => void;
|
|
2178
2177
|
}
|
|
2179
2178
|
/**
|
|
2180
2179
|
* Defines the props of the component.
|
|
@@ -2198,11 +2197,53 @@ export interface SlideshowControlsProps extends GenericProps {
|
|
|
2198
2197
|
onPaginationClick?(index: number): void;
|
|
2199
2198
|
/** On previous button click callback. */
|
|
2200
2199
|
onPreviousClick?(loopback?: boolean): void;
|
|
2200
|
+
/** whether the slideshow is currently playing */
|
|
2201
|
+
isAutoPlaying?: boolean;
|
|
2202
|
+
/** function to be executed in order to retrieve the label for the pagination item */
|
|
2203
|
+
paginationItemLabel?: (index: number) => string;
|
|
2204
|
+
/** Props to pass to the lay button (minus those already set by the SlideshowControls props). */
|
|
2205
|
+
playButtonProps?: Pick<IconButtonProps, "label"> & Omit<IconButtonProps, "label" | "onClick" | "icon" | "emphasis" | "color">;
|
|
2201
2206
|
}
|
|
2202
2207
|
export declare const SlideshowControls: Comp<SlideshowControlsProps, HTMLDivElement> & {
|
|
2203
2208
|
useSlideshowControls: ({ activeIndex, groupBy, interval, autoPlay, defaultActiveIndex, onChange, itemsCount, id, slidesId, }: import("../../hooks/useSlideshowControls").UseSlideshowControlsOptions) => import("../../hooks/useSlideshowControls").UseSlideshowControls;
|
|
2204
2209
|
useSlideshowControlsDefaultOptions: Partial<import("../../hooks/useSlideshowControls").UseSlideshowControlsOptions>;
|
|
2205
2210
|
};
|
|
2211
|
+
export interface SlidesProps extends GenericProps {
|
|
2212
|
+
/** current slide active */
|
|
2213
|
+
activeIndex?: number;
|
|
2214
|
+
/** slides id to be added to the wrapper */
|
|
2215
|
+
id?: string;
|
|
2216
|
+
/** custom classname */
|
|
2217
|
+
className?: string;
|
|
2218
|
+
/** custom theme */
|
|
2219
|
+
theme?: Theme;
|
|
2220
|
+
/** Whether the automatic rotation of the slideshow is enabled or not. */
|
|
2221
|
+
autoPlay?: boolean;
|
|
2222
|
+
/** Whether the image has to fill its container height or not. */
|
|
2223
|
+
fillHeight?: boolean;
|
|
2224
|
+
/** Number of slides to group together. */
|
|
2225
|
+
groupBy?: number;
|
|
2226
|
+
/** whether the slides are currently playing or not */
|
|
2227
|
+
isAutoPlaying?: boolean;
|
|
2228
|
+
/** id to be passed in into the slides */
|
|
2229
|
+
slidesId?: string;
|
|
2230
|
+
/** callback to change whether the slideshow is playing or not */
|
|
2231
|
+
setIsAutoPlaying: (isAutoPlaying: boolean) => void;
|
|
2232
|
+
/** starting visible index */
|
|
2233
|
+
startIndexVisible: number;
|
|
2234
|
+
/** ending visible index */
|
|
2235
|
+
endIndexVisible: number;
|
|
2236
|
+
/** component to be rendered after the slides */
|
|
2237
|
+
afterSlides?: React.ReactNode;
|
|
2238
|
+
}
|
|
2239
|
+
/**
|
|
2240
|
+
* Slides component.
|
|
2241
|
+
*
|
|
2242
|
+
* @param props Component props.
|
|
2243
|
+
* @param ref Component ref.
|
|
2244
|
+
* @return React element.
|
|
2245
|
+
*/
|
|
2246
|
+
export declare const Slides: Comp<any, HTMLDivElement>;
|
|
2206
2247
|
/**
|
|
2207
2248
|
* Defines the props of the component.
|
|
2208
2249
|
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SlideshowControls.js","sources":["../../../src/hooks/useInterval.tsx","../../../src/components/slideshow/constants.ts","../../../src/hooks/useFocusWithin.ts","../../../src/hooks/useSlideshowControls.ts","../../../src/components/slideshow/Slideshow.tsx","../../../src/components/slideshow/SlideshowItem.tsx","../../../src/components/slideshow/useSwipeNavigate.ts","../../../src/components/slideshow/useKeyNavigate.ts","../../../src/components/slideshow/usePaginationVisibleRange.ts","../../../src/components/slideshow/SlideshowControls.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport isFunction from 'lodash/isFunction';\nimport { Callback } from '../utils';\n\n/**\n * Making setInterval Declarative with React Hooks.\n * Credits: https://overreacted.io/making-setinterval-declarative-with-react-hooks/\n *\n * @param callback Function called by setInterval.\n * @param delay Delay for setInterval.\n */\nexport function useInterval(callback: Callback, delay: number | null): void {\n const savedCallback = useRef<Callback>();\n\n useEffect(() => {\n savedCallback.current = callback;\n });\n\n useEffect(() => {\n if (delay === null) return undefined;\n\n function tick() {\n if (isFunction(savedCallback.current)) {\n savedCallback.current();\n }\n }\n const id = setInterval(tick, delay);\n return () => clearInterval(id);\n }, [delay]);\n}\n","/**\n * Autoplay default interval in ms.\n */\nexport const AUTOPLAY_DEFAULT_INTERVAL = 5000;\n\n/**\n * Full width size in percent.\n */\nexport const FULL_WIDTH_PERCENT = 100;\n\n/**\n * Edge from the active index.\n */\nexport const EDGE_FROM_ACTIVE_INDEX = 2;\n\n/**\n * Max number of pagination items.\n */\nexport const PAGINATION_ITEMS_MAX = 5;\n\n/**\n * Size of a pagination item. Used to translate wrapper.\n */\nexport const PAGINATION_ITEM_SIZE = 12;\n","import { useEffect } from 'react';\n\nexport interface UseFocusWithinOptions {\n /** element to add the focus within to */\n element: HTMLElement | undefined;\n /** callback to be executed on focus in */\n onFocusIn: (ev: FocusEvent) => void;\n /** callback to be executed on focus out */\n onFocusOut: (ev: FocusEvent) => void;\n}\n\n/**\n * Hook that allows to control when there is a focus event within a given element, meaning\n * that any element within the given target will trigger the focus in and focus out events.\n * @param options - UseFocusWithinOptions\n */\nexport const useFocusWithin = ({ element, onFocusIn, onFocusOut }: UseFocusWithinOptions) => {\n useEffect(() => {\n if (element) {\n element.addEventListener('focusin', onFocusIn);\n\n element.addEventListener('focusout', onFocusOut);\n }\n\n return () => {\n if (element) {\n element.removeEventListener('focusin', onFocusIn);\n\n element.addEventListener('focusout', onFocusOut);\n }\n };\n }, [onFocusIn, element, onFocusOut]);\n};\n","import { useState, useCallback, useEffect, useMemo } from 'react';\n\nimport { useInterval } from '@lumx/react/hooks/useInterval';\nimport uniqueId from 'lodash/uniqueId';\nimport { AUTOPLAY_DEFAULT_INTERVAL } from '@lumx/react/components/slideshow/constants';\n\nimport { useFocusWithin } from './useFocusWithin';\n\nexport interface UseSlideshowControlsOptions {\n /** default active index to be displayed */\n defaultActiveIndex?: number;\n /** total slides to display */\n itemsCount: number;\n /** Index of the current slide. */\n activeIndex?: number;\n /** Whether the automatic rotation of the slideshow is enabled or not. */\n autoPlay?: boolean;\n /** Whether the image has to fill its container height or not. */\n fillHeight?: boolean;\n /** Number of slides to group together. */\n groupBy?: number;\n /** Interval between each slide when automatic rotation is enabled. */\n interval?: number;\n /** Callback when slide changes */\n onChange?(index: number): void;\n /** slideshow HTML id attribute */\n id?: string;\n /** slides wrapper HTML id attribute */\n slidesId?: string;\n}\n\nexport interface UseSlideshowControls {\n /** Index for the first visible slide, should be used when groupBy is passed in */\n startIndexVisible: number;\n /** Index for the last visible slide, should be used when groupBy is passed in */\n endIndexVisible: number;\n /** total slides to be displayed */\n slidesCount: number;\n /** callback to set */\n setSlideshow: (element: HTMLDivElement | undefined) => void;\n /** reference to the slideshow element */\n slideshow: HTMLDivElement | undefined;\n /** id to be used for the slideshow */\n slideshowId: string;\n /** id to be used for the wrapper that contains the slides */\n slideshowSlidesId: string;\n /** callback that triggers the previous slide while using the slideshow controls */\n onPreviousClick: (loopback: boolean) => void;\n /** callback that triggers the next slide while using the slideshow controls */\n onNextClick: (loopback: boolean) => void;\n /** callback that triggers a specific page while using the slideshow controls */\n onPaginationClick: (index: number) => void;\n /** whether the slideshow is autoplaying or not */\n isAutoPlaying: boolean;\n /** callback to change whether the slideshow is autoplaying or not */\n setIsAutoPlaying: (isAutoPlaying: boolean) => void;\n /** current active slide index */\n activeIndex: number;\n /** set the current index as the active one */\n setActiveIndex: (index: number) => void;\n}\n\nexport const DEFAULT_OPTIONS: Partial<UseSlideshowControlsOptions> = {\n activeIndex: 0,\n groupBy: 1,\n interval: AUTOPLAY_DEFAULT_INTERVAL,\n};\n\nexport const useSlideshowControls = ({\n activeIndex = DEFAULT_OPTIONS.activeIndex,\n groupBy = DEFAULT_OPTIONS.groupBy,\n interval = DEFAULT_OPTIONS.interval,\n autoPlay,\n defaultActiveIndex,\n onChange,\n itemsCount,\n id,\n slidesId,\n}: UseSlideshowControlsOptions): UseSlideshowControls => {\n const [currentIndex, setCurrentIndex] = useState(activeIndex as number);\n // Use state instead of a ref to make the slideshow controls update directly when the element is set.\n const [element, setElement] = useState<HTMLDivElement>();\n\n // Number of slides when using groupBy prop.\n const slidesCount = Math.ceil(itemsCount / Math.min(groupBy as number, itemsCount));\n\n // Change current index to display next slide.\n const goToNextSlide = useCallback(\n (loopback = true) => {\n setCurrentIndex((index) => {\n if (loopback && index === slidesCount - 1) {\n // Loopback to the start.\n return 0;\n }\n if (index < slidesCount - 1) {\n // Next slide.\n return index + 1;\n }\n return index;\n });\n },\n [slidesCount, setCurrentIndex],\n );\n\n // Change current index to display previous slide.\n const goToPreviousSlide = useCallback(\n (loopback = true) => {\n setCurrentIndex((index) => {\n if (loopback && index === 0) {\n // Loopback to the end.\n return slidesCount - 1;\n }\n if (index > 0) {\n // Previous slide.\n return index - 1;\n }\n return index;\n });\n },\n [slidesCount, setCurrentIndex],\n );\n\n // Auto play\n const [isAutoPlaying, setIsAutoPlaying] = useState(Boolean(autoPlay));\n // Start\n useInterval(goToNextSlide, isAutoPlaying && slidesCount > 1 ? (interval as number) : null);\n\n // Reset current index if it become invalid.\n useEffect(() => {\n if (currentIndex > slidesCount - 1) {\n setCurrentIndex(defaultActiveIndex as number);\n }\n }, [currentIndex, slidesCount, defaultActiveIndex]);\n\n // Handle click on a bullet to go to a specific slide.\n const onPaginationClick = useCallback(\n (index: number) => {\n setIsAutoPlaying(false);\n\n if (index >= 0 && index < slidesCount) {\n setCurrentIndex(index);\n }\n },\n [slidesCount, setCurrentIndex],\n );\n\n // Handle click or keyboard event to go to next slide.\n const onNextClick = useCallback(\n (loopback = true) => {\n setIsAutoPlaying(false);\n goToNextSlide(loopback);\n },\n [goToNextSlide],\n );\n\n // Handle click or keyboard event to go to previous slide.\n const onPreviousClick = useCallback(\n (loopback = true) => {\n setIsAutoPlaying(false);\n goToPreviousSlide(loopback);\n },\n [goToPreviousSlide],\n );\n\n // If the activeIndex props changes, update the current slide\n useEffect(() => {\n setCurrentIndex(activeIndex as number);\n }, [activeIndex]);\n\n // If the slide changes, with autoplay for example, trigger \"onChange\"\n useEffect(() => {\n if (!onChange) return;\n onChange(currentIndex);\n }, [currentIndex, onChange]);\n\n const slideshowId = useMemo(() => id || uniqueId('slideshow'), [id]);\n const slideshowSlidesId = useMemo(() => slidesId || uniqueId('slideshow-slides'), [slidesId]);\n\n const startAutoPlay = () => {\n setIsAutoPlaying(Boolean(autoPlay));\n };\n\n const stopAutoPlay = () => {\n setIsAutoPlaying(false);\n };\n\n useFocusWithin({\n element,\n onFocusIn: stopAutoPlay,\n onFocusOut: startAutoPlay,\n });\n\n // Start index and end index of visible slides.\n const startIndexVisible = currentIndex * (groupBy as number);\n const endIndexVisible = startIndexVisible + (groupBy as number);\n\n return {\n startIndexVisible,\n endIndexVisible,\n setSlideshow: setElement,\n slideshow: element,\n slideshowId,\n slideshowSlidesId,\n onPreviousClick,\n onNextClick,\n onPaginationClick,\n isAutoPlaying,\n setIsAutoPlaying,\n activeIndex: currentIndex,\n slidesCount,\n setActiveIndex: setCurrentIndex,\n };\n};\n","import React, { CSSProperties, forwardRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { SlideshowControls, SlideshowControlsProps, Theme } from '@lumx/react';\nimport { DEFAULT_OPTIONS } from '@lumx/react/hooks/useSlideshowControls';\nimport { FULL_WIDTH_PERCENT } from '@lumx/react/components/slideshow/constants';\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';\nimport { mergeRefs } from '@lumx/react/utils/mergeRefs';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowProps extends GenericProps {\n /** Index of the current slide. */\n activeIndex?: number;\n /** Whether the automatic rotation of the slideshow is enabled or not. */\n autoPlay?: boolean;\n /** Whether the image has to fill its container height or not. */\n fillHeight?: boolean;\n /** Number of slides to group together. */\n groupBy?: number;\n /** Interval between each slide when automatic rotation is enabled. */\n interval?: number;\n /** Props to pass to the slideshow controls (minus those already set by the Slideshow props). */\n slideshowControlsProps?: Pick<SlideshowControlsProps, 'nextButtonProps' | 'previousButtonProps'> &\n Omit<\n SlideshowControlsProps,\n | 'activeIndex'\n | 'onPaginationClick'\n | 'onNextClick'\n | 'onPreviousClick'\n | 'slidesCount'\n | 'parentRef'\n | 'theme'\n >;\n /** Theme adapting the component to light or dark background. */\n theme?: Theme;\n /** Callback when slide changes */\n onChange?(index: number): void;\n /** slideshow HTML id attribute */\n id?: string;\n /** slides wrapper HTML id attribute */\n slidesId?: string;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Slideshow';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SlideshowProps> = {\n ...DEFAULT_OPTIONS,\n theme: Theme.light,\n};\n\n/**\n * Slideshow component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Slideshow: Comp<SlideshowProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n activeIndex,\n autoPlay,\n children,\n className,\n fillHeight,\n groupBy,\n interval,\n onChange,\n slideshowControlsProps,\n theme,\n id,\n slidesId,\n ...forwardedProps\n } = props;\n // Number of slideshow items.\n const itemsCount = React.Children.count(children);\n\n const {\n activeIndex: currentIndex,\n slideshowId,\n setSlideshow,\n isAutoPlaying,\n slideshowSlidesId,\n setIsAutoPlaying,\n startIndexVisible,\n endIndexVisible,\n slidesCount,\n onNextClick,\n onPaginationClick,\n onPreviousClick,\n slideshow,\n } = SlideshowControls.useSlideshowControls({\n activeIndex,\n defaultActiveIndex: DEFAULT_PROPS.activeIndex as number,\n autoPlay: Boolean(autoPlay),\n itemsCount,\n groupBy,\n id,\n interval,\n onChange,\n slidesId,\n });\n\n // Inline style of wrapper element.\n const wrapperStyle: CSSProperties = { transform: `translateX(-${FULL_WIDTH_PERCENT * currentIndex}%)` };\n\n /* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n return (\n <section\n id={slideshowId}\n ref={mergeRefs(ref, setSlideshow)}\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, theme }), {\n [`${CLASSNAME}--fill-height`]: fillHeight,\n [`${CLASSNAME}--group-by-${groupBy}`]: Boolean(groupBy),\n })}\n aria-roledescription=\"carousel\"\n aria-live={isAutoPlaying ? 'off' : 'polite'}\n >\n <div\n id={slideshowSlidesId}\n className={`${CLASSNAME}__slides`}\n onMouseEnter={() => setIsAutoPlaying(false)}\n onMouseLeave={() => setIsAutoPlaying(Boolean(autoPlay))}\n >\n <div className={`${CLASSNAME}__wrapper`} style={wrapperStyle}>\n {React.Children.map(children, (child: React.ReactNode, index: number) => {\n if (React.isValidElement(child)) {\n const isCurrentlyVisible = index >= startIndexVisible && index <= endIndexVisible;\n\n return React.cloneElement(child, {\n style: !isCurrentlyVisible\n ? { visibility: 'hidden', ...(child.props.style || {}) }\n : child.props.style || {},\n 'aria-hidden': !isCurrentlyVisible,\n });\n }\n\n return null;\n })}\n </div>\n </div>\n\n {slideshowControlsProps && slidesCount > 1 && (\n <div className={`${CLASSNAME}__controls`}>\n <SlideshowControls\n {...slideshowControlsProps}\n activeIndex={currentIndex}\n onPaginationClick={onPaginationClick}\n onNextClick={onNextClick}\n onPreviousClick={onPreviousClick}\n slidesCount={slidesCount}\n parentRef={slideshow}\n theme={theme}\n nextButtonProps={{\n 'aria-controls': slideshowSlidesId,\n ...slideshowControlsProps.nextButtonProps,\n }}\n previousButtonProps={{\n 'aria-controls': slideshowSlidesId,\n ...slideshowControlsProps.previousButtonProps,\n }}\n />\n </div>\n )}\n </section>\n );\n});\n\nSlideshow.displayName = COMPONENT_NAME;\nSlideshow.className = CLASSNAME;\nSlideshow.defaultProps = DEFAULT_PROPS;\n","import React, { forwardRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';\n\n/**\n * Defines the props of the component.\n */\nexport type SlideshowItemProps = GenericProps;\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SlideshowItem';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * SlideshowItem component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SlideshowItem: Comp<SlideshowItemProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { className, children, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n className={classNames(\n className,\n handleBasicClasses({\n prefix: CLASSNAME,\n }),\n )}\n aria-roledescription=\"slide\"\n role=\"group\"\n {...forwardedProps}\n >\n {children}\n </div>\n );\n});\n\nSlideshowItem.displayName = COMPONENT_NAME;\nSlideshowItem.className = CLASSNAME;\n","import { useEffect } from 'react';\nimport { detectHorizontalSwipe } from '@lumx/core/js/utils';\n\nconst isTouchDevice = () => 'ontouchstart' in window;\n\n/**\n * Listen swipe to navigate left and right.\n */\nexport function useSwipeNavigate(element?: HTMLElement | null, onNext?: () => void, onPrevious?: () => void): void {\n useEffect(() => {\n if (!element || !isTouchDevice()) return undefined;\n\n return detectHorizontalSwipe(element, (swipe) => {\n const callback = swipe === 'right' ? onPrevious : onNext;\n callback?.();\n });\n }, [onPrevious, onNext, element]);\n}\n","import { useEffect } from 'react';\n\n/**\n * Listen keyboard to navigate left and right.\n */\nexport function useKeyNavigate(element?: HTMLElement | null, onNext?: () => void, onPrevious?: () => void): void {\n useEffect(() => {\n if (!element) return undefined;\n const onKeyNavigate = (evt: KeyboardEvent) => {\n let callback;\n if (evt?.key === 'ArrowRight') {\n callback = onNext;\n } else if (evt?.key === 'ArrowLeft') {\n callback = onPrevious;\n }\n if (!callback) return;\n\n callback();\n evt.preventDefault();\n evt.stopPropagation();\n };\n\n element.addEventListener('keydown', onKeyNavigate);\n return () => {\n element.removeEventListener('keydown', onKeyNavigate);\n };\n }, [onPrevious, onNext, element]);\n}\n","import { useMemo, useRef } from 'react';\nimport { EDGE_FROM_ACTIVE_INDEX, PAGINATION_ITEMS_MAX } from '@lumx/react/components/slideshow/constants';\n\ntype Range = { min: number; max: number };\n\n/**\n * Calculate the currently visible pagination \"bullet\" range.\n */\nexport function usePaginationVisibleRange(activeIndex: number, slideCount: number): Range {\n const previousVisibleRangeRef = useRef<Range>();\n return useMemo(() => {\n const lastSlide = slideCount - 1;\n const { current: previousVisibleRange } = previousVisibleRangeRef;\n let newVisibleRange: Range;\n if (activeIndex === previousVisibleRange?.max && activeIndex < lastSlide) {\n newVisibleRange = { min: previousVisibleRange.min + 1, max: previousVisibleRange.max + 1 };\n } else if (activeIndex === previousVisibleRange?.min && activeIndex > 0) {\n newVisibleRange = { min: previousVisibleRange.min - 1, max: previousVisibleRange.max - 1 };\n } else {\n const deltaItems = PAGINATION_ITEMS_MAX - 1;\n let min = activeIndex - EDGE_FROM_ACTIVE_INDEX;\n let max = activeIndex + EDGE_FROM_ACTIVE_INDEX;\n\n if (activeIndex > lastSlide - EDGE_FROM_ACTIVE_INDEX) {\n min = lastSlide - deltaItems;\n max = lastSlide;\n } else if (activeIndex < deltaItems) {\n min = 0;\n max = deltaItems;\n }\n\n newVisibleRange = { min, max };\n }\n previousVisibleRangeRef.current = newVisibleRange;\n return newVisibleRange;\n }, [activeIndex, slideCount]);\n}\n","import React, { forwardRef, RefObject, useCallback, useMemo } from 'react';\n\nimport classNames from 'classnames';\nimport range from 'lodash/range';\n\nimport { mdiChevronLeft, mdiChevronRight } from '@lumx/icons';\nimport { Emphasis, IconButton, IconButtonProps, Theme } from '@lumx/react';\nimport { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';\nimport { WINDOW } from '@lumx/react/constants';\nimport { useSlideshowControls, DEFAULT_OPTIONS } from '@lumx/react/hooks/useSlideshowControls';\n\nimport { useSwipeNavigate } from './useSwipeNavigate';\nimport { useKeyNavigate } from './useKeyNavigate';\nimport { PAGINATION_ITEM_SIZE, PAGINATION_ITEMS_MAX } from './constants';\nimport { usePaginationVisibleRange } from './usePaginationVisibleRange';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowControlsProps extends GenericProps {\n /** Index of the current slide. */\n activeIndex?: number;\n /** Props to pass to the next button (minus those already set by the SlideshowControls props). */\n nextButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n /** Reference to the parent element on which we want to listen touch swipe. */\n parentRef?: RefObject<HTMLDivElement> | HTMLDivElement;\n /** Props to pass to the previous button (minus those already set by the SlideshowControls props). */\n previousButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n /** Number of slides. */\n slidesCount: number;\n /** Theme adapting the component to light or dark background. */\n theme?: Theme;\n /** On next button click callback. */\n onNextClick?(loopback?: boolean): void;\n /** On pagination change callback. */\n onPaginationClick?(index: number): void;\n /** On previous button click callback. */\n onPreviousClick?(loopback?: boolean): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SlideshowControls';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SlideshowControlsProps> = {\n activeIndex: 0,\n theme: Theme.light,\n};\n\n/**\n * SlideshowControls component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nconst InternalSlideshowControls: Comp<SlideshowControlsProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n activeIndex,\n className,\n nextButtonProps,\n onNextClick,\n onPaginationClick,\n onPreviousClick,\n parentRef,\n previousButtonProps,\n slidesCount,\n theme,\n ...forwardedProps\n } = props;\n\n let parent;\n if (WINDOW) {\n // Checking window object to avoid errors in SSR.\n parent = parentRef instanceof HTMLElement ? parentRef : parentRef?.current;\n }\n // Listen to keyboard navigate left & right.\n useKeyNavigate(parent, onNextClick, onPreviousClick);\n // Listen to touch swipe navigate left & right.\n useSwipeNavigate(\n parent,\n // Go next without loopback.\n useCallback(() => onNextClick?.(false), [onNextClick]),\n // Go previous without loopback.\n useCallback(() => onPreviousClick?.(false), [onPreviousClick]),\n );\n\n // Pagination \"bullet\" range.\n const visibleRange = usePaginationVisibleRange(activeIndex as number, slidesCount);\n\n // Inline style of wrapper element.\n const wrapperStyle = { transform: `translateX(-${PAGINATION_ITEM_SIZE * visibleRange.min}px)` };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, theme }), {\n [`${CLASSNAME}--has-infinite-pagination`]: slidesCount > PAGINATION_ITEMS_MAX,\n })}\n >\n <IconButton\n {...previousButtonProps}\n icon={mdiChevronLeft}\n className={`${CLASSNAME}__navigation`}\n color={theme === Theme.dark ? 'light' : 'dark'}\n emphasis={Emphasis.low}\n onClick={onPreviousClick}\n />\n <div className={`${CLASSNAME}__pagination`}>\n <div className={`${CLASSNAME}__pagination-items`} style={wrapperStyle}>\n {useMemo(\n () =>\n range(slidesCount).map((index) => {\n const isOnEdge =\n index !== 0 &&\n index !== slidesCount - 1 &&\n (index === visibleRange.min || index === visibleRange.max);\n const isActive = activeIndex === index;\n const isOutRange = index < visibleRange.min || index > visibleRange.max;\n return (\n // eslint-disable-next-line jsx-a11y/control-has-associated-label\n <button\n className={classNames(\n handleBasicClasses({\n prefix: `${CLASSNAME}__pagination-item`,\n isActive,\n isOnEdge,\n isOutRange,\n }),\n )}\n key={index}\n type=\"button\"\n onClick={() => onPaginationClick?.(index)}\n />\n );\n }),\n [slidesCount, visibleRange.min, visibleRange.max, activeIndex, onPaginationClick],\n )}\n </div>\n </div>\n <IconButton\n {...nextButtonProps}\n icon={mdiChevronRight}\n className={`${CLASSNAME}__navigation`}\n color={theme === Theme.dark ? 'light' : 'dark'}\n emphasis={Emphasis.low}\n onClick={onNextClick}\n />\n </div>\n );\n});\n\nInternalSlideshowControls.displayName = COMPONENT_NAME;\nInternalSlideshowControls.className = CLASSNAME;\nInternalSlideshowControls.defaultProps = DEFAULT_PROPS;\n\nexport const SlideshowControls = Object.assign(InternalSlideshowControls, {\n useSlideshowControls,\n useSlideshowControlsDefaultOptions: DEFAULT_OPTIONS,\n});\n"],"names":["useInterval","callback","delay","savedCallback","useRef","useEffect","current","undefined","tick","isFunction","id","setInterval","clearInterval","AUTOPLAY_DEFAULT_INTERVAL","FULL_WIDTH_PERCENT","EDGE_FROM_ACTIVE_INDEX","PAGINATION_ITEMS_MAX","PAGINATION_ITEM_SIZE","useFocusWithin","element","onFocusIn","onFocusOut","addEventListener","removeEventListener","DEFAULT_OPTIONS","activeIndex","groupBy","interval","useSlideshowControls","autoPlay","defaultActiveIndex","onChange","itemsCount","slidesId","useState","currentIndex","setCurrentIndex","setElement","slidesCount","Math","ceil","min","goToNextSlide","useCallback","loopback","index","goToPreviousSlide","Boolean","isAutoPlaying","setIsAutoPlaying","onPaginationClick","onNextClick","onPreviousClick","slideshowId","useMemo","uniqueId","slideshowSlidesId","startAutoPlay","stopAutoPlay","startIndexVisible","endIndexVisible","setSlideshow","slideshow","setActiveIndex","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","theme","Theme","light","Slideshow","forwardRef","props","ref","children","className","fillHeight","slideshowControlsProps","forwardedProps","React","Children","count","SlideshowControls","wrapperStyle","transform","mergeRefs","classNames","handleBasicClasses","prefix","map","child","isValidElement","isCurrentlyVisible","cloneElement","style","visibility","nextButtonProps","previousButtonProps","displayName","defaultProps","SlideshowItem","isTouchDevice","window","useSwipeNavigate","onNext","onPrevious","detectHorizontalSwipe","swipe","useKeyNavigate","onKeyNavigate","evt","key","preventDefault","stopPropagation","usePaginationVisibleRange","slideCount","previousVisibleRangeRef","lastSlide","previousVisibleRange","newVisibleRange","max","deltaItems","InternalSlideshowControls","parentRef","parent","WINDOW","HTMLElement","visibleRange","mdiChevronLeft","dark","Emphasis","low","range","isOnEdge","isActive","isOutRange","mdiChevronRight","Object","assign","useSlideshowControlsDefaultOptions"],"mappings":";;;;;;;;;;;;AAKA;;;;;;;AAOO,SAASA,WAAT,CAAqBC,QAArB,EAAyCC,KAAzC,EAAqE;AACxE,MAAMC,aAAa,GAAGC,MAAM,EAA5B;AAEAC,EAAAA,SAAS,CAAC,YAAM;AACZF,IAAAA,aAAa,CAACG,OAAd,GAAwBL,QAAxB;AACH,GAFQ,CAAT;AAIAI,EAAAA,SAAS,CAAC,YAAM;AACZ,QAAIH,KAAK,KAAK,IAAd,EAAoB,OAAOK,SAAP;;AAEpB,aAASC,IAAT,GAAgB;AACZ,UAAIC,UAAU,CAACN,aAAa,CAACG,OAAf,CAAd,EAAuC;AACnCH,QAAAA,aAAa,CAACG,OAAd;AACH;AACJ;;AACD,QAAMI,EAAE,GAAGC,WAAW,CAACH,IAAD,EAAON,KAAP,CAAtB;AACA,WAAO;AAAA,aAAMU,aAAa,CAACF,EAAD,CAAnB;AAAA,KAAP;AACH,GAVQ,EAUN,CAACR,KAAD,CAVM,CA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