import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraSizeAlias,LyraSizeStep,LyraVariant}from'../../../internal/variants.js'; /** The library's one semantic-tone vocabulary. */ export type ChipVariant=LyraVariant; /** The shared six-step ladder plus one step below it (a chip is the library's smallest labelled * surface and needs a tier that fits inside a table cell, which no other component does), plus * the `small`/`medium`/`large` aliases ``/`` already accept for the six * shared steps. `3xs` has no long-form alias -- it is a Lyra-only step below the shared ladder, * not part of the upstream scale either spelling mirrors. */ export type ChipSize=LyraSizeStep|'3xs'|LyraSizeAlias;export interface ChipRemoveDetail{value?:string;}export interface ChipSelectDetail{value?:string;selected:boolean;}export interface LyraChipEventMap{'lr-remove':CustomEvent;'lr-chip-select':CustomEvent;} /** * `` — a small, content-agnostic pill for a short label: a tag, an * active-filter/scope indicator, etc. Distinct from `` * (specifically file-shaped, with a thumbnail/size/upload-progress) — this * one carries no domain assumptions at all, just a label and an optional * leading adornment. * * `variant` tints the whole pill using the same loud-color-on-quiet-tint * convention ``/`` already * establish for status coloring: background is the variant's quiet fill, * text/icon is its loud fill, both read from the shared semantic grid. * `neutral` (the default) deliberately opts out of that grid's own neutral * row and falls back to a plain bordered-surface look — the same "no signal" * treatment ``'s `default` status and * ``'s `pending` status already use. * * This property was called `tone` before 8.0.0. It is `variant` now, with no * alias: the library spells one concept one way, and ``, * `` and `` all already spelled it `variant`. * * This is a controlled component: clicking the remove (×) button only fires * `lr-remove` — the chip never removes itself from the DOM on its own * interaction, the same contract ``/ * `` already follow. A consumer owns the underlying * list and decides whether/how the click actually removes anything. * `disabled` disables whichever native action control is active and suppresses * selection/removal requests without changing the controlled state. * If an interactive chip has a host `aria-label`, the host becomes the single aggregate * `role="group"` owner. The native toggle/remove action keeps a purpose-specific name derived from * visible label text (or its localized fallback), avoiding two owners with the same copied name. * * @customElement lr-chip * @slot - The chip's label content. Visible accessible text and forwarding-slot reassignment stay * synchronized with toggle/remove action names. In toggle mode its flattened subtree is inert and * hidden from assistive technology while the separate native toggle owns the action and name. * @slot start - Optional decorative leading adornment, such as an icon or status dot. Its * flattened subtree remains visible but is inert and hidden from assistive technology. Nothing is * reserved for it (no extra gap) when left empty. * @slot end - Optional trailing content, typically an icon, placed after the label and before the * toggle/remove button. Nothing is reserved for it (no extra gap) when left empty, mirroring * ``'s identical `end` slot. It remains ordinary consumer content in passive/removable * mode; toggle mode makes its flattened subtree inert and hidden from assistive technology beneath * the full-surface native toggle. * @event lr-remove - The remove (×) button was activated (click, or * Enter/Space while focused — native `