@alfalab/core-components-gallery 5.0.9 → 5.0.11
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 +12 -11
- package/components/header/Component.js +4 -4
- package/components/header/buttons.js +3 -3
- package/components/header/index.css +3 -3
- package/components/header/index.js +3 -3
- package/components/header-info-block/Component.js +1 -1
- package/components/header-info-block/index.css +5 -5
- package/components/image-preview/Component.js +2 -2
- package/components/image-preview/index.css +12 -12
- package/components/image-preview/index.js +1 -1
- package/components/image-viewer/component.js +9 -8
- package/components/image-viewer/index.css +19 -19
- package/components/image-viewer/index.js +6 -6
- package/components/image-viewer/slide.js +2 -2
- package/components/index.js +10 -10
- package/components/navigation-bar/Component.js +4 -4
- package/components/navigation-bar/index.css +6 -6
- package/components/navigation-bar/index.js +3 -3
- package/context.js +1 -0
- package/cssm/Component.js +10 -9
- package/cssm/components/header/Component.js +3 -3
- package/cssm/components/header/buttons.js +3 -3
- package/cssm/components/header/index.js +3 -3
- package/cssm/components/image-preview/Component.js +1 -1
- package/cssm/components/image-preview/index.js +1 -1
- package/cssm/components/image-viewer/component.js +8 -7
- package/cssm/components/image-viewer/index.js +5 -5
- package/cssm/components/image-viewer/slide.d.ts +1 -1
- package/cssm/components/image-viewer/slide.js +9 -9
- package/cssm/components/index.js +9 -9
- package/cssm/components/navigation-bar/Component.js +3 -3
- package/cssm/components/navigation-bar/index.js +3 -3
- package/cssm/context.js +1 -0
- package/cssm/index.js +9 -9
- package/cssm/{tslib.es6-ce870b46.d.ts → tslib.es6-9682e485.d.ts} +8 -4
- package/{tslib.es6-c2abf308.js → cssm/tslib.es6-9682e485.js} +1 -1
- package/esm/Component.js +12 -11
- package/esm/components/header/Component.js +4 -4
- package/esm/components/header/buttons.js +3 -3
- package/esm/components/header/index.css +3 -3
- package/esm/components/header/index.js +3 -3
- package/esm/components/header-info-block/Component.js +1 -1
- package/esm/components/header-info-block/index.css +5 -5
- package/esm/components/image-preview/Component.js +2 -2
- package/esm/components/image-preview/index.css +12 -12
- package/esm/components/image-preview/index.js +1 -1
- package/esm/components/image-viewer/component.js +8 -7
- package/esm/components/image-viewer/index.css +19 -19
- package/esm/components/image-viewer/index.js +6 -6
- package/esm/components/image-viewer/slide.js +2 -2
- package/esm/components/index.js +10 -10
- package/esm/components/navigation-bar/Component.js +4 -4
- package/esm/components/navigation-bar/index.css +6 -6
- package/esm/components/navigation-bar/index.js +3 -3
- package/esm/context.js +1 -0
- package/esm/index.css +3 -3
- package/esm/index.js +10 -10
- package/{modern/slide-a0f0e8b2.d.ts → esm/slide-375cc978.d.ts} +1 -1
- package/esm/{slide-efb51eab.js → slide-375cc978.js} +10 -10
- package/{tslib.es6-c2abf308.d.ts → esm/tslib.es6-99e5e7fb.d.ts} +8 -4
- package/esm/{tslib.es6-678e6760.js → tslib.es6-99e5e7fb.js} +1 -1
- package/index.css +3 -3
- package/index.js +10 -10
- package/modern/Component.js +11 -10
- package/modern/components/header/Component.js +3 -3
- package/modern/components/header/buttons.js +6 -6
- package/modern/components/header/index.css +3 -3
- package/modern/components/header/index.js +2 -2
- package/modern/components/header-info-block/Component.js +1 -1
- package/modern/components/header-info-block/index.css +5 -5
- package/modern/components/image-preview/Component.js +2 -2
- package/modern/components/image-preview/index.css +12 -12
- package/modern/components/image-preview/index.js +1 -1
- package/modern/components/image-viewer/component.js +6 -6
- package/modern/components/image-viewer/index.css +19 -19
- package/modern/components/image-viewer/index.js +5 -5
- package/modern/components/image-viewer/slide.js +2 -2
- package/modern/components/index.js +9 -9
- package/modern/components/navigation-bar/Component.js +4 -4
- package/modern/components/navigation-bar/index.css +6 -6
- package/modern/components/navigation-bar/index.js +3 -3
- package/modern/context.js +1 -0
- package/modern/index.css +3 -3
- package/modern/index.js +9 -9
- package/{slide-b6458c03.d.ts → modern/slide-67d14d82.d.ts} +1 -1
- package/modern/{slide-a0f0e8b2.js → slide-67d14d82.js} +9 -9
- package/modern/utils/utils.js +1 -3
- package/package.json +4 -4
- package/{esm/slide-efb51eab.d.ts → slide-f51d1782.d.ts} +1 -1
- package/{slide-b6458c03.js → slide-f51d1782.js} +10 -10
- package/{esm/tslib.es6-678e6760.d.ts → tslib.es6-aa7419db.d.ts} +8 -4
- package/{cssm/tslib.es6-ce870b46.js → tslib.es6-aa7419db.js} +1 -1
package/Component.js
CHANGED
|
@@ -4,39 +4,39 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
7
|
-
require('classnames');
|
|
8
|
-
require('@alfalab/hooks');
|
|
9
7
|
var context = require('./context.js');
|
|
10
|
-
require('./components/image-preview/Component.js');
|
|
11
|
-
var components_navigationBar_Component = require('./components/navigation-bar/Component.js');
|
|
12
8
|
require('./utils/split-filename.js');
|
|
13
9
|
require('./utils/utils.js');
|
|
14
10
|
require('./utils/constants.js');
|
|
11
|
+
require('classnames');
|
|
12
|
+
require('@alfalab/hooks');
|
|
13
|
+
require('./components/image-preview/Component.js');
|
|
14
|
+
var components_navigationBar_Component = require('./components/navigation-bar/Component.js');
|
|
15
15
|
require('@alfalab/core-components-typography');
|
|
16
16
|
require('./components/header-info-block/Component.js');
|
|
17
|
-
require('./tslib.es6-
|
|
17
|
+
require('./tslib.es6-aa7419db.js');
|
|
18
18
|
require('@alfalab/core-components-icon-button');
|
|
19
19
|
require('@alfalab/core-components-tooltip');
|
|
20
|
-
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
21
|
-
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
22
20
|
require('@alfalab/icons-glyph/ArrowsInwardMIcon');
|
|
21
|
+
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
23
22
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
23
|
+
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
24
24
|
require('./components/header/buttons.js');
|
|
25
25
|
var components_header_Component = require('./components/header/Component.js');
|
|
26
|
+
require('element-closest');
|
|
26
27
|
require('swiper');
|
|
27
28
|
require('swiper/react');
|
|
28
|
-
require('element-closest');
|
|
29
|
-
require('swiper/swiper.min.css');
|
|
30
29
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
31
30
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
32
|
-
require('./slide-
|
|
31
|
+
require('./slide-f51d1782.js');
|
|
32
|
+
require('swiper/swiper.min.css');
|
|
33
33
|
var components_imageViewer_component = require('./components/image-viewer/component.js');
|
|
34
34
|
|
|
35
35
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
36
36
|
|
|
37
37
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
38
|
|
|
39
|
-
var styles = {"container":"
|
|
39
|
+
var styles = {"container":"gallery__container_18u5o","modal":"gallery__modal_18u5o"};
|
|
40
40
|
require('./index.css')
|
|
41
41
|
|
|
42
42
|
var Backdrop = function () { return null; };
|
|
@@ -108,6 +108,7 @@ var Gallery = function (_a) {
|
|
|
108
108
|
}, [handleKeyDown]);
|
|
109
109
|
var singleSlide = images.length === 1;
|
|
110
110
|
var showNavigationBar = !singleSlide && !fullScreen;
|
|
111
|
+
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
111
112
|
var galleryContext = {
|
|
112
113
|
singleSlide: singleSlide,
|
|
113
114
|
currentSlideIndex: currentSlideIndex,
|
|
@@ -9,20 +9,20 @@ var utils_utils = require('../../utils/utils.js');
|
|
|
9
9
|
var utils_constants = require('../../utils/constants.js');
|
|
10
10
|
require('@alfalab/core-components-typography');
|
|
11
11
|
var components_headerInfoBlock_Component = require('../header-info-block/Component.js');
|
|
12
|
-
require('../../tslib.es6-
|
|
12
|
+
require('../../tslib.es6-aa7419db.js');
|
|
13
13
|
require('@alfalab/core-components-icon-button');
|
|
14
14
|
require('@alfalab/core-components-tooltip');
|
|
15
|
-
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
16
|
-
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
17
15
|
require('@alfalab/icons-glyph/ArrowsInwardMIcon');
|
|
16
|
+
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
18
17
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
18
|
+
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
19
19
|
var components_header_buttons = require('./buttons.js');
|
|
20
20
|
|
|
21
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
22
|
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
24
|
|
|
25
|
-
var styles = {"header":"
|
|
25
|
+
var styles = {"header":"gallery__header_1ptl9","buttons":"gallery__buttons_1ptl9"};
|
|
26
26
|
require('./index.css')
|
|
27
27
|
|
|
28
28
|
var Header = function () {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
6
|
+
var tslib_es6 = require('../../tslib.es6-aa7419db.js');
|
|
7
7
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
8
8
|
var coreComponentsTooltip = require('@alfalab/core-components-tooltip');
|
|
9
|
-
var PointerDownMIcon = require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
10
|
-
var ArrowsOutwardMIcon = require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
11
9
|
var ArrowsInwardMIcon = require('@alfalab/icons-glyph/ArrowsInwardMIcon');
|
|
10
|
+
var ArrowsOutwardMIcon = require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
12
11
|
var CrossMIcon = require('@alfalab/icons-glyph/CrossMIcon');
|
|
12
|
+
var PointerDownMIcon = require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
13
13
|
|
|
14
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
15
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1c4ub */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-tertiary-inverted: #3c4c5d;
|
|
4
4
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
--gap-xl: 24px;
|
|
16
16
|
--gap-2xl: 32px;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.gallery__header_1ptl9 {
|
|
19
19
|
display: flex;
|
|
20
20
|
justify-content: space-between;
|
|
21
21
|
flex-shrink: 0;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
25
25
|
box-sizing: border-box;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.gallery__buttons_1ptl9 {
|
|
28
28
|
display: flex;
|
|
29
29
|
padding-left: var(--gap-2xl);
|
|
30
30
|
}
|
|
@@ -9,13 +9,13 @@ require('../../utils/utils.js');
|
|
|
9
9
|
require('../../utils/constants.js');
|
|
10
10
|
require('@alfalab/core-components-typography');
|
|
11
11
|
require('../header-info-block/Component.js');
|
|
12
|
-
require('../../tslib.es6-
|
|
12
|
+
require('../../tslib.es6-aa7419db.js');
|
|
13
13
|
require('@alfalab/core-components-icon-button');
|
|
14
14
|
require('@alfalab/core-components-tooltip');
|
|
15
|
-
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
16
|
-
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
17
15
|
require('@alfalab/icons-glyph/ArrowsInwardMIcon');
|
|
16
|
+
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
18
17
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
18
|
+
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
19
19
|
require('./buttons.js');
|
|
20
20
|
var components_header_Component = require('./Component.js');
|
|
21
21
|
|
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
|
-
var styles = {"info":"
|
|
13
|
+
var styles = {"info":"gallery__info_1ucrv","filenameHead":"gallery__filenameHead_1ucrv","filenameContainer":"gallery__filenameContainer_1ucrv","description":"gallery__description_1ucrv"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var HeaderInfoBlock = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: zp5yj */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
:root {
|
|
11
11
|
--gap-2xs: 4px;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.gallery__info_1ucrv {
|
|
14
14
|
height: 100%;
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
justify-content: center;
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.gallery__filenameHead_1ucrv {
|
|
21
21
|
display: inline;
|
|
22
22
|
text-overflow: ellipsis;
|
|
23
23
|
overflow: hidden;
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.gallery__filenameContainer_1ucrv {
|
|
27
27
|
overflow: hidden;
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.gallery__description_1ucrv {
|
|
31
31
|
display: inline;
|
|
32
32
|
text-overflow: ellipsis;
|
|
33
33
|
overflow: hidden;
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var context = require('../../context.js');
|
|
6
7
|
var cn = require('classnames');
|
|
7
8
|
var hooks = require('@alfalab/hooks');
|
|
8
|
-
var context = require('../../context.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"component":"
|
|
15
|
+
var styles = {"component":"gallery__component_apuo4","active":"gallery__active_apuo4","image":"gallery__image_apuo4","preview":"gallery__preview_apuo4","loading":"gallery__loading_apuo4","brokenImageWrapper":"gallery__brokenImageWrapper_apuo4","brokenIcon":"gallery__brokenIcon_apuo4","focused":"gallery__focused_apuo4"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var ImagePreview = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: q5y8t */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-key-inverted: #fff;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:root {
|
|
26
26
|
--gallery-broken-image-icon: url('https://alfabank.servicecdn.ru/icons/art_no-image_s.svg');
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.gallery__component_apuo4 {
|
|
29
29
|
display: flex;
|
|
30
30
|
padding: var(--gap-2xs);
|
|
31
31
|
border: 2px solid rgba(0, 0, 0, 0);
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
transition: border 0.15s ease-in-out;
|
|
35
35
|
outline: none;
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.gallery__active_apuo4 {
|
|
38
38
|
border-color: var(--color-light-border-key-inverted)
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.gallery__active_apuo4 > .gallery__image_apuo4 {
|
|
41
41
|
opacity: 0.7;
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.gallery__preview_apuo4 {
|
|
44
44
|
width: 56px;
|
|
45
45
|
height: 56px;
|
|
46
46
|
flex-shrink: 0;
|
|
@@ -49,37 +49,37 @@
|
|
|
49
49
|
-webkit-user-select: none;
|
|
50
50
|
user-select: none;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.gallery__image_apuo4 {
|
|
53
53
|
background-color: var(--color-light-bg-primary);
|
|
54
54
|
background-size: cover;
|
|
55
55
|
background-repeat: no-repeat;
|
|
56
56
|
background-position: center;
|
|
57
57
|
transition: opacity 0.15s ease-in-out
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
.gallery__image_apuo4:hover {
|
|
60
60
|
opacity: 0.7;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.gallery__loading_apuo4 {
|
|
63
63
|
/* TODO: цвета нет в палитре */
|
|
64
64
|
background-color: #e9eaeb;
|
|
65
65
|
}
|
|
66
|
-
.
|
|
66
|
+
.gallery__brokenImageWrapper_apuo4 {
|
|
67
67
|
display: flex;
|
|
68
68
|
justify-content: center;
|
|
69
69
|
align-items: center;
|
|
70
70
|
background-color: var(--color-light-bg-primary)
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
.gallery__brokenImageWrapper_apuo4:hover {
|
|
73
73
|
opacity: 0.7;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
.gallery__brokenIcon_apuo4 {
|
|
76
76
|
width: 40px;
|
|
77
77
|
height: 40px;
|
|
78
78
|
background-image: var(--gallery-broken-image-icon);
|
|
79
79
|
background-size: contain;
|
|
80
80
|
background-repeat: no-repeat;
|
|
81
81
|
}
|
|
82
|
-
.
|
|
82
|
+
.gallery__focused_apuo4 {
|
|
83
83
|
outline: 2px solid var(--focus-color);
|
|
84
84
|
outline-offset: 2px;
|
|
85
85
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
|
+
require('../../context.js');
|
|
6
7
|
require('classnames');
|
|
7
8
|
require('@alfalab/hooks');
|
|
8
|
-
require('../../context.js');
|
|
9
9
|
var components_imagePreview_Component = require('./Component.js');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var cn = require('classnames');
|
|
7
|
-
var hooks = require('@alfalab/hooks');
|
|
8
6
|
var context = require('../../context.js');
|
|
9
7
|
var utils_utils = require('../../utils/utils.js');
|
|
10
8
|
var utils_constants = require('../../utils/constants.js');
|
|
9
|
+
var cn = require('classnames');
|
|
10
|
+
var hooks = require('@alfalab/hooks');
|
|
11
11
|
require('@alfalab/core-components-typography');
|
|
12
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
12
|
+
var tslib_es6 = require('../../tslib.es6-aa7419db.js');
|
|
13
|
+
var elementClosest = require('element-closest');
|
|
13
14
|
var SwiperCore = require('swiper');
|
|
14
15
|
var react = require('swiper/react');
|
|
15
|
-
var elementClosest = require('element-closest');
|
|
16
|
-
require('swiper/swiper.min.css');
|
|
17
16
|
var ChevronBackHeavyMIcon = require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
18
17
|
var ChevronForwardHeavyMIcon = require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
19
|
-
var components_imageViewer_slide = require('../../slide-
|
|
18
|
+
var components_imageViewer_slide = require('../../slide-f51d1782.js');
|
|
19
|
+
require('swiper/swiper.min.css');
|
|
20
20
|
|
|
21
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
22
|
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
24
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
25
|
-
var SwiperCore__default = /*#__PURE__*/_interopDefaultLegacy(SwiperCore);
|
|
26
25
|
var elementClosest__default = /*#__PURE__*/_interopDefaultLegacy(elementClosest);
|
|
26
|
+
var SwiperCore__default = /*#__PURE__*/_interopDefaultLegacy(SwiperCore);
|
|
27
27
|
|
|
28
28
|
SwiperCore__default['default'].use([SwiperCore.EffectFade, SwiperCore.A11y, SwiperCore.Controller]);
|
|
29
29
|
var ImageViewer = function () {
|
|
@@ -65,7 +65,8 @@ var ImageViewer = function () {
|
|
|
65
65
|
var handleWrapperClick = React.useCallback(function (event) {
|
|
66
66
|
var _a, _b;
|
|
67
67
|
var eventTarget = event.target;
|
|
68
|
-
var isArrow = ((_a = leftArrowRef.current) === null || _a === void 0 ? void 0 : _a.contains(eventTarget)) ||
|
|
68
|
+
var isArrow = ((_a = leftArrowRef.current) === null || _a === void 0 ? void 0 : _a.contains(eventTarget)) ||
|
|
69
|
+
((_b = rightArrowRef.current) === null || _b === void 0 ? void 0 : _b.contains(eventTarget));
|
|
69
70
|
var isPlaceholder = Boolean(eventTarget.closest("." + components_imageViewer_slide.styles.placeholder));
|
|
70
71
|
var isImg = eventTarget.tagName === 'IMG';
|
|
71
72
|
if (!isImg && !isPlaceholder && !isArrow) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1hw82 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-link: #007aff;
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
:root {
|
|
30
30
|
--gallery-broken-image-icon: url('https://alfabank.servicecdn.ru/icons/art_no-image_s.svg');
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.gallery__component_1pds1 {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-grow: 1;
|
|
35
35
|
justify-content: center;
|
|
36
36
|
align-items: center;
|
|
37
37
|
background-color: var(--color-light-bg-primary-inverted-alpha-50);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.gallery__swiper_1pds1 {
|
|
40
40
|
display: flex;
|
|
41
41
|
width: 100%;
|
|
42
42
|
height: 100%;
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
padding: var(--gap-2xl) var(--gap-m);
|
|
47
47
|
box-sizing: border-box;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.gallery__singleSlide_1pds1 .gallery__swiper_1pds1 {
|
|
50
50
|
max-height: calc(100vh - 80px);
|
|
51
51
|
padding: var(--gap-2xl);
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.gallery__hidden_1pds1 {
|
|
54
54
|
display: none;
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.gallery__slide_1pds1 {
|
|
57
57
|
position: relative;
|
|
58
58
|
display: flex;
|
|
59
59
|
justify-content: center;
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
width: 100%;
|
|
62
62
|
height: 100%;
|
|
63
63
|
}
|
|
64
|
-
.
|
|
64
|
+
.gallery__slideLoading_1pds1 {
|
|
65
65
|
/* TODO: цвета нет в палитре */
|
|
66
66
|
background-color: #e9eaeb;
|
|
67
67
|
border-radius: var(--border-radius-m);
|
|
68
68
|
}
|
|
69
|
-
.
|
|
69
|
+
.gallery__image_1pds1 {
|
|
70
70
|
width: 0;
|
|
71
71
|
height: 0;
|
|
72
72
|
-webkit-user-select: none;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
background-color: var(--color-light-bg-primary);
|
|
75
75
|
border-radius: var(--border-radius-m);
|
|
76
76
|
}
|
|
77
|
-
.
|
|
77
|
+
.gallery__smallImage_1pds1 {
|
|
78
78
|
position: relative;
|
|
79
79
|
width: auto;
|
|
80
80
|
height: auto;
|
|
@@ -82,15 +82,15 @@
|
|
|
82
82
|
user-select: none;
|
|
83
83
|
background-color: var(--color-light-bg-primary);
|
|
84
84
|
}
|
|
85
|
-
.
|
|
85
|
+
.gallery__verticalImageFit_1pds1 {
|
|
86
86
|
width: auto;
|
|
87
87
|
height: 100%;
|
|
88
88
|
}
|
|
89
|
-
.
|
|
89
|
+
.gallery__horizontalImageFit_1pds1 {
|
|
90
90
|
width: 100%;
|
|
91
91
|
height: auto;
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
.gallery__arrow_1pds1 {
|
|
94
94
|
display: flex;
|
|
95
95
|
flex-direction: column;
|
|
96
96
|
justify-content: center;
|
|
@@ -103,17 +103,17 @@
|
|
|
103
103
|
transition: background-color 0.15s ease-in-out;
|
|
104
104
|
outline: none
|
|
105
105
|
}
|
|
106
|
-
.
|
|
106
|
+
.gallery__arrow_1pds1:hover {
|
|
107
107
|
background-color: var(--color-light-bg-primary-inverted-alpha-10);
|
|
108
108
|
}
|
|
109
|
-
.
|
|
109
|
+
.gallery__arrow_1pds1:active {
|
|
110
110
|
background-color: var(--color-light-bg-primary-inverted-alpha-20);
|
|
111
111
|
}
|
|
112
|
-
.
|
|
112
|
+
.gallery__focused_1pds1 {
|
|
113
113
|
outline: 2px solid var(--focus-color);
|
|
114
114
|
outline-offset: 2px;
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.gallery__placeholder_1pds1 {
|
|
117
117
|
display: flex;
|
|
118
118
|
justify-content: center;
|
|
119
119
|
align-items: center;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
border-radius: var(--border-radius-m);
|
|
123
123
|
background-color: var(--color-light-bg-primary);
|
|
124
124
|
}
|
|
125
|
-
.
|
|
125
|
+
.gallery__brokenImgWrapper_1pds1 {
|
|
126
126
|
position: relative;
|
|
127
127
|
display: flex;
|
|
128
128
|
flex-direction: column;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
width: 150px;
|
|
131
131
|
text-align: center;
|
|
132
132
|
}
|
|
133
|
-
.
|
|
133
|
+
.gallery__brokenImgIcon_1pds1 {
|
|
134
134
|
width: 80px;
|
|
135
135
|
height: 80px;
|
|
136
136
|
margin-bottom: var(--gap-2xs);
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
background-size: contain;
|
|
139
139
|
background-repeat: no-repeat;
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.gallery__fullScreenImage_1pds1 {
|
|
142
142
|
width: 100%;
|
|
143
143
|
height: auto;
|
|
144
144
|
background-color: var(--color-light-bg-primary);
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
require('@alfalab/hooks');
|
|
8
6
|
require('../../context.js');
|
|
9
7
|
require('../../utils/utils.js');
|
|
10
8
|
require('../../utils/constants.js');
|
|
9
|
+
require('classnames');
|
|
10
|
+
require('@alfalab/hooks');
|
|
11
11
|
require('@alfalab/core-components-typography');
|
|
12
|
-
require('../../tslib.es6-
|
|
12
|
+
require('../../tslib.es6-aa7419db.js');
|
|
13
|
+
require('element-closest');
|
|
13
14
|
require('swiper');
|
|
14
15
|
require('swiper/react');
|
|
15
|
-
require('element-closest');
|
|
16
|
-
require('swiper/swiper.min.css');
|
|
17
16
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
18
17
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
19
|
-
require('../../slide-
|
|
18
|
+
require('../../slide-f51d1782.js');
|
|
19
|
+
require('swiper/swiper.min.css');
|
|
20
20
|
var components_imageViewer_component = require('./component.js');
|
|
21
21
|
|
|
22
22
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
|
-
require('classnames');
|
|
7
6
|
require('../../utils/utils.js');
|
|
8
7
|
require('../../utils/constants.js');
|
|
8
|
+
require('classnames');
|
|
9
9
|
require('@alfalab/core-components-typography');
|
|
10
|
-
var components_imageViewer_slide = require('../../slide-
|
|
10
|
+
var components_imageViewer_slide = require('../../slide-f51d1782.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
package/components/index.js
CHANGED
|
@@ -3,32 +3,32 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
require('@alfalab/hooks');
|
|
8
6
|
require('../context.js');
|
|
9
|
-
var components_imagePreview_Component = require('./image-preview/Component.js');
|
|
10
|
-
var components_navigationBar_Component = require('./navigation-bar/Component.js');
|
|
11
7
|
require('../utils/split-filename.js');
|
|
12
8
|
require('../utils/utils.js');
|
|
13
9
|
require('../utils/constants.js');
|
|
10
|
+
require('classnames');
|
|
11
|
+
require('@alfalab/hooks');
|
|
12
|
+
var components_imagePreview_Component = require('./image-preview/Component.js');
|
|
13
|
+
var components_navigationBar_Component = require('./navigation-bar/Component.js');
|
|
14
14
|
require('@alfalab/core-components-typography');
|
|
15
15
|
require('./header-info-block/Component.js');
|
|
16
|
-
require('../tslib.es6-
|
|
16
|
+
require('../tslib.es6-aa7419db.js');
|
|
17
17
|
require('@alfalab/core-components-icon-button');
|
|
18
18
|
require('@alfalab/core-components-tooltip');
|
|
19
|
-
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
20
|
-
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
21
19
|
require('@alfalab/icons-glyph/ArrowsInwardMIcon');
|
|
20
|
+
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
22
21
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
22
|
+
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
23
23
|
require('./header/buttons.js');
|
|
24
24
|
var components_header_Component = require('./header/Component.js');
|
|
25
|
+
require('element-closest');
|
|
25
26
|
require('swiper');
|
|
26
27
|
require('swiper/react');
|
|
27
|
-
require('element-closest');
|
|
28
|
-
require('swiper/swiper.min.css');
|
|
29
28
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
30
29
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
31
|
-
require('../slide-
|
|
30
|
+
require('../slide-f51d1782.js');
|
|
31
|
+
require('swiper/swiper.min.css');
|
|
32
32
|
var components_imageViewer_component = require('./image-viewer/component.js');
|
|
33
33
|
|
|
34
34
|
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
require('@alfalab/hooks');
|
|
8
6
|
var context = require('../../context.js');
|
|
9
|
-
var components_imagePreview_Component = require('../image-preview/Component.js');
|
|
10
7
|
var utils_utils = require('../../utils/utils.js');
|
|
11
8
|
var utils_constants = require('../../utils/constants.js');
|
|
9
|
+
require('classnames');
|
|
10
|
+
require('@alfalab/hooks');
|
|
11
|
+
var components_imagePreview_Component = require('../image-preview/Component.js');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
16
|
|
|
17
|
-
var styles = {"component":"
|
|
17
|
+
var styles = {"component":"gallery__component_6cvvg","preview":"gallery__preview_6cvvg"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var MIN_SCROLL_STEP = 24;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 89k17 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-tertiary-inverted: #3c4c5d;
|
|
4
4
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--gap-3xs: 2px;
|
|
15
15
|
--gap-xl: 24px;
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
.gallery__component_6cvvg {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-wrap: nowrap;
|
|
20
20
|
align-content: center;
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
28
28
|
scrollbar-width: none
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.gallery__component_6cvvg::-webkit-scrollbar {
|
|
31
31
|
display: none;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.gallery__preview_6cvvg {
|
|
34
34
|
flex-shrink: 0;
|
|
35
35
|
margin: 0 var(--gap-3xs)
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.gallery__preview_6cvvg:first-child {
|
|
38
38
|
margin-left: auto;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.gallery__preview_6cvvg:last-child {
|
|
41
41
|
margin-right: auto;
|
|
42
42
|
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
|
+
require('../../context.js');
|
|
7
|
+
require('../../utils/utils.js');
|
|
8
|
+
require('../../utils/constants.js');
|
|
6
9
|
require('classnames');
|
|
7
10
|
require('@alfalab/hooks');
|
|
8
|
-
require('../../context.js');
|
|
9
11
|
require('../image-preview/Component.js');
|
|
10
12
|
var components_navigationBar_Component = require('./Component.js');
|
|
11
|
-
require('../../utils/utils.js');
|
|
12
|
-
require('../../utils/constants.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
package/context.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
7
|
var mockFn = function () { return undefined; };
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
8
9
|
var GalleryContext = React.createContext({
|
|
9
10
|
singleSlide: false,
|
|
10
11
|
currentSlideIndex: 0,
|