lecom-ui 4.5.0 → 4.5.2

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.
@@ -13,13 +13,7 @@ import { Typography } from '../Typography/Typography.js';
13
13
  initializeI18n();
14
14
  const Layout = ({ children, header, sideBar }) => {
15
15
  const { items, info } = sideBar;
16
- const [sidebarState, setSidebarState] = React.useState(
17
- void 0
18
- );
19
- React.useEffect(() => {
20
- const cookieState = getCookie("sidebar:state") === "true";
21
- setSidebarState(cookieState);
22
- }, []);
16
+ const sidebarState = getCookie("sidebar:state") === "true";
23
17
  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(
24
18
  SidebarMenuButton,
25
19
  {
package/dist/index.d.ts CHANGED
@@ -540,9 +540,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
540
540
  }
541
541
 
542
542
  declare const inputVariants: (props?: ({
543
- variant?: "filled" | "default" | "borderless" | null | undefined;
544
- size?: "small" | "large" | "default" | null | undefined;
545
- radius?: "small" | "large" | "default" | null | undefined;
543
+ variant?: "default" | "filled" | "borderless" | null | undefined;
544
+ size?: "default" | "small" | "large" | null | undefined;
545
+ radius?: "default" | "small" | "large" | null | undefined;
546
546
  } & class_variance_authority_types.ClassProp) | undefined) => string;
547
547
  interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
548
548
  sufix?: React$1.ReactNode;
@@ -1,13 +1,10 @@
1
1
  const getCookie = (name) => {
2
- if (typeof window !== "undefined" && typeof document !== "undefined") {
3
- const matches = document.cookie.match(
4
- new RegExp(
5
- `(?:^|; )${name.replace(/([.$?*|{}()[\]\\/+^])/g, "\\$1")}=([^;]*)`
6
- )
7
- );
8
- return matches ? decodeURIComponent(matches[1]) : void 0;
9
- }
10
- return void 0;
2
+ const matches = document.cookie.match(
3
+ new RegExp(
4
+ `(?:^|; )${name.replace(/([.$?*|{}()[\]\\/+^])/g, "\\$1")}=([^;]*)`
5
+ )
6
+ );
7
+ return matches ? decodeURIComponent(matches[1]) : void 0;
11
8
  };
12
9
 
13
10
  export { getCookie };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",