@alfalab/core-components-gallery 5.5.3 → 5.5.5
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/Component.js +1 -1
- package/{buttons-953b5ccb.js → buttons-508eaa80.js} +1 -1
- package/components/header/Component.js +2 -2
- package/components/header/buttons.js +1 -1
- package/components/header/index.css +7 -7
- package/components/header-info-block/Component.js +1 -1
- package/components/header-info-block/index.css +6 -6
- package/components/image-preview/Component.js +1 -1
- package/components/image-preview/index.css +15 -15
- package/components/image-viewer/component.js +2 -2
- package/components/image-viewer/index.css +20 -20
- package/components/image-viewer/slide.js +1 -1
- package/components/navigation-bar/Component.js +1 -1
- package/components/navigation-bar/index.css +7 -7
- package/cssm/components/header/Component.js +1 -1
- package/cssm/components/header/index.module.css +1 -1
- package/cssm/components/header-info-block/index.module.css +1 -1
- package/cssm/components/image-preview/index.module.css +1 -1
- package/cssm/components/image-viewer/component.js +1 -1
- package/cssm/components/image-viewer/index.module.css +1 -1
- package/cssm/components/image-viewer/slide.js +1 -1
- package/cssm/components/navigation-bar/index.module.css +1 -1
- package/cssm/index.module.css +1 -1
- package/esm/Component.js +1 -1
- package/esm/{buttons-d5829659.js → buttons-6abc953a.js} +1 -1
- package/esm/components/header/Component.js +2 -2
- package/esm/components/header/buttons.js +1 -1
- package/esm/components/header/index.css +7 -7
- package/esm/components/header-info-block/Component.js +1 -1
- package/esm/components/header-info-block/index.css +6 -6
- package/esm/components/image-preview/Component.js +1 -1
- package/esm/components/image-preview/index.css +15 -15
- package/esm/components/image-viewer/component.js +2 -2
- package/esm/components/image-viewer/index.css +20 -20
- package/esm/components/image-viewer/slide.js +1 -1
- package/esm/components/navigation-bar/Component.js +1 -1
- package/esm/components/navigation-bar/index.css +7 -7
- package/esm/index.css +4 -4
- package/esm/{slide-238aa9d5.js → slide-98e7a71b.js} +2 -2
- package/index.css +4 -4
- package/modern/Component.js +1 -1
- package/modern/{buttons-589e9203.js → buttons-bbe374ac.js} +1 -1
- package/modern/components/header/Component.js +2 -2
- package/modern/components/header/buttons.js +1 -1
- package/modern/components/header/index.css +7 -7
- package/modern/components/header-info-block/Component.js +1 -1
- package/modern/components/header-info-block/index.css +6 -6
- package/modern/components/image-preview/Component.js +1 -1
- package/modern/components/image-preview/index.css +15 -15
- package/modern/components/image-viewer/component.js +2 -2
- package/modern/components/image-viewer/index.css +20 -20
- package/modern/components/image-viewer/slide.js +1 -1
- package/modern/components/navigation-bar/Component.js +1 -1
- package/modern/components/navigation-bar/index.css +7 -7
- package/modern/index.css +4 -4
- package/modern/{slide-06104519.js → slide-99d6a0c0.js} +2 -2
- package/package.json +3 -3
- package/{slide-8faca603.js → slide-273cc2d3.js} +2 -2
- package/src/components/header/Component.tsx +4 -3
- package/src/components/image-viewer/component.tsx +1 -1
- package/src/components/image-viewer/slide.tsx +1 -1
- /package/{buttons-953b5ccb.d.ts → buttons-508eaa80.d.ts} +0 -0
- /package/esm/{buttons-d5829659.d.ts → buttons-6abc953a.d.ts} +0 -0
- /package/esm/{slide-238aa9d5.d.ts → slide-98e7a71b.d.ts} +0 -0
- /package/modern/{buttons-589e9203.d.ts → buttons-bbe374ac.d.ts} +0 -0
- /package/modern/{slide-06104519.d.ts → slide-99d6a0c0.d.ts} +0 -0
- /package/{slide-8faca603.d.ts → slide-273cc2d3.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: wybig */
|
|
2
|
+
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
5
5
|
--color-light-border-link: #2288fa;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
} :root {
|
|
24
24
|
} :root {
|
|
25
25
|
--focus-color: var(--color-light-border-link);
|
|
26
|
-
} .
|
|
26
|
+
} .gallery__component_162cd {
|
|
27
27
|
display: flex;
|
|
28
28
|
padding: var(--gap-2xs);
|
|
29
29
|
border: 2px solid rgba(0, 0, 0, 0);
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
transition: border 0.15s ease-in-out;
|
|
33
33
|
outline: none;
|
|
34
|
-
} .
|
|
34
|
+
} .gallery__active_162cd {
|
|
35
35
|
border-color: var(--color-static-overlay-white-xhigh)
|
|
36
|
-
} .
|
|
36
|
+
} .gallery__active_162cd > .gallery__image_162cd {
|
|
37
37
|
opacity: 0.7;
|
|
38
|
-
} .
|
|
38
|
+
} .gallery__preview_162cd {
|
|
39
39
|
width: 56px;
|
|
40
40
|
height: 56px;
|
|
41
41
|
flex-shrink: 0;
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
-webkit-user-select: none;
|
|
45
45
|
user-select: none;
|
|
46
|
-
} .
|
|
46
|
+
} .gallery__image_162cd {
|
|
47
47
|
transition: opacity 0.15s ease-in-out
|
|
48
|
-
} .
|
|
48
|
+
} .gallery__image_162cd > img {
|
|
49
49
|
display: block;
|
|
50
50
|
background-color: var(--color-light-bg-primary);
|
|
51
51
|
width: 100%;
|
|
@@ -54,23 +54,23 @@
|
|
|
54
54
|
object-fit: cover;
|
|
55
55
|
overflow: clip;
|
|
56
56
|
overflow-clip-margin: border-box;
|
|
57
|
-
} .
|
|
57
|
+
} .gallery__image_162cd:hover {
|
|
58
58
|
opacity: 0.7;
|
|
59
|
-
} .
|
|
59
|
+
} .gallery__loading_162cd {
|
|
60
60
|
background-color: var(--color-static-bg-secondary-dark)
|
|
61
|
-
} .
|
|
61
|
+
} .gallery__loading_162cd .gallery__active_162cd {
|
|
62
62
|
background-color: var(--color-static-bg-quaternary-dark);
|
|
63
|
-
} .
|
|
63
|
+
} .gallery__brokenImageWrapper_162cd {
|
|
64
64
|
display: flex;
|
|
65
65
|
justify-content: center;
|
|
66
66
|
align-items: center;
|
|
67
67
|
background-color: var(--color-static-bg-quaternary-dark)
|
|
68
|
-
} .
|
|
68
|
+
} .gallery__brokenImageWrapper_162cd:hover {
|
|
69
69
|
opacity: 0.7;
|
|
70
|
-
} .
|
|
70
|
+
} .gallery__brokenIcon_162cd {
|
|
71
71
|
width: 40px;
|
|
72
72
|
height: 40px;
|
|
73
|
-
} .
|
|
73
|
+
} .gallery__focused_162cd {
|
|
74
74
|
outline: 2px solid var(--focus-color);
|
|
75
75
|
outline-offset: 2px;
|
|
76
76
|
}
|
|
@@ -9,7 +9,7 @@ import { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHea
|
|
|
9
9
|
import { GalleryContext } from '../../context.js';
|
|
10
10
|
import { getImageAlt, getImageKey } from '../../utils/utils.js';
|
|
11
11
|
import { TestIds } from '../../utils/constants.js';
|
|
12
|
-
import { s as styles, S as Slide } from '../../slide-
|
|
12
|
+
import { s as styles, S as Slide } from '../../slide-99d6a0c0.js';
|
|
13
13
|
import 'swiper/swiper.min.css';
|
|
14
14
|
|
|
15
15
|
SwiperCore.use([EffectFade, A11y, Controller]);
|
|
@@ -76,7 +76,7 @@ const ImageViewer = () => {
|
|
|
76
76
|
onSwiper: setSwiper,
|
|
77
77
|
onSlideChange: handleSlideChange,
|
|
78
78
|
}), [swiper, fullScreen, initialSlide, handleSlideChange, setSwiper]);
|
|
79
|
-
const showControls = !singleSlide && !fullScreen;
|
|
79
|
+
const showControls = !singleSlide && !fullScreen && !!images.length;
|
|
80
80
|
const swiperWidth = swiper?.width || 1;
|
|
81
81
|
const swiperHeight = swiper?.height || swiper?.width || 1;
|
|
82
82
|
const swiperAspectRatio = swiperWidth / swiperHeight;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: daqdl */
|
|
2
|
+
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
5
5
|
--color-light-border-link: #2288fa;
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
} :root {
|
|
28
28
|
} :root {
|
|
29
29
|
--focus-color: var(--color-light-border-link);
|
|
30
|
-
} .
|
|
30
|
+
} .gallery__component_40b1c {
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-grow: 1;
|
|
33
33
|
justify-content: center;
|
|
34
34
|
align-items: center;
|
|
35
35
|
background-color: var(--color-static-bg-primary-dark);
|
|
36
|
-
} .
|
|
36
|
+
} .gallery__swiper_40b1c {
|
|
37
37
|
display: flex;
|
|
38
38
|
width: 100%;
|
|
39
39
|
height: 100%;
|
|
@@ -42,42 +42,42 @@
|
|
|
42
42
|
max-height: calc(100vh - 168px);
|
|
43
43
|
padding: var(--gap-2xl) var(--gap-m);
|
|
44
44
|
box-sizing: border-box;
|
|
45
|
-
} .
|
|
45
|
+
} .gallery__singleSlide_40b1c .gallery__swiper_40b1c {
|
|
46
46
|
max-height: calc(100vh - 80px);
|
|
47
47
|
padding: var(--gap-2xl);
|
|
48
|
-
} .
|
|
48
|
+
} .gallery__hidden_40b1c {
|
|
49
49
|
display: none;
|
|
50
|
-
} .
|
|
50
|
+
} .gallery__slide_40b1c {
|
|
51
51
|
position: relative;
|
|
52
52
|
display: flex;
|
|
53
53
|
justify-content: center;
|
|
54
54
|
align-items: center;
|
|
55
55
|
width: 100%;
|
|
56
56
|
height: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .gallery__slideLoading_40b1c {
|
|
58
58
|
background-color: var(--color-static-bg-secondary-dark);
|
|
59
59
|
border-radius: var(--border-radius-m);
|
|
60
|
-
} .
|
|
60
|
+
} .gallery__image_40b1c {
|
|
61
61
|
width: 0;
|
|
62
62
|
height: 0;
|
|
63
63
|
-webkit-user-select: none;
|
|
64
64
|
user-select: none;
|
|
65
65
|
background-color: var(--color-light-bg-primary);
|
|
66
66
|
border-radius: var(--border-radius-m);
|
|
67
|
-
} .
|
|
67
|
+
} .gallery__smallImage_40b1c {
|
|
68
68
|
position: relative;
|
|
69
69
|
width: auto;
|
|
70
70
|
height: auto;
|
|
71
71
|
-webkit-user-select: none;
|
|
72
72
|
user-select: none;
|
|
73
73
|
background-color: var(--color-light-bg-primary);
|
|
74
|
-
} .
|
|
74
|
+
} .gallery__verticalImageFit_40b1c {
|
|
75
75
|
width: auto;
|
|
76
76
|
height: 100%;
|
|
77
|
-
} .
|
|
77
|
+
} .gallery__horizontalImageFit_40b1c {
|
|
78
78
|
width: 100%;
|
|
79
79
|
height: auto;
|
|
80
|
-
} .
|
|
80
|
+
} .gallery__arrow_40b1c {
|
|
81
81
|
display: flex;
|
|
82
82
|
flex-direction: column;
|
|
83
83
|
justify-content: center;
|
|
@@ -89,14 +89,14 @@
|
|
|
89
89
|
color: var(--color-static-graphic-light);
|
|
90
90
|
transition: background-color 0.15s ease-in-out;
|
|
91
91
|
outline: none
|
|
92
|
-
} .
|
|
92
|
+
} .gallery__arrow_40b1c:hover {
|
|
93
93
|
background-color: var(--color-static-bg-primary-dark-tint-15);
|
|
94
|
-
} .
|
|
94
|
+
} .gallery__arrow_40b1c:active {
|
|
95
95
|
background-color: var(--color-static-bg-primary-dark-tint-20);
|
|
96
|
-
} .
|
|
96
|
+
} .gallery__focused_40b1c {
|
|
97
97
|
outline: 2px solid var(--focus-color);
|
|
98
98
|
outline-offset: 2px;
|
|
99
|
-
} .
|
|
99
|
+
} .gallery__placeholder_40b1c {
|
|
100
100
|
display: flex;
|
|
101
101
|
justify-content: center;
|
|
102
102
|
align-items: center;
|
|
@@ -104,18 +104,18 @@
|
|
|
104
104
|
height: 300px;
|
|
105
105
|
border-radius: var(--border-radius-m);
|
|
106
106
|
background-color: var(--color-static-bg-quaternary-dark);
|
|
107
|
-
} .
|
|
107
|
+
} .gallery__brokenImgWrapper_40b1c {
|
|
108
108
|
position: relative;
|
|
109
109
|
display: flex;
|
|
110
110
|
flex-direction: column;
|
|
111
111
|
align-items: center;
|
|
112
112
|
width: 150px;
|
|
113
113
|
text-align: center;
|
|
114
|
-
} .
|
|
114
|
+
} .gallery__brokenImgIcon_40b1c {
|
|
115
115
|
width: 80px;
|
|
116
116
|
height: 80px;
|
|
117
117
|
margin-bottom: var(--gap-2xs);
|
|
118
|
-
} .
|
|
118
|
+
} .gallery__fullScreenImage_40b1c {
|
|
119
119
|
width: 100%;
|
|
120
120
|
height: auto;
|
|
121
121
|
background-color: var(--color-light-bg-primary);
|
|
@@ -4,7 +4,7 @@ import { getImageKey } from '../../utils/utils.js';
|
|
|
4
4
|
import { TestIds } from '../../utils/constants.js';
|
|
5
5
|
import { ImagePreview } from '../image-preview/Component.js';
|
|
6
6
|
|
|
7
|
-
const styles = {"component":"
|
|
7
|
+
const styles = {"component":"gallery__component_1dovr","preview":"gallery__preview_1dovr"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const MIN_SCROLL_STEP = 24;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: 1totd */
|
|
2
|
+
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
5
|
} :root {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
--gap-xl: 24px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .gallery__component_1dovr {
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-wrap: nowrap;
|
|
22
22
|
align-content: center;
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
padding: 10px var(--gap-xl);
|
|
28
28
|
scrollbar-width: none
|
|
29
|
-
} .
|
|
29
|
+
} .gallery__component_1dovr::-webkit-scrollbar {
|
|
30
30
|
display: none;
|
|
31
|
-
} .
|
|
31
|
+
} .gallery__preview_1dovr {
|
|
32
32
|
flex-shrink: 0;
|
|
33
33
|
margin: 0 var(--gap-3xs)
|
|
34
|
-
} .
|
|
34
|
+
} .gallery__preview_1dovr:first-child {
|
|
35
35
|
margin-left: auto;
|
|
36
|
-
} .
|
|
36
|
+
} .gallery__preview_1dovr:last-child {
|
|
37
37
|
margin-right: auto;
|
|
38
38
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
:root {
|
|
1
|
+
/* hash: cu0bo */
|
|
2
|
+
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-static-bg-primary-dark: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
5
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .gallery__container_8fi8y {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
justify-content: space-between;
|
|
22
22
|
height: 100%;
|
|
23
23
|
width: 100%;
|
|
24
24
|
background-color: var(--color-static-bg-primary-dark);
|
|
25
|
-
} .
|
|
25
|
+
} .gallery__modal_8fi8y {
|
|
26
26
|
flex-grow: 1;
|
|
27
27
|
width: 100%;
|
|
28
28
|
height: 100%;
|
|
@@ -5,7 +5,7 @@ import { isSmallImage, getImageAlt } from './utils/utils.js';
|
|
|
5
5
|
import { TestIds } from './utils/constants.js';
|
|
6
6
|
import { NoImagePaths } from './components/image-viewer/paths.js';
|
|
7
7
|
|
|
8
|
-
const styles = {"component":"
|
|
8
|
+
const styles = {"component":"gallery__component_40b1c","swiper":"gallery__swiper_40b1c","singleSlide":"gallery__singleSlide_40b1c","hidden":"gallery__hidden_40b1c","slide":"gallery__slide_40b1c","slideLoading":"gallery__slideLoading_40b1c","image":"gallery__image_40b1c","smallImage":"gallery__smallImage_40b1c","verticalImageFit":"gallery__verticalImageFit_40b1c","horizontalImageFit":"gallery__horizontalImageFit_40b1c","arrow":"gallery__arrow_40b1c","focused":"gallery__focused_40b1c","placeholder":"gallery__placeholder_40b1c","brokenImgWrapper":"gallery__brokenImgWrapper_40b1c","brokenImgIcon":"gallery__brokenImgIcon_40b1c","fullScreenImage":"gallery__fullScreenImage_40b1c"};
|
|
9
9
|
require('./components/image-viewer/index.css')
|
|
10
10
|
|
|
11
11
|
const SlideInner = ({ children, broken, loading, withPlaceholder }) => {
|
|
@@ -26,7 +26,7 @@ const Slide = ({ isActive, meta, swiperAspectRatio, imageAspectRatio, image, ind
|
|
|
26
26
|
return (React.createElement(SlideInner, { active: isActive, broken: broken, loading: !meta, withPlaceholder: small || broken },
|
|
27
27
|
React.createElement("img", { src: image.src, alt: getImageAlt(image, index), className: cn({
|
|
28
28
|
[styles.smallImage]: small,
|
|
29
|
-
[styles.image]: !small,
|
|
29
|
+
[styles.image]: !small && meta,
|
|
30
30
|
[styles.verticalImageFit]: verticalImageFit,
|
|
31
31
|
[styles.horizontalImageFit]: horizontalImageFit,
|
|
32
32
|
}), onLoad: (event) => handleLoad(event, index), onError: () => handleLoadError(index), style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-gallery",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@alfalab/core-components-base-modal": "^5.7.2",
|
|
18
|
-
"@alfalab/core-components-icon-button": "^6.5.
|
|
19
|
-
"@alfalab/core-components-tooltip": "^7.3.
|
|
18
|
+
"@alfalab/core-components-icon-button": "^6.5.3",
|
|
19
|
+
"@alfalab/core-components-tooltip": "^7.3.5",
|
|
20
20
|
"@alfalab/core-components-typography": "^4.5.0",
|
|
21
21
|
"@alfalab/hooks": "^1.13.0",
|
|
22
22
|
"@alfalab/icons-glyph": "^2.139.0",
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"component":"
|
|
15
|
+
var styles = {"component":"gallery__component_40b1c","swiper":"gallery__swiper_40b1c","singleSlide":"gallery__singleSlide_40b1c","hidden":"gallery__hidden_40b1c","slide":"gallery__slide_40b1c","slideLoading":"gallery__slideLoading_40b1c","image":"gallery__image_40b1c","smallImage":"gallery__smallImage_40b1c","verticalImageFit":"gallery__verticalImageFit_40b1c","horizontalImageFit":"gallery__horizontalImageFit_40b1c","arrow":"gallery__arrow_40b1c","focused":"gallery__focused_40b1c","placeholder":"gallery__placeholder_40b1c","brokenImgWrapper":"gallery__brokenImgWrapper_40b1c","brokenImgIcon":"gallery__brokenImgIcon_40b1c","fullScreenImage":"gallery__fullScreenImage_40b1c"};
|
|
16
16
|
require('./components/image-viewer/index.css')
|
|
17
17
|
|
|
18
18
|
var SlideInner = function (_a) {
|
|
@@ -37,7 +37,7 @@ var Slide = function (_a) {
|
|
|
37
37
|
return (React__default.default.createElement(SlideInner, { active: isActive, broken: broken, loading: !meta, withPlaceholder: small || broken },
|
|
38
38
|
React__default.default.createElement("img", { src: image.src, alt: utils_utils.getImageAlt(image, index), className: cn__default.default((_b = {},
|
|
39
39
|
_b[styles.smallImage] = small,
|
|
40
|
-
_b[styles.image] = !small,
|
|
40
|
+
_b[styles.image] = !small && meta,
|
|
41
41
|
_b[styles.verticalImageFit] = verticalImageFit,
|
|
42
42
|
_b[styles.horizontalImageFit] = horizontalImageFit,
|
|
43
43
|
_b)), onLoad: function (event) { return handleLoad(event, index); }, onError: function () { return handleLoadError(index); }, style: {
|
|
@@ -40,9 +40,10 @@ export const Header: FC = () => {
|
|
|
40
40
|
|
|
41
41
|
const canDownload = currentImage?.canDownload ?? true;
|
|
42
42
|
const filename = currentImage?.name || '';
|
|
43
|
-
const description =
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const description =
|
|
44
|
+
singleSlide || !images.length
|
|
45
|
+
? ''
|
|
46
|
+
: `Изображение ${currentSlideIndex + 1} из ${images.length}`;
|
|
46
47
|
|
|
47
48
|
const meta = getCurrentImageMeta();
|
|
48
49
|
|
|
@@ -133,7 +133,7 @@ export const ImageViewer: FC = () => {
|
|
|
133
133
|
[swiper, fullScreen, initialSlide, handleSlideChange, setSwiper],
|
|
134
134
|
);
|
|
135
135
|
|
|
136
|
-
const showControls = !singleSlide && !fullScreen;
|
|
136
|
+
const showControls = !singleSlide && !fullScreen && !!images.length;
|
|
137
137
|
|
|
138
138
|
const swiperWidth = swiper?.width || 1;
|
|
139
139
|
const swiperHeight = swiper?.height || swiper?.width || 1;
|
|
@@ -97,7 +97,7 @@ export const Slide: FC<SlideProps> = ({
|
|
|
97
97
|
alt={getImageAlt(image, index)}
|
|
98
98
|
className={cn({
|
|
99
99
|
[styles.smallImage]: small,
|
|
100
|
-
[styles.image]: !small,
|
|
100
|
+
[styles.image]: !small && meta,
|
|
101
101
|
[styles.verticalImageFit]: verticalImageFit,
|
|
102
102
|
[styles.horizontalImageFit]: horizontalImageFit,
|
|
103
103
|
})}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|