@alfalab/core-components-gallery 6.0.0 → 6.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.
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/Component.js +59 -26
  10. package/components/header-mobile/Component.js.map +1 -1
  11. package/components/header-mobile/index.css +6 -6
  12. package/components/header-mobile/index.module.css.js +1 -1
  13. package/components/image-preview/index.css +17 -17
  14. package/components/image-preview/index.module.css.js +1 -1
  15. package/components/image-viewer/component.js +2 -4
  16. package/components/image-viewer/component.js.map +1 -1
  17. package/components/image-viewer/index.css +25 -25
  18. package/components/image-viewer/index.module.css.js +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/header-mobile/Component.js +59 -26
  28. package/cssm/components/header-mobile/Component.js.map +1 -1
  29. package/cssm/components/image-viewer/component.js +2 -4
  30. package/cssm/components/image-viewer/component.js.map +1 -1
  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/Component.js +59 -26
  40. package/esm/components/header-mobile/Component.js.map +1 -1
  41. package/esm/components/header-mobile/index.css +6 -6
  42. package/esm/components/header-mobile/index.module.css.js +1 -1
  43. package/esm/components/image-preview/index.css +17 -17
  44. package/esm/components/image-preview/index.module.css.js +1 -1
  45. package/esm/components/image-viewer/component.js +2 -4
  46. package/esm/components/image-viewer/component.js.map +1 -1
  47. package/esm/components/image-viewer/index.css +25 -25
  48. package/esm/components/image-viewer/index.module.css.js +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/Component.js +41 -15
  70. package/modern/components/header-mobile/Component.js.map +1 -1
  71. package/modern/components/header-mobile/index.css +6 -6
  72. package/modern/components/header-mobile/index.module.css.js +1 -1
  73. package/modern/components/image-preview/index.css +17 -17
  74. package/modern/components/image-preview/index.module.css.js +1 -1
  75. package/modern/components/image-viewer/component.js +2 -4
  76. package/modern/components/image-viewer/component.js.map +1 -1
  77. package/modern/components/image-viewer/index.css +25 -25
  78. package/modern/components/image-viewer/index.module.css.js +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/header-mobile/Component.js +41 -15
  90. package/moderncssm/components/header-mobile/Component.js.map +1 -1
  91. package/moderncssm/components/image-viewer/component.js +2 -4
  92. package/moderncssm/components/image-viewer/component.js.map +1 -1
  93. package/package.json +2 -2
  94. package/src/components/header-mobile/Component.tsx +45 -17
  95. package/src/components/image-viewer/component.tsx +1 -1
