@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.
package/dist/registry.js CHANGED
@@ -64495,6 +64495,64 @@ var NavbarMegaMenu = ({
64495
64495
  }
64496
64496
  );
64497
64497
  };
64498
+ var PANEL_MAX_WIDTH_CLASS = "max-w-[calc(100vw-4rem)]";
64499
+ var hasItems = (items) => Array.isArray(items) && items.length > 0;
64500
+ var hasFeaturedHeroCardContent = (card) => Boolean(
64501
+ card && (card.title || card.subtitle || card.description || card.image)
64502
+ );
64503
+ var FeaturedHeroCardPanel = ({
64504
+ card,
64505
+ optixFlowConfig,
64506
+ className,
64507
+ contentClassName,
64508
+ imageContainerClassName = "relative aspect-video w-full overflow-hidden",
64509
+ imageClassName,
64510
+ contentFirst
64511
+ }) => {
64512
+ const image = card.image ? /* @__PURE__ */ jsx("div", { className: imageContainerClassName, children: /* @__PURE__ */ jsx(
64513
+ Img,
64514
+ {
64515
+ src: card.image,
64516
+ alt: card.title,
64517
+ className: cn("h-full w-full object-cover", imageClassName),
64518
+ optixFlowConfig,
64519
+ loading: "eager"
64520
+ }
64521
+ ) }) : null;
64522
+ const content = /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col p-5", contentClassName), children: [
64523
+ card.subtitle && /* @__PURE__ */ jsx("span", { className: "mb-2 text-xs font-medium tracking-wider uppercase", children: card.subtitle }),
64524
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
64525
+ card.title,
64526
+ /* @__PURE__ */ jsx(
64527
+ DynamicIcon,
64528
+ {
64529
+ name: "lucide/arrow-right",
64530
+ size: 16,
64531
+ className: "shrink-0 transition-transform group-hover:translate-x-1"
64532
+ }
64533
+ )
64534
+ ] }),
64535
+ card.description && /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed opacity-90", children: card.description })
64536
+ ] });
64537
+ return /* @__PURE__ */ jsx(
64538
+ Pressable,
64539
+ {
64540
+ href: card.href,
64541
+ className: cn(
64542
+ "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
64543
+ card.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary",
64544
+ className
64545
+ ),
64546
+ children: contentFirst ? /* @__PURE__ */ jsxs(Fragment, { children: [
64547
+ content,
64548
+ image
64549
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
64550
+ image,
64551
+ content
64552
+ ] })
64553
+ }
64554
+ );
64555
+ };
64498
64556
  var SolutionsMenu = ({
64499
64557
  solutionCards,
64500
64558
  platformItems,
@@ -64502,492 +64560,458 @@ var SolutionsMenu = ({
64502
64560
  featuredHeroCard,
64503
64561
  optixFlowConfig
64504
64562
  }) => {
64505
- const featuredCard = featuredHeroCard ? /* @__PURE__ */ jsxs(
64506
- Pressable,
64507
- {
64508
- href: featuredHeroCard.href,
64509
- className: cn(
64510
- "group flex h-full min-h-[420px] flex-col overflow-hidden rounded-lg text-primary-foreground",
64511
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
64512
- ),
64513
- children: [
64514
- /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-col justify-between p-5", children: [
64515
- featuredHeroCard.subtitle && /* @__PURE__ */ jsx("span", { className: "mb-2 text-xs font-medium tracking-wider uppercase", children: featuredHeroCard.subtitle }),
64516
- /* @__PURE__ */ jsxs("div", { children: [
64517
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
64518
- featuredHeroCard.title,
64519
- /* @__PURE__ */ jsx(
64520
- DynamicIcon,
64521
- {
64522
- name: "lucide/arrow-right",
64523
- size: 16,
64524
- className: "transition-transform group-hover:translate-x-1"
64525
- }
64526
- )
64527
- ] }),
64528
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-primary-foreground/85", children: featuredHeroCard.description })
64529
- ] })
64530
- ] }),
64531
- /* @__PURE__ */ jsx("div", { className: "relative min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx(
64532
- Img,
64533
- {
64534
- src: featuredHeroCard.image,
64535
- alt: featuredHeroCard.title,
64536
- className: "h-full w-full object-cover",
64537
- optixFlowConfig,
64538
- loading: "eager"
64539
- }
64540
- ) })
64541
- ]
64563
+ const visibleSolutionCards = solutionCards.filter(Boolean);
64564
+ const visiblePlatformItems = platformItems.filter(Boolean);
64565
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
64566
+ const hasPlatformSection = hasItems(visiblePlatformItems);
64567
+ const hasSolutionSection = hasItems(visibleSolutionCards);
64568
+ const hasRightColumn = hasPlatformSection || hasSolutionSection;
64569
+ if (!hasFeaturedCard && !hasRightColumn) return null;
64570
+ const featuredCard = hasFeaturedCard && featuredHeroCard ? /* @__PURE__ */ jsx(
64571
+ FeaturedHeroCardPanel,
64572
+ {
64573
+ card: featuredHeroCard,
64574
+ optixFlowConfig,
64575
+ contentFirst: true,
64576
+ className: cn(featuredHeroCard.image && "min-h-[420px]"),
64577
+ imageContainerClassName: "relative min-h-0 flex-1 overflow-hidden"
64542
64578
  }
64543
64579
  ) : null;
