Refactor #3922 - For InputSwitch

This commit is contained in:
Tuğçe Küçükoğlu 2023-05-05 16:10:07 +03:00
parent 6539ba296d
commit 636bd1de8f
4 changed files with 66 additions and 4 deletions

View file

@ -10,6 +10,57 @@
import { InputHTMLAttributes } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
export declare type InputSwitchPassThroughOptionType = InputSwitchPassThroughAttributes | ((options: InputSwitchPassThroughMethodOptions) => InputSwitchPassThroughAttributes) | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface InputSwitchPassThroughMethodOptions {
props: InputSwitchProps;
state: InputSwitchState;
}
/**
* Custom passthrough(pt) options.
* @see {@link InputSwitchProps.pt}
*/
export interface InputSwitchPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: InputSwitchPassThroughOptionType;
/**
* Uses to pass attributes to the slider's DOM element.
*/
slider?: InputSwitchPassThroughOptionType;
/**
* Uses to pass attributes to the hidden accessible DOM element.
*/
hiddenAccessible?: InputSwitchPassThroughOptionType;
/**
* Uses to pass attributes to the input aria's DOM element.
*/
inputAria?: InputSwitchPassThroughOptionType;
}
/**
* Custom passthrough attributes for each DOM elements
*/
export interface InputSwitchPassThroughAttributes {
[key: string]: any;
}
/**
* Defines current inline state in InputSwitch component.
*/
export interface InputSwitchState {
/**
* Current focus state as a boolean.
* @defaultValue false
*/
focused: boolean;
}
/**
* Defines valid properties in InputSwitch component.
*/