@alfalab/core-components-gallery 7.1.1 → 7.1.2
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/components/bottom-button/index.css +5 -5
- package/components/bottom-button/index.module.css.js +1 -1
- package/components/buttons/index.css +5 -5
- package/components/buttons/index.module.css.js +1 -1
- package/components/header/index.css +1 -1
- package/components/header/index.module.css.js +1 -1
- package/components/header-info-block/index.css +4 -4
- package/components/header-info-block/index.module.css.js +1 -1
- package/components/header-mobile/index.css +6 -6
- package/components/header-mobile/index.module.css.js +1 -1
- package/components/image-preview/index.css +17 -17
- package/components/image-preview/index.module.css.js +1 -1
- package/components/image-viewer/component.d.ts +0 -1
- package/components/image-viewer/component.js +2 -4
- package/components/image-viewer/component.js.map +1 -1
- package/components/image-viewer/index.css +86 -25
- package/components/image-viewer/index.module.css.js +1 -1
- package/components/image-viewer/index.module.css.js.map +1 -1
- package/components/image-viewer/video/index.css +7 -7
- package/components/image-viewer/video/index.module.css.js +1 -1
- package/components/info-bar/index.css +3 -3
- package/components/info-bar/index.module.css.js +1 -1
- package/components/navigation-bar/index.css +8 -8
- package/components/navigation-bar/index.module.css.js +1 -1
- package/components/subtitles/index.css +3 -3
- package/components/subtitles/index.module.css.js +1 -1
- package/cssm/components/image-viewer/component.d.ts +0 -1
- package/cssm/components/image-viewer/component.js +2 -4
- package/cssm/components/image-viewer/component.js.map +1 -1
- package/cssm/components/image-viewer/index.module.css +61 -0
- package/esm/components/bottom-button/index.css +5 -5
- package/esm/components/bottom-button/index.module.css.js +1 -1
- package/esm/components/buttons/index.css +5 -5
- package/esm/components/buttons/index.module.css.js +1 -1
- package/esm/components/header/index.css +1 -1
- package/esm/components/header/index.module.css.js +1 -1
- package/esm/components/header-info-block/index.css +4 -4
- package/esm/components/header-info-block/index.module.css.js +1 -1
- package/esm/components/header-mobile/index.css +6 -6
- package/esm/components/header-mobile/index.module.css.js +1 -1
- package/esm/components/image-preview/index.css +17 -17
- package/esm/components/image-preview/index.module.css.js +1 -1
- package/esm/components/image-viewer/component.d.ts +0 -1
- package/esm/components/image-viewer/component.js +2 -3
- package/esm/components/image-viewer/component.js.map +1 -1
- package/esm/components/image-viewer/index.css +86 -25
- package/esm/components/image-viewer/index.module.css.js +1 -1
- package/esm/components/image-viewer/index.module.css.js.map +1 -1
- package/esm/components/image-viewer/video/index.css +7 -7
- package/esm/components/image-viewer/video/index.module.css.js +1 -1
- package/esm/components/info-bar/index.css +3 -3
- package/esm/components/info-bar/index.module.css.js +1 -1
- package/esm/components/navigation-bar/index.css +8 -8
- package/esm/components/navigation-bar/index.module.css.js +1 -1
- package/esm/components/subtitles/index.css +3 -3
- package/esm/components/subtitles/index.module.css.js +1 -1
- package/esm/index.css +9 -9
- package/esm/index.module.css.js +1 -1
- package/index.css +9 -9
- package/index.module.css.js +1 -1
- package/modern/components/bottom-button/index.css +5 -5
- package/modern/components/bottom-button/index.module.css.js +1 -1
- package/modern/components/buttons/index.css +5 -5
- package/modern/components/buttons/index.module.css.js +1 -1
- package/modern/components/header/index.css +1 -1
- package/modern/components/header/index.module.css.js +1 -1
- package/modern/components/header-info-block/index.css +4 -4
- package/modern/components/header-info-block/index.module.css.js +1 -1
- package/modern/components/header-mobile/index.css +6 -6
- package/modern/components/header-mobile/index.module.css.js +1 -1
- package/modern/components/image-preview/index.css +17 -17
- package/modern/components/image-preview/index.module.css.js +1 -1
- package/modern/components/image-viewer/component.d.ts +0 -1
- package/modern/components/image-viewer/component.js +2 -3
- package/modern/components/image-viewer/component.js.map +1 -1
- package/modern/components/image-viewer/index.css +86 -25
- package/modern/components/image-viewer/index.module.css.js +1 -1
- package/modern/components/image-viewer/index.module.css.js.map +1 -1
- package/modern/components/image-viewer/video/index.css +7 -7
- package/modern/components/image-viewer/video/index.module.css.js +1 -1
- package/modern/components/info-bar/index.css +3 -3
- package/modern/components/info-bar/index.module.css.js +1 -1
- package/modern/components/navigation-bar/index.css +8 -8
- package/modern/components/navigation-bar/index.module.css.js +1 -1
- package/modern/components/subtitles/index.css +3 -3
- package/modern/components/subtitles/index.module.css.js +1 -1
- package/modern/index.css +9 -9
- package/modern/index.module.css.js +1 -1
- package/moderncssm/components/image-viewer/component.d.ts +0 -1
- package/moderncssm/components/image-viewer/component.js +2 -3
- package/moderncssm/components/image-viewer/component.js.map +1 -1
- package/moderncssm/components/image-viewer/index.module.css +61 -0
- package/package.json +2 -2
- package/src/components/image-viewer/component.tsx +4 -6
- package/src/components/image-viewer/index.module.css +63 -0
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
--color-static-neutral-translucent-500-inverted-hover: rgba(233, 233, 250, 0.37);
|
|
4
4
|
--color-static-neutral-translucent-500-inverted-press: rgba(238, 238, 254, 0.46);
|
|
5
5
|
}
|
|
6
|
-
.
|
|
6
|
+
.gallery__component_1kt2z {
|
|
7
7
|
background-color: var(--color-static-neutral-translucent-500-inverted);
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
.gallery__component_1kt2z:hover {
|
|
10
10
|
background-color: var(--color-static-neutral-translucent-500-inverted-hover);
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.gallery__component_1kt2z:active {
|
|
13
13
|
background-color: var(--color-static-neutral-translucent-500-inverted-press);
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.gallery__component_1kt2z {
|
|
16
16
|
|
|
17
17
|
transition: transform 1s ease-in-out;
|
|
18
18
|
will-change: transform;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.gallery__notVisible_1kt2z {
|
|
21
21
|
transform: translateY(250%);
|
|
22
22
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"gallery__component_1kt2z","notVisible":"gallery__notVisible_1kt2z"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
--gap-2xl: 32px;
|
|
9
9
|
--gap-32: var(--gap-2xl);
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.gallery__buttons_17yvw {
|
|
12
12
|
display: flex;
|
|
13
13
|
padding-left: var(--gap-32);
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.gallery__buttons_17yvw path {
|
|
16
16
|
color: var(--color-static-neutral-translucent-1300-inverted);
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.gallery__iconButton_17yvw path {
|
|
19
19
|
color: var(--color-static-neutral-100);
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.gallery__iconButton_17yvw:hover path {
|
|
22
22
|
color: var(--color-static-neutral-100-hover);
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.gallery__iconButton_17yvw:active path {
|
|
25
25
|
color: var(--color-static-neutral-100-press);
|
|
26
26
|
}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
--gap-2xs: 4px;
|
|
3
3
|
--gap-4: var(--gap-2xs);
|
|
4
4
|
}
|
|
5
|
-
.
|
|
5
|
+
.gallery__info_1m2yi {
|
|
6
6
|
height: 100%;
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.gallery__filenameHead_1m2yi {
|
|
13
13
|
display: inline;
|
|
14
14
|
text-overflow: ellipsis;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
white-space: nowrap;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.gallery__filenameContainer_1m2yi {
|
|
19
19
|
overflow: hidden;
|
|
20
20
|
display: inline-flex;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.gallery__description_1m2yi {
|
|
23
23
|
display: inline;
|
|
24
24
|
text-overflow: ellipsis;
|
|
25
25
|
overflow: hidden;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"info":"
|
|
5
|
+
var styles = {"info":"gallery__info_1m2yi","filenameHead":"gallery__filenameHead_1m2yi","filenameContainer":"gallery__filenameContainer_1m2yi","description":"gallery__description_1m2yi"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--color-static-neutral-0-inverted: #262629;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
.gallery__headerMobile_16jgu {
|
|
5
5
|
position: relative;
|
|
6
6
|
height: 72px;
|
|
7
7
|
z-index: 3;
|
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
align-items: center;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.gallery__headerMobile_16jgu.gallery__video_16jgu {
|
|
14
14
|
position: absolute;
|
|
15
15
|
width: 100%;
|
|
16
16
|
background-color: var(--color-static-neutral-0-inverted);
|
|
17
17
|
transition: transform 0.3s ease-in-out;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
.gallery__hide_16jgu {
|
|
20
20
|
transform: translateY(-96px);
|
|
21
21
|
}
|
|
22
|
-
.
|
|
23
|
-
.
|
|
22
|
+
.gallery__leftButton_16jgu,
|
|
23
|
+
.gallery__rightButtons_16jgu {
|
|
24
24
|
display: flex;
|
|
25
25
|
align-items: center;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.gallery__description_16jgu {
|
|
28
28
|
position: absolute;
|
|
29
29
|
left: 50%;
|
|
30
30
|
transform: translateX(-50%);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"headerMobile":"
|
|
5
|
+
var styles = {"headerMobile":"gallery__headerMobile_16jgu","video":"gallery__video_16jgu","hide":"gallery__hide_16jgu","rightButtons":"gallery__rightButtons_16jgu","description":"gallery__description_16jgu"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
:root {
|
|
13
13
|
--focus-color: var(--color-light-status-info);
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.gallery__component_lgpzj {
|
|
16
16
|
display: flex;
|
|
17
17
|
z-index: 3;
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
transition: border 0.15s ease-in-out;
|
|
20
20
|
outline: none;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.gallery__component_lgpzj .gallery__image_lgpzj {
|
|
23
23
|
opacity: 0.3;
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
.gallery__component_lgpzj.gallery__mobile_lgpzj {
|
|
26
26
|
padding: 0;
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.gallery__active_lgpzj > .gallery__image_lgpzj {
|
|
29
29
|
opacity: 1;
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.gallery__preview_lgpzj {
|
|
32
32
|
width: 56px;
|
|
33
33
|
height: 56px;
|
|
34
34
|
flex-shrink: 0;
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
-moz-user-select: none;
|
|
39
39
|
user-select: none;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.gallery__preview_lgpzj.gallery__mobile_lgpzj {
|
|
42
42
|
width: 46px;
|
|
43
43
|
height: 46px;
|
|
44
44
|
border-radius: var(--border-radius-8);
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.gallery__image_lgpzj {
|
|
47
47
|
transition: opacity 0.15s ease-in-out;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.gallery__image_lgpzj > img {
|
|
50
50
|
display: block;
|
|
51
51
|
width: 100%;
|
|
52
52
|
height: 100%;
|
|
@@ -56,36 +56,36 @@
|
|
|
56
56
|
overflow: clip;
|
|
57
57
|
overflow-clip-margin: border-box;
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
.gallery__image_lgpzj:hover {
|
|
60
60
|
opacity: 0.7;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.gallery__loading_lgpzj {
|
|
63
63
|
background-color: var(--color-static-neutral-100-inverted);
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
.gallery__loading_lgpzj .gallery__active_lgpzj {
|
|
66
66
|
background-color: var(--color-static-neutral-300-inverted);
|
|
67
67
|
}
|
|
68
|
-
.
|
|
68
|
+
.gallery__brokenImageWrapper_lgpzj {
|
|
69
69
|
display: flex;
|
|
70
70
|
justify-content: center;
|
|
71
71
|
align-items: center;
|
|
72
72
|
background-color: var(--color-static-neutral-300-inverted);
|
|
73
73
|
opacity: 0.3;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
.gallery__brokenImageWrapper_lgpzj.gallery__active_lgpzj {
|
|
76
76
|
opacity: 1;
|
|
77
77
|
}
|
|
78
|
-
.
|
|
78
|
+
.gallery__brokenIcon_lgpzj {
|
|
79
79
|
width: 40px;
|
|
80
80
|
height: 40px;
|
|
81
81
|
}
|
|
82
|
-
.
|
|
82
|
+
.gallery__focused_lgpzj {
|
|
83
83
|
outline: 2px solid var(--focus-color);
|
|
84
84
|
outline-offset: 2px;
|
|
85
85
|
}
|
|
86
|
-
.
|
|
86
|
+
.gallery__canvasPreview_lgpzj {
|
|
87
87
|
border-radius: var(--border-radius-12);
|
|
88
88
|
}
|
|
89
|
-
.
|
|
89
|
+
.gallery__canvasPreview_lgpzj.gallery__mobile_lgpzj {
|
|
90
90
|
border-radius: var(--border-radius-8);
|
|
91
91
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"gallery__component_lgpzj","image":"gallery__image_lgpzj","mobile":"gallery__mobile_lgpzj","active":"gallery__active_lgpzj","preview":"gallery__preview_lgpzj","loading":"gallery__loading_lgpzj","brokenImageWrapper":"gallery__brokenImageWrapper_lgpzj","brokenIcon":"gallery__brokenIcon_lgpzj","focused":"gallery__focused_lgpzj","canvasPreview":"gallery__canvasPreview_lgpzj"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
|
-
var
|
|
8
|
+
var modules = require('swiper/modules');
|
|
9
9
|
var react = require('swiper/react');
|
|
10
10
|
var hooks$1 = require('@alfalab/hooks');
|
|
11
11
|
var ChevronBackHeavyMIcon = require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
@@ -15,16 +15,13 @@ var utils = require('../../utils/utils.js');
|
|
|
15
15
|
var constants = require('../../utils/constants.js');
|
|
16
16
|
var hooks = require('./hooks.js');
|
|
17
17
|
var slide = require('./slide.js');
|
|
18
|
-
require('swiper/swiper.min.css');
|
|
19
18
|
var index_module = require('./index.module.css.js');
|
|
20
19
|
|
|
21
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
22
21
|
|
|
23
22
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
24
23
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
25
|
-
var SwiperCore__default = /*#__PURE__*/_interopDefaultCompat(SwiperCore);
|
|
26
24
|
|
|
27
|
-
SwiperCore__default.default.use([SwiperCore.EffectFade, SwiperCore.A11y, SwiperCore.Controller]);
|
|
28
25
|
var ImageViewer = function () {
|
|
29
26
|
var _a, _b, _c;
|
|
30
27
|
var _d = React.useContext(context.GalleryContext), images = _d.images, imagesMeta = _d.imagesMeta, fullScreen = _d.fullScreen, currentSlideIndex = _d.currentSlideIndex, initialSlide = _d.initialSlide, setCurrentSlideIndex = _d.setCurrentSlideIndex, getSwiper = _d.getSwiper, setSwiper = _d.setSwiper, slidePrev = _d.slidePrev, slideNext = _d.slideNext, getCurrentImage = _d.getCurrentImage;
|
|
@@ -64,6 +61,7 @@ var ImageViewer = function () {
|
|
|
64
61
|
_a[index_module.mobile] = isMobile,
|
|
65
62
|
_a[index_module.mobileVideo] = isMobile && utils.isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
|
|
66
63
|
_a)),
|
|
64
|
+
modules: [modules.A11y, modules.Controller],
|
|
67
65
|
controller: { control: swiper },
|
|
68
66
|
a11y: {
|
|
69
67
|
slideRole: 'img',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/image-viewer/component.tsx"],"sourcesContent":["import React, { type FC, type KeyboardEventHandler, useCallback, useContext, useMemo } from 'react';\nimport cn from 'classnames';\nimport SwiperCore, { A11y, Controller, EffectFade } from 'swiper';\nimport { Swiper, SwiperSlide } from 'swiper/react';\n\nimport { useFocus } from '@alfalab/hooks';\nimport { ChevronBackHeavyMIcon } from '@alfalab/icons-glyph/ChevronBackHeavyMIcon';\nimport { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';\n\nimport { GalleryContext } from '../../context';\nimport { getImageAlt, getImageKey, isVideo, TestIds } from '../../utils';\n\nimport { useHandleImageViewer } from './hooks';\nimport { Slide } from './slide';\n\nimport 'swiper/swiper.min.css';\nimport styles from './index.module.css';\n\nSwiperCore.use([EffectFade, A11y, Controller]);\n\nexport const ImageViewer: FC = () => {\n const {\n images,\n imagesMeta,\n fullScreen,\n currentSlideIndex,\n initialSlide,\n setCurrentSlideIndex,\n getSwiper,\n setSwiper,\n slidePrev,\n slideNext,\n getCurrentImage,\n } = useContext(GalleryContext);\n\n const { handleWrapperClick, isMobile, rightArrowRef, leftArrowRef } = useHandleImageViewer();\n\n const [leftArrowFocused] = useFocus(leftArrowRef, 'keyboard');\n const [rightArrowFocused] = useFocus(rightArrowRef, 'keyboard');\n\n const swiper = getSwiper();\n const currentImage = getCurrentImage();\n\n const handleSlideChange = useCallback(() => {\n setCurrentSlideIndex?.(swiper?.activeIndex ?? initialSlide);\n }, [setCurrentSlideIndex, swiper, initialSlide]);\n\n const handlePrevClick = () => {\n slidePrev();\n };\n\n const handleNextClick = () => {\n slideNext();\n };\n\n const handleArrowLeftKeyDown: KeyboardEventHandler = (event) => {\n if (event.key === 'Enter') {\n slidePrev();\n }\n };\n\n const handleArrowRightKeyDown: KeyboardEventHandler = (event) => {\n if (event.key === 'Enter') {\n slideNext();\n }\n };\n\n const swiperProps = useMemo<Swiper>(\n () => ({\n slidesPerView: 1,\n effect: 'slide',\n className: cn(styles.swiper, {\n [styles.hidden]: fullScreen && !isVideo(currentImage?.src),\n [styles.fullScreenVideo]: fullScreen && isVideo(currentImage?.src),\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n }),\n controller: { control: swiper },\n a11y: {\n slideRole: 'img',\n },\n initialSlide,\n simulateTouch: false,\n zoom: { maxRatio: 4, minRatio: 1, toggle: true },\n onSwiper: setSwiper,\n onSlideChange: handleSlideChange,\n lazy: { loadPrevNext: true },\n }),\n [\n fullScreen,\n currentImage?.src,\n isMobile,\n swiper,\n initialSlide,\n setSwiper,\n handleSlideChange,\n ],\n );\n\n const showControls = !fullScreen && !isMobile && !!images.length;\n\n const swiperWidth = swiper?.width || 1;\n const swiperHeight = swiper?.height || swiper?.width || 1;\n\n const swiperAspectRatio = swiperWidth / swiperHeight;\n\n return (\n <div\n className={cn(styles.component, {\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n })}\n aria-hidden={true}\n onClick={handleWrapperClick}\n >\n {showControls && (\n <div\n className={cn(styles.arrow, {\n [styles.focused]: leftArrowFocused,\n })}\n onClick={handlePrevClick}\n role='button'\n onKeyDown={handleArrowLeftKeyDown}\n tabIndex={0}\n ref={leftArrowRef}\n aria-label='Предыдущее изображение'\n data-test-id={TestIds.PREV_SLIDE_BUTTON}\n >\n <ChevronBackHeavyMIcon />\n </div>\n )}\n\n {fullScreen && !isVideo(currentImage?.src) && (\n <img\n src={currentImage?.src}\n alt={currentImage ? getImageAlt(currentImage, currentSlideIndex) : ''}\n className={styles.fullScreenImage}\n />\n )}\n\n <Swiper {...swiperProps}>\n {images.map((image, index) => {\n const meta = imagesMeta[index];\n\n const imageWidth = meta?.width || 1;\n const imageHeight = meta?.height || 1;\n\n const imageAspectRatio = imageWidth / imageHeight;\n\n const slideVisible = index === currentSlideIndex;\n\n return (\n <SwiperSlide\n key={getImageKey(image, index)}\n style={{\n pointerEvents: slideVisible ? 'auto' : 'none',\n transitionProperty: 'opacity',\n }}\n >\n {({ isActive }) => (\n <Slide\n isActive={isActive}\n containerAspectRatio={swiperAspectRatio}\n image={image}\n containerHeight={swiperHeight}\n meta={meta}\n index={index}\n imageAspectRatio={imageAspectRatio}\n slideVisible={slideVisible}\n />\n )}\n </SwiperSlide>\n );\n })}\n </Swiper>\n\n {showControls && (\n <div\n className={cn(styles.arrow, {\n [styles.focused]: rightArrowFocused,\n })}\n onClick={handleNextClick}\n role='button'\n onKeyDown={handleArrowRightKeyDown}\n tabIndex={0}\n ref={rightArrowRef}\n aria-label='Следующее изображение'\n data-test-id={TestIds.NEXT_SLIDE_BUTTON}\n >\n <ChevronForwardHeavyMIcon />\n </div>\n )}\n </div>\n );\n};\n"],"names":["SwiperCore","EffectFade","A11y","Controller","useContext","GalleryContext","useHandleImageViewer","useFocus","useCallback","useMemo","cn","styles","isVideo","React","TestIds","ChevronBackHeavyMIcon","getImageAlt","Swiper","__assign","SwiperSlide","getImageKey","Slide","ChevronForwardHeavyMIcon"],"mappings":";;;;;;;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S,EAAE,uBAAuB,EAClC,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,aAAa,gBACP,2HAAuB,EAAA,cAAA,EACpBG,iBAAO,CAAC,iBAAiB,EAAA;AAEvC,YAAAD,sBAAA,CAAA,aAAA,CAACS,iDAAwB,EAAG,IAAA,CAAA,CAC1B,CACT,CACC;AAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/image-viewer/component.tsx"],"sourcesContent":["import React, { type FC, type KeyboardEventHandler, useCallback, useContext, useMemo } from 'react';\nimport cn from 'classnames';\nimport { A11y, Controller } from 'swiper/modules';\nimport { Swiper, type SwiperProps, SwiperSlide } from 'swiper/react';\n\nimport { useFocus } from '@alfalab/hooks';\nimport { ChevronBackHeavyMIcon } from '@alfalab/icons-glyph/ChevronBackHeavyMIcon';\nimport { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';\n\nimport { GalleryContext } from '../../context';\nimport { getImageAlt, getImageKey, isVideo, TestIds } from '../../utils';\n\nimport { useHandleImageViewer } from './hooks';\nimport { Slide } from './slide';\n\nimport styles from './index.module.css';\n\nexport const ImageViewer: FC = () => {\n const {\n images,\n imagesMeta,\n fullScreen,\n currentSlideIndex,\n initialSlide,\n setCurrentSlideIndex,\n getSwiper,\n setSwiper,\n slidePrev,\n slideNext,\n getCurrentImage,\n } = useContext(GalleryContext);\n\n const { handleWrapperClick, isMobile, rightArrowRef, leftArrowRef } = useHandleImageViewer();\n\n const [leftArrowFocused] = useFocus(leftArrowRef, 'keyboard');\n const [rightArrowFocused] = useFocus(rightArrowRef, 'keyboard');\n\n const swiper = getSwiper();\n const currentImage = getCurrentImage();\n\n const handleSlideChange = useCallback(() => {\n setCurrentSlideIndex?.(swiper?.activeIndex ?? initialSlide);\n }, [setCurrentSlideIndex, swiper, initialSlide]);\n\n const handlePrevClick = () => {\n slidePrev();\n };\n\n const handleNextClick = () => {\n slideNext();\n };\n\n const handleArrowLeftKeyDown: KeyboardEventHandler = (event) => {\n if (event.key === 'Enter') {\n slidePrev();\n }\n };\n\n const handleArrowRightKeyDown: KeyboardEventHandler = (event) => {\n if (event.key === 'Enter') {\n slideNext();\n }\n };\n\n const swiperProps = useMemo<SwiperProps>(\n () => ({\n slidesPerView: 1,\n effect: 'slide',\n className: cn(styles.swiper, {\n [styles.hidden]: fullScreen && !isVideo(currentImage?.src),\n [styles.fullScreenVideo]: fullScreen && isVideo(currentImage?.src),\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n }),\n modules: [A11y, Controller],\n controller: { control: swiper },\n a11y: {\n slideRole: 'img',\n },\n initialSlide,\n simulateTouch: false,\n zoom: { maxRatio: 4, minRatio: 1, toggle: true },\n onSwiper: setSwiper,\n onSlideChange: handleSlideChange,\n lazy: { loadPrevNext: true },\n }),\n [\n fullScreen,\n currentImage?.src,\n isMobile,\n swiper,\n initialSlide,\n setSwiper,\n handleSlideChange,\n ],\n );\n\n const showControls = !fullScreen && !isMobile && !!images.length;\n\n const swiperWidth = swiper?.width || 1;\n const swiperHeight = swiper?.height || swiper?.width || 1;\n\n const swiperAspectRatio = swiperWidth / swiperHeight;\n\n return (\n <div\n className={cn(styles.component, {\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n })}\n aria-hidden={true}\n onClick={handleWrapperClick}\n >\n {showControls && (\n <div\n className={cn(styles.arrow, {\n [styles.focused]: leftArrowFocused,\n })}\n onClick={handlePrevClick}\n role='button'\n onKeyDown={handleArrowLeftKeyDown}\n tabIndex={0}\n ref={leftArrowRef}\n aria-label='Предыдущее изображение'\n data-test-id={TestIds.PREV_SLIDE_BUTTON}\n >\n <ChevronBackHeavyMIcon />\n </div>\n )}\n\n {fullScreen && !isVideo(currentImage?.src) && (\n <img\n src={currentImage?.src}\n alt={currentImage ? getImageAlt(currentImage, currentSlideIndex) : ''}\n className={styles.fullScreenImage}\n />\n )}\n\n <Swiper {...swiperProps}>\n {images.map((image, index) => {\n const meta = imagesMeta[index];\n\n const imageWidth = meta?.width || 1;\n const imageHeight = meta?.height || 1;\n\n const imageAspectRatio = imageWidth / imageHeight;\n\n const slideVisible = index === currentSlideIndex;\n\n return (\n <SwiperSlide\n key={getImageKey(image, index)}\n style={{\n pointerEvents: slideVisible ? 'auto' : 'none',\n transitionProperty: 'opacity',\n }}\n >\n {({ isActive }) => (\n <Slide\n isActive={isActive}\n containerAspectRatio={swiperAspectRatio}\n image={image}\n containerHeight={swiperHeight}\n meta={meta}\n index={index}\n imageAspectRatio={imageAspectRatio}\n slideVisible={slideVisible}\n />\n )}\n </SwiperSlide>\n );\n })}\n </Swiper>\n\n {showControls && (\n <div\n className={cn(styles.arrow, {\n [styles.focused]: rightArrowFocused,\n })}\n onClick={handleNextClick}\n role='button'\n onKeyDown={handleArrowRightKeyDown}\n tabIndex={0}\n ref={rightArrowRef}\n aria-label='Следующее изображение'\n data-test-id={TestIds.NEXT_SLIDE_BUTTON}\n >\n <ChevronForwardHeavyMIcon />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useContext","GalleryContext","useHandleImageViewer","useFocus","useCallback","useMemo","cn","styles","isVideo","A11y","Controller","React","TestIds","ChevronBackHeavyMIcon","getImageAlt","Swiper","__assign","SwiperSlide","getImageKey","Slide","ChevronForwardHeavyMIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiBa,IAAA,WAAW,GAAO,YAAA;;AACrB,IAAA,IAAA,KAYFA,gBAAU,CAACC,sBAAc,CAAC,EAX1B,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,UAAU,gBAAA,EACV,UAAU,gBAAA,EACV,iBAAiB,uBAAA,EACjB,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EACpB,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,SAAS,eAAA,EACT,SAAS,eAAA,EACT,eAA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A,EACR,GAAG,EAAEC,iBAAW,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9B,KAAK,EAAE;oBACH,aAAa,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM;AAC7C,oBAAA,kBAAkB,EAAE,SAAS;AAChC,iBAAA,EAAA,EAEA,UAAC,EAAY,EAAA;AAAV,gBAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA;AAAO,gBAAA,QACfP,sBAAC,CAAA,aAAA,CAAAQ,WAAK,EACF,EAAA,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAAE,iBAAiB,EACvC,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,YAAY,EAC7B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,GAC5B;aACL,CACS;AAEtB,SAAC,CAAC,CACG;QAER,YAAY,KACTR,sBACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEL,mBAAE,CAACC,YAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAACA,YAAM,CAAC,OAAO,CAAA,GAAG,iBAAiB;oBACrC,EACF,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,aAAa,gBACP,2HAAuB,EAAA,cAAA,EACpBK,iBAAO,CAAC,iBAAiB,EAAA;AAEvC,YAAAD,sBAAA,CAAA,aAAA,CAACS,iDAAwB,EAAG,IAAA,CAAA,CAC1B,CACT,CACC;AAEd;;;;"}
|
|
@@ -24,13 +24,74 @@
|
|
|
24
24
|
:root {
|
|
25
25
|
--focus-color: var(--color-light-status-info);
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.gallery__component_1t4uo {
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-grow: 1;
|
|
30
30
|
justify-content: center;
|
|
31
31
|
background-color: var(--color-static-neutral-0-inverted);
|
|
32
|
+
.swiper {
|
|
33
|
+
margin-left: auto;
|
|
34
|
+
margin-right: auto;
|
|
35
|
+
position: relative;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
list-style: none;
|
|
38
|
+
padding: 0;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
display: block;
|
|
41
|
+
}
|
|
42
|
+
.swiper-wrapper {
|
|
43
|
+
position: relative;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
transition-property: transform;
|
|
49
|
+
transition-timing-function: var(--swiper-wrapper-transition-timing-function, ease);
|
|
50
|
+
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
|
51
|
+
box-sizing: content-box;
|
|
52
|
+
}
|
|
53
|
+
.swiper-android .swiper-slide,
|
|
54
|
+
.swiper-ios .swiper-slide,
|
|
55
|
+
.swiper-wrapper {
|
|
56
|
+
transform: translate3d(0, 0, 0);
|
|
57
|
+
}
|
|
58
|
+
.swiper-horizontal {
|
|
59
|
+
touch-action: pan-y;
|
|
60
|
+
}
|
|
61
|
+
.swiper-slide {
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
position: relative;
|
|
66
|
+
transition-property: transform;
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
.swiper-slide-invisible-blank {
|
|
70
|
+
visibility: hidden;
|
|
71
|
+
}
|
|
72
|
+
.swiper-autoheight,
|
|
73
|
+
.swiper-autoheight .swiper-slide {
|
|
74
|
+
height: auto;
|
|
75
|
+
}
|
|
76
|
+
.swiper-autoheight .swiper-wrapper {
|
|
77
|
+
align-items: flex-start;
|
|
78
|
+
transition-property: transform, height;
|
|
79
|
+
}
|
|
80
|
+
.swiper-backface-hidden .swiper-slide {
|
|
81
|
+
transform: translateZ(0);
|
|
82
|
+
-webkit-backface-visibility: hidden;
|
|
83
|
+
backface-visibility: hidden;
|
|
84
|
+
}
|
|
85
|
+
.swiper .swiper-notification {
|
|
86
|
+
position: absolute;
|
|
87
|
+
left: 0;
|
|
88
|
+
top: 0;
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
opacity: 0;
|
|
91
|
+
z-index: -1000;
|
|
92
|
+
}
|
|
32
93
|
}
|
|
33
|
-
.
|
|
94
|
+
.gallery__swiper_1t4uo {
|
|
34
95
|
display: flex;
|
|
35
96
|
width: 100%;
|
|
36
97
|
height: 100%;
|
|
@@ -38,13 +99,13 @@
|
|
|
38
99
|
padding: var(--gap-32) var(--gap-16);
|
|
39
100
|
box-sizing: border-box;
|
|
40
101
|
}
|
|
41
|
-
.
|
|
102
|
+
.gallery__swiper_1t4uo.gallery__mobile_1t4uo {
|
|
42
103
|
max-height: calc(100vh - 210px);
|
|
43
104
|
}
|
|
44
|
-
.
|
|
105
|
+
.gallery__swiper_1t4uo.gallery__mobileVideo_1t4uo {
|
|
45
106
|
max-height: 100vh;
|
|
46
107
|
}
|
|
47
|
-
.
|
|
108
|
+
.gallery__singleSlideContainer_1t4uo {
|
|
48
109
|
display: flex;
|
|
49
110
|
width: 100%;
|
|
50
111
|
height: 100%;
|
|
@@ -53,17 +114,17 @@
|
|
|
53
114
|
padding: var(--gap-32);
|
|
54
115
|
box-sizing: border-box;
|
|
55
116
|
}
|
|
56
|
-
.
|
|
117
|
+
.gallery__singleSlideContainer_1t4uo.gallery__mobile_1t4uo {
|
|
57
118
|
max-height: calc(100vh - 174px);
|
|
58
119
|
padding: 0;
|
|
59
120
|
}
|
|
60
|
-
.
|
|
121
|
+
.gallery__singleSlideContainer_1t4uo.gallery__mobileVideo_1t4uo {
|
|
61
122
|
max-height: 100vh;
|
|
62
123
|
}
|
|
63
|
-
.
|
|
124
|
+
.gallery__hidden_1t4uo {
|
|
64
125
|
display: none;
|
|
65
126
|
}
|
|
66
|
-
.
|
|
127
|
+
.gallery__slide_1t4uo {
|
|
67
128
|
position: relative;
|
|
68
129
|
display: flex;
|
|
69
130
|
justify-content: center;
|
|
@@ -71,15 +132,15 @@
|
|
|
71
132
|
width: 100%;
|
|
72
133
|
height: 100%;
|
|
73
134
|
}
|
|
74
|
-
.
|
|
135
|
+
.gallery__slideLoading_1t4uo {
|
|
75
136
|
background-color: var(--color-static-neutral-translucent-100-inverted);
|
|
76
137
|
border-radius: var(--border-radius-8);
|
|
77
138
|
}
|
|
78
|
-
.
|
|
139
|
+
.gallery__spinner_1t4uo {
|
|
79
140
|
position: absolute;
|
|
80
141
|
color: var(--color-static-neutral-translucent-1300-inverted);
|
|
81
142
|
}
|
|
82
|
-
.
|
|
143
|
+
.gallery__image_1t4uo {
|
|
83
144
|
width: 0;
|
|
84
145
|
height: 0;
|
|
85
146
|
-webkit-user-select: none;
|
|
@@ -87,10 +148,10 @@
|
|
|
87
148
|
user-select: none;
|
|
88
149
|
border-radius: var(--border-radius-8);
|
|
89
150
|
}
|
|
90
|
-
.
|
|
151
|
+
.gallery__image_1t4uo.gallery__mobile_1t4uo {
|
|
91
152
|
border-radius: var(--border-radius-0);
|
|
92
153
|
}
|
|
93
|
-
.
|
|
154
|
+
.gallery__smallImage_1t4uo {
|
|
94
155
|
position: relative;
|
|
95
156
|
width: auto;
|
|
96
157
|
height: auto;
|
|
@@ -98,15 +159,15 @@
|
|
|
98
159
|
-moz-user-select: none;
|
|
99
160
|
user-select: none;
|
|
100
161
|
}
|
|
101
|
-
.
|
|
162
|
+
.gallery__verticalImageFit_1t4uo {
|
|
102
163
|
width: auto;
|
|
103
164
|
height: 100%;
|
|
104
165
|
}
|
|
105
|
-
.
|
|
166
|
+
.gallery__horizontalImageFit_1t4uo {
|
|
106
167
|
width: 100%;
|
|
107
168
|
height: auto;
|
|
108
169
|
}
|
|
109
|
-
.
|
|
170
|
+
.gallery__arrow_1t4uo {
|
|
110
171
|
display: flex;
|
|
111
172
|
flex-direction: column;
|
|
112
173
|
justify-content: center;
|
|
@@ -119,17 +180,17 @@
|
|
|
119
180
|
transition: background-color 0.15s ease-in-out;
|
|
120
181
|
outline: none;
|
|
121
182
|
}
|
|
122
|
-
.
|
|
183
|
+
.gallery__arrow_1t4uo:hover {
|
|
123
184
|
background-color: var(--color-static-neutral-0-inverted-hover);
|
|
124
185
|
}
|
|
125
|
-
.
|
|
186
|
+
.gallery__arrow_1t4uo:active {
|
|
126
187
|
background-color: var(--color-static-neutral-0-inverted-press);
|
|
127
188
|
}
|
|
128
|
-
.
|
|
189
|
+
.gallery__focused_1t4uo {
|
|
129
190
|
outline: 2px solid var(--focus-color);
|
|
130
191
|
outline-offset: 2px;
|
|
131
192
|
}
|
|
132
|
-
.
|
|
193
|
+
.gallery__placeholder_1t4uo {
|
|
133
194
|
display: flex;
|
|
134
195
|
justify-content: center;
|
|
135
196
|
align-items: center;
|
|
@@ -138,7 +199,7 @@
|
|
|
138
199
|
border-radius: var(--border-radius-8);
|
|
139
200
|
background-color: var(--color-static-neutral-300-inverted);
|
|
140
201
|
}
|
|
141
|
-
.
|
|
202
|
+
.gallery__brokenImgWrapper_1t4uo {
|
|
142
203
|
position: relative;
|
|
143
204
|
display: flex;
|
|
144
205
|
flex-direction: column;
|
|
@@ -146,17 +207,17 @@
|
|
|
146
207
|
width: 150px;
|
|
147
208
|
text-align: center;
|
|
148
209
|
}
|
|
149
|
-
.
|
|
210
|
+
.gallery__brokenImgIcon_1t4uo {
|
|
150
211
|
width: 80px;
|
|
151
212
|
height: 80px;
|
|
152
213
|
margin-bottom: var(--gap-4);
|
|
153
214
|
}
|
|
154
|
-
.
|
|
215
|
+
.gallery__fullScreenImage_1t4uo {
|
|
155
216
|
width: 100%;
|
|
156
217
|
height: auto;
|
|
157
218
|
background-color: var(--color-light-base-bg-primary);
|
|
158
219
|
}
|
|
159
|
-
.
|
|
220
|
+
.gallery__fullScreenVideo_1t4uo {
|
|
160
221
|
width: calc(100% - 192px);
|
|
161
222
|
max-height: calc(100vh - 82px);
|
|
162
223
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"gallery__component_1t4uo","swiper":"gallery__swiper_1t4uo","mobile":"gallery__mobile_1t4uo","mobileVideo":"gallery__mobileVideo_1t4uo","singleSlideContainer":"gallery__singleSlideContainer_1t4uo","hidden":"gallery__hidden_1t4uo","slide":"gallery__slide_1t4uo","slideLoading":"gallery__slideLoading_1t4uo","spinner":"gallery__spinner_1t4uo","image":"gallery__image_1t4uo","smallImage":"gallery__smallImage_1t4uo","verticalImageFit":"gallery__verticalImageFit_1t4uo","horizontalImageFit":"gallery__horizontalImageFit_1t4uo","arrow":"gallery__arrow_1t4uo","focused":"gallery__focused_1t4uo","placeholder":"gallery__placeholder_1t4uo","brokenImgWrapper":"gallery__brokenImgWrapper_1t4uo","brokenImgIcon":"gallery__brokenImgIcon_1t4uo","fullScreenImage":"gallery__fullScreenImage_1t4uo","fullScreenVideo":"gallery__fullScreenVideo_1t4uo"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/image-viewer/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n background-color: var(--color-static-neutral-0-inverted);\n}\n\n.swiper {\n display: flex;\n width: 100%;\n height: 100%;\n\n /* 168px - высота хэдера и футера */\n max-height: calc(100vh - 168px);\n padding: var(--gap-32) var(--gap-16);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 210px);\n }\n\n &.mobileVideo {\n max-height: 100vh;\n }\n}\n\n.singleSlideContainer {\n display: flex;\n width: 100%;\n height: 100%;\n\n max-height: calc(100vh - 80px);\n padding: var(--gap-32);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 174px);\n padding: 0;\n }\n\n &.mobileVideo {\n max-height: 100vh;\n }\n}\n\n.hidden {\n display: none;\n}\n\n.slide {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n\n.slideLoading {\n background-color: var(--color-static-neutral-translucent-100-inverted);\n border-radius: var(--border-radius-8);\n}\n\n.spinner {\n position: absolute;\n color: var(--color-static-neutral-translucent-1300-inverted);\n}\n\n.image {\n width: 0;\n height: 0;\n user-select: none;\n border-radius: var(--border-radius-8);\n\n &.mobile {\n border-radius: var(--border-radius-0);\n }\n}\n\n.smallImage {\n position: relative;\n width: auto;\n height: auto;\n user-select: none;\n}\n\n.verticalImageFit {\n width: auto;\n height: 100%;\n}\n\n.horizontalImageFit {\n width: 100%;\n height: auto;\n}\n\n.arrow {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 96px;\n height: 100%;\n cursor: pointer;\n color: var(--color-static-neutral-translucent-1300-inverted);\n transition: background-color 0.15s ease-in-out;\n outline: none;\n\n &:hover {\n background-color: var(--color-static-neutral-0-inverted-hover);\n }\n\n &:active {\n background-color: var(--color-static-neutral-0-inverted-press);\n }\n}\n\n.focused {\n @mixin focus-outline;\n}\n\n.placeholder {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n border-radius: var(--border-radius-8);\n background-color: var(--color-static-neutral-300-inverted);\n}\n\n.brokenImgWrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 150px;\n text-align: center;\n}\n\n.brokenImgIcon {\n width: 80px;\n height: 80px;\n margin-bottom: var(--gap-4);\n}\n\n.fullScreenImage {\n width: 100%;\n height: auto;\n background-color: var(--color-light-base-bg-primary);\n}\n\n.fullScreenVideo {\n width: calc(100% - 192px);\n max-height: calc(100vh - 82px);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,0BAA0B,CAAC,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,qCAAqC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,sBAAsB,CAAC,cAAc,CAAC,6BAA6B,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,sBAAsB,CAAC,YAAY,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,oBAAoB,CAAC,mCAAmC,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC,wBAAwB,CAAC,aAAa,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,eAAe,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,iBAAiB,CAAC,gCAAgC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/image-viewer/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n background-color: var(--color-static-neutral-0-inverted);\n\n /* swiper/swiper.css; */\n :global(.swiper) {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n z-index: 1;\n display: block;\n }\n :global(.swiper-wrapper) {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n }\n :global(.swiper-android) :global(.swiper-slide),\n :global(.swiper-ios) :global(.swiper-slide),\n :global(.swiper-wrapper) {\n transform: translate3d(0, 0, 0);\n }\n :global(.swiper-horizontal) {\n touch-action: pan-y;\n }\n :global(.swiper-slide) {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n }\n :global(.swiper-slide-invisible-blank) {\n visibility: hidden;\n }\n :global(.swiper-autoheight),\n :global(.swiper-autoheight) :global(.swiper-slide) {\n height: auto;\n }\n :global(.swiper-autoheight) :global(.swiper-wrapper) {\n align-items: flex-start;\n transition-property: transform, height;\n }\n :global(.swiper-backface-hidden) :global(.swiper-slide) {\n transform: translateZ(0);\n backface-visibility: hidden;\n }\n\n /* swiper/modules/a11y.css */\n :global(.swiper) :global(.swiper-notification) {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n opacity: 0;\n z-index: -1000;\n }\n}\n\n.swiper {\n display: flex;\n width: 100%;\n height: 100%;\n\n /* 168px - высота хэдера и футера */\n max-height: calc(100vh - 168px);\n padding: var(--gap-32) var(--gap-16);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 210px);\n }\n\n &.mobileVideo {\n max-height: 100vh;\n }\n}\n\n.singleSlideContainer {\n display: flex;\n width: 100%;\n height: 100%;\n\n max-height: calc(100vh - 80px);\n padding: var(--gap-32);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 174px);\n padding: 0;\n }\n\n &.mobileVideo {\n max-height: 100vh;\n }\n}\n\n.hidden {\n display: none;\n}\n\n.slide {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n}\n\n.slideLoading {\n background-color: var(--color-static-neutral-translucent-100-inverted);\n border-radius: var(--border-radius-8);\n}\n\n.spinner {\n position: absolute;\n color: var(--color-static-neutral-translucent-1300-inverted);\n}\n\n.image {\n width: 0;\n height: 0;\n user-select: none;\n border-radius: var(--border-radius-8);\n\n &.mobile {\n border-radius: var(--border-radius-0);\n }\n}\n\n.smallImage {\n position: relative;\n width: auto;\n height: auto;\n user-select: none;\n}\n\n.verticalImageFit {\n width: auto;\n height: 100%;\n}\n\n.horizontalImageFit {\n width: 100%;\n height: auto;\n}\n\n.arrow {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 96px;\n height: 100%;\n cursor: pointer;\n color: var(--color-static-neutral-translucent-1300-inverted);\n transition: background-color 0.15s ease-in-out;\n outline: none;\n\n &:hover {\n background-color: var(--color-static-neutral-0-inverted-hover);\n }\n\n &:active {\n background-color: var(--color-static-neutral-0-inverted-press);\n }\n}\n\n.focused {\n @mixin focus-outline;\n}\n\n.placeholder {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n border-radius: var(--border-radius-8);\n background-color: var(--color-static-neutral-300-inverted);\n}\n\n.brokenImgWrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 150px;\n text-align: center;\n}\n\n.brokenImgIcon {\n width: 80px;\n height: 80px;\n margin-bottom: var(--gap-4);\n}\n\n.fullScreenImage {\n width: 100%;\n height: auto;\n background-color: var(--color-light-base-bg-primary);\n}\n\n.fullScreenVideo {\n width: calc(100% - 192px);\n max-height: calc(100vh - 82px);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,0BAA0B,CAAC,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,qCAAqC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,sBAAsB,CAAC,cAAc,CAAC,6BAA6B,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,sBAAsB,CAAC,YAAY,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,oBAAoB,CAAC,mCAAmC,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC,wBAAwB,CAAC,aAAa,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,eAAe,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,iBAAiB,CAAC,gCAAgC,CAAC;;;;"}
|