@element-plus/nightly 0.0.20230506 → 0.0.20230507

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.
Files changed (288) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar.js +1 -1
  12. package/dist/locale/ar.min.js +1 -1
  13. package/dist/locale/ar.min.mjs +1 -1
  14. package/dist/locale/ar.mjs +1 -1
  15. package/dist/locale/az.js +1 -1
  16. package/dist/locale/az.min.js +1 -1
  17. package/dist/locale/az.min.mjs +1 -1
  18. package/dist/locale/az.mjs +1 -1
  19. package/dist/locale/bg.js +1 -1
  20. package/dist/locale/bg.min.js +1 -1
  21. package/dist/locale/bg.min.mjs +1 -1
  22. package/dist/locale/bg.mjs +1 -1
  23. package/dist/locale/bn.js +1 -1
  24. package/dist/locale/bn.min.js +1 -1
  25. package/dist/locale/bn.min.mjs +1 -1
  26. package/dist/locale/bn.mjs +1 -1
  27. package/dist/locale/ca.js +1 -1
  28. package/dist/locale/ca.min.js +1 -1
  29. package/dist/locale/ca.min.mjs +1 -1
  30. package/dist/locale/ca.mjs +1 -1
  31. package/dist/locale/ckb.js +1 -1
  32. package/dist/locale/ckb.min.js +1 -1
  33. package/dist/locale/ckb.min.mjs +1 -1
  34. package/dist/locale/ckb.mjs +1 -1
  35. package/dist/locale/cs.js +1 -1
  36. package/dist/locale/cs.min.js +1 -1
  37. package/dist/locale/cs.min.mjs +1 -1
  38. package/dist/locale/cs.mjs +1 -1
  39. package/dist/locale/da.js +1 -1
  40. package/dist/locale/da.min.js +1 -1
  41. package/dist/locale/da.min.mjs +1 -1
  42. package/dist/locale/da.mjs +1 -1
  43. package/dist/locale/de.js +1 -1
  44. package/dist/locale/de.min.js +1 -1
  45. package/dist/locale/de.min.mjs +1 -1
  46. package/dist/locale/de.mjs +1 -1
  47. package/dist/locale/el.js +1 -1
  48. package/dist/locale/el.min.js +1 -1
  49. package/dist/locale/el.min.mjs +1 -1
  50. package/dist/locale/el.mjs +1 -1
  51. package/dist/locale/en.js +1 -1
  52. package/dist/locale/en.min.js +1 -1
  53. package/dist/locale/en.min.mjs +1 -1
  54. package/dist/locale/en.mjs +1 -1
  55. package/dist/locale/eo.js +1 -1
  56. package/dist/locale/eo.min.js +1 -1
  57. package/dist/locale/eo.min.mjs +1 -1
  58. package/dist/locale/eo.mjs +1 -1
  59. package/dist/locale/es.js +1 -1
  60. package/dist/locale/es.min.js +1 -1
  61. package/dist/locale/es.min.mjs +1 -1
  62. package/dist/locale/es.mjs +1 -1
  63. package/dist/locale/et.js +1 -1
  64. package/dist/locale/et.min.js +1 -1
  65. package/dist/locale/et.min.mjs +1 -1
  66. package/dist/locale/et.mjs +1 -1
  67. package/dist/locale/eu.js +1 -1
  68. package/dist/locale/eu.min.js +1 -1
  69. package/dist/locale/eu.min.mjs +1 -1
  70. package/dist/locale/eu.mjs +1 -1
  71. package/dist/locale/fa.js +1 -1
  72. package/dist/locale/fa.min.js +1 -1
  73. package/dist/locale/fa.min.mjs +1 -1
  74. package/dist/locale/fa.mjs +1 -1
  75. package/dist/locale/fi.js +1 -1
  76. package/dist/locale/fi.min.js +1 -1
  77. package/dist/locale/fi.min.mjs +1 -1
  78. package/dist/locale/fi.mjs +1 -1
  79. package/dist/locale/fr.js +1 -1
  80. package/dist/locale/fr.min.js +1 -1
  81. package/dist/locale/fr.min.mjs +1 -1
  82. package/dist/locale/fr.mjs +1 -1
  83. package/dist/locale/he.js +1 -1
  84. package/dist/locale/he.min.js +1 -1
  85. package/dist/locale/he.min.mjs +1 -1
  86. package/dist/locale/he.mjs +1 -1
  87. package/dist/locale/hr.js +1 -1
  88. package/dist/locale/hr.min.js +1 -1
  89. package/dist/locale/hr.min.mjs +1 -1
  90. package/dist/locale/hr.mjs +1 -1
  91. package/dist/locale/hu.js +1 -1
  92. package/dist/locale/hu.min.js +1 -1
  93. package/dist/locale/hu.min.mjs +1 -1
  94. package/dist/locale/hu.mjs +1 -1
  95. package/dist/locale/hy-am.js +1 -1
  96. package/dist/locale/hy-am.min.js +1 -1
  97. package/dist/locale/hy-am.min.mjs +1 -1
  98. package/dist/locale/hy-am.mjs +1 -1
  99. package/dist/locale/id.js +1 -1
  100. package/dist/locale/id.min.js +1 -1
  101. package/dist/locale/id.min.mjs +1 -1
  102. package/dist/locale/id.mjs +1 -1
  103. package/dist/locale/it.js +1 -1
  104. package/dist/locale/it.min.js +1 -1
  105. package/dist/locale/it.min.mjs +1 -1
  106. package/dist/locale/it.mjs +1 -1
  107. package/dist/locale/ja.js +1 -1
  108. package/dist/locale/ja.min.js +1 -1
  109. package/dist/locale/ja.min.mjs +1 -1
  110. package/dist/locale/ja.mjs +1 -1
  111. package/dist/locale/kk.js +1 -1
  112. package/dist/locale/kk.min.js +1 -1
  113. package/dist/locale/kk.min.mjs +1 -1
  114. package/dist/locale/kk.mjs +1 -1
  115. package/dist/locale/km.js +1 -1
  116. package/dist/locale/km.min.js +1 -1
  117. package/dist/locale/km.min.mjs +1 -1
  118. package/dist/locale/km.mjs +1 -1
  119. package/dist/locale/ko.js +1 -1
  120. package/dist/locale/ko.min.js +1 -1
  121. package/dist/locale/ko.min.mjs +1 -1
  122. package/dist/locale/ko.mjs +1 -1
  123. package/dist/locale/ku.js +1 -1
  124. package/dist/locale/ku.min.js +1 -1
  125. package/dist/locale/ku.min.mjs +1 -1
  126. package/dist/locale/ku.mjs +1 -1
  127. package/dist/locale/ky.js +1 -1
  128. package/dist/locale/ky.min.js +1 -1
  129. package/dist/locale/ky.min.mjs +1 -1
  130. package/dist/locale/ky.mjs +1 -1
  131. package/dist/locale/lt.js +1 -1
  132. package/dist/locale/lt.min.js +1 -1
  133. package/dist/locale/lt.min.mjs +1 -1
  134. package/dist/locale/lt.mjs +1 -1
  135. package/dist/locale/lv.js +1 -1
  136. package/dist/locale/lv.min.js +1 -1
  137. package/dist/locale/lv.min.mjs +1 -1
  138. package/dist/locale/lv.mjs +1 -1
  139. package/dist/locale/mg.js +1 -1
  140. package/dist/locale/mg.min.js +1 -1
  141. package/dist/locale/mg.min.mjs +1 -1
  142. package/dist/locale/mg.mjs +1 -1
  143. package/dist/locale/mn.js +1 -1
  144. package/dist/locale/mn.min.js +1 -1
  145. package/dist/locale/mn.min.mjs +1 -1
  146. package/dist/locale/mn.mjs +1 -1
  147. package/dist/locale/nb-no.js +1 -1
  148. package/dist/locale/nb-no.min.js +1 -1
  149. package/dist/locale/nb-no.min.mjs +1 -1
  150. package/dist/locale/nb-no.mjs +1 -1
  151. package/dist/locale/nl.js +1 -1
  152. package/dist/locale/nl.min.js +1 -1
  153. package/dist/locale/nl.min.mjs +1 -1
  154. package/dist/locale/nl.mjs +1 -1
  155. package/dist/locale/pa.js +1 -1
  156. package/dist/locale/pa.min.js +1 -1
  157. package/dist/locale/pa.min.mjs +1 -1
  158. package/dist/locale/pa.mjs +1 -1
  159. package/dist/locale/pl.js +1 -1
  160. package/dist/locale/pl.min.js +1 -1
  161. package/dist/locale/pl.min.mjs +1 -1
  162. package/dist/locale/pl.mjs +1 -1
  163. package/dist/locale/pt-br.js +1 -1
  164. package/dist/locale/pt-br.min.js +1 -1
  165. package/dist/locale/pt-br.min.mjs +1 -1
  166. package/dist/locale/pt-br.mjs +1 -1
  167. package/dist/locale/pt.js +1 -1
  168. package/dist/locale/pt.min.js +1 -1
  169. package/dist/locale/pt.min.mjs +1 -1
  170. package/dist/locale/pt.mjs +1 -1
  171. package/dist/locale/ro.js +1 -1
  172. package/dist/locale/ro.min.js +1 -1
  173. package/dist/locale/ro.min.mjs +1 -1
  174. package/dist/locale/ro.mjs +1 -1
  175. package/dist/locale/ru.js +1 -1
  176. package/dist/locale/ru.min.js +1 -1
  177. package/dist/locale/ru.min.mjs +1 -1
  178. package/dist/locale/ru.mjs +1 -1
  179. package/dist/locale/sk.js +1 -1
  180. package/dist/locale/sk.min.js +1 -1
  181. package/dist/locale/sk.min.mjs +1 -1
  182. package/dist/locale/sk.mjs +1 -1
  183. package/dist/locale/sl.js +1 -1
  184. package/dist/locale/sl.min.js +1 -1
  185. package/dist/locale/sl.min.mjs +1 -1
  186. package/dist/locale/sl.mjs +1 -1
  187. package/dist/locale/sr.js +1 -1
  188. package/dist/locale/sr.min.js +1 -1
  189. package/dist/locale/sr.min.mjs +1 -1
  190. package/dist/locale/sr.mjs +1 -1
  191. package/dist/locale/sv.js +1 -1
  192. package/dist/locale/sv.min.js +1 -1
  193. package/dist/locale/sv.min.mjs +1 -1
  194. package/dist/locale/sv.mjs +1 -1
  195. package/dist/locale/ta.js +1 -1
  196. package/dist/locale/ta.min.js +1 -1
  197. package/dist/locale/ta.min.mjs +1 -1
  198. package/dist/locale/ta.mjs +1 -1
  199. package/dist/locale/th.js +1 -1
  200. package/dist/locale/th.min.js +1 -1
  201. package/dist/locale/th.min.mjs +1 -1
  202. package/dist/locale/th.mjs +1 -1
  203. package/dist/locale/tk.js +1 -1
  204. package/dist/locale/tk.min.js +1 -1
  205. package/dist/locale/tk.min.mjs +1 -1
  206. package/dist/locale/tk.mjs +1 -1
  207. package/dist/locale/tr.js +1 -1
  208. package/dist/locale/tr.min.js +1 -1
  209. package/dist/locale/tr.min.mjs +1 -1
  210. package/dist/locale/tr.mjs +1 -1
  211. package/dist/locale/ug-cn.js +1 -1
  212. package/dist/locale/ug-cn.min.js +1 -1
  213. package/dist/locale/ug-cn.min.mjs +1 -1
  214. package/dist/locale/ug-cn.mjs +1 -1
  215. package/dist/locale/uk.js +1 -1
  216. package/dist/locale/uk.min.js +1 -1
  217. package/dist/locale/uk.min.mjs +1 -1
  218. package/dist/locale/uk.mjs +1 -1
  219. package/dist/locale/uz-uz.js +1 -1
  220. package/dist/locale/uz-uz.min.js +1 -1
  221. package/dist/locale/uz-uz.min.mjs +1 -1
  222. package/dist/locale/uz-uz.mjs +1 -1
  223. package/dist/locale/vi.js +1 -1
  224. package/dist/locale/vi.min.js +1 -1
  225. package/dist/locale/vi.min.mjs +1 -1
  226. package/dist/locale/vi.mjs +1 -1
  227. package/dist/locale/zh-cn.js +1 -1
  228. package/dist/locale/zh-cn.min.js +1 -1
  229. package/dist/locale/zh-cn.min.mjs +1 -1
  230. package/dist/locale/zh-cn.mjs +1 -1
  231. package/dist/locale/zh-tw.js +1 -1
  232. package/dist/locale/zh-tw.min.js +1 -1
  233. package/dist/locale/zh-tw.min.mjs +1 -1
  234. package/dist/locale/zh-tw.mjs +1 -1
  235. package/es/components/image-viewer/index.mjs +2 -2
  236. package/es/components/image-viewer/src/image-viewer.mjs +38 -396
  237. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  238. package/es/components/image-viewer/src/image-viewer2.mjs +396 -38
  239. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  240. package/es/components/index.mjs +3 -3
  241. package/es/components/input/index.mjs +2 -2
  242. package/es/components/input/src/input.mjs +105 -455
  243. package/es/components/input/src/input.mjs.map +1 -1
  244. package/es/components/input/src/input2.mjs +455 -105
  245. package/es/components/input/src/input2.mjs.map +1 -1
  246. package/es/components/scrollbar/src/bar.mjs +17 -42
  247. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  248. package/es/components/scrollbar/src/bar2.mjs +42 -17
  249. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  250. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  251. package/es/components/upload/index.mjs +1 -1
  252. package/es/components/upload/src/upload-list.mjs +26 -173
  253. package/es/components/upload/src/upload-list.mjs.map +1 -1
  254. package/es/components/upload/src/upload-list2.mjs +173 -26
  255. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  256. package/es/components/upload/src/upload2.mjs +1 -1
  257. package/es/index.mjs +3 -3
  258. package/es/version.d.ts +1 -1
  259. package/es/version.mjs +1 -1
  260. package/es/version.mjs.map +1 -1
  261. package/lib/components/image-viewer/index.js +2 -2
  262. package/lib/components/image-viewer/src/image-viewer.js +39 -396
  263. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  264. package/lib/components/image-viewer/src/image-viewer2.js +396 -39
  265. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  266. package/lib/components/index.js +3 -3
  267. package/lib/components/input/index.js +2 -2
  268. package/lib/components/input/src/input.js +105 -454
  269. package/lib/components/input/src/input.js.map +1 -1
  270. package/lib/components/input/src/input2.js +454 -105
  271. package/lib/components/input/src/input2.js.map +1 -1
  272. package/lib/components/scrollbar/src/bar.js +17 -42
  273. package/lib/components/scrollbar/src/bar.js.map +1 -1
  274. package/lib/components/scrollbar/src/bar2.js +42 -17
  275. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  276. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  277. package/lib/components/upload/index.js +1 -1
  278. package/lib/components/upload/src/upload-list.js +27 -173
  279. package/lib/components/upload/src/upload-list.js.map +1 -1
  280. package/lib/components/upload/src/upload-list2.js +173 -27
  281. package/lib/components/upload/src/upload-list2.js.map +1 -1
  282. package/lib/components/upload/src/upload2.js +1 -1
  283. package/lib/index.js +3 -3
  284. package/lib/version.d.ts +1 -1
  285. package/lib/version.js +1 -1
  286. package/lib/version.js.map +1 -1
  287. package/package.json +2 -2
  288. package/web-types.json +1 -1
