lecom-ui 4.1.9 → 4.2.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.
Files changed (152) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +5 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/components/Accordion/Accordion.js +40 -37
  4. package/dist/components/Button/Button.js +10 -9
  5. package/dist/components/Button/CustomButton.js +6 -5
  6. package/dist/components/Card/Card.js +7 -6
  7. package/dist/components/Checkbox/Checkbox.js +35 -30
  8. package/dist/components/CustomIcon/Icons/CadastroFacil.js +15 -5
  9. package/dist/components/CustomIcon/Icons/LogoLecom.js +15 -12
  10. package/dist/components/CustomIcon/Icons/LogoLecomBrand.js +8 -5
  11. package/dist/components/CustomIcon/Icons/ModoTeste.js +13 -5
  12. package/dist/components/CustomIcon/Icons/Rpa.js +17 -5
  13. package/dist/components/DataTable/DataTable.js +33 -158
  14. package/dist/components/Dialog/Dialog.js +40 -31
  15. package/dist/components/DropdownMenu/DropdownMenu.js +55 -46
  16. package/dist/components/Header/Header.js +51 -35
  17. package/dist/components/Header/HelpMenu.js +52 -41
  18. package/dist/components/Header/ImgBrand.js +5 -8
  19. package/dist/components/Header/ModulesMenu.js +63 -50
  20. package/dist/components/Header/SocialMenu.js +5 -6
  21. package/dist/components/Header/UserMenu.js +81 -51
  22. package/dist/components/Input/Input.js +11 -2
  23. package/dist/components/Layout/Layout.js +62 -45
  24. package/dist/components/Notification/Notification.js +9 -8
  25. package/dist/components/Notification/NotificationBase.js +5 -5
  26. package/dist/components/Notification/NotificationCallout.js +33 -27
  27. package/dist/components/Notification/NotificationCloseButton.js +4 -3
  28. package/dist/components/Notification/NotificationContent.js +24 -18
  29. package/dist/components/Notification/NotificationIcon.js +9 -6
  30. package/dist/components/Notification/NotificationInline.js +23 -20
  31. package/dist/components/Notification/NotificationToast.js +28 -25
  32. package/dist/components/Notification/useNotificationToast.js +0 -1
  33. package/dist/components/Popover/Popover.js +8 -7
  34. package/dist/components/ScrollArea/ScrollArea.js +18 -15
  35. package/dist/components/Select/Select.js +63 -54
  36. package/dist/components/Separator/Separator.js +5 -4
  37. package/dist/components/Sheet/Sheet.js +35 -26
  38. package/dist/components/Sidebar/Sidebar.js +112 -95
  39. package/dist/components/Skeleton/Skeleton.js +2 -2
  40. package/dist/components/Table/Table.js +15 -26
  41. package/dist/components/Tag/Tag.js +6 -5
  42. package/dist/components/Tooltip/Tooltip.js +17 -15
  43. package/dist/components/Typography/Typography.js +6 -7
  44. package/dist/hooks/use-mobile.js +1 -1
  45. package/dist/i18n/index.js +4 -53
  46. package/dist/i18n/locales/en_us.js +4 -3
  47. package/dist/i18n/locales/es_es.js +4 -3
  48. package/dist/i18n/locales/index.js +4 -4
  49. package/dist/i18n/locales/pt_br.js +4 -3
  50. package/dist/index.d.ts +108 -304
  51. package/dist/index.js +1 -12
  52. package/dist/lib/utils.js +2 -2
  53. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +806 -0
  54. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +726 -0
  55. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +347 -0
  56. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +154 -0
  57. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +136 -0
  58. package/dist/node_modules/@radix-ui/number/dist/index.js +6 -0
  59. package/dist/node_modules/@radix-ui/primitive/dist/index.js +11 -0
  60. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +303 -0
  61. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
  62. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +157 -0
  63. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +144 -0
  64. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +68 -0
  65. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +39 -0
  66. package/dist/node_modules/@radix-ui/react-context/dist/index.js +79 -0
  67. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +319 -0
  68. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
  69. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
  70. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +265 -0
  71. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +29 -0
  72. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
  73. package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
  74. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +831 -0
  75. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +296 -0
  76. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +278 -0
  77. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
  78. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
  79. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +41 -0
  80. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +220 -0
  81. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +718 -0
  82. package/dist/node_modules/@radix-ui/react-select/dist/index.js +1143 -0
  83. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +30 -0
  84. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +81 -0
  85. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +476 -0
  86. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +12 -0
  87. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +46 -0
  88. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
  89. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  90. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
  91. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
  92. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +35 -0
  93. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +74 -0
  94. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +3023 -0
  95. package/dist/node_modules/aria-hidden/dist/es2015/index.js +136 -0
  96. package/dist/node_modules/class-variance-authority/dist/index.js +44 -0
  97. package/dist/node_modules/clsx/dist/clsx.js +3 -0
  98. package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
  99. package/dist/node_modules/hex-color-opacity/lib/index.js +22 -0
  100. package/dist/node_modules/i18next/dist/esm/i18next.js +2228 -0
  101. package/dist/node_modules/lucide-react/dist/esm/Icon.js +44 -0
  102. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +26 -0
  103. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
  104. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +13 -0
  105. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +15 -0
  106. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +15 -0
  107. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +13 -0
  108. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +17 -0
  109. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +16 -0
  110. package/dist/node_modules/lucide-react/dist/esm/icons/circle-help.js +17 -0
  111. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +15 -0
  112. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +17 -0
  113. package/dist/node_modules/lucide-react/dist/esm/icons/menu.js +17 -0
  114. package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +15 -0
  115. package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +13 -0
  116. package/dist/node_modules/lucide-react/dist/esm/icons/panel-left.js +16 -0
  117. package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +23 -0
  118. package/dist/node_modules/lucide-react/dist/esm/icons/user.js +16 -0
  119. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +16 -0
  120. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +13 -0
  121. package/dist/node_modules/react-i18next/dist/es/context.js +18 -0
  122. package/dist/node_modules/react-i18next/dist/es/defaults.js +21 -0
  123. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +7 -0
  124. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +12 -0
  125. package/dist/node_modules/react-i18next/dist/es/unescape.js +27 -0
  126. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +112 -0
  127. package/dist/node_modules/react-i18next/dist/es/utils.js +63 -0
  128. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
  129. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +160 -0
  130. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +38 -0
  131. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
  132. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +109 -0
  133. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  134. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  135. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +56 -0
  136. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
  137. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
  138. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +19 -0
  139. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
  140. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
  141. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2493 -0
  142. package/dist/node_modules/tslib/tslib.es6.js +56 -0
  143. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
  144. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
  145. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  146. package/dist/node_modules/use-color-luminance/index.es.js +105 -0
  147. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
  148. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +77 -0
  149. package/dist/plugin/typographies.ts +146 -152
  150. package/dist/style.min.css +1 -1
  151. package/dist/utils/cookie.js +9 -6
  152. package/package.json +11 -3
