import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'; import type { ComponentPropsWithoutRef } from 'react'; import { type ReactElement } from 'react'; import { type KeyboardShortcut } from '../utils/keyboardShortcuts'; import type { DropdownSide } from '.'; import type { Kbd } from '.'; import { Tooltip } from './Tooltip'; /** * Contains all the parts of a dropdown menu. * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#root */ declare const DropdownMenu: (props: ComponentPropsWithoutRef) => import("react/jsx-runtime").JSX.Element; /** * The button that toggles the dropdown menu. * By default, the {@link DropdownMenuContent} will position itself against the trigger. * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#trigger */ declare const DropdownMenuTrigger: import("react").ForwardRefExoticComponent>; /** * Used to group multiple {@link DropdownMenuItem}s. * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#group */ declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent>; /** * When used, portals the content part into the `body`. * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#portal */ declare const DropdownMenuPortal: import("react").FC; /** * A customizable sub-trigger component for dropdown menus. * This component extends the functionality of Radix UI's DropdownMenuPrimitive.SubTrigger. * * @component * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#subtrigger * * @example * * }> * Open Folder * * * {/ * Sub-menu items * /} * * * * @param props - The properties for the DropdownMenuSubTrigger component * @param props.className - Additional CSS classes to apply to the sub-trigger * @param props.inset - If true, adds left padding to align with menu items that have icons * @param props.icon - An optional ReactElement to display as an icon before the item text * @param props.children - The content of the sub-trigger * @param props.ref - Ref forwarded to the underlying Radix UI SubTrigger component * * @returns A styled and interactive sub-trigger for use in dropdown menus */ declare const DropdownMenuSubTrigger: import("react").ForwardRefExoticComponent, "ref"> & { inset?: boolean; icon?: ReactElement; } & import("react").RefAttributes>; /** * Contains all the parts of a submenu. * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#sub */ declare const DropdownMenuSub: import("react").FC; /** * The content of a submenu. Must be rendered inside of a `DropdownMenuSub`. * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#subcontent */ declare const DropdownMenuSubContent: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; /** * A customizable content component for dropdown menus. * This component extends the functionality of Radix UI's DropdownMenuPrimitive.Content. * * @component * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#content * @example * * Open Menu * * Item 1 * Item 2 * * * * @param props - The properties for the DropdownMenuContent component * @param props.className - Additional CSS classes to apply to the content * @param props.style - Additional inline styles to apply to the content * @param props.children - The content of the dropdown menu * @param props.side - The preferred side of the trigger to render the content against * @param props.sideOffset - The distance in pixels from the trigger * @param props.collisionPadding - The padding between the content and the viewport edges when collisions occur * @param props.ref - Ref forwarded to the underlying Radix UI Content component * * @returns A styled and positioned content component for dropdown menus */ declare const DropdownMenuContent: import("react").ForwardRefExoticComponent, "ref">, "side"> & { side?: DropdownSide; } & import("react").RefAttributes>; /** * A customizable menu item component for use within a dropdown menu. * This component extends the functionality of Radix UI's DropdownMenuPrimitive.Item. * * @component * @see https://www.radix-ui.com/primitives/docs/components/dropdown-menu#item * @example * * * } shortcut="Ctrl+U" onSelect={() => console.log('Selected')}> * User Profile * * * * * @param props - The properties for the DropdownMenuItem component * @param props.className - Additional CSS classes to apply to the menu item * @param props.icon - An optional ReactElement to display as an icon before the item text * @param props.children - The content of the menu item * @param props.shortcut - An optional KeyboardShortcut to display on the right side of the item * @param props.disabled - When true, prevents the user from interacting with the item * @param props.onSelect - Event handler called when the user selects an item (via mouse or keyboard) * @param props.textValue - Optional text used for typeahead purposes. By default, the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside * @param props.asChild - Change the component to the HTML tag or custom component of the only child * @param props.ref - Ref forwarded to the underlying Radix UI Item component * @param props.tooltip - Optional props to pass to the Tooltip component * * @returns A styled and interactive menu item for use in dropdown menus */ declare const DropdownMenuItem: import("react").ForwardRefExoticComponent, "ref"> & { icon?: ReactElement; shortcut?: KeyboardShortcut; noIcon?: boolean; tooltip?: Omit, "children">; } & import("react").RefAttributes>; /** * A label component for use within a dropdown menu. * This component is typically used to provide a heading or description for a group of menu items. * * @component * @example * * * Settings * Profile * Preferences * * * * @param props - The properties for the DropdownMenuLabel component * @param props.className - Additional CSS classes to apply to the label * @param props.inset - If true, adds left padding to align with inset menu items * @param props.ref - Ref forwarded to the underlying Radix UI Label component * * @returns A styled label component for use in dropdown menus */ declare const DropdownMenuLabel: import("react").ForwardRefExoticComponent, "ref"> & { inset?: boolean; } & import("react").RefAttributes>; /** * A separator component for use within a dropdown menu. * This component is a thin line used to visually separate groups of menu items. * * @component * @example * * * Item 1 * * Item 2 * * * * @param props - The properties for the DropdownMenuSeparator component * @param props.className - Additional CSS classes to apply to the separator * @param props.ref - Ref forwarded to the underlying Radix UI Separator component * * @returns A styled separator component for use in dropdown menus */ declare const DropdownMenuSeparator: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; /** * A component that renders a keyboard shortcut within a dropdown menu item. * * @component * @example * * Open File * ⌘O * * * @param props - The properties for the DropdownMenuShortcut component * @param props.className - Additional CSS classes to apply to the shortcut container * @param props.children - The content of the shortcut (typically a string representing the keyboard combination) * * @returns A styled div element containing the keyboard shortcut */ declare const DropdownMenuShortcut: { ({ className, ...props }: ComponentPropsWithoutRef): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** * A custom trigger component for the Dropdown Menu, styled as a "more" button with three vertical dots. * This component extends the functionality of Radix UI's DropdownMenuTrigger. * * @component * @example * * * * {/ * Dropdown menu items * /} * * * * @param {Object} props - The properties passed to the component * @param props.className - Additional CSS classes to apply to the trigger * @param props.disabled - Whether the trigger is disabled * @param props.ref - Ref forwarded to the underlying DropdownMenuTrigger component * * @returns A styled "more" button that triggers the dropdown menu */ declare const DropdownMenuTriggerMore: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DropdownMenuTriggerMore, };