@@ -2,117 +2,466 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var shared = require('@vue/shared');
5
+ var vue = require('vue');
6
+ var core = require('@vueuse/core');
7
+ var lodashUnified = require('lodash-unified');
8
+ var index$3 = require('../../icon/index.js');
9
+ var iconsVue = require('@element-plus/icons-vue');
10
+ require('../../form/index.js');
6
11
  require('../../../utils/index.js');
7
- require('../../../constants/index.js');
8
12
  require('../../../hooks/index.js');
9
- var runtime = require('../../../utils/vue/props/runtime.js');
10
- var index = require('../../../hooks/use-size/index.js');
13
+ require('../../../constants/index.js');
14
+ var utils = require('./utils.js');
15
+ var input = require('./input.js');
16
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
17
+ var index = require('../../../hooks/use-attrs/index.js');
18
+ var useFormItem = require('../../form/src/hooks/use-form-item.js');
19
+ var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
20
+ var index$1 = require('../../../hooks/use-namespace/index.js');
11
21
  var icon = require('../../../utils/vue/icon.js');
12
- var typescript = require('../../../utils/typescript.js');
22
+ var index$2 = require('../../../hooks/use-cursor/index.js');
23
+ var shared = require('@vue/shared');
13
24
  var event = require('../../../constants/event.js');
