UNPKG

@fesjs/fes-design

Version:
196 lines (195 loc) 7.17 kB
import { type ExtractPropTypes, type Ref } from 'vue'; import type { InputValue } from './interface'; declare const inputInnerProps: { readonly innerIsFocus: BooleanConstructor; readonly innerIsError: BooleanConstructor; readonly canEdit: { readonly type: BooleanConstructor; readonly default: true; }; readonly modelValue: { readonly type: import("vue").PropType<InputValue>; }; readonly type: { readonly type: StringConstructor; readonly default: "text"; }; readonly placeholder: { readonly type: StringConstructor; }; readonly readonly: { readonly type: BooleanConstructor; readonly default: false; }; readonly disabled: { readonly type: BooleanConstructor; readonly default: false; }; readonly clearable: { readonly type: BooleanConstructor; readonly default: false; }; readonly maxlength: { readonly type: NumberConstructor; }; readonly showPassword: { readonly type: BooleanConstructor; readonly default: false; }; readonly inputStyle: { readonly type: import("vue").PropType<import("vue").StyleValue>; readonly default: () => import("vue").StyleValue; }; readonly autocomplete: { readonly type: StringConstructor; readonly default: "off"; }; }; type InputInnerProps = Partial<ExtractPropTypes<typeof inputInnerProps>>; export declare function usePassword(currentValue: Ref<InputValue>, props: InputInnerProps, focused: Ref<boolean>): { passwordVisible: Ref<boolean, boolean>; handlePasswordVisible: () => void; showPwdSwitchIcon: import("vue").ComputedRef<boolean>; }; export declare function useClear(currentValue: Ref<InputValue>, props: InputInnerProps, focused: Ref<boolean>, hovering: Ref<boolean>, handleValueChange: (val: string) => void, emit: (event: 'clear') => void): { showClear: import("vue").ComputedRef<boolean>; clear: () => void; }; declare const _default: import("vue").DefineComponent<ExtractPropTypes<{ readonly innerIsFocus: BooleanConstructor; readonly innerIsError: BooleanConstructor; readonly canEdit: { readonly type: BooleanConstructor; readonly default: true; }; readonly modelValue: { readonly type: import("vue").PropType<InputValue>; }; readonly type: { readonly type: StringConstructor; readonly default: "text"; }; readonly placeholder: { readonly type: StringConstructor; }; readonly readonly: { readonly type: BooleanConstructor; readonly default: false; }; readonly disabled: { readonly type: BooleanConstructor; readonly default: false; }; readonly clearable: { readonly type: BooleanConstructor; readonly default: false; }; readonly maxlength: { readonly type: NumberConstructor; }; readonly showPassword: { readonly type: BooleanConstructor; readonly default: false; }; readonly inputStyle: { readonly type: import("vue").PropType<import("vue").StyleValue>; readonly default: () => import("vue").StyleValue; }; readonly autocomplete: { readonly type: StringConstructor; readonly default: "off"; }; }>, { passwordVisible: Ref<boolean, boolean>; handlePasswordVisible: () => void; showPwdSwitchIcon: import("vue").ComputedRef<boolean>; handleInput: (event: string | Event) => void; handleCompositionStart: () => void; handleCompositionEnd: (event: Event) => void; inputRefEl: Ref<HTMLElement, HTMLElement>; focus: () => void; blur: () => void; focused: Ref<boolean, boolean>; handleFocus: (event: Event) => void; handleBlur: (event: Event) => void; showClear: import("vue").ComputedRef<boolean>; clear: () => void; handleChange: import("lodash-es").DebouncedFunc<(event: Event) => void>; onMouseLeave: (e: MouseEvent) => void; onMouseEnter: (e: MouseEvent) => void; handleMousedown: (e: MouseEvent) => void; handleKeydown: (e: KeyboardEvent) => void; prefixCls: string; suffixVisible: import("vue").ComputedRef<boolean>; currentValue: import("vue").WritableComputedRef<InputValue, InputValue>; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "change" | "update:modelValue" | "blur" | "focus" | "input" | "keydown" | "mouseenter" | "mouseleave")[], "clear" | "change" | "update:modelValue" | "blur" | "focus" | "input" | "keydown" | "mouseenter" | "mouseleave", import("vue").PublicProps, Readonly<ExtractPropTypes<{ readonly innerIsFocus: BooleanConstructor; readonly innerIsError: BooleanConstructor; readonly canEdit: { readonly type: BooleanConstructor; readonly default: true; }; readonly modelValue: { readonly type: import("vue").PropType<InputValue>; }; readonly type: { readonly type: StringConstructor; readonly default: "text"; }; readonly placeholder: { readonly type: StringConstructor; }; readonly readonly: { readonly type: BooleanConstructor; readonly default: false; }; readonly disabled: { readonly type: BooleanConstructor; readonly default: false; }; readonly clearable: { readonly type: BooleanConstructor; readonly default: false; }; readonly maxlength: { readonly type: NumberConstructor; }; readonly showPassword: { readonly type: BooleanConstructor; readonly default: false; }; readonly inputStyle: { readonly type: import("vue").PropType<import("vue").StyleValue>; readonly default: () => import("vue").StyleValue; }; readonly autocomplete: { readonly type: StringConstructor; readonly default: "off"; }; }>> & Readonly<{ onFocus?: (...args: any[]) => any; onBlur?: (...args: any[]) => any; onChange?: (...args: any[]) => any; onInput?: (...args: any[]) => any; onKeydown?: (...args: any[]) => any; onMouseenter?: (...args: any[]) => any; onMouseleave?: (...args: any[]) => any; "onUpdate:modelValue"?: (...args: any[]) => any; onClear?: (...args: any[]) => any; }>, { readonly type: string; readonly disabled: boolean; readonly clearable: boolean; readonly canEdit: boolean; readonly innerIsFocus: boolean; readonly innerIsError: boolean; readonly readonly: boolean; readonly showPassword: boolean; readonly inputStyle: import("vue").StyleValue; readonly autocomplete: string; }, {}, { EyeOutlined: (props?: import("../icon/IconWrapper").IconProps) => import("vue/jsx-runtime").JSX.Element; EyeInvisibleOutlined: (props?: import("../icon/IconWrapper").IconProps) => import("vue/jsx-runtime").JSX.Element; CloseCircleFilled: (props?: import("../icon/IconWrapper").IconProps) => import("vue/jsx-runtime").JSX.Element; }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default _default;