@redneckz/wildless-cms-uni-blocks 0.14.225 → 0.14.226
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 +11 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/bundle/components/CarouselLinks/maxLinksCount.d.ts +1 -1
- package/dist/components/Carousel/Carousel.d.ts +1 -0
- package/dist/components/Carousel/Carousel.js +2 -2
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +7 -4
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselLinks/maxLinksCount.d.ts +1 -1
- package/dist/components/CarouselLinks/maxLinksCount.js +1 -1
- package/dist/components/CarouselLinks/maxLinksCount.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Carousel/Carousel.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +2 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +7 -4
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselLinks/maxLinksCount.d.ts +1 -1
- package/lib/components/CarouselLinks/maxLinksCount.js +1 -1
- package/lib/components/CarouselLinks/maxLinksCount.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +11 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/dist/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/dist/components/Carousel/Carousel.js +2 -2
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +7 -4
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Carousel/Carousel.d.ts +1 -0
- package/mobile/lib/components/Carousel/Carousel.js +2 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +7 -4
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +7 -1
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +12 -9
- package/package.json +1 -1
- package/src/components/Carousel/Carousel.tsx +7 -1
- package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +4 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +12 -9
- package/src/components/CarouselLinks/maxLinksCount.ts +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -2978,7 +2978,7 @@
|
|
|
2978
2978
|
|
|
2979
2979
|
const VISIBLE_ITEM_COUNT = 1;
|
|
2980
2980
|
|
|
2981
|
-
const Carousel = UniBlock(({ className, itemCount, visibleItemCount = VISIBLE_ITEM_COUNT, noCardBorder, isAlignCenter, arrowsPadded = true, isGap = true, cardSize = 'normal', ...rest }) => {
|
|
2981
|
+
const Carousel = UniBlock(({ className, itemCount, visibleItemCount = VISIBLE_ITEM_COUNT, noCardBorder, isAlignCenter, arrowsPadded = true, isGap = true, isEmbedded = false, cardSize = 'normal', ...rest }) => {
|
|
2982
2982
|
const { blocks: childBlocks = [] } = rest.block || {};
|
|
2983
2983
|
const count = itemCount || childBlocks?.length;
|
|
2984
2984
|
const [activeIndex, { inc: increaseActiveIndex, dec: decreaseActiveIndex }] = useCarouselControls({
|
|
@@ -2989,7 +2989,7 @@
|
|
|
2989
2989
|
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
2990
2990
|
// TODO Remove
|
|
2991
2991
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
2992
|
-
return (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [jsxs("div", { className: style(isAlignCenter ? 'flex justify-center' : '', 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : undefined, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderCarouselCards({ noCardBorder, activeIndex, cardSize, ...rest }) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }), jsx(SwipeListControlDots, { className: "@5xl:hidden", containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: count, listType: "horizontal-list" })] }));
|
|
2992
|
+
return (jsxs(BlockWrapper, { className: style(isEmbedded ? '@container-normal' : '', className), defaultPadding: "p-6xl", ...rest, children: [jsxs("div", { className: style(isAlignCenter ? 'flex justify-center' : '', 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : undefined, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderCarouselCards({ noCardBorder, activeIndex, cardSize, ...rest }) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }), jsx(SwipeListControlDots, { className: "@5xl:hidden", containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: count, listType: "horizontal-list" })] }));
|
|
2993
2993
|
}, {
|
|
2994
2994
|
childrenTypes: [
|
|
2995
2995
|
'CarouselCard',
|
|
@@ -3044,12 +3044,16 @@
|
|
|
3044
3044
|
return text ? (jsx("div", { className: style('flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72', className), children: jsxs("div", { className: "relative min-h-16 w-full pb-lg sm:pb-0", children: [jsxs("a", { className: style(LINK_CLASS_NAME, 'flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10'), role: "link", href: href, target: target, onClick: onClick, children: [jsxs("div", { className: "flex items-center space-x-lg", children: [icon ? (jsx(Img, { imageClassName: "text-green-dark", image: icon, width: IconSize, height: IconSize })) : null, jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })] }), jsx(Img, { className: "group-hover/link:brightness-100 sm:ml-2xs", image: { icon: 'ArrowRightIcon', iconVersion: IconVersion }, imageClassName: "group-hover/link:text-primary-main", width: IconSize, height: IconSize })] }), jsx("div", { className: style(LINK_BORDER_CLASS_NAME, '-bottom-1 -left-1') }), jsx("div", { className: style(LINK_BORDER_CLASS_NAME, '-bottom-2 -left-2') })] }) })) : null;
|
|
3045
3045
|
});
|
|
3046
3046
|
|
|
3047
|
-
const
|
|
3047
|
+
const MAX_LINKS_COUNT = 5;
|
|
3048
|
+
|
|
3049
|
+
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 sm:items-center gap-s justify-between", children: [jsxs("div", { children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left" }), jsx(Headline, { className: "pt-m", description: additionalDescription, align: "text-left", isEmbedded: true })] }), links?.length ? renderLinks(links, 'sm:self-end sm:pt-s') : null] }) })));
|
|
3048
3050
|
const renderLinks = (links, className = '') => {
|
|
3049
|
-
const itemCount = Math.ceil(links.length /
|
|
3050
|
-
return (jsx(Carousel, { className: className, version: "secondary", itemCount: itemCount, arrowsPadded: false, padding: "p-0", visibleItemCount: 0, children: Array.from({ length: itemCount })
|
|
3051
|
+
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
3052
|
+
return (jsx(Carousel, { className: className, version: "secondary", itemCount: itemCount, arrowsPadded: false, padding: "p-0", visibleItemCount: 0, isEmbedded: true, children: Array.from({ length: itemCount })
|
|
3051
3053
|
.fill(null)
|
|
3052
|
-
.map((_, groupIndex) => (jsx("div", { className:
|
|
3054
|
+
.map((_, groupIndex) => (jsx("div", { className: "flex flex-wrap gap-2xs sm:gap-0 sm:justify-center", children: links
|
|
3055
|
+
.slice(groupIndex * MAX_LINKS_COUNT, (groupIndex + 1) * MAX_LINKS_COUNT)
|
|
3056
|
+
.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
3053
3057
|
};
|
|
3054
3058
|
|
|
3055
3059
|
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
@@ -5988,7 +5992,7 @@
|
|
|
5988
5992
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
5989
5993
|
});
|
|
5990
5994
|
|
|
5991
|
-
const packageVersion = "0.14.
|
|
5995
|
+
const packageVersion = "0.14.225";
|
|
5992
5996
|
|
|
5993
5997
|
exports.Blocks = Blocks;
|
|
5994
5998
|
exports.ContentPage = ContentPage;
|