aura-ui-library 1.0.28 → 1.0.29
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/dist/index.js +293 -32
- package/dist/index.mjs +307 -37
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -258,9 +258,20 @@ var import_gsap2 = require("gsap");
|
|
|
258
258
|
var import_fi = require("react-icons/fi");
|
|
259
259
|
var Navbar = ({
|
|
260
260
|
logoText = "AURA",
|
|
261
|
+
showBadge = true,
|
|
262
|
+
variant = "overlay",
|
|
263
|
+
// "overlay" | "classic"
|
|
261
264
|
links = [
|
|
262
265
|
{ label: "Home", path: "/" },
|
|
263
|
-
{
|
|
266
|
+
{
|
|
267
|
+
label: "Products",
|
|
268
|
+
path: "/products",
|
|
269
|
+
children: [
|
|
270
|
+
{ label: "New Arrivals", path: "/new" },
|
|
271
|
+
{ label: "Best Sellers", path: "/best" },
|
|
272
|
+
{ label: "Accessories", path: "/accessories" }
|
|
273
|
+
]
|
|
274
|
+
},
|
|
264
275
|
{ label: "Workspace", path: "/workspace" },
|
|
265
276
|
{ label: "Pricing", path: "/pricing" }
|
|
266
277
|
],
|
|
@@ -274,27 +285,36 @@ var Navbar = ({
|
|
|
274
285
|
email: "hello@aura-ui.dev",
|
|
275
286
|
address: "123 Innovation Drive, SF"
|
|
276
287
|
},
|
|
288
|
+
// E-commerce Triggers
|
|
289
|
+
showSearch = false,
|
|
290
|
+
onSearch = () => console.log("Search clicked"),
|
|
291
|
+
showCart = false,
|
|
292
|
+
cartCount = 0,
|
|
293
|
+
onCartClick = () => console.log("Cart clicked"),
|
|
294
|
+
showUser = false,
|
|
295
|
+
onUserClick = () => console.log("User clicked"),
|
|
296
|
+
// Theme & Styling
|
|
277
297
|
accentColor = "#6366f1",
|
|
278
298
|
theme = "dark",
|
|
279
299
|
// "dark" | "light"
|
|
280
300
|
transparent = false,
|
|
281
|
-
// Set to true to make navbar transparent until scrolled
|
|
282
301
|
style = {},
|
|
283
302
|
animationDuration = 1.2,
|
|
284
303
|
easing = "expo.inOut",
|
|
285
304
|
linkSize = "clamp(42px, 7vw, 100px)"
|
|
286
|
-
// Option to change navlink size
|
|
287
305
|
}) => {
|
|
288
306
|
const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
|
|
289
307
|
const [isScrolled, setIsScrolled] = (0, import_react2.useState)(false);
|
|
290
308
|
const [isMobile, setIsMobile] = (0, import_react2.useState)(false);
|
|
291
309
|
const [hoverIndex, setHoverIndex] = (0, import_react2.useState)(null);
|
|
310
|
+
const [expandedOverlay, setExpandedOverlay] = (0, import_react2.useState)(null);
|
|
292
311
|
const inRouter = (0, import_react_router_dom2.useInRouterContext)();
|
|
293
312
|
const navigate = inRouter ? (0, import_react_router_dom2.useNavigate)() : null;
|
|
294
313
|
const location = inRouter ? (0, import_react_router_dom2.useLocation)() : { pathname: "/" };
|
|
295
314
|
const overlayRef = (0, import_react2.useRef)(null);
|
|
296
315
|
const linksContainerRef = (0, import_react2.useRef)(null);
|
|
297
316
|
const infoContainerRef = (0, import_react2.useRef)(null);
|
|
317
|
+
const desktopDropdownRefs = (0, import_react2.useRef)({});
|
|
298
318
|
const isLight2 = theme === "light";
|
|
299
319
|
const bgMain = isLight2 ? "#ffffff" : "#050505";
|
|
300
320
|
const textMain = isLight2 ? "#0f172a" : "#ffffff";
|
|
@@ -343,34 +363,70 @@ var Navbar = ({
|
|
|
343
363
|
}
|
|
344
364
|
} else {
|
|
345
365
|
document.body.style.overflow = "";
|
|
346
|
-
|
|
347
|
-
tl.to(overlayRef.current, {
|
|
366
|
+
import_gsap2.gsap.to(overlayRef.current, {
|
|
348
367
|
clipPath: "circle(0% at 95% 40px)",
|
|
349
368
|
pointerEvents: "none",
|
|
350
369
|
duration: animationDuration * 0.7,
|
|
351
370
|
ease: "expo.inOut"
|
|
352
371
|
});
|
|
372
|
+
setExpandedOverlay(null);
|
|
353
373
|
}
|
|
354
374
|
return () => {
|
|
355
375
|
document.body.style.overflow = "";
|
|
356
376
|
};
|
|
357
377
|
}, [isOpen, animationDuration, easing, prefersReducedMotion]);
|
|
378
|
+
const handleDropdownEnter = (idx) => {
|
|
379
|
+
if (desktopDropdownRefs.current[idx]) {
|
|
380
|
+
import_gsap2.gsap.killTweensOf(desktopDropdownRefs.current[idx]);
|
|
381
|
+
import_gsap2.gsap.to(desktopDropdownRefs.current[idx], {
|
|
382
|
+
opacity: 1,
|
|
383
|
+
y: 10,
|
|
384
|
+
pointerEvents: "auto",
|
|
385
|
+
visibility: "visible",
|
|
386
|
+
duration: 0.3,
|
|
387
|
+
ease: "power2.out"
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
const handleDropdownLeave = (idx) => {
|
|
392
|
+
if (desktopDropdownRefs.current[idx]) {
|
|
393
|
+
import_gsap2.gsap.to(desktopDropdownRefs.current[idx], {
|
|
394
|
+
opacity: 0,
|
|
395
|
+
y: 0,
|
|
396
|
+
pointerEvents: "none",
|
|
397
|
+
visibility: "hidden",
|
|
398
|
+
duration: 0.2,
|
|
399
|
+
ease: "power2.in"
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
};
|
|
358
403
|
const handleNavigation = (path, e) => {
|
|
359
404
|
e.preventDefault();
|
|
360
405
|
if (location.pathname === path) {
|
|
361
406
|
setIsOpen(false);
|
|
362
407
|
return;
|
|
363
408
|
}
|
|
364
|
-
|
|
365
|
-
|
|
409
|
+
if (isOpen) {
|
|
410
|
+
setIsOpen(false);
|
|
411
|
+
setTimeout(() => {
|
|
412
|
+
if (navigate) {
|
|
413
|
+
navigate(path);
|
|
414
|
+
window.scrollTo(0, 0);
|
|
415
|
+
} else {
|
|
416
|
+
window.location.href = path;
|
|
417
|
+
}
|
|
418
|
+
}, animationDuration * 0.7 * 1e3);
|
|
419
|
+
} else {
|
|
366
420
|
if (navigate) {
|
|
367
421
|
navigate(path);
|
|
368
422
|
window.scrollTo(0, 0);
|
|
369
423
|
} else {
|
|
370
424
|
window.location.href = path;
|
|
371
425
|
}
|
|
372
|
-
}
|
|
426
|
+
}
|
|
373
427
|
};
|
|
428
|
+
const showHamburger = isMobile || variant === "overlay";
|
|
429
|
+
const showDesktopLinks = variant === "classic" && !isMobile;
|
|
374
430
|
const styles = {
|
|
375
431
|
header: {
|
|
376
432
|
position: "fixed",
|
|
@@ -399,7 +455,6 @@ var Navbar = ({
|
|
|
399
455
|
letterSpacing: "1px",
|
|
400
456
|
textDecoration: "none",
|
|
401
457
|
color: textMain,
|
|
402
|
-
// Text logic handles contrast via theme
|
|
403
458
|
zIndex: 1001,
|
|
404
459
|
cursor: "pointer",
|
|
405
460
|
willChange: "transform",
|
|
@@ -412,6 +467,86 @@ var Navbar = ({
|
|
|
412
467
|
backgroundColor: accentColor,
|
|
413
468
|
boxShadow: `0 0 15px ${accentColor}88`
|
|
414
469
|
},
|
|
470
|
+
desktopNav: {
|
|
471
|
+
display: "flex",
|
|
472
|
+
flex: 1,
|
|
473
|
+
justifyContent: "center",
|
|
474
|
+
alignItems: "center",
|
|
475
|
+
gap: "30px"
|
|
476
|
+
},
|
|
477
|
+
desktopLinkWrapper: {
|
|
478
|
+
position: "relative",
|
|
479
|
+
padding: "10px 0"
|
|
480
|
+
},
|
|
481
|
+
desktopLink: {
|
|
482
|
+
color: textMain,
|
|
483
|
+
textDecoration: "none",
|
|
484
|
+
fontSize: "15px",
|
|
485
|
+
fontWeight: "600",
|
|
486
|
+
cursor: "pointer",
|
|
487
|
+
display: "flex",
|
|
488
|
+
alignItems: "center",
|
|
489
|
+
gap: "6px",
|
|
490
|
+
transition: "color 0.3s"
|
|
491
|
+
},
|
|
492
|
+
desktopDropdown: {
|
|
493
|
+
position: "absolute",
|
|
494
|
+
top: "100%",
|
|
495
|
+
left: "50%",
|
|
496
|
+
transform: "translateX(-50%) translateY(0)",
|
|
497
|
+
backgroundColor: bgMain,
|
|
498
|
+
border: `1px solid ${borderCol}`,
|
|
499
|
+
borderRadius: "16px",
|
|
500
|
+
padding: "8px",
|
|
501
|
+
minWidth: "200px",
|
|
502
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.1)",
|
|
503
|
+
opacity: 0,
|
|
504
|
+
visibility: "hidden",
|
|
505
|
+
pointerEvents: "none",
|
|
506
|
+
display: "flex",
|
|
507
|
+
flexDirection: "column",
|
|
508
|
+
gap: "4px"
|
|
509
|
+
},
|
|
510
|
+
dropdownItem: {
|
|
511
|
+
padding: "12px 16px",
|
|
512
|
+
borderRadius: "10px",
|
|
513
|
+
color: textMain,
|
|
514
|
+
textDecoration: "none",
|
|
515
|
+
fontSize: "14px",
|
|
516
|
+
fontWeight: "500",
|
|
517
|
+
transition: "background-color 0.2s, color 0.2s"
|
|
518
|
+
},
|
|
519
|
+
rightActions: {
|
|
520
|
+
display: "flex",
|
|
521
|
+
alignItems: "center",
|
|
522
|
+
gap: "20px",
|
|
523
|
+
zIndex: 1001
|
|
524
|
+
},
|
|
525
|
+
iconBtn: {
|
|
526
|
+
fontSize: "22px",
|
|
527
|
+
color: textMain,
|
|
528
|
+
cursor: "pointer",
|
|
529
|
+
display: "flex",
|
|
530
|
+
alignItems: "center",
|
|
531
|
+
position: "relative",
|
|
532
|
+
transition: "transform 0.2s ease, color 0.2s ease"
|
|
533
|
+
},
|
|
534
|
+
cartBadge: {
|
|
535
|
+
position: "absolute",
|
|
536
|
+
top: "-6px",
|
|
537
|
+
right: "-8px",
|
|
538
|
+
backgroundColor: accentColor,
|
|
539
|
+
color: "#fff",
|
|
540
|
+
fontSize: "10px",
|
|
541
|
+
fontWeight: "800",
|
|
542
|
+
minWidth: "16px",
|
|
543
|
+
height: "16px",
|
|
544
|
+
borderRadius: "8px",
|
|
545
|
+
display: "flex",
|
|
546
|
+
justifyContent: "center",
|
|
547
|
+
alignItems: "center",
|
|
548
|
+
padding: "0 4px"
|
|
549
|
+
},
|
|
415
550
|
hamburgerBtn: {
|
|
416
551
|
position: "relative",
|
|
417
552
|
width: "48px",
|
|
@@ -424,7 +559,6 @@ var Navbar = ({
|
|
|
424
559
|
alignItems: "center",
|
|
425
560
|
gap: "6px",
|
|
426
561
|
cursor: "pointer",
|
|
427
|
-
zIndex: 1001,
|
|
428
562
|
border: `1px solid ${isOpen ? borderCol : "transparent"}`,
|
|
429
563
|
transition: "all 0.4s ease"
|
|
430
564
|
},
|
|
@@ -432,7 +566,6 @@ var Navbar = ({
|
|
|
432
566
|
width: "22px",
|
|
433
567
|
height: "2px",
|
|
434
568
|
backgroundColor: textMain,
|
|
435
|
-
// Uses theme for color
|
|
436
569
|
borderRadius: "2px",
|
|
437
570
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
438
571
|
transformOrigin: "center"
|
|
@@ -441,22 +574,21 @@ var Navbar = ({
|
|
|
441
574
|
position: "fixed",
|
|
442
575
|
top: 0,
|
|
443
576
|
left: 0,
|
|
444
|
-
width: "
|
|
577
|
+
width: "100%",
|
|
445
578
|
height: "100vh",
|
|
446
579
|
backgroundColor: bgMain,
|
|
447
580
|
zIndex: 999,
|
|
448
581
|
clipPath: "circle(0% at 95% 40px)",
|
|
449
582
|
pointerEvents: "none",
|
|
450
583
|
display: "flex",
|
|
451
|
-
// Switch to flex for bulletproof layout
|
|
452
584
|
flexDirection: isMobile ? "column" : "row",
|
|
453
585
|
justifyContent: isMobile ? "flex-start" : "space-between",
|
|
454
586
|
alignItems: isMobile ? "flex-start" : "center",
|
|
455
587
|
padding: isMobile ? "120px 8% 60px" : "100px 10%",
|
|
456
588
|
boxSizing: "border-box",
|
|
457
589
|
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
458
|
-
overflowY: isMobile ? "auto" : "
|
|
459
|
-
//
|
|
590
|
+
overflowY: isMobile ? "auto" : "none"
|
|
591
|
+
// Prevent scroll lock bugs on desktop
|
|
460
592
|
},
|
|
461
593
|
linksArea: {
|
|
462
594
|
display: "flex",
|
|
@@ -465,7 +597,12 @@ var Navbar = ({
|
|
|
465
597
|
width: isMobile ? "100%" : "60%",
|
|
466
598
|
marginBottom: isMobile ? "60px" : "0"
|
|
467
599
|
},
|
|
468
|
-
|
|
600
|
+
overlayLinkItem: {
|
|
601
|
+
display: "flex",
|
|
602
|
+
flexDirection: "column",
|
|
603
|
+
width: "100%"
|
|
604
|
+
},
|
|
605
|
+
overlayLinkMain: {
|
|
469
606
|
display: "flex",
|
|
470
607
|
alignItems: "center",
|
|
471
608
|
gap: "20px",
|
|
@@ -481,6 +618,23 @@ var Navbar = ({
|
|
|
481
618
|
textTransform: "uppercase",
|
|
482
619
|
lineHeight: "1"
|
|
483
620
|
},
|
|
621
|
+
accordionContent: {
|
|
622
|
+
display: "flex",
|
|
623
|
+
flexDirection: "column",
|
|
624
|
+
paddingLeft: "2%",
|
|
625
|
+
borderLeft: `2px solid ${borderCol}`,
|
|
626
|
+
marginLeft: "1%",
|
|
627
|
+
marginTop: "10px",
|
|
628
|
+
gap: "15px",
|
|
629
|
+
overflow: "hidden"
|
|
630
|
+
},
|
|
631
|
+
accordionLink: {
|
|
632
|
+
fontSize: "clamp(20px, 3vw, 32px)",
|
|
633
|
+
fontWeight: "600",
|
|
634
|
+
color: textMuted,
|
|
635
|
+
textDecoration: "none",
|
|
636
|
+
transition: "color 0.3s ease"
|
|
637
|
+
},
|
|
484
638
|
infoArea: {
|
|
485
639
|
display: "flex",
|
|
486
640
|
flexDirection: "column",
|
|
@@ -526,7 +680,80 @@ var Navbar = ({
|
|
|
526
680
|
transition: "all 0.3s ease"
|
|
527
681
|
}
|
|
528
682
|
};
|
|
529
|
-
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(
|
|
683
|
+
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) }, showBadge && /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.logoDot }), logoText), showDesktopLinks && /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.desktopNav }, links.map((link, idx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
684
|
+
"div",
|
|
685
|
+
{
|
|
686
|
+
key: idx,
|
|
687
|
+
style: styles.desktopLinkWrapper,
|
|
688
|
+
onMouseEnter: () => handleDropdownEnter(idx),
|
|
689
|
+
onMouseLeave: () => handleDropdownLeave(idx)
|
|
690
|
+
},
|
|
691
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
692
|
+
"a",
|
|
693
|
+
{
|
|
694
|
+
href: link.path,
|
|
695
|
+
style: { ...styles.desktopLink, color: location.pathname === link.path ? accentColor : textMain },
|
|
696
|
+
onClick: (e) => {
|
|
697
|
+
if (!link.children) handleNavigation(link.path, e);
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
link.label,
|
|
701
|
+
link.children && /* @__PURE__ */ import_react2.default.createElement(import_fi.FiChevronDown, { style: { marginTop: "2px" }, size: 16 })
|
|
702
|
+
),
|
|
703
|
+
link.children && /* @__PURE__ */ import_react2.default.createElement(
|
|
704
|
+
"div",
|
|
705
|
+
{
|
|
706
|
+
ref: (el) => desktopDropdownRefs.current[idx] = el,
|
|
707
|
+
style: styles.desktopDropdown
|
|
708
|
+
},
|
|
709
|
+
link.children.map((child, cIdx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
710
|
+
"a",
|
|
711
|
+
{
|
|
712
|
+
key: cIdx,
|
|
713
|
+
href: child.path,
|
|
714
|
+
style: styles.dropdownItem,
|
|
715
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
716
|
+
onMouseEnter: (e) => {
|
|
717
|
+
e.currentTarget.style.backgroundColor = isLight2 ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.05)";
|
|
718
|
+
e.currentTarget.style.color = accentColor;
|
|
719
|
+
},
|
|
720
|
+
onMouseLeave: (e) => {
|
|
721
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
722
|
+
e.currentTarget.style.color = textMain;
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
child.label
|
|
726
|
+
))
|
|
727
|
+
)
|
|
728
|
+
))), /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.rightActions }, showSearch && /* @__PURE__ */ import_react2.default.createElement(
|
|
729
|
+
"div",
|
|
730
|
+
{
|
|
731
|
+
style: styles.iconBtn,
|
|
732
|
+
onClick: onSearch,
|
|
733
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
|
|
734
|
+
onMouseLeave: (e) => e.currentTarget.style.color = textMain
|
|
735
|
+
},
|
|
736
|
+
/* @__PURE__ */ import_react2.default.createElement(import_fi.FiSearch, null)
|
|
737
|
+
), showUser && /* @__PURE__ */ import_react2.default.createElement(
|
|
738
|
+
"div",
|
|
739
|
+
{
|
|
740
|
+
style: styles.iconBtn,
|
|
741
|
+
onClick: onUserClick,
|
|
742
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
|
|
743
|
+
onMouseLeave: (e) => e.currentTarget.style.color = textMain
|
|
744
|
+
},
|
|
745
|
+
/* @__PURE__ */ import_react2.default.createElement(import_fi.FiUser, null)
|
|
746
|
+
), showCart && /* @__PURE__ */ import_react2.default.createElement(
|
|
747
|
+
"div",
|
|
748
|
+
{
|
|
749
|
+
style: styles.iconBtn,
|
|
750
|
+
onClick: onCartClick,
|
|
751
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
|
|
752
|
+
onMouseLeave: (e) => e.currentTarget.style.color = textMain
|
|
753
|
+
},
|
|
754
|
+
/* @__PURE__ */ import_react2.default.createElement(import_fi.FiShoppingBag, null),
|
|
755
|
+
cartCount > 0 && /* @__PURE__ */ import_react2.default.createElement("span", { style: styles.cartBadge }, cartCount)
|
|
756
|
+
), showHamburger && /* @__PURE__ */ import_react2.default.createElement(
|
|
530
757
|
"div",
|
|
531
758
|
{
|
|
532
759
|
style: styles.hamburgerBtn,
|
|
@@ -544,27 +771,28 @@ var Navbar = ({
|
|
|
544
771
|
}
|
|
545
772
|
}
|
|
546
773
|
},
|
|
547
|
-
/* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
} }),
|
|
551
|
-
/* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
552
|
-
...styles.line,
|
|
553
|
-
transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none"
|
|
554
|
-
} })
|
|
555
|
-
)), /* @__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) => {
|
|
774
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(4px) rotate(45deg)" : "none" } }),
|
|
775
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none" } })
|
|
776
|
+
))), /* @__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) => {
|
|
556
777
|
const isHovered = hoverIndex === idx;
|
|
557
778
|
const isAnyHovered = hoverIndex !== null;
|
|
558
779
|
const isActiveRoute = location.pathname === link.path;
|
|
559
|
-
|
|
780
|
+
const isExpanded = expandedOverlay === idx;
|
|
781
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { key: idx, style: styles.overlayLinkItem }, /* @__PURE__ */ import_react2.default.createElement(
|
|
560
782
|
"a",
|
|
561
783
|
{
|
|
562
|
-
key: idx,
|
|
563
784
|
href: link.path,
|
|
564
|
-
onClick: (e) =>
|
|
785
|
+
onClick: (e) => {
|
|
786
|
+
if (link.children) {
|
|
787
|
+
e.preventDefault();
|
|
788
|
+
setExpandedOverlay(isExpanded ? null : idx);
|
|
789
|
+
} else {
|
|
790
|
+
handleNavigation(link.path, e);
|
|
791
|
+
}
|
|
792
|
+
},
|
|
565
793
|
onMouseEnter: () => setHoverIndex(idx),
|
|
566
794
|
onMouseLeave: () => setHoverIndex(null),
|
|
567
|
-
style: styles.
|
|
795
|
+
style: styles.overlayLinkMain
|
|
568
796
|
},
|
|
569
797
|
/* @__PURE__ */ import_react2.default.createElement("span", { style: {
|
|
570
798
|
...styles.linkText,
|
|
@@ -573,7 +801,18 @@ var Navbar = ({
|
|
|
573
801
|
transform: isHovered || isActiveRoute ? "translateX(20px)" : "translateX(0px)",
|
|
574
802
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
575
803
|
} }, link.label),
|
|
576
|
-
/* @__PURE__ */ import_react2.default.createElement(
|
|
804
|
+
link.children ? /* @__PURE__ */ import_react2.default.createElement(
|
|
805
|
+
import_fi.FiChevronDown,
|
|
806
|
+
{
|
|
807
|
+
style: {
|
|
808
|
+
fontSize: "clamp(24px, 3vw, 40px)",
|
|
809
|
+
color: accentColor,
|
|
810
|
+
opacity: isHovered ? 1 : 0,
|
|
811
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
812
|
+
transition: "all 0.5s ease"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
) : /* @__PURE__ */ import_react2.default.createElement(
|
|
577
816
|
import_fi.FiArrowUpRight,
|
|
578
817
|
{
|
|
579
818
|
style: {
|
|
@@ -585,7 +824,29 @@ var Navbar = ({
|
|
|
585
824
|
}
|
|
586
825
|
}
|
|
587
826
|
)
|
|
588
|
-
)
|
|
827
|
+
), link.children && /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
828
|
+
...styles.accordionContent,
|
|
829
|
+
maxHeight: isExpanded ? "500px" : "0px",
|
|
830
|
+
opacity: isExpanded ? 1 : 0,
|
|
831
|
+
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
832
|
+
} }, link.children.map((child, cIdx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
833
|
+
"a",
|
|
834
|
+
{
|
|
835
|
+
key: cIdx,
|
|
836
|
+
href: child.path,
|
|
837
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
838
|
+
style: styles.accordionLink,
|
|
839
|
+
onMouseEnter: (e) => {
|
|
840
|
+
e.currentTarget.style.color = accentColor;
|
|
841
|
+
e.currentTarget.style.paddingLeft = "10px";
|
|
842
|
+
},
|
|
843
|
+
onMouseLeave: (e) => {
|
|
844
|
+
e.currentTarget.style.color = textMuted;
|
|
845
|
+
e.currentTarget.style.paddingLeft = "0px";
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
child.label
|
|
849
|
+
))));
|
|
589
850
|
})), /* @__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(
|
|
590
851
|
"a",
|
|
591
852
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -199,12 +199,32 @@ var Button = ({
|
|
|
199
199
|
import React2, { useRef as useRef2, useEffect as useEffect2, useState } from "react";
|
|
200
200
|
import { Link, useInRouterContext as useInRouterContext2, useNavigate as useNavigate2, useLocation } from "react-router-dom";
|
|
201
201
|
import { gsap as gsap2 } from "gsap";
|
|
202
|
-
import {
|
|
202
|
+
import {
|
|
203
|
+
FiArrowUpRight,
|
|
204
|
+
FiTwitter,
|
|
205
|
+
FiGithub,
|
|
206
|
+
FiLinkedin,
|
|
207
|
+
FiSearch,
|
|
208
|
+
FiShoppingBag,
|
|
209
|
+
FiUser,
|
|
210
|
+
FiChevronDown
|
|
211
|
+
} from "react-icons/fi";
|
|
203
212
|
var Navbar = ({
|
|
204
213
|
logoText = "AURA",
|
|
214
|
+
showBadge = true,
|
|
215
|
+
variant = "overlay",
|
|
216
|
+
// "overlay" | "classic"
|
|
205
217
|
links = [
|
|
206
218
|
{ label: "Home", path: "/" },
|
|
207
|
-
{
|
|
219
|
+
{
|
|
220
|
+
label: "Products",
|
|
221
|
+
path: "/products",
|
|
222
|
+
children: [
|
|
223
|
+
{ label: "New Arrivals", path: "/new" },
|
|
224
|
+
{ label: "Best Sellers", path: "/best" },
|
|
225
|
+
{ label: "Accessories", path: "/accessories" }
|
|
226
|
+
]
|
|
227
|
+
},
|
|
208
228
|
{ label: "Workspace", path: "/workspace" },
|
|
209
229
|
{ label: "Pricing", path: "/pricing" }
|
|
210
230
|
],
|
|
@@ -218,27 +238,36 @@ var Navbar = ({
|
|
|
218
238
|
email: "hello@aura-ui.dev",
|
|
219
239
|
address: "123 Innovation Drive, SF"
|
|
220
240
|
},
|
|
241
|
+
// E-commerce Triggers
|
|
242
|
+
showSearch = false,
|
|
243
|
+
onSearch = () => console.log("Search clicked"),
|
|
244
|
+
showCart = false,
|
|
245
|
+
cartCount = 0,
|
|
246
|
+
onCartClick = () => console.log("Cart clicked"),
|
|
247
|
+
showUser = false,
|
|
248
|
+
onUserClick = () => console.log("User clicked"),
|
|
249
|
+
// Theme & Styling
|
|
221
250
|
accentColor = "#6366f1",
|
|
222
251
|
theme = "dark",
|
|
223
252
|
// "dark" | "light"
|
|
224
253
|
transparent = false,
|
|
225
|
-
// Set to true to make navbar transparent until scrolled
|
|
226
254
|
style = {},
|
|
227
255
|
animationDuration = 1.2,
|
|
228
256
|
easing = "expo.inOut",
|
|
229
257
|
linkSize = "clamp(42px, 7vw, 100px)"
|
|
230
|
-
// Option to change navlink size
|
|
231
258
|
}) => {
|
|
232
259
|
const [isOpen, setIsOpen] = useState(false);
|
|
233
260
|
const [isScrolled, setIsScrolled] = useState(false);
|
|
234
261
|
const [isMobile, setIsMobile] = useState(false);
|
|
235
262
|
const [hoverIndex, setHoverIndex] = useState(null);
|
|
263
|
+
const [expandedOverlay, setExpandedOverlay] = useState(null);
|
|
236
264
|
const inRouter = useInRouterContext2();
|
|
237
265
|
const navigate = inRouter ? useNavigate2() : null;
|
|
238
266
|
const location = inRouter ? useLocation() : { pathname: "/" };
|
|
239
267
|
const overlayRef = useRef2(null);
|
|
240
268
|
const linksContainerRef = useRef2(null);
|
|
241
269
|
const infoContainerRef = useRef2(null);
|
|
270
|
+
const desktopDropdownRefs = useRef2({});
|
|
242
271
|
const isLight2 = theme === "light";
|
|
243
272
|
const bgMain = isLight2 ? "#ffffff" : "#050505";
|
|
244
273
|
const textMain = isLight2 ? "#0f172a" : "#ffffff";
|
|
@@ -287,34 +316,70 @@ var Navbar = ({
|
|
|
287
316
|
}
|
|
288
317
|
} else {
|
|
289
318
|
document.body.style.overflow = "";
|
|
290
|
-
|
|
291
|
-
tl.to(overlayRef.current, {
|
|
319
|
+
gsap2.to(overlayRef.current, {
|
|
292
320
|
clipPath: "circle(0% at 95% 40px)",
|
|
293
321
|
pointerEvents: "none",
|
|
294
322
|
duration: animationDuration * 0.7,
|
|
295
323
|
ease: "expo.inOut"
|
|
296
324
|
});
|
|
325
|
+
setExpandedOverlay(null);
|
|
297
326
|
}
|
|
298
327
|
return () => {
|
|
299
328
|
document.body.style.overflow = "";
|
|
300
329
|
};
|
|
301
330
|
}, [isOpen, animationDuration, easing, prefersReducedMotion]);
|
|
331
|
+
const handleDropdownEnter = (idx) => {
|
|
332
|
+
if (desktopDropdownRefs.current[idx]) {
|
|
333
|
+
gsap2.killTweensOf(desktopDropdownRefs.current[idx]);
|
|
334
|
+
gsap2.to(desktopDropdownRefs.current[idx], {
|
|
335
|
+
opacity: 1,
|
|
336
|
+
y: 10,
|
|
337
|
+
pointerEvents: "auto",
|
|
338
|
+
visibility: "visible",
|
|
339
|
+
duration: 0.3,
|
|
340
|
+
ease: "power2.out"
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
const handleDropdownLeave = (idx) => {
|
|
345
|
+
if (desktopDropdownRefs.current[idx]) {
|
|
346
|
+
gsap2.to(desktopDropdownRefs.current[idx], {
|
|
347
|
+
opacity: 0,
|
|
348
|
+
y: 0,
|
|
349
|
+
pointerEvents: "none",
|
|
350
|
+
visibility: "hidden",
|
|
351
|
+
duration: 0.2,
|
|
352
|
+
ease: "power2.in"
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
};
|
|
302
356
|
const handleNavigation = (path, e) => {
|
|
303
357
|
e.preventDefault();
|
|
304
358
|
if (location.pathname === path) {
|
|
305
359
|
setIsOpen(false);
|
|
306
360
|
return;
|
|
307
361
|
}
|
|
308
|
-
|
|
309
|
-
|
|
362
|
+
if (isOpen) {
|
|
363
|
+
setIsOpen(false);
|
|
364
|
+
setTimeout(() => {
|
|
365
|
+
if (navigate) {
|
|
366
|
+
navigate(path);
|
|
367
|
+
window.scrollTo(0, 0);
|
|
368
|
+
} else {
|
|
369
|
+
window.location.href = path;
|
|
370
|
+
}
|
|
371
|
+
}, animationDuration * 0.7 * 1e3);
|
|
372
|
+
} else {
|
|
310
373
|
if (navigate) {
|
|
311
374
|
navigate(path);
|
|
312
375
|
window.scrollTo(0, 0);
|
|
313
376
|
} else {
|
|
314
377
|
window.location.href = path;
|
|
315
378
|
}
|
|
316
|
-
}
|
|
379
|
+
}
|
|
317
380
|
};
|
|
381
|
+
const showHamburger = isMobile || variant === "overlay";
|
|
382
|
+
const showDesktopLinks = variant === "classic" && !isMobile;
|
|
318
383
|
const styles = {
|
|
319
384
|
header: {
|
|
320
385
|
position: "fixed",
|
|
@@ -343,7 +408,6 @@ var Navbar = ({
|
|
|
343
408
|
letterSpacing: "1px",
|
|
344
409
|
textDecoration: "none",
|
|
345
410
|
color: textMain,
|
|
346
|
-
// Text logic handles contrast via theme
|
|
347
411
|
zIndex: 1001,
|
|
348
412
|
cursor: "pointer",
|
|
349
413
|
willChange: "transform",
|
|
@@ -356,6 +420,86 @@ var Navbar = ({
|
|
|
356
420
|
backgroundColor: accentColor,
|
|
357
421
|
boxShadow: `0 0 15px ${accentColor}88`
|
|
358
422
|
},
|
|
423
|
+
desktopNav: {
|
|
424
|
+
display: "flex",
|
|
425
|
+
flex: 1,
|
|
426
|
+
justifyContent: "center",
|
|
427
|
+
alignItems: "center",
|
|
428
|
+
gap: "30px"
|
|
429
|
+
},
|
|
430
|
+
desktopLinkWrapper: {
|
|
431
|
+
position: "relative",
|
|
432
|
+
padding: "10px 0"
|
|
433
|
+
},
|
|
434
|
+
desktopLink: {
|
|
435
|
+
color: textMain,
|
|
436
|
+
textDecoration: "none",
|
|
437
|
+
fontSize: "15px",
|
|
438
|
+
fontWeight: "600",
|
|
439
|
+
cursor: "pointer",
|
|
440
|
+
display: "flex",
|
|
441
|
+
alignItems: "center",
|
|
442
|
+
gap: "6px",
|
|
443
|
+
transition: "color 0.3s"
|
|
444
|
+
},
|
|
445
|
+
desktopDropdown: {
|
|
446
|
+
position: "absolute",
|
|
447
|
+
top: "100%",
|
|
448
|
+
left: "50%",
|
|
449
|
+
transform: "translateX(-50%) translateY(0)",
|
|
450
|
+
backgroundColor: bgMain,
|
|
451
|
+
border: `1px solid ${borderCol}`,
|
|
452
|
+
borderRadius: "16px",
|
|
453
|
+
padding: "8px",
|
|
454
|
+
minWidth: "200px",
|
|
455
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.1)",
|
|
456
|
+
opacity: 0,
|
|
457
|
+
visibility: "hidden",
|
|
458
|
+
pointerEvents: "none",
|
|
459
|
+
display: "flex",
|
|
460
|
+
flexDirection: "column",
|
|
461
|
+
gap: "4px"
|
|
462
|
+
},
|
|
463
|
+
dropdownItem: {
|
|
464
|
+
padding: "12px 16px",
|
|
465
|
+
borderRadius: "10px",
|
|
466
|
+
color: textMain,
|
|
467
|
+
textDecoration: "none",
|
|
468
|
+
fontSize: "14px",
|
|
469
|
+
fontWeight: "500",
|
|
470
|
+
transition: "background-color 0.2s, color 0.2s"
|
|
471
|
+
},
|
|
472
|
+
rightActions: {
|
|
473
|
+
display: "flex",
|
|
474
|
+
alignItems: "center",
|
|
475
|
+
gap: "20px",
|
|
476
|
+
zIndex: 1001
|
|
477
|
+
},
|
|
478
|
+
iconBtn: {
|
|
479
|
+
fontSize: "22px",
|
|
480
|
+
color: textMain,
|
|
481
|
+
cursor: "pointer",
|
|
482
|
+
display: "flex",
|
|
483
|
+
alignItems: "center",
|
|
484
|
+
position: "relative",
|
|
485
|
+
transition: "transform 0.2s ease, color 0.2s ease"
|
|
486
|
+
},
|
|
487
|
+
cartBadge: {
|
|
488
|
+
position: "absolute",
|
|
489
|
+
top: "-6px",
|
|
490
|
+
right: "-8px",
|
|
491
|
+
backgroundColor: accentColor,
|
|
492
|
+
color: "#fff",
|
|
493
|
+
fontSize: "10px",
|
|
494
|
+
fontWeight: "800",
|
|
495
|
+
minWidth: "16px",
|
|
496
|
+
height: "16px",
|
|
497
|
+
borderRadius: "8px",
|
|
498
|
+
display: "flex",
|
|
499
|
+
justifyContent: "center",
|
|
500
|
+
alignItems: "center",
|
|
501
|
+
padding: "0 4px"
|
|
502
|
+
},
|
|
359
503
|
hamburgerBtn: {
|
|
360
504
|
position: "relative",
|
|
361
505
|
width: "48px",
|
|
@@ -368,7 +512,6 @@ var Navbar = ({
|
|
|
368
512
|
alignItems: "center",
|
|
369
513
|
gap: "6px",
|
|
370
514
|
cursor: "pointer",
|
|
371
|
-
zIndex: 1001,
|
|
372
515
|
border: `1px solid ${isOpen ? borderCol : "transparent"}`,
|
|
373
516
|
transition: "all 0.4s ease"
|
|
374
517
|
},
|
|
@@ -376,7 +519,6 @@ var Navbar = ({
|
|
|
376
519
|
width: "22px",
|
|
377
520
|
height: "2px",
|
|
378
521
|
backgroundColor: textMain,
|
|
379
|
-
// Uses theme for color
|
|
380
522
|
borderRadius: "2px",
|
|
381
523
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
382
524
|
transformOrigin: "center"
|
|
@@ -385,22 +527,21 @@ var Navbar = ({
|
|
|
385
527
|
position: "fixed",
|
|
386
528
|
top: 0,
|
|
387
529
|
left: 0,
|
|
388
|
-
width: "
|
|
530
|
+
width: "100%",
|
|
389
531
|
height: "100vh",
|
|
390
532
|
backgroundColor: bgMain,
|
|
391
533
|
zIndex: 999,
|
|
392
534
|
clipPath: "circle(0% at 95% 40px)",
|
|
393
535
|
pointerEvents: "none",
|
|
394
536
|
display: "flex",
|
|
395
|
-
// Switch to flex for bulletproof layout
|
|
396
537
|
flexDirection: isMobile ? "column" : "row",
|
|
397
538
|
justifyContent: isMobile ? "flex-start" : "space-between",
|
|
398
539
|
alignItems: isMobile ? "flex-start" : "center",
|
|
399
540
|
padding: isMobile ? "120px 8% 60px" : "100px 10%",
|
|
400
541
|
boxSizing: "border-box",
|
|
401
542
|
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
402
|
-
overflowY: isMobile ? "auto" : "
|
|
403
|
-
//
|
|
543
|
+
overflowY: isMobile ? "auto" : "none"
|
|
544
|
+
// Prevent scroll lock bugs on desktop
|
|
404
545
|
},
|
|
405
546
|
linksArea: {
|
|
406
547
|
display: "flex",
|
|
@@ -409,7 +550,12 @@ var Navbar = ({
|
|
|
409
550
|
width: isMobile ? "100%" : "60%",
|
|
410
551
|
marginBottom: isMobile ? "60px" : "0"
|
|
411
552
|
},
|
|
412
|
-
|
|
553
|
+
overlayLinkItem: {
|
|
554
|
+
display: "flex",
|
|
555
|
+
flexDirection: "column",
|
|
556
|
+
width: "100%"
|
|
557
|
+
},
|
|
558
|
+
overlayLinkMain: {
|
|
413
559
|
display: "flex",
|
|
414
560
|
alignItems: "center",
|
|
415
561
|
gap: "20px",
|
|
@@ -425,6 +571,23 @@ var Navbar = ({
|
|
|
425
571
|
textTransform: "uppercase",
|
|
426
572
|
lineHeight: "1"
|
|
427
573
|
},
|
|
574
|
+
accordionContent: {
|
|
575
|
+
display: "flex",
|
|
576
|
+
flexDirection: "column",
|
|
577
|
+
paddingLeft: "2%",
|
|
578
|
+
borderLeft: `2px solid ${borderCol}`,
|
|
579
|
+
marginLeft: "1%",
|
|
580
|
+
marginTop: "10px",
|
|
581
|
+
gap: "15px",
|
|
582
|
+
overflow: "hidden"
|
|
583
|
+
},
|
|
584
|
+
accordionLink: {
|
|
585
|
+
fontSize: "clamp(20px, 3vw, 32px)",
|
|
586
|
+
fontWeight: "600",
|
|
587
|
+
color: textMuted,
|
|
588
|
+
textDecoration: "none",
|
|
589
|
+
transition: "color 0.3s ease"
|
|
590
|
+
},
|
|
428
591
|
infoArea: {
|
|
429
592
|
display: "flex",
|
|
430
593
|
flexDirection: "column",
|
|
@@ -470,7 +633,80 @@ var Navbar = ({
|
|
|
470
633
|
transition: "all 0.3s ease"
|
|
471
634
|
}
|
|
472
635
|
};
|
|
473
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("header", { style: styles.header }, /* @__PURE__ */ React2.createElement("div", { style: styles.logo, onClick: (e) => handleNavigation("/", e) }, /* @__PURE__ */ React2.createElement("div", { style: styles.logoDot }), logoText), /* @__PURE__ */ React2.createElement(
|
|
636
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("header", { style: styles.header }, /* @__PURE__ */ React2.createElement("div", { style: styles.logo, onClick: (e) => handleNavigation("/", e) }, showBadge && /* @__PURE__ */ React2.createElement("div", { style: styles.logoDot }), logoText), showDesktopLinks && /* @__PURE__ */ React2.createElement("div", { style: styles.desktopNav }, links.map((link, idx) => /* @__PURE__ */ React2.createElement(
|
|
637
|
+
"div",
|
|
638
|
+
{
|
|
639
|
+
key: idx,
|
|
640
|
+
style: styles.desktopLinkWrapper,
|
|
641
|
+
onMouseEnter: () => handleDropdownEnter(idx),
|
|
642
|
+
onMouseLeave: () => handleDropdownLeave(idx)
|
|
643
|
+
},
|
|
644
|
+
/* @__PURE__ */ React2.createElement(
|
|
645
|
+
"a",
|
|
646
|
+
{
|
|
647
|
+
href: link.path,
|
|
648
|
+
style: { ...styles.desktopLink, color: location.pathname === link.path ? accentColor : textMain },
|
|
649
|
+
onClick: (e) => {
|
|
650
|
+
if (!link.children) handleNavigation(link.path, e);
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
link.label,
|
|
654
|
+
link.children && /* @__PURE__ */ React2.createElement(FiChevronDown, { style: { marginTop: "2px" }, size: 16 })
|
|
655
|
+
),
|
|
656
|
+
link.children && /* @__PURE__ */ React2.createElement(
|
|
657
|
+
"div",
|
|
658
|
+
{
|
|
659
|
+
ref: (el) => desktopDropdownRefs.current[idx] = el,
|
|
660
|
+
style: styles.desktopDropdown
|
|
661
|
+
},
|
|
662
|
+
link.children.map((child, cIdx) => /* @__PURE__ */ React2.createElement(
|
|
663
|
+
"a",
|
|
664
|
+
{
|
|
665
|
+
key: cIdx,
|
|
666
|
+
href: child.path,
|
|
667
|
+
style: styles.dropdownItem,
|
|
668
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
669
|
+
onMouseEnter: (e) => {
|
|
670
|
+
e.currentTarget.style.backgroundColor = isLight2 ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.05)";
|
|
671
|
+
e.currentTarget.style.color = accentColor;
|
|
672
|
+
},
|
|
673
|
+
onMouseLeave: (e) => {
|
|
674
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
675
|
+
e.currentTarget.style.color = textMain;
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
child.label
|
|
679
|
+
))
|
|
680
|
+
)
|
|
681
|
+
))), /* @__PURE__ */ React2.createElement("div", { style: styles.rightActions }, showSearch && /* @__PURE__ */ React2.createElement(
|
|
682
|
+
"div",
|
|
683
|
+
{
|
|
684
|
+
style: styles.iconBtn,
|
|
685
|
+
onClick: onSearch,
|
|
686
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
|
|
687
|
+
onMouseLeave: (e) => e.currentTarget.style.color = textMain
|
|
688
|
+
},
|
|
689
|
+
/* @__PURE__ */ React2.createElement(FiSearch, null)
|
|
690
|
+
), showUser && /* @__PURE__ */ React2.createElement(
|
|
691
|
+
"div",
|
|
692
|
+
{
|
|
693
|
+
style: styles.iconBtn,
|
|
694
|
+
onClick: onUserClick,
|
|
695
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
|
|
696
|
+
onMouseLeave: (e) => e.currentTarget.style.color = textMain
|
|
697
|
+
},
|
|
698
|
+
/* @__PURE__ */ React2.createElement(FiUser, null)
|
|
699
|
+
), showCart && /* @__PURE__ */ React2.createElement(
|
|
700
|
+
"div",
|
|
701
|
+
{
|
|
702
|
+
style: styles.iconBtn,
|
|
703
|
+
onClick: onCartClick,
|
|
704
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
|
|
705
|
+
onMouseLeave: (e) => e.currentTarget.style.color = textMain
|
|
706
|
+
},
|
|
707
|
+
/* @__PURE__ */ React2.createElement(FiShoppingBag, null),
|
|
708
|
+
cartCount > 0 && /* @__PURE__ */ React2.createElement("span", { style: styles.cartBadge }, cartCount)
|
|
709
|
+
), showHamburger && /* @__PURE__ */ React2.createElement(
|
|
474
710
|
"div",
|
|
475
711
|
{
|
|
476
712
|
style: styles.hamburgerBtn,
|
|
@@ -488,27 +724,28 @@ var Navbar = ({
|
|
|
488
724
|
}
|
|
489
725
|
}
|
|
490
726
|
},
|
|
491
|
-
/* @__PURE__ */ React2.createElement("div", { style: {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
} }),
|
|
495
|
-
/* @__PURE__ */ React2.createElement("div", { style: {
|
|
496
|
-
...styles.line,
|
|
497
|
-
transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none"
|
|
498
|
-
} })
|
|
499
|
-
)), /* @__PURE__ */ React2.createElement("div", { ref: overlayRef, style: styles.overlay }, /* @__PURE__ */ React2.createElement("div", { ref: linksContainerRef, style: styles.linksArea }, links.map((link, idx) => {
|
|
727
|
+
/* @__PURE__ */ React2.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(4px) rotate(45deg)" : "none" } }),
|
|
728
|
+
/* @__PURE__ */ React2.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none" } })
|
|
729
|
+
))), /* @__PURE__ */ React2.createElement("div", { ref: overlayRef, style: styles.overlay }, /* @__PURE__ */ React2.createElement("div", { ref: linksContainerRef, style: styles.linksArea }, links.map((link, idx) => {
|
|
500
730
|
const isHovered = hoverIndex === idx;
|
|
501
731
|
const isAnyHovered = hoverIndex !== null;
|
|
502
732
|
const isActiveRoute = location.pathname === link.path;
|
|
503
|
-
|
|
733
|
+
const isExpanded = expandedOverlay === idx;
|
|
734
|
+
return /* @__PURE__ */ React2.createElement("div", { key: idx, style: styles.overlayLinkItem }, /* @__PURE__ */ React2.createElement(
|
|
504
735
|
"a",
|
|
505
736
|
{
|
|
506
|
-
key: idx,
|
|
507
737
|
href: link.path,
|
|
508
|
-
onClick: (e) =>
|
|
738
|
+
onClick: (e) => {
|
|
739
|
+
if (link.children) {
|
|
740
|
+
e.preventDefault();
|
|
741
|
+
setExpandedOverlay(isExpanded ? null : idx);
|
|
742
|
+
} else {
|
|
743
|
+
handleNavigation(link.path, e);
|
|
744
|
+
}
|
|
745
|
+
},
|
|
509
746
|
onMouseEnter: () => setHoverIndex(idx),
|
|
510
747
|
onMouseLeave: () => setHoverIndex(null),
|
|
511
|
-
style: styles.
|
|
748
|
+
style: styles.overlayLinkMain
|
|
512
749
|
},
|
|
513
750
|
/* @__PURE__ */ React2.createElement("span", { style: {
|
|
514
751
|
...styles.linkText,
|
|
@@ -517,7 +754,18 @@ var Navbar = ({
|
|
|
517
754
|
transform: isHovered || isActiveRoute ? "translateX(20px)" : "translateX(0px)",
|
|
518
755
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
519
756
|
} }, link.label),
|
|
520
|
-
/* @__PURE__ */ React2.createElement(
|
|
757
|
+
link.children ? /* @__PURE__ */ React2.createElement(
|
|
758
|
+
FiChevronDown,
|
|
759
|
+
{
|
|
760
|
+
style: {
|
|
761
|
+
fontSize: "clamp(24px, 3vw, 40px)",
|
|
762
|
+
color: accentColor,
|
|
763
|
+
opacity: isHovered ? 1 : 0,
|
|
764
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
765
|
+
transition: "all 0.5s ease"
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
) : /* @__PURE__ */ React2.createElement(
|
|
521
769
|
FiArrowUpRight,
|
|
522
770
|
{
|
|
523
771
|
style: {
|
|
@@ -529,7 +777,29 @@ var Navbar = ({
|
|
|
529
777
|
}
|
|
530
778
|
}
|
|
531
779
|
)
|
|
532
|
-
)
|
|
780
|
+
), link.children && /* @__PURE__ */ React2.createElement("div", { style: {
|
|
781
|
+
...styles.accordionContent,
|
|
782
|
+
maxHeight: isExpanded ? "500px" : "0px",
|
|
783
|
+
opacity: isExpanded ? 1 : 0,
|
|
784
|
+
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
785
|
+
} }, link.children.map((child, cIdx) => /* @__PURE__ */ React2.createElement(
|
|
786
|
+
"a",
|
|
787
|
+
{
|
|
788
|
+
key: cIdx,
|
|
789
|
+
href: child.path,
|
|
790
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
791
|
+
style: styles.accordionLink,
|
|
792
|
+
onMouseEnter: (e) => {
|
|
793
|
+
e.currentTarget.style.color = accentColor;
|
|
794
|
+
e.currentTarget.style.paddingLeft = "10px";
|
|
795
|
+
},
|
|
796
|
+
onMouseLeave: (e) => {
|
|
797
|
+
e.currentTarget.style.color = textMuted;
|
|
798
|
+
e.currentTarget.style.paddingLeft = "0px";
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
child.label
|
|
802
|
+
))));
|
|
533
803
|
})), /* @__PURE__ */ React2.createElement("div", { ref: infoContainerRef, style: styles.infoArea }, /* @__PURE__ */ React2.createElement("div", { style: styles.infoBlock }, /* @__PURE__ */ React2.createElement("span", { style: styles.infoLabel }, contact.title), /* @__PURE__ */ React2.createElement("span", { style: styles.infoText }, contact.email), /* @__PURE__ */ React2.createElement("span", { style: { ...styles.infoText, color: textMuted } }, contact.address)), /* @__PURE__ */ React2.createElement("div", { style: styles.infoBlock }, /* @__PURE__ */ React2.createElement("span", { style: styles.infoLabel }, "Socials"), /* @__PURE__ */ React2.createElement("div", { style: styles.socialGrid }, socials.map((social, idx) => /* @__PURE__ */ React2.createElement(
|
|
534
804
|
"a",
|
|
535
805
|
{
|
|
@@ -4148,7 +4418,7 @@ var Canvas = ({
|
|
|
4148
4418
|
import React17, { useRef as useRef17, useEffect as useEffect17 } from "react";
|
|
4149
4419
|
import { gsap as gsap17 } from "gsap";
|
|
4150
4420
|
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
4151
|
-
import { FiChevronDown, FiArrowRight as FiArrowRight5 } from "react-icons/fi";
|
|
4421
|
+
import { FiChevronDown as FiChevronDown2, FiArrowRight as FiArrowRight5 } from "react-icons/fi";
|
|
4152
4422
|
if (typeof window !== "undefined") {
|
|
4153
4423
|
gsap17.registerPlugin(ScrollTrigger);
|
|
4154
4424
|
}
|
|
@@ -4384,7 +4654,7 @@ var ParallaxImage = ({
|
|
|
4384
4654
|
onMouseLeave: handleMouseLeave
|
|
4385
4655
|
},
|
|
4386
4656
|
/* @__PURE__ */ React17.createElement("span", null, "Scroll"),
|
|
4387
|
-
/* @__PURE__ */ React17.createElement(
|
|
4657
|
+
/* @__PURE__ */ React17.createElement(FiChevronDown2, { fontSize: "24px" })
|
|
4388
4658
|
));
|
|
4389
4659
|
};
|
|
4390
4660
|
|
|
@@ -5637,7 +5907,7 @@ import { gsap as gsap22 } from "gsap";
|
|
|
5637
5907
|
import {
|
|
5638
5908
|
FiMail as FiMail3,
|
|
5639
5909
|
FiLock as FiLock2,
|
|
5640
|
-
FiUser,
|
|
5910
|
+
FiUser as FiUser2,
|
|
5641
5911
|
FiArrowRight as FiArrowRight9,
|
|
5642
5912
|
FiCheckCircle,
|
|
5643
5913
|
FiShield,
|
|
@@ -5949,7 +6219,7 @@ var AuraRegister = ({
|
|
|
5949
6219
|
} }, /* @__PURE__ */ React22.createElement(FiShield, null))),
|
|
5950
6220
|
/* @__PURE__ */ React22.createElement("h1", { ref: titleRef, style: styles.title }, /* @__PURE__ */ React22.createElement(SplitText, { text: title })),
|
|
5951
6221
|
/* @__PURE__ */ React22.createElement("p", { style: styles.subtitle }, subtitle),
|
|
5952
|
-
/* @__PURE__ */ React22.createElement("form", { ref: formRef, style: styles.form, onSubmit: handleSubmit }, /* @__PURE__ */ React22.createElement("div", { style: styles.inputGroup }, /* @__PURE__ */ React22.createElement("label", { style: styles.inputLabel }, "Full Name"), /* @__PURE__ */ React22.createElement("div", { style: styles.inputWrapper }, /* @__PURE__ */ React22.createElement(
|
|
6222
|
+
/* @__PURE__ */ React22.createElement("form", { ref: formRef, style: styles.form, onSubmit: handleSubmit }, /* @__PURE__ */ React22.createElement("div", { style: styles.inputGroup }, /* @__PURE__ */ React22.createElement("label", { style: styles.inputLabel }, "Full Name"), /* @__PURE__ */ React22.createElement("div", { style: styles.inputWrapper }, /* @__PURE__ */ React22.createElement(FiUser2, { style: styles.inputIcon }), /* @__PURE__ */ React22.createElement(
|
|
5953
6223
|
"input",
|
|
5954
6224
|
{
|
|
5955
6225
|
name: "name",
|