@redneckz/wildless-cms-uni-blocks 0.14.64 → 0.14.65

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 (55) hide show
  1. package/bin/migration-scripts/0.14.65.js +17 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +14 -14
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ProductBlock/ProductBlockContent.d.ts +0 -2
  6. package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  7. package/dist/components/InvestmentInfo/InvestmentInfo.js +2 -1
  8. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  9. package/dist/components/ProductBlock/ProductBlock.js +1 -2
  10. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  11. package/dist/components/ProductBlock/ProductBlockContent.d.ts +0 -2
  12. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
  13. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  14. package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  15. package/lib/components/InvestmentInfo/InvestmentInfo.js +2 -1
  16. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  17. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +0 -2
  18. package/lib/components/ProductBlock/ProductBlock.js +1 -2
  19. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  20. package/lib/components/ProductBlock/ProductBlockContent.d.ts +0 -2
  21. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
  22. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  23. package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  24. package/mobile/bundle/bundle.umd.js +12 -12
  25. package/mobile/bundle/bundle.umd.min.js +1 -1
  26. package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +0 -2
  27. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  28. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +2 -1
  29. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  30. package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -2
  31. package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  32. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +0 -2
  33. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
  34. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  35. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  36. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +2 -1
  37. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  38. package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -2
  39. package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  40. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +0 -2
  41. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
  42. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  43. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
  44. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +2 -1
  45. package/mobile/src/components/ProductBlock/ProductBlock.tsx +9 -16
  46. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +0 -2
  47. package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +15 -7
  48. package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +1 -2
  49. package/package.json +1 -1
  50. package/src/components/InvestmentInfo/InvestmentInfo.tsx +2 -1
  51. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +0 -17
  52. package/src/components/ProductBlock/ProductBlock.tsx +9 -16
  53. package/src/components/ProductBlock/ProductBlockContent.ts +0 -2
  54. package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +15 -7
  55. package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +1 -2
@@ -780,11 +780,7 @@
780
780
  const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
781
781
  const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
782
782
 
783
- const getBorderStyle$1 = (showBorder) => showBorder
784
- ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
785
- : '';
786
-
787
- const ProductBlock = JSX(({ className, padding, showBorder, ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', getBorderStyle$1(showBorder), className), padding: "p-0", ...rest, children: jsx(BaseProductTile, { defaultPadding: "p-6xl", padding: padding, className: "grow h-full", ...rest }) })));
783
+ const ProductBlock = JSX(({ className, padding, ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: jsx(BaseProductTile, { defaultPadding: "p-6xl", padding: padding, className: "grow h-full", ...rest }) })));
788
784
 
789
785
  const isFilled = (_) => _ !== null && _ !== undefined;
790
786
 
@@ -1161,11 +1157,11 @@
1161
1157
  onClose: handleClose,
1162
1158
  iconVersion,
1163
1159
  });
1164
- return (jsxs("div", { className: className, children: [renderLabel(label), jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10', getBorderStyle(isBorder, valid)), onClick: isOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), renderIcon$1(isOpen, iconVersion)] }), isSearch && isOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1160
+ return (jsxs("div", { className: className, children: [renderLabel(label), jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10', getBorderStyle$1(isBorder, valid)), onClick: isOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), renderIcon$1(isOpen, iconVersion)] }), isSearch && isOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1165
1161
  });
1166
1162
  const renderLabel = (label) => label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null;
1167
1163
  const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
1168
- const getBorderStyle = (isBorder, valid) => style(isBorder ? 'border rounded-md hover:border-primary-hover' : '', valid ? ' border-gray' : 'border-error');
1164
+ const getBorderStyle$1 = (isBorder, valid) => style(isBorder ? 'border rounded-md hover:border-primary-hover' : '', valid ? ' border-gray' : 'border-error');
1169
1165
 
1170
1166
  const SelectControl = JSX(({ className = '', error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null })] })));
1171
1167
 
@@ -2897,6 +2893,10 @@
2897
2893
  : null;
2898
2894
  }
2899
2895
 
2896
+ const getBorderStyle = (showBorder) => showBorder
2897
+ ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
2898
+ : '';
2899
+
2900
2900
  const renderCardHighlight = ({ className, text = 'ХИТ' } = {}) => (jsxs("div", { className: style('w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black', className), children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "24", height: "24" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: text })] }));
2901
2901
 
2902
2902
  const cardBaseStyle = 'relative h-full';
@@ -2925,7 +2925,7 @@
2925
2925
  };
2926
2926
  const cardWrapperStyle = (_, { someCardsHighlighted }) => style(cardBaseStyle, someCardsHighlighted && (isCardHighlighted(_) ? 'pt-3xl' : 'pt-3xl sm:pt-16'));
2927
2927
  const cardStyle = (_, { someCardsHighlighted, showBorder, cardSize = 'normal', }) => style(cardBaseStyle, 'min-w-80', CARD_SIZE_MAP[cardSize], // TODO fix для RecommendationCard
2928
- someCardsHighlighted && (isCardHighlighted(_) ? 'pt-3xl sm:pt-16' : 'pt-3xl'), getBorderStyle$1(showBorder), showBorder && 'h-full');
2928
+ someCardsHighlighted && (isCardHighlighted(_) ? 'pt-3xl sm:pt-16' : 'pt-3xl'), getBorderStyle(showBorder), showBorder && 'h-full');
2929
2929
  const isCardHighlighted = (_) => _?.content && 'isHighlighting' in _.content && _.content.isHighlighting;
