aura-ui-library 1.0.30 → 1.0.32
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 +283 -447
- package/dist/index.mjs +283 -447
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50,7 +50,8 @@ __export(index_exports, {
|
|
|
50
50
|
Spotlight: () => Spotlight,
|
|
51
51
|
Testimonials: () => Testimonials,
|
|
52
52
|
TextImage: () => TextImage,
|
|
53
|
-
TextWriting: () => TextWriting
|
|
53
|
+
TextWriting: () => TextWriting,
|
|
54
|
+
Tooltip: () => Tooltip
|
|
54
55
|
});
|
|
55
56
|
module.exports = __toCommonJS(index_exports);
|
|
56
57
|
|
|
@@ -264,11 +265,17 @@ var SCROLLBAR_STYLE = `
|
|
|
264
265
|
-ms-overflow-style: none;
|
|
265
266
|
scrollbar-width: none;
|
|
266
267
|
}
|
|
268
|
+
|
|
269
|
+
/* Input placeholder styling for internal search */
|
|
270
|
+
.aura-internal-input::placeholder {
|
|
271
|
+
color: inherit;
|
|
272
|
+
opacity: 0.4;
|
|
273
|
+
}
|
|
267
274
|
`;
|
|
268
275
|
var Navbar = ({
|
|
269
276
|
logoText = "AURA",
|
|
270
277
|
showBadge = true,
|
|
271
|
-
variant = "
|
|
278
|
+
variant = "product",
|
|
272
279
|
// "overlay" | "classic" | "product"
|
|
273
280
|
links = [
|
|
274
281
|
{ label: "Home", path: "/" },
|
|
@@ -294,28 +301,45 @@ var Navbar = ({
|
|
|
294
301
|
email: "hello@aura-ui.dev",
|
|
295
302
|
address: "123 Innovation Drive, SF"
|
|
296
303
|
},
|
|
297
|
-
// E-commerce
|
|
298
|
-
showSearch =
|
|
304
|
+
// E-commerce Action Triggers
|
|
305
|
+
showSearch = true,
|
|
299
306
|
onSearch = null,
|
|
300
307
|
searchContent = null,
|
|
301
|
-
//
|
|
302
|
-
|
|
303
|
-
|
|
308
|
+
// Override prebuilt UI with custom React Node
|
|
309
|
+
trendingSearches = ["Sneakers", "Minimalist Jackets", "Winter Collection", "Aura Exclusive"],
|
|
310
|
+
showCart = true,
|
|
311
|
+
cartCount = 2,
|
|
304
312
|
onCartClick = null,
|
|
305
313
|
cartContent = null,
|
|
306
|
-
//
|
|
307
|
-
|
|
314
|
+
// Override prebuilt UI with custom React Node
|
|
315
|
+
cartCurrency = "$",
|
|
316
|
+
cartItems = [
|
|
317
|
+
{ id: 1, title: "Aura Signature Hoodie", price: 89, image: "https://images.unsplash.com/photo-1556821840-3a63f95609a7?w=200&q=80" },
|
|
318
|
+
{ id: 2, title: "Minimalist Sneakers", price: 120, image: "https://images.unsplash.com/photo-1549298916-b41d501d3772?w=200&q=80" }
|
|
319
|
+
],
|
|
320
|
+
showUser = true,
|
|
308
321
|
onUserClick = null,
|
|
309
322
|
userContent = null,
|
|
310
|
-
//
|
|
311
|
-
|
|
312
|
-
|
|
323
|
+
// Override prebuilt UI
|
|
324
|
+
userData = { name: "Ritik", email: "ritik@aura-ui.dev", avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=Ritik" },
|
|
325
|
+
userOptions = [
|
|
326
|
+
{ label: "My Profile", path: "/profile" },
|
|
327
|
+
{ label: "Orders", path: "/orders" },
|
|
328
|
+
{ label: "Wishlist", path: "/wishlist" },
|
|
329
|
+
{ label: "Settings", path: "/settings" }
|
|
330
|
+
],
|
|
331
|
+
showNotification = true,
|
|
332
|
+
notificationCount = 1,
|
|
313
333
|
onNotificationClick = null,
|
|
314
334
|
notificationContent = null,
|
|
315
|
-
//
|
|
335
|
+
// Override prebuilt UI
|
|
336
|
+
notifications = [
|
|
337
|
+
{ id: 1, title: "Order Shipped", time: "2 hours ago", unread: true },
|
|
338
|
+
{ id: 2, title: "Security Alert", time: "1 day ago", unread: false }
|
|
339
|
+
],
|
|
316
340
|
// Theme & Styling
|
|
317
341
|
accentColor = "#6366f1",
|
|
318
|
-
theme = "
|
|
342
|
+
theme = "light",
|
|
319
343
|
// "dark" | "light"
|
|
320
344
|
transparent = false,
|
|
321
345
|
style = {},
|
|
@@ -454,13 +478,72 @@ var Navbar = ({
|
|
|
454
478
|
}
|
|
455
479
|
}
|
|
456
480
|
};
|
|
481
|
+
const PrebuiltSearch = () => /* @__PURE__ */ import_react2.default.createElement("div", { style: { padding: "24px", minWidth: "340px" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ import_react2.default.createElement(import_fi.FiSearch, { style: { position: "absolute", left: "16px", top: "50%", transform: "translateY(-50%)", color: textMuted } }), /* @__PURE__ */ import_react2.default.createElement(
|
|
482
|
+
"input",
|
|
483
|
+
{
|
|
484
|
+
className: "aura-internal-input",
|
|
485
|
+
placeholder: "Search products...",
|
|
486
|
+
style: { width: "100%", padding: "14px 14px 14px 44px", borderRadius: "12px", border: `1px solid ${borderCol}`, background: isLight2 ? "rgba(0,0,0,0.02)" : "rgba(255,255,255,0.02)", color: textMain, fontSize: "15px", outline: "none", boxSizing: "border-box" }
|
|
487
|
+
}
|
|
488
|
+
)), /* @__PURE__ */ import_react2.default.createElement("div", { style: { marginTop: "24px" } }, /* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: "12px", fontWeight: "700", textTransform: "uppercase", letterSpacing: "1px", color: textMuted } }, "Trending"), /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px", marginTop: "12px" } }, trendingSearches.map((t, idx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
489
|
+
"span",
|
|
490
|
+
{
|
|
491
|
+
key: idx,
|
|
492
|
+
style: { padding: "8px 14px", background: isLight2 ? "rgba(0,0,0,0.04)" : "rgba(255,255,255,0.06)", color: textMain, borderRadius: "100px", fontSize: "13px", cursor: "pointer", transition: "background 0.2s", fontWeight: "500" },
|
|
493
|
+
onMouseEnter: (e) => e.currentTarget.style.background = isLight2 ? "rgba(0,0,0,0.08)" : "rgba(255,255,255,0.1)",
|
|
494
|
+
onMouseLeave: (e) => e.currentTarget.style.background = isLight2 ? "rgba(0,0,0,0.04)" : "rgba(255,255,255,0.06)"
|
|
495
|
+
},
|
|
496
|
+
t
|
|
497
|
+
)))));
|
|
498
|
+
const PrebuiltCart = () => {
|
|
499
|
+
const total = cartItems.reduce((acc, curr) => acc + curr.price, 0);
|
|
500
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { style: { width: "360px", padding: "24px", boxSizing: "border-box" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ import_react2.default.createElement("h3", { style: { margin: 0, fontSize: "18px", color: textMain, fontWeight: "700" } }, "Your Basket"), /* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: "12px", background: `${accentColor}22`, color: accentColor, padding: "4px 8px", borderRadius: "100px", fontWeight: "700" } }, cartItems.length, " items")), /* @__PURE__ */ import_react2.default.createElement("div", { className: "aura-no-scroll", style: { display: "flex", flexDirection: "column", gap: "16px", marginTop: "20px", maxHeight: "300px", overflowY: "auto" } }, cartItems.map((item) => /* @__PURE__ */ import_react2.default.createElement("div", { key: item.id, style: { display: "flex", gap: "16px", alignItems: "center" } }, /* @__PURE__ */ import_react2.default.createElement("img", { src: item.image, alt: item.title, style: { width: "64px", height: "64px", borderRadius: "12px", objectFit: "cover", background: borderCol } }), /* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ import_react2.default.createElement("p", { style: { fontWeight: 600, fontSize: "14px", margin: 0, color: textMain } }, item.title), /* @__PURE__ */ import_react2.default.createElement("p", { style: { color: textMuted, fontSize: "13px", margin: "4px 0 0" } }, cartCurrency, item.price)), /* @__PURE__ */ import_react2.default.createElement(import_fi.FiX, { style: { cursor: "pointer", color: textMuted, padding: "4px" }, onMouseEnter: (e) => e.currentTarget.style.color = "#ef4444", onMouseLeave: (e) => e.currentTarget.style.color = textMuted })))), cartItems.length > 0 ? /* @__PURE__ */ import_react2.default.createElement("div", { style: { marginTop: "24px", paddingTop: "20px", borderTop: `1px solid ${borderCol}` } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: "20px" } }, /* @__PURE__ */ import_react2.default.createElement("strong", { style: { color: textMuted, fontWeight: "500" } }, "Total"), /* @__PURE__ */ import_react2.default.createElement("strong", { style: { color: textMain, fontSize: "18px" } }, cartCurrency, total)), /* @__PURE__ */ import_react2.default.createElement(
|
|
501
|
+
"button",
|
|
502
|
+
{
|
|
503
|
+
style: { width: "100%", padding: "16px", background: accentColor, color: "#fff", border: "none", borderRadius: "12px", fontSize: "15px", fontWeight: "700", cursor: "pointer", transition: "transform 0.2s" },
|
|
504
|
+
onMouseEnter: (e) => e.currentTarget.style.transform = "translateY(-2px)",
|
|
505
|
+
onMouseLeave: (e) => e.currentTarget.style.transform = "translateY(0)"
|
|
506
|
+
},
|
|
507
|
+
"Proceed to Checkout"
|
|
508
|
+
)) : /* @__PURE__ */ import_react2.default.createElement("p", { style: { color: textMuted, textAlign: "center", margin: "30px 0" } }, "Your basket is empty."));
|
|
509
|
+
};
|
|
510
|
+
const PrebuiltNotifications = () => /* @__PURE__ */ import_react2.default.createElement("div", { style: { width: "340px", padding: "16px", boxSizing: "border-box" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "8px", marginBottom: "8px" } }, /* @__PURE__ */ import_react2.default.createElement("h3", { style: { margin: 0, fontSize: "16px", color: textMain } }, "Notifications"), /* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: "12px", color: accentColor, cursor: "pointer", fontWeight: "600" } }, "Mark all read")), /* @__PURE__ */ import_react2.default.createElement("div", { className: "aura-no-scroll", style: { maxHeight: "350px", overflowY: "auto" } }, notifications.map((n) => /* @__PURE__ */ import_react2.default.createElement("div", { key: n.id, style: { display: "flex", gap: "14px", padding: "16px", borderRadius: "12px", background: n.unread ? isLight2 ? "rgba(0,0,0,0.03)" : "rgba(255,255,255,0.03)" : "transparent", marginBottom: "4px" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { width: "8px", height: "8px", borderRadius: "50%", background: n.unread ? accentColor : "transparent", marginTop: "6px", flexShrink: 0 } }), /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement("p", { style: { margin: 0, fontWeight: 600, fontSize: "14px", color: textMain } }, n.title), /* @__PURE__ */ import_react2.default.createElement("p", { style: { margin: 0, color: textMuted, fontSize: "12px", marginTop: "4px" } }, n.time))))));
|
|
511
|
+
const PrebuiltUser = () => /* @__PURE__ */ import_react2.default.createElement("div", { style: { width: "280px", padding: "16px", boxSizing: "border-box" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "16px", padding: "8px 8px 24px", borderBottom: `1px solid ${borderCol}`, marginBottom: "8px" } }, /* @__PURE__ */ import_react2.default.createElement("img", { src: userData.avatar, alt: "Profile", style: { width: "48px", height: "48px", borderRadius: "50%", background: borderCol } }), /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement("p", { style: { margin: 0, fontWeight: "700", color: textMain, fontSize: "15px" } }, userData.name), /* @__PURE__ */ import_react2.default.createElement("p", { style: { margin: 0, color: textMuted, fontSize: "13px", marginTop: "2px" } }, userData.email))), /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "2px" } }, userOptions.map((o, idx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
512
|
+
"a",
|
|
513
|
+
{
|
|
514
|
+
key: idx,
|
|
515
|
+
href: o.path,
|
|
516
|
+
onClick: (e) => handleNavigation(o.path, e),
|
|
517
|
+
style: { padding: "12px 16px", cursor: "pointer", borderRadius: "10px", fontSize: "14px", fontWeight: 500, color: textMain, textDecoration: "none", transition: "background 0.2s" },
|
|
518
|
+
onMouseEnter: (e) => {
|
|
519
|
+
e.currentTarget.style.background = isLight2 ? "rgba(0,0,0,0.04)" : "rgba(255,255,255,0.04)";
|
|
520
|
+
e.currentTarget.style.color = accentColor;
|
|
521
|
+
},
|
|
522
|
+
onMouseLeave: (e) => {
|
|
523
|
+
e.currentTarget.style.background = "transparent";
|
|
524
|
+
e.currentTarget.style.color = textMain;
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
o.label
|
|
528
|
+
)), /* @__PURE__ */ import_react2.default.createElement("div", { style: { height: "1px", background: borderCol, margin: "8px 0" } }), /* @__PURE__ */ import_react2.default.createElement(
|
|
529
|
+
"a",
|
|
530
|
+
{
|
|
531
|
+
href: "#logout",
|
|
532
|
+
style: { padding: "12px 16px", cursor: "pointer", borderRadius: "10px", fontSize: "14px", fontWeight: 500, color: "#ef4444", textDecoration: "none", transition: "background 0.2s" },
|
|
533
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "#ef444411",
|
|
534
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "transparent"
|
|
535
|
+
},
|
|
536
|
+
"Sign Out"
|
|
537
|
+
)));
|
|
538
|
+
const finalSearchContent = searchContent || /* @__PURE__ */ import_react2.default.createElement(PrebuiltSearch, null);
|
|
539
|
+
const finalCartContent = cartContent || /* @__PURE__ */ import_react2.default.createElement(PrebuiltCart, null);
|
|
540
|
+
const finalUserContent = userContent || /* @__PURE__ */ import_react2.default.createElement(PrebuiltUser, null);
|
|
541
|
+
const finalNotificationContent = notificationContent || /* @__PURE__ */ import_react2.default.createElement(PrebuiltNotifications, null);
|
|
457
542
|
const ActionItem = ({ id, icon: Icon, count, clickHandler, contentNode }) => {
|
|
458
543
|
const isActive = activePopover === id;
|
|
459
544
|
const handleActionClick = (e) => {
|
|
460
545
|
if (clickHandler) clickHandler(e);
|
|
461
|
-
if (contentNode)
|
|
462
|
-
setActivePopover(isActive ? null : id);
|
|
463
|
-
}
|
|
546
|
+
if (contentNode) setActivePopover(isActive ? null : id);
|
|
464
547
|
};
|
|
465
548
|
return /* @__PURE__ */ import_react2.default.createElement("div", { style: styles.actionItemWrapper }, /* @__PURE__ */ import_react2.default.createElement(
|
|
466
549
|
"div",
|
|
@@ -513,334 +596,53 @@ var Navbar = ({
|
|
|
513
596
|
willChange: "transform",
|
|
514
597
|
transition: "transform 0.3s ease"
|
|
515
598
|
},
|
|
516
|
-
logoDot: {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
},
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
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
|
-
},
|
|
629
|
-
hamburgerBtn: {
|
|
630
|
-
position: "relative",
|
|
631
|
-
width: "48px",
|
|
632
|
-
height: "48px",
|
|
633
|
-
borderRadius: "50%",
|
|
634
|
-
backgroundColor: isOpen ? borderCol : "transparent",
|
|
635
|
-
display: "flex",
|
|
636
|
-
flexDirection: "column",
|
|
637
|
-
justifyContent: "center",
|
|
638
|
-
alignItems: "center",
|
|
639
|
-
gap: "6px",
|
|
640
|
-
cursor: "pointer",
|
|
641
|
-
marginLeft: showSearch || showCart || showUser || showNotification ? "10px" : "0",
|
|
642
|
-
border: `1px solid ${isOpen ? borderCol : "transparent"}`,
|
|
643
|
-
transition: "all 0.4s ease"
|
|
644
|
-
},
|
|
645
|
-
line: {
|
|
646
|
-
width: "22px",
|
|
647
|
-
height: "2px",
|
|
648
|
-
backgroundColor: textMain,
|
|
649
|
-
borderRadius: "2px",
|
|
650
|
-
transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)",
|
|
651
|
-
transformOrigin: "center"
|
|
652
|
-
},
|
|
653
|
-
overlay: {
|
|
654
|
-
position: "fixed",
|
|
655
|
-
top: 0,
|
|
656
|
-
left: 0,
|
|
657
|
-
width: "100%",
|
|
658
|
-
height: "100vh",
|
|
659
|
-
backgroundColor: bgMain,
|
|
660
|
-
zIndex: 999,
|
|
661
|
-
clipPath: "circle(0% at 95% 40px)",
|
|
662
|
-
pointerEvents: "none",
|
|
663
|
-
display: "flex",
|
|
664
|
-
flexDirection: isMobile ? "column" : "row",
|
|
665
|
-
justifyContent: isMobile ? "flex-start" : "space-between",
|
|
666
|
-
alignItems: isMobile ? "flex-start" : "center",
|
|
667
|
-
padding: isMobile ? "120px 8% 60px" : "100px 10%",
|
|
668
|
-
boxSizing: "border-box",
|
|
669
|
-
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
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"
|
|
673
|
-
},
|
|
674
|
-
linksArea: {
|
|
675
|
-
display: "flex",
|
|
676
|
-
flexDirection: "column",
|
|
677
|
-
gap: "10px",
|
|
678
|
-
width: isMobile ? "100%" : "60%",
|
|
679
|
-
marginBottom: isMobile ? "60px" : "0"
|
|
680
|
-
},
|
|
681
|
-
overlayLinkItem: {
|
|
682
|
-
display: "flex",
|
|
683
|
-
flexDirection: "column",
|
|
684
|
-
width: "100%"
|
|
685
|
-
},
|
|
686
|
-
overlayLinkMain: {
|
|
687
|
-
display: "flex",
|
|
688
|
-
alignItems: "center",
|
|
689
|
-
gap: "20px",
|
|
690
|
-
textDecoration: "none",
|
|
691
|
-
padding: "10px 0",
|
|
692
|
-
cursor: "pointer",
|
|
693
|
-
willChange: "transform, opacity, color"
|
|
694
|
-
},
|
|
695
|
-
linkText: {
|
|
696
|
-
fontSize: linkSize,
|
|
697
|
-
fontWeight: "900",
|
|
698
|
-
letterSpacing: "-2px",
|
|
699
|
-
textTransform: "uppercase",
|
|
700
|
-
lineHeight: "1"
|
|
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
|
-
},
|
|
719
|
-
infoArea: {
|
|
720
|
-
display: "flex",
|
|
721
|
-
flexDirection: "column",
|
|
722
|
-
gap: "40px",
|
|
723
|
-
width: isMobile ? "100%" : "30%",
|
|
724
|
-
paddingLeft: isMobile ? "0" : "5%",
|
|
725
|
-
borderLeft: isMobile ? "none" : `1px solid ${borderCol}`
|
|
726
|
-
},
|
|
727
|
-
infoBlock: {
|
|
728
|
-
display: "flex",
|
|
729
|
-
flexDirection: "column",
|
|
730
|
-
gap: "12px"
|
|
731
|
-
},
|
|
732
|
-
infoLabel: {
|
|
733
|
-
fontSize: "12px",
|
|
734
|
-
textTransform: "uppercase",
|
|
735
|
-
letterSpacing: "2px",
|
|
736
|
-
fontWeight: "700",
|
|
737
|
-
color: accentColor
|
|
738
|
-
},
|
|
739
|
-
infoText: {
|
|
740
|
-
fontSize: "16px",
|
|
741
|
-
fontWeight: "500",
|
|
742
|
-
color: textMain,
|
|
743
|
-
lineHeight: "1.5"
|
|
744
|
-
},
|
|
745
|
-
socialGrid: {
|
|
746
|
-
display: "flex",
|
|
747
|
-
flexWrap: "wrap",
|
|
748
|
-
gap: "12px"
|
|
749
|
-
},
|
|
750
|
-
socialLink: {
|
|
751
|
-
display: "flex",
|
|
752
|
-
alignItems: "center",
|
|
753
|
-
gap: "8px",
|
|
754
|
-
padding: "12px 20px",
|
|
755
|
-
borderRadius: "100px",
|
|
756
|
-
border: `1px solid ${borderCol}`,
|
|
757
|
-
color: textMain,
|
|
758
|
-
textDecoration: "none",
|
|
759
|
-
fontSize: "14px",
|
|
760
|
-
fontWeight: "600",
|
|
761
|
-
transition: "all 0.3s ease"
|
|
762
|
-
}
|
|
599
|
+
logoDot: { width: "8px", height: "8px", borderRadius: "50%", backgroundColor: accentColor, boxShadow: `0 0 15px ${accentColor}88` },
|
|
600
|
+
desktopNav: { display: "flex", flex: 1, justifyContent: "center", alignItems: "center", gap: "30px", marginRight: variant === "product" ? "-50px" : "0px" },
|
|
601
|
+
desktopLinkWrapper: { position: "relative", padding: "10px 0" },
|
|
602
|
+
desktopLink: { color: textMain, textDecoration: "none", fontSize: "15px", fontWeight: variant === "product" ? "500" : "600", cursor: "pointer", display: "flex", alignItems: "center", gap: "6px", transition: "color 0.3s" },
|
|
603
|
+
desktopDropdown: { position: "absolute", top: "100%", left: "50%", transform: "translateX(-50%) translateY(0)", backgroundColor: bgMain, border: `1px solid ${borderCol}`, borderRadius: "16px", padding: "8px", minWidth: "200px", boxShadow: "0 10px 40px rgba(0,0,0,0.1)", opacity: 0, visibility: "hidden", pointerEvents: "none", display: "flex", flexDirection: "column", gap: "4px", zIndex: 1002 },
|
|
604
|
+
dropdownItem: { padding: "12px 16px", borderRadius: "10px", color: textMain, textDecoration: "none", fontSize: "14px", fontWeight: "500", transition: "background-color 0.2s, color 0.2s" },
|
|
605
|
+
rightActionsGroup: { display: "flex", alignItems: "center", gap: variant === "product" ? "24px" : "20px", zIndex: 1001 },
|
|
606
|
+
actionItemWrapper: { position: "relative", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
607
|
+
iconBtn: { fontSize: "22px", color: textMain, cursor: "pointer", display: "flex", alignItems: "center", transition: "transform 0.2s ease, color 0.2s ease" },
|
|
608
|
+
actionBadge: { position: "absolute", top: "-6px", right: "-8px", backgroundColor: accentColor, color: "#fff", fontSize: "10px", fontWeight: "800", minWidth: "16px", height: "16px", borderRadius: "8px", display: "flex", justifyContent: "center", alignItems: "center", padding: "0 4px", pointerEvents: "none" },
|
|
609
|
+
actionPopover: { position: "absolute", top: "calc(100% + 20px)", right: 0, backgroundColor: bgMain, border: `1px solid ${borderCol}`, borderRadius: "20px", boxShadow: headerShadow, zIndex: 1002, display: "flex", flexDirection: "column", overflow: "hidden" },
|
|
610
|
+
hamburgerBtn: { position: "relative", width: "48px", height: "48px", borderRadius: "50%", backgroundColor: isOpen ? borderCol : "transparent", display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", gap: "6px", cursor: "pointer", marginLeft: showSearch || showCart || showUser || showNotification ? "10px" : "0", border: `1px solid ${isOpen ? borderCol : "transparent"}`, transition: "all 0.4s ease" },
|
|
611
|
+
line: { width: "22px", height: "2px", backgroundColor: textMain, borderRadius: "2px", transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)", transformOrigin: "center" },
|
|
612
|
+
overlay: { position: "fixed", top: 0, left: 0, width: "100%", height: "100vh", backgroundColor: bgMain, zIndex: 999, clipPath: "circle(0% at 95% 40px)", pointerEvents: "none", display: "flex", flexDirection: isMobile ? "column" : "row", justifyContent: isMobile ? "flex-start" : "space-between", alignItems: "center", padding: isMobile ? "120px 8% 60px" : "100px 10%", boxSizing: "border-box", fontFamily: '"Inter", -apple-system, sans-serif', overflowY: isMobile ? "auto" : "none" },
|
|
613
|
+
linksArea: { display: "flex", flexDirection: "column", gap: "10px", width: isMobile ? "100%" : "60%", marginBottom: isMobile ? "60px" : "0" },
|
|
614
|
+
overlayLinkItem: { display: "flex", flexDirection: "column", width: "100%" },
|
|
615
|
+
overlayLinkMain: { display: "flex", alignItems: "center", gap: "20px", textDecoration: "none", padding: "10px 0", cursor: "pointer", willChange: "transform, opacity, color" },
|
|
616
|
+
linkText: { fontSize: linkSize, fontWeight: "900", letterSpacing: "-2px", textTransform: "uppercase", lineHeight: "1" },
|
|
617
|
+
accordionContent: { display: "flex", flexDirection: "column", paddingLeft: "2%", borderLeft: `2px solid ${borderCol}`, marginLeft: "1%", marginTop: "10px", gap: "15px", overflow: "hidden" },
|
|
618
|
+
accordionLink: { fontSize: "clamp(20px, 3vw, 32px)", fontWeight: "600", color: textMuted, textDecoration: "none", transition: "color 0.3s ease" },
|
|
619
|
+
infoArea: { display: "flex", flexDirection: "column", gap: "40px", width: isMobile ? "100%" : "30%", paddingLeft: isMobile ? "0" : "5%", borderLeft: isMobile ? "none" : `1px solid ${borderCol}` },
|
|
620
|
+
infoBlock: { display: "flex", flexDirection: "column", gap: "12px" },
|
|
621
|
+
infoLabel: { fontSize: "12px", textTransform: "uppercase", letterSpacing: "2px", fontWeight: "700", color: accentColor },
|
|
622
|
+
infoText: { fontSize: "16px", fontWeight: "500", color: textMain, lineHeight: "1.5" },
|
|
623
|
+
socialGrid: { display: "flex", flexWrap: "wrap", gap: "12px" },
|
|
624
|
+
socialLink: { display: "flex", alignItems: "center", gap: "8px", padding: "12px 20px", borderRadius: "100px", border: `1px solid ${borderCol}`, color: textMain, textDecoration: "none", fontSize: "14px", fontWeight: "600", transition: "all 0.3s ease" }
|
|
763
625
|
};
|
|
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
|
-
|
|
626
|
+
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("div", { key: idx, style: styles.desktopLinkWrapper, onMouseEnter: () => handleDropdownEnter(idx), onMouseLeave: () => handleDropdownLeave(idx) }, /* @__PURE__ */ import_react2.default.createElement("a", { href: link.path, style: { ...styles.desktopLink, color: location.pathname === link.path ? accentColor : textMain }, onClick: (e) => {
|
|
627
|
+
if (!link.children) handleNavigation(link.path, e);
|
|
628
|
+
} }, link.label, link.children && /* @__PURE__ */ import_react2.default.createElement(import_fi.FiChevronDown, { style: { marginTop: "2px" }, size: 16 })), link.children && /* @__PURE__ */ import_react2.default.createElement("div", { ref: (el) => desktopDropdownRefs.current[idx] = el, style: styles.desktopDropdown }, link.children.map((child, cIdx) => /* @__PURE__ */ import_react2.default.createElement(
|
|
629
|
+
"a",
|
|
766
630
|
{
|
|
767
|
-
key:
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
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
|
|
631
|
+
key: cIdx,
|
|
632
|
+
href: child.path,
|
|
633
|
+
style: styles.dropdownItem,
|
|
634
|
+
onClick: (e) => handleNavigation(child.path, e),
|
|
635
|
+
onMouseEnter: (e) => {
|
|
636
|
+
e.currentTarget.style.backgroundColor = isLight2 ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.05)";
|
|
637
|
+
e.currentTarget.style.color = accentColor;
|
|
789
638
|
},
|
|
790
|
-
|
|
791
|
-
"
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
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(
|
|
639
|
+
onMouseLeave: (e) => {
|
|
640
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
641
|
+
e.currentTarget.style.color = textMain;
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
child.label
|
|
645
|
+
)))))), /* @__PURE__ */ import_react2.default.createElement("div", { ref: rightActionsRef, style: styles.rightActionsGroup }, showSearch && /* @__PURE__ */ import_react2.default.createElement(ActionItem, { id: "search", icon: import_fi.FiSearch, clickHandler: onSearch, contentNode: finalSearchContent }), showNotification && /* @__PURE__ */ import_react2.default.createElement(ActionItem, { id: "bell", icon: import_fi.FiBell, count: notificationCount, clickHandler: onNotificationClick, contentNode: finalNotificationContent }), showUser && /* @__PURE__ */ import_react2.default.createElement(ActionItem, { id: "user", icon: import_fi.FiUser, clickHandler: onUserClick, contentNode: finalUserContent }), showCart && /* @__PURE__ */ import_react2.default.createElement(ActionItem, { id: "cart", icon: import_fi.FiShoppingBag, count: cartCount, clickHandler: onCartClick, contentNode: finalCartContent }), showHamburger && /* @__PURE__ */ import_react2.default.createElement(
|
|
844
646
|
"div",
|
|
845
647
|
{
|
|
846
648
|
style: styles.hamburgerBtn,
|
|
@@ -860,110 +662,34 @@ var Navbar = ({
|
|
|
860
662
|
},
|
|
861
663
|
/* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(4px) rotate(45deg)" : "none" } }),
|
|
862
664
|
/* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.line, transform: isOpen ? "translateY(-4px) rotate(-45deg)" : "none" } })
|
|
863
|
-
))), /* @__PURE__ */ import_react2.default.createElement(
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
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(
|
|
946
|
-
"a",
|
|
947
|
-
{
|
|
948
|
-
key: idx,
|
|
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;
|
|
960
|
-
}
|
|
961
|
-
},
|
|
962
|
-
social.icon,
|
|
963
|
-
" ",
|
|
964
|
-
social.label
|
|
965
|
-
)))))
|
|
966
|
-
));
|
|
665
|
+
))), /* @__PURE__ */ import_react2.default.createElement("div", { ref: overlayRef, style: styles.overlay, className: "aura-no-scroll" }, /* @__PURE__ */ import_react2.default.createElement("div", { ref: linksContainerRef, style: styles.linksArea }, links.map((link, idx) => {
|
|
666
|
+
const isHovered = hoverIndex === idx;
|
|
667
|
+
const isAnyHovered = hoverIndex !== null;
|
|
668
|
+
const isActiveRoute = location.pathname === link.path;
|
|
669
|
+
const isExpanded = expandedOverlay === idx;
|
|
670
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { key: idx, style: styles.overlayLinkItem }, /* @__PURE__ */ import_react2.default.createElement("a", { href: link.path, onClick: (e) => {
|
|
671
|
+
if (link.children) {
|
|
672
|
+
e.preventDefault();
|
|
673
|
+
setExpandedOverlay(isExpanded ? null : idx);
|
|
674
|
+
} else {
|
|
675
|
+
handleNavigation(link.path, e);
|
|
676
|
+
}
|
|
677
|
+
}, onMouseEnter: () => setHoverIndex(idx), onMouseLeave: () => setHoverIndex(null), style: styles.overlayLinkMain }, /* @__PURE__ */ import_react2.default.createElement("span", { style: { ...styles.linkText, color: isHovered || isActiveRoute ? accentColor : textMain, opacity: isAnyHovered && !isHovered ? 0.3 : 1, transform: isHovered || isActiveRoute ? "translateX(20px)" : "translateX(0px)", transition: "all 0.4s cubic-bezier(0.16, 1, 0.3, 1)" } }, link.label), link.children ? /* @__PURE__ */ import_react2.default.createElement(import_fi.FiChevronDown, { style: { fontSize: "clamp(24px, 3vw, 40px)", color: accentColor, opacity: isHovered ? 1 : 0, transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: "all 0.5s ease" } }) : /* @__PURE__ */ import_react2.default.createElement(import_fi.FiArrowUpRight, { style: { fontSize: "clamp(30px, 4vw, 60px)", color: accentColor, opacity: isHovered || isActiveRoute ? 1 : 0, transform: isHovered || isActiveRoute ? "translate(0px, 0px)" : "translate(-20px, 20px)", transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)" } })), link.children && /* @__PURE__ */ import_react2.default.createElement("div", { style: { ...styles.accordionContent, maxHeight: isExpanded ? "500px" : "0px", opacity: isExpanded ? 1 : 0, transition: "all 0.5s cubic-bezier(0.16, 1, 0.3, 1)" } }, link.children.map((child, cIdx) => /* @__PURE__ */ import_react2.default.createElement("a", { key: cIdx, href: child.path, onClick: (e) => handleNavigation(child.path, e), style: styles.accordionLink, onMouseEnter: (e) => {
|
|
678
|
+
e.currentTarget.style.color = accentColor;
|
|
679
|
+
e.currentTarget.style.paddingLeft = "10px";
|
|
680
|
+
}, onMouseLeave: (e) => {
|
|
681
|
+
e.currentTarget.style.color = textMuted;
|
|
682
|
+
e.currentTarget.style.paddingLeft = "0px";
|
|
683
|
+
} }, child.label))));
|
|
684
|
+
})), /* @__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("a", { key: idx, href: social.path, style: styles.socialLink, onMouseEnter: (e) => {
|
|
685
|
+
e.currentTarget.style.borderColor = accentColor;
|
|
686
|
+
e.currentTarget.style.backgroundColor = `${accentColor}11`;
|
|
687
|
+
e.currentTarget.style.color = accentColor;
|
|
688
|
+
}, onMouseLeave: (e) => {
|
|
689
|
+
e.currentTarget.style.borderColor = borderCol;
|
|
690
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
691
|
+
e.currentTarget.style.color = textMain;
|
|
692
|
+
} }, social.icon, " ", social.label)))))));
|
|
967
693
|
};
|
|
968
694
|
|
|
969
695
|
// src/components/Spotlight/Spotlight.jsx
|
|
@@ -6425,6 +6151,115 @@ var AuraRegister = ({
|
|
|
6425
6151
|
))
|
|
6426
6152
|
));
|
|
6427
6153
|
};
|
|
6154
|
+
|
|
6155
|
+
// src/components/Tooltip/Tooltip.jsx
|
|
6156
|
+
var import_react23 = __toESM(require("react"));
|
|
6157
|
+
var import_gsap23 = require("gsap");
|
|
6158
|
+
var import_fi20 = require("react-icons/fi");
|
|
6159
|
+
var Tooltip = ({
|
|
6160
|
+
children,
|
|
6161
|
+
content = "Tooltip Information",
|
|
6162
|
+
theme = "dark",
|
|
6163
|
+
// "dark" | "light"
|
|
6164
|
+
accentColor = "#6366f1",
|
|
6165
|
+
duration = 0.4,
|
|
6166
|
+
easing = "power3.out",
|
|
6167
|
+
offsetX = 20,
|
|
6168
|
+
offsetY = 20,
|
|
6169
|
+
style = {}
|
|
6170
|
+
}) => {
|
|
6171
|
+
const containerRef = (0, import_react23.useRef)(null);
|
|
6172
|
+
const tooltipRef = (0, import_react23.useRef)(null);
|
|
6173
|
+
const [isHovered, setIsHovered] = (0, import_react23.useState)(false);
|
|
6174
|
+
const isLight2 = theme === "light";
|
|
6175
|
+
const bgMain = isLight2 ? "rgba(255, 255, 255, 0.65)" : "rgba(10, 10, 10, 0.65)";
|
|
6176
|
+
const textMain = isLight2 ? "#0f172a" : "#ffffff";
|
|
6177
|
+
const borderCol = isLight2 ? "rgba(0,0,0,0.08)" : "rgba(255,255,255,0.08)";
|
|
6178
|
+
(0, import_react23.useEffect)(() => {
|
|
6179
|
+
if (!tooltipRef.current) return;
|
|
6180
|
+
if (isHovered) {
|
|
6181
|
+
import_gsap23.gsap.to(tooltipRef.current, {
|
|
6182
|
+
opacity: 1,
|
|
6183
|
+
scale: 1,
|
|
6184
|
+
duration,
|
|
6185
|
+
ease: easing
|
|
6186
|
+
});
|
|
6187
|
+
} else {
|
|
6188
|
+
import_gsap23.gsap.to(tooltipRef.current, {
|
|
6189
|
+
opacity: 0,
|
|
6190
|
+
scale: 0.9,
|
|
6191
|
+
duration: duration * 0.7,
|
|
6192
|
+
ease: "power2.inOut"
|
|
6193
|
+
});
|
|
6194
|
+
}
|
|
6195
|
+
}, [isHovered, duration, easing]);
|
|
6196
|
+
const handleMouseMove = (e) => {
|
|
6197
|
+
if (!isHovered || !tooltipRef.current) return;
|
|
6198
|
+
const moveX = e.movementX || 0;
|
|
6199
|
+
const rotateValue = Math.min(Math.max(moveX * 0.2, -15), 15);
|
|
6200
|
+
import_gsap23.gsap.to(tooltipRef.current, {
|
|
6201
|
+
x: e.clientX + offsetX,
|
|
6202
|
+
y: e.clientY + offsetY,
|
|
6203
|
+
rotationZ: rotateValue,
|
|
6204
|
+
duration: 0.6,
|
|
6205
|
+
ease: "power3.out"
|
|
6206
|
+
});
|
|
6207
|
+
import_gsap23.gsap.to(tooltipRef.current, {
|
|
6208
|
+
rotationZ: 0,
|
|
6209
|
+
duration: 0.4,
|
|
6210
|
+
delay: 0.1,
|
|
6211
|
+
ease: "power2.out"
|
|
6212
|
+
});
|
|
6213
|
+
};
|
|
6214
|
+
const styles = {
|
|
6215
|
+
wrapper: {
|
|
6216
|
+
display: "inline-block",
|
|
6217
|
+
cursor: "pointer"
|
|
6218
|
+
},
|
|
6219
|
+
tooltipCard: {
|
|
6220
|
+
position: "fixed",
|
|
6221
|
+
top: 0,
|
|
6222
|
+
left: 0,
|
|
6223
|
+
pointerEvents: "none",
|
|
6224
|
+
opacity: 0,
|
|
6225
|
+
scale: 0.9,
|
|
6226
|
+
zIndex: 9999,
|
|
6227
|
+
padding: "12px 16px",
|
|
6228
|
+
backgroundColor: bgMain,
|
|
6229
|
+
color: textMain,
|
|
6230
|
+
backdropFilter: "blur(16px)",
|
|
6231
|
+
WebkitBackdropFilter: "blur(16px)",
|
|
6232
|
+
border: `1px solid ${borderCol}`,
|
|
6233
|
+
borderRadius: "12px",
|
|
6234
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.15)",
|
|
6235
|
+
fontFamily: '"Inter", -apple-system, sans-serif',
|
|
6236
|
+
fontSize: "14px",
|
|
6237
|
+
fontWeight: "500",
|
|
6238
|
+
display: "flex",
|
|
6239
|
+
alignItems: "center",
|
|
6240
|
+
gap: "10px",
|
|
6241
|
+
willChange: "transform, opacity",
|
|
6242
|
+
transformOrigin: "top left",
|
|
6243
|
+
...style
|
|
6244
|
+
},
|
|
6245
|
+
icon: {
|
|
6246
|
+
color: accentColor,
|
|
6247
|
+
fontSize: "16px",
|
|
6248
|
+
flexShrink: 0
|
|
6249
|
+
}
|
|
6250
|
+
};
|
|
6251
|
+
return /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement(
|
|
6252
|
+
"div",
|
|
6253
|
+
{
|
|
6254
|
+
ref: containerRef,
|
|
6255
|
+
style: styles.wrapper,
|
|
6256
|
+
onMouseEnter: () => setIsHovered(true),
|
|
6257
|
+
onMouseLeave: () => setIsHovered(false),
|
|
6258
|
+
onMouseMove: handleMouseMove
|
|
6259
|
+
},
|
|
6260
|
+
children
|
|
6261
|
+
), /* @__PURE__ */ import_react23.default.createElement("div", { ref: tooltipRef, style: styles.tooltipCard }, /* @__PURE__ */ import_react23.default.createElement(import_fi20.FiInfo, { style: styles.icon }), content));
|
|
6262
|
+
};
|
|
6428
6263
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6429
6264
|
0 && (module.exports = {
|
|
6430
6265
|
AuraLogin,
|
|
@@ -6448,5 +6283,6 @@ var AuraRegister = ({
|
|
|
6448
6283
|
Spotlight,
|
|
6449
6284
|
Testimonials,
|
|
6450
6285
|
TextImage,
|
|
6451
|
-
TextWriting
|
|
6286
|
+
TextWriting,
|
|
6287
|
+
Tooltip
|
|
6452
6288
|
});
|