aura-ui-library 1.0.24 → 1.0.26

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 (3) hide show
  1. package/dist/index.js +273 -487
  2. package/dist/index.mjs +306 -525
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -257,569 +257,355 @@ var import_react_router_dom2 = require("react-router-dom");
257
257
  var import_gsap2 = require("gsap");
258
258
  var import_fi = require("react-icons/fi");
259
259
  var Navbar = ({
260
- logoText = "Aura",
260
+ logoText = "AURA",
261
261
  links = [
262
+ { label: "Home", path: "/" },
262
263
  { label: "Products", path: "/products" },
263
- { label: "Solutions", path: "/solutions" },
264
- { label: "Resources", path: "/resources" },
264
+ { label: "Workspace", path: "/workspace" },
265
265
  { label: "Pricing", path: "/pricing" }
266
266
  ],
267
+ socials = [
268
+ { label: "Twitter", icon: /* @__PURE__ */ import_react2.default.createElement(import_fi.FiTwitter, null), path: "#" },
269
+ { label: "GitHub", icon: /* @__PURE__ */ import_react2.default.createElement(import_fi.FiGithub, null), path: "#" },
270
+ { label: "LinkedIn", icon: /* @__PURE__ */ import_react2.default.createElement(import_fi.FiLinkedin, null), path: "#" }
271
+ ],
272
+ contact = {
273
+ title: "Get in touch",
274
+ email: "hello@aura-ui.dev",
275
+ address: "123 Innovation Drive, SF"
276
+ },
267
277
  accentColor = "#6366f1",
268
- theme = "light",
278
+ theme = "dark",
269
279
  // "dark" | "light"
270
280
  style = {},
271
- height = "80px",
272
- animationDuration = 1.6,
273
- easing = "expo.out"
281
+ animationDuration = 1.2,
282
+ easing = "expo.inOut"
274
283
  }) => {
284
+ const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
285
+ const [isScrolled, setIsScrolled] = (0, import_react2.useState)(false);
275
286
  const [isMobile, setIsMobile] = (0, import_react2.useState)(false);
276
- const [isMenuOpen, setIsMenuOpen] = (0, import_react2.useState)(false);
277
- const [activeDropdown, setActiveDropdown] = (0, import_react2.useState)(null);
278
- const navRef = (0, import_react2.useRef)(null);
279
- const logoRef = (0, import_react2.useRef)(null);
280
- const linksRef = (0, import_react2.useRef)([]);
281
- const buttonRef = (0, import_react2.useRef)(null);
282
- const menuOverlayRef = (0, import_react2.useRef)(null);
283
- const containerRef = (0, import_react2.useRef)(null);
284
- const menuButtonRef = (0, import_react2.useRef)(null);
285
- const firstMobileLinkRef = (0, import_react2.useRef)(null);
287
+ const [hoverIndex, setHoverIndex] = (0, import_react2.useState)(null);
286
288
  const inRouter = (0, import_react_router_dom2.useInRouterContext)();
287
289
  const navigate = inRouter ? (0, import_react_router_dom2.useNavigate)() : null;
290
+ const location = inRouter ? (0, import_react_router_dom2.useLocation)() : { pathname: "/" };
291
+ const overlayRef = (0, import_react2.useRef)(null);
292
+ const linksContainerRef = (0, import_react2.useRef)(null);
293
+ const infoContainerRef = (0, import_react2.useRef)(null);
288
294
  const isLight2 = theme === "light";
289
- const navBg = isLight2 ? "rgba(255, 255, 255, 0.8)" : "rgba(10, 10, 10, 0.7)";
290
- const navText = isLight2 ? "#1e293b" : "#e2e8f0";
291
- const navPrimary = isLight2 ? "#0f172a" : "#ffffff";
292
- const navBorder = isLight2 ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.06)";
293
- const mobileMenuBg = isLight2 ? "#ffffff" : "#0f0f0f";
295
+ const bgMain = isLight2 ? "#ffffff" : "#050505";
296
+ const textMain = isLight2 ? "#0f172a" : "#ffffff";
297
+ const textMuted = isLight2 ? "rgba(15, 23, 42, 0.5)" : "rgba(255, 255, 255, 0.4)";
298
+ const borderCol = isLight2 ? "rgba(0,0,0,0.08)" : "rgba(255,255,255,0.08)";
299
+ const headerBg = isLight2 ? "rgba(255, 255, 255, 0.85)" : "rgba(5, 5, 5, 0.85)";
300
+ const headerShadow = isLight2 ? "0 4px 30px rgba(0,0,0,0.05)" : "0 4px 30px rgba(0,0,0,0.3)";
294
301
  const prefersReducedMotion = typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
