@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
45 lines • 1.8 kB
TypeScript
/**
* @license
* Copyright 2026 Kai-Orion & Sandlada
* SPDX-License-Identifier: MIT
*
* @fileoverview
* Internal base class for `mdc-chip-set` — the container that owns roving
* tabindex and optional single-select coordination across its `mdc-chip`
* children.
*
* Chips are self-managing views: each chip owns its own `selected` state and
* reports activation through the `chip-toggle` event. The set enforces the
* single-select mutex, re-emits committed changes as a composed
* `chip-set-selection` event, and roves focus with Arrow keys / Home / End
* (mirroring the Material Web chip-set semantics).
*/
import { LitElement, type TemplateResult } from 'lit';
import { type IChip } from '../chip.interface';
import { type IChipSet } from '../chip-set.interface';
declare const BaseChipSet_base: Omit<typeof LitElement, "prototype"> & (new () => LitElement & object);
export declare abstract class BaseChipSet extends BaseChipSet_base implements IChipSet {
static styles: import("lit").CSSResult;
/**
* When `true` at most one chip may be selected at a time (radio
* semantics); otherwise any number of chips may be selected (checkbox
* semantics).
*/
singleSelect: boolean;
private readonly assignedChips;
private cachedChips;
get chips(): IChip[];
constructor();
protected render(): TemplateResult;
private readonly handleSlotChange;
private readonly handleFocusIn;
private readonly handleUpdateFocus;
private readonly handleChipToggle;
private readonly handleKeydown;
/** Walk from `startIndex` in `step` direction (wrapping) for a focusable chip. */
private findNextFocusableChip;
private updateTabIndices;
private emitSelectionEvent;
}
export {};
//# sourceMappingURL=base-chip-set.d.ts.map