@redneckz/wildless-cms-uni-blocks 0.6.29 → 0.6.30

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 (160) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +86 -67
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Carousel/Carousel.d.ts +1 -1
  5. package/bundle/components/Carousel/CarouselNavButtons.d.ts +11 -0
  6. package/bundle/components/CarouselCard/CarouselCard.d.ts +1 -1
  7. package/bundle/components/CarouselCard/CarouselCardContent.d.ts +5 -2
  8. package/bundle/components/CarouselCard/constants.d.ts +3 -0
  9. package/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +5 -0
  10. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +15 -0
  11. package/bundle/icons/IconName.d.ts +4 -2
  12. package/bundle/ui-kit/Foldable/Foldable.d.ts +1 -1
  13. package/cosmos-static/icons/HeartIcon.svg +1 -0
  14. package/dist/components/Blocks.js +7 -5
  15. package/dist/components/Blocks.js.map +1 -1
  16. package/dist/components/Carousel/Carousel.d.ts +1 -1
  17. package/dist/components/Carousel/Carousel.js +4 -4
  18. package/dist/components/Carousel/Carousel.js.map +1 -1
  19. package/dist/components/Carousel/CarouselNavButtons.d.ts +11 -0
  20. package/dist/components/Carousel/CarouselNavButtons.js +36 -0
  21. package/dist/components/Carousel/CarouselNavButtons.js.map +1 -0
  22. package/dist/components/CarouselCard/CarouselCard.d.ts +1 -1
  23. package/dist/components/CarouselCard/CarouselCard.js +2 -2
  24. package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  25. package/dist/components/CarouselCard/CarouselCardContent.d.ts +5 -2
  26. package/dist/components/CarouselCard/constants.d.ts +3 -0
  27. package/dist/components/CarouselCard/constants.js +11 -0
  28. package/dist/components/CarouselCard/constants.js.map +1 -0
  29. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +5 -0
  30. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +29 -0
  31. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -0
  32. package/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +15 -0
  33. package/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.js +2 -0
  34. package/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.js.map +1 -0
  35. package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  36. package/dist/icons/IconName.d.ts +4 -2
  37. package/dist/icons/IconName.js +3 -1
  38. package/dist/icons/IconName.js.map +1 -1
  39. package/dist/ui-kit/Button/ButtonInner.js +1 -1
  40. package/dist/ui-kit/Foldable/Foldable.d.ts +1 -1
  41. package/lib/common.css +1 -1
  42. package/lib/components/Blocks.js +7 -5
  43. package/lib/components/Blocks.js.map +1 -1
  44. package/lib/components/Carousel/Carousel.d.ts +1 -1
  45. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  46. package/lib/components/Carousel/Carousel.js +4 -4
  47. package/lib/components/Carousel/Carousel.js.map +1 -1
  48. package/lib/components/Carousel/CarouselNavButtons.d.ts +11 -0
  49. package/lib/components/Carousel/CarouselNavButtons.js +34 -0
  50. package/lib/components/Carousel/CarouselNavButtons.js.map +1 -0
  51. package/lib/components/CarouselCard/CarouselCard.d.ts +1 -1
  52. package/lib/components/CarouselCard/CarouselCard.js +2 -2
  53. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  54. package/lib/components/CarouselCard/CarouselCardContent.d.ts +5 -2
  55. package/lib/components/CarouselCard/constants.d.ts +3 -0
  56. package/lib/components/CarouselCard/constants.js +9 -0
  57. package/lib/components/CarouselCard/constants.js.map +1 -0
  58. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +5 -0
  59. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.d.ts +9 -0
  60. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +27 -0
  61. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -0
  62. package/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +15 -0
  63. package/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.js +2 -0
  64. package/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.js.map +1 -0
  65. package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  66. package/lib/icons/IconName.d.ts +4 -2
  67. package/lib/icons/IconName.js +3 -1
  68. package/lib/icons/IconName.js.map +1 -1
  69. package/lib/ui-kit/Button/ButtonInner.js +1 -1
  70. package/lib/ui-kit/Foldable/Foldable.d.ts +1 -1
  71. package/mobile/bundle/bundle.umd.js +2 -2
  72. package/mobile/bundle/bundle.umd.min.js +1 -1
  73. package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -1
  74. package/mobile/bundle/components/Carousel/CarouselNavButtons.d.ts +11 -0
  75. package/mobile/bundle/components/CarouselCard/CarouselCard.d.ts +1 -1
  76. package/mobile/bundle/components/CarouselCard/CarouselCardContent.d.ts +5 -2
  77. package/mobile/bundle/components/CarouselCard/constants.d.ts +3 -0
  78. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +5 -0
  79. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +15 -0
  80. package/mobile/bundle/icons/IconName.d.ts +4 -2
  81. package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +1 -1
  82. package/mobile/dist/components/Carousel/Carousel.d.ts +1 -1
  83. package/mobile/dist/components/Carousel/Carousel.js +4 -4
  84. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  85. package/mobile/dist/components/Carousel/CarouselNavButtons.d.ts +11 -0
  86. package/mobile/dist/components/Carousel/CarouselNavButtons.js +36 -0
  87. package/mobile/dist/components/Carousel/CarouselNavButtons.js.map +1 -0
  88. package/mobile/dist/components/CarouselCard/CarouselCard.d.ts +1 -1
  89. package/mobile/dist/components/CarouselCard/CarouselCard.js +2 -2
  90. package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  91. package/mobile/dist/components/CarouselCard/CarouselCardContent.d.ts +5 -2
  92. package/mobile/dist/components/CarouselCard/constants.d.ts +3 -0
  93. package/mobile/dist/components/CarouselCard/constants.js +11 -0
  94. package/mobile/dist/components/CarouselCard/constants.js.map +1 -0
  95. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +5 -0
  96. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +29 -0
  97. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -0
  98. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +15 -0
  99. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.js +2 -0
  100. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.js.map +1 -0
  101. package/mobile/dist/icons/IconName.d.ts +4 -2
  102. package/mobile/dist/icons/IconName.js +3 -1
  103. package/mobile/dist/icons/IconName.js.map +1 -1
  104. package/mobile/dist/ui-kit/Button/ButtonInner.js +1 -1
  105. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +1 -1
  106. package/mobile/lib/components/Carousel/Carousel.d.ts +1 -1
  107. package/mobile/lib/components/Carousel/Carousel.js +4 -4
  108. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  109. package/mobile/lib/components/Carousel/CarouselNavButtons.d.ts +11 -0
  110. package/mobile/lib/components/Carousel/CarouselNavButtons.js +34 -0
  111. package/mobile/lib/components/Carousel/CarouselNavButtons.js.map +1 -0
  112. package/mobile/lib/components/CarouselCard/CarouselCard.d.ts +1 -1
  113. package/mobile/lib/components/CarouselCard/CarouselCard.js +2 -2
  114. package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  115. package/mobile/lib/components/CarouselCard/CarouselCardContent.d.ts +5 -2
  116. package/mobile/lib/components/CarouselCard/constants.d.ts +3 -0
  117. package/mobile/lib/components/CarouselCard/constants.js +9 -0
  118. package/mobile/lib/components/CarouselCard/constants.js.map +1 -0
  119. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +5 -0
  120. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +27 -0
  121. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -0
  122. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +15 -0
  123. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.js +2 -0
  124. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.js.map +1 -0
  125. package/mobile/lib/icons/IconName.d.ts +4 -2
  126. package/mobile/lib/icons/IconName.js +3 -1
  127. package/mobile/lib/icons/IconName.js.map +1 -1
  128. package/mobile/lib/ui-kit/Button/ButtonInner.js +1 -1
  129. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +1 -1
  130. package/mobile/src/components/Carousel/Carousel.tsx +5 -5
  131. package/mobile/src/components/Carousel/CarouselNavButtons.tsx +51 -0
  132. package/mobile/src/components/CarouselCard/CarouselCard.tsx +4 -4
  133. package/mobile/src/components/CarouselCard/CarouselCardContent.ts +5 -2
  134. package/mobile/src/components/CarouselCard/constants.ts +11 -0
  135. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.example.json +24 -0
  136. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +93 -0
  137. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.ui.json +1 -0
  138. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +16 -0
  139. package/mobile/src/icons/HeartIcon.svg +3 -0
  140. package/mobile/src/icons/IconName.ts +5 -5
  141. package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -1
  142. package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
  143. package/package.json +1 -1
  144. package/src/components/Blocks.ts +7 -5
  145. package/src/components/Carousel/Carousel.fixture.tsx +29 -1
  146. package/src/components/Carousel/Carousel.tsx +5 -5
  147. package/src/components/Carousel/CarouselNavButtons.tsx +51 -0
  148. package/src/components/CarouselCard/CarouselCard.tsx +4 -4
  149. package/src/components/CarouselCard/CarouselCardContent.ts +5 -2
  150. package/src/components/CarouselCard/constants.ts +11 -0
  151. package/src/components/CarouselTariffsCard/CarouselTariffsCard.example.json +24 -0
  152. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +64 -0
  153. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +93 -0
  154. package/src/components/CarouselTariffsCard/CarouselTariffsCard.ui.json +1 -0
  155. package/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +16 -0
  156. package/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
  157. package/src/icons/HeartIcon.svg +3 -0
  158. package/src/icons/IconName.ts +327 -6
  159. package/src/ui-kit/Button/ButtonInner.tsx +1 -1
  160. package/src/ui-kit/Foldable/Foldable.tsx +1 -1
