@opencosmos/ui 1.3.3 → 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.d.mts CHANGED
@@ -2459,16 +2459,18 @@ interface AppSidebarProps {
2459
2459
  logo?: React__default.ReactNode;
2460
2460
  /** Wordmark shown next to the logo when expanded */
2461
2461
  title?: string;
2462
- /** Navigation items */
2462
+ /** Navigation items rendered at the top (below the header) */
2463
2463
  items?: AppSidebarNavItem[];
2464
- /** Body slot rendered in the scrollable mid-section (e.g. conversation history). Only visible when expanded. */
2464
+ /** Navigation items rendered at the bottom (above the footer) */
2465
+ bottomItems?: AppSidebarNavItem[];
2466
+ /** Body slot — rendered in the flex-1 mid-section (e.g. conversation history). Only visible when expanded. */
2465
2467
  children?: React__default.ReactNode;
2466
2468
  /** Footer slot — auth section, user avatar, sign-in prompt, etc. */
2467
2469
  footer?: React__default.ReactNode;
2468
2470
  /** Additional className for the <aside> */
2469
2471
  className?: string;
2470
2472
  }
2471
- declare function AppSidebar({ logo, title, items, children, footer, className, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
2473
+ declare function AppSidebar({ logo, title, items, bottomItems, children, footer, className, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
2472
2474
 
2473
2475
  interface StackProps extends React__default.HTMLAttributes<HTMLDivElement> {
2474
2476
  /**
package/dist/index.d.ts CHANGED
@@ -2459,16 +2459,18 @@ interface AppSidebarProps {
2459
2459
  logo?: React__default.ReactNode;
2460
2460
  /** Wordmark shown next to the logo when expanded */
2461
2461
  title?: string;
2462
- /** Navigation items */
2462
+ /** Navigation items rendered at the top (below the header) */
2463
2463
  items?: AppSidebarNavItem[];
2464
- /** Body slot rendered in the scrollable mid-section (e.g. conversation history). Only visible when expanded. */
2464
+ /** Navigation items rendered at the bottom (above the footer) */
2465
+ bottomItems?: AppSidebarNavItem[];
2466
+ /** Body slot — rendered in the flex-1 mid-section (e.g. conversation history). Only visible when expanded. */
2465
2467
  children?: React__default.ReactNode;
2466
2468
  /** Footer slot — auth section, user avatar, sign-in prompt, etc. */
2467
2469
  footer?: React__default.ReactNode;
2468
2470
  /** Additional className for the <aside> */
2469
2471
  className?: string;
2470
2472
  }
2471
- declare function AppSidebar({ logo, title, items, children, footer, className, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
2473
+ declare function AppSidebar({ logo, title, items, bottomItems, children, footer, className, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
2472
2474
 
2473
2475
  interface StackProps extends React__default.HTMLAttributes<HTMLDivElement> {
2474
2476
  /**
package/dist/index.js CHANGED
@@ -11118,6 +11118,7 @@ function AppSidebar({
11118
11118
  logo,
11119
11119
  title,
11120
11120
  items = [],
11121
+ bottomItems = [],
11121
11122
  children,
11122
11123
  footer,
11123
11124
  className
@@ -11232,6 +11233,40 @@ function AppSidebar({
11232
11233
  children
11233
11234
  }
11234
11235
  ),
11236
+ bottomItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("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__ */ (0, import_jsx_runtime89.jsxs)(
11237
+ "a",
11238
+ {
11239
+ href: item.href,
11240
+ target: item.external ? "_blank" : void 0,
11241
+ rel: item.external ? "noopener noreferrer" : void 0,
11242
+ title: !isOpen ? item.label : void 0,
11243
+ "aria-label": !isOpen ? item.label : void 0,
11244
+ className: cn(
11245
+ "flex items-center rounded-lg transition-colors duration-150",
11246
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus)]",
11247
+ isOpen ? "gap-3 px-3 py-3" : "justify-center w-9 h-9 mx-auto",
11248
+ item.active ? "bg-foreground/8 text-foreground font-medium" : "text-[var(--color-text-secondary)] hover:bg-foreground/5 hover:text-[var(--color-text-primary)]"
11249
+ ),
11250
+ children: [
11251
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "shrink-0 flex items-center justify-center w-4 h-4", children: item.icon }),
11252
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11253
+ "span",
11254
+ {
11255
+ className: "text-sm whitespace-nowrap",
11256
+ style: {
11257
+ opacity: isOpen ? 1 : 0,
11258
+ width: isOpen ? "auto" : 0,
11259
+ overflow: "hidden",
11260
+ pointerEvents: isOpen ? "auto" : "none",
11261
+ transition: shouldAnimate ? `opacity ${Math.round(duration * 0.55)}ms ease-out` : "none"
11262
+ },
11263
+ children: item.label
11264
+ }
11265
+ )
11266
+ ]
11267
+ },
11268
+ item.label
11269
+ )) }),
11235
11270
  footer && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11236
11271
  "div",
11237
11272
  {