@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.
Files changed (95) hide show
  1. package/components/bottom-button/index.css +5 -5
  2. package/components/bottom-button/index.module.css.js +1 -1
  3. package/components/buttons/index.css +5 -5
  4. package/components/buttons/index.module.css.js +1 -1
  5. package/components/header/index.css +1 -1
  6. package/components/header/index.module.css.js +1 -1
  7. package/components/header-info-block/index.css +4 -4
  8. package/components/header-info-block/index.module.css.js +1 -1
  9. package/components/header-mobile/index.css +6 -6
  10. package/components/header-mobile/index.module.css.js +1 -1
  11. package/components/image-preview/index.css +17 -17
  12. package/components/image-preview/index.module.css.js +1 -1
  13. package/components/image-viewer/component.d.ts +0 -1
  14. package/components/image-viewer/component.js +2 -4
  15. package/components/image-viewer/component.js.map +1 -1
  16. package/components/image-viewer/index.css +86 -25
  17. package/components/image-viewer/index.module.css.js +1 -1
  18. package/components/image-viewer/index.module.css.js.map +1 -1
  19. package/components/image-viewer/video/index.css +7 -7
  20. package/components/image-viewer/video/index.module.css.js +1 -1
  21. package/components/info-bar/index.css +3 -3
  22. package/components/info-bar/index.module.css.js +1 -1
  23. package/components/navigation-bar/index.css +8 -8
  24. package/components/navigation-bar/index.module.css.js +1 -1
  25. package/components/subtitles/index.css +3 -3
  26. package/components/subtitles/index.module.css.js +1 -1
  27. package/cssm/components/image-viewer/component.d.ts +0 -1
  28. package/cssm/components/image-viewer/component.js +2 -4
  29. package/cssm/components/image-viewer/component.js.map +1 -1
  30. package/cssm/components/image-viewer/index.module.css +61 -0
  31. package/esm/components/bottom-button/index.css +5 -5
  32. package/esm/components/bottom-button/index.module.css.js +1 -1
  33. package/esm/components/buttons/index.css +5 -5
  34. package/esm/components/buttons/index.module.css.js +1 -1
  35. package/esm/components/header/index.css +1 -1
  36. package/esm/components/header/index.module.css.js +1 -1
  37. package/esm/components/header-info-block/index.css +4 -4
  38. package/esm/components/header-info-block/index.module.css.js +1 -1
  39. package/esm/components/header-mobile/index.css +6 -6
  40. package/esm/components/header-mobile/index.module.css.js +1 -1
  41. package/esm/components/image-preview/index.css +17 -17
  42. package/esm/components/image-preview/index.module.css.js +1 -1
  43. package/esm/components/image-viewer/component.d.ts +0 -1
  44. package/esm/components/image-viewer/component.js +2 -3
  45. package/esm/components/image-viewer/component.js.map +1 -1
  46. package/esm/components/image-viewer/index.css +86 -25
  47. package/esm/components/image-viewer/index.module.css.js +1 -1
  48. package/esm/components/image-viewer/index.module.css.js.map +1 -1
  49. package/esm/components/image-viewer/video/index.css +7 -7
  50. package/esm/components/image-viewer/video/index.module.css.js +1 -1
  51. package/esm/components/info-bar/index.css +3 -3
  52. package/esm/components/info-bar/index.module.css.js +1 -1
  53. package/esm/components/navigation-bar/index.css +8 -8
  54. package/esm/components/navigation-bar/index.module.css.js +1 -1
  55. package/esm/components/subtitles/index.css +3 -3
  56. package/esm/components/subtitles/index.module.css.js +1 -1
  57. package/esm/index.css +9 -9
  58. package/esm/index.module.css.js +1 -1
  59. package/index.css +9 -9
  60. package/index.module.css.js +1 -1
  61. package/modern/components/bottom-button/index.css +5 -5
  62. package/modern/components/bottom-button/index.module.css.js +1 -1
  63. package/modern/components/buttons/index.css +5 -5
  64. package/modern/components/buttons/index.module.css.js +1 -1
  65. package/modern/components/header/index.css +1 -1
  66. package/modern/components/header/index.module.css.js +1 -1
  67. package/modern/components/header-info-block/index.css +4 -4
  68. package/modern/components/header-info-block/index.module.css.js +1 -1
  69. package/modern/components/header-mobile/index.css +6 -6
  70. package/modern/components/header-mobile/index.module.css.js +1 -1
  71. package/modern/components/image-preview/index.css +17 -17
  72. package/modern/components/image-preview/index.module.css.js +1 -1
  73. package/modern/components/image-viewer/component.d.ts +0 -1
  74. package/modern/components/image-viewer/component.js +2 -3
  75. package/modern/components/image-viewer/component.js.map +1 -1
  76. package/modern/components/image-viewer/index.css +86 -25
  77. package/modern/components/image-viewer/index.module.css.js +1 -1
  78. package/modern/components/image-viewer/index.module.css.js.map +1 -1
  79. package/modern/components/image-viewer/video/index.css +7 -7
  80. package/modern/components/image-viewer/video/index.module.css.js +1 -1
  81. package/modern/components/info-bar/index.css +3 -3
  82. package/modern/components/info-bar/index.module.css.js +1 -1
  83. package/modern/components/navigation-bar/index.css +8 -8
  84. package/modern/components/navigation-bar/index.module.css.js +1 -1
  85. package/modern/components/subtitles/index.css +3 -3
  86. package/modern/components/subtitles/index.module.css.js +1 -1
  87. package/modern/index.css +9 -9
  88. package/modern/index.module.css.js +1 -1
  89. package/moderncssm/components/image-viewer/component.d.ts +0 -1
  90. package/moderncssm/components/image-viewer/component.js +2 -3
  91. package/moderncssm/components/image-viewer/component.js.map +1 -1
  92. package/moderncssm/components/image-viewer/index.module.css +61 -0
  93. package/package.json +2 -2
  94. package/src/components/image-viewer/component.tsx +4 -6
  95. package/src/components/image-viewer/index.module.css +63 -0
