lecom-ui 3.9.4 → 3.9.5
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,9 +1,9 @@
|
|
|
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
9
|
|
|
@@ -187,11 +187,7 @@ const Pagination = ({
|
|
|
187
187
|
};
|
|
188
188
|
return React.createElement(mappedComponents[item.type], componentProps);
|
|
189
189
|
};
|
|
190
|
-
|
|
191
|
-
i18n.language,
|
|
192
|
-
i18n.getResourceBundle(i18n.language, "translations")
|
|
193
|
-
);
|
|
194
|
-
return /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__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(
|
|
190
|
+
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(
|
|
195
191
|
DropdownMenuItem,
|
|
196
192
|
{
|
|
197
193
|
key: option.value,
|
|
@@ -200,7 +196,7 @@ const Pagination = ({
|
|
|
200
196
|
}
|
|
201
197
|
},
|
|
202
198
|
option.value.toString()
|
|
203
|
-
)))), 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))))))
|
|
199
|
+
)))), 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
200
|
};
|
|
205
201
|
Pagination.displayName = "Pagination";
|
|
206
202
|
|
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,9 @@ const i18nConfig = {
|
|
|
17
18
|
escapeValue: false
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
if (!i18n.isInitialized) {
|
|
22
|
+
console.log("i18n.isInitialized");
|
|
23
|
+
i18n.use(initReactI18next).init(i18nConfig);
|
|
24
|
+
}
|
|
22
25
|
|
|
23
|
-
export { Translations
|
|
26
|
+
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;
|
|
@@ -268,6 +268,12 @@ declare const usePagination: ({ count, defaultPage, boundaryCount, siblingCount,
|
|
|
268
268
|
items: UsePaginationItem[];
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
+
declare enum Translations {
|
|
272
|
+
PT_BR = "pt_BR",
|
|
273
|
+
EN_US = "en_US",
|
|
274
|
+
ES_ES = "es_ES"
|
|
275
|
+
}
|
|
276
|
+
|
|
271
277
|
type PaginationButtonProps = {
|
|
272
278
|
className?: string;
|
|
273
279
|
disabled?: boolean;
|
|
@@ -653,13 +659,6 @@ declare function useSidebar(): SidebarContext;
|
|
|
653
659
|
|
|
654
660
|
declare function useIsMobile(): boolean;
|
|
655
661
|
|
|
656
|
-
declare enum Translations {
|
|
657
|
-
PT_BR = "pt_BR",
|
|
658
|
-
EN_US = "en_US",
|
|
659
|
-
ES_ES = "es_ES"
|
|
660
|
-
}
|
|
661
|
-
declare const i18n: node_modules_i18next.i18n;
|
|
662
|
-
|
|
663
662
|
type Fonts = 'roboto' | 'montserrat' | 'ibm';
|
|
664
663
|
declare const fonts: {
|
|
665
664
|
roboto: string[];
|
|
@@ -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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lecom-ui",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -87,9 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"react": "^19.0.0",
|
|
90
|
-
"react-dom": "^19.0.0"
|
|
91
|
-
"i18next": "^24.2.2",
|
|
92
|
-
"react-i18next": "^15.4.0"
|
|
90
|
+
"react-dom": "^19.0.0"
|
|
93
91
|
},
|
|
94
92
|
"eslintConfig": {
|
|
95
93
|
"extends": [
|