@stackshift-ui/navigation 6.1.0-alpha.6 → 6.1.0-alpha.8
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.
- package/package.json +7 -7
- package/src/navigation_f.tsx +1 -4
- package/src/navigation_g.tsx +19 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/navigation",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.1.0-alpha.
|
|
4
|
+
"version": "6.1.0-alpha.8",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"typescript": "^5.6.2",
|
|
30
30
|
"vite-tsconfig-paths": "^5.0.1",
|
|
31
31
|
"vitest": "^2.1.1",
|
|
32
|
-
"@stackshift-ui/
|
|
33
|
-
"@stackshift-ui/
|
|
32
|
+
"@stackshift-ui/typescript-config": "6.0.10",
|
|
33
|
+
"@stackshift-ui/eslint-config": "6.0.10"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"@react-spring/web": "^10.0.1",
|
|
39
39
|
"@uidotdev/usehooks": "^2.4.1",
|
|
40
40
|
"react-icons": "^5.3.0",
|
|
41
|
-
"@stackshift-ui/button": "6.0.11",
|
|
42
41
|
"@stackshift-ui/container": "6.0.11",
|
|
43
|
-
"@stackshift-ui/flex": "6.0.11",
|
|
44
42
|
"@stackshift-ui/image": "6.0.11",
|
|
45
43
|
"@stackshift-ui/link": "6.0.11",
|
|
46
|
-
"@stackshift-ui/scripts": "6.0.10",
|
|
47
44
|
"@stackshift-ui/section": "6.0.11",
|
|
48
45
|
"@stackshift-ui/system": "6.0.11",
|
|
46
|
+
"@stackshift-ui/heading": "6.0.11",
|
|
49
47
|
"@stackshift-ui/text": "6.0.11",
|
|
48
|
+
"@stackshift-ui/button": "6.0.11",
|
|
49
|
+
"@stackshift-ui/scripts": "6.0.10",
|
|
50
50
|
"@stackshift-ui/grid": "6.0.11",
|
|
51
|
-
"@stackshift-ui/
|
|
51
|
+
"@stackshift-ui/flex": "6.0.11",
|
|
52
52
|
"@stackshift-ui/social-icons": "6.0.12"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
package/src/navigation_f.tsx
CHANGED
|
@@ -330,10 +330,7 @@ const DropdownMenuItem = ({
|
|
|
330
330
|
/>
|
|
331
331
|
</Flex>
|
|
332
332
|
) : (
|
|
333
|
-
<p
|
|
334
|
-
className={`hover:text-secondary text-lg cursor-pointer flex items-center group py-2 px-4 ${
|
|
335
|
-
hasScrolled ? "text-white" : "text-black"
|
|
336
|
-
}`}>
|
|
333
|
+
<p className="hover:text-secondary text-lg cursor-pointer flex items-center group py-2 px-4 text-white">
|
|
337
334
|
{mLink?.label}
|
|
338
335
|
<BiChevronDown
|
|
339
336
|
size={24}
|
package/src/navigation_g.tsx
CHANGED
|
@@ -232,8 +232,22 @@ function HoverMenu({
|
|
|
232
232
|
onLeave: () => void;
|
|
233
233
|
isNavHovered: boolean;
|
|
234
234
|
}) {
|
|
235
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
236
|
+
|
|
237
|
+
const handleMouseEnter = () => {
|
|
238
|
+
setIsHovered(true);
|
|
239
|
+
onHover();
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const handleMouseLeave = () => {
|
|
243
|
+
setTimeout(() => {
|
|
244
|
+
setIsHovered(false);
|
|
245
|
+
onLeave();
|
|
246
|
+
}, 100);
|
|
247
|
+
};
|
|
248
|
+
|
|
235
249
|
return (
|
|
236
|
-
<div className="group relative" onMouseEnter={
|
|
250
|
+
<div className="group relative" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
|
|
237
251
|
<button
|
|
238
252
|
className={`${navlinkStyle} group-hover:after:!w-full flex items-center space-x-2 ${
|
|
239
253
|
isNavHovered ? "text-white" : "text-black"
|
|
@@ -241,8 +255,10 @@ function HoverMenu({
|
|
|
241
255
|
<span>{link?.label}</span>
|
|
242
256
|
</button>
|
|
243
257
|
|
|
244
|
-
<div className="
|
|
245
|
-
|
|
258
|
+
<div className="absolute left-0 right-0 top-full h-2 pointer-events-auto opacity-0 group-hover:pointer-events-auto"></div>
|
|
259
|
+
|
|
260
|
+
<div className="fixed left-0 right-0 top-[80px] pointer-events-none group-hover:pointer-events-auto opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-50">
|
|
261
|
+
<div className="w-3/4 mx-auto bg-black shadow-lg">
|
|
246
262
|
<div className="max-w-[1440px] mx-auto px-4">
|
|
247
263
|
<div className="p-[30px]">
|
|
248
264
|
<div className="grid grid-cols-5 gap-[30px]">
|