import React from "react"; import { PlusSelectItem as PlusSelectItemElement } from "../dist/components/select-item/index.js"; export type { PlusSelectItemElement }; export interface PlusSelectItemProps extends Pick< React.AllHTMLAttributes, | "children" | "dir" | "hidden" | "id" | "lang" | "slot" | "style" | "title" | "translate" | "onClick" | "onFocus" | "onBlur" > { /** Disables the select item, preventing interaction. When disabled, the item cannot be clicked or selected. */ disabled?: boolean; /** Indicates whether the select item is currently selected. The selected state is managed by the parent PlusSelect component. */ selected?: boolean; /** Sets the size of the select item. */ size?: PlusSelectItemElement["size"]; /** Sets the text content of the select item. If provided, this will be used as the item's content and as the aria-label for accessibility. If not provided, the slotted content is used for accessibility. */ text?: PlusSelectItemElement["text"]; /** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */ className?: string; /** Contains a space-separated list of the part names of the element that should be exposed on the host element. */ exportparts?: string; /** Used for labels to link them with their inputs (using input id). */ htmlFor?: string; /** Used to help React identify which items have changed, are added, or are removed within a list. */ key?: number | string; /** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */ part?: string; /** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */ ref?: any; /** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */ tabIndex?: number; /** Emitted when the select item is clicked, handled by the parent PlusSelect component */ onClick?: (event: CustomEvent) => void; } /** * A select item component that represents a selectable option within a select menu. * Automatically registers itself as a select-item slot in the parent PlusSelect component. * --- * * * ### **Events:** * - **click** - Emitted when the select item is clicked, handled by the parent PlusSelect component * * ### **Slots:** * - _default_ - The default slot for select item content * * ### **CSS Properties:** * - **--i-bg-default** - Controls the default background color _(default: undefined)_ * - **--i-bg-hovered** - Controls the background color when hovered _(default: undefined)_ * - **--i-bg-pressed** - Controls the background color when pressed _(default: undefined)_ * - **--i-text-color** - Controls the text color _(default: undefined)_ * - **--i-selected-bg** - Controls the background color when selected _(default: undefined)_ * * ### **CSS Parts:** * - **base** - The component's base wrapper * - **item** - The listbox item element */ export const PlusSelectItem: React.ForwardRefExoticComponent;