/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { BaseEvent } from '@progress/kendo-react-common'; import { ComponentType } from 'react'; import { ForwardRefExoticComponent } from 'react'; import * as React_2 from 'react'; import { RefAttributes } from 'react'; /** * Represents the KendoReact ListBox Component. */ export declare const ListBox: ForwardRefExoticComponent>; /** * The ListBox component. */ declare const ListBox_2: React_2.ForwardRefExoticComponent>; /** @hidden */ declare type ListBox_2 = ListBoxHandle; /** * The event that is triggered during drag operations on the ListBox. */ export declare interface ListBoxDragEvent extends BaseEvent { /** * The data item involved in the drag operation. */ dataItem?: any; } /** * The event that is triggered when a dragged element leaves the ListBox. */ declare interface ListBoxDragLeaveEvent extends BaseEvent { } /** * The base event for ListBox operations. */ export declare interface ListBoxEvent extends BaseEvent { } /** * The ListBox ref. */ declare interface ListBoxHandle { /** * The current element or `null` if there is no one. */ element: HTMLDivElement | null; /** * The props value of the ListBox. */ props: ListBoxProps; } /** * The event that is triggered when an item in the ListBox is clicked. */ export declare interface ListBoxItemClickEvent extends BaseEvent { /** * The data item that was clicked. */ dataItem?: any; } /** * The event that is triggered when a keyboard navigation action is performed. */ export declare interface ListBoxItemNavigateEvent extends BaseEvent { /** * The name of the action that was performed. */ actionName?: string; } /** * The event that is triggered when an item in the ListBox is selected. */ export declare interface ListBoxItemSelectEvent extends BaseEvent { /** * The data item that was selected. */ dataItem?: any; } /** * The event that is triggered when a key is pressed down over the ListBox. */ export declare interface ListBoxKeyDownEvent extends BaseEvent { } /** * Represents the props of the [KendoReact ListBox component](https://www.telerik.com/kendo-react-ui/components/listbox). */ export declare interface ListBoxProps { /** * Sets a `class` of the ListBox container. * * @example * ```jsx * * ``` */ className?: string; /** * Sets an `id` of the ListBox container. * * @example * ```jsx * * ``` */ id?: string; /** * Configures the `size` of the ListBox. * * The available options are: * - small * - medium * - large * - null—Does not set a size `className`. * * @default `medium` * * @example * ```jsx * * ``` */ size?: null | 'small' | 'medium' | 'large'; /** * Specifies the styles which are set to the ListBox container. * * @example * ```jsx * * ``` */ style?: React.CSSProperties; /** * Sets the data of the ListBox. * * @example * ```jsx * * ``` */ data: Array; /** * Makes the items of the ListBox draggable. * * @default true * * @example * ```jsx * * ``` */ draggable?: boolean; /** * Sets the selected field of the ListBox. Based on the value of this field, an item is selected or not. * * @example * ```jsx * * ``` */ selectedField?: string; /** * Sets the data item field that represents the item text. If the data contains only primitive values, do not define it. * * @example * ```jsx * * ``` */ textField: string; /** * The field that is used during form submission. Defaults to the `textField` if not set. * * @example * ```jsx * * ``` */ valueField?: string; /** * Sets the position of the toolbar of the ListBox if one is set. The ListBox may have no toolbar. * * The possible values are: * - `top` * - `bottom` * - `left` * - `right` (Default) * - `none` * * @default 'right' * * @example * ```jsx * * ``` */ toolbarPosition?: toolbarPosition | string; /** * Renders a toolbar component next to the ListBox. * * @example * ```jsx * * ``` */ toolbar?: null | ComponentType; /** * Defines the component that will be rendered for each item of the data collection. * * @example * ```jsx * const CustomItem = (props) =>
{props.text}
; * * * ``` */ item?: React.ComponentType; /** * Fires when an item from the ListBox is clicked. Contains the clicked item. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onItemClick?: (event: ListBoxItemClickEvent) => void; /** * Fires when an item from the ListBox is selected. Contains the selected item. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onItemSelect?: (event: ListBoxItemSelectEvent) => void; /** * Fires on keydown over the ListBox list items. You can use it to add extra keyboard navigation options. * * @example * ```jsx * console.log(event.keyCode)} /> * ``` */ onKeyDown?: (event: ListBoxKeyDownEvent) => void; /** * Fires when the user starts to drag an item from the ListBox. The event contains information about the item that is being dragged. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onDragStart?: (event: ListBoxDragEvent) => void; /** * Fires when the user drags over an item from the ListBox. The event contains information about the item that is dragged over. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onDragOver?: (event: ListBoxDragEvent) => void; /** * Fires when the user drops an item. The event contains information about the drop target item. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onDrop?: (event: ListBoxDragEvent) => void; /** * Fires when a dragged element or text selection leaves the ListBox element. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onDragLeave?: (event: ListBoxDragLeaveEvent) => void; /** * Fires when a keyboard navigation action is triggered. * * @example * ```jsx * console.log(event.item)} /> * ``` */ onKeyboardNavigate?: (event: ListBoxItemNavigateEvent) => void; } export declare const ListBoxToolbar: React_2.ForwardRefExoticComponent>; /** @hidden */ export declare type ListBoxToolbar = ListBoxToolbarHandle; /** * The event that is triggered when a tool in the ListBoxToolbar is clicked. */ export declare interface ListBoxToolbarClickEvent extends BaseEvent { /** * The name of the tool that was clicked. */ toolName?: string; } /** * The base event for ListBoxToolbar operations. */ declare interface ListBoxToolbarEvent extends BaseEvent { } /** * @hidden */ declare interface ListBoxToolbarHandle { onToolClick?: (event: ListBoxToolbarEvent) => void; props: ListBoxToolbarProps; context: {}; state: {}; refs: {}; } export declare interface ListBoxToolbarProps { /** * Sets the tools of the ListBoxToolbar. By default, the ListBoxToolbar renders no tools. * The built-in tools are: * * `moveUp` * * `moveDown` * * `transferTo` * * `transferFrom` * * `transferAllTo` * * `transferAllFrom` * * `remove` */ tools?: Array; /** * Configures the `size` of the buttons inside the ListBoxToolbar. * * The available options are: * - small * - medium * - large * - null—Does not set a size `className`. * * @default `medium` */ size?: null | 'small' | 'medium' | 'large'; /** * The data of the main ListBox. */ data: Array; /** * The data of the connected ListBox. */ dataConnected: Array; /** * Set the selected field of the ListBoxToolbar. * Based on that value of that field the ListBoxToolbar will determine which actions are allowed and which disabled. */ selectedField?: string; /** * Fires when one of the ListBoxToolbar tools is clicked. */ onToolClick?: (event: ListBoxToolbarClickEvent) => void; /** * @hidden */ dir?: string; } /** * @hidden */ export declare const moveItem: (from: number, to: number, data: Array) => any[]; /** * Processes the data collections based on the clicked ListBoxToolbar tool. * * @param {T[]} listBoxOneData - The first data collection. * @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox. * @param {string} toolName - The tool that was clicked. * @param {string} selectedField - The field that contains the selected information in the data object. * @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections. */ export declare const processListBoxData: (listBoxOneData: any[] | undefined, listBoxTwoData: any[] | undefined, toolName: string, selectedField: string) => { listBoxOneData: any[]; listBoxTwoData: any[]; }; /** * Processes the data collections based on the dragged and dropped item. * * @param {T[]} listBoxOneData - The first data collection. * @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox. * @param {any} dragItem - The item that was dragged. * @param {any} dropItem - The drop target item. * @param {string} valueField - The field which points to the unique value of each data item. * @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections. */ export declare const processListBoxDragAndDrop: (listBoxOneData: any[] | undefined, listBoxTwoData: any[] | undefined, dragItem: any, dropItem: any, valueField: string) => { listBoxOneData: any[]; listBoxTwoData: any[]; }; /** * Defines the possible positions for the ListBox toolbar. */ declare enum toolbarPosition { TOP = "top", BOTTOM = "bottom", LEFT = "left", RIGHT = "right", NONE = "none" } export { }