@@ -606,7 +606,7 @@
606
606
  if (version === 'link') {
607
607
  return '';
608
608
  }
609
- const withTextStyle = `gap-2 ${aboveText ? 'py-2.5 px-7' : 'py-4 px-9'}`;
609
+ const withTextStyle = `gap-2 ${aboveText ? 'py-2.5 px-7' : 'py-4 px-4'}`;
610
610
  return [
611
611
  'group flex items-center justify-center',
612
612
  isWithText(props) ? withTextStyle : 'h-12 w-12',
@@ -1242,6 +1242,85 @@
1242
1242
  return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
1243
1243
  });
1244
1244
 
1245
+ const useCarouselControl = ({ itemsCount, visibleItemCount = itemsCount, isCyclic, }) => {
1246
+ const [activeIndex, setActiveIndex] = useState(0);
1247
+ const inc = useCallback(() => setActiveIndex((_) => (isCyclic ? (_ + 1) % itemsCount : Math.min(_ + 1, itemsCount - 1))), []);
1248
+ const dec = useCallback(() => setActiveIndex((_) => (isCyclic ? (itemsCount + _ - 1) % itemsCount : Math.max(_ - 1, 0))), []);
1249
+ const isScrollAvailable = itemsCount > visibleItemCount;
1250
+ const isCyclicAndScrollAvailable = isCyclic && isScrollAvailable;
1251
+ const canInc = isCyclicAndScrollAvailable ||
1252
+ (isScrollAvailable && itemsCount - activeIndex > visibleItemCount);
1253
+ const canDec = isCyclicAndScrollAvailable || Boolean(isScrollAvailable && activeIndex > 0);
1254
+ return [
1255
+ activeIndex,
1256
+ {
1257
+ inc,
1258
+ dec,
1259
+ canInc,
1260
+ canDec,
1261
+ },
1262
+ ];
1263
+ };
1264
+
1265
+ const CarouselContainer = JSX(({ children, activeItem, cardFullViewCount, cardWidth }) => {
1266
+ const cardFullViewStyles = cardFullViewCount === 1
1267
+ ? `translateX(-${activeItem}00%)`
1268
+ : `translateX(-${activeItem * cardWidth}px)`;
1269
+ return (jsx("div", { className: "w-auto flex flex-1 duration-1000", style: { transform: `${cardFullViewStyles}` }, role: "list", children: children }));
1270
+ });
1271
+
1272
+ const Carousel = JSX(({ cardFullViewCount = 1, children, cardWidth = 1007, className = '', isBlur = true, isCyclic = false, block, ...rest }) => {
1273
+ const blurClasses = isBlur ? 'absolute top-0 bottom-0 w-[84px]' : '';
1274
+ const { blocks: childBlocks } = block || {};
1275
+ const childBlocksLength = childBlocks !== undefined ? childBlocks.length : 0;
1276
+ const isScrollAvailable = childBlocksLength > cardFullViewCount;
1277
+ const [activeIndex, controls] = useCarouselControl({
1278
+ itemsCount: childBlocksLength,
1279
+ visibleItemCount: cardFullViewCount,
1280
+ isCyclic,
1281
+ });
1282
+ const { inc, dec, canDec, canInc } = controls;
1283
+ return (jsxs(BlockWrapper, { className: `box-border h-full relative font-sans flex flex-col justify-center overflow-hidden ${className}`, ...rest, children: [jsx(CarouselContainer, { activeItem: activeIndex, cardFullViewCount: cardFullViewCount, cardWidth: cardWidth, children: children }), isScrollAvailable ? (jsx("div", { children: renderArrows({
1284
+ handler: [dec, inc],
1285
+ isShown: [canDec, canInc],
1286
+ btnClass: ['left-8', 'right-8'],
1287
+ className: 'top-1/2 z-10',
1288
+ }) })) : null, isScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: `${blurClasses} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurClasses} right-0 bg-opacity-to-white` })] })) : null] }));
1289
+ });
1290
+ Carousel.childrenTypes = ['CarouselCard', 'CarouselTariffsCard'];
1291
+
1292
+ const BLOCK_CLASSES = 'absolute border border-solid border-main-stroke w-[100%] h-[100%]';
1293
+ const CARD_STYLE_MAP = {
1294
+ normal: 'min-w-[100%] justify-center items-center my-7 col-span-12',
1295
+ mini: 'justify-center items-center mx-4 my-9 col-span-4',
1296
+ };
1297
+ const CARD_WIDTH_MAP = {
1298
+ normal: 'w-[1007px]',
1299
+ mini: 'w-[350px]',
1300
+ };
1301
+ const CarouselCard = JSX(({ button, className = '', description, title, version = 'normal' }) => {
1302
+ return (jsx("section", { className: `flex ${CARD_STYLE_MAP[version]}`, children: jsxs("div", { className: `relative ${CARD_WIDTH_MAP[version]}`, children: [jsxs("div", { className: `relative bg-white py-6 px-10 z-10
1303
+ border border-solid border-green-light ${className}`, children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), button ? renderButton({ button, buttonClassName: 'mt-6 w-[158px]' }) : null] }), jsx("div", { className: `top-9 right-12 bg-green-dark ${BLOCK_CLASSES}` }), jsx("div", { className: `top-6 right-8 bg-green ${BLOCK_CLASSES}` }), jsx("div", { className: `top-3 right-4 bg-green-light ${BLOCK_CLASSES}` })] }) }));
1304
+ });
1305
+
1306
+ const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, rows = [], ...rest }) => {
1307
+ const hitStyle = getHitStyle(Boolean(isHighlighting));
1308
+ const rowsNode = rows.map(renderCardInfo);
1309
+ const VISIBLE_ROWS_COUNT = 1;
1310
+ const [visibleRows, hiddenRows] = [
1311
+ rowsNode.slice(0, VISIBLE_ROWS_COUNT),
1312
+ rowsNode.slice(VISIBLE_ROWS_COUNT),
1313
+ ];
1314
+ return (jsxs(BlockWrapper, { className: `font-sans bg-white p-[50px] p-8 border border-main-stroke relative w-[322px] min-w-[322px] -ml-[1px] ${hitStyle} ${className}`, ...rest, children: [isHighlighting ? renderHitIcon() : null, icon?.src ? jsx(ImgInner, { className: "flex justify-center", image: icon }) : null, title ? (jsx(Heading, { className: "text-primary-text text-center pt-2", headingType: "h5", title: title })) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, rows?.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: rows.length > 1 ? renderFoldButton$1 : null })) : null] }));
1315
+ });
1316
+ const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-9 pt-[71px]' : 'mt-[70px] pt-9';
1317
+ const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16", asSVG: true })] }));
1318
+ const renderCardInfo = (cell) => (jsxs("div", { className: "py-5 border-b border-main-divider flex flex-col gap-1", children: [cell?.title ? (jsx("div", { className: "text-secondary-text text-m-light opacity-80", children: cell.title })) : null, cell?.description ? jsx("div", { className: "text-primary-text text-h6", children: cell.description }) : null] }));
1319
+ const renderHitIcon = () => {
1320
+ const POSITION_STYLE = 'absolute -top-7 -right-4';
1321
+ return (jsxs("div", { className: `h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)] ${POSITION_STYLE}`, children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "23", height: "22", asSVG: true }), jsx("div", { className: "text-center", children: "\u0425\u0438\u0442" })] }));
1322
+ };
1323
+
1245
1324
  const cardStyleMap$1 = {
1246
1325
  black: 'bg-black',
1247
1326
  white: 'bg-white',
@@ -1267,26 +1346,6 @@
1267
1346
  }), jsx("div", { className: `${BLUR_BLOCK_CLASSES$2} left-0 bg-opacity-from-white` }), jsx("div", { className: `${BLUR_BLOCK_CLASSES$2} right-0 bg-opacity-to-white` })] }));
