@opensite/ui 3.8.0 → 3.8.1

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.
@@ -6,10 +6,10 @@ import { twMerge } from 'tailwind-merge';
6
6
  import { Pressable } from '@page-speed/pressable';
7
7
  import { Icon } from '@page-speed/icon';
8
8
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
9
+ import { Img } from '@page-speed/img';
9
10
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
10
11
  import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
11
12
  import { cva } from 'class-variance-authority';
12
- import { Img } from '@page-speed/img';
13
13
 
14
14
  // components/blocks/navbars/navbar-enterprise-mega.tsx
15
15
  function cn(...inputs) {
@@ -705,6 +705,11 @@ var NavbarLogo = ({
705
705
  );
706
706
  };
707
707
 
708
+ // components/blocks/navbars/types.ts
709
+ function getLinkUrl(item) {
710
+ return item.href || item.url || "#";
711
+ }
712
+
708
713
  // components/blocks/navbars/layout-variant-utils.ts
709
714
  function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks", customClasses) {
710
715
  const isFloatingBar = layoutVariant === "floatingBar";
@@ -740,6 +745,64 @@ function getNavbarLayoutClasses(layoutVariant = "fullScreenContainerizedLinks",
740
745
  spacingOverride: isFloatingBar ? "none" : "py-0 md:py-0"
741
746
  };
742
747
  }
748
+ var PANEL_MAX_WIDTH_CLASS = "max-w-[calc(100vw-4rem)]";
749
+ var hasItems = (items) => Array.isArray(items) && items.length > 0;
750
+ var hasFeaturedHeroCardContent = (card) => Boolean(
751
+ card && (card.title || card.subtitle || card.description || card.image)
752
+ );
753
+ var FeaturedHeroCardPanel = ({
754
+ card,
755
+ optixFlowConfig,
756
+ className,
757
+ contentClassName,
758
+ imageContainerClassName = "relative aspect-video w-full overflow-hidden",
759
+ imageClassName,
760
+ contentFirst
761
+ }) => {
762
+ const image = card.image ? /* @__PURE__ */ jsx("div", { className: imageContainerClassName, children: /* @__PURE__ */ jsx(
763
+ Img,
764
+ {
765
+ src: card.image,
766
+ alt: card.title,
767
+ className: cn("h-full w-full object-cover", imageClassName),
768
+ optixFlowConfig,
769
+ loading: "eager"
770
+ }
771
+ ) }) : null;
772
+ const content = /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col p-5", contentClassName), children: [
773
+ card.subtitle && /* @__PURE__ */ jsx("span", { className: "mb-2 text-xs font-medium tracking-wider uppercase", children: card.subtitle }),
774
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
775
+ card.title,
776
+ /* @__PURE__ */ jsx(
777
+ DynamicIcon,
778
+ {
779
+ name: "lucide/arrow-right",
780
+ size: 16,
781
+ className: "shrink-0 transition-transform group-hover:translate-x-1"
782
+ }
783
+ )
784
+ ] }),
785
+ card.description && /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed opacity-90", children: card.description })
786
+ ] });
787
+ return /* @__PURE__ */ jsx(
788
+ Pressable,
789
+ {
790
+ href: card.href,
791
+ className: cn(
792
+ "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
793
+ card.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary",
794
+ className
795
+ ),
796
+ children: contentFirst ? /* @__PURE__ */ jsxs(Fragment, { children: [
797
+ content,
798
+ image
799
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
800
+ image,
801
+ content
802
+ ] })
803
+ }
804
+ );
805
+ };
743
806
  var SolutionsMenu = ({
744
807
  solutionCards,
745
808
  platformItems,
@@ -747,492 +810,458 @@ var SolutionsMenu = ({
747
810
  featuredHeroCard,
748
811
  optixFlowConfig
749
812
  }) => {
750
- const featuredCard = featuredHeroCard ? /* @__PURE__ */ jsxs(
751
- Pressable,
813
+ const visibleSolutionCards = solutionCards.filter(Boolean);
814
+ const visiblePlatformItems = platformItems.filter(Boolean);
815
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
816
+ const hasPlatformSection = hasItems(visiblePlatformItems);
817
+ const hasSolutionSection = hasItems(visibleSolutionCards);
818
+ const hasRightColumn = hasPlatformSection || hasSolutionSection;
819
+ if (!hasFeaturedCard && !hasRightColumn) return null;
820
+ const featuredCard = hasFeaturedCard && featuredHeroCard ? /* @__PURE__ */ jsx(
821
+ FeaturedHeroCardPanel,
752
822
  {
753
- href: featuredHeroCard.href,
754
- className: cn(
755
- "group flex h-full min-h-[420px] flex-col overflow-hidden rounded-lg text-primary-foreground",
756
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
757
- ),
758
- children: [
759
- /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-col justify-between p-5", children: [
760
- featuredHeroCard.subtitle && /* @__PURE__ */ jsx("span", { className: "mb-2 text-xs font-medium tracking-wider uppercase", children: featuredHeroCard.subtitle }),
761
- /* @__PURE__ */ jsxs("div", { children: [
762
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
763
- featuredHeroCard.title,
764
- /* @__PURE__ */ jsx(
765
- DynamicIcon,
766
- {
767
- name: "lucide/arrow-right",
768
- size: 16,
769
- className: "transition-transform group-hover:translate-x-1"
770
- }
771
- )
772
- ] }),
773
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-primary-foreground/85", children: featuredHeroCard.description })
774
- ] })
775
- ] }),
776
- /* @__PURE__ */ jsx("div", { className: "relative min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx(
777
- Img,
778
- {
779
- src: featuredHeroCard.image,
780
- alt: featuredHeroCard.title,
781
- className: "h-full w-full object-cover",
782
- optixFlowConfig,
783
- loading: "eager"
784
- }
785
- ) })
786
- ]
823
+ card: featuredHeroCard,
824
+ optixFlowConfig,
825
+ contentFirst: true,
826
+ className: cn(featuredHeroCard.image && "min-h-[420px]"),
827
+ imageContainerClassName: "relative min-h-0 flex-1 overflow-hidden"
787
828
  }
788
829
  ) : null;
789
- const platformSection = platformItems.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
830
+ const platformSection = hasPlatformSection ? /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
790
831
  /* @__PURE__ */ jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: platformTitle }) }),
