@redneckz/wildless-cms-uni-blocks 0.14.69 → 0.14.71

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 (80) hide show
  1. package/bin/migration-scripts/0.14.62.js +3 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +11 -12
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  6. package/bundle/ui-kit/List/ListContent.d.ts +2 -0
  7. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  8. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  9. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  10. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  11. package/dist/components/StepsBlock/StepsBlock.js +2 -2
  12. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  13. package/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  14. package/dist/ui-kit/BaseTile/BaseTile.js +3 -2
  15. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  16. package/dist/ui-kit/List/List.js +2 -2
  17. package/dist/ui-kit/List/List.js.map +1 -1
  18. package/dist/ui-kit/List/ListContent.d.ts +2 -0
  19. package/dist/ui-kit/List/ListItem.js +1 -1
  20. package/dist/ui-kit/List/ListItem.js.map +1 -1
  21. package/lib/common.css +1 -1
  22. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  23. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  24. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  25. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  26. package/lib/components/StepsBlock/StepsBlock.js +2 -2
  27. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  28. package/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  29. package/lib/ui-kit/BaseTile/BaseTile.js +3 -2
  30. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  31. package/lib/ui-kit/List/List.js +2 -2
  32. package/lib/ui-kit/List/List.js.map +1 -1
  33. package/lib/ui-kit/List/ListContent.d.ts +2 -0
  34. package/lib/ui-kit/List/ListItem.js +1 -1
  35. package/lib/ui-kit/List/ListItem.js.map +1 -1
  36. package/mobile/bundle/bundle.umd.js +9 -10
  37. package/mobile/bundle/bundle.umd.min.js +1 -1
  38. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  39. package/mobile/bundle/ui-kit/List/ListContent.d.ts +2 -0
  40. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  41. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  42. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  43. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  44. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  45. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +3 -2
  46. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  47. package/mobile/dist/ui-kit/List/List.js +2 -2
  48. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  49. package/mobile/dist/ui-kit/List/ListContent.d.ts +2 -0
  50. package/mobile/dist/ui-kit/List/ListItem.js +1 -1
  51. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  52. package/mobile/lib/common.css +1 -1
  53. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  54. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  55. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
  56. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  57. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
  58. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +3 -2
  59. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  60. package/mobile/lib/ui-kit/List/List.js +2 -2
  61. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  62. package/mobile/lib/ui-kit/List/ListContent.d.ts +2 -0
  63. package/mobile/lib/ui-kit/List/ListItem.js +1 -1
  64. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  65. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  66. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
  67. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -6
  68. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +3 -1
  69. package/mobile/src/ui-kit/List/List.tsx +6 -2
  70. package/mobile/src/ui-kit/List/ListContent.ts +2 -0
  71. package/mobile/src/ui-kit/List/ListItem.tsx +1 -1
  72. package/package.json +1 -1
  73. package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
  74. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
  75. package/src/components/StepsBlock/StepsBlock.tsx +1 -2
  76. package/src/components/StepsBlock/StepsBlockContent.ts +3 -6
  77. package/src/ui-kit/BaseTile/BaseTile.tsx +3 -1
  78. package/src/ui-kit/List/List.tsx +6 -2
  79. package/src/ui-kit/List/ListContent.ts +2 -0
  80. package/src/ui-kit/List/ListItem.tsx +1 -1
@@ -661,7 +661,8 @@
661
661
  ev?.preventDefault();
662
662
  router.back();
663
663
  }, []);
664
- return (jsxs("div", { className: getStyle(padding, defaultPadding, className), children: [backwardButton ? renderBackwardButton(version, handleClick) : null, title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col @xl:flex-row gap-3xl w-full', leftImage ? 'self-start @xl:w-auto' : ''), children: [renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] }), renderImageContainer(rightImage, {
664
+ return (jsxs("div", { className: getStyle(padding, defaultPadding, className), children: [backwardButton ? renderBackwardButton(version, handleClick) : null, title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col @xl:flex-row gap-3xl w-full', leftImage ? 'self-start @xl:w-auto' : ''), children: [renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow', 'h-full', //? fix issue https://github.com/redneckz/temp_wcms/issues/1254
665
+ 'auto-rows-[max-content_1fr]'), children: [jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] }), renderImageContainer(rightImage, {
665
666
  className: style('@xl:justify-self-end @xl:col-start-2', buttons ? rowSpanStyle(isImageAlwaysOnRight) : '', positionStyle(isImageAlwaysOnRight), imageSecondaryStyle(isImageSecondary)),
666
667
  imageAlign,
667
668
  }), renderButtons(buttons)] })] })] }));
@@ -670,7 +671,7 @@
670
671
  const rowSpanStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'row-span-2' : '@xl:row-span-2';
671
672
  const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'col-start-2 self-center' : '';
672
673
  const renderButtons = (buttons) => buttons ? jsx("div", { className: "self-end", children: buttons }) : null;
673
- const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('shrink-1/2 justify-self-center', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
674
+ const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('shrink-1/2 justify-self-center mt-auto @xl:mt-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
674
675
  const imageSecondaryStyle = (isImageSecondary) => isImageSecondary ? 'hidden @xl:block' : '';
675
676
 
676
677
  const sum = (list = []) => list.reduce((a, b) => a + b, 0);
@@ -736,7 +737,7 @@
736
737
  };
737
738
  const renderButtonIcon = (icon) => isIcon(icon) ? (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) })) : null;