64544
- const platformSection = platformItems.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
64580
+ const platformSection = hasPlatformSection ? /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
64545
64581
  /* @__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 }) }),
64546
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2", children: platformItems.map((technology) => /* @__PURE__ */ jsxs(
64547
- NavigationMenuLink,
64582
+ /* @__PURE__ */ jsx(
64583
+ "div",
64548
64584
  {
64549
- href: technology.href,
64550
- className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 hover:bg-muted",
64551
- children: [
64552
- /* @__PURE__ */ jsx(
64553
- DynamicIcon,
64554
- {
64555
- name: technology.icon,
64556
- size: 16,
64557
- className: "shrink-0"
64558
- }
64559
- ),
64560
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-medium", children: technology.title })
64561
- ]
64562
- },
64563
- technology.id
64564
- )) })
64565
- ] }) : null;
64566
- const solutionSection = solutionCards.length > 0 ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: solutionCards.map((solution) => /* @__PURE__ */ jsxs(
64567
- "div",
64568
- {
64569
- className: "flex min-w-0 flex-col rounded-lg border border-border p-4",
64570
- children: [
64571
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-3", children: /* @__PURE__ */ jsxs(
64572
- Pressable,
64573
- {
64574
- href: solution.href,
64575
- className: "group flex min-w-0 flex-col text-left",
64576
- children: [
64577
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [
64578
- /* @__PURE__ */ jsx("strong", { className: "min-w-0 break-words text-sm font-medium", children: solution.title }),
64579
- /* @__PURE__ */ jsx(
64580
- DynamicIcon,
64581
- {
64582
- name: "lucide/arrow-right",
64583
- size: 14,
64584
- className: "shrink-0 transition-transform group-hover:translate-x-1"
64585
- }
64586
- )
64587
- ] }),
64588
- /* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: solution.description })
64589
- ]
64590
- }
64591
- ) }),
64592
- /* @__PURE__ */ jsx("menu", { className: "mt-3 grid gap-2", children: solution.subpages.map((subpage) => /* @__PURE__ */ jsxs(
64585
+ className: cn(
64586
+ "grid gap-2",
64587
+ hasFeaturedCard ? "grid-cols-2" : "grid-cols-[repeat(auto-fit,minmax(160px,1fr))]"
64588
+ ),
64589
+ children: visiblePlatformItems.map((technology) => /* @__PURE__ */ jsxs(
64593
64590
  NavigationMenuLink,
64594
64591
  {
64595
- href: subpage.href,
64596
- className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64592
+ href: technology.href,
64593
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 hover:bg-muted",
64597
64594
  children: [
64598
64595
  /* @__PURE__ */ jsx(
64599
64596
  DynamicIcon,
64600
64597
  {
64601
- name: subpage.icon,
64602
- size: 14,
64598
+ name: technology.icon,
64599
+ size: 16,
64603
64600
  className: "shrink-0"
64604
64601
  }
64605
64602
  ),
64606
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: subpage.title })
64603
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-medium", children: technology.title })
64607
64604
  ]
64608
64605
  },
64609
- subpage.id
64610
- )) })
64611
- ]
64612
- },
64613
- solution.id
64614
- )) }) : null;
64615
- if (featuredCard) {
64616
- 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: [
64617
- /* @__PURE__ */ jsx("div", { className: "min-w-0", children: featuredCard }),
64618
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
64619
- platformSection,
64620
- solutionSection
64621
- ] })
64622
- ] });
64623
- }
64624
- return /* @__PURE__ */ jsxs("div", { className: "grid w-[1200px] max-w-[calc(100vw-4rem)] grid-cols-2 gap-4", children: [
64625
- platformSection,
64626
- solutionCards.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-2 grid grid-cols-4 gap-3", children: solutionCards.map((solution) => /* @__PURE__ */ jsxs(
64627
- "div",
64628
- {
64629
- className: "flex min-w-0 flex-col rounded-lg border border-border p-4",
64630
- children: [
64631
- /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-3", children: /* @__PURE__ */ jsxs(
64632
- Pressable,
64633
- {
64634
- href: solution.href,
64635
- className: "group flex min-w-0 flex-col text-left",
64636
- children: [
64637
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [
64638
- /* @__PURE__ */ jsx("strong", { className: "min-w-0 break-words text-sm font-medium", children: solution.title }),
64606
+ technology.id
64607
+ ))
64608
+ }
64609
+ )
64610
+ ] }) : null;
64611
+ const solutionSection = hasSolutionSection ? /* @__PURE__ */ jsx(
64612
+ "div",
64613
+ {
64614
+ className: cn(
64615
+ "grid gap-3",
64616
+ hasFeaturedCard ? "grid-cols-2" : "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]"
64617
+ ),
64618
+ children: visibleSolutionCards.map((solution) => /* @__PURE__ */ jsxs(
64619
+ "div",
64620
+ {
64621
+ className: "flex min-w-0 flex-col rounded-lg border border-border p-4",
64622
+ children: [
64623
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border pb-3", children: /* @__PURE__ */ jsxs(
64624
+ Pressable,
64625
+ {
64626
+ href: solution.href,
64627
+ className: "group flex min-w-0 flex-col text-left",
64628
+ children: [
64629
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [
64630
+ /* @__PURE__ */ jsx("strong", { className: "min-w-0 break-words text-sm font-medium", children: solution.title }),
64631
+ /* @__PURE__ */ jsx(
64632
+ DynamicIcon,
64633
+ {
64634
+ name: "lucide/arrow-right",
64635
+ size: 14,
64636
+ className: "shrink-0 transition-transform group-hover:translate-x-1"
64637
+ }
64638
+ )
64639
+ ] }),
64640
+ /* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: solution.description })
64641
+ ]
64642
+ }
64643
+ ) }),
64644
+ /* @__PURE__ */ jsx("menu", { className: "mt-3 grid gap-2", children: (solution.subpages ?? []).map((subpage) => /* @__PURE__ */ jsxs(
64645
+ NavigationMenuLink,
64646
+ {
64647
+ href: subpage.href,
64648
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64649
+ children: [
64639
64650
  /* @__PURE__ */ jsx(
64640
64651
  DynamicIcon,
64641
64652
  {
64642
- name: "lucide/arrow-right",
64653
+ name: subpage.icon,
64643
64654
  size: 14,
64644
- className: "shrink-0 transition-transform group-hover:translate-x-1"
64655
+ className: "shrink-0"
64645
64656
  }
64646
- )
64647
- ] }),
64648
- /* @__PURE__ */ jsx("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: solution.description })
64649
- ]
64650
- }
64651
- ) }),
64652
- /* @__PURE__ */ jsx("menu", { className: "mt-3 grid gap-2", children: solution.subpages.map((subpage) => /* @__PURE__ */ jsxs(
64653
- NavigationMenuLink,
64654
- {
64655
- href: subpage.href,
64656
- className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64657
- children: [
64658
- /* @__PURE__ */ jsx(
64659
- DynamicIcon,
64660
- {
64661
- name: subpage.icon,
64662
- size: 14,
64663
- className: "shrink-0"
64664
- }
64665
- ),
64666
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: subpage.title })
64667
- ]
64668
- },
64669
- subpage.id
64670
- )) })
64671
- ]
64672
- },
64673
- solution.id
64674
- )) })
64675
- ] });
64657
+ ),
64658
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: subpage.title })
64659
+ ]
64660
+ },
64661
+ subpage.id
64662
+ )) })
64663
+ ]
64664
+ },
64665
+ solution.id
64666
+ ))
64667
+ }
64668
+ ) : null;
64669
+ return /* @__PURE__ */ jsxs(
64670
+ "div",
64671
+ {
64672
+ className: cn(
64673
+ "grid gap-4",
64674
+ PANEL_MAX_WIDTH_CLASS,
64675
+ 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"
64676
+ ),
64677
+ children: [
64678
+ featuredCard && /* @__PURE__ */ jsx("div", { className: "min-w-0", children: featuredCard }),
64679
+ hasRightColumn && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
64680
+ platformSection,
64681
+ solutionSection
64682
+ ] })
64683
+ ]
64684
+ }
64685
+ );
64676
64686
  };
