import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';export interface LyraOptionEventMap{'lr-option-change':CustomEvent;} /** * `` — a selectable option for `` and ``. * Mirrors `` and ``. It acts as the data source for Lyra's * built-in pickers, which render their interactive rows in their own shadow roots. * * The effective `label` is an explicit non-empty `label` property/attribute when supplied, * otherwise `defaultLabel`, the normalized accessible text of the flattened default slot. Hidden * subtrees are excluded, visible nested `aria-label` values replace their descendants, and named * adornment slots never leak into either `defaultLabel` or Shoelace's `getTextLabel()` method. * Named adornment text, attributes, insertion/removal, and slot reassignment refresh the owning * combobox presentation, including decorative content that does not change the accessible label. * * Selection follows the native live/default split. The `selected` attribute initializes * `defaultSelected`, which parent controls use as their `form.reset()` baseline; property writes * to `defaultSelected` intentionally do not reflect. `selected` is independent property-only live * state, so a user pick never rewrites the declarative default. A later default change updates a * pristine live option, but never clobbers a live selection that has already become dirty. * Assigning a mounted option's `selected` property immediately updates its owning picker and * submitted value silently, including deselection and equal-value writes. * In a constrained option row the default label ellipsizes, while each `start`/`end` adornment is * capped at 40% of the row so unbroken consumer content cannot widen the owning listbox. * * `data` carries an opaque application payload (e.g. the backend record this option represents), * mirroring an async combobox source row's own `data` field. It is never read or rendered by this * component; it is retained by reference (never deep-cloned) through the owning `lr-combobox`'s * `selectedRows` and the owning `lr-select`'s `selectedData`, and in both controls' `lr-input`/ * `lr-change`/`input`/`change` event details. * * @customElement lr-option * @slot - The option's visible label. * @slot start - WA-compatible leading adornment. * @slot end - WA-compatible trailing adornment. * @slot prefix - Shoelace-compatible alias for `start`. * @slot suffix - Shoelace-compatible alias for `end`. * @event lr-option-change - The option's label or selectable data changed. The parent combobox * or select consumes this bubbling event to refresh its normalized option rows. * @csspart base - The option's outer visual wrapper. * @csspart checked-icon - The decorative checkmark shown while selected. * @csspart label - The default-slot label wrapper. * @csspart start - The WA-compatible leading-adornment wrapper; the same node as `prefix`. * @csspart end - The WA-compatible trailing-adornment wrapper; the same node as `suffix`. * @csspart prefix - The Shoelace-compatible leading-adornment wrapper; the same node as `start`. * @csspart suffix - The Shoelace-compatible trailing-adornment wrapper; the same node as `end`. * @cssstate current - The option is the roving-focus target (the keyboard-highlighted option). * @cssstate selected - The option's live `selected` property is true. * @cssstate disabled - The option is disabled. * @cssstate hover - The pointer is over the option, including pointer-drag sessions. * @cssprop [--current-text-color=var(--lr-color-text)] - Text color while the option is `current`. * @cssprop [--lr-option-hover-bg=var(--lr-color-brand-quiet)] - Hover background. * @cssprop [--lr-option-active-bg=color-mix(in oklab, var(--lr-option-hover-bg, var(--lr-color-brand-quiet)), var(--lr-color-mix-partner) var(--lr-color-mix-active))] - Pressed background. * @cssprop [--lr-option-current-bg=var(--lr-color-brand-quiet)] - Keyboard-current background. * @cssprop [--lr-option-current-color=var(--current-text-color, var(--lr-color-text))] - * Keyboard-current text color; the upstream `--current-text-color` remains its fallback. * @cssprop [--lr-option-selected-font-weight=var(--lr-font-weight-semibold)] - Selected label weight. * @cssprop [--lr-option-checked-icon-color=var(--lr-color-brand)] - Selected checkmark color. * @method getTextLabel - Returns the normalized accessibility-visible text of the default slot. * @status stable * @since 4.0.0 */ export declare class LyraOption extends LyraElement{static styles:import("lit").CSSResultGroup[];private readonly slotPresence;private readonly optionInternals;private hasHover;private hasCurrent;private _label;private selectedValue;private defaultSelectedValue;private selectedDirty; /** The selection key submitted with the form. */ value:string; /** Disable selecting this option. */ disabled:boolean; /** Whether this option is currently selected. Parent controls write this live, property-only * state without changing `defaultSelected` or the declarative reset attribute. * @default false */ get selected():boolean;set selected(next:boolean); /** Declarative/reset selection default supplied by the `selected` attribute. Property writes * intentionally do not reflect. A write updates the live state only until `selected` has been * written independently, and notifies the parent to update its `form.reset()` baseline. * @default false */ get defaultSelected():boolean;set defaultSelected(next:boolean);private setLiveSelected; /** Optional section header this option belongs under. */ group:string; /** Extra text the filter should match beyond the label. */ searchText:string; /** Optional secondary line rendered under the label (e.g. a status/date summary). */ sub:string; /** Optional color for a small leading status dot (any valid CSS color). */ dotColor:string; /** Opaque application payload, e.g. the backend record this option represents. Never read or * rendered by `` itself. The light-DOM counterpart to an async `source` row's own * `data` field: retained by reference (never deep-cloned) through the owning `lr-combobox`'s * `selectedRows` and the owning `lr-select`'s `selectedData`. */ data?:unknown; /** * The option's effective plain-text label. An explicit non-empty property/attribute wins; * otherwise this resolves to {@link defaultLabel}. Property writes intentionally do not reflect. */ get label():string;set label(next:string); /** Accessible text generated from flattened default-slot content, excluding named adornments. */ get defaultLabel():string;private labelObserver?;private observedDefaultLabel;private readonly handlePointerEnter;private readonly handlePointerLeave;private readonly handleFocusIn;private readonly handleFocusOut;private readonly handleLabelMutation;private isDefaultLabelNode;private labelForwardingSlots;private observeLabelNode;private composedParentForLabelNode; /** The consumer-owned ancestry where forwarded content was authored. Unlike the composed parent * walk used to bind observers, this deliberately ignores `assignedSlot`: a picker projects its * option through an internal `