@varlet/ui 2.10.1 → 2.10.2-alpha.1683284670321
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 +3 -2
- package/es/action-sheet/props.mjs +1 -1
- package/es/image-preview/imagePreview.css +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +14 -9
- package/es/input/props.mjs +4 -1
- package/es/picker/Picker.mjs +1 -0
- package/es/picker/props.mjs +1 -1
- package/es/popup/Popup.mjs +1 -1
- package/es/popup/popup.css +1 -1
- package/es/popup/props.mjs +8 -0
- package/es/style.css +1 -1
- package/es/varlet.esm.js +535 -516
- package/highlight/web-types.en-US.json +37 -1
- package/highlight/web-types.zh-CN.json +46 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +34 -15
- package/package.json +6 -6
- package/types/actionSheet.d.ts +2 -0
- package/types/input.d.ts +1 -0
- package/types/picker.d.ts +1 -0
- package/types/popup.d.ts +2 -0
- package/umd/varlet.js +5 -5
package/lib/varlet.cjs.js
CHANGED
|
@@ -1029,6 +1029,14 @@ var props$1a = {
|
|
|
1029
1029
|
type: Boolean,
|
|
1030
1030
|
default: true
|
|
1031
1031
|
},
|
|
1032
|
+
safeArea: {
|
|
1033
|
+
type: Boolean,
|
|
1034
|
+
default: false
|
|
1035
|
+
},
|
|
1036
|
+
safeAreaTop: {
|
|
1037
|
+
type: Boolean,
|
|
1038
|
+
default: false
|
|
1039
|
+
},
|
|
1032
1040
|
teleport: {
|
|
1033
1041
|
type: String
|
|
1034
1042
|
},
|
|
@@ -1190,7 +1198,7 @@ const Popup = vue.defineComponent({
|
|
|
1190
1198
|
};
|
|
1191
1199
|
var renderContent = () => {
|
|
1192
1200
|
return vue.createVNode("div", vue.mergeProps({
|
|
1193
|
-
"class": classes$14(n$1h("content"), n$1h("--" + props2.position), [props2.defaultStyle, n$1h("--content-background-color")], [props2.defaultStyle, n$1h("$-elevation--3")]),
|
|
1201
|
+
"class": classes$14(n$1h("content"), n$1h("--" + props2.position), [props2.defaultStyle, n$1h("--content-background-color")], [props2.defaultStyle, n$1h("$-elevation--3")], [props2.safeArea, n$1h("--safe-area")], [props2.safeAreaTop, n$1h("--safe-area-top")]),
|
|
1194
1202
|
"style": {
|
|
1195
1203
|
zIndex: zIndex.value
|
|
1196
1204
|
}
|
|
@@ -1405,6 +1413,7 @@ var props$18 = _extends$m({
|
|
|
1405
1413
|
"overlayStyle",
|
|
1406
1414
|
"lockScroll",
|
|
1407
1415
|
"closeOnClickOverlay",
|
|
1416
|
+
"safeArea",
|
|
1408
1417
|
"teleport",
|
|
1409
1418
|
"onOpen",
|
|
1410
1419
|
"onClose",
|
|
@@ -1705,13 +1714,14 @@ function __render__$1f(_ctx, _cache) {
|
|
|
1705
1714
|
vue.mergeProps({
|
|
1706
1715
|
class: _ctx.n("popup-radius"),
|
|
1707
1716
|
position: "bottom",
|
|
1717
|
+
show: _ctx.popupShow,
|
|
1708
1718
|
overlay: _ctx.overlay,
|
|
1709
1719
|
"overlay-class": _ctx.overlayClass,
|
|
1710
1720
|
"overlay-style": _ctx.overlayStyle,
|
|
1711
1721
|
"lock-scroll": _ctx.lockScroll,
|
|
1712
1722
|
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
1713
1723
|
teleport: _ctx.teleport,
|
|
1714
|
-
|
|
1724
|
+
"safe-area": _ctx.safeArea
|
|
1715
1725
|
}, {
|
|
1716
1726
|
"onUpdate:show": _ctx.handlePopupUpdateShow
|
|
1717
1727
|
}, {
|
|
@@ -1786,7 +1796,7 @@ function __render__$1f(_ctx, _cache) {
|
|
|
1786
1796
|
/* FORWARDED */
|
|
1787
1797
|
},
|
|
1788
1798
|
16,
|
|
1789
|
-
["class", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "
|
|
1799
|
+
["class", "show", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "teleport", "safe-area", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange"]
|
|
1790
1800
|
);
|
|
1791
1801
|
}
|
|
1792
1802
|
var __sfc__$1g = vue.defineComponent({
|
|
@@ -15998,7 +16008,7 @@ function _extends$5() {
|
|
|
15998
16008
|
return _extends$5.apply(this, arguments);
|
|
15999
16009
|
}
|
|
16000
16010
|
function typeValidator$3(type) {
|
|
16001
|
-
return ["text", "password", "number"].includes(type);
|
|
16011
|
+
return ["text", "password", "number", "tel", "email"].includes(type);
|
|
16002
16012
|
}
|
|
16003
16013
|
var props$x = _extends$5({
|
|
16004
16014
|
modelValue: {
|
|
@@ -16043,6 +16053,9 @@ var props$x = _extends$5({
|
|
|
16043
16053
|
rules: {
|
|
16044
16054
|
type: Array
|
|
16045
16055
|
},
|
|
16056
|
+
enterkeyhint: {
|
|
16057
|
+
type: String
|
|
16058
|
+
},
|
|
16046
16059
|
onFocus: defineListenerProp(),
|
|
16047
16060
|
onBlur: defineListenerProp(),
|
|
16048
16061
|
onInput: defineListenerProp(),
|
|
@@ -16054,9 +16067,9 @@ var {
|
|
|
16054
16067
|
n: n$z,
|
|
16055
16068
|
classes: classes$t
|
|
16056
16069
|
} = createNamespace("input");
|
|
16057
|
-
var _hoisted_1$e = ["placeholder"];
|
|
16058
|
-
var _hoisted_2$9 = ["id", "disabled", "type", "value", "placeholder", "maxlength", "rows"];
|
|
16059
|
-
var _hoisted_3$7 = ["id", "disabled", "type", "value", "placeholder", "maxlength"];
|
|
16070
|
+
var _hoisted_1$e = ["placeholder", "enterkeyhint"];
|
|
16071
|
+
var _hoisted_2$9 = ["id", "disabled", "type", "value", "placeholder", "maxlength", "rows", "enterkeyhint", "inputmode"];
|
|
16072
|
+
var _hoisted_3$7 = ["id", "disabled", "type", "value", "placeholder", "maxlength", "enterkeyhint", "inputmode"];
|
|
16060
16073
|
function __render__$A(_ctx, _cache) {
|
|
16061
16074
|
var _component_var_field_decorator = vue.resolveComponent("var-field-decorator");
|
|
16062
16075
|
var _component_var_form_details = vue.resolveComponent("var-form-details");
|
|
@@ -16095,7 +16108,7 @@ function __render__$A(_ctx, _cache) {
|
|
|
16095
16108
|
{
|
|
16096
16109
|
"prepend-icon": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "prepend-icon")]),
|
|
16097
16110
|
"append-icon": vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "append-icon")]),
|
|
16098
|
-
default: vue.withCtx(() => [_ctx.
|
|
16111
|
+
default: vue.withCtx(() => [_ctx.normalizedType === "password" ? (vue.openBlock(), vue.createElementBlock(
|
|
16099
16112
|
"input",
|
|
16100
16113
|
{
|
|
16101
16114
|
key: 0,
|
|
@@ -16103,7 +16116,8 @@ function __render__$A(_ctx, _cache) {
|
|
|
16103
16116
|
placeholder: !_ctx.hint ? _ctx.placeholder : void 0,
|
|
16104
16117
|
style: vue.normalizeStyle({
|
|
16105
16118
|
"--input-placeholder-color": _ctx.placeholderColor
|
|
16106
|
-
})
|
|
16119
|
+
}),
|
|
16120
|
+
enterkeyhint: _ctx.enterkeyhint
|
|
16107
16121
|
},
|
|
16108
16122
|
null,
|
|
16109
16123
|
14,
|
|
@@ -16117,11 +16131,13 @@ function __render__$A(_ctx, _cache) {
|
|
|
16117
16131
|
autocomplete: "new-password",
|
|
16118
16132
|
id: _ctx.id,
|
|
16119
16133
|
disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
|
|
16120
|
-
type: _ctx.
|
|
16134
|
+
type: _ctx.normalizedType,
|
|
16121
16135
|
value: _ctx.modelValue,
|
|
16122
16136
|
placeholder: !_ctx.hint ? _ctx.placeholder : void 0,
|
|
16123
16137
|
maxlength: _ctx.maxlength,
|
|
16124
16138
|
rows: _ctx.rows,
|
|
16139
|
+
enterkeyhint: _ctx.enterkeyhint,
|
|
16140
|
+
inputmode: _ctx.type === "number" ? "numeric" : void 0,
|
|
16125
16141
|
style: vue.normalizeStyle({
|
|
16126
16142
|
color: !_ctx.errorMessage ? _ctx.textColor : void 0,
|
|
16127
16143
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : void 0,
|
|
@@ -16162,10 +16178,12 @@ function __render__$A(_ctx, _cache) {
|
|
|
16162
16178
|
autocomplete: "new-password",
|
|
16163
16179
|
id: _ctx.id,
|
|
16164
16180
|
disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
|
|
16165
|
-
type: _ctx.
|
|
16181
|
+
type: _ctx.normalizedType,
|
|
16166
16182
|
value: _ctx.modelValue,
|
|
16167
16183
|
placeholder: !_ctx.hint ? _ctx.placeholder : void 0,
|
|
16168
16184
|
maxlength: _ctx.maxlength,
|
|
16185
|
+
enterkeyhint: _ctx.enterkeyhint,
|
|
16186
|
+
inputmode: _ctx.type === "number" ? "numeric" : void 0,
|
|
16169
16187
|
style: vue.normalizeStyle({
|
|
16170
16188
|
color: !_ctx.errorMessage ? _ctx.textColor : void 0,
|
|
16171
16189
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : void 0,
|
|
@@ -16230,7 +16248,7 @@ var __sfc__$B = vue.defineComponent({
|
|
|
16230
16248
|
var el = vue.ref(null);
|
|
16231
16249
|
var isFocus = vue.ref(false);
|
|
16232
16250
|
var isComposing = vue.ref(false);
|
|
16233
|
-
var
|
|
16251
|
+
var normalizedType = vue.computed(() => {
|
|
16234
16252
|
if (props2.type === "number") {
|
|
16235
16253
|
return "text";
|
|
16236
16254
|
}
|
|
@@ -16420,7 +16438,7 @@ var __sfc__$B = vue.defineComponent({
|
|
|
16420
16438
|
isComposing,
|
|
16421
16439
|
errorMessage,
|
|
16422
16440
|
placeholderColor,
|
|
16423
|
-
|
|
16441
|
+
normalizedType,
|
|
16424
16442
|
cursor,
|
|
16425
16443
|
maxlengthText,
|
|
16426
16444
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
@@ -17948,7 +17966,7 @@ var props$n = _extends$4({
|
|
|
17948
17966
|
onChange: defineListenerProp(),
|
|
17949
17967
|
onConfirm: defineListenerProp(),
|
|
17950
17968
|
onCancel: defineListenerProp()
|
|
17951
|
-
}, pickProps(props$1a, ["show", "onUpdate:show", "closeOnClickOverlay", "teleport", "onOpen", "onClose", "onOpened", "onClosed", "onClickOverlay", "onRouteChange"]));
|
|
17969
|
+
}, pickProps(props$1a, ["show", "onUpdate:show", "closeOnClickOverlay", "teleport", "safeArea", "onOpen", "onClose", "onOpened", "onClosed", "onClickOverlay", "onRouteChange"]));
|
|
17952
17970
|
var {
|
|
17953
17971
|
n: n$q,
|
|
17954
17972
|
classes: classes$l
|
|
@@ -17972,6 +17990,7 @@ function __render__$t(_ctx, _cache) {
|
|
|
17972
17990
|
closeOnClickOverlay: _ctx.closeOnClickOverlay,
|
|
17973
17991
|
teleport: _ctx.teleport,
|
|
17974
17992
|
show: _ctx.show,
|
|
17993
|
+
safeArea: _ctx.safeArea,
|
|
17975
17994
|
"onUpdate:show": _ctx.handlePopupUpdateShow,
|
|
17976
17995
|
position: "bottom",
|
|
17977
17996
|
class: _ctx.n("popup")
|
|
@@ -25383,7 +25402,7 @@ const TimePickerSfc = "";
|
|
|
25383
25402
|
const TooltipSfc = "";
|
|
25384
25403
|
const uploader = "";
|
|
25385
25404
|
const UploaderSfc = "";
|
|
25386
|
-
const version = "2.10.
|
|
25405
|
+
const version = "2.10.2-alpha.1683284670321";
|
|
25387
25406
|
function install(app) {
|
|
25388
25407
|
ActionSheet.install && app.use(ActionSheet);
|
|
25389
25408
|
AppBar.install && app.use(AppBar);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2-alpha.1683284670321",
|
|
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.10.
|
|
50
|
-
"@varlet/shared": "2.10.
|
|
51
|
-
"@varlet/use": "2.10.
|
|
49
|
+
"@varlet/icons": "2.10.2-alpha.1683284670321",
|
|
50
|
+
"@varlet/shared": "2.10.2-alpha.1683284670321",
|
|
51
|
+
"@varlet/use": "2.10.2-alpha.1683284670321"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/jest": "^26.0.15",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"typescript": "^4.4.4",
|
|
64
64
|
"vue": "3.2.47",
|
|
65
65
|
"vue-router": "4.1.6",
|
|
66
|
-
"@varlet/cli": "2.10.
|
|
67
|
-
"@varlet/touch-emulator": "2.10.
|
|
66
|
+
"@varlet/cli": "2.10.2-alpha.1683284670321",
|
|
67
|
+
"@varlet/touch-emulator": "2.10.2-alpha.1683284670321"
|
|
68
68
|
},
|
|
69
69
|
"browserslist": [
|
|
70
70
|
"Chrome >= 54",
|
package/types/actionSheet.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface ActionSheetProps extends BasicAttributes {
|
|
|
13
13
|
lockScroll?: boolean
|
|
14
14
|
closeOnClickAction?: boolean
|
|
15
15
|
closeOnClickOverlay?: boolean
|
|
16
|
+
safeArea?: boolean
|
|
16
17
|
teleport?: TeleportProps['to']
|
|
17
18
|
onOpen?: ListenerProp<() => void>
|
|
18
19
|
onOpened?: ListenerProp<() => void>
|
|
@@ -41,6 +42,7 @@ export interface ActionSheetOptions {
|
|
|
41
42
|
lockScroll?: boolean
|
|
42
43
|
closeOnClickAction?: boolean
|
|
43
44
|
closeOnClickOverlay?: boolean
|
|
45
|
+
safeArea?: boolean
|
|
44
46
|
onOpen?: () => void
|
|
45
47
|
onOpened?: () => void
|
|
46
48
|
onClose?: () => void
|
package/types/input.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface InputProps extends BasicAttributes {
|
|
|
29
29
|
autofocus?: boolean
|
|
30
30
|
validateTrigger?: InputValidateTrigger[]
|
|
31
31
|
rules?: Array<(v: string) => any>
|
|
32
|
+
enterkeyhint?: string
|
|
32
33
|
onFocus?: ListenerProp<(e: Event) => void>
|
|
33
34
|
onBlur?: ListenerProp<(e: Event) => void>
|
|
34
35
|
onClick?: ListenerProp<(e: Event) => void>
|
package/types/picker.d.ts
CHANGED
package/types/popup.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface PopupProps extends BasicAttributes {
|
|
|
14
14
|
lockScroll?: boolean
|
|
15
15
|
closeOnClickOverlay?: boolean
|
|
16
16
|
defaultStyle?: boolean
|
|
17
|
+
safeArea?: boolean
|
|
18
|
+
safeAreaTop?: boolean
|
|
17
19
|
teleport?: TeleportProps['to']
|
|
18
20
|
onOpen?: ListenerProp<() => void>
|
|
19
21
|
onOpened?: ListenerProp<() => void>
|