@alfalab/core-components-gallery 6.0.1-snapshot-c2c8d5a → 6.0.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/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 +11 -11
  94. package/src/components/header-mobile/Component.tsx +45 -17
  95. package/src/components/image-viewer/component.tsx +1 -1
package/index.css CHANGED
@@ -10,7 +10,7 @@
10
10
  } :root {
11
11
  --sat: env(safe-area-inset-top, var(--gap-0));
12
12
  --sab: env(safe-area-inset-bottom, var(--gap-0));
13
- } .gallery__container_1hoow {
13
+ } .gallery__container_ywvi1 {
14
14
  position: relative;
15
15
  overflow-x: hidden;
16
16
  overflow-y: auto;
@@ -22,14 +22,14 @@
22
22
  background-color: var(--color-static-neutral-0-inverted);
23
23
  padding-top: var(--sat);
24
24
  padding-bottom: var(--sab)
25
- } .gallery__container_1hoow.gallery__mobile_1hoow {
25
+ } .gallery__container_ywvi1.gallery__mobile_ywvi1 {
26
26
  overflow: hidden;
27
- } .gallery__modal_1hoow {
27
+ } .gallery__modal_ywvi1 {
28
28
  flex-grow: 1;
29
29
  width: 100vw;
30
30
  height: 100vh;
31
31
  background: transparent;
32
- } .gallery__navigationVideo_1hoow {
32
+ } .gallery__navigationVideo_ywvi1 {
33
33
  z-index: 3;
34
34
  width: 100%;
35
35
  position: absolute;
@@ -37,15 +37,15 @@
37
37
  left: 0;
38
38
  transition: transform 0.3s ease-in-out;
39
39
  text-align: center;
40
- } .gallery__hide_1hoow {
40
+ } .gallery__hide_ywvi1 {
41
41
  transform: translateY(114px);
42
- } .gallery__hideInfo_1hoow {
42
+ } .gallery__hideInfo_ywvi1 {
43
43
  transform: translateY(48px);
44
- } .gallery__bottomButton_1hoow {
44
+ } .gallery__bottomButton_ywvi1 {
45
45
  width: calc(100% - var(--gap-32));
46
46
  margin: var(--gap-16);
47
47
  background-color: var(--color-static-neutral-translucent-500-inverted);
48
- } .gallery__subtitles_1hoow {
48
+ } .gallery__subtitles_ywvi1 {
49
49
  padding: var(--gap-0) var(--gap-32);
50
50
  margin-bottom: var(--gap-16);
51
51
  width: 100%;
@@ -53,6 +53,6 @@
53
53
  opacity: 1;
54
54
  z-index: 1;
55
55
  transition: opacity 500ms ease-in-out, margin-bottom 270ms ease-in-out;
56
- } .gallery__hideSubtitles_1hoow {
56
+ } .gallery__hideSubtitles_ywvi1 {
57
57
  opacity: 0;
58
58
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"container":"gallery__container_1hoow","mobile":"gallery__mobile_1hoow","modal":"gallery__modal_1hoow","navigationVideo":"gallery__navigationVideo_1hoow","hide":"gallery__hide_1hoow","hideInfo":"gallery__hideInfo_1hoow","bottomButton":"gallery__bottomButton_1hoow"};
5
+ var styles = {"container":"gallery__container_ywvi1","mobile":"gallery__mobile_ywvi1","modal":"gallery__modal_ywvi1","navigationVideo":"gallery__navigationVideo_ywvi1","hide":"gallery__hide_ywvi1","hideInfo":"gallery__hideInfo_ywvi1","bottomButton":"gallery__bottomButton_ywvi1"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -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_130sr {
5
+ } .gallery__component_38m55 {
6
6
  background-color: var(--color-static-neutral-translucent-500-inverted);
7
- } .gallery__component_130sr:hover {
7
+ } .gallery__component_38m55:hover {
8
8
  background-color: var(--color-static-neutral-translucent-500-inverted-hover);
9
- } .gallery__component_130sr:active {
9
+ } .gallery__component_38m55:active {
10
10
  background-color: var(--color-static-neutral-translucent-500-inverted-press);
11
- } .gallery__component_130sr {
11
+ } .gallery__component_38m55 {
12
12
 
13
13
  transition: transform 1s ease-in-out;
14
14
  will-change: transform;
15
- } .gallery__notVisible_130sr {
15
+ } .gallery__notVisible_38m55 {
16
16
  transform: translateY(250%);
17
17
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"gallery__component_130sr","notVisible":"gallery__notVisible_130sr"};
3
+ const styles = {"component":"gallery__component_38m55","notVisible":"gallery__notVisible_38m55"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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_1jdn6 {
9
+ } .gallery__buttons_imnex {
10
10
  display: flex;
11
11
  padding-left: var(--gap-32)
12
- } .gallery__buttons_1jdn6 path {
12
+ } .gallery__buttons_imnex path {
13
13
  color: var(--color-static-neutral-translucent-1300-inverted);
14
- } .gallery__iconButton_1jdn6 path {
14
+ } .gallery__iconButton_imnex path {
15
15
  color: var(--color-static-neutral-100);
16
- } .gallery__iconButton_1jdn6:hover path {
16
+ } .gallery__iconButton_imnex:hover path {
17
17
  color: var(--color-static-neutral-100-hover);
18
- } .gallery__iconButton_1jdn6:active path {
18
+ } .gallery__iconButton_imnex:active path {
19
19
  color: var(--color-static-neutral-100-press);
20
20
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"iconButton":"gallery__iconButton_1jdn6"};
3
+ const styles = {"iconButton":"gallery__iconButton_imnex"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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_12b1c {
6
+ } .gallery__header_1jtnj {
7
7
  display: flex;
8
8
  justify-content: space-between;
9
9
  flex-shrink: 0;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"header":"gallery__header_12b1c"};
3
+ const styles = {"header":"gallery__header_1jtnj"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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_1t3gv {
4
+ } .gallery__info_ce2y0 {
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_1t3gv {
10
+ } .gallery__filenameHead_ce2y0 {
11
11
  display: inline;
12
12
  text-overflow: ellipsis;
13
13
  overflow: hidden;
14
14
  white-space: nowrap;
15
- } .gallery__filenameContainer_1t3gv {
15
+ } .gallery__filenameContainer_ce2y0 {
16
16
  overflow: hidden;
17
17
  display: inline-flex;
18
- } .gallery__description_1t3gv {
18
+ } .gallery__description_ce2y0 {
19
19
  display: inline;
20
20
  text-overflow: ellipsis;
21
21
  overflow: hidden;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"info":"gallery__info_1t3gv","filenameHead":"gallery__filenameHead_1t3gv","filenameContainer":"gallery__filenameContainer_1t3gv","description":"gallery__description_1t3gv"};
3
+ const styles = {"info":"gallery__info_ce2y0","filenameHead":"gallery__filenameHead_ce2y0","filenameContainer":"gallery__filenameContainer_ce2y0","description":"gallery__description_ce2y0"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -15,25 +15,51 @@ const HeaderMobile = () => {
15
15
  const canDownload = currentImage?.canDownload ?? true;
16
16
  const showDownloadButton = !meta?.broken && canDownload;
17
17
  const handleShareClick = async () => {
18
- if (!currentImage)
18
+ if (!currentImage || !navigator.share) {
19
19
  return;
20
+ }
20
21
  const title = currentImage.name ?? new Date().toISOString().split('T')[0];
21
- const image = await fetch(currentImage.src);
22
- const blob = await image.blob();
23
- const filesArray = [
24
- new File([blob], title, {
22
+ const url = currentImage.src;
23
+ try {
24
+ if (isVideo(url)) {
25
+ // Если видео — всегда делим ссылку
26
+ await navigator.share({
27
+ title,
28
+ url,
29
+ text: 'Видео',
30
+ });
31
+ return;
32
+ }
33
+ // Попробуем скачать изображение
34
+ const response = await fetch(url, { mode: 'cors' });
35
+ const blob = await response.blob();
36
+ const file = new File([blob], `${title}.png`, {
25
37
  type: blob.type,
26
- lastModified: new Date().getTime(),
27
- }),
28
- ];
29
- const shareData = {
30
- files: filesArray,
31
- };
32
- if (navigator.canShare(shareData) && !isVideo(currentImage.src)) {
33
- await navigator.share(shareData);
38
+ lastModified: Date.now(),
39
+ });
40
+ const shareData = {
41
+ files: [file],
42
+ title,
43
+ text: 'Картинка',
44
+ };
45
+ // Попробуем поделиться файлом
46
+ if (navigator.canShare?.(shareData) && response.ok) {
47
+ await navigator.share(shareData);
48
+ }
49
+ else {
50
+ // Fallback: делимся только ссылкой
51
+ await navigator.share({
52
+ title,
53
+ text: 'Картинка',
54
+ url,
55
+ });
56
+ }
34
57
  }
35
- else {
36
- await navigator.share({ url: currentImage.src, title });
58
+ catch {
59
+ await navigator.share({
60
+ title,
61
+ url,
62
+ });
37
63
  }
38
64
  };
39
65
  return (React.createElement("div", { className: cn(styles.headerMobile, {
@@ -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":["Buttons.BackArrow","Buttons.Download","Buttons.Share"],"mappings":";;;;;;;;;AAWO,MAAM,YAAY,GAAG,MAAK;AAC7B,IAAA,MAAM,EACF,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,GACjB,GAAG,UAAU,CAAC,cAAc,CAAC;AAE9B,IAAA,MAAM,YAAY,GAAG,eAAe,EAA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I,6BACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE;YAC/B,CAAC,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC;AAC1C,YAAA,CAAC,MAAM,CAAC,IAAI,GAAG,cAAc;SAChC,CAAC,EAAA;AAEF,QAAA,KAAA,CAAA,aAAA,CAACA,SAAiB,IAAC,OAAO,EAAE,OAAO,EAAI,CAAA;QACvC,KAAC,CAAA,aAAA,CAAA,IAAI,IACD,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAC,sBAAsB,EAE3B,EAAA,WAAW,CACT;AACP,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA;YAC9B,kBAAkB,KACf,KAAA,CAAA,aAAA,CAACC,QAAgB,EACb,EAAA,IAAI,EAAE,YAAY,EAAE,GAAG,EACvB,QAAQ,EAAE,YAAY,EAAE,IAAI,EAC5B,UAAU,EAAE,OAAO,CAAC,eAAe,EAAA,CACrC,CACL;AACA,YAAA,CAAC,IAAI,EAAE,MAAM,IAAI,KAAA,CAAA,aAAA,CAACC,KAAa,EAAC,EAAA,OAAO,EAAE,gBAAgB,EAAA,CAAI,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":["Buttons.BackArrow","Buttons.Download","Buttons.Share"],"mappings":";;;;;;;;;AAWO,MAAM,YAAY,GAAG,MAAK;AAC7B,IAAA,MAAM,EACF,OAAO,EACP,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,GACjB,GAAG,UAAU,CAAC,cAAc,CAAC;AAE9B,IAAA,MAAM,YAAY,GA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CAAA,aAAA,CAACC,KAAa,EAAC,EAAA,OAAO,EAAE,gBAAgB,EAAA,CAAI,CAC5D,CACJ;AAEd;;;;"}
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  --color-static-neutral-0-inverted: #262629;
3
- } .gallery__headerMobile_xa3y1 {
3
+ } .gallery__headerMobile_1vvpc {
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_xa3y1.gallery__video_xa3y1 {
11
+ } .gallery__headerMobile_1vvpc.gallery__video_1vvpc {
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_xa3y1 {
16
+ } .gallery__hide_1vvpc {
17
17
  transform: translateY(-96px);
18
- } .gallery__leftButton_xa3y1,
19
- .gallery__rightButtons_xa3y1 {
18
+ } .gallery__leftButton_1vvpc,
19
+ .gallery__rightButtons_1vvpc {
20
20
  display: flex;
21
21
  align-items: center;
22
- } .gallery__description_xa3y1 {
22
+ } .gallery__description_1vvpc {
23
23
  position: absolute;
24
24
  left: 50%;
25
25
  transform: translateX(-50%);
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"headerMobile":"gallery__headerMobile_xa3y1","video":"gallery__video_xa3y1","hide":"gallery__hide_xa3y1","rightButtons":"gallery__rightButtons_xa3y1","description":"gallery__description_xa3y1"};
3
+ const styles = {"headerMobile":"gallery__headerMobile_1vvpc","video":"gallery__video_1vvpc","hide":"gallery__hide_1vvpc","rightButtons":"gallery__rightButtons_1vvpc","description":"gallery__description_1vvpc"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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_1wiij {
12
+ } .gallery__component_1asyh {
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_1wiij .gallery__image_1wiij {
18
+ } .gallery__component_1asyh .gallery__image_1asyh {
19
19
  opacity: 0.3;
20
- } .gallery__component_1wiij.gallery__mobile_1wiij {
20
+ } .gallery__component_1asyh.gallery__mobile_1asyh {
21
21
  padding: 0;
22
- } .gallery__active_1wiij > .gallery__image_1wiij {
22
+ } .gallery__active_1asyh > .gallery__image_1asyh {
23
23
  opacity: 1;
24
- } .gallery__preview_1wiij {
24
+ } .gallery__preview_1asyh {
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_1wiij.gallery__mobile_1wiij {
33
+ } .gallery__preview_1asyh.gallery__mobile_1asyh {
34
34
  width: 46px;
35
35
  height: 46px;
36
36
  border-radius: var(--border-radius-8);
37
- } .gallery__image_1wiij {
37
+ } .gallery__image_1asyh {
38
38
  transition: opacity 0.15s ease-in-out
39
- } .gallery__image_1wiij > img {
39
+ } .gallery__image_1asyh > 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_1wiij:hover {
48
+ } .gallery__image_1asyh:hover {
49
49
  opacity: 0.7;
50
- } .gallery__loading_1wiij {
50
+ } .gallery__loading_1asyh {
51
51
  background-color: var(--color-static-neutral-100-inverted)
52
- } .gallery__loading_1wiij .gallery__active_1wiij {
52
+ } .gallery__loading_1asyh .gallery__active_1asyh {
53
53
  background-color: var(--color-static-neutral-300-inverted);
54
- } .gallery__brokenImageWrapper_1wiij {
54
+ } .gallery__brokenImageWrapper_1asyh {
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_1wiij.gallery__active_1wiij {
60
+ } .gallery__brokenImageWrapper_1asyh.gallery__active_1asyh {
61
61
  opacity: 1;
62
- } .gallery__brokenIcon_1wiij {
62
+ } .gallery__brokenIcon_1asyh {
63
63
  width: 40px;
64
64
  height: 40px;
65
- } .gallery__focused_1wiij {
65
+ } .gallery__focused_1asyh {
66
66
  outline: 2px solid var(--focus-color);
67
67
  outline-offset: 2px;
68
- } .gallery__canvasPreview_1wiij {
68
+ } .gallery__canvasPreview_1asyh {
69
69
  border-radius: var(--border-radius-12)
70
- } .gallery__canvasPreview_1wiij.gallery__mobile_1wiij {
70
+ } .gallery__canvasPreview_1asyh.gallery__mobile_1asyh {
71
71
  border-radius: var(--border-radius-8);
72
72
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"gallery__component_1wiij","image":"gallery__image_1wiij","mobile":"gallery__mobile_1wiij","active":"gallery__active_1wiij","preview":"gallery__preview_1wiij","loading":"gallery__loading_1wiij","brokenImageWrapper":"gallery__brokenImageWrapper_1wiij","brokenIcon":"gallery__brokenIcon_1wiij","focused":"gallery__focused_1wiij","canvasPreview":"gallery__canvasPreview_1wiij"};
3
+ const styles = {"component":"gallery__component_1asyh","image":"gallery__image_1asyh","mobile":"gallery__mobile_1asyh","active":"gallery__active_1asyh","preview":"gallery__preview_1asyh","loading":"gallery__loading_1asyh","brokenImageWrapper":"gallery__brokenImageWrapper_1asyh","brokenIcon":"gallery__brokenIcon_1asyh","focused":"gallery__focused_1asyh","canvasPreview":"gallery__canvasPreview_1asyh"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -72,12 +72,10 @@ const ImageViewer = () => {
72
72
  const swiperWidth = swiper?.width || 1;
73
73
  const swiperHeight = swiper?.height || swiper?.width || 1;
74
74
  const swiperAspectRatio = swiperWidth / swiperHeight;
75
- return (
76
- /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
77
- React.createElement("div", { className: cn(styles.component, {
75
+ return (React.createElement("div", { className: cn(styles.component, {
78
76
  [styles.mobile]: isMobile,
79
77
  [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),
80
- }), onClick: handleWrapperClick },
78
+ }), "aria-hidden": true, onClick: handleWrapperClick },
81
79
  showControls && (React.createElement("div", { className: cn(styles.arrow, {
82
80
  [styles.focused]: leftArrowFocused,
83
81
  }), 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": 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":[],"mappings":";;;;;;;;;;;;;;;AAkBA,UAAU,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAEvC,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AC;AACnC,YAAA,MAAM,WAAW,GAAG,IAAI,EAAE,MAAM,IAAI,CAAC;AAErC,YAAA,MAAM,gBAAgB,GAAG,UAAU,GAAG,WAAW;AAEjD,YAAA,MAAM,YAAY,GAAG,KAAK,KAAK,iBAAiB;AAEhD,YAAA,QACI,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EACR,GAAG,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9B,KAAK,EAAE;oBACH,aAAa,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM;AAC7C,oBAAA,kBAAkB,EAAE,SAAS;iBAChC,EAEA,EAAA,CAAC,EAAE,QAAQ,EAAE,MACV,KAAC,CAAA,aAAA,CAAA,KAAK,IACF,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,EAC5B,CAAA,CACL,CACS;AAEtB,SAAC,CAAC,CACG;QAER,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;AACxB,gBAAA,CAAC,MAAM,CAAC,OAAO,GAAG,iBAAiB;aACtC,CAAC,EACF,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,aAAa,EAAA,YAAA,EACP,2HAAuB,EAAA,cAAA,EACpB,OAAO,CAAC,iBAAiB,EAAA;AAEvC,YAAA,KAAA,CAAA,aAAA,CAAC,wBAAwB,EAAG,IAAA,CAAA,CAC1B,CACT,CACC;AAEd;;;;"}
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 <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":[],"mappings":";;;;;;;;;;;;;;;AAkBA,UAAU,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAEvC,MAAM,WAAW,GAAO,MAAK;AAChC,IAAA,MAAM,EACF,MAAM,EACN,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,eAAe,GAClB,GAAG,UAAU,CAAC,cAAc,CAAC;AAE9B,IAAA,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,oBAAoB,EAAE;IAE5F,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;IAC7D,MAAM,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;AAE/D,IAAA,MAAM,MAAM,GAAG,SAAS,EAAE;AAC1B,IAAA,MAAM,YAAY,GAAG,eAAe,EAAE;AAEtC,IAAA,MAAM,iBAAiB,GAAG,WAAW,CAAC,MAAK;QACvC,oBAAoB,GAAG,MAAM,EAAE,WAAW,IAAI,YAAY,CAAC;KAC9D,EAAE,CAAC,oBAAoB,EAAE,MAAM,EAAE,YAAY,CAAC,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AA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;AACxB,gBAAA,CAAC,MAAM,CAAC,OAAO,GAAG,iBAAiB;aACtC,CAAC,EACF,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,aAAa,EAAA,YAAA,EACP,2HAAuB,EAAA,cAAA,EACpB,OAAO,CAAC,iBAAiB,EAAA;AAEvC,YAAA,KAAA,CAAA,aAAA,CAAC,wBAAwB,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_ec8yc {
22
+ } .gallery__component_j9s2m {
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_ec8yc {
27
+ } .gallery__swiper_j9s2m {
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_ec8yc.gallery__mobile_ec8yc {
34
+ } .gallery__swiper_j9s2m.gallery__mobile_j9s2m {
35
35
  max-height: calc(100vh - 210px);
36
- } .gallery__swiper_ec8yc.gallery__mobileVideo_ec8yc {
36
+ } .gallery__swiper_j9s2m.gallery__mobileVideo_j9s2m {
37
37
  max-height: 100vh;
38
- } .gallery__singleSlideContainer_ec8yc {
38
+ } .gallery__singleSlideContainer_j9s2m {
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_ec8yc.gallery__mobile_ec8yc {
46
+ } .gallery__singleSlideContainer_j9s2m.gallery__mobile_j9s2m {
47
47
  max-height: calc(100vh - 174px);
48
48
  padding: 0;
49
- } .gallery__singleSlideContainer_ec8yc.gallery__mobileVideo_ec8yc {
49
+ } .gallery__singleSlideContainer_j9s2m.gallery__mobileVideo_j9s2m {
50
50
  max-height: 100vh;
51
- } .gallery__hidden_ec8yc {
51
+ } .gallery__hidden_j9s2m {
52
52
  display: none;
53
- } .gallery__slide_ec8yc {
53
+ } .gallery__slide_j9s2m {
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_ec8yc {
60
+ } .gallery__slideLoading_j9s2m {
61
61
  background-color: var(--color-static-neutral-translucent-100-inverted);
62
62
  border-radius: var(--border-radius-8);
63
- } .gallery__spinner_ec8yc {
63
+ } .gallery__spinner_j9s2m {
64
64
  position: absolute;
65
65
  color: var(--color-static-neutral-translucent-1300-inverted);
66
- } .gallery__image_ec8yc {
66
+ } .gallery__image_j9s2m {
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_ec8yc.gallery__mobile_ec8yc {
73
+ } .gallery__image_j9s2m.gallery__mobile_j9s2m {
74
74
  border-radius: var(--border-radius-0);
75
- } .gallery__smallImage_ec8yc {
75
+ } .gallery__smallImage_j9s2m {
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_ec8yc {
82
+ } .gallery__verticalImageFit_j9s2m {
83
83
  width: auto;
84
84
  height: 100%;
85
- } .gallery__horizontalImageFit_ec8yc {
85
+ } .gallery__horizontalImageFit_j9s2m {
86
86
  width: 100%;
87
87
  height: auto;
88
- } .gallery__arrow_ec8yc {
88
+ } .gallery__arrow_j9s2m {
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_ec8yc:hover {
100
+ } .gallery__arrow_j9s2m:hover {
101
101
  background-color: var(--color-static-neutral-0-inverted-hover);
102
- } .gallery__arrow_ec8yc:active {
102
+ } .gallery__arrow_j9s2m:active {
103
103
  background-color: var(--color-static-neutral-0-inverted-press);
104
- } .gallery__focused_ec8yc {
104
+ } .gallery__focused_j9s2m {
105
105
  outline: 2px solid var(--focus-color);
106
106
  outline-offset: 2px;
107
- } .gallery__placeholder_ec8yc {
107
+ } .gallery__placeholder_j9s2m {
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_ec8yc {
115
+ } .gallery__brokenImgWrapper_j9s2m {
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_ec8yc {
122
+ } .gallery__brokenImgIcon_j9s2m {
123
123
  width: 80px;
124
124
  height: 80px;
125
125
  margin-bottom: var(--gap-2xs);
126
- } .gallery__fullScreenImage_ec8yc {
126
+ } .gallery__fullScreenImage_j9s2m {
127
127
  width: 100%;
128
128
  height: auto;
129
129
  background-color: var(--color-light-base-bg-primary);
130
- } .gallery__fullScreenVideo_ec8yc {
130
+ } .gallery__fullScreenVideo_j9s2m {
131
131
  width: calc(100% - 192px);
132
132
  max-height: calc(100vh - 82px);
133
133
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"gallery__component_ec8yc","swiper":"gallery__swiper_ec8yc","mobile":"gallery__mobile_ec8yc","mobileVideo":"gallery__mobileVideo_ec8yc","singleSlideContainer":"gallery__singleSlideContainer_ec8yc","hidden":"gallery__hidden_ec8yc","slide":"gallery__slide_ec8yc","slideLoading":"gallery__slideLoading_ec8yc","spinner":"gallery__spinner_ec8yc","image":"gallery__image_ec8yc","smallImage":"gallery__smallImage_ec8yc","verticalImageFit":"gallery__verticalImageFit_ec8yc","horizontalImageFit":"gallery__horizontalImageFit_ec8yc","arrow":"gallery__arrow_ec8yc","focused":"gallery__focused_ec8yc","placeholder":"gallery__placeholder_ec8yc","brokenImgWrapper":"gallery__brokenImgWrapper_ec8yc","brokenImgIcon":"gallery__brokenImgIcon_ec8yc","fullScreenImage":"gallery__fullScreenImage_ec8yc","fullScreenVideo":"gallery__fullScreenVideo_ec8yc"};
3
+ const styles = {"component":"gallery__component_j9s2m","swiper":"gallery__swiper_j9s2m","mobile":"gallery__mobile_j9s2m","mobileVideo":"gallery__mobileVideo_j9s2m","singleSlideContainer":"gallery__singleSlideContainer_j9s2m","hidden":"gallery__hidden_j9s2m","slide":"gallery__slide_j9s2m","slideLoading":"gallery__slideLoading_j9s2m","spinner":"gallery__spinner_j9s2m","image":"gallery__image_j9s2m","smallImage":"gallery__smallImage_j9s2m","verticalImageFit":"gallery__verticalImageFit_j9s2m","horizontalImageFit":"gallery__horizontalImageFit_j9s2m","arrow":"gallery__arrow_j9s2m","focused":"gallery__focused_j9s2m","placeholder":"gallery__placeholder_j9s2m","brokenImgWrapper":"gallery__brokenImgWrapper_j9s2m","brokenImgIcon":"gallery__brokenImgIcon_j9s2m","fullScreenImage":"gallery__fullScreenImage_j9s2m","fullScreenVideo":"gallery__fullScreenVideo_j9s2m"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map