791
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2", children: platformItems.map((technology) => /* @__PURE__ */ jsxs(
792
- NavigationMenuLink,
832
+ /* @__PURE__ */ jsx(
833
+ "div",
793
834
  {
794
- href: technology.href,
795
- className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 hover:bg-muted",
796
- children: [
797
- /* @__PURE__ */ jsx(
798
- DynamicIcon,
799
- {
800
- name: technology.icon,
801
- size: 16,
802
- className: "shrink-0"
803
- }
804
- ),
805
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-medium", children: technology.title })
806
- ]
807
- },
808
- technology.id
809
- )) })
810
- ] }) : null;
811
- const solutionSection = solutionCards.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: solutionCards.map((solution) => /* @__PURE__ */ jsxs(
812
- "div",
813
- {
814
- className: "flex min-w-0 flex-col rounded-lg border border-border p-4",
815
- children: [
816
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-3", children: /* @__PURE__ */ jsxs(
817
- Pressable,
818
- {
819
- href: solution.href,
820
- className: "group flex min-w-0 flex-col text-left",
821
- children: [
822
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [
823
- /* @__PURE__ */ jsx("strong", { className: "min-w-0 break-words text-sm font-medium", children: solution.title }),
824
- /* @__PURE__ */ jsx(
825
- DynamicIcon,
826
- {
827
- name: "lucide/arrow-right",
828
- size: 14,
829
- className: "shrink-0 transition-transform group-hover:translate-x-1"
830
- }
831
- )
832
- ] }),
833
- /* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: solution.description })
834
- ]
835
- }
836
- ) }),
837
- /* @__PURE__ */ jsx("menu", { className: "mt-3 grid gap-2", children: solution.subpages.map((subpage) => /* @__PURE__ */ jsxs(
835
+ className: cn(
836
+ "grid gap-2",
837
+ hasFeaturedCard ? "grid-cols-2" : "grid-cols-[repeat(auto-fit,minmax(160px,1fr))]"
838
+ ),
839
+ children: visiblePlatformItems.map((technology) => /* @__PURE__ */ jsxs(
838
840
  NavigationMenuLink,
839
841
  {
840
- href: subpage.href,
841
- className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
842
+ href: technology.href,
843
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 hover:bg-muted",
842
844
  children: [
843
845
  /* @__PURE__ */ jsx(
844
846
  DynamicIcon,
845
847
  {
846
- name: subpage.icon,
847
- size: 14,
848
+ name: technology.icon,
849
+ size: 16,
848
850
  className: "shrink-0"
849
851
  }
850
852
  ),
851
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: subpage.title })
853
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-medium", children: technology.title })
852
854
  ]
853
855
  },
854
- subpage.id
855
- )) })
856
- ]
857
- },
858
- solution.id
859
- )) }) : null;
860
- if (featuredCard) {
861
- return /* @__PURE__ */ jsxs("div", { className: "grid w-[1200px] max-w-[calc(100vw-4rem)] grid-cols-[minmax(380px,1fr)_minmax(360px,0.95fr)] gap-4", children: [
862
- /* @__PURE__ */ jsx("div", { className: "min-w-0", children: featuredCard }),
863
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
864
- platformSection,
865
- solutionSection
866
- ] })
867
- ] });
868
- }
869
- return /* @__PURE__ */ jsxs("div", { className: "grid w-[1200px] max-w-[calc(100vw-4rem)] grid-cols-2 gap-4", children: [
870
- platformSection,
871
- solutionCards.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-2 grid grid-cols-4 gap-3", children: solutionCards.map((solution) => /* @__PURE__ */ jsxs(
872
- "div",
873
- {
874
- className: "flex min-w-0 flex-col rounded-lg border border-border p-4",
875
- children: [
876
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-3", children: /* @__PURE__ */ jsxs(
877
- Pressable,
878
- {
879
- href: solution.href,
880
- className: "group flex min-w-0 flex-col text-left",
881
- children: [
882
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [
883
- /* @__PURE__ */ jsx("strong", { className: "min-w-0 break-words text-sm font-medium", children: solution.title }),
856
+ technology.id
857
+ ))
858
+ }
859
+ )
860
+ ] }) : null;
861
+ const solutionSection = hasSolutionSection ? /* @__PURE__ */ jsx(
862
+ "div",
863
+ {
864
+ className: cn(
865
+ "grid gap-3",
866
+ hasFeaturedCard ? "grid-cols-2" : "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]"
867
+ ),
868
+ children: visibleSolutionCards.map((solution) => /* @__PURE__ */ jsxs(
869
+ "div",
870
+ {
871
+ className: "flex min-w-0 flex-col rounded-lg border border-border p-4",
872
+ children: [
873
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-3", children: /* @__PURE__ */ jsxs(
874
+ Pressable,
875
+ {
876
+ href: solution.href,
877
+ className: "group flex min-w-0 flex-col text-left",
878
+ children: [
879
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [
880
+ /* @__PURE__ */ jsx("strong", { className: "min-w-0 break-words text-sm font-medium", children: solution.title }),
881
+ /* @__PURE__ */ jsx(
882
+ DynamicIcon,
883
+ {
884
+ name: "lucide/arrow-right",
885
+ size: 14,
886
+ className: "shrink-0 transition-transform group-hover:translate-x-1"
887
+ }
888
+ )
889
+ ] }),
890
+ /* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: solution.description })
891
+ ]
892
+ }
893
+ ) }),
894
+ /* @__PURE__ */ jsx("menu", { className: "mt-3 grid gap-2", children: (solution.subpages ?? []).map((subpage) => /* @__PURE__ */ jsxs(
895
+ NavigationMenuLink,
896
+ {
897
+ href: subpage.href,
898
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
899
+ children: [
884
900
  /* @__PURE__ */ jsx(
885
901
  DynamicIcon,
886
902
  {
887
- name: "lucide/arrow-right",
903
+ name: subpage.icon,
888
904
  size: 14,
889
- className: "shrink-0 transition-transform group-hover:translate-x-1"
905
+ className: "shrink-0"
890
906
  }
891
- )
892
- ] }),
893
- /* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: solution.description })
894
- ]
895
- }
896
- ) }),
897
- /* @__PURE__ */ jsx("menu", { className: "mt-3 grid gap-2", children: solution.subpages.map((subpage) => /* @__PURE__ */ jsxs(
898
- NavigationMenuLink,
899
- {
900
- href: subpage.href,
901
- className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
902
- children: [
903
- /* @__PURE__ */ jsx(
904
- DynamicIcon,
905
- {
906
- name: subpage.icon,
907
- size: 14,
908
- className: "shrink-0"
909
- }
910
- ),
911
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: subpage.title })
912
- ]
913
- },
914
- subpage.id
915
- )) })
916
- ]
917
- },
918
- solution.id
919
- )) })
920
- ] });
907
+ ),
908
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: subpage.title })
909
+ ]
910
+ },
911
+ subpage.id
912
+ )) })
913
+ ]
914
+ },
915
+ solution.id
916
+ ))
917
+ }
918
+ ) : null;
919
+ return /* @__PURE__ */ jsxs(
920
+ "div",
921
+ {
922
+ className: cn(
923
+ "grid gap-4",
924
+ PANEL_MAX_WIDTH_CLASS,
925
+ hasFeaturedCard && hasRightColumn ? "w-[1200px] grid-cols-[minmax(380px,1fr)_minmax(360px,0.95fr)]" : hasFeaturedCard ? "w-[560px] grid-cols-1" : hasSolutionSection ? "w-[900px] grid-cols-1" : "w-[520px] grid-cols-1"
926
+ ),
927
+ children: [
928
+ featuredCard && /* @__PURE__ */ jsx("div", { className: "min-w-0", children: featuredCard }),
929
+ hasRightColumn && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
930
+ platformSection,
931
+ solutionSection
932
+ ] })
933
+ ]
934
+ }
935
+ );
921
936
  };
