@redneckz/wildless-cms-uni-blocks 0.14.80 → 0.14.82
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/bundle.umd.js +4 -19
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/bundle/hooks/useActiveRoute.d.ts +3 -2
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +11 -18
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/dist/hooks/useActiveRoute.d.ts +3 -2
- package/dist/hooks/useActiveRoute.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +1 -2
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +12 -19
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/lib/hooks/useActiveRoute.d.ts +3 -2
- package/lib/hooks/useActiveRoute.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +1 -2
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +18 -54
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/mobile/bundle/hooks/useActiveRoute.d.ts +3 -2
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +11 -18
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/mobile/dist/hooks/useActiveRoute.d.ts +3 -2
- package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +1 -2
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +12 -19
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
- package/mobile/lib/hooks/useActiveRoute.d.ts +3 -2
- package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +1 -2
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +28 -23
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
- package/mobile/src/hooks/useActiveRoute.ts +3 -4
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +0 -4
- package/package.json +1 -1
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +28 -23
- package/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
- package/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
- package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
- package/src/hooks/useActiveRoute.ts +3 -4
- package/src/ui-kit/YandexMap/YandexMap.tsx +0 -4
- package/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
- package/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/dist/components/StickyBottomMenu/RenderItem.js +0 -25
- package/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
- package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/dist/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
- package/dist/ui-kit/YandexMap/renderOpenMap.js +0 -19
- package/dist/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
- package/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/lib/components/StickyBottomMenu/RenderItem.js +0 -23
- package/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
- package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/lib/ui-kit/YandexMap/renderOpenMap.d.ts +0 -1
- package/lib/ui-kit/YandexMap/renderOpenMap.js +0 -16
- package/lib/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
- package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/mobile/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
- package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js +0 -25
- package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
- package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/mobile/dist/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
- package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js +0 -19
- package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
- package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js +0 -23
- package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
- package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
- package/mobile/lib/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
- package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js +0 -16
- package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
- package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
- package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
- package/mobile/src/ui-kit/YandexMap/renderOpenMap.tsx +0 -26
- package/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
- package/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
- package/src/ui-kit/YandexMap/renderOpenMap.tsx +0 -26
|
@@ -6,7 +6,6 @@ import { useEffect, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
6
6
|
import { style } from '../../utils/style.js';
|
|
7
7
|
import { Icon } from '../Icon/Icon.js';
|
|
8
8
|
import { renderClusterer } from './renderClusterer.js';
|
|
9
|
-
import { renderOpenMap } from './renderOpenMap.js';
|
|
10
9
|
import { renderUserGeolocation } from './renderUserGeolocation.js';
|
|
11
10
|
import { useYandexMaps } from './useYandexMaps.js';
|
|
12
11
|
import { ZoomButton } from './ZoomButton.js';
|
|
@@ -67,7 +66,7 @@ export const YandexMap = JSX(({ points, className = '', zoom = 5 }) => {
|
|
|
67
66
|
setIsFullScreen(container.isFullscreen());
|
|
68
67
|
};
|
|
69
68
|
const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
|
|
70
|
-
return (_jsxs("div", { id: "map", className: style(!isFullScreen && 'relative', 'w-full', className), children: [_jsx("div", { className: style(
|
|
69
|
+
return (_jsxs("div", { id: "map", className: style(!isFullScreen && 'relative', 'w-full', className), children: [_jsx("div", { className: style(Object.values(FULLSCREEN_STYLES), zIndex, 'right-2 top-4 bg-white'), onClick: toggleFullscreen, children: _jsx(Icon, { name: "FullScreenIcon", width: "16", height: "16" }) }), _jsxs("div", { className: style('absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md', zIndex), children: [_jsx(ZoomButton, { yandexMaps: map }), _jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map.current, yandexMaps, style('right-2 top-80', zIndex))] }));
|
|
71
70
|
});
|
|
72
71
|
const getCenterPoint = (points) => [
|
|
73
72
|
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YandexMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/YandexMap.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,cAAc;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"YandexMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/YandexMap.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,cAAc;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,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tag) => mobileHeadingTagMap[tag] || 'h3';
|
|
312
312
|
|
|
313
|
-
const styles$
|
|
313
|
+
const styles$2 = {
|
|
314
314
|
h0: 'text-h0',
|
|
315
315
|
h1: 'text-h1',
|
|
316
316
|
h2: 'text-h2',
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
};
|
|
322
322
|
const Heading = JSX(({ className = '', headingType = 'h3', as = 'h3', title, children }) => {
|
|
323
323
|
const Tag = headingTag(as);
|
|
324
|
-
return (jsx(Tag, { className: style('font-sans m-0', styles$
|
|
324
|
+
return (jsx(Tag, { className: style('font-sans m-0', styles$2[headingType], className), children: title || children }));
|
|
325
325
|
});
|
|
326
326
|
|
|
327
327
|
const Paragraph = JSX(({ children, ...styleProps }) => (jsx("p", { className: style('font-sans', Object.values(styleProps)), children: children })));
|
|
@@ -3906,21 +3906,6 @@
|
|
|
3906
3906
|
});
|
|
3907
3907
|
}
|
|
3908
3908
|
|
|
3909
|
-
const styles$2 = {
|
|
3910
|
-
focus: 'focus:border-primary-text focus:border',
|
|
3911
|
-
hover: 'hover:bg-primary-hover',
|
|
3912
|
-
active: 'active:bg-primary-active',
|
|
3913
|
-
border: 'border border-transparent rounded-md',
|
|
3914
|
-
position: 'flex items-center justify-center',
|
|
3915
|
-
font: 'text-center font-sans',
|
|
3916
|
-
};
|
|
3917
|
-
const renderOpenMap = (pointsCenter) => {
|
|
3918
|
-
const getYandexMapUrl = () => {
|
|
3919
|
-
return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
|
|
3920
|
-
};
|
|
3921
|
-
return (jsx("a", { className: `select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(styles$2).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
|
|
3922
|
-
};
|
|
3923
|
-
|
|
3924
3909
|
const styles$1 = {
|
|
3925
3910
|
focus: 'focus:border-primary-text focus:border',
|
|
3926
3911
|
hover: 'hover:bg-primary-hover',
|
|
@@ -4062,7 +4047,7 @@
|
|
|
4062
4047
|
setIsFullScreen(container.isFullscreen());
|
|
4063
4048
|
};
|
|
4064
4049
|
const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
|
|
4065
|
-
return (jsxs("div", { id: "map", className: style(!isFullScreen && 'relative', 'w-full', className), children: [jsx("div", { className: style(
|
|
4050
|
+
return (jsxs("div", { id: "map", className: style(!isFullScreen && 'relative', 'w-full', className), children: [jsx("div", { className: style(Object.values(FULLSCREEN_STYLES), zIndex, 'right-2 top-4 bg-white'), onClick: toggleFullscreen, children: jsx(Icon, { name: "FullScreenIcon", width: "16", height: "16" }) }), jsxs("div", { className: style('absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md', zIndex), children: [jsx(ZoomButton, { yandexMaps: map }), jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map.current, yandexMaps, style('right-2 top-80', zIndex))] }));
|
|
4066
4051
|
});
|
|
4067
4052
|
const getCenterPoint = (points) => [
|
|
4068
4053
|
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
@@ -4572,26 +4557,13 @@
|
|
|
4572
4557
|
return [activeIndex, items[activeIndex]];
|
|
4573
4558
|
}
|
|
4574
4559
|
|
|
4575
|
-
const
|
|
4576
|
-
const isAnotherPortal = projectSettings?.BASE_PATH
|
|
4577
|
-
? !item?.href?.startsWith(projectSettings?.BASE_PATH)
|
|
4578
|
-
: true;
|
|
4579
|
-
const link = useLink({ isRemote: isAnotherPortal });
|
|
4580
|
-
const { href, target, onClick: handleClick, } = link({
|
|
4581
|
-
href: item?.href || '',
|
|
4582
|
-
target: '_self',
|
|
4583
|
-
});
|
|
4584
|
-
const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
|
|
4585
|
-
const iconVersion = isActiveItem ? 'color' : 'black';
|
|
4586
|
-
return (jsxs("a", { className: style(isActiveItem ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: () => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick()), href: href, target: target, children: [jsx(Img, { className: "w-6 h-6", image: {
|
|
4587
|
-
icon: item?.icon?.icon,
|
|
4588
|
-
iconVersion: iconVersion,
|
|
4589
|
-
} }), item?.title || ''] }));
|
|
4590
|
-
});
|
|
4560
|
+
const StickyBottomMenuBurger = JSX(({ isActive, onClick }) => (jsxs("button", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), onClick: onClick, children: [jsx(Icon, { className: "w-6 h-6", name: "BurgerIcon", iconVersion: isActive ? 'color' : 'black' }), "\u041C\u0435\u043D\u044E"] })));
|
|
4591
4561
|
|
|
4592
|
-
const
|
|
4593
|
-
const
|
|
4594
|
-
|
|
4562
|
+
const StickyBottomMenuItem = JSX(({ isActive, item, onClick }) => {
|
|
4563
|
+
const isAnotherPortal = !projectSettings?.BASE_PATH || !item?.href?.startsWith(projectSettings.BASE_PATH);
|
|
4564
|
+
const link = useLink({ isRemote: isAnotherPortal });
|
|
4565
|
+
const { href, onClick: handleClick } = link({ href: item?.href, onClick });
|
|
4566
|
+
return (jsxs("a", { className: style(isActive ? 'text-primary-main' : 'text-primary-text', `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`), href: href, target: "_self", title: item?.title || '', onClick: handleClick, children: [jsx(Icon, { className: "w-6 h-6", name: item?.icon?.icon, iconVersion: isActive ? 'color' : 'black' }), item?.title || ''] }));
|
|
4595
4567
|
});
|
|
4596
4568
|
|
|
4597
4569
|
const isDialogOpen = (id, dialogs) => dialogs.find((item) => item.id === id, id);
|
|
@@ -4983,26 +4955,18 @@
|
|
|
4983
4955
|
return [Boolean(isBurgerMenuOpen), { open, close, toggle }];
|
|
4984
4956
|
};
|
|
4985
4957
|
|
|
4958
|
+
const EMPTY_MENU = [];
|
|
4986
4959
|
const StickyBottomMenu = JSX(({ ...rest }) => {
|
|
4987
|
-
const
|
|
4988
|
-
const
|
|
4989
|
-
const
|
|
4990
|
-
title: 'Меню',
|
|
4991
|
-
icon: {
|
|
4992
|
-
icon: 'BurgerIcon',
|
|
4993
|
-
iconVersion: isBurgerMenuDialogOpen ? 'color' : 'black',
|
|
4994
|
-
},
|
|
4995
|
-
isActive: isBurgerMenuDialogOpen,
|
|
4996
|
-
};
|
|
4960
|
+
const [isBurgerMenuDialogOpen, { toggle, close }] = useBurgerMenuDialog();
|
|
4961
|
+
const { menuItems = EMPTY_MENU } = useSWRResource(projectSettings.STICKY_MOBILE_MENU || 'sticky-mobile-menu', { fallback: rest.options?.page?.fallback, folderName: 'portal-resources', setBasePath: true });
|
|
4962
|
+
const [, activeItem] = useActiveRoute(menuItems);
|
|
4997
4963
|
const middleIdx = Math.floor(menuItems.length / 2);
|
|
4998
|
-
const
|
|
4999
|
-
|
|
5000
|
-
burgerMenu,
|
|
5001
|
-
...menuItems.slice(middleIdx),
|
|
5002
|
-
], [menuItems, middleIdx, burgerMenu]);
|
|
4964
|
+
const leftItems = menuItems.slice(0, middleIdx);
|
|
4965
|
+
const rightItems = menuItems.slice(middleIdx);
|
|
5003
4966
|
/* Attribute [data-component] need for correct render in wcms editor. Do not remove. */
|
|
5004
|
-
return (jsx("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: jsx(BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: jsx(
|
|
4967
|
+
return (jsx("div", { className: "w-full mb-5", "data-component": "sticky-bottom-menu-container", children: jsx(BlockWrapper, { className: "@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]", padding: "p-0", children: jsxs("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: [leftItems.map(renderMenuItem(activeItem, close)), jsx(StickyBottomMenuBurger, { isActive: isBurgerMenuDialogOpen, onClick: toggle }), rightItems.map(renderMenuItem(activeItem, close))] }) }) }));
|
|
5005
4968
|
});
|
|
4969
|
+
const renderMenuItem = (activeItem, close) => (_, i) => (jsx(StickyBottomMenuItem, { isActive: _ === activeItem, item: _, onClick: close }, _.href || String(i)));
|
|
5006
4970
|
|
|
5007
4971
|
const scrollButtonStyle = 'hidden sm:flex absolute z-40 top-0';
|
|
5008
4972
|
const ScrollableTabsControl = JSX(({ className, items = [], value, onChange, tabsType }) => {
|
|
@@ -5435,7 +5399,7 @@
|
|
|
5435
5399
|
|
|
5436
5400
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
5437
5401
|
|
|
5438
|
-
const packageVersion = "0.14.
|
|
5402
|
+
const packageVersion = "0.14.81";
|
|
5439
5403
|
|
|
5440
5404
|
exports.Blocks = Blocks;
|
|
5441
5405
|
exports.ContentPage = ContentPage;
|