@opensite/ui 1.0.9 → 1.1.0

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.
Files changed (41) hide show
  1. package/dist/navbar-animated-preview.cjs +27 -17
  2. package/dist/navbar-animated-preview.js +27 -17
  3. package/dist/navbar-centered-menu.cjs +20 -10
  4. package/dist/navbar-centered-menu.js +20 -10
  5. package/dist/navbar-dark-icons.cjs +20 -10
  6. package/dist/navbar-dark-icons.js +20 -10
  7. package/dist/navbar-dropdown-menu.cjs +20 -10
  8. package/dist/navbar-dropdown-menu.js +20 -10
  9. package/dist/navbar-education-platform.cjs +81 -56
  10. package/dist/navbar-education-platform.js +81 -56
  11. package/dist/navbar-enterprise-mega.cjs +21 -11
  12. package/dist/navbar-enterprise-mega.js +21 -11
  13. package/dist/navbar-feature-grid.cjs +20 -10
  14. package/dist/navbar-feature-grid.js +20 -10
  15. package/dist/navbar-icon-links.cjs +20 -10
  16. package/dist/navbar-icon-links.js +20 -10
  17. package/dist/navbar-image-preview.cjs +20 -10
  18. package/dist/navbar-image-preview.js +20 -10
  19. package/dist/navbar-mega-menu.cjs +20 -10
  20. package/dist/navbar-mega-menu.js +20 -10
  21. package/dist/navbar-multi-column-groups.cjs +52 -35
  22. package/dist/navbar-multi-column-groups.js +52 -35
  23. package/dist/navbar-platform-resources.cjs +20 -10
  24. package/dist/navbar-platform-resources.js +20 -10
  25. package/dist/navbar-search-focused.cjs +20 -10
  26. package/dist/navbar-search-focused.js +20 -10
  27. package/dist/navbar-sidebar-mobile.cjs +21 -10
  28. package/dist/navbar-sidebar-mobile.js +21 -10
  29. package/dist/navbar-simple-links.cjs +22 -12
  30. package/dist/navbar-simple-links.js +22 -12
  31. package/dist/navbar-split-cta.cjs +20 -10
  32. package/dist/navbar-split-cta.js +20 -10
  33. package/dist/navbar-sticky-compact.cjs +240 -123
  34. package/dist/navbar-sticky-compact.js +239 -123
  35. package/dist/navbar-tabbed-sections.cjs +20 -10
  36. package/dist/navbar-tabbed-sections.js +20 -10
  37. package/dist/navbar-transparent-overlay.cjs +21 -10
  38. package/dist/navbar-transparent-overlay.js +21 -10
  39. package/dist/registry.cjs +285 -206
  40. package/dist/registry.js +285 -206
  41. package/package.json +1 -1
