@varlet/ui 2.13.5-alpha.1690489609808 → 2.13.5
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/avatar/Avatar.mjs +4 -2
- package/es/avatar/props.mjs +3 -0
- package/es/fab/Fab.mjs +6 -1
- package/es/fab/props.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/snackbar/Snackbar.mjs +2 -2
- package/es/snackbar/props.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/varlet.esm.js +320 -312
- package/highlight/web-types.en-US.json +17 -8
- package/highlight/web-types.zh-CN.json +17 -8
- package/lib/varlet.cjs.js +18 -9
- package/package.json +6 -6
- package/types/actionSheet.d.ts +1 -1
- package/types/avatar.d.ts +1 -0
- package/types/dialog.d.ts +1 -1
- package/types/fab.d.ts +4 -1
- package/types/imagePreview.d.ts +1 -1
- package/types/overlay.d.ts +1 -1
- package/types/snackbar.d.ts +1 -1
- package/umd/varlet.js +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "2.13.5
|
|
4
|
+
"version": "2.13.5",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"description": "The location of the action sheet to mount",
|
|
105
105
|
"default": "body",
|
|
106
106
|
"value": {
|
|
107
|
-
"type": "TeleportProps['to']",
|
|
107
|
+
"type": "TeleportProps['to'] | false",
|
|
108
108
|
"kind": "expression"
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -290,6 +290,15 @@
|
|
|
290
290
|
"kind": "expression"
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
|
+
{
|
|
294
|
+
"name": "alt",
|
|
295
|
+
"description": "Image alt text, the same as the native attribute of the `img` tag",
|
|
296
|
+
"default": "-",
|
|
297
|
+
"value": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"kind": "expression"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
293
302
|
{
|
|
294
303
|
"name": "fit",
|
|
295
304
|
"description": "Filling mode of avatar image, optional value `fill contain cover none scale-down`",
|
|
@@ -2287,7 +2296,7 @@
|
|
|
2287
2296
|
"description": "The location of the Dialog to mount",
|
|
2288
2297
|
"default": "body",
|
|
2289
2298
|
"value": {
|
|
2290
|
-
"type": "TeleportProps['to']",
|
|
2299
|
+
"type": "TeleportProps['to'] | false",
|
|
2291
2300
|
"kind": "expression"
|
|
2292
2301
|
}
|
|
2293
2302
|
}
|
|
@@ -2535,10 +2544,10 @@
|
|
|
2535
2544
|
},
|
|
2536
2545
|
{
|
|
2537
2546
|
"name": "drag",
|
|
2538
|
-
"description": "
|
|
2547
|
+
"description": "Drag component props, for deep customization (support `direction` `attraction` `boundary`)",
|
|
2539
2548
|
"default": "false",
|
|
2540
2549
|
"value": {
|
|
2541
|
-
"type": "boolean",
|
|
2550
|
+
"type": "boolean | DragProps",
|
|
2542
2551
|
"kind": "expression"
|
|
2543
2552
|
}
|
|
2544
2553
|
},
|
|
@@ -3101,7 +3110,7 @@
|
|
|
3101
3110
|
"description": "The location of the pop-up layer to mount",
|
|
3102
3111
|
"default": "body",
|
|
3103
3112
|
"value": {
|
|
3104
|
-
"type": "TeleportProps['to']",
|
|
3113
|
+
"type": "TeleportProps['to'] | false",
|
|
3105
3114
|
"kind": "expression"
|
|
3106
3115
|
}
|
|
3107
3116
|
},
|
|
@@ -3988,7 +3997,7 @@
|
|
|
3988
3997
|
"description": "The location of the Overlay to mount",
|
|
3989
3998
|
"default": "-",
|
|
3990
3999
|
"value": {
|
|
3991
|
-
"type": "TeleportProps['to']",
|
|
4000
|
+
"type": "TeleportProps['to'] | false",
|
|
3992
4001
|
"kind": "expression"
|
|
3993
4002
|
}
|
|
3994
4003
|
}
|
|
@@ -5606,7 +5615,7 @@
|
|
|
5606
5615
|
"description": "The location of the Snackbar to mount",
|
|
5607
5616
|
"default": "body",
|
|
5608
5617
|
"value": {
|
|
5609
|
-
"type": "TeleportProps['to']",
|
|
5618
|
+
"type": "TeleportProps['to'] | false",
|
|
5610
5619
|
"kind": "expression"
|
|
5611
5620
|
}
|
|
5612
5621
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "2.13.5
|
|
4
|
+
"version": "2.13.5",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"description": "动作面板挂载的位置",
|
|
105
105
|
"default": "body",
|
|
106
106
|
"value": {
|
|
107
|
-
"type": "TeleportProps['to']",
|
|
107
|
+
"type": "TeleportProps['to'] | false",
|
|
108
108
|
"kind": "expression"
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -290,6 +290,15 @@
|
|
|
290
290
|
"kind": "expression"
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
|
+
{
|
|
294
|
+
"name": "alt",
|
|
295
|
+
"description": "替代文本,和 `img` 标签原生属性一致",
|
|
296
|
+
"default": "-",
|
|
297
|
+
"value": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"kind": "expression"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
293
302
|
{
|
|
294
303
|
"name": "fit",
|
|
295
304
|
"description": "头像图片的填充模式,可选值 `fill contain cover none scale-down`",
|
|
@@ -2446,7 +2455,7 @@
|
|
|
2446
2455
|
"description": "弹出层挂载的位置",
|
|
2447
2456
|
"default": "body",
|
|
2448
2457
|
"value": {
|
|
2449
|
-
"type": "TeleportProps['to']",
|
|
2458
|
+
"type": "TeleportProps['to'] | false",
|
|
2450
2459
|
"kind": "expression"
|
|
2451
2460
|
}
|
|
2452
2461
|
}
|
|
@@ -2694,10 +2703,10 @@
|
|
|
2694
2703
|
},
|
|
2695
2704
|
{
|
|
2696
2705
|
"name": "drag",
|
|
2697
|
-
"description": "
|
|
2706
|
+
"description": "Drag 组件配置,用于深度定制(支持 `direction` `attraction` `boundary`)",
|
|
2698
2707
|
"default": "false",
|
|
2699
2708
|
"value": {
|
|
2700
|
-
"type": "boolean",
|
|
2709
|
+
"type": "boolean | DragProps",
|
|
2701
2710
|
"kind": "expression"
|
|
2702
2711
|
}
|
|
2703
2712
|
},
|
|
@@ -3269,7 +3278,7 @@
|
|
|
3269
3278
|
"description": "弹出层挂载的位置",
|
|
3270
3279
|
"default": "body",
|
|
3271
3280
|
"value": {
|
|
3272
|
-
"type": "TeleportProps['to']",
|
|
3281
|
+
"type": "TeleportProps['to'] | false",
|
|
3273
3282
|
"kind": "expression"
|
|
3274
3283
|
}
|
|
3275
3284
|
},
|
|
@@ -4169,7 +4178,7 @@
|
|
|
4169
4178
|
"description": "遮罩层挂载的位置",
|
|
4170
4179
|
"default": "-",
|
|
4171
4180
|
"value": {
|
|
4172
|
-
"type": "TeleportProps['to']",
|
|
4181
|
+
"type": "TeleportProps['to'] | false",
|
|
4173
4182
|
"kind": "expression"
|
|
4174
4183
|
}
|
|
4175
4184
|
}
|
|
@@ -5959,7 +5968,7 @@
|
|
|
5959
5968
|
"description": "弹出层挂载的位置",
|
|
5960
5969
|
"default": "body",
|
|
5961
5970
|
"value": {
|
|
5962
|
-
"type": "TeleportProps['to']",
|
|
5971
|
+
"type": "TeleportProps['to'] | false",
|
|
5963
5972
|
"kind": "expression"
|
|
5964
5973
|
}
|
|
5965
5974
|
}
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -2390,6 +2390,9 @@ var props$17 = {
|
|
|
2390
2390
|
validator: sizeValidator$6,
|
|
2391
2391
|
default: "normal"
|
|
2392
2392
|
},
|
|
2393
|
+
alt: {
|
|
2394
|
+
type: String
|
|
2395
|
+
},
|
|
2393
2396
|
color: {
|
|
2394
2397
|
type: String
|
|
2395
2398
|
},
|
|
@@ -2426,8 +2429,8 @@ var {
|
|
|
2426
2429
|
n: n$1e,
|
|
2427
2430
|
classes: classes$11
|
|
2428
2431
|
} = createNamespace("avatar");
|
|
2429
|
-
var _hoisted_1$s = ["src", "lazy-loading", "lazy-error"];
|
|
2430
|
-
var _hoisted_2$f = ["src"];
|
|
2432
|
+
var _hoisted_1$s = ["src", "alt", "lazy-loading", "lazy-error"];
|
|
2433
|
+
var _hoisted_2$f = ["src", "alt"];
|
|
2431
2434
|
function __render__$1e(_ctx, _cache) {
|
|
2432
2435
|
var _directive_lazy = vue.resolveDirective("lazy");
|
|
2433
2436
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -2454,6 +2457,7 @@ function __render__$1e(_ctx, _cache) {
|
|
|
2454
2457
|
key: 0,
|
|
2455
2458
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
2456
2459
|
src: _ctx.src,
|
|
2460
|
+
alt: _ctx.alt,
|
|
2457
2461
|
style: vue.normalizeStyle({
|
|
2458
2462
|
objectFit: _ctx.fit
|
|
2459
2463
|
}),
|
|
@@ -2466,6 +2470,7 @@ function __render__$1e(_ctx, _cache) {
|
|
|
2466
2470
|
key: 1,
|
|
2467
2471
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
2468
2472
|
src: _ctx.src,
|
|
2473
|
+
alt: _ctx.alt,
|
|
2469
2474
|
style: vue.normalizeStyle({
|
|
2470
2475
|
objectFit: _ctx.fit
|
|
2471
2476
|
}),
|
|
@@ -13569,7 +13574,7 @@ var props$G = {
|
|
|
13569
13574
|
default: true
|
|
13570
13575
|
},
|
|
13571
13576
|
drag: {
|
|
13572
|
-
type: Boolean,
|
|
13577
|
+
type: [Object, Boolean],
|
|
13573
13578
|
default: false
|
|
13574
13579
|
},
|
|
13575
13580
|
type: {
|
|
@@ -13744,6 +13749,7 @@ const Fab = vue.defineComponent({
|
|
|
13744
13749
|
var _slot;
|
|
13745
13750
|
var _call;
|
|
13746
13751
|
var children = flatFragment((_call = call(slots.default)) != null ? _call : []);
|
|
13752
|
+
var dragProps = isBoolean(props2.drag) ? {} : props2.drag;
|
|
13747
13753
|
return vue.createVNode(Drag, vue.mergeProps({
|
|
13748
13754
|
"ref": dragRef,
|
|
13749
13755
|
"class": classes$B(n$J("--position-" + props2.position), [!props2.fixed, n$J("--absolute")]),
|
|
@@ -13755,7 +13761,10 @@ const Fab = vue.defineComponent({
|
|
|
13755
13761
|
},
|
|
13756
13762
|
"zIndex": props2.zIndex,
|
|
13757
13763
|
"teleport": props2.teleport,
|
|
13758
|
-
"disabled": props2.disabled || !props2.drag || !props2.fixed
|
|
13764
|
+
"disabled": props2.disabled || !props2.drag || !props2.fixed,
|
|
13765
|
+
"direction": dragProps.direction,
|
|
13766
|
+
"attraction": dragProps.attraction,
|
|
13767
|
+
"boundary": dragProps.boundary
|
|
13759
13768
|
}, attrs), {
|
|
13760
13769
|
default: () => [vue.createVNode("div", {
|
|
13761
13770
|
"class": classes$B(n$J(), n$J("--direction-" + props2.direction), [props2.safeArea, n$J("--safe-area")]),
|
|
@@ -21545,7 +21554,7 @@ var props$c = {
|
|
|
21545
21554
|
default: false
|
|
21546
21555
|
},
|
|
21547
21556
|
teleport: {
|
|
21548
|
-
type: [String, Object],
|
|
21557
|
+
type: [String, Object, Boolean],
|
|
21549
21558
|
default: "body"
|
|
21550
21559
|
},
|
|
21551
21560
|
forbidClick: {
|
|
@@ -21698,8 +21707,8 @@ var {
|
|
|
21698
21707
|
function __render__$b(_ctx, _cache) {
|
|
21699
21708
|
var _component_var_snackbar_core = vue.resolveComponent("var-snackbar-core");
|
|
21700
21709
|
return vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
21701
|
-
to: _ctx.teleport,
|
|
21702
|
-
disabled: _ctx.disabled
|
|
21710
|
+
to: _ctx.teleport === false ? void 0 : _ctx.teleport,
|
|
21711
|
+
disabled: _ctx.disabled || _ctx.teleport === false
|
|
21703
21712
|
}, [vue.createVNode(vue.Transition, {
|
|
21704
21713
|
name: _ctx.n() + "-fade",
|
|
21705
21714
|
onAfterEnter: _ctx.onOpened,
|
|
@@ -25129,9 +25138,9 @@ const skeleton = "";
|
|
|
25129
25138
|
const SkeletonSfc = "";
|
|
25130
25139
|
const slider = "";
|
|
25131
25140
|
const SliderSfc = "";
|
|
25132
|
-
const SnackbarSfc = "";
|
|
25133
25141
|
const snackbar = "";
|
|
25134
25142
|
const coreSfc = "";
|
|
25143
|
+
const SnackbarSfc = "";
|
|
25135
25144
|
const space = "";
|
|
25136
25145
|
const step = "";
|
|
25137
25146
|
const StepSfc = "";
|
|
@@ -25156,7 +25165,7 @@ const TimePickerSfc = "";
|
|
|
25156
25165
|
const TooltipSfc = "";
|
|
25157
25166
|
const uploader = "";
|
|
25158
25167
|
const UploaderSfc = "";
|
|
25159
|
-
const version = "2.13.5
|
|
25168
|
+
const version = "2.13.5";
|
|
25160
25169
|
function install(app) {
|
|
25161
25170
|
ActionSheet.install && app.use(ActionSheet);
|
|
25162
25171
|
AppBar.install && app.use(AppBar);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.13.5
|
|
3
|
+
"version": "2.13.5",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@popperjs/core": "^2.11.6",
|
|
47
47
|
"dayjs": "^1.10.4",
|
|
48
48
|
"decimal.js": "^10.2.1",
|
|
49
|
-
"@varlet/
|
|
50
|
-
"@varlet/
|
|
51
|
-
"@varlet/
|
|
49
|
+
"@varlet/shared": "2.13.5",
|
|
50
|
+
"@varlet/icons": "2.13.5",
|
|
51
|
+
"@varlet/use": "2.13.5"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@vue/runtime-core": "3.3.4",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"typescript": "^5.1.5",
|
|
64
64
|
"vue": "3.3.4",
|
|
65
65
|
"vue-router": "4.2.0",
|
|
66
|
-
"@varlet/
|
|
67
|
-
"@varlet/
|
|
66
|
+
"@varlet/touch-emulator": "2.13.5",
|
|
67
|
+
"@varlet/cli": "2.13.5"
|
|
68
68
|
},
|
|
69
69
|
"browserslist": [
|
|
70
70
|
"Chrome >= 54",
|
package/types/actionSheet.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface ActionSheetProps extends BasicAttributes {
|
|
|
14
14
|
closeOnClickAction?: boolean
|
|
15
15
|
closeOnClickOverlay?: boolean
|
|
16
16
|
safeArea?: boolean
|
|
17
|
-
teleport?: TeleportProps['to']
|
|
17
|
+
teleport?: TeleportProps['to'] | false
|
|
18
18
|
onOpen?: ListenerProp<() => void>
|
|
19
19
|
onOpened?: ListenerProp<() => void>
|
|
20
20
|
onClose?: ListenerProp<() => void>
|
package/types/avatar.d.ts
CHANGED
package/types/dialog.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface DialogProps extends BasicAttributes {
|
|
|
26
26
|
dialogStyle?: Record<string, any>
|
|
27
27
|
lockScroll?: boolean
|
|
28
28
|
closeOnClickOverlay?: boolean
|
|
29
|
-
teleport?: TeleportProps['to']
|
|
29
|
+
teleport?: TeleportProps['to'] | false
|
|
30
30
|
onOpen?: ListenerProp<() => void>
|
|
31
31
|
onOpened?: ListenerProp<() => void>
|
|
32
32
|
onBeforeClose?: ListenerProp<(action: DialogActions, done: () => void) => void>
|
package/types/fab.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VNode, TeleportProps } from 'vue'
|
|
2
2
|
import { VarComponent, BasicAttributes, ListenerProp, Type } from './varComponent'
|
|
3
|
+
import { DragProps } from './drag'
|
|
3
4
|
|
|
4
5
|
export type FabPosition = 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom'
|
|
5
6
|
|
|
@@ -9,6 +10,8 @@ export type FabDirection = 'top' | 'right' | 'bottom' | 'left'
|
|
|
9
10
|
|
|
10
11
|
export type FabType = Type
|
|
11
12
|
|
|
13
|
+
export type FabDrag = boolean | Pick<DragProps, 'attraction' | 'boundary' | 'direction'>
|
|
14
|
+
|
|
12
15
|
export declare const fabProps: Record<string, any>
|
|
13
16
|
|
|
14
17
|
export interface FabTriggerData {
|
|
@@ -18,7 +21,7 @@ export interface FabTriggerData {
|
|
|
18
21
|
export interface FabProps extends BasicAttributes {
|
|
19
22
|
active?: boolean
|
|
20
23
|
show?: boolean
|
|
21
|
-
drag?:
|
|
24
|
+
drag?: FabDrag
|
|
22
25
|
type?: FabType
|
|
23
26
|
fixed?: boolean
|
|
24
27
|
position?: FabPosition
|
package/types/imagePreview.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface ImagePreviewProps extends BasicAttributes {
|
|
|
12
12
|
lockScroll?: boolean
|
|
13
13
|
indicator?: boolean
|
|
14
14
|
closeable?: boolean
|
|
15
|
-
teleport?: TeleportProps['to']
|
|
15
|
+
teleport?: TeleportProps['to'] | false
|
|
16
16
|
imagePreventDefault?: boolean
|
|
17
17
|
onOpen?: ListenerProp<() => void>
|
|
18
18
|
onOpened?: ListenerProp<() => void>
|
package/types/overlay.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const overlayProps: Record<string, any>
|
|
|
5
5
|
|
|
6
6
|
export interface OverlayProps extends BasicAttributes {
|
|
7
7
|
lockScroll?: boolean
|
|
8
|
-
teleport?: TeleportProps['to']
|
|
8
|
+
teleport?: TeleportProps['to'] | false
|
|
9
9
|
onClick?: ListenerProp<() => void>
|
|
10
10
|
'onUpdate:show'?: ListenerProp<(show: boolean) => void>
|
|
11
11
|
}
|
package/types/snackbar.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface SnackbarProps extends BasicAttributes {
|
|
|
16
16
|
loadingSize?: LoadingSize
|
|
17
17
|
loadingColor?: string
|
|
18
18
|
loadingRadius?: string | number
|
|
19
|
-
teleport?: TeleportProps['to']
|
|
19
|
+
teleport?: TeleportProps['to'] | false
|
|
20
20
|
lockScroll?: boolean
|
|
21
21
|
contentClass?: string
|
|
22
22
|
duration?: number
|