@opentinyvue/vue-input 2.22.0 → 3.22.0

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/lib/pc.js CHANGED
@@ -3,6 +3,7 @@ import { defineComponent, $prefix, setup, directive, props } from '@opentinyvue/
3
3
  import { Clickoutside } from '@opentinyvue/vue-directive';
4
4
  import { renderless, api } from '@opentinyvue/vue-renderless/tall-storage/vue';
5
5
  import '@opentinyvue/vue-theme/tall-storage/index.css';
6
+ import { openBlock, createElementBlock, createElementVNode, withKeys, Fragment, renderList, normalizeClass, toDisplayString, resolveComponent, resolveDirective, mergeProps, renderSlot, createCommentVNode, createBlock, withCtx, resolveDynamicComponent, createVNode, Transition, withModifiers, createTextVNode, withDirectives } from 'vue';
6
7
  import { IconClose, IconEyeopen, IconEyeclose } from '@opentinyvue/vue-icon';
7
8
  import Tooltip from '@opentinyvue/vue-tooltip';
8
9
  import Button from '@opentinyvue/vue-button';
@@ -10,37 +11,40 @@ import DialogBox from '@opentinyvue/vue-dialog-box';
10
11
  import '@opentinyvue/vue-theme/input/index.css';
11
12
  import '@opentinyvue/vue-theme/textarea/index.css';
12
13
 
13
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
14
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
15
- if (render) {
16
- options.render = render;
17
- options.staticRenderFns = staticRenderFns;
18
- options._compiled = true;
14
+ function _createForOfIteratorHelperLoose(r, e) {
15
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
16
+ if (t) return (t = t.call(r)).next.bind(t);
17
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
18
+ t && (r = t);
19
+ var o = 0;
20
+ return function() {
21
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
22
+ };
19
23
  }
20
- var hook;
21
- if (injectStyles) {
22
- hook = injectStyles;
23
- }
24
- if (hook) {
25
- if (options.functional) {
26
- options._injectStyles = hook;
27
- var originalRender = options.render;
28
- options.render = function renderWithStyleInjection(h, context) {
29
- hook.call(context);
30
- return originalRender(h, context);
31
- };
32
- } else {
33
- var existing = options.beforeCreate;
34
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
35
- }
24
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25
+ }
26
+ function _unsupportedIterableToArray(r, a) {
27
+ if (r) {
28
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
29
+ var t = {}.toString.call(r).slice(8, -1);
30
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
36
31
  }
37
- return {
38
- exports: scriptExports,
39
- options
40
- };
41
32
  }
33
+ function _arrayLikeToArray(r, a) {
34
+ (null == a || a > r.length) && (a = r.length);
35
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
36
+ return n;
37
+ }
38
+ var _export_sfc = function _export_sfc2(sfc, props) {
39
+ var target = sfc.__vccOpts || sfc;
40
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
41
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
42
+ target[key] = val;
43
+ }
44
+ return target;
45
+ };
42
46
 
