@moontra/moonui-pro 3.4.19 → 3.4.21

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.mjs CHANGED
@@ -79391,15 +79391,69 @@ function NavbarInternal({
79391
79391
  case "sm":
79392
79392
  return scrolled2 ? "h-12" : "h-14";
79393
79393
  case "lg":
79394
- return scrolled2 ? "h-18" : "h-20";
79394
+ return scrolled2 ? "h-16" : "h-20";
79395
79395
  case "xl":
79396
- return scrolled2 ? "h-22" : "h-24";
79396
+ return scrolled2 ? "h-20" : "h-24";
79397
79397
  case "2xl":
79398
- return scrolled2 ? "h-26" : "h-28";
79398
+ return scrolled2 ? "h-24" : "h-28";
79399
79399
  default:
79400
79400
  return scrolled2 ? "h-14" : "h-16";
79401
79401
  }
79402
79402
  };
79403
+ const getSizeClasses = () => {
79404
+ switch (size4) {
79405
+ case "sm":
79406
+ return {
79407
+ text: "text-sm",
79408
+ logoText: "text-base",
79409
+ spacing: "space-x-2",
79410
+ gap: "gap-2",
79411
+ buttonSize: "sm",
79412
+ iconSize: "h-4 w-4",
79413
+ padding: "px-2 py-1"
79414
+ };
79415
+ case "lg":
79416
+ return {
79417
+ text: "text-base",
79418
+ logoText: "text-xl",
79419
+ spacing: "space-x-4",
79420
+ gap: "gap-3",
79421
+ buttonSize: "md",
79422
+ iconSize: "h-5 w-5",
79423
+ padding: "px-3 py-2"
79424
+ };
79425
+ case "xl":
79426
+ return {
79427
+ text: "text-lg",
79428
+ logoText: "text-2xl",
79429
+ spacing: "space-x-6",
79430
+ gap: "gap-4",
79431
+ buttonSize: "lg",
79432
+ iconSize: "h-6 w-6",
79433
+ padding: "px-4 py-2.5"
79434
+ };
79435
+ case "2xl":
79436
+ return {
79437
+ text: "text-xl",
79438
+ logoText: "text-3xl",
79439
+ spacing: "space-x-8",
79440
+ gap: "gap-5",
79441
+ buttonSize: "lg",
79442
+ iconSize: "h-7 w-7",
79443
+ padding: "px-5 py-3"
79444
+ };
79445
+ default:
79446
+ return {
79447
+ text: "text-sm",
79448
+ logoText: "text-lg",
79449
+ spacing: "space-x-4",
79450
+ gap: "gap-2",
79451
+ buttonSize: "md",
79452
+ iconSize: "h-5 w-5",
79453
+ padding: "px-3 py-1.5"
79454
+ };
79455
+ }
79456
+ };
79403
79457
  const isFloatingVariant = variant === "floating-auto-hide" || variant === "floating-sticky";
