import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';export interface ChipGroupOverflowToggleDetail{expanded:boolean;}export interface LyraChipGroupEventMap{'lr-overflow-toggle':CustomEvent;} /** * `` — a flex-wrap container for a set of `` * children (plain light-DOM composition — direct children are the chips, * the same shape ``'s panels / ``'s cards * take — no `.items` array prop). * * `max-visible` is entirely optional. When unset, every child is always * shown and this component does nothing beyond flex-wrap layout. When set * and the group has more chip children than that, the excess children are * hidden (via their own `hidden` property — CSS alone can't parameterize * `:nth-child` on a runtime prop, so this reaches into the light DOM the * same way `` sets each panel's inline `flex`/`order`) and a * "+N" overflow-indicator pill takes their place. Clicking it is a toggle: * it reveals the rest (and relabels itself "Show less"); clicking again * re-collapses back to `max-visible`. `lr-overflow-toggle` fires only from * that click — i.e. only when `max-visible` is actually causing an overflow * state — never as a side effect of `max-visible`/children changing on * their own. * * Author-owned `hidden` changes remain live while collapse management is active. The latest author * state is restored when a child leaves or the group disconnects, and reconnecting reapplies the * current collapsed state. * * Collapsed groups reapply max-visible when assigned children are replaced or reordered at the same count, preserving authored hidden/inert state and releasing departed visibility leases. * * @customElement lr-chip-group * @slot - `` elements (or any content, though the chip pairing is * the intended usage). * @event lr-overflow-toggle - The overflow indicator was activated, * revealing or re-collapsing the excess children. `detail: { expanded }`. * @csspart base - The flex-wrap container (holds both the slot and the overflow indicator). * Carries `role="group"` and the accessible name when one is supplied -- see `accessibleLabel`. * @csspart overflow-indicator - The "+N" / "Show less" toggle button. Only rendered while `max-visible` is actively causing an overflow. * @cssprop [--lr-chip-group-gap=var(--lr-space-xs)] - Gap between `[part="base"]`'s wrapped * children, chips and the overflow indicator alike. * @cssprop [--lr-chip-group-overflow-expanded-color=var(--lr-color-text)] - Text color of * `[part="overflow-indicator"]` while expanded (`aria-expanded="true"`). * `::part(overflow-indicator)[aria-expanded='true']` is invalid CSS, so this is the only way to * retint the expanded state without re-pointing the shared `--lr-color-text` token. * @cssprop [--lr-chip-group-overflow-expanded-border-style=solid] - Border style of * `[part="overflow-indicator"]` while expanded. The resting indicator intentionally stays * dashed, so this can retune the expanded state without losing that structural affordance. * @status stable * @since 4.0.0 */ export declare class LyraChipGroup extends LyraElement{static styles:import("lit").CSSResultGroup[];private _maxVisible?; /** Maximum number of assigned children shown before the rest collapse behind a "+N" * indicator. Flattened slot-forwarded children count the same as direct light-DOM children. * Unset (the default) means no limit — every child is always shown. Any explicitly assigned * value is sanitized to a finite, non-negative integer via `finiteCount` — this feeds the * `hasOverflow`/`syncChildVisibility` index comparisons below directly, so a NaN/negative value * must never reach them. */ get maxVisible():number|undefined;set maxVisible(next:number|undefined|null); /** * Accessible name for the group, forwarded to `[part="base"]`. * * A chip group IS a group, and every peer grouping primitive here already says so -- * `` renders `role="radiogroup"`, `` the same, each forwarding a * host `aria-label` inward. This component rendered a roleless container and read no name, and * because a host `aria-label` does not cross a shadow boundary, a consumer labelling the host * named nothing at all. Supplying a name here (as the `aria-label` attribute or this property) * is what makes the group real to assistive technology. * * The `role="group"` is applied only WITH a name, deliberately: an unnamed group role adds * verbosity without adding information, and applying it unconditionally would change the * accessibility tree of every decorative chip row already shipped. */ accessibleLabel:string;private childCount; /** Whether the excess (beyond `max-visible`) children are currently * revealed. Meaningless (and never rendered) while there's no overflow. */ private expanded;private readonly authorHidden;private readonly observedChildren;private readonly pendingHiddenWrites;private visibilityObserver?;private visibilityObserverDocument?;private visibilityObserverGeneration;private trackedChipFocus?;connectedCallback():void;private armVisibilityObserver;protected willUpdate(changed:PropertyValues):void;firstUpdated(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;disconnectedCallback():void;adoptedCallback():void;private resetVisibilityObserver;private get hasOverflow();private assignedChildren;private isAuthorHidden;private isCapacityEligible;private eligibleChildren;private childWillBeVisible;private focusRepairBeforeVisibility;private focusTargetAfterVisibility;private reconcileChildVisibilityAndFocus;private syncChildVisibility;private observeChildren;private processHiddenMutations;private setManagedHidden;private restoreChildVisibility;private onSlotChange;private onFocusIn;private onFocusOut;private onToggleOverflow;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-chip-group':LyraChipGroup;}}