@@ -1,11 +1,12 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
3
  import { Button } from '../Button/Button.js';
4
4
  import { Popover, PopoverContent, PopoverTrigger } from '../Popover/Popover.js';
5
5
  import { ScrollArea } from '../ScrollArea/ScrollArea.js';
6
6
  import { cn } from '../../lib/utils.js';
7
- import { HelpCircle } from 'lucide-react';
8
- import { Tooltip, TooltipTrigger, TooltipPortal, TooltipContent } from '../Tooltip/Tooltip.js';
7
+ import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
8
+ import { useTranslation } from '../../node_modules/react-i18next/dist/es/useTranslation.js';
9
+ import CircleHelp from '../../node_modules/lucide-react/dist/esm/icons/circle-help.js';
9
10
 
10
11
  const Item = ({
11
12
  description,
@@ -23,17 +24,19 @@ const Item = ({
23
24
  }
24
25
  onClick?.();
25
26
  };
26
- return /* @__PURE__ */ React.createElement(
27
+ return /* @__PURE__ */ jsxs(
27
28
  "div",
28
29
  {
29
30
  onClick: handleClickItem,
30
31
  className: cn(
31
32
  "flex gap-4 items-center justify-center p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300",
32
33
  !!disabled && "opacity-50 hover:cursor-not-allowed"
33
- )
34
- },
35
- icon && /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center [&>svg]:!w-5 [&>svg]:!h-5" }, icon),
36
- description && /* @__PURE__ */ React.createElement("div", { className: "grow" }, /* @__PURE__ */ React.createElement("span", { className: "body-large-400" }, description))
34
+ ),
35
+ children: [
36
+ icon && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center [&>svg]:!w-5 [&>svg]:!h-5", children: icon }),
37
+ description && /* @__PURE__ */ jsx("div", { className: "grow", children: /* @__PURE__ */ jsx("span", { className: "body-large-400", children: description }) })
38
+ ]
39
+ }
37
40
  );
38
41
  };
