@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
@@ -1,13 +1,10 @@
1
1
  import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
- import '../../../../base-modal/modern';
4
- import '@alfalab/hooks';
5
3
  import { Typography } from '../../../../typography/modern';
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 '../../../../icon-button/modern';
12
9
  import '../../../../tooltip/modern/desktop';
13
10
  import '@alfalab/icons-glyph/ArrowLeftMIcon';
@@ -19,27 +16,15 @@ import '@alfalab/icons-glyph/PlayCompactMIcon';
19
16
  import '@alfalab/icons-glyph/PointerDownMIcon';
20
17
  import '@alfalab/icons-glyph/SoundCrossMIcon';
21
18
  import '@alfalab/icons-glyph/SoundMIcon';
22
- import 'element-closest';
23
- import 'swiper';
24
- import 'swiper/react';
25
- import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
26
- import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
27
- import '../../slide-e2bd02f9.js';
28
- import '../image-viewer/paths.js';
29
- import '../image-viewer/video/index.js';
30
- import 'hls.js';
31
- import '@alfalab/core-components/icon-view/circle';
32
- import '../../../../button/modern';
33
- import 'swiper/swiper.min.css';
34
19
 
35
20
  const 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"};
36
21
  require('./index.css');
37
22
 
38
23
  const HeaderMobile = () => {
39
- const { onClose, singleSlide, images, currentSlideIndex, getCurrentImage, getCurrentImageMeta, hideNavigation, } = useContext(GalleryContext);
24
+ const { onClose, images, currentSlideIndex, getCurrentImage, getCurrentImageMeta, hideNavigation, } = useContext(GalleryContext);
40
25
  const currentImage = getCurrentImage();
41
26
  const meta = getCurrentImageMeta();
42
- const description = singleSlide || !images.length ? '' : `${currentSlideIndex + 1} из ${images.length}`;
27
+ const description = images.length > 1 && `${currentSlideIndex + 1} из ${images.length}`;
43
28
  const canDownload = currentImage?.canDownload ?? true;
44
29
  const showDownloadButton = !meta?.broken && canDownload;
45
30
  return (React.createElement("div", { className: cn(styles.headerMobile, {
@@ -1 +1 @@
1
- export {};
1
+ export { HeaderMobile } from "./Component";
@@ -1 +1,19 @@
1
-
1
+ export { HeaderMobile } from './Component.js';
2
+ import 'react';
3
+ import 'classnames';
4
+ import '../../../../typography/modern';
5
+ import '../../context.js';
6
+ import '../../utils/utils.js';
7
+ import '../../utils/constants.js';
8
+ import '../buttons/index.js';
9
+ import '../../../../icon-button/modern';
10
+ import '../../../../tooltip/modern/desktop';
11
+ import '@alfalab/icons-glyph/ArrowLeftMIcon';
12
+ import '@alfalab/icons-glyph/ArrowsInwardMIcon';
13
+ import '@alfalab/icons-glyph/ArrowsOutwardMIcon';
14
+ import '@alfalab/icons-glyph/CrossMIcon';
15
+ import '@alfalab/icons-glyph/PauseCompactMIcon';
16
+ import '@alfalab/icons-glyph/PlayCompactMIcon';
17
+ import '@alfalab/icons-glyph/PointerDownMIcon';
18
+ import '@alfalab/icons-glyph/SoundCrossMIcon';
19
+ import '@alfalab/icons-glyph/SoundMIcon';
@@ -3,6 +3,7 @@ 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
  const 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"};
@@ -11,8 +12,8 @@ require('./index.css');
11
12
  const ImagePreview = ({ image, active = false, index, onSelect, className }) => {
12
13
  const { imagesMeta, view } = useContext(GalleryContext);
13
14
  const isMobile = view === 'mobile';
14
- const previewWidth = isMobile ? 36 : 56;
15
- const previewHeight = isMobile ? 46 : 56;
15
+ const previewWidth = isMobile ? PREVIEW_WIDTH_MOBILE : PREVIEW_WIDTH_DESKTOP;
16
+ const previewHeight = isMobile ? PREVIEW_HEIGHT_MOBILE : PREVIEW_HEIGHT_DESKTOP;
16
17
  const ref = useRef(null);
17
18
  const canvasRef = useRef(null);
18
19
  useEffect(() => {
@@ -21,7 +22,7 @@ const ImagePreview = ({ image, active = false, index, onSelect, className }) =>
21
22
  const context = canvas?.getContext('2d');
22
23
  const drawPreview = () => {
23
24
  if (video) {
24
- context?.drawImage(video, 0, 0, video.videoWidth / 12, video.videoHeight / 12);
25
+ context?.drawImage(video, 0, 0, video.videoWidth / PREVIEW_VIDEO_MULTIPLIER, video.videoHeight / PREVIEW_VIDEO_MULTIPLIER);
25
26
  }
26
27
  };
27
28
  drawPreview();
@@ -45,17 +46,42 @@ const ImagePreview = ({ image, active = false, index, onSelect, className }) =>
45
46
  const [focused] = useFocus(ref, 'keyboard');
46
47
  const meta = imagesMeta[index];
47
48
  const isBroken = Boolean(meta?.broken);
48
- return (React.createElement("div", { className: cn(styles.component, { [styles.active]: active, [styles.focused]: focused, [styles.mobile]: isMobile }, className), onClick: handleClick, role: 'button', onKeyDown: handleKeyDown, tabIndex: 0, ref: ref, "aria-label": `Перейти к ${index + 1} элементу` }, isBroken ? (React.createElement("div", { className: cn(styles.preview, { [styles.mobile]: isMobile, [styles.active]: active }, styles.brokenImageWrapper) },
49
- React.createElement("div", { className: cn(styles.brokenIcon) },
50
- React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: previewWidth, height: previewHeight, viewBox: `${isMobile ? -6 : 0} ${isMobile ? -12 : 0} ${previewWidth} ${previewHeight}`, fill: 'none' },
51
- React.createElement("rect", { fill: 'none' }),
52
- React.createElement("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: isMobile ? NoImagePaths.mobileImage : NoImagePaths.baseImage, fill: '#89898A' }),
53
- React.createElement("path", { d: isMobile
54
- ? NoImagePaths.mobileTriangle
55
- : NoImagePaths.triangleImage, fill: '#89898A' }))))) : (React.createElement("div", { className: cn(styles.preview, styles.image, {
56
- [styles.loading]: !meta,
49
+ const renderPreview = () => {
50
+ if (isBroken) {
51
+ return (React.createElement("div", { className: cn(styles.preview, { [styles.mobile]: isMobile, [styles.active]: active }, 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: `${isMobile ? -6 : 0} ${isMobile ? -12 : 0} ${previewWidth} ${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' })))));
59
+ }
60
+ if (image.previewSrc) {
61
+ return (React.createElement("div", { className: cn(styles.preview, styles.image, {
62
+ [styles.loading]: !meta,
63
+ [styles.mobile]: isMobile,
64
+ }) },
65
+ React.createElement("img", { src: image.previewSrc, alt: getImageAlt(image, index) })));
66
+ }
67
+ if (isVideo(image.src)) {
68
+ return (React.createElement("div", { className: cn(styles.preview, styles.image, {
69
+ [styles.loading]: !meta,
70
+ [styles.mobile]: isMobile,
71
+ }) },
72
+ React.createElement("canvas", { className: cn(styles.canvasPreview, { [styles.mobile]: isMobile }), "data-testid": 'canvas', width: previewWidth, height: previewHeight, ref: canvasRef })));
73
+ }
74
+ return (React.createElement("div", { className: cn(styles.preview, styles.image, {
75
+ [styles.loading]: !meta,
76
+ [styles.mobile]: isMobile,
77
+ }) },
78
+ React.createElement("img", { src: image.src, alt: getImageAlt(image, index) })));
79
+ };
80
+ return (React.createElement("div", { className: cn(styles.component, {
81
+ [styles.active]: active,
82
+ [styles.focused]: focused,
57
83
  [styles.mobile]: isMobile,
58
- }) }, isVideo(image.src) ? (React.createElement("canvas", { className: cn(styles.canvasPreview, { [styles.mobile]: isMobile }), "data-testid": 'canvas', width: previewWidth, height: previewHeight, ref: canvasRef })) : (React.createElement("img", { src: image.src, alt: getImageAlt(image, index) }))))));
84
+ }, className), onClick: handleClick, role: 'button', onKeyDown: handleKeyDown, tabIndex: 0, ref: ref, "aria-label": `Перейти к ${index + 1} элементу` }, renderPreview()));
59
85
  };
60
86
 
61
87
  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';
@@ -9,15 +9,13 @@ import { ChevronForwardHeavyMIcon } from '@alfalab/icons-glyph/ChevronForwardHea
9
9
  import { GalleryContext } from '../../context.js';
10
10
  import { isVideo, getImageAlt, getImageKey } from '../../utils/utils.js';
11
11
  import { TestIds } from '../../utils/constants.js';
12
- import { s as styles, S as Slide } from '../../slide-e2bd02f9.js';
12
+ import { s as styles, S as Slide } from '../../slide-dac6462d.js';
13
13
  import 'swiper/swiper.min.css';
14
14
  import '../../../../typography/modern';
15
15
  import './paths.js';
16
16
  import './video/index.js';
17
17
  import 'hls.js';
18
18
  import '@alfalab/core-components/icon-view/circle';
19
- import '../../../../button/modern';
20
- import '@alfalab/icons-glyph/PauseCompactMIcon';
21
19
  import '@alfalab/icons-glyph/PlayCompactMIcon';
22
20
 
23
21
  SwiperCore.use([EffectFade, A11y, Controller]);
@@ -78,7 +76,7 @@ const ImageViewer = () => {
78
76
  },
79
77
  className: cn(styles.swiper, {
80
78
  [styles.hidden]: fullScreen && !isVideo(currentImage?.src),
81
- [styles.fullScreenVideo]: fullScreen && isVideo(currentImage?.src),
79
+ [styles.fullScreenVideo]: fullScreen && !singleSlide && isVideo(currentImage?.src),
82
80
  [styles.mobile]: isMobile,
83
81
  [styles.mobileVideo]: isMobile && isVideo(currentImage?.src),
84
82
  }),
@@ -93,6 +91,7 @@ const ImageViewer = () => {
93
91
  }), [
94
92
  fullScreen,
95
93
  currentImage?.src,
94
+ singleSlide,
96
95
  isMobile,
97
96
  swiper,
98
97
  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%;
@@ -10,13 +10,11 @@ import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
10
10
  import '../../context.js';
11
11
  import '../../utils/utils.js';
12
12
  import '../../utils/constants.js';
13
- import '../../slide-e2bd02f9.js';
13
+ import '../../slide-dac6462d.js';
14
14
  import '../../../../typography/modern';
15
15
  import './paths.js';
16
16
  import './video/index.js';
17
17
  import 'hls.js';
18
18
  import '@alfalab/core-components/icon-view/circle';
19
- import '../../../../button/modern';
20
- import '@alfalab/icons-glyph/PauseCompactMIcon';
21
19
  import '@alfalab/icons-glyph/PlayCompactMIcon';
22
20
  import 'swiper/swiper.min.css';
@@ -3,12 +3,10 @@ import 'classnames';
3
3
  import '../../../../typography/modern';
4
4
  import '../../context.js';
5
5
  import './video/index.js';
6
- export { S as Slide } from '../../slide-e2bd02f9.js';
6
+ export { S as Slide } from '../../slide-dac6462d.js';
7
7
  import 'hls.js';
8
8
  import '@alfalab/core-components/icon-view/circle';
9
- import '../../../../button/modern';
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';
@@ -10,10 +10,10 @@
10
10
  /* Up */
11
11
 
12
12
  /* Hard up */
13
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
14
- --border-radius-3xl: 24px; /* deprecated */
13
+ } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
15
14
 
16
15
  /* новые значения, используйте их */
16
+ --border-radius-24: 24px;
17
17
  } :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 */
18
18
 
19
19
  /* новые значения, используйте их */
@@ -28,14 +28,14 @@
28
28
  } .gallery__video_1kmz9 {
29
29
  max-width: 100%;
30
30
  max-height: 100%;
31
- border-radius: var(--border-radius-3xl);
31
+ border-radius: var(--border-radius-24);
32
32
  } .gallery__mobile_1kmz9 {
33
33
  border-radius: 0;
34
34
  } .gallery__videoButton_1kmz9 {
35
+
35
36
  position: absolute;
36
37
  top: 50%;
37
38
  left: 50%;
38
39
  transform: translate(-50%, -50%);
39
40
  z-index: 1;
40
- } .gallery__videoButtonIcon_1kmz9 {
41
41
  }
@@ -3,7 +3,8 @@ import React from 'react';
3
3
  type Props = {
4
4
  url: string;
5
5
  index: number;
6
+ isActive: boolean;
6
7
  className?: string;
7
8
  };
8
- declare const Video: ({ url, index, className }: Props) => React.JSX.Element;
9
+ declare const Video: ({ url, index, className, isActive }: Props) => React.JSX.Element;
9
10
  export { Video };
@@ -2,22 +2,16 @@ import React, { useRef, useContext, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import Hls from 'hls.js';
4
4
  import { Circle } from '@alfalab/core-components/icon-view/circle';
5
- import { Button } from '../../../../../button/modern';
6
- import PauseCompactMIcon from '@alfalab/icons-glyph/PauseCompactMIcon';
7
5
  import PlayCompactMIcon from '@alfalab/icons-glyph/PlayCompactMIcon';
8
6
  import { GalleryContext } from '../../../context.js';
7
+ import { GALLERY_EVENTS } from '../../../utils/constants.js';
9
8
 
10
- const styles = {"videoWrapper":"gallery__videoWrapper_1kmz9","video":"gallery__video_1kmz9","mobile":"gallery__mobile_1kmz9","videoButton":"gallery__videoButton_1kmz9","videoButtonIcon":"gallery__videoButtonIcon_1kmz9"};
9
+ const styles = {"videoWrapper":"gallery__videoWrapper_1kmz9","video":"gallery__video_1kmz9","mobile":"gallery__mobile_1kmz9","videoButton":"gallery__videoButton_1kmz9"};
11
10
  require('./index.css');
12
11
 
13
- const Video = ({ url, index, className }) => {
12
+ const Video = ({ url, index, className, isActive }) => {
14
13
  const playerRef = useRef(null);
15
14
  const { setImageMeta, mutedVideo, view, playingVideo, setPlayingVideo, setHideNavigation } = useContext(GalleryContext);
16
- useEffect(() => {
17
- if (playerRef.current) {
18
- playerRef.current.muted = mutedVideo;
19
- }
20
- }, [mutedVideo]);
21
15
  useEffect(() => {
22
16
  setImageMeta({ player: playerRef }, index);
23
17
  /* eslint-disable-next-line react-hooks/exhaustive-deps */
@@ -33,9 +27,6 @@ const Video = ({ url, index, className }) => {
33
27
  hls.attachMedia(playerRef.current);
34
28
  }
35
29
  }
36
- else if (playerRef.current) {
37
- playerRef.current.src = url;
38
- }
39
30
  return () => {
40
31
  if (hls) {
41
32
  hls.destroy();
@@ -43,15 +34,13 @@ const Video = ({ url, index, className }) => {
43
34
  };
44
35
  /* eslint-disable-next-line react-hooks/exhaustive-deps */
45
36
  }, [url, index]);
46
- const handleClick = (event) => {
47
- event.stopPropagation();
48
- setPlayingVideo(!playingVideo);
49
- };
50
- const handleWrapperClick = () => {
37
+ const handleWrapperClick = (e) => {
38
+ e.stopPropagation();
51
39
  setHideNavigation(false);
40
+ setPlayingVideo(!playingVideo);
52
41
  };
53
42
  useEffect(() => {
54
- if (playerRef.current) {
43
+ if (playerRef.current && isActive) {
55
44
  if (playingVideo) {
56
45
  playerRef.current.play();
57
46
  }
@@ -59,14 +48,31 @@ const Video = ({ url, index, className }) => {
59
48
  playerRef.current.pause();
60
49
  }
61
50
  }
62
- }, [playingVideo]);
51
+ if (playerRef.current && !isActive) {
52
+ playerRef.current.pause();
53
+ playerRef.current.currentTime = 0;
54
+ }
55
+ }, [isActive, playingVideo]);
56
+ const onPlay = (e) => {
57
+ const customEvent = new CustomEvent(GALLERY_EVENTS.ON_PLAY, {
58
+ detail: { player: e.target },
59
+ });
60
+ dispatchEvent(customEvent);
61
+ };
62
+ const onPause = (e) => {
63
+ const customEvent = new CustomEvent(GALLERY_EVENTS.ON_PAUSE, {
64
+ detail: { player: e.target },
65
+ });
66
+ dispatchEvent(customEvent);
67
+ };
63
68
  return (
64
69
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
65
70
  React.createElement("div", { onClick: handleWrapperClick, className: styles.videoWrapper },
66
- React.createElement("video", { ref: playerRef, className: cn(styles.video, { [styles.mobile]: view === 'mobile' }, className) },
71
+ React.createElement("video", { onPlay: onPlay, onPause: onPause, ref: playerRef, playsInline: true, muted: mutedVideo, src: Hls.isSupported() ? undefined : url, className: cn(styles.video, { [styles.mobile]: view === 'mobile' }, className) },
67
72
  React.createElement("track", { kind: 'captions' })),
68
- view === 'desktop' && (React.createElement(Button, { className: styles.videoButton, view: 'text', onClick: handleClick },
69
- React.createElement(Circle, { className: styles.videoButtonIcon, size: 64 }, playingVideo ? React.createElement(PauseCompactMIcon, null) : React.createElement(PlayCompactMIcon, null))))));
73
+ view === 'desktop' && !playingVideo && (React.createElement("div", { className: styles.videoButton },
74
+ React.createElement(Circle, { size: 64 },
75
+ React.createElement(PlayCompactMIcon, null))))));
70
76
  };
71
77
 
72
78
  export { Video };
@@ -2,3 +2,5 @@ export * from "./navigation-bar/index";
2
2
  export * from "./header/index";
3
3
  export * from "./image-preview/index";
4
4
  export * from "./image-viewer/index";
5
+ export * from "./info-bar/index";
6
+ export * from "./header-mobile/index";
@@ -2,11 +2,13 @@ export { NavigationBar } from './navigation-bar/Component.js';
2
2
  export { Header } from './header/Component.js';
3
3
  export { ImagePreview } from './image-preview/Component.js';
4
4
  export { ImageViewer } from './image-viewer/component.js';
5
+ export { InfoBar } from './info-bar/Component.js';
6
+ export { HeaderMobile } from './header-mobile/Component.js';
5
7
  import 'react';
6
- import 'classnames';
7
8
  import '../context.js';
8
9
  import '../utils/utils.js';
9
10
  import '../utils/constants.js';
11
+ import 'classnames';
10
12
  import '@alfalab/hooks';
11
13
  import './image-preview/paths.js';
12
14
  import './buttons/index.js';
@@ -29,10 +31,9 @@ import 'swiper';
29
31
  import 'swiper/react';
30
32
  import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
31
33
  import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
32
- import '../slide-e2bd02f9.js';
34
+ import '../slide-dac6462d.js';
33
35
  import './image-viewer/paths.js';
34
36
  import './image-viewer/video/index.js';
35
37
  import 'hls.js';
36
38
  import '@alfalab/core-components/icon-view/circle';
37
- import '../../../button/modern';
38
39
  import 'swiper/swiper.min.css';
@@ -1,12 +1,10 @@
1
1
  import React, { useContext, useCallback } from 'react';
2
- import 'classnames';
3
- import '../../../../base-modal/modern';
4
- import '@alfalab/hooks';
5
2
  import { Typography } from '../../../../typography/modern';
6
3
  import { GalleryContext } from '../../context.js';
7
- import { Pause, Play, UnmuteVideo, MuteVideo } from '../buttons/index.js';
8
4
  import { isVideo } from '../../utils/utils.js';
9
- import '../image-viewer/component.js';
5
+ import { GALLERY_EVENTS } from '../../utils/constants.js';
6
+ import { Pause, Play, UnmuteVideo, MuteVideo } from '../buttons/index.js';
7
+ import 'classnames';
10
8
  import '../../../../icon-button/modern';
11
9
  import '../../../../tooltip/modern/desktop';
12
10
  import '@alfalab/icons-glyph/ArrowLeftMIcon';
@@ -18,29 +16,29 @@ import '@alfalab/icons-glyph/PlayCompactMIcon';
18
16
  import '@alfalab/icons-glyph/PointerDownMIcon';
19
17
  import '@alfalab/icons-glyph/SoundCrossMIcon';
20
18
  import '@alfalab/icons-glyph/SoundMIcon';
21
- import 'element-closest';
22
- import 'swiper';
23
- import 'swiper/react';
24
- import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
25
- import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
26
- import '../../utils/constants.js';
27
- import '../../slide-e2bd02f9.js';
28
- import '../image-viewer/paths.js';
29
- import '../image-viewer/video/index.js';
30
- import 'hls.js';
31
- import '@alfalab/core-components/icon-view/circle';
32
- import '../../../../button/modern';
33
- import 'swiper/swiper.min.css';
34
19
 
35
20
  const styles = {"description":"gallery__description_elo98","videoButtons":"gallery__videoButtons_elo98","center":"gallery__center_elo98","right":"gallery__right_elo98"};
36
21
  require('./index.css');
37
22
 
38
23
  const InfoBar = () => {
39
- const { getCurrentImage, mutedVideo, setMutedVideo, playingVideo, setPlayingVideo } = useContext(GalleryContext);
24
+ const { getCurrentImage, mutedVideo, setMutedVideo, playingVideo, setPlayingVideo, getCurrentImageMeta, } = useContext(GalleryContext);
40
25
  const image = getCurrentImage();
26
+ const meta = getCurrentImageMeta();
41
27
  const handleMuteVideo = useCallback(() => {
28
+ if (mutedVideo) {
29
+ const customEvent = new CustomEvent(GALLERY_EVENTS.ON_UNMUTE, {
30
+ detail: { player: meta?.player?.current },
31
+ });
32
+ dispatchEvent(customEvent);
33
+ }
34
+ else {
35
+ const customEvent = new CustomEvent(GALLERY_EVENTS.ON_MUTE, {
36
+ detail: { player: meta?.player?.current },
37
+ });
38
+ dispatchEvent(customEvent);
39
+ }
42
40
  setMutedVideo(!mutedVideo);
43
- }, [mutedVideo, setMutedVideo]);
41
+ }, [meta?.player, mutedVideo, setMutedVideo]);
44
42
  const handlePlayVideo = useCallback(() => {
45
43
  setPlayingVideo(!playingVideo);
46
44
  }, [playingVideo, setPlayingVideo]);
@@ -13,17 +13,17 @@
13
13
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
14
14
 
15
15
  /* новые значения, используйте их */
16
- } :root { /* deprecated */ /* deprecated */
17
- --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 */
16
+ } :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 */
18
17
 
19
18
  /* новые значения, используйте их */
19
+ --gap-8: 8px;
20
20
  } :root {
21
21
  } :root {
22
22
  } .gallery__description_elo98 {
23
23
  text-align: center;
24
- margin-bottom: var(--gap-xs);
24
+ margin-bottom: var(--gap-8);
25
25
  } .gallery__videoButtons_elo98 {
26
- padding: 0 var(--gap-xs);
26
+ padding: 0 var(--gap-8);
27
27
  position: relative;
28
28
  height: 48px;
29
29
  } .gallery__center_elo98 {
@@ -1 +1 @@
1
- export {};
1
+ export { InfoBar } from "./Component";
@@ -1 +1,19 @@
1
-
1
+ export { InfoBar } from './Component.js';
2
+ import 'react';
3
+ import '../../../../typography/modern';
4
+ import '../../context.js';
5
+ import '../../utils/utils.js';
6
+ import '../../utils/constants.js';
7
+ import '../buttons/index.js';
8
+ import 'classnames';
9
+ import '../../../../icon-button/modern';
10
+ import '../../../../tooltip/modern/desktop';
11
+ import '@alfalab/icons-glyph/ArrowLeftMIcon';
12
+ import '@alfalab/icons-glyph/ArrowsInwardMIcon';
13
+ import '@alfalab/icons-glyph/ArrowsOutwardMIcon';
14
+ import '@alfalab/icons-glyph/CrossMIcon';
15
+ import '@alfalab/icons-glyph/PauseCompactMIcon';
16
+ import '@alfalab/icons-glyph/PlayCompactMIcon';
17
+ import '@alfalab/icons-glyph/PointerDownMIcon';
18
+ import '@alfalab/icons-glyph/SoundCrossMIcon';
19
+ import '@alfalab/icons-glyph/SoundMIcon';
@@ -1,9 +1,9 @@
1
1
  import React, { useRef, useContext, useCallback, useEffect } from 'react';
2
- import cn from 'classnames';
3
2
  import { GalleryContext } from '../../context.js';
4
3
  import { getImageKey } from '../../utils/utils.js';
5
4
  import { TestIds } from '../../utils/constants.js';
6
5
  import { ImagePreview } from '../image-preview/Component.js';
6
+ import 'classnames';
7
7
  import '@alfalab/hooks';
8
8
  import '../image-preview/paths.js';
9
9
 
@@ -13,11 +13,12 @@ require('./index.css');
13
13
  const MIN_SCROLL_STEP = 24;
14
14
  const NavigationBar = () => {
15
15
  const containerRef = useRef(null);
16
- const { images, currentSlideIndex, setCurrentSlideIndex, getSwiper } = useContext(GalleryContext);
16
+ const { images, currentSlideIndex, setCurrentSlideIndex, getSwiper, setPlayingVideo } = useContext(GalleryContext);
17
17
  const swiper = getSwiper();
18
18
  const handlePreviewSelect = (index) => {
19
19
  setCurrentSlideIndex?.(index);
20
20
  if (swiper) {
21
+ setPlayingVideo(true);
21
22
  swiper.slideTo(index);
22
23
  }
23
24
  };
@@ -59,7 +60,7 @@ const NavigationBar = () => {
59
60
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
60
61
  React.createElement("div", { className: styles.component, ref: containerRef, onKeyDown: handleKeyDown, "data-test-id": TestIds.NAVIGATION_BAR }, images.map((image, index) => {
61
62
  const active = index === currentSlideIndex;
62
- return (React.createElement(ImagePreview, { key: getImageKey(image, index), image: image, active: active, index: index, onSelect: handlePreviewSelect, className: cn(styles.preview) }));
63
+ return (React.createElement(ImagePreview, { key: getImageKey(image, index), image: image, active: active, index: index, onSelect: handlePreviewSelect, className: styles.preview }));
63
64
  })));
64
65
  };
65
66
 
@@ -1,9 +1,9 @@
1
1
  export { NavigationBar } from './Component.js';
2
2
  import 'react';
3
- import 'classnames';
4
3
  import '../../context.js';
5
4
  import '../../utils/utils.js';
6
5
  import '../../utils/constants.js';
7
6
  import '../image-preview/Component.js';
7
+ import 'classnames';
8
8
  import '@alfalab/hooks';
9
9
  import '../image-preview/paths.js';
@@ -1,2 +1,2 @@
1
1
  export * from "./Component";
2
- export * from "./utils/index";
2
+ export { GALLERY_EVENTS, TestIds } from "./utils/index";