@varlet/ui 3.4.0 → 3.5.0-alpha.1726330414687
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 +20 -11
- package/es/auto-complete/props.mjs +1 -1
- package/es/checkbox/props.mjs +1 -1
- package/es/checkbox-group/props.mjs +1 -1
- package/es/counter/props.mjs +2 -2
- package/es/field-decorator/FieldDecorator.mjs +7 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/props.mjs +1 -1
- package/es/menu-select/MenuSelect.mjs +1 -0
- package/es/menu-select/props.mjs +9 -2
- package/es/radio/props.mjs +1 -1
- package/es/radio-group/props.mjs +1 -1
- package/es/select/props.mjs +1 -1
- package/es/slider/props.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/swipe/Swipe.mjs +6 -1
- package/es/swipe/provide.mjs +26 -2
- package/es/switch/props.mjs +1 -1
- package/es/tooltip/Tooltip.mjs +5 -1
- package/es/tooltip/props.mjs +1 -0
- package/es/uploader/props.mjs +1 -1
- package/es/utils/components.mjs +30 -9
- package/es/varlet.esm.js +5521 -5466
- package/highlight/web-types.en-US.json +33 -24
- package/highlight/web-types.zh-CN.json +34 -25
- package/lib/varlet.cjs.js +137 -72
- package/package.json +8 -7
- package/types/autoComplete.d.ts +2 -1
- package/types/checkbox.d.ts +2 -2
- package/types/checkboxGroup.d.ts +2 -1
- package/types/counter.d.ts +4 -4
- package/types/input.d.ts +9 -2
- package/types/radio.d.ts +2 -2
- package/types/radioGroup.d.ts +2 -1
- package/types/rate.d.ts +2 -2
- package/types/select.d.ts +9 -2
- package/types/slider.d.ts +2 -1
- package/types/switch.d.ts +2 -2
- package/types/tooltip.d.ts +1 -0
- package/types/uploader.d.ts +2 -2
- package/types/varComponent.d.ts +4 -0
- package/umd/varlet.js +7 -7
package/types/radio.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
|
|
1
|
+
import { VarComponent, BasicAttributes, ListenerProp, Rules as RadioRules, SetPropsDefaults } from './varComponent'
|
|
2
2
|
import { VNode } from 'vue'
|
|
3
3
|
|
|
4
4
|
export declare const radioProps: Record<keyof RadioProps, any>
|
|
@@ -16,7 +16,7 @@ export interface RadioProps extends BasicAttributes {
|
|
|
16
16
|
iconSize?: string | number
|
|
17
17
|
ripple?: boolean
|
|
18
18
|
validateTrigger?: Array<RadioValidateTrigger>
|
|
19
|
-
rules?:
|
|
19
|
+
rules?: RadioRules
|
|
20
20
|
onClick?: ListenerProp<(e: Event) => void>
|
|
21
21
|
onChange?: ListenerProp<(value: any) => void>
|
|
22
22
|
'onUpdate:modelValue'?: ListenerProp<(value: any) => void>
|
package/types/radioGroup.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
VarComponent,
|
|
3
3
|
BasicAttributes,
|
|
4
4
|
Direction as RadioGroupDirection,
|
|
5
|
+
Rules as RadioGroupRules,
|
|
5
6
|
ListenerProp,
|
|
6
7
|
SetPropsDefaults,
|
|
7
8
|
} from './varComponent'
|
|
@@ -30,7 +31,7 @@ export interface RadioGroupProps extends BasicAttributes {
|
|
|
30
31
|
labelKey?: string
|
|
31
32
|
valueKey?: string
|
|
32
33
|
validateTrigger?: Array<RadioGroupValidateTrigger>
|
|
33
|
-
rules?:
|
|
34
|
+
rules?: RadioGroupRules
|
|
34
35
|
onChange?: ListenerProp<(value: any) => void>
|
|
35
36
|
'onUpdate:modelValue'?: ListenerProp<(value: any) => void>
|
|
36
37
|
}
|
package/types/rate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
|
|
1
|
+
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults, Rules as RateRules } from './varComponent'
|
|
2
2
|
|
|
3
3
|
export declare const rateProps: Record<keyof RateProps, any>
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ export interface RateProps extends BasicAttributes {
|
|
|
21
21
|
readonly?: boolean
|
|
22
22
|
clearable?: boolean
|
|
23
23
|
ripple?: boolean
|
|
24
|
-
rules?:
|
|
24
|
+
rules?: RateRules
|
|
25
25
|
onChange?: ListenerProp<(value: number) => void>
|
|
26
26
|
'onUpdate:modelValue'?: ListenerProp<(value: number) => void>
|
|
27
27
|
}
|
package/types/select.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
VarComponent,
|
|
3
|
+
BasicAttributes,
|
|
4
|
+
ListenerProp,
|
|
5
|
+
Variant as SelectVariant,
|
|
6
|
+
Rules as SelectRules,
|
|
7
|
+
SetPropsDefaults,
|
|
8
|
+
} from './varComponent'
|
|
2
9
|
import { VNode } from 'vue'
|
|
3
10
|
|
|
4
11
|
export declare const selectProps: Record<keyof SelectProps, any>
|
|
@@ -43,7 +50,7 @@ export interface SelectProps extends BasicAttributes {
|
|
|
43
50
|
separator?: string
|
|
44
51
|
textAlign?: SelectTextAlign
|
|
45
52
|
validateTrigger?: Array<SelectValidateTrigger>
|
|
46
|
-
rules?:
|
|
53
|
+
rules?: SelectRules
|
|
47
54
|
onFocus?: ListenerProp<(e: Event) => void>
|
|
48
55
|
onBlur?: ListenerProp<(e: Event) => void>
|
|
49
56
|
onClick?: ListenerProp<(e: Event) => void>
|
package/types/slider.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
VarComponent,
|
|
3
3
|
BasicAttributes,
|
|
4
4
|
Direction as SliderDirection,
|
|
5
|
+
Rules as SliderRules,
|
|
5
6
|
ListenerProp,
|
|
6
7
|
SetPropsDefaults,
|
|
7
8
|
} from './varComponent'
|
|
@@ -30,7 +31,7 @@ export interface SliderProps extends BasicAttributes {
|
|
|
30
31
|
disabled?: boolean
|
|
31
32
|
readonly?: boolean
|
|
32
33
|
direction?: SliderDirection
|
|
33
|
-
rules?:
|
|
34
|
+
rules?: SliderRules
|
|
34
35
|
onChange?: ListenerProp<(value: number | Array<number>) => void>
|
|
35
36
|
onStart?: ListenerProp<() => void>
|
|
36
37
|
onEnd?: ListenerProp<(value: number | Array<number>) => void>
|
package/types/switch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
|
|
1
|
+
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults, Rules as SwitchRules } from './varComponent'
|
|
2
2
|
|
|
3
3
|
export declare const switchProps: Record<keyof SwitchProps, any>
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ export interface SwitchProps extends BasicAttributes {
|
|
|
20
20
|
lazyChange?: boolean
|
|
21
21
|
validateTrigger?: Array<SwitchValidateTrigger>
|
|
22
22
|
variant?: boolean
|
|
23
|
-
rules?:
|
|
23
|
+
rules?: SwitchRules
|
|
24
24
|
onClick?: ListenerProp<(event: Event) => void>
|
|
25
25
|
onChange?: ListenerProp<(value: any) => void>
|
|
26
26
|
'onUpdate:modelValue'?: ListenerProp<(value: any) => void>
|
package/types/tooltip.d.ts
CHANGED
package/types/uploader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
|
|
1
|
+
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults, Rules as UploaderRules } from './varComponent'
|
|
2
2
|
import { VNode, InputHTMLAttributes } from 'vue'
|
|
3
3
|
|
|
4
4
|
export declare const uploaderProps: Record<keyof UploaderProps, any>
|
|
@@ -47,7 +47,7 @@ export interface UploaderProps extends BasicAttributes {
|
|
|
47
47
|
preventDefaultPreview?: boolean
|
|
48
48
|
resolveType?: UploaderResolveType
|
|
49
49
|
validateTrigger?: Array<UploaderValidateTrigger>
|
|
50
|
-
rules?:
|
|
50
|
+
rules?: UploaderRules
|
|
51
51
|
onClickAction?: ListenerProp<(chooseFile: () => void, event: Event) => void>
|
|
52
52
|
onBeforeFilter?: ListenerProp<(files: VarFile[]) => Promise<VarFile[]> | VarFile[]>
|
|
53
53
|
onBeforeRead?: ListenerProp<(file: VarFile) => Promise<any> | any>
|
package/types/varComponent.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export type Variant = 'outlined' | 'standard'
|
|
|
18
18
|
|
|
19
19
|
export type ListenerProp<F> = F | F[]
|
|
20
20
|
|
|
21
|
+
export type Rule = Record<string, any> | ((v: any) => any)
|
|
22
|
+
|
|
23
|
+
export type Rules = Rule[]
|
|
24
|
+
|
|
21
25
|
export interface BasicAttributes {
|
|
22
26
|
class?: string | Record<string, any>
|
|
23
27
|
style?: string | Record<string, any>
|