Files
NapCatQQ/.pnpm-store/v3/files/7c/34c38b1eeb27343c2318578e7cbf2803a115fa8d07c46e64eba8d49ca2e958bcf6b76ab2fba1227101e5b5aef2d9d5ec21be77a41a395f4a2f83a680f0241e
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

48 lines
1.6 KiB
Plaintext

"use client";
import {
navbar_menu_default
} from "./chunk-BKQISTKS.mjs";
import {
hideOnScrollVariants
} from "./chunk-RRUQIZLR.mjs";
import {
useNavbar
} from "./chunk-LTNGAWBY.mjs";
import {
NavbarProvider
} from "./chunk-IGERPFKH.mjs";
// src/navbar.tsx
import { forwardRef } from "@heroui/system";
import { pickChildren } from "@heroui/react-utils";
import { LazyMotion, m } from "framer-motion";
import { mergeProps } from "@react-aria/utils";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
var domAnimation = () => import("@heroui/dom-animation").then((res) => res.default);
var Navbar = forwardRef((props, ref) => {
const { children, ...otherProps } = props;
const context = useNavbar({ ...otherProps, ref });
const Component = context.Component;
const [childrenWithoutMenu, menu] = pickChildren(children, navbar_menu_default);
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsx("header", { ...context.getWrapperProps(), children: childrenWithoutMenu }),
menu
] });
return /* @__PURE__ */ jsx(NavbarProvider, { value: context, children: context.shouldHideOnScroll ? /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(
m.nav,
{
animate: context.isHidden ? "hidden" : "visible",
initial: false,
variants: hideOnScrollVariants,
...mergeProps(context.getBaseProps(), context.motionProps),
children: content
}
) }) : /* @__PURE__ */ jsx(Component, { ...context.getBaseProps(), children: content }) });
});
Navbar.displayName = "HeroUI.Navbar";
var navbar_default = Navbar;
export {
navbar_default
};