package/dist/registry.js CHANGED
@@ -57068,6 +57068,7 @@ var NavbarMobileMenu = ({
57068
57068
  children,
57069
57069
  className,
57070
57070
  contentClassName,
57071
+ closeContainerClassName = "",
57071
57072
  title = "Mobile Navigation"
57072
57073
  }) => {
57073
57074
  React52.useEffect(() => {
@@ -57092,18 +57093,27 @@ var NavbarMobileMenu = ({
57092
57093
  "data-state": open ? "open" : "closed",
57093
57094
  children: [
57094
57095
  /* @__PURE__ */ jsx("div", { className: "sr-only", children: /* @__PURE__ */ jsx("h2", { children: title }) }),
57095
- /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen", children: /* @__PURE__ */ jsxs(
57096
- "button",
57096
+ /* @__PURE__ */ jsx(
57097
+ "div",
57097
57098
  {
57098
- onClick: onClose,
57099
- className: "flex size-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
57100
- "aria-label": "Close mobile menu",
57101
- children: [
57102
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
57103
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
57104
- ]
57099
+ className: cn(
57100
+ closeContainerClassName,
57101
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen"
57102
+ ),
57103
+ children: /* @__PURE__ */ jsxs(
57104
+ "button",
57105
+ {
57106
+ onClick: onClose,
57107
+ className: "flex size-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
57108
+ "aria-label": "Close mobile menu",
57109
+ children: [
57110
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
57111
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
57112
+ ]
57113
+ }
57114
+ )
57105
57115
  }
57106
- ) }),
57116
+ ),
57107
57117
  /* @__PURE__ */ jsx(
57108
57118
  "div",
57109
57119
  {
@@ -58698,7 +58708,7 @@ var renderMobileDropdownContent = (item) => {
58698
58708
  Pressable,
58699
58709
  {
58700
58710
  href: solution.href,
58701
- className: "block pb-2 text-sm font-medium",
58711
+ className: "block pt-4 text-sm font-medium",
58702
58712
  children: solution.title
58703
58713
  }
58704
58714
  ),
@@ -60748,7 +60758,7 @@ var GroupedLinksImageDropdown = ({
60748
60758
  imageLink,
60749
60759
  optixFlowConfig
60750
60760
  }) => {
60751
- return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
60761
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8", children: [
60752
60762
  /* @__PURE__ */ jsx(GroupLinks, { groupLinks }),
60753
60763
  /* @__PURE__ */ jsx(FeaturedImageLink, { link: imageLink, optixFlowConfig })
60754
60764
  ] });
@@ -60769,7 +60779,7 @@ var GroupLinks = ({ groupLinks }) => {
60769
60779
  };
60770
60780
  if (!groupLinks) return null;
60771
60781
  let linkIndex = 0;
60772
- return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between gap-4", children: groupLinks.map((group, index1) => /* @__PURE__ */ jsxs("div", { children: [
60782
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-4", children: groupLinks.map((group, index1) => /* @__PURE__ */ jsxs("div", { children: [
60773
60783
  /* @__PURE__ */ jsx("div", { className: "mb-4 text-xs", children: group.label }),
60774
60784
  /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-4", children: group.links.map((link, index2) => {
60775
60785
  const idx = linkIndex++;
@@ -60827,7 +60837,7 @@ var FeaturedLink = ({ link, optixFlowConfig }) => {
60827
60837
  Pressable,
60828
60838
  {
60829
60839
  href: getLinkUrl(link),
60830
- className: "group relative flex w-full overflow-hidden rounded-xl bg-muted px-8 py-12",
60840
+ className: "group relative flex w-full overflow-hidden rounded-xl bg-muted px-4 pt-12 pb-4",
60831
60841
  children: [
60832
60842
  /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex w-full items-center gap-6", children: [
60833
60843
  /* @__PURE__ */ jsx("div", { className: "flex size-12 shrink-0 rounded-lg border bg-background shadow-lg", children: link.icon ? link.icon : link.iconName ? /* @__PURE__ */ jsx(
@@ -60943,10 +60953,10 @@ var renderMobileMenuItem4 = (item, index) => {
60943
60953
  children: [
60944
60954
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-10 items-center text-base font-normal text-foreground hover:no-underline", children: item.label }),
60945
60955
  /* @__PURE__ */ jsxs(AccordionContent, { className: "flex flex-col gap-6 p-2", children: [
60946
- item.featuredLinks && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 p-2", children: item.featuredLinks.map((link, idx) => /* @__PURE__ */ jsx(NavLink, { link }, `default-nav-link-${idx}`)) }),
60947
- item.links && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 p-2", children: item.links.map((link, idx) => /* @__PURE__ */ jsx(NavLink, { link }, `default-nav-link-${idx}`)) }),
60948
- item.groupLinks && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 p-2", children: item.groupLinks.map((group, groupIdx) => /* @__PURE__ */ jsxs("div", { className: "mb-8 last:mb-0", children: [
60949
- /* @__PURE__ */ jsx("div", { className: "mb-4 text-xs text-muted-foreground", children: group.label }),
60956
+ item.featuredLinks && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 p-2", children: item.featuredLinks.map((link, idx) => /* @__PURE__ */ jsx(NavLink, { link }, `default-nav-link-${idx}`)) }),
60957
+ item.links && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 p-2", children: item.links.map((link, idx) => /* @__PURE__ */ jsx(NavLink, { link }, `default-nav-link-${idx}`)) }),
60958
+ item.groupLinks && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 p-2", children: item.groupLinks.map((group, groupIdx) => /* @__PURE__ */ jsxs("div", { className: "relative", children: [
60959
+ group.label && /* @__PURE__ */ jsx("div", { className: "mb-4 text-xs text-muted-foreground", children: group.label }),
60950
60960
  /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-2", children: group.links.map((link, linkIdx) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { link }) }, `group-link-${groupIdx}-${linkIdx}`)) })
60951
60961
  ] }, `group-link-${groupIdx}`)) })
60952
60962
  ] })
@@ -61136,8 +61146,8 @@ var NavbarMultiColumnGroups = ({
61136
61146
  open,
61137
61147
  setOpen,
61138
61148
  navigation: navigation ?? [],
61139
- authActions: mobileAuthActions,
61140
- authActionsSlot: mobileAuthActionsSlot
61149
+ authActions: mobileAuthActions ?? authActions,
61150
+ authActionsSlot: mobileAuthActionsSlot ?? authActionsSlot
61141
61151
  }
61142
61152
  )
61143
61153
  ] });
@@ -61234,29 +61244,36 @@ var MobileNavigationMenu5 = ({
61234
61244
  className: "border-b-0",
61235
61245
  children: [
61236
61246
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-15 items-center p-0 px-4! text-base leading-[3.75] font-normal text-muted-foreground hover:bg-muted hover:no-underline", children: item.title }),
61237
- /* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
61238
- /* @__PURE__ */ jsx("p", { className: "mb-2 px-4 text-[10px] text-muted-foreground uppercase", children: group.title }),
61239
- group.links.map((link, linkIndex) => /* @__PURE__ */ jsxs(
61240
- Pressable,
61241
- {
61242
- href: link.url,
61243
- className: "flex min-h-12 items-center gap-2 rounded-lg px-4 text-muted-foreground transition-colors duration-300 hover:bg-muted hover:text-foreground",
61244
- onClick: handleClose,
61245
- children: [
61246
- link.icon ? link.icon : link.iconName ? /* @__PURE__ */ jsx(
61247
- DynamicIcon,
61248
- {
61249
- name: link.iconName,
61250
- size: 16,
61251
- className: "stroke-muted-foreground"
61252
- }
61253
- ) : null,
61254
- link.label
61255
- ]
61256
- },
61257
- `mobile-link-${groupIndex}-${linkIndex}`
61258
- ))
61259
- ] }, `mobile-group-${groupIndex}`)) })
61247
+ /* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
61248
+ "div",
61249
+ {
61250
+ className: "mb-4",
61251
+ children: [
61252
+ group.title && /* @__PURE__ */ jsx("p", { className: "mt-4 px-4 text-xs font-semibold text-muted-foreground uppercase", children: group.title }),
61253
+ group.links.map((link, linkIndex) => /* @__PURE__ */ jsxs(
61254
+ Pressable,
61255
+ {
61256
+ href: link.url,
61257
+ className: "flex min-h-12 items-center gap-2 rounded-lg px-4 text-muted-foreground transition-colors duration-300 hover:bg-muted hover:text-foreground",
61258
+ onClick: handleClose,
61259
+ children: [
61260
+ link.icon ? link.icon : link.iconName ? /* @__PURE__ */ jsx(
61261
+ DynamicIcon,
61262
+ {
61263
+ name: link.iconName,
61264
+ size: 16,
61265
+ className: "stroke-muted-foreground"
61266
+ }
61267
+ ) : null,
61268
+ link.label
61269
+ ]
61270
+ },
61271
+ `mobile-link-${groupIndex}-${linkIndex}`
61272
+ ))
61273
+ ]
61274
+ },
61275
+ `mobile-group-${groupIndex}`
61276
+ )) })
61260
61277
  ]
