"use client"; import {Menu as BaseMenu} from "@base-ui/react/menu"; import {Menubar as BaseMenubar} from "@base-ui/react/menubar"; import {mergeProps} from "@base-ui/react/merge-props"; import {useRender} from "@base-ui/react/use-render"; import {Check, ChevronRight, Circle} from "lucide-react"; import * as React from "react"; import {cn} from "@/lib/utilities"; import styles from "./menubar.module.css"; interface MenubarSubTriggerProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; /** * Applies inset spacing to align nested content. * @default false */ inset?: boolean; } interface MenubarContentProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; } interface MenubarItemProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; /** * Applies inset spacing to align nested content. * @default false */ inset?: boolean; } interface MenubarCheckboxItemProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; } interface MenubarRadioItemProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; } interface MenubarLabelProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; /** * Applies inset spacing to align nested content. * @default false */ inset?: boolean; } interface MenubarSeparatorProps extends Omit, "className"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; } interface MenubarShortcutProps extends React.ComponentPropsWithRef<"span"> { /** * Applies additional CSS classes to the component root element. * @default undefined */ className?: string; /** * Overrides the default rendered element while preserving component behavior. * @default undefined */ render?: useRender.RenderProp>; /** * Enables child element composition instead of rendering the default wrapper. * @default false * @deprecated Prefer Base UI's `render` prop. */ asChild?: boolean; } /** * Renders the menubar menu. * * @remarks * - Delegates structure and state to the underlying Base UI primitive * - Built on {@link https://base-ui.com/react/components/menubar | Base UI Menubar} * - Preserves the underlying primitive API for advanced composition * * @example * ```tsx * Content * ``` * * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation} */ const MenubarMenu: typeof BaseMenu.Root & {displayName?: string} = BaseMenu.Root; /** * Renders the menubar group. * * @remarks * - Delegates structure and state to the underlying Base UI primitive * - Built on {@link https://base-ui.com/react/components/menubar | Base UI Menubar} * - Preserves the underlying primitive API for advanced composition * * @example * ```tsx * Content * ``` * * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation} */ const MenubarGroup = BaseMenu.Group; /** * Provides the menubar portal container. * * @remarks * - Delegates structure and state to the underlying Base UI primitive * - Built on {@link https://base-ui.com/react/components/menubar | Base UI Menubar} * - Preserves the underlying primitive API for advanced composition * * @example * ```tsx * Content * ``` * * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation} */ const MenubarPortal = BaseMenu.Portal; /** * Coordinates the menubar radio group. * * @remarks * - Delegates structure and state to the underlying Base UI primitive * - Built on {@link https://base-ui.com/react/components/menubar | Base UI Menubar} * - Preserves the underlying primitive API for advanced composition * * @example * ```tsx * Content * ``` * * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation} */ const MenubarRadioGroup = BaseMenu.RadioGroup; /** * Coordinates the menubar sub. * * @remarks * - Delegates structure and state to the underlying Base UI primitive * - Built on {@link https://base-ui.com/react/components/menubar | Base UI Menubar} * - Preserves the underlying primitive API for advanced composition * * @example * ```tsx * Content * ``` * * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation} */ const MenubarSub: typeof BaseMenu.SubmenuRoot & {displayName?: string} = BaseMenu.SubmenuRoot; /** * Coordinates menubar state and accessibility behavior. * * @remarks * - Renders a `
` element by default * - Built on {@link https://base-ui.com/react/components/menubar | Base UI Menubar} * - Supports the `render` prop for element composition * * @example * ```tsx * Content * ``` * * @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation} */ function Menubar(props: Readonly): React.ReactElement { const {className, children, render, ...otherProps} = props; return ( {children} ); } /** * Renders the menubar trigger. * * @remarks * - Renders a `