64677
64687
  var ProductsMenu = ({
64678
64688
  productCategories,
64679
64689
  featuredHeroCard,
64680
64690
  optixFlowConfig
64681
- }) => /* @__PURE__ */ jsxs("div", { className: "grid w-[1100px] grid-cols-[320px_1fr] gap-6", children: [
64682
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
64683
- Pressable,
64691
+ }) => {
64692
+ const visibleCategories = productCategories.filter(
64693
+ (category) => hasItems(category.products)
64694
+ );
64695
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
64696
+ const hasProductContent = hasItems(visibleCategories);
64697
+ if (!hasFeaturedCard && !hasProductContent) return null;
64698
+ return /* @__PURE__ */ jsxs(
64699
+ "div",
64684
64700
  {
64685
- href: featuredHeroCard.href,
64686
64701
  className: cn(
64687
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
64688
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
64702
+ "grid gap-6",
64703
+ PANEL_MAX_WIDTH_CLASS,
64704
+ hasFeaturedCard && hasProductContent ? "w-[1100px] grid-cols-[320px_1fr]" : hasProductContent ? "w-[860px] grid-cols-1" : "w-[360px] grid-cols-1"
64689
64705
  ),
64690
64706
  children: [
64691
- /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsx(
64692
- Img,
64707
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: /* @__PURE__ */ jsx(
64708
+ FeaturedHeroCardPanel,
64693
64709
  {
64694
- src: featuredHeroCard.image,
64695
- alt: featuredHeroCard.title,
64696
- className: "h-full w-full object-cover",
64697
- optixFlowConfig,
64698
- loading: "eager"
64710
+ card: featuredHeroCard,
64711
+ optixFlowConfig
64699
64712
  }
64700
64713
  ) }),
64701
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
64702
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
64703
- featuredHeroCard.title,
64704
- /* @__PURE__ */ jsx(
64705
- DynamicIcon,
64706
- {
64707
- name: "lucide/arrow-right",
64708
- size: 16,
64709
- className: "transition-transform group-hover:translate-x-1"
64710
- }
64711
- )
64712
- ] }),
64713
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-primary-foreground/85", children: featuredHeroCard.description })
64714
- ] })
64715
- ]
64716
- }
64717
- ) }),
64718
- 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: [
64719
- /* @__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 }) }),
64720
- /* @__PURE__ */ jsx("menu", { className: "grid grid-cols-3 gap-3", children: category.products.map((product) => /* @__PURE__ */ jsxs(
64721
- NavigationMenuLink,
64722
- {
64723
- href: product.href,
64724
- className: "group col-span-1 !flex !w-full items-center gap-3 rounded-lg p-3 text-left hover:bg-muted",
64725
- children: [
64726
- /* @__PURE__ */ jsx("div", { className: "relative flex size-12 shrink-0 items-center justify-center overflow-hidden rounded", children: /* @__PURE__ */ jsx(
64727
- Img,
64714
+ 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: [
64715
+ /* @__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 }) }),
64716
+ /* @__PURE__ */ jsx(
64717
+ "menu",
64728
64718
  {
64729
- src: product.image,
64730
- alt: product.title,
64731
- className: "h-full w-full object-cover",
64732
- optixFlowConfig,
64733
- loading: "eager"
64719
+ className: cn(
64720
+ "grid gap-3",
64721
+ hasFeaturedCard ? "grid-cols-3" : "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]"
64722
+ ),
64723
+ children: category.products.map((product) => /* @__PURE__ */ jsxs(
64724
+ NavigationMenuLink,
64725
+ {
64726
+ href: product.href,
64727
+ className: "group col-span-1 !flex !w-full min-w-0 items-center gap-3 rounded-lg p-3 text-left hover:bg-muted",
64728
+ children: [
64729
+ /* @__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(
64730
+ Img,
64731
+ {
64732
+ src: product.image,
64733
+ alt: product.title,
64734
+ className: "h-full w-full object-cover",
64735
+ optixFlowConfig,
64736
+ loading: "eager"
64737
+ }
64738
+ ) : /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/package", size: 18 }) }),
64739
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64740
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: product.title }),
64741
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: product.description })
64742
+ ] })
64743
+ ]
64744
+ },
64745
+ product.id
64746
+ ))
64734
64747
  }
64735
- ) }),
64736
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64737
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: product.title }),
64738
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: product.description })
64739
- ] })
64740
- ]
64741
- },
64742
- product.id
64743
- )) })
64744
- ] }, category.title)) })
64745
- ] });
64748
+ )
64749
+ ] }, category.title)) })
64750
+ ]
64751
+ }
64752
+ );
64753
+ };
64746
64754
  var ResourcesMenu = ({
64747
64755
  resourceItems,
64748
64756
  resourcesTitle = "Resources",
64749
64757
  topicGroups,
64750
- featuredHeroCard
64751
- }) => /* @__PURE__ */ jsxs("div", { className: "grid w-[1100px] grid-cols-[280px_1fr_220px] gap-6", children: [
64752
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
64753
- Pressable,
64758
+ featuredHeroCard,
64759
+ optixFlowConfig
64760
+ }) => {
64761
+ const visibleTopicGroups = topicGroups.filter(
64762
+ (group) => hasItems(group.topics)
64763
+ );
64764
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
64765
+ const hasResourceContent = hasItems(resourceItems);
64766
+ const hasTopicContent = hasItems(visibleTopicGroups);
64767
+ if (!hasFeaturedCard && !hasResourceContent && !hasTopicContent) return null;
64768
+ return /* @__PURE__ */ jsxs(
64769
+ "div",
64754
64770
  {
64755
- href: featuredHeroCard.href,
64756
64771
  className: cn(
64757
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
64758
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
64772
+ "grid gap-6",
64773
+ PANEL_MAX_WIDTH_CLASS,
64774
+ 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"
64759
64775
  ),
64760
64776
  children: [
64761
- /* @__PURE__ */ jsx("div", { className: "relative aspect-[4/3] w-full overflow-hidden", children: /* @__PURE__ */ jsx(
64762
- Img,
64777
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: /* @__PURE__ */ jsx(
64778
+ FeaturedHeroCardPanel,
64763
64779
  {
64764
- src: featuredHeroCard.image,
64765
- alt: featuredHeroCard.title,
64766
- className: "h-full w-full object-cover invert",
64767
- loading: "eager"
64780
+ card: featuredHeroCard,
64781
+ optixFlowConfig,
64782
+ imageContainerClassName: "relative aspect-[4/3] w-full overflow-hidden",
64783
+ imageClassName: "invert"
64768
64784
  }
64769
64785
  ) }),
64770
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
64771
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
64772
- featuredHeroCard.title,
64773
- /* @__PURE__ */ jsx(
64774
- DynamicIcon,
64775
- {
64776
- name: "lucide/arrow-right",
64777
- size: 16,
64778
- className: "transition-transform group-hover:translate-x-1"
64779
- }
64780
- )
64781
- ] }),
64782
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed", children: featuredHeroCard.description })
64783
- ] })
64784
- ]
64785
- }
64786
- ) }),
64787
- resourceItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "col-span-1", children: [
64788
- /* @__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 }) }),
64789
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: resourceItems.map((resource) => /* @__PURE__ */ jsxs(
64790
- NavigationMenuLink,
64791
- {
64792
- href: resource.href,
64793
- className: "group col-span-1 !flex !w-full items-start gap-3 rounded-lg border border-border p-3 hover:bg-muted",
64794
- children: [
64786
+ hasResourceContent && /* @__PURE__ */ jsxs("div", { className: "col-span-1 min-w-0", children: [
64787
+ /* @__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 }) }),
64795
64788
  /* @__PURE__ */ jsx(
64796
- DynamicIcon,
64789
+ "div",
64797
64790
  {
64798
- name: resource.icon,
64799
- size: 18,
64800
- className: "mt-0.5 shrink-0"
64791
+ className: cn(
64792
+ "grid gap-3",
64793
+ resourceItems.length > 1 ? "grid-cols-2" : "grid-cols-1"
64794
+ ),
64795
+ children: resourceItems.map((resource) => /* @__PURE__ */ jsxs(
64796
+ NavigationMenuLink,
64797
+ {
64798
+ href: resource.href,
64799
+ 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",
64800
+ children: [
64801
+ /* @__PURE__ */ jsx(
64802
+ DynamicIcon,
64803
+ {
64804
+ name: resource.icon,
64805
+ size: 18,
64806
+ className: "mt-0.5 shrink-0"
64807
+ }
64808
+ ),
64809
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64810
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: resource.title }),
64811
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: resource.description })
64812
+ ] })
64813
+ ]
64814
+ },
64815
+ resource.id
64816
+ ))
64801
64817
  }
64802
- ),
64803
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64804
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: resource.title }),
64805
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: resource.description })
64806
- ] })
64807
- ]
64808
- },
64809
- resource.id
64810
- )) })
64811
- ] }),
64812
- topicGroups.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: topicGroups.map((group) => /* @__PURE__ */ jsxs("div", { className: "mb-5 last:mb-0", children: [
64813
- /* @__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 }) }),
64814
- /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: group.topics.map((topic) => /* @__PURE__ */ jsxs(
64815
- NavigationMenuLink,
64816
- {
64817
- href: topic.href,
64818
- className: "group !flex !w-full items-center gap-2 rounded-lg p-2 hover:bg-muted",
64819
- children: [
64820
- /* @__PURE__ */ jsx(
64821
- DynamicIcon,
64818
+ )
64819
+ ] }),
64820
+ 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: [
64821
+ /* @__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 }) }),
64822
+ /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: group.topics.map((topic) => /* @__PURE__ */ jsxs(
64823
+ NavigationMenuLink,
64822
64824
  {
64823
- name: topic.icon,
64824
- size: 14,
64825
- className: "shrink-0"
64826
- }
64827
- ),
64828
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 text-sm font-medium", children: topic.title })
64829
- ]
64830
- },
64831
- topic.id
64832
- )) })
64833
- ] }, group.title)) })
64834
- ] });
64825
+ href: topic.href,
64826
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 hover:bg-muted",
64827
+ children: [
64828
+ /* @__PURE__ */ jsx(
64829
+ DynamicIcon,
64830
+ {
64831
+ name: topic.icon,
64832
+ size: 14,
64833
+ className: "shrink-0"
64834
+ }
64835
+ ),
64836
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: topic.title })
64837
+ ]
64838
+ },
64839
+ topic.id
64840
+ )) })
64841
+ ] }, group.title)) })
64842
+ ]
64843
+ }
64844
+ );
64845
+ };
64835
64846
  var GlobalMenu = ({
64836
64847
  featureCategories,
64837
64848
  regions,
64838
64849
  locationsTitle = "Locations",
64839
64850
  featuredHeroCard,
64840
64851
  optixFlowConfig
64841
- }) => /* @__PURE__ */ jsxs("div", { className: "w-[1100px]", children: [
64842
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[280px_1fr] gap-6", children: [
64843
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
64844
- Pressable,
64845
- {
64846
- href: featuredHeroCard.href,
64847
- className: cn(
64848
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
64849
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
64850
- ),
64851
- children: [
64852
- /* @__PURE__ */ jsx("div", { className: "relative aspect-[4/3] w-full overflow-hidden", children: /* @__PURE__ */ jsx(
64853
- Img,
64854
- {
64855
- src: featuredHeroCard.image,
64856
- alt: featuredHeroCard.title,
64857
- className: "h-full w-full object-cover",
64858
- optixFlowConfig,
64859
- loading: "eager"
64860
- }
64861
- ) }),
64862
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
64863
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
64864
- featuredHeroCard.title,
64865
- /* @__PURE__ */ jsx(
64866
- DynamicIcon,
64852
+ }) => {
64853
+ const visibleFeatureCategories = featureCategories.filter(
64854
+ (category) => hasItems(category.features)
64855
+ );
64856
+ const visibleRegions = regions.filter((region) => hasItems(region.locations));
64857
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
64858
+ const hasFeatureContent = hasItems(visibleFeatureCategories);
64859
+ const hasRegionContent = hasItems(visibleRegions);
64860
+ if (!hasFeaturedCard && !hasFeatureContent && !hasRegionContent) return null;
64861
+ return /* @__PURE__ */ jsxs(
64862
+ "div",
64863
+ {
64864
+ className: cn(
64865
+ PANEL_MAX_WIDTH_CLASS,
64866
+ hasFeatureContent && hasFeaturedCard ? "w-[1100px]" : hasFeatureContent || hasRegionContent ? "w-[900px]" : "w-[320px]"
64867
+ ),
64868
+ children: [
64869
+ (hasFeaturedCard || hasFeatureContent) && /* @__PURE__ */ jsxs(
64870
+ "div",
64871
+ {
64872
+ className: cn(
64873
+ "grid gap-6",
64874
+ hasFeaturedCard && hasFeatureContent ? "grid-cols-[280px_1fr]" : "grid-cols-1"
64875
+ ),
64876
+ children: [
64877
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx(
64878
+ "div",
64867
64879
  {
64868
- name: "lucide/arrow-right",
64869
- size: 16,
64870
- className: "transition-transform group-hover:translate-x-1"
64871
- }
64872
- )
64873
- ] }),
64874
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed text-primary-foreground/85", children: featuredHeroCard.description })
64875
- ] })
64876
- ]
64877
- }
64878
- ) }),
64879
- 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: [
64880
- /* @__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 }) }),
64881
- /* @__PURE__ */ jsx("menu", { className: "grid grid-cols-3 gap-3", children: category.features.map((feature) => /* @__PURE__ */ jsxs(
64882
- NavigationMenuLink,
64883
- {
64884
- href: feature.href,
64885
- className: "group col-span-1 !flex !w-full items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64886
- children: [
64887
- /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon, size: 18 }) }),
64888
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64889
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: feature.title }),
64890
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: feature.description })
64891
- ] })
64892
- ]
64893
- },
64894
- feature.id
64895
- )) })
64896
- ] }, category.title)) })
64897
- ] }),
64898
- regions.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-6", children: [
64899
- /* @__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 }) }),
64900
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-4 gap-4", children: regions.map((region) => /* @__PURE__ */ jsxs(
64901
- "div",
64902
- {
64903
- className: "col-span-1 flex w-full flex-col gap-3",
64904
- children: [
64905
- /* @__PURE__ */ jsx("div", { className: "text-left text-xs font-medium text-muted-foreground", children: region.title }),
64906
- /* @__PURE__ */ jsx("menu", { className: "grid gap-1.5", children: region.locations.map((location) => /* @__PURE__ */ jsxs(
64907
- NavigationMenuLink,
64880
+ className: cn(
64881
+ "col-span-1 min-w-0",
64882
+ !hasFeatureContent && hasRegionContent && "max-w-[320px]"
64883
+ ),
64884
+ children: /* @__PURE__ */ jsx(
64885
+ FeaturedHeroCardPanel,
64886
+ {
64887
+ card: featuredHeroCard,
64888
+ optixFlowConfig,
64889
+ imageContainerClassName: "relative aspect-[4/3] w-full overflow-hidden"
64890
+ }
64891
+ )
64892
+ }
64893
+ ),
64894
+ 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: [
64895
+ /* @__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 }) }),
64896
+ /* @__PURE__ */ jsx(
64897
+ "menu",
64898
+ {
64899
+ className: cn(
64900
+ "grid gap-3",
64901
+ hasFeaturedCard ? "grid-cols-3" : "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]"
64902
+ ),
64903
+ children: category.features.map((feature) => /* @__PURE__ */ jsxs(
64904
+ NavigationMenuLink,
64905
+ {
64906
+ href: feature.href,
64907
+ className: "group col-span-1 !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64908
+ children: [
64909
+ /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon, size: 18 }) }),
64910
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64911
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: feature.title }),
64912
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: feature.description })
64913
+ ] })
64914
+ ]
64915
+ },
64916
+ feature.id
64917
+ ))
64918
+ }
64919
+ )
64920
+ ] }, category.title)) })
64921
+ ]
64922
+ }
64923
+ ),
64924
+ hasRegionContent && /* @__PURE__ */ jsxs("div", { className: cn(hasFeaturedCard || hasFeatureContent ? "mt-6" : ""), children: [
64925
+ /* @__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 }) }),
64926
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-4", children: visibleRegions.map((region) => /* @__PURE__ */ jsxs(
64927
+ "div",
64908
64928
  {
64909
- href: location.href,
64910
- className: "group !flex !w-full items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64929
+ className: "col-span-1 flex w-full min-w-0 flex-col gap-3",
64911
64930
  children: [
64912
- /* @__PURE__ */ jsx("div", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(
64913
- DynamicIcon,
64931
+ /* @__PURE__ */ jsx("div", { className: "break-words text-left text-xs font-medium text-muted-foreground", children: region.title }),
64932
+ /* @__PURE__ */ jsx("menu", { className: "grid gap-1.5", children: region.locations.map((location) => /* @__PURE__ */ jsxs(
64933
+ NavigationMenuLink,
64914
64934
  {
64915
- name: location.icon,
64916
- size: 16,
64917
- className: "shrink-0"
64918
- }
64919
- ) }),
64920
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm font-medium", children: location.title })
64935
+ href: location.href,
64936
+ className: "group !flex !w-full min-w-0 items-center gap-2 rounded-lg p-2 text-left hover:bg-muted",
64937
+ children: [
64938
+ /* @__PURE__ */ jsx("div", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(
64939
+ DynamicIcon,
64940
+ {
64941
+ name: location.icon,
64942
+ size: 16,
64943
+ className: "shrink-0"
64944
+ }
64945
+ ) }),
64946
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium", children: location.title })
64947
+ ]
64948
+ },
64949
+ location.title
64950
+ )) })
64921
64951
  ]
64922
64952
  },
64923
- location.title
64953
+ region.title
64924
64954
  )) })
