@varlet/ui 3.3.15 → 3.4.0
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/es/auto-complete/AutoComplete.mjs +352 -0
- package/es/auto-complete/AutoCompleteSfc.css +0 -0
- package/es/auto-complete/autoComplete.css +1 -0
- package/es/auto-complete/index.mjs +11 -0
- package/es/auto-complete/props.mjs +63 -0
- package/es/auto-complete/provide.mjs +0 -0
- package/es/auto-complete/style/index.mjs +11 -0
- package/es/checkbox-group/CheckboxGroup.mjs +3 -5
- package/es/checkbox-group/props.mjs +4 -1
- package/es/field-decorator/FieldDecorator.mjs +8 -8
- package/es/field-decorator/props.mjs +1 -1
- package/es/index.bundle.mjs +7 -1
- package/es/index.mjs +6 -1
- package/es/input/Input.mjs +12 -13
- package/es/input/props.mjs +21 -2
- package/es/menu-option/MenuOption.mjs +5 -2
- package/es/menu-option/menuOption.css +1 -1
- package/es/menu-select/MenuSelect.mjs +3 -5
- package/es/menu-select/props.mjs +4 -1
- package/es/radio-group/RadioGroup.mjs +4 -6
- package/es/radio-group/props.mjs +4 -1
- package/es/select/Select.mjs +3 -5
- package/es/select/props.mjs +4 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/style.mjs +1 -0
- package/es/varlet.esm.js +13599 -13253
- package/highlight/web-types.en-US.json +239 -10
- package/highlight/web-types.zh-CN.json +239 -10
- package/json/area.json +1 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +15289 -14861
- package/package.json +8 -8
- package/types/autoComplete.d.ts +84 -0
- package/types/checkbox.d.ts +2 -2
- package/types/index.d.ts +2 -0
- package/types/input.d.ts +1 -0
- package/types/styleVars.d.ts +1 -0
- package/umd/varlet.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/icons": "3.
|
|
52
|
-
"@varlet/shared": "3.
|
|
53
|
-
"@varlet/use": "3.
|
|
51
|
+
"@varlet/icons": "3.4.0",
|
|
52
|
+
"@varlet/shared": "3.4.0",
|
|
53
|
+
"@varlet/use": "3.4.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.21",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"typescript": "^5.1.5",
|
|
65
65
|
"vue": "3.4.21",
|
|
66
66
|
"vue-router": "4.2.0",
|
|
67
|
-
"@varlet/cli": "3.
|
|
68
|
-
"@varlet/
|
|
69
|
-
"@varlet/
|
|
67
|
+
"@varlet/cli": "3.4.0",
|
|
68
|
+
"@varlet/ui": "3.4.0",
|
|
69
|
+
"@varlet/touch-emulator": "3.4.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"dev": "varlet-cli dev",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"compile:style-vars": "varlet-cli compile:style-vars",
|
|
77
77
|
"create": "varlet-cli create -i",
|
|
78
78
|
"test": "varlet-cli test",
|
|
79
|
-
"test:watch": "varlet-cli test -w",
|
|
79
|
+
"test:watch": "varlet-cli test -w -cov",
|
|
80
80
|
"test:coverage": "varlet-cli test -cov"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
VarComponent,
|
|
3
|
+
BasicAttributes,
|
|
4
|
+
ListenerProp,
|
|
5
|
+
Variant as AutoCompleteVariant,
|
|
6
|
+
SetPropsDefaults,
|
|
7
|
+
} from './varComponent'
|
|
8
|
+
import { VNode, VNodeChild, type InputHTMLAttributes } from 'vue'
|
|
9
|
+
|
|
10
|
+
export declare const autoComponentProps: Record<keyof AutoCompleteProps, any>
|
|
11
|
+
|
|
12
|
+
export type AutoCompleteOptionLabelRender = (option: AutoCompleteOption, checked: boolean) => VNodeChild
|
|
13
|
+
|
|
14
|
+
export type AutoCompleteOptionLabel = string | VNode | AutoCompleteOptionLabelRender
|
|
15
|
+
|
|
16
|
+
export type AutoCompleteValidateTrigger = 'onFocus' | 'onBlur' | 'onChange' | 'onClick' | 'onClear' | 'onInput'
|
|
17
|
+
|
|
18
|
+
export type AutoCompleteSize = 'small' | 'normal'
|
|
19
|
+
|
|
20
|
+
export interface AutoCompleteOption {
|
|
21
|
+
label?: AutoCompleteOptionLabel
|
|
22
|
+
value?: any
|
|
23
|
+
disabled?: boolean
|
|
24
|
+
|
|
25
|
+
[key: PropertyKey]: any
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface AutoCompleteProps extends BasicAttributes {
|
|
29
|
+
modelValue?: string
|
|
30
|
+
labelKey?: string
|
|
31
|
+
valueKey?: string
|
|
32
|
+
options?: AutoCompleteOption[]
|
|
33
|
+
line?: boolean
|
|
34
|
+
size?: AutoCompleteSize
|
|
35
|
+
variant?: AutoCompleteVariant
|
|
36
|
+
placeholder?: string
|
|
37
|
+
hint?: boolean
|
|
38
|
+
textColor?: string
|
|
39
|
+
focusColor?: string
|
|
40
|
+
blurColor?: string
|
|
41
|
+
maxlength?: string | number
|
|
42
|
+
disabled?: boolean
|
|
43
|
+
readonly?: boolean
|
|
44
|
+
clearable?: boolean
|
|
45
|
+
validateTrigger?: AutoCompleteValidateTrigger[]
|
|
46
|
+
getShow?: (v: string) => boolean
|
|
47
|
+
rules?: Array<(v: string) => any>
|
|
48
|
+
enterkeyhint?: InputHTMLAttributes['enterKeyHint']
|
|
49
|
+
onFocus?: ListenerProp<() => void>
|
|
50
|
+
onBlur?: ListenerProp<() => void>
|
|
51
|
+
onClick?: ListenerProp<(e: Event) => void>
|
|
52
|
+
onClear?: ListenerProp<(value: string) => void>
|
|
53
|
+
onChange?: ListenerProp<(value: string, e: Event) => void>
|
|
54
|
+
'onUpdate:modelValue'?: ListenerProp<(value: string) => void>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface AutoCompleteClearIconData {
|
|
58
|
+
clear: (e: Event) => void
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class AutoComplete extends VarComponent {
|
|
62
|
+
static setPropsDefaults: SetPropsDefaults<AutoCompleteProps>
|
|
63
|
+
|
|
64
|
+
$props: AutoCompleteProps
|
|
65
|
+
|
|
66
|
+
$slots: {
|
|
67
|
+
'prepend-icon'(): VNode[]
|
|
68
|
+
'append-icon'(): VNode[]
|
|
69
|
+
'clear-icon'(data: AutoCompleteClearIconData): VNode[]
|
|
70
|
+
'extra-message'(): VNode[]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
focus(): void
|
|
74
|
+
|
|
75
|
+
blur(): void
|
|
76
|
+
|
|
77
|
+
validate(): Promise<boolean>
|
|
78
|
+
|
|
79
|
+
resetValidation(): void
|
|
80
|
+
|
|
81
|
+
reset(): void
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export class _AutoCompleteComponent extends AutoComplete {}
|
package/types/checkbox.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { VNode } from 'vue'
|
|
|
3
3
|
|
|
4
4
|
export declare const checkboxProps: Record<keyof CheckboxProps, any>
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type CheckboxValidateTrigger = 'onChange'
|
|
7
7
|
|
|
8
8
|
export interface CheckboxProps extends BasicAttributes {
|
|
9
9
|
modelValue?: any
|
|
@@ -16,7 +16,7 @@ export interface CheckboxProps extends BasicAttributes {
|
|
|
16
16
|
indeterminate?: boolean
|
|
17
17
|
iconSize?: string | number
|
|
18
18
|
ripple?: boolean
|
|
19
|
-
validateTrigger?: Array<
|
|
19
|
+
validateTrigger?: Array<CheckboxValidateTrigger>
|
|
20
20
|
rules?: Array<(value: any) => any>
|
|
21
21
|
onClick?: ListenerProp<(e: Event) => void>
|
|
22
22
|
onChange?: ListenerProp<(value: any) => void>
|
package/types/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export const install: (app: App) => void
|
|
|
5
5
|
|
|
6
6
|
export * from './actionSheet'
|
|
7
7
|
export * from './appBar'
|
|
8
|
+
export * from './autoComplete'
|
|
8
9
|
export * from './avatar'
|
|
9
10
|
export * from './avatarGroup'
|
|
10
11
|
export * from './backTop'
|
|
@@ -98,6 +99,7 @@ declare module 'vue' {
|
|
|
98
99
|
export interface GlobalComponents {
|
|
99
100
|
VarActionSheet: typeof import('@varlet/ui')['_ActionSheetComponent']
|
|
100
101
|
VarAppBar: typeof import('@varlet/ui')['_AppBarComponent']
|
|
102
|
+
VarAutoComplete: typeof import('@varlet/ui')['_AutoCompleteComponent']
|
|
101
103
|
VarAvatar: typeof import('@varlet/ui')['_AvatarComponent']
|
|
102
104
|
VarAvatarGroup: typeof import('@varlet/ui')['_AvatarGroupComponent']
|
|
103
105
|
VarBackTop: typeof import('@varlet/ui')['_BackTopComponent']
|
package/types/input.d.ts
CHANGED
package/types/styleVars.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ interface BaseStyleVars {
|
|
|
32
32
|
'--app-bar-border-radius'?: string
|
|
33
33
|
'--app-bar-font-size'?: string
|
|
34
34
|
'--app-bar-border-bottom'?: string
|
|
35
|
+
'--auto-complete-options-padding'?: string
|
|
35
36
|
'--avatar-text-color'?: string
|
|
36
37
|
'--avatar-border-radius'?: string
|
|
37
38
|
'--avatar-mini-size'?: string
|