922
937
  var ProductsMenu = ({
923
938
  productCategories,
924
939
  featuredHeroCard,
925
940
  optixFlowConfig
926
- }) => /* @__PURE__ */ jsxs("div", { className: "grid w-[1100px] grid-cols-[320px_1fr] gap-6", children: [
927
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
928
- Pressable,
941
+ }) => {
942
+ const visibleCategories = productCategories.filter(
943
+ (category) => hasItems(category.products)
944
+ );
945
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
946
+ const hasProductContent = hasItems(visibleCategories);
947
+ if (!hasFeaturedCard && !hasProductContent) return null;
948
+ return /* @__PURE__ */ jsxs(
949
+ "div",
929
950
  {
930
- href: featuredHeroCard.href,
931
951
  className: cn(
932
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
933
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
952
+ "grid gap-6",
953
+ PANEL_MAX_WIDTH_CLASS,
954
+ hasFeaturedCard && hasProductContent ? "w-[1100px] grid-cols-[320px_1fr]" : hasProductContent ? "w-[860px] grid-cols-1" : "w-[360px] grid-cols-1"
934
955
  ),
935
956
  children: [
936
- /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsx(
937
- Img,
957
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: /* @__PURE__ */ jsx(
958
+ FeaturedHeroCardPanel,
938
959
  {
939
- src: featuredHeroCard.image,
940
- alt: featuredHeroCard.title,
941
- className: "h-full w-full object-cover",
942
- optixFlowConfig,
943
- loading: "eager"
960
+ card: featuredHeroCard,
961
+ optixFlowConfig
944
962
  }
945
963
  ) }),
946
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
947
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
948
- featuredHeroCard.title,
949
- /* @__PURE__ */ jsx(
950
- DynamicIcon,
951
- {
952
- name: "lucide/arrow-right",
953
- size: 16,
954
- className: "transition-transform group-hover:translate-x-1"
955
- }
956
- )
957
- ] }),
958
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-primary-foreground/85", children: featuredHeroCard.description })
959
- ] })
960
- ]
961
- }
962
- ) }),
963
- productCategories.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-1 flex flex-col gap-6", children: productCategories.map((category) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
964
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-2 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: category.title }) }),
965
- /* @__PURE__ */ jsx("menu", { className: "grid grid-cols-3 gap-3", children: category.products.map((product) => /* @__PURE__ */ jsxs(
966
- NavigationMenuLink,
967
- {
968
- href: product.href,
969
- className: "group col-span-1 !flex !w-full items-center gap-3 rounded-lg p-3 text-left hover:bg-muted",
970
- children: [
971
- /* @__PURE__ */ jsx("div", { className: "relative flex size-12 shrink-0 items-center justify-center overflow-hidden rounded", children: /* @__PURE__ */ jsx(
972
- Img,
964
+ hasProductContent && /* @__PURE__ */ jsx("div", { className: "col-span-1 flex min-w-0 flex-col gap-6", children: visibleCategories.map((category) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-3", children: [
965
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-2 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: category.title }) }),
966
+ /* @__PURE__ */ jsx(
967
+ "menu",
973
968
  {
974
- src: product.image,
975
- alt: product.title,
976
- className: "h-full w-full object-cover",
977
- optixFlowConfig,
978
- loading: "eager"
969
+ className: cn(
970
+ "grid gap-3",
971
+ hasFeaturedCard ? "grid-cols-3" : "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]"
972
+ ),
973
+ children: category.products.map((product) => /* @__PURE__ */ jsxs(
974
+ NavigationMenuLink,
975
+ {
976
+ href: product.href,
977
+ className: "group col-span-1 !flex !w-full min-w-0 items-center gap-3 rounded-lg p-3 text-left hover:bg-muted",
978
+ children: [
979
+ /* @__PURE__ */ jsx("div", { className: "relative flex size-12 shrink-0 items-center justify-center overflow-hidden rounded bg-muted text-muted-foreground", children: product.image ? /* @__PURE__ */ jsx(
980
+ Img,
981
+ {
982
+ src: product.image,
983
+ alt: product.title,
984
+ className: "h-full w-full object-cover",
985
+ optixFlowConfig,
986
+ loading: "eager"
987
+ }
988
+ ) : /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/package", size: 18 }) }),
989
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
990
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: product.title }),
991
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: product.description })
992
+ ] })
993
+ ]
994
+ },
995
+ product.id
996
+ ))
979
997
  }
980
- ) }),
981
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
982
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: product.title }),
983
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: product.description })
984
- ] })
985
- ]
986
- },
987
- product.id
988
- )) })
989
- ] }, category.title)) })
990
- ] });
998
+ )
999
+ ] }, category.title)) })
1000
+ ]
1001
+ }
1002
+ );
1003
+ };
991
1004
  var ResourcesMenu = ({
992
1005
  resourceItems,
993
1006
  resourcesTitle = "Resources",
994
1007
  topicGroups,
995
- featuredHeroCard
996
- }) => /* @__PURE__ */ jsxs("div", { className: "grid w-[1100px] grid-cols-[280px_1fr_220px] gap-6", children: [
997
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
998
- Pressable,
1008
+ featuredHeroCard,
1009
+ optixFlowConfig
1010
+ }) => {
1011
+ const visibleTopicGroups = topicGroups.filter(
1012
+ (group) => hasItems(group.topics)
1013
+ );
1014
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
1015
+ const hasResourceContent = hasItems(resourceItems);
1016
+ const hasTopicContent = hasItems(visibleTopicGroups);
1017
+ if (!hasFeaturedCard && !hasResourceContent && !hasTopicContent) return null;
1018
+ return /* @__PURE__ */ jsxs(
1019
+ "div",
999
1020
  {
1000
- href: featuredHeroCard.href,
1001
1021
  className: cn(
1002
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
1003
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
1022
+ "grid gap-6",
1023
+ PANEL_MAX_WIDTH_CLASS,
1024
+ hasFeaturedCard && hasResourceContent && hasTopicContent ? "w-[1100px] grid-cols-[280px_1fr_220px]" : hasFeaturedCard && hasResourceContent ? "w-[900px] grid-cols-[280px_1fr]" : hasFeaturedCard && hasTopicContent ? "w-[560px] grid-cols-[280px_220px]" : hasResourceContent && hasTopicContent ? "w-[900px] grid-cols-[1fr_220px]" : hasResourceContent ? "w-[700px] grid-cols-1" : hasTopicContent ? "w-[280px] grid-cols-1" : "w-[320px] grid-cols-1"
1004
1025
  ),
1005
1026
  children: [
1006
- /* @__PURE__ */ jsx("div", { className: "relative aspect-[4/3] w-full overflow-hidden", children: /* @__PURE__ */ jsx(
1007
- Img,
1027
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: /* @__PURE__ */ jsx(
1028
+ FeaturedHeroCardPanel,
1008
1029
  {
1009
- src: featuredHeroCard.image,
1010
- alt: featuredHeroCard.title,
1011
- className: "h-full w-full object-cover invert",
1012
- loading: "eager"
1030
+ card: featuredHeroCard,
1031
+ optixFlowConfig,
1032
+ imageContainerClassName: "relative aspect-[4/3] w-full overflow-hidden",
1033
+ imageClassName: "invert"
1013
1034
  }
1014
1035
  ) }),
1015
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
1016
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
1017
- featuredHeroCard.title,
1018
- /* @__PURE__ */ jsx(
1019
- DynamicIcon,
1020
- {
1021
- name: "lucide/arrow-right",
1022
- size: 16,
1023
- className: "transition-transform group-hover:translate-x-1"
1024
- }
1025
- )
1026
- ] }),
1027
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed", children: featuredHeroCard.description })
1028
- ] })
1029
- ]
1030
- }
1031
- ) }),
1032
- resourceItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "col-span-1", children: [
1033
- /* @__PURE__ */ jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: resourcesTitle }) }),
1034
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: resourceItems.map((resource) => /* @__PURE__ */ jsxs(
1035
- NavigationMenuLink,
1036
- {
1037
- href: resource.href,
1038
- className: "group col-span-1 !flex !w-full items-start gap-3 rounded-lg border border-border p-3 hover:bg-muted",
1039
- children: [
1036
+ hasResourceContent && /* @__PURE__ */ jsxs("div", { className: "col-span-1 min-w-0", children: [
1037
+ /* @__PURE__ */ jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: resourcesTitle }) }),
1040
1038
  /* @__PURE__ */ jsx(
1041
- DynamicIcon,
1039
+ "div",
1042
1040
  {
1043
- name: resource.icon,
1044
- size: 18,
1045
- className: "mt-0.5 shrink-0"
1041
+ className: cn(
1042
+ "grid gap-3",
1043
+ resourceItems.length > 1 ? "grid-cols-2" : "grid-cols-1"
1044
+ ),
1045
+ children: resourceItems.map((resource) => /* @__PURE__ */ jsxs(
1046
+ NavigationMenuLink,
1047
+ {
1048
+ href: resource.href,
1049
+ className: "group col-span-1 !flex !w-full min-w-0 items-start gap-3 rounded-lg border border-border p-3 hover:bg-muted",
1050
+ children: [
1051
+ /* @__PURE__ */ jsx(
1052
+ DynamicIcon,
1053
+ {
1054
+ name: resource.icon,
1055
+ size: 18,
1056
+ className: "mt-0.5 shrink-0"
1057
+ }
1058
+ ),
1059
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1060
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: resource.title }),
1061
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: resource.description })
1062
+ ] })
1063
+ ]
1064
+ },
1065
+ resource.id
1066
+ ))
1046
1067
  }