64925
- ]
64926
- },
64927
- region.title
64928
- )) })
64929
- ] })
64930
- ] });
64955
+ ] })
64956
+ ]
64957
+ }
64958
+ );
64959
+ };
64931
64960
  var PartnersMenu = ({
64932
64961
  partnerCards,
64933
64962
  featuredHeroCard,
64934
64963
  optixFlowConfig
64935
- }) => /* @__PURE__ */ jsxs("div", { className: "grid w-[1000px] grid-cols-[2fr_1fr] gap-6", children: [
64936
- featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1", children: /* @__PURE__ */ jsxs(
64937
- Pressable,
64964
+ }) => {
64965
+ const hasFeaturedCard = hasFeaturedHeroCardContent(featuredHeroCard);
64966
+ const hasPartnerContent = hasItems(partnerCards);
64967
+ if (!hasFeaturedCard && !hasPartnerContent) return null;
64968
+ return /* @__PURE__ */ jsxs(
64969
+ "div",
64938
64970
  {
64939
- href: featuredHeroCard.href,
64940
64971
  className: cn(
64941
- "group flex h-full flex-col overflow-hidden rounded-lg text-primary-foreground",
64942
- featuredHeroCard.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
64972
+ "grid gap-6",
64973
+ PANEL_MAX_WIDTH_CLASS,
64974
+ hasFeaturedCard && hasPartnerContent ? "w-[1000px] grid-cols-[2fr_1fr]" : hasPartnerContent ? "w-[680px] grid-cols-1" : "w-[360px] grid-cols-1"
64943
64975
  ),
64944
64976
  children: [
64945
- /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsx(
64946
- Img,
64977
+ hasFeaturedCard && featuredHeroCard && /* @__PURE__ */ jsx("div", { className: "col-span-1 min-w-0", children: /* @__PURE__ */ jsx(
64978
+ FeaturedHeroCardPanel,
64947
64979
  {
64948
- src: featuredHeroCard.image,
64949
- alt: featuredHeroCard.title,
64950
- className: cn(
64951
- "h-full w-full object-cover",
64952
- featuredHeroCard.imagePosition === "background" && "invert"
64953
- ),
64980
+ card: featuredHeroCard,
64954
64981
  optixFlowConfig,
64955
- loading: "eager"
64982
+ imageClassName: cn(
64983
+ featuredHeroCard.imagePosition === "background" && "invert"
64984
+ )
64956
64985
  }
64957
64986
  ) }),
64958
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-5", children: [
64959
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-base font-semibold", children: [
64960
- featuredHeroCard.title,
64961
- /* @__PURE__ */ jsx(
64962
- DynamicIcon,
64987
+ hasPartnerContent && /* @__PURE__ */ jsx(
64988
+ "div",
64989
+ {
64990
+ className: cn(
64991
+ "col-span-1 min-w-0 gap-3",
64992
+ hasFeaturedCard ? "flex flex-col" : "grid grid-cols-[repeat(auto-fit,minmax(240px,1fr))]"
64993
+ ),
64994
+ children: partnerCards.map((card) => /* @__PURE__ */ jsxs(
64995
+ NavigationMenuLink,
64963
64996
  {
64964
- name: "lucide/arrow-right",
64965
- size: 16,
64966
- className: "transition-transform group-hover:translate-x-1"
64967
- }
64968
- )
64969
- ] }),
64970
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm leading-relaxed", children: featuredHeroCard.description })
64971
- ] })
64997
+ href: card.href,
64998
+ className: "group !flex !w-full min-w-0 items-start gap-3 rounded-lg border border-border p-4 hover:bg-muted",
64999
+ children: [
65000
+ /* @__PURE__ */ jsx(DynamicIcon, { name: card.icon, size: 28, className: "shrink-0" }),
65001
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
65002
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-bold", children: card.title }),
65003
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: card.description })
65004
+ ] })
65005
+ ]
65006
+ },
65007
+ card.title
65008
+ ))
65009
+ }
65010
+ )
64972
65011
  ]
