sevago-library 1.4.8 → 1.4.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/CHANGELOG.md +6 -0
- package/dist/index.cjs.js +81 -81
- package/dist/index.esm.js +8140 -7975
- package/dist/src/components/elements/image/image-gallery/elements/image-gallery-summary.element.d.ts +3 -0
- package/dist/src/components/elements/image/image-gallery/image-gallery.element.stories.d.ts +1 -0
- package/dist/src/components/elements/image/image-gallery/image-gallery.interface.d.ts +24 -0
- package/dist/src/components/elements/image/image-gallery/image-gallery.util.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,6 +8,10 @@ export interface ImageGalleryItemObject {
|
|
|
8
8
|
title?: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
export type ImageGalleryItem = string | ImageGalleryItemObject;
|
|
11
|
+
export declare enum ImageGalleryVariant {
|
|
12
|
+
GALLERY = "gallery",
|
|
13
|
+
SUMMARY = "summary"
|
|
14
|
+
}
|
|
11
15
|
export interface NormalizedImageGalleryItem {
|
|
12
16
|
id: string;
|
|
13
17
|
src: string;
|
|
@@ -18,6 +22,8 @@ export interface NormalizedImageGalleryItem {
|
|
|
18
22
|
export interface ImageGalleryLabels {
|
|
19
23
|
image: (index: number) => string;
|
|
20
24
|
selectImage: (index: number) => string;
|
|
25
|
+
moreImages: (count: number) => string;
|
|
26
|
+
moreImagesCount: (count: number) => string;
|
|
21
27
|
previous: string;
|
|
22
28
|
next: string;
|
|
23
29
|
close: string;
|
|
@@ -25,12 +31,15 @@ export interface ImageGalleryLabels {
|
|
|
25
31
|
}
|
|
26
32
|
export interface ImageGalleryElementProps extends BoxProps {
|
|
27
33
|
images: ImageGalleryItem[];
|
|
34
|
+
variant?: ImageGalleryVariant;
|
|
28
35
|
activeIndex?: number;
|
|
29
36
|
initialIndex?: number;
|
|
30
37
|
mainAspectRatio?: string | number;
|
|
31
38
|
objectFit?: CSSProperties['objectFit'];
|
|
32
39
|
thumbnailObjectFit?: CSSProperties['objectFit'];
|
|
33
40
|
thumbnailSize?: number | string;
|
|
41
|
+
summaryMaxVisible?: number;
|
|
42
|
+
summaryThumbnailSize?: number | string;
|
|
34
43
|
showThumbnails?: boolean;
|
|
35
44
|
showPreviewNavigation?: boolean;
|
|
36
45
|
showViewerCounter?: boolean;
|
|
@@ -43,6 +52,9 @@ export interface ImageGalleryElementProps extends BoxProps {
|
|
|
43
52
|
labels?: Partial<ImageGalleryLabels>;
|
|
44
53
|
mainSx?: SxProps<Theme>;
|
|
45
54
|
mainImageSx?: SxProps<Theme>;
|
|
55
|
+
summarySx?: SxProps<Theme>;
|
|
56
|
+
summaryItemSx?: SxProps<Theme>;
|
|
57
|
+
summaryCountSx?: SxProps<Theme>;
|
|
46
58
|
thumbnailListSx?: SxProps<Theme>;
|
|
47
59
|
thumbnailSx?: SxProps<Theme>;
|
|
48
60
|
viewerPaperSx?: SxProps<Theme>;
|
|
@@ -91,6 +103,18 @@ export interface ImageGalleryThumbnailListElementProps {
|
|
|
91
103
|
onSelectIndex: (index: number) => void;
|
|
92
104
|
onImageError: (event: SyntheticEvent<HTMLImageElement>) => void;
|
|
93
105
|
}
|
|
106
|
+
export interface ImageGallerySummaryElementProps {
|
|
107
|
+
images: NormalizedImageGalleryItem[];
|
|
108
|
+
maxVisible: number;
|
|
109
|
+
thumbnailSize: number | string;
|
|
110
|
+
thumbnailObjectFit: CSSProperties['objectFit'];
|
|
111
|
+
labels: ImageGalleryLabels;
|
|
112
|
+
summarySx?: SxProps<Theme>;
|
|
113
|
+
summaryItemSx?: SxProps<Theme>;
|
|
114
|
+
summaryCountSx?: SxProps<Theme>;
|
|
115
|
+
onOpenIndex: (index: number) => void;
|
|
116
|
+
onImageError: (event: SyntheticEvent<HTMLImageElement>) => void;
|
|
117
|
+
}
|
|
94
118
|
export interface ImageGalleryViewerElementProps {
|
|
95
119
|
open: boolean;
|
|
96
120
|
selectedImage: NormalizedImageGalleryItem;
|
|
@@ -6,3 +6,4 @@ export declare const normalizeImageGalleryItem: (image: ImageGalleryItem, index:
|
|
|
6
6
|
export declare const clampImageGalleryIndex: (index: number | undefined, length: number) => number;
|
|
7
7
|
export declare const getImageGalleryNavigationIndex: (selectedIndex: number, direction: -1 | 1, imageCount: number, loop: boolean) => number;
|
|
8
8
|
export declare const toImageGalleryCssSize: (value: number | string) => string;
|
|
9
|
+
export declare const getImageGallerySummaryVisibleCount: (imageCount: number, maxVisible: number) => number;
|