lecom-ui 3.2.0 → 3.4.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.
@@ -15,7 +15,7 @@ const Layout = ({ children, header, sideBar }) => {
15
15
  const { t } = useTranslation();
16
16
  const { items, info } = sideBar;
17
17
  const sidebarState = getCookie("sidebar:state") === "true";
18
- 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(I18nextProvider, { i18n }, /* @__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(
18
+ 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
19
  SidebarMenuButton,
20
20
  {
21
21
  asChild: true,
@@ -33,7 +33,7 @@ const Layout = ({ children, header, sideBar }) => {
33
33
  t("sidebar.platform"),
34
34
  " ",
35
35
  /* @__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)));
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
37
  };
38
38
  Layout.displayName = "Layout";
39
39
 
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { I18nextProvider } from 'react-i18next';
2
3
  import { Button } from '../Button/Button.js';
3
4
  import { Input } from '../Input/Input.js';
4
5
  import { Separator } from '../Separator/Separator.js';
@@ -10,6 +11,7 @@ import { cn } from '../../lib/utils.js';
10
11
  import { Slot } from '@radix-ui/react-slot';
11
12
  import { cva } from 'class-variance-authority';
12
13
  import { X, PanelLeft } from 'lucide-react';
14
+ import i18n from '../../i18n/index.js';
13
15
 
14
16
  const SIDEBAR_COOKIE_NAME = "sidebar:state";
15
17
  const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -254,7 +256,7 @@ const SidebarHeader = React.forwardRef(({ className, ...props }, ref) => /* @__P
254
256
  }
255
257
  ));
256
258
  SidebarHeader.displayName = "SidebarHeader";
257
- const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
259
+ const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__PURE__ */ React.createElement(
258
260
  "div",
259
261
  {
260
262
  ref,
@@ -265,7 +267,7 @@ const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => /* @__P
265
267
  ),
266
268
  ...props
267
269
  }
268
- ));
270
+ )));
269
271
  SidebarFooter.displayName = "SidebarFooter";
270
272
  const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
271
273
  Separator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",