@redneckz/wildless-cms-uni-blocks 0.6.38 → 0.6.40

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 (282) hide show
  1. package/bundle/BlockRenderer/BlockRendererOptions.d.ts +1 -0
  2. package/bundle/ProjectSettings.d.ts +0 -2
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +140 -116
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/Carousel/CarouselContent.d.ts +1 -1
  7. package/bundle/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
  8. package/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
  9. package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
  10. package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
  11. package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
  12. package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
  13. package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
  14. package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
  15. package/bundle/model/BlockVersion.d.ts +1 -0
  16. package/bundle/ui-kit/Button/ButtonSection.d.ts +1 -1
  17. package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
  18. package/dist/BlockRenderer/BlockRendererOptions.d.ts +1 -0
  19. package/dist/BlockRenderer/renderBlock.js +2 -2
  20. package/dist/BlockRenderer/renderBlock.js.map +1 -1
  21. package/dist/ProjectSettings.d.ts +0 -2
  22. package/dist/ProjectSettings.js +0 -3
  23. package/dist/ProjectSettings.js.map +1 -1
  24. package/dist/components/Blocks.js +6 -2
  25. package/dist/components/Blocks.js.map +1 -1
  26. package/dist/components/Carousel/Carousel.js +3 -2
  27. package/dist/components/Carousel/Carousel.js.map +1 -1
  28. package/dist/components/Carousel/CarouselContent.d.ts +1 -1
  29. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
  30. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +17 -0
  31. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
  32. package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
  33. package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
  34. package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
  35. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
  36. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
  37. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
  38. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
  39. package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
  40. package/dist/components/CarouselProductCard/CarouselProductCard.js +32 -0
  41. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
  42. package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
  43. package/dist/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
  44. package/dist/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
  45. package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
  46. package/dist/components/Gallery/GalleryCardInner.js +3 -2
  47. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  48. package/dist/components/ProductTile/ProductTile.js +10 -22
  49. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  50. package/dist/components/VerticalLayout/VerticalLayout.js +18 -13
  51. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  52. package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
  53. package/dist/model/BlockVersion.d.ts +1 -0
  54. package/dist/model/BlockVersion.js +5 -1
  55. package/dist/model/BlockVersion.js.map +1 -1
  56. package/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
  57. package/dist/ui-kit/Button/ButtonSection.js +2 -2
  58. package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  59. package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
  60. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  61. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  62. package/dist/utils/adjustHref.js +1 -3
  63. package/dist/utils/adjustHref.js.map +1 -1
  64. package/lib/BlockRenderer/BlockRendererOptions.d.ts +1 -0
  65. package/lib/BlockRenderer/renderBlock.js +2 -2
  66. package/lib/BlockRenderer/renderBlock.js.map +1 -1
  67. package/lib/ProjectSettings.d.ts +0 -2
  68. package/lib/ProjectSettings.js +0 -3
  69. package/lib/ProjectSettings.js.map +1 -1
  70. package/lib/common.css +1 -1
  71. package/lib/components/Blocks.js +6 -2
  72. package/lib/components/Blocks.js.map +1 -1
  73. package/lib/components/Carousel/Carousel.fixture.d.ts +4 -1
  74. package/lib/components/Carousel/Carousel.js +3 -2
  75. package/lib/components/Carousel/Carousel.js.map +1 -1
  76. package/lib/components/Carousel/CarouselContent.d.ts +1 -1
  77. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
  78. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.fixture.d.ts +16 -0
  79. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +15 -0
  80. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
  81. package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
  82. package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
  83. package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
  84. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
  85. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
  86. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
  87. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
  88. package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
  89. package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +8 -0
  90. package/lib/components/CarouselProductCard/CarouselProductCard.js +30 -0
  91. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
  92. package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
  93. package/lib/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
  94. package/lib/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
  95. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +1 -1
  96. package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
  97. package/lib/components/Gallery/GalleryCardInner.js +3 -2
  98. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  99. package/lib/components/ProductTile/ProductTile.fixture.d.ts +2 -1
  100. package/lib/components/ProductTile/ProductTile.js +11 -23
  101. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  102. package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +2 -1
  103. package/lib/components/VerticalLayout/VerticalLayout.js +18 -13
  104. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  105. package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
  106. package/lib/model/BlockVersion.d.ts +1 -0
  107. package/lib/model/BlockVersion.js +4 -0
  108. package/lib/model/BlockVersion.js.map +1 -1
  109. package/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
  110. package/lib/ui-kit/Button/ButtonSection.js +2 -2
  111. package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  112. package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
  113. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  114. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  115. package/lib/utils/adjustHref.js +1 -3
  116. package/lib/utils/adjustHref.js.map +1 -1
  117. package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +1 -0
  118. package/mobile/bundle/ProjectSettings.d.ts +0 -2
  119. package/mobile/bundle/bundle.umd.js +7 -11
  120. package/mobile/bundle/bundle.umd.min.js +1 -1
  121. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +1 -1
  122. package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
  123. package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
  124. package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
  125. package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
  126. package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
  127. package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
  128. package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
  129. package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
  130. package/mobile/bundle/model/BlockVersion.d.ts +1 -0
  131. package/mobile/bundle/ui-kit/Button/ButtonSection.d.ts +1 -1
  132. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
  133. package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +1 -0
  134. package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
  135. package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
  136. package/mobile/dist/ProjectSettings.d.ts +0 -2
  137. package/mobile/dist/ProjectSettings.js +0 -3
  138. package/mobile/dist/ProjectSettings.js.map +1 -1
  139. package/mobile/dist/components/Carousel/Carousel.js +3 -2
  140. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  141. package/mobile/dist/components/Carousel/CarouselContent.d.ts +1 -1
  142. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
  143. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +17 -0
  144. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
  145. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
  146. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
  147. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
  148. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
  149. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
  150. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
  151. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
  152. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
  153. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +32 -0
  154. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
  155. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
  156. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
  157. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
  158. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
  159. package/mobile/dist/components/Gallery/GalleryCardInner.js +3 -2
  160. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  161. package/mobile/dist/components/ProductTile/ProductTile.js +10 -22
  162. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  163. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +18 -13
  164. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  165. package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
  166. package/mobile/dist/model/BlockVersion.d.ts +1 -0
  167. package/mobile/dist/model/BlockVersion.js +5 -1
  168. package/mobile/dist/model/BlockVersion.js.map +1 -1
  169. package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
  170. package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -2
  171. package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  172. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
  173. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  174. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  175. package/mobile/dist/utils/adjustHref.js +1 -3
  176. package/mobile/dist/utils/adjustHref.js.map +1 -1
  177. package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +1 -0
  178. package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
  179. package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
  180. package/mobile/lib/ProjectSettings.d.ts +0 -2
  181. package/mobile/lib/ProjectSettings.js +0 -3
  182. package/mobile/lib/ProjectSettings.js.map +1 -1
  183. package/mobile/lib/components/Carousel/Carousel.js +3 -2
  184. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  185. package/mobile/lib/components/Carousel/CarouselContent.d.ts +1 -1
  186. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
  187. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +15 -0
  188. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
  189. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
  190. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
  191. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
  192. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
  193. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
  194. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
  195. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
  196. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
  197. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +30 -0
  198. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
  199. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
  200. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
  201. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
  202. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
  203. package/mobile/lib/components/Gallery/GalleryCardInner.js +3 -2
  204. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  205. package/mobile/lib/components/ProductTile/ProductTile.js +11 -23
  206. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  207. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +18 -13
  208. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  209. package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
  210. package/mobile/lib/model/BlockVersion.d.ts +1 -0
  211. package/mobile/lib/model/BlockVersion.js +4 -0
  212. package/mobile/lib/model/BlockVersion.js.map +1 -1
  213. package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
  214. package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -2
  215. package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  216. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
  217. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
  218. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  219. package/mobile/lib/utils/adjustHref.js +1 -3
  220. package/mobile/lib/utils/adjustHref.js.map +1 -1
  221. package/mobile/src/BlockRenderer/BlockRendererOptions.ts +1 -0
  222. package/mobile/src/BlockRenderer/renderBlock.tsx +2 -1
  223. package/mobile/src/ProjectSettings.ts +0 -4
  224. package/mobile/src/components/Carousel/Carousel.example.json +0 -1
  225. package/mobile/src/components/Carousel/Carousel.tsx +21 -18
  226. package/mobile/src/components/Carousel/CarouselContent.ts +1 -1
  227. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +17 -0
  228. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +62 -0
  229. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.ui.json +10 -0
  230. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +25 -0
  231. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +33 -14
  232. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +5 -5
  233. package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +21 -0
  234. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +102 -0
  235. package/mobile/src/components/CarouselProductCard/CarouselProductCard.ui.json +18 -0
  236. package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +51 -0
  237. package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +1 -1
  238. package/mobile/src/components/ContactsBlock/ContactsBlock.example.json +1 -1
  239. package/mobile/src/components/Gallery/GalleryCardInner.tsx +6 -3
  240. package/mobile/src/components/ProductTile/ProductTile.tsx +8 -26
  241. package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +7 -4
  242. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +35 -20
  243. package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +4 -0
  244. package/mobile/src/model/BlockVersion.ts +5 -0
  245. package/mobile/src/ui-kit/Button/ButtonSection.tsx +4 -4
  246. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -2
  247. package/mobile/src/utils/adjustHref.ts +1 -3
  248. package/package.json +1 -1
  249. package/src/BlockRenderer/BlockRendererOptions.ts +1 -0
  250. package/src/BlockRenderer/renderBlock.tsx +2 -1
  251. package/src/ProjectSettings.ts +0 -4
  252. package/src/components/Blocks.ts +6 -2
  253. package/src/components/Carousel/Carousel.example.json +0 -1
  254. package/src/components/Carousel/Carousel.fixture.tsx +64 -4
  255. package/src/components/Carousel/Carousel.tsx +21 -18
  256. package/src/components/Carousel/CarouselContent.ts +1 -1
  257. package/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +17 -0
  258. package/src/components/CarouselCatalogCard/CarouselCatalogCard.fixture.tsx +43 -0
  259. package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +62 -0
  260. package/src/components/CarouselCatalogCard/CarouselCatalogCard.ui.json +10 -0
  261. package/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +25 -0
  262. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +33 -14
  263. package/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +5 -5
  264. package/src/components/CarouselProductCard/CarouselProductCard.example.json +21 -0
  265. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +62 -0
  266. package/src/components/CarouselProductCard/CarouselProductCard.tsx +102 -0
  267. package/src/components/CarouselProductCard/CarouselProductCard.ui.json +18 -0
  268. package/src/components/CarouselProductCard/CarouselProductCardContent.ts +51 -0
  269. package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +1 -1
  270. package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +1 -1
  271. package/src/components/ContactsBlock/ContactsBlock.example.json +1 -1
  272. package/src/components/Gallery/GalleryCardInner.tsx +6 -3
  273. package/src/components/ProductTile/ProductTile.fixture.tsx +2 -1
  274. package/src/components/ProductTile/ProductTile.tsx +8 -26
  275. package/src/components/VerticalLayout/VerticalLayout.example.json +7 -4
  276. package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +59 -2
  277. package/src/components/VerticalLayout/VerticalLayout.tsx +35 -20
  278. package/src/components/VerticalLayout/VerticalLayoutContent.ts +4 -0
  279. package/src/model/BlockVersion.ts +5 -0
  280. package/src/ui-kit/Button/ButtonSection.tsx +4 -4
  281. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -2
  282. package/src/utils/adjustHref.ts +1 -3
