@opensite/ui 1.1.0 → 1.1.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.
Files changed (41) hide show
  1. package/dist/navbar-animated-preview.cjs +11 -10
  2. package/dist/navbar-animated-preview.js +11 -10
  3. package/dist/navbar-centered-menu.cjs +5 -4
  4. package/dist/navbar-centered-menu.js +5 -4
  5. package/dist/navbar-dark-icons.cjs +5 -4
  6. package/dist/navbar-dark-icons.js +5 -4
  7. package/dist/navbar-dropdown-menu.cjs +5 -4
  8. package/dist/navbar-dropdown-menu.js +5 -4
  9. package/dist/navbar-education-platform.cjs +5 -4
  10. package/dist/navbar-education-platform.js +5 -4
  11. package/dist/navbar-enterprise-mega.cjs +5 -4
  12. package/dist/navbar-enterprise-mega.js +5 -4
  13. package/dist/navbar-feature-grid.cjs +5 -4
  14. package/dist/navbar-feature-grid.js +5 -4
  15. package/dist/navbar-icon-links.cjs +5 -4
  16. package/dist/navbar-icon-links.js +5 -4
  17. package/dist/navbar-image-preview.cjs +5 -4
  18. package/dist/navbar-image-preview.js +5 -4
  19. package/dist/navbar-mega-menu.cjs +5 -4
  20. package/dist/navbar-mega-menu.js +5 -4
  21. package/dist/navbar-multi-column-groups.cjs +5 -4
  22. package/dist/navbar-multi-column-groups.js +5 -4
  23. package/dist/navbar-platform-resources.cjs +5 -4
  24. package/dist/navbar-platform-resources.js +5 -4
  25. package/dist/navbar-search-focused.cjs +176 -97
  26. package/dist/navbar-search-focused.js +176 -97
  27. package/dist/navbar-sidebar-mobile.cjs +5 -4
  28. package/dist/navbar-sidebar-mobile.js +5 -4
  29. package/dist/navbar-simple-links.cjs +5 -4
  30. package/dist/navbar-simple-links.js +5 -4
  31. package/dist/navbar-split-cta.cjs +5 -4
  32. package/dist/navbar-split-cta.js +5 -4
  33. package/dist/navbar-sticky-compact.cjs +7 -16
  34. package/dist/navbar-sticky-compact.js +7 -16
  35. package/dist/navbar-tabbed-sections.cjs +5 -4
  36. package/dist/navbar-tabbed-sections.js +5 -4
  37. package/dist/navbar-transparent-overlay.cjs +6 -4
  38. package/dist/navbar-transparent-overlay.js +6 -4
  39. package/dist/registry.cjs +171 -117
  40. package/dist/registry.js +171 -117
  41. package/package.json +1 -1