@@ -2,16 +2,16 @@
2
2
  --color-static-neutral-translucent-500-inverted: rgba(228, 228, 251, 0.28);
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
- } .gallery__component_1swwl {
5
+ } .gallery__component_1pgxx {
6
6
  background-color: var(--color-static-neutral-translucent-500-inverted);
7
- } .gallery__component_1swwl:hover {
7
+ } .gallery__component_1pgxx:hover {
8
8
  background-color: var(--color-static-neutral-translucent-500-inverted-hover);
9
- } .gallery__component_1swwl:active {
9
+ } .gallery__component_1pgxx:active {
10
10
  background-color: var(--color-static-neutral-translucent-500-inverted-press);
11
- } .gallery__component_1swwl {
11
+ } .gallery__component_1pgxx {
12
12
 
13
13
  transition: transform 1s ease-in-out;
14
14
  will-change: transform;
15
- } .gallery__notVisible_1swwl {
15
+ } .gallery__notVisible_1pgxx {
16
16
  transform: translateY(250%);
17
17
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"gallery__component_1swwl","notVisible":"gallery__notVisible_1swwl"};
5
+ var styles = {"component":"gallery__component_1pgxx","notVisible":"gallery__notVisible_1pgxx"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -6,15 +6,15 @@
6
6
  } :root {
7
7
  --gap-2xl: 32px;
8
8
  --gap-32: var(--gap-2xl);
9
- } .gallery__buttons_1jpnh {
9
+ } .gallery__buttons_18gty {
10
10
  display: flex;
11
11
  padding-left: var(--gap-32)
12
- } .gallery__buttons_1jpnh path {
12
+ } .gallery__buttons_18gty path {
13
13
  color: var(--color-static-neutral-translucent-1300-inverted);
14
- } .gallery__iconButton_1jpnh path {
14
+ } .gallery__iconButton_18gty path {
15
15
  color: var(--color-static-neutral-100);
16
- } .gallery__iconButton_1jpnh:hover path {
16
+ } .gallery__iconButton_18gty:hover path {
17
17
  color: var(--color-static-neutral-100-hover);
18
- } .gallery__iconButton_1jpnh:active path {
18
+ } .gallery__iconButton_18gty:active path {
19
19
  color: var(--color-static-neutral-100-press);
20
20
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"iconButton":"gallery__iconButton_1jpnh"};
5
+ var styles = {"iconButton":"gallery__iconButton_18gty"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -3,7 +3,7 @@
3
3
  --gap-2xl: 32px;
4
4
  --gap-16: var(--gap-m);
5
5
  --gap-32: var(--gap-2xl);
6
- } .gallery__header_1t5pr {
6
+ } .gallery__header_1f9pw {
7
7
  display: flex;
8
8
  justify-content: space-between;
9
9
  flex-shrink: 0;
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"header":"gallery__header_1t5pr"};
5
+ var styles = {"header":"gallery__header_1f9pw"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1,21 +1,21 @@
1
1
  :root {
2
2
  --gap-2xs: 4px;
3
3
  --gap-4: var(--gap-2xs);
4
- } .gallery__info_320qd {
4
+ } .gallery__info_eau9a {
5
5
  height: 100%;
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  justify-content: center;
9
9
  overflow: hidden;
10
- } .gallery__filenameHead_320qd {
10
+ } .gallery__filenameHead_eau9a {
11
11
  display: inline;
12
12
  text-overflow: ellipsis;
13
13
  overflow: hidden;
14
14
  white-space: nowrap;
15
- } .gallery__filenameContainer_320qd {
15
+ } .gallery__filenameContainer_eau9a {
16
16
  overflow: hidden;
17
17
  display: inline-flex;
18
- } .gallery__description_320qd {
18
+ } .gallery__description_eau9a {
19
19
  display: inline;
20
20
  text-overflow: ellipsis;
21
21
  overflow: hidden;
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"info":"gallery__info_320qd","filenameHead":"gallery__filenameHead_320qd","filenameContainer":"gallery__filenameContainer_320qd","description":"gallery__description_320qd"};
5
+ var styles = {"info":"gallery__info_eau9a","filenameHead":"gallery__filenameHead_eau9a","filenameContainer":"gallery__filenameContainer_eau9a","description":"gallery__description_eau9a"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -27,39 +27,72 @@ var HeaderMobile = function () {
27
27
  var canDownload = (_b = currentImage === null || currentImage === void 0 ? void 0 : currentImage.canDownload) !== null && _b !== void 0 ? _b : true;
28
28
  var showDownloadButton = !(meta === null || meta === void 0 ? void 0 : meta.broken) && canDownload;
29
29
  var handleShareClick = function () { return tslib.__awaiter(void 0, void 0, void 0, function () {
30
- var title, image, blob, filesArray, shareData;
31
- var _a;
32
- return tslib.__generator(this, function (_b) {
33
- switch (_b.label) {
30
+ var title, url, response, blob, file, shareData;
31
+ var _b, _c;
32
+ return tslib.__generator(this, function (_d) {
33
+ switch (_d.label) {
34
34
  case 0:
35
- if (!currentImage)
35
+ if (!currentImage || !navigator.share) {
36
36
  return [2 /*return*/];
37
- title = (_a = currentImage.name) !== null && _a !== void 0 ? _a : new Date().toISOString().split('T')[0];
38
- return [4 /*yield*/, fetch(currentImage.src)];
37
+ }
38
+ title = (_b = currentImage.name) !== null && _b !== void 0 ? _b : new Date().toISOString().split('T')[0];
39
+ url = currentImage.src;
40
+ _d.label = 1;
39
41
  case 1:
40
- image = _b.sent();
41
- return [4 /*yield*/, image.blob()];
42
+ _d.trys.push([1, 10, , 12]);
43
+ if (!utils.isVideo(url)) return [3 /*break*/, 3];
44
+ // Если видео — всегда делим ссылку
45
+ return [4 /*yield*/, navigator.share({
46
+ title: title,
47
+ url: url,
48
+ text: 'Видео',
49
+ })];
42
50
  case 2:
43
- blob = _b.sent();
44
- filesArray = [
45
- new File([blob], title, {
46
- type: blob.type,
47
- lastModified: new Date().getTime(),
48
- }),
49
- ];
51
+ // Если видео — всегда делим ссылку
52
+ _d.sent();
53
+ return [2 /*return*/];
54
+ case 3: return [4 /*yield*/, fetch(url, { mode: 'cors' })];
55
+ case 4:
56
+ response = _d.sent();
57
+ return [4 /*yield*/, response.blob()];
58
+ case 5:
59
+ blob = _d.sent();
60
+ file = new File([blob], "".concat(title, ".png"), {
61
+ type: blob.type,
62
+ lastModified: Date.now(),
63
+ });
50
64
  shareData = {
51
- files: filesArray,
65
+ files: [file],
66
+ title: title,
67
+ text: 'Картинка',
52
68
  };
53
- if (!(navigator.canShare(shareData) && !utils.isVideo(currentImage.src))) return [3 /*break*/, 4];
69
+ if (!(((_c = navigator.canShare) === null || _c === void 0 ? void 0 : _c.call(navigator, shareData)) && response.ok)) return [3 /*break*/, 7];
54
70
  return [4 /*yield*/, navigator.share(shareData)];
55
- case 3:
56
- _b.sent();
57
- return [3 /*break*/, 6];
58
- case 4: return [4 /*yield*/, navigator.share({ url: currentImage.src, title: title })];
59
- case 5:
60
- _b.sent();
61
- _b.label = 6;
62
- case 6: return [2 /*return*/];
71
+ case 6:
72
+ _d.sent();
73
+ return [3 /*break*/, 9];
74
+ case 7:
75
+ // Fallback: делимся только ссылкой
76
+ return [4 /*yield*/, navigator.share({
77
+ title: title,
78
+ text: 'Картинка',
79
+ url: url,
80
+ })];
81
+ case 8:
82
+ // Fallback: делимся только ссылкой
83
+ _d.sent();
84
+ _d.label = 9;
85
+ case 9: return [3 /*break*/, 12];
86
+ case 10:
87
+ _d.sent();
88
+ return [4 /*yield*/, navigator.share({
89
+ title: title,
90
+ url: url,
91
+ })];
92
+ case 11:
93
+ _d.sent();
94
+ return [3 /*break*/, 12];
95
+ case 12: return [2 /*return*/];
63
96
  }
64
97
  });
65
98
  }); };
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../src/components/header-mobile/Component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { GalleryContext } from '../../context';\nimport { isVideo, TestIds } from '../../utils';\nimport * as Buttons from '../buttons';\n\nimport styles from './index.module.css';\n\nexport const HeaderMobile = () => {\n const {\n onClose,\n images,\n currentSlideIndex,\n getCurrentImage,\n getCurrentImageMeta,\n hideNavigation,\n } = useContext(GalleryContext);\n\n const currentImage = getCurrentImage();\n const meta = getCurrentImageMeta();\n\n const description = images.length > 1 && `${currentSlideIndex + 1} из ${images.length}`;\n\n const canDownload = currentImage?.canDownload ?? true;\n const showDownloadButton = !meta?.broken && canDownload;\n\n const handleShareClick = async () => {\n if (!currentImage) return;\n\n const title = currentImage.name ?? new Date().toISOString().split('T')[0];\n\n const image = await fetch(currentImage.src);\n const blob = await image.blob();\n\n const filesArray = [\n new File([blob], title, {\n type: blob.type,\n lastModified: new Date().getTime(),\n }),\n ];\n\n const shareData = {\n files: filesArray,\n };\n\n if (navigator.canShare(shareData) && !isVideo(currentImage.src)) {\n await navigator.share(shareData);\n } else {\n await navigator.share({ url: currentImage.src, title });\n }\n };\n\n return (\n <div\n className={cn(styles.headerMobile, {\n [styles.video]: isVideo(currentImage?.src),\n [styles.hide]: hideNavigation,\n })}\n >\n <Buttons.BackArrow onClick={onClose} />\n <Text\n className={styles.description}\n tag='div'\n view='component-primary'\n color='static-primary-light'\n >\n {description}\n </Text>\n <div className={styles.rightButtons}>\n {showDownloadButton && (\n <Buttons.Download\n href={currentImage?.src}\n download={currentImage?.name}\n dataTestId={TestIds.DOWNLOAD_BUTTON}\n />\n )}\n {!meta?.broken && <Buttons.Share onClick={handleShareClick} />}\n </div>\n </div>\n );\n};\n"],"names":["useContext","GalleryContext","__awaiter","isVideo","React","cn","styles","Buttons.BackArrow","Text","Buttons.Download","TestIds","Buttons.Share"],"mappings":";;;;;;;;;;;;;;;;;;;AAWa,IAAA,YAAY,GAAG,YAAA;;;IAClB,IAAA,EAAA,GAOFA,gBAAU,CAACC,sBAAc,CAAC,EAN1B,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,iBAAiB,GAAA,EAAA,CAAA,iBAAA,EACjB,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,mBAAmB,GAAA,EAAA,CAAA,mBAAA,EACnB,cAAc,GAAA,EAAA,CAAA,cACY;AAE9B,IAAA,IAAM,YAAY,GAAG,eAAe,EAAE;AACtC,IAAA,IAAM,IAAI,GAAG,mBAAmB,EAAE;AAElC,IAAA,IAAM,WAAW,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,EAAG,CAAA,MAAA,CAAA,iBAAiB,GAAG,CAAC,EAAA,gBAAA,CAAA,CAAA,MAAA,CAAO,MAAM,CAAC,MAAM,CAAE;AAEvF,IAAA,IAAM,WAAW,GAAG,CAAA,EAAA,GAAA,YAAY,KAAZ,IAAA,IAAA,YAAY,KAAZ,MAAA,GAAA,MAAA,GAAA,YAAY,CAAE,WAAW,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI;AACrD,IAAA,IAAM,kBAAkB,GAAG,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,KAAJ,MAAA,GAAA,MAAA,GAAA,IAAI,CAAE,MAAM,CAAA,IAAI,WA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AACO,WAAa,IAAC,OAAO,EAAE,gBAAgB,EAAI,CAAA,CAC5D,CACJ;AAEd;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../src/components/header-mobile/Component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { GalleryContext } from '../../context';\nimport { isVideo, TestIds } from '../../utils';\nimport * as Buttons from '../buttons';\n\nimport styles from './index.module.css';\n\nexport const HeaderMobile = () => {\n const {\n onClose,\n images,\n currentSlideIndex,\n getCurrentImage,\n getCurrentImageMeta,\n hideNavigation,\n } = useContext(GalleryContext);\n\n const currentImage = getCurrentImage();\n const meta = getCurrentImageMeta();\n\n const description = images.length > 1 && `${currentSlideIndex + 1} из ${images.length}`;\n\n const canDownload = currentImage?.canDownload ?? true;\n const showDownloadButton = !meta?.broken && canDownload;\n\n const handleShareClick = async () => {\n if (!currentImage || !navigator.share) {\n return;\n }\n\n const title = currentImage.name ?? new Date().toISOString().split('T')[0];\n const url = currentImage.src;\n\n try {\n if (isVideo(url)) {\n // Если видео — всегда делим ссылку\n await navigator.share({\n title,\n url,\n text: 'Видео',\n });\n\n return;\n }\n\n // Попробуем скачать изображение\n const response = await fetch(url, { mode: 'cors' });\n const blob = await response.blob();\n\n const file = new File([blob], `${title}.png`, {\n type: blob.type,\n lastModified: Date.now(),\n });\n\n const shareData: ShareData = {\n files: [file],\n title,\n text: 'Картинка',\n };\n\n // Попробуем поделиться файлом\n if (navigator.canShare?.(shareData) && response.ok) {\n await navigator.share(shareData);\n } else {\n // Fallback: делимся только ссылкой\n await navigator.share({\n title,\n text: 'Картинка',\n url,\n });\n }\n } catch {\n await navigator.share({\n title,\n url,\n });\n }\n };\n\n return (\n <div\n className={cn(styles.headerMobile, {\n [styles.video]: isVideo(currentImage?.src),\n [styles.hide]: hideNavigation,\n })}\n >\n <Buttons.BackArrow onClick={onClose} />\n <Text\n className={styles.description}\n tag='div'\n view='component-primary'\n color='static-primary-light'\n >\n {description}\n </Text>\n <div className={styles.rightButtons}>\n {showDownloadButton && (\n <Buttons.Download\n href={currentImage?.src}\n download={currentImage?.name}\n dataTestId={TestIds.DOWNLOAD_BUTTON}\n />\n )}\n {!meta?.broken && <Buttons.Share onClick={handleShareClick} />}\n </div>\n </div>\n );\n};\n"],"names":["useContext","GalleryContext","__awaiter","isVideo","React","cn","styles","Buttons.BackArrow","Text","Buttons.Download","TestIds","Buttons.Share"],"mappings":";;;;;;;;;;;;;;;;;;;AAWa,IAAA,YAAY,GAAG,YAAA;;;IAClB,IAAA,EAAA,GAOFA,gBAAU,CAACC,sBAAc,CAAC,EAN1B,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,iBAAiB,GAAA,EAAA,CAAA,iBAAA,EACjB,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,mBAAmB,GAAA,EAAA,CAAA,mBAAA,EACnB,cAAc,GAAA,EAAA,CAAA,cACY;AAE9B,IAAA,IAAM,YAAY,GAAG,eAAe,EAAE;AACtC,IAAA,IAAM,IAAI,GAAG,mBAAmB,EAAE;AAElC,IAAA,IAAM,WAAW,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,EAAG,CAAA,MAAA,CAAA,iBAAiB,GAAG,CAAC,EAAA,gBAAA,CAAA,CAAA,MAAA,CAAO,MAAM,CAAC,MAAM,CAAE;AAEvF,IAAA,IAAM,WAAW,GAAG,CAAA,EAAA,GAAA,YAAY,KAAZ,IAAA,IAAA,YAAY,KAAZ,MAAA,GAAA,MAAA,GAAA,YAAY,CAAE,WAAW,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI;AACrD,IAAA,IAAM,kBAAkB,GAAG,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,KAAJ,MAAA,GAAA,MAAA,GAAA,IAAI,CAAE,MAAM,CAAA,IAAI,WAAW;AAEvD,IAAA,IAAM,gBAAg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Ac;AAC/B,YAAA,EAAA,EAAA,EAAA;AAEF,QAAAF,sBAAA,CAAA,aAAA,CAACG,eAAiB,IAAC,OAAO,EAAE,OAAO,EAAI,CAAA;QACvCH,sBAAC,CAAA,aAAA,CAAAI,6BAAI,IACD,SAAS,EAAEF,YAAM,CAAC,WAAW,EAC7B,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAC,sBAAsB,EAE3B,EAAA,WAAW,CACT;AACP,QAAAF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEE,YAAM,CAAC,YAAY,EAAA;AAC9B,YAAA,kBAAkB,KACfF,sBAAC,CAAA,aAAA,CAAAK,cAAgB,EAAA,EACb,IAAI,EAAE,YAAY,KAAA,IAAA,IAAZ,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZ,YAAY,CAAE,GAAG,EACvB,QAAQ,EAAE,YAAY,KAAZ,IAAA,IAAA,YAAY,uBAAZ,YAAY,CAAE,IAAI,EAC5B,UAAU,EAAEC,iBAAO,CAAC,eAAe,GACrC,CACL;YACA,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAA,IAAIN,sBAAA,CAAA,aAAA,CAACO,WAAa,IAAC,OAAO,EAAE,gBAAgB,EAAI,CAAA,CAC5D,CACJ;AAEd;;;;"}
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  --color-static-neutral-0-inverted: #262629;
3
- } .gallery__headerMobile_66ni5 {
3
+ } .gallery__headerMobile_161it {
4
4
  position: relative;
5
5
  height: 72px;
6
6
  z-index: 3;
@@ -8,18 +8,18 @@
8
8
  display: flex;
9
9
  justify-content: space-between;
10
10
  align-items: center
11
- } .gallery__headerMobile_66ni5.gallery__video_66ni5 {
11
+ } .gallery__headerMobile_161it.gallery__video_161it {
12
12
  position: absolute;
13
13
  width: 100%;
14
14
  background-color: var(--color-static-neutral-0-inverted);
15
15
  transition: transform 0.3s ease-in-out;
16
- } .gallery__hide_66ni5 {
16
+ } .gallery__hide_161it {
17
17
  transform: translateY(-96px);
18
- } .gallery__leftButton_66ni5,
19
- .gallery__rightButtons_66ni5 {
18
+ } .gallery__leftButton_161it,
19
+ .gallery__rightButtons_161it {
20
20
  display: flex;
21
21
  align-items: center;
22
- } .gallery__description_66ni5 {
22
+ } .gallery__description_161it {
23
23
  position: absolute;
24
24
  left: 50%;
25
25
  transform: translateX(-50%);
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"headerMobile":"gallery__headerMobile_66ni5","video":"gallery__video_66ni5","hide":"gallery__hide_66ni5","rightButtons":"gallery__rightButtons_66ni5","description":"gallery__description_66ni5"};
5
+ var styles = {"headerMobile":"gallery__headerMobile_161it","video":"gallery__video_161it","hide":"gallery__hide_161it","rightButtons":"gallery__rightButtons_161it","description":"gallery__description_161it"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -9,19 +9,19 @@
9
9
  --border-radius-12: var(--border-radius-l);
10
10
  } :root {
11
11
  --focus-color: var(--color-light-status-info);
12
- } .gallery__component_11gw9 {
12
+ } .gallery__component_1cpps {
13
13
  display: flex;
14
14
  z-index: 3;
15
15
  overflow: hidden;
16
16
  transition: border 0.15s ease-in-out;
17
17
  outline: none
18
- } .gallery__component_11gw9 .gallery__image_11gw9 {
18
+ } .gallery__component_1cpps .gallery__image_1cpps {
19
19
  opacity: 0.3;
20
- } .gallery__component_11gw9.gallery__mobile_11gw9 {
20
+ } .gallery__component_1cpps.gallery__mobile_1cpps {
21
21
  padding: 0;
22
- } .gallery__active_11gw9 > .gallery__image_11gw9 {
22
+ } .gallery__active_1cpps > .gallery__image_1cpps {
23
23
  opacity: 1;
24
- } .gallery__preview_11gw9 {
24
+ } .gallery__preview_1cpps {
25
25
  width: 56px;
26
26
  height: 56px;
27
27
  flex-shrink: 0;
@@ -30,13 +30,13 @@
30
30
  -webkit-user-select: none;
31
31
  -moz-user-select: none;
32
32
  user-select: none
33
- } .gallery__preview_11gw9.gallery__mobile_11gw9 {
33
+ } .gallery__preview_1cpps.gallery__mobile_1cpps {
34
34
  width: 46px;
35
35
  height: 46px;
36
36
  border-radius: var(--border-radius-8);
37
- } .gallery__image_11gw9 {
37
+ } .gallery__image_1cpps {
38
38
  transition: opacity 0.15s ease-in-out
39
- } .gallery__image_11gw9 > img {
39
+ } .gallery__image_1cpps > img {
40
40
  display: block;
41
41
  width: 100%;
42
42
  height: 100%;
@@ -45,28 +45,28 @@
45
45
  object-fit: cover;
46
46
  overflow: clip;
47
47
  overflow-clip-margin: border-box;
48
- } .gallery__image_11gw9:hover {
48
+ } .gallery__image_1cpps:hover {
49
49
  opacity: 0.7;
50
- } .gallery__loading_11gw9 {
50
+ } .gallery__loading_1cpps {
51
51
  background-color: var(--color-static-neutral-100-inverted)
52
- } .gallery__loading_11gw9 .gallery__active_11gw9 {
52
+ } .gallery__loading_1cpps .gallery__active_1cpps {
53
53
  background-color: var(--color-static-neutral-300-inverted);
54
- } .gallery__brokenImageWrapper_11gw9 {
54
+ } .gallery__brokenImageWrapper_1cpps {
55
55
  display: flex;
56
56
  justify-content: center;
57
57
  align-items: center;
58
58
  background-color: var(--color-static-neutral-300-inverted);
59
59
  opacity: 0.3
60
- } .gallery__brokenImageWrapper_11gw9.gallery__active_11gw9 {
60
+ } .gallery__brokenImageWrapper_1cpps.gallery__active_1cpps {
61
61
  opacity: 1;
62
- } .gallery__brokenIcon_11gw9 {
62
+ } .gallery__brokenIcon_1cpps {
63
63
  width: 40px;
64
64
  height: 40px;
65
- } .gallery__focused_11gw9 {
65
+ } .gallery__focused_1cpps {
66
66
  outline: 2px solid var(--focus-color);
67
67
  outline-offset: 2px;
68
- } .gallery__canvasPreview_11gw9 {
68
+ } .gallery__canvasPreview_1cpps {
69
69
  border-radius: var(--border-radius-12)
70
- } .gallery__canvasPreview_11gw9.gallery__mobile_11gw9 {
70
+ } .gallery__canvasPreview_1cpps.gallery__mobile_1cpps {
71
71
  border-radius: var(--border-radius-8);
72
72
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"gallery__component_11gw9","image":"gallery__image_11gw9","mobile":"gallery__mobile_11gw9","active":"gallery__active_11gw9","preview":"gallery__preview_11gw9","loading":"gallery__loading_11gw9","brokenImageWrapper":"gallery__brokenImageWrapper_11gw9","brokenIcon":"gallery__brokenIcon_11gw9","focused":"gallery__focused_11gw9","canvasPreview":"gallery__canvasPreview_11gw9"};
5
+ var styles = {"component":"gallery__component_1cpps","image":"gallery__image_1cpps","mobile":"gallery__mobile_1cpps","active":"gallery__active_1cpps","preview":"gallery__preview_1cpps","loading":"gallery__loading_1cpps","brokenImageWrapper":"gallery__brokenImageWrapper_1cpps","brokenIcon":"gallery__brokenIcon_1cpps","focused":"gallery__focused_1cpps","canvasPreview":"gallery__canvasPreview_1cpps"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -88,12 +88,10 @@ var ImageViewer = function () {
88
88
  var swiperWidth = (swiper === null || swiper === void 0 ? void 0 : swiper.width) || 1;
89
89
  var swiperHeight = (swiper === null || swiper === void 0 ? void 0 : swiper.height) || (swiper === null || swiper === void 0 ? void 0 : swiper.width) || 1;
90
90
  var swiperAspectRatio = swiperWidth / swiperHeight;
91
- return (
92
- /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
93
- React__default.default.createElement("div", { className: cn__default.default(index_module.component, (_a = {},
91
+ return (React__default.default.createElement("div", { className: cn__default.default(index_module.component, (_a = {},
94
92
  _a[index_module.mobile] = isMobile,
95
93
  _a[index_module.mobileVideo] = isMobile && utils.isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
96
- _a)), onClick: handleWrapperClick },
94
+ _a)), "aria-hidden": true, onClick: handleWrapperClick },
97
95
  showControls && (React__default.default.createElement("div", { className: cn__default.default(index_module.arrow, (_b = {},
98
96
  _b[index_module.focused] = leftArrowFocused,
99
97
  _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": constants.TestIds.PREV_SLIDE_BUTTON },
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/components/image-viewer/component.tsx"],"sourcesContent":["import React, { FC, 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 /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n <div\n className={cn(styles.component, {\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n })}\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,E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 {"version":3,"file":"component.js","sources":["../../src/components/image-viewer/component.tsx"],"sourcesContent":["import React, { FC, 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,kBAA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,EAAE,SAAS;AAChC,iBAAA,EAAA,EAEA,UAAC,EAAY,EAAA;AAAV,gBAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA;AAAO,gBAAA,QACfP,sBAAC,CAAA,aAAA,CAAAQ,WAAK,EACF,EAAA,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,EAAE,iBAAiB,EACvC,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,YAAY,EAC7B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,GAC5B;aACL,CACS;AAEtB,SAAC,CAAC,CACG;QAER,YAAY,KACTR,sBACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEH,mBAAE,CAACC,YAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAACA,YAAM,CAAC,OAAO,CAAA,GAAG,iBAAiB;oBACrC,EACF,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,aAAa,gBACP,2HAAuB,EAAA,cAAA,EACpBG,iBAAO,CAAC,iBAAiB,EAAA;AAEvC,YAAAD,sBAAA,CAAA,aAAA,CAACS,iDAAwB,EAAG,IAAA,CAAA,CAC1B,CACT,CACC;AAEd;;;;"}
@@ -19,23 +19,23 @@
19
19
  --gap-32: var(--gap-2xl);
20
20
  } :root {
21
21
  --focus-color: var(--color-light-status-info);
22
- } .gallery__component_1kdji {
22
+ } .gallery__component_1eaei {
23
23
  display: flex;
24
24
  flex-grow: 1;
25
25
  justify-content: center;
26
26
  background-color: var(--color-static-neutral-0-inverted);
27
- } .gallery__swiper_1kdji {
27
+ } .gallery__swiper_1eaei {
28
28
  display: flex;
29
29
  width: 100%;
30
30
  height: 100%;
31
31
  max-height: calc(100vh - 168px);
32
32
  padding: var(--gap-32) var(--gap-16);
33
33
  box-sizing: border-box
34
- } .gallery__swiper_1kdji.gallery__mobile_1kdji {
34
+ } .gallery__swiper_1eaei.gallery__mobile_1eaei {
35
35
  max-height: calc(100vh - 210px);
36
- } .gallery__swiper_1kdji.gallery__mobileVideo_1kdji {
36
+ } .gallery__swiper_1eaei.gallery__mobileVideo_1eaei {
37
37
  max-height: 100vh;
38
- } .gallery__singleSlideContainer_1kdji {
38
+ } .gallery__singleSlideContainer_1eaei {
39
39
  display: flex;
40
40
  width: 100%;
41
41
  height: 100%;
@@ -43,49 +43,49 @@
43
43
  max-height: calc(100vh - 80px);
44
44
  padding: var(--gap-32);
45
45
  box-sizing: border-box
46
- } .gallery__singleSlideContainer_1kdji.gallery__mobile_1kdji {
46
+ } .gallery__singleSlideContainer_1eaei.gallery__mobile_1eaei {
47
47
  max-height: calc(100vh - 174px);
48
48
  padding: 0;
49
- } .gallery__singleSlideContainer_1kdji.gallery__mobileVideo_1kdji {
49
+ } .gallery__singleSlideContainer_1eaei.gallery__mobileVideo_1eaei {
50
50
  max-height: 100vh;
51
- } .gallery__hidden_1kdji {
51
+ } .gallery__hidden_1eaei {
52
52
  display: none;
53
- } .gallery__slide_1kdji {
53
+ } .gallery__slide_1eaei {
54
54
  position: relative;
55
55
  display: flex;
56
56
  justify-content: center;
57
57
  align-items: center;
58
58
  width: 100%;
59
59
  height: 100%;
60
- } .gallery__slideLoading_1kdji {
60
+ } .gallery__slideLoading_1eaei {
61
61
  background-color: var(--color-static-neutral-translucent-100-inverted);
62
62
  border-radius: var(--border-radius-8);
63
- } .gallery__spinner_1kdji {
63
+ } .gallery__spinner_1eaei {
64
64
  position: absolute;
65
65
  color: var(--color-static-neutral-translucent-1300-inverted);
66
- } .gallery__image_1kdji {
66
+ } .gallery__image_1eaei {
67
67
  width: 0;
68
68
  height: 0;
69
69
  -webkit-user-select: none;
70
70
  -moz-user-select: none;
71
71
  user-select: none;
72
72
  border-radius: var(--border-radius-8)
73
- } .gallery__image_1kdji.gallery__mobile_1kdji {
73
+ } .gallery__image_1eaei.gallery__mobile_1eaei {
74
74
  border-radius: var(--border-radius-0);
75
- } .gallery__smallImage_1kdji {
75
+ } .gallery__smallImage_1eaei {
76
76
  position: relative;
77
77
  width: auto;
78
78
  height: auto;
79
79
  -webkit-user-select: none;
80
80
  -moz-user-select: none;
81
81
  user-select: none;
82
- } .gallery__verticalImageFit_1kdji {
82
+ } .gallery__verticalImageFit_1eaei {
83
83
  width: auto;
84
84
  height: 100%;
85
- } .gallery__horizontalImageFit_1kdji {
85
+ } .gallery__horizontalImageFit_1eaei {
86
86
  width: 100%;
87
87
  height: auto;
88
- } .gallery__arrow_1kdji {
88
+ } .gallery__arrow_1eaei {
89
89
  display: flex;
90
90
  flex-direction: column;
91
91
  justify-content: center;
@@ -97,14 +97,14 @@
97
97
  color: var(--color-static-neutral-translucent-1300-inverted);
98
98
  transition: background-color 0.15s ease-in-out;
99
99
  outline: none
100
- } .gallery__arrow_1kdji:hover {
100
+ } .gallery__arrow_1eaei:hover {
101
101
  background-color: var(--color-static-neutral-0-inverted-hover);
102
- } .gallery__arrow_1kdji:active {
102
+ } .gallery__arrow_1eaei:active {
103
103
  background-color: var(--color-static-neutral-0-inverted-press);
104
- } .gallery__focused_1kdji {
104
+ } .gallery__focused_1eaei {
105
105
  outline: 2px solid var(--focus-color);
106
106
  outline-offset: 2px;
107
- } .gallery__placeholder_1kdji {
107
+ } .gallery__placeholder_1eaei {
108
108
  display: flex;
109
109
  justify-content: center;
110
110
  align-items: center;
@@ -112,22 +112,22 @@
112
112
  height: 100%;
113
113
  border-radius: var(--border-radius-8);
114
114
  background-color: var(--color-static-neutral-300-inverted);
115
- } .gallery__brokenImgWrapper_1kdji {
115
+ } .gallery__brokenImgWrapper_1eaei {
116
116
  position: relative;
117
117
  display: flex;
118
118
  flex-direction: column;
119
119
  align-items: center;
120
120
  width: 150px;
121
121
  text-align: center;
122
- } .gallery__brokenImgIcon_1kdji {
122
+ } .gallery__brokenImgIcon_1eaei {
123
123
  width: 80px;
124
124
  height: 80px;
125
125
  margin-bottom: var(--gap-2xs);
126
- } .gallery__fullScreenImage_1kdji {
126
+ } .gallery__fullScreenImage_1eaei {
127
127
  width: 100%;
128
128
  height: auto;
129
129
  background-color: var(--color-light-base-bg-primary);
130
- } .gallery__fullScreenVideo_1kdji {
130
+ } .gallery__fullScreenVideo_1eaei {
131
131
  width: calc(100% - 192px);
132
132
  max-height: calc(100vh - 82px);
133
133
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"gallery__component_1kdji","swiper":"gallery__swiper_1kdji","mobile":"gallery__mobile_1kdji","mobileVideo":"gallery__mobileVideo_1kdji","singleSlideContainer":"gallery__singleSlideContainer_1kdji","hidden":"gallery__hidden_1kdji","slide":"gallery__slide_1kdji","slideLoading":"gallery__slideLoading_1kdji","spinner":"gallery__spinner_1kdji","image":"gallery__image_1kdji","smallImage":"gallery__smallImage_1kdji","verticalImageFit":"gallery__verticalImageFit_1kdji","horizontalImageFit":"gallery__horizontalImageFit_1kdji","arrow":"gallery__arrow_1kdji","focused":"gallery__focused_1kdji","placeholder":"gallery__placeholder_1kdji","brokenImgWrapper":"gallery__brokenImgWrapper_1kdji","brokenImgIcon":"gallery__brokenImgIcon_1kdji","fullScreenImage":"gallery__fullScreenImage_1kdji","fullScreenVideo":"gallery__fullScreenVideo_1kdji"};
5
+ var styles = {"component":"gallery__component_1eaei","swiper":"gallery__swiper_1eaei","mobile":"gallery__mobile_1eaei","mobileVideo":"gallery__mobileVideo_1eaei","singleSlideContainer":"gallery__singleSlideContainer_1eaei","hidden":"gallery__hidden_1eaei","slide":"gallery__slide_1eaei","slideLoading":"gallery__slideLoading_1eaei","spinner":"gallery__spinner_1eaei","image":"gallery__image_1eaei","smallImage":"gallery__smallImage_1eaei","verticalImageFit":"gallery__verticalImageFit_1eaei","horizontalImageFit":"gallery__horizontalImageFit_1eaei","arrow":"gallery__arrow_1eaei","focused":"gallery__focused_1eaei","placeholder":"gallery__placeholder_1eaei","brokenImgWrapper":"gallery__brokenImgWrapper_1eaei","brokenImgIcon":"gallery__brokenImgIcon_1eaei","fullScreenImage":"gallery__fullScreenImage_1eaei","fullScreenVideo":"gallery__fullScreenVideo_1eaei"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map