64973
65012
  }
64974
- ) }),
64975
- partnerCards.length > 0 && /* @__PURE__ */ jsx("div", { className: "col-span-1 flex flex-col gap-3", children: partnerCards.map((card) => /* @__PURE__ */ jsxs(
64976
- NavigationMenuLink,
64977
- {
64978
- href: card.href,
64979
- className: "group !flex !w-full items-start gap-3 rounded-lg border border-border p-4 hover:bg-muted",
64980
- children: [
64981
- /* @__PURE__ */ jsx(DynamicIcon, { name: card.icon, size: 28, className: "shrink-0" }),
64982
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
64983
- /* @__PURE__ */ jsx("div", { className: "text-sm font-bold", children: card.title }),
64984
- /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: card.description })
64985
- ] })
64986
- ]
64987
- },
64988
- card.title
64989
- )) })
64990
- ] });
65013
+ );
65014
+ };
64991
65015
  var MOBILE_BREAKPOINT = 1024;
64992
65016
  var NavbarEnterpriseMega = ({
64993
65017
  className,
@@ -65157,20 +65181,48 @@ var NavbarEnterpriseMega = ({
65157
65181
  )
65158
65182
  ] });
65159
65183
  };
65184
+ var hasItems2 = (items) => Array.isArray(items) && items.length > 0;
65185
+ var hasFeaturedHeroCardContent2 = (card) => Boolean(
65186
+ card && (card.title || card.subtitle || card.description || card.image)
65187
+ );
65188
+ var hasGenericDropdownContent = (item) => hasItems2(item.links) || Boolean(item.dropdownGroups?.some((group) => hasItems2(group.links)));
65189
+ var hasLayoutSpecificDropdownContent = (item) => {
65190
+ switch (item.layout) {
65191
+ case "solutions-with-platform":
65192
+ return hasItems2(item.solutionCards) || hasItems2(item.platformItems) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
65193
+ case "products-categorized":
65194
+ return Boolean(
65195
+ item.productCategories?.some(
65196
+ (category) => hasItems2(category.products)
65197
+ )
65198
+ ) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
65199
+ case "features-with-locations":
65200
+ return Boolean(
65201
+ item.featureCategories?.some(
65202
+ (category) => hasItems2(category.features)
65203
+ )
65204
+ ) || Boolean(item.regions?.some((region) => hasItems2(region.locations))) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
65205
+ case "partners-promotional":
65206
+ return hasItems2(item.partnerCards) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
65207
+ case "resources-with-topics":
65208
+ return hasItems2(item.resourceItems) || Boolean(
65209
+ item.topicGroups?.some((group) => hasItems2(group.topics))
65210
+ ) || hasFeaturedHeroCardContent2(item.featuredHeroCard);
65211
+ default:
65212
+ return false;
65213
+ }
65214
+ };
65215
+ var hasDropdownContent = (item) => hasLayoutSpecificDropdownContent(item) || hasGenericDropdownContent(item);
65160
65216
  var DesktopMenuItem2 = ({
65161
65217
  item,
65162
65218
  index,
65163
65219
  optixFlowConfig
65164
65220
  }) => {
65165
- const hasDropdown = Boolean(item.layout);
65166
- const effectiveLayout = item.layout || "solutions-with-platform";
65221
+ const hasDropdown = hasDropdownContent(item);
65167
65222
  if (hasDropdown) {
65168
65223
  return /* @__PURE__ */ jsxs(NavigationMenuItem, { value: `${index}`, children: [
65169
65224
  /* @__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 }),
65170
- /* @__PURE__ */ jsx(NavigationMenuContent, { className: "max-h-[calc(100vh-6rem)] overflow-y-auto rounded-xl! border-0! p-4!", children: renderDropdownContent(
65171
- { ...item, layout: effectiveLayout },
65172
- optixFlowConfig
65173
- ) })
65225
+ /* @__PURE__ */ jsx(NavigationMenuContent, { className: "max-h-[calc(100vh-6rem)] overflow-y-auto rounded-xl! border-0! p-4!", children: renderDropdownContent(item, optixFlowConfig) })
65174
65226
  ] }, `desktop-menu-item-${index}`);
65175
65227
  }
65176
65228
  return /* @__PURE__ */ jsx(NavigationMenuItem, { value: `${index}`, children: /* @__PURE__ */ jsx(
@@ -65183,6 +65235,9 @@ var DesktopMenuItem2 = ({
65183
65235
  ) }, `desktop-menu-item-${index}`);
65184
65236
  };
65185
65237
  var renderDropdownContent = (item, optixFlowConfig) => {
65238
+ if (!hasLayoutSpecificDropdownContent(item)) {
65239
+ return renderGenericDropdownContent(item, optixFlowConfig);
65240
+ }
65186
65241
  switch (item.layout) {
65187
65242
  case "solutions-with-platform":
65188
65243
  return /* @__PURE__ */ jsx(
@@ -65231,73 +65286,287 @@ var renderDropdownContent = (item, optixFlowConfig) => {
65231
65286
  resourceItems: item.resourceItems ?? [],
65232
65287
  resourcesTitle: item.resourcesTitle,
65233
65288
  topicGroups: item.topicGroups ?? [],
65234
- featuredHeroCard: item.featuredHeroCard
65289
+ featuredHeroCard: item.featuredHeroCard,
65290
+ optixFlowConfig
65235
65291
  }
65236
65292
  );
65237
65293
  default:
65238
- return null;
65294
+ return renderGenericDropdownContent(item, optixFlowConfig);
65239
65295
  }
65240
65296
  };
65241
- var renderMobileDropdownContent = (item) => {
65242
- switch (item.layout) {
65243
- case "solutions-with-platform":
65244
- return /* @__PURE__ */ jsx("div", { className: "flex flex-col space-y-2", children: item.solutionCards?.map((solution) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
65245
- /* @__PURE__ */ jsx(
65246
- Pressable,
65297
+ var renderGenericDropdownContent = (item, optixFlowConfig) => {
65298
+ const links = item.links ?? [];
65299
+ const groups = (item.dropdownGroups ?? []).filter(
65300
+ (group) => hasItems2(group.links)
65301
+ );
65302
+ const hasLinks = hasItems2(links);
65303
+ const hasGroups = hasItems2(groups);
65304
+ if (!hasLinks && !hasGroups) return null;
65305
+ const renderGenericLink = (link, key) => {
65306
+ const iconName = link.icon ?? link.iconName;
65307
+ const label = typeof link.label === "string" ? link.label : "";
65308
+ return /* @__PURE__ */ jsxs(
65309
+ NavigationMenuLink,
65310
+ {
65311
+ href: getLinkUrl(link),
65312
+ className: "group !flex !w-full min-w-0 items-start gap-3 rounded-lg p-3 text-left hover:bg-muted",
65313
+ children: [
65314
+ link.image ? /* @__PURE__ */ jsx("div", { className: "relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded bg-muted", children: /* @__PURE__ */ jsx(
65315
+ Img,
65316
+ {
65317
+ src: link.image,
65318
+ alt: label,
65319
+ className: "h-full w-full object-cover",
65320
+ optixFlowConfig,
65321
+ loading: "eager"
65322
+ }
65323
+ ) }) : iconName ? /* @__PURE__ */ jsx(
65324
+ DynamicIcon,
65325
+ {
65326
+ name: iconName,
65327
+ size: 18,
65328
+ className: "mt-0.5 shrink-0"
65329
+ }
65330
+ ) : null,
65331
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
65332
+ /* @__PURE__ */ jsx("div", { className: "break-words text-sm font-medium", children: link.label }),
65333
+ link.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 break-words text-xs text-muted-foreground", children: link.description })
65334
+ ] })
65335
+ ]
65336
+ },
65337
+ key
65338
+ );
65339
+ };
65340
+ return /* @__PURE__ */ jsxs(
65341
+ "div",
65342
+ {
65343
+ className: cn(
65344
+ "grid max-w-[calc(100vw-4rem)] gap-6",
65345
+ hasLinks && hasGroups ? "w-[900px] grid-cols-[minmax(0,1fr)_minmax(220px,0.45fr)]" : hasGroups ? "w-[780px] grid-cols-1" : "w-[420px] grid-cols-1"
65346
+ ),
65347
+ children: [
65348
+ hasGroups && /* @__PURE__ */ jsx(
65349
+ "div",
65247
65350
  {
65248
- href: solution.href,
65249
- className: "block pt-4 text-sm font-medium",
65250
- children: solution.title
65351
+ className: cn(
65352
+ "grid min-w-0 gap-5",
65353
+ !hasLinks && groups.length > 1 ? "grid-cols-[repeat(auto-fit,minmax(220px,1fr))]" : "grid-cols-1"
65354
+ ),
65355
+ children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
65356
+ /* @__PURE__ */ jsxs("div", { className: "mb-3 border-b border-border pb-2 text-left", children: [
65357
+ /* @__PURE__ */ jsx("strong", { className: "text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.label }),
65358
+ group.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: group.description })
65359
+ ] }),
65360
+ /* @__PURE__ */ jsx("menu", { className: "grid gap-1.5", children: group.links.map(
65361
+ (link, linkIndex) => renderGenericLink(link, `${groupIndex}-${linkIndex}`)
65362
+ ) })
65363
+ ] }, groupIndex))
65251
65364
  }
65252
65365
  ),
65253
- solution.subpages.map((subpage) => /* @__PURE__ */ jsxs(
65366
+ hasLinks && /* @__PURE__ */ jsx("menu", { className: "grid min-w-0 gap-1.5", children: links.map((link, linkIndex) => renderGenericLink(link, linkIndex)) })
65367
+ ]
65368
+ }
65369
+ );
65370
+ };
65371
+ var renderMobileFeaturedHeroCard = (card) => {
65372
+ if (!hasFeaturedHeroCardContent2(card) || !card) return null;
65373
+ return /* @__PURE__ */ jsxs(
65374
+ Pressable,
65375
+ {
65376
+ href: card.href,
65377
+ className: cn(
65378
+ "block rounded-lg p-4 text-sm font-medium text-primary-foreground",
65379
+ card.variant === "accent" ? "bg-accent text-accent-foreground" : "bg-primary"
65380
+ ),
65381
+ children: [
65382
+ /* @__PURE__ */ jsx("span", { children: card.title }),
65383
+ card.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-relaxed opacity-90", children: card.description })
65384
+ ]
65385
+ }
65386
+ );
65387
+ };
65388
+ var renderMobileDropdownContent = (item) => {
65389
+ if (!hasLayoutSpecificDropdownContent(item)) {
65390
+ return renderMobileGenericDropdownContent(item);
65391
+ }
65392
+ switch (item.layout) {
65393
+ case "solutions-with-platform":
65394
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-2", children: [
65395
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
65396
+ item.platformItems?.map((technology) => /* @__PURE__ */ jsxs(
65254
65397
  Pressable,
65255
65398
  {
65256
- href: subpage.href,
65399
+ href: technology.href,
65257
65400
  className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65258
65401
  children: [
65259
- /* @__PURE__ */ jsx(DynamicIcon, { name: subpage.icon, size: 14 }),
65260
- subpage.title
65402
+ /* @__PURE__ */ jsx(DynamicIcon, { name: technology.icon, size: 14 }),
65403
+ technology.title
65261
65404
  ]
65262
65405
  },
65263
- subpage.id
65264
- ))
65265
- ] }, solution.id)) });
65406
+ technology.id
65407
+ )),
65408
+ item.solutionCards?.map((solution) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
65409
+ /* @__PURE__ */ jsx(
65410
+ Pressable,
65411
+ {
65412
+ href: solution.href,
65413
+ className: "block pt-4 text-sm font-medium",
65414
+ children: solution.title
65415
+ }
65416
+ ),
65417
+ (solution.subpages ?? []).map((subpage) => /* @__PURE__ */ jsxs(
65418
+ Pressable,
65419
+ {
65420
+ href: subpage.href,
65421
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65422
+ children: [
65423
+ /* @__PURE__ */ jsx(DynamicIcon, { name: subpage.icon, size: 14 }),
65424
+ subpage.title
65425
+ ]
65426
+ },
65427
+ subpage.id
65428
+ ))
65429
+ ] }, solution.id))
65430
+ ] });
65266
65431
  case "products-categorized":
