lecom-ui 2.8.9 → 2.9.1

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.
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
- import { useTranslation } from 'react-i18next';
2
+ import { useTranslation, I18nextProvider } from 'react-i18next';
3
3
  import { Typography } from '../Typography/Typography.js';
4
4
  import { cn } from '../../lib/utils.js';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { Menu } from 'lucide-react';
7
7
  import { colorLuminance } from 'use-color-luminance';
8
+ import { i18n } from '../../i18n/index.js';
8
9
  import { useSidebar } from '../Sidebar/Sidebar.js';
9
10
  import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
10
11
  import { HelpMenu } from './HelpMenu.js';
@@ -54,7 +55,7 @@ const Header = ({
54
55
  }
55
56
  };
56
57
  };
57
- return /* @__PURE__ */ React.createElement(
58
+ return /* @__PURE__ */ React.createElement(I18nextProvider, { i18n }, /* @__PURE__ */ React.createElement(
58
59
  "header",
59
60
  {
60
61
  className: cn(headerVariants({ className }), ""),
@@ -87,7 +88,7 @@ const Header = ({
87
88
  module
88
89
  )), /* @__PURE__ */ React.createElement("div", { className: "max-md:hidden" }, extraContent && extraContent)),
89
90
  /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(SocialMenu, { customStyles: getCustomStyles(), ...socialMenu }), /* @__PURE__ */ React.createElement(UserMenu, { customStyles: getCustomStyles(), ...userMenu }), /* @__PURE__ */ React.createElement(HelpMenu, { customStyles: getCustomStyles(), ...helpMenu }), /* @__PURE__ */ React.createElement(ModulesMenu, { customStyles: getCustomStyles(), ...modulesMenu }))
90
- );
91
+ ));
91
92
  };
92
93
  Header.displayName = "Header";
93
94
 
@@ -6,9 +6,8 @@ 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/index.js';
9
+ import { i18n } from '../../i18n/index.js';
10
10
  import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
11
- import i18n from 'i18next';
12
11
 
13
12
  const UserMenu = ({
14
13
  customStyles,
@@ -1,6 +1,4 @@
1
- import { initReactI18next } from 'react-i18next';
2
- import i18n from 'i18next';
3
- export { default as i18n } from 'i18next';
1
+ import { createInstance } from 'i18next';
4
2
  import { translations } from './locales/index.js';
5
3
 
6
4
  var Translations = /* @__PURE__ */ ((Translations2) => {
@@ -18,6 +16,7 @@ const i18nConfig = {
18
16
  escapeValue: false
19
17
  }
20
18
  };
21
- i18n.use(initReactI18next).init(i18nConfig);
19
+ const i18n = createInstance(i18nConfig);
20
+ i18n.init();
22
21
 
23
- export { Translations };
22
+ export { Translations, i18n };
package/dist/index.d.ts CHANGED
@@ -10,7 +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
- export { default as i18n } from 'i18next';
13
+ import * as node_modules_i18next from 'node_modules/i18next';
14
14
 
15
15
  declare const accordionVariants: (props?: ({
16
16
  variant?: "default" | null | undefined;
@@ -609,6 +609,7 @@ declare enum Translations {
609
609
  EN_US = "en_US",
610
610
  ES_ES = "es_ES"
611
611
  }
612
+ declare const i18n: node_modules_i18next.i18n;
612
613
 
613
614
  type Fonts = 'roboto' | 'montserrat' | 'ibm';
614
615
  declare const fonts: {
@@ -617,4 +618,4 @@ declare const fonts: {
617
618
  ibm: string[];
618
619
  };
619
620
 
620
- 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,7 +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';
29
- export { default as i18n } from 'i18next';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "2.8.9",
3
+ "version": "2.9.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",