61261
61278
  },
61262
61279
  `nav-item-${index}`
@@ -61398,6 +61415,7 @@ var NavbarSidebarMobile = ({
61398
61415
  NavigationMenu,
61399
61416
  {
61400
61417
  className: cn("hidden lg:flex", navigationMenuClassName),
61418
+ viewport: false,
61401
61419
  children: /* @__PURE__ */ jsx(NavigationMenuList, { children: menuSlot ? menuSlot : renderMenu()?.map(
61402
61420
  (item, index) => item.items ? /* @__PURE__ */ jsxs(NavigationMenuItem, { children: [
61403
61421
  /* @__PURE__ */ jsx(NavigationMenuTrigger, { children: item.title }),
@@ -61894,6 +61912,7 @@ var MobileNavigationMenu7 = ({
61894
61912
  title: "Mobile Navigation",
61895
61913
  className: cn("bg-black/95", mobileMenuClassName),
61896
61914
  contentClassName: "flex flex-col items-center justify-center",
61915
+ closeContainerClassName: "bg-black/95",
61897
61916
  children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col items-center justify-center", children: [
61898
61917
  /* @__PURE__ */ jsx("nav", { className: "flex flex-col items-center gap-8", children: navItems?.map((item, index) => /* @__PURE__ */ jsxs(
61899
61918
  Pressable,
@@ -62107,36 +62126,44 @@ var DesktopMenuItem7 = ({
62107
62126
  ),
62108
62127
  /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
62109
62128
  /* @__PURE__ */ jsx("p", { className: "mb-3 text-[10px] text-muted-foreground uppercase", children: group.label }),
62110
- /* @__PURE__ */ jsx("div", { className: "space-y-1", children: group.links.map((link) => /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
62111
- Pressable,
62129
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: group.links.map((link) => /* @__PURE__ */ jsx(
62130
+ NavigationMenuLink,
62112
62131
  {
62113
- href: link.href,
62114
- className: "group flex cursor-pointer flex-row gap-3",
62115
- children: [
62116
- link.icon && /* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(DynamicIcon, { name: link.icon, size: 20 }) }),
62117
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
62118
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
62119
- link.title,
62120
- /* @__PURE__ */ jsx(
62121
- DynamicIcon,
62122
- {
62123
- name: "lucide/chevron-right",
62124
- size: 16,
62125
- className: "text-primary! opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
62126
- }
62127
- )
62128
- ] }),
62129
- link.description && /* @__PURE__ */ jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: link.description })
62130
- ] })
62131
- ]
62132
- }
62133
- ) }, link.title)) }),
62132
+ asChild: true,
62133
+ className: "w-full",
62134
+ children: /* @__PURE__ */ jsxs(
62135
+ Pressable,
62136
+ {
62137
+ href: link.href,
62138
+ className: "group flex cursor-pointer flex-row gap-3",
62139
+ children: [
62140
+ link.icon && /* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(DynamicIcon, { name: link.icon, size: 20 }) }),
62141
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
62142
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 text-sm font-medium whitespace-nowrap", children: [
62143
+ link.title,
62144
+ /* @__PURE__ */ jsx(
62145
+ DynamicIcon,
62146
+ {
62147
+ name: "lucide/chevron-right",
62148
+ size: 16,
62149
+ className: "opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:opacity-100"
62150
+ }
62151
+ )
62152
+ ] }),
62153
+ link.description && /* @__PURE__ */ jsx("p", { className: "text-xs whitespace-nowrap text-muted-foreground", children: link.description })
62154
+ ] })
62155
+ ]
62156
+ }
62157
+ )
62158
+ },
62159
+ link.title
62160
+ )) }),
62134
62161
  group.featuredImage && /* @__PURE__ */ jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: group.featuredImage.href || "#", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-muted p-3", children: /* @__PURE__ */ jsx(
