lecom-ui 2.9.4 → 2.9.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.
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { useTranslation } from 'react-i18next';
2
+ import { useTranslation, I18nextProvider } from 'react-i18next';
3
+ import '../../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';
@@ -9,13 +10,13 @@ import { LogoLecomBrand } from '../CustomIcon/Icons/LogoLecomBrand.js';
9
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
- import '../../i18n/index.js';
13
+ import i18n from 'i18next';
13
14
 
14
15
  const Layout = ({ children, header, sideBar }) => {
15
16
  const { t } = useTranslation();
16
17
  const { items, info } = sideBar;
17
18
  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(
19
+ return /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__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(
19
20
  SidebarMenuButton,
20
21
  {
21
22
  asChild: true,
@@ -33,7 +34,7 @@ const Layout = ({ children, header, sideBar }) => {
33
34
  t("sidebar.platform"),
34
35
  " ",
35
36
  /* @__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))), /* @__PURE__ */ React.createElement("main", { className: "grow w-full" }, children)));
37
+ ), /* @__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
38
  };
38
39
  Layout.displayName = "Layout";
39
40
 
package/dist/index.d.ts CHANGED
@@ -366,12 +366,6 @@ interface HeaderProps extends React.HTMLAttributes<HTMLElement>, VariantProps<ty
366
366
  onOpenMenuChange?: () => void;
367
367
  }
368
368
 
369
- declare enum Translations {
370
- PT_BR = "pt_BR",
371
- EN_US = "en_US",
372
- ES_ES = "es_ES"
373
- }
374
-
375
369
  interface SideBarProps {
376
370
  items: {
377
371
  title: string;
@@ -609,6 +603,12 @@ type SidebarContext = {
609
603
  declare const SidebarContext: React.Context<SidebarContext | null>;
610
604
  declare function useSidebar(): SidebarContext;
611
605
 
606
+ declare enum Translations {
607
+ PT_BR = "pt_BR",
608
+ EN_US = "en_US",
609
+ ES_ES = "es_ES"
610
+ }
611
+
612
612
  type Fonts = 'roboto' | 'montserrat' | 'ibm';
613
613
  declare const fonts: {
614
614
  roboto: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "2.9.4",
3
+ "version": "2.9.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",