2930
2930
 
2931
2931
  const VISIBLE_ITEM_COUNT = 1;
@@ -4263,7 +4263,7 @@
4263
4263
  const HorizontalLayout = JSX(({ className = '', gap = 'XS', isPadding = false, version = 'transparent', isTheme = false, isCardBorder, ...rest }) => (jsx(BlockWrapper, { className: style('relative', 'grid grid-cols-12', gapStyles[gap], className), defaultPadding: isPadding ? 'p-6xl' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren({
4264
4264
  ...rest,
4265
4265
  extraProps: {
4266
- className: getBorderStyle$1(isCardBorder),
4266
+ className: getBorderStyle(isCardBorder),
4267
4267
  },
4268
4268
  }) })));
4269
4269
  HorizontalLayout.childrenTypes = {
@@ -4382,7 +4382,7 @@
4382
4382
  const renderInvestmentCell = (cell, i) => {
4383
4383
  const cellSize = cell.cellSize || 'XS';
4384
4384
  const cellColor = cell.cellColor || 'green';
4385
- return cell.text ? (jsx("div", { className: `flex-1 flex items-center justify-center relative py-xs ${investmentCellSizeMap[cellSize]} ${investmentCellColorMap[cellColor]} ${cellSize === 'XS' ? 'px-s' : 'px-5xl'}`, children: jsx("div", { className: "text-center", children: cell.text }) }, `cell_${i}`)) : null;
4385
+ return cell.text ? (jsx("div", { className: `flex-1 flex items-center justify-center relative py-xs ${investmentCellSizeMap[cellSize]} ${investmentCellColorMap[cellColor]} ${cellSize === 'XS' ? 'px-s' : 'px-5xl'}`, children: jsx(Text, { align: "text-center", children: cell.text }) }, `cell_${i}`)) : null;
4386
4386
  };
4387
4387
  const renderInvestmentColumnTitle = (column, i) => {
4388
4388
  return (jsx("div", { className: `flex-1 max-w-[180px] text-center px-xs last:pr-3xl`, children: column.title }, `title_${i}`));
@@ -5078,10 +5078,10 @@
5078
5078
  const SafeDepositRentalTotal = JSX(({ days, tariffs = [] }) => {
5079
5079
  const price = calculatePrice(days, tariffs);
5080
5080
  const imageDescription = 'На рисунке изображена пачка листов\nформата А4';
5081
- return (jsxs("div", { className: "contents @xl:flex flex-col justify-between gap-xl order-2", children: [jsxs("div", { className: "flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none", children: [renderTotal('Аренда за', days), renderTotal('Цена', price + ' ₽')] }), jsx("span", { className: "@xl:hidden order-3 mb-xs text-s font-light text-secondary-text", children: imageDescription }), jsxs("div", { className: "flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center", children: [jsx(Img, { image: { icon: 'PackA4Icon' }, className: "@xl:h-60" }), jsx("span", { className: "hidden @xl:inline text-s font-light text-white opacity-80 whitespace-pre-line", children: imageDescription })] })] }));
5081
+ return (jsxs("div", { className: "contents @xl:flex flex-col justify-between gap-xl order-2", children: [jsxs("div", { className: "flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none", children: [renderTotal('Аренда за', days), renderTotal('Цена', price + ' ₽')] }), jsx("div", { className: "@xl:hidden order-3 mb-xs", children: jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: imageDescription }) }), jsxs("div", { className: "flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center", children: [jsx(Img, { image: { icon: 'PackA4Icon' }, className: "@xl:h-60" }), jsx("div", { className: "hidden @xl:inline opacity-80 whitespace-pre-line", children: jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-white", children: imageDescription }) })] })] }));
5082
5082
  });
5083
5083
  const renderTotal = (label, total) => {
5084
- return (jsxs("div", { className: "flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start", children: [jsx("div", { className: "text-l font-light text-secondary-text", children: label }), jsx("span", { className: "text-l @xl:text-h3 text-primary-text", children: total })] }));
5084
+ return (jsxs("div", { className: "flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: label }), jsx("span", { className: "text-l @xl:text-h3 text-primary-text", children: total })] }));
5085
5085
  };
5086
5086
  const calculatePrice = (days, tariffs) => {
5087
5087
  const tariffType = getTariffType(days);
@@ -5492,7 +5492,7 @@
5492
5492
  const VerticalLayout = JSX(({ className = '', gap = '', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, isInnerBorder = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative flex flex-col', gapStyles[gap], className), defaultPadding: isPadding ? 'p-6xl' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren({
5493
5493
  ...rest,
5494
5494
  extraProps: {
5495
- className: style('w-full', getBorderStyle$1(isInnerBorder)),
5495
+ className: style('w-full', getBorderStyle(isInnerBorder)),
5496
5496
  padding: isInnerPadding ? '' : 'p-0',
5497
5497
  },
5498
5498
  }) })));
@@ -5796,7 +5796,7 @@
5796
5796
  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" }) }));
5797
5797
  }
5798
5798
 
5799
- const packageVersion = "0.14.63";
5799
+ const packageVersion = "0.14.64";
5800
5800
 
5801
5801
  exports.Blocks = Blocks;
5802
5802
  exports.ContentPage = ContentPage;