import { MouseEvent, ReactNode } from 'react'; import { TooltipProps } from '../../data-display/tooltip'; /** * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#16073-21583 * Figma "Menus item" (h40, label 16px text-icon/body). Hover gray `#f0f2f4`, separator `#d3d8df`. */ export interface StyledMenuItemProps { /** @figmaProp content — Type (Only Label / Icon / Checkbox / Check mark) via composition */ children?: ReactNode; onClick?: (event: MouseEvent) => void; /** * Forwarded to the `
  • `, also when disabled — e.g. `stopPropagation` so a menu-item mousedown doesn't * dismiss the menu. */ onMouseDown?: (event: MouseEvent) => void; onMouseUp?: (event: MouseEvent) => void; /** @figmaProp State = true→"Disabled" */ disabled?: boolean; /** * @figmaProp none — behavioral. Why the item is unavailable. With `disabled` the item stays in * arrow-key navigation and shows the reason on hover, focus and tap (disabled-states DIS-1…DIS-3). */ disabledReason?: ReactNode; /** Side the disabled reason opens on. */ reasonPlacement?: TooltipProps['placement']; /** @figmaProp none — behavioral. The item's action is running; pair it with `disabled` and a reason. */ 'aria-busy'?: boolean; /** @figmaProp State = true→"Selected" */ selected?: boolean; /** * @figmaProp none — semantic. WAI-ARIA menu item role. Use `menuitemradio` for one-of-many * (e.g. a language picker) and `menuitemcheckbox` for on/off items, with `aria-checked`. */ role?: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox'; /** @figmaProp none — semantic. Checked state; rendered only for `menuitemradio` / `menuitemcheckbox`. */ 'aria-checked'?: boolean; /** Compact vertical padding (MUI `MenuItem` `dense` parity, DEC-003). */ dense?: boolean; /** * Hover/focus hint. Optional. When omitted, a checked and disabled checkbox (an option that is * already selected and cannot be picked again) gets "Allerede lagt til", or "Already added" when * `` is English. Pass this to use another phrase, such as "Already in use". */ tooltip?: ReactNode; value?: unknown; className?: string; classes?: { root?: string; selected?: string; }; sx?: unknown; /** * @figmaProp none — legacy test hook on the `
  • `, for apps whose `testIdAttribute` is `data-test` * (editor, qnreditor, storage, crm). New tests should query `data-testid`. */ 'data-test'?: string; /** @figmaProp none — test hook on the `
  • `. */ 'data-testid'?: string; } /** * Native `role="menuitem"` (replaces MUI `MenuItem`). Enter/Space activate; a disabled item stays * focusable but non-interactive (MUI parity). Public props preserved (DEC-003). TASK-303. */ export declare const StyledMenuItem: ({ children, onClick, onMouseDown, onMouseUp, disabled, disabledReason, reasonPlacement, "aria-busy": ariaBusy, selected, role, "aria-checked": ariaChecked, dense, tooltip, className, classes, sx, "data-test": dataTest, "data-testid": dataTestId, value: _value, }: StyledMenuItemProps) => JSX.Element;