@stackshift-ui/navigation 6.1.0-alpha.5 → 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.
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.5",
4
+ "version": "6.1.0-alpha.7",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -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]">
@@ -666,14 +666,9 @@ function MegaDropdownGroupedLinks({ groupedLinks }: { groupedLinks: LabeledRoute
666
666
  key={`MegaDropdownContent-Item-Link-${link._key}-${i}`}
667
667
  direction="col"
668
668
  className="h-fit w-fit">
669
- <Button
670
- ariaLabel={link.title ?? ""}
671
- as="link"
672
- link={link?.primaryButton ?? {}}
673
- variant="unstyled"
674
- className="text-black text-sm font-normal font-heading-kb leading-[30px] underline uppercase underline-offset-2">
675
- {link?.title}
676
- </Button>
669
+ <Text fontSize="base" className="text-black font-medium leading-[30px]">
670
+ {link.title}
671
+ </Text>
677
672
  <Flex
678
673
  direction="col"
679
674
  align="start"