62135
62162
  Img,
62136
62163
  {
62137
62164
  src: group.featuredImage.src,
62138
62165
  alt: group.featuredImage.alt || "Featured image",
62139
- className: "aspect-video w-full max-w-[240px] rounded-md object-cover object-center",
62166
+ className: "aspect-video w-full max-w-60 rounded-md object-cover object-center",
62140
62167
  optixFlowConfig
62141
62168
  }
62142
62169
  ) }) }) }) })
@@ -62200,29 +62227,36 @@ var MobileNavigationMenu8 = ({
62200
62227
  className: "border-b-0",
62201
62228
  children: [
62202
62229
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-15 items-center p-0 px-4! text-base leading-[3.75] font-normal text-muted-foreground hover:bg-muted hover:no-underline", children: item.label }),
62203
- /* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
62204
- /* @__PURE__ */ jsx("p", { className: "mb-2 px-4 text-[10px] text-muted-foreground uppercase", children: group.label }),
62205
- group.links.map((link) => /* @__PURE__ */ jsxs(
62206
- Pressable,
62207
- {
62208
- href: link.href,
62209
- className: "flex min-h-12 items-center gap-2 rounded-lg px-4 text-muted-foreground transition-colors duration-300 hover:bg-muted hover:text-foreground",
62210
- onClick: onClose,
62211
- children: [
62212
- link.icon && /* @__PURE__ */ jsx(
62213
- DynamicIcon,
62214
- {
62215
- name: link.icon,
62216
- size: 16,
62217
- className: "stroke-muted-foreground"
62218
- }
62219
- ),
62230
+ /* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
62231
+ "div",
62232
+ {
62233
+ className: "mb-4",
62234
+ children: [
62235
+ group.label && /* @__PURE__ */ jsx("p", { className: "block mt-4 mb-2 px-4 text-[10px] text-muted-foreground uppercase", children: group.label }),
62236
+ group.links.map((link) => /* @__PURE__ */ jsxs(
62237
+ Pressable,
62238
+ {
62239
+ href: link.href,
62240
+ className: "flex min-h-12 items-center gap-2 rounded-lg pl-6 pr-4 text-muted-foreground transition-colors duration-300 hover:bg-muted hover:text-foreground",
62241
+ onClick: onClose,
62242
+ children: [
62243
+ link.icon && /* @__PURE__ */ jsx(
62244
+ DynamicIcon,
62245
+ {
62246
+ name: link.icon,
62247
+ size: 16,
62248
+ className: "stroke-muted-foreground"
62249
+ }
62250
+ ),
62251
+ link.title
62252
+ ]
62253
+ },
62220
62254
  link.title
62221
- ]
62222
- },
62223
- link.title
62224
- ))
62225
- ] }, `mobile-group-${groupIndex}`)) })
62255
+ ))
62256
+ ]
62257
+ },
62258
+ `mobile-group-${groupIndex}`
62259
+ )) })
62226
62260
  ]
