@redneckz/wildless-cms-uni-blocks 0.9.9 → 0.9.10

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 (101) hide show
  1. package/bin/migration-scripts/0.9.9.js +0 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +16 -14
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  6. package/bundle/components/Footer/SocialMedia.d.ts +1 -1
  7. package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  8. package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  9. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  10. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  11. package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  12. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  13. package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  14. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  15. package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  16. package/dist/components/Footer/MediaButton.js +6 -7
  17. package/dist/components/Footer/MediaButton.js.map +1 -1
  18. package/dist/components/Footer/SocialMedia.d.ts +1 -1
  19. package/dist/components/Footer/SocialMedia.js +2 -2
  20. package/dist/components/Footer/SocialMedia.js.map +1 -1
  21. package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  22. package/lib/common.css +1 -1
  23. package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  24. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
  25. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  26. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  27. package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  28. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  29. package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
  30. package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  31. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  32. package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  33. package/lib/components/Footer/MediaButton.js +6 -7
  34. package/lib/components/Footer/MediaButton.js.map +1 -1
  35. package/lib/components/Footer/SocialMedia.d.ts +1 -1
  36. package/lib/components/Footer/SocialMedia.js +2 -2
  37. package/lib/components/Footer/SocialMedia.js.map +1 -1
  38. package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  39. package/mobile/bundle/bundle.umd.js +7 -8
  40. package/mobile/bundle/bundle.umd.min.js +1 -1
  41. package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  42. package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  43. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  44. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  45. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  46. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  47. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  48. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  49. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  50. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  51. package/mobile/dist/components/Footer/MediaButton.js +6 -7
  52. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  53. package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  54. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  55. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  56. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  57. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  58. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  59. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  60. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  61. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  62. package/mobile/lib/components/Footer/MediaButton.js +6 -7
  63. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  64. package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  65. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  66. package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  67. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  68. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  69. package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  70. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  71. package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  72. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
  73. package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  74. package/mobile/src/components/Footer/MediaButton.tsx +7 -10
  75. package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  76. package/mobile/src/components/PictureText/PictureText.example.json +3 -1
  77. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
  78. package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
  79. package/mobile/src/components/Tile/Tile.example.json +3 -1
  80. package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
  81. package/package.json +1 -1
  82. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  83. package/src/components/Carousel/Carousel.fixture.tsx +18 -5
  84. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
  85. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  86. package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  87. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  88. package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  89. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
  90. package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  91. package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  92. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +4 -2
  93. package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  94. package/src/components/Footer/MediaButton.tsx +7 -10
  95. package/src/components/Footer/SocialMedia.tsx +3 -11
  96. package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  97. package/src/components/PictureText/PictureText.example.json +3 -1
  98. package/src/components/ProductBlock/ProductBlock.example.json +3 -1
  99. package/src/components/ProductTile/ProductTile.example.json +3 -1
  100. package/src/components/Tile/Tile.example.json +3 -1
  101. package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
@@ -929,7 +929,7 @@
929
929
  partnerComments,
930
930
  }));
931
931
  };
932
- return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization$2({ fullName, inn, name, phone, mail, annualRevenue, handleChange }), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderBankOffices({
932
+ return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization$2({ fullName, inn, name, phone, mail, annualRevenue, handleChange }), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0411\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderBankOffices({
933
933
  regions,
934
934
  region: selectedRegion,
935
935
  branches,
@@ -2074,7 +2074,7 @@
2074
2074
  const CarouselBankHistoryCard = JSX(({ title, description, blocksLength = 0, activeIndex, options }) => {
2075
2075
  const orderNumber = Number(options?.key?.split('-').slice(-1)[0]) || 0;
2076
2076
  const isActive = orderNumber === activeIndex;
2077
- return (jsx(BlockWrapper, { className: "flex h-[485px]", children: isActive ? (jsx("div", { className: "relative flex items-center w-full", children: jsx(Headline, { headlineVersion: "S", title: title, description: description, align: "text-left", className: style('absolute z-10 h-[385px] w-[440px] text-white shadow-dark-blue', getActiveBlockPosition(orderNumber, blocksLength), getBackgroundColor(orderNumber)) }) })) : (jsx("div", { className: "flex w-full items-center justify-center", children: jsx("div", { className: style('flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]', getBackgroundColor(orderNumber)), children: jsx("span", { className: getTextColor(orderNumber), children: title }) }) })) }));
2077
+ return (jsx(BlockWrapper, { className: "flex h-[485px]", children: isActive ? (jsx("div", { className: "relative flex items-center w-full", children: jsx(Headline, { headlineVersion: "M", title: title, description: description, align: "text-left", className: style('absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue', getActiveBlockPosition(orderNumber, blocksLength), getBackgroundColor(orderNumber)) }) })) : (jsx("div", { className: "flex w-full items-center justify-center", children: jsx("div", { className: style('flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]', getBackgroundColor(orderNumber)), children: jsx("span", { className: getTextColor(orderNumber), children: title }) }) })) }));
2078
2078
  });
2079
2079
  const getBackgroundColor = (orderNumber) => {
2080
2080
  const division = orderNumber % 3;
@@ -2139,7 +2139,7 @@
2139
2139
  });
2140
2140
 
2141
2141
  const CarouselEventCard = JSX(({ className = '', icon, title, description, href, target, ...rest }) => {
2142
- return (jsx(BlockWrapper, { className: style('w-[365px]', className), ...rest, children: jsxs(LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-2", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Text, { font: "font-light", size: "text-s", color: "text-secondary-text", children: description }) })) : null] }) }));
2142
+ return (jsx(BlockWrapper, { className: style('w-[365px]', className), ...rest, children: jsxs(LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left pt-3 mb-2", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Text, { font: "font-light", size: "text-m", color: "text-secondary-text", children: description }) })) : null] }) }));
2143
2143
  });
2144
2144
 
2145
2145
  const BaseTile = JSX(({ className = '', title = '', buttons, image, children }) => (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] })));
@@ -2204,8 +2204,11 @@
2204
2204
  };
2205
2205
  const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
2206
2206
 
2207
- const CarouselProductCard = JSX(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, items = [], target, title, version = 'primary', ...rest }) => {
2208
- return (jsxs(BlockWrapper, { className: style('h-full flex flex-col justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], { className: 'p-6 pt-0', isVertical: true })] }));
2207
+ const CarouselProductCard = JSX(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, isFullWidth = true, items = [], target, title, version = 'primary', ...rest }) => {
2208
+ return (jsxs(BlockWrapper, { className: style('h-full flex flex-col justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], {
2209
+ className: style('p-6 pt-0', isFullWidth ? '' : 'justify-center'),
2210
+ isVertical: isFullWidth ? true : false,
2211
+ })] }));
2209
2212
  });
2210
2213
  const renderImage$3 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image, asSVG: true })) : null] }));
