@stackshift-ui/navigation 6.1.0-alpha.6 → 6.1.0-alpha.7

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 (2) hide show
  1. package/package.json +10 -10
  2. 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.6",
4
+ "version": "6.1.0-alpha.7",
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/eslint-config": "6.0.10",
33
- "@stackshift-ui/typescript-config": "6.0.10"
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,18 +38,18 @@
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
- "@stackshift-ui/image": "6.0.11",
45
- "@stackshift-ui/link": "6.0.11",
46
- "@stackshift-ui/scripts": "6.0.10",
47
42
  "@stackshift-ui/section": "6.0.11",
48
43
  "@stackshift-ui/system": "6.0.11",
44
+ "@stackshift-ui/scripts": "6.0.10",
45
+ "@stackshift-ui/image": "6.0.11",
46
+ "@stackshift-ui/heading": "6.0.11",
47
+ "@stackshift-ui/social-icons": "6.0.12",
48
+ "@stackshift-ui/link": "6.0.11",
49
49
  "@stackshift-ui/text": "6.0.11",
50
50
  "@stackshift-ui/grid": "6.0.11",
51
- "@stackshift-ui/heading": "6.0.11",
52
- "@stackshift-ui/social-icons": "6.0.12"
51
+ "@stackshift-ui/button": "6.0.11",
52
+ "@stackshift-ui/flex": "6.0.11"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@stackshift-ui/system": ">=6.0.11",
@@ -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={onHover} onMouseLeave={onLeave}>
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="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">
245
- <div className="w-3/4 mx-auto bg-black">
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]">