@varlet/ui 2.11.2 → 2.11.3-alpha.1685462737961
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/field-decorator/FieldDecorator.mjs +31 -48
- package/es/field-decorator/fieldDecorator.css +1 -1
- package/es/field-decorator/props.mjs +0 -4
- package/es/image/Image.mjs +40 -33
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +11 -9
- package/es/pull-refresh/PullRefresh.mjs +2 -2
- package/es/select/Select.mjs +44 -9
- package/es/select/select.css +1 -1
- package/es/slider/Slider.mjs +2 -2
- package/es/snackbar/style/index.mjs +1 -1
- package/es/sticky/Sticky.mjs +3 -3
- package/es/style.css +1 -1
- package/es/time-picker/TimePicker.mjs +2 -1
- package/es/time-picker/clock.mjs +2 -1
- package/es/varlet.esm.js +7012 -6994
- package/highlight/web-types.en-US.json +7 -2
- package/highlight/web-types.zh-CN.json +7 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +125 -105
- package/package.json +6 -6
- package/types/image.d.ts +5 -0
- package/umd/varlet.js +5 -5
package/lib/varlet.cjs.js
CHANGED
|
@@ -13913,7 +13913,7 @@ var {
|
|
|
13913
13913
|
n: n$H,
|
|
13914
13914
|
classes: classes$A
|
|
13915
13915
|
} = createNamespace("image");
|
|
13916
|
-
var _hoisted_1$j = ["alt", "title", "lazy-
|
|
13916
|
+
var _hoisted_1$j = ["alt", "title", "lazy-loading", "lazy-error"];
|
|
13917
13917
|
var _hoisted_2$b = ["alt", "title", "src"];
|
|
13918
13918
|
function __render__$I(_ctx, _cache) {
|
|
13919
13919
|
var _directive_lazy = vue.resolveDirective("lazy");
|
|
@@ -13925,35 +13925,32 @@ function __render__$I(_ctx, _cache) {
|
|
|
13925
13925
|
style: vue.normalizeStyle({
|
|
13926
13926
|
width: _ctx.toSizeUnit(_ctx.width),
|
|
13927
13927
|
height: _ctx.toSizeUnit(_ctx.height),
|
|
13928
|
-
|
|
13928
|
+
borderRadius: _ctx.toSizeUnit(_ctx.radius)
|
|
13929
13929
|
})
|
|
13930
13930
|
},
|
|
13931
|
-
[_ctx.lazy ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
13931
|
+
[_ctx.lazy && !_ctx.showErrorSlot ? vue.withDirectives((vue.openBlock(), vue.createElementBlock(
|
|
13932
13932
|
"img",
|
|
13933
13933
|
{
|
|
13934
13934
|
key: 0,
|
|
13935
13935
|
class: vue.normalizeClass(_ctx.n("image")),
|
|
13936
13936
|
alt: _ctx.alt,
|
|
13937
13937
|
title: _ctx.title,
|
|
13938
|
-
"lazy-error": _ctx.error,
|
|
13939
13938
|
"lazy-loading": _ctx.loading,
|
|
13939
|
+
"lazy-error": _ctx.error,
|
|
13940
13940
|
style: vue.normalizeStyle({
|
|
13941
13941
|
objectFit: _ctx.fit
|
|
13942
13942
|
}),
|
|
13943
13943
|
onLoad: _cache[0] || (_cache[0] = function() {
|
|
13944
13944
|
return _ctx.handleLoad && _ctx.handleLoad(...arguments);
|
|
13945
13945
|
}),
|
|
13946
|
-
|
|
13947
|
-
return _ctx.handleError && _ctx.handleError(...arguments);
|
|
13948
|
-
}),
|
|
13949
|
-
onClick: _cache[2] || (_cache[2] = function() {
|
|
13946
|
+
onClick: _cache[1] || (_cache[1] = function() {
|
|
13950
13947
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
13951
13948
|
})
|
|
13952
13949
|
},
|
|
13953
13950
|
null,
|
|
13954
13951
|
46,
|
|
13955
13952
|
_hoisted_1$j
|
|
13956
|
-
)), [[_directive_lazy, _ctx.src]]) : (vue.openBlock(), vue.createElementBlock(
|
|
13953
|
+
)), [[_directive_lazy, _ctx.src]]) : vue.createCommentVNode("v-if", true), !_ctx.lazy && !_ctx.showErrorSlot ? (vue.openBlock(), vue.createElementBlock(
|
|
13957
13954
|
"img",
|
|
13958
13955
|
{
|
|
13959
13956
|
key: 1,
|
|
@@ -13964,20 +13961,22 @@ function __render__$I(_ctx, _cache) {
|
|
|
13964
13961
|
objectFit: _ctx.fit
|
|
13965
13962
|
}),
|
|
13966
13963
|
src: _ctx.src,
|
|
13967
|
-
onLoad: _cache[
|
|
13964
|
+
onLoad: _cache[2] || (_cache[2] = function() {
|
|
13968
13965
|
return _ctx.handleLoad && _ctx.handleLoad(...arguments);
|
|
13969
13966
|
}),
|
|
13970
|
-
onError: _cache[
|
|
13967
|
+
onError: _cache[3] || (_cache[3] = function() {
|
|
13971
13968
|
return _ctx.handleError && _ctx.handleError(...arguments);
|
|
13972
13969
|
}),
|
|
13973
|
-
onClick: _cache[
|
|
13970
|
+
onClick: _cache[4] || (_cache[4] = function() {
|
|
13974
13971
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
13975
13972
|
})
|
|
13976
13973
|
},
|
|
13977
13974
|
null,
|
|
13978
13975
|
46,
|
|
13979
13976
|
_hoisted_2$b
|
|
13980
|
-
))
|
|
13977
|
+
)) : vue.createCommentVNode("v-if", true), _ctx.showErrorSlot ? vue.renderSlot(_ctx.$slots, "error", {
|
|
13978
|
+
key: 2
|
|
13979
|
+
}) : vue.createCommentVNode("v-if", true)],
|
|
13981
13980
|
6
|
|
13982
13981
|
/* CLASS, STYLE */
|
|
13983
13982
|
)), [[_directive_ripple, {
|
|
@@ -13991,34 +13990,39 @@ var __sfc__$J = vue.defineComponent({
|
|
|
13991
13990
|
Ripple: Ripple$1
|
|
13992
13991
|
},
|
|
13993
13992
|
props: props$E,
|
|
13994
|
-
setup(props2) {
|
|
13993
|
+
setup(props2, _ref) {
|
|
13994
|
+
var {
|
|
13995
|
+
slots
|
|
13996
|
+
} = _ref;
|
|
13997
|
+
var showErrorSlot = vue.ref(false);
|
|
13998
|
+
var handleError = (e) => {
|
|
13999
|
+
showErrorSlot.value = !!slots.error;
|
|
14000
|
+
call(props2.onError, e);
|
|
14001
|
+
};
|
|
13995
14002
|
var handleLoad = (e) => {
|
|
13996
14003
|
var el = e.currentTarget;
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14004
|
+
if (props2.lazy) {
|
|
14005
|
+
if (el._lazy.state === "success") {
|
|
14006
|
+
call(props2.onLoad, e);
|
|
14007
|
+
return;
|
|
14008
|
+
}
|
|
14009
|
+
if (el._lazy.state === "error") {
|
|
14010
|
+
handleError(e);
|
|
14011
|
+
}
|
|
14005
14012
|
} else {
|
|
14006
|
-
call(onLoad, e);
|
|
14013
|
+
call(props2.onLoad, e);
|
|
14007
14014
|
}
|
|
14008
14015
|
};
|
|
14009
|
-
var handleError = (e) => {
|
|
14010
|
-
var {
|
|
14011
|
-
lazy,
|
|
14012
|
-
onError
|
|
14013
|
-
} = props2;
|
|
14014
|
-
!lazy && call(onError, e);
|
|
14015
|
-
};
|
|
14016
14016
|
var handleClick = (e) => {
|
|
14017
14017
|
call(props2.onClick, e);
|
|
14018
14018
|
};
|
|
14019
|
+
vue.watch(() => props2.src, () => {
|
|
14020
|
+
showErrorSlot.value = false;
|
|
14021
|
+
});
|
|
14019
14022
|
return {
|
|
14020
14023
|
n: n$H,
|
|
14021
14024
|
classes: classes$A,
|
|
14025
|
+
showErrorSlot,
|
|
14022
14026
|
toSizeUnit,
|
|
14023
14027
|
handleLoad,
|
|
14024
14028
|
handleError,
|
|
@@ -15203,7 +15207,7 @@ var __sfc__$F = vue.defineComponent({
|
|
|
15203
15207
|
if (scroller !== window) {
|
|
15204
15208
|
var {
|
|
15205
15209
|
top: top2
|
|
15206
|
-
} = scroller
|
|
15210
|
+
} = getRect(scroller);
|
|
15207
15211
|
scrollerTop = top2;
|
|
15208
15212
|
}
|
|
15209
15213
|
var wrapper3 = wrapperEl.value;
|
|
@@ -15211,7 +15215,7 @@ var __sfc__$F = vue.defineComponent({
|
|
|
15211
15215
|
var {
|
|
15212
15216
|
top: stickyTop,
|
|
15213
15217
|
left: stickyLeft
|
|
15214
|
-
} = sticky2
|
|
15218
|
+
} = getRect(sticky2);
|
|
15215
15219
|
var currentOffsetTop = stickyTop - scrollerTop;
|
|
15216
15220
|
if (currentOffsetTop <= offsetTop.value) {
|
|
15217
15221
|
if (!cssMode) {
|
|
@@ -15793,10 +15797,6 @@ var props$y = {
|
|
|
15793
15797
|
type: Boolean,
|
|
15794
15798
|
default: false
|
|
15795
15799
|
},
|
|
15796
|
-
alwaysCustomPlaceholder: {
|
|
15797
|
-
type: Boolean,
|
|
15798
|
-
default: true
|
|
15799
|
-
},
|
|
15800
15800
|
onClick: defineListenerProp(),
|
|
15801
15801
|
onClear: defineListenerProp()
|
|
15802
15802
|
};
|
|
@@ -15819,7 +15819,6 @@ function __render__$B(_ctx, _cache) {
|
|
|
15819
15819
|
"div",
|
|
15820
15820
|
{
|
|
15821
15821
|
class: vue.normalizeClass(_ctx.classes(_ctx.n("controller"), [_ctx.isFocus, _ctx.n("--focus")], [_ctx.errorMessage, _ctx.n("--error")], [_ctx.formDisabled || _ctx.disabled, _ctx.n("--disabled")])),
|
|
15822
|
-
ref: "controllerEl",
|
|
15823
15822
|
style: vue.normalizeStyle({
|
|
15824
15823
|
color: _ctx.color,
|
|
15825
15824
|
cursor: _ctx.cursor,
|
|
@@ -15837,21 +15836,18 @@ function __render__$B(_ctx, _cache) {
|
|
|
15837
15836
|
), vue.createElementVNode(
|
|
15838
15837
|
"div",
|
|
15839
15838
|
{
|
|
15840
|
-
ref: "middleEl",
|
|
15841
15839
|
class: vue.normalizeClass(_ctx.classes(_ctx.n("middle"), [!_ctx.hint, _ctx.n("--middle-non-hint")]))
|
|
15842
15840
|
},
|
|
15843
15841
|
[vue.renderSlot(_ctx.$slots, "default")],
|
|
15844
15842
|
2
|
|
15845
15843
|
/* CLASS */
|
|
15846
|
-
),
|
|
15844
|
+
), _ctx.hint ? (vue.openBlock(), vue.createElementBlock(
|
|
15847
15845
|
"label",
|
|
15848
15846
|
{
|
|
15849
15847
|
key: 0,
|
|
15850
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n("placeholder"), _ctx.n("$--ellipsis"), [_ctx.isFocus, _ctx.n("--focus")], [_ctx.formDisabled || _ctx.disabled, _ctx.n("--disabled")], [_ctx.errorMessage, _ctx.n("--error")],
|
|
15848
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("placeholder"), _ctx.n("$--ellipsis"), [_ctx.isFocus, _ctx.n("--focus")], [_ctx.formDisabled || _ctx.disabled, _ctx.n("--disabled")], [_ctx.errorMessage, _ctx.n("--error")], _ctx.computePlaceholderState())),
|
|
15851
15849
|
style: vue.normalizeStyle({
|
|
15852
|
-
color: _ctx.color
|
|
15853
|
-
transform: _ctx.placeholderTransform,
|
|
15854
|
-
maxWidth: _ctx.placeholderMaxWidth
|
|
15850
|
+
color: _ctx.color
|
|
15855
15851
|
}),
|
|
15856
15852
|
for: _ctx.id
|
|
15857
15853
|
},
|
|
@@ -15864,16 +15860,6 @@ function __render__$B(_ctx, _cache) {
|
|
|
15864
15860
|
)],
|
|
15865
15861
|
14,
|
|
15866
15862
|
_hoisted_1$f
|
|
15867
|
-
)) : vue.createCommentVNode("v-if", true), _ctx.variant === "outlined" ? (vue.openBlock(), vue.createElementBlock(
|
|
15868
|
-
"span",
|
|
15869
|
-
{
|
|
15870
|
-
key: 1,
|
|
15871
|
-
ref: "placeholderTextEl",
|
|
15872
|
-
class: vue.normalizeClass([_ctx.n("placeholder-text"), _ctx.n("$--ellipsis")])
|
|
15873
|
-
},
|
|
15874
|
-
vue.toDisplayString(_ctx.placeholder),
|
|
15875
|
-
3
|
|
15876
|
-
/* TEXT, CLASS */
|
|
15877
15863
|
)) : vue.createCommentVNode("v-if", true), vue.createElementVNode(
|
|
15878
15864
|
"div",
|
|
15879
15865
|
{
|
|
@@ -15919,7 +15905,19 @@ function __render__$B(_ctx, _cache) {
|
|
|
15919
15905
|
width: _ctx.legendWidth
|
|
15920
15906
|
})
|
|
15921
15907
|
},
|
|
15922
|
-
|
|
15908
|
+
[_ctx.hint ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
15909
|
+
key: 0,
|
|
15910
|
+
to: "body"
|
|
15911
|
+
}, [vue.createElementVNode(
|
|
15912
|
+
"span",
|
|
15913
|
+
{
|
|
15914
|
+
ref: "placeholderTextEl",
|
|
15915
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("placeholder-text"), _ctx.n("$--ellipsis"), [_ctx.size === "small", _ctx.n("placeholder-text--small")]))
|
|
15916
|
+
},
|
|
15917
|
+
vue.toDisplayString(_ctx.placeholder),
|
|
15918
|
+
3
|
|
15919
|
+
/* TEXT, CLASS */
|
|
15920
|
+
)])) : vue.createCommentVNode("v-if", true)],
|
|
15923
15921
|
6
|
|
15924
15922
|
/* CLASS, STYLE */
|
|
15925
15923
|
)],
|
|
@@ -15962,15 +15960,14 @@ var __sfc__$C = vue.defineComponent({
|
|
|
15962
15960
|
VarIcon: Icon
|
|
15963
15961
|
},
|
|
15964
15962
|
props: props$y,
|
|
15965
|
-
setup(props2) {
|
|
15966
|
-
var
|
|
15967
|
-
|
|
15963
|
+
setup(props2, _ref) {
|
|
15964
|
+
var {
|
|
15965
|
+
slots
|
|
15966
|
+
} = _ref;
|
|
15968
15967
|
var placeholderTextEl = vue.ref(null);
|
|
15969
15968
|
var legendWidth = vue.ref("");
|
|
15970
|
-
var placeholderTransform = vue.ref("");
|
|
15971
|
-
var placeholderMaxWidth = vue.ref("");
|
|
15972
15969
|
var color = vue.computed(() => !props2.errorMessage ? props2.isFocus ? props2.focusColor : props2.blurColor : void 0);
|
|
15973
|
-
var isFloating = vue.computed(() => props2.hint && (!isEmpty(props2.value) || props2.isFocus));
|
|
15970
|
+
var isFloating = vue.computed(() => props2.hint && (!isEmpty(props2.value) || props2.isFocus || slots["prepend-icon"]));
|
|
15974
15971
|
var computePlaceholderState = () => {
|
|
15975
15972
|
var {
|
|
15976
15973
|
hint,
|
|
@@ -15980,33 +15977,23 @@ var __sfc__$C = vue.defineComponent({
|
|
|
15980
15977
|
if (!hint && (!isEmpty(value) || composing)) {
|
|
15981
15978
|
return n$A("--placeholder-hidden");
|
|
15982
15979
|
}
|
|
15980
|
+
if (isFloating.value) {
|
|
15981
|
+
return n$A("--placeholder-hint");
|
|
15982
|
+
}
|
|
15983
15983
|
};
|
|
15984
15984
|
var resize = () => {
|
|
15985
15985
|
var {
|
|
15986
15986
|
size,
|
|
15987
15987
|
hint,
|
|
15988
|
-
placeholder,
|
|
15989
15988
|
variant
|
|
15990
15989
|
} = props2;
|
|
15991
|
-
if (!
|
|
15992
|
-
|
|
15993
|
-
var middleRect = getRect(middleEl.value);
|
|
15994
|
-
var translateX = middleRect.left - controllerRect.left + "px";
|
|
15995
|
-
placeholderTransform.value = hint ? "translate(" + translateX + ", calc(var(--field-decorator-" + variant + "-" + size + "-placeholder-translate-y) + var(--field-decorator-middle-offset-y))) scale(1)" : "translate(" + translateX + ", -50%)";
|
|
15996
|
-
placeholderMaxWidth.value = middleRect.width + "px";
|
|
15990
|
+
if (!hint || variant !== "outlined") {
|
|
15991
|
+
legendWidth.value = "";
|
|
15997
15992
|
return;
|
|
15998
15993
|
}
|
|
15999
|
-
var
|
|
16000
|
-
var
|
|
16001
|
-
|
|
16002
|
-
if (variant === "outlined") {
|
|
16003
|
-
var placeholderTextStyle = getStyle$1(placeholderTextEl.value);
|
|
16004
|
-
var placeholderSpace = "var(--field-decorator-outlined-" + size + "-placeholder-space)";
|
|
16005
|
-
legendWidth.value = "calc(" + placeholderTextStyle.width + " * 0.75 + " + placeholderSpace + " * 2)";
|
|
16006
|
-
placeholderMaxWidth.value = "calc((100% - var(--field-decorator-outlined-" + size + "-padding-left) - var(--field-decorator-outlined-" + size + "-padding-right)) * 1.33)";
|
|
16007
|
-
} else {
|
|
16008
|
-
placeholderMaxWidth.value = "133%";
|
|
16009
|
-
}
|
|
15994
|
+
var placeholderTextStyle = getStyle$1(placeholderTextEl.value);
|
|
15995
|
+
var placeholderSpace = "var(--field-decorator-outlined-" + size + "-placeholder-space)";
|
|
15996
|
+
legendWidth.value = "calc(" + placeholderTextStyle.width + " * 0.75 + " + placeholderSpace + " * 2)";
|
|
16010
15997
|
};
|
|
16011
15998
|
var handleClear = (e) => {
|
|
16012
15999
|
call(props2.onClear, e);
|
|
@@ -16014,15 +16001,11 @@ var __sfc__$C = vue.defineComponent({
|
|
|
16014
16001
|
var handleClick = (e) => {
|
|
16015
16002
|
call(props2.onClick, e);
|
|
16016
16003
|
};
|
|
16017
|
-
vue.onUpdated(resize);
|
|
16018
16004
|
useMounted(resize);
|
|
16005
|
+
vue.watch(() => [props2.size, props2.hint, props2.variant], resize);
|
|
16019
16006
|
useEventListener(() => window, "resize", resize);
|
|
16020
16007
|
return {
|
|
16021
|
-
controllerEl,
|
|
16022
|
-
middleEl,
|
|
16023
16008
|
placeholderTextEl,
|
|
16024
|
-
placeholderTransform,
|
|
16025
|
-
placeholderMaxWidth,
|
|
16026
16009
|
color,
|
|
16027
16010
|
legendWidth,
|
|
16028
16011
|
isFloating,
|
|
@@ -16145,12 +16128,10 @@ function __render__$A(_ctx, _cache) {
|
|
|
16145
16128
|
clearable: _ctx.clearable,
|
|
16146
16129
|
cursor: _ctx.cursor,
|
|
16147
16130
|
composing: _ctx.isComposing,
|
|
16148
|
-
alwaysCustomPlaceholder: false,
|
|
16149
16131
|
onClick: _ctx.handleClick,
|
|
16150
16132
|
onClear: _ctx.handleClear
|
|
16151
16133
|
})),
|
|
16152
|
-
{
|
|
16153
|
-
"prepend-icon": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "prepend-icon")]),
|
|
16134
|
+
vue.createSlots({
|
|
16154
16135
|
"append-icon": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "append-icon")]),
|
|
16155
16136
|
default: vue.withCtx(() => [_ctx.normalizedType === "password" ? (vue.openBlock(), vue.createElementBlock(
|
|
16156
16137
|
"input",
|
|
@@ -16259,11 +16240,15 @@ function __render__$A(_ctx, _cache) {
|
|
|
16259
16240
|
46,
|
|
16260
16241
|
_hoisted_3$8
|
|
16261
16242
|
))]),
|
|
16262
|
-
_:
|
|
16263
|
-
/*
|
|
16264
|
-
},
|
|
16265
|
-
|
|
16266
|
-
|
|
16243
|
+
_: 2
|
|
16244
|
+
/* DYNAMIC */
|
|
16245
|
+
}, [_ctx.$slots["prepend-icon"] ? {
|
|
16246
|
+
name: "prepend-icon",
|
|
16247
|
+
fn: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "prepend-icon")]),
|
|
16248
|
+
key: "0"
|
|
16249
|
+
} : void 0]),
|
|
16250
|
+
1040
|
|
16251
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
16267
16252
|
), vue.createVNode(
|
|
16268
16253
|
_component_var_form_details,
|
|
16269
16254
|
{
|
|
@@ -19048,7 +19033,7 @@ var __sfc__$s = vue.defineComponent({
|
|
|
19048
19033
|
if (controlPosition.value === 0) {
|
|
19049
19034
|
var {
|
|
19050
19035
|
width
|
|
19051
|
-
} = controlNode.value
|
|
19036
|
+
} = getRect(controlNode.value);
|
|
19052
19037
|
controlPosition.value = -(width + width * 0.25);
|
|
19053
19038
|
}
|
|
19054
19039
|
startY = event.touches[0].clientY;
|
|
@@ -20438,8 +20423,7 @@ function __render__$f(_ctx, _cache) {
|
|
|
20438
20423
|
onClick: _ctx.handleClick,
|
|
20439
20424
|
onClear: _ctx.handleClear
|
|
20440
20425
|
})),
|
|
20441
|
-
{
|
|
20442
|
-
"prepend-icon": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "prepend-icon")]),
|
|
20426
|
+
vue.createSlots({
|
|
20443
20427
|
"append-icon": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "append-icon")]),
|
|
20444
20428
|
default: vue.withCtx(() => [vue.createElementVNode(
|
|
20445
20429
|
"div",
|
|
@@ -20524,7 +20508,19 @@ function __render__$f(_ctx, _cache) {
|
|
|
20524
20508
|
))]) : vue.createCommentVNode("v-if", true)],
|
|
20525
20509
|
2
|
|
20526
20510
|
/* CLASS */
|
|
20527
|
-
), vue.
|
|
20511
|
+
), _ctx.useCustomPlaceholder ? (vue.openBlock(), vue.createElementBlock(
|
|
20512
|
+
"span",
|
|
20513
|
+
{
|
|
20514
|
+
key: 0,
|
|
20515
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("placeholder"), _ctx.n("$--ellipsis"))),
|
|
20516
|
+
style: vue.normalizeStyle({
|
|
20517
|
+
color: _ctx.placeholderColor
|
|
20518
|
+
})
|
|
20519
|
+
},
|
|
20520
|
+
vue.toDisplayString(_ctx.placeholder),
|
|
20521
|
+
7
|
|
20522
|
+
/* TEXT, CLASS, STYLE */
|
|
20523
|
+
)) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "arrow-icon", {
|
|
20528
20524
|
focus: _ctx.isFocus
|
|
20529
20525
|
}, () => [vue.createVNode(
|
|
20530
20526
|
_component_var_icon,
|
|
@@ -20541,11 +20537,15 @@ function __render__$f(_ctx, _cache) {
|
|
|
20541
20537
|
6
|
|
20542
20538
|
/* CLASS, STYLE */
|
|
20543
20539
|
)]),
|
|
20544
|
-
_:
|
|
20545
|
-
/*
|
|
20546
|
-
},
|
|
20547
|
-
|
|
20548
|
-
|
|
20540
|
+
_: 2
|
|
20541
|
+
/* DYNAMIC */
|
|
20542
|
+
}, [_ctx.$slots["prepend-icon"] ? {
|
|
20543
|
+
name: "prepend-icon",
|
|
20544
|
+
fn: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "prepend-icon")]),
|
|
20545
|
+
key: "0"
|
|
20546
|
+
} : void 0]),
|
|
20547
|
+
1040
|
|
20548
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
20549
20549
|
)]),
|
|
20550
20550
|
_: 3
|
|
20551
20551
|
/* FORWARDED */
|
|
@@ -20604,6 +20604,24 @@ var __sfc__$g = vue.defineComponent({
|
|
|
20604
20604
|
} = useValidation();
|
|
20605
20605
|
var menuEl = vue.ref(null);
|
|
20606
20606
|
var placement = vue.computed(() => props2.variant === "outlined" ? "bottom-start" : "cover-top-start");
|
|
20607
|
+
var placeholderColor = vue.computed(() => {
|
|
20608
|
+
var {
|
|
20609
|
+
hint,
|
|
20610
|
+
blurColor,
|
|
20611
|
+
focusColor: focusColor2
|
|
20612
|
+
} = props2;
|
|
20613
|
+
if (hint) {
|
|
20614
|
+
return void 0;
|
|
20615
|
+
}
|
|
20616
|
+
if (errorMessage.value) {
|
|
20617
|
+
return "var(--field-decorator-error-color)";
|
|
20618
|
+
}
|
|
20619
|
+
if (isFocus.value) {
|
|
20620
|
+
return focusColor2 || "var(--field-decorator-focus-color)";
|
|
20621
|
+
}
|
|
20622
|
+
return blurColor || "var(--field-decorator-blur-color)";
|
|
20623
|
+
});
|
|
20624
|
+
var useCustomPlaceholder = vue.computed(() => !props2.hint && isEmpty(props2.modelValue) && !isFocus.value);
|
|
20607
20625
|
var computeLabel = () => {
|
|
20608
20626
|
var {
|
|
20609
20627
|
multiple: multiple2,
|
|
@@ -20818,6 +20836,8 @@ var __sfc__$g = vue.defineComponent({
|
|
|
20818
20836
|
menuEl,
|
|
20819
20837
|
placement,
|
|
20820
20838
|
cursor,
|
|
20839
|
+
placeholderColor,
|
|
20840
|
+
useCustomPlaceholder,
|
|
20821
20841
|
n: n$h,
|
|
20822
20842
|
classes: classes$d,
|
|
20823
20843
|
handleFocus,
|
|
@@ -21389,7 +21409,7 @@ var __sfc__$e = vue.defineComponent({
|
|
|
21389
21409
|
if (!isVertical.value) {
|
|
21390
21410
|
return e.clientX - getLeft(currentTarget);
|
|
21391
21411
|
}
|
|
21392
|
-
return maxDistance.value - (e.clientY - currentTarget
|
|
21412
|
+
return maxDistance.value - (e.clientY - getRect(currentTarget).top);
|
|
21393
21413
|
};
|
|
21394
21414
|
var thumbStyle = (thumb) => {
|
|
21395
21415
|
var key = isVertical.value ? "bottom" : "left";
|
|
@@ -24244,7 +24264,7 @@ var __sfc__$2 = vue.defineComponent({
|
|
|
24244
24264
|
var {
|
|
24245
24265
|
width,
|
|
24246
24266
|
height
|
|
24247
|
-
} = inner.value
|
|
24267
|
+
} = getRect(inner.value);
|
|
24248
24268
|
return {
|
|
24249
24269
|
width,
|
|
24250
24270
|
height
|
|
@@ -24698,7 +24718,7 @@ var __sfc__$1 = vue.defineComponent({
|
|
|
24698
24718
|
top: top2,
|
|
24699
24719
|
width,
|
|
24700
24720
|
height
|
|
24701
|
-
} = container.value
|
|
24721
|
+
} = getRect(container.value);
|
|
24702
24722
|
center.x = left2 + width / 2;
|
|
24703
24723
|
center.y = top2 + height / 2;
|
|
24704
24724
|
if (type.value === "hour" && props2.format === "24hr") {
|
|
@@ -25521,9 +25541,9 @@ const skeleton = "";
|
|
|
25521
25541
|
const SkeletonSfc = "";
|
|
25522
25542
|
const slider = "";
|
|
25523
25543
|
const SliderSfc = "";
|
|
25524
|
-
const SnackbarSfc = "";
|
|
25525
25544
|
const snackbar = "";
|
|
25526
25545
|
const coreSfc = "";
|
|
25546
|
+
const SnackbarSfc = "";
|
|
25527
25547
|
const space = "";
|
|
25528
25548
|
const step = "";
|
|
25529
25549
|
const StepSfc = "";
|
|
@@ -25548,7 +25568,7 @@ const TimePickerSfc = "";
|
|
|
25548
25568
|
const TooltipSfc = "";
|
|
25549
25569
|
const uploader = "";
|
|
25550
25570
|
const UploaderSfc = "";
|
|
25551
|
-
const version = "2.11.
|
|
25571
|
+
const version = "2.11.3-alpha.1685462737961";
|
|
25552
25572
|
function install(app) {
|
|
25553
25573
|
ActionSheet.install && app.use(ActionSheet);
|
|
25554
25574
|
AppBar.install && app.use(AppBar);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.3-alpha.1685462737961",
|
|
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/icons": "2.11.
|
|
50
|
-
"@varlet/shared": "2.11.
|
|
51
|
-
"@varlet/use": "2.11.
|
|
49
|
+
"@varlet/icons": "2.11.3-alpha.1685462737961",
|
|
50
|
+
"@varlet/shared": "2.11.3-alpha.1685462737961",
|
|
51
|
+
"@varlet/use": "2.11.3-alpha.1685462737961"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@vue/runtime-core": "3.3.1",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"typescript": "^4.4.4",
|
|
64
64
|
"vue": "3.3.2",
|
|
65
65
|
"vue-router": "4.2.0",
|
|
66
|
-
"@varlet/cli": "2.11.
|
|
67
|
-
"@varlet/touch-emulator": "2.11.
|
|
66
|
+
"@varlet/cli": "2.11.3-alpha.1685462737961",
|
|
67
|
+
"@varlet/touch-emulator": "2.11.3-alpha.1685462737961"
|
|
68
68
|
},
|
|
69
69
|
"browserslist": [
|
|
70
70
|
"Chrome >= 54",
|
package/types/image.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
|
|
2
|
+
import { VNode } from 'vue'
|
|
2
3
|
|
|
3
4
|
export declare const imageProps: Record<string, any>
|
|
4
5
|
|
|
@@ -24,6 +25,10 @@ export interface ImageProps extends BasicAttributes {
|
|
|
24
25
|
|
|
25
26
|
export class Image extends VarComponent {
|
|
26
27
|
$props: ImageProps
|
|
28
|
+
|
|
29
|
+
$slots: {
|
|
30
|
+
error(): VNode[]
|
|
31
|
+
}
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
export class _ImageComponent extends Image {}
|