@alfalab/core-components-gallery 5.5.4 → 5.5.6

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 (61) hide show
  1. package/Component.js +1 -1
  2. package/{buttons-9373d7f8.js → buttons-7a002709.js} +1 -1
  3. package/components/header/Component.js +2 -2
  4. package/components/header/buttons.js +1 -1
  5. package/components/header/index.css +6 -6
  6. package/components/header-info-block/Component.js +1 -1
  7. package/components/header-info-block/index.css +5 -5
  8. package/components/image-preview/Component.js +1 -1
  9. package/components/image-preview/index.css +14 -14
  10. package/components/image-viewer/component.js +2 -2
  11. package/components/image-viewer/index.css +19 -19
  12. package/components/image-viewer/slide.js +1 -1
  13. package/components/navigation-bar/Component.js +1 -1
  14. package/components/navigation-bar/index.css +6 -6
  15. package/cssm/components/header/Component.js +1 -1
  16. package/cssm/components/image-viewer/component.js +1 -1
  17. package/cssm/components/image-viewer/slide.js +1 -1
  18. package/esm/Component.js +1 -1
  19. package/esm/{buttons-0d4236de.js → buttons-e0f8b2c5.js} +1 -1
  20. package/esm/components/header/Component.js +2 -2
  21. package/esm/components/header/buttons.js +1 -1
  22. package/esm/components/header/index.css +6 -6
  23. package/esm/components/header-info-block/Component.js +1 -1
  24. package/esm/components/header-info-block/index.css +5 -5
  25. package/esm/components/image-preview/Component.js +1 -1
  26. package/esm/components/image-preview/index.css +14 -14
  27. package/esm/components/image-viewer/component.js +2 -2
  28. package/esm/components/image-viewer/index.css +19 -19
  29. package/esm/components/image-viewer/slide.js +1 -1
  30. package/esm/components/navigation-bar/Component.js +1 -1
  31. package/esm/components/navigation-bar/index.css +6 -6
  32. package/esm/index.css +3 -3
  33. package/esm/{slide-727b1ba6.js → slide-754b366a.js} +2 -2
  34. package/index.css +3 -3
  35. package/modern/Component.js +1 -1
  36. package/modern/{buttons-bd77bc22.js → buttons-524cf6a6.js} +1 -1
  37. package/modern/components/header/Component.js +2 -2
  38. package/modern/components/header/buttons.js +1 -1
  39. package/modern/components/header/index.css +6 -6
  40. package/modern/components/header-info-block/Component.js +1 -1
  41. package/modern/components/header-info-block/index.css +5 -5
  42. package/modern/components/image-preview/Component.js +1 -1
  43. package/modern/components/image-preview/index.css +14 -14
  44. package/modern/components/image-viewer/component.js +2 -2
  45. package/modern/components/image-viewer/index.css +19 -19
  46. package/modern/components/image-viewer/slide.js +1 -1
  47. package/modern/components/navigation-bar/Component.js +1 -1
  48. package/modern/components/navigation-bar/index.css +6 -6
  49. package/modern/index.css +3 -3
  50. package/modern/{slide-3aabb007.js → slide-4894ad66.js} +2 -2
  51. package/package.json +2 -2
  52. package/{slide-38745600.js → slide-aa0d0b29.js} +2 -2
  53. package/src/components/header/Component.tsx +4 -3
  54. package/src/components/image-viewer/component.tsx +1 -1
  55. package/src/components/image-viewer/slide.tsx +1 -1
  56. /package/{buttons-9373d7f8.d.ts → buttons-7a002709.d.ts} +0 -0
  57. /package/esm/{buttons-0d4236de.d.ts → buttons-e0f8b2c5.d.ts} +0 -0
  58. /package/esm/{slide-727b1ba6.d.ts → slide-754b366a.d.ts} +0 -0
  59. /package/modern/{buttons-bd77bc22.d.ts → buttons-524cf6a6.d.ts} +0 -0
  60. /package/modern/{slide-3aabb007.d.ts → slide-4894ad66.d.ts} +0 -0
  61. /package/{slide-38745600.d.ts → slide-aa0d0b29.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- /* hash: 1j25x */
1
+ /* hash: 1cgjr */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -23,7 +23,7 @@
23
23
  } :root {
24
24
  } :root {
25
25
  --focus-color: var(--color-light-border-link);
26
- } .gallery__component_cphoh {
26
+ } .gallery__component_19d01 {
27
27
  display: flex;
28
28
  padding: var(--gap-2xs);
29
29
  border: 2px solid rgba(0, 0, 0, 0);
@@ -31,11 +31,11 @@
31
31
  overflow: hidden;
32
32
  transition: border 0.15s ease-in-out;
33
33
  outline: none;
34
- } .gallery__active_cphoh {
34
+ } .gallery__active_19d01 {
35
35
  border-color: var(--color-static-overlay-white-xhigh)
36
- } .gallery__active_cphoh > .gallery__image_cphoh {
36
+ } .gallery__active_19d01 > .gallery__image_19d01 {
37
37
  opacity: 0.7;
38
- } .gallery__preview_cphoh {
38
+ } .gallery__preview_19d01 {
39
39
  width: 56px;
40
40
  height: 56px;
41
41
  flex-shrink: 0;
@@ -43,9 +43,9 @@
43
43
  cursor: pointer;
44
44
  -webkit-user-select: none;
45
45
  user-select: none;
46
- } .gallery__image_cphoh {
46
+ } .gallery__image_19d01 {
47
47
  transition: opacity 0.15s ease-in-out
48
- } .gallery__image_cphoh > img {
48
+ } .gallery__image_19d01 > img {
49
49
  display: block;
50
50
  background-color: var(--color-light-bg-primary);
51
51
  width: 100%;
@@ -54,23 +54,23 @@
54
54
  object-fit: cover;
55
55
  overflow: clip;
56
56
  overflow-clip-margin: border-box;
57
- } .gallery__image_cphoh:hover {
57
+ } .gallery__image_19d01:hover {
58
58
  opacity: 0.7;
59
- } .gallery__loading_cphoh {
59
+ } .gallery__loading_19d01 {
60
60
  background-color: var(--color-static-bg-secondary-dark)
61
- } .gallery__loading_cphoh .gallery__active_cphoh {
61
+ } .gallery__loading_19d01 .gallery__active_19d01 {
62
62
  background-color: var(--color-static-bg-quaternary-dark);
63
- } .gallery__brokenImageWrapper_cphoh {
63
+ } .gallery__brokenImageWrapper_19d01 {
64
64
  display: flex;
65
65
  justify-content: center;
66
66
  align-items: center;
67
67
  background-color: var(--color-static-bg-quaternary-dark)
68
- } .gallery__brokenImageWrapper_cphoh:hover {
68
+ } .gallery__brokenImageWrapper_19d01:hover {
69
69
  opacity: 0.7;
70
- } .gallery__brokenIcon_cphoh {
70
+ } .gallery__brokenIcon_19d01 {
71
71
  width: 40px;
72
72
  height: 40px;
73
- } .gallery__focused_cphoh {
73
+ } .gallery__focused_19d01 {
74
74
  outline: 2px solid var(--focus-color);
75
75
  outline-offset: 2px;
76
76
  }
