@varlet/ui 3.2.14 → 3.2.15-alpha.1718191007402
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.mjs +4 -1
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/app-bar/AppBar.mjs +2 -1
- package/es/back-top/backTop.css +1 -1
- package/es/bottom-navigation/BottomNavigation.mjs +2 -1
- package/es/button/button.css +1 -1
- package/es/card/Card.mjs +9 -3
- package/es/checkbox/checkbox.css +1 -1
- package/es/chip/chip.css +1 -1
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/counter/counter.css +1 -1
- package/es/date-picker/DatePicker.mjs +10 -7
- package/es/date-picker/date-picker.css +1 -1
- package/es/dialog/Dialog.mjs +6 -3
- package/es/index-bar/indexBar.css +1 -1
- package/es/index.bundle.mjs +7 -1
- package/es/index.mjs +6 -1
- package/es/list/List.mjs +7 -4
- package/es/list/list.css +1 -1
- package/es/locale/index.mjs +15 -8
- package/es/locale-provider/LocaleProvider.mjs +26 -0
- package/es/locale-provider/index.mjs +11 -0
- package/es/locale-provider/props.mjs +13 -0
- package/es/locale-provider/provide.mjs +17 -0
- package/es/locale-provider/style/index.mjs +0 -0
- package/es/menu-option/menuOption.css +1 -1
- package/es/option/option.css +1 -1
- package/es/pagination/Pagination.mjs +7 -4
- package/es/picker/Picker.mjs +7 -4
- package/es/radio/radio.css +1 -1
- package/es/rate/rate.css +1 -1
- package/es/slider/slider.css +1 -1
- package/es/snackbar/core.mjs +4 -3
- package/es/snackbar/index.mjs +1 -0
- package/es/snackbar/props.mjs +4 -0
- package/es/step/step.css +1 -1
- package/es/style.css +1 -1
- package/es/style.mjs +1 -0
- package/es/switch/switch.css +1 -1
- package/es/tab/tab.css +1 -1
- package/es/time-picker/timePicker.css +1 -1
- package/es/uploader/uploader.css +1 -1
- package/es/varlet.esm.js +6248 -6184
- package/highlight/web-types.en-US.json +66 -3
- package/highlight/web-types.zh-CN.json +66 -3
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +1143 -1066
- package/package.json +7 -9
- package/types/card.d.ts +15 -3
- package/types/index.d.ts +2 -0
- package/types/locale.d.ts +4 -4
- package/types/localeProvider.d.ts +21 -0
- package/types/snackbar.d.ts +2 -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.2.
|
|
3
|
+
"version": "3.2.15-alpha.1718191007402",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,27 +48,25 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/shared": "3.2.
|
|
51
|
+
"@varlet/icons": "3.2.15-alpha.1718191007402",
|
|
52
|
+
"@varlet/use": "3.2.15-alpha.1718191007402",
|
|
53
|
+
"@varlet/shared": "3.2.15-alpha.1718191007402"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.21",
|
|
57
57
|
"@vue/test-utils": "2.4.1",
|
|
58
|
-
"@types/lodash-es": "^4.17.6",
|
|
59
58
|
"@types/node": "^18.7.18",
|
|
60
59
|
"@vitest/coverage-istanbul": "1.1.0",
|
|
61
60
|
"jsdom": "22.1.0",
|
|
62
61
|
"vitest": "1.1.0",
|
|
63
62
|
"clipboard": "^2.0.6",
|
|
64
63
|
"live-server": "^1.2.1",
|
|
65
|
-
"lodash-es": "^4.17.21",
|
|
66
64
|
"typescript": "^5.1.5",
|
|
67
65
|
"vue": "3.4.21",
|
|
68
66
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
67
|
+
"@varlet/ui": "3.2.15-alpha.1718191007402",
|
|
68
|
+
"@varlet/touch-emulator": "3.2.15-alpha.1718191007402",
|
|
69
|
+
"@varlet/cli": "3.2.15-alpha.1718191007402"
|
|
72
70
|
},
|
|
73
71
|
"scripts": {
|
|
74
72
|
"dev": "varlet-cli dev",
|
package/types/card.d.ts
CHANGED
|
@@ -25,6 +25,18 @@ export interface CardProps extends BasicAttributes {
|
|
|
25
25
|
'onUpdate:floating'?: ListenerProp<(value: boolean) => void>
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export interface CardTitleData {
|
|
29
|
+
slotClass: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface CardSubtitleData {
|
|
33
|
+
slotClass: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface CardDescriptionData {
|
|
37
|
+
slotClass: string
|
|
38
|
+
}
|
|
39
|
+
|
|
28
40
|
export class Card extends VarComponent {
|
|
29
41
|
static setPropsDefaults: SetPropsDefaults<CardProps>
|
|
30
42
|
|
|
@@ -32,9 +44,9 @@ export class Card extends VarComponent {
|
|
|
32
44
|
|
|
33
45
|
$slots: {
|
|
34
46
|
image(): VNode[]
|
|
35
|
-
title(): VNode[]
|
|
36
|
-
subtitle(): VNode[]
|
|
37
|
-
description(): VNode[]
|
|
47
|
+
title(data: CardTitleData): VNode[]
|
|
48
|
+
subtitle(data: CardSubtitleData): VNode[]
|
|
49
|
+
description(data: CardDescriptionData): VNode[]
|
|
38
50
|
extra(): VNode[]
|
|
39
51
|
'close-button'(): VNode[]
|
|
40
52
|
'floating-content'(): VNode[]
|
package/types/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export * from './list'
|
|
|
50
50
|
export * from './loading'
|
|
51
51
|
export * from './loadingBar'
|
|
52
52
|
export * from './locale'
|
|
53
|
+
export * from './localeProvider'
|
|
53
54
|
export * from './menu'
|
|
54
55
|
export * from './menuOption'
|
|
55
56
|
export * from './menuSelect'
|
|
@@ -140,6 +141,7 @@ declare module 'vue' {
|
|
|
140
141
|
VarLoading: typeof import('@varlet/ui')['_LoadingComponent']
|
|
141
142
|
VarLoadingBar: typeof import('@varlet/ui')['_LoadingBarComponent']
|
|
142
143
|
VarLocale: typeof import('@varlet/ui')['_LocaleComponent']
|
|
144
|
+
VarLocaleProvider: typeof import('@varlet/ui')['_LocaleProviderComponent']
|
|
143
145
|
VarMenu: typeof import('@varlet/ui')['_MenuComponent']
|
|
144
146
|
VarMenuOption: typeof import('@varlet/ui')['_MenuOptionComponent']
|
|
145
147
|
VarMenuSelect: typeof import('@varlet/ui')['_MenuSelectComponent']
|
package/types/locale.d.ts
CHANGED
|
@@ -36,20 +36,20 @@ interface Locale {
|
|
|
36
36
|
enUS: Message
|
|
37
37
|
zhTW: Message
|
|
38
38
|
zhHK: Message
|
|
39
|
-
messages: Record<string, Partial<Message
|
|
39
|
+
messages: Ref<Record<string, Partial<Message>>>
|
|
40
40
|
currentMessage: Ref<Partial<Pack>>
|
|
41
41
|
add(lang: string, message: Partial<Message>): void
|
|
42
42
|
use(lang: string): void
|
|
43
43
|
merge(lang: string, message: Partial<Message>): void
|
|
44
|
-
t(id: string): string
|
|
44
|
+
t(id: string, options?: { locale?: string }): string
|
|
45
45
|
|
|
46
46
|
useLocale<T = Message>(): {
|
|
47
|
-
messages: Record<string, Partial<T
|
|
47
|
+
messages: Ref<Record<string, Partial<T>>>
|
|
48
48
|
currentMessage: Ref<Partial<T>>
|
|
49
49
|
add(lang: string, message: Partial<T> & { lang?: string }): void
|
|
50
50
|
use(lang: string): void
|
|
51
51
|
merge(lang: string, message: Partial<T>): void
|
|
52
|
-
t(id: string): string
|
|
52
|
+
t(id: string, options?: { locale?: string }): string
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VarComponent, SetPropsDefaults, BasicAttributes } from './varComponent'
|
|
2
|
+
import { VNode } from 'vue'
|
|
3
|
+
|
|
4
|
+
export declare const localeProviderProps: Record<keyof LocaleProviderProps, any>
|
|
5
|
+
|
|
6
|
+
export interface LocaleProviderProps extends BasicAttributes {
|
|
7
|
+
tag?: string
|
|
8
|
+
locale?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class LocaleProvider extends VarComponent {
|
|
12
|
+
static setPropsDefaults: SetPropsDefaults<LocaleProviderProps>
|
|
13
|
+
|
|
14
|
+
$props: LocaleProviderProps
|
|
15
|
+
|
|
16
|
+
$slots: {
|
|
17
|
+
default(): VNode[]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class _LocaleProviderComponent extends LocaleProvider {}
|
package/types/snackbar.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface SnackbarProps extends BasicAttributes {
|
|
|
20
20
|
lockScroll?: boolean
|
|
21
21
|
contentClass?: string
|
|
22
22
|
duration?: number
|
|
23
|
+
elevation?: boolean | string | number
|
|
23
24
|
vertical?: boolean
|
|
24
25
|
show?: boolean
|
|
25
26
|
forbidClick?: boolean
|
|
@@ -51,6 +52,7 @@ export interface SnackbarOptions {
|
|
|
51
52
|
icon?: string | VNode | (() => VNode)
|
|
52
53
|
action?: string | VNode | (() => VNode)
|
|
53
54
|
duration?: number
|
|
55
|
+
elevation?: boolean | string | number
|
|
54
56
|
contentClass?: string
|
|
55
57
|
vertical?: boolean
|
|
56
58
|
loadingType?: string
|