1047
- ),
1048
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1049
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: resource.title }),
1050
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: resource.description })
1051
- ] })
1052
- ]
1053
- },
1054
- resource.id
1055
- )) })
1056
- ] }),
1057
- topicGroups.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: topicGroups.map((group) => /* @__PURE__ */ jsxs("div", { className: "mb-5 last:mb-0", children: [
1058
- /* @__PURE__ */ jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.title }) }),
1059
- /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: group.topics.map((topic) => /* @__PURE__ */ jsxs(
1060
- NavigationMenuLink,
1061
- {
1062
- href: topic.href,
1063
- className: "group !flex !w-full items-center gap-2 rounded-lg p-2 hover:bg-muted",
1064
- children: [
1065
- /* @__PURE__ */ jsx(
1066
- DynamicIcon,
1068
+ )
1069
+ ] }),
1070
+ hasTopicContent && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: visibleTopicGroups.map((group) => /* @__PURE__ */ jsxs("div", { className: "mb-5 last:mb-0", children: [
1071
+ /* @__PURE__ */ jsx("div", { className: "mb-3 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.title }) }),
1072
+ /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: group.topics.map((topic) => /* @__PURE__ */ jsxs(
1073
+ NavigationMenuLink,
1067
1074
  {
1068
- name: topic.icon,
1069
- size: 14,
1070
- className: "shrink-0"
1071
- }
1072
- ),
1073
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 text-sm font-medium", children: topic.title })
1074
- ]
1075
- },
1076
- topic.id
1077
- )) })
1078
- ] }, group.title)) })
1079
- ] });
1075
+ href: topic.href,
1076
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 hover:bg-muted",
1077
+ children: [
1078
+ /* @__PURE__ */ jsx(
1079
+ DynamicIcon,
1080
+ {
1081
+ name: topic.icon,
1082
+ size: 14,
1083
+ className: "shrink-0"
1084
+ }
1085
+ ),
1086
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: topic.title })
1087
+ ]
1088
+ },
1089
+ topic.id
1090
+ )) })
1091
+ ] }, group.title)) })
1092
+ ]
1093
+ }
1094
+ );
1095
+ };
1080
1096
  var GlobalMenu = ({
1081
1097
  featureCategories,
1082
1098
  regions,
1083
1099
  locationsTitle = "Locations",
1084
1100
  featuredHeroCard,
1085
1101
  optixFlowConfig
1086
- }) => /* @__PURE__ */ jsxs("div", { className: "w-[1100px]", children: [
1087
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[280px_1fr] gap-6", children: [
1088
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
1089
- Pressable,
1090
- {
1091
- href: featuredHeroCard.href,
1092
- className: cn(
1093
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
1094
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
1095
- ),
1096
- children: [
1097
- /* @__PURE__ */ jsx("div", { className: "relative aspect-[4/3] w-full overflow-hidden", children: /* @__PURE__ */ jsx(
1098
- Img,
1099
- {
1100
- src: featuredHeroCard.image,
1101
- alt: featuredHeroCard.title,
1102
- className: "h-full w-full object-cover",
1103
- optixFlowConfig,
1104
- loading: "eager"
1105
- }
1106
- ) }),
1107
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
1108
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
1109
- featuredHeroCard.title,
1110
- /* @__PURE__ */ jsx(
1111
- DynamicIcon,
1102
+ }) => {
1103
+ const visibleFeatureCategories = featureCategories.filter(
1104
+ (category) => hasItems(category.features)
1105
+ );
1106
+ const visibleRegions = regions.filter((region) => hasItems(region.locations));
1107
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
1108
+ const hasFeatureContent = hasItems(visibleFeatureCategories);
1109
+ const hasRegionContent = hasItems(visibleRegions);
1110
+ if (!hasFeaturedCard && !hasFeatureContent && !hasRegionContent) return null;
1111
+ return /* @__PURE__ */ jsxs(
1112
+ "div",
1113
+ {
1114
+ className: cn(
1115
+ PANEL_MAX_WIDTH_CLASS,
1116
+ hasFeatureContent && hasFeaturedCard ? "w-[1100px]" : hasFeatureContent || hasRegionContent ? "w-[900px]" : "w-[320px]"
1117
+ ),
1118
+ children: [
1119
+ (hasFeaturedCard || hasFeatureContent) && /* @__PURE__ */ jsxs(
1120
+ "div",
1121
+ {
1122
+ className: cn(
1123
+ "grid gap-6",
1124
+ hasFeaturedCard && hasFeatureContent ? "grid-cols-[280px_1fr]" : "grid-cols-1"
1125
+ ),
1126
+ children: [
1127
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx(
1128
+ "div",
1112
1129
  {
1113
- name: "lucide/arrow-right",
1114
- size: 16,
1115
- className: "transition-transform group-hover:translate-x-1"
1130
+ className: cn(
1131
+ "col-span-1 min-w-0",
1132
+ !hasFeatureContent && hasRegionContent && "max-w-[320px]"
1133
+ ),
1134
+ children: /* @__PURE__ */ jsx(
1135
+ FeaturedHeroCardPanel,
1136
+ {
1137
+ card: featuredHeroCard,
1138
+ optixFlowConfig,
1139
+ imageContainerClassName: "relative aspect-[4/3] w-full overflow-hidden"
1140
+ }
1141
+ )
1116
1142
  }
1117
- )
1118
- ] }),
1119
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-primary-foreground/85", children: featuredHeroCard.description })
1120
- ] })
1121
- ]
1122
- }
1123
- ) }),
1124
- featureCategories.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-1 flex flex-col gap-6", children: featureCategories.map((category) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
1125
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-2 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: category.title }) }),
1126
- /* @__PURE__ */ jsx("menu", { className: "grid grid-cols-3 gap-3", children: category.features.map((feature) => /* @__PURE__ */ jsxs(
1127
- NavigationMenuLink,
1128
- {
1129
- href: feature.href,
1130
- className: "group col-span-1 !flex !w-full items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
1131
- children: [
1132
- /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon, size: 18 }) }),
1133
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1134
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: feature.title }),
1135
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: feature.description })
1136
- ] })
1137
- ]
1138
- },
1139
- feature.id
1140
- )) })
1141
- ] }, category.title)) })
1142
- ] }),
1143
- regions.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-6", children: [
1144
- /* @__PURE__ */ jsx("div", { className: "mb-3 border-b border-border pb-2 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: locationsTitle }) }),
1145
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-4 gap-4", children: regions.map((region) => /* @__PURE__ */ jsxs(
1146
- "div",
1147
- {
1148
- className: "col-span-1 flex w-full flex-col gap-3",
1149
- children: [
1150
- /* @__PURE__ */ jsx("div", { className: "text-left text-xs font-medium text-muted-foreground", children: region.title }),
1151
- /* @__PURE__ */ jsx("menu", { className: "grid gap-1.5", children: region.locations.map((location) => /* @__PURE__ */ jsxs(
1152
- NavigationMenuLink,
1143
+ ),
1144
+ hasFeatureContent && /* @__PURE__ */ jsx("div", { className: "col-span-1 flex min-w-0 flex-col gap-6", children: visibleFeatureCategories.map((category) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-3", children: [
1145
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-2 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: category.title }) }),
1146
+ /* @__PURE__ */ jsx(
1147
+ "menu",
1148
+ {
1149
+ className: cn(
1150
+ "grid gap-3",
1151
+ hasFeaturedCard ? "grid-cols-3" : "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]"
1152
+ ),
1153
+ children: category.features.map((feature) => /* @__PURE__ */ jsxs(
1154
+ NavigationMenuLink,
1155
+ {
1156
+ href: feature.href,
1157
+ className: "group col-span-1 !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
1158
+ children: [
1159
+ /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon, size: 18 }) }),
1160
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1161
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: feature.title }),
1162
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: feature.description })
1163
+ ] })
1164
+ ]
1165
+ },
1166
+ feature.id
1167
+ ))
1168
+ }
1169
+ )
1170
+ ] }, category.title)) })
1171
+ ]
1172
+ }
1173
+ ),
1174
+ hasRegionContent && /* @__PURE__ */ jsxs("div", { className: cn(hasFeaturedCard || hasFeatureContent ? "mt-6" : ""), children: [
1175
+ /* @__PURE__ */ jsx("div", { className: "mb-3 border-b border-border pb-2 text-left", children: /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: locationsTitle }) }),
1176
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-4", children: visibleRegions.map((region) => /* @__PURE__ */ jsxs(
1177
+ "div",
1153
1178
  {
1154
- href: location.href,
1155
- className: "group !flex !w-full items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
1179
+ className: "col-span-1 flex w-full min-w-0 flex-col gap-3",
1156
1180
  children: [
1157
- /* @__PURE__ */ jsx("div", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(
1158
- DynamicIcon,
1181
+ /* @__PURE__ */ jsx("div", { className: "break-words text-left text-xs font-medium text-muted-foreground", children: region.title }),
1182
+ /* @__PURE__ */ jsx("menu", { className: "grid gap-1.5", children: region.locations.map((location) => /* @__PURE__ */ jsxs(
1183
+ NavigationMenuLink,
1159
1184
  {
1160
- name: location.icon,
1161
- size: 16,
1162
- className: "shrink-0"
1163
- }
1164
- ) }),
1165
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-medium", children: location.title })
1185
+ href: location.href,
1186
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
1187
+ children: [
1188
+ /* @__PURE__ */ jsx("div", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(
1189
+ DynamicIcon,
1190
+ {
1191
+ name: location.icon,
1192
+ size: 16,
1193
+ className: "shrink-0"
1194
+ }
1195
+ ) }),
1196
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: location.title })
1197
+ ]
1198
+ },
1199
+ location.title
1200
+ )) })
1166
1201
  ]