@@ -7,22 +7,22 @@
7
7
  --border-radius-0: 0;
8
8
  --border-radius-24: var(--border-radius-3xl);
9
9
  }
10
- .gallery__videoWrapper_rrxe4 {
10
+ .gallery__videoWrapper_2xmxk {
11
11
  display: flex;
12
12
  justify-content: center;
13
13
  height: 100%;
14
14
  width: auto;
15
15
  position: relative;
16
16
  }
17
- .gallery__video_rrxe4 {
17
+ .gallery__video_2xmxk {
18
18
  max-width: 100%;
19
19
  max-height: 100%;
20
20
  border-radius: var(--border-radius-24);
21
21
  }
22
- .gallery__mobile_rrxe4 {
22
+ .gallery__mobile_2xmxk {
23
23
  border-radius: var(--border-radius-0);
24
24
  }
25
- .gallery__videoButton_rrxe4 {
25
+ .gallery__videoButton_2xmxk {
26
26
  position: absolute;
27
27
  top: 50%;
28
28
  left: 50%;
@@ -30,13 +30,13 @@
30
30
  z-index: 1;
31
31
  color: green;
32
32
  }
33
- .gallery__icon_rrxe4 {
33
+ .gallery__icon_2xmxk {
34
34
  color: var(--color-static-neutral-0);
35
35
  }
36
- .gallery__iconShape_rrxe4 {
36
+ .gallery__iconShape_2xmxk {
37
37
  fill: var(--color-static-neutral-translucent-700);
38
38
  }
39
- .gallery__bottomButton_rrxe4 {
39
+ .gallery__bottomButton_2xmxk {
40
40
  position: absolute;
41
41
  bottom: 48px;
42
42
  left: 32px;
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"videoWrapper":"gallery__videoWrapper_rrxe4","video":"gallery__video_rrxe4","mobile":"gallery__mobile_rrxe4","videoButton":"gallery__videoButton_rrxe4","icon":"gallery__icon_rrxe4","iconShape":"gallery__iconShape_rrxe4","bottomButton":"gallery__bottomButton_rrxe4"};
5
+ var styles = {"videoWrapper":"gallery__videoWrapper_2xmxk","video":"gallery__video_2xmxk","mobile":"gallery__mobile_2xmxk","videoButton":"gallery__videoButton_2xmxk","icon":"gallery__icon_2xmxk","iconShape":"gallery__iconShape_2xmxk","bottomButton":"gallery__bottomButton_2xmxk"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -7,10 +7,10 @@
7
7
  --gap-4: var(--gap-2xs);
8
8
  --gap-8: var(--gap-xs);
9
9
  }
10
- .gallery__description_16ykd {
10
+ .gallery__description_1f86d {
11
11
  text-align: center;
12
12
  }
13
- .gallery__infoWrapper_16ykd {
13
+ .gallery__infoWrapper_1f86d {
14
14
  background-color: var(--color-static-neutral-0-inverted);
15
15
  display: flex;
16
16
  align-items: center;
@@ -19,7 +19,7 @@
19
19
  position: relative;
20
20
  height: 48px;
21
21
  }
22
- .gallery__infoWrapper_16ykd.gallery__video_16ykd {
22
+ .gallery__infoWrapper_1f86d.gallery__video_1f86d {
23
23
  padding: 0 var(--gap-4) var(--gap-4);
24
24
  justify-content: space-between;
25
25
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"description":"gallery__description_16ykd","infoWrapper":"gallery__infoWrapper_16ykd","video":"gallery__video_16ykd"};
5
+ var styles = {"description":"gallery__description_1f86d","infoWrapper":"gallery__infoWrapper_1f86d","video":"gallery__video_1f86d"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -13,7 +13,7 @@
13
13
  --gap-12: var(--gap-s);
14
14
  --gap-24: var(--gap-xl);
15
15
  }
16
- .gallery__component_uzlb9 {
16
+ .gallery__component_65aup {
17
17
  display: flex;
18
18
  flex-wrap: nowrap;
19
19
  align-content: center;
@@ -25,25 +25,25 @@
25
25
  scrollbar-width: none;
26
26
  background-color: var(--color-static-neutral-0-inverted);
27
27
  }
28
- .gallery__component_uzlb9.gallery__mobile_uzlb9 {
28
+ .gallery__component_65aup.gallery__mobile_65aup {
29
29
  padding: var(--gap-8) var(--gap-24);
30
30
  }
31
- .gallery__component_uzlb9::-webkit-scrollbar {
31
+ .gallery__component_65aup::-webkit-scrollbar {
32
32
  display: none;
33
33
  }
34
- .gallery__previews_uzlb9 {
34
+ .gallery__previews_65aup {
35
35
  display: flex;
36
36
  }
37
- .gallery__preview_uzlb9 {
37
+ .gallery__preview_65aup {
38
38
  flex-shrink: 0;
39
39
  margin-right: var(--gap-4);
40
40
  }
41
- .gallery__preview_uzlb9.gallery__mobile_uzlb9 {
41
+ .gallery__preview_65aup.gallery__mobile_65aup {
42
42
  margin-right: var(--gap-2);
43
43
  }
44
- .gallery__preview_uzlb9:first-child {
44
+ .gallery__preview_65aup:first-child {
45
45
  margin-left: auto;
46
46
  }
47
- .gallery__preview_uzlb9:last-child {
47
+ .gallery__preview_65aup:last-child {
48
48
  margin-right: auto;
49
49
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"gallery__component_uzlb9","mobile":"gallery__mobile_uzlb9","preview":"gallery__preview_uzlb9"};
5
+ var styles = {"component":"gallery__component_65aup","mobile":"gallery__mobile_65aup","preview":"gallery__preview_65aup"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -5,7 +5,7 @@
5
5
  --gap-16: var(--gap-m);
6
6
  --gap-32: var(--gap-2xl);
7
7
  }
8
- .gallery__subtitles_12ysr {
8
+ .gallery__subtitles_1p3ax {
9
9
  position: absolute;
10
10
  align-self: flex-end;
11
11
  padding: var(--gap-0) var(--gap-32);
@@ -18,10 +18,10 @@
18
18
  opacity 500ms ease-in-out,
19
19
  margin-bottom 270ms ease-in-out;
20
20
  }
21
- .gallery__subtitles_12ysr.gallery__mobile_12ysr {
21
+ .gallery__subtitles_1p3ax.gallery__mobile_1p3ax {
22
22
  position: static;
23
23
  position: initial;
24
24
  }
25
- .gallery__hideSubtitles_12ysr {
25
+ .gallery__hideSubtitles_1p3ax {
26
26
  opacity: 0;
27
27
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"subtitles":"gallery__subtitles_12ysr","mobile":"gallery__mobile_12ysr","hideSubtitles":"gallery__hideSubtitles_12ysr"};
5
+ var styles = {"subtitles":"gallery__subtitles_1p3ax","mobile":"gallery__mobile_1p3ax","hideSubtitles":"gallery__hideSubtitles_1p3ax"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1,3 +1,2 @@
1
1
  import { type FC } from 'react';
2
- import 'swiper/swiper.min.css';
3
2
  export declare const ImageViewer: FC;
@@ -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 SwiperCore = require('swiper');
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,17 +15,14 @@ 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 styles = require('./index.module.css');
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
  var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
27
25
 
28
- SwiperCore__default.default.use([SwiperCore.EffectFade, SwiperCore.A11y, SwiperCore.Controller]);
29
26
  var ImageViewer = function () {
30
27
  var _a, _b, _c;
31
28
  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;
@@ -65,6 +62,7 @@ var ImageViewer = function () {
65
62
  _a[styles__default.default.mobile] = isMobile,
66
63
  _a[styles__default.default.mobileVideo] = isMobile && utils.isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
67
64
  _a)),
65
+ modules: [modules.A11y, modules.Controller],
68
66
  controller: { control: swiper },
69
67
  a11y: {
70
68
  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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBAA,2BAAU,CAAC,GAAG,CAAC,CAACC,qBAAU,EAAEC,eAAI,EAAEC,qBAAU,CAAC,CAAC;AAEjC,IAAA,WAAW,GAAO,YAAA;;AACrB,IAAA,IAAA,KAYFC,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,eAAe,qBACW;AAExB,IAAA,IAAA,EAAgE,GAAAC,0BAAoB,EAAE,EAApF,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,YAAY,kBAA2B;IAErF,IAAA,gBAAgB,GAAIC,gBAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA,CAAA,CAAtC;IAChB,IAAA,iBAAiB,GAAIA,gBAAQ,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA,CAAA,CAAvC;AAExB,IAAA,IAAM,MAAM,GAAG,SAAS,EAAE;AAC1B,IAAA,IAAM,YAAY,GAAG,eAAe,EAAE;IAEtC,IAAM,i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,EAAE,YAAY,GAC5B;aACL,CACS;AAEtB,SAAC,CAAC,CACG;QAER,YAAY,KACTR,sBACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEH,mBAAE,CAACC,uBAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAACA,uBAAM,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,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,gB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,iBAAO,CAAC,iBAAiB,EAAA;AAEvC,YAAAD,sBAAA,CAAA,aAAA,CAACS,iDAAwB,EAAG,IAAA,CAAA,CAC1B,CACT,CACC;AAEd;;;;"}
@@ -29,6 +29,67 @@
29
29
  flex-grow: 1;
30
30
  justify-content: center;
31
31
  background-color: var(--color-static-neutral-0-inverted);
32
+ :global(.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
+ :global(.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
+ :global(.swiper-android) :global(.swiper-slide),
54
+ :global(.swiper-ios) :global(.swiper-slide),
55
+ :global(.swiper-wrapper) {
56
+ transform: translate3d(0, 0, 0);
57
+ }
58
+ :global(.swiper-horizontal) {
59
+ touch-action: pan-y;
60
+ }
61
+ :global(.swiper-slide) {
62
+ flex-shrink: 0;
63
+ width: 100%;
64
+ height: 100%;
65
+ position: relative;
66
+ transition-property: transform;
67
+ display: block;
68
+ }
69
+ :global(.swiper-slide-invisible-blank) {
70
+ visibility: hidden;
71
+ }
72
+ :global(.swiper-autoheight),
73
+ :global(.swiper-autoheight) :global(.swiper-slide) {
74
+ height: auto;
75
+ }
76
+ :global(.swiper-autoheight) :global(.swiper-wrapper) {
77
+ align-items: flex-start;
78
+ transition-property: transform, height;
79
+ }
80
+ :global(.swiper-backface-hidden) :global(.swiper-slide) {
81
+ transform: translateZ(0);
82
+ -webkit-backface-visibility: hidden;
83
+ backface-visibility: hidden;
84
+ }
85
+ :global(.swiper) :global(.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
  .swiper {
34
95
  display: flex;
@@ -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
- .gallery__component_7wh3l {
6
+ .gallery__component_1kt2z {
7
7
  background-color: var(--color-static-neutral-translucent-500-inverted);
8
8
  }
9
- .gallery__component_7wh3l:hover {
9
+ .gallery__component_1kt2z:hover {
10
10
  background-color: var(--color-static-neutral-translucent-500-inverted-hover);
11
11
  }
12
- .gallery__component_7wh3l:active {
12
+ .gallery__component_1kt2z:active {
13
13
  background-color: var(--color-static-neutral-translucent-500-inverted-press);
14
14
  }
15
- .gallery__component_7wh3l {
15
+ .gallery__component_1kt2z {
16
16
 
17
17
  transition: transform 1s ease-in-out;
18
18
  will-change: transform;
19
19
  }
20
- .gallery__notVisible_7wh3l {
20
+ .gallery__notVisible_1kt2z {
21
21
  transform: translateY(250%);
22
22
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"component":"gallery__component_7wh3l","notVisible":"gallery__notVisible_7wh3l"};
3
+ var styles = {"component":"gallery__component_1kt2z","notVisible":"gallery__notVisible_1kt2z"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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
- .gallery__buttons_j4lg8 {
11
+ .gallery__buttons_17yvw {
12
12
  display: flex;
13
13
  padding-left: var(--gap-32);
14
14
  }
15
- .gallery__buttons_j4lg8 path {
15
+ .gallery__buttons_17yvw path {
16
16
  color: var(--color-static-neutral-translucent-1300-inverted);
17
17
  }
18
- .gallery__iconButton_j4lg8 path {
18
+ .gallery__iconButton_17yvw path {
19
19
  color: var(--color-static-neutral-100);
20
20
  }
21
- .gallery__iconButton_j4lg8:hover path {
21
+ .gallery__iconButton_17yvw:hover path {
22
22
  color: var(--color-static-neutral-100-hover);
23
23
  }
24
- .gallery__iconButton_j4lg8:active path {
24
+ .gallery__iconButton_17yvw:active path {
25
25
  color: var(--color-static-neutral-100-press);
26
26
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"iconButton":"gallery__iconButton_j4lg8"};
3
+ var styles = {"iconButton":"gallery__iconButton_17yvw"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -4,7 +4,7 @@
4
4
  --gap-16: var(--gap-m);
5
5
  --gap-32: var(--gap-2xl);
6
6
  }
7
- .gallery__header_pxhek {
7
+ .gallery__header_a4rzd {
8
8
  display: flex;
9
9
  justify-content: space-between;
10
10
  flex-shrink: 0;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"header":"gallery__header_pxhek"};
3
+ var styles = {"header":"gallery__header_a4rzd"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -2,24 +2,24 @@
2
2
  --gap-2xs: 4px;
3
3
  --gap-4: var(--gap-2xs);
4
4
  }
5
- .gallery__info_13n2r {
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
- .gallery__filenameHead_13n2r {
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
- .gallery__filenameContainer_13n2r {
18
+ .gallery__filenameContainer_1m2yi {
19
19
  overflow: hidden;
20
20
  display: inline-flex;
21
21
  }
22
- .gallery__description_13n2r {
22
+ .gallery__description_1m2yi {
23
23
  display: inline;
24
24
  text-overflow: ellipsis;
25
25
  overflow: hidden;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"info":"gallery__info_13n2r","filenameHead":"gallery__filenameHead_13n2r","filenameContainer":"gallery__filenameContainer_13n2r","description":"gallery__description_13n2r"};
3
+ var styles = {"info":"gallery__info_1m2yi","filenameHead":"gallery__filenameHead_1m2yi","filenameContainer":"gallery__filenameContainer_1m2yi","description":"gallery__description_1m2yi"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  --color-static-neutral-0-inverted: #262629;
3
3
  }
4
- .gallery__headerMobile_1vdrb {
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
- .gallery__headerMobile_1vdrb.gallery__video_1vdrb {
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
- .gallery__hide_1vdrb {
19
+ .gallery__hide_16jgu {
20
20
  transform: translateY(-96px);
21
21
  }
22
- .gallery__leftButton_1vdrb,
23
- .gallery__rightButtons_1vdrb {
22
+ .gallery__leftButton_16jgu,
23
+ .gallery__rightButtons_16jgu {
24
24
  display: flex;
25
25
  align-items: center;
26
26
  }
27
- .gallery__description_1vdrb {
27
+ .gallery__description_16jgu {
28
28
  position: absolute;
29
29
  left: 50%;
30
30
  transform: translateX(-50%);
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"headerMobile":"gallery__headerMobile_1vdrb","video":"gallery__video_1vdrb","hide":"gallery__hide_1vdrb","rightButtons":"gallery__rightButtons_1vdrb","description":"gallery__description_1vdrb"};
3
+ var styles = {"headerMobile":"gallery__headerMobile_16jgu","video":"gallery__video_16jgu","hide":"gallery__hide_16jgu","rightButtons":"gallery__rightButtons_16jgu","description":"gallery__description_16jgu"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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
- .gallery__component_30u8l {
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
- .gallery__component_30u8l .gallery__image_30u8l {
22
+ .gallery__component_lgpzj .gallery__image_lgpzj {
23
23
  opacity: 0.3;
24
24
  }
25
- .gallery__component_30u8l.gallery__mobile_30u8l {
25
+ .gallery__component_lgpzj.gallery__mobile_lgpzj {
26
26
  padding: 0;
27
27
  }
28
- .gallery__active_30u8l > .gallery__image_30u8l {
28
+ .gallery__active_lgpzj > .gallery__image_lgpzj {
29
29
  opacity: 1;
30
30
  }
31
- .gallery__preview_30u8l {
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
- .gallery__preview_30u8l.gallery__mobile_30u8l {
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
- .gallery__image_30u8l {
46
+ .gallery__image_lgpzj {
47
47
  transition: opacity 0.15s ease-in-out;
48
48
  }
49
- .gallery__image_30u8l > img {
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
- .gallery__image_30u8l:hover {
59
+ .gallery__image_lgpzj:hover {
60
60
  opacity: 0.7;
61
61
  }
62
- .gallery__loading_30u8l {
62
+ .gallery__loading_lgpzj {
63
63
  background-color: var(--color-static-neutral-100-inverted);
64
64
  }
65
- .gallery__loading_30u8l .gallery__active_30u8l {
65
+ .gallery__loading_lgpzj .gallery__active_lgpzj {
66
66
  background-color: var(--color-static-neutral-300-inverted);
67
67
  }
68
- .gallery__brokenImageWrapper_30u8l {
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
- .gallery__brokenImageWrapper_30u8l.gallery__active_30u8l {
75
+ .gallery__brokenImageWrapper_lgpzj.gallery__active_lgpzj {
76
76
  opacity: 1;
77
77
  }
78
- .gallery__brokenIcon_30u8l {
78
+ .gallery__brokenIcon_lgpzj {
79
79
  width: 40px;
80
80
  height: 40px;
81
81
  }
82
- .gallery__focused_30u8l {
82
+ .gallery__focused_lgpzj {
83
83
  outline: 2px solid var(--focus-color);
84
84
  outline-offset: 2px;
85
85
  }
86
- .gallery__canvasPreview_30u8l {
86
+ .gallery__canvasPreview_lgpzj {
87
87
  border-radius: var(--border-radius-12);
88
88
  }
89
- .gallery__canvasPreview_30u8l.gallery__mobile_30u8l {
89
+ .gallery__canvasPreview_lgpzj.gallery__mobile_lgpzj {
90
90
  border-radius: var(--border-radius-8);
91
91
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"component":"gallery__component_30u8l","image":"gallery__image_30u8l","mobile":"gallery__mobile_30u8l","active":"gallery__active_30u8l","preview":"gallery__preview_30u8l","loading":"gallery__loading_30u8l","brokenImageWrapper":"gallery__brokenImageWrapper_30u8l","brokenIcon":"gallery__brokenIcon_30u8l","focused":"gallery__focused_30u8l","canvasPreview":"gallery__canvasPreview_30u8l"};
3
+ 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"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,3 +1,2 @@
1
1
  import { type FC } from 'react';
2
- import 'swiper/swiper.min.css';
3
2
  export declare const ImageViewer: FC;