1268
1347
  });
1269
1348
 
1270
- const useCarouselControl = ({ itemsCount, visibleItemCount = itemsCount, isCyclic, }) => {
1271
- const [activeIndex, setActiveIndex] = useState(0);
1272
- const inc = useCallback(() => setActiveIndex((_) => (isCyclic ? (_ + 1) % itemsCount : Math.min(_ + 1, itemsCount - 1))), []);
1273
- const dec = useCallback(() => setActiveIndex((_) => (isCyclic ? (itemsCount + _ - 1) % itemsCount : Math.max(_ - 1, 0))), []);
1274
- const isScrollAvailable = itemsCount > visibleItemCount;
1275
- const isCyclicAndScrollAvailable = isCyclic && isScrollAvailable;
1276
- const canInc = isCyclicAndScrollAvailable ||
1277
- (isScrollAvailable && itemsCount - activeIndex > visibleItemCount);
1278
- const canDec = isCyclicAndScrollAvailable || Boolean(isScrollAvailable && activeIndex > 0);
1279
- return [
1280
- activeIndex,
1281
- {
1282
- inc,
1283
- dec,
1284
- canInc,
1285
- canDec,
1286
- },
1287
- ];
1288
- };
1289
-
1290
1349
  const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
1291
1350
  const BORDER_CLASSES$1 = 'border-main-stroke border-solid border';
