import { Tailwind } from '../base/tailwind-base'; import { PropertyValues } from 'lit'; import { PlusDropDownItem } from '../dropdown-item'; /** * @tag plus-dropdown * * Dropdown component that provides a collapsible menu with selectable options. * Uses Floating UI for intelligent positioning. * * @slot - The default slot for the dropdown trigger button content * @slot suffix - Slot for adding content to the right side of the trigger button * @slot dropdown-item - Slot for dropdown menu items * * @csspart base - The component's base wrapper * @csspart button - The dropdown trigger button * @csspart dropdown-box - The dropdown list container * * @event plus-dropdown-open - Emitted when the dropdown is opened * @event plus-dropdown-close - Emitted when the dropdown is closed * @event plus-dropdown-selected-item - Emitted when an item is selected with the selected item in detail * */ export default class PlusDropdown extends Tailwind { /** * Query all dropdown items * @private */ slots: PlusDropDownItem[]; /** * Sets the size of the dropdown button * - sm: Small size * - md: Medium size * - lg: Large size * @default 'md' */ size: 'sm' | 'md' | 'lg'; /** * Sets the status/color variant of the dropdown button * - default: Neutral color scheme * - primary: Primary color scheme * - success: Green color scheme * - warning: Yellow color scheme * - danger: Red color scheme * - info: Blue color scheme * @default 'default' */ status: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'; /** * Determines the visual style of the dropdown button * - filled: Solid background color * - outlined: Transparent background with border * - dashed: Transparent background with dashed border * - text: No background or border * @default 'filled' */ kind: 'filled' | 'outlined' | 'dashed' | 'text'; /** * Disables the dropdown interaction * @default false */ disabled: boolean; /** * Sets the text content of the dropdown button if no default slot is provided */ text?: string; /** * Tracks whether the dropdown is open or closed * @private */ private isVisible; /** * Tracks the currently selected dropdown item * @private */ private selectedItem; /** * Reference to the dropdown trigger button * @private */ private targetElement; /** * Reference to the dropdown container * @private */ private dropdownBox; /** * Cleanup function for Floating UI's autoUpdate * @private */ private cleanup?; /** * Unique ID for the dropdown for ARIA relationship * @private */ private dropdownId; /** * Updates the dropdown's position using Floating UI * @private */ private updatePosition; /** * Handles the click event for the trigger button * @private */ private handleClick; /** * Handles keyboard navigation for dropdown items * @param event The keyboard event * @private */ private handleKeyDown; /** * Handles the click event for dropdown items * @param event The click event * @private */ private handleItemClick; /** * Lifecycle method called after the component's first update * @param _changedProperties Map of changed properties * @private */ firstUpdated(_changedProperties: PropertyValues): void; /** * Handles clicks outside of the dropdown to close it * @param event The click event * @private */ private handleOutsideClick; /** * Cleans up the Floating UI autoUpdate subscription * @private */ private cleanupAutoUpdate; /** * Lifecycle method called when the component is removed from the DOM * @private */ disconnectedCallback(): void; /** * Renders the dropdown component * @returns The rendered template */ render(): import("lit-html").TemplateResult<1>; } export { PlusDropdown }; //# sourceMappingURL=dropdown.d.ts.map