@alfalab/core-components 47.12.1-beta.1 → 47.13.0-beta.0

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 (299) hide show
  1. package/gallery/Component.js +12 -29
  2. package/gallery/components/header/Component.js +13 -0
  3. package/gallery/components/header-mobile/Component.js +3 -6
  4. package/gallery/components/header-mobile/index.d.ts +1 -1
  5. package/gallery/components/header-mobile/index.js +6 -0
  6. package/gallery/components/image-preview/Component.js +44 -17
  7. package/gallery/components/image-preview/index.css +0 -2
  8. package/gallery/components/image-viewer/component.js +3 -2
  9. package/gallery/components/image-viewer/index.css +0 -2
  10. package/gallery/components/image-viewer/slide.js +1 -1
  11. package/gallery/components/image-viewer/video/index.css +4 -4
  12. package/gallery/components/image-viewer/video/index.d.ts +2 -1
  13. package/gallery/components/image-viewer/video/index.js +28 -23
  14. package/gallery/components/index.d.ts +2 -0
  15. package/gallery/components/index.js +4 -0
  16. package/gallery/components/info-bar/Component.js +18 -7
  17. package/gallery/components/info-bar/index.css +4 -4
  18. package/gallery/components/info-bar/index.d.ts +1 -1
  19. package/gallery/components/info-bar/index.js +6 -0
  20. package/gallery/components/navigation-bar/Component.js +3 -4
  21. package/gallery/cssm/Component.js +12 -29
  22. package/gallery/cssm/components/header/Component.js +13 -0
  23. package/gallery/cssm/components/header-mobile/Component.js +3 -12
  24. package/gallery/cssm/components/header-mobile/index.d.ts +1 -1
  25. package/gallery/cssm/components/header-mobile/index.js +6 -0
  26. package/gallery/cssm/components/image-preview/Component.js +44 -17
  27. package/gallery/cssm/components/image-preview/index.module.css +0 -2
  28. package/gallery/cssm/components/image-viewer/component.js +2 -1
  29. package/gallery/cssm/components/image-viewer/index.module.css +0 -2
  30. package/gallery/cssm/components/image-viewer/slide.js +1 -1
  31. package/gallery/cssm/components/image-viewer/video/index.d.ts +2 -1
  32. package/gallery/cssm/components/image-viewer/video/index.js +27 -22
  33. package/gallery/cssm/components/image-viewer/video/index.module.css +4 -4
  34. package/gallery/cssm/components/index.d.ts +2 -0
  35. package/gallery/cssm/components/index.js +4 -0
  36. package/gallery/cssm/components/info-bar/Component.js +18 -13
  37. package/gallery/cssm/components/info-bar/index.d.ts +1 -1
  38. package/gallery/cssm/components/info-bar/index.js +6 -0
  39. package/gallery/cssm/components/info-bar/index.module.css +4 -4
  40. package/gallery/cssm/components/navigation-bar/Component.js +3 -4
  41. package/gallery/cssm/index.d.ts +1 -1
  42. package/gallery/cssm/index.js +1 -9
  43. package/gallery/cssm/utils/constants.d.ts +12 -1
  44. package/gallery/cssm/utils/constants.js +17 -0
  45. package/gallery/cssm/utils/index.js +6 -0
  46. package/gallery/esm/Component.js +19 -37
  47. package/gallery/esm/components/header/Component.js +14 -1
  48. package/gallery/esm/components/header-mobile/Component.js +3 -18
  49. package/gallery/esm/components/header-mobile/index.d.ts +1 -1
  50. package/gallery/esm/components/header-mobile/index.js +20 -1
  51. package/gallery/esm/components/image-preview/Component.js +44 -17
  52. package/gallery/esm/components/image-preview/index.css +0 -2
  53. package/gallery/esm/components/image-preview/index.js +1 -0
  54. package/gallery/esm/components/image-viewer/component.js +3 -4
  55. package/gallery/esm/components/image-viewer/index.css +0 -2
  56. package/gallery/esm/components/image-viewer/index.js +1 -3
  57. package/gallery/esm/components/image-viewer/slide.js +2 -4
  58. package/gallery/esm/components/image-viewer/video/index.css +4 -4
  59. package/gallery/esm/components/image-viewer/video/index.d.ts +2 -1
  60. package/gallery/esm/components/image-viewer/video/index.js +28 -22
  61. package/gallery/esm/components/index.d.ts +2 -0
  62. package/gallery/esm/components/index.js +4 -3
  63. package/gallery/esm/components/info-bar/Component.js +19 -20
  64. package/gallery/esm/components/info-bar/index.css +4 -4
  65. package/gallery/esm/components/info-bar/index.d.ts +1 -1
  66. package/gallery/esm/components/info-bar/index.js +20 -1
  67. package/gallery/esm/components/navigation-bar/Component.js +4 -3
  68. package/gallery/esm/components/navigation-bar/index.js +1 -1
  69. package/gallery/esm/index.d.ts +1 -1
  70. package/gallery/esm/index.js +11 -12
  71. package/gallery/esm/{slide-ca7119fa.js → slide-da05984b.js} +1 -3
  72. package/gallery/esm/utils/constants.d.ts +12 -1
  73. package/gallery/esm/utils/constants.js +12 -1
  74. package/gallery/esm/utils/index.js +1 -1
  75. package/gallery/index.d.ts +1 -1
  76. package/gallery/index.js +1 -9
  77. package/gallery/modern/Component.js +19 -37
  78. package/gallery/modern/components/header/Component.js +13 -1
  79. package/gallery/modern/components/header-mobile/Component.js +3 -18
  80. package/gallery/modern/components/header-mobile/index.d.ts +1 -1
  81. package/gallery/modern/components/header-mobile/index.js +19 -1
  82. package/gallery/modern/components/image-preview/Component.js +39 -13
  83. package/gallery/modern/components/image-preview/index.css +0 -2
  84. package/gallery/modern/components/image-preview/index.js +1 -0
  85. package/gallery/modern/components/image-viewer/component.js +3 -4
  86. package/gallery/modern/components/image-viewer/index.css +0 -2
  87. package/gallery/modern/components/image-viewer/index.js +1 -3
  88. package/gallery/modern/components/image-viewer/slide.js +2 -4
  89. package/gallery/modern/components/image-viewer/video/index.css +4 -4
  90. package/gallery/modern/components/image-viewer/video/index.d.ts +2 -1
  91. package/gallery/modern/components/image-viewer/video/index.js +28 -22
  92. package/gallery/modern/components/index.d.ts +2 -0
  93. package/gallery/modern/components/index.js +4 -3
  94. package/gallery/modern/components/info-bar/Component.js +18 -20
  95. package/gallery/modern/components/info-bar/index.css +4 -4
  96. package/gallery/modern/components/info-bar/index.d.ts +1 -1
  97. package/gallery/modern/components/info-bar/index.js +19 -1
  98. package/gallery/modern/components/navigation-bar/Component.js +4 -3
  99. package/gallery/modern/components/navigation-bar/index.js +1 -1
  100. package/gallery/modern/index.d.ts +1 -1
  101. package/gallery/modern/index.js +11 -12
  102. package/gallery/modern/{slide-e2bd02f9.js → slide-dac6462d.js} +1 -3
  103. package/gallery/modern/utils/constants.d.ts +12 -1
  104. package/gallery/modern/utils/constants.js +12 -1
  105. package/gallery/modern/utils/index.js +1 -1
  106. package/gallery/{slide-ebea0c09.js → slide-387e9068.js} +1 -1
  107. package/gallery/utils/constants.d.ts +12 -1
  108. package/gallery/utils/constants.js +17 -0
  109. package/gallery/utils/index.js +6 -0
  110. package/modal/components/controls/Component.js +1 -1
  111. package/modal/components/footer/Component.js +1 -1
  112. package/modal/esm/Component.responsive.js +1 -1
  113. package/modal/esm/components/controls/Component.js +1 -1
  114. package/modal/esm/components/controls/index.js +1 -1
  115. package/modal/esm/components/footer/Component.js +1 -1
  116. package/modal/esm/desktop/Component.desktop.js +1 -1
  117. package/modal/esm/desktop/index.js +1 -1
  118. package/modal/esm/index.js +1 -1
  119. package/modal/esm/mobile/Component.mobile.js +1 -1
  120. package/modal/esm/mobile/index.js +1 -1
  121. package/modal/modern/Component.responsive.js +1 -1
  122. package/modal/modern/components/controls/Component.js +1 -1
  123. package/modal/modern/components/controls/index.js +1 -1
  124. package/modal/modern/components/footer/Component.js +1 -1
  125. package/modal/modern/desktop/Component.desktop.js +1 -1
  126. package/modal/modern/desktop/index.js +1 -1
  127. package/modal/modern/index.js +1 -1
  128. package/modal/modern/mobile/Component.mobile.js +1 -1
  129. package/modal/modern/mobile/index.js +1 -1
  130. package/package.json +1 -1
  131. package/select/components/base-select/Component.js +2 -2
  132. package/select/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  133. package/select/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  134. package/select/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  135. package/select/esm/Component.responsive.js +3 -3
  136. package/select/esm/components/base-select/Component.js +2 -2
  137. package/select/esm/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  138. package/select/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  139. package/select/esm/components/base-select/components/list-mobile/list-mobile.js +1 -1
  140. package/select/esm/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  141. package/select/esm/components/base-select/index.js +2 -2
  142. package/select/esm/components/index.js +2 -2
  143. package/select/esm/desktop/Component.desktop.js +2 -2
  144. package/select/esm/desktop/index.js +2 -2
  145. package/select/esm/index.js +3 -3
  146. package/select/esm/mobile/Component.mobile.js +3 -3
  147. package/select/esm/mobile/Component.modal.mobile.js +3 -3
  148. package/select/esm/mobile/index.js +3 -3
  149. package/select/esm/presets/index.js +1 -1
  150. package/select/esm/presets/useSelectWithApply/hook.js +1 -1
  151. package/select/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  152. package/select/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  153. package/select/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  154. package/select/esm/shared/index.js +3 -3
  155. package/select/mobile/Component.mobile.js +1 -1
  156. package/select/modern/Component.responsive.js +3 -3
  157. package/select/modern/components/base-select/Component.js +2 -2
  158. package/select/modern/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  159. package/select/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  160. package/select/modern/components/base-select/components/list-mobile/list-mobile.js +1 -1
  161. package/select/modern/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  162. package/select/modern/components/base-select/index.js +2 -2
  163. package/select/modern/components/index.js +2 -2
  164. package/select/modern/desktop/Component.desktop.js +2 -2
  165. package/select/modern/desktop/index.js +2 -2
  166. package/select/modern/index.js +3 -3
  167. package/select/modern/mobile/Component.mobile.js +3 -3
  168. package/select/modern/mobile/Component.modal.mobile.js +3 -3
  169. package/select/modern/mobile/index.js +3 -3
  170. package/select/modern/presets/index.js +1 -1
  171. package/select/modern/presets/useSelectWithApply/hook.js +1 -1
  172. package/select/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  173. package/select/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  174. package/select/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  175. package/select/modern/shared/index.js +3 -3
  176. package/select/presets/index.js +1 -1
  177. package/select/presets/useSelectWithApply/hook.js +1 -1
  178. package/select/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  179. package/select/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  180. package/select/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  181. package/select/shared/index.js +1 -1
  182. package/side-panel/components/controls/Component.js +1 -1
  183. package/side-panel/components/footer/Component.js +1 -1
  184. package/side-panel/esm/Component.responsive.js +1 -1
  185. package/side-panel/esm/components/controls/Component.js +1 -1
  186. package/side-panel/esm/components/controls/index.js +1 -1
  187. package/side-panel/esm/components/footer/Component.desktop.js +1 -1
  188. package/side-panel/esm/components/footer/Component.js +1 -1
  189. package/side-panel/esm/components/footer/Component.mobile.js +1 -1
  190. package/side-panel/esm/desktop/Component.desktop.js +1 -1
  191. package/side-panel/esm/desktop/index.js +1 -1
  192. package/side-panel/esm/index.js +1 -1
  193. package/side-panel/esm/mobile/Component.mobile.js +1 -1
  194. package/side-panel/esm/mobile/index.js +1 -1
  195. package/side-panel/modern/Component.responsive.js +1 -1
  196. package/side-panel/modern/components/controls/Component.js +1 -1
  197. package/side-panel/modern/components/controls/index.js +1 -1
  198. package/side-panel/modern/components/footer/Component.desktop.js +1 -1
  199. package/side-panel/modern/components/footer/Component.js +1 -1
  200. package/side-panel/modern/components/footer/Component.mobile.js +1 -1
  201. package/side-panel/modern/desktop/Component.desktop.js +1 -1
  202. package/side-panel/modern/desktop/index.js +1 -1
  203. package/side-panel/modern/index.js +1 -1
  204. package/side-panel/modern/mobile/Component.mobile.js +1 -1
  205. package/side-panel/modern/mobile/index.js +1 -1
  206. package/themes/compiled/mobile-dark-bluetint.css +5 -5
  207. package/toast-plate/components/base-toast-plate/component.js +2 -2
  208. package/toast-plate/components/base-toast-plate/hooks/useDeprecatedBadge.js +1 -1
  209. package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +2 -2
  210. package/toast-plate/esm/Component.responsive.js +2 -2
  211. package/toast-plate/esm/components/base-toast-plate/component.js +2 -2
  212. package/toast-plate/esm/components/base-toast-plate/hooks/useDeprecatedBadge.js +1 -1
  213. package/toast-plate/esm/components/base-toast-plate/index.js +2 -2
  214. package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +2 -2
  215. package/toast-plate/esm/desktop/Component.desktop.js +2 -2
  216. package/toast-plate/esm/desktop/index.js +2 -2
  217. package/toast-plate/esm/index-2f466837.d.ts +2 -2
  218. package/toast-plate/esm/index.js +2 -2
  219. package/toast-plate/esm/mobile/Component.mobile.js +2 -2
  220. package/toast-plate/esm/mobile/index.js +2 -2
  221. package/toast-plate/index-2f466837.d.ts +2 -2
  222. package/toast-plate/modern/Component.responsive.js +2 -2
  223. package/toast-plate/modern/components/base-toast-plate/component.js +2 -2
  224. package/toast-plate/modern/components/base-toast-plate/hooks/useDeprecatedBadge.js +1 -1
  225. package/toast-plate/modern/components/base-toast-plate/index.js +2 -2
  226. package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +2 -2
  227. package/toast-plate/modern/desktop/Component.desktop.js +2 -2
  228. package/toast-plate/modern/desktop/index.js +2 -2
  229. package/toast-plate/modern/index-2f466837.d.ts +2 -2
  230. package/toast-plate/modern/index.js +2 -2
  231. package/toast-plate/modern/mobile/Component.mobile.js +2 -2
  232. package/toast-plate/modern/mobile/index.js +2 -2
  233. package/typography/esm/component.js +2 -2
  234. package/typography/esm/index.js +2 -2
  235. package/typography/esm/text/component.js +1 -1
  236. package/typography/esm/text/index.js +1 -1
  237. package/typography/esm/title/component.js +1 -1
  238. package/typography/esm/title/index.js +2 -2
  239. package/typography/esm/title-mobile/component.js +2 -2
  240. package/typography/esm/title-mobile/index.js +2 -2
  241. package/typography/esm/title-responsive/component.js +2 -2
  242. package/typography/esm/title-responsive/index.js +2 -2
  243. package/typography/modern/component.js +2 -2
  244. package/typography/modern/index.js +2 -2
  245. package/typography/modern/text/component.js +1 -1
  246. package/typography/modern/text/index.js +1 -1
  247. package/typography/modern/title/component.js +1 -1
  248. package/typography/modern/title/index.js +2 -2
  249. package/typography/modern/title-mobile/component.js +2 -2
  250. package/typography/modern/title-mobile/index.js +2 -2
  251. package/typography/modern/title-responsive/component.js +2 -2
  252. package/typography/modern/title-responsive/index.js +2 -2
  253. package/typography/text/component.js +1 -1
  254. package/typography/title/component.js +1 -1
  255. package/typography/title/index.js +1 -1
  256. package/typography/title-mobile/component.js +1 -1
  257. package/typography/title-responsive/component.js +1 -1
  258. /package/gallery/esm/{slide-ca7119fa.d.ts → slide-da05984b.d.ts} +0 -0
  259. /package/gallery/modern/{slide-e2bd02f9.d.ts → slide-dac6462d.d.ts} +0 -0
  260. /package/gallery/{slide-ebea0c09.d.ts → slide-387e9068.d.ts} +0 -0
  261. /package/modal/esm/{layout.module-6361424d.js → layout.module-94caa56e.js} +0 -0
  262. /package/modal/{layout.module-3fc11792.js → layout.module-4c01904f.js} +0 -0
  263. /package/modal/modern/{layout.module-e0e30502.js → layout.module-db207304.js} +0 -0
  264. /package/select/esm/{hook-3b730828.d.ts → hook-2ac6d7d4.d.ts} +0 -0
  265. /package/select/esm/{hook-3b730828.js → hook-2ac6d7d4.js} +0 -0
  266. /package/select/esm/{list-popover-desktop-aec914e9.d.ts → list-popover-desktop-20c87b82.d.ts} +0 -0
  267. /package/select/esm/{list-popover-desktop-aec914e9.js → list-popover-desktop-20c87b82.js} +0 -0
  268. /package/select/esm/{mobile.module-ae380d17.js → mobile.module-6dbbc4d9.js} +0 -0
  269. /package/select/{hook-20696959.d.ts → hook-3b0516fb.d.ts} +0 -0
  270. /package/select/{hook-20696959.js → hook-3b0516fb.js} +0 -0
  271. /package/select/{list-popover-desktop-ba96cd50.d.ts → list-popover-desktop-447ef64d.d.ts} +0 -0
  272. /package/select/{list-popover-desktop-ba96cd50.js → list-popover-desktop-447ef64d.js} +0 -0
  273. /package/select/{mobile.module-c6e0a17d.js → mobile.module-0f5968f6.js} +0 -0
  274. /package/select/modern/{hook-08cacbab.d.ts → hook-587f20b6.d.ts} +0 -0
  275. /package/select/modern/{hook-08cacbab.js → hook-587f20b6.js} +0 -0
  276. /package/select/modern/{list-popover-desktop-65d415ed.d.ts → list-popover-desktop-d2b7aabc.d.ts} +0 -0
  277. /package/select/modern/{list-popover-desktop-65d415ed.js → list-popover-desktop-d2b7aabc.js} +0 -0
  278. /package/select/modern/{mobile.module-c16635d6.js → mobile.module-7d3202b8.js} +0 -0
  279. /package/side-panel/esm/{layout.module-8f998738.js → layout.module-b79af139.js} +0 -0
  280. /package/side-panel/{layout.module-2364c729.js → layout.module-6e8d2296.js} +0 -0
  281. /package/side-panel/modern/{layout.module-c793f704.js → layout.module-549d23fa.js} +0 -0
  282. /package/toast-plate/{PortalContext-5d1c35c9.d.ts → PortalContext-812e773a.d.ts} +0 -0
  283. /package/toast-plate/{PortalContext-5d1c35c9.js → PortalContext-812e773a.js} +0 -0
  284. /package/toast-plate/esm/{PortalContext-76e29fb0.d.ts → PortalContext-b4370e67.d.ts} +0 -0
  285. /package/toast-plate/esm/{PortalContext-76e29fb0.js → PortalContext-b4370e67.js} +0 -0
  286. /package/toast-plate/esm/{getDataTestId-9959edc4.d.ts → getDataTestId-11a376e0.d.ts} +0 -0
  287. /package/toast-plate/esm/{getDataTestId-9959edc4.js → getDataTestId-11a376e0.js} +0 -0
  288. /package/toast-plate/{getDataTestId-bf909aba.d.ts → getDataTestId-316e89c4.d.ts} +0 -0
  289. /package/toast-plate/{getDataTestId-bf909aba.js → getDataTestId-316e89c4.js} +0 -0
  290. /package/toast-plate/modern/{PortalContext-de359614.d.ts → PortalContext-6bf9a525.d.ts} +0 -0
  291. /package/toast-plate/modern/{PortalContext-de359614.js → PortalContext-6bf9a525.js} +0 -0
  292. /package/toast-plate/modern/{getDataTestId-0f89d772.d.ts → getDataTestId-56b815bf.d.ts} +0 -0
  293. /package/toast-plate/modern/{getDataTestId-0f89d772.js → getDataTestId-56b815bf.js} +0 -0
  294. /package/typography/{colors.module-111c5bd6.js → colors.module-bf04f1dc.js} +0 -0
  295. /package/typography/{common.module-62a6f23d.js → common.module-4c00fa0c.js} +0 -0
  296. /package/typography/esm/{colors.module-1525a6cf.js → colors.module-d44fc8b3.js} +0 -0
  297. /package/typography/esm/{common.module-1cba9ba8.js → common.module-598e0956.js} +0 -0
  298. /package/typography/modern/{colors.module-ffa65232.js → colors.module-09161417.js} +0 -0
  299. /package/typography/modern/{common.module-a97de0bb.js → common.module-7bad8215.js} +0 -0