25
+ var i18n = require('../../../utils/i18n.js');
26
+ var error = require('../../../utils/error.js');
14
27
 
15
- const inputProps = runtime.buildProps({
16
- id: {
17
- type: String,
18
- default: void 0
19
- },
20
- size: index.useSizeProp,
21
- disabled: Boolean,
22
- modelValue: {
23
- type: runtime.definePropType([
24
- String,
25
- Number,
26
- Object
27
- ]),
28
- default: ""
29
- },
30
- type: {
31
- type: String,
32
- default: "text"
33
- },
34
- resize: {
35
- type: String,
36
- values: ["none", "both", "horizontal", "vertical"]
37
- },
38
- autosize: {
39
- type: runtime.definePropType([Boolean, Object]),
40
- default: false
41
- },
42
- autocomplete: {
43
- type: String,
44
- default: "off"
45
- },
46
- formatter: {
47
- type: Function
48
- },
49
- parser: {
50
- type: Function
51
- },
52
- placeholder: {
53
- type: String
54
- },
55
- form: {
56
- type: String
57
- },
58
- readonly: {
59
- type: Boolean,
60
- default: false
61
- },
62
- clearable: {
63
- type: Boolean,
64
- default: false
65
- },
66
- showPassword: {
67
- type: Boolean,
68
- default: false
69
- },
70
- showWordLimit: {
71
- type: Boolean,
72
- default: false
73
- },
74
- suffixIcon: {
75
- type: icon.iconPropType
76
- },
77
- prefixIcon: {
78
- type: icon.iconPropType
79
- },
80
- containerRole: {
81
- type: String,
82
- default: void 0
83
- },
84
- label: {
85
- type: String,
86
- default: void 0
87
- },
88
- tabindex: {
89
- type: [String, Number],
90
- default: 0
91
- },
92
- validateEvent: {
93
- type: Boolean,
94
- default: true
95
- },
96
- inputStyle: {
97
- type: runtime.definePropType([Object, Array, String]),
98
- default: () => typescript.mutable({})
28
+ const _hoisted_1 = ["role"];
29
+ const _hoisted_2 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"];
30
+ const _hoisted_3 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"];
31
+ const __default__ = vue.defineComponent({
32
+ name: "ElInput",
33
+ inheritAttrs: false
34
+ });
35
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
+ ...__default__,
37
+ props: input.inputProps,
38
+ emits: input.inputEmits,
39
+ setup(__props, { expose, emit }) {
40
+ const props = __props;
41
+ const rawAttrs = vue.useAttrs();
42
+ const slots = vue.useSlots();
43
+ const containerAttrs = vue.computed(() => {
44
+ const comboBoxAttrs = {};
45
+ if (props.containerRole === "combobox") {
46
+ comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
47
+ comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
48
+ comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
49
+ }
50
+ return comboBoxAttrs;
51
+ });
52
+ const containerKls = vue.computed(() => [
53
+ props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
54
+ nsInput.m(inputSize.value),
55
+ nsInput.is("disabled", inputDisabled.value),
56
+ nsInput.is("exceed", inputExceed.value),
57
+ {
58
+ [nsInput.b("group")]: slots.prepend || slots.append,
59
+ [nsInput.bm("group", "append")]: slots.append,
60
+ [nsInput.bm("group", "prepend")]: slots.prepend,
61
+ [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
62
+ [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
63
+ [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value
64
+ },
65
+ rawAttrs.class
66
+ ]);
67
+ const wrapperKls = vue.computed(() => [
68
+ nsInput.e("wrapper"),
69
+ nsInput.is("focus", focused.value)
70
+ ]);
71
+ const attrs = index.useAttrs({
72
+ excludeKeys: vue.computed(() => {
73
+ return Object.keys(containerAttrs.value);
74
+ })
75
+ });
76
+ const { form, formItem } = useFormItem.useFormItem();
77
+ const { inputId } = useFormItem.useFormItemInputId(props, {
78
+ formItemContext: formItem
79
+ });
80
+ const inputSize = useFormCommonProps.useFormSize();
81
+ const inputDisabled = useFormCommonProps.useFormDisabled();
82
+ const nsInput = index$1.useNamespace("input");
83
+ const nsTextarea = index$1.useNamespace("textarea");
84
+ const input = vue.shallowRef();
85
+ const textarea = vue.shallowRef();
86
+ const focused = vue.ref(false);
87
+ const hovering = vue.ref(false);
88
+ const isComposing = vue.ref(false);
89
+ const passwordVisible = vue.ref(false);
90
+ const countStyle = vue.ref();
91
+ const textareaCalcStyle = vue.shallowRef(props.inputStyle);
92
+ const _ref = vue.computed(() => input.value || textarea.value);
93
+ const needStatusIcon = vue.computed(() => {
94
+ var _a;
95
+ return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false;
96
+ });
97
+ const validateState = vue.computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
98
+ const validateIcon = vue.computed(() => validateState.value && icon.ValidateComponentsMap[validateState.value]);
99
+ const passwordIcon = vue.computed(() => passwordVisible.value ? iconsVue.View : iconsVue.Hide);
100
+ const containerStyle = vue.computed(() => [
101
+ rawAttrs.style,
102
+ props.inputStyle
103
+ ]);
104
+ const textareaStyle = vue.computed(() => [
105
+ props.inputStyle,
106
+ textareaCalcStyle.value,
107
+ { resize: props.resize }
108
+ ]);
109
+ const nativeInputValue = vue.computed(() => lodashUnified.isNil(props.modelValue) ? "" : String(props.modelValue));
110
+ const showClear = vue.computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
111
+ const showPwdVisible = vue.computed(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || focused.value));
112
+ const isWordLimitVisible = vue.computed(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
113
+ const textLength = vue.computed(() => nativeInputValue.value.length);
114
+ const inputExceed = vue.computed(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
115
+ const suffixVisible = vue.computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
116
+ const [recordCursor, setCursor] = index$2.useCursor(input);
117
+ core.useResizeObserver(textarea, (entries) => {
118
+ onceInitSizeTextarea();
119
+ if (!isWordLimitVisible.value || props.resize !== "both")
120
+ return;
121
+ const entry = entries[0];
122
+ const { width } = entry.contentRect;
123
+ countStyle.value = {
124
+ right: `calc(100% - ${width + 15 + 6}px)`
125
+ };
126
+ });
127
+ const resizeTextarea = () => {
128
+ const { type, autosize } = props;
129
+ if (!core.isClient || type !== "textarea" || !textarea.value)
130
+ return;
131
+ if (autosize) {
132
+ const minRows = shared.isObject(autosize) ? autosize.minRows : void 0;
133
+ const maxRows = shared.isObject(autosize) ? autosize.maxRows : void 0;
134
+ const textareaStyle2 = utils.calcTextareaHeight(textarea.value, minRows, maxRows);
135
+ textareaCalcStyle.value = {
136
+ overflowY: "hidden",
137
+ ...textareaStyle2
138
+ };
139
+ vue.nextTick(() => {
140
+ textarea.value.offsetHeight;
141
+ textareaCalcStyle.value = textareaStyle2;
142
+ });
143
+ } else {
144
+ textareaCalcStyle.value = {
145
+ minHeight: utils.calcTextareaHeight(textarea.value).minHeight
146
+ };
147
+ }
148
+ };
149
+ const createOnceInitResize = (resizeTextarea2) => {
150
+ let isInit = false;
151
+ return () => {
152
+ var _a;
153
+ if (isInit || !props.autosize)
154
+ return;
155
+ const isElHidden = ((_a = textarea.value) == null ? void 0 : _a.offsetParent) === null;
156
+ if (!isElHidden) {
157
+ resizeTextarea2();
158
+ isInit = true;
159
+ }
160
+ };
161
+ };
162
+ const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
163
+ const setNativeInputValue = () => {
164
+ const input2 = _ref.value;
165
+ if (!input2 || input2.value === nativeInputValue.value)
166
+ return;
167
+ input2.value = nativeInputValue.value;
168
+ };
169
+ const handleInput = async (event$1) => {
170
+ recordCursor();
171
+ let { value } = event$1.target;
172
+ if (props.formatter) {
173
+ value = props.parser ? props.parser(value) : value;
174
+ value = props.formatter(value);
175
+ }
176
+ if (isComposing.value)
177
+ return;
178
+ if (value === nativeInputValue.value) {
179
+ setNativeInputValue();
180
+ return;
181
+ }
182
+ emit(event.UPDATE_MODEL_EVENT, value);
183
+ emit("input", value);
184
+ await vue.nextTick();
185
+ setNativeInputValue();
186
+ setCursor();
187
+ };
188
+ const handleChange = (event) => {
189
+ emit("change", event.target.value);
190
+ };
191
+ const handleCompositionStart = (event) => {
192
+ emit("compositionstart", event);
193
+ isComposing.value = true;
194
+ };
195
+ const handleCompositionUpdate = (event) => {
196
+ var _a;
197
+ emit("compositionupdate", event);
198
+ const text = (_a = event.target) == null ? void 0 : _a.value;
199
+ const lastCharacter = text[text.length - 1] || "";
200
+ isComposing.value = !i18n.isKorean(lastCharacter);
201
+ };
202
+ const handleCompositionEnd = (event) => {
203
+ emit("compositionend", event);
204
+ if (isComposing.value) {
205
+ isComposing.value = false;
206
+ handleInput(event);
207
+ }
208
+ };
209
+ const handlePasswordVisible = () => {
210
+ passwordVisible.value = !passwordVisible.value;
211
+ focus();
212
+ };
213
+ const focus = async () => {
214
+ var _a;
215
+ await vue.nextTick();
216
+ (_a = _ref.value) == null ? void 0 : _a.focus();
217
+ };
218
+ const blur = () => {
219
+ var _a;
220
+ return (_a = _ref.value) == null ? void 0 : _a.blur();
221
+ };
222
+ const handleFocus = (event) => {
223
+ focused.value = true;
224
+ emit("focus", event);
225
+ };
226
+ const handleBlur = (event) => {
227
+ var _a;
228
+ focused.value = false;
229
+ emit("blur", event);
230
+ if (props.validateEvent) {
231
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => error.debugWarn(err));
232
+ }
233
+ };
234
+ const handleMouseLeave = (evt) => {
235
+ hovering.value = false;
236
+ emit("mouseleave", evt);
237
+ };
238
+ const handleMouseEnter = (evt) => {
239
+ hovering.value = true;
240
+ emit("mouseenter", evt);
241
+ };
242
+ const handleKeydown = (evt) => {
243
+ emit("keydown", evt);
244
+ };
245
+ const select = () => {
246
+ var _a;
247
+ (_a = _ref.value) == null ? void 0 : _a.select();
248
+ };
249
+ const clear = () => {
250
+ emit(event.UPDATE_MODEL_EVENT, "");
251
+ emit("change", "");
252
+ emit("clear");
253
+ emit("input", "");
254
+ };
255
+ vue.watch(() => props.modelValue, () => {
256
+ var _a;
257
+ vue.nextTick(() => resizeTextarea());
258
+ if (props.validateEvent) {
259
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => error.debugWarn(err));
260
+ }
261
+ });
262
+ vue.watch(nativeInputValue, () => setNativeInputValue());
263
+ vue.watch(() => props.type, async () => {
264
+ await vue.nextTick();
265
+ setNativeInputValue();
266
+ resizeTextarea();
267
+ });
268
+ vue.onMounted(() => {
269
+ if (!props.formatter && props.parser) {
270
+ error.debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
271
+ }
272
+ setNativeInputValue();
273
+ vue.nextTick(resizeTextarea);
274
+ });
275
+ expose({
276
+ input,
277
+ textarea,
278
+ ref: _ref,
279
+ textareaStyle,
280
+ autosize: vue.toRef(props, "autosize"),
281
+ focus,
282
+ blur,
283
+ select,
284
+ clear,
285
+ resizeTextarea
286
+ });
287
+ return (_ctx, _cache) => {
288
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", vue.mergeProps(vue.unref(containerAttrs), {
289
+ class: vue.unref(containerKls),
290
+ style: vue.unref(containerStyle),
291
+ role: _ctx.containerRole,
292
+ onMouseenter: handleMouseEnter,
293
+ onMouseleave: handleMouseLeave
294
+ }), [
295
+ vue.createCommentVNode(" input "),
296
+ _ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
297
+ vue.createCommentVNode(" prepend slot "),
298
+ _ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", {
299
+ key: 0,
300
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "prepend"))
301
+ }, [
302
+ vue.renderSlot(_ctx.$slots, "prepend")
303
+ ], 2)) : vue.createCommentVNode("v-if", true),
304
+ vue.createElementVNode("div", {
305
+ class: vue.normalizeClass(vue.unref(wrapperKls))
306
+ }, [
307
+ vue.createCommentVNode(" prefix slot "),
308
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", {
309
+ key: 0,
310
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix"))
311
+ }, [
312
+ vue.createElementVNode("span", {
313
+ class: vue.normalizeClass(vue.unref(nsInput).e("prefix-inner")),
314
+ onClick: focus
315
+ }, [
316
+ vue.renderSlot(_ctx.$slots, "prefix"),
317
+ _ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
318
+ key: 0,
319
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
320
+ }, {
321
+ default: vue.withCtx(() => [
322
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
323
+ ]),
324
+ _: 1
325
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
326
+ ], 2)
327
+ ], 2)) : vue.createCommentVNode("v-if", true),
328
+ vue.createElementVNode("input", vue.mergeProps({
329
+ id: vue.unref(inputId),
330
+ ref_key: "input",
331
+ ref: input,
332
+ class: vue.unref(nsInput).e("inner")
333
+ }, vue.unref(attrs), {
334
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
335
+ disabled: vue.unref(inputDisabled),
336
+ formatter: _ctx.formatter,
337
+ parser: _ctx.parser,
338
+ readonly: _ctx.readonly,
339
+ autocomplete: _ctx.autocomplete,
340
+ tabindex: _ctx.tabindex,
341
+ "aria-label": _ctx.label,
342
+ placeholder: _ctx.placeholder,
343
+ style: _ctx.inputStyle,
344
+ form: props.form,
345
+ onCompositionstart: handleCompositionStart,
346
+ onCompositionupdate: handleCompositionUpdate,
347
+ onCompositionend: handleCompositionEnd,
348
+ onInput: handleInput,
349
+ onFocus: handleFocus,
350
+ onBlur: handleBlur,
351
+ onChange: handleChange,
352
+ onKeydown: handleKeydown
353
+ }), null, 16, _hoisted_2),
354
+ vue.createCommentVNode(" suffix slot "),
355
+ vue.unref(suffixVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
356
+ key: 1,
357
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix"))
358
+ }, [
359
+ vue.createElementVNode("span", {
360
+ class: vue.normalizeClass(vue.unref(nsInput).e("suffix-inner")),
361
+ onClick: focus
362
+ }, [
363
+ !vue.unref(showClear) || !vue.unref(showPwdVisible) || !vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
364
+ vue.renderSlot(_ctx.$slots, "suffix"),
365
+ _ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
366
+ key: 0,
367
+ class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
368
+ }, {
369
+ default: vue.withCtx(() => [
370
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.suffixIcon)))
371
+ ]),
372
+ _: 1
373
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
374
+ ], 64)) : vue.createCommentVNode("v-if", true),
375
+ vue.unref(showClear) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
376
+ key: 1,
377
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("clear")]),
378
+ onMousedown: vue.withModifiers(vue.unref(shared.NOOP), ["prevent"]),
379
+ onClick: clear
380
+ }, {
381
+ default: vue.withCtx(() => [
382
+ vue.createVNode(vue.unref(iconsVue.CircleClose))
383
+ ]),
384
+ _: 1
385
+ }, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true),
386
+ vue.unref(showPwdVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
387
+ key: 2,
388
+ class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("password")]),
389
+ onClick: handlePasswordVisible
390
+ }, {
391
+ default: vue.withCtx(() => [
392
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(passwordIcon))))
393
+ ]),
394
+ _: 1
395
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
396
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
397
+ key: 3,
398
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
399
+ }, [
400
+ vue.createElementVNode("span", {
401
+ class: vue.normalizeClass(vue.unref(nsInput).e("count-inner"))
402
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 3)
403
+ ], 2)) : vue.createCommentVNode("v-if", true),
404
+ vue.unref(validateState) && vue.unref(validateIcon) && vue.unref(needStatusIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
405
+ key: 4,
406
+ class: vue.normalizeClass([
407
+ vue.unref(nsInput).e("icon"),
408
+ vue.unref(nsInput).e("validateIcon"),
409
+ vue.unref(nsInput).is("loading", vue.unref(validateState) === "validating")
410
+ ])
411
+ }, {
412
+ default: vue.withCtx(() => [
413
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(validateIcon))))
414
+ ]),
415
+ _: 1
416
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
417
+ ], 2)
418
+ ], 2)) : vue.createCommentVNode("v-if", true)
419
+ ], 2),
420
+ vue.createCommentVNode(" append slot "),
421
+ _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
422
+ key: 1,
423
+ class: vue.normalizeClass(vue.unref(nsInput).be("group", "append"))
424
+ }, [
425
+ vue.renderSlot(_ctx.$slots, "append")
426
+ ], 2)) : vue.createCommentVNode("v-if", true)
427
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
428
+ vue.createCommentVNode(" textarea "),
429
+ vue.createElementVNode("textarea", vue.mergeProps({
430
+ id: vue.unref(inputId),
431
+ ref_key: "textarea",
432
+ ref: textarea,
433
+ class: vue.unref(nsTextarea).e("inner")
434
+ }, vue.unref(attrs), {
435
+ tabindex: _ctx.tabindex,
436
+ disabled: vue.unref(inputDisabled),
437
+ readonly: _ctx.readonly,
438
+ autocomplete: _ctx.autocomplete,
439
+ style: vue.unref(textareaStyle),
440
+ "aria-label": _ctx.label,
441
+ placeholder: _ctx.placeholder,
442
+ form: props.form,
443
+ onCompositionstart: handleCompositionStart,
444
+ onCompositionupdate: handleCompositionUpdate,
445
+ onCompositionend: handleCompositionEnd,
446
+ onInput: handleInput,
447
+ onFocus: handleFocus,
448
+ onBlur: handleBlur,
449
+ onChange: handleChange,
450
+ onKeydown: handleKeydown
451
+ }), null, 16, _hoisted_3),
452
+ vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
453
+ key: 0,
454
+ style: vue.normalizeStyle(countStyle.value),
455
+ class: vue.normalizeClass(vue.unref(nsInput).e("count"))
456
+ }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(vue.unref(attrs).maxlength), 7)) : vue.createCommentVNode("v-if", true)
457
+ ], 64))
458
+ ], 16, _hoisted_1)), [
459
+ [vue.vShow, _ctx.type !== "hidden"]
460
+ ]);
461
+ };
99
462
  }
