@redneckz/wildless-cms-uni-blocks 0.14.478 → 0.14.479

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 (27) hide show
  1. package/bundle/bundle.umd.js +6 -29
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/CarouselLinks/CarouselLinkButton.js +3 -6
  4. package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  5. package/dist/components/CarouselLinks/CarouselLinks.js +2 -2
  6. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  7. package/lib/common.css +1 -1
  8. package/lib/components/CarouselLinks/CarouselLinkButton.js +3 -6
  9. package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  10. package/lib/components/CarouselLinks/CarouselLinks.js +2 -2
  11. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  12. package/mobile/bundle/bundle.umd.js +6 -29
  13. package/mobile/bundle/bundle.umd.min.js +1 -1
  14. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +3 -6
  15. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  16. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +2 -2
  17. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  18. package/mobile/lib/common.css +1 -1
  19. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +3 -6
  20. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  21. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +2 -2
  22. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  23. package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +2 -7
  24. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +4 -4
  25. package/package.json +1 -1
  26. package/src/components/CarouselLinks/CarouselLinkButton.tsx +2 -7
  27. package/src/components/CarouselLinks/CarouselLinks.tsx +4 -4
@@ -3481,41 +3481,18 @@
3481
3481
  const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full self-end' }), children: [colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null] }) })));
3482
3482
  const renderColorOption = (color, i) => (jsx("figure", { className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
3483
3483
 
3484
- // TODO: Выпилить экраны, брать напрямую из конфига
3485
- const screens = {
3486
- // => @media (min-width: 640px) { ... }
3487
- sm: '640px',
3488
- // => @media (min-width: 768px) { ... }
3489
- md: '768px',
3490
- // => @media (min-width: 1024px) { ... }
3491
- lg: '1024px',
3492
- // => @media (min-width: 1280px) { ... }
3493
- xl: '1280px',
3494
- };
3495
- const useMediaQuery = (screenRange) => {
3496
- const screenWidth = screens[screenRange];
3497
- const mq = `(min-width: ${screenWidth})`;
3498
- return Boolean(globalThis.matchMedia?.(mq)?.matches);
3499
- };
3500
-
3501
- const useMobileMode = () => {
3502
- return !useMediaQuery('md');
3503
- };
3504
-
3505
3484
  const CarouselLinkButton = JSX(({ icon, ...linkProps }) => {
3506
3485
  const link = useLink();
3507
3486
  const { text, href, target, onClick } = link(linkProps);
3508
- const isMobileMode = useMobileMode();
3509
- const iconSize = isMobileMode ? '30' : '50';
3510
- const textStyle = 'font-light @lg:font-normal text-primary-text text-center text-xs @lg:text-sm whitespace-wrap';
3511
- return text ? (jsx("div", { className: style('p-3 rounded-lg bg-white text-secondary-text flex justify-center'), children: jsx("a", { role: "link", href: href, target: target, onClick: onClick, children: jsxs("div", { className: "flex flex-col items-center gap-3 break-words max-w-[150px]", children: [icon ? (jsx(Img, { image: {
3487
+ const textStyle = 'font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap';
3488
+ return text ? (jsx("div", { className: style('p-3 rounded-lg bg-white text-secondary-text flex justify-center'), children: jsx("a", { role: "link", href: href, target: target, onClick: onClick, children: jsxs("div", { className: "flex flex-col items-center gap-3 break-words max-w-[150px]", children: [icon ? (jsx(Img, { className: "w-7 h-7 md:w-12 md:h-12", image: {
3512
3489
  ...icon,
3513
3490
  iconVersion: icon?.iconVersion,
3514
- }, width: iconSize, height: iconSize, alt: text })) : null, jsx("div", { className: textStyle, children: text })] }) }) })) : null;
3491
+ }, alt: text })) : null, jsx("div", { className: textStyle, children: text })] }) }) })) : null;
3515
3492
  });
3516
3493
 
3517
- const CarouselLinks = JSX(({ className, additionalDescription, description, links, title, ...rest }) => (jsx(BlockWrapper, { defaultPadding: "p-5xl", className: style('overflow-hidden', className), ...rest, children: jsxs("div", { className: "flex flex-col @lg:flex-row gap-5 justify-between", children: [jsxs("div", { className: "flex-1", children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left", headlineVersion: "XL" }), jsx(Headline, { className: "pt-m", description: additionalDescription, align: "text-left", isEmbedded: true })] }), links?.length ? renderLinks(links) : null] }) })));
3518
- const renderLinks = (links) => (jsx("div", { className: style('@lg:grid-cols-9 @lg:[&>*]:col-span-2 @lg:[&>*:nth-child(14n+2)]:col-span-3 @lg:[&>*:nth-child(7n+5)]:col-span-3', '@lg:[&>*:nth-child(7n+6)]:col-span-3 @lg:[&>*:nth-child(7n+7)]:col-span-3 @lg:[&>*:nth-child(14n+10)]:col-span-3 @lg:w-3/6', 'grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2', 'grid gap-3 @lg:gap-5'), children: links.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }));
3494
+ const CarouselLinks = JSX(({ className, additionalDescription, description, links, title, ...rest }) => (jsx(BlockWrapper, { defaultPadding: "p-5xl", className: style('overflow-hidden', className), ...rest, children: jsxs("div", { className: "flex flex-col lg:flex-row gap-5 justify-between", children: [jsxs("div", { className: "flex-1", children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left", headlineVersion: "XL" }), jsx(Headline, { className: "pt-m", description: additionalDescription, align: "text-left", isEmbedded: true })] }), links?.length ? renderLinks(links) : null] }) })));
3495
+ const renderLinks = (links) => (jsx("div", { className: style('lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3', 'lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6', 'grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2', 'grid gap-3 lg:gap-5'), children: links.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }));
3519
3496
 
3520
3497
  const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
3521
3498
  aspectName,
@@ -6567,7 +6544,7 @@
6567
6544
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6568
6545
  });
6569
6546
 
6570
- const packageVersion = "0.14.477";
6547
+ const packageVersion = "0.14.478";
6571
6548
 
6572
6549
  exports.Blocks = Blocks;
6573
6550
  exports.ContentPage = ContentPage;