UNPKG

@progress/kendo-angular-buttons

Version:
82 lines (81 loc) 3.28 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterViewInit, ElementRef, EventEmitter, NgZone, OnDestroy, Renderer2 } from '@angular/core'; import { ResizeSensorComponent } from '@progress/kendo-angular-common'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { SegmentedItemSettings, SegmentedControlLayout, SegmentedControlSize } from './models'; import * as i0 from "@angular/core"; /** * Represents the Kendo UI SegmentedControl component for Angular. * * Renders a group of buttons where only one can be selected at a time, * with a sliding selection indicator. */ export declare class SegmentedControlComponent implements AfterViewInit, OnDestroy { private renderer; private wrapper; private zone; hostClass: boolean; get stretchedClass(): boolean; get direction(): string; hostRole: string; thumb: ElementRef; resizeSensor: ResizeSensorComponent; /** * Specifies the collection of items to render in the SegmentedControl. */ set items(value: Array<SegmentedItemSettings>); get items(): Array<SegmentedItemSettings>; /** * Specifies the layout mode of the SegmentedControl. * * @default 'compact' */ set layoutMode(value: SegmentedControlLayout); get layoutMode(): SegmentedControlLayout; /** * Specifies the size of the SegmentedControl. */ set size(size: SegmentedControlSize); get size(): SegmentedControlSize; /** * Specifies the index of the selected button in the `items` array. * * @default 0 */ set selected(value: number); get selected(): number; /** * Fires when the selected button changes. Emits the index of the selected button. */ selectedChange: EventEmitter<number>; /** * @hidden */ selectedButtonIndex: number; private _items; private _size; private _layoutMode; private _direction; private subs; constructor(renderer: Renderer2, wrapper: ElementRef, zone: NgZone, localization: LocalizationService); ngAfterViewInit(): void; ngOnDestroy(): void; /** * @hidden */ handleClick(button: SegmentedItemSettings, index: number): void; /** * @hidden */ handleKeydown(event: KeyboardEvent, button: SegmentedItemSettings): void; private handleSizeClass; /** * Updates the thumb position to reflect the currently selected button. */ private showSelectionIndicator; static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedControlComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedControlComponent, "kendo-segmented-control", never, { "items": { "alias": "items"; "required": false; }; "layoutMode": { "alias": "layoutMode"; "required": false; }; "size": { "alias": "size"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>; }