1167
1202
  },
1168
- location.title
1203
+ region.title
1169
1204
  )) })
1170
- ]
1171
- },
1172
- region.title
1173
- )) })
1174
- ] })
1175
- ] });
1205
+ ] })
1206
+ ]
1207
+ }
1208
+ );
1209
+ };
1176
1210
  var PartnersMenu = ({
1177
1211
  partnerCards,
1178
1212
  featuredHeroCard,
1179
1213
  optixFlowConfig
1180
- }) => /* @__PURE__ */ jsxs("div", { className: "grid w-[1000px] grid-cols-[2fr_1fr] gap-6", children: [
1181
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
1182
- Pressable,
1214
+ }) => {
1215
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
1216
+ const hasPartnerContent = hasItems(partnerCards);
1217
+ if (!hasFeaturedCard && !hasPartnerContent) return null;
1218
+ return /* @__PURE__ */ jsxs(
1219
+ "div",
1183
1220
  {
1184
- href: featuredHeroCard.href,
1185
1221
  className: cn(
1186
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
1187
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
1222
+ "grid gap-6",
1223
+ PANEL_MAX_WIDTH_CLASS,
1224
+ hasFeaturedCard && hasPartnerContent ? "w-[1000px] grid-cols-[2fr_1fr]" : hasPartnerContent ? "w-[680px] grid-cols-1" : "w-[360px] grid-cols-1"
1188
1225
  ),
1189
1226
  children: [
1190
- /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsx(
1191
- Img,
1227
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: /* @__PURE__ */ jsx(
1228
+ FeaturedHeroCardPanel,
1192
1229
  {
1193
- src: featuredHeroCard.image,
1194
- alt: featuredHeroCard.title,
1195
- className: cn(
1196
- "h-full w-full object-cover",
1197
- featuredHeroCard.imagePosition === "background" && "invert"
1198
- ),
1230
+ card: featuredHeroCard,
1199
1231
  optixFlowConfig,
1200
- loading: "eager"
1232
+ imageClassName: cn(
1233
+ featuredHeroCard.imagePosition === "background" && "invert"
1234
+ )
1201
1235
  }
1202
1236
  ) }),
1203
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
1204
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
1205
- featuredHeroCard.title,
1206
- /* @__PURE__ */ jsx(
1207
- DynamicIcon,
1237
+ hasPartnerContent && /* @__PURE__ */ jsx(
1238
+ "div",
1239
+ {
1240
+ className: cn(
1241
+ "col-span-1 min-w-0 gap-3",
1242
+ hasFeaturedCard ? "flex flex-col" : "grid grid-cols-[repeat(auto-fit,minmax(240px,1fr))]"
1243
+ ),
1244
+ children: partnerCards.map((card) => /* @__PURE__ */ jsxs(
1245
+ NavigationMenuLink,
1208
1246
  {
1209
- name: "lucide/arrow-right",
1210
- size: 16,
1211
- className: "transition-transform group-hover:translate-x-1"
1212
- }
1213
- )
1214
- ] }),
1215
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed", children: featuredHeroCard.description })
1216
- ] })
1247
+ href: card.href,
1248
+ className: "group !flex !w-full min-w-0 items-start gap-3 rounded-lg border border-border p-4 hover:bg-muted",
1249
+ children: [
1250
+ /* @__PURE__ */ jsx(DynamicIcon, { name: card.icon, size: 28, className: "shrink-0" }),
1251
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1252
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-bold", children: card.title }),
1253
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: card.description })
1254
+ ] })
1255
+ ]
1256
+ },
1257
+ card.title
1258
+ ))
1259
+ }
1260
+ )
1217
1261
  ]
