@varlet/ui 3.0.2 → 3.0.4
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/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/es/app-bar/AppBar.mjs +6 -3
- package/es/app-bar/appBar.css +1 -1
- package/es/app-bar/props.mjs +6 -1
- package/es/avatar/Avatar.mjs +2 -0
- package/es/button/Button.mjs +10 -5
- package/es/hover/index.mjs +3 -4
- package/es/hover-overlay/HoverOverlay.mjs +1 -1
- package/es/hover-overlay/hoverOverlay.css +1 -1
- package/es/hover-overlay/props.mjs +2 -4
- package/es/hover-overlay/style/index.mjs +1 -0
- package/es/image/Image.mjs +6 -2
- package/es/image/props.mjs +1 -0
- package/es/image-preview/ImagePreview.mjs +1 -0
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu/usePopover.mjs +2 -1
- package/es/menu-select/props.mjs +1 -1
- package/es/ripple/index.mjs +24 -3
- package/es/select/props.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/styles/common.css +1 -1
- package/es/themes/dark/hoverOverlay.mjs +2 -1
- package/es/themes/dark/index.mjs +2 -0
- package/es/themes/md3-dark/hoverOverlay.mjs +2 -1
- package/es/themes/md3-dark/index.mjs +2 -0
- package/es/themes/md3-light/hoverOverlay.mjs +2 -1
- package/es/themes/md3-light/index.mjs +2 -0
- package/es/uploader/Uploader.mjs +1 -0
- package/es/utils/test.mjs +10 -3
- package/es/varlet.esm.js +3655 -3620
- package/highlight/web-types.en-US.json +38 -2
- package/highlight/web-types.zh-CN.json +28 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +77 -26
- package/package.json +7 -7
- package/types/appBar.d.ts +2 -0
- package/types/image.d.ts +2 -1
- package/types/input.d.ts +2 -2
- package/types/styleVars.d.ts +4 -0
- package/types/uploader.d.ts +2 -2
- package/umd/varlet.js +6 -6
package/lib/varlet.cjs.js
CHANGED
|
@@ -45,6 +45,7 @@ var isEmpty = (val) => val === void 0 || val === null || val === "" || Array.isA
|
|
|
45
45
|
var isWindow = (val) => val === window;
|
|
46
46
|
var supportTouch = () => inBrowser() && "ontouchstart" in window;
|
|
47
47
|
var inBrowser = () => typeof window !== "undefined";
|
|
48
|
+
var inMobile = () => inBrowser() && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
48
49
|
var { hasOwnProperty } = Object.prototype;
|
|
49
50
|
var hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
50
51
|
var uniq = (arr) => [...new Set(arr)];
|
|
@@ -810,13 +811,16 @@ function setStyles(element) {
|
|
|
810
811
|
position === "static" && (element.style.position = "relative");
|
|
811
812
|
zIndex === "auto" && (element.style.zIndex = "1");
|
|
812
813
|
}
|
|
814
|
+
function isTouchEvent(event) {
|
|
815
|
+
return hasOwn(event, "touches");
|
|
816
|
+
}
|
|
813
817
|
function computeRippleStyles(element, event) {
|
|
814
818
|
const { top: top2, left: left2 } = getRect(element);
|
|
815
819
|
const { clientWidth, clientHeight } = element;
|
|
816
820
|
const radius = Math.sqrt(clientWidth ** 2 + clientHeight ** 2) / 2;
|
|
817
821
|
const size = radius * 2;
|
|
818
|
-
const localX = event.touches[0].clientX - left2;
|
|
819
|
-
const localY = event.touches[0].clientY - top2;
|
|
822
|
+
const localX = isTouchEvent(event) ? event.touches[0].clientX - left2 : clientWidth / 2;
|
|
823
|
+
const localY = isTouchEvent(event) ? event.touches[0].clientY - top2 : clientHeight / 2;
|
|
820
824
|
const centerX = (clientWidth - radius * 2) / 2;
|
|
821
825
|
const centerY = (clientHeight - radius * 2) / 2;
|
|
822
826
|
const x = localX - radius;
|
|
@@ -876,6 +880,21 @@ function forbidRippleTask() {
|
|
|
876
880
|
_ripple.tasker && window.clearTimeout(_ripple.tasker);
|
|
877
881
|
_ripple.tasker = null;
|
|
878
882
|
}
|
|
883
|
+
let hasKeyboardRipple = false;
|
|
884
|
+
function createKeyboardRipple(event) {
|
|
885
|
+
if (hasKeyboardRipple || !(event.key === " " || event.key === "Enter")) {
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
createRipple.call(this, event);
|
|
889
|
+
hasKeyboardRipple = true;
|
|
890
|
+
}
|
|
891
|
+
function removeKeyboardRipple() {
|
|
892
|
+
if (!hasKeyboardRipple) {
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
removeRipple.call(this);
|
|
896
|
+
hasKeyboardRipple = false;
|
|
897
|
+
}
|
|
879
898
|
function mounted$2(el, binding) {
|
|
880
899
|
var _a;
|
|
881
900
|
el._ripple = __spreadProps$8(__spreadValues$u({
|
|
@@ -886,6 +905,9 @@ function mounted$2(el, binding) {
|
|
|
886
905
|
el.addEventListener("touchstart", createRipple, { passive: true });
|
|
887
906
|
el.addEventListener("touchmove", forbidRippleTask, { passive: true });
|
|
888
907
|
el.addEventListener("dragstart", removeRipple, { passive: true });
|
|
908
|
+
el.addEventListener("keydown", createKeyboardRipple);
|
|
909
|
+
el.addEventListener("keyup", removeKeyboardRipple);
|
|
910
|
+
el.addEventListener("blur", removeKeyboardRipple);
|
|
889
911
|
document.addEventListener("touchend", el._ripple.removeRipple, { passive: true });
|
|
890
912
|
document.addEventListener("touchcancel", el._ripple.removeRipple, { passive: true });
|
|
891
913
|
document.addEventListener("dragend", el._ripple.removeRipple, { passive: true });
|
|
@@ -2188,7 +2210,12 @@ const props$1d = {
|
|
|
2188
2210
|
round: Boolean,
|
|
2189
2211
|
image: String,
|
|
2190
2212
|
imageLinearGradient: String,
|
|
2191
|
-
safeAreaTop: Boolean
|
|
2213
|
+
safeAreaTop: Boolean,
|
|
2214
|
+
zIndex: {
|
|
2215
|
+
type: [Number, String],
|
|
2216
|
+
default: 1
|
|
2217
|
+
},
|
|
2218
|
+
fixed: Boolean
|
|
2192
2219
|
};
|
|
2193
2220
|
const { name: name$1d, n: n$1k, classes: classes$16 } = createNamespace("app-bar");
|
|
2194
2221
|
function __render__$1k(_ctx, _cache) {
|
|
@@ -2201,6 +2228,7 @@ function __render__$1k(_ctx, _cache) {
|
|
|
2201
2228
|
_ctx.n("$--box"),
|
|
2202
2229
|
[_ctx.safeAreaTop, _ctx.n("--safe-area-top")],
|
|
2203
2230
|
[_ctx.round, _ctx.n("--round")],
|
|
2231
|
+
[_ctx.fixed, _ctx.n("--fixed")],
|
|
2204
2232
|
_ctx.formatElevation(_ctx.elevation, 3)
|
|
2205
2233
|
)
|
|
2206
2234
|
),
|
|
@@ -2308,18 +2336,20 @@ const __sfc__$1l = vue.defineComponent({
|
|
|
2308
2336
|
const paddingLeft = vue.ref();
|
|
2309
2337
|
const paddingRight = vue.ref();
|
|
2310
2338
|
const rootStyles = vue.computed(() => {
|
|
2311
|
-
const { image, color, textColor, imageLinearGradient } = props2;
|
|
2339
|
+
const { image, color, textColor, imageLinearGradient, zIndex } = props2;
|
|
2312
2340
|
if (image != null) {
|
|
2313
2341
|
const gradient = imageLinearGradient ? `linear-gradient(${imageLinearGradient}), ` : "";
|
|
2314
2342
|
return {
|
|
2315
2343
|
"background-image": `${gradient}url(${image})`,
|
|
2316
2344
|
"background-position": "center center",
|
|
2317
|
-
"background-size": "cover"
|
|
2345
|
+
"background-size": "cover",
|
|
2346
|
+
"z-index": zIndex
|
|
2318
2347
|
};
|
|
2319
2348
|
}
|
|
2320
2349
|
return {
|
|
2321
2350
|
background: color,
|
|
2322
|
-
color: textColor
|
|
2351
|
+
color: textColor,
|
|
2352
|
+
"z-index": zIndex
|
|
2323
2353
|
};
|
|
2324
2354
|
});
|
|
2325
2355
|
onSmartMounted(computePadding);
|
|
@@ -2652,6 +2682,7 @@ function __render__$1j(_ctx, _cache) {
|
|
|
2652
2682
|
[
|
|
2653
2683
|
_ctx.lazy ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("img", {
|
|
2654
2684
|
key: 0,
|
|
2685
|
+
role: "img",
|
|
2655
2686
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
2656
2687
|
src: _ctx.src,
|
|
2657
2688
|
alt: _ctx.alt,
|
|
@@ -2663,6 +2694,7 @@ function __render__$1j(_ctx, _cache) {
|
|
|
2663
2694
|
[_directive_lazy, _ctx.src]
|
|
2664
2695
|
]) : (vue.openBlock(), vue.createElementBlock("img", {
|
|
2665
2696
|
key: 1,
|
|
2697
|
+
role: "img",
|
|
2666
2698
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
2667
2699
|
src: _ctx.src,
|
|
2668
2700
|
alt: _ctx.alt,
|
|
@@ -2996,17 +3028,15 @@ withPropsDefaultsSetter(stdin_default$5z, props$1a);
|
|
|
2996
3028
|
const _LoadingComponent = stdin_default$5z;
|
|
2997
3029
|
var stdin_default$5y = stdin_default$5z;
|
|
2998
3030
|
const props$19 = {
|
|
2999
|
-
hovering:
|
|
3000
|
-
|
|
3001
|
-
default: true
|
|
3002
|
-
}
|
|
3031
|
+
hovering: Boolean,
|
|
3032
|
+
focusing: Boolean
|
|
3003
3033
|
};
|
|
3004
3034
|
const { name: name$19, n: n$1g, classes: classes$12 } = createNamespace("hover-overlay");
|
|
3005
3035
|
function __render__$1g(_ctx, _cache) {
|
|
3006
3036
|
return vue.openBlock(), vue.createElementBlock(
|
|
3007
3037
|
"div",
|
|
3008
3038
|
{
|
|
3009
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n(), [_ctx.hovering, _ctx.n("--hovering")]))
|
|
3039
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n(), [_ctx.hovering, _ctx.n("--hovering")], [_ctx.focusing, _ctx.n("--focusing")]))
|
|
3010
3040
|
},
|
|
3011
3041
|
null,
|
|
3012
3042
|
2
|
|
@@ -3041,11 +3071,10 @@ function shouldDisabled(arg) {
|
|
|
3041
3071
|
if (!arg) {
|
|
3042
3072
|
return false;
|
|
3043
3073
|
}
|
|
3044
|
-
|
|
3045
|
-
if (arg === "desktop" && isMobile) {
|
|
3074
|
+
if (arg === "desktop" && inMobile()) {
|
|
3046
3075
|
return true;
|
|
3047
3076
|
}
|
|
3048
|
-
if (arg === "mobile" && !
|
|
3077
|
+
if (arg === "mobile" && !inMobile()) {
|
|
3049
3078
|
return true;
|
|
3050
3079
|
}
|
|
3051
3080
|
return false;
|
|
@@ -3259,7 +3288,9 @@ function __render__$1f(_ctx, _cache) {
|
|
|
3259
3288
|
type: _ctx.nativeType,
|
|
3260
3289
|
disabled: _ctx.disabled,
|
|
3261
3290
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
3262
|
-
onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchstart && _ctx.handleTouchstart(...args))
|
|
3291
|
+
onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchstart && _ctx.handleTouchstart(...args)),
|
|
3292
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.isEffectFocusing = true),
|
|
3293
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.isEffectFocusing = false)
|
|
3263
3294
|
}, [
|
|
3264
3295
|
_ctx.loading || _ctx.pending ? (vue.openBlock(), vue.createBlock(_component_var_loading, {
|
|
3265
3296
|
key: 0,
|
|
@@ -3282,8 +3313,9 @@ function __render__$1f(_ctx, _cache) {
|
|
|
3282
3313
|
/* CLASS */
|
|
3283
3314
|
),
|
|
3284
3315
|
vue.createVNode(_component_var_hover_overlay, {
|
|
3285
|
-
hovering: _ctx.disabled || _ctx.loading || _ctx.pending ? false : _ctx.hovering
|
|
3286
|
-
|
|
3316
|
+
hovering: _ctx.disabled || _ctx.loading || _ctx.pending ? false : _ctx.hovering,
|
|
3317
|
+
focusing: _ctx.disabled || _ctx.loading || _ctx.pending ? false : _ctx.isEffectFocusing
|
|
3318
|
+
}, null, 8, ["hovering", "focusing"])
|
|
3287
3319
|
], 46, _hoisted_1$q)), [
|
|
3288
3320
|
[_directive_ripple, { disabled: _ctx.disabled || !_ctx.ripple || _ctx.loading || _ctx.pending }],
|
|
3289
3321
|
[_directive_hover, _ctx.handleHovering, "desktop"]
|
|
@@ -3298,6 +3330,7 @@ const __sfc__$1g = vue.defineComponent({
|
|
|
3298
3330
|
directives: { Ripple: stdin_default$5T, Hover: stdin_default$5v },
|
|
3299
3331
|
props: props$18,
|
|
3300
3332
|
setup(props2) {
|
|
3333
|
+
const isEffectFocusing = inMobile() ? vue.computed(() => false) : vue.ref(false);
|
|
3301
3334
|
const pending = vue.ref(false);
|
|
3302
3335
|
const { buttonGroup } = useButtonGroup();
|
|
3303
3336
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
@@ -3359,7 +3392,8 @@ const __sfc__$1g = vue.defineComponent({
|
|
|
3359
3392
|
classes: classes$11,
|
|
3360
3393
|
handleHovering,
|
|
3361
3394
|
handleClick,
|
|
3362
|
-
handleTouchstart
|
|
3395
|
+
handleTouchstart,
|
|
3396
|
+
isEffectFocusing
|
|
3363
3397
|
};
|
|
3364
3398
|
}
|
|
3365
3399
|
});
|
|
@@ -13440,6 +13474,7 @@ function usePopover(options) {
|
|
|
13440
13474
|
call(options["onUpdate:show"], false);
|
|
13441
13475
|
};
|
|
13442
13476
|
useClickOutside(getReference, "click", handleClickOutside);
|
|
13477
|
+
onWindowResize(resize);
|
|
13443
13478
|
vue.watch(() => [options.offsetX, options.offsetY, options.placement, options.strategy], resize);
|
|
13444
13479
|
vue.watch(() => options.disabled, close);
|
|
13445
13480
|
vue.onMounted(() => {
|
|
@@ -14589,6 +14624,7 @@ const props$F = {
|
|
|
14589
14624
|
},
|
|
14590
14625
|
alt: String,
|
|
14591
14626
|
title: String,
|
|
14627
|
+
referrerpolicy: String,
|
|
14592
14628
|
width: [String, Number],
|
|
14593
14629
|
height: [String, Number],
|
|
14594
14630
|
radius: {
|
|
@@ -14608,8 +14644,8 @@ const props$F = {
|
|
|
14608
14644
|
onError: defineListenerProp()
|
|
14609
14645
|
};
|
|
14610
14646
|
const { name: name$F, n: n$I, classes: classes$B } = createNamespace("image");
|
|
14611
|
-
const _hoisted_1$j = ["alt", "title", "lazy-loading", "lazy-error"];
|
|
14612
|
-
const _hoisted_2$c = ["alt", "title", "src"];
|
|
14647
|
+
const _hoisted_1$j = ["alt", "title", "referrerpolicy", "lazy-loading", "lazy-error"];
|
|
14648
|
+
const _hoisted_2$c = ["alt", "title", "referrerpolicy", "src"];
|
|
14613
14649
|
function __render__$J(_ctx, _cache) {
|
|
14614
14650
|
var _a;
|
|
14615
14651
|
const _directive_lazy = vue.resolveDirective("lazy");
|
|
@@ -14627,9 +14663,11 @@ function __render__$J(_ctx, _cache) {
|
|
|
14627
14663
|
[
|
|
14628
14664
|
_ctx.lazy && !_ctx.showErrorSlot ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("img", {
|
|
14629
14665
|
key: 0,
|
|
14666
|
+
role: "img",
|
|
14630
14667
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
14631
14668
|
alt: _ctx.alt,
|
|
14632
14669
|
title: _ctx.title,
|
|
14670
|
+
referrerpolicy: _ctx.referrerpolicy,
|
|
14633
14671
|
"lazy-loading": _ctx.loading,
|
|
14634
14672
|
"lazy-error": _ctx.error,
|
|
14635
14673
|
style: vue.normalizeStyle({ objectFit: _ctx.fit }),
|
|
@@ -14640,9 +14678,11 @@ function __render__$J(_ctx, _cache) {
|
|
|
14640
14678
|
]) : vue.createCommentVNode("v-if", true),
|
|
14641
14679
|
!_ctx.lazy && !_ctx.showErrorSlot ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
14642
14680
|
key: 1,
|
|
14681
|
+
role: "img",
|
|
14643
14682
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
14644
14683
|
alt: _ctx.alt,
|
|
14645
14684
|
title: _ctx.title,
|
|
14685
|
+
referrerpolicy: _ctx.referrerpolicy,
|
|
14646
14686
|
style: vue.normalizeStyle({ objectFit: _ctx.fit }),
|
|
14647
14687
|
src: _ctx.src,
|
|
14648
14688
|
onLoad: _cache[2] || (_cache[2] = (...args) => _ctx.handleLoad && _ctx.handleLoad(...args)),
|
|
@@ -15414,6 +15454,7 @@ function __render__$G(_ctx, _cache) {
|
|
|
15414
15454
|
onTouchcancel: _cache[2] || (_cache[2] = (...args) => _ctx.handleTouchcancel && _ctx.handleTouchcancel(...args))
|
|
15415
15455
|
}, [
|
|
15416
15456
|
vue.createElementVNode("img", {
|
|
15457
|
+
role: "img",
|
|
15417
15458
|
class: vue.normalizeClass(_ctx.classes(_ctx.n("image"), [_ctx.isPreventDefault, _ctx.n("--prevent")])),
|
|
15418
15459
|
src: image,
|
|
15419
15460
|
alt: image
|
|
@@ -17300,7 +17341,7 @@ var __spreadValues$8 = (a, b) => {
|
|
|
17300
17341
|
};
|
|
17301
17342
|
const props$t = __spreadValues$8({
|
|
17302
17343
|
modelValue: {
|
|
17303
|
-
type: [String, Number, Boolean],
|
|
17344
|
+
type: [String, Number, Boolean, Array],
|
|
17304
17345
|
default: void 0
|
|
17305
17346
|
},
|
|
17306
17347
|
size: {
|
|
@@ -20368,7 +20409,7 @@ var __spreadValues$6 = (a, b) => {
|
|
|
20368
20409
|
};
|
|
20369
20410
|
const props$g = __spreadValues$6({
|
|
20370
20411
|
modelValue: {
|
|
20371
|
-
type: [String, Number, Boolean],
|
|
20412
|
+
type: [String, Number, Boolean, Array],
|
|
20372
20413
|
default: void 0
|
|
20373
20414
|
},
|
|
20374
20415
|
multiple: Boolean,
|
|
@@ -23966,7 +24007,8 @@ var stdin_default$2r = {
|
|
|
23966
24007
|
"--form-details-message-margin-right": "4px"
|
|
23967
24008
|
};
|
|
23968
24009
|
var stdin_default$2q = {
|
|
23969
|
-
"--hover-overlay-opacity": "
|
|
24010
|
+
"--hover-overlay-opacity": "var(--opacity-hover)",
|
|
24011
|
+
"--hover-overlay-focusing-opacity": "var(--opacity-focus)"
|
|
23970
24012
|
};
|
|
23971
24013
|
var stdin_default$2p = {
|
|
23972
24014
|
"--icon-size": "20px"
|
|
@@ -24181,6 +24223,8 @@ var stdin_default$28 = __spreadValues$3(__spreadValues$3(__spreadValues$3(__spre
|
|
|
24181
24223
|
"--color-outline": "rgba(255, 255, 255, 0.2)",
|
|
24182
24224
|
"--color-on-surface-variant": "#fff",
|
|
24183
24225
|
"--opacity-disabled": "0.6",
|
|
24226
|
+
"--opacity-hover": "0.15",
|
|
24227
|
+
"--opacity-focus": "0.2",
|
|
24184
24228
|
"--cubic-bezier": "cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
24185
24229
|
"--shadow-key-umbra-opacity": "rgba(0, 0, 0, 0.2)",
|
|
24186
24230
|
"--shadow-key-penumbra-opacity": "rgba(0, 0, 0, 0.14)",
|
|
@@ -24229,7 +24273,8 @@ var stdin_default$27 = {
|
|
|
24229
24273
|
"--button-large-font-size": "var(--font-size-lg)"
|
|
24230
24274
|
};
|
|
24231
24275
|
var stdin_default$26 = {
|
|
24232
|
-
"--hover-overlay-opacity": "
|
|
24276
|
+
"--hover-overlay-opacity": "var(--opacity-hover)",
|
|
24277
|
+
"--hover-overlay-focusing-opacity": "var(--opacity-focus)"
|
|
24233
24278
|
};
|
|
24234
24279
|
var stdin_default$25 = {
|
|
24235
24280
|
"--menu-background-color": "var(--color-surface-container)",
|
|
@@ -25083,6 +25128,8 @@ var stdin_default$18 = __spreadValues$2(__spreadValues$2(__spreadValues$2(__spre
|
|
|
25083
25128
|
"--color-outline": "#CAC4D0",
|
|
25084
25129
|
"--color-on-surface-variant": "#49454F",
|
|
25085
25130
|
"--opacity-disabled": "0.6",
|
|
25131
|
+
"--opacity-hover": "0.12",
|
|
25132
|
+
"--opacity-focus": "0.2",
|
|
25086
25133
|
"--cubic-bezier": "cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
25087
25134
|
"--shadow-key-umbra-opacity": "rgba(0, 0, 0, 0.2)",
|
|
25088
25135
|
"--shadow-key-penumbra-opacity": "rgba(0, 0, 0, 0.14)",
|
|
@@ -25131,7 +25178,8 @@ var stdin_default$17 = {
|
|
|
25131
25178
|
"--button-large-font-size": "var(--font-size-lg)"
|
|
25132
25179
|
};
|
|
25133
25180
|
var stdin_default$16 = {
|
|
25134
|
-
"--hover-overlay-opacity": "
|
|
25181
|
+
"--hover-overlay-opacity": "var(--opacity-hover)",
|
|
25182
|
+
"--hover-overlay-focusing-opacity": "var(--opacity-focus)"
|
|
25135
25183
|
};
|
|
25136
25184
|
var stdin_default$15 = {
|
|
25137
25185
|
"--menu-background-color": "var(--color-surface-container)",
|
|
@@ -26003,6 +26051,8 @@ var stdin_default$8 = __spreadValues$1(__spreadValues$1(__spreadValues$1(__sprea
|
|
|
26003
26051
|
"--color-outline": "#49454F",
|
|
26004
26052
|
"--color-on-surface-variant": "#CAC4D0",
|
|
26005
26053
|
"--opacity-disabled": "0.6",
|
|
26054
|
+
"--opacity-hover": "0.12",
|
|
26055
|
+
"--opacity-focus": "0.2",
|
|
26006
26056
|
"--cubic-bezier": "cubic-bezier(0.25, 0.8, 0.5, 1)",
|
|
26007
26057
|
"--shadow-key-umbra-opacity": "rgba(0, 0, 0, 0.2)",
|
|
26008
26058
|
"--shadow-key-penumbra-opacity": "rgba(0, 0, 0, 0.14)",
|
|
@@ -27017,6 +27067,7 @@ function __render__$1(_ctx, _cache) {
|
|
|
27017
27067
|
], 10, _hoisted_2$1)) : vue.createCommentVNode("v-if", true),
|
|
27018
27068
|
f.cover ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
27019
27069
|
key: 1,
|
|
27070
|
+
role: "img",
|
|
27020
27071
|
class: vue.normalizeClass(_ctx.n("file-cover")),
|
|
27021
27072
|
style: vue.normalizeStyle({ objectFit: f.fit }),
|
|
27022
27073
|
src: f.cover,
|
|
@@ -27703,7 +27754,7 @@ withInstall(stdin_default$1);
|
|
|
27703
27754
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
27704
27755
|
const _WatermarkComponent = stdin_default$1;
|
|
27705
27756
|
var stdin_default = stdin_default$1;
|
|
27706
|
-
const version = "3.0.
|
|
27757
|
+
const version = "3.0.4";
|
|
27707
27758
|
function install(app) {
|
|
27708
27759
|
stdin_default$5H.install && app.use(stdin_default$5H);
|
|
27709
27760
|
stdin_default$5F.install && app.use(stdin_default$5F);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
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.0.
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/
|
|
51
|
+
"@varlet/icons": "3.0.4",
|
|
52
|
+
"@varlet/use": "3.0.4",
|
|
53
|
+
"@varlet/shared": "3.0.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.15",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.4.15",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/cli": "3.0.
|
|
70
|
-
"@varlet/ui": "3.0.
|
|
71
|
-
"@varlet/touch-emulator": "3.0.
|
|
69
|
+
"@varlet/cli": "3.0.4",
|
|
70
|
+
"@varlet/ui": "3.0.4",
|
|
71
|
+
"@varlet/touch-emulator": "3.0.4"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|
package/types/appBar.d.ts
CHANGED
package/types/image.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
|
|
2
|
-
import { VNode } from 'vue'
|
|
2
|
+
import { VNode, ImgHTMLAttributes } from 'vue'
|
|
3
3
|
|
|
4
4
|
export declare const imageProps: Record<keyof ImageProps, any>
|
|
5
5
|
|
|
@@ -10,6 +10,7 @@ export interface ImageProps extends BasicAttributes {
|
|
|
10
10
|
fit?: ImageFit
|
|
11
11
|
title?: string
|
|
12
12
|
alt?: string
|
|
13
|
+
referrerpolicy?: ImgHTMLAttributes['referrerpolicy']
|
|
13
14
|
width?: string | number
|
|
14
15
|
height?: string | number
|
|
15
16
|
radius?: string | number
|
package/types/input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VarComponent, BasicAttributes, ListenerProp, Variant as InputVariant, SetPropsDefaults } from './varComponent'
|
|
2
|
-
import { VNode } from 'vue'
|
|
2
|
+
import { VNode, InputHTMLAttributes } from 'vue'
|
|
3
3
|
|
|
4
4
|
export declare const inputProps: Record<keyof InputProps, any>
|
|
5
5
|
|
|
@@ -29,7 +29,7 @@ export interface InputProps extends BasicAttributes {
|
|
|
29
29
|
autofocus?: boolean
|
|
30
30
|
validateTrigger?: InputValidateTrigger[]
|
|
31
31
|
rules?: Array<(v: string) => any>
|
|
32
|
-
enterkeyhint?:
|
|
32
|
+
enterkeyhint?: InputHTMLAttributes['enterKeyHint']
|
|
33
33
|
onFocus?: ListenerProp<(e: Event) => void>
|
|
34
34
|
onBlur?: ListenerProp<(e: Event) => void>
|
|
35
35
|
onClick?: ListenerProp<(e: Event) => void>
|
package/types/styleVars.d.ts
CHANGED
|
@@ -1231,6 +1231,10 @@ export interface StyleVars {
|
|
|
1231
1231
|
colorOnSurfaceVariant?: string
|
|
1232
1232
|
'--opacity-disabled'?: string
|
|
1233
1233
|
opacityDisabled?: string
|
|
1234
|
+
'--opacity-hover'?: string
|
|
1235
|
+
opacityHover?: string
|
|
1236
|
+
'--opacity-focus'?: string
|
|
1237
|
+
opacityFocus?: string
|
|
1234
1238
|
'--cubic-bezier'?: string
|
|
1235
1239
|
cubicBezier?: string
|
|
1236
1240
|
'--shadow-key-umbra-opacity'?: string
|
package/types/uploader.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VarComponent, BasicAttributes, ListenerProp, SetPropsDefaults } from './varComponent'
|
|
2
|
-
import { VNode } from 'vue'
|
|
2
|
+
import { VNode, InputHTMLAttributes } from 'vue'
|
|
3
3
|
|
|
4
4
|
export declare const uploaderProps: Record<keyof UploaderProps, any>
|
|
5
5
|
|
|
@@ -33,7 +33,7 @@ export type UploaderCapture = boolean | 'user' | 'environment'
|
|
|
33
33
|
export interface UploaderProps extends BasicAttributes {
|
|
34
34
|
modelValue?: VarFile[]
|
|
35
35
|
accept?: string
|
|
36
|
-
capture?:
|
|
36
|
+
capture?: InputHTMLAttributes['capture']
|
|
37
37
|
multiple?: boolean
|
|
38
38
|
readonly?: boolean
|
|
39
39
|
disabled?: boolean
|