1292
1351
  const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
@@ -2249,7 +2308,7 @@
2249
2308
  return (jsxs(BlockWrapper, { className: `flex justify-between font-sans p-9 box-border relative min-h-[320px]
2250
2309
  ${getTileMinHeight(className)}
2251
2310
  ${VersionStyleMap[version]}
2252
- ${className}`, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[509px] mb-6
2311
+ ${className}`, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-6 w-full
2253
2312
  ${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4", ...rest })) : null, children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 items-center", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(version, items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
2254
2313
  });
2255
2314
  const renderList$1 = (version, items) => {
@@ -3483,47 +3542,6 @@
3483
3542
  exclude: ['VerticalLayout'],
3484
3543
  };
3485
3544
 
3486
- const BLOCK_CLASSES = 'absolute border border-solid border-main-stroke w-[100%] h-[100%]';
3487
- const CARD_STYLE_MAP = {
3488
- normal: 'min-w-[100%] justify-center items-center my-7 col-span-12',
3489
- mini: 'w-1/3 justify-center items-center mx-4 my-9 col-span-4',
3490
- };
3491
- const CARD_WIDTH_MAP = {
3492
- normal: 'w-[1007px]',
3493
- mini: 'w-[350px]',
3494
- };
3495
- const CarouselCard = JSX(({ button, className = '', description, title, version = 'normal' }) => {
3496
- return (jsx("section", { className: `flex ${CARD_STYLE_MAP[version]}`, children: jsxs("div", { className: `relative ${CARD_WIDTH_MAP[version]}`, children: [jsxs("div", { className: `relative bg-white py-6 px-10 z-10
3497
- border border-solid border-green-light ${className}`, children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), button ? renderButton({ button, buttonClassName: 'mt-6 w-[158px]' }) : null] }), jsx("div", { className: `top-9 right-12 bg-green-dark ${BLOCK_CLASSES}` }), jsx("div", { className: `top-6 right-8 bg-green ${BLOCK_CLASSES}` }), jsx("div", { className: `top-3 right-4 bg-green-light ${BLOCK_CLASSES}` })] }) }));
3498
- });
3499
-
3500
- const CarouselContainer = JSX(({ children, activeItem, cardFullViewCount, cardWidth }) => {
3501
- const cardFullViewStyles = cardFullViewCount === 1
3502
- ? `translateX(-${activeItem}00%)`
3503
- : `translateX(-${activeItem * cardWidth}px)`;
3504
- return (jsx("div", { className: "w-auto flex flex-1 duration-1000", style: { transform: `${cardFullViewStyles}` }, role: "list", children: children }));
3505
- });
3506
-
3507
- const Carousel = JSX(({ cardFullViewCount = 1, children, cardWidth = 1007, className = '', isBlur = true, isCyclic = false, block, ...rest }) => {
3508
- const blurClasses = isBlur ? 'absolute top-0 bottom-0 w-[84px]' : '';
3509
- const { blocks: childBlocks } = block || {};
3510
- const childBlocksLength = childBlocks !== undefined ? childBlocks.length : 0;
3511
- const isScrollAvailable = childBlocksLength > cardFullViewCount;
3512
- const [activeIndex, controls] = useCarouselControl({
3513
- itemsCount: childBlocksLength,
3514
- visibleItemCount: cardFullViewCount,
3515
- isCyclic,
3516
- });
3517
- const { inc, dec, canDec, canInc } = controls;
3518
- return (jsxs(BlockWrapper, { className: `box-border h-full relative font-sans flex flex-col justify-center overflow-hidden ${className}`, ...rest, children: [jsx(CarouselContainer, { activeItem: activeIndex, cardFullViewCount: cardFullViewCount, cardWidth: cardWidth, children: children }), isScrollAvailable ? (jsx("div", { children: renderArrows({
3519
- handler: [dec, inc],
3520
- isShown: [canDec, canInc],
3521
- btnClass: ['left-8', 'right-8'],
3522
- className: 'top-1/2 z-10',
3523
- }) })) : null, isScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: `${blurClasses} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurClasses} right-0 bg-opacity-to-white` })] })) : null] }));
3524
- });
3525
- Carousel.childrenTypes = ['CarouselCard'];
3526
-
3527
3545
  const Blocks = {
3528
3546
  Accordion,
3529
3547
  AccordionItem,
@@ -3532,10 +3550,13 @@
3532
3550
  Bonus,
3533
3551
  BonusBenefitsBlock,
3534
3552
  CardTransfer,
3535
- ComparisonTable,
3536
3553
  Calculator,
3554
+ Carousel,
3555
+ CarouselCard,
3556
+ CarouselTariffsCard,
3537
3557
  Catalog,
3538
3558
  ContactsBlock,
3559
+ ComparisonTable,
3539
3560
  ErrorBlock,
3540
3561
  ExchangeRateTile,
3541
3562
  Footer,
@@ -3568,8 +3589,6 @@
3568
3589
  TextBlock,
3569
3590
  Tile,
3570
3591
  VerticalLayout,
3571
- CarouselCard,
3572
- Carousel,
3573
3592
  };
3574
3593
 
3575
3594
  function style2className(style) {
@@ -3677,7 +3696,7 @@
3677
3696
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
3678
3697
  }
3679
3698
 
3680
- const packageVersion = "0.6.29";
3699
+ const packageVersion = "0.6.30";
3681
3700
 
3682
3701
  exports.Blocks = Blocks;
3683
3702
  exports.ContentPage = ContentPage;