infinity-forge 0.56.4 → 0.56.5
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/dist/system/presentation/components/layout/sidebar-menu/index.js +7 -15
- package/dist/system/presentation/components/layout/sidebar-menu/index.js.map +1 -1
- package/dist/system/presentation/components/layout/sidebar-menu/styles.d.ts +1 -6
- package/dist/system/presentation/components/layout/sidebar-menu/styles.js +6 -29
- package/dist/system/presentation/components/layout/sidebar-menu/styles.js.map +1 -1
- package/dist/system/presentation/context/menu/context.js +8 -10
- package/dist/system/presentation/context/menu/context.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.SidebarMenu = void 0;
|
|
30
30
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
+
var react_1 = require("react");
|
|
31
32
|
var link_1 = __importDefault(require("next/link"));
|
|
32
33
|
var router_1 = require("next/router");
|
|
33
34
|
var ui_1 = require("../../../../../ui/index.js");
|
|
@@ -43,10 +44,9 @@ function MenuItem(_a) {
|
|
|
43
44
|
var _a;
|
|
44
45
|
return ((0, jsx_runtime_1.jsxs)("span", { className: 'font-13-regular', children: [(item === null || item === void 0 ? void 0 : item.icon) && (0, jsx_runtime_1.jsx)("div", { className: 'icon', dangerouslySetInnerHTML: { __html: item.icon } }), (0, jsx_runtime_1.jsx)("span", { className: 'content-title', children: item === null || item === void 0 ? void 0 : item.title }), ((_a = item === null || item === void 0 ? void 0 : item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((0, jsx_runtime_1.jsx)("div", { className: 'arrow', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconKeyboardRightArrow' }) }))] }));
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
// const isFatherActive = hasMenuItems && item.route && path.includes(item.route.replaceAll('/', ''))
|
|
47
48
|
// const isActive = path.substring(0, path.length - 1) === item.route || isFatherActive
|
|
48
|
-
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)("li", { children: [item.route ? ((0, jsx_runtime_1.jsx)(link_1.default, { href: item.route, className: "item-title font-13-regular", children: (0, jsx_runtime_1.jsx)(ItemContent, {}) })) : ((0, jsx_runtime_1.jsx)("div", { className: "item-title", children: (0, jsx_runtime_1.jsx)(ItemContent, {}) })), hasMenuItems && (0, jsx_runtime_1.jsx)(SubMenu, { index: index, item: item === null || item === void 0 ? void 0 : item.items }, 'submenu' + item.title)] }));
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)("li", { className: false ? 'active' : '', children: [item.route ? ((0, jsx_runtime_1.jsx)(link_1.default, { href: item.route, className: "item-title font-13-regular ".concat(false ? 'active' : ''), children: (0, jsx_runtime_1.jsx)(ItemContent, {}) })) : ((0, jsx_runtime_1.jsx)("div", { className: "item-title ".concat(false ? 'active' : ''), children: (0, jsx_runtime_1.jsx)(ItemContent, {}) })), hasMenuItems && (0, jsx_runtime_1.jsx)(SubMenu, { index: index, item: item === null || item === void 0 ? void 0 : item.items }, 'submenu' + item.title)] }));
|
|
50
50
|
}
|
|
51
51
|
function SubMenu(_a) {
|
|
52
52
|
var item = _a.item, index = _a.index;
|
|
@@ -54,19 +54,11 @@ function SubMenu(_a) {
|
|
|
54
54
|
}
|
|
55
55
|
function SidebarMenu() {
|
|
56
56
|
var _a;
|
|
57
|
+
var _b = (0, react_1.useState)(false), expand = _b[0], setExpand = _b[1];
|
|
57
58
|
var data = (0, system_1.useLoadMenu)().data;
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
zIndex: '99999999999',
|
|
62
|
-
position: 'fixed',
|
|
63
|
-
top: 0,
|
|
64
|
-
left: 0,
|
|
65
|
-
width: '100vw',
|
|
66
|
-
height: '100dvh',
|
|
67
|
-
background: 'rgba(0, 0, 0, 0.5)',
|
|
68
|
-
};
|
|
69
|
-
return ((0, jsx_runtime_1.jsxs)(ui_1.Error, { name: 'Menu', children: [isExpadedMenu && (0, jsx_runtime_1.jsx)("div", { id: 'ghost_menu_expanded', style: { width: '65px' } }), openMenu && settings.position === 'internal' && ((0, jsx_runtime_1.jsx)("div", { style: overlayStyle, className: 'overlay', onClick: function () { return setOpenMenu(false); } })), (0, jsx_runtime_1.jsxs)(S.Menu, { id: 'sidebar', "$sidebarMode": settings === null || settings === void 0 ? void 0 : settings.mode, className: openMenu ? 'open' : '', "$sidebarPosition": settings === null || settings === void 0 ? void 0 : settings.position, children: [isExpadedMenu && ((0, jsx_runtime_1.jsx)("button", { type: 'button', className: 'expand', onClick: function () { return setOpenMenu(function (s) { return !s; }); }, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconArrowRight' }) })), (_a = data === null || data === void 0 ? void 0 : data.items) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return ((0, jsx_runtime_1.jsx)("ul", { children: (0, jsx_runtime_1.jsx)(MenuItem, { item: item, index: index }, 'menu-item' + index + item.title) })); })] })] }));
|
|
59
|
+
var settings = (0, system_1.useMenu)().settings;
|
|
60
|
+
var expandedMenu = settings.mode === "expandedMenu";
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(ui_1.Error, { name: 'Menu', children: [expandedMenu && (0, jsx_runtime_1.jsx)("div", { id: 'ghost_menu_expanded', style: { width: '65px' } }), (0, jsx_runtime_1.jsxs)(S.Menu, { id: 'sidebar', className: (expand ? 'menu expanded' : 'menu') + (expandedMenu ? ' expanded_menu' : ''), children: [expandedMenu && ((0, jsx_runtime_1.jsx)("button", { type: 'button', className: 'expand', onClick: function () { return setExpand(function (s) { return !s; }); }, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconArrowRight' }) })), (_a = data === null || data === void 0 ? void 0 : data.items) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return ((0, jsx_runtime_1.jsx)("ul", { children: (0, jsx_runtime_1.jsx)(MenuItem, { item: item, index: index }, 'menu-item' + index + item.title) })); })] })] }));
|
|
70
62
|
}
|
|
71
63
|
exports.SidebarMenu = SidebarMenu;
|
|
72
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/system/presentation/components/layout/sidebar-menu/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/system/presentation/components/layout/sidebar-menu/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAgC;AAEhC,mDAA4B;AAC5B,sCAAuC;AAEvC,2BAAkC;AAClC,mCAA+C;AAE/C,0CAA6B;AAE7B,SAAS,QAAQ,CAAC,EAA6C;;QAA3C,IAAI,UAAA,EAAE,KAAK,WAAA;IAC7B,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAA;IAC1B,IAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAA;IAE1B,IAAM,YAAY,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,KAAI,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,MAAM,IAAG,CAAC,CAAA;IAE1D,SAAS,WAAW;;QAClB,OAAO,CACL,kCAAM,SAAS,EAAC,iBAAiB,aAC9B,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,gCAAK,SAAS,EAAC,MAAM,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,GAAI,EAEvF,iCAAM,SAAS,EAAC,eAAe,YAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,GAAQ,EAEnD,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,MAAM,IAAG,CAAC,IAAI,CAC1B,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
|
|
3
|
-
$sidebarMode: 'expandedMenu' | 'auto';
|
|
4
|
-
$sidebarPosition?: 'internal' | 'auto';
|
|
5
|
-
}
|
|
6
|
-
export declare const Menu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IStyledMenu>> & string;
|
|
2
|
+
export declare const Menu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
3
|
export declare const SubMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {
|
|
8
4
|
$index: number;
|
|
9
5
|
}>> & string;
|
|
10
|
-
export {};
|
|
@@ -3,36 +3,13 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
8
|
};
|
|
29
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
10
|
exports.SubMenu = exports.Menu = void 0;
|
|
31
|
-
var styled_components_1 =
|
|
32
|
-
var internalStyles = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* Estilos espec\u00EDficos para o modo auto */\n left: -100%;\n position: fixed;\n transition: left 0.2s;\n top: 0;\n z-index: 9999999999999999 !important;\n\n &.open {\n left: 0;\n }\n"], ["\n /* Estilos espec\u00EDficos para o modo auto */\n left: -100%;\n position: fixed;\n transition: left 0.2s;\n top: 0;\n z-index: 9999999999999999 !important;\n\n &.open {\n left: 0;\n }\n"])));
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
exports.Menu = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 100%;\n padding-right: clamp(5px, 0.78vw, 15px);\n border-right: 1px solid #e1e1e1;\n display: flex;\n flex-direction: column;\n left: 0;\n top: 0;\n height: 100%;\n min-height: 100vh;\n z-index: 999;\n background: #fff;\n\n ", "\n ", "\n ", "\n\n ul {\n margin: 0 !important;\n }\n\n ul + ul {\n margin-top: 2px !important;\n }\n\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 10px;\n }\n\n &::-webkit-scrollbar-track {\n background: #ccc;\n border-radius: 10px;\n }\n\n a {\n text-decoration: none;\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n margin-top: 0;\n margin-bottom: clamp(10px, 0.75vw, 15px);\n\n li + li {\n margin-top: 4px;\n }\n\n ul {\n display: none;\n padding: 4px;\n\n * {\n color: ", " !important;\n }\n\n li {\n padding: 0;\n\n &.active {\n background: none;\n }\n\n ul {\n display: none;\n margin-bottom: 0 !important;\n }\n\n .item-title {\n &:hover,\n &.active {\n background: #e1e1e1 !important;\n }\n }\n }\n }\n\n li {\n position: relative !important;\n z-index: 9999;\n width: 100%;\n\n ul {\n display: none;\n }\n\n &.active {\n background: ", ";\n border-radius: 5px;\n\n a,\n span {\n color: #fff;\n }\n\n svg {\n fill: #fff !important;\n }\n }\n\n &:hover {\n > ul {\n display: block;\n }\n }\n }\n }\n\n .title {\n color: #828282;\n margin-bottom: clamp(3px, 0.5vw, 10px);\n padding-left: clamp(5px, 0.78vw, 15px);\n\n .dark & {\n color: #4b5563;\n }\n }\n\n .item-title {\n border-radius: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition: transform 0.1s ease-in-out;\n font-weight: 400;\n padding: 0 clamp(5px, 0.78vw, 15px);\n height: clamp(34px, 2.08vw, 40px);\n display: flex;\n position: relative;\n z-index: 2222;\n\n > span {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n color: ", ";\n\n .icon {\n width: 20px;\n height: 20px;\n display: flex;\n transition: 0.1s linear;\n margin-left: 0;\n\n > svg {\n width: 100%;\n height: auto;\n fill: #828282;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n\n > span {\n color: #fff;\n margin-right: 0;\n transition: 0.3s linear;\n\n .icon {\n margin-left: 10px;\n\n > svg {\n fill: #fff !important;\n }\n }\n }\n }\n }\n\n .arrow {\n width: 7px;\n margin: 0 0 0 auto;\n display: flex;\n\n svg {\n width: 100%;\n height: auto;\n fill: currentColor;\n }\n }\n\n @media only screen and (max-width: 1400px) {\n .icon {\n width: 14px !important;\n height: 14px !important;\n }\n\n span {\n font-size: 13.5px;\n }\n }\n\n @media only screen and (max-width: 1200px) {\n .icon {\n width: 17px !important;\n height: 17px !important;\n }\n\n span {\n font-size: 13px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n .icon {\n width: 16px !important;\n height: 16px !important;\n }\n\n span {\n font-size: 12px;\n }\n }\n"], ["\n width: 100%;\n padding-right: clamp(5px, 0.78vw, 15px);\n border-right: 1px solid #e1e1e1;\n display: flex;\n flex-direction: column;\n left: 0;\n top: 0;\n height: 100%;\n min-height: 100vh;\n z-index: 999;\n background: #fff;\n\n ", "\n ", "\n ", "\n\n ul {\n margin: 0 !important;\n }\n\n ul + ul {\n margin-top: 2px !important;\n }\n\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 10px;\n }\n\n &::-webkit-scrollbar-track {\n background: #ccc;\n border-radius: 10px;\n }\n\n a {\n text-decoration: none;\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n margin-top: 0;\n margin-bottom: clamp(10px, 0.75vw, 15px);\n\n li + li {\n margin-top: 4px;\n }\n\n ul {\n display: none;\n padding: 4px;\n\n * {\n color: ", " !important;\n }\n\n li {\n padding: 0;\n\n &.active {\n background: none;\n }\n\n ul {\n display: none;\n margin-bottom: 0 !important;\n }\n\n .item-title {\n &:hover,\n &.active {\n background: #e1e1e1 !important;\n }\n }\n }\n }\n\n li {\n position: relative !important;\n z-index: 9999;\n width: 100%;\n\n ul {\n display: none;\n }\n\n &.active {\n background: ", ";\n border-radius: 5px;\n\n a,\n span {\n color: #fff;\n }\n\n svg {\n fill: #fff !important;\n }\n }\n\n &:hover {\n > ul {\n display: block;\n }\n }\n }\n }\n\n .title {\n color: #828282;\n margin-bottom: clamp(3px, 0.5vw, 10px);\n padding-left: clamp(5px, 0.78vw, 15px);\n\n .dark & {\n color: #4b5563;\n }\n }\n\n .item-title {\n border-radius: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition: transform 0.1s ease-in-out;\n font-weight: 400;\n padding: 0 clamp(5px, 0.78vw, 15px);\n height: clamp(34px, 2.08vw, 40px);\n display: flex;\n position: relative;\n z-index: 2222;\n\n > span {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n color: ", ";\n\n .icon {\n width: 20px;\n height: 20px;\n display: flex;\n transition: 0.1s linear;\n margin-left: 0;\n\n > svg {\n width: 100%;\n height: auto;\n fill: #828282;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n\n > span {\n color: #fff;\n margin-right: 0;\n transition: 0.3s linear;\n\n .icon {\n margin-left: 10px;\n\n > svg {\n fill: #fff !important;\n }\n }\n }\n }\n }\n\n .arrow {\n width: 7px;\n margin: 0 0 0 auto;\n display: flex;\n\n svg {\n width: 100%;\n height: auto;\n fill: currentColor;\n }\n }\n\n @media only screen and (max-width: 1400px) {\n .icon {\n width: 14px !important;\n height: 14px !important;\n }\n\n span {\n font-size: 13.5px;\n }\n }\n\n @media only screen and (max-width: 1200px) {\n .icon {\n width: 17px !important;\n height: 17px !important;\n }\n\n span {\n font-size: 13px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n .icon {\n width: 16px !important;\n height: 16px !important;\n }\n\n span {\n font-size: 12px;\n }\n }\n"])), function (props) { return props.$sidebarMode === 'expandedMenu' && expandedMenuStyles; }, function (props) { return props.$sidebarMode === 'auto' && autoStyles; }, function (props) { return props.$sidebarPosition === 'internal' && internalStyles; }, function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; });
|
|
36
|
-
exports.SubMenu = styled_components_1.default.ul(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border-radius: 5px;\n padding: 12px 8px;\n z-index: 24;\n position: absolute;\n top: ", ";\n bottom: ", ";\n left: 100%;\n z-index: 9999;\n background-color: #ffffff;\n border: 1px solid #d1d5db;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n transition: background-color 0.3s, border-color 0.3s;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n"], ["\n border-radius: 5px;\n padding: 12px 8px;\n z-index: 24;\n position: absolute;\n top: ", ";\n bottom: ", ";\n left: 100%;\n z-index: 9999;\n background-color: #ffffff;\n border: 1px solid #d1d5db;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n transition: background-color 0.3s, border-color 0.3s;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n"])), function (props) { return (props.$index <= 6 ? 0 : undefined); }, function (props) { return (props.$index > 6 ? 0 : undefined); });
|
|
37
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.Menu = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n position: relative;\n padding-right: clamp(5px, 0.78vw, 15px);\n width: 285px;\n padding: 0 0 15px 0;\n border-right: 1px solid #e1e1e1;\n display: flex;\n flex-direction: column;\n left: 0;\n top: 0;\n height: 100%;\n min-height: 100vh;\n z-index: 999;\n background: #fff;\n padding-top: 25px;\n\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 10px;\n }\n\n &::-webkit-scrollbar-track {\n background: #ccc;\n border-radius: 10px;\n }\n\n a {\n text-decoration: none;\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n margin-top: 0;\n margin-bottom: clamp(10px, 0.75vw, 15px);\n\n li + li {\n margin-top: 4px;\n }\n\n ul {\n display: none;\n padding: 4px;\n\n * {\n color: ", " !important;\n }\n\n li {\n padding: 0;\n\n &.active {\n background: none;\n }\n\n ul {\n display: none;\n }\n\n .item-title {\n &:hover,\n &.active {\n background: #e1e1e1 !important;\n }\n }\n }\n }\n\n li {\n position: relative !important;\n z-index: 9999;\n width: 100%;\n\n ul {\n display: none;\n }\n\n &.active {\n background: ", ";\n border-radius: 5px;\n\n a,\n span {\n color: #fff;\n }\n\n svg {\n fill: #fff !important;\n }\n }\n\n &:hover {\n > ul {\n display: block;\n }\n }\n }\n }\n\n .title {\n color: #828282;\n margin-bottom: clamp(3px, 0.5vw, 10px);\n padding-left: clamp(5px, 0.78vw, 15px);\n\n .dark & {\n color: #4b5563;\n }\n }\n\n .item-title {\n border-radius: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition: transform 0.1s ease-in-out;\n font-weight: 400;\n padding: 0 clamp(5px, 0.78vw, 15px);\n height: clamp(34px, 2.08vw, 40px);\n display: flex;\n position: relative;\n z-index: 2222;\n\n > span {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n color: ", ";\n\n .icon {\n width: 20px;\n height: 20px;\n display: flex;\n transition: 0.1s linear;\n margin-left: 0;\n\n > svg {\n width: 100%;\n height: auto;\n fill: #828282;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n\n > span {\n color: #fff;\n margin-right: 0;\n transition: 0.3s linear;\n\n .icon {\n margin-left: 10px;\n\n > svg {\n fill: #fff !important;\n }\n }\n }\n }\n }\n\n .arrow {\n width: 7px;\n margin: 0 0 0 auto;\n display: flex;\n\n svg {\n width: 100%;\n height: auto;\n fill: currentColor;\n }\n }\n\n &.expanded_menu {\n width: 65px !important;\n padding-top: 41px;\n transition: 0.3s;\n position: absolute;\n\n .expand {\n position: absolute;\n top: 10px;\n right: -12px;\n width: 24px;\n height: 24px;\n border-radius: 100%;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n border: 0;\n\n svg {\n width: 5px;\n fill: #fff;\n height: auto;\n }\n }\n\n > ul {\n > li {\n > .item-title {\n .content-title {\n display: none;\n }\n\n .arrow {\n display: none;\n }\n }\n }\n }\n\n ul {\n .submenu {\n min-width: 265px;\n }\n }\n\n .item-title {\n padding-left: 22px;\n\n &:hover {\n > span {\n .icon {\n margin-left: 0;\n\n > svg {\n fill: #fff !important;\n }\n }\n }\n }\n }\n\n &.expanded {\n width: 240px !important;\n transition: 0.3s;\n\n .expand {\n svg {\n transform: rotate(180deg);\n }\n }\n\n > ul {\n > li {\n > .item-title {\n .content-title {\n display: block;\n }\n\n .arrow {\n display: block;\n }\n }\n }\n }\n }\n }\n\n @media only screen and (max-width: 1400px) {\n .icon {\n width: 14px !important;\n height: 14px !important;\n }\n\n span {\n font-size: 13.5px;\n }\n }\n\n @media only screen and (max-width: 1200px) {\n .icon {\n width: 17px !important;\n height: 17px !important;\n }\n\n span {\n font-size: 13px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n .icon {\n width: 16px !important;\n height: 16px !important;\n }\n\n span {\n font-size: 12px;\n }\n }\n"], ["\n width: 100%;\n position: relative;\n padding-right: clamp(5px, 0.78vw, 15px);\n width: 285px;\n padding: 0 0 15px 0;\n border-right: 1px solid #e1e1e1;\n display: flex;\n flex-direction: column;\n left: 0;\n top: 0;\n height: 100%;\n min-height: 100vh;\n z-index: 999;\n background: #fff;\n padding-top: 25px;\n\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 10px;\n }\n\n &::-webkit-scrollbar-track {\n background: #ccc;\n border-radius: 10px;\n }\n\n a {\n text-decoration: none;\n }\n\n ul {\n list-style-type: none;\n padding: 0;\n margin-top: 0;\n margin-bottom: clamp(10px, 0.75vw, 15px);\n\n li + li {\n margin-top: 4px;\n }\n\n ul {\n display: none;\n padding: 4px;\n\n * {\n color: ", " !important;\n }\n\n li {\n padding: 0;\n\n &.active {\n background: none;\n }\n\n ul {\n display: none;\n }\n\n .item-title {\n &:hover,\n &.active {\n background: #e1e1e1 !important;\n }\n }\n }\n }\n\n li {\n position: relative !important;\n z-index: 9999;\n width: 100%;\n\n ul {\n display: none;\n }\n\n &.active {\n background: ", ";\n border-radius: 5px;\n\n a,\n span {\n color: #fff;\n }\n\n svg {\n fill: #fff !important;\n }\n }\n\n &:hover {\n > ul {\n display: block;\n }\n }\n }\n }\n\n .title {\n color: #828282;\n margin-bottom: clamp(3px, 0.5vw, 10px);\n padding-left: clamp(5px, 0.78vw, 15px);\n\n .dark & {\n color: #4b5563;\n }\n }\n\n .item-title {\n border-radius: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n transition: transform 0.1s ease-in-out;\n font-weight: 400;\n padding: 0 clamp(5px, 0.78vw, 15px);\n height: clamp(34px, 2.08vw, 40px);\n display: flex;\n position: relative;\n z-index: 2222;\n\n > span {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n color: ", ";\n\n .icon {\n width: 20px;\n height: 20px;\n display: flex;\n transition: 0.1s linear;\n margin-left: 0;\n\n > svg {\n width: 100%;\n height: auto;\n fill: #828282;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n\n > span {\n color: #fff;\n margin-right: 0;\n transition: 0.3s linear;\n\n .icon {\n margin-left: 10px;\n\n > svg {\n fill: #fff !important;\n }\n }\n }\n }\n }\n\n .arrow {\n width: 7px;\n margin: 0 0 0 auto;\n display: flex;\n\n svg {\n width: 100%;\n height: auto;\n fill: currentColor;\n }\n }\n\n &.expanded_menu {\n width: 65px !important;\n padding-top: 41px;\n transition: 0.3s;\n position: absolute;\n\n .expand {\n position: absolute;\n top: 10px;\n right: -12px;\n width: 24px;\n height: 24px;\n border-radius: 100%;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n border: 0;\n\n svg {\n width: 5px;\n fill: #fff;\n height: auto;\n }\n }\n\n > ul {\n > li {\n > .item-title {\n .content-title {\n display: none;\n }\n\n .arrow {\n display: none;\n }\n }\n }\n }\n\n ul {\n .submenu {\n min-width: 265px;\n }\n }\n\n .item-title {\n padding-left: 22px;\n\n &:hover {\n > span {\n .icon {\n margin-left: 0;\n\n > svg {\n fill: #fff !important;\n }\n }\n }\n }\n }\n\n &.expanded {\n width: 240px !important;\n transition: 0.3s;\n\n .expand {\n svg {\n transform: rotate(180deg);\n }\n }\n\n > ul {\n > li {\n > .item-title {\n .content-title {\n display: block;\n }\n\n .arrow {\n display: block;\n }\n }\n }\n }\n }\n }\n\n @media only screen and (max-width: 1400px) {\n .icon {\n width: 14px !important;\n height: 14px !important;\n }\n\n span {\n font-size: 13.5px;\n }\n }\n\n @media only screen and (max-width: 1200px) {\n .icon {\n width: 17px !important;\n height: 17px !important;\n }\n\n span {\n font-size: 13px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n .icon {\n width: 16px !important;\n height: 16px !important;\n }\n\n span {\n font-size: 12px;\n }\n }\n"])), function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (props) { return props.theme.darkColor; }, function (props) { return props.theme.primaryColor; });
|
|
13
|
+
exports.SubMenu = styled_components_1.default.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 5px;\n padding: 12px 8px;\n z-index: 24;\n position: absolute;\n top: ", ";\n bottom: ", ";\n left: 100%;\n z-index: 9999;\n background-color: #ffffff;\n border: 1px solid #d1d5db;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n transition: background-color 0.3s, border-color 0.3s;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n"], ["\n border-radius: 5px;\n padding: 12px 8px;\n z-index: 24;\n position: absolute;\n top: ", ";\n bottom: ", ";\n left: 100%;\n z-index: 9999;\n background-color: #ffffff;\n border: 1px solid #d1d5db;\n box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n transition: background-color 0.3s, border-color 0.3s;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n"])), function (props) { return (props.$index <= 6 ? 0 : undefined); }, function (props) { return (props.$index > 6 ? 0 : undefined); });
|
|
14
|
+
var templateObject_1, templateObject_2;
|
|
38
15
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/system/presentation/components/layout/sidebar-menu/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/system/presentation/components/layout/sidebar-menu/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,IAAI,GAAG,2BAAM,CAAC,GAAG,46JAAA,sxBA8Cb,EAAgC,0fAiC3B,EAAgC,05BAkDvC,EAAgC,wTAkBrB,EAAgC,qtBA2ChC,EAAmC,wqDA2G5D,KA3PgB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EAiC3B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EAkDvC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EAkBrB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,SAAS,EAArB,CAAqB,EA2ChC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,YAAY,EAAxB,CAAwB,EA2G5D;AAEY,QAAA,OAAO,GAAG,2BAAM,CAAC,EAAE,8fAAoB,+FAK3C,EAA8C,eAC3C,EAA6C,yUAWxD,KAZQ,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAnC,CAAmC,EAC3C,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAlC,CAAkC,EAWxD"}
|
|
@@ -6,16 +6,14 @@ var react_1 = require("react");
|
|
|
6
6
|
var MenuContext = (0, react_1.createContext)({});
|
|
7
7
|
function MenuContextProvider(props) {
|
|
8
8
|
var _a = (0, react_1.useState)(false), openMenu = _a[0], setOpenMenu = _a[1];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
return (0, jsx_runtime_1.jsx)(MenuContext.Provider, { value: data, children: props.children && props.children });
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(MenuContext.Provider, { value: {
|
|
10
|
+
openMenu: openMenu,
|
|
11
|
+
setOpenMenu: setOpenMenu,
|
|
12
|
+
settings: {
|
|
13
|
+
mode: (props === null || props === void 0 ? void 0 : props.mode) || 'auto',
|
|
14
|
+
position: (props === null || props === void 0 ? void 0 : props.position) || 'auto',
|
|
15
|
+
},
|
|
16
|
+
}, children: props === null || props === void 0 ? void 0 : props.children }));
|
|
19
17
|
}
|
|
20
18
|
exports.MenuContextProvider = MenuContextProvider;
|
|
21
19
|
function useMenu() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/system/presentation/context/menu/context.tsx"],"names":[],"mappings":";;;;AAAA,+BAAkE;AAGlE,IAAM,WAAW,GAAG,IAAA,qBAAa,EAAkB,EAAE,CAAC,CAAA;AAEtD,SAAS,mBAAmB,CAAC,KAA+B;IACpD,IAAA,KAA0B,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAxC,QAAQ,QAAA,EAAE,WAAW,QAAmB,CAAA;IAE/C,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../src/system/presentation/context/menu/context.tsx"],"names":[],"mappings":";;;;AAAA,+BAAkE;AAGlE,IAAM,WAAW,GAAG,IAAA,qBAAa,EAAkB,EAAE,CAAC,CAAA;AAEtD,SAAS,mBAAmB,CAAC,KAA+B;IACpD,IAAA,KAA0B,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAxC,QAAQ,QAAA,EAAE,WAAW,QAAmB,CAAA;IAE/C,OAAO,CACL,uBAAC,WAAW,CAAC,QAAQ,IACnB,KAAK,EAAE;YACL,QAAQ,UAAA;YACR,WAAW,aAAA;YACX,QAAQ,EAAE;gBACR,IAAI,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,KAAI,MAAM;gBAC3B,QAAQ,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,KAAI,MAAM;aACpC;SACF,YAEA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,GACK,CACxB,CAAA;AACH,CAAC;AAWQ,kDAAmB;AAT5B,SAAS,OAAO;IACd,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,WAAW,CAAC,CAAA;IAEvC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;IACxE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAE6B,0BAAO"}
|