@varlet/ui 2.17.0 → 2.18.0-alpha.1697472019506
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/action-sheet/actionSheet.css +1 -1
- package/es/dialog/dialog.css +1 -1
- package/es/drag/Drag.mjs +2 -2
- package/es/form/Form.mjs +3 -3
- package/es/image-preview/ImagePreview.mjs +2 -2
- package/es/index-bar/indexBar.css +1 -1
- package/es/index.bundle.mjs +13 -1
- package/es/index.mjs +11 -1
- package/es/input/Input.mjs +2 -2
- package/es/menu/style/index.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +122 -0
- package/es/menu-option/MenuOptionSfc.css +0 -0
- package/es/menu-option/index.mjs +11 -0
- package/es/menu-option/menuOption.css +1 -0
- package/es/menu-option/props.mjs +8 -0
- package/es/menu-option/provide.mjs +19 -0
- package/es/menu-option/style/index.mjs +5 -0
- package/es/menu-select/MenuSelect.mjs +110 -0
- package/es/menu-select/MenuSelectSfc.css +0 -0
- package/es/menu-select/index.mjs +9 -0
- package/es/menu-select/menuSelect.css +1 -0
- package/es/menu-select/props.mjs +58 -0
- package/es/menu-select/provide.mjs +16 -0
- package/es/menu-select/style/index.mjs +5 -0
- package/es/option/Option.mjs +28 -28
- package/es/option/option.css +1 -1
- package/es/option/props.mjs +2 -1
- package/es/popup/popup.css +1 -1
- package/es/pull-refresh/PullRefresh.mjs +2 -2
- package/es/ripple/index.mjs +2 -0
- package/es/select/Select.mjs +14 -47
- package/es/select/useSelectController.mjs +67 -0
- package/es/slider/Slider.mjs +2 -2
- package/es/style.css +1 -1
- package/es/style.mjs +2 -0
- package/es/swipe/Swipe.mjs +13 -13
- package/es/themes/dark/index.mjs +3 -2
- package/es/themes/dark/menuOption.mjs +6 -0
- package/es/themes/dark/option.mjs +1 -1
- package/es/time-picker/TimePicker.mjs +2 -2
- package/es/uploader/Uploader.mjs +8 -4
- package/es/uploader/props.mjs +2 -0
- package/es/utils/shared.mjs +4 -4
- package/es/varlet.esm.js +5429 -5139
- package/highlight/web-types.en-US.json +359 -90
- package/highlight/web-types.zh-CN.json +271 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +2101 -1744
- package/package.json +7 -7
- package/types/index.d.ts +4 -0
- package/types/menuOption.d.ts +20 -0
- package/types/menuSelect.d.ts +70 -0
- package/types/option.d.ts +1 -0
- package/types/uploader.d.ts +2 -0
- package/umd/varlet.js +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0-alpha.1697472019506",
|
|
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": "2.
|
|
52
|
-
"@varlet/shared": "2.
|
|
53
|
-
"@varlet/use": "2.
|
|
51
|
+
"@varlet/icons": "2.18.0-alpha.1697472019506",
|
|
52
|
+
"@varlet/shared": "2.18.0-alpha.1697472019506",
|
|
53
|
+
"@varlet/use": "2.18.0-alpha.1697472019506"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.3.4",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.3.4",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/ui": "2.18.0-alpha.1697472019506",
|
|
70
|
+
"@varlet/cli": "2.18.0-alpha.1697472019506",
|
|
71
|
+
"@varlet/touch-emulator": "2.18.0-alpha.1697472019506"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|
package/types/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export * from './loading'
|
|
|
49
49
|
export * from './loadingBar'
|
|
50
50
|
export * from './locale'
|
|
51
51
|
export * from './menu'
|
|
52
|
+
export * from './menuOption'
|
|
53
|
+
export * from './menuSelect'
|
|
52
54
|
export * from './option'
|
|
53
55
|
export * from './overlay'
|
|
54
56
|
export * from './pagination'
|
|
@@ -134,6 +136,8 @@ declare module 'vue' {
|
|
|
134
136
|
VarLoadingBar: typeof import('@varlet/ui')['_LoadingBarComponent']
|
|
135
137
|
VarLocale: typeof import('@varlet/ui')['_LocaleComponent']
|
|
136
138
|
VarMenu: typeof import('@varlet/ui')['_MenuComponent']
|
|
139
|
+
VarMenuOption: typeof import('@varlet/ui')['_MenuOptionComponent']
|
|
140
|
+
VarMenuSelect: typeof import('@varlet/ui')['_MenuSelectComponent']
|
|
137
141
|
VarOption: typeof import('@varlet/ui')['_OptionComponent']
|
|
138
142
|
VarOverlay: typeof import('@varlet/ui')['_OverlayComponent']
|
|
139
143
|
VarPagination: typeof import('@varlet/ui')['_PaginationComponent']
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VarComponent, BasicAttributes } from './varComponent'
|
|
2
|
+
import { VNode } from 'vue'
|
|
3
|
+
|
|
4
|
+
export declare const menuOptionProps: Record<string, any>
|
|
5
|
+
|
|
6
|
+
export interface MenuOptionProps extends BasicAttributes {
|
|
7
|
+
label?: any
|
|
8
|
+
value?: any
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class MenuOption extends VarComponent {
|
|
13
|
+
$props: MenuOptionProps
|
|
14
|
+
|
|
15
|
+
$slots: {
|
|
16
|
+
default(): VNode[]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class _MenuOptionComponent extends MenuOption {}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
|
|
2
|
+
import { Placement as PopperPlacement } from '@popperjs/core/lib/enums'
|
|
3
|
+
import { TeleportProps, VNode } from 'vue'
|
|
4
|
+
import { PositioningStrategy } from '@popperjs/core'
|
|
5
|
+
|
|
6
|
+
export declare const menuSelectProps: Record<string, any>
|
|
7
|
+
|
|
8
|
+
type NeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
|
|
9
|
+
|
|
10
|
+
export type MenuSelectPlacement =
|
|
11
|
+
| NeededPopperPlacement
|
|
12
|
+
| 'cover-top'
|
|
13
|
+
| 'cover-top-start'
|
|
14
|
+
| 'cover-top-end'
|
|
15
|
+
| 'cover-bottom'
|
|
16
|
+
| 'cover-bottom-start'
|
|
17
|
+
| 'cover-bottom-end'
|
|
18
|
+
| 'cover-left'
|
|
19
|
+
| 'cover-right'
|
|
20
|
+
|
|
21
|
+
export type MenuSelectTrigger = 'click' | 'hover'
|
|
22
|
+
|
|
23
|
+
export type MenuSelectStrategy = PositioningStrategy
|
|
24
|
+
|
|
25
|
+
export type MenuSelectSize = 'normal' | 'mini' | 'small' | 'large'
|
|
26
|
+
|
|
27
|
+
export interface MenuSelectProps extends BasicAttributes {
|
|
28
|
+
modelValue?: any
|
|
29
|
+
size?: MenuSelectSize
|
|
30
|
+
multiple?: boolean
|
|
31
|
+
scrollable?: boolean
|
|
32
|
+
closeOnSelect?: boolean
|
|
33
|
+
show?: boolean
|
|
34
|
+
disabled?: boolean
|
|
35
|
+
trigger?: MenuSelectTrigger
|
|
36
|
+
reference?: string
|
|
37
|
+
placement?: MenuSelectPlacement
|
|
38
|
+
strategy?: MenuSelectStrategy
|
|
39
|
+
offsetX?: string | number
|
|
40
|
+
offsetY?: string | number
|
|
41
|
+
teleport?: TeleportProps['to'] | false
|
|
42
|
+
sameWidth?: boolean
|
|
43
|
+
elevation?: boolean | number | string
|
|
44
|
+
defaultStyle?: boolean
|
|
45
|
+
popoverClass?: string
|
|
46
|
+
closeOnClickReference?: boolean
|
|
47
|
+
onOpen?: ListenerProp<() => void>
|
|
48
|
+
onOpened?: ListenerProp<() => void>
|
|
49
|
+
onClose?: ListenerProp<() => void>
|
|
50
|
+
onClosed?: ListenerProp<() => void>
|
|
51
|
+
'onUpdate:modelValue'?: ListenerProp<(value: any) => void>
|
|
52
|
+
'onUpdate:show'?: ListenerProp<(show: boolean) => void>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class MenuSelect extends VarComponent {
|
|
56
|
+
$props: MenuSelectProps
|
|
57
|
+
|
|
58
|
+
$slots: {
|
|
59
|
+
default(): VNode[]
|
|
60
|
+
options(): VNode[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
open(): void
|
|
64
|
+
|
|
65
|
+
close(): void
|
|
66
|
+
|
|
67
|
+
resize(): void
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export class _MenuSelectComponent extends MenuSelect {}
|
package/types/option.d.ts
CHANGED
package/types/uploader.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface UploaderProps extends BasicAttributes {
|
|
|
43
43
|
previewed?: boolean
|
|
44
44
|
hideList?: boolean
|
|
45
45
|
ripple?: boolean
|
|
46
|
+
preventDefaultPreview?: boolean
|
|
46
47
|
resolveType?: UploaderResolveType
|
|
47
48
|
validateTrigger?: Array<UploaderValidateTrigger>
|
|
48
49
|
rules?: Array<(v: VarFile[], u: UploaderVarFileUtils) => any>
|
|
@@ -52,6 +53,7 @@ export interface UploaderProps extends BasicAttributes {
|
|
|
52
53
|
onOversize?: ListenerProp<(file: VarFile) => any>
|
|
53
54
|
onBeforeRemove?: ListenerProp<(file: VarFile) => any>
|
|
54
55
|
onRemove?: ListenerProp<(file: VarFile) => any>
|
|
56
|
+
onPreview?: ListenerProp<(file: VarFile) => void>
|
|
55
57
|
'onUpdate:modelValue'?: ListenerProp<(files: VarFile[]) => any>
|
|
56
58
|
}
|
|
57
59
|
|