import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraSize}from'../../../internal/variants.js';export interface LyraSegmentedItem{value:string;label:string; /** Optional decorative leading visual rendered before the label. This is intentionally general * content, not a square-icon-only field: SVG icons, flag glyphs, badges, and other * natural-aspect-ratio Lit content are supported. It is rendered in inert, aria-hidden chrome, * so it cannot provide an independent action or accessible name. */ icon?:unknown;disabled?:boolean;}export interface LyraSegmentedEventMap{'lr-change':CustomEvent<{value:string;}>;'lr-activate':CustomEvent<{value:string;}>;} /** * `` — a single-select button row with the WAI-ARIA APG `radiogroup` contract * built in: `role="radiogroup"`/`role="radio"`, roving tabindex, automatic activation (click or * arrow-key move both select immediately, like a native radio group), cyclic Arrow/Home/End * navigation among non-disabled items. First-party invention -- * "choose exactly one of N labeled options, rendered as a button row" is ubiquitous * settings/filter-panel UI. Supports the library's shared `size` ladder, the same one * ``/``/`` use, so it can sit flush beside those controls in a * toolbar at a matching height. * * @customElement lr-segmented * @event lr-change - Fired when the selected value changes via click or keyboard. * `detail: { value }`. * @event lr-activate - Fired on every activation of a non-disabled segment -- a click, or * an Arrow/Home/End key that lands on one -- whether or not the selection actually moved. * `detail: { value }` carries the activated segment's own value. Bubbling and composed, so a host * outside the shadow tree receives it. Not cancelable: it is a notification that the user picked a * segment, not a veto point, and nothing in this component branches on it. Re-picking the current * value is the case `lr-change` deliberately stays silent for (a re-submit, a re-fetch, a panel * the host wants to reopen), and it is otherwise unobservable for keyboard activation, which * produces no click. When an activation does move the selection, `lr-change` is emitted first, so * a listener reading `value` from either event always sees the settled selection. * @method scrollToValue - `scrollToValue(value: string): void` — scroll the segment with the given * `value` into view within the (possibly overflowing) track. Called automatically when `value` * changes programmatically; exposed for the "reveal without selecting" case. Honors * `prefers-reduced-motion`. * @csspart base - The `role="radiogroup"` root. * @csspart segment - A single `role="radio"` button. * @csspart segment-icon - Optional decorative leading visual supplied by the item's `icon` field. * Content may have a natural aspect ratio and is not restricted to a square icon; it is inert and * hidden from assistive technology, so it cannot provide an independent action or accessible name. * @csspart segment-label - The segment's label text. * @cssprop [--lr-scroll-fade-size=2rem] - Width of the fade at each horizontal scroll edge. The * fade is applied only while the track actually overflows, so a row that fits is never dimmed. * @cssprop [--lr-segmented-track-min-height=var(--lr-form-control-height)] - Minimum height of the * `base` track, taken from the `size` tier's shared control height; the `2.5rem` (40px) default * applies at the unset/`m` size, matching ``/``/``'s own shared * default-tier floor. The private default follows `size`; a public value inherited from an * ancestor or set directly on the element remains authoritative in every tier. * @cssprop [--lr-segmented-track-height] - Exact height of the `base` track, pinning it at every * `size` tier (sets both `block-size` and `min-block-size`) so the row can sit flush beside a * hard-sized toolbar control. **Genuinely unset by default** — while unset each tier keeps its * own `--lr-segmented-track-min-height` floor and the track grows with its content. * @cssprop [--lr-segmented-selected-bg=var(--lr-color-surface)] - Background of the checked * segment. Scoped to `[aria-checked='true']` only, so it never repaints a hovered unselected * segment (which is what hijacking `--lr-color-surface` library-wide used to do). * @cssprop [--lr-segmented-selected-color=var(--lr-color-text)] - Text color of the checked segment. * @cssprop [--lr-segmented-selected-font-weight=var(--lr-font-weight-semibold)] - Font weight of the * checked segment. * @cssprop [--lr-segmented-selected-shadow=var(--lr-shadow-xs)] - Box shadow lifting the checked * segment off the track. * @cssprop [--lr-segmented-hover-color=var(--lr-color-text)] - Text color of a hovered segment that * is neither checked nor disabled. Independent of the selected-state props above — recoloring the * checked pill leaves this untouched. * @cssprop [--lr-segmented-hover-bg=transparent] - Background of a hovered segment that is neither * checked nor disabled. Undeclared by default, so it falls back to the segment's own resting * transparent background — byte-identical to before this property existed. * @cssprop [--lr-segmented-hover-shadow=none] - Box shadow of a hovered segment that is neither * checked nor disabled. Undeclared by default, matching the segment's own resting absence of a * shadow. * @cssprop [--lr-segmented-active-bg=color-mix(in oklab, transparent, var(--lr-color-mix-partner) var(--lr-color-mix-active))] - * Background of a pressed segment that is neither checked nor disabled. * @cssprop [--lr-segmented-active-color=var(--lr-segmented-hover-color, var(--lr-color-text))] - * Text color of a pressed segment that is neither checked nor disabled. Its default follows * `--lr-segmented-hover-color` to preserve the established hover/pressed relationship; set this * property to theme the pressed text independently. * @cssprop [--lr-segmented-segment-padding=var(--lr-form-control-padding-block) var(--lr-form-control-padding-inline)] - * Each segment's padding, taken from the `size` tier's shared control padding. * @cssprop [--lr-segmented-font-size=var(--lr-form-control-font-size)] - Each segment's font size, * taken from the `size` tier's shared control font size. * @cssprop [--lr-segmented-track-gap=var(--lr-size-0-125rem)] - Gap between segments. * @cssprop [--lr-segmented-track-radius=var(--lr-radius)] - Track corner radius. * @cssprop [--lr-segmented-track-padding=var(--lr-size-0-125rem)] - Track inset padding. * @cssprop [--lr-segmented-track-bg=transparent] - Background of the `base` track. Undeclared by * default, matching its own current absence of a background. * @cssprop [--lr-segmented-track-border-color=var(--lr-color-border)] - Border color of the `base` * track, which previously read that token as a literal with no override hook. * @status stable * @since 4.0.0 */ export declare class LyraSegmented extends LyraElement{static styles:import("lit").CSSResultGroup[];private effectiveItems; /** The button row's immutable, bounded items. Later duplicate values are ignored. */ get items():readonly LyraSegmentedItem[];set items(value:readonly LyraSegmentedItem[]); /** The currently selected item's `value`. */ value:string; /** Accessible-name fallback for the radiogroup when the host has no `aria-label`, used when no * visible label context exists around it (e.g. no wrapping `