lecom-ui 3.3.0 → 3.5.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.
|
@@ -6,7 +6,7 @@ import { ScrollArea } from '../ScrollArea/ScrollArea.js';
|
|
|
6
6
|
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../Select/Select.js';
|
|
7
7
|
import { useIsMobile } from '../../hooks/use-mobile.js';
|
|
8
8
|
import { User } from 'lucide-react';
|
|
9
|
-
import i18n from '../../i18n/index.js';
|
|
9
|
+
import { i18n } from '../../i18n/index.js';
|
|
10
10
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
|
|
11
11
|
|
|
12
12
|
const UserMenu = ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useTranslation, I18nextProvider } from 'react-i18next';
|
|
3
|
-
import i18n from '../../i18n/index.js';
|
|
3
|
+
import { i18n } from '../../i18n/index.js';
|
|
4
4
|
import { getCookie } from '../../utils/cookie.js';
|
|
5
5
|
import '../CustomIcon/Icons/CadastroFacil.js';
|
|
6
6
|
import '../CustomIcon/Icons/LogoLecom.js';
|
|
@@ -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(
|
|
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
19
|
SidebarMenuButton,
|
|
20
20
|
{
|
|
21
21
|
asChild: true,
|
|
@@ -23,7 +23,7 @@ const Layout = ({ children, header, sideBar }) => {
|
|
|
23
23
|
isActive: !!item.isActive
|
|
24
24
|
},
|
|
25
25
|
item.url ? /* @__PURE__ */ React.createElement("a", { href: item.url }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title)) : /* @__PURE__ */ React.createElement("div", { onClick: item.onClick }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title))
|
|
26
|
-
))))))), /* @__PURE__ */ React.createElement(
|
|
26
|
+
))))))), /* @__PURE__ */ React.createElement(SidebarFooter, { className: "p-6 pt-0 gap-1" }, /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__PURE__ */ React.createElement(
|
|
27
27
|
Typography,
|
|
28
28
|
{
|
|
29
29
|
variant: "heading-xsmall-600",
|
|
@@ -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)))
|
|
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
|
|
package/dist/i18n/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
|
10
10
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
11
11
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
12
12
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
13
|
+
import * as node_modules_i18next from 'node_modules/i18next';
|
|
13
14
|
|
|
14
15
|
declare const accordionVariants: (props?: ({
|
|
15
16
|
variant?: "default" | null | undefined;
|
|
@@ -608,6 +609,7 @@ declare enum Translations {
|
|
|
608
609
|
EN_US = "en_US",
|
|
609
610
|
ES_ES = "es_ES"
|
|
610
611
|
}
|
|
612
|
+
declare const i18n: node_modules_i18next.i18n;
|
|
611
613
|
|
|
612
614
|
type Fonts = 'roboto' | 'montserrat' | 'ibm';
|
|
613
615
|
declare const fonts: {
|
|
@@ -616,4 +618,4 @@ declare const fonts: {
|
|
|
616
618
|
ibm: string[];
|
|
617
619
|
};
|
|
618
620
|
|
|
619
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type BgColor, Button, type ButtonProps, CadastroFacil, type CadastroFacilProps, type CalloutNotificationProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, type Color, type ColorToken, type CustomStyles$1 as CustomStyles, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FillColor, type Fonts, type HeaderProps, type InlineNotificationProps, Layout, type LayoutProps, LogoLecom, LogoLecomBrand, type LogoLecomBrandProps, type LogoLecomProps, ModoTeste, type ModoTesteProps, Notification, type NotificationProps, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationIndex, PaginationItem, PaginationLast, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, ScrollArea, ScrollBar, type SideBarProps, Skeleton, Spin, type SpinProps, Switch, TOAST_REMOVE_DELAY, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRowBody, TableRowHeader, Tag, type TagProps, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, type TypographyProps, accordionVariants, buttonVariants, colors, fonts, getPositionClass, notificationVariants, reducer, tagVariants, toast, typographyVariants, useNotificationToast, useSidebar };
|
|
621
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type BgColor, Button, type ButtonProps, CadastroFacil, type CadastroFacilProps, type CalloutNotificationProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, type Color, type ColorToken, type CustomStyles$1 as CustomStyles, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FillColor, type Fonts, type HeaderProps, type InlineNotificationProps, Layout, type LayoutProps, LogoLecom, LogoLecomBrand, type LogoLecomBrandProps, type LogoLecomProps, ModoTeste, type ModoTesteProps, Notification, type NotificationProps, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationIndex, PaginationItem, PaginationLast, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, ScrollArea, ScrollBar, type SideBarProps, Skeleton, Spin, type SpinProps, Switch, TOAST_REMOVE_DELAY, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRowBody, TableRowHeader, Tag, type TagProps, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, type TypographyProps, accordionVariants, buttonVariants, colors, fonts, getPositionClass, i18n, notificationVariants, reducer, tagVariants, toast, typographyVariants, useNotificationToast, useSidebar };
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,6 @@ export { Typography, typographyVariants } from './components/Typography/Typograp
|
|
|
23
23
|
export { ScrollArea, ScrollBar } from './components/ScrollArea/ScrollArea.js';
|
|
24
24
|
export { Spin } from './components/Spin/Spin.js';
|
|
25
25
|
export { useSidebar } from './components/Sidebar/Sidebar.js';
|
|
26
|
-
export { Translations } from './i18n/index.js';
|
|
26
|
+
export { Translations, i18n } from './i18n/index.js';
|
|
27
27
|
export { colors } from './tokens/colors.js';
|
|
28
28
|
export { fonts } from './tokens/fonts.js';
|