65267
- return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: item.productCategories?.flatMap(
65268
- (category) => category.products.map((product) => /* @__PURE__ */ jsx(
65432
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
65433
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
65434
+ item.productCategories?.flatMap(
65435
+ (category) => (category.products ?? []).map((product) => /* @__PURE__ */ jsx(
65436
+ Pressable,
65437
+ {
65438
+ href: product.href,
65439
+ className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
65440
+ children: product.title
65441
+ },
65442
+ product.id
65443
+ ))
65444
+ )
65445
+ ] });
65446
+ case "resources-with-topics":
65447
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
65448
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
65449
+ item.resourceItems?.map((resource) => /* @__PURE__ */ jsxs(
65269
65450
  Pressable,
65270
65451
  {
65271
- href: product.href,
65452
+ href: resource.href,
65272
65453
  className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
65273
- children: product.title
65454
+ children: [
65455
+ /* @__PURE__ */ jsx(DynamicIcon, { name: resource.icon, size: 14 }),
65456
+ resource.title
65457
+ ]
65458
+ },
65459
+ resource.id
65460
+ )),
65461
+ item.topicGroups?.map((group) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
65462
+ /* @__PURE__ */ jsx("div", { className: "pt-2 text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.title }),
65463
+ group.topics.map((topic) => /* @__PURE__ */ jsxs(
65464
+ Pressable,
65465
+ {
65466
+ href: topic.href,
65467
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65468
+ children: [
65469
+ /* @__PURE__ */ jsx(DynamicIcon, { name: topic.icon, size: 14 }),
65470
+ topic.title
65471
+ ]
65472
+ },
65473
+ topic.id
65474
+ ))
65475
+ ] }, group.title))
65476
+ ] });
65477
+ case "features-with-locations":
65478
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
65479
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
65480
+ item.featureCategories?.flatMap(
65481
+ (category) => (category.features ?? []).map((feature) => /* @__PURE__ */ jsxs(
65482
+ Pressable,
65483
+ {
65484
+ href: feature.href,
65485
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65486
+ children: [
65487
+ /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon, size: 14 }),
65488
+ feature.title
65489
+ ]
65490
+ },
65491
+ feature.id
65492
+ ))
65493
+ ),
65494
+ item.regions?.map((region) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
65495
+ /* @__PURE__ */ jsx("div", { className: "pt-2 text-xs font-medium tracking-wider text-muted-foreground uppercase", children: region.title }),
65496
+ region.locations.map((location) => /* @__PURE__ */ jsxs(
65497
+ Pressable,
65498
+ {
65499
+ href: location.href,
65500
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65501
+ children: [
65502
+ /* @__PURE__ */ jsx(DynamicIcon, { name: location.icon, size: 14 }),
65503
+ location.title
65504
+ ]
65505
+ },
65506
+ location.title
65507
+ ))
65508
+ ] }, region.title))
65509
+ ] });
65510
+ case "partners-promotional":
65511
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
65512
+ renderMobileFeaturedHeroCard(item.featuredHeroCard),
65513
+ item.partnerCards?.map((card) => /* @__PURE__ */ jsxs(
65514
+ Pressable,
65515
+ {
65516
+ href: card.href,
65517
+ className: "flex items-start gap-2 pl-4 text-sm text-muted-foreground",
65518
+ children: [
65519
+ /* @__PURE__ */ jsx(DynamicIcon, { name: card.icon, size: 14, className: "mt-0.5" }),
65520
+ /* @__PURE__ */ jsx("span", { children: card.title })
65521
+ ]
65274
65522
  },
65275
- product.id
65523
+ card.title
65276
65524
  ))
