@aic-kits/react 0.24.2 → 0.24.3
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/dist/components/Carousel/CarouselItems.d.ts +3 -2
- package/dist/components/Carousel/types.d.ts +11 -0
- package/dist/components/Carousel/utils.d.ts +4 -0
- package/dist/index.cjs +92 -92
- package/dist/index.js +3823 -3685
- package/package.json +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Space } from '../../theme';
|
|
2
2
|
import { CarouselProps } from './types';
|
|
3
3
|
export declare const scrollAnimation: import('styled-components/dist/models/Keyframes').default;
|
|
4
|
-
interface CarouselItemsProps<T> extends Pick<CarouselProps<T>, 'autoScroll' | 'itemSpacing' | 'items' | 'renderItem' | 'keyExtractor' | 'itemsPerView'> {
|
|
4
|
+
interface CarouselItemsProps<T> extends Pick<CarouselProps<T>, 'autoScroll' | 'itemSpacing' | 'items' | 'renderItem' | 'keyExtractor' | 'itemsPerView' | 'infiniteLoop'> {
|
|
5
5
|
itemSpacing: Space | undefined;
|
|
6
6
|
itemWidth: number | undefined;
|
|
7
7
|
itemsWrapperRef: React.RefObject<HTMLDivElement | null>;
|
|
8
8
|
activeIndex: number;
|
|
9
|
+
virtualActiveIndex: number;
|
|
9
10
|
}
|
|
10
|
-
export declare function CarouselItems<T>({ itemSpacing, itemsWrapperRef, items, renderItem, keyExtractor, autoScroll, activeIndex, itemsPerView, itemWidth, }: CarouselItemsProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function CarouselItems<T>({ itemSpacing, itemsWrapperRef, items, renderItem, keyExtractor, autoScroll, activeIndex, virtualActiveIndex, itemsPerView, itemWidth, infiniteLoop, }: CarouselItemsProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -83,3 +83,14 @@ export interface CarouselHandle {
|
|
|
83
83
|
goToNext: () => void;
|
|
84
84
|
goToPrev: () => void;
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Internal interface to track virtual positioning for smooth infinite scrolling
|
|
88
|
+
*/
|
|
89
|
+
export interface VirtualIndexInfo {
|
|
90
|
+
/** The virtual index including duplicates */
|
|
91
|
+
virtualIndex: number;
|
|
92
|
+
/** The real index in the original items array */
|
|
93
|
+
realIndex: number;
|
|
94
|
+
/** Whether we need to snap to a real position after animation */
|
|
95
|
+
needsSnap: boolean;
|
|
96
|
+
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { Size, Theme } from '../../theme';
|
|
2
2
|
export declare const getItemWidthNumericValue: (theme: Theme, itemWidth: Size | string | number | undefined) => number | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Creates a CSS translateX value for carousel positioning
|
|
5
|
+
*/
|
|
6
|
+
export declare const createTranslateValue: (virtualIndex: number, itemsPerView: number, itemSpacing: number, itemWidth?: number) => string;
|