@opentinyvue/vue-input 2.21.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 - present TinyVue Authors.
4
+ Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+ import Input from './src/index';
13
+ export default Input;
package/lib/index.js ADDED
@@ -0,0 +1,212 @@
1
+ function _extends() {
2
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
3
+ for (var e = 1; e < arguments.length; e++) {
4
+ var t = arguments[e];
5
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6
+ }
7
+ return n;
8
+ }, _extends.apply(null, arguments);
9
+ }
10
+ import { defineComponent, $prefix, $setup, $props } from "@opentinyvue/vue-common";
11
+ import PcTemplate from "./pc.js";
12
+ import MobileTemplate from "./mobile.js";
13
+ import MobileFirstTemplate from "./mobile-first.js";
14
+ var template = function template2(mode) {
15
+ var _process$env;
16
+ var tinyMode = typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
17
+ if ("pc" === (tinyMode || mode)) {
18
+ return PcTemplate;
19
+ }
20
+ if ("mobile" === (tinyMode || mode)) {
21
+ return MobileTemplate;
22
+ }
23
+ if ("mobile-first" === (tinyMode || mode)) {
24
+ return MobileFirstTemplate;
25
+ }
26
+ return PcTemplate;
27
+ };
28
+ var $constants = {
29
+ INPUT_PC: "tiny-input__",
30
+ INPUTGROUP_PC: "tiny-input-group__",
31
+ INPUT_MOBILE: "tiny-mobile-input__",
32
+ INPUTGROUP_MOBILE: "tiny-mobile-input-group__",
33
+ Mode: "pc",
34
+ inputMode: function inputMode(mode) {
35
+ return mode === this.Mode ? this.INPUT_PC : this.INPUT_MOBILE;
36
+ },
37
+ inputGroupMode: function inputGroupMode(mode) {
38
+ return mode === this.Mode ? this.INPUTGROUP_PC : this.INPUTGROUP_MOBILE;
39
+ },
40
+ VALIDATE_ICON: {
41
+ Validating: "tiny-icon-loading",
42
+ Success: "tiny-icon-circle-check",
43
+ Error: "tiny-icon-circle-close"
44
+ },
45
+ COMPONENT_NAME: {
46
+ FormItem: "FormItem"
47
+ },
48
+ MASKSYMBOL: "******",
49
+ TEXTAREA_HEIGHT_MOBILE: 108
50
+ };
51
+ var inputProps = _extends({}, $props, {
52
+ _constants: {
53
+ type: Object,
54
+ default: function _default() {
55
+ return $constants;
56
+ }
57
+ },
58
+ name: String,
59
+ size: String,
60
+ form: String,
61
+ label: String,
62
+ height: Number,
63
+ resize: String,
64
+ tabindex: {
65
+ type: String,
66
+ default: "1"
67
+ },
68
+ disabled: Boolean,
69
+ readonly: Boolean,
70
+ hoverExpand: Boolean,
71
+ mask: Boolean,
72
+ suffixIcon: [Object, String],
73
+ prefixIcon: [Object, String],
74
+ modelValue: [String, Number],
75
+ type: {
76
+ type: String,
77
+ default: "text"
78
+ },
79
+ memorySpace: {
80
+ type: Number,
81
+ default: 5
82
+ },
83
+ vertical: {
84
+ type: Boolean,
85
+ default: false
86
+ },
87
+ selectMenu: {
88
+ type: Array,
89
+ default: function _default2() {
90
+ return [];
91
+ }
92
+ },
93
+ ellipsis: {
94
+ type: Boolean,
95
+ default: false
96
+ },
97
+ contentStyle: {
98
+ type: Object,
99
+ default: function _default3() {
100
+ return {};
101
+ }
102
+ },
103
+ isSelect: {
104
+ type: Boolean,
105
+ default: false
106
+ },
107
+ tips: String,
108
+ counter: {
109
+ type: Boolean,
110
+ default: false
111
+ },
112
+ autosize: {
113
+ type: [Boolean, Object],
114
+ default: false
115
+ },
116
+ clearable: {
117
+ type: Boolean,
118
+ default: false
119
+ },
120
+ autocomplete: {
121
+ type: String,
122
+ default: "off"
123
+ },
124
+ showPassword: {
125
+ type: Boolean,
126
+ default: false
127
+ },
128
+ showWordLimit: {
129
+ type: Boolean,
130
+ default: false
131
+ },
132
+ showTitle: {
133
+ type: Boolean,
134
+ default: false
135
+ },
136
+ validateEvent: {
137
+ type: Boolean,
138
+ default: true
139
+ },
140
+ popupMore: {
141
+ type: Boolean,
142
+ default: false
143
+ },
144
+ // mobile特有属性
145
+ textareaTitle: {
146
+ type: String,
147
+ default: ""
148
+ },
149
+ displayOnly: {
150
+ type: Boolean,
151
+ default: false
152
+ },
153
+ displayOnlyContent: {
154
+ type: String,
155
+ default: ""
156
+ },
157
+ customClass: {
158
+ type: String,
159
+ default: ""
160
+ },
161
+ frontClearIcon: {
162
+ type: Boolean,
163
+ default: false
164
+ },
165
+ showEmptyValue: {
166
+ type: Boolean,
167
+ default: void 0
168
+ },
169
+ textAlign: {
170
+ type: String,
171
+ default: "left"
172
+ },
173
+ width: {
174
+ type: [String, Number]
175
+ },
176
+ showTooltip: {
177
+ type: Boolean,
178
+ default: true
179
+ },
180
+ /** 输入框的边框模式,当值为underline时,只显示一条底部直线 */
181
+ inputBoxType: {
182
+ type: String,
183
+ default: "normal",
184
+ validator: function validator(value) {
185
+ return ["normal", "underline"].includes(value);
186
+ }
187
+ }
188
+ });
189
+ var Input = defineComponent({
190
+ name: $prefix + "Input",
191
+ inheritAttrs: false,
192
+ props: inputProps,
193
+ setup: function setup(props, context) {
194
+ return $setup({
195
+ props,
196
+ context,
197
+ template
198
+ });
199
+ }
200
+ });
201
+ var version = "2.21.0";
202
+ Input.model = {
203
+ prop: "modelValue",
204
+ event: "update:modelValue"
205
+ };
206
+ Input.install = function(Vue) {
207
+ Vue.component(Input.name, Input);
208
+ };
209
+ Input.version = version;
210
+ export {
211
+ Input as default
212
+ };
@@ -0,0 +1,400 @@
1
+ import { renderless as renderless$1, api as api$1 } from '@opentinyvue/vue-renderless/input/vue';
2
+ import { defineComponent, $prefix, setup, props } from '@opentinyvue/vue-common';
3
+ import { renderless, api } from '@opentinyvue/vue-renderless/tall-storage/vue';
4
+ import '@opentinyvue/vue-theme/tall-storage/index.css';
5
+ import { IconClose, IconError, IconEyeopen, IconEyeclose } from '@opentinyvue/vue-icon';
6
+ import Tooltip from '@opentinyvue/vue-tooltip';
7
+ import Button from '@opentinyvue/vue-button';
8
+ import DialogBox from '@opentinyvue/vue-dialog-box';
9
+
10
+ function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
11
+ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
12
+ if (render) {
13
+ options.render = render;
14
+ options.staticRenderFns = staticRenderFns;
15
+ options._compiled = true;
16
+ }
17
+ var hook;
18
+ if (injectStyles) {
19
+ hook = injectStyles;
20
+ }
21
+ if (hook) {
22
+ if (options.functional) {
23
+ options._injectStyles = hook;
24
+ var originalRender = options.render;
25
+ options.render = function renderWithStyleInjection(h, context) {
26
+ hook.call(context);
27
+ return originalRender(h, context);
28
+ };
29
+ } else {
30
+ var existing = options.beforeCreate;
31
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
32
+ }
33
+ }
34
+ return {
35
+ exports: scriptExports,
36
+ options
37
+ };
38
+ }
39
+
40
+ var __vue2_script$1 = defineComponent({
41
+ name: $prefix + "TallStorage",
42
+ inheritAttrs: false,
43
+ props: {
44
+ isMemoryStorage: Boolean,
45
+ localstorageData: Array
46
+ },
47
+ setup: function setup$1(props, context) {
48
+ return setup({
49
+ props,
50
+ context,
51
+ renderless,
52
+ api
53
+ });
54
+ }
55
+ });
56
+ var render$1 = function render2() {
57
+ var _vm = this;
58
+ var _h = _vm.$createElement;
59
+ var _c = _vm._self._c || _h;
60
+ return _c("div", {
61
+ staticClass: "tiny-tall-storage",
62
+ on: {
63
+ "mousedown": _vm.mousedown
64
+ }
65
+ }, [_c("div", {
66
+ staticClass: "tiny-storage-list-style"
67
+ }, [_c("ul", {
68
+ staticClass: "tiny-storage-list",
69
+ on: {
70
+ "keydown": function keydown($event) {
71
+ if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
72
+ return _vm.keydownEvent.apply(null, arguments);
73
+ }
74
+ }
75
+ }, _vm._l(_vm.localstorageData, function(item) {
76
+ return _c("li", {
77
+ key: item,
78
+ staticClass: "tiny-storage-item",
79
+ class: [_vm.state.hoverValue === item ? "item-hover" : ""],
80
+ on: {
81
+ "click": function click($event) {
82
+ return _vm.selectItem(item);
83
+ }
84
+ }
85
+ }, [_vm._v(" " + _vm._s(item) + " ")]);
86
+ }), 0)])]);
87
+ };
88
+ var staticRenderFns$1 = [];
89
+ var __cssModules$1 = {};
90
+ var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1);
91
+ function __vue2_injectStyles$1(context) {
92
+ for (var o in __cssModules$1) {
93
+ this[o] = __cssModules$1[o];
94
+ }
95
+ }
96
+ var tallStorage = /* @__PURE__ */ function() {
97
+ return __component__$1.exports;
98
+ }();
99
+
100
+ var __vue2_script = defineComponent({
101
+ inheritAttrs: false,
102
+ emits: ["update:modelValue", "change", "clear", "focus", "blur", "keyup", "keydown", "paste", "mouseenter", "mouseleave", "click", "input"],
103
+ components: {
104
+ IconClose: IconClose(),
105
+ IconError: IconError(),
106
+ IconEyeopen: IconEyeopen(),
107
+ IconEyeclose: IconEyeclose(),
108
+ TinyTallStorage: tallStorage,
109
+ TinyTooltip: Tooltip,
110
+ TinyButton: Button,
111
+ TinyDialogBox: DialogBox
112
+ },
113
+ props: [].concat(props, ["name", "size", "form", "type", "mask", "label", "modelValue", "height", "resize", "counter", "autosize", "disabled", "readonly", "tabindex", "clearable", "suffixIcon", "prefixIcon", "autocomplete", "showPassword", "validateEvent", "showWordLimit", "customClass", "displayOnly", "displayOnlyContent", "showEmptyValue", "popupMore", "showTooltip", "frontClearIcon", "hoverExpand"]),
114
+ setup: function setup$1(props2, context) {
115
+ return setup({
116
+ props: props2,
117
+ context,
118
+ renderless: renderless$1,
119
+ api: api$1
120
+ });
121
+ }
122
+ });
123
+ var render = function render2() {
124
+ var _vm = this;
125
+ var _h = _vm.$createElement;
126
+ var _c = _vm._self._c || _h;
127
+ return _c("div", {
128
+ class: _vm.m("relative text-xs sm:text-sm", _vm.type !== "textarea" || _vm.slots.prepend || _vm.slots.append ? "inline-table" : "", _vm.type !== "textarea" ? "w-full" : "align-bottom", _vm.slots.prepend || _vm.slots.append ? "leading-normal border-separate border-spacing-0" : "", _vm.$attrs.class),
129
+ style: _vm.$attrs.style,
130
+ attrs: {
131
+ "data-tag": "tiny-input"
132
+ },
133
+ on: {
134
+ "mouseenter": function mouseenter($event) {
135
+ _vm.state.hovering = true;
136
+ _vm.$emit("mouseenter", $event);
137
+ },
138
+ "mouseleave": function mouseleave($event) {
139
+ _vm.state.hovering = false;
140
+ _vm.$emit("mouseleave", $event);
141
+ },
142
+ "click": function click($event) {
143
+ return _vm.$emit("click", $event);
144
+ }
145
+ }
146
+ }, [_vm.type !== "textarea" ? [_vm.slots.prepend && !_vm.state.isDisplayOnly ? _c("div", {
147
+ ref: "prepend",
148
+ staticClass: "border-r-0 rounded-tr-none rounded-br-none bg-color-bg-2 text-color-text-placeholder border border-solid border-color-border rounded px-3 py-0 w-px align-middle table-cell relative whitespace-nowrap",
149
+ attrs: {
150
+ "data-tag": "tiny-input-prepend"
151
+ }
152
+ }, [_vm._t("prepend")], 2) : _vm._e(), _c("span", {
153
+ staticClass: "relative text-sm block",
154
+ class: [_vm.state.inputSizeMf !== "mini" ? "sm:text-sm" : "sm:text-xs"],
155
+ attrs: {
156
+ "data-tag": "tiny-input-display-only"
157
+ }
158
+ }, [_vm.state.isDisplayOnly ? _c("tiny-tooltip", {
159
+ attrs: {
160
+ "disabled": !_vm.showTooltip,
161
+ "effect": "light",
162
+ "content": _vm.state.displayOnlyTooltip,
163
+ "placement": "top",
164
+ "popper-class": _vm.state.tooltipConfig.popperClass || "",
165
+ "popper-options": {
166
+ bubbling: true
167
+ }
168
+ },
169
+ nativeOn: {
170
+ "mouseenter": function mouseenter($event) {
171
+ return _vm.handleEnterDisplayOnlyContent.apply(null, arguments);
172
+ }
173
+ }
174
+ }, [_vm.type === "password" ? _c("span", {
175
+ staticClass: "absolute top-0 left-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap leading-7 sm:leading-normal text-color-text-primary"
176
+ }, [_vm._v(_vm._s(_vm.state.hiddenPassword))]) : _vm.mask ? _c("span", {
177
+ staticClass: "absolute top-0 left-0 max-w-full flex items-center leading-7 sm:leading-normal text-color-text-primary"
178
+ }, [_c("span", {
179
+ staticClass: "flex-1 overflow-hidden text-ellipsis whitespace-nowrap mr-4"
180
+ }, [_vm._v(" " + _vm._s(_vm.state.displayedMaskValue) + " ")]), _c(_vm.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose", {
181
+ tag: "component",
182
+ nativeOn: {
183
+ "click": function click($event) {
184
+ _vm.state.maskValueVisible = !_vm.state.maskValueVisible;
185
+ }
186
+ }
187
+ })], 1) : _c("span", {
188
+ staticClass: "absolute top-0 left-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap leading-7 sm:leading-normal text-color-text-primary"
189
+ }, [_vm._v(" " + _vm._s(_vm.state.displayOnlyText) + " ")])]) : _vm._e(), _vm.type !== "textarea" ? _c("input", _vm._b({
190
+ ref: "input",
191
+ class: _vm.m("w-full border-0 sm:border px-0 sm:px-3 sm:border-solid sm:border-color-border sm:hover:border-color-border-hover sm:focus:border-color-brand-focus sm:disabled:border-color-border-separator placeholder:text-color-text-placeholder placeholder:text-sm sm:disabled:placeholder:text-color-text-disabled text-sm text-color-text-primary bg-color-bg-1 disabled:cursor-not-allowed disabled:text-color-text-disabled sm:disabled:text-color-text-disabled sm:disabled:bg-color-bg-6 py-0 outline-0 transition-colors duration-200 ease-in-out ", _vm.state.inputSizeMf === "medium" ? "h-8 leading-8 " + _vm.m("sm:text-sm") + " placeholder:text-sm" : _vm.state.inputSizeMf === "mini" ? "h-6 leading-6 text-xs placeholder:text-xs" : "h-7 leading-7", _vm.slots.prepend || _vm.slots.append ? "align-middle table-cell" : "inline-block", _vm.slots.prepend && _vm.slots.append ? "rounded-none" : _vm.slots.prepend ? "rounded-tl-none rounded-bl-none rounded-tr rounded-br" : _vm.slots.append ? "rounded-tl rounded-bl rounded-tr-none rounded-br-none" : "rounded", _vm.readonly ? " text-ellipsis overflow-hidden whitespace-nowrap" : "sm:border", (_vm.slots.prefix || _vm.prefixIcon) && (_vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword) ? "px-6 sm:px-6" : _vm.slots.prefix || _vm.prefixIcon ? "pl-6 sm:pl-6 pr-0 sm:pr-3" : _vm.slots.suffix || _vm.suffixIcon || _vm.clearable || _vm.showPassword ? "pl-0 sm:pl-3 pr-6 sm:pr-6" : "", _vm.mask && _vm.state.inputDisabled ? !_vm.state.maskValueVisible ? "font-[serif] pr-6 sm:pr-6" : "pr-6 sm:pr-6" : "", (_vm.slots.suffix || _vm.suffixIcon || _vm.showPassword) && _vm.clearable ? "pr-10 sm:pr-10" : "", _vm.state.isDisplayOnly ? "invisible h-auto leading-none border-0" : "", _vm.state.isWordLimitVisible ? _vm.clearable ? "pr-18 sm:pr-18" : "pr-14 sm:pr-14" : "", _vm.customClass),
192
+ attrs: {
193
+ "data-tag": "tiny-input-inner",
194
+ "name": _vm.name,
195
+ "tabindex": _vm.tabindex,
196
+ "type": _vm.showPassword ? _vm.state.passwordVisible ? "text" : "password" : _vm.type,
197
+ "disabled": _vm.state.inputDisabled,
198
+ "readonly": _vm.readonly,
199
+ "unselectable": _vm.readonly ? "on" : "off",
200
+ "autocomplete": _vm.autocomplete,
201
+ "aria-label": _vm.label
202
+ },
203
+ on: {
204
+ "compositionstart": _vm.handleCompositionStart,
205
+ "compositionupdate": _vm.handleCompositionUpdate,
206
+ "compositionend": _vm.handleCompositionEnd,
207
+ "input": _vm.handleInput,
208
+ "focus": _vm.handleFocus,
209
+ "blur": _vm.handleBlur,
210
+ "change": _vm.handleChange,
211
+ "keyup": function keyup($event) {
212
+ return _vm.$emit("keyup", $event);
213
+ },
214
+ "keydown": function keydown($event) {
215
+ return _vm.$emit("keydown", $event);
216
+ },
217
+ "paste": function paste($event) {
218
+ return _vm.$emit("paste", $event);
219
+ }
220
+ }
221
+ }, "input", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]"]), false)) : _vm._e()], 1), _vm.isMemoryStorage ? _c("tiny-tall-storage", {
222
+ attrs: {
223
+ "name": _vm.name,
224
+ "localstorage-data": _vm.storageData,
225
+ "is-memory-storage": _vm.isMemoryStorage
226
+ },
227
+ on: {
228
+ "selected": _vm.selectedMemory
229
+ }
230
+ }) : _vm._e(), (_vm.slots.prefix || _vm.prefixIcon) && !_vm.state.isDisplayOnly ? _c("span", {
231
+ ref: "prefix",
232
+ staticClass: "left-2 transition-all duration-300 ease-in-out text-xs sm:text-sm absolute top-1/2 -translate-y-1/2 text-center text-color-text-placeholder flex items-center",
233
+ attrs: {
234
+ "data-tag": "tiny-input-prefix"
235
+ }
236
+ }, [_vm._t("prefix"), _vm.prefixIcon ? _c(_vm.prefixIcon, {
237
+ tag: "component",
238
+ class: _vm.m("text-center transition-all duration-300 ease-in-out text-xs sm:text-sm", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7")
239
+ }) : _vm._e()], 2) : _vm._e(), !_vm.state.isDisplayOnly && _vm.getSuffixVisible() ? _c("span", {
240
+ ref: "suffix",
241
+ staticClass: "right-2 transition-all duration-300 ease-in-out pointer-events-none text-xs absolute top-1/2 -translate-y-1/2 text-center text-color-text-placeholder flex items-center z-[1]",
242
+ attrs: {
243
+ "data-tag": "tiny-input-suffix"
244
+ }
245
+ }, [_c("span", {
246
+ staticClass: "pointer-events-auto text-xs flex justify-start items-center"
247
+ }, [_vm.state.showClear ? _c("icon-close", {
248
+ class: _vm.m("hidden sm:block text-center transition-all duration-300 ease-in-out text-xs cursor-pointer", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7"),
249
+ on: {
250
+ "mousedown": function mousedown($event) {
251
+ $event.preventDefault();
252
+ },
253
+ "click": _vm.clear
254
+ }
255
+ }) : _vm._e(), !_vm.state.showClear || !_vm.state.showPwdVisible || !_vm.state.isWordLimitVisible ? [_vm._t("suffix"), _vm.suffixIcon ? _c(_vm.suffixIcon, {
256
+ tag: "component",
257
+ class: _vm.m("text-center transition-all duration-300 ease-in-out text-xs", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7")
258
+ }) : _vm._e()] : _vm._e(), _vm.state.showClear ? _c("icon-error", {
259
+ class: _vm.m("text-center transition-all duration-300 ease-in-out text-xs cursor-pointer fill-color-none-hover block sm:hidden", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7"),
260
+ on: {
261
+ "mousedown": function mousedown($event) {
262
+ $event.preventDefault();
263
+ },
264
+ "click": _vm.clear
265
+ }
266
+ }) : _vm._e(), _vm.showPassword ? _c(_vm.state.passwordVisible ? "icon-eyeopen" : "icon-eyeclose", {
267
+ tag: "component",
268
+ class: _vm.m("text-center transition-all duration-300 ease-in-out text-xs", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7"),
269
+ nativeOn: {
270
+ "click": function click($event) {
271
+ return _vm.handlePasswordVisible.apply(null, arguments);
272
+ }
273
+ }
274
+ }) : _vm._e(), _vm.mask && _vm.state.inputDisabled ? _c(_vm.state.maskValueVisible ? "icon-eyeopen" : "icon-eyeclose", {
275
+ tag: "component",
276
+ class: _vm.m("text-center transition-all duration-300 ease-in-out text-xs fill-color-text-placeholder", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7"),
277
+ nativeOn: {
278
+ "click": function click($event) {
279
+ _vm.state.maskValueVisible = !_vm.state.maskValueVisible;
280
+ }
281
+ }
282
+ }) : _vm._e(), _vm.state.isWordLimitVisible ? _c("span", {
283
+ staticClass: "h-full inline-flex items-center text-xs sm:text-sm text-color-text-placeholder"
284
+ }, [_c("span", {
285
+ staticClass: "bg-color-bg-1 leading-none inline-block"
286
+ }, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))])]) : _vm._e()], 2), _vm.state.validateState ? _c("i", {
287
+ class: _vm.m("text-center transition-all duration-300 ease-in-out text-xs pointer-events-none", _vm.state.inputSizeMf === "medium" ? "leading-8" : _vm.state.inputSizeMf === "mini" ? "leading-6" : "leading-7", _vm.state.validateIcon)
288
+ }) : _vm._e()]) : _vm._e(), _vm.slots.append && !_vm.state.isDisplayOnly ? _c("div", {
289
+ ref: "append",
290
+ staticClass: "border-l-0 rounded-tl-none rounded-bl-none bg-color-bg-2 text-color-text-placeholder border border-solid border-color-border rounded-tr rounded-br px-3 py-0 w-px align-middle table-cell relative whitespace-nowrap"
291
+ }, [_vm._t("append")], 2) : _vm._e(), _vm.slots.panel && !_vm.state.isDisplayOnly ? _c("div", {
292
+ ref: "panel"
293
+ }, [_vm._t("panel")], 2) : _vm._e()] : _c("span", {
294
+ class: [_vm.hoverExpand && "relative block h-7 w-full", _vm.state.isDisplayOnly && _vm.hoverExpand && "h-auto"],
295
+ attrs: {
296
+ "data-tag": "tiny-input-textarea"
297
+ }
298
+ }, [_vm.state.isDisplayOnly ? _c("tiny-tooltip", {
299
+ attrs: {
300
+ "disabled": !_vm.showTooltip,
301
+ "effect": "light",
302
+ "content": _vm.state.displayOnlyTooltip,
303
+ "placement": "top",
304
+ "popper-class": _vm.state.tooltipConfig.popperClass || "",
305
+ "popper-options": {
306
+ bubbling: true
307
+ }
308
+ },
309
+ nativeOn: {
310
+ "mouseenter": function mouseenter($event) {
311
+ return _vm.handleEnterDisplayOnlyContent($event, "textarea");
312
+ }
313
+ }
314
+ }, [_c("div", {
315
+ staticClass: "flex"
316
+ }, [_c("span", {
317
+ ref: "textBox",
318
+ staticClass: "text-box max-w-full break-words line-clamp-5 text-sm text-color-text-primary before:content-[''] before:float-right before:h-full before:-mb-4",
319
+ class: [_vm.state.inputSizeMf !== "mini" ? "sm:text-sm" : "sm:text-xs", _vm.hoverExpand && "relative left-0 max-w-full leading-normal line-clamp-1", _vm.autosize ? "left-0 max-w-full break-words whitespace-pre-line leading-normal" : "left-0 max-w-full text-ellipsis overflow-hidden break-words whitespace-pre-wrap line-clamp-5"],
320
+ on: {
321
+ "click": function click($event) {
322
+ _vm.state.showDisplayOnlyBox = true;
323
+ }
324
+ }
325
+ }, [_vm.state.showMoreBtn ? _c("span", {
326
+ staticClass: "float-right relative top-px clear-both text-color-brand text-sm leading-3 cursor-pointer"
327
+ }, [_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", {
328
+ attrs: {
329
+ "title": _vm.t("ui.input.detail"),
330
+ "width": "1000px",
331
+ "visible": _vm.state.showDisplayOnlyBox,
332
+ "append-to-body": true,
333
+ "close-on-click-modal": false
334
+ },
335
+ on: {
336
+ "update:visible": function updateVisible($event) {
337
+ _vm.state.showDisplayOnlyBox = $event;
338
+ }
339
+ },
340
+ scopedSlots: _vm._u([{
341
+ key: "footer",
342
+ fn: function fn() {
343
+ return [_c("tiny-button", {
344
+ on: {
345
+ "click": function click($event) {
346
+ _vm.state.showDisplayOnlyBox = false;
347
+ }
348
+ }
349
+ }, [_vm._v(_vm._s(_vm.t("ui.input.close")))])];
350
+ },
351
+ proxy: true
352
+ }], null, false, 2786811157)
353
+ }, [_c("div", [_vm._v(_vm._s(_vm.state.displayOnlyText))])]) : _vm._e(), _c("textarea", _vm._b({
354
+ ref: "textarea",
355
+ staticClass: "block w-full border-0 sm:border-solid sm:border-color-border sm:hover:border-color-border-hover sm:focus:border-color-brand-focus sm:disabled:border-color-border-separator outline-0 rounded placeholder:text-color-text-placeholder placeholder:text-sm sm:disabled:placeholder:text-color-text-disabled text-sm text-color-text-primary bg-color-bg-1 disabled:cursor-not-allowed disabled:text-color-text-disabled sm:disabled:text-color-text-disabled sm:disabled:bg-color-bg-6",
356
+ class: [_vm.readonly ? "sm:border-0 px-0 py-0" : "sm:border px-3 ", _vm.state.isDisplayOnly ? "hidden" : "", _vm.state.inputSizeMf !== "mini" ? "sm:placeholder:text-sm sm:text-sm" : "sm:placeholder:text-xs sm:text-xs", _vm.hoverExpand && "min-w-40 absolute h-7 z-[2000] top-0 left-0", _vm.hoverExpand && _vm.state.enteredTextarea ? "py-2 leading-normal" : "py-0 leading-[1.625rem]", _vm.hoverExpand && !_vm.state.enteredTextarea && "min-h-7 px-2 leading-7 overflow-hidden"],
357
+ style: _vm.state.textareaStyle,
358
+ attrs: {
359
+ "tabindex": _vm.tabindex,
360
+ "disabled": _vm.state.inputDisabled,
361
+ "readonly": _vm.readonly,
362
+ "unselectable": _vm.readonly ? "on" : "off",
363
+ "autocomplete": _vm.autocomplete,
364
+ "aria-label": _vm.label
365
+ },
366
+ on: {
367
+ "compositionstart": _vm.handleCompositionStart,
368
+ "compositionupdate": _vm.handleCompositionUpdate,
369
+ "compositionend": _vm.handleCompositionEnd,
370
+ "input": _vm.handleInput,
371
+ "focus": _vm.handleFocus,
372
+ "blur": _vm.handleBlur,
373
+ "change": _vm.handleChange,
374
+ "mouseenter": function mouseenter($event) {
375
+ return _vm.handleEnterTextarea($event);
376
+ },
377
+ "mouseleave": function mouseleave($event) {
378
+ return _vm.handleLeaveTextarea($event);
379
+ }
380
+ }
381
+ }, "textarea", _vm.a(_vm.$attrs, ["type", "class", "style", "^on[A-Z]"]), false))], 1), _vm.state.isWordLimitVisible && _vm.type === "textarea" ? _c("span", {
382
+ staticClass: "bg-color-bg-1 text-color-text-placeholder text-xs sm:text-sm absolute bottom-1 right-3",
383
+ attrs: {
384
+ "data-tag": "tiny-input-limit"
385
+ }
386
+ }, [_vm._v(_vm._s(_vm.state.showWordLimit ? _vm.state.textLength + "/" + _vm.state.upperLimit : _vm.state.textLength))]) : _vm._e(), _vm._t("default")], 2);
387
+ };
388
+ var staticRenderFns = [];
389
+ var __cssModules = {};
390
+ var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
391
+ function __vue2_injectStyles(context) {
392
+ for (var o in __cssModules) {
393
+ this[o] = __cssModules[o];
394
+ }
395
+ }
396
+ var mobileFirst = /* @__PURE__ */ function() {
397
+ return __component__.exports;
398
+ }();
399
+
400
+ export { mobileFirst as default };