@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.
Files changed (127) hide show
  1. package/bundle/bundle.umd.js +4 -19
  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/dist/ui-kit/YandexMap/YandexMap.js +1 -2
  19. package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
  20. package/lib/common.css +1 -1
  21. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +12 -19
  22. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  23. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  24. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
  25. package/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  26. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  27. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
  28. package/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  29. package/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  30. package/lib/hooks/useActiveRoute.d.ts +3 -2
  31. package/lib/hooks/useActiveRoute.js.map +1 -1
  32. package/lib/ui-kit/YandexMap/YandexMap.js +1 -2
  33. package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
  34. package/mobile/bundle/bundle.umd.js +18 -54
  35. package/mobile/bundle/bundle.umd.min.js +1 -1
  36. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  37. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  38. package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  39. package/mobile/bundle/hooks/useActiveRoute.d.ts +3 -2
  40. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +11 -18
  41. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  42. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  43. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js +8 -0
  44. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  45. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  46. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js +15 -0
  47. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  48. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  49. package/mobile/dist/hooks/useActiveRoute.d.ts +3 -2
  50. package/mobile/dist/hooks/useActiveRoute.js.map +1 -1
  51. package/mobile/dist/ui-kit/YandexMap/YandexMap.js +1 -2
  52. package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
  53. package/mobile/lib/common.css +1 -1
  54. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +12 -19
  55. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  56. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.d.ts +6 -0
  57. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js +6 -0
  58. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuBurger.js.map +1 -0
  59. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.d.ts +8 -0
  60. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js +13 -0
  61. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuItem.js.map +1 -0
  62. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuProps.d.ts +1 -4
  63. package/mobile/lib/hooks/useActiveRoute.d.ts +3 -2
  64. package/mobile/lib/hooks/useActiveRoute.js.map +1 -1
  65. package/mobile/lib/ui-kit/YandexMap/YandexMap.js +1 -2
  66. package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
  67. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +28 -23
  68. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
  69. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
  70. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
  71. package/mobile/src/hooks/useActiveRoute.ts +3 -4
  72. package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +0 -4
  73. package/package.json +1 -1
  74. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +28 -23
  75. package/src/components/StickyBottomMenu/StickyBottomMenuBurger.tsx +21 -0
  76. package/src/components/StickyBottomMenu/StickyBottomMenuItem.tsx +42 -0
  77. package/src/components/StickyBottomMenu/StickyBottomMenuProps.tsx +1 -5
  78. package/src/hooks/useActiveRoute.ts +3 -4
  79. package/src/ui-kit/YandexMap/YandexMap.tsx +0 -4
  80. package/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  81. package/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  82. package/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
  83. package/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  84. package/dist/components/StickyBottomMenu/RenderItem.js +0 -25
  85. package/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
  86. package/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  87. package/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
  88. package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  89. package/dist/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
  90. package/dist/ui-kit/YandexMap/renderOpenMap.js +0 -19
  91. package/dist/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
  92. package/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  93. package/lib/components/StickyBottomMenu/RenderItem.js +0 -23
  94. package/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
  95. package/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  96. package/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
  97. package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  98. package/lib/ui-kit/YandexMap/renderOpenMap.d.ts +0 -1
  99. package/lib/ui-kit/YandexMap/renderOpenMap.js +0 -16
  100. package/lib/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
  101. package/mobile/bundle/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  102. package/mobile/bundle/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  103. package/mobile/bundle/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
  104. package/mobile/dist/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  105. package/mobile/dist/components/StickyBottomMenu/RenderItem.js +0 -25
  106. package/mobile/dist/components/StickyBottomMenu/RenderItem.js.map +0 -1
  107. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  108. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +0 -11
  109. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  110. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
  111. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js +0 -19
  112. package/mobile/dist/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
  113. package/mobile/lib/components/StickyBottomMenu/RenderItem.d.ts +0 -8
  114. package/mobile/lib/components/StickyBottomMenu/RenderItem.js +0 -23
  115. package/mobile/lib/components/StickyBottomMenu/RenderItem.js.map +0 -1
  116. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.d.ts +0 -7
  117. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +0 -9
  118. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +0 -1
  119. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.d.ts +0 -2
  120. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js +0 -16
  121. package/mobile/lib/ui-kit/YandexMap/renderOpenMap.js.map +0 -1
  122. package/mobile/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
  123. package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
  124. package/mobile/src/ui-kit/YandexMap/renderOpenMap.tsx +0 -26
  125. package/src/components/StickyBottomMenu/RenderItem.tsx +0 -51
  126. package/src/components/StickyBottomMenu/RenderMenuItems.tsx +0 -21
  127. package/src/ui-kit/YandexMap/renderOpenMap.tsx +0 -26
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const renderOpenMap: (pointsCenter: number[]) => JSX.Element;
@@ -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,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const renderOpenMap: (pointsCenter: number[]) => JSX.Element;
@@ -1,19 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.renderOpenMap = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const styles = {
5
- focus: 'focus:border-primary-text focus:border',
6
- hover: 'hover:bg-primary-hover',
7
- active: 'active:bg-primary-active',
8
- border: 'border border-transparent rounded-md',
9
- position: 'flex items-center justify-center',
10
- font: 'text-center font-sans',
11
- };
12
- const renderOpenMap = (pointsCenter) => {
13
- const getYandexMapUrl = () => {
14
- return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
15
- };
16
- return ((0, jsx_runtime_1.jsx)("a", { className: `select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(styles).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
17
- };
18
- exports.renderOpenMap = renderOpenMap;
19
- //# sourceMappingURL=renderOpenMap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderOpenMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderOpenMap.tsx"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,wCAAwC;IAC/C,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,0BAA0B;IAClC,MAAM,EAAE,sCAAsC;IAC9C,QAAQ,EAAE,kCAAkC;IAC5C,IAAI,EAAE,uBAAuB;CAC9B,CAAC;AAEK,MAAM,aAAa,GAAG,CAAC,YAAsB,EAAE,EAAE;IACtD,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,OAAO,8BAA8B,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;IACvF,CAAC,CAAC;IAEF,OAAO,CACL,8BACE,SAAS,EAAE,qEAAqE,MAAM,CAAC,MAAM,CAC3F,MAAM,CACP,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACb,IAAI,EAAE,eAAe,EAAE,EACvB,MAAM,EAAC,QAAQ,uGAGb,CACL,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,aAAa,iBAgBxB"}
@@ -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,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const renderOpenMap: (pointsCenter: number[]) => JSX.Element;
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- const styles = {
3
- focus: 'focus:border-primary-text focus:border',
4
- hover: 'hover:bg-primary-hover',
5
- active: 'active:bg-primary-active',
6
- border: 'border border-transparent rounded-md',
7
- position: 'flex items-center justify-center',
8
- font: 'text-center font-sans',
9
- };
10
- export const renderOpenMap = (pointsCenter) => {
11
- const getYandexMapUrl = () => {
12
- return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
13
- };
14
- return (_jsx("a", { className: `select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(styles).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
15
- };
16
- //# sourceMappingURL=renderOpenMap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderOpenMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderOpenMap.tsx"],"names":[],"mappings":";AAAA,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,wCAAwC;IAC/C,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,0BAA0B;IAClC,MAAM,EAAE,sCAAsC;IAC9C,QAAQ,EAAE,kCAAkC;IAC5C,IAAI,EAAE,uBAAuB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,YAAsB,EAAE,EAAE;IACtD,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,OAAO,8BAA8B,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;IACvF,CAAC,CAAC;IAEF,OAAO,CACL,YACE,SAAS,EAAE,qEAAqE,MAAM,CAAC,MAAM,CAC3F,MAAM,CACP,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACb,IAAI,EAAE,eAAe,EAAE,EACvB,MAAM,EAAC,QAAQ,uGAGb,CACL,CAAC;AACJ,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,26 +0,0 @@
1
- const styles = {
2
- focus: 'focus:border-primary-text focus:border',
3
- hover: 'hover:bg-primary-hover',
4
- active: 'active:bg-primary-active',
5
- border: 'border border-transparent rounded-md',
6
- position: 'flex items-center justify-center',
7
- font: 'text-center font-sans',
8
- };
9
-
10
- export const renderOpenMap = (pointsCenter: number[]) => {
11
- const getYandexMapUrl = () => {
12
- return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
13
- };
14
-
15
- return (
16
- <a
17
- className={`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(
18
- styles,
19
- ).join(' ')}`}
20
- href={getYandexMapUrl()}
21
- target="_blank"
22
- >
23
- Открыть на карте
24
- </a>
25
- );
26
- };
@@ -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,26 +0,0 @@
1
- const styles = {
2
- focus: 'focus:border-primary-text focus:border',
3
- hover: 'hover:bg-primary-hover',
4
- active: 'active:bg-primary-active',
5
- border: 'border border-transparent rounded-md',
6
- position: 'flex items-center justify-center',
7
- font: 'text-center font-sans',
8
- };
9
-
10
- export const renderOpenMap = (pointsCenter: number[]) => {
11
- const getYandexMapUrl = () => {
12
- return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
13
- };
14
-
15
- return (
16
- <a
17
- className={`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(
18
- styles,
19
- ).join(' ')}`}
20
- href={getYandexMapUrl()}
21
- target="_blank"
22
- >
23
- Открыть на карте
24
- </a>
25
- );
26
- };