@redneckz/wildless-cms-uni-blocks 0.8.21 → 0.8.22

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 (58) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +14 -43
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/StepsBlock/StepsBlock.d.ts +1 -1
  5. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -1
  6. package/bundle/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -2
  7. package/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
  8. package/dist/components/StepsBlock/StepsBlock.js +11 -8
  9. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  10. package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -6
  11. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  12. package/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -1
  13. package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -2
  14. package/dist/components/StepsBlock/StepsBlockStyleMaps.js +7 -39
  15. package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  16. package/lib/common.css +1 -1
  17. package/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
  18. package/lib/components/StepsBlock/StepsBlock.js +12 -9
  19. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  20. package/lib/components/StepsBlock/StepsBlock.mobile.js +3 -7
  21. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  22. package/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -1
  23. package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -2
  24. package/lib/components/StepsBlock/StepsBlockStyleMaps.js +6 -38
  25. package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  26. package/mobile/bundle/bundle.umd.js +9 -45
  27. package/mobile/bundle/bundle.umd.min.js +1 -1
  28. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -1
  29. package/mobile/bundle/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -2
  30. package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -6
  31. package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  32. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -1
  33. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -2
  34. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +7 -39
  35. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  36. package/mobile/lib/components/StepsBlock/StepsBlock.js +3 -7
  37. package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  38. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -1
  39. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -2
  40. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +6 -38
  41. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  42. package/mobile/src/components/Catalog/Catalog.ui.json +1 -0
  43. package/mobile/src/components/Gallery/Gallery.ui.json +1 -0
  44. package/mobile/src/components/MiniGallery/MiniGallery.ui.json +1 -0
  45. package/mobile/src/components/StepsBlock/StepsBlock.example.json +3 -1
  46. package/mobile/src/components/StepsBlock/StepsBlock.tsx +23 -27
  47. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +2 -1
  48. package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +6 -40
  49. package/package.json +1 -1
  50. package/src/components/Catalog/Catalog.ui.json +1 -0
  51. package/src/components/Gallery/Gallery.ui.json +1 -0
  52. package/src/components/MiniGallery/MiniGallery.ui.json +1 -0
  53. package/src/components/StepsBlock/StepsBlock.example.json +3 -1
  54. package/src/components/StepsBlock/StepsBlock.fixture.tsx +4 -0
  55. package/src/components/StepsBlock/StepsBlock.mobile.tsx +23 -27
  56. package/src/components/StepsBlock/StepsBlock.tsx +34 -27
  57. package/src/components/StepsBlock/StepsBlockContent.ts +2 -1
  58. package/src/components/StepsBlock/StepsBlockStyleMaps.ts +6 -40
@@ -3916,56 +3916,27 @@
3916
3916
  };
3917
3917
  const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
3918
3918
 