295
302
  (0, import_react2.useEffect)(() => {
296
- const handleResize = () => {
297
- const mobile = window.innerWidth <= 1024;
298
- setIsMobile(mobile);
299
- if (!mobile && isMenuOpen) setIsMenuOpen(false);
300
- };
303
+ const handleResize = () => setIsMobile(window.innerWidth < 1024);
304
+ const handleScroll = () => setIsScrolled(window.scrollY > 50);
301
305
  handleResize();
302
306
  window.addEventListener("resize", handleResize);
303
- return () => window.removeEventListener("resize", handleResize);
304
- }, [isMenuOpen]);
307
+ window.addEventListener("scroll", handleScroll);
308
+ return () => {
309
+ window.removeEventListener("resize", handleResize);
310
+ window.removeEventListener("scroll", handleScroll);
311
+ };
312
+ }, []);
305
313
  (0, import_react2.useEffect)(() => {
306
- const ctx = import_gsap2.gsap.context(() => {
307
- const tl = import_gsap2.gsap.timeline({
308
- defaults: {
309
- ease: easing,
310
- duration: prefersReducedMotion ? 0.01 : animationDuration
311
- }
314
+ if (prefersReducedMotion) return;
315
+ if (isOpen) {
316
+ document.body.style.overflow = "hidden";
317
+ const tl = import_gsap2.gsap.timeline();
318
+ tl.to(overlayRef.current, {
319
+ clipPath: "circle(150% at 95% 40px)",
320
+ pointerEvents: "auto",
321
+ duration: animationDuration,
322
+ ease: easing
312
323
  });
313
- tl.fromTo(
314
- navRef.current,
315
- { yPercent: -100, opacity: 0 },
316
- {
317
- yPercent: 0,
318
- opacity: 1,
319
- duration: prefersReducedMotion ? 0.01 : 1.2
320
- }
321
- ).fromTo(
322
- logoRef.current,
323
- { x: -30, opacity: 0, filter: "blur(5px)" },
324
- { x: 0, opacity: 1, filter: "blur(0px)" },
325
- "-=0.9"
326
- );
327
- if (!isMobile) {
324
+ if (linksContainerRef.current) {
328
325
  tl.fromTo(
329
- linksRef.current,
330
- { y: 20, opacity: 0, rotateX: -20, transformPerspective: 500 },
331
- {
332
- y: 0,
333
- opacity: 1,
334
- rotateX: 0,
335
- stagger: 0.08,
336
- duration: prefersReducedMotion ? 0.01 : 1
337
- },
338
- "-=1.1"
339
- ).fromTo(
340
- buttonRef.current,
341
- { scale: 0.9, opacity: 0, filter: "blur(5px)" },
342
- {
343
- scale: 1,
344
- opacity: 1,
345
- filter: "blur(0px)",
346
- duration: prefersReducedMotion ? 0.01 : 1,
347
- ease: "elastic.out(1, 0.5)"
348
- },
349
- "-=0.9"
326
+ linksContainerRef.current.children,
327
+ { y: 60, opacity: 0, rotateX: -15, transformPerspective: 800 },
328
+ { y: 0, opacity: 1, rotateX: 0, stagger: 0.08, duration: 1, ease: "power3.out" },
329
+ "-=0.8"
350
330
  );
351
331
  }
352
- }, containerRef);
353
- return () => ctx.revert();
354
- }, [easing, animationDuration, isMobile, prefersReducedMotion]);
355
- (0, import_react2.useEffect)(() => {
356
- if (isMobile && menuOverlayRef.current) {
357
- if (isMenuOpen) {
358
- import_gsap2.gsap.fromTo(
359
- menuOverlayRef.current,
360
- { clipPath: "circle(0% at 100% 0%)", opacity: 0 },
361
- {
362
- clipPath: "circle(150% at 100% 0%)",
363
- opacity: 1,
364
- duration: prefersReducedMotion ? 0.01 : 0.8,
365
- ease: "expo.inOut"
366
- }
367
- );
368
- const mmLinks = menuOverlayRef.current.querySelectorAll(".mobile-link");
369
- import_gsap2.gsap.fromTo(
370
- mmLinks,
371
- { y: 40, opacity: 0 },
372
- {
373
- y: 0,
374
- opacity: 1,
375
- stagger: 0.1,
376
- duration: prefersReducedMotion ? 0.01 : 0.6,
377
- ease: "power3.out",
378
- delay: prefersReducedMotion ? 0 : 0.3
379
- }
332
+ if (infoContainerRef.current) {
333
+ tl.fromTo(
334
+ infoContainerRef.current.children,
335
+ { opacity: 0, x: 20 },
336
+ { opacity: 1, x: 0, stagger: 0.1, duration: 0.8, ease: "power2.out" },
337
+ "-=0.9"
380
338
  );
381
- } else {
382
- import_gsap2.gsap.to(menuOverlayRef.current, {
383
- clipPath: "circle(0% at 100% 0%)",
384
- opacity: 0,
385
- duration: prefersReducedMotion ? 0.01 : 0.6,
386
- ease: "expo.inOut"
387
- });
388
339
  }
340
+ } else {
341
+ document.body.style.overflow = "";
342
+ const tl = import_gsap2.gsap.timeline();
343
+ tl.to(overlayRef.current, {
344
+ clipPath: "circle(0% at 95% 40px)",
345
+ pointerEvents: "none",
346
+ duration: animationDuration * 0.7,
347
+ ease: "expo.inOut"
348
+ });
389
349
  }
390
- }, [isMenuOpen, isMobile, prefersReducedMotion]);
391
- (0, import_react2.useEffect)(() => {
392
- if (!isMobile) return;
393
- const onKeyDown = (event) => {
394
- var _a;
395
- if (event.key === "Escape" && isMenuOpen) {
396
- setIsMenuOpen(false);
397
- (_a = menuButtonRef.current) == null ? void 0 : _a.focus();
398
- }
350
+ return () => {
351
+ document.body.style.overflow = "";
399
352
  };
400
- window.addEventListener("keydown", onKeyDown);
401
- return () => window.removeEventListener("keydown", onKeyDown);
402
- }, [isMobile, isMenuOpen]);
403
- (0, import_react2.useEffect)(() => {
404
- var _a;
405
- if (isMenuOpen) {
406
- (_a = firstMobileLinkRef.current) == null ? void 0 : _a.focus();
353
+ }, [isOpen, animationDuration, easing, prefersReducedMotion]);
354
+ const handleNavigation = (path, e) => {
355
+ e.preventDefault();
356
+ if (location.pathname === path) {
357
+ setIsOpen(false);
358
+ return;
407
359
  }
408
- }, [isMenuOpen]);
409
- const handleMouseEnter = (e) => {
410
- import_gsap2.gsap.to(e.currentTarget, {
411
- scale: 1.05,
412
- color: accentColor,
413
- duration: 0.4,
414
- ease: "power2.out"
415
- });
416
- };
417
- const handleMouseMove = (e) => {
418
- if (isMobile) return;
419
- const { clientX, clientY, currentTarget } = e;
420
- const { left, top, width, height: height2 } = currentTarget.getBoundingClientRect();
421
- const x = (clientX - (left + width / 2)) * 0.4;
422
- const y = (clientY - (top + height2 / 2)) * 0.4;
423
- import_gsap2.gsap.to(currentTarget, {
424
- x,
425
- y,
426
- duration: 0.5,
427
- ease: "power3.out"
428
- });
429
- };
430
- const handleMouseLeave = (e) => {
431
- import_gsap2.gsap.to(e.currentTarget, {
432
- x: 0,
433
- y: 0,
434
- scale: 1,
435
- color: navText,
436
- duration: 0.8,
437
- ease: "elastic.out(1.2, 0.3)"
438
- });
439
- };
440
- const handleButtonClick = (e) => {
441
- import_gsap2.gsap.to(e.currentTarget, {
442
- scale: 0.92,
443
- duration: 0.15,
444
- yoyo: true,
445
- repeat: 1,
446
- ease: "power1.inOut"
447
- });
360
+ setIsOpen(false);
361
+ setTimeout(() => {
362
+ if (navigate) {
363
+ navigate(path);
364
+ window.scrollTo(0, 0);
365
+ } else {
366
+ window.location.href = path;
367
+ }
368
+ }, animationDuration * 0.7 * 1e3);
448
369
  };
449
370
  const styles = {
450
- container: {
371
+ header: {
451
372
  position: "fixed",
452
373
  top: 0,
453
374
  left: 0,
454
375
  width: "100%",
455
- height,
456
- backgroundColor: navBg,
457
- backdropFilter: "blur(20px)",
458
- WebkitBackdropFilter: "blur(20px)",
459
376
  display: "flex",
460
- alignItems: "center",
461
377
  justifyContent: "space-between",
462
- padding: "0 4%",
378
+ alignItems: "center",
463
379
  zIndex: 1e3,
464
- borderBottom: `1px solid ${navBorder}`,
465
- boxSizing: "border-box",
466
380
  fontFamily: '"Inter", -apple-system, sans-serif',
467
- transition: "background-color 0.4s ease, border-color 0.4s ease",
381
+ boxSizing: "border-box",
382
+ padding: isScrolled ? "15px 5%" : "30px 5%",
383
+ backgroundColor: isScrolled ? headerBg : "transparent",
384
+ backdropFilter: isScrolled ? "blur(20px)" : "none",
385
+ boxShadow: isScrolled ? headerShadow : "none",
386
+ transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)",
468
387
  ...style
469
388
  },
470
389
  logo: {
471
- fontSize: "24px",
472
- fontWeight: "900",
473
- color: navPrimary,
474
- textDecoration: "none",
475
- letterSpacing: "-1px",
476
390
  display: "flex",
477
391
  alignItems: "center",
478
392
  gap: "10px",
479
- cursor: "pointer"
393
+ fontSize: "22px",
394
+ fontWeight: "900",
395
+ letterSpacing: "1px",
396
+ textDecoration: "none",
397
+ color: isOpen ? textMain : textMain,
398
+ // Text logic handles contrast
399
+ zIndex: 1001,
400
+ cursor: "pointer",
401
+ mixBlendMode: isOpen ? "normal" : "difference",
402
+ // Only difference when closed over unpredictable content
403
+ willChange: "transform",
404
+ transition: "transform 0.3s ease"
480
405
  },
481
406
  logoDot: {
482
- width: "10px",
483
- height: "10px",
407
+ width: "8px",
408
+ height: "8px",
484
409
  borderRadius: "50%",
485
410
  backgroundColor: accentColor,
486
- boxShadow: isLight2 ? `0 4px 10px ${accentColor}66` : `0 0 16px ${accentColor}`
487
- },
488
- navLinks: {
489
- display: isMobile ? "none" : "flex",
490
- gap: "36px",
491
- alignItems: "center"
411
+ boxShadow: `0 0 15px ${accentColor}88`
492
412
  },
493
- link: {
494
- fontSize: "15px",
495
- fontWeight: "600",
496
- color: navText,
497
- textDecoration: "none",
498
- cursor: "pointer",
499
- display: "inline-block",
413
+ hamburgerBtn: {
500
414
  position: "relative",
501
- transformOrigin: "center"
502
- },
503
- actions: {
504
- display: "flex",
505
- alignItems: "center",
506
- gap: "24px"
507
- },
508
- cta: {
509
- padding: "12px 28px",
510
- backgroundColor: navPrimary,
511
- color: isLight2 ? "#ffffff" : "#000000",
512
- borderRadius: "100px",
513
- border: "none",
514
- fontWeight: "700",
515
- fontSize: "14px",
516
- cursor: "pointer",
415
+ width: "48px",
416
+ height: "48px",
417
+ borderRadius: "50%",
418
+ backgroundColor: isOpen ? borderCol : "transparent",
517
419
  display: "flex",
420
+ flexDirection: "column",
421
+ justifyContent: "center",
518
422
  alignItems: "center",
519
- gap: "8px",
520
- boxShadow: isLight2 ? "0 8px 20px rgba(0,0,0,0.1)" : "0 8px 20px rgba(255,255,255,0.05)",
521
- outline: "none",
522
- willChange: "transform",
523
- transition: "background-color 0.3s ease"
524
- },
525
- menuToggle: {
526
- display: isMobile ? "flex" : "none",
527
- width: "40px",
528
- height: "40px",
423
+ gap: "6px",
529
424
  cursor: "pointer",
530
- alignItems: "center",
531
- justifyContent: "center",
532
425
  zIndex: 1001,
533
- position: "relative"
426
+ border: `1px solid ${isOpen ? borderCol : "transparent"}`,
427
+ transition: "all 0.4s ease",
428
+ mixBlendMode: isOpen ? "normal" : "difference"
534
429
  },
535
- hamburgerLine: {
536
- position: "absolute",
537
- width: "24px",
430
+ line: {
431
+ width: "22px",
538
432
  height: "2px",
539
- backgroundColor: navPrimary,
540
- transition: "all 0.4s cubic-bezier(0.19, 1, 0.22, 1)"
541
- },
542
- dropdown: {
543
- position: "absolute",
544
- top: "100%",
545
- left: "50%",
546
- transform: "translateX(-50%)",
547
- backgroundColor: mobileMenuBg,
548
- minWidth: "220px",
549
- borderRadius: "16px",
550
- padding: "12px",
551
- border: `1px solid ${navBorder}`,
552
- boxShadow: "0 20px 40px rgba(0,0,0,0.15)",
553
- opacity: 0,
554
- visibility: "hidden",
555
- zIndex: 1100,
556
- display: "flex",
557
- flexDirection: "column",
558
- gap: "4px"
559
- },
560
- dropdownItem: {
561
- padding: "10px 16px",
562
- borderRadius: "8px",
563
- fontSize: "14px",
564
- fontWeight: "500",
565
- color: navText,
566
- textDecoration: "none",
567
- display: "flex",
568
- alignItems: "center",
569
- justifyContent: "space-between",
570
- transition: "background-color 0.2s ease, color 0.2s ease"
433
+ backgroundColor: isOpen ? textMain : textMain,
434
+ // In difference mode, white behaves properly
435
+ borderRadius: "2px",
436
+ transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
437
+ transformOrigin: "center"
571
438
  },
572
- mobileOverlay: {
439
+ overlay: {
573
440
  position: "fixed",
574
441
  top: 0,
575
442
  left: 0,
576
443
  width: "100vw",
577
444
  height: "100vh",
578
- backgroundColor: mobileMenuBg,
445
+ backgroundColor: bgMain,
579
446
  zIndex: 999,
447
+ clipPath: "circle(0% at 95% 40px)",
448
+ pointerEvents: "none",
449
+ display: "flex",
450
+ // Switch to flex for bulletproof layout
451
+ flexDirection: isMobile ? "column" : "row",
452
+ justifyContent: isMobile ? "flex-start" : "space-between",
453
+ alignItems: isMobile ? "flex-start" : "center",
454
+ padding: isMobile ? "120px 8% 60px" : "100px 10%",
455
+ boxSizing: "border-box",
456
+ fontFamily: '"Inter", -apple-system, sans-serif',
457
+ overflowY: isMobile ? "auto" : "hidden"
458
+ // Allow scroll on mobile if items overflow
459
+ },
460
+ linksArea: {
580
461
  display: "flex",
581
462
  flexDirection: "column",
582
- justifyContent: "center",
463
+ gap: "10px",
464
+ width: isMobile ? "100%" : "60%",
465
+ marginBottom: isMobile ? "60px" : "0"
466
+ },
467
+ linkItem: {
468
+ display: "flex",
583
469
  alignItems: "center",
470
+ gap: "20px",
471
+ textDecoration: "none",
472
+ padding: "10px 0",
473
+ cursor: "pointer",
474
+ willChange: "transform, opacity, color"
475
+ },
476
+ linkText: {
477
+ fontSize: "clamp(42px, 7vw, 100px)",
478
+ fontWeight: "900",
479
+ letterSpacing: "-2px",
480
+ textTransform: "uppercase",
481
+ lineHeight: "1"
482
+ },
483
+ infoArea: {
484
+ display: "flex",
485
+ flexDirection: "column",
584
486
  gap: "40px",
585
- pointerEvents: isMenuOpen ? "auto" : "none"
487
+ width: isMobile ? "100%" : "30%",
488
+ paddingLeft: isMobile ? "0" : "5%",
489
+ borderLeft: isMobile ? "none" : `1px solid ${borderCol}`
490
+ },
491
+ infoBlock: {
492
+ display: "flex",
493
+ flexDirection: "column",
494
+ gap: "12px"
495
+ },
496
+ infoLabel: {
497
+ fontSize: "12px",
498
+ textTransform: "uppercase",
499
+ letterSpacing: "2px",
500
+ fontWeight: "700",
501
+ color: accentColor
502
+ },
503
+ infoText: {
504
+ fontSize: "16px",
505
+ fontWeight: "500",
506
+ color: textMain,
507
+ lineHeight: "1.5"
508
+ },
509
+ socialGrid: {
510
+ display: "flex",
511
+ flexWrap: "wrap",
512
+ gap: "12px"
513
+ },
514
+ socialLink: {
515
+ display: "flex",
516
+ alignItems: "center",
517
+ gap: "8px",
518
+ padding: "12px 20px",
519
+ borderRadius: "100px",
520
+ border: `1px solid ${borderCol}`,
521
+ color: textMain,
522
+ textDecoration: "none",
523
+ fontSize: "14px",
524
+ fontWeight: "600",
525
+ transition: "all 0.3s ease"
586
526
  }
587
527
  };
588
- return /* @__PURE__ */ import_react2.default.createElement("div", { ref: containerRef }, /* @__PURE__ */ import_react2.default.createElement(
589
- "nav",
528
+ return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("header", { style: styles.header }, /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.logo, onClick: (e) => handleNavigation("/", e) }, /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.logoDot }), logoText), /* @__PURE__ */ import_react2.default.createElement(
529
+ "div",
590
530
  {
591
- ref: navRef,
592
- style: styles.container,
593
- role: "navigation",
594
- "aria-label": "Primary navigation"
595
- },
596
- /* @__PURE__ */ import_react2.default.createElement(
597
- "div",
598
- {
599
- ref: logoRef,
600
- style: styles.logo,
601
- onMouseEnter: (e) => import_gsap2.gsap.to(e.currentTarget, {
602
- scale: 1.05,
603
- duration: 0.4,
604
- ease: "back.out(1.5)"
605
- }),
606
- onMouseLeave: (e) => import_gsap2.gsap.to(e.currentTarget, {
607
- scale: 1,
608
- duration: 0.4,
609
- ease: "power2.out"
610
- })
611
- },
612
- inRouter ? /* @__PURE__ */ import_react2.default.createElement(import_react_router_dom2.Link, { to: "/", style: { ...styles.logo, color: "inherit" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.logoDot }), logoText) : /* @__PURE__ */ import_react2.default.createElement("a", { href: "/", style: { ...styles.logo, color: "inherit" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.logoDot }), logoText)
613
- ),
614
- /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.navLinks }, links.map((link, i) => {
615
- const hasDropdown = link.children && link.children.length > 0;
616
- const dropdownRef = (el) => linksRef.current[`drop-${i}`] = el;
617
- const linkProps = {
618
- ref: (el) => linksRef.current[i] = el,
619
- onMouseEnter: (e) => {
620
- handleMouseEnter(e);
621
- if (hasDropdown) {
622
- setActiveDropdown(i);
623
- import_gsap2.gsap.to(linksRef.current[`drop-${i}`], {
624
- opacity: 1,
625
- visibility: "visible",
626
- y: 10,
627
- duration: 0.4,
628
- ease: "expo.out"
629
- });
630
- }
631
- },
632
- onMouseMove: handleMouseMove,
633
- onMouseLeave: (e) => {
634
- handleMouseLeave(e);
635
- if (hasDropdown) {
636
- import_gsap2.gsap.to(linksRef.current[`drop-${i}`], {
637
- opacity: 0,
638
- visibility: "hidden",
639
- y: 0,
640
- duration: 0.3,
641
- ease: "power2.in",
642
- onComplete: () => setActiveDropdown(null)
643
- });
644
- }
645
- },
646
- key: link.path || `link-${i}`
647
- };
648
- return /* @__PURE__ */ import_react2.default.createElement(
649
- "div",
650
- {
651
- key: link.path || i,
652
- style: { position: "relative", display: "flex", alignItems: "center" },
653
- onMouseLeave: linkProps.onMouseLeave
654
- },
655
- inRouter ? /* @__PURE__ */ import_react2.default.createElement(
656
- import_react_router_dom2.NavLink,
657
- {
658
- to: link.path || "#",
659
- ...linkProps,
660
- onMouseLeave: void 0,
661
- style: ({ isActive }) => ({
662
- ...styles.link,
663
- color: isActive ? accentColor : navText,
664
- display: "flex",
665
- alignItems: "center",
666
- gap: "4px"
667
- })
668
- },
669
- link.label,
670
- hasDropdown && /* @__PURE__ */ import_react2.default.createElement(import_fi.FiArrowDown, { size: 14, style: { opacity: 0.5 } })
671
- ) : /* @__PURE__ */ import_react2.default.createElement("a", { href: link.path || "#", ...linkProps, onMouseLeave: void 0, style: styles.link }, link.label, hasDropdown && /* @__PURE__ */ import_react2.default.createElement(import_fi.FiArrowDown, { size: 14, style: { opacity: 0.5 } })),
672
- hasDropdown && /* @__PURE__ */ import_react2.default.createElement(
673
- "div",
674
- {
675
- ref: dropdownRef,
676
- style: styles.dropdown,
677
- onMouseEnter: () => {
678
- setActiveDropdown(i);
679
- import_gsap2.gsap.to(linksRef.current[`drop-${i}`], {
680
- opacity: 1,
681
- visibility: "visible",
682
- y: 10,
683
- duration: 0.4,
684
- ease: "expo.out"
685
- });
686
- }
687
- },
688
- link.children.map((child, ci) => inRouter ? /* @__PURE__ */ import_react2.default.createElement(
689
- import_react_router_dom2.Link,
690
- {
691
- key: child.path,
692
- to: child.path,
693
- style: styles.dropdownItem,
694
- className: "aura-dropdown-item",
695
- onMouseEnter: (e) => {
696
- import_gsap2.gsap.to(e.currentTarget, { backgroundColor: isLight2 ? "rgba(0,0,0,0.03)" : "rgba(255,255,255,0.05)", x: 4, duration: 0.3 });
697
- },
698
- onMouseLeave: (e) => {
699
- import_gsap2.gsap.to(e.currentTarget, { backgroundColor: "transparent", x: 0, duration: 0.3 });
700
- }
701
- },
702
- child.label,
703
- /* @__PURE__ */ import_react2.default.createElement(import_fi.FiArrowUpRight, { size: 14, style: { opacity: 0 }, className: "arrow-icon" })
704
- ) : /* @__PURE__ */ import_react2.default.createElement("a", { key: child.path, href: child.path, style: styles.dropdownItem }, child.label))
705
- )
706
- );
707
- })),
708
- /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.actions }, !isMobile && /* @__PURE__ */ import_react2.default.createElement(
709
- "button",
710
- {
711
- ref: buttonRef,
712
- style: styles.cta,
713
- onMouseEnter: (e) => import_gsap2.gsap.to(e.currentTarget, {
714
- y: -3,
715
- scale: 1.05,
716
- backgroundColor: accentColor,
717
- color: "#fff",
718
- boxShadow: `0 15px 30px ${accentColor}40`,
719
- duration: 0.4,
720
- ease: "expo.out"
721
- }),
722
- onMouseLeave: (e) => import_gsap2.gsap.to(e.currentTarget, {
723
- y: 0,
724
- scale: 1,
725
- backgroundColor: navPrimary,
726
- color: isLight2 ? "#ffffff" : "#000000",
727
- boxShadow: isLight2 ? "0 8px 20px rgba(0,0,0,0.1)" : "0 8px 20px rgba(255,255,255,0.05)",
728
- duration: 0.6,
729
- ease: "elastic.out(1, 0.4)"
730
- }),
731
- onClick: handleButtonClick
531
+ style: styles.hamburgerBtn,
532
+ onClick: () => setIsOpen(!isOpen),
533
+ onMouseEnter: (e) => {
534
+ if (!isOpen) {
535
+ e.currentTarget.children[0].style.transform = "translateY(-2px)";
536
+ e.currentTarget.children[1].style.transform = "translateY(2px)";
537
+ }
732
538
  },
733
- "Start Building",
734
- /* @__PURE__ */ import_react2.default.createElement(import_fi.FiArrowUpRight, { size: 18 })
735
- ), /* @__PURE__ */ import_react2.default.createElement(
736
- "button",
539
+ onMouseLeave: (e) => {
540
+ if (!isOpen) {
541
+ e.currentTarget.children[0].style.transform = "none";
542
+ e.currentTarget.children[1].style.transform = "none";
543
+ }
544
+ }
545
+ },
546
+ /* @__PURE__ */ import_react2.default.createElement("div", { style: {
547
+ ...styles.line,
548
+ transform: isOpen ? "translateY(4px) rotate(45deg)" : "none"
549
+ } }),
550
+ /* @__PURE__ */ import_react2.default.createElement("div", { style: {
551
+ ...styles.line,
552
+ transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none"
553
+ } })
554
+ )), /* @__PURE__ */ import_react2.default.createElement("div", { ref: overlayRef, style: styles.overlay }, /* @__PURE__ */ import_react2.default.createElement("div", { ref: linksContainerRef, style: styles.linksArea }, links.map((link, idx) => {
555
+ const isHovered = hoverIndex === idx;
556
+ const isAnyHovered = hoverIndex !== null;
557
+ const isActiveRoute = location.pathname === link.path;
558
+ return /* @__PURE__ */ import_react2.default.createElement(
559
+ "a",
737
560
  {
738
- ref: menuButtonRef,
739
- type: "button",
740
- style: styles.menuToggle,
741
- onClick: () => setIsMenuOpen(!isMenuOpen),
742
- "aria-label": isMenuOpen ? "Close menu" : "Open menu"
561
+ key: idx,
562
+ href: link.path,
563
+ onClick: (e) => handleNavigation(link.path, e),
564
+ onMouseEnter: () => setHoverIndex(idx),
565
+ onMouseLeave: () => setHoverIndex(null),
566
+ style: styles.linkItem
743
567
  },
744
- /* @__PURE__ */ import_react2.default.createElement("div", { style: {
745
- ...styles.hamburgerLine,
746
- transform: isMenuOpen ? "rotate(45deg)" : "translateY(-8px)"
747
- } }),
748
- /* @__PURE__ */ import_react2.default.createElement("div", { style: {
749
- ...styles.hamburgerLine,
750
- opacity: isMenuOpen ? 0 : 1,
751
- transform: isMenuOpen ? "translateX(20px)" : "none"
752
- } }),
753
- /* @__PURE__ */ import_react2.default.createElement("div", { style: {
754
- ...styles.hamburgerLine,
755
- transform: isMenuOpen ? "rotate(-45deg)" : "translateY(8px)"
756
- } })
757
- ))
758
- ), isMobile && /* @__PURE__ */ import_react2.default.createElement(
759
- "div",
760
- {
761
- ref: menuOverlayRef,
762
- style: styles.mobileOverlay,
763
- id: "aura-mobile-menu",
764
- "aria-hidden": !isMenuOpen
765
- },
766
- links.map(
767
- (link, idx) => inRouter ? /* @__PURE__ */ import_react2.default.createElement(
768
- import_react_router_dom2.Link,
568
+ /* @__PURE__ */ import_react2.default.createElement("span", { style: {
569
+ ...styles.linkText,
570
+ color: isHovered || isActiveRoute ? accentColor : textMain,
571
+ opacity: isAnyHovered && !isHovered ? 0.3 : 1,
572
+ transform: isHovered || isActiveRoute ? "translateX(20px)" : "translateX(0px)",
573
+ transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)"
574
+ } }, link.label),
575
+ /* @__PURE__ */ import_react2.default.createElement(
576
+ import_fi.FiArrowUpRight,
769
577
  {
770
- key: link.path,
771
- to: link.path,
772
- className: "mobile-link",
773
- ref: idx === 0 ? firstMobileLinkRef : null,
774
- onClick: () => setIsMenuOpen(false),
775
578
  style: {
776
- fontSize: "36px",
777
- fontWeight: "900",
778
- color: navPrimary,
779
- textDecoration: "none",
780
- letterSpacing: "-1.5px"
579
+ fontSize: "clamp(30px, 4vw, 60px)",
580
+ color: accentColor,
581
+ opacity: isHovered || isActiveRoute ? 1 : 0,
582
+ transform: isHovered || isActiveRoute ? "translate(0px, 0px)" : "translate(-20px, 20px)",
583
+ transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
781
584
  }
782
- },
783
- link.label
784
- ) : /* @__PURE__ */ import_react2.default.createElement(
785
- "a",
786
- {
787
- key: link.path,
788
- href: link.path,
789
- className: "mobile-link",
790
- ref: idx === 0 ? firstMobileLinkRef : null,
791
- onClick: () => setIsMenuOpen(false),
792
- style: {
793
- fontSize: "36px",
794
- fontWeight: "900",
795
- color: navPrimary,
796
- textDecoration: "none",
797
- letterSpacing: "-1.5px"
798
- }
799
- },
800
- link.label
585
+ }
801
586
  )
802
- ),
803
- /* @__PURE__ */ import_react2.default.createElement(
804
- "button",
805
- {
806
- type: "button",
807
- className: "mobile-link",
808
- style: {
809
- ...styles.cta,
810
- marginTop: "20px",
811
- padding: "18px 48px",
812
- fontSize: "18px",
813
- backgroundColor: accentColor,
814
- color: "#fff"
815
- },
816
- onClick: () => setIsMenuOpen(false),
817
- "aria-label": "Get started"
587
+ );
588
+ })), /* @__PURE__ */ import_react2.default.createElement("div", { ref: infoContainerRef, style: styles.infoArea }, /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.infoBlock }, /* @__PURE__ */ import_react2.default.createElement("span", { style: styles.infoLabel }, contact.title), /* @__PURE__ */ import_react2.default.createElement("span", { style: styles.infoText }, contact.email), /* @__PURE__ */ import_react2.default.createElement("span", { style: { ...styles.infoText, color: textMuted } }, contact.address)), /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.infoBlock }, /* @__PURE__ */ import_react2.default.createElement("span", { style: styles.infoLabel }, "Socials"), /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.socialGrid }, socials.map((social, idx) => /* @__PURE__ */ import_react2.default.createElement(
589
+ "a",
590
+ {
591
+ key: idx,
592
+ href: social.path,
593
+ style: styles.socialLink,
594
+ onMouseEnter: (e) => {
595
+ e.currentTarget.style.borderColor = accentColor;
596
+ e.currentTarget.style.backgroundColor = `${accentColor}11`;
597
+ e.currentTarget.style.color = accentColor;
818
598
  },
819
- "Get Started ",
820
- /* @__PURE__ */ import_react2.default.createElement(import_fi.FiArrowRight, null)
821
- )
822
- ));
599
+ onMouseLeave: (e) => {
600
+ e.currentTarget.style.borderColor = borderCol;
601
+ e.currentTarget.style.backgroundColor = "transparent";
602
+ e.currentTarget.style.color = textMain;
603
+ }
604
+ },
605
+ social.icon,
606
+ " ",
607
+ social.label
608
+ )))))));
823
609
  };
824
610
 
825
611
  // src/components/Spotlight/Spotlight.jsx