62227
62261
  },
62228
62262
  `nav-item-${index}`
@@ -62343,37 +62377,6 @@ var NavbarStickyCompact = ({
62343
62377
  ) }, index)
62344
62378
  );
62345
62379
  }, [menuSlot, menu, isScrolled]);
62346
- const renderMobileMenu = useMemo$1(() => {
62347
- if (menuSlot) return menuSlot;
62348
- if (!menu || menu.length === 0) return null;
62349
- return menu.map(
62350
- (item, index) => item.items ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
62351
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-muted-foreground", children: item.title }),
62352
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1 pl-2", children: item.items.map((subItem, subIndex) => /* @__PURE__ */ jsxs(
62353
- Pressable,
62354
- {
62355
- href: subItem.url,
62356
- className: "flex items-center gap-2 rounded-md py-2 text-sm hover:text-foreground",
62357
- onClick: () => setIsOpen(false),
62358
- children: [
62359
- subItem.icon && /* @__PURE__ */ jsx(DynamicIcon, { name: subItem.icon, size: 14 }),
62360
- subItem.title
62361
- ]
62362
- },
62363
- subIndex
62364
- )) })
62365
- ] }, index) : /* @__PURE__ */ jsx(
62366
- Pressable,
62367
- {
62368
- href: item.url,
62369
- className: "text-sm font-medium",
62370
- onClick: () => setIsOpen(false),
62371
- children: item.title
62372
- },
62373
- index
62374
- )
62375
- );
62376
- }, [menuSlot, menu]);
62377
62380
  const {
62378
62381
  sectionClasses,
62379
62382
  containerWrapperClasses,
@@ -62383,99 +62386,175 @@ var NavbarStickyCompact = ({
62383
62386
  sectionContainerMaxWidth,
62384
62387
  spacingOverride
62385
62388
  } = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
62386
- return /* @__PURE__ */ jsx(
62387
- Section,
62388
- {
62389
- background,
62390
- spacing: spacingOverride ?? spacing,
62391
- className: cn(
62392
- sectionClasses,
62393
- "fixed top-0 left-0 z-50 w-full bg-background/95 backdrop-blur-sm transition-all duration-300",
62394
- isScrolled ? "shadow-sm" : ""
62395
- ),
62396
- pattern,
62397
- patternOpacity,
62398
- containerClassName: sectionContainerClassName,
62399
- containerMaxWidth: sectionContainerMaxWidth,
62400
- children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
62401
- "nav",
62389
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
62390
+ /* @__PURE__ */ jsx(
62391
+ Section,
62392
+ {
62393
+ background,
62394
+ spacing: spacingOverride ?? spacing,
62395
+ className: cn(
62396
+ sectionClasses,
62397
+ "fixed top-0 left-0 z-50 w-full bg-background/95 backdrop-blur-sm transition-all duration-300",
62398
+ isScrolled ? "shadow-sm" : ""
62399
+ ),
62400
+ pattern,
62401
+ patternOpacity,
62402
+ containerClassName: sectionContainerClassName,
62403
+ containerMaxWidth: sectionContainerMaxWidth,
62404
+ children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
62405
+ "nav",
62406
+ {
62407
+ className: cn(
62408
+ "flex items-center justify-between transition-all duration-300",
62409
+ isScrolled ? "h-14" : "h-16",
62410
+ navClassName
62411
+ ),
62412
+ children: [
62413
+ /* @__PURE__ */ jsx(
62414
+ NavbarLogo,
62415
+ {
62416
+ logo,
62417
+ logoSlot,
62418
+ logoClassName: cn(
62419
+ isScrolled ? "[&_img]:h-6 [&_span]:text-base" : "[&_img]:h-8 [&_span]:text-lg",
62420
+ "[&_img]:transition-all [&_img]:duration-300 [&_span]:transition-all [&_span]:duration-300",
62421
+ logoClassName
62422
+ ),
62423
+ optixFlowConfig
62424
+ }
62425
+ ),
62426
+ /* @__PURE__ */ jsx(NavigationMenu, { className: "hidden lg:flex", viewport: false, children: /* @__PURE__ */ jsx(NavigationMenuList, { children: renderMenu }) }),
62427
+ /* @__PURE__ */ jsx(
62428
+ "div",
62429
+ {
62430
+ className: cn(
62431
+ "hidden items-center gap-2 lg:flex",
62432
+ actionsClassName
62433
+ ),
62434
+ children: renderAuthActions
62435
+ }
62436
+ ),
62437
+ /* @__PURE__ */ jsxs(
62438
+ Pressable,
62439
+ {
62440
+ variant: "ghost",
62441
+ size: isScrolled ? "sm" : "icon",
62442
+ asButton: true,
62443
+ className: "lg:hidden transition-all duration-300",
62444
+ onClick: () => setIsOpen(!isOpen),
62445
+ children: [
62446
+ /* @__PURE__ */ jsx(
62447
+ DynamicIcon,
62448
+ {
62449
+ name: "lucide/menu",
62450
+ size: isScrolled ? 18 : 20
62451
+ }
62452
+ ),
62453
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
62454
+ ]
62455
+ }
62456
+ )
62457
+ ]
62458
+ }
62459
+ ) }) }) })
62460
+ }
62461
+ ),
62462
+ /* @__PURE__ */ jsx(
62463
+ MobileNavigationMenu9,
62464
+ {
62465
+ open: isOpen,
62466
+ setOpen: setIsOpen,
62467
+ menu: menu ?? [],
62468
+ menuSlot,
62469
+ authActions,
62470
+ authActionsSlot
62471
+ }
62472
+ )
62473
+ ] });
62474
+ };
62475
+ var MobileNavigationMenu9 = ({
62476
+ open,
62477
+ setOpen,
62478
+ menu,
62479
+ menuSlot,
62480
+ authActions,
62481
+ authActionsSlot
62482
+ }) => {
62483
+ const handleClose = () => setOpen(false);
62484
+ const renderMobileAuthActions = useMemo$1(() => {
62485
+ if (authActionsSlot) return authActionsSlot;
62486
+ if (!authActions || authActions.length === 0) return null;
62487
+ return /* @__PURE__ */ jsx("div", { className: "mt-6 flex flex-col gap-4", children: authActions.map((action, index) => {
62488
+ const {
62489
+ label,
62490
+ icon,
62491
+ iconAfter,
62492
+ children,
62493
+ className: actionClassName,
62494
+ ...pressableProps
62495
+ } = action;
62496
+ return /* @__PURE__ */ jsx(
62497
+ Pressable,
62402
62498
  {
62403
- className: cn(
62404
- "flex items-center justify-between transition-all duration-300",
62405
- isScrolled ? "h-14" : "h-16",
62406
- navClassName
62407
- ),
62499
+ asButton: true,
62500
+ className: cn("w-full", actionClassName),
62501
+ onClick: handleClose,
62502
+ ...pressableProps,
62503
+ children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
62504
+ icon,
62505
+ label,
62506
+ iconAfter
62507
+ ] })
62508
+ },
62509
+ index
62510
+ );
62511
+ }) });
62512
+ }, [authActionsSlot, authActions]);
62513
+ return /* @__PURE__ */ jsx(NavbarMobileMenu, { open, onClose: handleClose, title: "Navigation Menu", children: /* @__PURE__ */ jsx("div", { className: "max-w-screen-sm mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
62514
+ /* @__PURE__ */ jsx(Accordion, { type: "multiple", className: "w-full", children: menuSlot ? menuSlot : menu.map(
62515
+ (item, index) => item.items ? /* @__PURE__ */ jsxs(
62516
+ AccordionItem,
62517
+ {
62518
+ value: `nav-${index}`,
62519
+ className: "border-b-0",
62408
62520
  children: [
62409
- /* @__PURE__ */ jsx(
62410
- NavbarLogo,
62411
- {
62412
- logo,
62413
- logoSlot,
62414
- logoClassName: cn(
62415
- isScrolled ? "[&_img]:h-6 [&_span]:text-base" : "[&_img]:h-8 [&_span]:text-lg",
62416
- "[&_img]:transition-all [&_img]:duration-300 [&_span]:transition-all [&_span]:duration-300",
62417
- logoClassName
62418
- ),
62419
- optixFlowConfig
62420
- }
62421
- ),
62422
- /* @__PURE__ */ jsx(NavigationMenu, { className: "hidden lg:flex", children: /* @__PURE__ */ jsx(NavigationMenuList, { children: renderMenu }) }),
62423
- /* @__PURE__ */ jsx(
62424
- "div",
62425
- {
62426
- className: cn(
62427
- "hidden items-center gap-2 lg:flex",
62428
- actionsClassName
62429
- ),
62430
- children: renderAuthActions
62431
- }
62432
- ),
62433
- /* @__PURE__ */ jsxs(
62521
+ /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-15 items-center p-0 px-4! text-base leading-[3.75] font-normal text-muted-foreground hover:bg-muted hover:no-underline", children: item.title }),
62522
+ /* @__PURE__ */ jsx(AccordionContent, { className: "overflow-x-none", children: item.items.map((subItem, subIndex) => /* @__PURE__ */ jsxs(
62434
62523
  Pressable,
62435
62524
  {
62436
- variant: "ghost",
62437
- size: isScrolled ? "sm" : "icon",
62438
- asButton: true,
62439
- className: "lg:hidden transition-all duration-300",
62440
- onClick: () => setIsOpen(!isOpen),
62525
+ href: subItem.url,
62526
+ className: "flex min-h-12 items-center gap-2 rounded-lg px-4 text-muted-foreground transition-colors duration-300 hover:bg-muted hover:text-foreground",
62527
+ onClick: handleClose,
62441
62528
  children: [
62442
- /* @__PURE__ */ jsx(
62529
+ subItem.icon && /* @__PURE__ */ jsx(
62443
62530
  DynamicIcon,
62444
62531
  {
62445
- name: "lucide/menu",
62446
- size: isScrolled ? 18 : 20
62532
+ name: subItem.icon,
62533
+ size: 16,
62534
+ className: "stroke-muted-foreground"
62447
62535
  }
62448
62536
  ),
62449
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
62537
+ subItem.title
62450
62538
  ]
62451
- }
62452
- ),
62453
- /* @__PURE__ */ jsx(
62454
- NavbarMobileMenu,
62455
- {
62456
- open: isOpen,
62457
- onClose: () => setIsOpen(false),
62458
- title: "Navigation Menu",
62459
- children: /* @__PURE__ */ jsx("div", { className: "max-w-screen-sm mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
62460
- renderMobileMenu,
62461
- /* @__PURE__ */ jsx(
62462
- "div",
62463
- {
62464
- className: cn(
62465
- "mt-4 flex flex-col gap-2 border-t pt-4",
62466
- actionsClassName
62467
- ),
62468
- children: renderAuthActions
62469
- }
62470
- )
62471
- ] }) })
62472
- }
62473
- )
62539
+ },
62540
+ `mobile-link-${index}-${subIndex}`
62541
+ )) })
62474
62542
  ]
62475
- }
62476
- ) }) }) })
62477
- }
62478
- );
62543
+ },
62544
+ `nav-item-${index}`
62545
+ ) : /* @__PURE__ */ jsx(
62546
+ Pressable,
62547
+ {
62548
+ href: item.url,
62549
+ className: "flex h-15 items-center rounded-md p-0 px-4 text-left text-base leading-[3.75] font-normal text-muted-foreground ring-ring/10 outline-ring/50 transition-all hover:bg-muted focus-visible:ring-4 focus-visible:outline-1",
62550
+ onClick: handleClose,
62551
+ children: item.title
62552
+ },
62553
+ `nav-link-${index}`
62554
+ )
62555
+ ) }),
62556
+ renderMobileAuthActions
62557
+ ] }) }) });
62479
62558
  };
62480
62559
  var NavbarSearchFocused = ({
62481
62560
  className,
@@ -62873,19 +62952,19 @@ var NavbarSimpleLinks = ({
62873
62952
  }
62874
62953
  ),
62875
62954
  /* @__PURE__ */ jsx(
62876
- MobileNavigationMenu9,
62955
+ MobileNavigationMenu10,
62877
62956
  {
62878
62957
  open: isOpen,
62879
62958
  onClose: handleMobileMenuClose,
62880
62959
  navItems: navItems ?? [],
62881
- mobileActions,
62882
- mobileActionsSlot,
62960
+ mobileActions: mobileActions ?? actions,
62961
+ mobileActionsSlot: mobileActionsSlot ?? actionsSlot,
62883
62962
  mobileMenuClassName
62884
62963
  }
62885
62964
  )
62886
62965
  ] });
62887
62966
  };
62888
- var MobileNavigationMenu9 = ({
62967
+ var MobileNavigationMenu10 = ({
62889
62968
  open,
62890
62969
  onClose,
62891
62970
  navItems,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensite/ui",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "description": "Foundational UI component library for OpenSite Semantic Site Builder with tree-shakable exports and abstract styling",
5
5
  "keywords": [
6
6
  "react",