@redneckz/wildless-cms-uni-blocks 0.3.55 → 0.3.57
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +69 -21
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BlockContent.d.ts +2 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +3 -5
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/dist/components/ContentPage/CustomContentPage.js +33 -0
- package/dist/components/ContentPage/CustomContentPage.js.map +1 -0
- package/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
- package/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/dist/components/GroupBlock/GroupBlock.js +19 -0
- package/dist/components/GroupBlock/GroupBlock.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/dist/components/GroupBlock/GroupBlockContent.js +2 -0
- package/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
- package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
- package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
- package/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/utils/style2className.d.ts +1 -0
- package/dist/utils/style2className.js +7 -0
- package/dist/utils/style2className.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/BlockContent.d.ts +2 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/lib/components/ContentPage/CustomContentPage.js +31 -0
- package/lib/components/ContentPage/CustomContentPage.js.map +1 -0
- package/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
- package/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +4 -0
- package/lib/components/GroupBlock/GroupBlock.js +17 -0
- package/lib/components/GroupBlock/GroupBlock.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/lib/components/GroupBlock/GroupBlockContent.js +2 -0
- package/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
- package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
- package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
- package/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/lib/types.d.ts +5 -0
- package/lib/utils/style2className.d.ts +1 -0
- package/lib/utils/style2className.js +4 -0
- package/lib/utils/style2className.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +4 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BlockContent.d.ts +2 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +3 -5
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/mobile/dist/components/ContentPage/CustomContentPage.js +33 -0
- package/mobile/dist/components/ContentPage/CustomContentPage.js.map +1 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/mobile/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
- package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.js +19 -0
- package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js +2 -0
- package/mobile/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
- package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
- package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
- package/mobile/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/dist/types.d.ts +5 -0
- package/mobile/dist/utils/style2className.d.ts +1 -0
- package/mobile/dist/utils/style2className.js +7 -0
- package/mobile/dist/utils/style2className.js.map +1 -0
- package/mobile/lib/components/BlockContent.d.ts +2 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/CustomContentPage.d.ts +30 -0
- package/mobile/lib/components/ContentPage/CustomContentPage.js +31 -0
- package/mobile/lib/components/ContentPage/CustomContentPage.js.map +1 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
- package/mobile/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
- package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.js +17 -0
- package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js +2 -0
- package/mobile/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
- package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
- package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
- package/mobile/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/lib/types.d.ts +5 -0
- package/mobile/lib/utils/style2className.d.ts +1 -0
- package/mobile/lib/utils/style2className.js +4 -0
- package/mobile/lib/utils/style2className.js.map +1 -0
- package/mobile/src/components/BlockContent.ts +3 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +1 -4
- package/mobile/src/components/ContentPage/CustomContentPage.tsx +82 -0
- package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
- package/mobile/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
- package/mobile/src/components/GroupBlock/GroupBlock.example.json +27 -0
- package/mobile/src/components/GroupBlock/GroupBlock.tsx +43 -0
- package/mobile/src/components/GroupBlock/GroupBlockContent.ts +23 -0
- package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
- package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
- package/mobile/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +4 -2
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +8 -14
- package/mobile/src/types.ts +7 -1
- package/mobile/src/utils/style2className.ts +3 -0
- package/package.json +1 -1
- package/src/components/BlockContent.ts +3 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.tsx +1 -4
- package/src/components/ContentPage/CustomContentPage.tsx +82 -0
- package/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
- package/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
- package/src/components/GroupBlock/GroupBlock.example.json +27 -0
- package/src/components/GroupBlock/GroupBlock.fixture.tsx +51 -0
- package/src/components/GroupBlock/GroupBlock.tsx +43 -0
- package/src/components/GroupBlock/GroupBlockContent.ts +23 -0
- package/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
- package/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
- package/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
- package/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
- package/src/components/OtherProducts/OtherProductsContent.ts +4 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +8 -14
- package/src/types.ts +7 -1
- package/src/utils/style2className.ts +3 -0
|
@@ -28,7 +28,7 @@ const productSlideStyleMap: Record<BlockVersion, string> = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export const ProductGalleryGreen = JSX<ProductGalleryProps>(
|
|
31
|
-
({ className = '', context, slides = [], version = 'primary',
|
|
31
|
+
({ className = '', context, slides = [], version = 'primary', anchor = null }) => {
|
|
32
32
|
const galleryNav = slides.map((s) => s.nav);
|
|
33
33
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
34
34
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
@@ -55,7 +55,6 @@ export const ProductGalleryGreen = JSX<ProductGalleryProps>(
|
|
|
55
55
|
activeSlideIndex,
|
|
56
56
|
onClick: () => setActiveSlideIndex(i),
|
|
57
57
|
version,
|
|
58
|
-
duration,
|
|
59
58
|
}),
|
|
60
59
|
)}
|
|
61
60
|
</div>
|
|
@@ -76,7 +75,7 @@ function renderProductBlock(block: ProductBlockInnerContent, i: number, context)
|
|
|
76
75
|
>
|
|
77
76
|
<div className="flex grow">
|
|
78
77
|
<ProductBlockInner
|
|
79
|
-
className={`pl-[50px]
|
|
78
|
+
className={`pl-[50px] z-[1] ${additionalClass}`}
|
|
80
79
|
context={context}
|
|
81
80
|
textBlockClassName="mb-[154px]"
|
|
82
81
|
{...block}
|
|
@@ -86,12 +85,12 @@ function renderProductBlock(block: ProductBlockInnerContent, i: number, context)
|
|
|
86
85
|
);
|
|
87
86
|
}
|
|
88
87
|
|
|
89
|
-
function renderNavButton({ slide, i, activeSlideIndex, onClick, version
|
|
88
|
+
function renderNavButton({ slide, i, activeSlideIndex, onClick, version }) {
|
|
90
89
|
const isActiveBtn = i === activeSlideIndex;
|
|
91
90
|
|
|
92
91
|
const btnClassName = isActiveBtn
|
|
93
|
-
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px]
|
|
94
|
-
: `min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300
|
|
92
|
+
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] p-0 border-none'
|
|
93
|
+
: `min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10
|
|
95
94
|
${productSlideStyleMap[version]}`;
|
|
96
95
|
const btnTitleClassName = isActiveBtn
|
|
97
96
|
? 'text-primary-text text-title-2xs'
|
|
@@ -100,8 +99,7 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick, version, duratio
|
|
|
100
99
|
? 'text-secondary-text text-m-title-xs mt-2.5'
|
|
101
100
|
: `text-m-md mt-1.5 ${productBlockStyleMap[version].text}`;
|
|
102
101
|
|
|
103
|
-
const additionalBorder = version === 'secondary' ? 'border-white/50' : '';
|
|
104
|
-
const progressBarClassName = isActiveBtn ? 'animate-slide' : '';
|
|
102
|
+
const additionalBorder = version === 'secondary' ? 'border-white/50' : 'border-black/50';
|
|
105
103
|
|
|
106
104
|
return (
|
|
107
105
|
<button
|
|
@@ -109,18 +107,14 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick, version, duratio
|
|
|
109
107
|
key={String(i)}
|
|
110
108
|
onClick={onClick}
|
|
111
109
|
aria-label={slide?.title}
|
|
112
|
-
className={`box-border font-sans
|
|
113
|
-
|
|
110
|
+
className={`box-border font-sans relative overflow-hidden border-[1px] border-white/50 cursor-pointer text-left mx-1 grow basis-0
|
|
111
|
+
${btnClassName} ${additionalBorder}
|
|
114
112
|
`}
|
|
115
113
|
>
|
|
116
114
|
<div className="border-0 px-6">
|
|
117
115
|
<div className={`font-medium ${btnTitleClassName}`}>{slide?.title}</div>
|
|
118
116
|
<div className={`text-secondary-text ${btnDescClassName}`}>{slide.description}</div>
|
|
119
117
|
</div>
|
|
120
|
-
<div
|
|
121
|
-
className={`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`}
|
|
122
|
-
style={{ animationDuration: `${duration}s`, animationFillMode: 'forwards' }}
|
|
123
|
-
></div>
|
|
124
118
|
</button>
|
|
125
119
|
);
|
|
126
120
|
}
|
package/src/types.ts
CHANGED
|
@@ -44,10 +44,16 @@ export interface ContentPageMeta {
|
|
|
44
44
|
jsonLd?: string;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
export interface CustomPageTemplate {
|
|
48
|
+
content?: Record<string, any>;
|
|
49
|
+
type?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
export interface ContentPageDef extends ContentPageMeta {
|
|
48
53
|
style?: string[];
|
|
49
|
-
blocks?: BlockDef[];
|
|
54
|
+
blocks?: BlockDef[];
|
|
50
55
|
slots?: SlotsMap;
|
|
56
|
+
customPageTmpl?: CustomPageTemplate;
|
|
51
57
|
likeControl?: boolean;
|
|
52
58
|
colorPalette?: ColorPalette;
|
|
53
59
|
}
|