lecom-ui 5.4.37 → 5.4.39

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,6 +1,8 @@
1
1
  import * as React from 'react';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { Button } from '../Button/Button.js';
3
4
  import { Input } from '../Input/Input.js';
5
+ import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
4
6
  import { useIsMobile } from '../../hooks/useIsMobile.js';
5
7
  import opacity from 'hex-color-opacity';
6
8
  import { Search, SlidersHorizontal } from 'lucide-react';
@@ -13,6 +15,7 @@ const SearchInput = ({
13
15
  onChangeValue,
14
16
  onClickButton
15
17
  }) => {
18
+ const { t } = useTranslation();
16
19
  const isMobile = useIsMobile();
17
20
  const { normal, hover, focus } = customStyles;
18
21
  const [backgroundColor, setBackgroundColor] = React.useState(
@@ -40,7 +43,7 @@ const SearchInput = ({
40
43
  color: isActive ? focus.textColor : color,
41
44
  boxShadow: shadowSmTailwind
42
45
  };
43
- return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 flex-1 max-w-[630px]" }, !isMobile && /* @__PURE__ */ React.createElement(
46
+ return /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 flex-1 max-w-[630px]" }, !isMobile && /* @__PURE__ */ React.createElement(
44
47
  Input,
45
48
  {
46
49
  id: "header-search-input-lecom-ui",
@@ -58,7 +61,7 @@ const SearchInput = ({
58
61
  style: mappedCustomStyles,
59
62
  onChange: (e) => onChangeValue?.(e.target.value)
60
63
  }
61
- ), /* @__PURE__ */ React.createElement(
64
+ ), /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
62
65
  Button,
63
66
  {
64
67
  size: "small",
@@ -69,11 +72,11 @@ const SearchInput = ({
69
72
  className: "shrink-0"
70
73
  },
71
74
  /* @__PURE__ */ React.createElement(SlidersHorizontal, null)
72
- ), /* @__PURE__ */ React.createElement("style", null, `
75
+ )), /* @__PURE__ */ React.createElement(TooltipContent, { color: "black" }, t("header.filters"))), /* @__PURE__ */ React.createElement("style", null, `
73
76
  #header-search-input-lecom-ui::placeholder {
74
77
  color: ${mappedCustomStyles.color};
75
78
  }
76
- `));
79
+ `)));
77
80
  };
78
81
  SearchInput.displayName = "SearchInput";
79
82
 
@@ -47,7 +47,7 @@ const Layout = ({ children, header, sideBar }) => {
47
47
  info.versionText,
48
48
  " ",
49
49
  info.version,
50
- " - ",
50
+ " ",
51
51
  info.cycle,
52
52
  " ",
53
53
  info.build
@@ -160,7 +160,6 @@ const Sidebar = React.forwardRef(
160
160
  className: cn(
161
161
  "duration-200 relative inset-y-0 z-10 hidden h-full w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex border-grey-400",
162
162
  side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] group-data-[collapsible=offcanvas]:!w-0 group-data-[collapsible=offcanvas]:group-data-[state=expanded]:!w-[--sidebar-width-icon] group-data-[collapsible=offcanvas]:group-data-[state=expanded]:left-0" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] group-data-[collapsible=offcanvas]:!w-0 group-data-[collapsible=offcanvas]:group-data-[state=expanded]:!w-[--sidebar-width-icon] group-data-[collapsible=offcanvas]:group-data-[state=expanded]:right-0",
163
- // Adjust the padding for floating and inset variants.
164
163
  variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
165
164
  className
166
165
  ),
@@ -332,7 +331,6 @@ const SidebarGroupAction = React.forwardRef(({ className, asChild = false, ...pr
332
331
  "data-sidebar": "group-action",
333
332
  className: cn(
334
333
  "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
335
- // Increases the hit area of the button on mobile.
336
334
  "after:absolute after:-inset-2 after:md:hidden",
337
335
  "group-data-[collapsible=icon]:hidden",
338
336
  className
@@ -456,7 +454,6 @@ const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOn
456
454
  "data-sidebar": "menu-action",
457
455
  className: cn(
458
456
  "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
459
- // Increases the hit area of the button on mobile.
460
457
  "after:absolute after:-inset-2 after:md:hidden",
461
458
  "peer-data-[size=sm]/menu-button:top-1",
462
459
  "peer-data-[size=default]/menu-button:top-1.5",
@@ -5,7 +5,8 @@ const language = {
5
5
  collapseMenu: "Collapse menu",
6
6
  settings: "Settings",
7
7
  help: "Help",
8
- modules: "Modules"
8
+ modules: "Modules",
9
+ filters: "Filters"
9
10
  },
10
11
  pagination: {
11
12
  show: "Show:",
@@ -5,7 +5,8 @@ const language = {
5
5
  collapseMenu: "Contraer men\xFA",
6
6
  settings: "Configuraciones",
7
7
  help: "Ayuda",
8
- modules: "M\xF3dulos"
8
+ modules: "M\xF3dulos",
9
+ filters: "Filtros"
9
10
  },
10
11
  pagination: {
11
12
  show: "Mostrar:",
@@ -5,7 +5,8 @@ const language = {
5
5
  collapseMenu: "Recolher menu",
6
6
  settings: "Configura\xE7\xF5es",
7
7
  help: "Ajuda",
8
- modules: "M\xF3dulos"
8
+ modules: "M\xF3dulos",
9
+ filters: "Filtros"
9
10
  },
10
11
  pagination: {
11
12
  show: "Mostrar:",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.4.37",
3
+ "version": "5.4.39",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",