lecom-ui 2.9.9 → 3.0.0
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { useTranslation, I18nextProvider } from 'react-i18next';
|
|
3
3
|
import { Typography } from '../Typography/Typography.js';
|
|
4
4
|
import { cn } from '../../lib/utils.js';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { Menu } from 'lucide-react';
|
|
7
7
|
import { colorLuminance } from 'use-color-luminance';
|
|
8
|
+
import i18n from '../../i18n/index.js';
|
|
8
9
|
import { useSidebar } from '../Sidebar/Sidebar.js';
|
|
9
10
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
|
|
10
11
|
import { HelpMenu } from './HelpMenu.js';
|
|
@@ -54,7 +55,7 @@ const Header = ({
|
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */ React.createElement(
|
|
58
|
+
return /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__PURE__ */ React.createElement(
|
|
58
59
|
"header",
|
|
59
60
|
{
|
|
60
61
|
className: cn(headerVariants({ className }), ""),
|
|
@@ -87,7 +88,7 @@ const Header = ({
|
|
|
87
88
|
module
|
|
88
89
|
)), /* @__PURE__ */ React.createElement("div", { className: "max-md:hidden" }, extraContent && extraContent)),
|
|
89
90
|
/* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(SocialMenu, { customStyles: getCustomStyles(), ...socialMenu }), /* @__PURE__ */ React.createElement(UserMenu, { customStyles: getCustomStyles(), ...userMenu }), /* @__PURE__ */ React.createElement(HelpMenu, { customStyles: getCustomStyles(), ...helpMenu }), /* @__PURE__ */ React.createElement(ModulesMenu, { customStyles: getCustomStyles(), ...modulesMenu }))
|
|
90
|
-
);
|
|
91
|
+
));
|
|
91
92
|
};
|
|
92
93
|
Header.displayName = "Header";
|
|
93
94
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useTranslation
|
|
3
|
-
import i18n from '../../i18n/index.js';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import { getCookie } from '../../utils/cookie.js';
|
|
5
4
|
import '../CustomIcon/Icons/CadastroFacil.js';
|
|
6
5
|
import '../CustomIcon/Icons/LogoLecom.js';
|
|
@@ -23,7 +22,7 @@ const Layout = ({ children, header, sideBar }) => {
|
|
|
23
22
|
isActive: !!item.isActive
|
|
24
23
|
},
|
|
25
24
|
item.url ? /* @__PURE__ */ React.createElement("a", { href: item.url }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title)) : /* @__PURE__ */ React.createElement("div", { onClick: item.onClick }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title))
|
|
26
|
-
))))))), /* @__PURE__ */ React.createElement(
|
|
25
|
+
))))))), /* @__PURE__ */ React.createElement(SidebarFooter, { className: "p-6 pt-0 gap-1" }, /* @__PURE__ */ React.createElement(
|
|
27
26
|
Typography,
|
|
28
27
|
{
|
|
29
28
|
variant: "heading-xsmall-600",
|
|
@@ -33,7 +32,7 @@ const Layout = ({ children, header, sideBar }) => {
|
|
|
33
32
|
t("sidebar.platform"),
|
|
34
33
|
" ",
|
|
35
34
|
/* @__PURE__ */ React.createElement(LogoLecomBrand, { className: "w-16 shrink-0" })
|
|
36
|
-
), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" }, t("sidebar.version"), " ", info.version, " - ", info.cycle, " ", info.build), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" }, t("sidebar.authorizedFor"), " ", info.authorizedFor)))
|
|
35
|
+
), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" }, t("sidebar.version"), " ", info.version, " - ", info.cycle, " ", info.build), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" }, t("sidebar.authorizedFor"), " ", info.authorizedFor))), /* @__PURE__ */ React.createElement("main", { className: "grow w-full" }, children)));
|
|
37
36
|
};
|
|
38
37
|
Layout.displayName = "Layout";
|
|
39
38
|
|