@redneckz/wildless-cms-uni-blocks 0.14.477 → 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.
- package/bundle/bundle.umd.js +9 -36
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinkButton.js +3 -6
- package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +2 -2
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/OfficesAtmsMap/CardCell.js +3 -7
- package/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CarouselLinks/CarouselLinkButton.js +3 -6
- package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +2 -2
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/OfficesAtmsMap/CardCell.js +3 -7
- package/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +9 -36
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +3 -6
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +2 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/CardCell.js +3 -7
- package/mobile/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +3 -6
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +2 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/CardCell.js +3 -7
- package/mobile/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +2 -7
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +4 -4
- package/mobile/src/components/OfficesAtmsMap/CardCell.tsx +20 -23
- package/package.json +1 -1
- package/src/components/CarouselLinks/CarouselLinkButton.tsx +2 -7
- package/src/components/CarouselLinks/CarouselLinks.tsx +4 -4
- package/src/components/OfficesAtmsMap/CardCell.tsx +20 -23
package/bundle/bundle.umd.js
CHANGED
|
@@ -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
|
|
3509
|
-
|
|
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
|
-
},
|
|
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
|
|
3518
|
-
const renderLinks = (links) => (jsx("div", { className: style('
|
|
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,
|
|
@@ -5375,13 +5352,9 @@
|
|
|
5375
5352
|
}
|
|
5376
5353
|
return renderCardCell({ textItems, subText, children, isPhone, ...props });
|
|
5377
5354
|
});
|
|
5378
|
-
const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, isPhone, }) => {
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
};
|
|
5382
|
-
const cleanPhoneNumber = (phone) => {
|
|
5383
|
-
return phone.replace(/\D/g, '');
|
|
5384
|
-
};
|
|
5355
|
+
const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, isPhone = false, }) => (jsxs("div", { className: style('flex gap-2xs flex-col h-full max-w-[300px]', className), children: [label ? (jsx(Text, { color: "text-secondary-text", font: "font-light", size: labelSize, children: label })) : null, children || renderTextItems(textItems, isPhone), subText ? (jsx(Text, { color: subColor, size: "text-m", children: subText })) : null] }));
|
|
5356
|
+
const renderTextItems = (textItems, isPhone) => textItems.filter(Boolean).map((text, i) => (jsx(Text, { size: "text-l", children: isPhone ? jsx("a", { href: `tel:${cleanPhoneNumber(text)}`, children: text.trim() }) : text.trim() }, String(i))));
|
|
5357
|
+
const cleanPhoneNumber = (phone) => phone.replace(/\D/g, '');
|
|
5385
5358
|
|
|
5386
5359
|
const CardRow = JSX(({ className, children }) => (jsx("div", { className: style('flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl', className), children: children })));
|
|
5387
5360
|
|
|
@@ -6571,7 +6544,7 @@
|
|
|
6571
6544
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6572
6545
|
});
|
|
6573
6546
|
|
|
6574
|
-
const packageVersion = "0.14.
|
|
6547
|
+
const packageVersion = "0.14.478";
|
|
6575
6548
|
|
|
6576
6549
|
exports.Blocks = Blocks;
|
|
6577
6550
|
exports.ContentPage = ContentPage;
|