39
42
  const HelpMenu = ({
@@ -47,40 +50,48 @@ const HelpMenu = ({
47
50
  if (!title && !items) {
48
51
  return null;
49
52
  }
50
- const renderButtonTrigger = () => /* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
51
- Button,
52
- {
53
- size: "small",
54
- iconButton: true,
55
- customStyles,
56
- className: "flex-shrink-0 max-md:hidden",
57
- isActive: isOpen
58
- },
59
- /* @__PURE__ */ React.createElement(HelpCircle, null)
60
- ))), /* @__PURE__ */ React.createElement(TooltipPortal, null, /* @__PURE__ */ React.createElement(
61
- TooltipContent,
62
- {
63
- color: "black",
64
- align: "center",
65
- side: "bottom",
66
- hidden: isOpen
67
- },
68
- t("header.help")
69
- )));
70
- return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, renderButtonTrigger(), /* @__PURE__ */ React.createElement(
71
- PopoverContent,
72
- {
73
- side: "bottom",
74
- align: "end",
75
- className: "w-[200x] p-2",
76
- sideOffset: 16,
77
- onOpenAutoFocus: (e) => {
78
- e.preventDefault();
53
+ const renderButtonTrigger = () => /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
54
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
55
+ Button,
56
+ {
57
+ size: "small",
58
+ iconButton: true,
59
+ customStyles,
60
+ className: "max-md:hidden",
61
+ isActive: isOpen,
62
+ children: /* @__PURE__ */ jsx(CircleHelp, {})
63
+ }
64
+ ) }) }),
65
+ /* @__PURE__ */ jsx(
66
+ TooltipContent,
67
+ {
68
+ color: "black",
69
+ align: "center",
70
+ side: "bottom",
71
+ hidden: isOpen,
72
+ children: t("header.help")
73
+ }
74
+ )
75
+ ] }) });
76
+ return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
77
+ renderButtonTrigger(),
78
+ /* @__PURE__ */ jsxs(
79
+ PopoverContent,
80
+ {
81
+ side: "bottom",
82
+ align: "end",
83
+ className: "w-[200x] p-2",
84
+ sideOffset: 16,
85
+ onOpenAutoFocus: (e) => {
86
+ e.preventDefault();
87
+ },
88
+ children: [
89
+ title && /* @__PURE__ */ jsx("span", { className: "body-large-400 p-2 block", children: title }),
90
+ /* @__PURE__ */ jsx(ScrollArea, { style: { height: scrollAreaHeight }, children: items?.map((item, i) => /* @__PURE__ */ jsx(Item, { ...item }, i)) })
91
+ ]
79
92
  }
80
- },
81
- title && /* @__PURE__ */ React.createElement("span", { className: "body-large-400 p-2 block" }, title),
82
- /* @__PURE__ */ React.createElement(ScrollArea, { style: { height: scrollAreaHeight } }, items?.map((item, i) => /* @__PURE__ */ React.createElement(Item, { key: i, ...item })))
83
- ));
93
+ )
94
+ ] });
84
95
  };
85
96
  HelpMenu.displayName = "HelpMenu";
86
97
 
@@ -1,14 +1,11 @@
1
- import * as React from 'react';
2
- import Image from 'next/image';
1
+ import { jsx } from 'react/jsx-runtime';
3
2
  import img from '../../public/imgs/logo-lecom.png.js';
4
3
 