738
739
 
739
- const ListItem = JSX(({ className, isDotted, dotClassName, children }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white', dotClassName) }) })) : null, jsx("span", { children: children })] })));
740
+ const ListItem = JSX(({ className, isDotted, dotClassName, children }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full group-data-secondary:bg-white', dotClassName) }) })) : null, jsx("span", { children: children })] })));
740
741
 
741
742
  const LIST_VERSION_STYLE = {
742
743
  S: {
@@ -755,9 +756,9 @@
755
756
  dotStyle: 'w-1.5 h-1.5 mr-m',
756
757
  },
757
758
  };
758
- const List = JSX(({ className, isDotted = true, items = [], listItemSize = 'M' }) => {
759
+ const List = JSX(({ className, isDotted = true, items = [], listItemSize = 'M', dotClassName = '' }) => {
759
760
  const versionStyle = LIST_VERSION_STYLE[listItemSize];
760
- return items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', versionStyle.textSize, className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, dotClassName: versionStyle.dotStyle, children: item }, String(i)))) })) : null;
761
+ return items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', versionStyle.textSize, className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, dotClassName: style(dotClassName || 'bg-primary-text', versionStyle.dotStyle), children: item }, String(i)))) })) : null;
761
762
  });
762
763
 
763
764
  const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
@@ -1795,7 +1796,7 @@
1795
1796
  const defaultIconSize = 44;
1796
1797
 
1797
1798
  const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: AlignStyles, title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
1798
- const renderBenefit = ({ label, description, items, icon, iconBgVersion, isDotted = false }, i) => (jsxs("div", { className: "flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]", role: "listitem", children: [icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: iconBgVersion || '', ...icon })) : null, icon?.src ? jsx(Img, { className: "shrink-0", image: icon }) : null, label ? (jsxs("div", { className: "@sm:h-full space-y-xs", children: [jsx(Heading, { headingType: "h6", children: label }), jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description }), jsx(List, { className: "text-secondary-text", listItemSize: "S", items: items, isDotted: isDotted })] })) : null] }, String(i)));
1799
+ const renderBenefit = ({ label, description, items, icon, iconBgVersion, isDotted = false }, i) => (jsxs("div", { className: "flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]", role: "listitem", children: [icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: iconBgVersion || '', ...icon })) : null, icon?.src ? jsx(Img, { className: "shrink-0", image: icon }) : null, label ? (jsxs("div", { className: "@sm:h-full space-y-xs", children: [jsx(Heading, { headingType: "h6", children: label }), jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description }), jsx(List, { dotClassName: "bg-secondary-text", listItemSize: "S", items: items, isDotted: isDotted })] })) : null] }, String(i)));
1799
1800
 
1800
1801
  const Bonus = JSX(({ className = '', title, description, bonusItems = [], align = AlignStyles, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M", align: align }), jsx("div", { className: "flex flex-wrap gap-3xl gap-x-m w-full", children: bonusItems.length > 0
1801
1802
  ? bonusItems.map((_, i) => (jsxs("div", { className: "w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray", children: [jsx("div", { className: "grow", children: jsx(Headline, { title: _?.title, description: _?.description, headlineVersion: "S", isEmbedded: true, align: "text-left" }) }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
@@ -3117,9 +3118,7 @@
3117
3118
  const ImageAlwaysOnRight = true;
3118
3119
 
3119
3120
  //TODO: replace SocialMedia with renderButtonSection
3120
- const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, items = [], isDotted, socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => {
3121
- return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, isDotted: isDotted, listItemSize: "S" }), renderAdditionalDescription(additionalDescription, align)] }) }) }));
3122
- });
3121
+ const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, items = [], isDotted, socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, isDotted: isDotted, listItemSize: "S" }), renderAdditionalDescription(additionalDescription, align)] }) }) })));
3123
3122
  const renderAdditionalDescription = (additionalDescription, align) => additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", align: align, children: additionalDescription })) : null;
3124
3123
 
3125
3124
  const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
@@ -5229,13 +5228,13 @@
5229
5228
 
5230
5229
  const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
5231
5230
  const getPaddingX = (steps) => (steps < 5 ? 'px-24' : 'px-16');
5232
- const StepsBlock = JSX(({ align = AlignStyles, buttons, className = '', description, showLines = true, size = 'normal', steps = [], stepVersion = 'gray', title, version = 'primary', ...rest }) => {
5231
+ const StepsBlock = JSX(({ buttons, className = '', description, showLines = true, size = 'normal', steps = [], stepVersion = 'gray', title, version = 'primary', ...rest }) => {
5233
5232
  const shortGaps = steps.length > 3;
5234
5233
  const styleMap = STEPS_BLOCK_STYLE;
5235
5234
  const lineOpacity = getLineOpacity(showLines);
5236
5235
  const paddingX = getPaddingX(steps.length);
5237
5236
  const isMainButton = Boolean(buttons?.every((b) => b?.text));
5238
- return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align: align }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons)] }));
5237
+ return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align: AlignStyles }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons)] }));
5239
5238
  });
5240
5239
  const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
5241
5240
  const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
@@ -5830,7 +5829,7 @@
5830
5829
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
5831
5830
  }
5832
5831
 
5833
- const packageVersion = "0.14.68";
5832
+ const packageVersion = "0.14.70";
5834
5833
 
5835
5834
  exports.Blocks = Blocks;
5836
5835
  exports.ContentPage = ContentPage;