1218
1262
  }
1219
- ) }),
1220
- partnerCards.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-1 flex flex-col gap-3", children: partnerCards.map((card) => /* @__PURE__ */ jsxs(
1221
- NavigationMenuLink,
1222
- {
1223
- href: card.href,
1224
- className: "group !flex !w-full items-start gap-3 rounded-lg border border-border p-4 hover:bg-muted",
1225
- children: [
1226
- /* @__PURE__ */ jsx(DynamicIcon, { name: card.icon, size: 28, className: "shrink-0" }),
1227
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1228
- /* @__PURE__ */ jsx("div", { className: "text-sm font-bold", children: card.title }),
1229
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: card.description })
1230
- ] })
1231
- ]
1232
- },
1233
- card.title
1234
- )) })
1235
- ] });
1263
+ );
1264
+ };
1236
1265
  var MOBILE_BREAKPOINT = 1024;
1237
1266
  var NavbarEnterpriseMega = ({
1238
1267
  className,
@@ -1402,20 +1431,48 @@ var NavbarEnterpriseMega = ({
1402
1431
  )
1403
1432
  ] });
1404
1433
  };
1434
+ var hasItems2 = (items) => Array.isArray(items) && items.length > 0;
1435
+ var hasFeaturedHeroCardContent2 = (card) => Boolean(
1436
+ card && (card.title || card.subtitle || card.description || card.image)
1437
+ );
1438
+ var hasGenericDropdownContent = (item) => hasItems2(item.links) || Boolean(item.dropdownGroups?.some((group) => hasItems2(group.links)));
1439
+ var hasLayoutSpecificDropdownContent = (item) => {
1440
+ switch (item.layout) {
1441
+ case "solutions-with-platform":
1442
+ return hasItems2(item.solutionCards) || hasItems2(item.platformItems) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
1443
+ case "products-categorized":
1444
+ return Boolean(
1445
+ item.productCategories?.some(
1446
+ (category) => hasItems2(category.products)
1447
+ )
1448
+ ) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
1449
+ case "features-with-locations":
1450
+ return Boolean(
1451
+ item.featureCategories?.some(
1452
+ (category) => hasItems2(category.features)
1453
+ )
1454
+ ) || Boolean(item.regions?.some((region) => hasItems2(region.locations))) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
1455
+ case "partners-promotional":
1456
+ return hasItems2(item.partnerCards) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
1457
+ case "resources-with-topics":
1458
+ return hasItems2(item.resourceItems) || Boolean(
1459
+ item.topicGroups?.some((group) => hasItems2(group.topics))
1460
+ ) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
1461
+ default:
1462
+ return false;
1463
+ }
1464
+ };
1465
+ var hasDropdownContent = (item) => hasLayoutSpecificDropdownContent(item) || hasGenericDropdownContent(item);
1405
1466
  var DesktopMenuItem = ({
1406
1467
  item,
1407
1468
  index,
1408
1469
  optixFlowConfig
1409
1470
  }) => {
1410
- const hasDropdown = Boolean(item.layout);
1411
- const effectiveLayout = item.layout || "solutions-with-platform";
1471
+ const hasDropdown = hasDropdownContent(item);
1412
1472
  if (hasDropdown) {
1413
1473
  return /* @__PURE__ */ jsxs(NavigationMenuItem, { value: `${index}`, children: [
1414
1474
  /* @__PURE__ */ jsx(NavigationMenuTrigger, { className: "h-auto bg-transparent px-3 py-2 font-normal hover:bg-muted focus:bg-muted data-[state=open]:bg-muted/50", children: item.label }),
1415
- /* @__PURE__ */ jsx(NavigationMenuContent, { className: "max-h-[calc(100vh-6rem)] overflow-y-auto rounded-xl! border-0! p-4!", children: renderDropdownContent(
1416
- { ...item, layout: effectiveLayout },
1417
- optixFlowConfig
1418
- ) })
1475
+ /* @__PURE__ */ jsx(NavigationMenuContent, { className: "max-h-[calc(100vh-6rem)] overflow-y-auto rounded-xl! border-0! p-4!", children: renderDropdownContent(item, optixFlowConfig) })
1419
1476
  ] }, `desktop-menu-item-${index}`);
1420
1477
  }
1421
1478
  return /* @__PURE__ */ jsx(NavigationMenuItem, { value: `${index}`, children: /* @__PURE__ */ jsx(
@@ -1428,6 +1485,9 @@ var DesktopMenuItem = ({
1428
1485
  ) }, `desktop-menu-item-${index}`);
1429
1486
  };
1430
1487
  var renderDropdownContent = (item, optixFlowConfig) => {
1488
+ if (!hasLayoutSpecificDropdownContent(item)) {
1489
+ return renderGenericDropdownContent(item, optixFlowConfig);
1490
+ }
1431
1491
  switch (item.layout) {
1432
1492
  case "solutions-with-platform":
1433
1493
  return /* @__PURE__ */ jsx(
@@ -1476,73 +1536,287 @@ var renderDropdownContent = (item, optixFlowConfig) => {
1476
1536
  resourceItems: item.resourceItems ?? [],
1477
1537
  resourcesTitle: item.resourcesTitle,
1478
1538
  topicGroups: item.topicGroups ?? [],
1479
- featuredHeroCard: item.featuredHeroCard
1539
+ featuredHeroCard: item.featuredHeroCard,
1540
+ optixFlowConfig
1480
1541
  }
1481
1542
  );
1482
1543
  default:
1483
- return null;
1544
+ return renderGenericDropdownContent(item, optixFlowConfig);
1484
1545
  }
1485
1546
  };
1486
- var renderMobileDropdownContent = (item) => {
1487
- switch (item.layout) {
1488
- case "solutions-with-platform":
1489
- return /* @__PURE__ */ jsx("div", { className: "flex flex-col space-y-2", children: item.solutionCards?.map((solution) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1490
- /* @__PURE__ */ jsx(
1491
- Pressable,
1547
+ var renderGenericDropdownContent = (item, optixFlowConfig) => {
1548
+ const links = item.links ?? [];
1549
+ const groups = (item.dropdownGroups ?? []).filter(
1550
+ (group) => hasItems2(group.links)
1551
+ );
1552
+ const hasLinks = hasItems2(links);
1553
+ const hasGroups = hasItems2(groups);
1554
+ if (!hasLinks && !hasGroups) return null;
1555
+ const renderGenericLink = (link, key) => {
1556
+ const iconName = link.icon ?? link.iconName;
1557
+ const label = typeof link.label === "string" ? link.label : "";
1558
+ return /* @__PURE__ */ jsxs(
1559
+ NavigationMenuLink,
1560
+ {
1561
+ href: getLinkUrl(link),
1562
+ className: "group !flex !w-full min-w-0 items-start gap-3 rounded-lg p-3 text-left hover:bg-muted",
1563
+ children: [
1564
+ link.image ? /* @__PURE__ */ jsx("div", { className: "relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded bg-muted", children: /* @__PURE__ */ jsx(
1565
+ Img,
1566
+ {
1567
+ src: link.image,
1568
+ alt: label,
1569
+ className: "h-full w-full object-cover",
1570
+ optixFlowConfig,
1571
+ loading: "eager"
1572
+ }
1573
+ ) }) : iconName ? /* @__PURE__ */ jsx(
1574
+ DynamicIcon,
1575
+ {
1576
+ name: iconName,
1577
+ size: 18,
1578
+ className: "mt-0.5 shrink-0"
1579
+ }
1580
+ ) : null,
1581
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
1582
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: link.label }),
1583
+ link.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: link.description })
1584
+ ] })
1585
+ ]
1586
+ },
1587
+ key
1588
+ );
1589
+ };
1590
+ return /* @__PURE__ */ jsxs(
1591
+ "div",
1592
+ {
1593
+ className: cn(
1594
+ "grid max-w-[calc(100vw-4rem)] gap-6",
1595
+ hasLinks && hasGroups ? "w-[900px] grid-cols-[minmax(0,1fr)_minmax(220px,0.45fr)]" : hasGroups ? "w-[780px] grid-cols-1" : "w-[420px] grid-cols-1"
1596
+ ),
1597
+ children: [
1598
+ hasGroups && /* @__PURE__ */ jsx(
1599
+ "div",
1492
1600
  {
1493
- href: solution.href,
1494
- className: "block pt-4 text-sm font-medium",
1495
- children: solution.title
1601
+ className: cn(
1602
+ "grid min-w-0 gap-5",
1603
+ !hasLinks && groups.length > 1 ? "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]" : "grid-cols-1"
1604
+ ),
1605
+ children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1606
+ /* @__PURE__ */ jsxs("div", { className: "mb-3 border-b border-border pb-2 text-left", children: [
1607
+ /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.label }),
1608
+ group.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: group.description })
1609
+ ] }),
1610
+ /* @__PURE__ */ jsx("menu", { className: "grid gap-1.5", children: group.links.map(
1611
+ (link, linkIndex) => renderGenericLink(link, `${groupIndex}-${linkIndex}`)
1612
+ ) })
1613
+ ] }, groupIndex))
1496
1614
  }