5
- const ImgBrand = ({ src }) => /* @__PURE__ */ React.createElement(
6
- Image,
4
+ const ImgBrand = ({ src }) => /* @__PURE__ */ jsx(
5
+ "img",
7
6
  {
8
- unoptimized: true,
9
- src: src ?? img,
10
- width: 0,
11
- height: 0,
7
+ loading: "lazy",
8
+ src: src ?? img.src,
12
9
  alt: "Logo",
13
10
  className: "w-auto h-auto max-w-[102px] max-h-[32px]"
14
11
  }
@@ -1,5 +1,5 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
3
  import { Button } from '../Button/Button.js';
4
4
  import '../CustomIcon/Icons/CadastroFacil.js';
5
5
  import { LogoLecom } from '../CustomIcon/Icons/LogoLecom.js';
@@ -9,7 +9,8 @@ import '../CustomIcon/Icons/LogoLecomBrand.js';
9
9
  import { Popover, PopoverContent, PopoverTrigger } from '../Popover/Popover.js';
10
10
  import { ScrollArea } from '../ScrollArea/ScrollArea.js';
11
11
  import { cn } from '../../lib/utils.js';
12
- import { Tooltip, TooltipTrigger, TooltipPortal, TooltipContent } from '../Tooltip/Tooltip.js';
12
+ import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
13
+ import { useTranslation } from '../../node_modules/react-i18next/dist/es/useTranslation.js';
13
14
 
14
15
  const Icon = ({
15
16
  icon,
@@ -21,7 +22,7 @@ const Icon = ({
21
22
  return null;
22
23
  }
23
24
  const containerIconStyles = !containerIconBgColor ? { style: { backgroundColor: bgColor, color: textColor } } : {};
24
- return /* @__PURE__ */ React.createElement(
25
+ return /* @__PURE__ */ jsx(
25
26
  "div",
26
27
  {
27
28
  className: cn(
@@ -29,9 +30,9 @@ const Icon = ({
29
30
  containerIconBgColor,
30
31
  containerIconBgColor && "text-white"
31
32
  ),
32
- ...containerIconStyles
33
- },
34
- icon
33
+ ...containerIconStyles,
34
+ children: icon
35
+ }
35
36
  );
36
37
  };
37
38
  const Item = ({
@@ -61,26 +62,31 @@ const Item = ({
61
62
  }
62
63
  return highlight;
63
64
  };
64
- return /* @__PURE__ */ React.createElement(
65
+ return /* @__PURE__ */ jsxs(
65
66
  "div",
66
67
  {
67
68
  onClick: handleClickItem,
68
69
  className: cn(
69
70
  "flex gap-4 items-center p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300",
70
71
  !!disabled && "opacity-50 hover:cursor-not-allowed"
71
- )
72
- },
73
- /* @__PURE__ */ React.createElement(
74
- Icon,
75
- {
76
- icon,
77
- containerIconBgColor,
78
- bgColor,
79
- textColor
80
- }
81
- ),
82
- /* @__PURE__ */ React.createElement("div", { className: "grow" }, title && /* @__PURE__ */ React.createElement("span", { className: "body-large-500 block" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "body-medium-400 block" }, description)),
83
- renderHighlight()
72
+ ),
73
+ children: [
74
+ /* @__PURE__ */ jsx(
75
+ Icon,
76
+ {
77
+ icon,
78
+ containerIconBgColor,
79
+ bgColor,
80
+ textColor
81
+ }
82
+ ),
83
+ /* @__PURE__ */ jsxs("div", { className: "grow", children: [
84
+ title && /* @__PURE__ */ jsx("span", { className: "body-large-500 block", children: title }),
85
+ description && /* @__PURE__ */ jsx("span", { className: "body-medium-400 block", children: description })
86
+ ] }),
87
+ renderHighlight()
88
+ ]
89
+ }
84
90
  );
85
91
  };
86
92
  const ModulesMenu = ({
@@ -94,39 +100,46 @@ const ModulesMenu = ({
94
100
  if (!title && !items) {
95
101
  return null;
96
102
  }
97
- const renderButtonTrigger = () => /* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
98
- Button,
99
- {
100
- size: "small",
101
- iconButton: true,
102
- customStyles,
103
- isActive: isOpen,
104
- className: "flex-shrink-0"
105
- },
106
- /* @__PURE__ */ React.createElement(LogoLecom, null)
107
- ))), /* @__PURE__ */ React.createElement(TooltipPortal, null, /* @__PURE__ */ React.createElement(TooltipContent, { color: "black", align: "end", side: "bottom", hidden: isOpen }, t("header.modules"))));
108
- return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, renderButtonTrigger(), /* @__PURE__ */ React.createElement(
109
- PopoverContent,
110
- {
111
- side: "bottom",
112
- align: "end",
113
- className: "w-[424px] p-2 max-md:w-full",
114
- sideOffset: 16,
115
- onOpenAutoFocus: (e) => {
116
- e.preventDefault();
103
+ const renderButtonTrigger = () => /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
104
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
105
+ Button,
106
+ {
107
+ size: "small",
108
+ iconButton: true,
109
+ customStyles,
110
+ isActive: isOpen,
111
+ children: /* @__PURE__ */ jsx(LogoLecom, {})
117
112
  }
118
- },
119
- title && /* @__PURE__ */ React.createElement("span", { className: "body-large-400 p-2 block" }, title),
120
- /* @__PURE__ */ React.createElement(ScrollArea, { style: { height: scrollAreaHeight } }, items?.map((item, i) => /* @__PURE__ */ React.createElement(
121
- Item,
113
+ ) }) }),
114
+ /* @__PURE__ */ jsx(TooltipContent, { color: "black", align: "end", side: "bottom", hidden: isOpen, children: t("header.modules") })
115
+ ] }) });
116
+ return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
117
+ renderButtonTrigger(),
118
+ /* @__PURE__ */ jsxs(
119
+ PopoverContent,
122
120
  {
123
- key: i,
124
- bgColor: customStyles.focus.textColor,
125
- textColor: customStyles.normal.textColor,
126
- ...item
121
+ side: "bottom",
122
+ align: "end",
123
+ className: "w-[424px] p-2 max-md:w-full",
124
+ sideOffset: 16,
125
+ onOpenAutoFocus: (e) => {
126
+ e.preventDefault();
127
+ },
128
+ children: [
129
+ title && /* @__PURE__ */ jsx("span", { className: "body-large-400 p-2 block", children: title }),
130
+ /* @__PURE__ */ jsx(ScrollArea, { style: { height: scrollAreaHeight }, children: items?.map((item, i) => /* @__PURE__ */ jsx(
131
+ Item,
132
+ {
133
+ bgColor: customStyles.focus.textColor,
134
+ textColor: customStyles.normal.textColor,
135
+ ...item
136
+ },
137
+ i
138
+ )) })
139
+ ]
127
140
  }
128
- )))
129
- ));
141
+ )
142
+ ] });
130
143
  };
