/** * DevExtreme (ui/responsive_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, }; /** * The type of the contentReady event handler's argument. */ export type ContentReadyEvent = EventInfo>; /** * The type of the disposing event handler's argument. */ export type DisposingEvent = EventInfo>; /** * The type of the initialized event handler's argument. */ export type InitializedEvent = InitializedEventInfo>; /** * The type of the itemClick event handler's argument. */ export type ItemClickEvent = NativeEventInfo, MouseEvent | PointerEvent> & ItemInfo; /** * The type of the itemContextMenu event handler's argument. */ export type ItemContextMenuEvent = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemHold event handler's argument. */ export type ItemHoldEvent = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemRendered event handler's argument. */ export type ItemRenderedEvent = EventInfo> & ItemInfo; /** * The type of the optionChanged event handler's argument. */ export type OptionChangedEvent = EventInfo> & ChangedOptionInfo; /** * * @deprecated */ export interface dxResponsiveBoxOptions< TItem extends ItemLike = any, TKey = any, > extends CollectionWidgetOptions, TItem, TKey> { /** * Specifies the collection of columns for the grid used to position layout elements. */ cols?: Array<{ /** * The column's base width. Calculated automatically when the singleColumnScreen property arranges all elements in a single column. */ baseSize?: number | string; /** * The column width ratio. */ ratio?: number; /** * Decides on which screens the current column is rendered. */ screen?: string | undefined; /** * A factor that defines how much a column width shrinks relative to the rest of the columns in the container. */ shrink?: number; }>; /** * Binds the UI component to data. */ dataSource?: DataSourceLike | null; /** * Specifies the UI component's height. */ height?: number | string; /** * An array of items displayed by the UI component. */ items?: Array; /** * Specifies the collection of rows for the grid used to position layout elements. */ rows?: Array<{ /** * The row's base height. Calculated automatically when the singleColumnScreen property arranges all elements in a single column. */ baseSize?: number | string; /** * The row height ratio. */ ratio?: number; /** * Decides on which screens the current row is rendered. */ screen?: string | undefined; /** * A factor that defines how much a row height shrinks relative to the rest of the rows in the container. */ shrink?: number; }>; /** * Specifies the function returning the size qualifier depending on the screen's width. */ screenByWidth?: Function; /** * Specifies on which screens all layout elements should be arranged in a single column. Accepts a single or several size qualifiers separated by a space. */ singleColumnScreen?: string; /** * Specifies the UI component's width. */ width?: number | string; } /** * The ResponsiveBox UI component allows you to create an application or a website with a layout adapted to different screen sizes. */ export default class dxResponsiveBox< TItem extends ItemLike = any, TKey = any, > extends CollectionWidget, TItem, TKey> { } export type Item = dxResponsiveBoxItem; /** * @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 dxResponsiveBoxItem extends CollectionWidgetItem { /** * Specifies the item location and size against the UI component grid. */ location?: { /** * Specifies which column the element should occupy. Accepts an index from the cols array. */ col?: number; /** * Specifies how many columns the element should span. */ colspan?: number | undefined; /** * Specifies which row the element should occupy. Accepts an index from the rows array. */ row?: number; /** * Specifies how many rows the element should span. */ rowspan?: number | undefined; /** * Decides on which screens the current location settings should be applied to the element. */ screen?: string | undefined; } | Array<{ col?: number; colspan?: number; row?: number; rowspan?: number; screen?: string }>; } 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, > = dxResponsiveBoxOptions; /** * @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;