@redneckz/wildless-cms-uni-blocks 0.14.81 → 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.
Files changed (99) hide show
  1. package/bundle/bundle.umd.js +1 -1
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  4. package/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  5. package/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  6. package/bundle/hooks/useActiveRoute.d.ts +3 -2
  7. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +11 -18
  8. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  9. package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  10. package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
  11. package/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  12. package/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  13. package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
  14. package/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  15. package/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  16. package/dist/hooks/useActiveRoute.d.ts +3 -2
  17. package/dist/hooks/useActiveRoute.js.map +1 -1
  18. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +12 -19
  19. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  20. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  21. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
  22. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  23. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  24. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
  25. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  26. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  27. package/lib/hooks/useActiveRoute.d.ts +3 -2
  28. package/lib/hooks/useActiveRoute.js.map +1 -1
  29. package/mobile/bundle/bundle.umd.js +15 -36
  30. package/mobile/bundle/bundle.umd.min.js +1 -1
  31. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  32. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  33. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  34. package/mobile/bundle/hooks/useActiveRoute.d.ts +3 -2
  35. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +11 -18
  36. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  37. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  38. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
  39. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  40. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  41. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
  42. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  43. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  44. package/mobile/dist/hooks/useActiveRoute.d.ts +3 -2
  45. package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
  46. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +12 -19
  47. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  48. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  49. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
  50. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  51. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  52. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
  53. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  54. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  55. package/mobile/lib/hooks/useActiveRoute.d.ts +3 -2
  56. package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
  57. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +28 -23
  58. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
  59. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
  60. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
  61. package/mobile/src/hooks/useActiveRoute.ts +3 -4
  62. package/package.json +1 -1
  63. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +28 -23
  64. package/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
  65. package/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
  66. package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
  67. package/src/hooks/useActiveRoute.ts +3 -4
  68. package/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  69. package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  70. package/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  71. package/dist/components/StickyBottomMenu/RenderItem.js +0 -25
  72. package/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
  73. package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  74. package/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
  75. package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  76. package/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  77. package/lib/components/StickyBottomMenu/RenderItem.js +0 -23
  78. package/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
  79. package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  80. package/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
  81. package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  82. package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  83. package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  84. package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  85. package/mobile/dist/components/StickyBottomMenu/RenderItem.js +0 -25
  86. package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
  87. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  88. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
  89. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  90. package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  91. package/mobile/lib/components/StickyBottomMenu/RenderItem.js +0 -23
  92. package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
  93. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  94. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
  95. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  96. package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
  97. package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
  98. package/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
  99. package/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