131
144
  ModulesMenu.displayName = "ModulesMenu";
132
145
 
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { Button } from '../Button/Button.js';
3
- import { MessageSquare } from 'lucide-react';
3
+ import MessageSquare from '../../node_modules/lucide-react/dist/esm/icons/message-square.js';
4
4
 
5
5
  const SocialMenu = ({
6
6
  customStyles,
@@ -9,16 +9,15 @@ const SocialMenu = ({
9
9
  if (!onOpenSocialMenuChange) {
10
10
  return null;
11
11
  }
12
- return /* @__PURE__ */ React.createElement(
12
+ return /* @__PURE__ */ jsx(
13
13
  Button,
14
14
  {
15
15
  size: "small",
16
16
  iconButton: true,
17
17
  customStyles,
18
18
  onClick: onOpenSocialMenuChange,
19
- className: "flex-shrink-0"
20
- },
21
- /* @__PURE__ */ React.createElement(MessageSquare, null)
19
+ children: /* @__PURE__ */ jsx(MessageSquare, {})
20
+ }
22
21
  );
23
22
  };
24
23
  SocialMenu.displayName = "SocialMenu";
@@ -1,13 +1,15 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
- import { useTranslation } from 'react-i18next';
3
3
  import { Button } from '../Button/Button.js';
4
4
  import { Popover, PopoverContent, PopoverTrigger } from '../Popover/Popover.js';
5
5
  import { ScrollArea } from '../ScrollArea/ScrollArea.js';
6
6
  import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../Select/Select.js';
7
- import { useIsMobile } from '../../hooks/useIsMobile.js';
8
- import { User } from 'lucide-react';
9
- import i18n from 'i18next';
10
- import { Tooltip, TooltipTrigger, TooltipPortal, TooltipContent } from '../Tooltip/Tooltip.js';
7
+ import { useIsMobile } from '../../hooks/use-mobile.js';
8
+ import '../../i18n/index.js';
9
+ import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
10
+ import { useTranslation } from '../../node_modules/react-i18next/dist/es/useTranslation.js';
11
+ import User from '../../node_modules/lucide-react/dist/esm/icons/user.js';
12
+ import instance from '../../node_modules/i18next/dist/esm/i18next.js';
11
13
 
12
14
  const UserMenu = ({
13
15
  customStyles,
@@ -27,18 +29,26 @@ const UserMenu = ({
27
29
  return language.render;
28
30
  }
29
31
  const handleValueChange = (value) => {
30
- i18n.changeLanguage(value);
32
+ instance.changeLanguage(value);
31
33
  language.select?.onChange?.(value);
32
34
  };
33
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4 p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center gap-2 body-large-400 [&>svg]:!w-5 [&>svg]:!h-5" }, language.icon, language.label), /* @__PURE__ */ React.createElement(
34
- Select,
35
- {
36
- value: language.select?.value,
37
- onValueChange: handleValueChange
38
- },
39
- /* @__PURE__ */ React.createElement(SelectTrigger, { className: "h-7" }, /* @__PURE__ */ React.createElement(SelectValue, null)),
40
- /* @__PURE__ */ React.createElement(SelectContent, null, language.select?.options.map((option) => /* @__PURE__ */ React.createElement(SelectItem, { key: option.id, value: option.id }, option.name)))
41
- ));
35
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300", children: [
36
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 body-large-400 [&>svg]:!w-5 [&>svg]:!h-5", children: [
37
+ language.icon,
38
+ language.label
39
+ ] }),
40
+ /* @__PURE__ */ jsxs(
41
+ Select,
42
+ {
43
+ value: language.select?.value,
44
+ onValueChange: handleValueChange,
45
+ children: [
46
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "h-7", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
47
+ /* @__PURE__ */ jsx(SelectContent, { children: language.select?.options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.id, children: option.name }, option.id)) })
48
+ ]
49
+ }
50
+ )
51
+ ] });
42
52
  };