3919
- const STEPS_BLOCK_STYLE_MAPS = {
3920
- primary: {
3921
- description: '!text-secondary-text text-l-light',
3922
- iconText: 'text-secondary-text',
3923
- iconBackground: 'bg-main-divider',
3924
- iconConnector: 'bg-secondary-light',
3925
- dot: 'bg-secondary-text',
3926
- },
3927
- secondary: {
3928
- description: '!text-white/80 text-l-light',
3929
- iconText: 'text-white',
3930
- iconBackground: 'bg-white/30',
3931
- iconConnector: 'bg-white',
3932
- dot: 'bg-white/80',
3933
- },
3934
- gray: {
3935
- // TODO Replace this Map with group-data-*
3936
- description: '!text-white/80 text-l-light',
3937
- iconText: 'text-white',
3938
- iconBackground: 'bg-white/30',
3939
- iconConnector: 'bg-white',
3940
- dot: 'bg-white/80',
3941
- },
3942
- transparent: {
3943
- description: '!text-white/80 text-l-light',
3944
- iconText: 'text-white',
3945
- iconBackground: 'bg-white/30',
3946
- iconConnector: 'bg-white',
3947
- dot: 'bg-white/80',
3948
- },
3949
- '': {
3950
- // TODO Replace this Map with group-data-*
3951
- description: '!text-white/80 text-l-light',
3952
- iconText: 'text-white',
3953
- iconBackground: 'bg-white/30',
3954
- iconConnector: 'bg-white',
3955
- dot: 'bg-white/80',
3956
- },
3919
+ const STEPS_BLOCK_STYLE = {
3920
+ description: 'text-white/80 text-l-light group-data-primary:text-secondary-text',
3921
+ iconText: 'text-white group-data-primary:text-secondary-text',
3922
+ iconBackground: 'bg-white/30 group-data-primary:bg-main-divider',
3923
+ iconConnector: 'bg-white group-data-primary:bg-secondary-light',
3924
+ dot: 'bg-white/80 group-data-primary:bg-secondary-text',
3957
3925
  };
3958
3926
 
3959
3927
  const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
3960
3928
  const getPaddingX = (steps) => (steps < 5 ? 'px-[88px]' : 'px-[55px]');
3961
- const StepsBlock = JSX(({ className = '', showLines = true, steps = [], button, version = 'primary', title, ...rest }) => {
3929
+ const StepsBlock = JSX(({ className = '', showLines = true, steps = [], button, size = 'normal', version = 'primary', stepVersion = 'gray', title, ...rest }) => {
3962
3930
  const shortGaps = steps.length > 3;
3963
- const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
3931
+ const styleMap = STEPS_BLOCK_STYLE;
3964
3932
  const lineOpacity = getLineOpacity(showLines);
3965
3933
  const paddingX = getPaddingX(steps.length);
3966
- return (jsxs(BlockWrapper, { className: style('box-border py-12', shortGaps ? 'px-20' : 'px-[70px]', 'flex flex-col items-center overflow-hidden', className), version: version, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center mb-9", title: title })) : null, steps?.length ? (jsxs("div", { className: "box-border", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light', lineOpacity) }))(steps.map(renderStepIcon(styleMap, version))) }), jsx("div", { className: style('flex justify-between mt-4', shortGaps ? 'gap-x-3' : 'gap-x-[101px]'), children: steps.map(renderStep({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? jsx(Button, { className: "mt-8 min-w-60", version: "primary", ...button }) : null] }));
3934
+ return (jsxs(BlockWrapper, { className: style('box-border py-12', shortGaps ? 'px-20' : 'px-[70px]', 'flex flex-col items-center overflow-hidden', className), version: version, ...rest, children: [title ? (jsx(Heading, { headingType: "h4", className: "max-w-[752px] text-center mb-9", title: title })) : null, steps?.length ? (jsxs("div", { className: "box-border", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between mt-4', shortGaps ? 'gap-x-3' : 'gap-x-[101px]'), children: steps.map(renderStep({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? renderButtonsSection([button], { className: 'mt-8 min-w-60' }) : null] }));
3967
3935
  });
3968
- const renderStepIcon = (styleMap, version) => ({ icon }, i) => (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${styleMap.iconBackground}`, children: checkCanRenderIcon(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, version), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
3936
+ const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
3937
+ const styleStepIconSize = size === 'normal' ? 'h-[100px] w-[100px]' : 'h-[63px] w-[63px]';
3938
+ return (jsx(BlockWrapper, { className: `${styleStepIconSize} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`, version: stepVersion, children: checkCanRenderIcon(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, stepVersion), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 group-data-transparent:${styleMap.iconText} text-primary-text`, children: i + 1 })) }, String(i)));
3939
+ };
3969
3940
 
3970
3941
  const containerStyles = {
3971
3942
  'horizontal-list': 'mx-auto mt-5 w-fit',
@@ -4570,7 +4541,7 @@
4570
4541
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
4571
4542
  }
4572
4543
 
4573
- const packageVersion = "0.8.21";
4544
+ const packageVersion = "0.8.22";
4574
4545
 
4575
4546
  exports.Blocks = Blocks;
4576
4547
  exports.ContentPage = ContentPage;