@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
41 lines • 1.87 kB
TypeScript
/**
* @license
* Copyright 2026 Kai-Orion & Sandlada
* SPDX-License-Identifier: MIT
*
* @fileoverview
* Internal base class for `mdc-segmented-button-set` — the container that owns
* selection across its `mdc-segmented-button` children.
*
* Segments are pure views: they report activation through the
* `segmented-button-interaction` event and the set decides whether the
* selection commits, mirroring the Material Web segmented-button-set
* semantics and the Flutter `SegmentedButton` API shape. The set re-emits
* committed changes as a composed `segmented-button-set-selection` event.
*/
import { LitElement, type TemplateResult } from 'lit';
import { type ISegmentedButtonSet } from '../segmented-button.interface';
declare const BaseSegmentedButtonSet_base: Omit<typeof LitElement, "prototype"> & (new () => LitElement & object);
export declare abstract class BaseSegmentedButtonSet extends BaseSegmentedButtonSet_base implements ISegmentedButtonSet {
static styles: import("lit").CSSResult;
/**
* When `true` any number of segments may be selected (checkbox semantics);
* otherwise exactly one segment is selected at a time (radio semantics,
* where the selected segment cannot be deselected by clicking it).
*/
multiselect: boolean;
private readonly assignedButtons;
private buttons;
getButtonDisabled(index: number): boolean;
setButtonDisabled(index: number, disabled: boolean): void;
getButtonSelected(index: number): boolean;
setButtonSelected(index: number, selected: boolean): void;
toggleSelection(index: number): void;
protected render(): TemplateResult;
private readonly handleSegmentedButtonInteraction;
private readonly handleSlotChange;
private emitSelectionEvent;
private indexOutOfBounds;
}
export {};
//# sourceMappingURL=base-segmented-button-set.d.ts.map