43
- var __vue2_script$1 = defineComponent({
47
+ var _sfc_main$1 = defineComponent({
44
48
  name: $prefix + "TallStorage",
45
49
  inheritAttrs: false,
46
50
  props: {
@@ -56,339 +60,52 @@ var __vue2_script$1 = defineComponent({
56
60
  });
57
61
  }
58
62
  });
59
- var render$1 = function render2() {
60
- var _vm = this;
61
- var _h = _vm.$createElement;
62
- var _c = _vm._self._c || _h;
63
- return _c("div", {
64
- staticClass: "tiny-tall-storage",
65
- on: {
66
- "mousedown": _vm.mousedown
67
- }
68
- }, [_c("div", {
69
- staticClass: "tiny-storage-list-style"
70
- }, [_c("ul", {
71
- staticClass: "tiny-storage-list",
72
- on: {
73
- "keydown": function keydown($event) {
74
- if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
75
- return _vm.keydownEvent.apply(null, arguments);
76
- }
77
- }
78
- }, _vm._l(_vm.localstorageData, function(item) {
79
- return _c("li", {
80
- key: item,
81
- staticClass: "tiny-storage-item",
82
- class: [_vm.state.hoverValue === item ? "item-hover" : ""],
83
- on: {
84
- "click": function click($event) {
85
- return _vm.selectItem(item);
86
- }
87
- }
88
- }, [_vm._v(" " + _vm._s(item) + " ")]);
89
- }), 0)])]);
63
+ var _hoisted_1$1 = {
64
+ class: "tiny-storage-list-style"
90
65
  };
91
- var staticRenderFns$1 = [];
92
- var __cssModules$1 = {};
93
- var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1);
94
- function __vue2_injectStyles$1(context) {
95
- for (var o in __cssModules$1) {
96
- this[o] = __cssModules$1[o];
97
- }
98
- }
99
- var tallStorage = /* @__PURE__ */ function() {
100
- return __component__$1.exports;
101
- }();
102
-
103
- var render = function render2() {
104
- var _vm = this;
105
- var _h = _vm.$createElement;
106
- var _c = _vm._self._c || _h;
107
- return _c("div", _vm._b({
108
- class: [_vm.$attrs.class, _vm.type === "textarea" ? "tiny-textarea" : "tiny-input", _vm.state.inputSize ? "tiny-input-" + _vm.state.inputSize : "", {
109
- "is-disabled": _vm.state.inputDisabled,
110
- "is-exceed": _vm.state.inputExceed,
111
- "tiny-input-group": _vm.slots.prepend || _vm.slots.append,
112
- "tiny-input-group-append": _vm.slots.append,
113
- "tiny-input-group-prepend": _vm.slots.prepend,
114
- "tiny-input-prefix": _vm.slots.prefix || _vm.prefixIcon,
115
- "tiny-input-suffix": _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword || _vm.mask && _vm.state.inputDisabled,
116
- "tiny-input-word-limit": _vm.state.isWordLimitVisible,
117
- "is-display-only": _vm.state.isDisplayOnly,
118
- "tiny-input-underline": _vm.inputBoxType === "underline"
119
- }],
120
- on: {
121
- "mouseenter": function mouseenter($event) {
122
- _vm.state.hovering = true;
123
- _vm.$emit("mouseenter", $event);
124
- },
125
- "mouseleave": function mouseleave($event) {
126
- _vm.state.hovering = false;
127
- _vm.$emit("mouseleave", $event);
128
- },
129
- "click": function click($event) {
130
- return _vm.$emit("click", $event);
131
- }
132
- }
133
- }, "div", _vm.a(_vm.$attrs, ["class"]), false), [_vm.type !== "textarea" ? [_vm.slots.prepend ? _c("div", {
134
- ref: "prepend",
135
- staticClass: "tiny-input-group__prepend"
136
- }, [_vm._t("prepend")], 2) : _vm._e(), _c("span", {
137
- staticClass: "tiny-input-display-only"
138
- }, [_vm.state.isDisplayOnly ? _c("tiny-tooltip", {
139
- attrs: {
140
- "disabled": !_vm.showTooltip,
141
- "effect": "light",
142
- "content": _vm.state.displayOnlyTooltip,
143
- "placement": "top",
144
- "popper-class": _vm.state.tooltipConfig.popperClass || ""
145
- },
146
- nativeOn: {
147
- "mouseenter": function mouseenter($event) {
148
- return _vm.handleEnterDisplayOnlyContent.apply(null, arguments);
149
- }
150
- }
151
- }, [_vm.type === "password" ? _c("span", {
152
- staticClass: "tiny-input-display-only__content"
153
- }, [_vm._v(_vm._s(_vm.state.hiddenPassword))]) : _vm.mask ? _c("span", {
154
- staticClass: "tiny-input-display-only__mask"
155
- }, [_c("span", {
156
- staticClass: "tiny-input-display-only__mask-text"
157
- }, [_vm._v(_vm._s(_vm.state.displayedMaskValue))]), _c(_vm.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose", {
158
- tag: "component",
159
- nativeOn: {
160
- "click": function click($event) {
161
- _vm.state.maskValueVisible = !_vm.state.maskValueVisible;
162
- }
163
- }
164
- })], 1) : _c("span", {
165
- staticClass: "tiny-input-display-only__content"
166
- }, [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _vm.type !== "textarea" ? _c("input", _vm._b({
167
- ref: "input",
168
- class: ["tiny-input__inner", _vm.mask && _vm.state.inputDisabled && !_vm.state.maskValueVisible && "tiny-input__mask"],
169
- attrs: {
170
- "name": _vm.name,
171
- "data-tag": "tiny-input-inner",
172
- "tabindex": _vm.tabindex,
173
- "type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : _vm.type,
174
- "disabled": _vm.state.inputDisabled,
175
- "readonly": _vm.readonly,
176
- "unselectable": _vm.readonly ? "on" : "off",
177
- "autocomplete": _vm.autocomplete,
178
- "aria-label": _vm.label
179
- },
180
- on: {
181
- "compositionend": _vm.handleCompositionEnd,
182
- "compositionupdate": _vm.handleCompositionUpdate,
183
- "compositionstart": _vm.handleCompositionStart,
184
- "blur": _vm.handleBlur,
185
- "focus": _vm.handleFocus,
186
- "input": _vm.handleInput,
187
- "change": _vm.handleChange,
188
- "keyup": function keyup($event) {
189
- return _vm.$emit("keyup", $event);
190
- },
191
- "keydown": function keydown($event) {
192
- return _vm.$emit("keydown", $event);
193
- },
194
- "paste": function paste($event) {
195
- return _vm.$emit("paste", $event);
196
- }
197
- }
198
- }, "input", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]", "id"]), false)) : _vm._e()], 1), _vm.isMemoryStorage ? _c("tiny-tall-storage", {
199
- attrs: {
200
- "name": _vm.name,
201
- "localstorage-data": _vm.storageData,
202
- "is-memory-storage": _vm.isMemoryStorage
66
+ var _hoisted_2$1 = ["onClick"];
67
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
68
+ return openBlock(), createElementBlock(
69
+ "div",
70
+ {
71
+ class: "tiny-tall-storage",
72
+ onMousedown: _cache[1] || (_cache[1] = function() {
73
+ return _ctx.mousedown && _ctx.mousedown.apply(_ctx, arguments);
74
+ })
203
75
  },
204
- on: {
205
- "selected": _vm.selectedMemory
206
- }
207
- }) : _vm._e(), !_vm.state.isDisplayOnly && (_vm.slots.prefix || _vm.prefixIcon) ? _c("span", {
208
- ref: "prefix",
209
- staticClass: "tiny-input__prefix"
210
- }, [_vm._t("prefix"), _vm.prefixIcon ? _c(_vm.prefixIcon, {
211
- tag: "component",
212
- staticClass: "tiny-svg-size tiny-input__icon"
213
- }) : _vm._e()], 2) : _vm._e(), _c("div", [_c("transition", {
214
- attrs: {
215
- "name": "tiny-transition-icon-out-in"
216
- }
217
- }, [!_vm.state.isDisplayOnly && _vm.getSuffixVisible() ? _c("span", {
218
- ref: "suffix",
219
- staticClass: "tiny-input__suffix"
220
- }, [_c("span", {
221
- staticClass: "tiny-input__suffix-inner"
222
- }, [_vm.frontClearIcon && _vm.state.showClear ? _c("icon-close", {
223
- staticClass: "tiny-svg-size tiny-input__icon tiny-input__clear",
224
- on: {
225
- "mousedown": function mousedown($event) {
226
- $event.preventDefault();
76
+ [createElementVNode("div", _hoisted_1$1, [createElementVNode(
77
+ "ul",
78
+ {
79
+ onKeydown: _cache[0] || (_cache[0] = withKeys(function() {
80
+ return _ctx.keydownEvent && _ctx.keydownEvent.apply(_ctx, arguments);
81
+ }, ["enter"])),
82
+ class: "tiny-storage-list"
227
83
  },
228
- "click": _vm.clear
229
- }
230
- }) : _vm._e(), !_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c(_vm.suffixIcon, {
231
- tag: "component",
232
- staticClass: "tiny-svg-size tiny-input__icon"
233
- }) : _vm._e()] : _vm._e(), !_vm.frontClearIcon && _vm.state.showClear ? _c("icon-close", {
234
- staticClass: "tiny-svg-size tiny-input__icon tiny-input__clear",
235
- on: {
236
- "mousedown": function mousedown($event) {
237
- $event.preventDefault();
238
- },
239
- "click": _vm.clear
240
- }
241
- }) : _vm._e(), _vm.showPassword ? _c(_vm.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose", {
242
- tag: "component",
243
- staticClass: "tiny-svg-size tiny-input__icon",
244
- nativeOn: {
245
- "click": function click($event) {
246
- return _vm.handlePasswordVisible.apply(null, arguments);
247
- }
248
- }
249
- }) : _vm._e(), _vm.mask && _vm.state.inputDisabled ? _c(_vm.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose", {
250
- tag: "component",
251
- staticClass: "tiny-svg-size tiny-input__icon",
252
- nativeOn: {
253
- "click": function click($event) {
254
- _vm.state.maskValueVisible = !_vm.state.maskValueVisible;
255
- }
256
- }
257
- }) : _vm._e(), _vm.state.isWordLimitVisible ? _c("span", {
258
- staticClass: "tiny-input__count"
259
- }, [_c("span", {
260
- staticClass: "tiny-input__count-inner"
261
- }, [_c("span", {
262
- staticClass: "tiny-input__count-text-length"
263
- }, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "" + _vm.state.textLength : "") + " ")]), _c("span", {
264
- staticClass: "tiny-input__count-upper-limit"
265
- }, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "/" + _vm.state.upperLimit : _vm.state.textLength) + " ")])])]) : _vm._e()], 2), _vm.state.validateState ? _c("i", {
266
- staticClass: "tiny-input__icon",
267
- class: ["tiny-input__validateIcon", _vm.validateIcon]
268
- }) : _vm._e()]) : _vm._e()])], 1), _vm.slots.append ? _c("div", {
269
- ref: "append",
270
- staticClass: "tiny-input-group__append"
271
- }, [_vm._t("append")], 2) : _vm._e(), _vm.slots.panel ? _c("div", {
272
- ref: "panel",
273
- staticClass: "tiny-input-group__panel"
274
- }, [_vm._t("panel")], 2) : _vm._e()] : _c("span", {
275
- class: ["tiny-textarea-display-only", _vm.hoverExpand && "tiny-textarea__inner-con"]
276
- }, [_vm.state.isDisplayOnly ? _c("tiny-tooltip", {
277
- attrs: {
278
- "disabled": !_vm.showTooltip,
279
- "pre": "",
280
- "effect": "light",
281
- "content": _vm.state.displayOnlyTooltip,
282
- "placement": "top",
283
- "popper-class": _vm.state.tooltipConfig.popperClass || ""
284
- },
285
- nativeOn: {
286
- "mouseenter": function mouseenter($event) {
287
- return _vm.handleEnterDisplayOnlyContent($event, "textarea");
288
- }
289
- }
290
- }, [_c("div", {
291
- staticClass: "tiny-textarea-display-only__wrap"
292
- }, [_c("span", {
293
- ref: "textBox",
294
- staticClass: "tiny-textarea-display-only__content text-box"
295
- }, [_vm.state.showMoreBtn ? _c("span", {
296
- staticClass: "more-btn",
297
- on: {
298
- "click": function click($event) {
299
- _vm.state.showDisplayOnlyBox = true;
300
- }
301
- }
302
- }, [_vm._v(_vm._s(_vm.t("ui.input.more")) + ">")]) : _vm._e(), _c("span", [_vm._v(_vm._s(_vm.state.displayOnlyText))])])])]) : _vm._e(), _vm.state.isDisplayOnly && _vm.popupMore ? _c("tiny-dialog-box", {
303
- attrs: {
304
- "title": _vm.t("ui.input.detail"),
305
- "visible": _vm.state.showDisplayOnlyBox,
306
- "append-to-body": true
307
- },
308
- on: {
309
- "update:visible": function updateVisible($event) {
310
- _vm.state.showDisplayOnlyBox = $event;
311
- }
312
- },
313
- scopedSlots: _vm._u([{
314
- key: "footer",
315
- fn: function fn() {
316
- return [_c("tiny-button", {
317
- on: {
318
- "click": function click($event) {
319
- _vm.state.showDisplayOnlyBox = false;
84
+ [(openBlock(true), createElementBlock(
85
+ Fragment,
86
+ null,
87
+ renderList(_ctx.localstorageData, function(item) {
88
+ return openBlock(), createElementBlock("li", {
89
+ key: item,
90
+ class: normalizeClass(["tiny-storage-item", [_ctx.state.hoverValue === item ? "item-hover" : ""]]),
91
+ onClick: function onClick($event) {
92
+ return _ctx.selectItem(item);
320
93
  }
321
- }
322
- }, [_vm._v(_vm._s(_vm.t("ui.input.close")))])];
323
- },
324
- proxy: true
325
- }], null, false, 2786811157)
326
- }, [_c("pre", [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({
327
- directives: [{
328
- name: "clickoutside",
329
- rawName: "v-clickoutside.mouseup",
330
- value: function value() {
331
- return _vm.handleTextareaMouseUp(true);
332
- },
333
- expression: "() => handleTextareaMouseUp(true)",
334
- modifiers: {
335
- "mouseup": true
336
- }
337
- }],
338
- ref: "textarea",
339
- staticClass: "tiny-textarea__inner",
340
- class: _vm.hoverExpand && !_vm.state.enteredTextarea && "tiny-textarea__fix-height",
341
- style: _vm.state.textareaStyle,
342
- attrs: {
343
- "tabindex": _vm.tabindex,
344
- "disabled": _vm.state.inputDisabled,
345
- "readonly": _vm.readonly,
346
- "unselectable": _vm.readonly ? "on" : "off",
347
- "autocomplete": _vm.autocomplete,
348
- "aria-label": _vm.label
349
- },
350
- on: {
351
- "compositionstart": _vm.handleCompositionStart,
352
- "compositionupdate": _vm.handleCompositionUpdate,
353
- "compositionend": _vm.handleCompositionEnd,
354
- "input": _vm.handleInput,
355
- "focus": _vm.handleFocus,
356
- "blur": _vm.handleBlur,
357
- "change": _vm.handleChange,
358
- "mouseenter": function mouseenter($event) {
359
- return _vm.handleEnterTextarea($event);
360
- },
361
- "mouseleave": function mouseleave($event) {
362
- return _vm.handleLeaveTextarea($event);
363
- },
364
- "mousedown": function mousedown($event) {
365
- return _vm.handleTextareaMouseDown();
366
- },
367
- "mouseup": function mouseup($event) {
368
- return _vm.handleTextareaMouseUp();
369
- },
370
- "keyup": function keyup($event) {
371
- return _vm.$emit("keyup", $event);
372
- },
373
- "keydown": function keydown($event) {
374
- return _vm.$emit("keydown", $event);
375
- },
376
- "paste": function paste($event) {
377
- return _vm.$emit("paste", $event);
378
- }
379
- }
380
- }, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "id"]), false))], 1), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", {
381
- staticClass: "tiny-input__count"
382
- }, [_c("span", {
383
- staticClass: "tiny-input__count-inner"
384
- }, [_c("span", {
385
- staticClass: "tiny-input__count-text-length"
386
- }, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "" + _vm.state.textLength : "") + " ")]), _c("span", {
387
- staticClass: "tiny-input__count-upper-limit"
388
- }, [_vm._v(" " + _vm._s(_vm.state.showWordLimit ? "/" + _vm.state.upperLimit : _vm.state.textLength) + " ")])])]) : _vm._e(), _vm._t("default")], 2);
389
- };
390
- var staticRenderFns = [];
391
- var __vue2_script = defineComponent({
94
+ }, toDisplayString(item), 11, _hoisted_2$1);
95
+ }),
96
+ 128
97
+ /* KEYED_FRAGMENT */
98
+ ))],
99
+ 32
100
+ /* NEED_HYDRATION */
101
+ )])],
102
+ 32
103
+ /* NEED_HYDRATION */
104
+ );
105
+ }
106
+ var tallStorage = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
107
+
108
+ var _sfc_main = defineComponent({
392
109
  inheritAttrs: false,
393
110
  // 勿删,兼容灵雀特殊场景,MR#1861
394
111
  emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "click", "input"],
@@ -414,15 +131,471 @@ var __vue2_script = defineComponent({
414
131
  });
415
132
  }
