/** * DevExtreme (ui/box.d.ts) * Version: 25.1.7 * Build date: Mon Nov 10 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { DataSourceLike } from '../data/data_source'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, PointerInteractionEvent, } from '../events'; import CollectionWidget, { CollectionWidgetItem, CollectionWidgetOptions, } from './collection/ui.collection_widget.base'; import { Mode, } from '../common'; type ItemLike = string | Item | any; export { Mode, }; export type Distribution = 'center' | 'end' | 'space-around' | 'space-between' | 'start'; export type CrosswiseDistribution = 'center' | 'end' | 'start' | 'stretch'; export type BoxDirection = 'col' | 'row'; /** * The type of the contentReady event handler's argument. */ export type ContentReadyEvent = any, TKey = any> = EventInfo>; /** * The type of the disposing event handler's argument. */ export type DisposingEvent = any, TKey = any> = EventInfo>; /** * The type of the initialized event handler's argument. */ export type InitializedEvent = any, TKey = any> = InitializedEventInfo>; /** * The type of the itemClick event handler's argument. */ export type ItemClickEvent = any, TKey = any> = NativeEventInfo, MouseEvent | PointerEvent> & ItemInfo; /** * The type of the itemContextMenu event handler's argument. */ export type ItemContextMenuEvent = any, TKey = any> = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemHold event handler's argument. */ export type ItemHoldEvent = any, TKey = any> = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemRendered event handler's argument. */ export type ItemRenderedEvent = any, TKey = any> = EventInfo> & ItemInfo; /** * The type of the optionChanged event handler's argument. */ export type OptionChangedEvent = any, TKey = any> = EventInfo> & ChangedOptionInfo; /** * * @deprecated */ export interface dxBoxOptions< TItem extends ItemLike = any, TKey = any, > extends CollectionWidgetOptions, TItem, TKey> { /** * Specifies how UI component items are aligned along the main direction. */ align?: Distribution; /** * Specifies how UI component items are aligned cross-wise. */ crossAlign?: CrosswiseDistribution; /** * Binds the UI component to data. */ dataSource?: DataSourceLike | null; /** * Specifies the direction of item positioning in the UI component. */ direction?: BoxDirection; /** * An array of items displayed by the UI component. */ items?: Array; } /** * The Box UI component allows you to arrange various elements within it. Separate and adaptive, the Box UI component acts as a building block for the layout. */ export default class dxBox< TItem extends ItemLike = any, TKey = any, > extends CollectionWidget, TItem, TKey> { } export type Item = dxBoxItem; /** * @deprecated Use Item instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface dxBoxItem extends CollectionWidgetItem { /** * Specifies the base size of an item element along the main direction. */ baseSize?: number | string; /** * Holds a Box configuration object for the item. */ box?: dxBoxOptions | undefined; /** * Specifies the ratio value used to count the item element size along the main direction. */ ratio?: number; /** * A factor that defines how much an item shrinks relative to the rest of the items in the container. */ shrink?: number; } export type ExplicitTypes< TItem extends ItemLike, TKey, > = { Properties: Properties; ContentReadyEvent: ContentReadyEvent; DisposingEvent: DisposingEvent; InitializedEvent: InitializedEvent; ItemClickEvent: ItemClickEvent; ItemContextMenuEvent: ItemContextMenuEvent; ItemHoldEvent: ItemHoldEvent; ItemRenderedEvent: ItemRenderedEvent; OptionChangedEvent: OptionChangedEvent; }; export type Properties< TItem extends ItemLike = any, TKey = any, > = dxBoxOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type Options< TItem extends ItemLike = any, TKey = any, > = Properties;