43
53
  const renderLogout = () => {
44
54
  if (!logout) {
@@ -47,48 +57,68 @@ const UserMenu = ({
47
57
  if (logout.render) {
48
58
  return logout.render;
49
59
  }
50
- return /* @__PURE__ */ React.createElement(
60
+ return /* @__PURE__ */ jsxs(
51
61
  "div",
52
62
  {
53
63
  className: "flex items-center gap-2 body-large-400 p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300 [&>svg]:!w-5 [&>svg]:!h-5",
54
- onClick: logout.onClick
55
- },
56
- logout.icon,
57
- logout.label
64
+ onClick: logout.onClick,
65
+ children: [
66
+ logout.icon,
67
+ logout.label
68
+ ]
69
+ }
58
70
  );
59
71
  };
60
- const renderButtonTrigger = () => /* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
61
- Button,
62
- {
63
- size: "small",
64
- iconButton: isMobile,
65
- customStyles,
66
- isActive: isOpen
67
- },
68
- isMobile ? /* @__PURE__ */ React.createElement(User, null) : user?.name
69
- ))), /* @__PURE__ */ React.createElement(TooltipPortal, null, /* @__PURE__ */ React.createElement(
70
- TooltipContent,
71
- {
72
- color: "black",
73
- align: "center",
74
- side: "bottom",
75
- hidden: isOpen
76
- },
77
- t("header.settings")
78
- )));
79
- return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, renderButtonTrigger(), /* @__PURE__ */ React.createElement(
80
- PopoverContent,
81
- {
82
- side: "bottom",
83
- align: "end",
84
- className: "w-[274px] p-2",
85
- sideOffset: 16,
86
- onOpenAutoFocus: (e) => {
87
- e.preventDefault();
72
+ const renderButtonTrigger = () => /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
73
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
74
+ Button,
75
+ {
76
+ size: "small",
77
+ iconButton: isMobile,
78
+ customStyles,
79
+ isActive: isOpen,
80
+ children: isMobile ? /* @__PURE__ */ jsx(User, {}) : user?.name
81
+ }
82
+ ) }) }),
83
+ /* @__PURE__ */ jsx(
84
+ TooltipContent,
85
+ {
86
+ color: "black",
87
+ align: "center",
88
+ side: "bottom",
89
+ hidden: isOpen,
90
+ children: t("header.settings")
91
+ }
92
+ )
93
+ ] }) });
94
+ return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
95
+ renderButtonTrigger(),
96
+ /* @__PURE__ */ jsx(
97
+ PopoverContent,
98
+ {
99
+ side: "bottom",
100
+ align: "end",
101
+ className: "w-[274px] p-2",
102
+ sideOffset: 16,
103
+ onOpenAutoFocus: (e) => {
104
+ e.preventDefault();
105
+ },
106
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
107
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-2", children: [
108
+ /* @__PURE__ */ jsx("div", { className: "bg-grey-400/30 rounded-full w-9 h-9 flex items-center justify-center [&>svg]:!w-6 [&>svg]:!h-6 shrink-0", children: /* @__PURE__ */ jsx(User, { className: "text-grey-600" }) }),
109
+ /* @__PURE__ */ jsxs("div", { className: "grow", children: [
110
+ /* @__PURE__ */ jsx("span", { className: "block body-large-400 break-all", children: user?.name }),
111
+ /* @__PURE__ */ jsx("span", { className: "block body-medium-400 break-all", children: user?.email })
112
+ ] })
113
+ ] }),
114
+ /* @__PURE__ */ jsx(ScrollArea, { style: { height: scrollAreaHeight }, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
115
+ renderLanguage(),
116
+ renderLogout()
117
+ ] }) })
118
+ ] })
88
119
  }
