@luxfi/core 5.3.4 → 5.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,30 +56,34 @@ const DesktopNav: React.FC<{
56
56
  setIsMenuOpen(false);
57
57
  }, [setIsMenuOpen]);
58
58
 
59
+ const menuHiddenClass = !isMenuOpened ? "invisible" : "";
60
+
59
61
  return links.length > 0 ? (
60
62
  <NavigationMenu>
61
63
  <NavigationMenuList>
62
64
  {links.map((el, index) => (
63
- <NavigationMenuItem key={index}>
65
+ <NavigationMenuItem key={index} className="!m-0">
64
66
  {el.isAIMenu ? (
65
67
  <Link href={el.href} legacyBehavior passHref>
66
- <NavigationMenuLink className={cn(navigationMenuTriggerStyle(), ' rounded-full')}>
68
+ <NavigationMenuLink className={cn(navigationMenuTriggerStyle(), ' text-muted-1 bg-transparent')}>
67
69
  {el.title}
68
70
  </NavigationMenuLink>
69
71
  </Link>
70
72
  ) : el.title === "Cards" ? (
71
73
  <>
72
74
  <NavigationMenuTrigger
73
- className="rounded-full"
75
+ className="text-muted-1 bg-transparent"
74
76
  onMouseEnter={handleMouseEnter}
75
77
  onFocus={handleMouseEnter}
76
78
  onMouseLeave={handleMouseLeave}
77
79
  onBlur={handleMouseLeave}
78
80
  >
79
- {el.title}
81
+ <Link href={el.href} legacyBehavior passHref>
82
+ {el.title}
83
+ </Link>
80
84
  </NavigationMenuTrigger>
81
85
  <NavigationMenuContent
82
- className="fixed left-0 top-20 w-screen h-full border-0 !backdrop-blur-3xl bg-transparent mt-0"
86
+ className={cn("fixed left-0 top-14 pt-6 w-screen h-full border-0 !backdrop-blur-3xl bg-transparent mt-0", menuHiddenClass)}
83
87
  onMouseEnter={handleMouseEnter}
84
88
  onMouseLeave={handleMouseLeave}
85
89
  >
@@ -93,16 +97,21 @@ const DesktopNav: React.FC<{
93
97
  ) : (
94
98
  <>
95
99
  <NavigationMenuTrigger
96
- className="rounded-full"
100
+ className="text-muted-1 bg-transparent"
97
101
  onMouseEnter={handleMouseEnter}
98
102
  onFocus={handleMouseEnter}
99
103
  onMouseLeave={handleMouseLeave}
100
104
  onBlur={handleMouseLeave}
101
105
  >
102
- {el.title}
106
+ {
107
+ el.href && el.href !== "" ?
108
+ <Link href={el.href} legacyBehavior passHref>
109
+ {el.title}
110
+ </Link> : <>{el.title}</>
111
+ }
103
112
  </NavigationMenuTrigger>
104
113
  <NavigationMenuContent
105
- className="fixed left-0 top-20 w-screen h-full border-0 !backdrop-blur-3xl bg-transparent mt-0"
114
+ className={cn("fixed left-0 top-14 pt-6 w-screen h-full border-0 !backdrop-blur-3xl bg-transparent mt-0", menuHiddenClass)}
106
115
  onMouseEnter={handleMouseEnter}
107
116
  onMouseLeave={handleMouseLeave}
108
117
  >
@@ -124,8 +133,8 @@ export default DesktopNav
124
133
  const ListItem = React.forwardRef<
125
134
  React.ElementRef<"a">,
126
135
  React.ComponentPropsWithoutRef<"a">
127
- >(({ className, title, children, key, ...props }, ref) => (
128
- <li key={key}>
136
+ >(({ className, title, children, ...props }, ref) => (
137
+ <li key={title}>
129
138
  <NavigationMenuLink asChild>
130
139
  <a
131
140
  ref={ref}
@@ -160,12 +169,12 @@ const GroupChildMenu = (params: { childs: ChildMenu[] | undefined, isCards?: boo
160
169
  return grouped;
161
170
  }, {});
162
171
 
163
- const getChildExtraClass = React.useCallback((index: number) => {
172
+ const getChildExtraClass = (index: number) => {
164
173
  if (isCards && (index === 3 || index === 4)) {
165
- return "xl:-mt-30"
174
+ return "xl:-mt-32"
166
175
  }
167
176
  return ""
168
- }, [isCards]);
177
+ };
169
178
 
170
179
  return Object.entries(groupedChildMenus).map(([groupName, childLinks], index) => (
171
180
  <div key={groupName} className={cn("py-4 px-4 ", getChildExtraClass(index))}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxfi/core",
3
- "version": "5.3.4",
3
+ "version": "5.3.6",
4
4
  "description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",