79404
79458
  const navClasses = cn(
79405
79459
  "moonui-pro",
@@ -79490,23 +79544,608 @@ function NavbarInternal({
79490
79544
  framerScroll.isScrolled ? "border-b bg-background/80 backdrop-blur-xl shadow-lg" : "border-b border-transparent bg-background/95 backdrop-blur"
79491
79545
  ) : navClasses;
79492
79546
  return /* @__PURE__ */ jsxs(Fragment, { children: [
79493
- /* @__PURE__ */ jsxs(NavWrapper, { ref: navRef, className: floatingClasses, ...navMotionProps, children: [
79494
- variant === "floating-auto-hide" || variant === "floating-sticky" ? (
79495
- // Floating variants için iki katmanlı yapı (header.tsx pattern)
79496
- // IMPORTANT: container class yerine w-full kullan (Tailwind container max-width getiriyor)
79497
- /* @__PURE__ */ jsx(
79498
- "div",
79499
- {
79500
- className: cn(
79501
- "transition-all duration-300",
79502
- framerScroll.isScrolled ? "max-w-6xl mx-auto px-2 sm:px-3 lg:px-4" : "w-full px-2 sm:px-3 lg:px-4"
79503
- ),
79504
- children: /* @__PURE__ */ jsxs(
79547
+ /* @__PURE__ */ jsxs(
79548
+ NavWrapper,
79549
+ {
79550
+ ref: navRef,
79551
+ className: floatingClasses,
79552
+ ...navMotionProps,
79553
+ children: [
79554
+ variant === "floating-auto-hide" || variant === "floating-sticky" ? (
79555
+ // Floating variants için iki katmanlı yapı (header.tsx pattern)
79556
+ // IMPORTANT: container class yerine w-full kullan (Tailwind container max-width getiriyor)
79557
+ /* @__PURE__ */ jsx(
79558
+ "div",
79559
+ {
79560
+ className: cn(
79561
+ "transition-all duration-300",
79562
+ framerScroll.isScrolled ? "max-w-6xl mx-auto px-2 sm:px-3 lg:px-4" : "w-full px-2 sm:px-3 lg:px-4"
79563
+ ),
79564
+ children: /* @__PURE__ */ jsxs(
79565
+ "div",
79566
+ {
79567
+ className: cn(
79568
+ "flex items-center justify-between transition-all duration-300",
79569
+ getHeight(framerScroll.isScrolled)
79570
+ ),
79571
+ children: [
79572
+ branding && /* @__PURE__ */ jsxs(
79573
+ "div",
79574
+ {
79575
+ className: cn(
79576
+ "flex items-center gap-2",
79577
+ logoPosition === "center" && !isMobile ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
79578
+ ),
79579
+ children: [
79580
+ logoPosition === "left" && mobileMenuPosition === "left" && /* @__PURE__ */ jsx(MobileMenu, {}),
79581
+ /* @__PURE__ */ jsxs(
79582
+ "a",
79583
+ {
79584
+ href: branding.href || "/",
79585
+ onClick: (e) => {
79586
+ if (branding.href && onNavigate) {
79587
+ e.preventDefault();
79588
+ onNavigate(branding.href);
79589
+ }
79590
+ },
79591
+ className: "flex items-center gap-2",
79592
+ children: [
79593
+ /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
79594
+ motion.div,
79595
+ {
79596
+ initial: {
79597
+ opacity: 0,
79598
+ scale: 0.9
79599
+ },
79600
+ animate: {
79601
+ opacity: 1,
79602
+ scale: 1
79603
+ },
79604
+ exit: {
79605
+ opacity: 0,
79606
+ scale: 0.9
79607
+ },
79608
+ transition: {
79609
+ duration: 0.2,
79610
+ ease: "easeInOut"
79611
+ },
79612
+ children: getActiveLogo()
79613
+ },
79614
+ `logo-${framerScroll.isScrolled ? "scrolled" : "default"}-${isDarkMode ? "dark" : "light"}`
79615
+ ) }),
79616
+ /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: branding.title && !isMobile && !framerScroll.isScrolled && /* @__PURE__ */ jsx(
79617
+ motion.span,
79618
+ {
79619
+ className: cn(
79620
+ "font-semibold overflow-hidden",
79621
+ getSizeClasses().logoText
79622
+ ),
79623
+ initial: {
79624
+ opacity: 0,
79625
+ width: 0
79626
+ },
79627
+ animate: {
79628
+ opacity: 1,
79629
+ width: "auto"
79630
+ },
79631
+ exit: {
79632
+ opacity: 0,
79633
+ width: 0
79634
+ },
79635
+ transition: {
79636
+ duration: 0.2,
79637
+ ease: "easeInOut"
79638
+ },
79639
+ children: branding.title
79640
+ },
79641
+ "logo-text"
79642
+ ) })
79643
+ ]
79644
+ }
79645
+ )
79646
+ ]
79647
+ }
79648
+ ),
79649
+ !isMobile && !hideNavItems && /* @__PURE__ */ jsx(
79650
+ NavigationMenu2,
79651
+ {
79652
+ className: cn(
79653
+ "hidden md:flex",
79654
+ // Overflow handling - minimal için otomatik expand, diğerleri user tercih
79655
+ autoExpand || !isFloatingVariant && variant === "minimal" ? "flex-nowrap" : "flex-wrap overflow-x-auto scrollbar-hide scroll-smooth",
79656
+ // Positioning - floating variants
79657
+ navItemsPosition === "center" && "flex-1 justify-center mx-4",
79658
+ navItemsPosition === "right" && "ml-auto",
79659
+ navItemsPosition === "left" && "ml-4",
79660
+ // Keep position consistent in minimal mode unless centerOnScroll is enabled
79661
+ isMinimal && minimalConfig?.centerOnScroll && navItemsPosition !== "center" && "flex-1 justify-center",
79662
+ navItemsPosition === "center" && "absolute left-1/2 transform -translate-x-1/2"
79663
+ ),
79664
+ children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React71__default.Fragment, { children: section.items.map((item) => {
79665
+ const hasChildren = item.items && item.items.length > 0;
79666
+ const isActive2 = item.href === activePath;
79667
+ if (hasChildren) {
79668
+ return /* @__PURE__ */ jsxs(
79669
+ NavigationMenuItem2,
79670
+ {
79671
+ children: [
79672
+ /* @__PURE__ */ jsx(
79673
+ NavigationMenuTrigger2,
79674
+ {
79675
+ className: cn(
79676
+ isActive2 && "bg-accent text-accent-foreground",
79677
+ item.disabled && "opacity-50 cursor-not-allowed"
79678
+ ),
79679
+ disabled: item.disabled,
79680
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
79681
+ item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
79682
+ item.title
79683
+ ] })
79684
+ }
79685
+ ),
79686
+ /* @__PURE__ */ jsx(NavigationMenuContent2, { children: item.items && renderMegaMenuContent(
79687
+ item.items
79688
+ ) })
79689
+ ]
79690
+ },
79691
+ item.id
79692
+ );
79693
+ }
79694
+ return /* @__PURE__ */ jsx(
79695
+ NavigationMenuItem2,
79696
+ {
79697
+ children: /* @__PURE__ */ jsxs(
79698
+ NavigationMenuLink2,
79699
+ {
79700
+ className: cn(
79701
+ navigationMenuTriggerStyle(),
79702
+ "cursor-pointer",
79703
+ getSizeClasses().text,
79704
+ getSizeClasses().padding,
79705
+ isActive2 && "bg-accent text-accent-foreground",
79706
+ item.disabled && "opacity-50 cursor-not-allowed"
79707
+ ),
79708
+ onClick: () => !item.disabled && handleItemClick(
79709
+ item
79710
+ ),
79711
+ children: [
79712
+ /* @__PURE__ */ jsxs(
79713
+ "span",
79714
+ {
79715
+ className: cn(
79716
+ "flex items-center",
79717
+ getSizeClasses().gap
79718
+ ),
79719
+ children: [
79720
+ item.icon && /* @__PURE__ */ jsx(
79721
+ "span",
79722
+ {
79723
+ className: getSizeClasses().iconSize,
79724
+ children: item.icon
79725
+ }
79726
+ ),
79727
+ item.title
79728
+ ]
79729
+ }
79730
+ ),
79731
+ item.badge && /* @__PURE__ */ jsx(
79732
+ MoonUIBadgePro,
79733
+ {
79734
+ variant: item.badgeVariant || "secondary",
79735
+ className: "ml-2",
79736
+ children: item.badge
79737
+ }
79738
+ )
79739
+ ]
79740
+ }
79741
+ )
79742
+ },
79743
+ item.id
79744
+ );
79745
+ }) }, section.id)) })
79746
+ }
79747
+ ),
79748
+ /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-1 sm:gap-2", children: [
79749
+ showSearch && !framerScroll.isScrolled && /* @__PURE__ */ jsx(Fragment, { children: isMobile ? /* @__PURE__ */ jsx(
79750
+ MoonUIButtonPro,
79751
+ {
79752
+ variant: "ghost",
79753
+ size: "icon",
79754
+ onClick: () => setIsCommandOpen(true),
79755
+ children: /* @__PURE__ */ jsx(Search, { className: "h-5 w-5" })
79756
+ }
79757
+ ) : /* @__PURE__ */ jsxs("div", { className: "relative", children: [
79758
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
79759
+ /* @__PURE__ */ jsx(
79760
+ MoonUIInputPro,
79761
+ {
79762
+ type: "search",
79763
+ placeholder: searchPlaceholder,
79764
+ className: "w-64 pl-9 pr-4 h-9 cursor-pointer",
79765
+ value: searchValue,
79766
+ onChange: (e) => handleSearch(
79767
+ e.target.value
79768
+ ),
79769
+ onClick: () => {
79770
+ if (enableCommandAI) {
79771
+ setIsCommandOpen(
79772
+ true
79773
+ );
79774
+ onCommandAIOpen?.();
79775
+ }
79776
+ },
79777
+ readOnly: enableCommandAI
79778
+ }
79779
+ ),
79780
+ (keyboardShortcuts || enableCommandAI) && /* @__PURE__ */ jsx("kbd", { className: "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex", children: enableCommandAI ? commandAIShortcut : /* @__PURE__ */ jsxs(Fragment, { children: [
79781
+ /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
79782
+ "K"
79783
+ ] }) })
79784
+ ] }) }),
79785
+ showThemeToggle && (themeToggleVariant === "button" ? /* @__PURE__ */ jsx(
79786
+ motion.div,
79787
+ {
79788
+ whileTap: { scale: 0.95 },
79789
+ className: "relative",
79790
+ children: /* @__PURE__ */ jsx(
79791
+ MoonUIButtonPro,
79792
+ {
79793
+ variant: "ghost",
79794
+ size: getSizeClasses().buttonSize,
79795
+ onClick: () => {
79796
+ const newTheme = currentTheme === "dark" ? "light" : "dark";
79797
+ setCurrentTheme(newTheme);
79798
+ onThemeChange?.(newTheme);
79799
+ if (typeof window !== "undefined") {
79800
+ const root = window.document.documentElement;
79801
+ root.classList.remove(
79802
+ "light",
79803
+ "dark"
79804
+ );
79805
+ root.classList.add(
79806
+ newTheme
79807
+ );
79808
+ }
79809
+ },
79810
+ className: "relative overflow-hidden",
79811
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
79812
+ motion.div,
79813
+ {
79814
+ initial: {
79815
+ y: -20,
79816
+ opacity: 0
79817
+ },
79818
+ animate: {
79819
+ y: 0,
79820
+ opacity: 1
79821
+ },
79822
+ exit: {
79823
+ y: 20,
79824
+ opacity: 0
79825
+ },
79826
+ transition: {
79827
+ duration: 0.2
79828
+ },
79829
+ children: /* @__PURE__ */ jsx(
79830
+ Moon,
79831
+ {
79832
+ className: getSizeClasses().iconSize
79833
+ }
79834
+ )
79835
+ },
79836
+ "moon"
79837
+ ) : /* @__PURE__ */ jsx(
79838
+ motion.div,
79839
+ {
79840
+ initial: {
79841
+ y: -20,
79842
+ opacity: 0,
79843
+ rotate: -90
79844
+ },
79845
+ animate: {
79846
+ y: 0,
79847
+ opacity: 1,
79848
+ rotate: 0
79849
+ },
79850
+ exit: {
79851
+ y: 20,
79852
+ opacity: 0,
79853
+ rotate: 90
79854
+ },
79855
+ transition: {
79856
+ duration: 0.2
79857
+ },
79858
+ children: /* @__PURE__ */ jsx(
79859
+ Sun,
79860
+ {
79861
+ className: getSizeClasses().iconSize
79862
+ }
79863
+ )
79864
+ },
79865
+ "sun"
79866
+ ) })
79867
+ }
79868
+ )
79869
+ }
79870
+ ) : /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
79871
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
79872
+ MoonUIButtonPro,
79873
+ {
79874
+ variant: "ghost",
79875
+ size: "icon",
79876
+ children: [
79877
+ currentTheme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
79878
+ currentTheme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
79879
+ currentTheme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
79880
+ ]
79881
+ }
79882
+ ) }),
79883
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
79884
+ /* @__PURE__ */ jsxs(
79885
+ MoonUIDropdownMenuItemPro,
79886
+ {
79887
+ onClick: () => {
79888
+ setCurrentTheme(
79889
+ "light"
79890
+ );
79891
+ onThemeChange?.(
79892
+ "light"
79893
+ );
79894
+ },
79895
+ children: [
79896
+ /* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
79897
+ "Light"
79898
+ ]
79899
+ }
79900
+ ),
79901
+ /* @__PURE__ */ jsxs(
79902
+ MoonUIDropdownMenuItemPro,
79903
+ {
79904
+ onClick: () => {
79905
+ setCurrentTheme("dark");
79906
+ onThemeChange?.("dark");
79907
+ },
79908
+ children: [
79909
+ /* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
79910
+ "Dark"
79911
+ ]
79912
+ }
79913
+ ),
79914
+ /* @__PURE__ */ jsxs(
79915
+ MoonUIDropdownMenuItemPro,
79916
+ {
79917
+ onClick: () => {
79918
+ setCurrentTheme(
79919
+ "system"
79920
+ );
79921
+ onThemeChange?.(
79922
+ "system"
79923
+ );
79924
+ },
79925
+ children: [
79926
+ /* @__PURE__ */ jsx(Monitor, { className: "mr-2 h-4 w-4" }),
79927
+ "System"
79928
+ ]
79929
+ }
79930
+ )
79931
+ ] })
79932
+ ] })),
79933
+ notifications && !framerScroll.isScrolled && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
79934
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
79935
+ MoonUIButtonPro,
79936
+ {
79937
+ variant: "ghost",
79938
+ size: "icon",
79939
+ className: "relative",
79940
+ children: [
79941
+ /* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
79942
+ notifications.count && notifications.count > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1", children: notifications.count > 9 ? "9+" : notifications.count })
79943
+ ]
79944
+ }
79945
+ ) }),
79946
+ /* @__PURE__ */ jsxs(
79947
+ MoonUIDropdownMenuContentPro,
79948
+ {
79949
+ align: "end",
79950
+ className: "w-[380px] p-0",
79951
+ sideOffset: 8,
79952
+ children: [
79953
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b", children: [
79954
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
79955
+ /* @__PURE__ */ jsx("h4", { className: "text-base font-semibold", children: "Notifications" }),
79956
+ notifications.count && notifications.count > 0 && /* @__PURE__ */ jsxs(
79957
+ MoonUIBadgePro,
79958
+ {
79959
+ variant: "secondary",
79960
+ className: "h-5 px-2 rounded-full bg-primary/10 text-primary border-0",
79961
+ children: [
79962
+ notifications.count,
79963
+ " ",
79964
+ "new"
79965
+ ]
79966
+ }
79967
+ )
79968
+ ] }),
79969
+ notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx(
79970
+ MoonUIButtonPro,
79971
+ {
79972
+ variant: "ghost",
79973
+ size: "sm",
79974
+ className: "text-xs h-7 px-2 text-muted-foreground hover:text-foreground",
79975
+ onClick: (e) => {
79976
+ e.preventDefault();
79977
+ console.log(
79978
+ "Mark all as read"
79979
+ );
79980
+ },
79981
+ children: "Mark all read"
79982
+ }
79983
+ )
79984
+ ] }),
79985
+ /* @__PURE__ */ jsx("div", { className: "max-h-[400px] overflow-y-auto", children: notifications.items && notifications.items.length > 0 ? /* @__PURE__ */ jsx("div", { className: "py-1", children: notifications.items.map(
79986
+ (notification, index2) => /* @__PURE__ */ jsxs(
79987
+ "div",
79988
+ {
79989
+ children: [
79990
+ /* @__PURE__ */ jsx(
79991
+ "button",
79992
+ {
79993
+ className: cn(
79994
+ "w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors",
79995
+ "focus:outline-none focus:bg-muted/50",
79996
+ !notification.read && "bg-primary/5 hover:bg-primary/10"
79997
+ ),
79998
+ onClick: () => notifications.onNotificationClick?.(
79999
+ notification.id
80000
+ ),
80001
+ children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
80002
+ /* @__PURE__ */ jsx("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx(
80003
+ "div",
80004
+ {
80005
+ className: cn(
80006
+ "h-2 w-2 rounded-full",
80007
+ !notification.read ? "bg-primary" : "bg-transparent"
80008
+ )
80009
+ }
80010
+ ) }),
80011
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
80012
+ /* @__PURE__ */ jsx(
80013
+ "p",
80014
+ {
80015
+ className: cn(
80016
+ "text-sm leading-tight",
80017
+ !notification.read ? "font-medium" : "font-normal"
80018
+ ),
80019
+ children: notification.title
80020
+ }
80021
+ ),
80022
+ notification.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: notification.description }),
80023
+ notification.time && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: notification.time })
80024
+ ] })
80025
+ ] })
80026
+ }
80027
+ ),
80028
+ index2 < (notifications.items?.length || 0) - 1 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-b" })
80029
+ ]
80030
+ },
80031
+ notification.id
80032
+ )
80033
+ ) }) : /* @__PURE__ */ jsxs("div", { className: "py-12 text-center", children: [
80034
+ /* @__PURE__ */ jsx(Bell, { className: "h-10 w-10 mx-auto text-muted-foreground/30 mb-3" }),
80035
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "No new notifications" }),
80036
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: "You're all caught up!" })
80037
+ ] }) }),
80038
+ notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx(
80039
+ MoonUIButtonPro,
80040
+ {
80041
+ variant: "ghost",
80042
+ className: "w-full h-8 text-xs text-muted-foreground hover:text-foreground",
80043
+ onClick: (e) => {
80044
+ e.preventDefault();
80045
+ console.log(
80046
+ "View all notifications"
80047
+ );
80048
+ },
80049
+ children: "View all notifications"
80050
+ }
80051
+ ) })
80052
+ ]
80053
+ }
80054
+ )
80055
+ ] }),
80056
+ cta && !framerScroll.isScrolled && /* @__PURE__ */ jsx(
80057
+ MoonUIButtonPro,
80058
+ {
80059
+ variant: cta.variant || "primary",
80060
+ size: isMobile ? "sm" : getSizeClasses().buttonSize,
80061
+ onClick: () => {
80062
+ if (cta.action) {
80063
+ cta.action();
80064
+ } else if (cta.href) {
80065
+ if (cta.href.startsWith("#")) {
80066
+ const targetElement = document.querySelector(
80067
+ cta.href
80068
+ );
80069
+ if (targetElement) {
80070
+ targetElement.scrollIntoView(
80071
+ {
80072
+ behavior: "smooth",
80073
+ block: "start"
80074
+ }
80075
+ );
80076
+ }
80077
+ } else if (onNavigate) {
80078
+ onNavigate(cta.href);
80079
+ } else {
80080
+ window.location.href = cta.href;
80081
+ }
80082
+ }
80083
+ },
80084
+ className: !isMobile ? "ml-2" : "",
80085
+ children: cta.text
80086
+ }
80087
+ ),
80088
+ userMenu && !framerScroll.isScrolled && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
80089
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
80090
+ MoonUIButtonPro,
80091
+ {
80092
+ variant: "ghost",
80093
+ size: "icon",
80094
+ className: "relative",
80095
+ children: /* @__PURE__ */ jsxs(MoonUIAvatarPro, { className: "h-8 w-8", children: [
80096
+ /* @__PURE__ */ jsx(
80097
+ MoonUIAvatarImagePro,
80098
+ {
80099
+ src: userMenu.user?.avatar,
80100
+ alt: userMenu.user?.name
80101
+ }
80102
+ ),
80103
+ /* @__PURE__ */ jsx(MoonUIAvatarFallbackPro, { children: userMenu.user?.name?.charAt(
80104
+ 0
80105
+ ) || /* @__PURE__ */ jsx(User, { className: "h-4 w-4" }) })
80106
+ ] })
80107
+ }
80108
+ ) }),
80109
+ /* @__PURE__ */ jsxs(
80110
+ MoonUIDropdownMenuContentPro,
80111
+ {
80112
+ align: "end",
80113
+ className: "w-56",
80114
+ children: [
80115
+ userMenu.user && /* @__PURE__ */ jsxs(Fragment, { children: [
80116
+ /* @__PURE__ */ jsxs("div", { className: "p-2", children: [
80117
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: userMenu.user.name }),
80118
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: userMenu.user.email })
80119
+ ] }),
80120
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {})
80121
+ ] }),
80122
+ userMenu.items && renderDropdownMenu(
80123
+ userMenu.items
80124
+ )
80125
+ ]
80126
+ }
80127
+ )
80128
+ ] })
80129
+ ] })
80130
+ ]
80131
+ }
80132
+ )
80133
+ }
80134
+ )
80135
+ ) : (
80136
+ // Diğer variants için tek div
80137
+ /* @__PURE__ */ jsxs(
79505
80138
  "div",
79506
80139
  {
79507
80140
  className: cn(
79508
- "flex items-center space-x-4 sm:justify-between sm:space-x-0 transition-all duration-300",
79509
- getHeight(framerScroll.isScrolled)
80141
+ "flex items-center transition-all duration-300 ease-in-out",
80142
+ "transition-[height] duration-300 ease-in-out",
80143
+ getHeight(),
80144
+ // floating-centered için özel logic - outer nav zaten max-width kontrol ediyor
80145
+ variant === "floating-centered" ? "w-full px-6" : (
80146
+ // minimal variant için tam genişlik (menu'ler yayılsın)
80147
+ variant === "minimal" ? "w-full px-4 sm:px-6 lg:px-8" : fullWidth ? "w-full px-4 sm:px-6 lg:px-8" : maxWidth === "sm" && "container max-w-screen-sm" || maxWidth === "md" && "container max-w-screen-md" || maxWidth === "lg" && "container max-w-screen-lg" || maxWidth === "xl" && "container max-w-screen-xl" || maxWidth === "2xl" && "container max-w-screen-2xl" || maxWidth === "full" && "w-full px-4 sm:px-6 lg:px-8"
80148
+ )
79510
80149
  ),
79511
80150
  children: [
79512
80151
  branding && /* @__PURE__ */ jsxs(
@@ -79514,7 +80153,7 @@ function NavbarInternal({
79514
80153
  {
79515
80154
  className: cn(
79516
80155
  "flex items-center gap-2",
79517
- logoPosition === "center" && !isMobile ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
80156
+ logoPosition === "center" && !isMobile && variant !== "floating-centered" ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
79518
80157
  ),
79519
80158
  children: [
79520
80159
  logoPosition === "left" && mobileMenuPosition === "left" && /* @__PURE__ */ jsx(MobileMenu, {}),
@@ -79536,7 +80175,10 @@ function NavbarInternal({
79536
80175
  initial: { opacity: 0, scale: 0.9 },
79537
80176
  animate: { opacity: 1, scale: 1 },
79538
80177
  exit: { opacity: 0, scale: 0.9 },
79539
- transition: { duration: 0.2, ease: "easeInOut" },
80178
+ transition: {
80179
+ duration: 0.2,
80180
+ ease: "easeInOut"
80181
+ },
79540
80182
  children: getActiveLogo()
79541
80183
  },
79542
80184
  `logo-${framerScroll.isScrolled ? "scrolled" : "default"}-${isDarkMode ? "dark" : "light"}`
@@ -79544,11 +80186,26 @@ function NavbarInternal({
79544
80186
  /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: branding.title && !isMobile && !framerScroll.isScrolled && /* @__PURE__ */ jsx(
79545
80187
  motion.span,
79546
80188
  {
79547
- className: "font-semibold text-lg overflow-hidden",
79548
- initial: { opacity: 0, width: 0 },
79549
- animate: { opacity: 1, width: "auto" },
79550
- exit: { opacity: 0, width: 0 },
79551
- transition: { duration: 0.2, ease: "easeInOut" },
80189
+ className: cn(
80190
+ "font-semibold overflow-hidden",
80191
+ getSizeClasses().logoText
80192
+ ),
80193
+ initial: {
80194
+ opacity: 0,
80195
+ width: 0
80196
+ },
80197
+ animate: {
80198
+ opacity: 1,
80199
+ width: "auto"
80200
+ },
80201
+ exit: {
80202
+ opacity: 0,
80203
+ width: 0
80204
+ },
80205
+ transition: {
80206
+ duration: 0.2,
80207
+ ease: "easeInOut"
80208
+ },
79552
80209
  children: branding.title
79553
80210
  },
79554
80211
  "logo-text"
@@ -79564,84 +80221,113 @@ function NavbarInternal({
79564
80221
  {
79565
80222
  className: cn(
79566
80223
  "hidden md:flex",
80224
+ // Minimal için tam genişlik + spacing
80225
+ variant === "minimal" && "flex-1 w-full",
79567
80226
  // Overflow handling - minimal için otomatik expand, diğerleri user tercih
79568
80227
  autoExpand || !isFloatingVariant && variant === "minimal" ? "flex-nowrap" : "flex-wrap overflow-x-auto scrollbar-hide scroll-smooth",
79569
- // Positioning - floating variants
79570
- navItemsPosition === "center" && "flex-1 justify-center mx-4",
80228
+ // Positioning
80229
+ navItemsPosition === "center" && variant !== "floating-centered" && "flex-1 justify-center mx-4",
80230
+ navItemsPosition === "center" && variant === "floating-centered" && "flex-1 justify-center",
79571
80231
  navItemsPosition === "right" && "ml-auto",
79572
80232
  navItemsPosition === "left" && "ml-4",
79573
80233
  // Keep position consistent in minimal mode unless centerOnScroll is enabled
79574
80234
  isMinimal && minimalConfig?.centerOnScroll && navItemsPosition !== "center" && "flex-1 justify-center",
79575
- navItemsPosition === "center" && "absolute left-1/2 transform -translate-x-1/2"
80235
+ navItemsPosition === "center" && variant !== "floating-centered" && "absolute left-1/2 transform -translate-x-1/2"
79576
80236
  ),
79577
- children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React71__default.Fragment, { children: section.items.map((item) => {
79578
- const hasChildren = item.items && item.items.length > 0;
79579
- const isActive2 = item.href === activePath;
79580
- if (hasChildren) {
79581
- return /* @__PURE__ */ jsxs(
79582
- NavigationMenuItem2,
79583
- {
79584
- children: [
79585
- /* @__PURE__ */ jsx(
79586
- NavigationMenuTrigger2,
80237
+ children: /* @__PURE__ */ jsx(
80238
+ NavigationMenuList2,
80239
+ {
80240
+ className: cn(
80241
+ // Minimal için item'ları yay
80242
+ variant === "minimal" && "w-full justify-between gap-1"
80243
+ ),
80244
+ children: sections.map((section) => /* @__PURE__ */ jsx(React71__default.Fragment, { children: section.items.map((item) => {
80245
+ const hasChildren = item.items && item.items.length > 0;
80246
+ const isActive2 = item.href === activePath;
80247
+ if (hasChildren) {
80248
+ return /* @__PURE__ */ jsxs(
80249
+ NavigationMenuItem2,
80250
+ {
80251
+ children: [
80252
+ /* @__PURE__ */ jsx(
80253
+ NavigationMenuTrigger2,
80254
+ {
80255
+ className: cn(
80256
+ isActive2 && "bg-accent text-accent-foreground",
80257
+ item.disabled && "opacity-50 cursor-not-allowed"
80258
+ ),
80259
+ disabled: item.disabled,
80260
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
80261
+ item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
80262
+ item.title
80263
+ ] })
80264
+ }
80265
+ ),
80266
+ /* @__PURE__ */ jsx(NavigationMenuContent2, { children: item.items && renderMegaMenuContent(
80267
+ item.items
80268
+ ) })
80269
+ ]
80270
+ },
80271
+ item.id
80272
+ );
80273
+ }
80274
+ return /* @__PURE__ */ jsx(
80275
+ NavigationMenuItem2,
80276
+ {
80277
+ children: /* @__PURE__ */ jsxs(
80278
+ NavigationMenuLink2,
79587
80279
  {
79588
80280
  className: cn(
80281
+ navigationMenuTriggerStyle(),
80282
+ "cursor-pointer",
80283
+ getSizeClasses().text,
80284
+ getSizeClasses().padding,
79589
80285
  isActive2 && "bg-accent text-accent-foreground",
79590
80286
  item.disabled && "opacity-50 cursor-not-allowed"
79591
80287
  ),
79592
- disabled: item.disabled,
79593
- children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
79594
- item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
79595
- item.title
79596
- ] })
80288
+ onClick: () => !item.disabled && handleItemClick(
80289
+ item
80290
+ ),
80291
+ children: [
80292
+ /* @__PURE__ */ jsxs(
80293
+ "span",
80294
+ {
80295
+ className: cn(
80296
+ "flex items-center",
80297
+ getSizeClasses().gap
80298
+ ),
80299
+ children: [
80300
+ item.icon && /* @__PURE__ */ jsx(
80301
+ "span",
80302
+ {
80303
+ className: getSizeClasses().iconSize,
80304
+ children: item.icon
80305
+ }
80306
+ ),
80307
+ item.title
80308
+ ]
80309
+ }
80310
+ ),
80311
+ item.badge && /* @__PURE__ */ jsx(
80312
+ MoonUIBadgePro,
80313
+ {
80314
+ variant: item.badgeVariant || "secondary",
80315
+ className: "ml-2",
80316
+ children: item.badge
80317
+ }
80318
+ )
80319
+ ]
79597
80320
  }
79598
- ),
79599
- /* @__PURE__ */ jsx(NavigationMenuContent2, { children: item.items && renderMegaMenuContent(
79600
- item.items
79601
- ) })
79602
- ]
79603
- },
79604
- item.id
79605
- );
80321
+ )
80322
+ },
80323
+ item.id
80324
+ );
80325
+ }) }, section.id))
79606
80326
  }
79607
- return /* @__PURE__ */ jsx(
79608
- NavigationMenuItem2,
79609
- {
79610
- children: /* @__PURE__ */ jsxs(
79611
- NavigationMenuLink2,
79612
- {
79613
- className: cn(
79614
- navigationMenuTriggerStyle(),
79615
- "cursor-pointer",
79616
- isActive2 && "bg-accent text-accent-foreground",
79617
- item.disabled && "opacity-50 cursor-not-allowed"
79618
- ),
79619
- onClick: () => !item.disabled && handleItemClick(
79620
- item
79621
- ),
79622
- children: [
79623
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
79624
- item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
79625
- item.title
79626
- ] }),
79627
- item.badge && /* @__PURE__ */ jsx(
79628
- MoonUIBadgePro,
79629
- {
79630
- variant: item.badgeVariant || "secondary",
79631
- className: "ml-2",
79632
- children: item.badge
79633
- }
79634
- )
79635
- ]
79636
- }
79637
- )
79638
- },
79639
- item.id
79640
- );
79641
- }) }, section.id)) })
80327
+ )
79642
80328
  }
79643
80329
  ),
79644
- /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
80330
+ /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-1 sm:gap-2", children: [
79645
80331
  showSearch && !framerScroll.isScrolled && /* @__PURE__ */ jsx(Fragment, { children: isMobile ? /* @__PURE__ */ jsx(
79646
80332
  MoonUIButtonPro,
79647
80333
  {
@@ -79683,36 +80369,76 @@ function NavbarInternal({
79683
80369
  MoonUIButtonPro,
79684
80370
  {
79685
80371
  variant: "ghost",
79686
- size: "icon",
80372
+ size: getSizeClasses().buttonSize,
79687
80373
  onClick: () => {
79688
80374
  const newTheme = currentTheme === "dark" ? "light" : "dark";
79689
80375
  setCurrentTheme(newTheme);
79690
80376
  onThemeChange?.(newTheme);
79691
80377
  if (typeof window !== "undefined") {
79692
80378
  const root = window.document.documentElement;
79693
- root.classList.remove("light", "dark");
79694
- root.classList.add(newTheme);
80379
+ root.classList.remove(
80380
+ "light",
80381
+ "dark"
80382
+ );
80383
+ root.classList.add(
80384
+ newTheme
80385
+ );
79695
80386
  }
79696
80387
  },
79697
80388
  className: "relative overflow-hidden",
79698
80389
  children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
79699
80390
  motion.div,
79700
80391
  {
79701
- initial: { y: -20, opacity: 0 },
79702
- animate: { y: 0, opacity: 1 },
79703
- exit: { y: 20, opacity: 0 },
79704
- transition: { duration: 0.2 },
79705
- children: /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" })
80392
+ initial: {
80393
+ y: -20,
80394
+ opacity: 0
80395
+ },
80396
+ animate: {
80397
+ y: 0,
80398
+ opacity: 1
80399
+ },
80400
+ exit: {
80401
+ y: 20,
80402
+ opacity: 0
80403
+ },
80404
+ transition: {
80405
+ duration: 0.2
80406
+ },
80407
+ children: /* @__PURE__ */ jsx(
80408
+ Moon,
80409
+ {
80410
+ className: getSizeClasses().iconSize
80411
+ }
80412
+ )
79706
80413
  },
79707
80414
  "moon"
79708
80415
  ) : /* @__PURE__ */ jsx(
79709
80416
  motion.div,
79710
80417
  {
79711
- initial: { y: -20, opacity: 0, rotate: -90 },
79712
- animate: { y: 0, opacity: 1, rotate: 0 },
79713
- exit: { y: 20, opacity: 0, rotate: 90 },
79714
- transition: { duration: 0.2 },
79715
- children: /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" })
80418
+ initial: {
80419
+ y: -20,
80420
+ opacity: 0,
80421
+ rotate: -90
80422
+ },
80423
+ animate: {
80424
+ y: 0,
80425
+ opacity: 1,
80426
+ rotate: 0
80427
+ },
80428
+ exit: {
80429
+ y: 20,
80430
+ opacity: 0,
80431
+ rotate: 90
80432
+ },
80433
+ transition: {
80434
+ duration: 0.2
80435
+ },
80436
+ children: /* @__PURE__ */ jsx(
80437
+ Sun,
80438
+ {
80439
+ className: getSizeClasses().iconSize
80440
+ }
80441
+ )
79716
80442
  },
79717
80443
  "sun"
79718
80444
  ) })
@@ -79894,18 +80620,22 @@ function NavbarInternal({
79894
80620
  MoonUIButtonPro,
79895
80621
  {
79896
80622
  variant: cta.variant || "primary",
79897
- size: "sm",
80623
+ size: isMobile ? "sm" : getSizeClasses().buttonSize,
79898
80624
  onClick: () => {
79899
80625
  if (cta.action) {
79900
80626
  cta.action();
79901
80627
  } else if (cta.href) {
79902
80628
  if (cta.href.startsWith("#")) {
79903
- const targetElement = document.querySelector(cta.href);
80629
+ const targetElement = document.querySelector(
80630
+ cta.href
80631
+ );
79904
80632
  if (targetElement) {
79905
- targetElement.scrollIntoView({
79906
- behavior: "smooth",
79907
- block: "start"
79908
- });
80633
+ targetElement.scrollIntoView(
80634
+ {
80635
+ behavior: "smooth",
80636
+ block: "start"
80637
+ }
80638
+ );
79909
80639
  }
79910
80640
  } else if (onNavigate) {
79911
80641
  onNavigate(cta.href);
@@ -79961,544 +80691,64 @@ function NavbarInternal({
79961
80691
  ]
79962
80692
  }
79963
80693
  )
79964
- }
79965
- )
79966
- ) : (
79967
- // Diğer variants için tek div
79968
- /* @__PURE__ */ jsxs(
79969
- "div",
79970
- {
79971
- className: cn(
79972
- "flex items-center transition-all duration-300 ease-in-out",
79973
- "transition-[height] duration-300 ease-in-out",
79974
- getHeight(),
79975
- // floating-centered için özel logic - outer nav zaten max-width kontrol ediyor
79976
- variant === "floating-centered" ? "w-full px-6" : (
79977
- // minimal variant için tam genişlik (menu'ler yayılsın)
79978
- variant === "minimal" ? "w-full px-4 sm:px-6 lg:px-8" : fullWidth ? "w-full px-4 sm:px-6 lg:px-8" : maxWidth === "sm" && "container max-w-screen-sm" || maxWidth === "md" && "container max-w-screen-md" || maxWidth === "lg" && "container max-w-screen-lg" || maxWidth === "xl" && "container max-w-screen-xl" || maxWidth === "2xl" && "container max-w-screen-2xl" || maxWidth === "full" && "w-full px-4 sm:px-6 lg:px-8"
79979
- )
79980
- ),
79981
- children: [
79982
- branding && /* @__PURE__ */ jsxs(
79983
- "div",
79984
- {
79985
- className: cn(
79986
- "flex items-center gap-2",
79987
- logoPosition === "center" && !isMobile && variant !== "floating-centered" ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
79988
- ),
79989
- children: [
79990
- logoPosition === "left" && mobileMenuPosition === "left" && /* @__PURE__ */ jsx(MobileMenu, {}),
79991
- /* @__PURE__ */ jsxs(
79992
- "a",
79993
- {
79994
- href: branding.href || "/",
79995
- onClick: (e) => {
79996
- if (branding.href && onNavigate) {
79997
- e.preventDefault();
79998
- onNavigate(branding.href);
79999
- }
80000
- },
80001
- className: "flex items-center gap-2",
80002
- children: [
80003
- /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
80004
- motion.div,
80005
- {
80006
- initial: { opacity: 0, scale: 0.9 },
80007
- animate: { opacity: 1, scale: 1 },
80008
- exit: { opacity: 0, scale: 0.9 },
80009
- transition: { duration: 0.2, ease: "easeInOut" },
80010
- children: getActiveLogo()
80011
- },
80012
- `logo-${framerScroll.isScrolled ? "scrolled" : "default"}-${isDarkMode ? "dark" : "light"}`
80013
- ) }),
80014
- /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: branding.title && !isMobile && !framerScroll.isScrolled && /* @__PURE__ */ jsx(
80015
- motion.span,
80016
- {
80017
- className: "font-semibold text-lg overflow-hidden",
80018
- initial: { opacity: 0, width: 0 },
80019
- animate: { opacity: 1, width: "auto" },
80020
- exit: { opacity: 0, width: 0 },
80021
- transition: { duration: 0.2, ease: "easeInOut" },
80022
- children: branding.title
80023
- },
80024
- "logo-text"
80025
- ) })
80026
- ]
80027
- }
80028
- )
80029
- ]
80030
- }
80031
- ),
80032
- !isMobile && !hideNavItems && /* @__PURE__ */ jsx(
80033
- NavigationMenu2,
80034
- {
80035
- className: cn(
80036
- "hidden md:flex",
80037
- // Minimal için tam genişlik + spacing
80038
- variant === "minimal" && "flex-1 w-full",
80039
- // Overflow handling - minimal için otomatik expand, diğerleri user tercih
80040
- autoExpand || !isFloatingVariant && variant === "minimal" ? "flex-nowrap" : "flex-wrap overflow-x-auto scrollbar-hide scroll-smooth",
80041
- // Positioning
80042
- navItemsPosition === "center" && variant !== "floating-centered" && "flex-1 justify-center mx-4",
80043
- navItemsPosition === "center" && variant === "floating-centered" && "flex-1 justify-center",
80044
- navItemsPosition === "right" && "ml-auto",
80045
- navItemsPosition === "left" && "ml-4",
80046
- // Keep position consistent in minimal mode unless centerOnScroll is enabled
80047
- isMinimal && minimalConfig?.centerOnScroll && navItemsPosition !== "center" && "flex-1 justify-center",
80048
- navItemsPosition === "center" && variant !== "floating-centered" && "absolute left-1/2 transform -translate-x-1/2"
80049
- ),
80050
- children: /* @__PURE__ */ jsx(
80051
- NavigationMenuList2,
80052
- {
80053
- className: cn(
80054
- // Minimal için item'ları yay
80055
- variant === "minimal" && "w-full justify-between gap-1"
80056
- ),
80057
- children: sections.map((section) => /* @__PURE__ */ jsx(React71__default.Fragment, { children: section.items.map((item) => {
80058
- const hasChildren = item.items && item.items.length > 0;
80059
- const isActive2 = item.href === activePath;
80060
- if (hasChildren) {
80061
- return /* @__PURE__ */ jsxs(
80062
- NavigationMenuItem2,
80063
- {
80064
- children: [
80065
- /* @__PURE__ */ jsx(
80066
- NavigationMenuTrigger2,
80067
- {
80068
- className: cn(
80069
- isActive2 && "bg-accent text-accent-foreground",
80070
- item.disabled && "opacity-50 cursor-not-allowed"
80071
- ),
80072
- disabled: item.disabled,
80073
- children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
80074
- item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
80075
- item.title
80076
- ] })
80077
- }
80078
- ),
80079
- /* @__PURE__ */ jsx(NavigationMenuContent2, { children: item.items && renderMegaMenuContent(
80080
- item.items
80081
- ) })
80082
- ]
80083
- },
80084
- item.id
80085
- );
80086
- }
80087
- return /* @__PURE__ */ jsx(
80088
- NavigationMenuItem2,
80089
- {
80090
- children: /* @__PURE__ */ jsxs(
80091
- NavigationMenuLink2,
80092
- {
80093
- className: cn(
80094
- navigationMenuTriggerStyle(),
80095
- "cursor-pointer",
80096
- isActive2 && "bg-accent text-accent-foreground",
80097
- item.disabled && "opacity-50 cursor-not-allowed"
80098
- ),
80099
- onClick: () => !item.disabled && handleItemClick(
80100
- item
80101
- ),
80102
- children: [
80103
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
80104
- item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
80105
- item.title
80106
- ] }),
80107
- item.badge && /* @__PURE__ */ jsx(
80108
- MoonUIBadgePro,
80109
- {
80110
- variant: item.badgeVariant || "secondary",
80111
- className: "ml-2",
80112
- children: item.badge
80113
- }
80114
- )
80115
- ]
80116
- }
80117
- )
80118
- },
80119
- item.id
80120
- );
80121
- }) }, section.id))
80122
- }
80123
- )
80124
- }
80125
- ),
80126
- /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
80127
- showSearch && !framerScroll.isScrolled && /* @__PURE__ */ jsx(Fragment, { children: isMobile ? /* @__PURE__ */ jsx(
80128
- MoonUIButtonPro,
80129
- {
80130
- variant: "ghost",
80131
- size: "icon",
80132
- onClick: () => setIsCommandOpen(true),
80133
- children: /* @__PURE__ */ jsx(Search, { className: "h-5 w-5" })
80134
- }
80135
- ) : /* @__PURE__ */ jsxs("div", { className: "relative", children: [
80136
- /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
80137
- /* @__PURE__ */ jsx(
80138
- MoonUIInputPro,
80139
- {
80140
- type: "search",
80141
- placeholder: searchPlaceholder,
80142
- className: "w-64 pl-9 pr-4 h-9 cursor-pointer",
80143
- value: searchValue,
80144
- onChange: (e) => handleSearch(e.target.value),
80145
- onClick: () => {
80146
- if (enableCommandAI) {
80147
- setIsCommandOpen(true);
80148
- onCommandAIOpen?.();
80149
- }
80150
- },
80151
- readOnly: enableCommandAI
80152
- }
80153
- ),
80154
- (keyboardShortcuts || enableCommandAI) && /* @__PURE__ */ jsx("kbd", { className: "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex", children: enableCommandAI ? commandAIShortcut : /* @__PURE__ */ jsxs(Fragment, { children: [
80155
- /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
80156
- "K"
80157
- ] }) })
80158
- ] }) }),
80159
- showThemeToggle && (themeToggleVariant === "button" ? /* @__PURE__ */ jsx(
80160
- motion.div,
80161
- {
80162
- whileTap: { scale: 0.95 },
80163
- className: "relative",
80164
- children: /* @__PURE__ */ jsx(
80165
- MoonUIButtonPro,
80166
- {
80167
- variant: "ghost",
80168
- size: "icon",
80169
- onClick: () => {
80170
- const newTheme = currentTheme === "dark" ? "light" : "dark";
80171
- setCurrentTheme(newTheme);
80172
- onThemeChange?.(newTheme);
80173
- if (typeof window !== "undefined") {
80174
- const root = window.document.documentElement;
80175
- root.classList.remove("light", "dark");
80176
- root.classList.add(newTheme);
80177
- }
80178
- },
80179
- className: "relative overflow-hidden",
80180
- children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
80181
- motion.div,
80182
- {
80183
- initial: { y: -20, opacity: 0 },
80184
- animate: { y: 0, opacity: 1 },
80185
- exit: { y: 20, opacity: 0 },
80186
- transition: { duration: 0.2 },
80187
- children: /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" })
80188
- },
80189
- "moon"
80190
- ) : /* @__PURE__ */ jsx(
80191
- motion.div,
80192
- {
80193
- initial: { y: -20, opacity: 0, rotate: -90 },
80194
- animate: { y: 0, opacity: 1, rotate: 0 },
80195
- exit: { y: 20, opacity: 0, rotate: 90 },
80196
- transition: { duration: 0.2 },
80197
- children: /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" })
80198
- },
80199
- "sun"
80200
- ) })
80201
- }
80202
- )
80203
- }
80204
- ) : /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
80205
- /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", children: [
80206
- currentTheme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
80207
- currentTheme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
80208
- currentTheme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
80209
- ] }) }),
80210
- /* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
80211
- /* @__PURE__ */ jsxs(
80212
- MoonUIDropdownMenuItemPro,
80213
- {
80214
- onClick: () => {
80215
- setCurrentTheme("light");
80216
- onThemeChange?.("light");
80217
- },
80218
- children: [
80219
- /* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
80220
- "Light"
80221
- ]
80222
- }
80223
- ),
80224
- /* @__PURE__ */ jsxs(
80225
- MoonUIDropdownMenuItemPro,
80226
- {
80227
- onClick: () => {
80228
- setCurrentTheme("dark");
80229
- onThemeChange?.("dark");
80230
- },
80231
- children: [
80232
- /* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
80233
- "Dark"
80234
- ]
80235
- }
80236
- ),
80237
- /* @__PURE__ */ jsxs(
80238
- MoonUIDropdownMenuItemPro,
80239
- {
80240
- onClick: () => {
80241
- setCurrentTheme("system");
80242
- onThemeChange?.("system");
80243
- },
80244
- children: [
80245
- /* @__PURE__ */ jsx(Monitor, { className: "mr-2 h-4 w-4" }),
80246
- "System"
80247
- ]
80248
- }
80249
- )
80250
- ] })
80251
- ] })),
80252
- notifications && !framerScroll.isScrolled && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
80253
- /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
80254
- MoonUIButtonPro,
80255
- {
80256
- variant: "ghost",
80257
- size: "icon",
80258
- className: "relative",
80259
- children: [
80260
- /* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
80261
- notifications.count && notifications.count > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1", children: notifications.count > 9 ? "9+" : notifications.count })
80262
- ]
80263
- }
80264
- ) }),
80265
- /* @__PURE__ */ jsxs(
80266
- MoonUIDropdownMenuContentPro,
80267
- {
80268
- align: "end",
80269
- className: "w-[380px] p-0",
80270
- sideOffset: 8,
80271
- children: [
80272
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b", children: [
80273
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
80274
- /* @__PURE__ */ jsx("h4", { className: "text-base font-semibold", children: "Notifications" }),
80275
- notifications.count && notifications.count > 0 && /* @__PURE__ */ jsxs(
80276
- MoonUIBadgePro,
80277
- {
80278
- variant: "secondary",
80279
- className: "h-5 px-2 rounded-full bg-primary/10 text-primary border-0",
80280
- children: [
80281
- notifications.count,
80282
- " ",
80283
- "new"
80284
- ]
80285
- }
80286
- )
80287
- ] }),
80288
- notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx(
80289
- MoonUIButtonPro,
80290
- {
80291
- variant: "ghost",
80292
- size: "sm",
80293
- className: "text-xs h-7 px-2 text-muted-foreground hover:text-foreground",
80294
- onClick: (e) => {
80295
- e.preventDefault();
80296
- console.log(
80297
- "Mark all as read"
80298
- );
80299
- },
80300
- children: "Mark all read"
80301
- }
80302
- )
80303
- ] }),
80304
- /* @__PURE__ */ jsx("div", { className: "max-h-[400px] overflow-y-auto", children: notifications.items && notifications.items.length > 0 ? /* @__PURE__ */ jsx("div", { className: "py-1", children: notifications.items.map(
80305
- (notification, index2) => /* @__PURE__ */ jsxs(
80306
- "div",
80307
- {
80308
- children: [
80309
- /* @__PURE__ */ jsx(
80310
- "button",
80311
- {
80312
- className: cn(
80313
- "w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors",
80314
- "focus:outline-none focus:bg-muted/50",
80315
- !notification.read && "bg-primary/5 hover:bg-primary/10"
80316
- ),
80317
- onClick: () => notifications.onNotificationClick?.(
80318
- notification.id
80319
- ),
80320
- children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
80321
- /* @__PURE__ */ jsx("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx(
80322
- "div",
80323
- {
80324
- className: cn(
80325
- "h-2 w-2 rounded-full",
80326
- !notification.read ? "bg-primary" : "bg-transparent"
80327
- )
80328
- }
80329
- ) }),
80330
- /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
80331
- /* @__PURE__ */ jsx(
80332
- "p",
80333
- {
80334
- className: cn(
80335
- "text-sm leading-tight",
80336
- !notification.read ? "font-medium" : "font-normal"
80337
- ),
80338
- children: notification.title
80339
- }
80340
- ),
80341
- notification.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: notification.description }),
80342
- notification.time && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: notification.time })
80343
- ] })
80344
- ] })
80345
- }
80346
- ),
80347
- index2 < (notifications.items?.length || 0) - 1 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-b" })
80348
- ]
80349
- },
80350
- notification.id
80351
- )
80352
- ) }) : /* @__PURE__ */ jsxs("div", { className: "py-12 text-center", children: [
80353
- /* @__PURE__ */ jsx(Bell, { className: "h-10 w-10 mx-auto text-muted-foreground/30 mb-3" }),
80354
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "No new notifications" }),
80355
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: "You're all caught up!" })
80356
- ] }) }),
80357
- notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx(
80358
- MoonUIButtonPro,
80359
- {
80360
- variant: "ghost",
80361
- className: "w-full h-8 text-xs text-muted-foreground hover:text-foreground",
80362
- onClick: (e) => {
80363
- e.preventDefault();
80364
- console.log(
80365
- "View all notifications"
80366
- );
80367
- },
80368
- children: "View all notifications"
80369
- }
80370
- ) })
80371
- ]
80372
- }
80373
- )
80374
- ] }),
80375
- cta && !framerScroll.isScrolled && /* @__PURE__ */ jsx(
80376
- MoonUIButtonPro,
80377
- {
80378
- variant: cta.variant || "primary",
80379
- size: "sm",
80380
- onClick: () => {
80381
- if (cta.action) {
80382
- cta.action();
80383
- } else if (cta.href) {
80384
- if (cta.href.startsWith("#")) {
80385
- const targetElement = document.querySelector(cta.href);
80386
- if (targetElement) {
80387
- targetElement.scrollIntoView({
80388
- behavior: "smooth",
80389
- block: "start"
80390
- });
80391
- }
80392
- } else if (onNavigate) {
80393
- onNavigate(cta.href);
80394
- } else {
80395
- window.location.href = cta.href;
80396
- }
80397
- }
80398
- },
80399
- className: !isMobile ? "ml-2" : "",
80400
- children: cta.text
80401
- }
80402
- ),
80403
- userMenu && !framerScroll.isScrolled && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
80404
- /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
80405
- MoonUIButtonPro,
80406
- {
80407
- variant: "ghost",
80408
- size: "icon",
80409
- className: "relative",
80410
- children: /* @__PURE__ */ jsxs(MoonUIAvatarPro, { className: "h-8 w-8", children: [
80411
- /* @__PURE__ */ jsx(
80412
- MoonUIAvatarImagePro,
80413
- {
80414
- src: userMenu.user?.avatar,
80415
- alt: userMenu.user?.name
80416
- }
80417
- ),
80418
- /* @__PURE__ */ jsx(MoonUIAvatarFallbackPro, { children: userMenu.user?.name?.charAt(
80419
- 0
80420
- ) || /* @__PURE__ */ jsx(User, { className: "h-4 w-4" }) })
80421
- ] })
80422
- }
80423
- ) }),
80424
- /* @__PURE__ */ jsxs(
80425
- MoonUIDropdownMenuContentPro,
80426
- {
80427
- align: "end",
80428
- className: "w-56",
80429
- children: [
80430
- userMenu.user && /* @__PURE__ */ jsxs(Fragment, { children: [
80431
- /* @__PURE__ */ jsxs("div", { className: "p-2", children: [
80432
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: userMenu.user.name }),
80433
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: userMenu.user.email })
80434
- ] }),
80435
- /* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {})
80436
- ] }),
80437
- userMenu.items && renderDropdownMenu(userMenu.items)
80438
- ]
80439
- }
80440
- )
80441
- ] })
80442
- ] })
80443
- ]
80444
- }
80445
- )
80446
- ),
80447
- animatedBackground && /* @__PURE__ */ jsx(
80448
- motion.div,
80449
- {
80450
- className: "absolute inset-0 -z-10 opacity-30",
80451
- animate: {
80452
- background: [
80453
- "radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)",
80454
- "radial-gradient(circle at 80% 50%, rgba(120, 119, 198, 0.3), transparent 50%)",
80455
- "radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)"
80456
- ]
80457
- },
80458
- transition: {
80459
- duration: 10,
80460
- repeat: Infinity,
80461
- ease: "linear"
80462
- }
80463
- }
80464
- ),
80465
- showScrollProgress && /* @__PURE__ */ jsx(
80466
- "div",
80467
- {
80468
- className: cn(
80469
- "absolute h-0.5 bg-muted transition-all",
80470
- // progressBarInset kontrolü - border-radius içinde mi dışında mı
80471
- progressBarInset ? cn(
80472
- "bottom-1 overflow-hidden",
80473
- // İçerideki progress bar taşmasın
80474
- // Variant'a göre positioning - navbar padding ile uyumlu
80475
- variant === "floating-centered" && "left-6 right-6",
80476
- // px-6 ile uyumlu
80477
- variant === "floating" && "left-4 right-4",
80478
- // mx-4 margin ile uyumlu
80479
- (!variant || variant === "default") && "left-2 right-2",
80480
- // minimal padding
80481
- variant === "minimal" && "left-2 right-2",
80482
- variant === "transparent" && "left-2 right-2",
80483
- variant === "floating-auto-hide" && "left-2 right-2",
80484
- variant === "floating-sticky" && "left-2 right-2",
80485
- // Border-radius uyumu
80486
- rounded && "rounded-b-lg",
80487
- variant === "floating-centered" && "rounded-b-2xl",
80488
- variant === "floating" && "rounded-b-lg"
80489
- ) : "bottom-0 left-0 right-0"
80490
- // Dışarıdan (backward compat)
80491
80694
  ),
80492
- children: /* @__PURE__ */ jsx(
80695
+ animatedBackground && /* @__PURE__ */ jsx(
80696
+ motion.div,
80697
+ {
80698
+ className: "absolute inset-0 -z-10 opacity-30",
80699
+ animate: {
80700
+ background: [
80701
+ "radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)",
80702
+ "radial-gradient(circle at 80% 50%, rgba(120, 119, 198, 0.3), transparent 50%)",
80703
+ "radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)"
80704
+ ]
80705
+ },
80706
+ transition: {
80707
+ duration: 10,
80708
+ repeat: Infinity,
80709
+ ease: "linear"
80710
+ }
80711
+ }
80712
+ ),
80713
+ showScrollProgress && /* @__PURE__ */ jsx(
80493
80714
  "div",
80494
80715
  {
80495
- className: "h-full bg-primary transition-all duration-150",
80496
- style: { width: `${scrollProgress}%` }
80716
+ className: cn(
80717
+ "absolute h-0.5 bg-muted transition-all",
80718
+ // progressBarInset kontrolü - border-radius içinde mi dışında mı
80719
+ progressBarInset ? cn(
80720
+ "bottom-1 overflow-hidden",
80721
+ // İçerideki progress bar taşmasın
80722
+ // Variant'a göre positioning - navbar padding ile uyumlu
80723
+ variant === "floating-centered" && "left-6 right-6",
80724
+ // px-6 ile uyumlu
80725
+ variant === "floating" && "left-4 right-4",
80726
+ // mx-4 margin ile uyumlu
80727
+ (!variant || variant === "default") && "left-2 right-2",
80728
+ // minimal padding
80729
+ variant === "minimal" && "left-2 right-2",
80730
+ variant === "transparent" && "left-2 right-2",
80731
+ variant === "floating-auto-hide" && "left-2 right-2",
80732
+ variant === "floating-sticky" && "left-2 right-2",
80733
+ // Border-radius uyumu
80734
+ rounded && "rounded-b-lg",
80735
+ variant === "floating-centered" && "rounded-b-2xl",
80736
+ variant === "floating" && "rounded-b-lg"
80737
+ ) : "bottom-0 left-0 right-0"
80738
+ // Dışarıdan (backward compat)
80739
+ ),
80740
+ children: /* @__PURE__ */ jsx(
80741
+ "div",
80742
+ {
80743
+ className: "h-full bg-primary transition-all duration-150",
80744
+ style: { width: `${scrollProgress}%` }
80745
+ }
80746
+ )
80497
80747
  }
80498
80748
  )
80499
- }
80500
- )
80501
- ] }),
80749
+ ]
80750
+ }
80751
+ ),
80502
80752
  /* @__PURE__ */ jsxs(
80503
80753
  MoonUICommandDialogPro,
80504
80754
  {