@varlet/ui 2.10.2-alpha.1683283732565 → 2.10.2-alpha.1683285148722
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/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/popup/popup.css +1 -1
- package/es/style.css +1 -1
- package/es/varlet.esm.js +16 -8
- package/highlight/web-types.en-US.json +10 -1
- package/highlight/web-types.zh-CN.json +10 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +19 -11
- package/package.json +6 -6
- package/types/input.d.ts +1 -0
- package/umd/varlet.js +4 -4
package/es/index.bundle.mjs
CHANGED
|
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
|
|
|
241
241
|
import './tooltip/style/index.mjs'
|
|
242
242
|
import './uploader/style/index.mjs'
|
|
243
243
|
|
|
244
|
-
const version = '2.10.2-alpha.
|
|
244
|
+
const version = '2.10.2-alpha.1683285148722'
|
|
245
245
|
|
|
246
246
|
function install(app) {
|
|
247
247
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
|
|
|
160
160
|
export * from './tooltip/index.mjs'
|
|
161
161
|
export * from './uploader/index.mjs'
|
|
162
162
|
|
|
163
|
-
const version = '2.10.2-alpha.
|
|
163
|
+
const version = '2.10.2-alpha.1683285148722'
|
|
164
164
|
|
|
165
165
|
function install(app) {
|
|
166
166
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/input/Input.mjs
CHANGED
|
@@ -14,9 +14,9 @@ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalize
|
|
|
14
14
|
|
|
15
15
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
16
16
|
|
|
17
|
-
var _hoisted_1 = ["placeholder"];
|
|
18
|
-
var _hoisted_2 = ["id", "disabled", "type", "value", "placeholder", "maxlength", "rows"];
|
|
19
|
-
var _hoisted_3 = ["id", "disabled", "type", "value", "placeholder", "maxlength"];
|
|
17
|
+
var _hoisted_1 = ["placeholder", "enterkeyhint"];
|
|
18
|
+
var _hoisted_2 = ["id", "disabled", "type", "value", "placeholder", "maxlength", "rows", "enterkeyhint", "inputmode"];
|
|
19
|
+
var _hoisted_3 = ["id", "disabled", "type", "value", "placeholder", "maxlength", "enterkeyhint", "inputmode"];
|
|
20
20
|
|
|
21
21
|
function __render__(_ctx, _cache) {
|
|
22
22
|
var _component_var_field_decorator = _resolveComponent("var-field-decorator");
|
|
@@ -52,13 +52,14 @@ function __render__(_ctx, _cache) {
|
|
|
52
52
|
})), {
|
|
53
53
|
"prepend-icon": _withCtx(() => [_renderSlot(_ctx.$slots, "prepend-icon")]),
|
|
54
54
|
"append-icon": _withCtx(() => [_renderSlot(_ctx.$slots, "append-icon")]),
|
|
55
|
-
default: _withCtx(() => [_ctx.
|
|
55
|
+
default: _withCtx(() => [_ctx.normalizedType === 'password' ? (_openBlock(), _createElementBlock("input", {
|
|
56
56
|
key: 0,
|
|
57
57
|
class: _normalizeClass(_ctx.n('autocomplete')),
|
|
58
58
|
placeholder: !_ctx.hint ? _ctx.placeholder : undefined,
|
|
59
59
|
style: _normalizeStyle({
|
|
60
60
|
'--input-placeholder-color': _ctx.placeholderColor
|
|
61
|
-
})
|
|
61
|
+
}),
|
|
62
|
+
enterkeyhint: _ctx.enterkeyhint
|
|
62
63
|
}, null, 14
|
|
63
64
|
/* CLASS, STYLE, PROPS */
|
|
64
65
|
, _hoisted_1)) : _createCommentVNode("v-if", true), _ctx.textarea ? (_openBlock(), _createElementBlock("textarea", {
|
|
@@ -68,11 +69,13 @@ function __render__(_ctx, _cache) {
|
|
|
68
69
|
autocomplete: "new-password",
|
|
69
70
|
id: _ctx.id,
|
|
70
71
|
disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
|
|
71
|
-
type: _ctx.
|
|
72
|
+
type: _ctx.normalizedType,
|
|
72
73
|
value: _ctx.modelValue,
|
|
73
74
|
placeholder: !_ctx.hint ? _ctx.placeholder : undefined,
|
|
74
75
|
maxlength: _ctx.maxlength,
|
|
75
76
|
rows: _ctx.rows,
|
|
77
|
+
enterkeyhint: _ctx.enterkeyhint,
|
|
78
|
+
inputmode: _ctx.type === 'number' ? 'numeric' : undefined,
|
|
76
79
|
style: _normalizeStyle({
|
|
77
80
|
color: !_ctx.errorMessage ? _ctx.textColor : undefined,
|
|
78
81
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : undefined,
|
|
@@ -109,10 +112,12 @@ function __render__(_ctx, _cache) {
|
|
|
109
112
|
autocomplete: "new-password",
|
|
110
113
|
id: _ctx.id,
|
|
111
114
|
disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
|
|
112
|
-
type: _ctx.
|
|
115
|
+
type: _ctx.normalizedType,
|
|
113
116
|
value: _ctx.modelValue,
|
|
114
117
|
placeholder: !_ctx.hint ? _ctx.placeholder : undefined,
|
|
115
118
|
maxlength: _ctx.maxlength,
|
|
119
|
+
enterkeyhint: _ctx.enterkeyhint,
|
|
120
|
+
inputmode: _ctx.type === 'number' ? 'numeric' : undefined,
|
|
116
121
|
style: _normalizeStyle({
|
|
117
122
|
color: !_ctx.errorMessage ? _ctx.textColor : undefined,
|
|
118
123
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : undefined,
|
|
@@ -171,7 +176,7 @@ var __sfc__ = defineComponent({
|
|
|
171
176
|
var el = ref(null);
|
|
172
177
|
var isFocus = ref(false);
|
|
173
178
|
var isComposing = ref(false);
|
|
174
|
-
var
|
|
179
|
+
var normalizedType = computed(() => {
|
|
175
180
|
if (props.type === 'number') {
|
|
176
181
|
return 'text';
|
|
177
182
|
}
|
|
@@ -411,7 +416,7 @@ var __sfc__ = defineComponent({
|
|
|
411
416
|
isComposing,
|
|
412
417
|
errorMessage,
|
|
413
418
|
placeholderColor,
|
|
414
|
-
|
|
419
|
+
normalizedType,
|
|
415
420
|
cursor,
|
|
416
421
|
maxlengthText,
|
|
417
422
|
formDisabled: form == null ? void 0 : form.disabled,
|
package/es/input/props.mjs
CHANGED
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
3
3
|
import { defineListenerProp, pickProps } from '../utils/components.mjs';
|
|
4
4
|
import { props as fieldDecoratorProps } from '../field-decorator/props.mjs';
|
|
5
5
|
export function typeValidator(type) {
|
|
6
|
-
return ['text', 'password', 'number'].includes(type);
|
|
6
|
+
return ['text', 'password', 'number', 'tel', 'email'].includes(type);
|
|
7
7
|
}
|
|
8
8
|
export var props = _extends({
|
|
9
9
|
modelValue: {
|
|
@@ -48,6 +48,9 @@ export var props = _extends({
|
|
|
48
48
|
rules: {
|
|
49
49
|
type: Array
|
|
50
50
|
},
|
|
51
|
+
enterkeyhint: {
|
|
52
|
+
type: String
|
|
53
|
+
},
|
|
51
54
|
onFocus: defineListenerProp(),
|
|
52
55
|
onBlur: defineListenerProp(),
|
|
53
56
|
onInput: defineListenerProp(),
|
package/es/popup/popup.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --popup-content-background-color: #fff; --popup-overlay-background-color: rgba(0, 0, 0, 0.6);}.var-fade-enter-from,.var-fade-leave-to { opacity: 0;}.var-fade-enter-active,.var-fade-leave-active { transition: opacity 0.25s;}.var-pop-center-enter-from,.var-pop-center-leave-to { transform: scale(0.3);}.var-pop-center-enter-active,.var-pop-center-leave-active { transition: all 0.25s;}.var-pop-bottom-enter-from,.var-pop-bottom-leave-to { transform: translateY(100%);}.var-pop-bottom-enter-active,.var-pop-bottom-leave-active { transition: all 0.25s;}.var-pop-top-enter-from,.var-pop-top-leave-to { transform: translateY(-100%);}.var-pop-top-enter-active,.var-pop-top-leave-active { transition: all 0.25s;}.var-pop-left-enter-from,.var-pop-left-leave-to { transform: translateX(-100%);}.var-pop-left-enter-active,.var-pop-left-leave-active { transition: all 0.25s;}.var-pop-right-enter-from,.var-pop-right-leave-to { transform: translateX(100%);}.var-pop-right-enter-active,.var-pop-right-leave-active { transition: all 0.25s;}.var-popup { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: auto;}.var-popup__overlay { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: var(--popup-overlay-background-color); transition: all 0.25s;}.var-popup__content { overflow: auto; transition: all 0.25s;}.var-popup--content-background-color { background-color: var(--popup-content-background-color);}.var-popup--center { position: relative;}.var-popup--bottom { min-width: 100%; position: absolute; left: 0; bottom: 0;}.var-popup--top { min-width: 100%; position: absolute; left: 0; top: 0;}.var-popup--left { min-height: 100%; position: absolute; left: 0; top: 0;}.var-popup--right { min-height: 100%; position: absolute; right: 0; top: 0;}.var-popup--safe-area { padding-bottom: constant(safe-area-inset-
|
|
1
|
+
:root { --popup-content-background-color: #fff; --popup-overlay-background-color: rgba(0, 0, 0, 0.6);}.var-fade-enter-from,.var-fade-leave-to { opacity: 0;}.var-fade-enter-active,.var-fade-leave-active { transition: opacity 0.25s;}.var-pop-center-enter-from,.var-pop-center-leave-to { transform: scale(0.3);}.var-pop-center-enter-active,.var-pop-center-leave-active { transition: all 0.25s;}.var-pop-bottom-enter-from,.var-pop-bottom-leave-to { transform: translateY(100%);}.var-pop-bottom-enter-active,.var-pop-bottom-leave-active { transition: all 0.25s;}.var-pop-top-enter-from,.var-pop-top-leave-to { transform: translateY(-100%);}.var-pop-top-enter-active,.var-pop-top-leave-active { transition: all 0.25s;}.var-pop-left-enter-from,.var-pop-left-leave-to { transform: translateX(-100%);}.var-pop-left-enter-active,.var-pop-left-leave-active { transition: all 0.25s;}.var-pop-right-enter-from,.var-pop-right-leave-to { transform: translateX(100%);}.var-pop-right-enter-active,.var-pop-right-leave-active { transition: all 0.25s;}.var-popup { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: auto;}.var-popup__overlay { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: var(--popup-overlay-background-color); transition: all 0.25s;}.var-popup__content { overflow: auto; transition: all 0.25s;}.var-popup--content-background-color { background-color: var(--popup-content-background-color);}.var-popup--center { position: relative;}.var-popup--bottom { min-width: 100%; position: absolute; left: 0; bottom: 0;}.var-popup--top { min-width: 100%; position: absolute; left: 0; top: 0;}.var-popup--left { min-height: 100%; position: absolute; left: 0; top: 0;}.var-popup--right { min-height: 100%; position: absolute; right: 0; top: 0;}.var-popup--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);}.var-popup--safe-area-top { padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top);}
|