/** * DevExtreme (ui/button_group.d.ts) * Version: 21.1.7 * Build date: Thu Aug 07 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { UserDefinedElement, DxElement, } from '../core/element'; import { template, } from '../core/templates/template'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, } from '../events/index'; import { CollectionWidgetItem, SelectionChangedInfo, } from './collection/ui.collection_widget.base'; import Widget, { WidgetOptions, } from './widget/ui.widget'; /** @public */ export type ContentReadyEvent = EventInfo; /** @public */ export type DisposingEvent = EventInfo; /** @public */ export type InitializedEvent = InitializedEventInfo; /** @public */ export type ItemClickEvent = NativeEventInfo & ItemInfo; /** @public */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** @public */ export type SelectionChangedEvent = EventInfo & SelectionChangedInfo; /** * @deprecated use Properties instead * @namespace DevExpress.ui */ export interface dxButtonGroupOptions extends WidgetOptions { /** * @docid * @default "content" * @type_function_param1 buttonData:object * @type_function_return string|Element|jQuery * @public */ buttonTemplate?: template | ((buttonData: any, buttonContent: DxElement) => string | UserDefinedElement); /** * @docid * @default true * @public */ focusStateEnabled?: boolean; /** * @docid * @default true * @public */ hoverStateEnabled?: boolean; /** * @docid * @type Array * @public */ items?: Array; /** * @docid * @default 'text' * @public */ keyExpr?: string | Function; /** * @docid * @default null * @type_function_param1 e:object * @type_function_param1_field1 component:dxButtonGroup * @type_function_param1_field2 element:DxElement * @type_function_param1_field3 model:any * @type_function_param1_field4 itemData:object * @type_function_param1_field5 itemElement:DxElement * @type_function_param1_field6 itemIndex:number * @type_function_param1_field7 event:event * @action * @public */ onItemClick?: ((e: ItemClickEvent) => void); /** * @docid * @default null * @type_function_param1 e:object * @type_function_param1_field1 component:dxButtonGroup * @type_function_param1_field2 element:DxElement * @type_function_param1_field3 model:any * @type_function_param1_field4 value:any * @type_function_param1_field4 addedItems:array * @type_function_param1_field5 removedItems:array * @action * @public */ onSelectionChanged?: ((e: SelectionChangedEvent) => void); /** * @docid * @fires dxButtonGroupOptions.onSelectionChanged * @public */ selectedItemKeys?: Array; /** * @docid * @fires dxButtonGroupOptions.onSelectionChanged * @public */ selectedItems?: Array; /** * @docid * @type Enums.ButtonGroupSelectionMode * @default 'single' * @public */ selectionMode?: 'multiple' | 'single' | 'none'; /** * @docid * @type Enums.ButtonStylingMode * @default 'contained' * @public */ stylingMode?: 'text' | 'outlined' | 'contained'; } /** * @docid * @inherits Widget * @namespace DevExpress.ui * @public */ export default class dxButtonGroup extends Widget { constructor(element: UserDefinedElement, options?: dxButtonGroupOptions) } /** * @public * @namespace DevExpress.ui.dxButtonGroup */ export type Item = dxButtonGroupItem; /** * @deprecated Use Item instead * @namespace DevExpress.ui */ export interface dxButtonGroupItem extends CollectionWidgetItem { /** * @docid * @public */ hint?: string; /** * @docid * @public */ icon?: string; /** * @docid * @type Enums.ButtonType * @default 'normal' * @public */ type?: 'back' | 'danger' | 'default' | 'normal' | 'success'; /** * @docid * @public */ elementAttr?: { [key: string]: any }; } /** @public */ export type Properties = dxButtonGroupOptions; /** @deprecated use Properties instead */ export type Options = dxButtonGroupOptions; /** @deprecated use Properties instead */ export type IOptions = dxButtonGroupOptions;