@redneckz/wildless-cms-uni-blocks 0.3.56 → 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.
Files changed (171) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +69 -20
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BlockContent.d.ts +2 -1
  5. package/dist/components/Blocks.d.ts +1 -0
  6. package/dist/components/Blocks.js +2 -0
  7. package/dist/components/Blocks.js.map +1 -1
  8. package/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
  9. package/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
  10. package/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
  11. package/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
  12. package/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
  13. package/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
  14. package/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
  15. package/dist/components/GroupBlock/GroupBlock.js +19 -0
  16. package/dist/components/GroupBlock/GroupBlock.js.map +1 -0
  17. package/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
  18. package/dist/components/GroupBlock/GroupBlockContent.js +2 -0
  19. package/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
  20. package/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
  21. package/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
  22. package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
  23. package/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
  24. package/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
  25. package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
  26. package/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
  27. package/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
  28. package/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
  29. package/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
  30. package/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
  31. package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
  32. package/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
  33. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  34. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  35. package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
  36. package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  37. package/dist/utils/style2className.d.ts +1 -1
  38. package/dist/utils/style2className.js +3 -1
  39. package/dist/utils/style2className.js.map +1 -1
  40. package/lib/common.css +1 -1
  41. package/lib/components/BlockContent.d.ts +2 -1
  42. package/lib/components/Blocks.d.ts +1 -0
  43. package/lib/components/Blocks.js +2 -0
  44. package/lib/components/Blocks.js.map +1 -1
  45. package/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
  46. package/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
  47. package/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
  48. package/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
  49. package/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
  50. package/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
  51. package/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
  52. package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +4 -0
  53. package/lib/components/GroupBlock/GroupBlock.js +17 -0
  54. package/lib/components/GroupBlock/GroupBlock.js.map +1 -0
  55. package/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
  56. package/lib/components/GroupBlock/GroupBlockContent.js +2 -0
  57. package/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
  58. package/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
  59. package/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
  60. package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
  61. package/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
  62. package/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
  63. package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
  64. package/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
  65. package/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
  66. package/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
  67. package/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
  68. package/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
  69. package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
  70. package/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
  71. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  72. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  73. package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
  74. package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  75. package/lib/utils/style2className.d.ts +1 -1
  76. package/lib/utils/style2className.js +3 -1
  77. package/lib/utils/style2className.js.map +1 -1
  78. package/mobile/bundle/bundle.umd.js +3 -1
  79. package/mobile/bundle/bundle.umd.min.js +1 -1
  80. package/mobile/dist/components/BlockContent.d.ts +2 -1
  81. package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
  82. package/mobile/dist/components/GroupBlock/BlocksTypeProps.js +2 -0
  83. package/mobile/dist/components/GroupBlock/BlocksTypeProps.js.map +1 -0
  84. package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
  85. package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js +9 -0
  86. package/mobile/dist/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
  87. package/mobile/dist/components/GroupBlock/GroupBlock.d.ts +9 -0
  88. package/mobile/dist/components/GroupBlock/GroupBlock.js +19 -0
  89. package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -0
  90. package/mobile/dist/components/GroupBlock/GroupBlockContent.d.ts +21 -0
  91. package/mobile/dist/components/GroupBlock/GroupBlockContent.js +2 -0
  92. package/mobile/dist/components/GroupBlock/GroupBlockContent.js.map +1 -0
  93. package/mobile/dist/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
  94. package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +18 -0
  95. package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -0
  96. package/mobile/dist/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
  97. package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +20 -0
  98. package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -0
  99. package/mobile/dist/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
  100. package/mobile/dist/components/GroupBlock/filterBlocksByTag.js +7 -0
  101. package/mobile/dist/components/GroupBlock/filterBlocksByTag.js.map +1 -0
  102. package/mobile/dist/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
  103. package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +16 -0
  104. package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -0
  105. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -2
  106. package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
  107. package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  108. package/mobile/dist/utils/style2className.d.ts +1 -1
  109. package/mobile/dist/utils/style2className.js +3 -1
  110. package/mobile/dist/utils/style2className.js.map +1 -1
  111. package/mobile/lib/components/BlockContent.d.ts +2 -1
  112. package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +36 -0
  113. package/mobile/lib/components/GroupBlock/BlocksTypeProps.js +2 -0
  114. package/mobile/lib/components/GroupBlock/BlocksTypeProps.js.map +1 -0
  115. package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.d.ts +4 -0
  116. package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js +7 -0
  117. package/mobile/lib/components/GroupBlock/EmbeddableGroupBlocks.js.map +1 -0
  118. package/mobile/lib/components/GroupBlock/GroupBlock.d.ts +9 -0
  119. package/mobile/lib/components/GroupBlock/GroupBlock.js +17 -0
  120. package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -0
  121. package/mobile/lib/components/GroupBlock/GroupBlockContent.d.ts +21 -0
  122. package/mobile/lib/components/GroupBlock/GroupBlockContent.js +2 -0
  123. package/mobile/lib/components/GroupBlock/GroupBlockContent.js.map +1 -0
  124. package/mobile/lib/components/GroupBlock/GroupBlockTabs.d.ts +10 -0
  125. package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +16 -0
  126. package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -0
  127. package/mobile/lib/components/GroupBlock/GroupBlocksItem.d.ts +8 -0
  128. package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +17 -0
  129. package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -0
  130. package/mobile/lib/components/GroupBlock/filterBlocksByTag.d.ts +2 -0
  131. package/mobile/lib/components/GroupBlock/filterBlocksByTag.js +4 -0
  132. package/mobile/lib/components/GroupBlock/filterBlocksByTag.js.map +1 -0
  133. package/mobile/lib/components/GroupBlock/renderBlocksTypes.d.ts +9 -0
  134. package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +13 -0
  135. package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -0
  136. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -2
  137. package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +9 -11
  138. package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  139. package/mobile/lib/utils/style2className.d.ts +1 -1
  140. package/mobile/lib/utils/style2className.js +3 -1
  141. package/mobile/lib/utils/style2className.js.map +1 -1
  142. package/mobile/src/components/BlockContent.ts +3 -1
  143. package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
  144. package/mobile/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
  145. package/mobile/src/components/GroupBlock/GroupBlock.example.json +27 -0
  146. package/mobile/src/components/GroupBlock/GroupBlock.tsx +43 -0
  147. package/mobile/src/components/GroupBlock/GroupBlockContent.ts +23 -0
  148. package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
  149. package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
  150. package/mobile/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
  151. package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
  152. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +4 -2
  153. package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +8 -14
  154. package/mobile/src/utils/style2className.ts +3 -2
  155. package/package.json +1 -1
  156. package/src/components/BlockContent.ts +3 -1
  157. package/src/components/Blocks.ts +2 -0
  158. package/src/components/GroupBlock/BlocksTypeProps.ts +40 -0
  159. package/src/components/GroupBlock/EmbeddableGroupBlocks.tsx +7 -0
  160. package/src/components/GroupBlock/GroupBlock.example.json +27 -0
  161. package/src/components/GroupBlock/GroupBlock.fixture.tsx +51 -0
  162. package/src/components/GroupBlock/GroupBlock.tsx +43 -0
  163. package/src/components/GroupBlock/GroupBlockContent.ts +23 -0
  164. package/src/components/GroupBlock/GroupBlockTabs.tsx +54 -0
  165. package/src/components/GroupBlock/GroupBlocksItem.tsx +30 -0
  166. package/src/components/GroupBlock/filterBlocksByTag.ts +5 -0
  167. package/src/components/GroupBlock/renderBlocksTypes.tsx +27 -0
  168. package/src/components/OtherProducts/OtherProductsContent.ts +4 -2
  169. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  170. package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +8 -14
  171. package/src/utils/style2className.ts +3 -2
@@ -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', duration = 0, anchor = null }) => {
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] pr-2 z-[1] ${additionalClass}`}
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, duration }) {
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] max-w-[354px] p-0 border-none'
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 group relative overflow-hidden border-[1px] cursor-pointer text-left mx-1 grow basis-0 backdrop-blur-sm
113
- ${btnClassName} ${additionalBorder}
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
  }
@@ -1,2 +1,3 @@
1
- export const style2className = (style: string[] | undefined | null): string =>
2
- style ? style.join(' ') : '';
1
+ export function style2className(style: string[] | undefined | null): string {
2
+ return style ? style.filter(Boolean).join(' ') : '';
3
+ }