@sima-land/moleculas 16.0.0-alpha.2 → 16.0.0-alpha.21

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 (351) hide show
  1. package/README.md +23 -0
  2. package/common/components/badge/badge.d.ts +8 -0
  3. package/common/components/badge/badge.js +55 -0
  4. package/common/components/badge/badge.js.map +1 -0
  5. package/common/components/badge/badge.m.scss +81 -0
  6. package/common/components/badge/index.d.ts +2 -19
  7. package/common/components/badge/index.js +3 -80
  8. package/common/components/badge/index.js.map +1 -0
  9. package/common/components/badge/types.d.ts +26 -0
  10. package/common/components/{intractive-image → badge}/types.js +1 -0
  11. package/common/components/badge/types.js.map +1 -0
  12. package/common/components/badge-list/badge-list.d.ts +29 -0
  13. package/common/components/badge-list/badge-list.js +38 -0
  14. package/common/components/badge-list/badge-list.js.map +1 -0
  15. package/common/components/badge-list/index.d.ts +1 -29
  16. package/common/components/badge-list/index.js +3 -56
  17. package/common/components/badge-list/index.js.map +1 -0
  18. package/common/components/breadcrumbs/breadcrumbs.d.ts +46 -0
  19. package/common/components/breadcrumbs/breadcrumbs.js +83 -0
  20. package/common/components/breadcrumbs/breadcrumbs.js.map +1 -0
  21. package/common/components/breadcrumbs/breadcrumbs.m.scss +113 -0
  22. package/common/components/breadcrumbs/index.d.ts +2 -0
  23. package/common/components/breadcrumbs/index.js +7 -0
  24. package/common/components/breadcrumbs/index.js.map +1 -0
  25. package/common/components/breadcrumbs/types.d.ts +8 -0
  26. package/common/{types.js → components/breadcrumbs/types.js} +1 -0
  27. package/common/components/breadcrumbs/types.js.map +1 -0
  28. package/common/components/img-stub/img-stub.d.ts +14 -0
  29. package/common/components/img-stub/img-stub.js +21 -0
  30. package/common/components/img-stub/img-stub.js.map +1 -0
  31. package/common/components/img-stub/img-stub.m.scss +36 -0
  32. package/common/components/img-stub/index.d.ts +1 -0
  33. package/common/components/img-stub/index.js +6 -0
  34. package/common/components/img-stub/index.js.map +1 -0
  35. package/common/components/{intractive-image → interactive-image}/index.js +1 -0
  36. package/common/components/interactive-image/index.js.map +1 -0
  37. package/common/components/interactive-image/interactive-image.d.ts +15 -0
  38. package/common/components/interactive-image/interactive-image.js +56 -0
  39. package/common/components/interactive-image/interactive-image.js.map +1 -0
  40. package/common/components/{intractive-image → interactive-image}/types.d.ts +4 -4
  41. package/common/components/interactive-image/types.js +3 -0
  42. package/common/components/interactive-image/types.js.map +1 -0
  43. package/common/components/media-gallery/index.d.ts +2 -0
  44. package/common/components/media-gallery/index.js +7 -0
  45. package/common/components/media-gallery/index.js.map +1 -0
  46. package/common/components/media-gallery/media-gallery.d.ts +16 -0
  47. package/common/components/media-gallery/media-gallery.js +90 -0
  48. package/common/components/media-gallery/media-gallery.js.map +1 -0
  49. package/common/components/media-gallery/media-gallery.m.scss +35 -0
  50. package/common/components/media-gallery/types.d.ts +12 -0
  51. package/common/components/media-gallery/types.js +3 -0
  52. package/common/components/media-gallery/types.js.map +1 -0
  53. package/common/components/media-gallery/utils.d.ts +38 -0
  54. package/common/components/media-gallery/utils.js +102 -0
  55. package/common/components/media-gallery/utils.js.map +1 -0
  56. package/common/components/media-modal/__mocks__/images/armchair.jpg +0 -0
  57. package/common/components/media-modal/__mocks__/images/cup.jpg +0 -0
  58. package/common/components/media-modal/__mocks__/images/plant.jpg +0 -0
  59. package/common/components/media-modal/__mocks__/images/stump.jpg +0 -0
  60. package/common/components/media-modal/__mocks__/images/table.jpg +0 -0
  61. package/common/components/media-modal/__mocks__/images/vase.jpg +0 -0
  62. package/common/components/media-modal/__mocks__/index.d.ts +3 -0
  63. package/common/components/media-modal/__mocks__/index.js +251 -0
  64. package/common/components/media-modal/__mocks__/index.js.map +1 -0
  65. package/common/components/media-modal/__mocks__/thumbnails/armchair.jpg +0 -0
  66. package/common/components/media-modal/__mocks__/thumbnails/cup.jpg +0 -0
  67. package/common/components/media-modal/__mocks__/thumbnails/plant.jpg +0 -0
  68. package/common/components/media-modal/__mocks__/thumbnails/stump.jpg +0 -0
  69. package/common/components/media-modal/__mocks__/thumbnails/table.jpg +0 -0
  70. package/common/components/media-modal/__mocks__/thumbnails/vase.jpg +0 -0
  71. package/common/components/media-modal/__mocks__/thumbnails/video3404953.jpg +0 -0
  72. package/common/components/media-modal/__mocks__/thumbnails/video3619217.jpg +0 -0
  73. package/common/components/media-modal/__mocks__/thumbnails/video4093038.jpg +0 -0
  74. package/common/components/media-modal/__mocks__/thumbnails/video6907296.jpg +0 -0
  75. package/common/components/media-modal/index.d.ts +11 -0
  76. package/common/components/media-modal/index.js +29 -0
  77. package/common/components/media-modal/index.js.map +1 -0
  78. package/common/components/media-modal/layout.d.ts +36 -0
  79. package/common/components/media-modal/layout.js +81 -0
  80. package/common/components/media-modal/layout.js.map +1 -0
  81. package/common/components/media-modal/layout.m.scss +78 -0
  82. package/common/components/media-modal/parts/all-round-view.d.ts +7 -0
  83. package/common/components/media-modal/parts/all-round-view.js +42 -0
  84. package/common/components/media-modal/parts/all-round-view.js.map +1 -0
  85. package/common/components/media-modal/parts/all-round-view.m.scss +30 -0
  86. package/common/components/media-modal/parts/index.d.ts +36 -0
  87. package/common/components/media-modal/parts/index.js +65 -0
  88. package/common/components/media-modal/parts/index.js.map +1 -0
  89. package/common/components/media-modal/parts/media-area.d.ts +25 -0
  90. package/common/components/media-modal/parts/media-area.js +61 -0
  91. package/common/components/media-modal/parts/media-area.js.map +1 -0
  92. package/common/components/media-modal/parts/media-area.m.scss +21 -0
  93. package/common/components/media-modal/parts/media-view.d.ts +20 -0
  94. package/common/components/media-modal/parts/media-view.js +46 -0
  95. package/common/components/media-modal/parts/media-view.js.map +1 -0
  96. package/common/components/media-modal/parts/media-view.m.scss +34 -0
  97. package/common/components/media-modal/parts/parts.m.scss +21 -0
  98. package/common/components/media-modal/parts/product-brief.d.ts +20 -0
  99. package/common/components/media-modal/parts/product-brief.js +40 -0
  100. package/common/components/media-modal/parts/product-brief.js.map +1 -0
  101. package/common/components/media-modal/parts/product-brief.m.scss +149 -0
  102. package/common/components/media-modal/parts/review.d.ts +15 -0
  103. package/common/components/media-modal/parts/review.js +32 -0
  104. package/common/components/media-modal/parts/review.js.map +1 -0
  105. package/common/components/media-modal/parts/review.m.scss +86 -0
  106. package/common/components/media-modal/parts/scroll-section.d.ts +11 -0
  107. package/common/components/media-modal/parts/scroll-section.js +20 -0
  108. package/common/components/media-modal/parts/scroll-section.js.map +1 -0
  109. package/common/components/media-modal/parts/scroll-section.m.scss +32 -0
  110. package/common/components/media-modal/parts/thumbnail.d.ts +22 -0
  111. package/common/components/media-modal/parts/thumbnail.js +36 -0
  112. package/common/components/media-modal/parts/thumbnail.js.map +1 -0
  113. package/common/components/media-modal/parts/thumbnail.m.scss +156 -0
  114. package/common/components/media-modal/parts/thumbnails.d.ts +13 -0
  115. package/common/components/media-modal/parts/thumbnails.js +60 -0
  116. package/common/components/media-modal/parts/thumbnails.js.map +1 -0
  117. package/common/components/media-modal/parts/thumbnails.m.scss +16 -0
  118. package/common/components/media-modal/types.d.ts +18 -0
  119. package/common/components/media-modal/types.js +3 -0
  120. package/common/components/media-modal/types.js.map +1 -0
  121. package/common/components/media-modal/utils.d.ts +42 -0
  122. package/common/components/media-modal/utils.js +110 -0
  123. package/common/components/media-modal/utils.js.map +1 -0
  124. package/common/components/modifier/index.d.ts +2 -46
  125. package/common/components/modifier/index.js +4 -99
  126. package/common/components/modifier/index.js.map +1 -0
  127. package/common/components/modifier/modifier.d.ts +13 -0
  128. package/common/components/modifier/modifier.js +74 -0
  129. package/common/components/modifier/modifier.js.map +1 -0
  130. package/common/components/modifier/{modifiers.module.scss → modifier.m.scss} +61 -0
  131. package/common/components/modifier/types.d.ts +35 -0
  132. package/common/components/modifier/types.js +3 -0
  133. package/common/components/modifier/types.js.map +1 -0
  134. package/common/components/pagination-controls/index.d.ts +2 -0
  135. package/common/components/pagination-controls/index.js +9 -0
  136. package/common/components/pagination-controls/index.js.map +1 -0
  137. package/common/components/pagination-controls/pagination-controls.d.ts +30 -0
  138. package/common/components/pagination-controls/pagination-controls.js +72 -0
  139. package/common/components/pagination-controls/pagination-controls.js.map +1 -0
  140. package/common/components/pagination-controls/pagination-controls.m.scss +70 -0
  141. package/common/components/pagination-controls/types.d.ts +20 -0
  142. package/common/components/pagination-controls/types.js +3 -0
  143. package/common/components/pagination-controls/types.js.map +1 -0
  144. package/common/components/product-info/index.d.ts +1 -16
  145. package/common/components/product-info/index.js +5 -41
  146. package/common/components/product-info/index.js.map +1 -0
  147. package/common/components/product-info/parts.d.ts +22 -21
  148. package/common/components/product-info/parts.js +35 -83
  149. package/common/components/product-info/parts.js.map +1 -0
  150. package/common/components/product-info/product-info.d.ts +15 -0
  151. package/common/components/product-info/product-info.js +33 -0
  152. package/common/components/product-info/product-info.js.map +1 -0
  153. package/common/components/product-info/{product-info.module.scss → product-info.m.scss} +9 -0
  154. package/common/components/product-info/types.d.ts +2 -2
  155. package/common/components/product-info/types.js +1 -0
  156. package/common/components/product-info/types.js.map +1 -0
  157. package/common/components/product-info/utils.js +1 -0
  158. package/common/components/product-info/utils.js.map +1 -0
  159. package/common/components/rating-counter/index.d.ts +1 -25
  160. package/common/components/rating-counter/index.js +3 -35
  161. package/common/components/rating-counter/index.js.map +1 -0
  162. package/common/components/rating-counter/rating-counter-util.scss +1 -1
  163. package/common/components/rating-counter/rating-counter.d.ts +35 -0
  164. package/common/components/rating-counter/rating-counter.js +24 -0
  165. package/common/components/rating-counter/rating-counter.js.map +1 -0
  166. package/common/hooks/index.d.ts +19 -0
  167. package/common/hooks/index.js +39 -0
  168. package/common/hooks/index.js.map +1 -0
  169. package/desktop/components/breadcrumbs/breadcrumbs.d.ts +31 -0
  170. package/desktop/components/breadcrumbs/breadcrumbs.js +56 -0
  171. package/desktop/components/breadcrumbs/breadcrumbs.js.map +1 -0
  172. package/desktop/components/breadcrumbs/{breadcrumbs.module.scss → breadcrumbs.m.scss} +36 -1
  173. package/desktop/components/breadcrumbs/index.d.ts +1 -28
  174. package/desktop/components/breadcrumbs/index.js +3 -80
  175. package/desktop/components/breadcrumbs/index.js.map +1 -0
  176. package/desktop/components/gallery-modal/__mocks__/index.js +1 -0
  177. package/desktop/components/gallery-modal/__mocks__/index.js.map +1 -0
  178. package/desktop/components/gallery-modal/components/all-round-view.d.ts +5 -2
  179. package/desktop/components/gallery-modal/components/all-round-view.js +47 -62
  180. package/desktop/components/gallery-modal/components/all-round-view.js.map +1 -0
  181. package/desktop/components/gallery-modal/components/{all-round-view.module.scss → all-round-view.m.scss} +5 -0
  182. package/desktop/components/gallery-modal/components/gallery-modal.d.ts +4 -5
  183. package/desktop/components/gallery-modal/components/gallery-modal.js +16 -66
  184. package/desktop/components/gallery-modal/components/gallery-modal.js.map +1 -0
  185. package/desktop/components/gallery-modal/components/{gallery-modal.module.scss → gallery-modal.m.scss} +5 -3
  186. package/desktop/components/gallery-modal/components/image-overlay.d.ts +3 -3
  187. package/desktop/components/gallery-modal/components/image-overlay.js +4 -17
  188. package/desktop/components/gallery-modal/components/image-overlay.js.map +1 -0
  189. package/desktop/components/gallery-modal/components/{image-overlay.module.scss → image-overlay.m.scss} +1 -0
  190. package/desktop/components/gallery-modal/components/review-info.d.ts +1 -1
  191. package/desktop/components/gallery-modal/components/review-info.js +11 -52
  192. package/desktop/components/gallery-modal/components/review-info.js.map +1 -0
  193. package/desktop/components/gallery-modal/components/thumbnail.d.ts +3 -3
  194. package/desktop/components/gallery-modal/components/thumbnail.js +7 -10
  195. package/desktop/components/gallery-modal/components/thumbnail.js.map +1 -0
  196. package/desktop/components/gallery-modal/index.js +1 -0
  197. package/desktop/components/gallery-modal/index.js.map +1 -0
  198. package/desktop/components/gallery-modal/types.js +1 -0
  199. package/desktop/components/gallery-modal/types.js.map +1 -0
  200. package/desktop/components/gallery-modal/utils.d.ts +5 -3
  201. package/desktop/components/gallery-modal/utils.js +18 -8
  202. package/desktop/components/gallery-modal/utils.js.map +1 -0
  203. package/desktop/components/person-info/index.d.ts +1 -41
  204. package/desktop/components/person-info/index.js +3 -43
  205. package/desktop/components/person-info/index.js.map +1 -0
  206. package/desktop/components/person-info/person-info.d.ts +42 -0
  207. package/desktop/components/person-info/person-info.js +24 -0
  208. package/desktop/components/person-info/person-info.js.map +1 -0
  209. package/desktop/components/person-info/{person-info.module.scss → person-info.m.scss} +1 -1
  210. package/desktop/components/product-card/index.d.ts +2 -26
  211. package/desktop/components/product-card/index.js +7 -103
  212. package/desktop/components/product-card/index.js.map +1 -0
  213. package/desktop/components/product-card/product-card.d.ts +23 -0
  214. package/desktop/components/product-card/product-card.js +94 -0
  215. package/desktop/components/product-card/product-card.js.map +1 -0
  216. package/desktop/components/product-card/types.d.ts +19 -0
  217. package/desktop/components/product-card/types.js +3 -0
  218. package/desktop/components/product-card/types.js.map +1 -0
  219. package/desktop/components/product-carousel/hover-card.d.ts +2 -7
  220. package/desktop/components/product-carousel/hover-card.js +13 -49
  221. package/desktop/components/product-carousel/hover-card.js.map +1 -0
  222. package/desktop/components/product-carousel/{hover-card.module.scss → hover-card.m.scss} +2 -2
  223. package/desktop/components/product-carousel/index.d.ts +2 -31
  224. package/desktop/components/product-carousel/index.js +3 -133
  225. package/desktop/components/product-carousel/index.js.map +1 -0
  226. package/desktop/components/product-carousel/product-carousel.d.ts +7 -0
  227. package/desktop/components/product-carousel/product-carousel.js +95 -0
  228. package/desktop/components/product-carousel/product-carousel.js.map +1 -0
  229. package/desktop/components/product-carousel/{product-carousel.module.scss → product-carousel.m.scss} +1 -1
  230. package/desktop/components/product-carousel/types.d.ts +33 -0
  231. package/desktop/components/product-carousel/types.js +3 -0
  232. package/desktop/components/product-carousel/types.js.map +1 -0
  233. package/desktop/components/product-carousel/utils.d.ts +4 -4
  234. package/desktop/components/product-carousel/utils.js +8 -7
  235. package/desktop/components/product-carousel/utils.js.map +1 -0
  236. package/desktop/components/promotion-card/banner-title.d.ts +2 -3
  237. package/desktop/components/promotion-card/banner-title.js +9 -19
  238. package/desktop/components/promotion-card/banner-title.js.map +1 -0
  239. package/desktop/components/promotion-card/estimate.d.ts +1 -2
  240. package/desktop/components/promotion-card/estimate.js +3 -5
  241. package/desktop/components/promotion-card/estimate.js.map +1 -0
  242. package/desktop/components/promotion-card/index.d.ts +4 -31
  243. package/desktop/components/promotion-card/index.js +10 -83
  244. package/desktop/components/promotion-card/index.js.map +1 -0
  245. package/desktop/components/promotion-card/placeholder.d.ts +4 -2
  246. package/desktop/components/promotion-card/placeholder.js +4 -6
  247. package/desktop/components/promotion-card/placeholder.js.map +1 -0
  248. package/desktop/components/promotion-card/promotion-card.d.ts +32 -0
  249. package/desktop/components/promotion-card/promotion-card.js +39 -0
  250. package/desktop/components/promotion-card/promotion-card.js.map +1 -0
  251. package/desktop/components/promotion-card/{index.module.scss → promotion-card.m.scss} +8 -6
  252. package/desktop/components/promotion-card/types.js +1 -0
  253. package/desktop/components/promotion-card/types.js.map +1 -0
  254. package/mobile/components/action-circles/action-circles.d.ts +22 -0
  255. package/mobile/components/action-circles/action-circles.js +31 -0
  256. package/mobile/components/action-circles/action-circles.js.map +1 -0
  257. package/mobile/components/action-circles/index.d.ts +1 -22
  258. package/mobile/components/action-circles/index.js +3 -29
  259. package/mobile/components/action-circles/index.js.map +1 -0
  260. package/mobile/components/action-list/action-list.d.ts +29 -0
  261. package/mobile/components/action-list/action-list.js +40 -0
  262. package/mobile/components/action-list/action-list.js.map +1 -0
  263. package/mobile/components/action-list/index.d.ts +1 -23
  264. package/mobile/components/action-list/index.js +5 -34
  265. package/mobile/components/action-list/index.js.map +1 -0
  266. package/mobile/components/breadcrumbs/breadcrumbs.d.ts +12 -0
  267. package/mobile/components/breadcrumbs/breadcrumbs.js +17 -0
  268. package/mobile/components/breadcrumbs/breadcrumbs.js.map +1 -0
  269. package/mobile/components/breadcrumbs/index.d.ts +1 -13
  270. package/mobile/components/breadcrumbs/index.js +3 -13
  271. package/mobile/components/breadcrumbs/index.js.map +1 -0
  272. package/mobile/components/person-info/index.d.ts +1 -44
  273. package/mobile/components/person-info/index.js +4 -55
  274. package/mobile/components/person-info/index.js.map +1 -0
  275. package/mobile/components/person-info/person-info.d.ts +46 -0
  276. package/mobile/components/person-info/person-info.js +41 -0
  277. package/mobile/components/person-info/person-info.js.map +1 -0
  278. package/mobile/components/person-info/{person-info.module.scss → person-info.m.scss} +9 -16
  279. package/mobile/components/product-row/index.d.ts +1 -41
  280. package/mobile/components/product-row/index.js +3 -56
  281. package/mobile/components/product-row/index.js.map +1 -0
  282. package/mobile/components/product-row/product-row.d.ts +40 -0
  283. package/mobile/components/product-row/product-row.js +29 -0
  284. package/mobile/components/product-row/product-row.js.map +1 -0
  285. package/mobile/components/product-slider/index.d.ts +1 -17
  286. package/mobile/components/product-slider/index.js +3 -57
  287. package/mobile/components/product-slider/index.js.map +1 -0
  288. package/mobile/components/product-slider/product-slider.d.ts +17 -0
  289. package/mobile/components/product-slider/product-slider.js +37 -0
  290. package/mobile/components/product-slider/product-slider.js.map +1 -0
  291. package/mobile/components/search-bar/index.d.ts +1 -39
  292. package/mobile/components/search-bar/index.js +4 -104
  293. package/mobile/components/search-bar/index.js.map +1 -0
  294. package/mobile/components/search-bar/search-bar.d.ts +39 -0
  295. package/mobile/components/search-bar/search-bar.js +64 -0
  296. package/mobile/components/search-bar/search-bar.js.map +1 -0
  297. package/mobile/components/search-bar/{search-bar.module.scss → search-bar.m.scss} +6 -6
  298. package/mobile/components/select-screen/index.d.ts +1 -20
  299. package/mobile/components/select-screen/index.js +4 -65
  300. package/mobile/components/select-screen/index.js.map +1 -0
  301. package/mobile/components/select-screen/select-screen.d.ts +20 -0
  302. package/mobile/components/select-screen/select-screen.js +31 -0
  303. package/mobile/components/select-screen/select-screen.js.map +1 -0
  304. package/package.json +40 -52
  305. package/common/components/badge/badge.module.scss +0 -40
  306. package/common/components/intractive-image/interactive-image.d.ts +0 -15
  307. package/common/components/intractive-image/interactive-image.js +0 -96
  308. package/common/components/rating-counter/star.svg +0 -5
  309. package/common/constants.d.ts +0 -2
  310. package/common/constants.js +0 -8
  311. package/common/icons/eighteen-plus.svg +0 -5
  312. package/common/types.d.ts +0 -1
  313. package/desktop/components/breadcrumbs/square-arrow-down.svg +0 -8
  314. package/desktop/components/gallery-modal/icons/360.svg +0 -3
  315. package/desktop/components/gallery-modal/icons/pause.svg +0 -3
  316. package/desktop/components/gallery-modal/icons/turn-left.svg +0 -10
  317. package/desktop/components/gallery-modal/icons/turn-right.svg +0 -10
  318. package/desktop/components/modifiers/button/index.d.ts +0 -22
  319. package/desktop/components/modifiers/button/index.js +0 -48
  320. package/desktop/components/modifiers/button/modifier-button.module.scss +0 -85
  321. package/desktop/components/modifiers/group/index.d.ts +0 -15
  322. package/desktop/components/modifiers/group/index.js +0 -70
  323. package/desktop/components/modifiers/group/modifiers-group.module.scss +0 -33
  324. package/desktop/components/modifiers/group/utils.d.ts +0 -20
  325. package/desktop/components/modifiers/group/utils.js +0 -73
  326. package/desktop/components/modifiers/modifiers.scss +0 -8
  327. package/mobile/components/modifiers-list/index.d.ts +0 -22
  328. package/mobile/components/modifiers-list/index.js +0 -25
  329. package/mobile/components/modifiers-list/modifier-item/index.d.ts +0 -29
  330. package/mobile/components/modifiers-list/modifier-item/index.js +0 -38
  331. package/mobile/components/modifiers-list/modifier-item/modifier-item.module.scss +0 -70
  332. package/mobile/components/modifiers-list/modifiers-list.module.scss +0 -21
  333. package/mobile/components/pseudo-input/index.d.ts +0 -11
  334. package/mobile/components/pseudo-input/index.js +0 -34
  335. package/mobile/components/pseudo-input/pseudo-input.module.scss +0 -24
  336. /package/common/components/badge-list/{badge-list.module.scss → badge-list.m.scss} +0 -0
  337. /package/common/components/{intractive-image → interactive-image}/index.d.ts +0 -0
  338. /package/common/components/{intractive-image → interactive-image}/interactive-image-util.scss +0 -0
  339. /package/common/components/{intractive-image/interactive-image.module.scss → interactive-image/interactive-image.m.scss} +0 -0
  340. /package/common/components/rating-counter/{rating-counter.module.scss → rating-counter.m.scss} +0 -0
  341. /package/desktop/components/gallery-modal/components/{review-info.module.scss → review-info.m.scss} +0 -0
  342. /package/desktop/components/gallery-modal/components/{thumbnail.module.scss → thumbnail.m.scss} +0 -0
  343. /package/desktop/components/product-card/{product-card.module.scss → product-card.m.scss} +0 -0
  344. /package/desktop/components/promotion-card/{banner-title.module.scss → banner-title.m.scss} +0 -0
  345. /package/desktop/components/promotion-card/{placeholder.module.scss → placeholder.m.scss} +0 -0
  346. /package/mobile/components/action-circles/{action-circles.module.scss → action-circles.m.scss} +0 -0
  347. /package/mobile/components/action-list/{action-list.module.scss → action-list.m.scss} +0 -0
  348. /package/mobile/components/breadcrumbs/{breadcrumbs.module.scss → breadcrumbs.m.scss} +0 -0
  349. /package/mobile/components/product-row/{product-row.module.scss → product-row.m.scss} +0 -0
  350. /package/mobile/components/product-slider/{product-slider.module.scss → product-slider.m.scss} +0 -0
  351. /package/mobile/components/select-screen/{select-screen.module.scss → select-screen.m.scss} +0 -0