89
- },
90
- /* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-center" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 p-2" }, /* @__PURE__ */ React.createElement("div", { className: "bg-grey-400/30 rounded-full w-9 h-9 flex items-center justify-center [&>svg]:!w-6 [&>svg]:!h-6 shrink-0" }, /* @__PURE__ */ React.createElement(User, { className: "text-grey-600" })), /* @__PURE__ */ React.createElement("div", { className: "grow" }, /* @__PURE__ */ React.createElement("span", { className: "block body-large-400 break-words" }, user?.name), /* @__PURE__ */ React.createElement("span", { className: "block body-medium-400 break-all" }, user?.email))), /* @__PURE__ */ React.createElement(ScrollArea, { style: { height: scrollAreaHeight } }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-center" }, renderLanguage(), renderLogout())))
91
- ));
120
+ )
121
+ ] });
92
122
  };
93
123
  UserMenu.displayName = "UserMenu";
94
124
 
@@ -1,6 +1,7 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
- import { cva } from 'class-variance-authority';
4
+ import { cva } from '../../node_modules/class-variance-authority/dist/index.js';
4
5
 
5
6
  const inputVariants = cva(
6
7
  `flex h-8 w-full rounded-md border border-input bg-background px-3 py-2
@@ -71,7 +72,15 @@ const Input = React.forwardRef(
71
72
  }
72
73
  return sufix;
73
74
  };
74
- return /* @__PURE__ */ React.createElement("div", { className: "flex justify-center" }, renderPrefix(), /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center relative" }, /* @__PURE__ */ React.createElement("div", { className: "shrink-0 absolute left-3" }, /* @__PURE__ */ React.createElement(Icon, { icon: iconBefore })), /* @__PURE__ */ React.createElement("input", { type, className: inputStyles(), ref, ...props }), /* @__PURE__ */ React.createElement("div", { className: "shrink-0 absolute right-3" }, /* @__PURE__ */ React.createElement(Icon, { icon: iconAfter }))), renderSufix());
75
+ return /* @__PURE__ */ jsxs("div", { className: "flex justify-center", children: [
76
+ renderPrefix(),
77
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center relative", children: [
78
+ /* @__PURE__ */ jsx("div", { className: "shrink-0 absolute left-3", children: /* @__PURE__ */ jsx(Icon, { icon: iconBefore }) }),
79
+ /* @__PURE__ */ jsx("input", { type, className: inputStyles(), ref, ...props }),
80
+ /* @__PURE__ */ jsx("div", { className: "shrink-0 absolute right-3", children: /* @__PURE__ */ jsx(Icon, { icon: iconAfter }) })
81
+ ] }),
82
+ renderSufix()
83
+ ] });
75
84
  }
76
85
  );
77
86
  Input.displayName = "Input";