@@ -12,17 +12,17 @@
12
12
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
13
13
 
14
14
  /* новые значения, используйте их */
15
- } :root { /* deprecated */ /* deprecated */
16
- --gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* 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
+ } :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 */
17
16
 
18
17
  /* новые значения, используйте их */
18
+ --gap-8: 8px;
19
19
  } :root {
20
20
  } :root {
21
21
  } .description {
22
22
  text-align: center;
23
- margin-bottom: var(--gap-xs);
23
+ margin-bottom: var(--gap-8);
24
24
  } .videoButtons {
25
- padding: 0 var(--gap-xs);
25
+ padding: 0 var(--gap-8);
26
26
  position: relative;
27
27
  height: 48px;
28
28
  } .center {
@@ -1,7 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var React = require('react');
4
- var cn = require('classnames');
5
4
  var context = require('../../context.js');
6
5
  var utils_utils = require('../../utils/utils.js');
7
6
  var utils_constants = require('../../utils/constants.js');
@@ -11,17 +10,17 @@ var styles = require('./index.module.css');
11
10
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
11
 
13
12
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
- var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
13
  var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
16
14
 
17
15
  var MIN_SCROLL_STEP = 24;
18
16
  var NavigationBar = function () {
19
17
  var containerRef = React.useRef(null);
20
- var _a = React.useContext(context.GalleryContext), images = _a.images, currentSlideIndex = _a.currentSlideIndex, setCurrentSlideIndex = _a.setCurrentSlideIndex, getSwiper = _a.getSwiper;
18
+ var _a = React.useContext(context.GalleryContext), images = _a.images, currentSlideIndex = _a.currentSlideIndex, setCurrentSlideIndex = _a.setCurrentSlideIndex, getSwiper = _a.getSwiper, setPlayingVideo = _a.setPlayingVideo;
21
19
  var swiper = getSwiper();
22
20
  var handlePreviewSelect = function (index) {
23
21
  setCurrentSlideIndex === null || setCurrentSlideIndex === void 0 ? void 0 : setCurrentSlideIndex(index);
24
22
  if (swiper) {
23
+ setPlayingVideo(true);
25
24
  swiper.slideTo(index);
26
25
  }
27
26
  };
@@ -63,7 +62,7 @@ var NavigationBar = function () {
63
62
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
64
63
  React__default.default.createElement("div", { className: styles__default.default.component, ref: containerRef, onKeyDown: handleKeyDown, "data-test-id": utils_constants.TestIds.NAVIGATION_BAR }, images.map(function (image, index) {
65
64
  var active = index === currentSlideIndex;
66
- return (React__default.default.createElement(components_imagePreview_Component.ImagePreview, { key: utils_utils.getImageKey(image, index), image: image, active: active, index: index, onSelect: handlePreviewSelect, className: cn__default.default(styles__default.default.preview) }));
65
+ return (React__default.default.createElement(components_imagePreview_Component.ImagePreview, { key: utils_utils.getImageKey(image, index), image: image, active: active, index: index, onSelect: handlePreviewSelect, className: styles__default.default.preview }));
67
66
  })));
68
67
  };
69
68
 
@@ -1,2 +1,2 @@
1
1
  export * from "./Component";
2
- export * from "./utils/index";
2
+ export { GALLERY_EVENTS, TestIds } from "./utils/index";
@@ -1,18 +1,10 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
3
  var Component = require('./Component.js');
4
- var utils_splitFilename = require('./utils/split-filename.js');
5
- var utils_utils = require('./utils/utils.js');
6
4
  var utils_constants = require('./utils/constants.js');
7
5
 
8
6
 
9
7
 
10
8
  exports.Gallery = Component.Gallery;
11
- exports.splitFilename = utils_splitFilename.splitFilename;
12
- exports.PLACEHOLDER_HEIGHT = utils_utils.PLACEHOLDER_HEIGHT;
13
- exports.PLACEHOLDER_WIDTH = utils_utils.PLACEHOLDER_WIDTH;
14
- exports.getImageAlt = utils_utils.getImageAlt;
15
- exports.getImageKey = utils_utils.getImageKey;
16
- exports.isSmallImage = utils_utils.isSmallImage;
17
- exports.isVideo = utils_utils.isVideo;
9
+ exports.GALLERY_EVENTS = utils_constants.GALLERY_EVENTS;
18
10
  exports.TestIds = utils_constants.TestIds;
@@ -10,4 +10,15 @@ declare const TestIds: {
10
10
  MUTE_BUTTON: string;
11
11
  UNMUTE_BUTTON: string;
12
12
  };
13
- export { TestIds };
13
+ declare const PREVIEW_WIDTH_MOBILE = 36;
14
+ declare const PREVIEW_HEIGHT_MOBILE = 46;
15
+ declare const PREVIEW_WIDTH_DESKTOP = 56;
16
+ declare const PREVIEW_HEIGHT_DESKTOP = 56;
17
+ declare const PREVIEW_VIDEO_MULTIPLIER = 12;
18
+ declare const GALLERY_EVENTS: {
19
+ ON_PLAY: string;
20
+ ON_PAUSE: string;
21
+ ON_MUTE: string;
22
+ ON_UNMUTE: string;
23
+ };
24
+ export { TestIds, PREVIEW_WIDTH_MOBILE, PREVIEW_HEIGHT_MOBILE, PREVIEW_WIDTH_DESKTOP, PREVIEW_HEIGHT_DESKTOP, PREVIEW_VIDEO_MULTIPLIER, GALLERY_EVENTS };
@@ -12,5 +12,22 @@ var TestIds = {
12
12
  MUTE_BUTTON: 'mute-button',
13
13
  UNMUTE_BUTTON: 'unmute-button',
14
14
  };
15
+ var PREVIEW_WIDTH_MOBILE = 36;
16
+ var PREVIEW_HEIGHT_MOBILE = 46;
17
+ var PREVIEW_WIDTH_DESKTOP = 56;
18
+ var PREVIEW_HEIGHT_DESKTOP = 56;
19
+ var PREVIEW_VIDEO_MULTIPLIER = 12;
20
+ var GALLERY_EVENTS = {
21
+ ON_PLAY: 'Gallery:OnPlay',
22
+ ON_PAUSE: 'Gallery:OnPause',
23
+ ON_MUTE: 'Gallery:OnMute',
24
+ ON_UNMUTE: 'Gallery:OnUnmute',
25
+ };
15
26
 
27
+ exports.GALLERY_EVENTS = GALLERY_EVENTS;
28
+ exports.PREVIEW_HEIGHT_DESKTOP = PREVIEW_HEIGHT_DESKTOP;
29
+ exports.PREVIEW_HEIGHT_MOBILE = PREVIEW_HEIGHT_MOBILE;
30
+ exports.PREVIEW_VIDEO_MULTIPLIER = PREVIEW_VIDEO_MULTIPLIER;
31
+ exports.PREVIEW_WIDTH_DESKTOP = PREVIEW_WIDTH_DESKTOP;
32
+ exports.PREVIEW_WIDTH_MOBILE = PREVIEW_WIDTH_MOBILE;
16
33
  exports.TestIds = TestIds;
@@ -13,4 +13,10 @@ exports.getImageAlt = utils_utils.getImageAlt;
13
13
  exports.getImageKey = utils_utils.getImageKey;
14
14
  exports.isSmallImage = utils_utils.isSmallImage;
15
15
  exports.isVideo = utils_utils.isVideo;
16
+ exports.GALLERY_EVENTS = utils_constants.GALLERY_EVENTS;
17
+ exports.PREVIEW_HEIGHT_DESKTOP = utils_constants.PREVIEW_HEIGHT_DESKTOP;
18
+ exports.PREVIEW_HEIGHT_MOBILE = utils_constants.PREVIEW_HEIGHT_MOBILE;
19
+ exports.PREVIEW_VIDEO_MULTIPLIER = utils_constants.PREVIEW_VIDEO_MULTIPLIER;
20
+ exports.PREVIEW_WIDTH_DESKTOP = utils_constants.PREVIEW_WIDTH_DESKTOP;
21
+ exports.PREVIEW_WIDTH_MOBILE = utils_constants.PREVIEW_WIDTH_MOBILE;
16
22
  exports.TestIds = utils_constants.TestIds;
@@ -1,14 +1,17 @@
1
- import React, { useState, useRef, useCallback, useEffect, useMemo } from 'react';
1
+ import React, { useState, useRef, useCallback, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { BaseModal } from '../../base-modal/esm';
4
4
  import { useMedia } from '@alfalab/hooks';
5
- import { HeaderMobile } from './components/header-mobile/Component.js';
6
- import { InfoBar } from './components/info-bar/Component.js';
7
5
  import { NavigationBar } from './components/navigation-bar/Component.js';
8
6
  import { Header } from './components/header/Component.js';
9
7
  import { GalleryContext } from './context.js';
10
8
  import { ImageViewer } from './components/image-viewer/component.js';
11
- import '../../typography/esm';
9
+ import { InfoBar } from './components/info-bar/Component.js';
10
+ import { HeaderMobile } from './components/header-mobile/Component.js';
11
+ import './utils/utils.js';
12
+ import './utils/constants.js';
13
+ import './components/image-preview/Component.js';
14
+ import './components/image-preview/paths.js';
12
15
  import './components/buttons/index.js';
13
16
  import 'tslib';
14
17
  import '../../icon-button/esm';
@@ -22,23 +25,19 @@ import '@alfalab/icons-glyph/PlayCompactMIcon';
22
25
  import '@alfalab/icons-glyph/PointerDownMIcon';
23
26
  import '@alfalab/icons-glyph/SoundCrossMIcon';
24
27
  import '@alfalab/icons-glyph/SoundMIcon';
25
- import './utils/utils.js';
26
- import './utils/constants.js';
27
- import './components/image-preview/Component.js';
28
- import './components/image-preview/paths.js';
29
28
  import './components/header-info-block/Component.js';
29
+ import '../../typography/esm';
30
30
  import './utils/split-filename.js';
31
31
  import 'element-closest';
32
32
  import 'swiper';
33
33
  import 'swiper/react';
34
34
  import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
35
35
  import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
36
- import './slide-ca7119fa.js';
36
+ import './slide-da05984b.js';
37
37
  import './components/image-viewer/paths.js';
38
38
  import './components/image-viewer/video/index.js';
39
39
  import 'hls.js';
40
40
  import '@alfalab/core-components/icon-view/circle';
41
- import '../../button/esm';
42
41
  import 'swiper/swiper.min.css';
43
42
 
44
43
  var styles = {"container":"gallery__container_1ukr0","modal":"gallery__modal_1ukr0","navigationVideo":"gallery__navigationVideo_1ukr0","hideNavigation":"gallery__hideNavigation_1ukr0"};
@@ -58,18 +57,20 @@ var Gallery = function (_a) {
58
57
  var _j = useState([]), imagesMeta = _j[0], setImagesMeta = _j[1];
59
58
  var _k = useState(false), fullScreen = _k[0], setFullScreen = _k[1];
60
59
  var _l = useState(false), mutedVideo = _l[0], setMutedVideo = _l[1];
61
- var _m = useState(false), playingVideo = _m[0], setPlayingVideo = _m[1];
60
+ var _m = useState(true), playingVideo = _m[0], setPlayingVideo = _m[1];
62
61
  var _o = useState(false), hideNavigation = _o[0], setHideNavigation = _o[1];
63
62
  var timer = useRef();
64
63
  var view = useMedia([
65
64
  ['mobile', '(max-width: 1023px)'],
66
65
  ['desktop', '(min-width: 1024px)'],
67
66
  ], 'desktop')[0];
67
+ var isMobile = view === 'mobile';
68
68
  var isCurrentVideo = !!((_d = (_c = imagesMeta[currentSlideIndex]) === null || _c === void 0 ? void 0 : _c.player) === null || _d === void 0 ? void 0 : _d.current);
69
69
  var slideTo = useCallback(function (index) {
70
70
  if (images[index]) {
71
71
  setCurrentSlideIndex === null || setCurrentSlideIndex === void 0 ? void 0 : setCurrentSlideIndex(index);
72
72
  if (swiper) {
73
+ setPlayingVideo(true);
73
74
  swiper.slideTo(index);
74
75
  }
75
76
  }
@@ -123,10 +124,9 @@ var Gallery = function (_a) {
123
124
  }
124
125
  }, [fullScreen, open, slideNext, slidePrev]);
125
126
  useEffect(function () {
126
- if (timer.current) {
127
- clearTimeout(timer.current);
128
- }
129
127
  if (isCurrentVideo && !hideNavigation) {
128
+ if (timer.current)
129
+ clearTimeout(timer.current);
130
130
  timer.current = setTimeout(function () {
131
131
  setHideNavigation(true);
132
132
  }, 2000);
@@ -153,7 +153,8 @@ var Gallery = function (_a) {
153
153
  }, [handleKeyDown]);
154
154
  var singleSlide = images.length === 1;
155
155
  var showNavigationBar = !singleSlide && !fullScreen;
156
- var galleryContext = useMemo(function () { return ({
156
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
157
+ var galleryContext = {
157
158
  view: view,
158
159
  singleSlide: singleSlide,
159
160
  currentSlideIndex: currentSlideIndex,
@@ -178,34 +179,15 @@ var Gallery = function (_a) {
178
179
  setCurrentSlideIndex: setCurrentSlideIndex,
179
180
  getCurrentImage: function () { return images[currentSlideIndex]; },
180
181
  getCurrentImageMeta: function () { return imagesMeta[currentSlideIndex]; },
181
- }); }, [
182
- currentSlideIndex,
183
- fullScreen,
184
- handleClose,
185
- hideNavigation,
186
- images,
187
- imagesMeta,
188
- initialSlide,
189
- mutedVideo,
190
- playingVideo,
191
- setCurrentSlideIndex,
192
- setImageMeta,
193
- singleSlide,
194
- slideNext,
195
- slidePrev,
196
- slideTo,
197
- swiper,
198
- uncontrolled,
199
- view,
200
- ]);
182
+ };
201
183
  return (React.createElement(GalleryContext.Provider, { value: galleryContext },
202
184
  React.createElement(BaseModal, { open: open, className: styles.modal, onEscapeKeyDown: handleEscapeKeyDown, Backdrop: Backdrop },
203
185
  React.createElement("div", { className: styles.container },
204
186
  view === 'desktop' ? React.createElement(Header, null) : React.createElement(HeaderMobile, null),
205
187
  React.createElement(ImageViewer, null),
206
188
  React.createElement("nav", { className: cn((_b = {},
207
- _b[styles.navigationVideo] = isCurrentVideo && view === 'mobile',
208
- _b[styles.hideNavigation] = hideNavigation && view === 'mobile',
189
+ _b[styles.navigationVideo] = isCurrentVideo && isMobile,
190
+ _b[styles.hideNavigation] = hideNavigation && isMobile,
209
191
  _b)) },
210
192
  showNavigationBar && React.createElement(NavigationBar, null),
211
193
  view === 'mobile' && React.createElement(InfoBar, null))))));
@@ -1,7 +1,7 @@
1
1
  import React, { useContext, useRef, useEffect } from 'react';
2
2
  import { GalleryContext } from '../../context.js';
3
3
  import { isSmallImage, isVideo } from '../../utils/utils.js';
4
- import { TestIds } from '../../utils/constants.js';
4
+ import { TestIds, GALLERY_EVENTS } from '../../utils/constants.js';
5
5
  import { Download, Exit, ExitFullscreen, Fullscreen, UnmuteVideo, MuteVideo } from '../buttons/index.js';
6
6
  import { HeaderInfoBlock } from '../header-info-block/Component.js';
7
7
  import 'tslib';
@@ -30,6 +30,19 @@ var Header = function () {
30
30
  var meta = getCurrentImageMeta();
31
31
  var toggleFullScreenButton = useRef(null);
32
32
  var onMuteButtonClick = function () {
33
+ var _a, _b;
34
+ if (mutedVideo) {
35
+ var customEvent = new CustomEvent(GALLERY_EVENTS.ON_UNMUTE, {
36
+ detail: { player: (_a = meta === null || meta === void 0 ? void 0 : meta.player) === null || _a === void 0 ? void 0 : _a.current },
37
+ });
38
+ dispatchEvent(customEvent);
39
+ }
40
+ else {
41
+ var customEvent = new CustomEvent(GALLERY_EVENTS.ON_MUTE, {
42
+ detail: { player: (_b = meta === null || meta === void 0 ? void 0 : meta.player) === null || _b === void 0 ? void 0 : _b.current },
43
+ });
44
+ dispatchEvent(customEvent);
45
+ }
33
46
  setMutedVideo(!mutedVideo);
34
47
  };
35
48
  var closeFullScreen = function () {
@@ -1,13 +1,10 @@
1
1
  import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
- import '../../../../base-modal/esm';
4
- import '@alfalab/hooks';
5
3
  import { Typography } from '../../../../typography/esm';
6
4
  import { GalleryContext } from '../../context.js';
7
- import { BackArrow, Download } from '../buttons/index.js';
8
5
  import { isVideo } from '../../utils/utils.js';
9
6
  import { TestIds } from '../../utils/constants.js';
10
- import '../image-viewer/component.js';
7
+ import { BackArrow, Download } from '../buttons/index.js';
11
8
  import 'tslib';
12
9
  import '../../../../icon-button/esm';
13
10
  import '../../../../tooltip/esm/desktop';
@@ -20,18 +17,6 @@ import '@alfalab/icons-glyph/PlayCompactMIcon';
20
17
  import '@alfalab/icons-glyph/PointerDownMIcon';
21
18
  import '@alfalab/icons-glyph/SoundCrossMIcon';
22
19
  import '@alfalab/icons-glyph/SoundMIcon';
23
- import 'element-closest';
24
- import 'swiper';
25
- import 'swiper/react';
26
- import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
27
- import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
28
- import '../../slide-ca7119fa.js';
29
- import '../image-viewer/paths.js';
30
- import '../image-viewer/video/index.js';
31
- import 'hls.js';
32
- import '@alfalab/core-components/icon-view/circle';
33
- import '../../../../button/esm';
34
- import 'swiper/swiper.min.css';
35
20
 
36
21
  var styles = {"headerMobile":"gallery__headerMobile_1h3yn","video":"gallery__video_1h3yn","hide":"gallery__hide_1h3yn","leftButton":"gallery__leftButton_1h3yn","rightButtons":"gallery__rightButtons_1h3yn","description":"gallery__description_1h3yn"};
37
22
  require('./index.css');
@@ -39,10 +24,10 @@ require('./index.css');
39
24
  var HeaderMobile = function () {
40
25
  var _a;
41
26
  var _b;
42
- var _c = useContext(GalleryContext), onClose = _c.onClose, singleSlide = _c.singleSlide, images = _c.images, currentSlideIndex = _c.currentSlideIndex, getCurrentImage = _c.getCurrentImage, getCurrentImageMeta = _c.getCurrentImageMeta, hideNavigation = _c.hideNavigation;
27
+ var _c = useContext(GalleryContext), onClose = _c.onClose, images = _c.images, currentSlideIndex = _c.currentSlideIndex, getCurrentImage = _c.getCurrentImage, getCurrentImageMeta = _c.getCurrentImageMeta, hideNavigation = _c.hideNavigation;
43
28
  var currentImage = getCurrentImage();
44
29
  var meta = getCurrentImageMeta();
45
- var description = singleSlide || !images.length ? '' : "".concat(currentSlideIndex + 1, " \u0438\u0437 ").concat(images.length);
30
+ var description = images.length > 1 && "".concat(currentSlideIndex + 1, " \u0438\u0437 ").concat(images.length);
46
31
  var canDownload = (_b = currentImage === null || currentImage === void 0 ? void 0 : currentImage.canDownload) !== null && _b !== void 0 ? _b : true;
47
32
  var showDownloadButton = !(meta === null || meta === void 0 ? void 0 : meta.broken) && canDownload;
48
33
  return (React.createElement("div", { className: cn(styles.headerMobile, (_a = {},
@@ -1 +1 @@
1
- export {};
1
+ export { HeaderMobile } from "./Component";
@@ -1 +1,20 @@
1
-
1
+ export { HeaderMobile } from './Component.js';
2
+ import 'react';
3
+ import 'classnames';
4
+ import '../../../../typography/esm';
5
+ import '../../context.js';
6
+ import '../../utils/utils.js';
7
+ import '../../utils/constants.js';
8
+ import '../buttons/index.js';
9
+ import 'tslib';
10
+ import '../../../../icon-button/esm';
11
+ import '../../../../tooltip/esm/desktop';
12
+ import '@alfalab/icons-glyph/ArrowLeftMIcon';
13
+ import '@alfalab/icons-glyph/ArrowsInwardMIcon';
14
+ import '@alfalab/icons-glyph/ArrowsOutwardMIcon';
15
+ import '@alfalab/icons-glyph/CrossMIcon';
16
+ import '@alfalab/icons-glyph/PauseCompactMIcon';
17
+ import '@alfalab/icons-glyph/PlayCompactMIcon';
18
+ import '@alfalab/icons-glyph/PointerDownMIcon';
19
+ import '@alfalab/icons-glyph/SoundCrossMIcon';
20
+ import '@alfalab/icons-glyph/SoundMIcon';
@@ -3,18 +3,19 @@ import cn from 'classnames';
3
3
  import { useFocus } from '@alfalab/hooks';
4
4
  import { GalleryContext } from '../../context.js';
5
5
  import { isVideo, getImageAlt } from '../../utils/utils.js';
6
+ import { PREVIEW_VIDEO_MULTIPLIER, PREVIEW_WIDTH_MOBILE, PREVIEW_WIDTH_DESKTOP, PREVIEW_HEIGHT_MOBILE, PREVIEW_HEIGHT_DESKTOP } from '../../utils/constants.js';
6
7
  import { NoImagePaths } from './paths.js';
7
8
 
8
9
  var styles = {"component":"gallery__component_1917k","image":"gallery__image_1917k","mobile":"gallery__mobile_1917k","active":"gallery__active_1917k","preview":"gallery__preview_1917k","loading":"gallery__loading_1917k","brokenImageWrapper":"gallery__brokenImageWrapper_1917k","brokenIcon":"gallery__brokenIcon_1917k","focused":"gallery__focused_1917k","canvasPreview":"gallery__canvasPreview_1917k"};
9
10
  require('./index.css');
10
11
 
11
12
  var ImagePreview = function (_a) {
12
- var _b, _c, _d, _e;
13
- var image = _a.image, _f = _a.active, active = _f === void 0 ? false : _f, index = _a.index, onSelect = _a.onSelect, className = _a.className;
14
- var _g = useContext(GalleryContext), imagesMeta = _g.imagesMeta, view = _g.view;
13
+ var _b;
14
+ var image = _a.image, _c = _a.active, active = _c === void 0 ? false : _c, index = _a.index, onSelect = _a.onSelect, className = _a.className;
15
+ var _d = useContext(GalleryContext), imagesMeta = _d.imagesMeta, view = _d.view;
15
16
  var isMobile = view === 'mobile';
16
- var previewWidth = isMobile ? 36 : 56;
17
- var previewHeight = isMobile ? 46 : 56;
17
+ var previewWidth = isMobile ? PREVIEW_WIDTH_MOBILE : PREVIEW_WIDTH_DESKTOP;
18
+ var previewHeight = isMobile ? PREVIEW_HEIGHT_MOBILE : PREVIEW_HEIGHT_DESKTOP;
18
19
  var ref = useRef(null);
19
20
  var canvasRef = useRef(null);
20
21
  useEffect(function () {
@@ -24,7 +25,7 @@ var ImagePreview = function (_a) {
24
25
  var context = canvas === null || canvas === void 0 ? void 0 : canvas.getContext('2d');
25
26
  var drawPreview = function () {
26
27
  if (video) {
27
- context === null || context === void 0 ? void 0 : context.drawImage(video, 0, 0, video.videoWidth / 12, video.videoHeight / 12);
28
+ context === null || context === void 0 ? void 0 : context.drawImage(video, 0, 0, video.videoWidth / PREVIEW_VIDEO_MULTIPLIER, video.videoHeight / PREVIEW_VIDEO_MULTIPLIER);
28
29
  }
29
30
  };
30
31
  drawPreview();
@@ -48,17 +49,43 @@ var ImagePreview = function (_a) {
48
49
  var focused = useFocus(ref, 'keyboard')[0];
49
50
  var meta = imagesMeta[index];
50
51
  var isBroken = Boolean(meta === null || meta === void 0 ? void 0 : meta.broken);
51
- return (React.createElement("div", { className: cn(styles.component, (_b = {}, _b[styles.active] = active, _b[styles.focused] = focused, _b[styles.mobile] = isMobile, _b), className), onClick: handleClick, role: 'button', onKeyDown: handleKeyDown, tabIndex: 0, ref: ref, "aria-label": "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A ".concat(index + 1, " \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0443") }, isBroken ? (React.createElement("div", { className: cn(styles.preview, (_c = {}, _c[styles.mobile] = isMobile, _c[styles.active] = active, _c), styles.brokenImageWrapper) },
52
- React.createElement("div", { className: cn(styles.brokenIcon) },
53
- React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: previewWidth, height: previewHeight, viewBox: "".concat(isMobile ? -6 : 0, " ").concat(isMobile ? -12 : 0, " ").concat(previewWidth, " ").concat(previewHeight), fill: 'none' },
54
- React.createElement("rect", { fill: 'none' }),
55
- React.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: isMobile ? NoImagePaths.mobileImage : NoImagePaths.baseImage, fill: '#89898A' }),
56
- React.createElement("path", { d: isMobile
57
- ? NoImagePaths.mobileTriangle
58
- : NoImagePaths.triangleImage, fill: '#89898A' }))))) : (React.createElement("div", { className: cn(styles.preview, styles.image, (_d = {},
59
- _d[styles.loading] = !meta,
60
- _d[styles.mobile] = isMobile,
61
- _d)) }, isVideo(image.src) ? (React.createElement("canvas", { className: cn(styles.canvasPreview, (_e = {}, _e[styles.mobile] = isMobile, _e)), "data-testid": 'canvas', width: previewWidth, height: previewHeight, ref: canvasRef })) : (React.createElement("img", { src: image.src, alt: getImageAlt(image, index) }))))));
52
+ var renderPreview = function () {
53
+ var _a, _b, _c, _d, _e;
54
+ if (isBroken) {
55
+ return (React.createElement("div", { className: cn(styles.preview, (_a = {}, _a[styles.mobile] = isMobile, _a[styles.active] = active, _a), styles.brokenImageWrapper) },
56
+ React.createElement("div", { className: cn(styles.brokenIcon) },
57
+ React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: previewWidth, height: previewHeight, viewBox: "".concat(isMobile ? -6 : 0, " ").concat(isMobile ? -12 : 0, " ").concat(previewWidth, " ").concat(previewHeight), fill: 'none' },
58
+ React.createElement("rect", { fill: 'none' }),
59
+ React.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: isMobile ? NoImagePaths.mobileImage : NoImagePaths.baseImage, fill: '#89898A' }),
60
+ React.createElement("path", { d: isMobile
61
+ ? NoImagePaths.mobileTriangle
62
+ : NoImagePaths.triangleImage, fill: '#89898A' })))));
63
+ }
64
+ if (image.previewSrc) {
65
+ return (React.createElement("div", { className: cn(styles.preview, styles.image, (_b = {},
66
+ _b[styles.loading] = !meta,
67
+ _b[styles.mobile] = isMobile,
68
+ _b)) },
69
+ React.createElement("img", { src: image.previewSrc, alt: getImageAlt(image, index) })));
70
+ }
71
+ if (isVideo(image.src)) {
72
+ return (React.createElement("div", { className: cn(styles.preview, styles.image, (_c = {},
73
+ _c[styles.loading] = !meta,
74
+ _c[styles.mobile] = isMobile,
75
+ _c)) },
76
+ React.createElement("canvas", { className: cn(styles.canvasPreview, (_d = {}, _d[styles.mobile] = isMobile, _d)), "data-testid": 'canvas', width: previewWidth, height: previewHeight, ref: canvasRef })));
77
+ }
78
+ return (React.createElement("div", { className: cn(styles.preview, styles.image, (_e = {},
79
+ _e[styles.loading] = !meta,
80
+ _e[styles.mobile] = isMobile,
81
+ _e)) },
82
+ React.createElement("img", { src: image.src, alt: getImageAlt(image, index) })));
83
+ };
84
+ return (React.createElement("div", { className: cn(styles.component, (_b = {},
85
+ _b[styles.active] = active,
86
+ _b[styles.focused] = focused,
87
+ _b[styles.mobile] = isMobile,
88
+ _b), className), onClick: handleClick, role: 'button', onKeyDown: handleKeyDown, tabIndex: 0, ref: ref, "aria-label": "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A ".concat(index + 1, " \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0443") }, renderPreview()));
62
89
  };
63
90
 
64
91
  export { ImagePreview };
@@ -1,7 +1,6 @@
1
1
  /* hash: 182cu */
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
- --color-light-base-bg-primary: #fff;
5
4
  --color-light-status-info: #2288fa;
6
5
  --color-static-neutral-100-inverted: #1c1c1e;
7
6
  --color-static-neutral-300-inverted: #29292c; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -56,7 +55,6 @@
56
55
  transition: opacity 0.15s ease-in-out
57
56
  } .gallery__image_1917k > img {
58
57
  display: block;
59
- background-color: var(--color-light-base-bg-primary);
60
58
  width: 100%;
61
59
  height: 100%;
62
60
  border-radius: inherit;
@@ -4,4 +4,5 @@ import 'classnames';
4
4
  import '@alfalab/hooks';
5
5
  import '../../context.js';
6
6
  import '../../utils/utils.js';
7
+ import '../../utils/constants.js';
7
8
  import './paths.js';
@@ -10,15 +10,13 @@ import { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHea
10
10
  import { GalleryContext } from '../../context.js';
11
11
  import { isVideo, getImageAlt, getImageKey } from '../../utils/utils.js';
12
12
  import { TestIds } from '../../utils/constants.js';
13
- import { s as styles, S as Slide } from '../../slide-ca7119fa.js';
13
+ import { s as styles, S as Slide } from '../../slide-da05984b.js';
14
14
  import 'swiper/swiper.min.css';
15
15
  import '../../../../typography/esm';
16
16
  import './paths.js';
17
17
  import './video/index.js';
18
18
  import 'hls.js';
19
19
  import '@alfalab/core-components/icon-view/circle';
20
- import '../../../../button/esm';
21
- import '@alfalab/icons-glyph/PauseCompactMIcon';
22
20
  import '@alfalab/icons-glyph/PlayCompactMIcon';
23
21
 
24
22
  SwiperCore.use([EffectFade, A11y, Controller]);
@@ -84,7 +82,7 @@ var ImageViewer = function () {
84
82
  },
85
83
  className: cn(styles.swiper, (_a = {},
86
84
  _a[styles.hidden] = fullScreen && !isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
87
- _a[styles.fullScreenVideo] = fullScreen && isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
85
+ _a[styles.fullScreenVideo] = fullScreen && !singleSlide && isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
88
86
  _a[styles.mobile] = isMobile,
89
87
  _a[styles.mobileVideo] = isMobile && isVideo(currentImage === null || currentImage === void 0 ? void 0 : currentImage.src),
90
88
  _a)),
@@ -100,6 +98,7 @@ var ImageViewer = function () {
100
98
  }, [
101
99
  fullScreen,
102
100
  currentImage === null || currentImage === void 0 ? void 0 : currentImage.src,
101
+ singleSlide,
103
102
  isMobile,
104
103
  swiper,
105
104
  initialSlide,
@@ -74,7 +74,6 @@
74
74
  height: 0;
75
75
  -webkit-user-select: none;
76
76
  user-select: none;
77
- background-color: var(--color-light-base-bg-primary);
78
77
  border-radius: var(--border-radius-m)
79
78
  } .gallery__image_1rc6z.gallery__mobile_1rc6z {
80
79
  border-radius: 0;
@@ -84,7 +83,6 @@
84
83
  height: auto;
85
84
  -webkit-user-select: none;
86
85
  user-select: none;
87
- background-color: var(--color-light-base-bg-primary);
88
86
  } .gallery__verticalImageFit_1rc6z {
89
87
  width: auto;
90
88
  height: 100%;
@@ -11,13 +11,11 @@ import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
11
11
  import '../../context.js';
12
12
  import '../../utils/utils.js';
13
13
  import '../../utils/constants.js';
14
- import '../../slide-ca7119fa.js';
14
+ import '../../slide-da05984b.js';
15
15
  import '../../../../typography/esm';
16
16
  import './paths.js';
17
17
  import './video/index.js';
18
18
  import 'hls.js';
19
19
  import '@alfalab/core-components/icon-view/circle';
20
- import '../../../../button/esm';
21
- import '@alfalab/icons-glyph/PauseCompactMIcon';
22
20
  import '@alfalab/icons-glyph/PlayCompactMIcon';
23
21
  import 'swiper/swiper.min.css';
@@ -3,12 +3,10 @@ import 'classnames';
3
3
  import '../../../../typography/esm';
4
4
  import '../../context.js';
5
5
  import './video/index.js';
6
- export { S as Slide } from '../../slide-ca7119fa.js';
6
+ export { S as Slide } from '../../slide-da05984b.js';
7
7
  import 'hls.js';
8
8
  import '@alfalab/core-components/icon-view/circle';
9
- import '../../../../button/esm';
10
- import '@alfalab/icons-glyph/PauseCompactMIcon';
11
9
  import '@alfalab/icons-glyph/PlayCompactMIcon';
12
- import '../../utils/utils.js';
13
10
  import '../../utils/constants.js';
11
+ import '../../utils/utils.js';
14
12
  import './paths.js';