import type React from 'react'; import type { MenuActionDetail, MenuChangeDetail, MenuEntry } from './types.js'; export interface ProfileMenuRef extends HTMLElement { /** Opens the profile menu dropdown. */ open(): void; /** Closes the profile menu dropdown. */ close(): void; } /** * Trigger is an avatar (configured via `src`, `initials`, `name` props). * Dropdown entries come from the `entries` prop, same as Menu. * Action events fire `cx-action` with `MenuActionDetail.id`. * * In React, reach the imperative methods through a ref: * `const api = useRef(null)`, pass `ref={api}`, then `api.current?.open()`. * Available: open(), close(). * * @csspart panel, trigger */ export interface ProfileMenuOwnProps { /** * Unique identifier for the element. * @example 'example-id' */ id?: string; /** * Visible label text. * @example 'Example label' */ label?: string; /** * URL of the image to display. * @example 'example' */ image?: string; /** * Fallback initials displayed when no avatar image is available. * @example 'example' */ initials?: string; /** * Corner radius style. Allowed values: `circle`, `rounded`. * @example 'circle' */ shape?: 'circle' | 'rounded'; /** * Component size. Allowed values: `xs`, `sm`, `md`, `lg`, `xl`. * @example 'xs' */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** * Dropdown panel width preset. Allowed values: `auto`, `sm`, `md`, `lg`. * @example 'auto' */ width?: 'auto' | 'sm' | 'md' | 'lg'; /** * Disables the component, preventing interaction. * @defaultValue false * @example true */ disabled?: boolean; /** * Menu or split-button entry definitions. Each entry has an `id` field — this is what `MenuActionDetail.id` returns in action events. * @example [{ id: 'edit', label: 'Edit', icon: 'pencil' }] */ entries?: MenuEntry[]; /** * Fires when the user activates an action item. Detail: `MenuActionDetail`. * @example (event) => console.log(event.detail.id) */ onAction?: (event: CustomEvent) => void; /** * Fires when the committed component value or state changes. Detail: `MenuChangeDetail`. * @example (event) => console.log(event.detail.checked) */ onChange?: (event: CustomEvent) => void; /** CSS class applied to the Custom Element host. * @example 'my-component' */ className?: string; /** Inline styles applied to the Custom Element host. * @example { marginTop: 8 } */ style?: React.CSSProperties; } /** * Props for ``: the component's own API plus every standard DOM * attribute and native React event handler, forwarded verbatim to the * `` host — `id`, `data-*`, `aria-*`, `title`, `tabIndex`, * `slot`, `onMouseEnter`, and the rest. Own props always win over a * same-named DOM attribute. */ export type ProfileMenuProps = ProfileMenuOwnProps & Omit, keyof ProfileMenuOwnProps | 'children' | 'dangerouslySetInnerHTML'>; export declare const ProfileMenu: React.ForwardRefExoticComponent, "children" | "dangerouslySetInnerHTML" | keyof ProfileMenuOwnProps> & React.RefAttributes>;