@loadsmart/miranda-wc
Version:
Miranda Web Components component library
71 lines (70 loc) • 2.07 kB
TypeScript
import type { PropertyValues } from 'lit';
import { Popover } from '../popover';
import type { PositionalFocus } from '../../controllers/focus-manager';
import type { PopoverProps, PopoverPlacement } from '../popover';
export type DropdownPlacement = PopoverPlacement;
export type DropdownSize = 'small' | 'default' | 'large';
export interface DropdownProps extends PopoverProps {
disabled?: boolean;
size?: DropdownSize;
oncollapse?: (event: CustomEvent) => void;
onexpand?: (event: CustomEvent) => void;
}
export declare class Dropdown extends Popover implements DropdownProps {
#private;
static styles: (import("lit").CSSResult | import("lit").CSSResult[])[][];
static get properties(): {
disabled: {
type: BooleanConstructor;
reflect: boolean;
};
size: {
type: StringConstructor;
reflect: boolean;
};
position: {
type: StringConstructor;
reflect: boolean;
};
placement: {
type: StringConstructor;
};
open: {
type: BooleanConstructor;
reflect: boolean;
};
asPopover: {
type: BooleanConstructor;
attribute: string;
};
};
/**
* Should the dropdown be disabled?
*/
disabled: DropdownProps['disabled'];
/**
* Dropdown size.
*/
size?: DropdownProps['size'];
static define(): void;
constructor();
firstUpdated(): void;
updated(changedProperties: PropertyValues<this>): void;
getReferenceElement(): HTMLElement | null;
getFloatingElement(): HTMLElement | null;
getArrowElement(): null;
getFloatingOffset: () => number;
render(): import("lit-html").TemplateResult<1>;
expand(args?: {
position?: PositionalFocus;
}): Promise<void>;
collapse(): Promise<void>;
toggle(args?: {
position?: PositionalFocus;
}): void;
}
declare global {
interface HTMLElementTagNameMap {
'm-dropdown': Dropdown;
}
}