@alfalab/core-components-gallery 7.1.10 → 7.2.0-alfasans

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 (140) hide show
  1. package/Component.js +6 -3
  2. package/Component.js.map +1 -1
  3. package/components/bottom-button/index.css +5 -5
  4. package/components/bottom-button/index.module.css.js +1 -1
  5. package/components/buttons/index.css +5 -5
  6. package/components/buttons/index.module.css.js +1 -1
  7. package/components/header/index.css +1 -1
  8. package/components/header/index.module.css.js +1 -1
  9. package/components/header-info-block/index.css +4 -4
  10. package/components/header-info-block/index.module.css.js +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 +30 -21
  16. package/components/image-viewer/component.js.map +1 -1
  17. package/components/image-viewer/index.css +85 -37
  18. package/components/image-viewer/index.module.css.js +1 -1
  19. package/components/image-viewer/index.module.css.js.map +1 -1
  20. package/components/image-viewer/single.js +2 -1
  21. package/components/image-viewer/single.js.map +1 -1
  22. package/components/image-viewer/slide.d.ts +1 -0
  23. package/components/image-viewer/slide.js +17 -13
  24. package/components/image-viewer/slide.js.map +1 -1
  25. package/components/image-viewer/video/index.css +13 -8
  26. package/components/image-viewer/video/index.module.css.js +1 -1
  27. package/components/image-viewer/video/index.module.css.js.map +1 -1
  28. package/components/info-bar/index.css +3 -3
  29. package/components/info-bar/index.module.css.js +1 -1
  30. package/components/navigation-bar/index.css +8 -8
  31. package/components/navigation-bar/index.module.css.js +1 -1
  32. package/components/subtitles/index.css +3 -3
  33. package/components/subtitles/index.module.css.js +1 -1
  34. package/cssm/Component.js +6 -3
  35. package/cssm/Component.js.map +1 -1
  36. package/cssm/components/image-viewer/component.js +30 -21
  37. package/cssm/components/image-viewer/component.js.map +1 -1
  38. package/cssm/components/image-viewer/index.module.css +66 -18
  39. package/cssm/components/image-viewer/single.js +2 -1
  40. package/cssm/components/image-viewer/single.js.map +1 -1
  41. package/cssm/components/image-viewer/slide.d.ts +1 -0
  42. package/cssm/components/image-viewer/slide.js +17 -13
  43. package/cssm/components/image-viewer/slide.js.map +1 -1
  44. package/cssm/components/image-viewer/video/index.module.css +6 -1
  45. package/cssm/index.module.css +2 -0
  46. package/esm/Component.js +6 -3
  47. package/esm/Component.js.map +1 -1
  48. package/esm/components/bottom-button/index.css +5 -5
  49. package/esm/components/bottom-button/index.module.css.js +1 -1
  50. package/esm/components/buttons/index.css +5 -5
  51. package/esm/components/buttons/index.module.css.js +1 -1
  52. package/esm/components/header/index.css +1 -1
  53. package/esm/components/header/index.module.css.js +1 -1
  54. package/esm/components/header-info-block/index.css +4 -4
  55. package/esm/components/header-info-block/index.module.css.js +1 -1
  56. package/esm/components/header-mobile/index.css +6 -6
  57. package/esm/components/header-mobile/index.module.css.js +1 -1
  58. package/esm/components/image-preview/index.css +17 -17
  59. package/esm/components/image-preview/index.module.css.js +1 -1
  60. package/esm/components/image-viewer/component.js +31 -22
  61. package/esm/components/image-viewer/component.js.map +1 -1
  62. package/esm/components/image-viewer/index.css +85 -37
  63. package/esm/components/image-viewer/index.module.css.js +1 -1
  64. package/esm/components/image-viewer/index.module.css.js.map +1 -1
  65. package/esm/components/image-viewer/single.js +3 -2
  66. package/esm/components/image-viewer/single.js.map +1 -1
  67. package/esm/components/image-viewer/slide.d.ts +1 -0
  68. package/esm/components/image-viewer/slide.js +18 -14
  69. package/esm/components/image-viewer/slide.js.map +1 -1
  70. package/esm/components/image-viewer/video/index.css +13 -8
  71. package/esm/components/image-viewer/video/index.module.css.js +1 -1
  72. package/esm/components/image-viewer/video/index.module.css.js.map +1 -1
  73. package/esm/components/info-bar/index.css +3 -3
  74. package/esm/components/info-bar/index.module.css.js +1 -1
  75. package/esm/components/navigation-bar/index.css +8 -8
  76. package/esm/components/navigation-bar/index.module.css.js +1 -1
  77. package/esm/components/subtitles/index.css +3 -3
  78. package/esm/components/subtitles/index.module.css.js +1 -1
  79. package/esm/index.css +11 -9
  80. package/esm/index.module.css.js +1 -1
  81. package/esm/index.module.css.js.map +1 -1
  82. package/index.css +11 -9
  83. package/index.module.css.js +1 -1
  84. package/index.module.css.js.map +1 -1
  85. package/modern/Component.js +6 -3
  86. package/modern/Component.js.map +1 -1
  87. package/modern/components/bottom-button/index.css +5 -5
  88. package/modern/components/bottom-button/index.module.css.js +1 -1
  89. package/modern/components/buttons/index.css +5 -5
  90. package/modern/components/buttons/index.module.css.js +1 -1
  91. package/modern/components/header/index.css +1 -1
  92. package/modern/components/header/index.module.css.js +1 -1
  93. package/modern/components/header-info-block/index.css +4 -4
  94. package/modern/components/header-info-block/index.module.css.js +1 -1
  95. package/modern/components/header-mobile/index.css +6 -6
  96. package/modern/components/header-mobile/index.module.css.js +1 -1
  97. package/modern/components/image-preview/index.css +17 -17
  98. package/modern/components/image-preview/index.module.css.js +1 -1
  99. package/modern/components/image-viewer/component.js +21 -13
  100. package/modern/components/image-viewer/component.js.map +1 -1
  101. package/modern/components/image-viewer/index.css +85 -37
  102. package/modern/components/image-viewer/index.module.css.js +1 -1
  103. package/modern/components/image-viewer/index.module.css.js.map +1 -1
  104. package/modern/components/image-viewer/single.js +3 -2
  105. package/modern/components/image-viewer/single.js.map +1 -1
  106. package/modern/components/image-viewer/slide.d.ts +1 -0
  107. package/modern/components/image-viewer/slide.js +11 -7
  108. package/modern/components/image-viewer/slide.js.map +1 -1
  109. package/modern/components/image-viewer/video/index.css +13 -8
  110. package/modern/components/image-viewer/video/index.module.css.js +1 -1
  111. package/modern/components/image-viewer/video/index.module.css.js.map +1 -1
  112. package/modern/components/info-bar/index.css +3 -3
  113. package/modern/components/info-bar/index.module.css.js +1 -1
  114. package/modern/components/navigation-bar/index.css +8 -8
  115. package/modern/components/navigation-bar/index.module.css.js +1 -1
  116. package/modern/components/subtitles/index.css +3 -3
  117. package/modern/components/subtitles/index.module.css.js +1 -1
  118. package/modern/index.css +11 -9
  119. package/modern/index.module.css.js +1 -1
  120. package/modern/index.module.css.js.map +1 -1
  121. package/moderncssm/Component.js +6 -3
  122. package/moderncssm/Component.js.map +1 -1
  123. package/moderncssm/components/image-viewer/component.js +21 -13
  124. package/moderncssm/components/image-viewer/component.js.map +1 -1
  125. package/moderncssm/components/image-viewer/index.module.css +65 -17
  126. package/moderncssm/components/image-viewer/single.js +3 -2
  127. package/moderncssm/components/image-viewer/single.js.map +1 -1
  128. package/moderncssm/components/image-viewer/slide.d.ts +1 -0
  129. package/moderncssm/components/image-viewer/slide.js +11 -7
  130. package/moderncssm/components/image-viewer/slide.js.map +1 -1
  131. package/moderncssm/components/image-viewer/video/index.module.css +6 -1
  132. package/moderncssm/index.module.css +2 -0
  133. package/package.json +11 -11
  134. package/src/Component.tsx +8 -7
  135. package/src/components/image-viewer/component.tsx +62 -41
  136. package/src/components/image-viewer/index.module.css +60 -15
  137. package/src/components/image-viewer/single.tsx +14 -6
  138. package/src/components/image-viewer/slide.tsx +24 -5
  139. package/src/components/image-viewer/video/index.module.css +5 -1
  140. package/src/index.module.css +2 -0