65277
- ) });
65278
- case "resources-with-topics":
65279
- return /* @__PURE__ */ jsx("div", { className: "space-y-4", children: item.resourceItems?.map((resource) => /* @__PURE__ */ jsxs(
65525
+ ] });
65526
+ default:
65527
+ return renderMobileGenericDropdownContent(item);
65528
+ }
65529
+ };
65530
+ var renderMobileGenericDropdownContent = (item) => {
65531
+ const links = item.links ?? [];
65532
+ const groups = (item.dropdownGroups ?? []).filter(
65533
+ (group) => hasItems2(group.links)
65534
+ );
65535
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
65536
+ groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
65537
+ /* @__PURE__ */ jsx("div", { className: "pt-2 text-xs font-medium tracking-wider text-muted-foreground uppercase", children: group.label }),
65538
+ group.links.map((link, linkIndex) => {
65539
+ const iconName = link.icon ?? link.iconName;
65540
+ return /* @__PURE__ */ jsxs(
65541
+ Pressable,
65542
+ {
65543
+ href: getLinkUrl(link),
65544
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65545
+ children: [
65546
+ iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 14 }),
65547
+ link.label
65548
+ ]
65549
+ },
65550
+ `${groupIndex}-${linkIndex}`
65551
+ );
65552
+ })
65553
+ ] }, groupIndex)),
65554
+ links.map((link, linkIndex) => {
65555
+ const iconName = link.icon ?? link.iconName;
65556
+ return /* @__PURE__ */ jsxs(
65280
65557
  Pressable,
65281
65558
  {
65282
- href: resource.href,
65283
- className: "flex items-center pl-4 gap-2 text-sm text-muted-foreground",
65559
+ href: getLinkUrl(link),
65560
+ className: "flex items-center gap-2 pl-4 text-sm text-muted-foreground",
65284
65561
  children: [
65285
- /* @__PURE__ */ jsx(DynamicIcon, { name: resource.icon, size: 14 }),
65286
- resource.title
65562
+ iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 14 }),
65563
+ link.label
65287
65564
  ]
65288
65565
  },
65289
- resource.id
65290
- )) });
65291
- case "features-with-locations":
65292
- case "partners-promotional":
65293
- return /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsxs(Pressable, { href: "#", children: [
65294
- "View all",
65295
- " ",
65296
- typeof item.label === "string" ? item.label.toLowerCase() : "items"
65297
- ] }) });
65298
- default:
65299
- return null;
65300
- }
65566
+ linkIndex
65567
+ );
65568
+ })
65569
+ ] });
65301
65570
  };
65302
65571
  var MobileNavigationMenu = ({
65303
65572
  open,
@@ -65344,7 +65613,7 @@ var MobileNavigationMenu = ({
65344
65613
  title: "Mobile Navigation",
65345
65614
  children: /* @__PURE__ */ jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
65346
65615
  /* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full", children: menuLinks.map((item, index) => {
65347
- const hasDropdown = Boolean(item.layout);
65616
+ const hasDropdown = hasDropdownContent(item);
65348
65617
  if (hasDropdown) {
65349
65618
  return /* @__PURE__ */ jsxs(
65350
65619
  AccordionItem,