x-next 0.0.0-alpha.52 → 0.0.0-alpha.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_hooks/use-cursor.d.ts +2 -0
- package/dist/_hooks/use-form-item.d.ts +16 -0
- package/dist/_utils/get-value-by-path.d.ts +5 -0
- package/dist/_utils/keycode.d.ts +36 -0
- package/dist/_utils/pick.d.ts +1 -0
- package/dist/_utils/responsive-observe.d.ts +24 -0
- package/dist/components/form/Form.vue.d.ts +313 -0
- package/dist/components/form/FormItem.vue.d.ts +2218 -0
- package/dist/components/form/context.d.ts +49 -0
- package/dist/components/form/form-item-label.vue.d.ts +1435 -0
- package/dist/components/form/form-item-message.vue.d.ts +24 -0
- package/dist/components/form/index.d.ts +4189 -0
- package/dist/components/form/interface.d.ts +185 -0
- package/dist/components/form/utils.d.ts +9 -0
- package/dist/components/form/validateMessages.d.ts +46 -0
- package/dist/components/grid/Col.vue.d.ts +188 -0
- package/dist/components/grid/Grid.vue.d.ts +108 -0
- package/dist/components/grid/GridItem.vue.d.ts +78 -0
- package/dist/components/grid/Row.vue.d.ts +102 -0
- package/dist/components/grid/context.d.ts +19 -0
- package/dist/components/grid/hook/use-responsive-state.d.ts +3 -0
- package/dist/components/grid/hook/use-responsive-value.d.ts +24 -0
- package/dist/components/grid/index.d.ts +562 -0
- package/dist/components/grid/interface.d.ts +80 -0
- package/dist/components/grid/utils/index.d.ts +11 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/input/Input.d.ts +233 -161
- package/dist/components/input/InputGroup.vue.d.ts +9 -0
- package/dist/components/input/InputPassword.vue.d.ts +337 -0
- package/dist/components/input/InputSearch.d.ts +123 -0
- package/dist/components/input/index.d.ts +927 -270
- package/dist/icons/_self/eye-invisible.d.ts +50 -0
- package/dist/icons/_self/eye.d.ts +50 -0
- package/dist/icons/_self/question-message.d.ts +50 -0
- package/dist/icons/_self/search.d.ts +50 -0
- package/dist/index.es.js +6225 -3507
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +10 -0
- package/package.json +4 -2
- package/volar.d.ts +10 -0
- package/dist/components/form/constants.d.ts +0 -4
- package/dist/components/form/form-item.d.ts +0 -31
- package/dist/components/form/form.d.ts +0 -39
- package/dist/components/form/hooks.d.ts +0 -4
- package/dist/components/form/types.d.ts +0 -31
- package/dist/components/input/props.d.ts +0 -95
- package/dist/components/input/utils.d.ts +0 -6
@@ -1,31 +0,0 @@
|
|
1
|
-
import { SetupContext } from 'vue';
|
2
|
-
import { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
|
3
|
-
import { FormProps, FormEmits } from './form';
|
4
|
-
import { FormItemProp, FormItemProps, FormItemValidateState } from './form-item';
|
5
|
-
export type Arrayable<T> = T | T[];
|
6
|
-
export interface FormItemRule extends Omit<RuleItem, 'validator'> {
|
7
|
-
trigger?: Arrayable<string>;
|
8
|
-
validator?: RuleItem['validator'] | string;
|
9
|
-
}
|
10
|
-
export type FormRules = Partial<Record<string, Arrayable<FormItemRule>>>;
|
11
|
-
export type FormValidationResult = Promise<any>;
|
12
|
-
export type FormValidateCallback = (isValid: boolean, invalidFields?: any) => void;
|
13
|
-
export type FormContext = FormProps & {
|
14
|
-
emit: SetupContext<FormEmits>['emit'];
|
15
|
-
addField: (field: FormItemContext) => void;
|
16
|
-
removeField: (field: FormItemContext) => void;
|
17
|
-
resetFields: (props?: Arrayable<FormItemProp>) => void;
|
18
|
-
clearValidate: (props?: Arrayable<FormItemProp>) => void;
|
19
|
-
validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult;
|
20
|
-
};
|
21
|
-
export interface FormItemContext extends FormItemProps {
|
22
|
-
$el: HTMLDivElement | undefined;
|
23
|
-
validateState: FormItemValidateState;
|
24
|
-
validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
|
25
|
-
resetField(): void;
|
26
|
-
clearValidate(): void;
|
27
|
-
}
|
28
|
-
export interface FormValidateFailure {
|
29
|
-
errors: ValidateError[] | null;
|
30
|
-
fields: ValidateFieldsError;
|
31
|
-
}
|
@@ -1,95 +0,0 @@
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
2
|
-
export declare const inputProps: {
|
3
|
-
autocomplete: {
|
4
|
-
type: import('vue').PropType<"off" | "on">;
|
5
|
-
default: string;
|
6
|
-
};
|
7
|
-
name: {
|
8
|
-
type: StringConstructor;
|
9
|
-
default: string;
|
10
|
-
};
|
11
|
-
readonly: {
|
12
|
-
type: BooleanConstructor;
|
13
|
-
default: boolean;
|
14
|
-
};
|
15
|
-
autofocus: {
|
16
|
-
type: BooleanConstructor;
|
17
|
-
default: boolean;
|
18
|
-
};
|
19
|
-
form: {
|
20
|
-
type: StringConstructor;
|
21
|
-
default: undefined;
|
22
|
-
};
|
23
|
-
modelValue: {
|
24
|
-
type: (NumberConstructor | StringConstructor)[];
|
25
|
-
default: undefined;
|
26
|
-
};
|
27
|
-
type: {
|
28
|
-
type: import('vue').PropType<"text" | "textarea">;
|
29
|
-
default: string;
|
30
|
-
};
|
31
|
-
placeholder: {
|
32
|
-
type: StringConstructor;
|
33
|
-
default: string;
|
34
|
-
};
|
35
|
-
disabled: {
|
36
|
-
type: BooleanConstructor;
|
37
|
-
default: boolean;
|
38
|
-
};
|
39
|
-
size: {
|
40
|
-
type: import('vue').PropType<"small" | "large" | "default">;
|
41
|
-
default: string;
|
42
|
-
};
|
43
|
-
showPassword: {
|
44
|
-
type: BooleanConstructor;
|
45
|
-
default: boolean;
|
46
|
-
};
|
47
|
-
resize: {
|
48
|
-
type: BooleanConstructor;
|
49
|
-
default: boolean;
|
50
|
-
};
|
51
|
-
prefixIcon: {
|
52
|
-
type: StringConstructor;
|
53
|
-
default: string;
|
54
|
-
};
|
55
|
-
suffixIcon: {
|
56
|
-
type: StringConstructor;
|
57
|
-
default: string;
|
58
|
-
};
|
59
|
-
autosize: {
|
60
|
-
type: import('vue').PropType<boolean | {
|
61
|
-
minRows: number;
|
62
|
-
maxRows: number;
|
63
|
-
}>;
|
64
|
-
default: boolean;
|
65
|
-
};
|
66
|
-
formatter: {
|
67
|
-
type: FunctionConstructor;
|
68
|
-
default: undefined;
|
69
|
-
};
|
70
|
-
validateEvent: {
|
71
|
-
type: BooleanConstructor;
|
72
|
-
default: boolean;
|
73
|
-
};
|
74
|
-
clearable: {
|
75
|
-
type: BooleanConstructor;
|
76
|
-
default: boolean;
|
77
|
-
};
|
78
|
-
card: {
|
79
|
-
type: BooleanConstructor;
|
80
|
-
default: boolean;
|
81
|
-
};
|
82
|
-
maxlength: {
|
83
|
-
type: (NumberConstructor | StringConstructor)[];
|
84
|
-
default: undefined;
|
85
|
-
};
|
86
|
-
showWordLimit: {
|
87
|
-
type: BooleanConstructor;
|
88
|
-
default: boolean;
|
89
|
-
};
|
90
|
-
valueType: {
|
91
|
-
type: import('vue').PropType<"string" | "number">;
|
92
|
-
default: string;
|
93
|
-
};
|
94
|
-
};
|
95
|
-
export type InputProps = ExtractPropTypes<typeof inputProps>;
|