@@ -10,7 +10,7 @@ import { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHea
10
10
  import { GalleryContext } from '../../context.js';
11
11
  import { getImageAlt, getImageKey } from '../../utils/utils.js';
12
12
  import { TestIds } from '../../utils/constants.js';
13
- import { s as styles, S as Slide } from '../../slide-727b1ba6.js';
13
+ import { s as styles, S as Slide } from '../../slide-754b366a.js';
14
14
  import 'swiper/swiper.min.css';
15
15
 
16
16
  SwiperCore.use([EffectFade, A11y, Controller]);
@@ -83,7 +83,7 @@ var ImageViewer = function () {
83
83
  onSlideChange: handleSlideChange,
84
84
  });
85
85
  }, [swiper, fullScreen, initialSlide, handleSlideChange, setSwiper]);
86
- var showControls = !singleSlide && !fullScreen;
86
+ var showControls = !singleSlide && !fullScreen && !!images.length;
87
87
  var swiperWidth = (swiper === null || swiper === void 0 ? void 0 : swiper.width) || 1;
88
88
  var swiperHeight = (swiper === null || swiper === void 0 ? void 0 : swiper.height) || (swiper === null || swiper === void 0 ? void 0 : swiper.width) || 1;
89
89
  var swiperAspectRatio = swiperWidth / swiperHeight;
