@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
@@ -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":";;;;;;;;;;AAWa,IAAA,YAAY,GAAG,YAAA;;;IAClB,IAAA,EAAA,GAOF,UAAU,CAAC,cAAc,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,EAA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AC5B,UAAU,EAAE,OAAO,CAAC,eAAe,GACrC,CACL;YACA,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAA,IAAI,KAAA,CAAA,aAAA,CAACC,KAAa,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":["Buttons.BackArrow","Buttons.Download","Buttons.Share"],"mappings":";;;;;;;;;;AAWa,IAAA,YAAY,GAAG,YAAA;;;IAClB,IAAA,EAAA,GAOF,UAAU,CAAC,cAAc,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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AAY,CAAE,GAAG,CAAC;AAC1C,YAAA,EAAA,CAAC,MAAM,CAAC,IAAI,CAAA,GAAG,cAAc;AAC/B,YAAA,EAAA,EAAA,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;AAC9B,YAAA,kBAAkB,KACf,KAAC,CAAA,aAAA,CAAAC,QAAgB,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,EAAE,OAAO,CAAC,eAAe,GACrC,CACL;YACA,EAAC,IAAI,KAAJ,IAAA,IAAA,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAA,IAAI,KAAA,CAAA,aAAA,CAACC,KAAa,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_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
- var styles = {"headerMobile":"gallery__headerMobile_xa3y1","video":"gallery__video_xa3y1","hide":"gallery__hide_xa3y1","rightButtons":"gallery__rightButtons_xa3y1","description":"gallery__description_xa3y1"};
3
+ var 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
- var 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
+ var 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
@@ -78,12 +78,10 @@ var ImageViewer = function () {
78
78
  var swiperWidth = (swiper === null || swiper === void 0 ? void 0 : swiper.width) || 1;
79
79
  var swiperHeight = (swiper === null || swiper === void 0 ? void 0 : swiper.height) || (swiper === null || swiper === void 0 ? void 0 : swiper.width) || 1;
80
80
  var swiperAspectRatio = swiperWidth / swiperHeight;
81
- return (
82
- /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
83
- React.createElement("div", { className: cn(styles.component, (_a = {},
81
+ return (React.createElement("div", { className: cn(styles.component, (_a = {},
84
82
  _a[styles.mobile] = isMobile,
85
83
  _a[styles.mobileVideo] = isMobile && isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
86
- _a)), onClick: handleWrapperClick },
84
+ _a)), "aria-hidden": true, onClick: handleWrapperClick },
87
85
  showControls && (React.createElement("div", { className: cn(styles.arrow, (_b = {},
88
86
  _b[styles.focused] = leftArrowFocused,
89
87
  _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": 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;AAEjC,IAAA,WAAW,GAAO,YAAA;;AACrB,IAAA,IAAA,KAYF,UAAU,CAAC,cAAc,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,C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AAG,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9B,KAAK,EAAE;oBACH,aAAa,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM;AAC7C,oBAAA,kBAAkB,EAAE,SAAS;AAChC,iBAAA,EAAA,EAEA,UAAC,EAAY,EAAA;AAAV,gBAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA;AAAO,gBAAA,QACf,KAAC,CAAA,aAAA,CAAA,KAAK,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,KACT,KACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAAC,MAAM,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,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;AAEjC,IAAA,WAAW,GAAO,YAAA;;AACrB,IAAA,IAAA,KAYF,UAAU,CAAC,cAAc,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,GAAA,oBAAoB,EAAE,EAApF,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,YAAY,kBAA2B;IAErF,IAAA,gBAAgB,GAAI,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA,CAAA,CAAtC;IAChB,IAAA,iBAAiB,GAAI,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA,CAAA,CAAvC;AAExB,IAAA,IAAM,MAAM,GAAG,SAAS,EAAE;AAC1B,IAAA,IAAM,YAAY,GAAG,eAAe,EAAE;IAEtC,IAAM,iBAAiB,GAAG,WAAW,CAAC,YAAA;;AAClC,QAAA,oBA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EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,GAAA,EAAA,GAAA,EAAA;AACtB,gBAAA,EAAA,CAAC,MAAM,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,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
- var 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
+ var 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
@@ -4,30 +4,30 @@
4
4
  } :root {
5
5
  --border-radius-3xl: 24px;
6
6
  --border-radius-24: var(--border-radius-3xl);
7
- } .gallery__videoWrapper_1beje {
7
+ } .gallery__videoWrapper_s9vff {
8
8
  display: flex;
9
9
  justify-content: center;
10
10
  height: 100%;
11
11
  width: auto;
12
12
  position: relative;
13
- } .gallery__video_1beje {
13
+ } .gallery__video_s9vff {
14
14
  max-width: 100%;
15
15
  max-height: 100%;
16
16
  border-radius: var(--border-radius-24);
17
- } .gallery__mobile_1beje {
17
+ } .gallery__mobile_s9vff {
18
18
  border-radius: 0;
19
- } .gallery__videoButton_1beje {
19
+ } .gallery__videoButton_s9vff {
20
20
  position: absolute;
21
21
  top: 50%;
22
22
  left: 50%;
23
23
  transform: translate(-50%, -50%);
24
24
  z-index: 1;
25
25
  color: green;
26
- } .gallery__icon_1beje {
26
+ } .gallery__icon_s9vff {
27
27
  color: var(--color-static-neutral-0);
28
- } .gallery__iconShape_1beje {
28
+ } .gallery__iconShape_s9vff {
29
29
  fill: var(--color-static-neutral-translucent-700);
30
- } .gallery__bottomButton_1beje {
30
+ } .gallery__bottomButton_s9vff {
31
31
  position: absolute;
32
32
  bottom: 48px;
33
33
  left: 32px;
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"videoWrapper":"gallery__videoWrapper_1beje","video":"gallery__video_1beje","mobile":"gallery__mobile_1beje","videoButton":"gallery__videoButton_1beje","icon":"gallery__icon_1beje","iconShape":"gallery__iconShape_1beje","bottomButton":"gallery__bottomButton_1beje"};
3
+ var styles = {"videoWrapper":"gallery__videoWrapper_s9vff","video":"gallery__video_s9vff","mobile":"gallery__mobile_s9vff","videoButton":"gallery__videoButton_s9vff","icon":"gallery__icon_s9vff","iconShape":"gallery__iconShape_s9vff","bottomButton":"gallery__bottomButton_s9vff"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -5,9 +5,9 @@
5
5
  --gap-xs: 8px;
6
6
  --gap-4: var(--gap-2xs);
7
7
  --gap-8: var(--gap-xs);
8
- } .gallery__description_1o3h0 {
8
+ } .gallery__description_1wotl {
9
9
  text-align: center;
10
- } .gallery__infoWrapper_1o3h0 {
10
+ } .gallery__infoWrapper_1wotl {
11
11
  background-color: var(--color-static-neutral-0-inverted);
12
12
  display: flex;
13
13
  align-items: center;
@@ -15,7 +15,7 @@
15
15
  padding: 0 var(--gap-8) var(--gap-4);
16
16
  position: relative;
17
17
  height: 48px
18
- } .gallery__infoWrapper_1o3h0.gallery__video_1o3h0 {
18
+ } .gallery__infoWrapper_1wotl.gallery__video_1wotl {
19
19
  padding: 0 var(--gap-4) var(--gap-4);
20
20
  justify-content: space-between;
21
21
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"description":"gallery__description_1o3h0","infoWrapper":"gallery__infoWrapper_1o3h0","video":"gallery__video_1o3h0"};
3
+ var styles = {"description":"gallery__description_1wotl","infoWrapper":"gallery__infoWrapper_1wotl","video":"gallery__video_1wotl"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -11,7 +11,7 @@
11
11
  --gap-8: var(--gap-xs);
12
12
  --gap-12: var(--gap-s);
13
13
  --gap-24: var(--gap-xl);
14
- } .gallery__component_1xzqj {
14
+ } .gallery__component_vhjcl {
15
15
  display: flex;
16
16
  flex-wrap: nowrap;
17
17
  align-content: center;
@@ -22,19 +22,19 @@
22
22
  padding: var(--gap-12) var(--gap-24);
23
23
  scrollbar-width: none;
24
24
  background-color: var(--color-static-neutral-0-inverted)
25
- } .gallery__component_1xzqj.gallery__mobile_1xzqj {
25
+ } .gallery__component_vhjcl.gallery__mobile_vhjcl {
26
26
  padding: var(--gap-8) var(--gap-24);
27
- } .gallery__component_1xzqj::-webkit-scrollbar {
27
+ } .gallery__component_vhjcl::-webkit-scrollbar {
28
28
  display: none;
29
- } .gallery__previews_1xzqj {
29
+ } .gallery__previews_vhjcl {
30
30
  display: flex;
31
- } .gallery__preview_1xzqj {
31
+ } .gallery__preview_vhjcl {
32
32
  flex-shrink: 0;
33
33
  margin-right: var(--gap-4)
34
- } .gallery__preview_1xzqj.gallery__mobile_1xzqj {
34
+ } .gallery__preview_vhjcl.gallery__mobile_vhjcl {
35
35
  margin-right: var(--gap-2);
36
- } .gallery__preview_1xzqj:first-child {
36
+ } .gallery__preview_vhjcl:first-child {
37
37
  margin-left: auto;
38
- } .gallery__preview_1xzqj:last-child {
38
+ } .gallery__preview_vhjcl:last-child {
39
39
  margin-right: auto;
40
40
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"component":"gallery__component_1xzqj","mobile":"gallery__mobile_1xzqj","preview":"gallery__preview_1xzqj"};
3
+ var styles = {"component":"gallery__component_vhjcl","mobile":"gallery__mobile_vhjcl","preview":"gallery__preview_vhjcl"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -4,7 +4,7 @@
4
4
  --gap-0: 0px;
5
5
  --gap-16: var(--gap-m);
6
6
  --gap-32: var(--gap-2xl);
7
- } .gallery__subtitles_19v8x {
7
+ } .gallery__subtitles_17mnq {
8
8
  position: absolute;
9
9
  align-self: flex-end;
10
10
  padding: var(--gap-0) var(--gap-32);
@@ -14,8 +14,8 @@
14
14
  opacity: 1;
15
15
  z-index: 1;
16
16
  transition: opacity 500ms ease-in-out, margin-bottom 270ms ease-in-out
17
- } .gallery__subtitles_19v8x.gallery__mobile_19v8x {
17
+ } .gallery__subtitles_17mnq.gallery__mobile_17mnq {
18
18
  position: unset;
19
- } .gallery__hideSubtitles_19v8x {
19
+ } .gallery__hideSubtitles_17mnq {
20
20
  opacity: 0;
21
21
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"subtitles":"gallery__subtitles_19v8x","mobile":"gallery__mobile_19v8x","hideSubtitles":"gallery__hideSubtitles_19v8x"};
3
+ var styles = {"subtitles":"gallery__subtitles_17mnq","mobile":"gallery__mobile_17mnq","hideSubtitles":"gallery__hideSubtitles_17mnq"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
package/esm/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
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- 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"};
3
+ 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"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map