@@ -0,0 +1,42 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useLink } from '../../hooks/useLink';
3
+ import { projectSettings } from '../../ProjectSettings';
4
+ import { Icon } from '../../ui-kit/Icon/Icon';
5
+ import { style } from '../../utils/style';
6
+ import type { MenuItem } from './StickyBottomMenuContent';
7
+
8
+ interface StickyBottomMenuItemProps {
9
+ isActive?: boolean;
10
+ item?: MenuItem;
11
+ onClick?: () => void;
12
+ }
13
+
14
+ export const StickyBottomMenuItem = JSX<StickyBottomMenuItemProps>(
15
+ ({ isActive, item, onClick }) => {
16
+ const isAnotherPortal =
17
+ !projectSettings?.BASE_PATH || !item?.href?.startsWith(projectSettings.BASE_PATH);
18
+
19
+ const link = useLink({ isRemote: isAnotherPortal });
20
+ const { href, onClick: handleClick } = link({ href: item?.href, onClick });
21
+
22
+ return (
23
+ <a
24
+ className={style(
25
+ isActive ? 'text-primary-main' : 'text-primary-text',
26
+ `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
27
+ )}
28
+ href={href}
29
+ target="_self"
30
+ title={item?.title || ''}
31
+ onClick={handleClick}
32
+ >
33
+ <Icon
34
+ className="w-6 h-6"
35
+ name={item?.icon?.icon}
36
+ iconVersion={isActive ? 'color' : 'black'}
37
+ />
38
+ {item?.title || ''}
39
+ </a>
40
+ );
41
+ },
42
+ );
@@ -1,10 +1,6 @@
1
1
  import { type UniBlockProps } from '../../model/JSXBlock';
2
2
  import { type MenuItem, type StickyBottomMenuContent } from './StickyBottomMenuContent';
3
3
 
4
- export interface MenuItemProps extends MenuItem {
5
- isActive?: boolean;
6
- }
7
-
8
4
  export interface StickyBottomMenuProps extends StickyBottomMenuContent, UniBlockProps {
9
- menuItems?: MenuItemProps[];
5
+ menuItems?: MenuItem[];
10
6
  }
@@ -1,10 +1,9 @@
1
1
  import { isTopItemActive } from '../components/Header/isTopItemActive';
2
- import { type TopMenuItemProps } from '../services/sitemap/SitemapData';
3
2
  import { useRouter } from './useRouter';
4
3
 
5
- export function useActiveRoute(
6
- items: TopMenuItemProps[] | undefined = [],
7
- ): [number, TopMenuItemProps] {
4
+ export function useActiveRoute<T extends { href?: string }>(
5
+ items: T[] | undefined = [],
6
+ ): [number, T] {
8
7
  const router = useRouter();
9
8
  const activeIndex = items.findIndex(isTopItemActive(router));
10
9
 
@@ -1,8 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderItemProps {
3
- isActive?: boolean;
4
- item?: MenuItemProps;
5
- onClick?: () => void;
6
- }
7
- export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderMenuItems {
3
- menuItems: MenuItemProps[];
4
- onClick?: () => void;
5
- }
6
- export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderItemProps {
3
- isActive?: boolean;
4
- item?: MenuItemProps;
5
- onClick?: () => void;
6
- }
7
- export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
8
- export {};
@@ -1,25 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.RenderItem = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const useLink_1 = require("../../hooks/useLink");
6
- const ProjectSettings_1 = require("../../ProjectSettings");
7
- const Img_1 = require("../../ui-kit/Img/Img");
8
- const style_1 = require("../../utils/style");
9
- exports.RenderItem = (0, uni_jsx_1.JSX)(({ isActive, item, onClick }) => {
10
- const isAnotherPortal = ProjectSettings_1.projectSettings?.BASE_PATH
11
- ? !item?.href?.startsWith(ProjectSettings_1.projectSettings?.BASE_PATH)
12
- : true;
13
- const link = (0, useLink_1.useLink)({ isRemote: isAnotherPortal });
14
- const { href, target, onClick: handleClick, } = link({
15
- href: item?.href || '',
16
- target: '_self',
17
- });
18
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
19
- const iconVersion = isActiveItem ? 'color' : 'black';
20
- return ((0, jsx_runtime_1.jsxs)("a", { className: (0, style_1.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: [(0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-6 h-6", image: {
21
- icon: item?.icon?.icon,
22
- iconVersion: iconVersion,
23
- } }), item?.title || ''] }));
24
- });
25
- //# sourceMappingURL=RenderItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,2DAAwD;AACxD,8CAA2C;AAC3C,6CAA0C;AAS7B,QAAA,UAAU,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,iCAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,iCAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,+BACE,SAAS,EAAE,IAAA,aAAK,EACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,uBAAC,SAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderMenuItems {
3
- menuItems: MenuItemProps[];
4
- onClick?: () => void;
5
- }
6
- export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
7
- export {};
@@ -1,11 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.RenderMenuItems = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const useActiveRoute_1 = require("../../hooks/useActiveRoute");
6
- const RenderItem_1 = require("./RenderItem");
7
- exports.RenderMenuItems = (0, uni_jsx_1.JSX)(({ menuItems, onClick }) => {
8
- const [activeIndex] = (0, useActiveRoute_1.useActiveRoute)(menuItems);
9
- return ((0, jsx_runtime_1.jsx)("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => ((0, jsx_runtime_1.jsx)(RenderItem_1.RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
10
- });
11
- //# sourceMappingURL=RenderMenuItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAC5D,6CAA0C;AAQ7B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,IAAA,+BAAc,EAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,gCAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,uBAAC,uBAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderItemProps {
3
- isActive?: boolean;
4
- item?: MenuItemProps;
5
- onClick?: () => void;
6
- }
7
- export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
8
- export {};
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { useLink } from '../../hooks/useLink.js';
4
- import { projectSettings } from '../../ProjectSettings.js';
5
- import { Img } from '../../ui-kit/Img/Img.js';
6
- import { style } from '../../utils/style.js';
7
- export const RenderItem = JSX(({ isActive, item, onClick }) => {
8
- const isAnotherPortal = projectSettings?.BASE_PATH
9
- ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
10
- : true;
11
- const link = useLink({ isRemote: isAnotherPortal });
12
- const { href, target, onClick: handleClick, } = link({
13
- href: item?.href || '',
14
- target: '_self',
15
- });
16
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
17
- const iconVersion = isActiveItem ? 'color' : 'black';
18
- 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: {
19
- icon: item?.icon?.icon,
20
- iconVersion: iconVersion,
21
- } }), item?.title || ''] }));
22
- });
23
- //# sourceMappingURL=RenderItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,eAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,aACE,SAAS,EAAE,KAAK,CACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,KAAC,GAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderMenuItems {
3
- menuItems: MenuItemProps[];
4
- onClick?: () => void;
5
- }
6
- export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
7
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { useActiveRoute } from '../../hooks/useActiveRoute.js';
4
- import { RenderItem } from './RenderItem.js';
5
- export const RenderMenuItems = JSX(({ menuItems, onClick }) => {
6
- const [activeIndex] = useActiveRoute(menuItems);
7
- return (_jsx("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => (_jsx(RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
8
- });
9
- //# sourceMappingURL=RenderMenuItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,cAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,KAAC,UAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderItemProps {
3
- isActive?: boolean;
4
- item?: MenuItemProps;
5
- onClick?: () => void;
6
- }
7
- export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderMenuItems {
3
- menuItems: MenuItemProps[];
4
- onClick?: () => void;
5
- }
6
- export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderItemProps {
3
- isActive?: boolean;
4
- item?: MenuItemProps;
5
- onClick?: () => void;
6
- }
7
- export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
8
- export {};
@@ -1,25 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.RenderItem = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const useLink_1 = require("../../hooks/useLink");
6
- const ProjectSettings_1 = require("../../ProjectSettings");
7
- const Img_1 = require("../../ui-kit/Img/Img");
8
- const style_1 = require("../../utils/style");
9
- exports.RenderItem = (0, uni_jsx_1.JSX)(({ isActive, item, onClick }) => {
10
- const isAnotherPortal = ProjectSettings_1.projectSettings?.BASE_PATH
11
- ? !item?.href?.startsWith(ProjectSettings_1.projectSettings?.BASE_PATH)
12
- : true;
13
- const link = (0, useLink_1.useLink)({ isRemote: isAnotherPortal });
14
- const { href, target, onClick: handleClick, } = link({
15
- href: item?.href || '',
16
- target: '_self',
17
- });
18
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
19
- const iconVersion = isActiveItem ? 'color' : 'black';
20
- return ((0, jsx_runtime_1.jsxs)("a", { className: (0, style_1.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: [(0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-6 h-6", image: {
21
- icon: item?.icon?.icon,
22
- iconVersion: iconVersion,
23
- } }), item?.title || ''] }));
24
- });
25
- //# sourceMappingURL=RenderItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAC9C,2DAAwD;AACxD,8CAA2C;AAC3C,6CAA0C;AAS7B,QAAA,UAAU,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,iCAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,iCAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,+BACE,SAAS,EAAE,IAAA,aAAK,EACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,uBAAC,SAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderMenuItems {
3
- menuItems: MenuItemProps[];
4
- onClick?: () => void;
5
- }
6
- export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
7
- export {};
@@ -1,11 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.RenderMenuItems = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const useActiveRoute_1 = require("../../hooks/useActiveRoute");
6
- const RenderItem_1 = require("./RenderItem");
7
- exports.RenderMenuItems = (0, uni_jsx_1.JSX)(({ menuItems, onClick }) => {
8
- const [activeIndex] = (0, useActiveRoute_1.useActiveRoute)(menuItems);
9
- return ((0, jsx_runtime_1.jsx)("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => ((0, jsx_runtime_1.jsx)(RenderItem_1.RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
10
- });
11
- //# sourceMappingURL=RenderMenuItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAA4D;AAC5D,6CAA0C;AAQ7B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,IAAA,+BAAc,EAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,gCAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,uBAAC,uBAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderItemProps {
3
- isActive?: boolean;
4
- item?: MenuItemProps;
5
- onClick?: () => void;
6
- }
7
- export declare const RenderItem: import("@redneckz/uni-jsx").UNIComponent<RenderItemProps, any, any>;
8
- export {};
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { useLink } from '../../hooks/useLink.js';
4
- import { projectSettings } from '../../ProjectSettings.js';
5
- import { Img } from '../../ui-kit/Img/Img.js';
6
- import { style } from '../../utils/style.js';
7
- export const RenderItem = JSX(({ isActive, item, onClick }) => {
8
- const isAnotherPortal = projectSettings?.BASE_PATH
9
- ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
10
- : true;
11
- const link = useLink({ isRemote: isAnotherPortal });
12
- const { href, target, onClick: handleClick, } = link({
13
- href: item?.href || '',
14
- target: '_self',
15
- });
16
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
17
- const iconVersion = isActiveItem ? 'color' : 'black';
18
- 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: {
19
- icon: item?.icon?.icon,
20
- iconVersion: iconVersion,
21
- } }), item?.title || ''] }));
22
- });
23
- //# sourceMappingURL=RenderItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderItem.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,eAAe,GAAG,eAAe,EAAE,SAAS;QAChD,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC;QACrD,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,MAAM,EACJ,IAAI,EACJ,MAAM,EACN,OAAO,EAAE,WAAW,GACrB,GAAG,IAAI,CAAC;QACP,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,EAAE;QACtB,MAAM,EAAE,OAAO;KAChB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAErD,OAAO,CACL,aACE,SAAS,EAAE,KAAK,CACd,YAAY,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,EACxD,2EAA2E,CAC5E,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,EACzF,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,aAEd,KAAC,GAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;oBACtB,WAAW,EAAE,WAAW;iBACzB,GACD,EACD,IAAI,EAAE,KAAK,IAAI,EAAE,IAChB,CACL,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type MenuItemProps } from './StickyBottomMenuProps';
2
- interface RenderMenuItems {
3
- menuItems: MenuItemProps[];
4
- onClick?: () => void;
5
- }
6
- export declare const RenderMenuItems: import("@redneckz/uni-jsx").UNIComponent<RenderMenuItems, any, any>;
7
- export {};
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { useActiveRoute } from '../../hooks/useActiveRoute.js';
4
- import { RenderItem } from './RenderItem.js';
5
- export const RenderMenuItems = JSX(({ menuItems, onClick }) => {
6
- const [activeIndex] = useActiveRoute(menuItems);
7
- return (_jsx("div", { className: "ml-auto container bg-white flex justify-center shadow-blue-gray", children: menuItems.map((_, i) => (_jsx(RenderItem, { isActive: i === activeIndex, item: _, onClick: onClick }, String(i)))) }));
8
- });
9
- //# sourceMappingURL=RenderMenuItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderMenuItems.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/RenderMenuItems.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC7E,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,cAAK,SAAS,EAAC,iEAAiE,YAC7E,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,KAAC,UAAU,IAAiB,QAAQ,EAAE,CAAC,KAAK,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAjE,MAAM,CAAC,CAAC,CAAC,CAA4D,CACvF,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,51 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useLink } from '../../hooks/useLink';
3
- import { projectSettings } from '../../ProjectSettings';
4
- import { Img } from '../../ui-kit/Img/Img';
5
- import { style } from '../../utils/style';
6
- import { type MenuItemProps } from './StickyBottomMenuProps';
7
-
8
- interface RenderItemProps {
9
- isActive?: boolean;
10
- item?: MenuItemProps;
11
- onClick?: () => void;
12
- }
13
-
14
- export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
15
- const isAnotherPortal = projectSettings?.BASE_PATH
16
- ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
17
- : true;
18
-
19
- const link = useLink({ isRemote: isAnotherPortal });
20
- const {
21
- href,
22
- target,
23
- onClick: handleClick,
24
- } = link({
25
- href: item?.href || '',
26
- target: '_self',
27
- });
28
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
29
- const iconVersion = isActiveItem ? 'color' : 'black';
30
-
31
- return (
32
- <a
33
- className={style(
34
- isActiveItem ? 'text-primary-main' : 'text-primary-text',
35
- `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
36
- )}
37
- onClick={() => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick())}
38
- href={href}
39
- target={target}
40
- >
41
- <Img
42
- className="w-6 h-6"
43
- image={{
44
- icon: item?.icon?.icon,
45
- iconVersion: iconVersion,
46
- }}
47
- />
48
- {item?.title || ''}
49
- </a>
50
- );
51
- });
@@ -1,21 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useActiveRoute } from '../../hooks/useActiveRoute';
3
- import { RenderItem } from './RenderItem';
4
- import { type MenuItemProps } from './StickyBottomMenuProps';
5
-
6
- interface RenderMenuItems {
7
- menuItems: MenuItemProps[];
8
- onClick?: () => void;
9
- }
10
-
11
- export const RenderMenuItems = JSX<RenderMenuItems>(({ menuItems, onClick }) => {
12
- const [activeIndex] = useActiveRoute(menuItems);
13
-
14
- return (
15
- <div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
16
- {menuItems.map((_, i) => (
17
- <RenderItem key={String(i)} isActive={i === activeIndex} item={_} onClick={onClick} />
18
- ))}
19
- </div>
20
- );
21
- });
@@ -1,51 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useLink } from '../../hooks/useLink';
3
- import { projectSettings } from '../../ProjectSettings';
4
- import { Img } from '../../ui-kit/Img/Img';
5
- import { style } from '../../utils/style';
6
- import { type MenuItemProps } from './StickyBottomMenuProps';
7
-
8
- interface RenderItemProps {
9
- isActive?: boolean;
10
- item?: MenuItemProps;
11
- onClick?: () => void;
12
- }
13
-
14
- export const RenderItem = JSX<RenderItemProps>(({ isActive, item, onClick }) => {
15
- const isAnotherPortal = projectSettings?.BASE_PATH
16
- ? !item?.href?.startsWith(projectSettings?.BASE_PATH)
17
- : true;
18
-
19
- const link = useLink({ isRemote: isAnotherPortal });
20
- const {
21
- href,
22
- target,
23
- onClick: handleClick,
24
- } = link({
25
- href: item?.href || '',
26
- target: '_self',
27
- });
28
- const isActiveItem = item?.icon?.icon === 'BurgerIcon' ? item.isActive : isActive;
29
- const iconVersion = isActiveItem ? 'color' : 'black';
30
-
31
- return (
32
- <a
33
- className={style(
34
- isActiveItem ? 'text-primary-main' : 'text-primary-text',
35
- `w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer`,
36
- )}
37
- onClick={() => (item?.icon?.icon === 'BurgerIcon' && onClick ? onClick() : handleClick())}
38
- href={href}
39
- target={target}
40
- >
41
- <Img
42
- className="w-6 h-6"
43
- image={{
44
- icon: item?.icon?.icon,
45
- iconVersion: iconVersion,
46
- }}
47
- />
48
- {item?.title || ''}
49
- </a>
50
- );
51
- });
@@ -1,21 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useActiveRoute } from '../../hooks/useActiveRoute';
3
- import { RenderItem } from './RenderItem';
4
- import { type MenuItemProps } from './StickyBottomMenuProps';
5
-
6
- interface RenderMenuItems {
7
- menuItems: MenuItemProps[];
8
- onClick?: () => void;
9
- }
10
-
11
- export const RenderMenuItems = JSX<RenderMenuItems>(({ menuItems, onClick }) => {
12
- const [activeIndex] = useActiveRoute(menuItems);
13
-
14
- return (
15
- <div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
16
- {menuItems.map((_, i) => (
17
- <RenderItem key={String(i)} isActive={i === activeIndex} item={_} onClick={onClick} />
18
- ))}
19
- </div>
20
- );
21
- });