lecom-ui 3.5.0 → 3.7.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,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { I18nextProvider } from 'react-i18next';
|
|
3
3
|
import { i18n } from '../../i18n/index.js';
|
|
4
4
|
import { getCookie } from '../../utils/cookie.js';
|
|
5
5
|
import '../CustomIcon/Icons/CadastroFacil.js';
|
|
@@ -12,10 +12,9 @@ import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupCon
|
|
|
12
12
|
import { Typography } from '../Typography/Typography.js';
|
|
13
13
|
|
|
14
14
|
const Layout = ({ children, header, sideBar }) => {
|
|
15
|
-
const { t } = useTranslation();
|
|
16
15
|
const { items, info } = sideBar;
|
|
17
16
|
const sidebarState = getCookie("sidebar:state") === "true";
|
|
18
|
-
return /* @__PURE__ */ React.createElement(SidebarProvider, { className: "flex-col", defaultOpen: sidebarState }, /* @__PURE__ */ React.createElement(Header, { ...header }), /* @__PURE__ */ React.createElement("div", { className: "flex grow" }, /* @__PURE__ */ React.createElement(Sidebar, { collapsible: "icon", variant: "sidebar" }, /* @__PURE__ */ React.createElement(SidebarContent, null, /* @__PURE__ */ React.createElement(SidebarGroup, null, /* @__PURE__ */ React.createElement(SidebarGroupContent, null, /* @__PURE__ */ React.createElement(SidebarMenu, null, items.map((item) => /* @__PURE__ */ React.createElement(SidebarMenuItem, { key: item.title }, /* @__PURE__ */ React.createElement(
|
|
17
|
+
return /* @__PURE__ */ React.createElement(SidebarProvider, { className: "flex-col", defaultOpen: sidebarState }, /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__PURE__ */ React.createElement(Header, { ...header })), /* @__PURE__ */ React.createElement("div", { className: "flex grow" }, /* @__PURE__ */ React.createElement(Sidebar, { collapsible: "icon", variant: "sidebar" }, /* @__PURE__ */ React.createElement(SidebarContent, null, /* @__PURE__ */ React.createElement(SidebarGroup, null, /* @__PURE__ */ React.createElement(SidebarGroupContent, null, /* @__PURE__ */ React.createElement(SidebarMenu, null, items.map((item) => /* @__PURE__ */ React.createElement(SidebarMenuItem, { key: item.title }, /* @__PURE__ */ React.createElement(
|
|
19
18
|
SidebarMenuButton,
|
|
20
19
|
{
|
|
21
20
|
asChild: true,
|
|
@@ -23,17 +22,16 @@ 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(SidebarFooter, { className: "p-6 pt-0 gap-1" }, /* @__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",
|
|
30
29
|
textColor: "text-grey-800",
|
|
31
30
|
className: "flex items-center gap-2"
|
|
32
31
|
},
|
|
33
|
-
|
|
34
|
-
" ",
|
|
32
|
+
info.platformText,
|
|
35
33
|
/* @__PURE__ */ React.createElement(LogoLecomBrand, { className: "w-16 shrink-0" })
|
|
36
|
-
)
|
|
34
|
+
), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" }, info.versionText, " ", info.version, " - ", info.cycle, " ", info.build), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" }, info.authorizedForText, " ", info.authorizedFor))), /* @__PURE__ */ React.createElement("main", { className: "grow w-full" }, children)));
|
|
37
35
|
};
|
|
38
36
|
Layout.displayName = "Layout";
|
|
39
37
|
|
package/dist/index.d.ts
CHANGED
|
@@ -376,9 +376,12 @@ interface SideBarProps {
|
|
|
376
376
|
isActive?: boolean;
|
|
377
377
|
}[];
|
|
378
378
|
info: {
|
|
379
|
+
platformText: string;
|
|
380
|
+
authorizedForText: string;
|
|
379
381
|
authorizedFor: string;
|
|
380
382
|
build: string;
|
|
381
383
|
cycle: string;
|
|
384
|
+
versionText: string;
|
|
382
385
|
version: string;
|
|
383
386
|
};
|
|
384
387
|
}
|