/** * DevExtreme (ui/switch.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 { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, InteractionEvent, } from '../events'; import Editor, { ValueChangedInfo, EditorOptions, } from './editor/editor'; /** * 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 optionChanged event handler's argument. */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** * The type of the valueChanged event handler's argument. */ export type ValueChangedEvent = NativeEventInfo & ValueChangedInfo; /** * * @deprecated * @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 dxSwitchOptions extends EditorOptions { /** * Specifies whether the UI component changes its visual state as a result of user interaction. */ activeStateEnabled?: boolean; /** * Specifies whether the UI component can be focused using keyboard navigation. */ focusStateEnabled?: boolean; /** * Specifies whether the UI component changes its state when a user pauses on it. */ hoverStateEnabled?: boolean; /** * The value to be assigned to the `name` attribute of the underlying HTML element. */ name?: string; /** * Specifies the text displayed when the UI component is switched off. */ switchedOffText?: string; /** * Specifies the text displayed when the UI component is switched on. */ switchedOnText?: string; /** * A Boolean value specifying whether the current switch state is 'On' or 'Off'. */ value?: boolean; } /** * The Switch is a UI component that can be in two states: 'On' and 'Off'. */ export default class dxSwitch extends Editor { /** * Resets the value property to the value passed as an argument. */ reset(value?: Properties['value']): void; } export type Properties = dxSwitchOptions; /** * @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 = dxSwitchOptions;