import { PropertyValues } from 'lit'; import { SpectrumElement } from '../../element/index.js'; import { ButtonGroupAlignment, ButtonGroupOrientation, ButtonGroupSize } from './ButtonGroup.types.js'; declare const ButtonGroupBase_base: typeof SpectrumElement & { new (...args: any[]): import('../../mixins/index.js').SizedElementInterface; prototype: import('../../mixins/index.js').SizedElementInterface; } & import('../../mixins/index.js').SizedElementConstructor; /** * A button group clusters related actions together, providing consistent * spacing, sizing, and orientation. The host exposes `role="group"` and * propagates `size` and `disabled` to slotted button children. * * This base class owns shared logic and accessibility semantics. Rendering * and styling live in the concrete SWC subclass. * * @slot - One or more `swc-button` elements. * * @attribute {ElementSize} size - The size of the button group and its children. */ export declare abstract class ButtonGroupBase extends ButtonGroupBase_base { /** * The size of the button group. Propagated to all slotted button children. * * @default m */ size: ButtonGroupSize; /** * @internal * * Valid orientation values for validation. */ static readonly ORIENTATIONS: readonly string[]; /** * @internal * * Valid alignment values for validation. */ static readonly ALIGNMENTS: readonly string[]; /** * The layout direction of the button group. * * Note: this property does NOT set `aria-orientation` on the host because * `aria-orientation` is only meaningful for roles that manage arrow-key * navigation (e.g. `toolbar`, `listbox`). Since button-group uses * sequential Tab navigation (not roving tabindex), the attribute would * be invalid. */ orientation: ButtonGroupOrientation; /** * Whether all buttons in the group are disabled. When `true`, forces * every slotted button child to `disabled`. When `false`, children * retain their individual disabled state — a button slotted with * `disabled` remains disabled even when the group is enabled. */ disabled: boolean; /** * The alignment of buttons within the group along the main axis. */ align: ButtonGroupAlignment; private buttons; /** * Tracks buttons that were individually disabled before the group * forced all children disabled. Used to restore their state when * the group becomes enabled again. */ private individuallyDisabled; private readonly _sizePropagation; protected firstUpdated(changed: PropertyValues): void; protected update(changedProperties: PropertyValues): void; protected updated(changed: PropertyValues): void; /** * Handles slotchange events from the default slot. Ensures newly slotted * children receive the current size and disabled state. */ protected handleSlotchange(): void; /** * Propagates disabled state to slotted button children. * * Uses a one-directional model: when the group is disabled, all children * are forced disabled (tracking which were already individually disabled). * When the group is enabled, children are restored to their individual * disabled state — a button slotted with `disabled` remains disabled. * * On slotchange when the group is enabled, buttons are not touched so * their declarative `disabled` attribute is preserved. */ private propagateDisabledToChildren; } export {};