@opensite/ui 1.1.0 → 1.1.2

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