lecom-ui 3.9.0 → 3.9.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.
|
@@ -6,8 +6,9 @@ import { ScrollArea } from '../ScrollArea/ScrollArea.js';
|
|
|
6
6
|
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../Select/Select.js';
|
|
7
7
|
import { useIsMobile } from '../../hooks/useIsMobile.js';
|
|
8
8
|
import { User } from 'lucide-react';
|
|
9
|
-
import
|
|
9
|
+
import '../../i18n/index.js';
|
|
10
10
|
import { Tooltip, TooltipTrigger, TooltipPortal, TooltipContent } from '../Tooltip/Tooltip.js';
|
|
11
|
+
import i18n from 'i18next';
|
|
11
12
|
|
|
12
13
|
const UserMenu = ({
|
|
13
14
|
customStyles,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { I18nextProvider } from 'react-i18next';
|
|
3
|
-
import
|
|
3
|
+
import '../../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';
|
|
@@ -10,6 +10,7 @@ import { LogoLecomBrand } from '../CustomIcon/Icons/LogoLecomBrand.js';
|
|
|
10
10
|
import { Header } from '../Header/Header.js';
|
|
11
11
|
import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarFooter } from '../Sidebar/Sidebar.js';
|
|
12
12
|
import { Typography } from '../Typography/Typography.js';
|
|
13
|
+
import i18n from 'i18next';
|
|
13
14
|
|
|
14
15
|
const Layout = ({ children, header, sideBar }) => {
|
|
15
16
|
const { items, info } = sideBar;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useTranslation
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Button } from '../Button/Button.js';
|
|
4
4
|
import { cn } from '../../lib/utils.js';
|
|
5
5
|
import { ChevronFirst, ChevronLast, ChevronLeft, ChevronRight, MoreHorizontal, ChevronDown } from 'lucide-react';
|
|
6
|
-
import
|
|
6
|
+
import '../../i18n/index.js';
|
|
7
7
|
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '../DropdownMenu/DropdownMenu.js';
|
|
8
8
|
import { Typography } from '../Typography/Typography.js';
|
|
9
|
+
import i18n from 'i18next';
|
|
9
10
|
|
|
10
11
|
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
11
12
|
"ul",
|
|
@@ -187,8 +188,11 @@ const Pagination = ({
|
|
|
187
188
|
};
|
|
188
189
|
return React.createElement(mappedComponents[item.type], componentProps);
|
|
189
190
|
};
|
|
190
|
-
console.log(
|
|
191
|
-
|
|
191
|
+
console.log(
|
|
192
|
+
i18n.language,
|
|
193
|
+
i18n.getResourceBundle(i18n.language, "translations")
|
|
194
|
+
);
|
|
195
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between mt-6 gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(Button, { size: "small", color: "grey", variant: "outlined" }, /* @__PURE__ */ React.createElement("span", { className: "max-md:hidden" }, t("pagination.show")), " ", perPage, /* @__PURE__ */ React.createElement(ChevronDown, { size: 20 }))), /* @__PURE__ */ React.createElement(DropdownMenuContent, { side: "top", align: "center" }, perPageOptions.map((option) => /* @__PURE__ */ React.createElement(
|
|
192
196
|
DropdownMenuItem,
|
|
193
197
|
{
|
|
194
198
|
key: option.value,
|
|
@@ -197,7 +201,7 @@ const Pagination = ({
|
|
|
197
201
|
}
|
|
198
202
|
},
|
|
199
203
|
option.value.toString()
|
|
200
|
-
)))), totalRowsSelected > 0 && /* @__PURE__ */ React.createElement(Typography, { variant: "heading-xxsmall-600", textColor: "text-grey-800" }, totalRowsSelected, " ", t("pagination.selectedProcess"))), /* @__PURE__ */ React.createElement("nav", { role: "navigation", "aria-label": "pagination" }, /* @__PURE__ */ React.createElement(PaginationContent, null, itemsPage.map((item) => /* @__PURE__ */ React.createElement(PaginationItem, { key: item.id }, mapPaginationItem(item))))))
|
|
204
|
+
)))), totalRowsSelected > 0 && /* @__PURE__ */ React.createElement(Typography, { variant: "heading-xxsmall-600", textColor: "text-grey-800" }, totalRowsSelected, " ", t("pagination.selectedProcess"))), /* @__PURE__ */ React.createElement("nav", { role: "navigation", "aria-label": "pagination" }, /* @__PURE__ */ React.createElement(PaginationContent, null, itemsPage.map((item) => /* @__PURE__ */ React.createElement(PaginationItem, { key: item.id }, mapPaginationItem(item))))));
|
|
201
205
|
};
|
|
202
206
|
Pagination.displayName = "Pagination";
|
|
203
207
|
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { initReactI18next } from 'react-i18next';
|
|
2
|
-
import
|
|
2
|
+
import i18n from 'i18next';
|
|
3
|
+
export { default as i18n } from 'i18next';
|
|
3
4
|
import { translations } from './locales/index.js';
|
|
4
5
|
|
|
5
6
|
var Translations = /* @__PURE__ */ ((Translations2) => {
|
|
@@ -17,7 +18,6 @@ const i18nConfig = {
|
|
|
17
18
|
escapeValue: false
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
|
-
const i18n = createInstance();
|
|
21
21
|
i18n.use(initReactI18next).init(i18nConfig);
|
|
22
22
|
|
|
23
|
-
export { Translations
|
|
23
|
+
export { Translations };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
|
11
11
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
12
12
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
13
13
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
14
|
-
|
|
14
|
+
export { default as i18n } from 'i18next';
|
|
15
15
|
|
|
16
16
|
declare const accordionVariants: (props?: ({
|
|
17
17
|
variant?: "default" | null | undefined;
|
|
@@ -658,7 +658,6 @@ declare enum Translations {
|
|
|
658
658
|
EN_US = "en_US",
|
|
659
659
|
ES_ES = "es_ES"
|
|
660
660
|
}
|
|
661
|
-
declare const i18n: node_modules_i18next.i18n;
|
|
662
661
|
|
|
663
662
|
type Fonts = 'roboto' | 'montserrat' | 'ibm';
|
|
664
663
|
declare const fonts: {
|
|
@@ -667,4 +666,4 @@ declare const fonts: {
|
|
|
667
666
|
ibm: string[];
|
|
668
667
|
};
|
|
669
668
|
|
|
670
|
-
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, DataTable, 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, type PaginationProps, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, ScrollArea, ScrollBar, type SideBarProps, Skeleton, Spin, type SpinProps, Switch, TOAST_REMOVE_DELAY, Tag, type TagProps, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipPortal, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, type TypographyProps, type UsePaginationItem, accordionVariants, buttonVariants, colors, fonts, getPositionClass,
|
|
669
|
+
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, DataTable, 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, type PaginationProps, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, ScrollArea, ScrollBar, type SideBarProps, Skeleton, Spin, type SpinProps, Switch, TOAST_REMOVE_DELAY, Tag, type TagProps, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipPortal, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, type TypographyProps, type UsePaginationItem, accordionVariants, buttonVariants, colors, fonts, getPositionClass, notificationVariants, reducer, tagVariants, toast, typographyVariants, useIsMobile, useNotificationToast, usePagination, useSidebar };
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export { Spin } from './components/Spin/Spin.js';
|
|
|
25
25
|
export { useSidebar } from './components/Sidebar/Sidebar.js';
|
|
26
26
|
export { useIsMobile } from './hooks/useIsMobile.js';
|
|
27
27
|
export { usePagination } from './hooks/usePagination.js';
|
|
28
|
-
export { Translations
|
|
28
|
+
export { Translations } from './i18n/index.js';
|
|
29
29
|
export { colors } from './tokens/colors.js';
|
|
30
30
|
export { fonts } from './tokens/fonts.js';
|
|
31
|
+
export { default as i18n } from 'i18next';
|