2211
2214
  const renderCardTitle = (headlineSmallVersion, title) => title ? (jsx("div", { children: jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) })) : null;
@@ -2257,17 +2260,16 @@
2257
2260
  const buttonStylesWithText = (text, buttonSize) => text
2258
2261
  ? ''
2259
2262
  : `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
2260
- const MediaButton = JSX(({ iconVersion = 'color', buttonSize = 'default', rounded = false, icon, ...rest }) => {
2261
- const { href, version, text, appendLeft, appendRight, aboveText } = rest;
2263
+ const MediaButton = JSX(({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
2264
+ const { href, version, text = '' } = rest;
2262
2265
  const { iconMapped, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
2263
- const iconCustom = icon ?? iconMapped;
2264
- const iconWithVersion = iconCustom
2265
- ? { ...getIconWithVersion(iconCustom), iconVersion }
2266
- : undefined;
2267
- return (jsx(Button, { className: style(rounded ? 'rounded-full' : 'rounded-md', 'border border-solid hover:border-transparent', 'group-data-primary:border-main-divider', 'hover:bg-primary-main hover:text-black', 'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover', 'group-data-gray:border-green', buttonStylesWithText(text, buttonSize)), aboveText: aboveText, appendLeft: appendLeft, appendRight: appendRight, "aria-label": label, rel: "noopener noreferrer", target: "_blank", text: text, version: version, ...rest, children: iconWithVersion && !text ? (jsx(ImgInner, { image: iconWithVersion, imageClassName: "group-hover/media:text-white", width: "24", height: "24", asSVG: true })) : null }));
2266
+ const iconCustom = getFilteredIcon(icon) ?? iconMapped;
2267
+ const iconWithVersion = iconCustom ? getIconWithVersion(iconCustom) : undefined;
2268
+ return (jsx(Button, { className: style(rounded ? 'rounded-full' : 'rounded-md', 'border border-solid hover:border-transparent', 'group-data-primary:border-main-divider', 'hover:bg-primary-main hover:text-black', 'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover', 'group-data-gray:border-green', buttonStylesWithText(text, buttonSize)), "aria-label": label, rel: "noopener noreferrer", target: "_blank", text: text, version: version, ...rest, children: iconWithVersion && !text ? (jsx(ImgInner, { image: iconWithVersion, imageClassName: "group-hover/media:text-white", width: "24", height: "24", asSVG: true })) : null }));
2268
2269
  });
2270
+ const getFilteredIcon = (icon) => (icon?.src || icon?.icon ? icon : undefined);
2269
2271
 
2270
- const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-1 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { aboveText: _.aboveText, appendLeft: _.appendLeft, appendRight: _.appendRight, buttonSize: buttonSize, text: _.text, version: _.version, ..._ }, String(index)))) }), jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: children })] })));
2272
+ const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-1 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { buttonSize: buttonSize, ..._ }, String(index)))) }), jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: children })] })));
2271
2273
 
2272
2274
  const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
2273
2275
  const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', version = 'primary', ...rest }) => {
@@ -4883,7 +4885,7 @@
4883
4885
  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" }) }));
4884
4886
  }
4885
4887
 
4886
- const packageVersion = "0.9.9";
4888
+ const packageVersion = "0.9.10";
4887
4889
 
4888
4890
  exports.Blocks = Blocks;
4889
4891
  exports.ContentPage = ContentPage;