100
463
  });
101
- const inputEmits = {
102
- [event.UPDATE_MODEL_EVENT]: (value) => shared.isString(value),
103
- input: (value) => shared.isString(value),
104
- change: (value) => shared.isString(value),
105
- focus: (evt) => evt instanceof FocusEvent,
106
- blur: (evt) => evt instanceof FocusEvent,
107
- clear: () => true,
108
- mouseleave: (evt) => evt instanceof MouseEvent,
109
- mouseenter: (evt) => evt instanceof MouseEvent,
110
- keydown: (evt) => evt instanceof Event,
111
- compositionstart: (evt) => evt instanceof CompositionEvent,
112
- compositionupdate: (evt) => evt instanceof CompositionEvent,
113
- compositionend: (evt) => evt instanceof CompositionEvent
114
- };
464
+ var Input = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);
115
465
 
116
- exports.inputEmits = inputEmits;
117
- exports.inputProps = inputProps;
466
+ exports["default"] = Input;
118
467
  //# sourceMappingURL=input2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input2.js","sources":["../../../../../../packages/components/input/src/input.ts"],"sourcesContent":["import { isString } from '@vue/shared'\nimport {\n buildProps,\n definePropType,\n iconPropType,\n mutable,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type Input from './input.vue'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n\nexport const inputProps = buildProps({\n /**\n * @description native input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to disable\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n Object,\n ]),\n default: '',\n },\n /**\n * @description type of input\n */\n type: {\n type: String,\n default: 'text',\n },\n /**\n * @description control the resizability\n */\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n /**\n * @description whether textarea has an adaptive height\n */\n autosize: {\n type: definePropType<InputAutoSize>([Boolean, Object]),\n default: false,\n },\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description format content\n */\n formatter: {\n type: Function,\n },\n /**\n * @description parse content\n */\n parser: {\n type: Function,\n },\n /**\n * @description placeholder\n */\n placeholder: {\n type: String,\n },\n /**\n * @description native input form\n */\n form: {\n type: String,\n },\n /**\n * @description native input readonly\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * @description native input readonly\n */\n clearable: {\n type: Boolean,\n default: false,\n },\n /**\n * @description toggleable password input\n */\n showPassword: {\n type: Boolean,\n default: false,\n },\n /**\n * @description word count\n */\n showWordLimit: {\n type: Boolean,\n default: false,\n },\n /**\n * @description suffix icon\n */\n suffixIcon: {\n type: iconPropType,\n },\n /**\n * @description prefix icon\n */\n prefixIcon: {\n type: iconPropType,\n },\n /**\n * @description container role, internal properties provided for use by the picker component\n */\n containerRole: {\n type: String,\n default: undefined,\n },\n /**\n * @description native input aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description input or texearea element style\n */\n inputStyle: {\n type: definePropType<StyleValue>([Object, Array, String]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type InputProps = ExtractPropTypes<typeof inputProps>\n\nexport const inputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n // NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent\n // relative bug report https://github.com/element-plus/element-plus/issues/6665\n keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,\n compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n}\nexport type InputEmits = typeof inputEmits\n\nexport type InputInstance = InstanceType<typeof Input>\n"],"names":["buildProps","useSizeProp","definePropType","iconPropType","mutable","UPDATE_MODEL_EVENT","isString"],"mappings":";;;;;;;;;;;;;;AASY,MAAC,UAAU,GAAGA,kBAAU,CAAC;AACrC,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEC,sBAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,MAAM,MAAM;AACZ,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC;AACtD,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAEA,sBAAc,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,QAAQ;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAA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C,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKC,eAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,KAAK,KAAKA,eAAQ,CAAC,KAAK,CAAC;AACpC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC1C,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,OAAO,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,KAAK;AACxC,EAAE,gBAAgB,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,gBAAgB;AAC5D,EAAE,iBAAiB,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,gBAAgB;AAC7D,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,gBAAgB;AAC1D;;;;;"}
