lecom-ui 5.4.52 → 5.4.53
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.
- package/dist/components/Layout/Layout.js +15 -5
- package/dist/index.d.ts +10 -10
- package/package.json +1 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { initializeI18n } from '../../i18n/index.js';
|
|
3
|
-
import { getCookie } from '../../utils/cookie.js';
|
|
4
2
|
import '../../icons/Brand/LogoLecom.js';
|
|
5
3
|
import { LogoLecomBrand } from '../../icons/Brand/LogoLecomBrand.js';
|
|
6
4
|
import '../../icons/Brand/FooterInfo.js';
|
|
@@ -9,7 +7,10 @@ import '../../icons/Features/CadastroFacil.js';
|
|
|
9
7
|
import '../../icons/Features/Rpa.js';
|
|
10
8
|
import '../../icons/Features/ModoTeste.js';
|
|
11
9
|
import '../../icons/UI/NewUpdate.js';
|
|
10
|
+
import { initializeI18n } from '../../i18n/index.js';
|
|
11
|
+
import { getCookie } from '../../utils/cookie.js';
|
|
12
12
|
import { Header } from '../Header/Header.js';
|
|
13
|
+
import { ScrollArea } from '../ScrollArea/ScrollArea.js';
|
|
13
14
|
import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarFooter } from '../Sidebar/Sidebar.js';
|
|
14
15
|
import { Typography } from '../Typography/Typography.js';
|
|
15
16
|
|
|
@@ -20,15 +21,24 @@ const Layout = ({ children, header, sideBar }) => {
|
|
|
20
21
|
}
|
|
21
22
|
const { items, info, collapsible = "icon" } = sideBar;
|
|
22
23
|
const sidebarState = getCookie("sidebar:state") === "true";
|
|
23
|
-
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, variant: "sidebar" }, /* @__PURE__ */ React.createElement(SidebarContent,
|
|
24
|
+
return /* @__PURE__ */ React.createElement(SidebarProvider, { className: "flex-col", defaultOpen: sidebarState }, /* @__PURE__ */ React.createElement(Header, { ...header }), /* @__PURE__ */ React.createElement("div", { className: "flex grow overflow-hidden" }, /* @__PURE__ */ React.createElement(Sidebar, { collapsible, variant: "sidebar" }, /* @__PURE__ */ React.createElement(SidebarContent, { className: "flex-1 min-h-0 overflow-hidden p-0" }, /* @__PURE__ */ React.createElement(ScrollArea, { className: "h-full max-h-full" }, /* @__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
25
|
SidebarMenuButton,
|
|
25
26
|
{
|
|
26
27
|
asChild: true,
|
|
27
28
|
tooltip: item.title,
|
|
28
29
|
isActive: !!item.isActive
|
|
29
30
|
},
|
|
30
|
-
item.url ? /* @__PURE__ */ React.createElement("a", { href: item.url }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title)) : /* @__PURE__ */ React.createElement(
|
|
31
|
-
|
|
31
|
+
item.url ? /* @__PURE__ */ React.createElement("a", { href: item.url }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title)) : /* @__PURE__ */ React.createElement(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
className: "appearance-none border-none bg-transparent",
|
|
36
|
+
onClick: item.onClick
|
|
37
|
+
},
|
|
38
|
+
item.icon,
|
|
39
|
+
/* @__PURE__ */ React.createElement("span", null, item.title)
|
|
40
|
+
)
|
|
41
|
+
)))))))), /* @__PURE__ */ React.createElement(SidebarFooter, { className: "p-6 gap-1 shrink-0" }, /* @__PURE__ */ React.createElement(
|
|
32
42
|
Typography,
|
|
33
43
|
{
|
|
34
44
|
variant: "heading-xsmall-600",
|
package/dist/index.d.ts
CHANGED
|
@@ -791,9 +791,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
|
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
declare const inputVariants: (props?: ({
|
|
794
|
-
variant?: "
|
|
795
|
-
size?: "small" | "
|
|
796
|
-
radius?: "small" | "
|
|
794
|
+
variant?: "default" | "filled" | "borderless" | null | undefined;
|
|
795
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
796
|
+
radius?: "small" | "default" | "large" | "full" | null | undefined;
|
|
797
797
|
status?: "default" | "error" | null | undefined;
|
|
798
798
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
799
799
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
|
|
@@ -1010,7 +1010,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
|
|
|
1010
1010
|
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1011
1011
|
|
|
1012
1012
|
declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
|
|
1013
|
-
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement |
|
|
1013
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement | HTMLInputElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLUListElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
|
|
1014
1014
|
className?: string;
|
|
1015
1015
|
collapsedSize?: number | undefined;
|
|
1016
1016
|
collapsible?: boolean | undefined;
|
|
@@ -1177,10 +1177,10 @@ declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
|
|
|
1177
1177
|
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1178
1178
|
|
|
1179
1179
|
declare const textareaVariants: (props?: ({
|
|
1180
|
-
variant?: "
|
|
1181
|
-
size?: "small" | "
|
|
1182
|
-
radius?: "small" | "
|
|
1183
|
-
resize?: "
|
|
1180
|
+
variant?: "default" | "filled" | "borderless" | null | undefined;
|
|
1181
|
+
size?: "small" | "default" | "large" | null | undefined;
|
|
1182
|
+
radius?: "small" | "default" | "large" | "full" | null | undefined;
|
|
1183
|
+
resize?: "both" | "horizontal" | "vertical" | "default" | "vertical-limited" | null | undefined;
|
|
1184
1184
|
status?: "default" | "error" | null | undefined;
|
|
1185
1185
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1186
1186
|
interface TextareaProps extends React$1.ComponentProps<'textarea'>, VariantProps<typeof textareaVariants> {
|
|
@@ -1330,7 +1330,7 @@ declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dial
|
|
|
1330
1330
|
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
1331
1331
|
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1332
1332
|
declare const sheetVariants: (props?: ({
|
|
1333
|
-
side?: "
|
|
1333
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
1334
1334
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1335
1335
|
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
1336
1336
|
}
|
|
@@ -1379,7 +1379,7 @@ interface DateInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
1379
1379
|
declare const DateInput: React$1.ForwardRefExoticComponent<DateInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1380
1380
|
|
|
1381
1381
|
declare const badgeVariants: (props?: ({
|
|
1382
|
-
variant?: "
|
|
1382
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
1383
1383
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1384
1384
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
1385
1385
|
}
|