@@ -1,6 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { BlockVersion } from '../../model/BlockVersion';
3
- import { VersionStyleMap } from '../../model/BlockVersion';
3
+ import { VersionAdditionalStyleMap, VersionStyleMap } from '../../model/BlockVersion';
4
4
  import type { UniBlockProps } from '../../model/JSXBlock';
5
5
  import type { Picture } from '../../model/Picture';
6
6
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
@@ -41,9 +41,7 @@ export const ProductTile = JSX<ProductTileProps>(
41
41
  {...rest}
42
42
  />
43
43
  {renderBenefits(benefits, version, image)}
44
- {additionalDescription
45
- ? renderAdditionalDescription(additionalDescription, image, version)
46
- : null}
44
+ {additionalDescription ? renderAdditionalDescription(additionalDescription, image) : null}
47
45
  {buttons?.length ? (
48
46
  <ButtonSection buttons={buttons} className="flex self-end mt-5 gap-4 z-10 text-l" />
49
47
  ) : null}
@@ -66,42 +64,26 @@ function renderBenefits(benefits: TextBenefit[], version: BlockVersion, image?:
66
64
  );
67
65
  }
68
66
 
69
- function renderBenefit(version: BlockVersion = 'primary') {
70
- const labelStyleMap: Record<BlockVersion, string> = {
71
- primary: 'text-secondary-text',
72
- secondary: 'text-white',
73
- };
74
-
75
- return function renderVersionedBenefit(benefit: TextBenefit, i: number) {
67
+ const renderBenefit =
68
+ (version: BlockVersion = 'primary') =>
69
+ (benefit: TextBenefit, i: number) => {
76
70
  const { label = '', description = '' } = benefit;
77
71
 
78
72
  return [
79
73
  <div key={`label-${i}`} className="text-h6">
80
74
  {label}
81
75
  </div>,
82
- <div key={`desc-${i}`} className={`text-m-light ${labelStyleMap[version]}`}>
76
+ <div key={`desc-${i}`} className={`text-m-light ${VersionAdditionalStyleMap[version]}`}>
83
77
  {description}
84
78
  </div>,
85
79
  ];
86
80
  };
87
- }
88
-
89
- function renderAdditionalDescription(
90
- additionalDescription: string,
91
- image?: Picture,
92
- version: BlockVersion = 'primary',
93
- ) {
94
- const descStyleMap: Record<BlockVersion, string> = {
95
- primary: 'text-secondary-text',
96
- secondary: 'text-white',
97
- };
98
81
 
82
+ function renderAdditionalDescription(additionalDescription: string, image?: Picture) {
99
83
  // picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
100
84
  const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
101
85
 
102
86
  return (
103
- <div className={`text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH} ${descStyleMap[version]}`}>
104
- {additionalDescription}
105
- </div>
87
+ <div className={`text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}`}>{additionalDescription}</div>
106
88
  );
107
89
  }
@@ -1,8 +1,11 @@
1
1
  {
2
- "title": "Вертикальный компоновщик",
3
- "version": "transparent",
4
- "align": "left",
5
- "gap": "",
2
+ "content": {
3
+ "version": "transparent",
4
+ "isPadding": false,
5
+ "isInnerPadding": true,
6
+ "align": "left",
7
+ "gap": ""
8
+ },
6
9
  "blocks": [
7
10
  {
8
11
  "type": "Headline",
@@ -19,6 +19,25 @@ const options = {
19
19
  blocksRegistry: Blocks,
20
20
  } as BlockRendererOptions;
21
21
 
22
+ const carouselProductCard = {
23
+ content: {
24
+ headlineSmallVersion: 'L_R',
25
+ align: 'left',
26
+ isDotted: true,
27
+ title: 'Новость 1',
28
+ version: 'primary',
29
+ additionalDescription: '12 сентября 2022',
30
+ icon: {
31
+ size: {
32
+ width: 150,
33
+ height: 150,
34
+ },
35
+ },
36
+ },
37
+ style: ['col-span-12'],
38
+ type: 'CarouselProductCard',
39
+ };
40
+
22
41
  export default {
23
42
  default: (
24
43
  <div className="container grid grid-cols-12">
@@ -35,12 +54,12 @@ export default {
35
54
  />
36
55
  </div>
37
56
  ),
38
- 'transparent center': (
57
+ 'white center': (
39
58
  <div className="container grid grid-cols-12">
40
59
  <VerticalLayout
41
60
  className="col-span-12"
42
61
  align="center"
43
- version="transparent"
62
+ version="primary"
44
63
  block={{
45
64
  type: 'VerticalLayout',
46
65
  blocks: [
@@ -162,4 +181,42 @@ export default {
162
181
  />
163
182
  </div>
164
183
  ),
184
+ carousel: (
185
+ <div className="container grid grid-cols-12">
186
+ <VerticalLayout
187
+ align="center"
188
+ className="col-span-12"
189
+ version="primary"
190
+ gap="XL"
191
+ isPadding={true}
192
+ isInnerPadding={false}
193
+ block={{
194
+ type: 'VerticalLayout',
195
+ blocks: [
196
+ {
197
+ content: {
198
+ title: 'Заголовок',
199
+ align: 'center',
200
+ bgColorHeadline: 'transparent',
201
+ headlineVersion: 'M',
202
+ },
203
+ style: ['col-span-12'],
204
+ type: 'Headline',
205
+ },
206
+ {
207
+ content: {
208
+ isBlur: true,
209
+ visibleItemCount: 3,
210
+ isCycle: false,
211
+ },
212
+ style: ['col-span-12'],
213
+ type: 'Carousel',
214
+ blocks: new Array(6).fill(carouselProductCard),
215
+ },
216
+ ],
217
+ }}
218
+ options={options}
219
+ />
220
+ </div>
221
+ ),
165
222
  };
@@ -15,10 +15,10 @@ const alignStyle: Record<AlignType, string> = {
15
15
  };
16
16
 
17
17
  const gapStyleMap: Record<GapVersion, string> = {
18
- XXL: 'gap-10',
19
- XL: 'gap-8',
20
- L: 'gap-4',
21
- M: 'gap-3',
18
+ XXL: 'gap-12',
19
+ XL: 'gap-10',
20
+ L: 'gap-8',
21
+ M: 'gap-4',
22
22
  S: 'gap-2',
23
23
  XS: 'gap-1',
24
24
  '': '',
@@ -31,22 +31,37 @@ const backgroundStyleMap: Record<BlockVersionWithTransparent, string> = {
31
31
  };
32
32
 
33
33
  export const VerticalLayout: JSXBlock<VerticalLayoutProps> = JSX<VerticalLayoutProps>(
34
- ({ className = '', gap = '', align, version = 'transparent', ...rest }) => (
35
- <BlockWrapper
36
- className={[
37
- 'flex flex-col',
38
- gapStyleMap[gap],
39
- align && alignStyle[align],
40
- backgroundStyleMap[version],
41
- className,
42
- ]
43
- .filter(Boolean)
44
- .join(' ')}
45
- {...rest}
46
- >
47
- {renderChildren(rest)}
48
- </BlockWrapper>
49
- ),
34
+ ({
35
+ className = '',
36
+ gap = '',
37
+ align,
38
+ isPadding = false,
39
+ isInnerPadding = true,
40
+ version = 'transparent',
41
+ options,
42
+ ...rest
43
+ }) => {
44
+ const paddingStyle = isPadding ? 'p-12' : '';
45
+ const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
46
+
47
+ return (
48
+ <BlockWrapper
49
+ className={[
50
+ 'flex flex-col [&>*]:max-w-full',
51
+ paddingStyle,
52
+ gapStyleMap[gap],
53
+ align && alignStyle[align],
54
+ backgroundStyleMap[version],
55
+ className,
56
+ ]
57
+ .filter(Boolean)
58
+ .join(' ')}
59
+ {...rest}
60
+ >
61
+ {renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } })}
62
+ </BlockWrapper>
63
+ );
64
+ },
50
65
  );
51
66
 
52
67
  VerticalLayout.childrenTypes = {
@@ -16,4 +16,8 @@ export interface VerticalLayoutContent {
16
16
  version?: BlockVersionWithTransparent;
17
17
  align?: AlignType;
18
18
  gap?: GapVersion;
19
+ /** @title Внутренний отступ компоновщика */
20
+ isPadding?: boolean;
21
+ /** @title Отступы вложенных компонентов */
22
+ isInnerPadding?: boolean;
19
23
  }
@@ -15,6 +15,11 @@ export const VersionStyleMap: Record<BlockVersion, string> = {
15
15
  secondary: 'bg-primary-main text-white',
16
16
  };
17
17
 
18
+ export const VersionAdditionalStyleMap: Record<BlockVersion, string> = {
19
+ primary: 'text-secondary-text',
20
+ secondary: 'text-white',
21
+ };
22
+
18
23
  export const VersionWithTransparentStyleMap: Record<BlockVersionWithTransparent, string> = {
19
24
  transparent: '',
20
25
  primary: 'bg-white text-primary-text',
@@ -22,23 +22,23 @@ export const ButtonSection = JSX<ButtonSectionProps>(({ className = '', buttons
22
22
  );
23
23
 
24
24
  export function renderButton({ button, buttonClassName, index }: RenderButtonProps) {
25
- const { icon, iconRight, version, ...rest } = button;
25
+ const { icon, iconRight, version, text, ...rest } = button;
26
26
 
27
27
  const iconVersion = version === 'secondary' ? 'color' : 'white';
28
-
29
28
  const leftIcon = renderButtonIcon({ ...icon, iconVersion: iconVersion } as Picture);
30
29
  const rightIcon = renderButtonIcon({ ...iconRight, iconVersion: iconVersion } as Picture);
31
30
 
32
- return (
31
+ return text ? (
33
32
  <Button
34
33
  key={index ? String(index) : ''}
35
34
  className={buttonClassName}
36
35
  appendLeft={leftIcon}
37
36
  appendRight={rightIcon}
38
37
  version={version}
38
+ text={text}
39
39
  {...rest}
40
40
  />
41
- );
41
+ ) : null;
42
42
  }
43
43
 
44
44
  const renderButtonIcon = (icon: Picture) => {
@@ -16,13 +16,13 @@ interface SwipeListContainerProps extends SwipeContainerProps {
16
16
  className?: string;
17
17
  containerRef?: { current: HTMLDivElement | null };
18
18
  activeIndex?: number;
19
- visibleItemCount?: SwipeListItemWidthAuto | 1 | 2 | 3;
19
+ visibleItemCount?: SwipeListItemWidthAuto | 1 | 2 | 3 | 4;
20
20
  snapAlign?: 'snap-start' | 'snap-center' | 'snap-end';
21
21
  onVisibleItemsChange?: (itemsVisibilityList: ItemsVisibilityList) => void;
22
22
  onVisibleIndicesChange?: (indices: number[]) => void;
23
23
  }
24
24
 
25
- const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]'];
25
+ const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
26
26
 
27
27
  export const SwipeListContainer = JSX<SwipeListContainerProps>(
28
28
  ({
@@ -1,4 +1,3 @@
1
- import { projectSettings } from '../ProjectSettings';
2
1
  import { getOrigin } from './url';
3
2
 
4
3
  export const adjustHref = (
@@ -9,9 +8,8 @@ export const adjustHref = (
9
8
  return href;
10
9
  }
11
10
 
12
- const hrefWithBasePath = `${projectSettings.BASE_PATH || ''}${href}`;
13
11
  const origin = getOrigin(router?.href);
14
12
 
15
13
  // Relative URL
16
- return origin ? hrefWithBasePath.replace(origin, '') || '/' : hrefWithBasePath;
14
+ return origin ? href.replace(origin, '') || '/' : href;
17
15
  };