t-fighting-design
Version:
Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.
610 lines (609 loc) • 22.7 kB
TypeScript
import type { ButtonSizeType, ButtonTargetType, ButtonType, ButtonNativeType } from '..';
import type { InputType, InputSizeType, InputSearchInterface, InputChangeInterface, InputFocusInterface, InputEnterInterface } from './src/interface.d';
import type { DefineComponent, PropType, VNode, RendererNode, RendererElement, Component, ComputedOptions, MethodOptions, Ref, ComputedRef, CSSProperties, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, h, EmitsOptions } from 'vue';
import type { InstallType, HandleEventInterface, ClassListInterface } from '../_interface';
import Input from "./src/input";
export declare const FInput: InstallType<DefineComponent<{
readonly modelValue: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly type: {
readonly type: PropType<InputType>;
readonly default: () => InputType;
readonly validator: (val: InputType) => boolean;
};
readonly size: {
readonly type: PropType<InputSizeType>;
readonly default: () => InputSizeType;
readonly validator: (val: InputSizeType) => boolean;
};
readonly disabled: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly max: {
readonly type: NumberConstructor;
readonly default: () => null;
};
readonly min: {
readonly type: NumberConstructor;
readonly default: () => null;
};
readonly maxLength: {
readonly type: NumberConstructor;
readonly default: () => null;
readonly validator: (val: number) => boolean;
};
readonly autofocus: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly name: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly placeholder: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly clear: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly search: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly readonly: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly showPassword: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly enterSearch: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly icon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly onSearch: {
readonly type: PropType<InputSearchInterface>;
readonly default: () => null;
};
readonly onChange: {
readonly type: PropType<InputChangeInterface>;
readonly default: () => null;
};
readonly onBlur: {
readonly type: PropType<InputFocusInterface>;
readonly default: () => null;
};
readonly onFocus: {
readonly type: PropType<InputFocusInterface>;
readonly default: () => null;
};
readonly onEnter: {
readonly type: PropType<InputEnterInterface>;
readonly default: () => null;
};
}, {
prop: {
readonly modelValue?: unknown;
readonly type?: unknown;
readonly size?: unknown;
readonly disabled?: unknown;
readonly max?: unknown;
readonly min?: unknown;
readonly maxLength?: unknown;
readonly autofocus?: unknown;
readonly name?: unknown;
readonly placeholder?: unknown;
readonly clear?: unknown;
readonly search?: unknown;
readonly readonly?: unknown;
readonly showPassword?: unknown;
readonly enterSearch?: unknown;
readonly icon?: unknown;
readonly onSearch?: unknown;
readonly onChange?: unknown;
readonly onBlur?: unknown;
readonly onFocus?: unknown;
readonly onEnter?: unknown;
} & {
search: boolean;
type: InputType;
size: InputSizeType;
disabled: boolean;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
max: number;
onFocus: InputFocusInterface;
onBlur: InputFocusInterface;
onChange: InputChangeInterface;
autofocus: boolean;
name: string;
modelValue: string;
readonly: boolean;
min: number;
maxLength: number;
placeholder: string;
clear: boolean;
showPassword: boolean;
enterSearch: boolean;
onSearch: InputSearchInterface;
onEnter: InputEnterInterface;
} & {};
emit: (event: "update:modelValue", val: string) => void;
inputType: Ref<InputType>;
handleInput: (evt: Event) => void;
handleSearch: (evt: Event) => void;
handleClear: () => void;
handleEnter: (evt: Event) => void;
handleShowPassword: (target: "down" | "up") => void;
FSvgIcon: InstallType<DefineComponent<{
readonly icon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly color: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly size: {
readonly type: PropType<string | number>;
readonly default: () => string;
};
readonly click: {
readonly type: PropType<HandleEventInterface>;
readonly default: () => null;
};
}, {
prop: {
readonly icon?: unknown;
readonly color?: unknown;
readonly size?: unknown;
readonly click?: unknown;
} & {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
} & {};
handleClick: HandleEventInterface;
styleList: ComputedRef<CSSProperties>;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
readonly icon?: unknown;
readonly color?: unknown;
readonly size?: unknown;
readonly click?: unknown;
} & {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
} & {}>, {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
}>>;
FButton: InstallType<DefineComponent<{
readonly bold: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly circle: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly round: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly fontSize: {
readonly type: PropType<string | number>;
readonly default: () => string;
};
readonly fontColor: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly size: {
readonly type: PropType<ButtonSizeType>;
readonly default: () => ButtonSizeType;
readonly validator: (val: ButtonSizeType) => boolean;
};
readonly block: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly href: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly target: {
readonly type: PropType<ButtonTargetType>;
readonly default: () => ButtonTargetType;
readonly validator: (val: ButtonTargetType) => boolean;
};
readonly loading: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly disabled: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly loadingIcon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly type: {
readonly type: PropType<ButtonType>;
readonly default: () => ButtonType;
readonly validator: (val: ButtonType) => boolean;
};
readonly autofocus: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly name: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly shadow: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly text: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly nativeType: {
readonly type: PropType<ButtonNativeType>;
readonly default: () => ButtonNativeType;
readonly validator: (val: ButtonNativeType) => boolean;
};
readonly simple: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly beforeIcon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly afterIcon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly ripples: {
readonly type: BooleanConstructor;
readonly default: () => boolean;
};
readonly ripplesColor: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly color: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly click: {
readonly type: PropType<HandleEventInterface>;
readonly default: () => null;
};
}, {
prop: {
readonly bold?: unknown;
readonly circle?: unknown;
readonly round?: unknown;
readonly fontSize?: unknown;
readonly fontColor?: unknown;
readonly size?: unknown;
readonly block?: unknown;
readonly href?: unknown;
readonly target?: unknown;
readonly loading?: unknown;
readonly disabled?: unknown;
readonly loadingIcon?: unknown;
readonly type?: unknown;
readonly autofocus?: unknown;
readonly name?: unknown;
readonly shadow?: unknown;
readonly text?: unknown;
readonly nativeType?: unknown;
readonly simple?: unknown;
readonly beforeIcon?: unknown;
readonly afterIcon?: unknown;
readonly ripples?: unknown;
readonly ripplesColor?: unknown;
readonly color?: unknown;
readonly click?: unknown;
} & {
bold: boolean;
type: ButtonType;
fontSize: string | number;
simple: boolean;
round: boolean;
color: string;
beforeIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
size: ButtonSizeType;
disabled: boolean;
click: HandleEventInterface;
fontColor: string;
text: boolean;
circle: boolean;
block: boolean;
href: string;
target: ButtonTargetType;
loading: boolean;
loadingIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
autofocus: boolean;
name: string;
shadow: string;
nativeType: ButtonNativeType;
afterIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
ripples: boolean;
ripplesColor: string;
} & {};
FButton: Ref<HTMLButtonElement>;
classList: ComputedRef<ClassListInterface>;
handleClick: HandleEventInterface;
styleList: ComputedRef<CSSProperties>;
h: typeof h;
FSvgIcon: InstallType<DefineComponent<{
readonly icon: {
readonly type: PropType<VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>>;
readonly default: () => null;
};
readonly color: {
readonly type: StringConstructor;
readonly default: () => string;
};
readonly size: {
readonly type: PropType<string | number>;
readonly default: () => string;
};
readonly click: {
readonly type: PropType<HandleEventInterface>;
readonly default: () => null;
};
}, {
prop: {
readonly icon?: unknown;
readonly color?: unknown;
readonly size?: unknown;
readonly click?: unknown;
} & {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
} & {};
handleClick: HandleEventInterface;
styleList: ComputedRef<CSSProperties>;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
readonly icon?: unknown;
readonly color?: unknown;
readonly size?: unknown;
readonly click?: unknown;
} & {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
} & {}>, {
color: string;
size: string | number;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
click: HandleEventInterface;
}>>;
FIconLoadingAVue: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
readonly bold?: unknown;
readonly circle?: unknown;
readonly round?: unknown;
readonly fontSize?: unknown;
readonly fontColor?: unknown;
readonly size?: unknown;
readonly block?: unknown;
readonly href?: unknown;
readonly target?: unknown;
readonly loading?: unknown;
readonly disabled?: unknown;
readonly loadingIcon?: unknown;
readonly type?: unknown;
readonly autofocus?: unknown;
readonly name?: unknown;
readonly shadow?: unknown;
readonly text?: unknown;
readonly nativeType?: unknown;
readonly simple?: unknown;
readonly beforeIcon?: unknown;
readonly afterIcon?: unknown;
readonly ripples?: unknown;
readonly ripplesColor?: unknown;
readonly color?: unknown;
readonly click?: unknown;
} & {
bold: boolean;
type: ButtonType;
fontSize: string | number;
simple: boolean;
round: boolean;
color: string;
beforeIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
size: ButtonSizeType;
disabled: boolean;
click: HandleEventInterface;
fontColor: string;
text: boolean;
circle: boolean;
block: boolean;
href: string;
target: ButtonTargetType;
loading: boolean;
loadingIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
autofocus: boolean;
name: string;
shadow: string;
nativeType: ButtonNativeType;
afterIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
ripples: boolean;
ripplesColor: string;
} & {}>, {
bold: boolean;
type: ButtonType;
fontSize: string | number;
simple: boolean;
round: boolean;
color: string;
beforeIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
size: ButtonSizeType;
disabled: boolean;
click: HandleEventInterface;
fontColor: string;
text: boolean;
circle: boolean;
block: boolean;
href: string;
target: ButtonTargetType;
loading: boolean;
loadingIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
autofocus: boolean;
name: string;
shadow: string;
nativeType: ButtonNativeType;
afterIcon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
ripples: boolean;
ripplesColor: string;
}>>;
FIconCrossVue: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
FIconEyeOffOutlineVue: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
FIconEyeOutlineVue: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
readonly 'update:modelValue': (val: string) => string;
}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
readonly modelValue?: unknown;
readonly type?: unknown;
readonly size?: unknown;
readonly disabled?: unknown;
readonly max?: unknown;
readonly min?: unknown;
readonly maxLength?: unknown;
readonly autofocus?: unknown;
readonly name?: unknown;
readonly placeholder?: unknown;
readonly clear?: unknown;
readonly search?: unknown;
readonly readonly?: unknown;
readonly showPassword?: unknown;
readonly enterSearch?: unknown;
readonly icon?: unknown;
readonly onSearch?: unknown;
readonly onChange?: unknown;
readonly onBlur?: unknown;
readonly onFocus?: unknown;
readonly onEnter?: unknown;
} & {
search: boolean;
type: InputType;
size: InputSizeType;
disabled: boolean;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
max: number;
onFocus: InputFocusInterface;
onBlur: InputFocusInterface;
onChange: InputChangeInterface;
autofocus: boolean;
name: string;
modelValue: string;
readonly: boolean;
min: number;
maxLength: number;
placeholder: string;
clear: boolean;
showPassword: boolean;
enterSearch: boolean;
onSearch: InputSearchInterface;
onEnter: InputEnterInterface;
} & {}> & {
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
}, {
search: boolean;
type: InputType;
size: InputSizeType;
disabled: boolean;
icon: VNode<RendererNode, RendererElement, {
[key: string]: any;
}> | Component<any, any, any, ComputedOptions, MethodOptions>;
max: number;
onFocus: InputFocusInterface;
onBlur: InputFocusInterface;
onChange: InputChangeInterface;
autofocus: boolean;
name: string;
modelValue: string;
readonly: boolean;
min: number;
maxLength: number;
placeholder: string;
clear: boolean;
showPassword: boolean;
enterSearch: boolean;
onSearch: InputSearchInterface;
onEnter: InputEnterInterface;
}>>;
export declare type InputInstance = InstanceType<typeof Input>;
export * from './src/interface.d';
export default Input;