@redneckz/wildless-cms-uni-blocks 0.14.546 → 0.14.547

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 (47) hide show
  1. package/bundle/bundle.umd.js +7 -7
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/ButtonsBlock/ButtonsBlock.js +1 -1
  4. package/dist/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
  5. package/dist/ui-kit/LinkButton/ArrowButton.js +1 -1
  6. package/dist/ui-kit/LinkButton/ArrowButton.js.map +1 -1
  7. package/dist/ui-kit/LinkButton/ButtonInner.js +1 -1
  8. package/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  9. package/dist/ui-kit/LinkButton/renderButtonsSection.js +3 -3
  10. package/dist/ui-kit/LinkButton/renderButtonsSection.js.map +1 -1
  11. package/lib/common.css +1 -1
  12. package/lib/components/ButtonsBlock/ButtonsBlock.js +1 -1
  13. package/lib/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
  14. package/lib/ui-kit/LinkButton/ArrowButton.js +1 -1
  15. package/lib/ui-kit/LinkButton/ArrowButton.js.map +1 -1
  16. package/lib/ui-kit/LinkButton/ButtonInner.js +1 -1
  17. package/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  18. package/lib/ui-kit/LinkButton/renderButtonsSection.js +3 -3
  19. package/lib/ui-kit/LinkButton/renderButtonsSection.js.map +1 -1
  20. package/mobile/bundle/bundle.umd.js +7 -7
  21. package/mobile/bundle/bundle.umd.min.js +1 -1
  22. package/mobile/dist/components/ButtonsBlock/ButtonsBlock.js +1 -1
  23. package/mobile/dist/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
  24. package/mobile/dist/ui-kit/LinkButton/ArrowButton.js +1 -1
  25. package/mobile/dist/ui-kit/LinkButton/ArrowButton.js.map +1 -1
  26. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js +1 -1
  27. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  28. package/mobile/dist/ui-kit/LinkButton/renderButtonsSection.js +3 -3
  29. package/mobile/dist/ui-kit/LinkButton/renderButtonsSection.js.map +1 -1
  30. package/mobile/lib/common.css +1 -1
  31. package/mobile/lib/components/ButtonsBlock/ButtonsBlock.js +1 -1
  32. package/mobile/lib/components/ButtonsBlock/ButtonsBlock.js.map +1 -1
  33. package/mobile/lib/ui-kit/LinkButton/ArrowButton.js +1 -1
  34. package/mobile/lib/ui-kit/LinkButton/ArrowButton.js.map +1 -1
  35. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js +1 -1
  36. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  37. package/mobile/lib/ui-kit/LinkButton/renderButtonsSection.js +3 -3
  38. package/mobile/lib/ui-kit/LinkButton/renderButtonsSection.js.map +1 -1
  39. package/mobile/src/components/ButtonsBlock/ButtonsBlock.tsx +1 -1
  40. package/mobile/src/ui-kit/LinkButton/ArrowButton.tsx +1 -1
  41. package/mobile/src/ui-kit/LinkButton/ButtonInner.tsx +1 -1
  42. package/mobile/src/ui-kit/LinkButton/renderButtonsSection.tsx +4 -4
  43. package/package.json +1 -1
  44. package/src/components/ButtonsBlock/ButtonsBlock.tsx +1 -1
  45. package/src/ui-kit/LinkButton/ArrowButton.tsx +1 -1
  46. package/src/ui-kit/LinkButton/ButtonInner.tsx +1 -1
  47. package/src/ui-kit/LinkButton/renderButtonsSection.tsx +4 -4
@@ -526,7 +526,7 @@
526
526
  /** @deprecated */
527
527
  const ButtonInner = JSX((props) => {
528
528
  const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
529
- const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
529
+ const iconHideStyle = isWithText(props) && 'hidden lg:block';
530
530
  return (jsxs("div", { className: style(buttonStyle$1(props), 'flex gap-xs'), children: [appendLeft ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendLeft })) : null, isWithText(props) ? (jsxs("div", { className: "whitespace-pre", children: [aboveText ? jsx("div", { className: "text-xs font-light text-left", children: aboveText }) : null, jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-3xs' : 'text-l'}`, children: text })] })) : null, appendRight ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendRight })) : null] }));
531
531
  });
532
532
  const buttonStyle$1 = (props) => {
@@ -702,7 +702,7 @@
702
702
  /** @deprecated */
703
703
  const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
704
704
  ? 'flex-col gap-xs justify-items-stretch'
705
- : 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m', className), role: "group", children: buttons.map(renderButton(buttonClassName)) })) : null;
705
+ : 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto', className), role: "group", children: buttons.map(renderButton(buttonClassName)) })) : null;
706
706
  const renderButton = (buttonClassName = '') => (button, index) => {
707
707
  const { text, icon, iconRight, version, ...rest } = button || {};
708
708
  const iconVersion = getIconVersion(icon, version);
@@ -712,9 +712,9 @@
712
712
  const DEFAULT_ICON_W = 24;
713
713
  const getIconVersion = (icon, version = 'secondary') => {
714
714
  const iconVersionDefault = version === 'secondary' ? 'color' : 'white';
715
- return icon?.iconVersion ? icon?.iconVersion : iconVersionDefault;
715
+ return icon?.iconVersion || iconVersionDefault;
716
716
  };
717
- const renderButtonIcon = (icon) => isIcon(icon) ? (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) })) : null;
717
+ const renderButtonIcon = (icon) => isIcon(icon) && (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) }));
718
718
 
719
719
  const toLocalNumberFormat = (fractionDigits = 0, { fixed } = {}) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
720
720
  minimumFractionDigits: fixed ? fractionDigits : 0,
@@ -2264,7 +2264,7 @@
2264
2264
  /** @deprecated */
2265
2265
  const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(LinkButton, { rounded: true, className: style('group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black', disabled
2266
2266
  ? 'bg-secondary-light text-secondary-text'
2267
- : 'bg-white text-primary-text hover:text-primary-main', className || ''), disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover/btn:text-primary-main", width: "16", height: "16" }) })));
2267
+ : 'bg-white text-primary-text hover:text-primary-main', className), disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover/btn:text-primary-main", width: "16", height: "16" }) })));
2268
2268
  /** @deprecated */
2269
2269
  const ScrollLeftButton = JSX((props) => (jsx(ArrowButton, { ...props, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })));
2270
2270
  /** @deprecated */
@@ -2546,7 +2546,7 @@
2546
2546
  };
2547
2547
 
2548
2548
  const ButtonsBlock = JSX(({ buttons, className = '', align, ...rest }) => {
2549
- const alignStyle = align ? style('flex', AlignJustifyStyle[align]) : '';
2549
+ const alignStyle = align && style('flex', AlignJustifyStyle[align]);
2550
2550
  return (jsx(BlockWrapper, { className: style('!bg-transparent', alignStyle, className), defaultPadding: "p-0", ...rest, children: renderButtonsSection(buttons) }));
2551
2551
  });
2552
2552
 
@@ -6509,7 +6509,7 @@
6509
6509
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6510
6510
  });
6511
6511
 
6512
- const packageVersion = "0.14.545";
6512
+ const packageVersion = "0.14.546";
6513
6513
 
6514
6514
  exports.Blocks = Blocks;
6515
6515
  exports.ContentPage = ContentPage;