import "./menu_button.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { IconName } from "./icon"; import { type CurrentToken } from "./aria_current"; import { type StyleProps } from "./style_props"; import { type UseTooltipOptions } from "./tooltip"; export interface MenuButtonProps extends StyleProps { ref?: React.Ref; icon?: IconName | React.ReactNode; title?: string | React.ReactNode; right?: React.ReactNode; onPress?: () => void; onHoverIn?: () => void; /** Persistent SELECTION highlight — the listbox pattern. `aria-selected` is * valid on option/tab/row/gridcell and nowhere else, so on any other role * this is the highlight only (a menu carries state in the `right` slot). */ selected?: boolean; /** * This row is the CURRENT item in a set of NAVIGATION items. Renders * `aria-current`, which is global: `true` is the generic "this is the current * one", or name the set it is current WITHIN. Navigation is not selection — a * rail item is `current`, a listbox row is `selected`. */ current?: CurrentToken; focused?: boolean; disabled?: boolean; danger?: boolean; tooltip?: string | UseTooltipOptions; testID?: string; /** DOM id, used by combobox patterns via `aria-activedescendant`. */ id?: string; /** * Accessible name when `title` is a React node (so no string is available) * or when you need a name that differs from the visible title. */ accessibilityLabel?: string; /** * Override the ARIA role. Defaults to `menuitem` when pressable, matching * the common popover-menu usage. */ role?: "menuitem" | "button" | "option"; /** * Roving tabindex for a listbox this row belongs to: the selected row passes * `0` and every other row `-1`, so Tab reaches the list ONCE and arrows move * within it. `OptionList` does not need it: that body drives keys from a hidden * input, the combobox pattern, where the rows are never focused. */ tabIndex?: 0 | -1; /** Key handler. Pairs with {@link MenuButtonProps.tabIndex} to move the * roving focus. */ onKeyDown?: (event: React.KeyboardEvent) => void; render?: useRender.RenderProp; } /** * THE FIXED-HEIGHT MENU ROW — one line, an optional leading glyph, an optional * trailing slot. A popover's menu is a stack of these; so is an outline rail and * a plain listbox option. For a row that GROWS — a label over a description, or * custom content — reach for `ListItem`. */ export declare function MenuButton(props: MenuButtonProps): React.JSX.Element;