import { type ReactNode } from "react"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type IconName } from "../icon/icon.js"; import { type DropdownSkin } from "./dropdown.styles.js"; export interface DropdownItem { label: string; /** Optional leading Canvas glyph rendered before the label, named from the kit * icon set (e.g. `"user"`, `"settings"`, `"logOut"`). Rendered through the * `Icon` atom, tinted to match the row (destructive rows go red). */ icon?: IconName; /** Optional trailing keyboard shortcut, right-aligned and muted. */ shortcut?: string; /** Red-tinted row for destructive actions (e.g. Delete). */ destructive?: boolean; /** Dimmed, non-interactive row: skips onSelect and renders at reduced opacity. */ disabled?: boolean; /** Draw a hairline separator above this row to start a new group. */ separatorBefore?: boolean; } export interface DropdownProps { /** Label for the default outline trigger button. Omit when supplying a custom * trigger via `children`. */ trigger?: string; /** A custom trigger rendered in place of the default outline button, e.g. an * avatar account chip. It is wrapped in a Pressable that toggles the menu; * the menu itself still comes from `items`. */ children?: ReactNode; /** The accessible name for a CUSTOM trigger (`children`). Without it the button * is named from its own contents, which runs the trigger's text together into * one unpunctuated string ("Rachel Chenrachel@example.com") and repeats any * label a nested control already carries. Ignored by the default `trigger` * button, which is named by its own text. */ triggerLabel?: string; /** Optional muted section heading rendered above the rows (e.g. "Actions"). */ label?: string; /** Identity header title, rendered in the popover foreground ABOVE everything * else in the menu (an account name over its email, say). Pair it with * `description`; passing neither omits the header block entirely. */ title?: string; /** Identity header second line, muted, under `title`. */ description?: string; /** The menu rows, top to bottom. */ items: DropdownItem[]; /** Align the menu's TRAILING edge with the trigger's trailing edge instead of * the leading edge (the default). For a trigger parked at the end of a bar, * where a leading-aligned menu would run off the surface. Logical, so a * right-to-left locale mirrors it. */ alignEnd?: boolean; /** Dimmed, inert trigger: the menu never opens and the press is a no-op. */ disabled?: boolean; /** Controlled open state. Omit for uncontrolled (the trigger opens/closes it). */ open?: boolean; /** Fired when the open state changes (trigger press, select, etc.). */ onOpenChange?: (open: boolean) => void; /** Fired with the selected item and its index when a row is pressed. */ onSelect?: (item: DropdownItem, index: number) => void; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** Build a Dropdown component from a platform skin. */ export declare function createDropdown(skin: DropdownSkin): (props: DropdownProps) => import("react").JSX.Element; //# sourceMappingURL=dropdown.shared.d.ts.map