@@ -1,5 +1,4 @@
1
1
  :root {
2
- --color-light-base-bg-primary: #fff;
3
2
  --color-light-status-info: #2288fa;
4
3
  --color-static-neutral-0-inverted: #262629;
5
4
  --color-static-neutral-0-inverted-hover: #2f2f32;
@@ -17,6 +16,7 @@
17
16
  --gap-2xs: 4px;
18
17
  --gap-m: 16px;
19
18
  --gap-2xl: 32px;
19
+ --gap-0: 0px;
20
20
  --gap-4: var(--gap-2xs);
21
21
  --gap-16: var(--gap-m);
22
22
  --gap-32: var(--gap-2xl);
@@ -24,10 +24,11 @@
24
24
  :root {
25
25
  --focus-color: var(--color-light-status-info);
26
26
  }
27
- .gallery__component_1gta9 {
27
+ .gallery__component_pbjik {
28
28
  display: flex;
29
29
  flex-grow: 1;
30
30
  justify-content: center;
31
+ min-height: 0;
31
32
  background-color: var(--color-static-neutral-0-inverted);
32
33
  .swiper {
33
34
  margin-left: auto;
@@ -91,47 +92,81 @@
91
92
  z-index: -1000;
92
93
  }
93
94
 
94
- .gallery__swiper_1gta9 {
95
+ .gallery__swiperFrame_pbjik {
95
96
  display: flex;
96
97
  width: 100%;
97
98
  height: 100%;
99
+ min-height: 0;
98
100
  max-height: calc(100vh - 168px);
101
+ max-height: calc(100dvh - 168px);
99
102
  padding: var(--gap-32) var(--gap-16);
100
103
  box-sizing: border-box;
101
104
  }
102
105
 
103
- .gallery__swiper_1gta9.gallery__mobile_1gta9 {
106
+ .gallery__swiperFrame_pbjik.gallery__mobile_pbjik {
104
107
  max-height: calc(100vh - 210px);
108
+ max-height: calc(100dvh - 210px);
105
109
  }
106
110
 
107
- .gallery__swiper_1gta9.gallery__mobileVideo_1gta9 {
111
+ .gallery__swiperFrame_pbjik.gallery__mobileVideo_pbjik {
108
112
  max-height: 100vh;
113
+ max-height: 100dvh;
109
114
  }
110
115
 
111
- .gallery__singleSlideContainer_1gta9 {
116
+ .gallery__fullScreenFrame_pbjik {
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ width: 100%;
121
+ height: 100%;
122
+ max-height: none;
123
+ min-height: 0;
124
+ padding: var(--gap-0);
125
+ box-sizing: border-box;
126
+ overflow: hidden;
127
+ }
128
+
129
+ .gallery__hiddenFrame_pbjik {
130
+ flex: 0 0 0;
131
+ width: 0;
132
+ height: 0;
133
+ padding: var(--gap-0);
134
+ overflow: hidden;
135
+ }
136
+
137
+ .gallery__swiper_pbjik {
138
+ width: 100%;
139
+ height: 100%;
140
+ }
141
+
142
+ .gallery__hidden_pbjik {
143
+ display: none;
144
+ }
145
+
146
+ .gallery__singleSlideContainer_pbjik {
112
147
  display: flex;
113
148
  width: 100%;
114
149
  height: 100%;
150
+ min-height: 0;
115
151
 
116
152
  max-height: calc(100vh - 80px);
153
+ max-height: calc(100dvh - 80px);
117
154
  padding: var(--gap-32);
118
155
  box-sizing: border-box;
119
156
  }
120
157
 
121
- .gallery__singleSlideContainer_1gta9.gallery__mobile_1gta9 {
158
+ .gallery__singleSlideContainer_pbjik.gallery__mobile_pbjik {
122
159
  max-height: calc(100vh - 174px);
160
+ max-height: calc(100dvh - 174px);
123
161
  padding: 0;
124
162
  }
125
163
 
126
- .gallery__singleSlideContainer_1gta9.gallery__mobileVideo_1gta9 {
164
+ .gallery__singleSlideContainer_pbjik.gallery__mobileVideo_pbjik {
127
165
  max-height: 100vh;
166
+ max-height: 100dvh;
128
167
  }
129
168
 
130
- .gallery__hidden_1gta9 {
131
- display: none;
132
- }
133
-
134
- .gallery__slide_1gta9 {
169
+ .gallery__slide_pbjik {
135
170
  position: relative;
136
171
  display: flex;
137
172
  justify-content: center;
@@ -140,49 +175,67 @@
140
175
  height: 100%;
141
176
  }
142
177
 
143
- .gallery__slideLoading_1gta9 {
178
+ .gallery__slideLoading_pbjik {
144
179
  background-color: var(--color-static-neutral-translucent-100-inverted);
145
180
  border-radius: var(--border-radius-8);
146
181
  }
147
182
 
148
- .gallery__spinner_1gta9 {
183
+ .gallery__spinner_pbjik {
149
184
  position: absolute;
150
185
  color: var(--color-static-neutral-translucent-1300-inverted);
151
186
  }
152
187
 
153
- .gallery__image_1gta9 {
154
- width: 0;
155
- height: 0;
188
+ .gallery__image_pbjik {
189
+ width: auto;
190
+ height: auto;
191
+ max-width: 100%;
192
+ max-height: 100%;
193
+ -o-object-fit: contain;
194
+ object-fit: contain;
156
195
  -webkit-user-select: none;
157
196
  -moz-user-select: none;
158
197
  user-select: none;
159
198
  border-radius: var(--border-radius-8);
160
199
  }
161
200
 
162
- .gallery__image_1gta9.gallery__mobile_1gta9 {
201
+ .gallery__image_pbjik.gallery__mobile_pbjik {
163
202
  border-radius: var(--border-radius-0);
164
203
  }
165
204
 
166
- .gallery__smallImage_1gta9 {
205
+ .gallery__smallImage_pbjik {
167
206
  position: relative;
168
207
  width: auto;
169
208
  height: auto;
209
+ max-width: 100%;
210
+ max-height: 100%;
211
+ -o-object-fit: contain;
212
+ object-fit: contain;
170
213
  -webkit-user-select: none;
171
214
  -moz-user-select: none;
172
215
  user-select: none;
173
216
  }
174
217
 
175
- .gallery__verticalImageFit_1gta9 {
218
+ .gallery__verticalImageFit_pbjik {
176
219
  width: auto;
177
220
  height: 100%;
178
221
  }
179
222
 
180
- .gallery__horizontalImageFit_1gta9 {
223
+ .gallery__horizontalImageFit_pbjik {
181
224
  width: 100%;
182
225
  height: auto;
183
226
  }
184
227
 
185
- .gallery__arrow_1gta9 {
228
+ .gallery__fullScreenMedia_pbjik {
229
+ width: 100%;
230
+ height: 100%;
231
+ max-width: 100%;
232
+ max-height: 100%;
233
+ -o-object-fit: contain;
234
+ object-fit: contain;
235
+ border-radius: var(--border-radius-0);
236
+ }
237
+
238
+ .gallery__arrow_pbjik {
186
239
  display: flex;
187
240
  flex-direction: column;
188
241
  justify-content: center;
@@ -196,20 +249,20 @@
196
249
  outline: none;
197
250
  }
198
251
 
199
- .gallery__arrow_1gta9:hover {
252
+ .gallery__arrow_pbjik:hover {
200
253
  background-color: var(--color-static-neutral-0-inverted-hover);
201
254
  }
202
255
 
203
- .gallery__arrow_1gta9:active {
256
+ .gallery__arrow_pbjik:active {
204
257
  background-color: var(--color-static-neutral-0-inverted-press);
205
258
  }
206
259
 
207
- .gallery__focused_1gta9 {
260
+ .gallery__focused_pbjik {
208
261
  outline: 2px solid var(--focus-color);
209
262
  outline-offset: 2px;
210
263
  }
211
264
 
212
- .gallery__placeholder_1gta9 {
265
+ .gallery__placeholder_pbjik {
213
266
  display: flex;
214
267
  justify-content: center;
215
268
  align-items: center;
@@ -219,7 +272,7 @@
219
272
  background-color: var(--color-static-neutral-300-inverted);
220
273
  }
221
274
 
222
- .gallery__brokenImgWrapper_1gta9 {
275
+ .gallery__brokenImgWrapper_pbjik {
223
276
  position: relative;
224
277
  display: flex;
225
278
  flex-direction: column;
@@ -228,20 +281,15 @@
228
281
  text-align: center;
229
282
  }
230
283
 
231
- .gallery__brokenImgIcon_1gta9 {
284
+ .gallery__brokenImgIcon_pbjik {
232
285
  width: 80px;
233
286
  height: 80px;
234
287
  margin-bottom: var(--gap-4);
235
288
  }
236
289
 
237
- .gallery__fullScreenImage_1gta9 {
290
+ .gallery__fullScreenVideo_pbjik {
238
291
  width: 100%;
239
- height: auto;
240
- background-color: var(--color-light-base-bg-primary);
241
- }
242
-
243
- .gallery__fullScreenVideo_1gta9 {
244
- width: calc(100% - 192px);
245
- max-height: calc(100vh - 82px);
292
+ height: 100%;
293
+ max-height: none;
246
294
  }
247
295
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"gallery__component_1gta9","swiper":"gallery__swiper_1gta9","mobile":"gallery__mobile_1gta9","mobileVideo":"gallery__mobileVideo_1gta9","singleSlideContainer":"gallery__singleSlideContainer_1gta9","hidden":"gallery__hidden_1gta9","slide":"gallery__slide_1gta9","slideLoading":"gallery__slideLoading_1gta9","spinner":"gallery__spinner_1gta9","image":"gallery__image_1gta9","smallImage":"gallery__smallImage_1gta9","verticalImageFit":"gallery__verticalImageFit_1gta9","horizontalImageFit":"gallery__horizontalImageFit_1gta9","arrow":"gallery__arrow_1gta9","focused":"gallery__focused_1gta9","placeholder":"gallery__placeholder_1gta9","brokenImgWrapper":"gallery__brokenImgWrapper_1gta9","brokenImgIcon":"gallery__brokenImgIcon_1gta9","fullScreenImage":"gallery__fullScreenImage_1gta9","fullScreenVideo":"gallery__fullScreenVideo_1gta9"};
5
+ var styles = {"component":"gallery__component_pbjik","swiperFrame":"gallery__swiperFrame_pbjik","mobile":"gallery__mobile_pbjik","mobileVideo":"gallery__mobileVideo_pbjik","fullScreenFrame":"gallery__fullScreenFrame_pbjik","hiddenFrame":"gallery__hiddenFrame_pbjik","swiper":"gallery__swiper_pbjik","hidden":"gallery__hidden_pbjik","singleSlideContainer":"gallery__singleSlideContainer_pbjik","slide":"gallery__slide_pbjik","slideLoading":"gallery__slideLoading_pbjik","spinner":"gallery__spinner_pbjik","image":"gallery__image_pbjik","smallImage":"gallery__smallImage_pbjik","verticalImageFit":"gallery__verticalImageFit_pbjik","horizontalImageFit":"gallery__horizontalImageFit_pbjik","fullScreenMedia":"gallery__fullScreenMedia_pbjik","arrow":"gallery__arrow_pbjik","focused":"gallery__focused_pbjik","placeholder":"gallery__placeholder_pbjik","brokenImgWrapper":"gallery__brokenImgWrapper_pbjik","brokenImgIcon":"gallery__brokenImgIcon_pbjik","fullScreenVideo":"gallery__fullScreenVideo_pbjik"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/image-viewer/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n background-color: var(--color-static-neutral-0-inverted);\n\n /* swiper/swiper.css; */\n :global(.swiper) {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n z-index: 1;\n display: block;\n }\n :global(.swiper-wrapper) {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n }\n :global(.swiper-android) :global(.swiper-slide),\n :global(.swiper-ios) :global(.swiper-slide),\n :global(.swiper-wrapper) {\n transform: translate3d(0, 0, 0);\n }\n :global(.swiper-horizontal) {\n touch-action: pan-y;\n }\n :global(.swiper-slide) {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n }\n :global(.swiper-slide-invisible-blank) {\n visibility: hidden;\n }\n :global(.swiper-autoheight),\n :global(.swiper-autoheight) :global(.swiper-slide) {\n height: auto;\n }\n :global(.swiper-autoheight) :global(.swiper-wrapper) {\n align-items: flex-start;\n transition-property: transform, height;\n }\n :global(.swiper-backface-hidden) :global(.swiper-slide) {\n transform: translateZ(0);\n backface-visibility: hidden;\n }\n\n /* swiper/modules/a11y.css */\n :global(.swiper) :global(.swiper-notification) {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n opacity: 0;\n z-index: -1000;\n }\n\n .swiper {\n display: flex;\n width: 100%;\n height: 100%;\n\n /* 168px - высота хэдера и футера */\n max-height: calc(100vh - 168px);\n padding: var(--gap-32) var(--gap-16);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 210px);\n }\n\n &.mobileVideo {\n max-height: 100vh;\n }\n }\n\n .singleSlideContainer {\n display: flex;\n width: 100%;\n height: 100%;\n\n max-height: calc(100vh - 80px);\n padding: var(--gap-32);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 174px);\n padding: 0;\n }\n\n &.mobileVideo {\n max-height: 100vh;\n }\n }\n\n .hidden {\n display: none;\n }\n\n .slide {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n\n .slideLoading {\n background-color: var(--color-static-neutral-translucent-100-inverted);\n border-radius: var(--border-radius-8);\n }\n\n .spinner {\n position: absolute;\n color: var(--color-static-neutral-translucent-1300-inverted);\n }\n\n .image {\n width: 0;\n height: 0;\n user-select: none;\n border-radius: var(--border-radius-8);\n\n &.mobile {\n border-radius: var(--border-radius-0);\n }\n }\n\n .smallImage {\n position: relative;\n width: auto;\n height: auto;\n user-select: none;\n }\n\n .verticalImageFit {\n width: auto;\n height: 100%;\n }\n\n .horizontalImageFit {\n width: 100%;\n height: auto;\n }\n\n .arrow {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 96px;\n height: 100%;\n cursor: pointer;\n color: var(--color-static-neutral-translucent-1300-inverted);\n transition: background-color 0.15s ease-in-out;\n outline: none;\n\n &:hover {\n background-color: var(--color-static-neutral-0-inverted-hover);\n }\n\n &:active {\n background-color: var(--color-static-neutral-0-inverted-press);\n }\n }\n\n .focused {\n @mixin focus-outline;\n }\n\n .placeholder {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n border-radius: var(--border-radius-8);\n background-color: var(--color-static-neutral-300-inverted);\n }\n\n .brokenImgWrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 150px;\n text-align: center;\n }\n\n .brokenImgIcon {\n width: 80px;\n height: 80px;\n margin-bottom: var(--gap-4);\n }\n\n .fullScreenImage {\n width: 100%;\n height: auto;\n background-color: var(--color-light-base-bg-primary);\n }\n\n .fullScreenVideo {\n width: calc(100% - 192px);\n max-height: calc(100vh - 82px);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,0BAA0B,CAAC,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,qCAAqC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,sBAAsB,CAAC,cAAc,CAAC,6BAA6B,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,sBAAsB,CAAC,YAAY,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,oBAAoB,CAAC,mCAAmC,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC,wBAAwB,CAAC,aAAa,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,eAAe,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,iBAAiB,CAAC,gCAAgC,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/image-viewer/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n flex-grow: 1;\n justify-content: center;\n min-height: 0;\n background-color: var(--color-static-neutral-0-inverted);\n\n /* swiper/swiper.css; */\n :global(.swiper) {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n z-index: 1;\n display: block;\n }\n :global(.swiper-wrapper) {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n }\n :global(.swiper-android) :global(.swiper-slide),\n :global(.swiper-ios) :global(.swiper-slide),\n :global(.swiper-wrapper) {\n transform: translate3d(0, 0, 0);\n }\n :global(.swiper-horizontal) {\n touch-action: pan-y;\n }\n :global(.swiper-slide) {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n }\n :global(.swiper-slide-invisible-blank) {\n visibility: hidden;\n }\n :global(.swiper-autoheight),\n :global(.swiper-autoheight) :global(.swiper-slide) {\n height: auto;\n }\n :global(.swiper-autoheight) :global(.swiper-wrapper) {\n align-items: flex-start;\n transition-property: transform, height;\n }\n :global(.swiper-backface-hidden) :global(.swiper-slide) {\n transform: translateZ(0);\n backface-visibility: hidden;\n }\n\n /* swiper/modules/a11y.css */\n :global(.swiper) :global(.swiper-notification) {\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: none;\n opacity: 0;\n z-index: -1000;\n }\n\n .swiperFrame {\n display: flex;\n width: 100%;\n height: 100%;\n min-height: 0;\n\n /* 168px - высота хэдера и футера */\n max-height: calc(100vh - 168px);\n max-height: calc(100dvh - 168px);\n padding: var(--gap-32) var(--gap-16);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 210px);\n max-height: calc(100dvh - 210px);\n }\n\n &.mobileVideo {\n max-height: 100vh;\n max-height: 100dvh;\n }\n }\n\n .fullScreenFrame {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n max-height: none;\n min-height: 0;\n padding: var(--gap-0);\n box-sizing: border-box;\n overflow: hidden;\n }\n\n .hiddenFrame {\n flex: 0 0 0;\n width: 0;\n height: 0;\n padding: var(--gap-0);\n overflow: hidden;\n }\n\n .swiper {\n width: 100%;\n height: 100%;\n }\n\n .hidden {\n display: none;\n }\n\n .singleSlideContainer {\n display: flex;\n width: 100%;\n height: 100%;\n min-height: 0;\n\n max-height: calc(100vh - 80px);\n max-height: calc(100dvh - 80px);\n padding: var(--gap-32);\n box-sizing: border-box;\n\n &.mobile {\n max-height: calc(100vh - 174px);\n max-height: calc(100dvh - 174px);\n padding: 0;\n }\n\n &.mobileVideo {\n max-height: 100vh;\n max-height: 100dvh;\n }\n }\n\n .slide {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n\n .slideLoading {\n background-color: var(--color-static-neutral-translucent-100-inverted);\n border-radius: var(--border-radius-8);\n }\n\n .spinner {\n position: absolute;\n color: var(--color-static-neutral-translucent-1300-inverted);\n }\n\n .image {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n user-select: none;\n border-radius: var(--border-radius-8);\n\n &.mobile {\n border-radius: var(--border-radius-0);\n }\n }\n\n .smallImage {\n position: relative;\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n user-select: none;\n }\n\n .verticalImageFit {\n width: auto;\n height: 100%;\n }\n\n .horizontalImageFit {\n width: 100%;\n height: auto;\n }\n\n .fullScreenMedia {\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--border-radius-0);\n }\n\n .arrow {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 96px;\n height: 100%;\n cursor: pointer;\n color: var(--color-static-neutral-translucent-1300-inverted);\n transition: background-color 0.15s ease-in-out;\n outline: none;\n\n &:hover {\n background-color: var(--color-static-neutral-0-inverted-hover);\n }\n\n &:active {\n background-color: var(--color-static-neutral-0-inverted-press);\n }\n }\n\n .focused {\n @mixin focus-outline;\n }\n\n .placeholder {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n border-radius: var(--border-radius-8);\n background-color: var(--color-static-neutral-300-inverted);\n }\n\n .brokenImgWrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 150px;\n text-align: center;\n }\n\n .brokenImgIcon {\n width: 80px;\n height: 80px;\n margin-bottom: var(--gap-4);\n }\n\n .fullScreenVideo {\n width: 100%;\n height: 100%;\n max-height: none;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,0BAA0B,CAAC,aAAa,CAAC,4BAA4B,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,4BAA4B,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,aAAa,CAAC,4BAA4B,CAAC,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,sBAAsB,CAAC,qCAAqC,CAAC,OAAO,CAAC,sBAAsB,CAAC,cAAc,CAAC,6BAA6B,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,sBAAsB,CAAC,YAAY,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,oBAAoB,CAAC,mCAAmC,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,CAAC,wBAAwB,CAAC,aAAa,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,eAAe,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,gCAAgC,CAAC;;;;"}
@@ -32,7 +32,8 @@ var Single = function () {
32
32
  var wrapperAspectRatio = ((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.width) || 1) / ((wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.height) || 1);
33
33
  return (
34
34
  /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
35
- React__default.default.createElement("div", { className: index_module.component, onClick: handleWrapperClick }, fullScreen && !utils.isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src) ? (React__default.default.createElement("img", { src: currentImage === null || currentImage === void 0 ? void 0 : currentImage.src, alt: currentImage ? utils.getImageAlt(currentImage, currentSlideIndex) : '', className: index_module.fullScreenImage })) : (React__default.default.createElement("div", { className: cn__default.default(index_module.singleSlideContainer, (_a = {},
35
+ React__default.default.createElement("div", { className: index_module.component, onClick: handleWrapperClick }, fullScreen && !utils.isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src) ? (React__default.default.createElement("div", { className: index_module.fullScreenFrame },
36
+ React__default.default.createElement(slide.Slide, { isActive: true, containerAspectRatio: wrapperAspectRatio, image: currentImage, containerHeight: (wrapperRect === null || wrapperRect === void 0 ? void 0 : wrapperRect.height) || 0, meta: currentImageMeta, index: currentSlideIndex, imageAspectRatio: imageAspectRatio, slideVisible: false, fullScreen: true }))) : (React__default.default.createElement("div", { className: cn__default.default(index_module.singleSlideContainer, (_a = {},
36
37
  _a[index_module.mobile] = isMobile,
37
38
  _a[index_module.mobileVideo] = isMobile && utils.isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
38
39
  _a)), ref: wrapperRef },
@@ -1 +1 @@
1
- {"version":3,"file":"single.js","sources":["../../src/components/image-viewer/single.tsx"],"sourcesContent":["import React, { type FC, useContext, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { GalleryContext } from '../../context';\nimport { getImageAlt, isVideo } from '../../utils';\n\nimport { useHandleImageViewer } from './hooks';\nimport { Slide } from './slide';\n\nimport styles from './index.module.css';\n\nexport const Single: FC = () => {\n const { fullScreen, currentSlideIndex, getCurrentImage, getCurrentImageMeta } =\n useContext(GalleryContext);\n\n const { handleWrapperClick, isMobile } = useHandleImageViewer();\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const currentImage = getCurrentImage();\n const currentImageMeta = getCurrentImageMeta();\n\n if (!currentImage) return null;\n\n const imageWidth = currentImageMeta?.width || 1;\n const imageHeight = currentImageMeta?.height || 1;\n\n const imageAspectRatio = imageWidth / imageHeight;\n\n const wrapperRect = wrapperRef.current?.getBoundingClientRect();\n\n const wrapperAspectRatio = (wrapperRect?.width || 1) / (wrapperRect?.height || 1);\n\n return (\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n <div className={styles.component} onClick={handleWrapperClick}>\n {fullScreen && !isVideo(currentImage?.src) ? (\n <img\n src={currentImage?.src}\n alt={currentImage ? getImageAlt(currentImage, currentSlideIndex) : ''}\n className={styles.fullScreenImage}\n />\n ) : (\n <div\n className={cn(styles.singleSlideContainer, {\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n })}\n ref={wrapperRef}\n >\n <Slide\n isActive={true}\n containerAspectRatio={wrapperAspectRatio}\n image={currentImage}\n containerHeight={wrapperRect?.height || 0}\n meta={currentImageMeta}\n index={currentSlideIndex}\n imageAspectRatio={imageAspectRatio}\n slideVisible={true}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useContext","GalleryContext","useHandleImageViewer","useRef","React","styles","isVideo","getImageAlt","cn","Slide"],"mappings":";;;;;;;;;;;;;;;;;AAWa,IAAA,MAAM,GAAO,YAAA;;;AAChB,IAAA,IAAA,KACFA,gBAAU,CAACC,sBAAc,CAAC,EADtB,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,iBAAiB,uBAAA,EAAE,eAAe,qBAAA,EAAE,mBAAmB,yBAC7C;IAExB,IAAA,EAAA,GAAmCC,0BAAoB,EAAE,EAAvD,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAA2B;AAE/D,IAAA,IAAM,UAAU,GAAGC,YAAM,CAAiB,IAAI,CAAC;AAE/C,IAAA,IAAM,YAAY,GAAG,eAAe,EAAE;AACtC,IAAA,IAAM,gBAAgB,GAAG,mBAAmB,EAAE;AAE9C,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,IAAI;AAE9B,IAAA,IAAM,UAAU,GAAG,CAAA,gBAAgB,KAAhB,IAAA,IAAA,gBAAgB,KAAhB,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AAA,EAAA;AACrC,YAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAA,GAAG,QAAQ;AACzB,YAAA,EAAA,CAACA,YAAM,CAAC,WAAW,CAAA,GAAG,QAAQ,IAAIC,aAAO,CAAC,YAAY,aAAZ,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZ,YAAY,CAAE,GAAG,CAAC;gBAC9D,EACF,GAAG,EAAE,UAAU,EAAA;QAEfF,sBAAC,CAAA,aAAA,CAAAK,WAAK,IACF,QAAQ,EAAE,IAAI,EACd,oBAAoB,EAAE,kBAAkB,EACxC,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,CAAA,WAAW,KAAA,IAAA,IAAX,WAAW,KAAA,MAAA,GAAA,MAAA,GAAX,WAAW,CAAE,MAAM,KAAI,CAAC,EACzC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,iBAAiB,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,IAAI,GACpB,CACA,CACT,CACC;AAEd;;;;"}
1
+ {"version":3,"file":"single.js","sources":["../../src/components/image-viewer/single.tsx"],"sourcesContent":["import React, { type FC, useContext, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { GalleryContext } from '../../context';\nimport { isVideo } from '../../utils';\n\nimport { useHandleImageViewer } from './hooks';\nimport { Slide } from './slide';\n\nimport styles from './index.module.css';\n\nexport const Single: FC = () => {\n const { fullScreen, currentSlideIndex, getCurrentImage, getCurrentImageMeta } =\n useContext(GalleryContext);\n\n const { handleWrapperClick, isMobile } = useHandleImageViewer();\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const currentImage = getCurrentImage();\n const currentImageMeta = getCurrentImageMeta();\n\n if (!currentImage) return null;\n\n const imageWidth = currentImageMeta?.width || 1;\n const imageHeight = currentImageMeta?.height || 1;\n\n const imageAspectRatio = imageWidth / imageHeight;\n\n const wrapperRect = wrapperRef.current?.getBoundingClientRect();\n\n const wrapperAspectRatio = (wrapperRect?.width || 1) / (wrapperRect?.height || 1);\n\n return (\n /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n <div className={styles.component} onClick={handleWrapperClick}>\n {fullScreen && !isVideo(currentImage?.src) ? (\n <div className={styles.fullScreenFrame}>\n <Slide\n isActive={true}\n containerAspectRatio={wrapperAspectRatio}\n image={currentImage}\n containerHeight={wrapperRect?.height || 0}\n meta={currentImageMeta}\n index={currentSlideIndex}\n imageAspectRatio={imageAspectRatio}\n slideVisible={false}\n fullScreen={true}\n />\n </div>\n ) : (\n <div\n className={cn(styles.singleSlideContainer, {\n [styles.mobile]: isMobile,\n [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),\n })}\n ref={wrapperRef}\n >\n <Slide\n isActive={true}\n containerAspectRatio={wrapperAspectRatio}\n image={currentImage}\n containerHeight={wrapperRect?.height || 0}\n meta={currentImageMeta}\n index={currentSlideIndex}\n imageAspectRatio={imageAspectRatio}\n slideVisible={true}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useContext","GalleryContext","useHandleImageViewer","useRef","React","styles","isVideo","Slide","cn"],"mappings":";;;;;;;;;;;;;;;;;AAWa,IAAA,MAAM,GAAO,YAAA;;;AAChB,IAAA,IAAA,KACFA,gBAAU,CAACC,sBAAc,CAAC,EADtB,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,iBAAiB,uBAAA,EAAE,eAAe,qBAAA,EAAE,mBAAmB,yBAC7C;IAExB,IAAA,EAAA,GAAmCC,0BAAoB,EAAE,EAAvD,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAA2B;AAE/D,IAAA,IAAM,UAAU,GAAGC,YAAM,CAAiB,IAAI,CAAC;AAE/C,IAAA,IAAM,YAAY,GAAG,eAAe,EAAE;AACtC,IAAA,IAAM,gBAAgB,GAAG,mBAAmB,EAAE;AAE9C,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,IAAI;AAE9B,IAAA,I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AA,GAAA,WAAW,CAAE,MAAM,KAAI,CAAC,EACzC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,iBAAiB,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE,IAAI,EAClB,CAAA,CACA,KAENH,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAEI,mBAAE,CAACH,YAAM,CAAC,oBAAoB,GAAA,EAAA,GAAA,EAAA;AACrC,YAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAA,GAAG,QAAQ;AACzB,YAAA,EAAA,CAACA,YAAM,CAAC,WAAW,CAAA,GAAG,QAAQ,IAAIC,aAAO,CAAC,YAAY,aAAZ,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZ,YAAY,CAAE,GAAG,CAAC;gBAC9D,EACF,GAAG,EAAE,UAAU,EAAA;QAEfF,sBAAC,CAAA,aAAA,CAAAG,WAAK,IACF,QAAQ,EAAE,IAAI,EACd,oBAAoB,EAAE,kBAAkB,EACxC,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,CAAA,WAAW,KAAA,IAAA,IAAX,WAAW,KAAA,MAAA,GAAA,MAAA,GAAX,WAAW,CAAE,MAAM,KAAI,CAAC,EACzC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,iBAAiB,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,IAAI,GACpB,CACA,CACT,CACC;AAEd;;;;"}
@@ -9,6 +9,7 @@ type SlideProps = {
9
9
  index: number;
10
10
  containerHeight: number;
11
11
  slideVisible: boolean;
12
+ fullScreen?: boolean;
12
13
  };
13
14
  export declare const Slide: FC<SlideProps>;
14
15
  export {};
@@ -36,28 +36,32 @@ var SlideInner = function (_a) {
36
36
  React__default.default.createElement(coreComponentsSpinner.Spinner, { className: index_module.spinner, preset: 48, visible: loading })));
37
37
  };
38
38
  var Slide = function (_a) {
39
- var _b;
40
- var isActive = _a.isActive, meta = _a.meta, containerAspectRatio = _a.containerAspectRatio, imageAspectRatio = _a.imageAspectRatio, image = _a.image, index$1 = _a.index, containerHeight = _a.containerHeight, slideVisible = _a.slideVisible;
39
+ var _b, _c;
40
+ var isActive = _a.isActive, meta = _a.meta, containerAspectRatio = _a.containerAspectRatio, imageAspectRatio = _a.imageAspectRatio, image = _a.image, index$1 = _a.index, containerHeight = _a.containerHeight, slideVisible = _a.slideVisible, fullScreen = _a.fullScreen;
41
41
  var view = React.useContext(context.GalleryContext).view;
42
- var _c = hooks.useHandleImageViewer(), handleLoad = _c.handleLoad, handleLoadError = _c.handleLoadError;
42
+ var _d = hooks.useHandleImageViewer(), handleLoad = _d.handleLoad, handleLoadError = _d.handleLoadError;
43
43
  var broken = Boolean(meta === null || meta === void 0 ? void 0 : meta.broken);
44
44
  var small = utils.isSmallImage(meta);
45
45
  var verticalImageFit = !small && containerAspectRatio > imageAspectRatio;
46
46
  var horizontalImageFit = !small && containerAspectRatio <= imageAspectRatio;
47
+ var handleImageRef = React.useCallback(function (node) {
48
+ if ((node === null || node === void 0 ? void 0 : node.complete) && node.naturalWidth > 0 && !meta) {
49
+ handleLoad({ currentTarget: node }, index$1);
50
+ }
51
+ }, [handleLoad, index$1, meta]);
47
52
  if (utils.isVideo(image.src)) {
48
53
  return (React__default.default.createElement(SlideInner, { isVideoView: true, active: isActive, broken: broken, loading: !meta },
49
- React__default.default.createElement(index.Video, { url: image.src, index: index$1, isActive: isActive })));
54
+ React__default.default.createElement(index.Video, { url: image.src, index: index$1, isActive: isActive, className: cn__default.default((_b = {}, _b[index_module.fullScreenMedia] = fullScreen, _b)) })));
50
55
  }
51
56
  return (React__default.default.createElement(SlideInner, { active: isActive, broken: broken, loading: !meta },
52
- React__default.default.createElement("img", { src: image.src, alt: utils.getImageAlt(image, index$1), className: cn__default.default((_b = {},
53
- _b[index_module.smallImage] = small,
54
- _b[index_module.image] = !small && meta,
55
- _b[index_module.mobile] = view === 'mobile',
56
- _b[index_module.verticalImageFit] = verticalImageFit,
57
- _b[index_module.horizontalImageFit] = horizontalImageFit,
58
- _b)), onLoad: function (event) { return handleLoad(event, index$1); }, onError: function () { return handleLoadError(index$1); }, style: {
59
- maxHeight: "".concat(containerHeight, "px"),
60
- }, "data-test-id": slideVisible ? constants.TestIds.ACTIVE_IMAGE : undefined })));
57
+ React__default.default.createElement("img", { ref: handleImageRef, src: image.src, alt: utils.getImageAlt(image, index$1), className: cn__default.default((_c = {},
58
+ _c[index_module.smallImage] = small,
59
+ _c[index_module.image] = !small && meta,
60
+ _c[index_module.mobile] = view === 'mobile',
61
+ _c[index_module.fullScreenMedia] = fullScreen,
62
+ _c[index_module.verticalImageFit] = verticalImageFit,
63
+ _c[index_module.horizontalImageFit] = horizontalImageFit,
64
+ _c)), onLoad: function (event) { return handleLoad(event, index$1); }, onError: function () { return handleLoadError(index$1); }, style: fullScreen ? undefined : { maxHeight: "".concat(containerHeight, "px") }, "data-test-id": slideVisible ? constants.TestIds.ACTIVE_IMAGE : undefined })));
61
65
  };
62
66
 
63
67
  exports.Slide = Slide;
@@ -1 +1 @@
1
- {"version":3,"file":"slide.js","sources":["../../src/components/image-viewer/slide.tsx"],"sourcesContent":["import React, { type FC, type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Spinner } from '@alfalab/core-components-spinner';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { GalleryContext } from '../../context';\nimport { type GalleryImage, type ImageMeta } from '../../types';\nimport { getImageAlt, isSmallImage, isVideo, TestIds } from '../../utils';\n\nimport { useHandleImageViewer } from './hooks';\nimport { NoImagePaths } from './paths';\nimport { Video } from './video';\n\nimport styles from './index.module.css';\n\ntype SlideInnerProps = {\n active: boolean;\n broken: boolean;\n loading: boolean;\n children: ReactNode;\n isVideoView?: boolean;\n};\n\nconst SlideInner: FC<SlideInnerProps> = ({ children, broken, loading, isVideoView }) => {\n const content = broken ? (\n <div className={styles.brokenImgWrapper}>\n <div className={styles.brokenImgIcon}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='80'\n height='80'\n viewBox='0 0 80 80'\n fill='none'\n >\n <rect width='80' height='80' fill='none' />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d={NoImagePaths.baseImage}\n fill='#89898A'\n />\n <path d={NoImagePaths.triangleImage} fill='#89898A' />\n </svg>\n </div>\n\n <TypographyText view='primary-small' color='static-secondary-light'>\n Не удалось загрузить {isVideoView ? 'видео' : 'изображение'}\n </TypographyText>\n </div>\n ) : (\n children\n );\n\n return (\n <div className={cn(styles.slide, { [styles.slideLoading]: loading })}>\n {broken ? <div className={styles.placeholder}>{content}</div> : content}\n <Spinner className={styles.spinner} preset={48} visible={loading} />\n </div>\n );\n};\n\ntype SlideProps = {\n isActive: boolean;\n image: GalleryImage;\n meta?: ImageMeta;\n containerAspectRatio: number;\n imageAspectRatio: number;\n index: number;\n containerHeight: number;\n slideVisible: boolean;\n};\n\nexport const Slide: FC<SlideProps> = ({\n isActive,\n meta,\n containerAspectRatio,\n imageAspectRatio,\n image,\n index,\n containerHeight,\n slideVisible,\n}) => {\n const { view } = useContext(GalleryContext);\n const { handleLoad, handleLoadError } = useHandleImageViewer();\n\n const broken = Boolean(meta?.broken);\n const small = isSmallImage(meta);\n const verticalImageFit = !small && containerAspectRatio > imageAspectRatio;\n const horizontalImageFit = !small && containerAspectRatio <= imageAspectRatio;\n\n if (isVideo(image.src)) {\n return (\n <SlideInner isVideoView={true} active={isActive} broken={broken} loading={!meta}>\n <Video url={image.src} index={index} isActive={isActive} />\n </SlideInner>\n );\n }\n\n return (\n <SlideInner active={isActive} broken={broken} loading={!meta}>\n <img\n src={image.src}\n alt={getImageAlt(image, index)}\n className={cn({\n [styles.smallImage]: small,\n [styles.image]: !small && meta,\n [styles.mobile]: view === 'mobile',\n [styles.verticalImageFit]: verticalImageFit,\n [styles.horizontalImageFit]: horizontalImageFit,\n })}\n onLoad={(event) => handleLoad(event, index)}\n onError={() => handleLoadError(index)}\n style={{\n maxHeight: `${containerHeight}px`,\n }}\n data-test-id={slideVisible ? TestIds.ACTIVE_IMAGE : undefined}\n />\n </SlideInner>\n );\n};\n"],"names":["React","styles","NoImagePaths","TypographyText","cn","Spinner","index","useContext","GalleryContext","useHandleImageViewer","isSmallImage","isVideo","Video","getImageAlt","TestIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,UAAU,GAAwB,UAAC,EAA0C,EAAA;;QAAxC,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,MAAM,GAAA,EAAA,CAAA,MAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA;AAC7E,IAAA,IAAM,OAAO,GAAG,MAAM,IAClBA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,YAAM,CAAC,gBAAgB,EAAA;AACnC,QAAAD,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,YAAM,CAAC,aAAa,EAAA;AAChC,YAAAD,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EAAA;gBAEXA,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAG,CAAA;AAC3C,gBAAAA,sBAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAEE,kBAAY,CAAC,SAAS,EACzB,IAAI,EAAC,SAAS,EAChB,CAAA;gBACFF,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAEE,kBAAY,CAAC,aAAa,EAAE,IAAI,EAAC,SAAS,EAAG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AAA,EAAA,CAACA,YAAM,CAAC,gBAAgB,CAAA,GAAG,gBAAgB;AAC3C,gBAAA,EAAA,CAACA,YAAM,CAAC,kBAAkB,CAAA,GAAG,kBAAkB;oBACjD,EACF,MAAM,EAAE,UAAC,KAAK,EAAA,EAAK,OAAA,UAAU,CAAC,KAAK,EAAEK,OAAK,CAAC,CAAA,EAAA,EAC3C,OAAO,EAAE,YAAM,EAAA,OAAA,eAAe,CAACA,OAAK,CAAC,CAAtB,EAAsB,EACrC,KAAK,EAAE;gBACH,SAAS,EAAE,EAAG,CAAA,MAAA,CAAA,eAAe,EAAI,IAAA,CAAA;AACpC,aAAA,EAAA,cAAA,EACa,YAAY,GAAGQ,iBAAO,CAAC,YAAY,GAAG,SAAS,EAC/D,CAAA,CACO;AAErB;;;;"}
1
+ {"version":3,"file":"slide.js","sources":["../../src/components/image-viewer/slide.tsx"],"sourcesContent":["import React, { type FC, type ReactNode, useCallback, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Spinner } from '@alfalab/core-components-spinner';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { GalleryContext } from '../../context';\nimport { type GalleryImage, type ImageMeta } from '../../types';\nimport { getImageAlt, isSmallImage, isVideo, TestIds } from '../../utils';\n\nimport { useHandleImageViewer } from './hooks';\nimport { NoImagePaths } from './paths';\nimport { Video } from './video';\n\nimport styles from './index.module.css';\n\ntype SlideInnerProps = {\n active: boolean;\n broken: boolean;\n loading: boolean;\n children: ReactNode;\n isVideoView?: boolean;\n};\n\nconst SlideInner: FC<SlideInnerProps> = ({ children, broken, loading, isVideoView }) => {\n const content = broken ? (\n <div className={styles.brokenImgWrapper}>\n <div className={styles.brokenImgIcon}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='80'\n height='80'\n viewBox='0 0 80 80'\n fill='none'\n >\n <rect width='80' height='80' fill='none' />\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d={NoImagePaths.baseImage}\n fill='#89898A'\n />\n <path d={NoImagePaths.triangleImage} fill='#89898A' />\n </svg>\n </div>\n\n <TypographyText view='primary-small' color='static-secondary-light'>\n Не удалось загрузить {isVideoView ? 'видео' : 'изображение'}\n </TypographyText>\n </div>\n ) : (\n children\n );\n\n return (\n <div className={cn(styles.slide, { [styles.slideLoading]: loading })}>\n {broken ? <div className={styles.placeholder}>{content}</div> : content}\n <Spinner className={styles.spinner} preset={48} visible={loading} />\n </div>\n );\n};\n\ntype SlideProps = {\n isActive: boolean;\n image: GalleryImage;\n meta?: ImageMeta;\n containerAspectRatio: number;\n imageAspectRatio: number;\n index: number;\n containerHeight: number;\n slideVisible: boolean;\n fullScreen?: boolean;\n};\n\nexport const Slide: FC<SlideProps> = ({\n isActive,\n meta,\n containerAspectRatio,\n imageAspectRatio,\n image,\n index,\n containerHeight,\n slideVisible,\n fullScreen,\n}) => {\n const { view } = useContext(GalleryContext);\n const { handleLoad, handleLoadError } = useHandleImageViewer();\n\n const broken = Boolean(meta?.broken);\n const small = isSmallImage(meta);\n const verticalImageFit = !small && containerAspectRatio > imageAspectRatio;\n const horizontalImageFit = !small && containerAspectRatio <= imageAspectRatio;\n\n const handleImageRef = useCallback(\n (node: HTMLImageElement | null) => {\n if (node?.complete && node.naturalWidth > 0 && !meta) {\n handleLoad(\n { currentTarget: node } as React.SyntheticEvent<HTMLImageElement>,\n index,\n );\n }\n },\n [handleLoad, index, meta],\n );\n\n if (isVideo(image.src)) {\n return (\n <SlideInner isVideoView={true} active={isActive} broken={broken} loading={!meta}>\n <Video\n url={image.src}\n index={index}\n isActive={isActive}\n className={cn({ [styles.fullScreenMedia]: fullScreen })}\n />\n </SlideInner>\n );\n }\n\n return (\n <SlideInner active={isActive} broken={broken} loading={!meta}>\n <img\n ref={handleImageRef}\n src={image.src}\n alt={getImageAlt(image, index)}\n className={cn({\n [styles.smallImage]: small,\n [styles.image]: !small && meta,\n [styles.mobile]: view === 'mobile',\n [styles.fullScreenMedia]: fullScreen,\n [styles.verticalImageFit]: verticalImageFit,\n [styles.horizontalImageFit]: horizontalImageFit,\n })}\n onLoad={(event) => handleLoad(event, index)}\n onError={() => handleLoadError(index)}\n style={fullScreen ? undefined : { maxHeight: `${containerHeight}px` }}\n data-test-id={slideVisible ? TestIds.ACTIVE_IMAGE : undefined}\n />\n </SlideInner>\n );\n};\n"],"names":["React","styles","NoImagePaths","TypographyText","cn","Spinner","index","useContext","GalleryContext","useHandleImageViewer","isSmallImage","useCallback","isVideo","Video","getImageAlt","TestIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,UAAU,GAAwB,UAAC,EAA0C,EAAA;;QAAxC,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,MAAM,GAAA,EAAA,CAAA,MAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA;AAC7E,IAAA,IAAM,OAAO,GAAG,MAAM,IAClBA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,YAAM,CAAC,gBAAgB,EAAA;AACnC,QAAAD,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEC,YAAM,CAAC,aAAa,EAAA;AAChC,YAAAD,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EAAA;gBAEXA,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAG,CAAA;AAC3C,gBAAAA,sBAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACI,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAEE,kBAAY,CAAC,SAAS,EACzB,IAAI,EAAC,SAAS,EAChB,CAAA;gBACFF,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
8
  --border-radius-24: var(--border-radius-3xl);
9
9
  }
10
- .gallery__videoWrapper_15aby {
10
+ .gallery__videoWrapper_138oj {
11
11
  display: flex;
12
+ align-items: center;
12
13
  justify-content: center;
13
14
  height: 100%;
14
- width: auto;
15
+ width: 100%;
16
+ min-width: 0;
17
+ min-height: 0;
15
18
  position: relative;
16
19
  }
17
- .gallery__video_15aby {
20
+ .gallery__video_138oj {
18
21
  max-width: 100%;
19
22
  max-height: 100%;
23
+ -o-object-fit: contain;
24
+ object-fit: contain;
20
25
  border-radius: var(--border-radius-24);
21
26
  }
22
- .gallery__mobile_15aby {
27
+ .gallery__mobile_138oj {
23
28
  border-radius: var(--border-radius-0);
24
29
  }
25
- .gallery__videoButton_15aby {
30
+ .gallery__videoButton_138oj {
26
31
  position: absolute;
27
32
  top: 50%;
28
33
  left: 50%;
@@ -30,13 +35,13 @@
30
35
  z-index: 1;
31
36
  color: green;
32
37
  }
33
- .gallery__icon_15aby {
38
+ .gallery__icon_138oj {
34
39
  color: var(--color-static-neutral-0);
35
40
  }
36
- .gallery__iconShape_15aby {
41
+ .gallery__iconShape_138oj {
37
42
  fill: var(--color-static-neutral-translucent-700);
38
43
  }
39
- .gallery__bottomButton_15aby {
44
+ .gallery__bottomButton_138oj {
40
45
  position: absolute;
41
46
  bottom: 48px;
42
47
  left: 32px;
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"videoWrapper":"gallery__videoWrapper_15aby","video":"gallery__video_15aby","mobile":"gallery__mobile_15aby","videoButton":"gallery__videoButton_15aby","icon":"gallery__icon_15aby","iconShape":"gallery__iconShape_15aby","bottomButton":"gallery__bottomButton_15aby"};
5
+ var styles = {"videoWrapper":"gallery__videoWrapper_138oj","video":"gallery__video_138oj","mobile":"gallery__mobile_138oj","videoButton":"gallery__videoButton_138oj","icon":"gallery__icon_138oj","iconShape":"gallery__iconShape_138oj","bottomButton":"gallery__bottomButton_138oj"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../../src/components/image-viewer/video/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.videoWrapper {\n display: flex;\n justify-content: center;\n height: 100%;\n width: auto;\n position: relative;\n}\n\n.video {\n max-width: 100%;\n max-height: 100%;\n border-radius: var(--border-radius-24);\n}\n\n.mobile {\n border-radius: var(--border-radius-0);\n}\n\n.videoButton {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1;\n color: green;\n}\n\n.icon {\n color: var(--color-static-neutral-0);\n}\n\n.iconShape {\n fill: var(--color-static-neutral-translucent-700);\n}\n\n.bottomButton {\n position: absolute;\n bottom: 48px;\n left: 32px;\n right: 32px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,cAAc,CAAC,6BAA6B,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,4BAA4B,CAAC,MAAM,CAAC,qBAAqB,CAAC,WAAW,CAAC,0BAA0B,CAAC,cAAc,CAAC,6BAA6B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../../src/components/image-viewer/video/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.videoWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n min-width: 0;\n min-height: 0;\n position: relative;\n}\n\n.video {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--border-radius-24);\n}\n\n.mobile {\n border-radius: var(--border-radius-0);\n}\n\n.videoButton {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1;\n color: green;\n}\n\n.icon {\n color: var(--color-static-neutral-0);\n}\n\n.iconShape {\n fill: var(--color-static-neutral-translucent-700);\n}\n\n.bottomButton {\n position: absolute;\n bottom: 48px;\n left: 32px;\n right: 32px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,cAAc,CAAC,6BAA6B,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,uBAAuB,CAAC,aAAa,CAAC,4BAA4B,CAAC,MAAM,CAAC,qBAAqB,CAAC,WAAW,CAAC,0BAA0B,CAAC,cAAc,CAAC,6BAA6B,CAAC;;;;"}
@@ -7,10 +7,10 @@
7
7
  --gap-4: var(--gap-2xs);
8
8
  --gap-8: var(--gap-xs);
9
9
  }
10
- .gallery__description_9txux {
10
+ .gallery__description_56ogm {
11
11
  text-align: center;
12
12
  }
13
- .gallery__infoWrapper_9txux {
13
+ .gallery__infoWrapper_56ogm {
14
14
  background-color: var(--color-static-neutral-0-inverted);
15
15
  display: flex;
16
16
  align-items: center;
@@ -19,7 +19,7 @@
19
19
  position: relative;
20
20
  height: 48px;
21
21
  }
22
- .gallery__infoWrapper_9txux.gallery__video_9txux {
22
+ .gallery__infoWrapper_56ogm.gallery__video_56ogm {
23
23
  padding: 0 var(--gap-4) var(--gap-4);
24
24
  justify-content: space-between;
25
25
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"description":"gallery__description_9txux","infoWrapper":"gallery__infoWrapper_9txux","video":"gallery__video_9txux"};
5
+ var styles = {"description":"gallery__description_56ogm","infoWrapper":"gallery__infoWrapper_56ogm","video":"gallery__video_56ogm"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -13,7 +13,7 @@
13
13
  --gap-12: var(--gap-s);
14
14
  --gap-24: var(--gap-xl);
15
15
  }
16
- .gallery__component_3ax0x {
16
+ .gallery__component_1qpjj {
17
17
  display: flex;
18
18
  flex-wrap: nowrap;
19
19
  align-content: center;
@@ -25,25 +25,25 @@
25
25
  scrollbar-width: none;
26
26
  background-color: var(--color-static-neutral-0-inverted);
27
27
  }
28
- .gallery__component_3ax0x.gallery__mobile_3ax0x {
28
+ .gallery__component_1qpjj.gallery__mobile_1qpjj {
29
29
  padding: var(--gap-8) var(--gap-24);
30
30
  }
31
- .gallery__component_3ax0x::-webkit-scrollbar {
31
+ .gallery__component_1qpjj::-webkit-scrollbar {
32
32
  display: none;
33
33
  }
34
- .gallery__previews_3ax0x {
34
+ .gallery__previews_1qpjj {
35
35
  display: flex;
36
36
  }
37
- .gallery__preview_3ax0x {
37
+ .gallery__preview_1qpjj {
38
38
  flex-shrink: 0;
39
39
  margin-right: var(--gap-4);
40
40
  }
41
- .gallery__preview_3ax0x.gallery__mobile_3ax0x {
41
+ .gallery__preview_1qpjj.gallery__mobile_1qpjj {
42
42
  margin-right: var(--gap-2);
43
43
  }
44
- .gallery__preview_3ax0x:first-child {
44
+ .gallery__preview_1qpjj:first-child {
45
45
  margin-left: auto;
46
46
  }
47
- .gallery__preview_3ax0x:last-child {
47
+ .gallery__preview_1qpjj:last-child {
48
48
  margin-right: auto;
49
49
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"gallery__component_3ax0x","mobile":"gallery__mobile_3ax0x","preview":"gallery__preview_3ax0x"};
5
+ var styles = {"component":"gallery__component_1qpjj","mobile":"gallery__mobile_1qpjj","preview":"gallery__preview_1qpjj"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -5,7 +5,7 @@
5
5
  --gap-16: var(--gap-m);
6
6
  --gap-32: var(--gap-2xl);
7
7
  }
8
- .gallery__subtitles_k5m0k {
8
+ .gallery__subtitles_1lymx {
9
9
  position: absolute;
10
10
  align-self: flex-end;
11
11
  padding: var(--gap-0) var(--gap-32);
@@ -18,10 +18,10 @@
18
18
  opacity 500ms ease-in-out,
19
19
  margin-bottom 270ms ease-in-out;
20
20
  }
21
- .gallery__subtitles_k5m0k.gallery__mobile_k5m0k {
21
+ .gallery__subtitles_1lymx.gallery__mobile_1lymx {
22
22
  position: static;
23
23
  position: initial;
24
24
  }
25
- .gallery__hideSubtitles_k5m0k {
25
+ .gallery__hideSubtitles_1lymx {
26
26
  opacity: 0;
27
27
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"subtitles":"gallery__subtitles_k5m0k","mobile":"gallery__mobile_k5m0k","hideSubtitles":"gallery__hideSubtitles_k5m0k"};
5
+ var styles = {"subtitles":"gallery__subtitles_1lymx","mobile":"gallery__mobile_1lymx","hideSubtitles":"gallery__hideSubtitles_1lymx"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map