1497
1615
  ),
1498
- solution.subpages.map((subpage) => /* @__PURE__ */ jsxs(
1616
+ hasLinks && /* @__PURE__ */ jsx("menu", { className: "grid min-w-0 gap-1.5", children: links.map((link, linkIndex) => renderGenericLink(link, linkIndex)) })
1617
+ ]
1618
+ }
1619
+ );
1620
+ };
1621
+ var renderMobileFeaturedHeroCard = (card) => {
1622
+ if (!hasFeaturedHeroCardContent2(card) || !card) return null;
1623
+ return /* @__PURE__ */ jsxs(
1624
+ Pressable,
1625
+ {
1626
+ href: card.href,
1627
+ className: cn(
1628
+ "block rounded-lg p-4 text-sm font-medium text-primary-foreground",
1629
+ card.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
1630
+ ),
1631
+ children: [
1632
+ /* @__PURE__ */ jsx("span", { children: card.title }),
1633
+ card.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-relaxed opacity-90", children: card.description })
1634
+ ]
1635
+ }
1636
+ );
1637
+ };
1638
+ var renderMobileDropdownContent = (item) => {
1639
+ if (!hasLayoutSpecificDropdownContent(item)) {
1640
+ return renderMobileGenericDropdownContent(item);
1641
+ }
1642
+ switch (item.layout) {
1643
+ case "solutions-with-platform":
1644
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-2", children: [
1645
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
1646
+ item.platformItems?.map((technology) => /* @__PURE__ */ jsxs(
1499
1647
  Pressable,
1500
1648
  {
1501
- href: subpage.href,
1649
+ href: technology.href,
1502
1650
  className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1503
1651
  children: [
1504
- /* @__PURE__ */ jsx(DynamicIcon, { name: subpage.icon, size: 14 }),
1505
- subpage.title
1652
+ /* @__PURE__ */ jsx(DynamicIcon, { name: technology.icon, size: 14 }),
1653
+ technology.title
1506
1654
  ]
1507
1655
  },
1508
- subpage.id
1509
- ))
1510
- ] }, solution.id)) });
1656
+ technology.id
1657
+ )),
1658
+ item.solutionCards?.map((solution) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1659
+ /* @__PURE__ */ jsx(
1660
+ Pressable,
1661
+ {
1662
+ href: solution.href,
1663
+ className: "block pt-4 text-sm font-medium",
1664
+ children: solution.title
1665
+ }
1666
+ ),
1667
+ (solution.subpages ?? []).map((subpage) => /* @__PURE__ */ jsxs(
1668
+ Pressable,
1669
+ {
1670
+ href: subpage.href,
1671
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1672
+ children: [
1673
+ /* @__PURE__ */ jsx(DynamicIcon, { name: subpage.icon, size: 14 }),
1674
+ subpage.title
1675
+ ]
1676
+ },
1677
+ subpage.id
1678
+ ))
1679
+ ] }, solution.id))
1680
+ ] });
1511
1681
  case "products-categorized":