416
133
  });
417
- var __cssModules = {};
418
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
419
- function __vue2_injectStyles(context) {
420
- for (var o in __cssModules) {
421
- this[o] = __cssModules[o];
422
- }
134
+ var _hoisted_1 = {
135
+ key: 0,
136
+ class: "tiny-input-group__prepend",
137
+ ref: "prepend"
138
+ };
139
+ var _hoisted_2 = {
140
+ class: "tiny-input-display-only"
141
+ };
142
+ var _hoisted_3 = {
143
+ key: 0,
144
+ class: "tiny-input-display-only__content"
145
+ };
146
+ var _hoisted_4 = {
147
+ key: 1,
148
+ class: "tiny-input-display-only__mask"
149
+ };
150
+ var _hoisted_5 = {
151
+ class: "tiny-input-display-only__mask-text"
152
+ };
153
+ var _hoisted_6 = {
154
+ key: 2,
155
+ class: "tiny-input-display-only__content"
156
+ };
157
+ var _hoisted_7 = ["name", "tabindex", "type", "disabled", "readonly", "unselectable", "autocomplete", "aria-label"];
158
+ var _hoisted_8 = {
159
+ key: 2,
160
+ class: "tiny-input__prefix",
161
+ ref: "prefix"
162
+ };
163
+ var _hoisted_9 = {
164
+ key: 0,
165
+ class: "tiny-input__suffix",
166
+ ref: "suffix"
167
+ };
168
+ var _hoisted_10 = {
169
+ class: "tiny-input__suffix-inner"
170
+ };
171
+ var _hoisted_11 = {
172
+ key: 5,
173
+ class: "tiny-input__count"
174
+ };
175
+ var _hoisted_12 = {
176
+ class: "tiny-input__count-inner"
177
+ };
178
+ var _hoisted_13 = {
179
+ class: "tiny-input__count-text-length"
180
+ };
181
+ var _hoisted_14 = {
182
+ class: "tiny-input__count-upper-limit"
183
+ };
184
+ var _hoisted_15 = {
185
+ key: 3,
186
+ class: "tiny-input-group__append",
187
+ ref: "append"
188
+ };
189
+ var _hoisted_16 = {
190
+ key: 4,
191
+ class: "tiny-input-group__panel",
192
+ ref: "panel"
193
+ };
194
+ var _hoisted_17 = {
195
+ class: "tiny-textarea-display-only__wrap"
196
+ };
197
+ var _hoisted_18 = {
198
+ ref: "textBox",
199
+ class: "tiny-textarea-display-only__content text-box"
200
+ };
201
+ var _hoisted_19 = ["tabindex", "disabled", "readonly", "unselectable", "autocomplete", "aria-label"];
202
+ var _hoisted_20 = {
203
+ key: 2,
204
+ class: "tiny-input__count"
205
+ };
206
+ var _hoisted_21 = {
207
+ class: "tiny-input__count-inner"
208
+ };
209
+ var _hoisted_22 = {
210
+ class: "tiny-input__count-text-length"
211
+ };
212
+ var _hoisted_23 = {
213
+ class: "tiny-input__count-upper-limit"
214
+ };
215
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
216
+ var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
217
+ var _component_tiny_tall_storage = resolveComponent("tiny-tall-storage");
218
+ var _component_icon_close = resolveComponent("icon-close");
219
+ var _component_tiny_button = resolveComponent("tiny-button");
220
+ var _component_tiny_dialog_box = resolveComponent("tiny-dialog-box");
221
+ var _directive_clickoutside = resolveDirective("clickoutside");
222
+ return openBlock(), createElementBlock(
223
+ "div",
224
+ mergeProps(_ctx.a(_ctx.$attrs, ["class"]), {
225
+ class: [_ctx.$attrs.class, _ctx.type === "textarea" ? "tiny-textarea" : "tiny-input", _ctx.state.inputSize ? "tiny-input-" + _ctx.state.inputSize : "", {
226
+ "is-disabled": _ctx.state.inputDisabled,
227
+ "is-exceed": _ctx.state.inputExceed,
228
+ "tiny-input-group": _ctx.slots.prepend || _ctx.slots.append,
229
+ "tiny-input-group-append": _ctx.slots.append,
230
+ "tiny-input-group-prepend": _ctx.slots.prepend,
231
+ "tiny-input-prefix": _ctx.slots.prefix || _ctx.prefixIcon,
232
+ "tiny-input-suffix": _ctx.slots.suffix || _ctx.suffixIcon || _ctx.clearable || _ctx.showPassword || _ctx.mask && _ctx.state.inputDisabled,
233
+ "tiny-input-word-limit": _ctx.state.isWordLimitVisible,
234
+ "is-display-only": _ctx.state.isDisplayOnly,
235
+ "tiny-input-underline": _ctx.inputBoxType === "underline"
236
+ }],
237
+ onMouseenter: _cache[32] || (_cache[32] = function($event) {
238
+ _ctx.state.hovering = true;
239
+ _ctx.$emit("mouseenter", $event);
240
+ }),
241
+ onMouseleave: _cache[33] || (_cache[33] = function($event) {
242
+ _ctx.state.hovering = false;
243
+ _ctx.$emit("mouseleave", $event);
244
+ }),
245
+ onClick: _cache[34] || (_cache[34] = function($event) {
246
+ return _ctx.$emit("click", $event);
247
+ })
248
+ }),
249
+ [_ctx.type !== "textarea" ? (openBlock(), createElementBlock(
250
+ Fragment,
251
+ {
252
+ key: 0
253
+ },
254
+ [_ctx.slots.prepend ? (openBlock(), createElementBlock(
255
+ "div",
256
+ _hoisted_1,
257
+ [renderSlot(_ctx.$slots, "prepend")],
258
+ 512
259
+ /* NEED_PATCH */
260
+ )) : createCommentVNode("v-if", true), createElementVNode("span", _hoisted_2, [_ctx.state.isDisplayOnly ? (openBlock(), createBlock(_component_tiny_tooltip, {
261
+ key: 0,
262
+ disabled: !_ctx.showTooltip,
263
+ effect: "light",
264
+ content: _ctx.state.displayOnlyTooltip,
265
+ placement: "top",
266
+ "popper-class": _ctx.state.tooltipConfig.popperClass || "",
267
+ onMouseenter: _ctx.handleEnterDisplayOnlyContent
268
+ }, {
269
+ default: withCtx(function() {
270
+ return [_ctx.type === "password" ? (openBlock(), createElementBlock(
271
+ "span",
272
+ _hoisted_3,
273
+ toDisplayString(_ctx.state.hiddenPassword),
274
+ 1
275
+ /* TEXT */
276
+ )) : _ctx.mask ? (openBlock(), createElementBlock("span", _hoisted_4, [createElementVNode(
277
+ "span",
278
+ _hoisted_5,
279
+ toDisplayString(_ctx.state.displayedMaskValue),
280
+ 1
281
+ /* TEXT */
282
+ ), (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose"), {
283
+ onClick: _cache[0] || (_cache[0] = function($event) {
284
+ return _ctx.state.maskValueVisible = !_ctx.state.maskValueVisible;
285
+ })
286
+ }))])) : (openBlock(), createElementBlock(
287
+ "span",
288
+ _hoisted_6,
289
+ toDisplayString(_ctx.state.displayOnlyText),
290
+ 1
291
+ /* TEXT */
292
+ ))];
293
+ }),
294
+ _: 1
295
+ /* STABLE */
296
+ }, 8, ["disabled", "content", "popper-class", "onMouseenter"])) : createCommentVNode("v-if", true), _ctx.type !== "textarea" ? (openBlock(), createElementBlock("input", mergeProps({
297
+ key: 1,
298
+ ref: "input",
299
+ name: _ctx.name,
300
+ "data-tag": "tiny-input-inner"
301
+ }, _ctx.a(_ctx.$attrs, ["type", "class", "style", "^on[A-Z]", "id"]), {
302
+ class: ["tiny-input__inner", _ctx.mask && _ctx.state.inputDisabled && !_ctx.state.maskValueVisible && "tiny-input__mask"],
303
+ tabindex: _ctx.tabindex,
304
+ type: _ctx.showPassword ? _ctx.state.passwordVisible ? "text" : "password" : _ctx.type,
305
+ disabled: _ctx.state.inputDisabled,
306
+ readonly: _ctx.readonly,
307
+ unselectable: _ctx.readonly ? "on" : "off",
308
+ autocomplete: _ctx.autocomplete,
309
+ onCompositionend: _cache[1] || (_cache[1] = function() {
310
+ return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd.apply(_ctx, arguments);
311
+ }),
312
+ onCompositionupdate: _cache[2] || (_cache[2] = function() {
313
+ return _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate.apply(_ctx, arguments);
314
+ }),
315
+ onCompositionstart: _cache[3] || (_cache[3] = function() {
316
+ return _ctx.handleCompositionStart && _ctx.handleCompositionStart.apply(_ctx, arguments);
317
+ }),
318
+ onBlur: _cache[4] || (_cache[4] = function() {
319
+ return _ctx.handleBlur && _ctx.handleBlur.apply(_ctx, arguments);
320
+ }),
321
+ onFocus: _cache[5] || (_cache[5] = function() {
322
+ return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
323
+ }),
324
+ onInput: _cache[6] || (_cache[6] = function() {
325
+ return _ctx.handleInput && _ctx.handleInput.apply(_ctx, arguments);
326
+ }),
327
+ onChange: _cache[7] || (_cache[7] = function() {
328
+ return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
329
+ }),
330
+ "aria-label": _ctx.label,
331
+ onKeyup: _cache[8] || (_cache[8] = function($event) {
332
+ return _ctx.$emit("keyup", $event);
333
+ }),
334
+ onKeydown: _cache[9] || (_cache[9] = function($event) {
335
+ return _ctx.$emit("keydown", $event);
336
+ }),
337
+ onPaste: _cache[10] || (_cache[10] = function($event) {
338
+ return _ctx.$emit("paste", $event);
339
+ })
340
+ }), null, 16, _hoisted_7)) : createCommentVNode("v-if", true)]), _ctx.isMemoryStorage ? (openBlock(), createBlock(_component_tiny_tall_storage, {
341
+ key: 1,
342
+ name: _ctx.name,
343
+ "localstorage-data": _ctx.storageData,
344
+ "is-memory-storage": _ctx.isMemoryStorage,
345
+ onSelected: _ctx.selectedMemory
346
+ }, null, 8, ["name", "localstorage-data", "is-memory-storage", "onSelected"])) : createCommentVNode("v-if", true), !_ctx.state.isDisplayOnly && (_ctx.slots.prefix || _ctx.prefixIcon) ? (openBlock(), createElementBlock(
347
+ "span",
348
+ _hoisted_8,
349
+ [renderSlot(_ctx.$slots, "prefix"), _ctx.prefixIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon), {
350
+ key: 0,
351
+ class: "tiny-svg-size tiny-input__icon"
352
+ })) : createCommentVNode("v-if", true)],
353
+ 512
354
+ /* NEED_PATCH */
355
+ )) : createCommentVNode("v-if", true), createElementVNode("div", null, [createVNode(Transition, {
356
+ name: "tiny-transition-icon-out-in"
357
+ }, {
358
+ default: withCtx(function() {
359
+ return [!_ctx.state.isDisplayOnly && _ctx.getSuffixVisible() ? (openBlock(), createElementBlock(
360
+ "span",
361
+ _hoisted_9,
362
+ [createElementVNode("span", _hoisted_10, [_ctx.frontClearIcon && _ctx.state.showClear ? (openBlock(), createBlock(_component_icon_close, {
363
+ key: 0,
364
+ class: "tiny-svg-size tiny-input__icon tiny-input__clear",
365
+ onMousedown: _cache[11] || (_cache[11] = withModifiers(function() {
366
+ }, ["prevent"])),
367
+ onClick: _ctx.clear
368
+ }, null, 8, ["onClick"])) : createCommentVNode("v-if", true), !_ctx.state.showClear || !_ctx.state.showPwdVisible || !_ctx.state.isWordLimitVisible ? (openBlock(), createElementBlock(
369
+ Fragment,
370
+ {
371
+ key: 1
372
+ },
373
+ [renderSlot(_ctx.$slots, "suffix"), _ctx.suffixIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon), {
374
+ key: 0,
375
+ class: "tiny-svg-size tiny-input__icon"
376
+ })) : createCommentVNode("v-if", true)],
377
+ 64
378
+ /* STABLE_FRAGMENT */
379
+ )) : createCommentVNode("v-if", true), !_ctx.frontClearIcon && _ctx.state.showClear ? (openBlock(), createBlock(_component_icon_close, {
380
+ key: 2,
381
+ class: "tiny-svg-size tiny-input__icon tiny-input__clear",
382
+ onMousedown: _cache[12] || (_cache[12] = withModifiers(function() {
383
+ }, ["prevent"])),
384
+ onClick: _ctx.clear
385
+ }, null, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.showPassword ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose"), {
386
+ key: 3,
387
+ class: "tiny-svg-size tiny-input__icon",
388
+ onClick: _ctx.handlePasswordVisible
389
+ }, null, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.mask && _ctx.state.inputDisabled ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose"), {
390
+ key: 4,
391
+ class: "tiny-svg-size tiny-input__icon",
392
+ onClick: _cache[13] || (_cache[13] = function($event) {
393
+ return _ctx.state.maskValueVisible = !_ctx.state.maskValueVisible;
394
+ })
395
+ })) : createCommentVNode("v-if", true), _ctx.state.isWordLimitVisible ? (openBlock(), createElementBlock("span", _hoisted_11, [createElementVNode("span", _hoisted_12, [createElementVNode(
396
+ "span",
397
+ _hoisted_13,
398
+ toDisplayString(_ctx.state.showWordLimit ? "" + _ctx.state.textLength : ""),
399
+ 1
400
+ /* TEXT */
401
+ ), createElementVNode(
402
+ "span",
403
+ _hoisted_14,
404
+ toDisplayString(_ctx.state.showWordLimit ? "/" + _ctx.state.upperLimit : _ctx.state.textLength),
405
+ 1
406
+ /* TEXT */
407
+ )])])) : createCommentVNode("v-if", true)]), _ctx.state.validateState ? (openBlock(), createElementBlock(
408
+ "i",
409
+ {
410
+ key: 0,
411
+ class: normalizeClass(["tiny-input__icon", ["tiny-input__validateIcon", _ctx.validateIcon]])
412
+ },
413
+ null,
414
+ 2
415
+ /* CLASS */
416
+ )) : createCommentVNode("v-if", true)],
417
+ 512
418
+ /* NEED_PATCH */
419
+ )) : createCommentVNode("v-if", true)];
420
+ }),
421
+ _: 3
422
+ /* FORWARDED */
423
+ })]), _ctx.slots.append ? (openBlock(), createElementBlock(
424
+ "div",
425
+ _hoisted_15,
426
+ [renderSlot(_ctx.$slots, "append")],
427
+ 512
428
+ /* NEED_PATCH */
429
+ )) : createCommentVNode("v-if", true), _ctx.slots.panel ? (openBlock(), createElementBlock(
430
+ "div",
431
+ _hoisted_16,
432
+ [renderSlot(_ctx.$slots, "panel")],
433
+ 512
434
+ /* NEED_PATCH */
435
+ )) : createCommentVNode("v-if", true)],
436
+ 64
437
+ /* STABLE_FRAGMENT */
438
+ )) : (openBlock(), createElementBlock(
439
+ "span",
440
+ {
441
+ key: 1,
442
+ class: normalizeClass(["tiny-textarea-display-only", _ctx.hoverExpand && "tiny-textarea__inner-con"])
443
+ },
444
+ [_ctx.state.isDisplayOnly ? (openBlock(), createBlock(_component_tiny_tooltip, {
445
+ key: 0,
446
+ disabled: !_ctx.showTooltip,
447
+ pre: "",
448
+ effect: "light",
449
+ content: _ctx.state.displayOnlyTooltip,
450
+ placement: "top",
451
+ "popper-class": _ctx.state.tooltipConfig.popperClass || "",
452
+ onMouseenter: _cache[15] || (_cache[15] = function($event) {
453
+ return _ctx.handleEnterDisplayOnlyContent($event, "textarea");
454
+ })
455
+ }, {
456
+ default: withCtx(function() {
457
+ return [createElementVNode("div", _hoisted_17, [createElementVNode(
458
+ "span",
459
+ _hoisted_18,
460
+ [_ctx.state.showMoreBtn ? (openBlock(), createElementBlock(
461
+ "span",
462
+ {
463
+ key: 0,
464
+ onClick: _cache[14] || (_cache[14] = function($event) {
465
+ return _ctx.state.showDisplayOnlyBox = true;
466
+ }),
467
+ class: "more-btn"
468
+ },
469
+ toDisplayString(_ctx.t("ui.input.more")) + ">",
470
+ 1
471
+ /* TEXT */
472
+ )) : createCommentVNode("v-if", true), createElementVNode(
473
+ "span",
474
+ null,
475
+ toDisplayString(_ctx.state.displayOnlyText),
476
+ 1
477
+ /* TEXT */
478
+ )],
479
+ 512
480
+ /* NEED_PATCH */
481
+ )])];
482
+ }),
483
+ _: 1
484
+ /* STABLE */
485
+ }, 8, ["disabled", "content", "popper-class"])) : createCommentVNode("v-if", true), _ctx.state.isDisplayOnly && _ctx.popupMore ? (openBlock(), createBlock(_component_tiny_dialog_box, {
486
+ key: 1,
487
+ title: _ctx.t("ui.input.detail"),
488
+ visible: _ctx.state.showDisplayOnlyBox,
489
+ "append-to-body": true,
490
+ "onUpdate:visible": _cache[17] || (_cache[17] = function($event) {
491
+ return _ctx.state.showDisplayOnlyBox = $event;
492
+ })
493
+ }, {
494
+ footer: withCtx(function() {
495
+ return [createVNode(_component_tiny_button, {
496
+ onClick: _cache[16] || (_cache[16] = function($event) {
497
+ return _ctx.state.showDisplayOnlyBox = false;
498
+ })
499
+ }, {
500
+ default: withCtx(function() {
501
+ return [createTextVNode(
502
+ toDisplayString(_ctx.t("ui.input.close")),
503
+ 1
504
+ /* TEXT */
505
+ )];
506
+ }),
507
+ _: 1
508
+ /* STABLE */
509
+ })];
510
+ }),
511
+ default: withCtx(function() {
512
+ return [createElementVNode(
513
+ "pre",
514
+ null,
515
+ toDisplayString(_ctx.state.displayOnlyText),
516
+ 1
517
+ /* TEXT */
518
+ )];
519
+ }),
520
+ _: 1
521
+ /* STABLE */
522
+ }, 8, ["title", "visible"])) : createCommentVNode("v-if", true), withDirectives((openBlock(), createElementBlock("textarea", mergeProps({
523
+ ref: "textarea"
524
+ }, _ctx.a(_ctx.$attrs, ["type", "class", "style", "id"]), {
525
+ tabindex: _ctx.tabindex,
526
+ class: ["tiny-textarea__inner", _ctx.hoverExpand && !_ctx.state.enteredTextarea && "tiny-textarea__fix-height"],
527
+ onCompositionstart: _cache[18] || (_cache[18] = function() {
528
+ return _ctx.handleCompositionStart && _ctx.handleCompositionStart.apply(_ctx, arguments);
529
+ }),
530
+ onCompositionupdate: _cache[19] || (_cache[19] = function() {
531
+ return _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate.apply(_ctx, arguments);
532
+ }),
533
+ onCompositionend: _cache[20] || (_cache[20] = function() {
534
+ return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd.apply(_ctx, arguments);
535
+ }),
536
+ onInput: _cache[21] || (_cache[21] = function() {
537
+ return _ctx.handleInput && _ctx.handleInput.apply(_ctx, arguments);
538
+ }),
539
+ disabled: _ctx.state.inputDisabled,
540
+ readonly: _ctx.readonly,
541
+ unselectable: _ctx.readonly ? "on" : "off",
542
+ autocomplete: _ctx.autocomplete,
543
+ style: _ctx.state.textareaStyle,
544
+ onFocus: _cache[22] || (_cache[22] = function() {
545
+ return _ctx.handleFocus && _ctx.handleFocus.apply(_ctx, arguments);
546
+ }),
547
+ onBlur: _cache[23] || (_cache[23] = function() {
548
+ return _ctx.handleBlur && _ctx.handleBlur.apply(_ctx, arguments);
549
+ }),
550
+ onChange: _cache[24] || (_cache[24] = function() {
551
+ return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
552
+ }),
553
+ onMouseenter: _cache[25] || (_cache[25] = function($event) {
554
+ return _ctx.handleEnterTextarea($event);
555
+ }),
556
+ onMouseleave: _cache[26] || (_cache[26] = function($event) {
557
+ return _ctx.handleLeaveTextarea($event);
558
+ }),
559
+ onMousedown: _cache[27] || (_cache[27] = function($event) {
560
+ return _ctx.handleTextareaMouseDown();
561
+ }),
562
+ onMouseup: _cache[28] || (_cache[28] = function($event) {
563
+ return _ctx.handleTextareaMouseUp();
564
+ }),
565
+ "aria-label": _ctx.label,
566
+ onKeyup: _cache[29] || (_cache[29] = function($event) {
567
+ return _ctx.$emit("keyup", $event);
568
+ }),
569
+ onKeydown: _cache[30] || (_cache[30] = function($event) {
570
+ return _ctx.$emit("keydown", $event);
571
+ }),
572
+ onPaste: _cache[31] || (_cache[31] = function($event) {
573
+ return _ctx.$emit("paste", $event);
574
+ })
575
+ }), [createTextVNode("\n ")], 16, _hoisted_19)), [[_directive_clickoutside, function() {
576
+ return _ctx.handleTextareaMouseUp(true);
577
+ }, void 0, {
578
+ mouseup: true
579
+ }]])],
580
+ 2
581
+ /* CLASS */
582
+ )), _ctx.state.isWordLimitVisible && _ctx.type === "textarea" ? (openBlock(), createElementBlock("span", _hoisted_20, [createElementVNode("span", _hoisted_21, [createElementVNode(
583
+ "span",
584
+ _hoisted_22,
585
+ toDisplayString(_ctx.state.showWordLimit ? "" + _ctx.state.textLength : ""),
586
+ 1
587
+ /* TEXT */
588
+ ), createElementVNode(
589
+ "span",
590
+ _hoisted_23,
591
+ toDisplayString(_ctx.state.showWordLimit ? "/" + _ctx.state.upperLimit : _ctx.state.textLength),
592
+ 1
593
+ /* TEXT */
594
+ )])])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")],
595
+ 16
596
+ /* FULL_PROPS */
597
+ );
423
598
  }
424
- var pc = /* @__PURE__ */ function() {
425
- return __component__.exports;
426
- }();
599
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
427
600
 
428
601
  export { pc as default };