@alfalab/core-components-gallery 1.2.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/dist/Component.d.ts +2 -0
- package/dist/Component.js +4 -3
- package/dist/components/header/Component.js +7 -6
- package/dist/components/header/buttons.js +1 -1
- package/dist/components/header/index.css +3 -3
- package/dist/components/header/index.js +2 -1
- package/dist/components/header-info-block/Component.js +1 -1
- package/dist/components/header-info-block/index.css +5 -5
- package/dist/components/image-preview/Component.js +1 -1
- package/dist/components/image-preview/index.css +12 -12
- package/dist/components/image-viewer/component.js +6 -5
- package/dist/components/image-viewer/index.css +19 -19
- package/dist/components/image-viewer/index.js +3 -2
- package/dist/components/image-viewer/slide.js +2 -1
- package/dist/components/index.js +3 -2
- package/dist/components/navigation-bar/Component.js +3 -2
- package/dist/components/navigation-bar/index.css +6 -6
- package/dist/components/navigation-bar/index.js +1 -0
- package/dist/cssm/Component.d.ts +2 -0
- package/dist/cssm/Component.js +1 -0
- package/dist/cssm/components/header/Component.js +5 -4
- package/dist/cssm/components/header/index.js +1 -0
- package/dist/cssm/components/header/index.module.css +1 -1
- package/dist/cssm/components/image-viewer/component.js +4 -3
- package/dist/cssm/components/image-viewer/index.js +1 -0
- package/dist/cssm/components/image-viewer/slide.d.ts +1 -0
- package/dist/cssm/components/image-viewer/slide.js +3 -2
- package/dist/cssm/components/index.js +1 -0
- package/dist/cssm/components/navigation-bar/Component.js +2 -1
- package/dist/cssm/components/navigation-bar/index.js +1 -0
- package/dist/cssm/index.d.ts +1 -0
- package/dist/cssm/index.js +10 -2
- package/dist/cssm/utils/constants.d.ts +11 -0
- package/dist/cssm/utils/constants.js +16 -0
- package/dist/cssm/utils/index.d.ts +1 -0
- package/dist/cssm/utils/index.js +2 -0
- package/dist/esm/Component.d.ts +2 -0
- package/dist/esm/Component.js +4 -3
- package/dist/esm/components/header/Component.js +7 -6
- package/dist/esm/components/header/buttons.js +1 -1
- package/dist/esm/components/header/index.css +3 -3
- package/dist/esm/components/header/index.js +2 -1
- package/dist/esm/components/header-info-block/Component.js +1 -1
- package/dist/esm/components/header-info-block/index.css +5 -5
- package/dist/esm/components/image-preview/Component.js +1 -1
- package/dist/esm/components/image-preview/index.css +12 -12
- package/dist/esm/components/image-viewer/component.js +6 -5
- package/dist/esm/components/image-viewer/index.css +19 -19
- package/dist/esm/components/image-viewer/index.js +3 -2
- package/dist/esm/components/image-viewer/slide.js +2 -1
- package/dist/esm/components/index.js +3 -2
- package/dist/esm/components/navigation-bar/Component.js +3 -2
- package/dist/esm/components/navigation-bar/index.css +6 -6
- package/dist/esm/components/navigation-bar/index.js +1 -0
- package/dist/esm/index.css +3 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +5 -4
- package/dist/esm/{slide-c6c2a8da.d.ts → slide-d5922694.d.ts} +1 -0
- package/dist/esm/{slide-c6c2a8da.js → slide-d5922694.js} +4 -3
- package/dist/esm/{tslib.es6-5424b006.d.ts → tslib.es6-a0d8427a.d.ts} +0 -0
- package/dist/esm/{tslib.es6-5424b006.js → tslib.es6-a0d8427a.js} +0 -0
- package/dist/esm/utils/constants.d.ts +11 -0
- package/dist/esm/utils/constants.js +12 -0
- package/dist/esm/utils/index.d.ts +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/index.css +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -4
- package/dist/modern/Component.d.ts +2 -0
- package/dist/modern/Component.js +3 -2
- package/dist/modern/components/header/Component.js +6 -5
- package/dist/modern/components/header/index.css +3 -3
- package/dist/modern/components/header/index.js +1 -0
- package/dist/modern/components/header-info-block/Component.js +1 -1
- package/dist/modern/components/header-info-block/index.css +5 -5
- package/dist/modern/components/image-preview/Component.js +1 -1
- package/dist/modern/components/image-preview/index.css +12 -12
- package/dist/modern/components/image-viewer/component.js +5 -4
- package/dist/modern/components/image-viewer/index.css +19 -19
- package/dist/modern/components/image-viewer/index.js +2 -1
- package/dist/modern/components/image-viewer/slide.js +2 -1
- package/dist/modern/components/index.js +2 -1
- package/dist/modern/components/navigation-bar/Component.js +3 -2
- package/dist/modern/components/navigation-bar/index.css +6 -6
- package/dist/modern/components/navigation-bar/index.js +1 -0
- package/dist/modern/index.css +3 -3
- package/dist/modern/index.d.ts +1 -0
- package/dist/modern/index.js +4 -3
- package/dist/modern/{slide-cbb4ff18.d.ts → slide-ed99bfd2.d.ts} +1 -0
- package/dist/modern/{slide-cbb4ff18.js → slide-ed99bfd2.js} +4 -3
- package/dist/modern/utils/constants.d.ts +11 -0
- package/dist/modern/utils/constants.js +12 -0
- package/dist/modern/utils/index.d.ts +1 -0
- package/dist/modern/utils/index.js +1 -0
- package/dist/{slide-a45fd2cc.d.ts → slide-72dcb819.d.ts} +1 -0
- package/dist/{slide-a45fd2cc.js → slide-72dcb819.js} +4 -3
- package/dist/{tslib.es6-36496c07.d.ts → tslib.es6-404db855.d.ts} +0 -0
- package/dist/{tslib.es6-36496c07.js → tslib.es6-404db855.js} +0 -0
- package/dist/utils/constants.d.ts +11 -0
- package/dist/utils/constants.js +16 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,70 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-gallery@2.0.0...@alfalab/core-components-gallery@2.0.1) (2021-12-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @alfalab/core-components-gallery
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-gallery@1.2.2...@alfalab/core-components-gallery@2.0.0) (2021-11-26)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **button:** добавлена кнопка размера 40px, изменены скругления ([#886](https://github.com/alfa-laboratory/core-components/issues/886)) ([88e657a](https://github.com/alfa-laboratory/core-components/commit/88e657a9f0f68b8b58f6e9437053954ee984f83c)), closes [#890](https://github.com/alfa-laboratory/core-components/issues/890)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **button:** Кнопка размера xs теперь имеет размер 40px. Тем, кто использовал размер xs, надо
|
|
25
|
+
заменить размер на xxs. Можно воспользоваться codemod.
|
|
26
|
+
|
|
27
|
+
* feat(codemod): add button xs to xxs transformer
|
|
28
|
+
|
|
29
|
+
* feat(tag): добавлен тэг размера 40px, изменены отступы
|
|
30
|
+
|
|
31
|
+
Добавлен тэг размером 40px, изменены отступы. Тем, кто использовал размер xs, надо заменить размер
|
|
32
|
+
на xxs.
|
|
33
|
+
* **button:** Тэг размера xs теперь имеет размер 40px. Тем, кто использовал размер xs, надо
|
|
34
|
+
заменить размер на xxs. Можно воспользоваться codemod.
|
|
35
|
+
|
|
36
|
+
* test: update screenshots
|
|
37
|
+
|
|
38
|
+
* test: update screenshots
|
|
39
|
+
|
|
40
|
+
* feat(button): linter fix
|
|
41
|
+
|
|
42
|
+
* feat(button): fix min-width
|
|
43
|
+
|
|
44
|
+
* feat(tag): remove vertical paddings
|
|
45
|
+
|
|
46
|
+
* feat(tag): remove vertical paddings
|
|
47
|
+
|
|
48
|
+
* feat(button): updates
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [1.2.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-gallery@1.2.1...@alfalab/core-components-gallery@1.2.2) (2021-11-16)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @alfalab/core-components-gallery
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [1.2.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-gallery@1.2.0...@alfalab/core-components-gallery@1.2.1) (2021-11-08)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @alfalab/core-components-gallery
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
6
70
|
# [1.2.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-gallery@1.1.0...@alfalab/core-components-gallery@1.2.0) (2021-09-22)
|
|
7
71
|
|
|
8
72
|
|
package/dist/Component.d.ts
CHANGED
package/dist/Component.js
CHANGED
|
@@ -11,9 +11,10 @@ require('./components/image-preview/Component.js');
|
|
|
11
11
|
var components_navigationBar_Component = require('./components/navigation-bar/Component.js');
|
|
12
12
|
require('./utils/split-filename.js');
|
|
13
13
|
require('./utils/utils.js');
|
|
14
|
+
require('./utils/constants.js');
|
|
14
15
|
require('@alfalab/core-components-typography');
|
|
15
16
|
require('./components/header-info-block/Component.js');
|
|
16
|
-
require('./tslib.es6-
|
|
17
|
+
require('./tslib.es6-404db855.js');
|
|
17
18
|
require('@alfalab/core-components-icon-button');
|
|
18
19
|
require('@alfalab/core-components-tooltip');
|
|
19
20
|
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
@@ -28,14 +29,14 @@ require('element-closest');
|
|
|
28
29
|
require('swiper/swiper.min.css');
|
|
29
30
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
30
31
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
31
|
-
require('./slide-
|
|
32
|
+
require('./slide-72dcb819.js');
|
|
32
33
|
var components_imageViewer_component = require('./components/image-viewer/component.js');
|
|
33
34
|
|
|
34
35
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
35
36
|
|
|
36
37
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
37
38
|
|
|
38
|
-
var styles = {"container":"
|
|
39
|
+
var styles = {"container":"gallery__container_1j27p","modal":"gallery__modal_1j27p"};
|
|
39
40
|
require('./index.css')
|
|
40
41
|
|
|
41
42
|
var Backdrop = function () { return null; };
|
|
@@ -6,9 +6,10 @@ var React = require('react');
|
|
|
6
6
|
var context = require('../../context.js');
|
|
7
7
|
require('../../utils/split-filename.js');
|
|
8
8
|
var utils_utils = require('../../utils/utils.js');
|
|
9
|
+
var utils_constants = require('../../utils/constants.js');
|
|
9
10
|
require('@alfalab/core-components-typography');
|
|
10
11
|
var components_headerInfoBlock_Component = require('../header-info-block/Component.js');
|
|
11
|
-
require('../../tslib.es6-
|
|
12
|
+
require('../../tslib.es6-404db855.js');
|
|
12
13
|
require('@alfalab/core-components-icon-button');
|
|
13
14
|
require('@alfalab/core-components-tooltip');
|
|
14
15
|
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
@@ -21,7 +22,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
22
|
|
|
22
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
24
|
|
|
24
|
-
var styles = {"
|
|
25
|
+
var styles = {"header":"gallery__header_1awwr","buttons":"gallery__buttons_1awwr"};
|
|
25
26
|
require('./index.css')
|
|
26
27
|
|
|
27
28
|
var Header = function () {
|
|
@@ -49,14 +50,14 @@ var Header = function () {
|
|
|
49
50
|
var showFullScreenButton = !utils_utils.isSmallImage(meta) && !(meta === null || meta === void 0 ? void 0 : meta.broken);
|
|
50
51
|
var showDownloadButton = !(meta === null || meta === void 0 ? void 0 : meta.broken) && canDownload;
|
|
51
52
|
var renderToggleFullScreenButton = function () {
|
|
52
|
-
return fullScreen ? (React__default['default'].createElement(components_header_buttons.ExitFullscreen, { onClick: closeFullScreen, buttonRef: toggleFullScreenButton })) : (React__default['default'].createElement(components_header_buttons.Fullscreen, { onClick: openFullScreen, buttonRef: toggleFullScreenButton }));
|
|
53
|
+
return fullScreen ? (React__default['default'].createElement(components_header_buttons.ExitFullscreen, { onClick: closeFullScreen, buttonRef: toggleFullScreenButton, dataTestId: utils_constants.TestIds.EXIT_FULLSCREEN_BUTTON })) : (React__default['default'].createElement(components_header_buttons.Fullscreen, { onClick: openFullScreen, buttonRef: toggleFullScreenButton, dataTestId: utils_constants.TestIds.FULLSCREEN_BUTTON }));
|
|
53
54
|
};
|
|
54
|
-
return (React__default['default'].createElement("div", { className: styles.
|
|
55
|
+
return (React__default['default'].createElement("div", { className: styles.header },
|
|
55
56
|
React__default['default'].createElement(components_headerInfoBlock_Component.HeaderInfoBlock, { filename: filename, description: description }),
|
|
56
57
|
React__default['default'].createElement("div", { className: styles.buttons },
|
|
57
58
|
showFullScreenButton && renderToggleFullScreenButton(),
|
|
58
|
-
showDownloadButton && (React__default['default'].createElement(components_header_buttons.Download, { href: currentImage === null || currentImage === void 0 ? void 0 : currentImage.src, download: currentImage === null || currentImage === void 0 ? void 0 : currentImage.name })),
|
|
59
|
-
React__default['default'].createElement(components_header_buttons.Exit, { onClick: onClose }))));
|
|
59
|
+
showDownloadButton && (React__default['default'].createElement(components_header_buttons.Download, { href: currentImage === null || currentImage === void 0 ? void 0 : currentImage.src, download: currentImage === null || currentImage === void 0 ? void 0 : currentImage.name, dataTestId: utils_constants.TestIds.DOWNLOAD_BUTTON })),
|
|
60
|
+
React__default['default'].createElement(components_header_buttons.Exit, { onClick: onClose, dataTestId: utils_constants.TestIds.CLOSE_BUTTON }))));
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
exports.Header = Header;
|
|
@@ -3,7 +3,7 @@
|
|
|
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-404db855.js');
|
|
7
7
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
8
8
|
var coreComponentsTooltip = require('@alfalab/core-components-tooltip');
|
|
9
9
|
var PointerDownMIcon = require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1q19v */
|
|
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_1awwr {
|
|
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_1awwr {
|
|
28
28
|
display: flex;
|
|
29
29
|
padding-left: var(--gap-2xl);
|
|
30
30
|
}
|
|
@@ -6,9 +6,10 @@ require('react');
|
|
|
6
6
|
require('../../context.js');
|
|
7
7
|
require('../../utils/split-filename.js');
|
|
8
8
|
require('../../utils/utils.js');
|
|
9
|
+
require('../../utils/constants.js');
|
|
9
10
|
require('@alfalab/core-components-typography');
|
|
10
11
|
require('../header-info-block/Component.js');
|
|
11
|
-
require('../../tslib.es6-
|
|
12
|
+
require('../../tslib.es6-404db855.js');
|
|
12
13
|
require('@alfalab/core-components-icon-button');
|
|
13
14
|
require('@alfalab/core-components-tooltip');
|
|
14
15
|
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
@@ -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_ls0el","filenameHead":"gallery__filenameHead_ls0el","filenameContainer":"gallery__filenameContainer_ls0el","description":"gallery__description_ls0el"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var HeaderInfoBlock = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 66gm4 */
|
|
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_ls0el {
|
|
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_ls0el {
|
|
21
21
|
display: inline;
|
|
22
22
|
text-overflow: ellipsis;
|
|
23
23
|
overflow: hidden;
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.gallery__filenameContainer_ls0el {
|
|
27
27
|
overflow: hidden;
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.gallery__description_ls0el {
|
|
31
31
|
display: inline;
|
|
32
32
|
text-overflow: ellipsis;
|
|
33
33
|
overflow: hidden;
|
|
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
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_11679","active":"gallery__active_11679","image":"gallery__image_11679","preview":"gallery__preview_11679","loading":"gallery__loading_11679","brokenImageWrapper":"gallery__brokenImageWrapper_11679","brokenIcon":"gallery__brokenIcon_11679","focused":"gallery__focused_11679"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var ImagePreview = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 14lc5 */
|
|
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.st/icons/art_no-image_s.svg');
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.gallery__component_11679 {
|
|
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_11679 {
|
|
38
38
|
border-color: var(--color-light-border-key-inverted)
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.gallery__active_11679 > .gallery__image_11679 {
|
|
41
41
|
opacity: 0.7;
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.gallery__preview_11679 {
|
|
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_11679 {
|
|
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_11679:hover {
|
|
60
60
|
opacity: 0.7;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.gallery__loading_11679 {
|
|
63
63
|
/* TODO: цвета нет в палитре */
|
|
64
64
|
background-color: #e9eaeb;
|
|
65
65
|
}
|
|
66
|
-
.
|
|
66
|
+
.gallery__brokenImageWrapper_11679 {
|
|
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_11679:hover {
|
|
73
73
|
opacity: 0.7;
|
|
74
74
|
}
|
|
75
|
-
.
|
|
75
|
+
.gallery__brokenIcon_11679 {
|
|
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_11679 {
|
|
83
83
|
outline: 2px solid var(--focus-color);
|
|
84
84
|
outline-offset: 2px;
|
|
85
85
|
}
|
|
@@ -7,15 +7,16 @@ var cn = require('classnames');
|
|
|
7
7
|
var hooks = require('@alfalab/hooks');
|
|
8
8
|
var context = require('../../context.js');
|
|
9
9
|
var utils_utils = require('../../utils/utils.js');
|
|
10
|
+
var utils_constants = require('../../utils/constants.js');
|
|
10
11
|
require('@alfalab/core-components-typography');
|
|
11
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
12
|
+
var tslib_es6 = require('../../tslib.es6-404db855.js');
|
|
12
13
|
var SwiperCore = require('swiper');
|
|
13
14
|
var react = require('swiper/react');
|
|
14
15
|
var elementClosest = require('element-closest');
|
|
15
16
|
require('swiper/swiper.min.css');
|
|
16
17
|
var ChevronBackHeavyMIcon = require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
17
18
|
var ChevronForwardHeavyMIcon = require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
18
|
-
var components_imageViewer_slide = require('../../slide-
|
|
19
|
+
var components_imageViewer_slide = require('../../slide-72dcb819.js');
|
|
19
20
|
|
|
20
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
22
|
|
|
@@ -103,7 +104,7 @@ var ImageViewer = function () {
|
|
|
103
104
|
React__default['default'].createElement("div", { className: cn__default['default'](components_imageViewer_slide.styles.component, (_a = {}, _a[components_imageViewer_slide.styles.singleSlide] = singleSlide, _a)), onClick: handleWrapperClick },
|
|
104
105
|
showControls && (React__default['default'].createElement("div", { className: cn__default['default'](components_imageViewer_slide.styles.arrow, (_b = {},
|
|
105
106
|
_b[components_imageViewer_slide.styles.focused] = leftArrowFocused,
|
|
106
|
-
_b)), onClick: handlePrevClick, role: 'button', onKeyDown: handleArrowLeftKeyDown, tabIndex: 0, ref: leftArrowRef, "aria-label": '\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435' },
|
|
107
|
+
_b)), onClick: handlePrevClick, role: 'button', onKeyDown: handleArrowLeftKeyDown, tabIndex: 0, ref: leftArrowRef, "aria-label": '\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435', "data-test-id": utils_constants.TestIds.PREV_SLIDE_BUTTON },
|
|
107
108
|
React__default['default'].createElement(ChevronBackHeavyMIcon.ChevronBackHeavyMIcon, null))),
|
|
108
109
|
fullScreen && (React__default['default'].createElement("img", { src: currentImage === null || currentImage === void 0 ? void 0 : currentImage.src, alt: currentImage ? utils_utils.getImageAlt(currentImage, currentSlideIndex) : '', className: components_imageViewer_slide.styles.fullScreenImage })),
|
|
109
110
|
React__default['default'].createElement(react.Swiper, tslib_es6.__assign({}, swiperProps), images.map(function (image, index) {
|
|
@@ -117,12 +118,12 @@ var ImageViewer = function () {
|
|
|
117
118
|
transitionProperty: 'opacity',
|
|
118
119
|
} }, function (_a) {
|
|
119
120
|
var isActive = _a.isActive;
|
|
120
|
-
return (React__default['default'].createElement(components_imageViewer_slide.Slide, { isActive: isActive, swiperAspectRatio: swiperAspectRatio, image: image, swiperHeight: swiperHeight, meta: meta, index: index, imageAspectRatio: imageAspectRatio, handleLoad: handleLoad, handleLoadError: handleLoadError }));
|
|
121
|
+
return (React__default['default'].createElement(components_imageViewer_slide.Slide, { isActive: isActive, swiperAspectRatio: swiperAspectRatio, image: image, swiperHeight: swiperHeight, meta: meta, index: index, imageAspectRatio: imageAspectRatio, slideVisible: slideVisible, handleLoad: handleLoad, handleLoadError: handleLoadError }));
|
|
121
122
|
}));
|
|
122
123
|
})),
|
|
123
124
|
showControls && (React__default['default'].createElement("div", { className: cn__default['default'](components_imageViewer_slide.styles.arrow, (_c = {},
|
|
124
125
|
_c[components_imageViewer_slide.styles.focused] = rightArrowFocused,
|
|
125
|
-
_c)), onClick: handleNextClick, role: 'button', onKeyDown: handleArrowRightKeyDown, tabIndex: 0, ref: rightArrowRef, "aria-label": '\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435' },
|
|
126
|
+
_c)), onClick: handleNextClick, role: 'button', onKeyDown: handleArrowRightKeyDown, tabIndex: 0, ref: rightArrowRef, "aria-label": '\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435', "data-test-id": utils_constants.TestIds.NEXT_SLIDE_BUTTON },
|
|
126
127
|
React__default['default'].createElement(ChevronForwardHeavyMIcon.ChevronForwardHeavyMIcon, null)))));
|
|
127
128
|
};
|
|
128
129
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1nhze */
|
|
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.st/icons/art_no-image_s.svg');
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.gallery__component_1pu6o {
|
|
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_1pu6o {
|
|
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_1pu6o .gallery__swiper_1pu6o {
|
|
50
50
|
max-height: calc(100vh - 80px);
|
|
51
51
|
padding: var(--gap-2xl);
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.gallery__hidden_1pu6o {
|
|
54
54
|
display: none;
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.gallery__slide_1pu6o {
|
|
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_1pu6o {
|
|
65
65
|
/* TODO: цвета нет в палитре */
|
|
66
66
|
background-color: #e9eaeb;
|
|
67
67
|
border-radius: var(--border-radius-m);
|
|
68
68
|
}
|
|
69
|
-
.
|
|
69
|
+
.gallery__image_1pu6o {
|
|
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_1pu6o {
|
|
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_1pu6o {
|
|
86
86
|
width: auto;
|
|
87
87
|
height: 100%;
|
|
88
88
|
}
|
|
89
|
-
.
|
|
89
|
+
.gallery__horizontalImageFit_1pu6o {
|
|
90
90
|
width: 100%;
|
|
91
91
|
height: auto;
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
.gallery__arrow_1pu6o {
|
|
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_1pu6o:hover {
|
|
107
107
|
background-color: var(--color-light-bg-primary-inverted-alpha-10);
|
|
108
108
|
}
|
|
109
|
-
.
|
|
109
|
+
.gallery__arrow_1pu6o:active {
|
|
110
110
|
background-color: var(--color-light-bg-primary-inverted-alpha-20);
|
|
111
111
|
}
|
|
112
|
-
.
|
|
112
|
+
.gallery__focused_1pu6o {
|
|
113
113
|
outline: 2px solid var(--focus-color);
|
|
114
114
|
outline-offset: 2px;
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.gallery__placeholder_1pu6o {
|
|
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_1pu6o {
|
|
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_1pu6o {
|
|
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_1pu6o {
|
|
142
142
|
width: 100%;
|
|
143
143
|
height: auto;
|
|
144
144
|
background-color: var(--color-light-bg-primary);
|
|
@@ -7,15 +7,16 @@ require('classnames');
|
|
|
7
7
|
require('@alfalab/hooks');
|
|
8
8
|
require('../../context.js');
|
|
9
9
|
require('../../utils/utils.js');
|
|
10
|
+
require('../../utils/constants.js');
|
|
10
11
|
require('@alfalab/core-components-typography');
|
|
11
|
-
require('../../tslib.es6-
|
|
12
|
+
require('../../tslib.es6-404db855.js');
|
|
12
13
|
require('swiper');
|
|
13
14
|
require('swiper/react');
|
|
14
15
|
require('element-closest');
|
|
15
16
|
require('swiper/swiper.min.css');
|
|
16
17
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
17
18
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
18
|
-
require('../../slide-
|
|
19
|
+
require('../../slide-72dcb819.js');
|
|
19
20
|
var components_imageViewer_component = require('./component.js');
|
|
20
21
|
|
|
21
22
|
|
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('react');
|
|
6
6
|
require('classnames');
|
|
7
7
|
require('../../utils/utils.js');
|
|
8
|
+
require('../../utils/constants.js');
|
|
8
9
|
require('@alfalab/core-components-typography');
|
|
9
|
-
var components_imageViewer_slide = require('../../slide-
|
|
10
|
+
var components_imageViewer_slide = require('../../slide-72dcb819.js');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
package/dist/components/index.js
CHANGED
|
@@ -10,9 +10,10 @@ var components_imagePreview_Component = require('./image-preview/Component.js');
|
|
|
10
10
|
var components_navigationBar_Component = require('./navigation-bar/Component.js');
|
|
11
11
|
require('../utils/split-filename.js');
|
|
12
12
|
require('../utils/utils.js');
|
|
13
|
+
require('../utils/constants.js');
|
|
13
14
|
require('@alfalab/core-components-typography');
|
|
14
15
|
require('./header-info-block/Component.js');
|
|
15
|
-
require('../tslib.es6-
|
|
16
|
+
require('../tslib.es6-404db855.js');
|
|
16
17
|
require('@alfalab/core-components-icon-button');
|
|
17
18
|
require('@alfalab/core-components-tooltip');
|
|
18
19
|
require('@alfalab/icons-glyph/PointerDownMIcon');
|
|
@@ -27,7 +28,7 @@ require('element-closest');
|
|
|
27
28
|
require('swiper/swiper.min.css');
|
|
28
29
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
29
30
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
30
|
-
require('../slide-
|
|
31
|
+
require('../slide-72dcb819.js');
|
|
31
32
|
var components_imageViewer_component = require('./image-viewer/component.js');
|
|
32
33
|
|
|
33
34
|
|
|
@@ -8,12 +8,13 @@ require('@alfalab/hooks');
|
|
|
8
8
|
var context = require('../../context.js');
|
|
9
9
|
var components_imagePreview_Component = require('../image-preview/Component.js');
|
|
10
10
|
var utils_utils = require('../../utils/utils.js');
|
|
11
|
+
var utils_constants = require('../../utils/constants.js');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
14
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
16
|
|
|
16
|
-
var styles = {"component":"
|
|
17
|
+
var styles = {"component":"gallery__component_1av5e","preview":"gallery__preview_1av5e"};
|
|
17
18
|
require('./index.css')
|
|
18
19
|
|
|
19
20
|
var MIN_SCROLL_STEP = 24;
|
|
@@ -63,7 +64,7 @@ var NavigationBar = function () {
|
|
|
63
64
|
}, [currentSlideIndex, handlePreviewPosition, scroll]);
|
|
64
65
|
return (
|
|
65
66
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
66
|
-
React__default['default'].createElement("div", { className: styles.component, ref: containerRef, onKeyDown: handleKeyDown }, images.map(function (image, index) {
|
|
67
|
+
React__default['default'].createElement("div", { className: styles.component, ref: containerRef, onKeyDown: handleKeyDown, "data-test-id": utils_constants.TestIds.NAVIGATION_BAR }, images.map(function (image, index) {
|
|
67
68
|
var active = index === currentSlideIndex;
|
|
68
69
|
return (React__default['default'].createElement(components_imagePreview_Component.ImagePreview, { key: utils_utils.getImageKey(image, index), image: image, active: active, index: index, onSelect: handlePreviewSelect, className: styles.preview }));
|
|
69
70
|
})));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 11p5o */
|
|
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_1av5e {
|
|
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_1av5e::-webkit-scrollbar {
|
|
31
31
|
display: none;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.gallery__preview_1av5e {
|
|
34
34
|
flex-shrink: 0;
|
|
35
35
|
margin: 0 var(--gap-3xs)
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.gallery__preview_1av5e:first-child {
|
|
38
38
|
margin-left: auto;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.gallery__preview_1av5e:last-child {
|
|
41
41
|
margin-right: auto;
|
|
42
42
|
}
|
package/dist/cssm/Component.d.ts
CHANGED