1
+ {"version":3,"file":"input2.js","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div\n v-show=\"type !== 'hidden'\"\n v-bind=\"containerAttrs\"\n :class=\"containerKls\"\n :style=\"containerStyle\"\n :role=\"containerRole\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n >\n <!-- input -->\n <template v-if=\"type !== 'textarea'\">\n <!-- prepend slot -->\n <div v-if=\"$slots.prepend\" :class=\"nsInput.be('group', 'prepend')\">\n <slot name=\"prepend\" />\n </div>\n\n <div :class=\"wrapperKls\">\n <!-- prefix slot -->\n <span v-if=\"$slots.prefix || prefixIcon\" :class=\"nsInput.e('prefix')\">\n <span :class=\"nsInput.e('prefix-inner')\" @click=\"focus\">\n <slot name=\"prefix\" />\n <el-icon v-if=\"prefixIcon\" :class=\"nsInput.e('icon')\">\n <component :is=\"prefixIcon\" />\n </el-icon>\n </span>\n </span>\n\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"nsInput.e('inner')\"\n v-bind=\"attrs\"\n :type=\"showPassword ? (passwordVisible ? 'text' : 'password') : type\"\n :disabled=\"inputDisabled\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :tabindex=\"tabindex\"\n :aria-label=\"label\"\n :placeholder=\"placeholder\"\n :style=\"inputStyle\"\n :form=\"props.form\"\n @compositionstart=\"handleCompositionStart\"\n @compositionupdate=\"handleCompositionUpdate\"\n @compositionend=\"handleCompositionEnd\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @change=\"handleChange\"\n @keydown=\"handleKeydown\"\n />\n\n <!-- suffix slot -->\n <span v-if=\"suffixVisible\" :class=\"nsInput.e('suffix')\">\n <span :class=\"nsInput.e('suffix-inner')\" @click=\"focus\">\n <template\n v-if=\"!showClear || !showPwdVisible || !isWordLimitVisible\"\n >\n <slot name=\"suffix\" />\n <el-icon v-if=\"suffixIcon\" :class=\"nsInput.e('icon')\">\n <component :is=\"suffixIcon\" />\n </el-icon>\n </template>\n <el-icon\n v-if=\"showClear\"\n :class=\"[nsInput.e('icon'), nsInput.e('clear')]\"\n @mousedown.prevent=\"NOOP\"\n @click=\"clear\"\n >\n <circle-close />\n </el-icon>\n <el-icon\n v-if=\"showPwdVisible\"\n :class=\"[nsInput.e('icon'), nsInput.e('password')]\"\n @click=\"handlePasswordVisible\"\n >\n <component :is=\"passwordIcon\" />\n </el-icon>\n <span v-if=\"isWordLimitVisible\" :class=\"nsInput.e('count')\">\n <span :class=\"nsInput.e('count-inner')\">\n {{ textLength }} / {{ attrs.maxlength }}\n </span>\n </span>\n <el-icon\n v-if=\"validateState && validateIcon && needStatusIcon\"\n :class=\"[\n nsInput.e('icon'),\n nsInput.e('validateIcon'),\n nsInput.is('loading', validateState === 'validating'),\n ]\"\n >\n <component :is=\"validateIcon\" />\n </el-icon>\n </span>\n </span>\n </div>\n\n <!-- append slot -->\n <div v-if=\"$slots.append\" :class=\"nsInput.be('group', 'append')\">\n <slot name=\"append\" />\n </div>\n </template>\n\n <!-- textarea -->\n <template v-else>\n <textarea\n :id=\"inputId\"\n ref=\"textarea\"\n :class=\"nsTextarea.e('inner')\"\n v-bind=\"attrs\"\n :tabindex=\"tabindex\"\n :disabled=\"inputDisabled\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :style=\"textareaStyle\"\n :aria-label=\"label\"\n :placeholder=\"placeholder\"\n :form=\"props.form\"\n @compositionstart=\"handleCompositionStart\"\n @compositionupdate=\"handleCompositionUpdate\"\n @compositionend=\"handleCompositionEnd\"\n @input=\"handleInput\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @change=\"handleChange\"\n @keydown=\"handleKeydown\"\n />\n <span\n v-if=\"isWordLimitVisible\"\n :style=\"countStyle\"\n :class=\"nsInput.e('count')\"\n >\n {{ textLength }} / {{ attrs.maxlength }}\n </span>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n shallowRef,\n toRef,\n useAttrs as useRawAttrs,\n useSlots,\n watch,\n} from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n CircleClose,\n Hide as IconHide,\n View as IconView,\n} from '@element-plus/icons-vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n NOOP,\n ValidateComponentsMap,\n debugWarn,\n isClient,\n isKorean,\n isObject,\n} from '@element-plus/utils'\nimport { useAttrs, useCursor, useNamespace } from '@element-plus/hooks'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { calcTextareaHeight } from './utils'\nimport { inputEmits, inputProps } from './input'\nimport type { StyleValue } from 'vue'\n\ntype TargetElement = HTMLInputElement | HTMLTextAreaElement\n\ndefineOptions({\n name: 'ElInput',\n inheritAttrs: false,\n})\nconst props = defineProps(inputProps)\nconst emit = defineEmits(inputEmits)\n\nconst rawAttrs = useRawAttrs()\nconst slots = useSlots()\n\nconst containerAttrs = computed(() => {\n const comboBoxAttrs: Record<string, unknown> = {}\n if (props.containerRole === 'combobox') {\n comboBoxAttrs['aria-haspopup'] = rawAttrs['aria-haspopup']\n comboBoxAttrs['aria-owns'] = rawAttrs['aria-owns']\n comboBoxAttrs['aria-expanded'] = rawAttrs['aria-expanded']\n }\n return comboBoxAttrs\n})\n\nconst containerKls = computed(() => [\n props.type === 'textarea' ? nsTextarea.b() : nsInput.b(),\n nsInput.m(inputSize.value),\n nsInput.is('disabled', inputDisabled.value),\n nsInput.is('exceed', inputExceed.value),\n {\n [nsInput.b('group')]: slots.prepend || slots.append,\n [nsInput.bm('group', 'append')]: slots.append,\n [nsInput.bm('group', 'prepend')]: slots.prepend,\n [nsInput.m('prefix')]: slots.prefix || props.prefixIcon,\n [nsInput.m('suffix')]:\n slots.suffix || props.suffixIcon || props.clearable || props.showPassword,\n [nsInput.bm('suffix', 'password-clear')]:\n showClear.value && showPwdVisible.value,\n },\n rawAttrs.class,\n])\n\nconst wrapperKls = computed(() => [\n nsInput.e('wrapper'),\n nsInput.is('focus', focused.value),\n])\n\nconst attrs = useAttrs({\n excludeKeys: computed<string[]>(() => {\n return Object.keys(containerAttrs.value)\n }),\n})\nconst { form, formItem } = useFormItem()\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst inputSize = useFormSize()\nconst inputDisabled = useFormDisabled()\nconst nsInput = useNamespace('input')\nconst nsTextarea = useNamespace('textarea')\n\nconst input = shallowRef<HTMLInputElement>()\nconst textarea = shallowRef<HTMLTextAreaElement>()\n\nconst focused = ref(false)\nconst hovering = ref(false)\nconst isComposing = ref(false)\nconst passwordVisible = ref(false)\nconst countStyle = ref<StyleValue>()\nconst textareaCalcStyle = shallowRef(props.inputStyle)\n\nconst _ref = computed(() => input.value || textarea.value)\n\nconst needStatusIcon = computed(() => form?.statusIcon ?? false)\nconst validateState = computed(() => formItem?.validateState || '')\nconst validateIcon = computed(\n () => validateState.value && ValidateComponentsMap[validateState.value]\n)\nconst passwordIcon = computed(() =>\n passwordVisible.value ? IconView : IconHide\n)\nconst containerStyle = computed<StyleValue>(() => [\n rawAttrs.style as StyleValue,\n props.inputStyle,\n])\nconst textareaStyle = computed<StyleValue>(() => [\n props.inputStyle,\n textareaCalcStyle.value,\n { resize: props.resize },\n])\nconst nativeInputValue = computed(() =>\n isNil(props.modelValue) ? '' : String(props.modelValue)\n)\nconst showClear = computed(\n () =>\n props.clearable &&\n !inputDisabled.value &&\n !props.readonly &&\n !!nativeInputValue.value &&\n (focused.value || hovering.value)\n)\nconst showPwdVisible = computed(\n () =>\n props.showPassword &&\n !inputDisabled.value &&\n !props.readonly &&\n !!nativeInputValue.value &&\n (!!nativeInputValue.value || focused.value)\n)\nconst isWordLimitVisible = computed(\n () =>\n props.showWordLimit &&\n !!attrs.value.maxlength &&\n (props.type === 'text' || props.type === 'textarea') &&\n !inputDisabled.value &&\n !props.readonly &&\n !props.showPassword\n)\nconst textLength = computed(() => nativeInputValue.value.length)\nconst inputExceed = computed(\n () =>\n // show exceed style if length of initial value greater then maxlength\n !!isWordLimitVisible.value &&\n textLength.value > Number(attrs.value.maxlength)\n)\nconst suffixVisible = computed(\n () =>\n !!slots.suffix ||\n !!props.suffixIcon ||\n showClear.value ||\n props.showPassword ||\n isWordLimitVisible.value ||\n (!!validateState.value && needStatusIcon.value)\n)\n\nconst [recordCursor, setCursor] = useCursor(input)\n\nuseResizeObserver(textarea, (entries) => {\n onceInitSizeTextarea()\n if (!isWordLimitVisible.value || props.resize !== 'both') return\n const entry = entries[0]\n const { width } = entry.contentRect\n countStyle.value = {\n /** right: 100% - width + padding(15) + right(6) */\n right: `calc(100% - ${width + 15 + 6}px)`,\n }\n})\n\nconst resizeTextarea = () => {\n const { type, autosize } = props\n\n if (!isClient || type !== 'textarea' || !textarea.value) return\n\n if (autosize) {\n const minRows = isObject(autosize) ? autosize.minRows : undefined\n const maxRows = isObject(autosize) ? autosize.maxRows : undefined\n const textareaStyle = calcTextareaHeight(textarea.value, minRows, maxRows)\n\n // If the scrollbar is displayed, the height of the textarea needs more space than the calculated height.\n // If set textarea height in this case, the scrollbar will not hide.\n // So we need to hide scrollbar first, and reset it in next tick.\n // see https://github.com/element-plus/element-plus/issues/8825\n textareaCalcStyle.value = {\n overflowY: 'hidden',\n ...textareaStyle,\n }\n\n nextTick(() => {\n // NOTE: Force repaint to make sure the style set above is applied.\n textarea.value!.offsetHeight\n textareaCalcStyle.value = textareaStyle\n })\n } else {\n textareaCalcStyle.value = {\n minHeight: calcTextareaHeight(textarea.value).minHeight,\n }\n }\n}\n\nconst createOnceInitResize = (resizeTextarea: () => void) => {\n let isInit = false\n return () => {\n if (isInit || !props.autosize) return\n const isElHidden = textarea.value?.offsetParent === null\n if (!isElHidden) {\n resizeTextarea()\n isInit = true\n }\n }\n}\n// fix: https://github.com/element-plus/element-plus/issues/12074\nconst onceInitSizeTextarea = createOnceInitResize(resizeTextarea)\n\nconst setNativeInputValue = () => {\n const input = _ref.value\n if (!input || input.value === nativeInputValue.value) return\n input.value = nativeInputValue.value\n}\n\nconst handleInput = async (event: Event) => {\n recordCursor()\n\n let { value } = event.target as TargetElement\n\n if (props.formatter) {\n value = props.parser ? props.parser(value) : value\n value = props.formatter(value)\n }\n\n // should not emit input during composition\n // see: https://github.com/ElemeFE/element/issues/10516\n if (isComposing.value) return\n\n // hack for https://github.com/ElemeFE/element/issues/8548\n // should remove the following line when we don't support IE\n if (value === nativeInputValue.value) {\n setNativeInputValue()\n return\n }\n\n emit(UPDATE_MODEL_EVENT, value)\n emit('input', value)\n\n // ensure native input value is controlled\n // see: https://github.com/ElemeFE/element/issues/12850\n await nextTick()\n setNativeInputValue()\n setCursor()\n}\n\nconst handleChange = (event: Event) => {\n emit('change', (event.target as TargetElement).value)\n}\n\nconst handleCompositionStart = (event: CompositionEvent) => {\n emit('compositionstart', event)\n isComposing.value = true\n}\n\nconst handleCompositionUpdate = (event: CompositionEvent) => {\n emit('compositionupdate', event)\n const text = (event.target as HTMLInputElement)?.value\n const lastCharacter = text[text.length - 1] || ''\n isComposing.value = !isKorean(lastCharacter)\n}\n\nconst handleCompositionEnd = (event: CompositionEvent) => {\n emit('compositionend', event)\n if (isComposing.value) {\n isComposing.value = false\n handleInput(event)\n }\n}\n\nconst handlePasswordVisible = () => {\n passwordVisible.value = !passwordVisible.value\n focus()\n}\n\nconst focus = async () => {\n // see: https://github.com/ElemeFE/element/issues/18573\n await nextTick()\n _ref.value?.focus()\n}\n\nconst blur = () => _ref.value?.blur()\n\nconst handleFocus = (event: FocusEvent) => {\n focused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n focused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nconst handleMouseLeave = (evt: MouseEvent) => {\n hovering.value = false\n emit('mouseleave', evt)\n}\n\nconst handleMouseEnter = (evt: MouseEvent) => {\n hovering.value = true\n emit('mouseenter', evt)\n}\n\nconst handleKeydown = (evt: KeyboardEvent) => {\n emit('keydown', evt)\n}\n\nconst select = () => {\n _ref.value?.select()\n}\n\nconst clear = () => {\n emit(UPDATE_MODEL_EVENT, '')\n emit('change', '')\n emit('clear')\n emit('input', '')\n}\n\nwatch(\n () => props.modelValue,\n () => {\n nextTick(() => resizeTextarea())\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n }\n)\n\n// native input value is set explicitly\n// do not use v-model / :value in template\n// see: https://github.com/ElemeFE/element/issues/14521\nwatch(nativeInputValue, () => setNativeInputValue())\n\n// when change between <input> and <textarea>,\n// update DOM dependent value and styles\n// https://github.com/ElemeFE/element/issues/14857\nwatch(\n () => props.type,\n async () => {\n await nextTick()\n setNativeInputValue()\n resizeTextarea()\n }\n)\n\nonMounted(() => {\n if (!props.formatter && props.parser) {\n debugWarn(\n 'ElInput',\n 'If you set the parser, you also need to set the formatter.'\n )\n }\n setNativeInputValue()\n nextTick(resizeTextarea)\n})\n\ndefineExpose({\n /** @description HTML input element */\n input,\n /** @description HTML textarea element */\n textarea,\n /** @description HTML element, input or textarea */\n ref: _ref,\n /** @description style of textarea. */\n textareaStyle,\n\n /** @description from props (used on unit test) */\n autosize: toRef(props, 'autosize'),\n\n /** @description HTML input element native method */\n focus,\n /** @description HTML input element native method */\n blur,\n /** @description HTML input element native method */\n select,\n /** @description clear input value */\n clear,\n /** @description resize textarea. */\n resizeTextarea,\n})\n</script>\n"],"names":["useRawAttrs","useSlots","computed","useAttrs","useFormItem","useFormItemInputId","useFormSize","useFormDisabled","useNamespace","shallowRef","ref","ValidateComponentsMap","IconView","IconHide","isNil","useCursor","useResizeObserver","isClient","isObject","calcTextareaHeight","nextTick","event","UPDATE_MODEL_EVENT","isKorean","debugWarn","watch","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAsLc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,WAAWA,YAAY,EAAA,CAAA;AAC7B,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,cAAA,GAAiBC,aAAS,MAAM;AACpC,MAAA,MAAM,gBAAyC,EAAC,CAAA;AAChD,MAAI,IAAA,KAAA,CAAM,kBAAkB,UAAY,EAAA;AACtC,QAAA,aAAA,CAAc,mBAAmB,QAAS,CAAA,eAAA,CAAA,CA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