@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(), '
|
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="
|
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.
|
81
|
+
<Link href={el.href} legacyBehavior passHref>
|
82
|
+
{el.title}
|
83
|
+
</Link>
|
80
84
|
</NavigationMenuTrigger>
|
81
85
|
<NavigationMenuContent
|
82
|
-
className="fixed left-0 top-
|
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="
|
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
|
-
{
|
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-
|
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,
|
128
|
-
<li 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 =
|
172
|
+
const getChildExtraClass = (index: number) => {
|
164
173
|
if (isCards && (index === 3 || index === 4)) {
|
165
|
-
return "xl:-mt-
|
174
|
+
return "xl:-mt-32"
|
166
175
|
}
|
167
176
|
return ""
|
168
|
-
}
|
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