package/dist/registry.js CHANGED
@@ -57068,7 +57068,8 @@ var NavbarMobileMenu = ({
57068
57068
  children,
57069
57069
  className,
57070
57070
  contentClassName,
57071
- closeContainerClassName = "",
57071
+ closeContainerClassName,
57072
+ closeIconClassName,
57072
57073
  title = "Mobile Navigation"
57073
57074
  }) => {
57074
57075
  React52.useEffect(() => {
@@ -57097,8 +57098,8 @@ var NavbarMobileMenu = ({
57097
57098
  "div",
57098
57099
  {
57099
57100
  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"
57101
+ "absolute top-0 left-0 right-0 p-4 bg-background flex justify-end items-center z-10 w-screen",
57102
+ closeContainerClassName
57102
57103
  ),
57103
57104
  children: /* @__PURE__ */ jsxs(
57104
57105
  "button",
@@ -57107,7 +57108,7 @@ var NavbarMobileMenu = ({
57107
57108
  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
57109
  "aria-label": "Close mobile menu",
57109
57110
  children: [
57110
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: "size-4" }),
57111
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/x", className: cn("size-4", closeIconClassName) }),
57111
57112
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
57112
57113
  ]
57113
57114
  }
@@ -60562,7 +60563,7 @@ var NavbarAnimatedPreview = ({
60562
60563
  "div",
60563
60564
  {
60564
60565
  className: cn(
60565
- "relative z-999 grid w-full grid-cols-2 items-center justify-between gap-8 xl:grid-cols-3"
60566
+ "relative z-999 flex w-full items-center justify-between gap-4"
60566
60567
  ),
60567
60568
  children: [
60568
60569
  /* @__PURE__ */ jsx(
@@ -60837,7 +60838,7 @@ var FeaturedLink = ({ link, optixFlowConfig }) => {
60837
60838
  Pressable,
60838
60839
  {
60839
60840
  href: getLinkUrl(link),
60840
- className: "group relative flex w-full overflow-hidden rounded-xl bg-muted px-4 pt-12 pb-4",
60841
+ className: "group relative flex w-full overflow-hidden rounded-xl bg-muted px-4 pt-24 pb-4",
60841
60842
  children: [
60842
60843
  /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex w-full items-center gap-6", children: [
60843
60844
  /* @__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(
@@ -60952,10 +60953,10 @@ var renderMobileMenuItem4 = (item, index) => {
60952
60953
  className: "border-b-0",
60953
60954
  children: [
60954
60955
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "h-10 items-center text-base font-normal text-foreground hover:no-underline", children: item.label }),
60955
- /* @__PURE__ */ jsxs(AccordionContent, { className: "flex flex-col gap-6 p-2", children: [
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: [
60956
+ /* @__PURE__ */ jsxs(AccordionContent, { className: "flex flex-col py-6 px-4", children: [
60957
+ item.featuredLinks && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: item.featuredLinks.map((link, idx) => /* @__PURE__ */ jsx(NavLink, { link }, `default-nav-link-${idx}`)) }),
60958
+ item.links && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: item.links.map((link, idx) => /* @__PURE__ */ jsx(NavLink, { link }, `default-nav-link-${idx}`)) }),
60959
+ item.groupLinks && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: item.groupLinks.map((group, groupIdx) => /* @__PURE__ */ jsxs("div", { className: "relative", children: [
60959
60960
  group.label && /* @__PURE__ */ jsx("div", { className: "mb-4 text-xs text-muted-foreground", children: group.label }),
60960
60961
  /* @__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}`)) })
60961
60962
  ] }, `group-link-${groupIdx}`)) })
@@ -61913,6 +61914,7 @@ var MobileNavigationMenu7 = ({
61913
61914
  className: cn("bg-black/95", mobileMenuClassName),
61914
61915
  contentClassName: "flex flex-col items-center justify-center",
61915
61916
  closeContainerClassName: "bg-black/95",
61917
+ closeIconClassName: "text-white",
61916
61918
  children: /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col items-center justify-center", children: [
61917
61919
  /* @__PURE__ */ jsx("nav", { className: "flex flex-col items-center gap-8", children: navItems?.map((item, index) => /* @__PURE__ */ jsxs(
61918
61920
  Pressable,
@@ -62415,11 +62417,7 @@ var NavbarStickyCompact = ({
62415
62417
  {
62416
62418
  logo,
62417
62419
  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
- ),
62420
+ logoClassName,
62423
62421
  optixFlowConfig
62424
62422
  }
62425
62423
  ),
@@ -62443,13 +62441,7 @@ var NavbarStickyCompact = ({
62443
62441
  className: "lg:hidden transition-all duration-300",
62444
62442
  onClick: () => setIsOpen(!isOpen),
62445
62443
  children: [
62446
- /* @__PURE__ */ jsx(
62447
- DynamicIcon,
62448
- {
62449
- name: "lucide/menu",
62450
- size: isScrolled ? 18 : 20
62451
- }
62452
- ),
62444
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: isScrolled ? 18 : 20 }),
62453
62445
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
62454
62446
  ]
62455
62447
  }
@@ -62582,6 +62574,11 @@ var NavbarSearchFocused = ({
62582
62574
  optixFlowConfig
62583
62575
  }) => {
62584
62576
  const [isOpen, setIsOpen] = useState(false);
62577
+ const [searchQuery, setSearchQuery] = useState("");
62578
+ const handleSearchSubmit = (e) => {
62579
+ e.preventDefault();
62580
+ onSearch?.(searchQuery);
62581
+ };
62585
62582
  const renderNavigation = (items) => {
62586
62583
  if (navigationSlot) return navigationSlot;
62587
62584
  if (!items || items.length === 0) return null;
@@ -62627,7 +62624,7 @@ var NavbarSearchFocused = ({
62627
62624
  );
62628
62625
  });
62629
62626
  }, [authActionsSlot, authActions]);
62630
- const renderMobileMenuActions = useMemo$1(() => {
62627
+ useMemo$1(() => {
62631
62628
  if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
62632
62629
  if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
62633
62630
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: mobileMenuActions.map((action, index) => {
@@ -62656,100 +62653,157 @@ var NavbarSearchFocused = ({
62656
62653
  sectionContainerMaxWidth,
62657
62654
  spacingOverride
62658
62655
  } = getNavbarLayoutClasses(layoutVariant, { className, containerClassName });
62659
- return /* @__PURE__ */ jsx(
62660
- Section,
62661
- {
62662
- background,
62663
- spacing: spacingOverride ?? spacing,
62664
- className: sectionClasses,
62665
- pattern,
62666
- patternOpacity,
62667
- containerClassName: sectionContainerClassName,
62668
- containerMaxWidth: sectionContainerMaxWidth,
62669
- children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
62670
- "nav",
62671
- {
62672
- className: cn(
62673
- "flex items-center gap-4 py-3 lg:gap-8",
62674
- navClassName
62675
- ),
62676
- children: [
62677
- /* @__PURE__ */ jsx(
62678
- NavbarLogo,
62679
- {
62680
- logo,
62681
- logoSlot,
62682
- logoClassName,
62683
- optixFlowConfig
62684
- }
62685
- ),
62686
- /* @__PURE__ */ jsx(
62687
- NavigationMenu,
62688
- {
62689
- className: cn("hidden lg:flex", navigationMenuClassName),
62690
- children: renderNavigation(navItems?.slice(0, 2) ?? [])
62691
- }
62692
- ),
62693
- /* @__PURE__ */ jsx(
62694
- NavigationMenu,
62695
- {
62696
- className: cn("hidden lg:flex", navigationMenuClassName),
62697
- children: renderNavigation(navItems?.slice(2) ?? [])
62698
- }
62656
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
62657
+ /* @__PURE__ */ jsx(
62658
+ Section,
62659
+ {
62660
+ background,
62661
+ spacing: spacingOverride ?? spacing,
62662
+ className: sectionClasses,
62663
+ pattern,
62664
+ patternOpacity,
62665
+ containerClassName: sectionContainerClassName,
62666
+ containerMaxWidth: sectionContainerMaxWidth,
62667
+ children: /* @__PURE__ */ jsx("div", { className: containerWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: navWrapperClasses, children: /* @__PURE__ */ jsx("div", { className: innerContainerClasses, children: /* @__PURE__ */ jsxs(
62668
+ "nav",
62669
+ {
62670
+ className: cn(
62671
+ "flex items-center justify-between gap-4 py-3 lg:gap-6",
62672
+ navClassName
62699
62673
  ),
62700
- /* @__PURE__ */ jsx(
62701
- "div",
62702
- {
62703
- className: cn(
62704
- "hidden shrink-0 items-center gap-2 lg:flex",
62705
- actionsClassName
62674
+ children: [
62675
+ /* @__PURE__ */ jsx(
62676
+ NavbarLogo,
62677
+ {
62678
+ logo,
62679
+ logoSlot,
62680
+ logoClassName,
62681
+ optixFlowConfig
62682
+ }
62683
+ ),
62684
+ /* @__PURE__ */ jsx(
62685
+ NavigationMenu,
62686
+ {
62687
+ className: cn("hidden lg:flex", navigationMenuClassName),
62688
+ children: renderNavigation(navItems ?? [])
62689
+ }
62690
+ ),
62691
+ /* @__PURE__ */ jsx("div", { className: "hidden flex-1 max-w-md lg:block", children: searchSlot ?? /* @__PURE__ */ jsxs("form", { onSubmit: handleSearchSubmit, className: "relative", children: [
62692
+ /* @__PURE__ */ jsx(
62693
+ DynamicIcon,
62694
+ {
62695
+ name: "lucide/search",
62696
+ size: 16,
62697
+ className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
62698
+ }
62706
62699
  ),
62707
- children: renderAuthActions
62708
- }
62709
- ),
62710
- /* @__PURE__ */ jsxs(
62711
- Pressable,
62712
- {
62713
- variant: "ghost",
62714
- size: "icon",
62715
- asButton: true,
62716
- className: "lg:hidden",
62717
- onClick: () => setIsOpen(!isOpen),
62718
- children: [
62719
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
62720
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
62721
- ]
62722
- }
62723
- ),
62724
- /* @__PURE__ */ jsx(
62725
- NavbarMobileMenu,
62726
- {
62727
- open: isOpen,
62728
- onClose: () => setIsOpen(false),
62729
- title: "Navigation Menu",
62730
- children: /* @__PURE__ */ jsxs("div", { className: "max-w-screen-sm mx-auto", children: [
62731
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: navItems?.map((item, index) => /* @__PURE__ */ jsxs(
62732
- Pressable,
62733
- {
62734
- href: item.url,
62735
- className: "flex items-center gap-2 rounded-md py-2 text-base font-medium",
62736
- onClick: () => setIsOpen(false),
62737
- children: [
62738
- item.icon ?? (item.iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: item.iconName, size: 16 })),
62739
- item.title
62740
- ]
62741
- },
62742
- index
62743
- )) }),
62744
- /* @__PURE__ */ jsx("div", { className: "border-t pt-4 mt-6", children: renderMobileMenuActions })
62745
- ] })
62746
- }
62747
- )
62748
- ]
62749
- }
62750
- ) }) }) })
62751
- }
62752
- );
62700
+ /* @__PURE__ */ jsx(
62701
+ Input,
62702
+ {
62703
+ type: "search",
62704
+ placeholder: typeof searchPlaceholder === "string" ? searchPlaceholder : "Search...",
62705
+ value: searchQuery,
62706
+ onChange: (e) => setSearchQuery(e.target.value),
62707
+ className: "pl-9 pr-4"
62708
+ }
62709
+ )
62710
+ ] }) }),
62711
+ /* @__PURE__ */ jsx(
62712
+ "div",
62713
+ {
62714
+ className: cn(
62715
+ "hidden shrink-0 items-center gap-2 lg:flex",
62716
+ actionsClassName
62717
+ ),
62718
+ children: renderAuthActions
62719
+ }
62720
+ ),
62721
+ /* @__PURE__ */ jsxs(
62722
+ Pressable,
62723
+ {
62724
+ variant: "ghost",
62725
+ size: "icon",
62726
+ asButton: true,
62727
+ className: "lg:hidden",
62728
+ onClick: () => setIsOpen(!isOpen),
62729
+ children: [
62730
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/menu", size: 20 }),
62731
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
62732
+ ]
62733
+ }
62734
+ )
62735
+ ]
62736
+ }
62737
+ ) }) }) })
62738
+ }
62739
+ ),
62740
+ /* @__PURE__ */ jsx(
62741
+ MobileNavigationMenu10,
62742
+ {
62743
+ open: isOpen,
62744
+ setOpen: setIsOpen,
62745
+ navItems: navItems ?? [],
62746
+ navigationSlot,
62747
+ mobileMenuActions: mobileMenuActions ?? authActions,
62748
+ mobileMenuActionsSlot: mobileMenuActionsSlot ?? authActionsSlot
62749
+ }
62750
+ )
62751
+ ] });
62752
+ };
62753
+ var MobileNavigationMenu10 = ({
62754
+ open,
62755
+ setOpen,
62756
+ navItems,
62757
+ navigationSlot,
62758
+ mobileMenuActions,
62759
+ mobileMenuActionsSlot
62760
+ }) => {
62761
+ const handleClose = () => setOpen(false);
62762
+ const renderMobileActions = useMemo$1(() => {
62763
+ if (mobileMenuActionsSlot) return mobileMenuActionsSlot;
62764
+ if (!mobileMenuActions || mobileMenuActions.length === 0) return null;
62765
+ return /* @__PURE__ */ jsx("div", { className: "mt-6 flex flex-col gap-4", children: mobileMenuActions.map((action, index) => {
62766
+ const {
62767
+ label,
62768
+ icon,
62769
+ iconAfter,
62770
+ children,
62771
+ className: actionClassName,
62772
+ ...pressableProps
62773
+ } = action;
62774
+ return /* @__PURE__ */ jsx(
62775
+ Pressable,
62776
+ {
62777
+ asButton: true,
62778
+ className: cn("w-full", actionClassName),
62779
+ onClick: handleClose,
62780
+ ...pressableProps,
62781
+ children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
62782
+ icon,
62783
+ label,
62784
+ iconAfter
62785
+ ] })
62786
+ },
62787
+ index
62788
+ );
62789
+ }) });
62790
+ }, [mobileMenuActionsSlot, mobileMenuActions]);
62791
+ 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: [
62792
+ navigationSlot ?? /* @__PURE__ */ jsx("nav", { className: "flex flex-col", children: navItems.map((item, index) => /* @__PURE__ */ jsxs(
62793
+ Pressable,
62794
+ {
62795
+ href: item.url,
62796
+ className: "flex h-15 items-center gap-2 rounded-md 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",
62797
+ onClick: handleClose,
62798
+ children: [
62799
+ item.icon ?? (item.iconName && /* @__PURE__ */ jsx(DynamicIcon, { name: item.iconName, size: 16 })),
62800
+ item.title
62801
+ ]
62802
+ },
62803
+ `nav-link-${index}`
62804
+ )) }),
62805
+ renderMobileActions
62806
+ ] }) }) });
62753
62807
  };
62754
62808
  var MOBILE_BREAKPOINT7 = 1024;
62755
62809
  var NavbarSimpleLinks = ({
@@ -62952,7 +63006,7 @@ var NavbarSimpleLinks = ({
62952
63006
  }
62953
63007
  ),
62954
63008
  /* @__PURE__ */ jsx(
62955
- MobileNavigationMenu10,
63009
+ MobileNavigationMenu11,
62956
63010
  {
62957
63011
  open: isOpen,
62958
63012
  onClose: handleMobileMenuClose,
@@ -62964,7 +63018,7 @@ var NavbarSimpleLinks = ({
62964
63018
  )
62965
63019
  ] });
62966
63020
  };
62967
- var MobileNavigationMenu10 = ({
63021
+ var MobileNavigationMenu11 = ({
62968
63022
  open,
62969
63023
  onClose,
62970
63024
  navItems,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensite/ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
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",