@opencosmos/ui 1.3.2 → 1.3.4

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/index.mjs CHANGED
@@ -10768,6 +10768,7 @@ function AppSidebar({
10768
10768
  logo,
10769
10769
  title,
10770
10770
  items = [],
10771
+ bottomItems = [],
10771
10772
  children,
10772
10773
  footer,
10773
10774
  className
@@ -10840,7 +10841,7 @@ function AppSidebar({
10840
10841
  }
10841
10842
  )
10842
10843
  ] }),
10843
- items.length > 0 && /* @__PURE__ */ jsx89("nav", { className: "px-2 py-2 space-y-0.5 shrink-0", "aria-label": "Main navigation", children: items.map((item) => /* @__PURE__ */ jsxs56(
10844
+ items.length > 0 && /* @__PURE__ */ jsx89("nav", { className: "px-2 py-2 space-y-1 shrink-0", "aria-label": "Main navigation", children: items.map((item) => /* @__PURE__ */ jsxs56(
10844
10845
  "a",
10845
10846
  {
10846
10847
  href: item.href,
@@ -10851,7 +10852,7 @@ function AppSidebar({
10851
10852
  className: cn(
10852
10853
  "flex items-center rounded-lg transition-colors duration-150",
10853
10854
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus)]",
10854
- isOpen ? "gap-3 px-3 py-2.5" : "justify-center w-9 h-9 mx-auto",
10855
+ isOpen ? "gap-3 px-3 py-3" : "justify-center w-9 h-9 mx-auto",
10855
10856
  item.active ? "bg-foreground/8 text-foreground font-medium" : "text-[var(--color-text-secondary)] hover:bg-foreground/5 hover:text-[var(--color-text-primary)]"
10856
10857
  ),
10857
10858
  children: [
@@ -10882,12 +10883,46 @@ function AppSidebar({
10882
10883
  children
10883
10884
  }
10884
10885
  ),
10886
+ bottomItems.length > 0 && /* @__PURE__ */ jsx89("nav", { className: "px-2 py-2 space-y-1 shrink-0 border-t border-foreground/8", "aria-label": "Bottom navigation", children: bottomItems.map((item) => /* @__PURE__ */ jsxs56(
10887
+ "a",
10888
+ {
10889
+ href: item.href,
10890
+ target: item.external ? "_blank" : void 0,
10891
+ rel: item.external ? "noopener noreferrer" : void 0,
10892
+ title: !isOpen ? item.label : void 0,
10893
+ "aria-label": !isOpen ? item.label : void 0,
10894
+ className: cn(
10895
+ "flex items-center rounded-lg transition-colors duration-150",
10896
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus)]",
10897
+ isOpen ? "gap-3 px-3 py-3" : "justify-center w-9 h-9 mx-auto",
10898
+ item.active ? "bg-foreground/8 text-foreground font-medium" : "text-[var(--color-text-secondary)] hover:bg-foreground/5 hover:text-[var(--color-text-primary)]"
10899
+ ),
10900
+ children: [
10901
+ /* @__PURE__ */ jsx89("span", { className: "shrink-0 flex items-center justify-center w-4 h-4", children: item.icon }),
10902
+ /* @__PURE__ */ jsx89(
10903
+ "span",
10904
+ {
10905
+ className: "text-sm whitespace-nowrap",
10906
+ style: {
10907
+ opacity: isOpen ? 1 : 0,
10908
+ width: isOpen ? "auto" : 0,
10909
+ overflow: "hidden",
10910
+ pointerEvents: isOpen ? "auto" : "none",
10911
+ transition: shouldAnimate ? `opacity ${Math.round(duration * 0.55)}ms ease-out` : "none"
10912
+ },
10913
+ children: item.label
10914
+ }
10915
+ )
10916
+ ]
10917
+ },
10918
+ item.label
10919
+ )) }),
10885
10920
  footer && /* @__PURE__ */ jsx89(
10886
10921
  "div",
10887
10922
  {
10888
10923
  className: cn(
10889
10924
  "shrink-0 border-t border-foreground/8",
10890
- isOpen ? "p-3" : "px-2 py-3 flex justify-center"
10925
+ isOpen ? "px-4 py-4 space-y-3" : "px-2 py-3 flex justify-center"
10891
10926
  ),
10892
10927
  children: footer
10893
10928
  }