import { Tailwind } from '../base/tailwind-base'; import { PropertyValues } from 'lit'; import { PlusSelectItem } from '../select-item'; /** * A select component that provides a collapsible menu with selectable options. * Uses Floating UI for intelligent positioning of the select menu. * * @tag plus-select * @slot - The default slot for the select trigger button content * @slot suffix - Slot for adding content to the right side of the trigger button * @slot select-item - Slot for select menu items * @csspart base - The component's base wrapper * @csspart select - The select trigger input * @csspart select-box - The select list container * @event plus-select-open - Emitted when the select is opened * @event plus-select-close - Emitted when the select is closed * @event plus-select-selected-item - Emitted when an item is selected, with the selected item in detail */ export default class PlusSelect extends Tailwind { /** * CSS styles for the component, including Tailwind base styles and custom styles. */ static styles: import("lit").CSSResult[]; /** * Queries all select items assigned to the 'select-item' slot. * @private */ slots: PlusSelectItem[]; /** * Sets the size of the select button. * @values 'sm' | 'md' | 'lg' * @default 'md' */ size: 'sm' | 'md' | 'lg'; /** * Placeholder text for the select trigger input. * @default '' */ placeholder: string; /** * Label text for the select. * @default '' */ label: string; /** * Indicates if the select is in an error state. * @default false */ error: boolean; /** * Disables the select, preventing interaction. * @default false */ disabled: boolean; /** * Marks the select as required. * @default false */ required: boolean; /** * Makes the select read-only, preventing changes. * @default false */ readonly: boolean; /** * Caption text displayed below the select. */ caption?: string; /** * Enables a clear button to reset the selection. * @default false */ clearable: boolean; /** * Makes the select full width. * @default false */ fullWidth: boolean; /** * Tracks the visibility state of the select menu. * @private */ private isVisible; /** * Stores the currently selected select item. * @private */ private selectedItem; /** * Reference to the select trigger input element. * @private */ private targetElement; /** * Reference to the select menu container. * @private */ private selectBox; /** * Cleanup function for Floating UI's autoUpdate. * @private */ private cleanup?; /** * Unique ID for ARIA relationship between the trigger and select menu. * @private */ private selectId; /** * Updates the select menu's position using Floating UI. * @private */ private updatePosition; /** * Handles click events on the select trigger input to toggle the menu. * @private */ private handleClick; /** * Handles keyboard navigation for select items. * @param event - The keyboard event * @private */ private handleKeyDown; /** * Handles click events on select items to select them. * @param event - The click event * @private */ private handleItemClick; /** * Handles changes to the 'select-item' slot to update item properties. * @private */ private handleSlotChange; /** * Initializes the component after it is first updated. * @param changedProperties - Map of changed properties * @private */ firstUpdated(changedProperties: PropertyValues): void; /** * Handles clicks outside the select to close it. * @param event - The click event * @private */ private handleOutsideClick; /** * Cleans up the Floating UI autoUpdate subscription. * @private */ private cleanupAutoUpdate; /** * Cleans up event listeners and subscriptions when the component is removed from the DOM. * @private */ disconnectedCallback(): void; /** * Renders the select component. * @returns The rendered template */ render(): import("lit-html").TemplateResult<1>; } export { PlusSelect }; //# sourceMappingURL=select.d.ts.map