@@ -0,0 +1,113 @@
1
+ @use 'node_modules/@sima-land/ui-nucleons/colors';
2
+
3
+ .root {
4
+ list-style: none;
5
+ display: flex;
6
+ flex-wrap: wrap;
7
+ font-size: 12px;
8
+ line-height: 16px;
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+
13
+ .item {
14
+ margin: 0;
15
+ padding: 0;
16
+ display: flex;
17
+ white-space: nowrap;
18
+ max-width: 100%;
19
+ }
20
+
21
+ .root .item {
22
+ margin-bottom: 12px;
23
+ }
24
+
25
+ // ВАЖНО: именно after чтобы при переносе выглядело правильно
26
+ .root .item:not(:last-child)::after {
27
+ content: '/';
28
+ display: block;
29
+ margin: 0 8px;
30
+ }
31
+
32
+ .inner {
33
+ position: relative;
34
+ display: flex;
35
+ }
36
+
37
+ .name {
38
+ display: flex;
39
+ flex-wrap: nowrap;
40
+ }
41
+
42
+ .icon {
43
+ flex-shrink: 0;
44
+ flex-grow: 0;
45
+ display: block;
46
+ margin-left: 2px;
47
+ stroke: currentColor;
48
+ }
49
+
50
+ .icon:hover {
51
+ cursor: pointer;
52
+ }
53
+
54
+ .dropdown {
55
+ min-width: 180px;
56
+ position: absolute;
57
+ top: -16px;
58
+ left: -16px;
59
+ padding: 16px;
60
+ z-index: 2;
61
+ font-size: 12px;
62
+ line-height: 16px;
63
+ }
64
+
65
+ .dropdown .name {
66
+ margin-bottom: 16px;
67
+ }
68
+
69
+ .dropdown .icon {
70
+ transform: scaleY(-1);
71
+ stroke: colors.$basic-gray38;
72
+ }
73
+
74
+ .dropdown-body {
75
+ display: flex;
76
+ flex-direction: column;
77
+ }
78
+
79
+ .sibling {
80
+ display: block;
81
+ }
82
+
83
+ .dropdown-body > .sibling + .sibling {
84
+ margin-top: 12px;
85
+ }
86
+
87
+ .stub {
88
+ border-radius: 4px;
89
+ height: 12px;
90
+ background: colors.$basic-gray4;
91
+ }
92
+
93
+ .stubs > .stub + .stub {
94
+ margin-top: 12px;
95
+ }
96
+
97
+ .fade-enter {
98
+ opacity: 0;
99
+ }
100
+
101
+ .fade-enter-active {
102
+ opacity: 1;
103
+ transition: opacity 0.2s ease-in-out;
104
+ }
105
+
106
+ .fade-exit {
107
+ opacity: 1;
108
+ }
109
+
110
+ .fade-exit-active {
111
+ opacity: 0;
112
+ transition: opacity 0.2s ease-in-out;
113
+ }
@@ -0,0 +1,2 @@
1
+ export type { BreadcrumbProps, BreadcrumbItemProps } from './types';
2
+ export { Breadcrumbs, BreadcrumbsItem } from './breadcrumbs';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BreadcrumbsItem = exports.Breadcrumbs = void 0;
4
+ var breadcrumbs_1 = require("./breadcrumbs");
5
+ Object.defineProperty(exports, "Breadcrumbs", { enumerable: true, get: function () { return breadcrumbs_1.Breadcrumbs; } });
6
+ Object.defineProperty(exports, "BreadcrumbsItem", { enumerable: true, get: function () { return breadcrumbs_1.BreadcrumbsItem; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/breadcrumbs/index.ts"],"names":[],"mappings":";;;AACA,6CAA6D;AAApD,0GAAA,WAAW,OAAA;AAAE,8GAAA,eAAe,OAAA"}
@@ -0,0 +1,8 @@
1
+ import type { LinkProps } from '@sima-land/ui-nucleons/link';
2
+ import type { WithTestId } from '@sima-land/ui-nucleons/types';
3
+ import type { HTMLAttributes } from 'react';
4
+ export interface BreadcrumbProps extends WithTestId, HTMLAttributes<HTMLElement> {
5
+ }
6
+ export interface BreadcrumbItemProps extends LinkProps, WithTestId {
7
+ active?: boolean;
8
+ }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/common/components/breadcrumbs/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { CSSProperties, HTMLAttributes } from 'react';
2
+ import type { WithTestId } from '@sima-land/ui-nucleons/types';
3
+ export interface ImgStubStyle extends CSSProperties {
4
+ '--img-stub-size'?: string;
5
+ }
6
+ export interface ImgStubProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style'>, WithTestId {
7
+ style?: ImgStubStyle;
8
+ }
9
+ /**
10
+ * Баннер-заглушка для больших картинок которые не загрузились из-за ошибки.
11
+ * @param props Свойства.
12
+ * @return Элемент.
13
+ */
14
+ export declare function ImgStub({ className, ...rest }: ImgStubProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ImgStub = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const Repeat_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/Repeat"));
9
+ const bind_1 = __importDefault(require("classnames/bind"));
10
+ const img_stub_m_scss_1 = __importDefault(require("./img-stub.m.scss"));
11
+ const cx = bind_1.default.bind(img_stub_m_scss_1.default);
12
+ /**
13
+ * Баннер-заглушка для больших картинок которые не загрузились из-за ошибки.
14
+ * @param props Свойства.
15
+ * @return Элемент.
16
+ */
17
+ function ImgStub({ className, ...rest }) {
18
+ return ((0, jsx_runtime_1.jsxs)("div", { ...rest, className: cx('root', className), role: 'banner', children: [(0, jsx_runtime_1.jsxs)("svg", { className: img_stub_m_scss_1.default.text, viewBox: '0 0 160 160', children: [(0, jsx_runtime_1.jsx)("text", { x: '50%', y: '14.5%', className: img_stub_m_scss_1.default.line, children: "\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435" }), (0, jsx_runtime_1.jsx)("text", { x: '50%', y: '24.5%', className: img_stub_m_scss_1.default.line, children: "\u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C :(" }), (0, jsx_runtime_1.jsx)("text", { x: '50%', y: '80%', className: img_stub_m_scss_1.default.line, children: "\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435" }), (0, jsx_runtime_1.jsx)("text", { x: '50%', y: '90%', className: img_stub_m_scss_1.default.line, children: "\u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443" })] }), (0, jsx_runtime_1.jsx)(Repeat_1.default, { className: img_stub_m_scss_1.default.icon })] }));
19
+ }
20
+ exports.ImgStub = ImgStub;
21
+ //# sourceMappingURL=img-stub.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"img-stub.js","sourceRoot":"","sources":["../../../../src/common/components/img-stub/img-stub.tsx"],"names":[],"mappings":";;;;;;;AAEA,6FAAwE;AACxE,2DAAyC;AACzC,wEAAuC;AAUvC,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,yBAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAgB;IAC1D,OAAO,CACL,oCAAS,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,aAC5D,iCAAK,SAAS,EAAE,yBAAM,CAAC,IAAI,EAAE,OAAO,EAAC,aAAa,aAChD,iCAAM,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,OAAO,EAAC,SAAS,EAAE,yBAAM,CAAC,IAAI,mFAEvC,EACP,iCAAM,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,OAAO,EAAC,SAAS,EAAE,yBAAM,CAAC,IAAI,mGAEvC,EAEP,iCAAM,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,EAAC,SAAS,EAAE,yBAAM,CAAC,IAAI,6EAErC,EACP,iCAAM,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,EAAC,SAAS,EAAE,yBAAM,CAAC,IAAI,kHAErC,IACH,EACN,uBAAC,gBAAS,IAAC,SAAS,EAAE,yBAAM,CAAC,IAAI,GAAI,IACjC,CACP,CAAC;AACJ,CAAC;AArBD,0BAqBC"}
@@ -0,0 +1,36 @@
1
+ .root {
2
+ position: relative;
3
+ width: var(--img-stub-size, 160px);
4
+ height: var(--img-stub-size, 160px);
5
+ background: #f5f5f5;
6
+ flex-grow: 0;
7
+ flex-shrink: 0;
8
+ overflow: hidden;
9
+ user-select: none;
10
+ }
11
+
12
+ .text {
13
+ width: 100%;
14
+ height: 100%;
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ }
19
+
20
+ .line {
21
+ fill: #9e9e9e;
22
+ font-size: 13px;
23
+ text-anchor: middle;
24
+ text-align: center;
25
+ }
26
+
27
+ .icon {
28
+ display: block;
29
+ position: absolute;
30
+ top: 50%;
31
+ left: 50%;
32
+ width: 30.625%;
33
+ height: 30.625%;
34
+ fill: #757575;
35
+ transform: translate(-50%, -50%) scaleX(-1);
36
+ }
@@ -0,0 +1 @@
1
+ export { type ImgStubProps, type ImgStubStyle, ImgStub } from './img-stub';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImgStub = void 0;
4
+ var img_stub_1 = require("./img-stub");
5
+ Object.defineProperty(exports, "ImgStub", { enumerable: true, get: function () { return img_stub_1.ImgStub; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/img-stub/index.ts"],"names":[],"mappings":";;;AAAA,uCAA2E;AAA5B,mGAAA,OAAO,OAAA"}
@@ -4,3 +4,4 @@ exports.Parts = exports.InteractiveImage = void 0;
4
4
  const interactive_image_1 = require("./interactive-image");
5
5
  Object.defineProperty(exports, "InteractiveImage", { enumerable: true, get: function () { return interactive_image_1.InteractiveImage; } });
6
6
  Object.defineProperty(exports, "Parts", { enumerable: true, get: function () { return interactive_image_1.Parts; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/interactive-image/index.ts"],"names":[],"mappings":";;;AAMA,2DAA8D;AASrD,iGATA,oCAAgB,OASA;AAAE,sFATA,yBAAK,OASA"}
@@ -0,0 +1,15 @@
1
+ import { AnchorHTMLAttributes } from 'react';
2
+ import { InteractiveImageProps, InteractiveImageImageProps, InteractiveImagePointProps } from './types';
3
+ export declare const InteractiveImage: import("react").ForwardRefExoticComponent<InteractiveImageProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ /**
5
+ * Обертка-ссылка для картинки.
6
+ * @param props Свойства.
7
+ * @return Элемент.
8
+ */
9
+ declare function ImageAnchor({ children, className, ...rest }: AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
10
+ export declare const Parts: {
11
+ readonly ImageAnchor: typeof ImageAnchor;
12
+ readonly Image: import("react").ForwardRefExoticComponent<InteractiveImageImageProps & import("react").RefAttributes<HTMLImageElement>>;
13
+ readonly Point: import("react").ForwardRefExoticComponent<InteractiveImagePointProps & import("react").RefAttributes<HTMLAnchorElement>>;
14
+ };
15
+ export {};
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Parts = exports.InteractiveImage = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const bind_1 = __importDefault(require("classnames/bind"));
10
+ const interactive_image_m_scss_1 = __importDefault(require("./interactive-image.m.scss"));
11
+ const cx = bind_1.default.bind(interactive_image_m_scss_1.default);
12
+ exports.InteractiveImage = (0, react_1.forwardRef)(({ children, 'data-testid': testId, className, dotSize, ...rest }, ref) => {
13
+ const rootClassName = cx('root', {
14
+ 'dot-size-unset': dotSize === 'unset',
15
+ }, className);
16
+ validateChildren(children);
17
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: rootClassName, ...rest, "data-testid": testId, children: react_1.Children.toArray(children).filter(child => (0, react_1.isValidElement)(child) &&
18
+ (child.type === ImageAnchor || child.type === Image || child.type === Point)) }));
19
+ });
20
+ /**
21
+ * Проверка валидности содержимого, переданного в InteractiveImage.
22
+ * @param children Содержимое.
23
+ */
24
+ function validateChildren(children) {
25
+ let counter = 0;
26
+ for (const child of react_1.Children.toArray(children)) {
27
+ if ((0, react_1.isValidElement)(child) && (child.type === ImageAnchor || child.type === Image)) {
28
+ counter++;
29
+ }
30
+ if (counter > 1) {
31
+ throw new Error('[InteractiveImage] Either Image or ImageAnchor allowed. Not both.');
32
+ }
33
+ }
34
+ }
35
+ /**
36
+ * Обертка-ссылка для картинки.
37
+ * @param props Свойства.
38
+ * @return Элемент.
39
+ */
40
+ function ImageAnchor({ children, className, ...rest }) {
41
+ return ((0, jsx_runtime_1.jsx)("a", { ...rest, className: cx('image-anchor', className), "data-testid": 'interactive-image:image-anchor', children: react_1.Children.toArray(children).filter(child => (0, react_1.isValidElement)(child) && child.type === Image) }));
42
+ }
43
+ /**
44
+ * Изображение на котором будут располагаться точки.
45
+ * @param props Свойства.
46
+ * @return Элемент.
47
+ */
48
+ const Image = (0, react_1.forwardRef)(({ className, 'data-testid': testId = 'interactive-image:image', ...rest }, ref) => ((0, jsx_runtime_1.jsx)("img", { ref: ref, className: cx('image', className), "data-testid": testId, ...rest })));
49
+ /**
50
+ * Точка которая будет располагаться на изображении.
51
+ * @param props Свойства.
52
+ * @return Элемент.
53
+ */
54
+ const Point = (0, react_1.forwardRef)(({ x, y, className, style, 'data-testid': testId = 'interactive-image:point', ...rest }, ref) => ((0, jsx_runtime_1.jsx)("a", { ref: ref, "aria-label": '\u0422\u043E\u0447\u043A\u0430 \u043D\u0430 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0438', "data-testid": testId, className: cx('point', className), style: { ...style, top: `${y}%`, left: `${x}%` }, ...rest })));
55
+ exports.Parts = { ImageAnchor, Image, Point };
56
+ //# sourceMappingURL=interactive-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactive-image.js","sourceRoot":"","sources":["../../../../src/common/components/interactive-image/interactive-image.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAA8F;AAM9F,2DAAyC;AACzC,0FAAgD;AAEhD,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,kCAAM,CAAC,CAAC;AAEtB,QAAA,gBAAgB,GAAG,IAAA,kBAAU,EACxC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IACxE,MAAM,aAAa,GAAG,EAAE,CACtB,MAAM,EACN;QACE,gBAAgB,EAAE,OAAO,KAAK,OAAO;KACtC,EACD,SAAS,CACV,CAAC;IAEF,gBAAgB,CAA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C;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,KAAK,GAAG,IAAA,kBAAU,EACtB,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,GAAG,yBAAyB,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClF,gCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,iBAAe,MAAM,KAAM,IAAI,GAAI,CACpF,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,KAAK,GAAG,IAAA,kBAAU,EACtB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,yBAAyB,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC/F,8BACE,GAAG,EAAE,GAAG,gBACG,gHAAsB,iBACpB,MAAM,EACnB,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,KAC5C,IAAI,GACR,CACH,CACF,CAAC;AAEW,QAAA,KAAK,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAW,CAAC"}
@@ -1,9 +1,9 @@
1
- import type { CSSProperties } from 'react';
1
+ import type { HTMLAttributes, AnchorHTMLAttributes, ImgHTMLAttributes, CSSProperties } from 'react';
2
2
  export interface InteractiveImageStyle extends CSSProperties {
3
3
  '--dot-size'?: string;
4
4
  '--dot-size-core'?: string;
5
5
  }
6
- export interface InteractiveImageProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ export interface InteractiveImageProps extends HTMLAttributes<HTMLDivElement> {
7
7
  /** Размер точек. При указании "unset" можно задать css-переменные через className или style. */
8
8
  dotSize?: 'unset';
9
9
  /** Стили с возможностью указания размера точек через css-переменные. */
@@ -11,11 +11,11 @@ export interface InteractiveImageProps extends React.HTMLAttributes<HTMLDivEleme
11
11
  /** Идентификатор для систем автоматизированного тестирования. */
12
12
  'data-testid'?: string;
13
13
  }
14
- export interface InteractiveImageImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
14
+ export interface InteractiveImageImageProps extends ImgHTMLAttributes<HTMLImageElement> {
15
15
  /** Идентификатор для систем автоматизированного тестирования. */
16
16
  'data-testid'?: string;
17
17
  }
18
- export interface InteractiveImagePointProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
18
+ export interface InteractiveImagePointProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
19
19
  x: number;
20
20
  y: number;
21
21
  /** Идентификатор для систем автоматизированного тестирования. */
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/common/components/interactive-image/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type { MediaGalleryProps, MediaGalleryStyle } from './types';
2
+ export { MediaGallery, MediaSlide } from './media-gallery';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MediaSlide = exports.MediaGallery = void 0;
4
+ var media_gallery_1 = require("./media-gallery");
5
+ Object.defineProperty(exports, "MediaGallery", { enumerable: true, get: function () { return media_gallery_1.MediaGallery; } });
6
+ Object.defineProperty(exports, "MediaSlide", { enumerable: true, get: function () { return media_gallery_1.MediaSlide; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/media-gallery/index.ts"],"names":[],"mappings":";;;AACA,iDAA2D;AAAlD,6GAAA,YAAY,OAAA;AAAE,2GAAA,UAAU,OAAA"}
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { MediaGalleryProps } from './types';
3
+ /**
4
+ * Блок просмотра медиа (фото/видео) с возможностью прокрутки с помощью свайпа.
5
+ * @param props Свойства.
6
+ * @return Элемент.
7
+ */
8
+ export declare function MediaGallery({ className, style, children, targetIndex, onChangeTargetIndex, }: MediaGalleryProps): import("react/jsx-runtime").JSX.Element;
9
+ /**
10
+ * Слот слайда галереи.
11
+ * @param props Свойства.
12
+ * @return Элемент.
13
+ */
14
+ export declare function MediaSlide({ children }: {
15
+ children?: ReactNode;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MediaSlide = exports.MediaGallery = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const hooks_1 = require("../../hooks");
10
+ const utils_1 = require("./utils");
11
+ const bind_1 = __importDefault(require("classnames/bind"));
12
+ const media_gallery_m_scss_1 = __importDefault(require("./media-gallery.m.scss"));
13
+ const cx = bind_1.default.bind(media_gallery_m_scss_1.default);
14
+ /**
15
+ * Блок просмотра медиа (фото/видео) с возможностью прокрутки с помощью свайпа.
16
+ * @param props Свойства.
17
+ * @return Элемент.
18
+ */
19
+ function MediaGallery({ className, style, children, targetIndex = 0, onChangeTargetIndex, }) {
20
+ const mounted = (0, hooks_1.useMounted)();
21
+ const slidesRef = (0, react_1.useRef)(null);
22
+ const items = react_1.Children.toArray(children).filter(item => (0, react_1.isValidElement)(item) && item.type === MediaSlide);
23
+ const total = items.length;
24
+ const totalRef = (0, react_1.useRef)(total);
25
+ totalRef.current = total;
26
+ const targetIndexRef = (0, react_1.useRef)(targetIndex);
27
+ targetIndexRef.current = targetIndex;
28
+ const onChangeTargetIndexRef = (0, react_1.useRef)(onChangeTargetIndex);
29
+ onChangeTargetIndexRef.current = onChangeTargetIndex;
30
+ const moveBackward = (0, react_1.useCallback)(() => {
31
+ var _a;
32
+ (_a = onChangeTargetIndexRef.current) === null || _a === void 0 ? void 0 : _a.call(onChangeTargetIndexRef, utils_1.LoopUtil.getPrevIndex(targetIndexRef.current, totalRef.current));
33
+ }, []);
34
+ const moveForward = (0, react_1.useCallback)(() => {
35
+ var _a;
36
+ (_a = onChangeTargetIndexRef.current) === null || _a === void 0 ? void 0 : _a.call(onChangeTargetIndexRef, utils_1.LoopUtil.getNextIndex(targetIndexRef.current, totalRef.current));
37
+ }, []);
38
+ const target = items[targetIndex];
39
+ const next = items[utils_1.LoopUtil.getNextIndex(targetIndex, total)];
40
+ const prev = items[utils_1.LoopUtil.getPrevIndex(targetIndex, total)];
41
+ const { init, getProps } = (0, react_1.useMemo)(() => (0, utils_1.createSwipe)({
42
+ onSwipeStart: () => {
43
+ if (!slidesRef.current) {
44
+ return;
45
+ }
46
+ slidesRef.current.classList.remove(cx('transition'));
47
+ },
48
+ onSwipeMove: ({ distanceX }) => {
49
+ if (!slidesRef.current) {
50
+ return;
51
+ }
52
+ // @todo линейная интерполяция для того чтобы не докручивать до тех слайдов которые не смонтированы
53
+ slidesRef.current.style.setProperty('transform', `translate3d(${distanceX}px, 0, 0)`);
54
+ },
55
+ onSwipeEnd: ({ distanceX, isLeft, isRight }) => {
56
+ const slides = slidesRef.current;
57
+ if (!slides) {
58
+ return;
59
+ }
60
+ if (isLeft) {
61
+ slides.style.setProperty('transform', `translate3d(calc(${distanceX}px - var(--media-gallery-width)), 0, 0)`);
62
+ moveBackward();
63
+ }
64
+ if (isRight) {
65
+ slides.style.setProperty('transform', `translate3d(calc(${distanceX}px + var(--media-gallery-width)), 0, 0)`);
66
+ moveForward();
67
+ }
68
+ // ВАЖНО: здесь должны быть именно два requestAnimationFrame, один внутри другого
69
+ requestAnimationFrame(() => {
70
+ requestAnimationFrame(() => {
71
+ slides.classList.add(cx('transition'));
72
+ slides.style.setProperty('transform', `translate3d(0px, 0, 0)`);
73
+ });
74
+ });
75
+ },
76
+ }), [moveBackward, moveBackward]);
77
+ (0, react_1.useEffect)(init, [init]);
78
+ return ((0, jsx_runtime_1.jsx)("div", { className: cx('root', className), style: style, ...getProps(), children: mounted && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { ref: slidesRef, className: cx('slides'), children: [prev && ((0, jsx_runtime_1.jsx)("div", { className: cx('slide', 'prev'), children: prev }, prev.key)), target && ((0, jsx_runtime_1.jsx)("div", { className: cx('slide'), children: target }, target.key)), next && ((0, jsx_runtime_1.jsx)("div", { className: cx('slide', 'next'), children: next }, next.key))] }) })) }));
79
+ }
80
+ exports.MediaGallery = MediaGallery;
81
+ /**
82
+ * Слот слайда галереи.
83
+ * @param props Свойства.
84
+ * @return Элемент.
85
+ */
86
+ function MediaSlide({ children }) {
87
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
88
+ }
89
+ exports.MediaSlide = MediaSlide;
90
+ //# sourceMappingURL=media-gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-gallery.js","sourceRoot":"","sources":["../../../../src/common/components/media-gallery/media-gallery.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCASe;AACf,uCAAyC;AAEzC,mCAAgD;AAChD,2DAAyC;AACzC,kFAA4C;AAE5C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,8BAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,WAAW,GAAG,CAAC,EACf,mBAAmB,GACD;IAClB,MAAM,OAAO,GAAG,IAAA,kBAAU,GAAE,CAAC;IAC7B,MAAM,SAAS,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAG,gBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CA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AClE,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC,EACJ,CAAC,YAAY,EAAE,YAAY,CAAC,CAC7B,CAAC;IAEF,IAAA,iBAAS,EAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAExB,OAAO,CACL,gCAAK,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,KAAM,QAAQ,EAAE,YAChE,OAAO,IAAI,CACV,2DACE,iCAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,aAEzC,IAAI,IAAI,CACP,gCAAoB,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,YAC/C,IAAI,IADG,IAAI,CAAC,GAAG,CAEZ,CACP,EACA,MAAM,IAAI,CACT,gCAAsB,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,YACzC,MAAM,IADC,MAAM,CAAC,GAAG,CAEd,CACP,EACA,IAAI,IAAI,CACP,gCAAoB,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,YAC/C,IAAI,IADG,IAAI,CAAC,GAAG,CAEZ,CACP,IACG,GACL,CACJ,GACG,CACP,CAAC;AACJ,CAAC;AA1HD,oCA0HC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,EAAE,QAAQ,EAA4B;IAC/D,OAAO,2DAAG,QAAQ,GAAI,CAAC;AACzB,CAAC;AAFD,gCAEC"}
@@ -0,0 +1,35 @@
1
+ @use 'node_modules/@sima-land/ui-nucleons/colors';
2
+
3
+ .root {
4
+ width: var(--media-gallery-width, 320px);
5
+ height: var(--media-gallery-height, 240px);
6
+ display: flex;
7
+ justify-content: space-between;
8
+ align-items: center;
9
+ overflow: hidden;
10
+ }
11
+
12
+ .slides {
13
+ position: relative;
14
+ }
15
+
16
+ .slide {
17
+ width: var(--media-gallery-width, 320px);
18
+ height: var(--media-gallery-height, 240px);
19
+ }
20
+
21
+ .slide.prev {
22
+ position: absolute;
23
+ left: -100%;
24
+ top: 0;
25
+ }
26
+
27
+ .slide.next {
28
+ position: absolute;
29
+ left: 100%;
30
+ top: 0;
31
+ }
32
+
33
+ .transition {
34
+ transition: transform 0.3s ease-in-out;
35
+ }
@@ -0,0 +1,12 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ export interface MediaGalleryStyle extends CSSProperties {
3
+ '--media-gallery-width'?: string;
4
+ '--media-gallery-height'?: string;
5
+ }
6
+ export interface MediaGalleryProps {
7
+ style?: MediaGalleryStyle;
8
+ className?: string;
9
+ children: ReactNode;
10
+ targetIndex?: number;
11
+ onChangeTargetIndex?: (newIndex: number) => void;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/common/components/media-gallery/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const LoopUtil: {
3
+ /**
4
+ * Возвращает индекс предыдущего элемента.
5
+ * @param current Текущий индекс.
6
+ * @param total Всего.
7
+ * @return Индекс.
8
+ */
9
+ readonly getPrevIndex: (current: number, total: number) => number;
10
+ /**
11
+ * Возвращает индекс следующего элемента.
12
+ * @param current Текущий индекс.
13
+ * @param total Всего.
14
+ * @return Индекс.
15
+ */
16
+ readonly getNextIndex: (current: number, total: number) => number;
17
+ };
18
+ /**
19
+ * Получив пропсы items и children вернет массив пропсов для MediaView.
20
+ * @param props Свойства.
21
+ * @return Пропсы.
22
+ */
23
+ export declare function createSwipe({ onSwipeStart, onSwipeMove, onSwipeEnd, }?: {
24
+ onSwipeStart?: VoidFunction;
25
+ onSwipeMove?: (event: {
26
+ startX: number;
27
+ distanceX: number;
28
+ }) => void;
29
+ onSwipeEnd?: (event: {
30
+ startX: number;
31
+ distanceX: number;
32
+ isLeft: boolean;
33
+ isRight: boolean;
34
+ }) => void;
35
+ }): {
36
+ getProps: () => HTMLAttributes<HTMLElement>;
37
+ init: () => VoidFunction;
38
+ };