import type { ButtonSize } from '../button/button.js'; import { type MenuPlacement, type MenuSelectDetail } from '../menu/menu.js'; import '../button/button.js'; import '../menu/menu.js'; import { type OpenDetail } from '../shared/events.js'; import { UiElement } from '../shared/element.js'; export type MenuButtonKind = 'primary' | 'tertiary' | 'ghost'; /** Same as `MenuButtonKind` (for code written with `variant`). */ export type MenuButtonVariant = MenuButtonKind; declare const UiMenuButton_base: (new (...args: any[]) => import("../shared/align.ts").AlignAlias) & typeof UiElement; /** * Carbon `MenuButton`: a labelled button with a chevron that opens a `` of the slotted * items. Kinds primary / tertiary / ghost (`kind`, Carbon's name; `variant` still works), sizes sm / md / lg (menu rows follow the size). * With `placement="bottom"` / `"top"` the menu is as wide as the button; `-start` / `-end` * align an edge instead. Non-ghost buttons are at least 192px wide. * * @slot - ``, ``, `` * @fires ui-select - bubbles from the activated item: detail { value, label, checked } * @fires ui-toggle - detail: { open } * @csspart trigger - The `` * @csspart menu - The `` * @attr align - Carbon's name for `placement` (same values) * @attr variant - Same as `kind`, kept for teams used to `variant` (shadcn, MUI); `kind` is Carbon's name and the one in the docs */ export declare class UiMenuButton extends UiMenuButton_base { /** `el.focus()` lands on the control inside. */ static readonly shadowRootOptions: ShadowRootInit; static readonly styles: import("lit").CSSResult; label: string; /** Carbon `kind`: primary, tertiary or ghost. */ kind: MenuButtonKind; /** Same as `kind` (permanent alias for teams used to `variant`); a `variant` attribute works too. */ get variant(): MenuButtonKind; set variant(value: MenuButtonKind); static get observedAttributes(): string[]; attributeChangedCallback(name: string, old: string | null, value: string | null): void; /** sm 32 / md 40 / lg 48px (Carbon has no xl / 2xl here). */ size: Exclude; placement: MenuPlacement; disabled: boolean; open: boolean; private readonly button; private readonly menu; protected updated(changed: Map): void; private onTriggerKeydown; private toggle; render(): import("lit-html").TemplateResult<1>; } export interface UiMenuButtonEventMap extends HTMLElementEventMap { 'ui-select': CustomEvent; 'ui-toggle': CustomEvent; } /** Typed listeners for UiMenuButton's events (declaration merging with the class). */ export interface UiMenuButton { addEventListener(type: K, listener: (this: UiMenuButton, event: UiMenuButtonEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: UiMenuButton, event: UiMenuButtonEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare global { interface HTMLElementTagNameMap { 'ui-menu-button': UiMenuButton; } } export {};