1512
- return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: item.productCategories?.flatMap(
1513
- (category) => category.products.map((product) => /* @__PURE__ */ jsx(
1682
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1683
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
1684
+ item.productCategories?.flatMap(
1685
+ (category) => (category.products ?? []).map((product) => /* @__PURE__ */ jsx(
1686
+ Pressable,
1687
+ {
1688
+ href: product.href,
1689
+ className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
1690
+ children: product.title
1691
+ },
1692
+ product.id
1693
+ ))
1694
+ )
1695
+ ] });
1696
+ case "resources-with-topics":
1697
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1698
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
1699
+ item.resourceItems?.map((resource) => /* @__PURE__ */ jsxs(
1514
1700
  Pressable,
1515
1701
  {
1516
- href: product.href,
1702
+ href: resource.href,
1517
1703
  className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
1518
- children: product.title
1704
+ children: [
1705
+ /* @__PURE__ */ jsx(DynamicIcon, { name: resource.icon, size: 14 }),
1706
+ resource.title
1707
+ ]
1519
1708
  },
1520
- product.id
1709
+ resource.id
1710
+ )),
1711
+ item.topicGroups?.map((group) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1712
+ /* @__PURE__ */ jsx("div", { className: "pt-2 text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.title }),
1713
+ group.topics.map((topic) => /* @__PURE__ */ jsxs(
1714
+ Pressable,
1715
+ {
1716
+ href: topic.href,
1717
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1718
+ children: [
1719
+ /* @__PURE__ */ jsx(DynamicIcon, { name: topic.icon, size: 14 }),
1720
+ topic.title
1721
+ ]
1722
+ },
1723
+ topic.id
1724
+ ))
1725
+ ] }, group.title))
1726
+ ] });
1727
+ case "features-with-locations":
1728
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1729
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
1730
+ item.featureCategories?.flatMap(
1731
+ (category) => (category.features ?? []).map((feature) => /* @__PURE__ */ jsxs(
1732
+ Pressable,
1733
+ {
1734
+ href: feature.href,
1735
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1736
+ children: [
1737
+ /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon, size: 14 }),
1738
+ feature.title
1739
+ ]
1740
+ },
1741
+ feature.id
1742
+ ))
1743
+ ),
1744
+ item.regions?.map((region) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1745
+ /* @__PURE__ */ jsx("div", { className: "pt-2 text-xs font-medium tracking-wider text-muted-foreground uppercase", children: region.title }),
1746
+ region.locations.map((location) => /* @__PURE__ */ jsxs(
1747
+ Pressable,
1748
+ {
1749
+ href: location.href,
1750
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1751
+ children: [
1752
+ /* @__PURE__ */ jsx(DynamicIcon, { name: location.icon, size: 14 }),
1753
+ location.title
1754
+ ]
1755
+ },
1756
+ location.title
1757
+ ))
1758
+ ] }, region.title))
1759
+ ] });
1760
+ case "partners-promotional":
1761
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1762
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
1763
+ item.partnerCards?.map((card) => /* @__PURE__ */ jsxs(
1764
+ Pressable,
1765
+ {
1766
+ href: card.href,
1767
+ className: "flex items-start gap-2 pl-4 text-sm text-muted-foreground",
1768
+ children: [
1769
+ /* @__PURE__ */ jsx(DynamicIcon, { name: card.icon, size: 14, className: "mt-0.5" }),
1770
+ /* @__PURE__ */ jsx("span", { children: card.title })
1771
+ ]
1772
+ },
1773
+ card.title
1521
1774
  ))
1522
- ) });
1523
- case "resources-with-topics":
1524
- return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: item.resourceItems?.map((resource) => /* @__PURE__ */ jsxs(
1775
+ ] });
1776
+ default:
1777
+ return renderMobileGenericDropdownContent(item);
1778
+ }
1779
+ };
1780
+ var renderMobileGenericDropdownContent = (item) => {
1781
+ const links = item.links ?? [];
1782
+ const groups = (item.dropdownGroups ?? []).filter(
1783
+ (group) => hasItems2(group.links)
1784
+ );
1785
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
1786
+ groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1787
+ /* @__PURE__ */ jsx("div", { className: "pt-2 text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.label }),
1788
+ group.links.map((link, linkIndex) => {
1789
+ const iconName = link.icon ?? link.iconName;
1790
+ return /* @__PURE__ */ jsxs(
1791
+ Pressable,
1792
+ {
1793
+ href: getLinkUrl(link),
1794
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1795
+ children: [
1796
+ iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 14 }),
1797
+ link.label
1798
+ ]
1799
+ },
1800
+ `${groupIndex}-${linkIndex}`
1801
+ );
1802
+ })
1803
+ ] }, groupIndex)),
1804
+ links.map((link, linkIndex) => {
1805
+ const iconName = link.icon ?? link.iconName;
1806
+ return /* @__PURE__ */ jsxs(
1525
1807
  Pressable,
1526
1808
  {
1527
- href: resource.href,
1528
- className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
1809
+ href: getLinkUrl(link),
1810
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
1529
1811
  children: [
1530
- /* @__PURE__ */ jsx(DynamicIcon, { name: resource.icon, size: 14 }),
1531
- resource.title
1812
+ iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 14 }),
1813
+ link.label
1532
1814
  ]
1533
1815
  },
1534
- resource.id
1535
- )) });
1536
- case "features-with-locations":
1537
- case "partners-promotional":
1538
- return /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsxs(Pressable, { href: "#", children: [
1539
- "View all",
1540
- " ",
1541
- typeof item.label === "string" ? item.label.toLowerCase() : "items"
1542
- ] }) });
1543
- default:
1544
- return null;
1545
- }
1816
+ linkIndex
1817
+ );
1818
+ })
1819
+ ] });
1546
1820
  };
1547
1821
  var MobileNavigationMenu = ({
1548
1822
  open,
@@ -1589,7 +1863,7 @@ var MobileNavigationMenu = ({
1589
1863
  title: "Mobile Navigation",
1590
1864
  children: /* @__PURE__ */ jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
1591
1865
  /* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full", children: menuLinks.map((item, index) => {
1592
- const hasDropdown = Boolean(item.layout);
1866
+ const hasDropdown = hasDropdownContent(item);
1593
1867
  if (hasDropdown) {
1594
1868
  return /* @__PURE__ */ jsxs(
1595
1869
  AccordionItem,