@redneckz/wildless-cms-uni-blocks 0.14.482 → 0.14.484

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.
@@ -6062,7 +6062,7 @@
6062
6062
 
6063
6063
  const TabsLayout = UniBlock(
6064
6064
  // eslint-disable-next-line max-lines-per-function
6065
- ({ className = '', tabs = [], block, tabsType, showCounter = false, isSticky, ...rest }) => {
6065
+ ({ className = '', tabs = [], block, tabsType, showCounter = false, isSticky = false, ...rest }) => {
6066
6066
  const id = block?.__id ? `tabs-${block.__id}` : 'tabs';
6067
6067
  const router = useRouter();
6068
6068
  const isEveryLink = tabs.every((_) => _?.type === 'link');
@@ -6102,9 +6102,12 @@
6102
6102
  updateUrlSearchTabParam(_, index);
6103
6103
  }
6104
6104
  }, [tabsCounted]);
6105
- return (jsxs(BlockWrapper, { className: style(isEveryLink ? getStickyStyle(isSticky) : '', className), defaultPadding: "p-0", block: block, ...rest, children: [renderTabsLayout({
6106
- className: isEveryLink ? '' : getStickyStyle(isSticky),
6107
- items: tabsCounted?.length ? tabsCounted : tabs,
6105
+ return (jsxs(BlockWrapper, { className: style({ 'sticky top-1 z-20': isSticky && isEveryLink }, className), defaultPadding: "p-0", block: block, ...rest, children: [renderTabsLayout({
6106
+ className: style({
6107
+ 'pb-1': Boolean(block?.slots) && tabsType === 'default',
6108
+ 'sticky top-1 z-20': isSticky && !isEveryLink,
6109
+ }),
6110
+ items: getItems(tabs, tabsCounted),
6108
6111
  activeItem,
6109
6112
  tabsType,
6110
6113
  onChange: handleChange,
@@ -6117,7 +6120,7 @@
6117
6120
  }, {
6118
6121
  slots: ({ tabs }) => (tabs?.filter((_) => _.type === 'group')).map(getSlotName) || [],
6119
6122
  });
6120
- const getStickyStyle = (isSticky = false) => (isSticky ? 'sticky top-1 z-20 pb-1' : '');
6123
+ const getItems = (tabs, tabsCounted) => (tabsCounted?.length ? tabsCounted : tabs);
6121
6124
  const getSlotName = (tab, index) => tab?.tabName || `Слот №${index}`;
6122
6125
  const getInitSelectedIndex = (tabs, paramsId) => paramsId
6123
6126
  ? Number(paramsId)
@@ -6553,7 +6556,7 @@
6553
6556
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6554
6557
  });
6555
6558
 
6556
- const packageVersion = "0.14.481";
6559
+ const packageVersion = "0.14.483";
6557
6560
 
6558
6561
  exports.Blocks = Blocks;
6559
6562
  exports.ContentPage = ContentPage;