aura-ui-library 1.0.28 → 1.0.30
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 +432 -75
- package/dist/index.mjs +447 -80
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -256,11 +256,31 @@ var import_react2 = __toESM(require("react"));
|
|
|
256
256
|
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
|
+
var SCROLLBAR_STYLE = `
|
|
260
|
+
.aura-no-scroll::-webkit-scrollbar {
|
|
261
|
+
display: none;
|
|
262
|
+
}
|
|
263
|
+
.aura-no-scroll {
|
|
264
|
+
-ms-overflow-style: none;
|
|
265
|
+
scrollbar-width: none;
|
|
266
|
+
}
|
|
267
|
+
`;
|
|
259
268
|
var Navbar = ({
|
|
260
269
|
logoText = "AURA",
|
|
270
|
+
showBadge = true,
|
|
271
|
+
variant = "overlay",
|
|
272
|
+
// "overlay" | "classic" | "product"
|
|
261
273
|
links = [
|
|
262
274
|
{ label: "Home", path: "/" },
|
|
263
|
-
{
|
|
275
|
+
{
|
|
276
|
+
label: "Products",
|
|
277
|
+
path: "/products",
|
|
278
|
+
children: [
|
|
279
|
+
{ label: "New Arrivals", path: "/new" },
|
|
280
|
+
{ label: "Best Sellers", path: "/best" },
|
|
281
|
+
{ label: "Accessories", path: "/accessories" }
|
|
282
|
+
]
|
|
283
|
+
},
|
|
264
284
|
{ label: "Workspace", path: "/workspace" },
|
|
265
285
|
{ label: "Pricing", path: "/pricing" }
|
|
266
286
|
],
|
|
@@ -274,27 +294,49 @@ var Navbar = ({
|
|
|
274
294
|
email: "hello@aura-ui.dev",
|
|
275
295
|
address: "123 Innovation Drive, SF"
|
|
276
296
|
},
|
|
297
|
+
// E-commerce & Action Triggers
|
|
298
|
+
showSearch = false,
|
|
299
|
+
onSearch = null,
|
|
300
|
+
searchContent = null,
|
|
301
|
+
// React Node rendered inside popover
|
|
302
|
+
showCart = false,
|
|
303
|
+
cartCount = 0,
|
|
304
|
+
onCartClick = null,
|
|
305
|
+
cartContent = null,
|
|
306
|
+
// React Node rendered inside popover
|
|
307
|
+
showUser = false,
|
|
308
|
+
onUserClick = null,
|
|
309
|
+
userContent = null,
|
|
310
|
+
// React Node rendered inside popover
|
|
311
|
+
showNotification = false,
|
|
312
|
+
notificationCount = 0,
|
|
313
|
+
onNotificationClick = null,
|
|
314
|
+
notificationContent = null,
|
|
315
|
+
// React Node rendered inside popover
|
|
316
|
+
// Theme & Styling
|
|
277
317
|
accentColor = "#6366f1",
|
|
278
318
|
theme = "dark",
|
|
279
319
|
// "dark" | "light"
|
|
280
320
|
transparent = false,
|
|
281
|
-
// Set to true to make navbar transparent until scrolled
|
|
282
321
|
style = {},
|
|
283
322
|
animationDuration = 1.2,
|
|
284
323
|
easing = "expo.inOut",
|
|
285
324
|
linkSize = "clamp(42px, 7vw, 100px)"
|
|
286
|
-
// Option to change navlink size
|
|
287
325
|
}) => {
|
|
288
326
|
const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
|
|
289
327
|
const [isScrolled, setIsScrolled] = (0, import_react2.useState)(false);
|
|
290
328
|
const [isMobile, setIsMobile] = (0, import_react2.useState)(false);
|
|
291
329
|
const [hoverIndex, setHoverIndex] = (0, import_react2.useState)(null);
|
|
330
|
+
const [expandedOverlay, setExpandedOverlay] = (0, import_react2.useState)(null);
|
|
331
|
+
const [activePopover, setActivePopover] = (0, import_react2.useState)(null);
|
|
292
332
|
const inRouter = (0, import_react_router_dom2.useInRouterContext)();
|
|
293
333
|
const navigate = inRouter ? (0, import_react_router_dom2.useNavigate)() : null;
|
|
294
334
|
const location = inRouter ? (0, import_react_router_dom2.useLocation)() : { pathname: "/" };
|
|
295
335
|
const overlayRef = (0, import_react2.useRef)(null);
|
|
296
336
|
const linksContainerRef = (0, import_react2.useRef)(null);
|
|
297
337
|
const infoContainerRef = (0, import_react2.useRef)(null);
|
|
338
|
+
const desktopDropdownRefs = (0, import_react2.useRef)({});
|
|
339
|
+
const rightActionsRef = (0, import_react2.useRef)(null);
|
|
298
340
|
const isLight2 = theme === "light";
|
|
299
341
|
const bgMain = isLight2 ? "#ffffff" : "#050505";
|
|
300
342
|
const textMain = isLight2 ? "#0f172a" : "#ffffff";
|
|
@@ -306,12 +348,19 @@ var Navbar = ({
|
|
|
306
348
|
(0, import_react2.useEffect)(() => {
|
|
307
349
|
const handleResize = () => setIsMobile(window.innerWidth < 1024);
|
|
308
350
|
const handleScroll = () => setIsScrolled(window.scrollY > 50);
|
|
351
|
+
const handleClickOutside = (e) => {
|
|
352
|
+
if (rightActionsRef.current && !rightActionsRef.current.contains(e.target)) {
|
|
353
|
+
setActivePopover(null);
|
|
354
|
+
}
|
|
355
|
+
};
|
|
309
356
|
handleResize();
|
|
310
357
|
window.addEventListener("resize", handleResize);
|
|
311
358
|
window.addEventListener("scroll", handleScroll);
|
|
359
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
312
360
|
return () => {
|
|
313
361
|
window.removeEventListener("resize", handleResize);
|
|
314
362
|
window.removeEventListener("scroll", handleScroll);
|
|
363
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
315
364
|
};
|
|
316
365
|
}, []);
|
|
317
366
|
(0, import_react2.useEffect)(() => {
|
|
@@ -343,34 +392,94 @@ var Navbar = ({
|
|
|
343
392
|
}
|
|
344
393
|
} else {
|
|
345
394
|
document.body.style.overflow = "";
|
|
346
|
-
|
|
347
|
-
tl.to(overlayRef.current, {
|
|
395
|
+
import_gsap2.gsap.to(overlayRef.current, {
|
|
348
396
|
clipPath: "circle(0% at 95% 40px)",
|
|
349
397
|
pointerEvents: "none",
|
|
350
398
|
duration: animationDuration * 0.7,
|
|
351
399
|
ease: "expo.inOut"
|
|
352
400
|
});
|
|
401
|
+
setExpandedOverlay(null);
|
|
353
402
|
}
|
|
354
403
|
return () => {
|
|
355
404
|
document.body.style.overflow = "";
|
|
356
405
|
};
|
|
357
406
|
}, [isOpen, animationDuration, easing, prefersReducedMotion]);
|
|
407
|
+
const handleDropdownEnter = (idx) => {
|
|
408
|
+
if (desktopDropdownRefs.current[idx]) {
|
|
409
|
+
import_gsap2.gsap.killTweensOf(desktopDropdownRefs.current[idx]);
|
|
410
|
+
import_gsap2.gsap.to(desktopDropdownRefs.current[idx], {
|
|
411
|
+
opacity: 1,
|
|
412
|
+
y: 10,
|
|
413
|
+
pointerEvents: "auto",
|
|
414
|
+
visibility: "visible",
|
|
415
|
+
duration: 0.3,
|
|
416
|
+
ease: "power2.out"
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
const handleDropdownLeave = (idx) => {
|
|
421
|
+
if (desktopDropdownRefs.current[idx]) {
|
|
422
|
+
import_gsap2.gsap.to(desktopDropdownRefs.current[idx], {
|
|
423
|
+
opacity: 0,
|
|
424
|
+
y: 0,
|
|
425
|
+
pointerEvents: "none",
|
|
426
|
+
visibility: "hidden",
|
|
427
|
+
duration: 0.2,
|
|
428
|
+
ease: "power2.in"
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
};
|
|
358
432
|
const handleNavigation = (path, e) => {
|
|
359
433
|
e.preventDefault();
|
|
360
434
|
if (location.pathname === path) {
|
|
361
435
|
setIsOpen(false);
|
|
362
436
|
return;
|
|
363
437
|
}
|
|
364
|
-
|
|
365
|
-
|
|
438
|
+
if (isOpen) {
|
|
439
|
+
setIsOpen(false);
|
|
440
|
+
setTimeout(() => {
|
|
441
|
+
if (navigate) {
|
|
442
|
+
navigate(path);
|
|
443
|
+
window.scrollTo(0, 0);
|
|
444
|
+
} else {
|
|
445
|
+
window.location.href = path;
|
|
446
|
+
}
|
|
447
|
+
}, animationDuration * 0.7 * 1e3);
|
|
448
|
+
} else {
|
|
366
449
|
if (navigate) {
|
|
367
450
|
navigate(path);
|
|
368
451
|
window.scrollTo(0, 0);
|
|
369
452
|
} else {
|
|
370
453
|
window.location.href = path;
|
|
371
454
|
}
|
|
372
|
-
}
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
const ActionItem = ({ id, icon: Icon, count, clickHandler, contentNode }) => {
|
|
458
|
+
const isActive = activePopover === id;
|
|
459
|
+
const handleActionClick = (e) => {
|
|
460
|
+
if (clickHandler) clickHandler(e);
|
|
461
|
+
if (contentNode) {
|
|
462
|
+
setActivePopover(isActive ? null : id);
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.actionItemWrapper }, /* @__PURE__ */ import_react2.default.createElement(
|
|
466
|
+
"div",
|
|
467
|
+
{
|
|
468
|
+
style: { ...styles.iconBtn, color: isActive ? accentColor : textMain },
|
|
469
|
+
onClick: handleActionClick,
|
|
470
|
+
onMouseEnter: (e) => {
|
|
471
|
+
if (!isActive) e.currentTarget.style.color = accentColor;
|
|
472
|
+
},
|
|
473
|
+
onMouseLeave: (e) => {
|
|
474
|
+
if (!isActive) e.currentTarget.style.color = textMain;
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
/* @__PURE__ */ import_react2.default.createElement(Icon, null),
|
|
478
|
+
count > 0 && /* @__PURE__ */ import_react2.default.createElement("span", { style: styles.actionBadge }, count)
|
|
479
|
+
), contentNode && isActive && /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.actionPopover }, contentNode));
|
|
373
480
|
};
|
|
481
|
+
const showHamburger = isMobile || variant === "overlay";
|
|
482
|
+
const showDesktopLinks = (variant === "classic" || variant === "product") && !isMobile;
|
|
374
483
|
const styles = {
|
|
375
484
|
header: {
|
|
376
485
|
position: "fixed",
|
|
@@ -399,7 +508,6 @@ var Navbar = ({
|
|
|
399
508
|
letterSpacing: "1px",
|
|
400
509
|
textDecoration: "none",
|
|
401
510
|
color: textMain,
|
|
402
|
-
// Text logic handles contrast via theme
|
|
403
511
|
zIndex: 1001,
|
|
404
512
|
cursor: "pointer",
|
|
405
513
|
willChange: "transform",
|
|
@@ -412,6 +520,112 @@ var Navbar = ({
|
|
|
412
520
|
backgroundColor: accentColor,
|
|
413
521
|
boxShadow: `0 0 15px ${accentColor}88`
|
|
414
522
|
},
|
|
523
|
+
desktopNav: {
|
|
524
|
+
display: "flex",
|
|
525
|
+
flex: 1,
|
|
526
|
+
justifyContent: "center",
|
|
527
|
+
alignItems: "center",
|
|
528
|
+
gap: "30px",
|
|
529
|
+
// If product variant, we might shift alignment slightly to balance the bulky right actions
|
|
530
|
+
marginRight: variant === "product" ? "-50px" : "0px"
|
|
531
|
+
},
|
|
532
|
+
desktopLinkWrapper: {
|
|
533
|
+
position: "relative",
|
|
534
|
+
padding: "10px 0"
|
|
535
|
+
},
|
|
536
|
+
desktopLink: {
|
|
537
|
+
color: textMain,
|
|
538
|
+
textDecoration: "none",
|
|
539
|
+
fontSize: "15px",
|
|
540
|
+
fontWeight: variant === "product" ? "500" : "600",
|
|
541
|
+
// slightly more elegant in product mode
|
|
542
|
+
cursor: "pointer",
|
|
543
|
+
display: "flex",
|
|
544
|
+
alignItems: "center",
|
|
545
|
+
gap: "6px",
|
|
546
|
+
transition: "color 0.3s"
|
|
547
|
+
},
|
|
548
|
+
desktopDropdown: {
|
|
549
|
+
position: "absolute",
|
|
550
|
+
top: "100%",
|
|
551
|
+
left: "50%",
|
|
552
|
+
transform: "translateX(-50%) translateY(0)",
|
|
553
|
+
backgroundColor: bgMain,
|
|
554
|
+
border: `1px solid ${borderCol}`,
|
|
555
|
+
borderRadius: "16px",
|
|
556
|
+
padding: "8px",
|
|
557
|
+
minWidth: "200px",
|
|
558
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.1)",
|
|
559
|
+
opacity: 0,
|
|
560
|
+
visibility: "hidden",
|
|
561
|
+
pointerEvents: "none",
|
|
562
|
+
display: "flex",
|
|
563
|
+
flexDirection: "column",
|
|
564
|
+
gap: "4px",
|
|
565
|
+
zIndex: 1002
|
|
566
|
+
},
|
|
567
|
+
dropdownItem: {
|
|
568
|
+
padding: "12px 16px",
|
|
569
|
+
borderRadius: "10px",
|
|
570
|
+
color: textMain,
|
|
571
|
+
textDecoration: "none",
|
|
572
|
+
fontSize: "14px",
|
|
573
|
+
fontWeight: "500",
|
|
574
|
+
transition: "background-color 0.2s, color 0.2s"
|
|
575
|
+
},
|
|
576
|
+
rightActionsGroup: {
|
|
577
|
+
display: "flex",
|
|
578
|
+
alignItems: "center",
|
|
579
|
+
gap: variant === "product" ? "24px" : "20px",
|
|
580
|
+
// More spacious in product mode
|
|
581
|
+
zIndex: 1001
|
|
582
|
+
},
|
|
583
|
+
actionItemWrapper: {
|
|
584
|
+
position: "relative",
|
|
585
|
+
display: "flex",
|
|
586
|
+
alignItems: "center",
|
|
587
|
+
justifyContent: "center"
|
|
588
|
+
},
|
|
589
|
+
iconBtn: {
|
|
590
|
+
fontSize: "22px",
|
|
591
|
+
color: textMain,
|
|
592
|
+
cursor: "pointer",
|
|
593
|
+
display: "flex",
|
|
594
|
+
alignItems: "center",
|
|
595
|
+
transition: "transform 0.2s ease, color 0.2s ease"
|
|
596
|
+
},
|
|
597
|
+
actionBadge: {
|
|
598
|
+
position: "absolute",
|
|
599
|
+
top: "-6px",
|
|
600
|
+
right: "-8px",
|
|
601
|
+
backgroundColor: accentColor,
|
|
602
|
+
color: "#fff",
|
|
603
|
+
fontSize: "10px",
|
|
604
|
+
fontWeight: "800",
|
|
605
|
+
minWidth: "16px",
|
|
606
|
+
height: "16px",
|
|
607
|
+
borderRadius: "8px",
|
|
608
|
+
display: "flex",
|
|
609
|
+
justifyContent: "center",
|
|
610
|
+
alignItems: "center",
|
|
611
|
+
padding: "0 4px",
|
|
612
|
+
pointerEvents: "none"
|
|
613
|
+
},
|
|
614
|
+
actionPopover: {
|
|
615
|
+
position: "absolute",
|
|
616
|
+
top: "200%",
|
|
617
|
+
right: 0,
|
|
618
|
+
backgroundColor: bgMain,
|
|
619
|
+
border: `1px solid ${borderCol}`,
|
|
620
|
+
borderRadius: "16px",
|
|
621
|
+
boxShadow: "0 20px 40px rgba(0,0,0,0.1)",
|
|
622
|
+
minWidth: "250px",
|
|
623
|
+
zIndex: 1002,
|
|
624
|
+
display: "flex",
|
|
625
|
+
flexDirection: "column",
|
|
626
|
+
overflow: "hidden"
|
|
627
|
+
// Keeps rounded corners clean around injected content
|
|
628
|
+
},
|
|
415
629
|
hamburgerBtn: {
|
|
416
630
|
position: "relative",
|
|
417
631
|
width: "48px",
|
|
@@ -424,7 +638,7 @@ var Navbar = ({
|
|
|
424
638
|
alignItems: "center",
|
|
425
639
|
gap: "6px",
|
|
426
640
|
cursor: "pointer",
|
|
427
|
-
|
|
641
|
+
marginLeft: showSearch || showCart || showUser || showNotification ? "10px" : "0",
|
|
428
642
|
border: `1px solid ${isOpen ? borderCol : "transparent"}`,
|
|
429
643
|
transition: "all 0.4s ease"
|
|
430
644
|
},
|
|
@@ -432,7 +646,6 @@ var Navbar = ({
|
|
|
432
646
|
width: "22px",
|
|
433
647
|
height: "2px",
|
|
434
648
|
backgroundColor: textMain,
|
|
435
|
-
// Uses theme for color
|
|
436
649
|
borderRadius: "2px",
|
|
437
650
|
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
438
651
|
transformOrigin: "center"
|
|
@@ -441,22 +654,22 @@ var Navbar = ({
|
|
|
441
654
|
position: "fixed",
|
|
442
655
|
top: 0,
|
|
443
656
|
left: 0,
|
|
444
|
-
width: "
|
|
657
|
+
width: "100%",
|
|
445
658
|
height: "100vh",
|
|
446
659
|
backgroundColor: bgMain,
|
|
447
660
|
zIndex: 999,
|
|
448
661
|
clipPath: "circle(0% at 95% 40px)",
|
|
449
662
|
pointerEvents: "none",
|
|
450
663
|
display: "flex",
|
|
451
|
-
// Switch to flex for bulletproof layout
|
|
452
664
|
flexDirection: isMobile ? "column" : "row",
|
|
453
665
|
justifyContent: isMobile ? "flex-start" : "space-between",
|
|
454
666
|
alignItems: isMobile ? "flex-start" : "center",
|
|
455
667
|
padding: isMobile ? "120px 8% 60px" : "100px 10%",
|
|
456
668
|
boxSizing: "border-box",
|
|
457
669
|
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
458
|
-
overflowY:
|
|
459
|
-
//
|
|
670
|
+
// We use overflowY: auto so items CAN scroll on mobile,
|
|
671
|
+
// but rely on .aura-no-scroll to hide the ugly scrollbar track globally!
|
|
672
|
+
overflowY: isMobile ? "auto" : "none"
|
|
460
673
|
},
|
|
461
674
|
linksArea: {
|
|
462
675
|
display: "flex",
|
|
@@ -465,7 +678,12 @@ var Navbar = ({
|
|
|
465
678
|
width: isMobile ? "100%" : "60%",
|
|
466
679
|
marginBottom: isMobile ? "60px" : "0"
|
|
467
680
|
},
|
|
468
|
-
|
|
681
|
+
overlayLinkItem: {
|
|
682
|
+
display: "flex",
|
|
683
|
+
flexDirection: "column",
|
|
684
|
+
width: "100%"
|
|
685
|
+
},
|
|
686
|
+
overlayLinkMain: {
|
|
469
687
|
display: "flex",
|
|
470
688
|
alignItems: "center",
|
|
471
689
|
gap: "20px",
|
|
@@ -481,6 +699,23 @@ var Navbar = ({
|
|
|
481
699
|
textTransform: "uppercase",
|
|
482
700
|
lineHeight: "1"
|
|
483
701
|
},
|
|
702
|
+
accordionContent: {
|
|
703
|
+
display: "flex",
|
|
704
|
+
flexDirection: "column",
|
|
705
|
+
paddingLeft: "2%",
|
|
706
|
+
borderLeft: `2px solid ${borderCol}`,
|
|
707
|
+
marginLeft: "1%",
|
|
708
|
+
marginTop: "10px",
|
|
709
|
+
gap: "15px",
|
|
710
|
+
overflow: "hidden"
|
|
711
|
+
},
|
|
712
|
+
accordionLink: {
|
|
713
|
+
fontSize: "clamp(20px, 3vw, 32px)",
|
|
714
|
+
fontWeight: "600",
|
|
715
|
+
color: textMuted,
|
|
716
|
+
textDecoration: "none",
|
|
717
|
+
transition: "color 0.3s ease"
|
|
718
|
+
},
|
|
484
719
|
infoArea: {
|
|
485
720
|
display: "flex",
|
|
486
721
|
flexDirection: "column",
|
|
@@ -526,7 +761,86 @@ var Navbar = ({
|
|
|
526
761
|
transition: "all 0.3s ease"
|
|
527
762
|
}
|
|
528
763
|
};
|
|
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(
|
|
764
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("style", null, SCROLLBAR_STYLE), /* @__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(
|
|
765
|
+
"div",
|
|
766
|
+
{
|
|
767
|
+
key: idx,
|
|
768
|
+
style: styles.desktopLinkWrapper,
|
|
769
|
+
onMouseEnter: () => handleDropdownEnter(idx),
|
|
770
|
+
onMouseLeave: () => handleDropdownLeave(idx)
|
|
771
|
+
},
|
|
772
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
773
|
+
"a",
|
|
774
|
+
{
|
|
775
|
+
href: link.path,
|
|
776
|
+
style: { ...styles.desktopLink, color: location.pathname === link.path ? accentColor : textMain },
|
|
777
|
+
onClick: (e) => {
|
|
778
|
+
if (!link.children) handleNavigation(link.path, e);
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
link.label,
|
|
782
|
+
link.children && /* @__PURE__ */ import_react2.default.createElement(import_fi.FiChevronDown, { style: { marginTop: "2px" }, size: 16 })
|
|
783
|
+
),
|
|
784
|
+
link.children && /* @__PURE__ */ import_react2.default.createElement(
|
|
785
|
+
"div",
|
|
786
|
+
{
|
|
787
|
+
ref: (el) => desktopDropdownRefs.current[idx] = el,
|
|
788
|
+
style: styles.desktopDropdown
|
|
789
|
+
},
|
|
790
|
+
link.children.map((child, cIdx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
791
|
+
"a",
|
|
792
|
+
{
|
|
793
|
+
key: cIdx,
|
|
794
|
+
href: child.path,
|
|
795
|
+
style: styles.dropdownItem,
|
|
796
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
797
|
+
onMouseEnter: (e) => {
|
|
798
|
+
e.currentTarget.style.backgroundColor = isLight2 ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.05)";
|
|
799
|
+
e.currentTarget.style.color = accentColor;
|
|
800
|
+
},
|
|
801
|
+
onMouseLeave: (e) => {
|
|
802
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
803
|
+
e.currentTarget.style.color = textMain;
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
child.label
|
|
807
|
+
))
|
|
808
|
+
)
|
|
809
|
+
))), /* @__PURE__ */ import_react2.default.createElement("div", { ref: rightActionsRef, style: styles.rightActionsGroup }, showSearch && /* @__PURE__ */ import_react2.default.createElement(
|
|
810
|
+
ActionItem,
|
|
811
|
+
{
|
|
812
|
+
id: "search",
|
|
813
|
+
icon: import_fi.FiSearch,
|
|
814
|
+
clickHandler: onSearch,
|
|
815
|
+
contentNode: searchContent
|
|
816
|
+
}
|
|
817
|
+
), showNotification && /* @__PURE__ */ import_react2.default.createElement(
|
|
818
|
+
ActionItem,
|
|
819
|
+
{
|
|
820
|
+
id: "bell",
|
|
821
|
+
icon: import_fi.FiBell,
|
|
822
|
+
count: notificationCount,
|
|
823
|
+
clickHandler: onNotificationClick,
|
|
824
|
+
contentNode: notificationContent
|
|
825
|
+
}
|
|
826
|
+
), showUser && /* @__PURE__ */ import_react2.default.createElement(
|
|
827
|
+
ActionItem,
|
|
828
|
+
{
|
|
829
|
+
id: "user",
|
|
830
|
+
icon: import_fi.FiUser,
|
|
831
|
+
clickHandler: onUserClick,
|
|
832
|
+
contentNode: userContent
|
|
833
|
+
}
|
|
834
|
+
), showCart && /* @__PURE__ */ import_react2.default.createElement(
|
|
835
|
+
ActionItem,
|
|
836
|
+
{
|
|
837
|
+
id: "cart",
|
|
838
|
+
icon: import_fi.FiShoppingBag,
|
|
839
|
+
count: cartCount,
|
|
840
|
+
clickHandler: onCartClick,
|
|
841
|
+
contentNode: cartContent
|
|
842
|
+
}
|
|
843
|
+
), showHamburger && /* @__PURE__ */ import_react2.default.createElement(
|
|
530
844
|
"div",
|
|
531
845
|
{
|
|
532
846
|
style: styles.hamburgerBtn,
|
|
@@ -544,69 +858,112 @@ var Navbar = ({
|
|
|
544
858
|
}
|
|
545
859
|
}
|
|
546
860
|
},
|
|
547
|
-
/* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
861
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(4px) rotate(45deg)" : "none" } }),
|
|
862
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none" } })
|
|
863
|
+
))), /* @__PURE__ */ import_react2.default.createElement(
|
|
864
|
+
"div",
|
|
865
|
+
{
|
|
866
|
+
ref: overlayRef,
|
|
867
|
+
style: styles.overlay,
|
|
868
|
+
className: "aura-no-scroll"
|
|
869
|
+
},
|
|
870
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { ref: linksContainerRef, style: styles.linksArea }, links.map((link, idx) => {
|
|
871
|
+
const isHovered = hoverIndex === idx;
|
|
872
|
+
const isAnyHovered = hoverIndex !== null;
|
|
873
|
+
const isActiveRoute = location.pathname === link.path;
|
|
874
|
+
const isExpanded = expandedOverlay === idx;
|
|
875
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { key: idx, style: styles.overlayLinkItem }, /* @__PURE__ */ import_react2.default.createElement(
|
|
876
|
+
"a",
|
|
877
|
+
{
|
|
878
|
+
href: link.path,
|
|
879
|
+
onClick: (e) => {
|
|
880
|
+
if (link.children) {
|
|
881
|
+
e.preventDefault();
|
|
882
|
+
setExpandedOverlay(isExpanded ? null : idx);
|
|
883
|
+
} else {
|
|
884
|
+
handleNavigation(link.path, e);
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
onMouseEnter: () => setHoverIndex(idx),
|
|
888
|
+
onMouseLeave: () => setHoverIndex(null),
|
|
889
|
+
style: styles.overlayLinkMain
|
|
890
|
+
},
|
|
891
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: {
|
|
892
|
+
...styles.linkText,
|
|
893
|
+
color: isHovered || isActiveRoute ? accentColor : textMain,
|
|
894
|
+
opacity: isAnyHovered && !isHovered ? 0.3 : 1,
|
|
895
|
+
transform: isHovered || isActiveRoute ? "translateX(20px)" : "translateX(0px)",
|
|
896
|
+
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
897
|
+
} }, link.label),
|
|
898
|
+
link.children ? /* @__PURE__ */ import_react2.default.createElement(
|
|
899
|
+
import_fi.FiChevronDown,
|
|
900
|
+
{
|
|
901
|
+
style: {
|
|
902
|
+
fontSize: "clamp(24px, 3vw, 40px)",
|
|
903
|
+
color: accentColor,
|
|
904
|
+
opacity: isHovered ? 1 : 0,
|
|
905
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
906
|
+
transition: "all 0.5s ease"
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
) : /* @__PURE__ */ import_react2.default.createElement(
|
|
910
|
+
import_fi.FiArrowUpRight,
|
|
911
|
+
{
|
|
912
|
+
style: {
|
|
913
|
+
fontSize: "clamp(30px, 4vw, 60px)",
|
|
914
|
+
color: accentColor,
|
|
915
|
+
opacity: isHovered || isActiveRoute ? 1 : 0,
|
|
916
|
+
transform: isHovered || isActiveRoute ? "translate(0px, 0px)" : "translate(-20px, 20px)",
|
|
917
|
+
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
)
|
|
921
|
+
), link.children && /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
922
|
+
...styles.accordionContent,
|
|
923
|
+
maxHeight: isExpanded ? "500px" : "0px",
|
|
924
|
+
opacity: isExpanded ? 1 : 0,
|
|
925
|
+
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
926
|
+
} }, link.children.map((child, cIdx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
927
|
+
"a",
|
|
928
|
+
{
|
|
929
|
+
key: cIdx,
|
|
930
|
+
href: child.path,
|
|
931
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
932
|
+
style: styles.accordionLink,
|
|
933
|
+
onMouseEnter: (e) => {
|
|
934
|
+
e.currentTarget.style.color = accentColor;
|
|
935
|
+
e.currentTarget.style.paddingLeft = "10px";
|
|
936
|
+
},
|
|
937
|
+
onMouseLeave: (e) => {
|
|
938
|
+
e.currentTarget.style.color = textMuted;
|
|
939
|
+
e.currentTarget.style.paddingLeft = "0px";
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
child.label
|
|
943
|
+
))));
|
|
944
|
+
})),
|
|
945
|
+
/* @__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(
|
|
560
946
|
"a",
|
|
561
947
|
{
|
|
562
948
|
key: idx,
|
|
563
|
-
href:
|
|
564
|
-
|
|
565
|
-
onMouseEnter: () =>
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
575
|
-
} }, link.label),
|
|
576
|
-
/* @__PURE__ */ import_react2.default.createElement(
|
|
577
|
-
import_fi.FiArrowUpRight,
|
|
578
|
-
{
|
|
579
|
-
style: {
|
|
580
|
-
fontSize: "clamp(30px, 4vw, 60px)",
|
|
581
|
-
color: accentColor,
|
|
582
|
-
opacity: isHovered || isActiveRoute ? 1 : 0,
|
|
583
|
-
transform: isHovered || isActiveRoute ? "translate(0px, 0px)" : "translate(-20px, 20px)",
|
|
584
|
-
transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)"
|
|
585
|
-
}
|
|
949
|
+
href: social.path,
|
|
950
|
+
style: styles.socialLink,
|
|
951
|
+
onMouseEnter: (e) => {
|
|
952
|
+
e.currentTarget.style.borderColor = accentColor;
|
|
953
|
+
e.currentTarget.style.backgroundColor = `${accentColor}11`;
|
|
954
|
+
e.currentTarget.style.color = accentColor;
|
|
955
|
+
},
|
|
956
|
+
onMouseLeave: (e) => {
|
|
957
|
+
e.currentTarget.style.borderColor = borderCol;
|
|
958
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
959
|
+
e.currentTarget.style.color = textMain;
|
|
586
960
|
}
|
|
587
|
-
)
|
|
588
|
-
);
|
|
589
|
-
})), /* @__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
|
-
"a",
|
|
591
|
-
{
|
|
592
|
-
key: idx,
|
|
593
|
-
href: social.path,
|
|
594
|
-
style: styles.socialLink,
|
|
595
|
-
onMouseEnter: (e) => {
|
|
596
|
-
e.currentTarget.style.borderColor = accentColor;
|
|
597
|
-
e.currentTarget.style.backgroundColor = `${accentColor}11`;
|
|
598
|
-
e.currentTarget.style.color = accentColor;
|
|
599
961
|
},
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
social.icon,
|
|
607
|
-
" ",
|
|
608
|
-
social.label
|
|
609
|
-
)))))));
|
|
962
|
+
social.icon,
|
|
963
|
+
" ",
|
|
964
|
+
social.label
|
|
965
|
+
)))))
|
|
966
|
+
));
|
|
610
967
|
};
|
|
611
968
|
|
|
612
969
|
// src/components/Spotlight/Spotlight.jsx
|