lecom-ui 3.6.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,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { I18nextProvider } from 'react-i18next';
|
|
3
|
+
import { i18n } from '../../i18n/index.js';
|
|
3
4
|
import { getCookie } from '../../utils/cookie.js';
|
|
4
5
|
import '../CustomIcon/Icons/CadastroFacil.js';
|
|
5
6
|
import '../CustomIcon/Icons/LogoLecom.js';
|
|
@@ -10,10 +11,10 @@ import { Header } from '../Header/Header.js';
|
|
|
10
11
|
import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarFooter } from '../Sidebar/Sidebar.js';
|
|
11
12
|
import { Typography } from '../Typography/Typography.js';
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
+
const Layout = ({ children, header, sideBar }) => {
|
|
14
15
|
const { items, info } = sideBar;
|
|
15
16
|
const sidebarState = getCookie("sidebar:state") === "true";
|
|
16
|
-
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(
|
|
17
18
|
SidebarMenuButton,
|
|
18
19
|
{
|
|
19
20
|
asChild: true,
|
|
@@ -28,12 +29,10 @@ const LayoutTeste = ({ children, header, sideBar, t }) => {
|
|
|
28
29
|
textColor: "text-grey-800",
|
|
29
30
|
className: "flex items-center gap-2"
|
|
30
31
|
},
|
|
31
|
-
|
|
32
|
-
" ",
|
|
32
|
+
info.platformText,
|
|
33
33
|
/* @__PURE__ */ React.createElement(LogoLecomBrand, { className: "w-16 shrink-0" })
|
|
34
|
-
), /* @__PURE__ */ React.createElement(Typography, { variant: "body-medium-400", textColor: "text-grey-800" },
|
|
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)));
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
const Layout = withTranslation()(LayoutTeste);
|
|
36
|
+
Layout.displayName = "Layout";
|
|
38
37
|
|
|
39
38
|
export { Layout };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,6 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
6
6
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
7
7
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
8
8
|
import { CustomStyles as CustomStyles$2 } from '@/components/Button';
|
|
9
|
-
import * as node_modules_react_i18next_helpers from 'node_modules/react-i18next/helpers';
|
|
10
|
-
import * as react_i18next from 'react-i18next';
|
|
11
9
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
12
10
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
13
11
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -378,18 +376,23 @@ interface SideBarProps {
|
|
|
378
376
|
isActive?: boolean;
|
|
379
377
|
}[];
|
|
380
378
|
info: {
|
|
379
|
+
platformText: string;
|
|
380
|
+
authorizedForText: string;
|
|
381
381
|
authorizedFor: string;
|
|
382
382
|
build: string;
|
|
383
383
|
cycle: string;
|
|
384
|
+
versionText: string;
|
|
384
385
|
version: string;
|
|
385
386
|
};
|
|
386
387
|
}
|
|
387
388
|
interface LayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
388
389
|
header: HeaderProps;
|
|
389
390
|
sideBar: SideBarProps;
|
|
390
|
-
t: any;
|
|
391
391
|
}
|
|
392
|
-
declare const Layout:
|
|
392
|
+
declare const Layout: {
|
|
393
|
+
({ children, header, sideBar }: LayoutProps): React.JSX.Element;
|
|
394
|
+
displayName: string;
|
|
395
|
+
};
|
|
393
396
|
|
|
394
397
|
declare enum TypeMessageNotification {
|
|
395
398
|
SUCCESS = "success",
|