UNPKG

@progress/kendo-angular-toolbar

Version:

Kendo UI Angular Toolbar component - a single UI element that organizes buttons and other navigation elements

118 lines (117 loc) 4.15 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { QueryList, ElementRef } from '@angular/core'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { ToolBarToolComponent } from './toolbar-tool.component'; import { ToolBarButtonComponent } from './toolbar-button.component'; import { ButtonGroupSelection } from '../group-selection-settings'; import { PreventableEvent } from '@progress/kendo-angular-buttons'; import { ToolBarComponent } from '../toolbar.component'; import * as i0 from "@angular/core"; /** * Represents the [Kendo UI Toolbar ButtonGroup for Angular](slug:controltypes_toolbar#button-groups). * * Use this component to group buttons in a ButtonGroup inside the ToolBar. * * @example * ```html * <kendo-toolbar> * <kendo-toolbar-buttongroup> * <kendo-toolbar-button text="Bold"></kendo-toolbar-button> * <kendo-toolbar-button text="Underline"></kendo-toolbar-button> * <kendo-toolbar-button text="Italic"></kendo-toolbar-button> * </kendo-toolbar-buttongroup> * </kendo-toolbar> * ``` * * @remarks * Supported children components are: {@link ToolBarButtonComponent} */ export declare class ToolBarButtonGroupComponent extends ToolBarToolComponent { private localization; private host; /** * When `true`, disables the whole group of buttons. * If you set the `disabled` property of the group, it overrides the `disabled` property of individual buttons. */ disabled: boolean; /** * @hidden * * Used to set different fillmode in Spreadsheet and Toolbar to comply with referent rendering. * @default 'solid' */ fillMode: 'solid' | 'flat'; /** * Sets the selection mode of the ButtonGroup. * @default 'multiple' */ selection: ButtonGroupSelection; /** * Sets the width of the ButtonGroup. * When you set the width of the ButtonGroup, the buttons have the same width and resize to fill the group wrapper. */ width: string; /** * @hidden */ set look(look: 'default' | 'flat' | 'outline'); private toolbarButtonGroup; private sectionButtonGroup; overflowListItems: QueryList<ElementRef>; buttonComponents: QueryList<ToolBarButtonComponent>; private get buttonElements(); private focusedIndex; private getNextKey; private getPrevKey; constructor(localization: LocalizationService, host: ToolBarComponent); /** * @hidden */ onFocus(): void; /** * @hidden */ onNavigate(ev: PreventableEvent): void; /** * @hidden */ selectedChangeHandler(state: boolean, button: ToolBarButtonComponent): void; /** * @hidden */ overflowSelectedChangeHandler(button: ToolBarButtonComponent): void; /** * @hidden */ onButtonClick(ev: MouseEvent): void; /** * @hidden */ canFocus(): boolean; /** * @hidden */ focus(ev?: Partial<Event>): void; /** * @hidden */ handleKey(ev: any): boolean; /** * @hidden */ handleClick(ev: any, button: ToolBarButtonComponent): void; /** * @hidden */ getIconClasses(button: any): any; /** * @hidden */ get size(): any; private focusButton; static ɵfac: i0.ɵɵFactoryDeclaration<ToolBarButtonGroupComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ToolBarButtonGroupComponent, "kendo-toolbar-buttongroup", ["kendoToolBarButtonGroup"], { "disabled": { "alias": "disabled"; "required": false; }; "fillMode": { "alias": "fillMode"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "width": { "alias": "width"; "required": false; }; "look": { "alias": "look"; "required": false; }; }, {}, ["buttonComponents"], never, true, never>; }