@@ -1,4 +1,4 @@
1
- /* hash: 1u99o */
1
+ /* hash: 164vt */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -27,13 +27,13 @@
27
27
  } :root {
28
28
  } :root {
29
29
  --focus-color: var(--color-light-border-link);
30
- } .gallery__component_11cpp {
30
+ } .gallery__component_n525m {
31
31
  display: flex;
32
32
  flex-grow: 1;
33
33
  justify-content: center;
34
34
  align-items: center;
35
35
  background-color: var(--color-static-bg-primary-dark);
36
- } .gallery__swiper_11cpp {
36
+ } .gallery__swiper_n525m {
37
37
  display: flex;
38
38
  width: 100%;
39
39
  height: 100%;
@@ -42,42 +42,42 @@
42
42
  max-height: calc(100vh - 168px);
43
43
  padding: var(--gap-2xl) var(--gap-m);
44
44
  box-sizing: border-box;
45
- } .gallery__singleSlide_11cpp .gallery__swiper_11cpp {
45
+ } .gallery__singleSlide_n525m .gallery__swiper_n525m {
46
46
  max-height: calc(100vh - 80px);
47
47
  padding: var(--gap-2xl);
48
- } .gallery__hidden_11cpp {
48
+ } .gallery__hidden_n525m {
49
49
  display: none;
50
- } .gallery__slide_11cpp {
50
+ } .gallery__slide_n525m {
51
51
  position: relative;
52
52
  display: flex;
53
53
  justify-content: center;
54
54
  align-items: center;
55
55
  width: 100%;
56
56
  height: 100%;
57
- } .gallery__slideLoading_11cpp {
57
+ } .gallery__slideLoading_n525m {
58
58
  background-color: var(--color-static-bg-secondary-dark);
59
59
  border-radius: var(--border-radius-m);
60
- } .gallery__image_11cpp {
60
+ } .gallery__image_n525m {
61
61
  width: 0;
62
62
  height: 0;
63
63
  -webkit-user-select: none;
64
64
  user-select: none;
65
65
  background-color: var(--color-light-bg-primary);
66
66
  border-radius: var(--border-radius-m);
67
- } .gallery__smallImage_11cpp {
67
+ } .gallery__smallImage_n525m {
68
68
  position: relative;
69
69
  width: auto;
70
70
  height: auto;
71
71
  -webkit-user-select: none;
72
72
  user-select: none;
73
73
  background-color: var(--color-light-bg-primary);
74
- } .gallery__verticalImageFit_11cpp {
74
+ } .gallery__verticalImageFit_n525m {
75
75
  width: auto;
76
76
  height: 100%;
77
- } .gallery__horizontalImageFit_11cpp {
77
+ } .gallery__horizontalImageFit_n525m {
78
78
  width: 100%;
79
79
  height: auto;
80
- } .gallery__arrow_11cpp {
80
+ } .gallery__arrow_n525m {
81
81
  display: flex;
82
82
  flex-direction: column;
83
83
  justify-content: center;
@@ -89,14 +89,14 @@
89
89
  color: var(--color-static-graphic-light);
90
90
  transition: background-color 0.15s ease-in-out;
91
91
  outline: none
92
- } .gallery__arrow_11cpp:hover {
92
+ } .gallery__arrow_n525m:hover {
93
93
  background-color: var(--color-static-bg-primary-dark-tint-15);
94
- } .gallery__arrow_11cpp:active {
94
+ } .gallery__arrow_n525m:active {
95
95
  background-color: var(--color-static-bg-primary-dark-tint-20);
96
- } .gallery__focused_11cpp {
96
+ } .gallery__focused_n525m {
97
97
  outline: 2px solid var(--focus-color);
98
98
  outline-offset: 2px;
99
- } .gallery__placeholder_11cpp {
99
+ } .gallery__placeholder_n525m {
100
100
  display: flex;
101
101
  justify-content: center;
102
102
  align-items: center;
@@ -104,18 +104,18 @@
104
104
  height: 300px;
105
105
  border-radius: var(--border-radius-m);
106
106
  background-color: var(--color-static-bg-quaternary-dark);
107
- } .gallery__brokenImgWrapper_11cpp {
107
+ } .gallery__brokenImgWrapper_n525m {
108
108
  position: relative;
109
109
  display: flex;
110
110
  flex-direction: column;
111
111
  align-items: center;
112
112
  width: 150px;
113
113
  text-align: center;
114
- } .gallery__brokenImgIcon_11cpp {
114
+ } .gallery__brokenImgIcon_n525m {
115
115
  width: 80px;
116
116
  height: 80px;
117
117
  margin-bottom: var(--gap-2xs);
118
- } .gallery__fullScreenImage_11cpp {
118
+ } .gallery__fullScreenImage_n525m {
119
119
  width: 100%;
120
120
  height: auto;
121
121
  background-color: var(--color-light-bg-primary);
@@ -4,4 +4,4 @@ import '@alfalab/core-components-typography/esm';
4
4
  import '../../utils/utils.js';
5
5
  import '../../utils/constants.js';
6
6
  import './paths.js';
7
- export { S as Slide } from '../../slide-727b1ba6.js';
7
+ export { S as Slide } from '../../slide-754b366a.js';
@@ -4,7 +4,7 @@ import { getImageKey } from '../../utils/utils.js';
4
4
  import { TestIds } from '../../utils/constants.js';
5
5
  import { ImagePreview } from '../image-preview/Component.js';
6
6
 
7
- var styles = {"component":"gallery__component_1arbz","preview":"gallery__preview_1arbz"};
7
+ var styles = {"component":"gallery__component_1gtt4","preview":"gallery__preview_1gtt4"};
8
8
  require('./index.css')
9
9
 
10
10
  var MIN_SCROLL_STEP = 24;
@@ -1,4 +1,4 @@
1
- /* hash: whddx */
1
+ /* hash: 1kkzu */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -16,7 +16,7 @@
16
16
  --gap-xl: 24px;
17
17
  } :root {
18
18
  } :root {
19
- } .gallery__component_1arbz {
19
+ } .gallery__component_1gtt4 {
20
20
  display: flex;
21
21
  flex-wrap: nowrap;
22
22
  align-content: center;
@@ -26,13 +26,13 @@
26
26
  box-sizing: border-box;
27
27
  padding: 10px var(--gap-xl);
28
28
  scrollbar-width: none
29
- } .gallery__component_1arbz::-webkit-scrollbar {
29
+ } .gallery__component_1gtt4::-webkit-scrollbar {
30
30
  display: none;
31
- } .gallery__preview_1arbz {
31
+ } .gallery__preview_1gtt4 {
32
32
  flex-shrink: 0;
33
33
  margin: 0 var(--gap-3xs)
34
- } .gallery__preview_1arbz:first-child {
34
+ } .gallery__preview_1gtt4:first-child {
35
35
  margin-left: auto;
36
- } .gallery__preview_1arbz:last-child {
36
+ } .gallery__preview_1gtt4:last-child {
37
37
  margin-right: auto;
38
38
  }
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: y74yn */
1
+ /* hash: 18bc3 */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-static-bg-primary-dark: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,14 +15,14 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .gallery__container_1wdpj {
18
+ } .gallery__container_rl0r4 {
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  justify-content: space-between;
22
22
  height: 100%;
23
23
  width: 100%;
24
24
  background-color: var(--color-static-bg-primary-dark);
25
- } .gallery__modal_1wdpj {
25
+ } .gallery__modal_rl0r4 {
26
26
  flex-grow: 1;
27
27
  width: 100%;
28
28
  height: 100%;
@@ -5,7 +5,7 @@ import { isSmallImage, getImageAlt } from './utils/utils.js';
5
5
  import { TestIds } from './utils/constants.js';
6
6
  import { NoImagePaths } from './components/image-viewer/paths.js';
7
7
 
8
- var styles = {"component":"gallery__component_11cpp","swiper":"gallery__swiper_11cpp","singleSlide":"gallery__singleSlide_11cpp","hidden":"gallery__hidden_11cpp","slide":"gallery__slide_11cpp","slideLoading":"gallery__slideLoading_11cpp","image":"gallery__image_11cpp","smallImage":"gallery__smallImage_11cpp","verticalImageFit":"gallery__verticalImageFit_11cpp","horizontalImageFit":"gallery__horizontalImageFit_11cpp","arrow":"gallery__arrow_11cpp","focused":"gallery__focused_11cpp","placeholder":"gallery__placeholder_11cpp","brokenImgWrapper":"gallery__brokenImgWrapper_11cpp","brokenImgIcon":"gallery__brokenImgIcon_11cpp","fullScreenImage":"gallery__fullScreenImage_11cpp"};
8
+ var styles = {"component":"gallery__component_n525m","swiper":"gallery__swiper_n525m","singleSlide":"gallery__singleSlide_n525m","hidden":"gallery__hidden_n525m","slide":"gallery__slide_n525m","slideLoading":"gallery__slideLoading_n525m","image":"gallery__image_n525m","smallImage":"gallery__smallImage_n525m","verticalImageFit":"gallery__verticalImageFit_n525m","horizontalImageFit":"gallery__horizontalImageFit_n525m","arrow":"gallery__arrow_n525m","focused":"gallery__focused_n525m","placeholder":"gallery__placeholder_n525m","brokenImgWrapper":"gallery__brokenImgWrapper_n525m","brokenImgIcon":"gallery__brokenImgIcon_n525m","fullScreenImage":"gallery__fullScreenImage_n525m"};
9
9
  require('./components/image-viewer/index.css')
10
10
 
11
11
  var SlideInner = function (_a) {
@@ -30,7 +30,7 @@ var Slide = function (_a) {
30
30
  return (React.createElement(SlideInner, { active: isActive, broken: broken, loading: !meta, withPlaceholder: small || broken },
31
31
  React.createElement("img", { src: image.src, alt: getImageAlt(image, index), className: cn((_b = {},
32
32
  _b[styles.smallImage] = small,
33
- _b[styles.image] = !small,
33
+ _b[styles.image] = !small && meta,
34
34
  _b[styles.verticalImageFit] = verticalImageFit,
35
35
  _b[styles.horizontalImageFit] = horizontalImageFit,
36
36
  _b)), onLoad: function (event) { return handleLoad(event, index); }, onError: function () { return handleLoadError(index); }, style: {
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: y74yn */
1
+ /* hash: 18bc3 */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-static-bg-primary-dark: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,14 +15,14 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .gallery__container_1wdpj {
18
+ } .gallery__container_rl0r4 {
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  justify-content: space-between;
22
22
  height: 100%;
23
23
  width: 100%;
24
24
  background-color: var(--color-static-bg-primary-dark);
25
- } .gallery__modal_1wdpj {
25
+ } .gallery__modal_rl0r4 {
26
26
  flex-grow: 1;
27
27
  width: 100%;
28
28
  height: 100%;
@@ -7,7 +7,7 @@ import '@alfalab/hooks';
7
7
  import { GalleryContext } from './context.js';
8
8
  import { ImageViewer } from './components/image-viewer/component.js';
9
9
 
10
- const styles = {"container":"gallery__container_1wdpj","modal":"gallery__modal_1wdpj"};
10
+ const styles = {"container":"gallery__container_rl0r4","modal":"gallery__modal_rl0r4"};
11
11
  require('./index.css')
12
12
 
13
13
  const Backdrop = () => null;
@@ -6,7 +6,7 @@ import { ArrowsOutwardMIcon } from '@alfalab/icons-glyph/ArrowsOutwardMIcon';
6
6
  import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
7
7
  import { PointerDownMIcon } from '@alfalab/icons-glyph/PointerDownMIcon';
8
8
 
9
- const styles = {"header":"gallery__header_d9o1a","buttons":"gallery__buttons_d9o1a","iconButton":"gallery__iconButton_d9o1a"};
9
+ const styles = {"header":"gallery__header_12qvc","buttons":"gallery__buttons_12qvc","iconButton":"gallery__iconButton_12qvc"};
10
10
  require('./components/header/index.css')
11
11
 
12
12
  const Fullscreen = ({ buttonRef, ...restProps }) => (React.createElement(TooltipDesktop, { trigger: 'hover', position: 'bottom', content: '\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u043C \u0440\u0435\u0436\u0438\u043C\u0435', fallbackPlacements: ['bottom-end'] },
@@ -3,7 +3,7 @@ import { GalleryContext } from '../../context.js';
3
3
  import { isSmallImage } from '../../utils/utils.js';
4
4
  import { TestIds } from '../../utils/constants.js';
5
5
  import { HeaderInfoBlock } from '../header-info-block/Component.js';
6
- import { s as styles, D as Download, E as Exit, a as ExitFullscreen, F as Fullscreen } from '../../buttons-bd77bc22.js';
6
+ import { s as styles, D as Download, E as Exit, a as ExitFullscreen, F as Fullscreen } from '../../buttons-524cf6a6.js';
7
7
 
8
8
  const Header = () => {
9
9
  const { currentSlideIndex, singleSlide, images, fullScreen, getCurrentImageMeta, getCurrentImage, setFullScreen, onClose, } = useContext(GalleryContext);
@@ -22,7 +22,7 @@ const Header = () => {
22
22
  const currentImage = getCurrentImage();
23
23
  const canDownload = currentImage?.canDownload ?? true;
24
24
  const filename = currentImage?.name || '';
25
- const description = singleSlide
25
+ const description = singleSlide || !images.length
26
26
  ? ''
27
27
  : `Изображение ${currentSlideIndex + 1} из ${images.length}`;
28
28
  const meta = getCurrentImageMeta();
@@ -5,4 +5,4 @@ import '@alfalab/icons-glyph/ArrowsInwardMIcon';
5
5
  import '@alfalab/icons-glyph/ArrowsOutwardMIcon';
6
6
  import '@alfalab/icons-glyph/CrossMIcon';
7
7
  import '@alfalab/icons-glyph/PointerDownMIcon';
8
- export { D as Download, E as Exit, a as ExitFullscreen, F as Fullscreen } from '../../buttons-bd77bc22.js';
8
+ export { D as Download, E as Exit, a as ExitFullscreen, F as Fullscreen } from '../../buttons-524cf6a6.js';
@@ -1,4 +1,4 @@
1
- /* hash: rf9h8 */
1
+ /* hash: 1fivx */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-static-graphic-light: #fff; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -20,20 +20,20 @@
20
20
  --gap-2xl: 32px;
21
21
  } :root {
22
22
  } :root {
23
- } .gallery__header_d9o1a {
23
+ } .gallery__header_12qvc {
24
24
  display: flex;
25
25
  justify-content: space-between;
26
26
  flex-shrink: 0;
27
27
  width: 100%;
28
28
  padding: var(--gap-m) var(--gap-xl);
29
29
  box-sizing: border-box;
30
- } .gallery__buttons_d9o1a {
30
+ } .gallery__buttons_12qvc {
31
31
  display: flex;
32
32
  padding-left: var(--gap-2xl)
33
- } .gallery__buttons_d9o1a path {
33
+ } .gallery__buttons_12qvc path {
34
34
  color: var(--color-static-graphic-light);
35
- } /* TODO: применять static цвет через prop IconButton'а */ .gallery__iconButton_d9o1a:hover path {
35
+ } /* TODO: применять static цвет через prop IconButton'а */ .gallery__iconButton_12qvc:hover path {
36
36
  color: var(--color-static-graphic-light-shade-7);
37
- } .gallery__iconButton_d9o1a:active path {
37
+ } .gallery__iconButton_12qvc:active path {
38
38
  color: var(--color-static-graphic-light-shade-15);
39
39
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Typography } from '@alfalab/core-components-typography/modern';
3
3
  import { splitFilename } from '../../utils/split-filename.js';
4
4
 
5
- const styles = {"info":"gallery__info_1wcev","filenameHead":"gallery__filenameHead_1wcev","filenameContainer":"gallery__filenameContainer_1wcev","description":"gallery__description_1wcev"};
5
+ const styles = {"info":"gallery__info_tyt77","filenameHead":"gallery__filenameHead_tyt77","filenameContainer":"gallery__filenameContainer_tyt77","description":"gallery__description_tyt77"};
6
6
  require('./index.css')
7
7
 
8
8
  const HeaderInfoBlock = ({ filename, description }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 125ao */
1
+ /* hash: e1o7y */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,21 +15,21 @@
15
15
  --gap-2xs: 4px;
16
16
  } :root {
17
17
  } :root {
18
- } .gallery__info_1wcev {
18
+ } .gallery__info_tyt77 {
19
19
  height: 100%;
20
20
  display: flex;
21
21
  flex-direction: column;
22
22
  justify-content: center;
23
23
  overflow: hidden;
24
- } .gallery__filenameHead_1wcev {
24
+ } .gallery__filenameHead_tyt77 {
25
25
  display: inline;
26
26
  text-overflow: ellipsis;
27
27
  overflow: hidden;
28
28
  white-space: nowrap;
29
- } .gallery__filenameContainer_1wcev {
29
+ } .gallery__filenameContainer_tyt77 {
30
30
  overflow: hidden;
31
31
  display: inline-flex;
32
- } .gallery__description_1wcev {
32
+ } .gallery__description_tyt77 {
33
33
  display: inline;
34
34
  text-overflow: ellipsis;
35
35
  overflow: hidden;
@@ -14,7 +14,7 @@ import '../image-viewer/component.js';
14
14
  import { useFocus } from '@alfalab/hooks';
15
15
  import { NoImagePaths } from './paths.js';
16
16
 
17
- const styles = {"component":"gallery__component_cphoh","active":"gallery__active_cphoh","image":"gallery__image_cphoh","preview":"gallery__preview_cphoh","loading":"gallery__loading_cphoh","brokenImageWrapper":"gallery__brokenImageWrapper_cphoh","brokenIcon":"gallery__brokenIcon_cphoh","focused":"gallery__focused_cphoh"};
17
+ const styles = {"component":"gallery__component_19d01","active":"gallery__active_19d01","image":"gallery__image_19d01","preview":"gallery__preview_19d01","loading":"gallery__loading_19d01","brokenImageWrapper":"gallery__brokenImageWrapper_19d01","brokenIcon":"gallery__brokenIcon_19d01","focused":"gallery__focused_19d01"};
18
18
  require('./index.css')
19
19
 
20
20
  const ImagePreview = ({ image, active = false, index, onSelect, className }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1j25x */
1
+ /* hash: 1cgjr */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -23,7 +23,7 @@
23
23
  } :root {
24
24
  } :root {
25
25
  --focus-color: var(--color-light-border-link);
26
- } .gallery__component_cphoh {
26
+ } .gallery__component_19d01 {
27
27
  display: flex;
28
28
  padding: var(--gap-2xs);
29
29
  border: 2px solid rgba(0, 0, 0, 0);
@@ -31,11 +31,11 @@
31
31
  overflow: hidden;
32
32
  transition: border 0.15s ease-in-out;
33
33
  outline: none;
34
- } .gallery__active_cphoh {
34
+ } .gallery__active_19d01 {
35
35
  border-color: var(--color-static-overlay-white-xhigh)
36
- } .gallery__active_cphoh > .gallery__image_cphoh {
36
+ } .gallery__active_19d01 > .gallery__image_19d01 {
37
37
  opacity: 0.7;
38
- } .gallery__preview_cphoh {
38
+ } .gallery__preview_19d01 {
39
39
  width: 56px;
40
40
  height: 56px;
41
41
  flex-shrink: 0;
@@ -43,9 +43,9 @@
43
43
  cursor: pointer;
44
44
  -webkit-user-select: none;
45
45
  user-select: none;
46
- } .gallery__image_cphoh {
46
+ } .gallery__image_19d01 {
47
47
  transition: opacity 0.15s ease-in-out
48
- } .gallery__image_cphoh > img {
48
+ } .gallery__image_19d01 > img {
49
49
  display: block;
50
50
  background-color: var(--color-light-bg-primary);
51
51
  width: 100%;
@@ -54,23 +54,23 @@
54
54
  object-fit: cover;
55
55
  overflow: clip;
56
56
  overflow-clip-margin: border-box;
57
- } .gallery__image_cphoh:hover {
57
+ } .gallery__image_19d01:hover {
58
58
  opacity: 0.7;
59
- } .gallery__loading_cphoh {
59
+ } .gallery__loading_19d01 {
60
60
  background-color: var(--color-static-bg-secondary-dark)
61
- } .gallery__loading_cphoh .gallery__active_cphoh {
61
+ } .gallery__loading_19d01 .gallery__active_19d01 {
62
62
  background-color: var(--color-static-bg-quaternary-dark);
63
- } .gallery__brokenImageWrapper_cphoh {
63
+ } .gallery__brokenImageWrapper_19d01 {
64
64
  display: flex;
65
65
  justify-content: center;
66
66
  align-items: center;
67
67
  background-color: var(--color-static-bg-quaternary-dark)
68
- } .gallery__brokenImageWrapper_cphoh:hover {
68
+ } .gallery__brokenImageWrapper_19d01:hover {
69
69
  opacity: 0.7;
70
- } .gallery__brokenIcon_cphoh {
70
+ } .gallery__brokenIcon_19d01 {
71
71
  width: 40px;
72
72
  height: 40px;
73
- } .gallery__focused_cphoh {
73
+ } .gallery__focused_19d01 {
74
74
  outline: 2px solid var(--focus-color);
75
75
  outline-offset: 2px;
76
76
  }
@@ -9,7 +9,7 @@ import { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHea
9
9
  import { GalleryContext } from '../../context.js';
10
10
  import { getImageAlt, getImageKey } from '../../utils/utils.js';
11
11
  import { TestIds } from '../../utils/constants.js';
12
- import { s as styles, S as Slide } from '../../slide-3aabb007.js';
12
+ import { s as styles, S as Slide } from '../../slide-4894ad66.js';
13
13
  import 'swiper/swiper.min.css';
14
14
 
15
15
  SwiperCore.use([EffectFade, A11y, Controller]);
@@ -76,7 +76,7 @@ const ImageViewer = () => {
76
76
  onSwiper: setSwiper,
77
77
  onSlideChange: handleSlideChange,
78
78
  }), [swiper, fullScreen, initialSlide, handleSlideChange, setSwiper]);
79
- const showControls = !singleSlide && !fullScreen;
79
+ const showControls = !singleSlide && !fullScreen && !!images.length;
80
80
  const swiperWidth = swiper?.width || 1;
81
81
  const swiperHeight = swiper?.height || swiper?.width || 1;
82
82
  const swiperAspectRatio = swiperWidth / swiperHeight;