lecom-ui 3.9.4 → 3.9.6

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 { i18n } from '../../i18n/index.js';
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 { i18n } from '../../i18n/index.js';
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, I18nextProvider } from 'react-i18next';
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 { i18n } from '../../i18n/index.js';
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
- console.log(
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
 
@@ -1,5 +1,7 @@
1
1
  import { initReactI18next } from 'react-i18next';
2
- import { createInstance } from 'i18next';
2
+ export { useTranslation } from 'react-i18next';
3
+ import i18n from 'i18next';
4
+ export { default as i18n } from 'i18next';
3
5
  import { translations } from './locales/index.js';
4
6
 
5
7
  var Translations = /* @__PURE__ */ ((Translations2) => {
@@ -17,7 +19,9 @@ const i18nConfig = {
17
19
  escapeValue: false
18
20
  }
19
21
  };
20
- const i18n = createInstance();
21
- i18n.use(initReactI18next).init(i18nConfig);
22
+ if (!i18n.isInitialized) {
23
+ console.log("i18n.isInitialized");
24
+ i18n.use(initReactI18next).init(i18nConfig);
25
+ }
22
26
 
23
- export { Translations, i18n };
27
+ export { Translations };
package/dist/index.d.ts CHANGED
@@ -11,7 +11,8 @@ 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
- import * as node_modules_i18next from 'node_modules/i18next';
14
+ export { default as i18n } from 'i18next';
15
+ export { useTranslation } from 'react-i18next';
15
16
 
16
17
  declare const accordionVariants: (props?: ({
17
18
  variant?: "default" | null | undefined;
@@ -268,6 +269,12 @@ declare const usePagination: ({ count, defaultPage, boundaryCount, siblingCount,
268
269
  items: UsePaginationItem[];
269
270
  };
270
271
 
272
+ declare enum Translations {
273
+ PT_BR = "pt_BR",
274
+ EN_US = "en_US",
275
+ ES_ES = "es_ES"
276
+ }
277
+
271
278
  type PaginationButtonProps = {
272
279
  className?: string;
273
280
  disabled?: boolean;
@@ -653,13 +660,6 @@ declare function useSidebar(): SidebarContext;
653
660
 
654
661
  declare function useIsMobile(): boolean;
655
662
 
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
663
  type Fonts = 'roboto' | 'montserrat' | 'ibm';
664
664
  declare const fonts: {
665
665
  roboto: string[];
@@ -667,4 +667,4 @@ declare const fonts: {
667
667
  ibm: string[];
668
668
  };
669
669
 
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, i18n, notificationVariants, reducer, tagVariants, toast, typographyVariants, useIsMobile, useNotificationToast, usePagination, useSidebar };
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, notificationVariants, reducer, tagVariants, toast, typographyVariants, useIsMobile, useNotificationToast, usePagination, useSidebar };
package/dist/index.js CHANGED
@@ -25,6 +25,8 @@ 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, i18n } from './i18n/index.js';
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';
32
+ export { useTranslation } from 'react-i18next';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "3.9.4",
3
+ "version": "3.9.6",
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": [