st-comp 0.0.279 → 0.0.280

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 (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +342 -547
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +253 -253
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +46 -46
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +605 -443
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
  36. package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1929 -2261
  41. package/es/_baseClone-10bdb989.cjs +1 -0
  42. package/es/_baseClone-98af8b33.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-33a127c4.cjs +1 -0
  50. package/es/config-provider-563023c9.js +86 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-ce7496c7.cjs +1 -0
  54. package/es/dropdown-feea8702.js +178 -0
  55. package/es/el-autocomplete-d9253bba.cjs +1 -0
  56. package/es/el-autocomplete-eac54f9f.js +434 -0
  57. package/es/el-button-8259594b.cjs +1 -0
  58. package/es/el-button-8a9721f8.js +343 -0
  59. package/es/el-checkbox-6303fc92.cjs +1 -0
  60. package/es/el-checkbox-c328b097.js +566 -0
  61. package/es/el-dialog-67536fac.js +252 -0
  62. package/es/el-dialog-8788bcc1.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-8efcf2c3.js +1265 -0
  68. package/es/el-form-item-95e68669.cjs +12 -0
  69. package/es/el-input-c8a9bb71.cjs +1 -0
  70. package/es/el-input-e66500b7.js +761 -0
  71. package/es/el-input-number-68ee0d65.js +390 -0
  72. package/es/el-input-number-d7a81922.cjs +1 -0
  73. package/es/el-loading-62132db2.cjs +1 -0
  74. package/es/el-loading-db4c6d13.js +190 -0
  75. package/es/el-menu-item-4b8e7794.cjs +1 -0
  76. package/es/el-menu-item-c2523d82.js +824 -0
  77. package/es/el-message-box-7c13546c.js +481 -0
  78. package/es/el-message-box-fed174f0.cjs +1 -0
  79. package/es/el-overlay-17299785.cjs +1 -0
  80. package/es/el-overlay-36f223e9.js +444 -0
  81. package/es/el-popconfirm-520b2928.cjs +1 -0
  82. package/es/el-popconfirm-a857c54a.js +190 -0
  83. package/es/el-popper-852446fd.js +2235 -0
  84. package/es/el-popper-f824c63b.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-45dcc036.cjs +1 -0
  88. package/es/el-segmented-bf08279f.js +168 -0
  89. package/es/el-select-a34348e1.js +1535 -0
  90. package/es/el-select-d2958ae8.cjs +1 -0
  91. package/es/el-table-column-ad70ee0e.cjs +14 -0
  92. package/es/el-table-column-e2be313e.js +3651 -0
  93. package/es/el-tag-527f06f0.cjs +1 -0
  94. package/es/el-tag-9bcfae32.js +77 -0
  95. package/es/el-text-f9379288.js +84 -0
  96. package/es/el-text-fc345ffd.cjs +1 -0
  97. package/es/index-2419d69a.js +468 -0
  98. package/es/index-3806160e.js +710 -0
  99. package/es/index-3a0a7c36.cjs +1 -0
  100. package/es/index-3e7d5ffb.cjs +1 -0
  101. package/es/index-3ed0c678.cjs +1 -0
  102. package/es/index-47d30a52.js +372 -0
  103. package/es/index-5dec535a.cjs +1 -0
  104. package/es/index-5e76a22d.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
  106. package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
  107. package/es/index-71ba4c28.cjs +1 -0
  108. package/es/index-7711aa69.cjs +1 -0
  109. package/es/index-7c4d8f5d.js +47 -0
  110. package/es/index-86678b72.js +131 -0
  111. package/es/index-99bb359f.cjs +1 -0
  112. package/es/index-99d4335d.cjs +1 -0
  113. package/es/index-a0522466.js +413 -0
  114. package/es/index-a181f161.js +429 -0
  115. package/es/index-b9a26e7f.js +141 -0
  116. package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
  117. package/es/index-d372e68f.cjs +5 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
  122. package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-0a831287.cjs +2 -0
  131. package/es/use-form-item-187cd7db.js +422 -0
  132. package/es/use-global-config-17dafd40.js +71 -0
  133. package/es/use-global-config-c90c91f7.cjs +1 -0
  134. package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
  135. package/es/validator-ee5bc3eb.cjs +1 -0
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
  139. package/es/zh-cn-a22a6792.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +271 -252
  142. package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
  143. package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -1,531 +0,0 @@
1
- import { computed as c, getCurrentInstance as Ue, defineComponent as Pe, useAttrs as We, useSlots as Ye, shallowRef as Z, ref as q, watch as J, nextTick as R, onMounted as Xe, toRef as Ge, openBlock as d, createElementBlock as S, normalizeClass as m, unref as t, normalizeStyle as be, createCommentVNode as p, Fragment as Q, renderSlot as j, createElementVNode as T, createBlock as C, withCtx as L, resolveDynamicComponent as O, mergeProps as we, withModifiers as _e, toDisplayString as U } from "vue";
2
- import { h as Ze, i as ee, d as qe, f as Je, e as Qe, g as et, V as tt, u as ot } from "./use-form-common-props-ed72e914.js";
3
- import { t as nt, H as at, I as st, E as B } from "./index-eb96e074.js";
4
- import { s as Te, p as xe, b as lt, e as H, c as te, G as rt, u as Se, g as it, N as ut, _ as dt, f as Ce, w as ct } from "./base-a5af3db3.js";
5
- import { m as pt } from "./typescript-7ae59c4c.js";
6
- import { u as ft, U as oe, d as Ie, I as Ee, C as Ne } from "./el-popper-fbd0dcea.js";
7
- import { a as vt, u as mt } from "./index-f034b910.js";
8
- const ht = () => Te && /firefox/i.test(window.navigator.userAgent);
9
- let g;
10
- const yt = {
11
- height: "0",
12
- visibility: "hidden",
13
- overflow: ht() ? "" : "hidden",
14
- position: "absolute",
15
- "z-index": "-1000",
16
- top: "0",
17
- right: "0"
18
- }, gt = [
19
- "letter-spacing",
20
- "line-height",
21
- "padding-top",
22
- "padding-bottom",
23
- "font-family",
24
- "font-weight",
25
- "font-size",
26
- "text-rendering",
27
- "text-transform",
28
- "width",
29
- "text-indent",
30
- "padding-left",
31
- "padding-right",
32
- "border-width",
33
- "box-sizing",
34
- "word-break"
35
- ];
36
- function bt(n) {
37
- const f = window.getComputedStyle(n), r = f.getPropertyValue("box-sizing"), o = Number.parseFloat(f.getPropertyValue("padding-bottom")) + Number.parseFloat(f.getPropertyValue("padding-top")), i = Number.parseFloat(f.getPropertyValue("border-bottom-width")) + Number.parseFloat(f.getPropertyValue("border-top-width"));
38
- return { contextStyle: gt.map((l) => [
39
- l,
40
- f.getPropertyValue(l)
41
- ]), paddingSize: o, borderSize: i, boxSizing: r };
42
- }
43
- function ze(n, f = 1, r) {
44
- var o, i;
45
- g || (g = document.createElement("textarea"), ((o = n.parentNode) != null ? o : document.body).appendChild(g));
46
- const { paddingSize: u, borderSize: l, boxSizing: b, contextStyle: w } = bt(n);
47
- w.forEach(([y, x]) => g == null ? void 0 : g.style.setProperty(y, x)), Object.entries(yt).forEach(([y, x]) => g == null ? void 0 : g.style.setProperty(y, x, "important")), g.value = n.value || n.placeholder || "";
48
- let h = g.scrollHeight;
49
- const v = {};
50
- b === "border-box" ? h = h + l : b === "content-box" && (h = h - u), g.value = "";
51
- const k = g.scrollHeight - u;
52
- if (xe(f)) {
53
- let y = k * f;
54
- b === "border-box" && (y = y + u + l), h = Math.max(y, h), v.minHeight = `${y}px`;
55
- }
56
- if (xe(r)) {
57
- let y = k * r;
58
- b === "border-box" && (y = y + u + l), h = Math.min(y, h);
59
- }
60
- return v.height = `${h}px`, (i = g.parentNode) == null || i.removeChild(g), g = void 0, v;
61
- }
62
- const wt = lt({
63
- id: {
64
- type: String,
65
- default: void 0
66
- },
67
- size: Ze,
68
- disabled: Boolean,
69
- modelValue: {
70
- type: H([
71
- String,
72
- Number,
73
- Object
74
- ]),
75
- default: ""
76
- },
77
- maxlength: {
78
- type: [String, Number]
79
- },
80
- minlength: {
81
- type: [String, Number]
82
- },
83
- type: {
84
- type: String,
85
- default: "text"
86
- },
87
- resize: {
88
- type: String,
89
- values: ["none", "both", "horizontal", "vertical"]
90
- },
91
- autosize: {
92
- type: H([Boolean, Object]),
93
- default: !1
94
- },
95
- autocomplete: {
96
- type: H(String),
97
- default: "off"
98
- },
99
- formatter: {
100
- type: Function
101
- },
102
- parser: {
103
- type: Function
104
- },
105
- placeholder: {
106
- type: String
107
- },
108
- form: {
109
- type: String
110
- },
111
- readonly: Boolean,
112
- clearable: Boolean,
113
- clearIcon: {
114
- type: ee,
115
- default: nt
116
- },
117
- showPassword: Boolean,
118
- showWordLimit: Boolean,
119
- suffixIcon: {
120
- type: ee
121
- },
122
- prefixIcon: {
123
- type: ee
124
- },
125
- containerRole: {
126
- type: String,
127
- default: void 0
128
- },
129
- tabindex: {
130
- type: [String, Number],
131
- default: 0
132
- },
133
- validateEvent: {
134
- type: Boolean,
135
- default: !0
136
- },
137
- inputStyle: {
138
- type: H([Object, Array, String]),
139
- default: () => pt({})
140
- },
141
- autofocus: Boolean,
142
- rows: {
143
- type: Number,
144
- default: 2
145
- },
146
- ...ft(["ariaLabel"]),
147
- inputmode: {
148
- type: H(String),
149
- default: void 0
150
- },
151
- name: String
152
- }), xt = {
153
- [oe]: (n) => te(n),
154
- input: (n) => te(n),
155
- change: (n) => te(n),
156
- focus: (n) => n instanceof FocusEvent,
157
- blur: (n) => n instanceof FocusEvent,
158
- clear: () => !0,
159
- mouseleave: (n) => n instanceof MouseEvent,
160
- mouseenter: (n) => n instanceof MouseEvent,
161
- keydown: (n) => n instanceof Event,
162
- compositionstart: (n) => n instanceof CompositionEvent,
163
- compositionupdate: (n) => n instanceof CompositionEvent,
164
- compositionend: (n) => n instanceof CompositionEvent
165
- }, St = ["class", "style"], Ct = /^on[A-Z]/, It = (n = {}) => {
166
- const { excludeListeners: f = !1, excludeKeys: r } = n, o = c(() => ((r == null ? void 0 : r.value) || []).concat(St)), i = Ue();
167
- return i ? c(() => {
168
- var u;
169
- return rt(Object.entries((u = i.proxy) == null ? void 0 : u.$attrs).filter(([l]) => !o.value.includes(l) && !(f && Ct.test(l))));
170
- }) : c(() => ({}));
171
- };
172
- function Et(n) {
173
- let f;
174
- function r() {
175
- if (n.value == null)
176
- return;
177
- const { selectionStart: i, selectionEnd: u, value: l } = n.value;
178
- if (i == null || u == null)
179
- return;
180
- const b = l.slice(0, Math.max(0, i)), w = l.slice(Math.max(0, u));
181
- f = {
182
- selectionStart: i,
183
- selectionEnd: u,
184
- value: l,
185
- beforeTxt: b,
186
- afterTxt: w
187
- };
188
- }
189
- function o() {
190
- if (n.value == null || f == null)
191
- return;
192
- const { value: i } = n.value, { beforeTxt: u, afterTxt: l, selectionStart: b } = f;
193
- if (u == null || l == null || b == null)
194
- return;
195
- let w = i.length;
196
- if (i.endsWith(l))
197
- w = i.length - l.length;
198
- else if (i.startsWith(u))
199
- w = u.length;
200
- else {
201
- const h = u[b - 1], v = i.indexOf(h, b - 1);
202
- v !== -1 && (w = v + 1);
203
- }
204
- n.value.setSelectionRange(w, w);
205
- }
206
- return [r, o];
207
- }
208
- const Nt = "ElInput", zt = Pe({
209
- name: Nt,
210
- inheritAttrs: !1
211
- }), Pt = /* @__PURE__ */ Pe({
212
- ...zt,
213
- props: wt,
214
- emits: xt,
215
- setup(n, { expose: f, emit: r }) {
216
- const o = n, i = We(), u = It(), l = Ye(), b = c(() => [
217
- o.type === "textarea" ? ne.b() : a.b(),
218
- a.m(y.value),
219
- a.is("disabled", x.value),
220
- a.is("exceed", Le.value),
221
- {
222
- [a.b("group")]: l.prepend || l.append,
223
- [a.m("prefix")]: l.prefix || o.prefixIcon,
224
- [a.m("suffix")]: l.suffix || o.suffixIcon || o.clearable || o.showPassword,
225
- [a.bm("suffix", "password-clear")]: K.value && X.value,
226
- [a.b("hidden")]: o.type === "hidden"
227
- },
228
- i.class
229
- ]), w = c(() => [
230
- a.e("wrapper"),
231
- a.is("focus", Y.value)
232
- ]), { form: h, formItem: v } = qe(), { inputId: k } = Je(o, {
233
- formItemContext: v
234
- }), y = Qe(), x = et(), a = Se("input"), ne = Se("textarea"), $ = Z(), I = Z(), W = q(!1), A = q(!1), ae = q(), D = Z(o.inputStyle), N = c(() => $.value || I.value), { wrapperRef: ke, isFocused: Y, handleFocus: Ve, handleBlur: Fe } = vt(N, {
235
- disabled: x,
236
- afterBlur() {
237
- var e;
238
- o.validateEvent && ((e = v == null ? void 0 : v.validate) == null || e.call(v, "blur").catch((s) => Ie()));
239
- }
240
- }), se = c(() => {
241
- var e;
242
- return (e = h == null ? void 0 : h.statusIcon) != null ? e : !1;
243
- }), V = c(() => (v == null ? void 0 : v.validateState) || ""), le = c(() => V.value && tt[V.value]), Me = c(() => A.value ? at : st), Re = c(() => [
244
- i.style
245
- ]), re = c(() => [
246
- o.inputStyle,
247
- D.value,
248
- { resize: o.resize }
249
- ]), E = c(() => it(o.modelValue) ? "" : String(o.modelValue)), K = c(() => o.clearable && !x.value && !o.readonly && !!E.value && (Y.value || W.value)), X = c(() => o.showPassword && !x.value && !!E.value), z = c(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !x.value && !o.readonly && !o.showPassword), G = c(() => E.value.length), Le = c(() => !!z.value && G.value > Number(o.maxlength)), Oe = c(() => !!l.suffix || !!o.suffixIcon || K.value || o.showPassword || z.value || !!V.value && se.value), [ie, ue] = Et($);
250
- ot(I, (e) => {
251
- if (Be(), !z.value || o.resize !== "both")
252
- return;
253
- const s = e[0], { width: P } = s.contentRect;
254
- ae.value = {
255
- right: `calc(100% - ${P + 15 + 6}px)`
256
- };
257
- });
258
- const F = () => {
259
- const { type: e, autosize: s } = o;
260
- if (!(!Te || e !== "textarea" || !I.value))
261
- if (s) {
262
- const P = Ce(s) ? s.minRows : void 0, ye = Ce(s) ? s.maxRows : void 0, ge = ze(I.value, P, ye);
263
- D.value = {
264
- overflowY: "hidden",
265
- ...ge
266
- }, R(() => {
267
- I.value.offsetHeight, D.value = ge;
268
- });
269
- } else
270
- D.value = {
271
- minHeight: ze(I.value).minHeight
272
- };
273
- }, Be = ((e) => {
274
- let s = !1;
275
- return () => {
276
- var P;
277
- if (s || !o.autosize)
278
- return;
279
- ((P = I.value) == null ? void 0 : P.offsetParent) === null || (setTimeout(e), s = !0);
280
- };
281
- })(F), M = () => {
282
- const e = N.value, s = o.formatter ? o.formatter(E.value) : E.value;
283
- !e || e.value === s || (e.value = s);
284
- }, _ = async (e) => {
285
- ie();
286
- let { value: s } = e.target;
287
- if (o.formatter && o.parser && (s = o.parser(s)), !ce.value) {
288
- if (s === E.value) {
289
- M();
290
- return;
291
- }
292
- r(oe, s), r(Ee, s), await R(), M(), ue();
293
- }
294
- }, de = (e) => {
295
- let { value: s } = e.target;
296
- o.formatter && o.parser && (s = o.parser(s)), r(Ne, s);
297
- }, {
298
- isComposing: ce,
299
- handleCompositionStart: pe,
300
- handleCompositionUpdate: fe,
301
- handleCompositionEnd: ve
302
- } = mt({ emit: r, afterComposition: _ }), He = () => {
303
- ie(), A.value = !A.value, setTimeout(ue);
304
- }, $e = () => {
305
- var e;
306
- return (e = N.value) == null ? void 0 : e.focus();
307
- }, Ae = () => {
308
- var e;
309
- return (e = N.value) == null ? void 0 : e.blur();
310
- }, De = (e) => {
311
- W.value = !1, r("mouseleave", e);
312
- }, Ke = (e) => {
313
- W.value = !0, r("mouseenter", e);
314
- }, me = (e) => {
315
- r("keydown", e);
316
- }, je = () => {
317
- var e;
318
- (e = N.value) == null || e.select();
319
- }, he = () => {
320
- r(oe, ""), r(Ne, ""), r("clear"), r(Ee, "");
321
- };
322
- return J(() => o.modelValue, () => {
323
- var e;
324
- R(() => F()), o.validateEvent && ((e = v == null ? void 0 : v.validate) == null || e.call(v, "change").catch((s) => Ie()));
325
- }), J(E, () => M()), J(() => o.type, async () => {
326
- await R(), M(), F();
327
- }), Xe(() => {
328
- !o.formatter && o.parser, M(), R(F);
329
- }), f({
330
- input: $,
331
- textarea: I,
332
- ref: N,
333
- textareaStyle: re,
334
- autosize: Ge(o, "autosize"),
335
- isComposing: ce,
336
- focus: $e,
337
- blur: Ae,
338
- select: je,
339
- clear: he,
340
- resizeTextarea: F
341
- }), (e, s) => (d(), S("div", {
342
- class: m([
343
- t(b),
344
- {
345
- [t(a).bm("group", "append")]: e.$slots.append,
346
- [t(a).bm("group", "prepend")]: e.$slots.prepend
347
- }
348
- ]),
349
- style: be(t(Re)),
350
- onMouseenter: Ke,
351
- onMouseleave: De
352
- }, [
353
- p(" input "),
354
- e.type !== "textarea" ? (d(), S(Q, { key: 0 }, [
355
- p(" prepend slot "),
356
- e.$slots.prepend ? (d(), S("div", {
357
- key: 0,
358
- class: m(t(a).be("group", "prepend"))
359
- }, [
360
- j(e.$slots, "prepend")
361
- ], 2)) : p("v-if", !0),
362
- T("div", {
363
- ref_key: "wrapperRef",
364
- ref: ke,
365
- class: m(t(w))
366
- }, [
367
- p(" prefix slot "),
368
- e.$slots.prefix || e.prefixIcon ? (d(), S("span", {
369
- key: 0,
370
- class: m(t(a).e("prefix"))
371
- }, [
372
- T("span", {
373
- class: m(t(a).e("prefix-inner"))
374
- }, [
375
- j(e.$slots, "prefix"),
376
- e.prefixIcon ? (d(), C(t(B), {
377
- key: 0,
378
- class: m(t(a).e("icon"))
379
- }, {
380
- default: L(() => [
381
- (d(), C(O(e.prefixIcon)))
382
- ]),
383
- _: 1
384
- }, 8, ["class"])) : p("v-if", !0)
385
- ], 2)
386
- ], 2)) : p("v-if", !0),
387
- T("input", we({
388
- id: t(k),
389
- ref_key: "input",
390
- ref: $,
391
- class: t(a).e("inner")
392
- }, t(u), {
393
- name: e.name,
394
- minlength: e.minlength,
395
- maxlength: e.maxlength,
396
- type: e.showPassword ? A.value ? "text" : "password" : e.type,
397
- disabled: t(x),
398
- readonly: e.readonly,
399
- autocomplete: e.autocomplete,
400
- tabindex: e.tabindex,
401
- "aria-label": e.ariaLabel,
402
- placeholder: e.placeholder,
403
- style: e.inputStyle,
404
- form: e.form,
405
- autofocus: e.autofocus,
406
- role: e.containerRole,
407
- inputmode: e.inputmode,
408
- onCompositionstart: t(pe),
409
- onCompositionupdate: t(fe),
410
- onCompositionend: t(ve),
411
- onInput: _,
412
- onChange: de,
413
- onKeydown: me
414
- }), null, 16, ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
415
- p(" suffix slot "),
416
- t(Oe) ? (d(), S("span", {
417
- key: 1,
418
- class: m(t(a).e("suffix"))
419
- }, [
420
- T("span", {
421
- class: m(t(a).e("suffix-inner"))
422
- }, [
423
- !t(K) || !t(X) || !t(z) ? (d(), S(Q, { key: 0 }, [
424
- j(e.$slots, "suffix"),
425
- e.suffixIcon ? (d(), C(t(B), {
426
- key: 0,
427
- class: m(t(a).e("icon"))
428
- }, {
429
- default: L(() => [
430
- (d(), C(O(e.suffixIcon)))
431
- ]),
432
- _: 1
433
- }, 8, ["class"])) : p("v-if", !0)
434
- ], 64)) : p("v-if", !0),
435
- t(K) ? (d(), C(t(B), {
436
- key: 1,
437
- class: m([t(a).e("icon"), t(a).e("clear")]),
438
- onMousedown: _e(t(ut), ["prevent"]),
439
- onClick: he
440
- }, {
441
- default: L(() => [
442
- (d(), C(O(e.clearIcon)))
443
- ]),
444
- _: 1
445
- }, 8, ["class", "onMousedown"])) : p("v-if", !0),
446
- t(X) ? (d(), C(t(B), {
447
- key: 2,
448
- class: m([t(a).e("icon"), t(a).e("password")]),
449
- onClick: He
450
- }, {
451
- default: L(() => [
452
- (d(), C(O(t(Me))))
453
- ]),
454
- _: 1
455
- }, 8, ["class"])) : p("v-if", !0),
456
- t(z) ? (d(), S("span", {
457
- key: 3,
458
- class: m(t(a).e("count"))
459
- }, [
460
- T("span", {
461
- class: m(t(a).e("count-inner"))
462
- }, U(t(G)) + " / " + U(e.maxlength), 3)
463
- ], 2)) : p("v-if", !0),
464
- t(V) && t(le) && t(se) ? (d(), C(t(B), {
465
- key: 4,
466
- class: m([
467
- t(a).e("icon"),
468
- t(a).e("validateIcon"),
469
- t(a).is("loading", t(V) === "validating")
470
- ])
471
- }, {
472
- default: L(() => [
473
- (d(), C(O(t(le))))
474
- ]),
475
- _: 1
476
- }, 8, ["class"])) : p("v-if", !0)
477
- ], 2)
478
- ], 2)) : p("v-if", !0)
479
- ], 2),
480
- p(" append slot "),
481
- e.$slots.append ? (d(), S("div", {
482
- key: 1,
483
- class: m(t(a).be("group", "append"))
484
- }, [
485
- j(e.$slots, "append")
486
- ], 2)) : p("v-if", !0)
487
- ], 64)) : (d(), S(Q, { key: 1 }, [
488
- p(" textarea "),
489
- T("textarea", we({
490
- id: t(k),
491
- ref_key: "textarea",
492
- ref: I,
493
- class: [t(ne).e("inner"), t(a).is("focus", t(Y))]
494
- }, t(u), {
495
- minlength: e.minlength,
496
- maxlength: e.maxlength,
497
- tabindex: e.tabindex,
498
- disabled: t(x),
499
- readonly: e.readonly,
500
- autocomplete: e.autocomplete,
501
- style: t(re),
502
- "aria-label": e.ariaLabel,
503
- placeholder: e.placeholder,
504
- form: e.form,
505
- autofocus: e.autofocus,
506
- rows: e.rows,
507
- role: e.containerRole,
508
- onCompositionstart: t(pe),
509
- onCompositionupdate: t(fe),
510
- onCompositionend: t(ve),
511
- onInput: _,
512
- onFocus: t(Ve),
513
- onBlur: t(Fe),
514
- onChange: de,
515
- onKeydown: me
516
- }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
517
- t(z) ? (d(), S("span", {
518
- key: 0,
519
- style: be(ae.value),
520
- class: m(t(a).e("count"))
521
- }, U(t(G)) + " / " + U(e.maxlength), 7)) : p("v-if", !0)
522
- ], 64))
523
- ], 38));
524
- }
525
- });
526
- var Tt = /* @__PURE__ */ dt(Pt, [["__file", "input.vue"]]);
527
- const Ht = ct(Tt);
528
- export {
529
- Ht as E,
530
- wt as i
531
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),C=require("./use-form-common-props-ac666630.cjs"),x=require("./index-00f6ca75.cjs"),s=require("./base-ef747d02.cjs"),be=require("./typescript-b63f8e83.cjs"),b=require("./el-popper-a4f3ae4d.cjs"),oe=require("./index-870b6c9d.cjs"),Ce=()=>s.isClient&&/firefox/i.test(window.navigator.userAgent);let v;const Ee={height:"0",visibility:"hidden",overflow:Ce()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},xe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"];function we(n){const d=window.getComputedStyle(n),i=d.getPropertyValue("box-sizing"),o=Number.parseFloat(d.getPropertyValue("padding-bottom"))+Number.parseFloat(d.getPropertyValue("padding-top")),u=Number.parseFloat(d.getPropertyValue("border-bottom-width"))+Number.parseFloat(d.getPropertyValue("border-top-width"));return{contextStyle:xe.map(l=>[l,d.getPropertyValue(l)]),paddingSize:o,borderSize:u,boxSizing:i}}function ne(n,d=1,i){var o,u;v||(v=document.createElement("textarea"),((o=n.parentNode)!=null?o:document.body).appendChild(v));const{paddingSize:c,borderSize:l,boxSizing:h,contextStyle:y}=we(n);y.forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g)),Object.entries(Ee).forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g,"important")),v.value=n.value||n.placeholder||"";let f=v.scrollHeight;const p={};h==="border-box"?f=f+l:h==="content-box"&&(f=f-c),v.value="";const I=v.scrollHeight-c;if(s.isNumber(d)){let m=I*d;h==="border-box"&&(m=m+c+l),f=Math.max(m,f),p.minHeight=`${m}px`}if(s.isNumber(i)){let m=I*i;h==="border-box"&&(m=m+c+l),f=Math.min(m,f)}return p.height=`${f}px`,(u=v.parentNode)==null||u.removeChild(v),v=void 0,p}const re=s.buildProps({id:{type:String,default:void 0},size:C.useSizeProp,disabled:Boolean,modelValue:{type:s.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:s.definePropType([Boolean,Object]),default:!1},autocomplete:{type:s.definePropType(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:C.iconPropType,default:x.circle_close_default},showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:C.iconPropType},prefixIcon:{type:C.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:s.definePropType([Object,Array,String]),default:()=>be.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...b.useAriaProps(["ariaLabel"]),inputmode:{type:s.definePropType(String),default:void 0},name:String}),ke={[b.UPDATE_MODEL_EVENT]:n=>s.isString(n),input:n=>s.isString(n),change:n=>s.isString(n),focus:n=>n instanceof FocusEvent,blur:n=>n instanceof FocusEvent,clear:()=>!0,mouseleave:n=>n instanceof MouseEvent,mouseenter:n=>n instanceof MouseEvent,keydown:n=>n instanceof Event,compositionstart:n=>n instanceof CompositionEvent,compositionupdate:n=>n instanceof CompositionEvent,compositionend:n=>n instanceof CompositionEvent},Se=["class","style"],Ne=/^on[A-Z]/,Ie=(n={})=>{const{excludeListeners:d=!1,excludeKeys:i}=n,o=e.computed(()=>((i==null?void 0:i.value)||[]).concat(Se)),u=e.getCurrentInstance();return u?e.computed(()=>{var c;return s.fromPairs(Object.entries((c=u.proxy)==null?void 0:c.$attrs).filter(([l])=>!o.value.includes(l)&&!(d&&Ne.test(l))))}):e.computed(()=>({}))};function Be(n){let d;function i(){if(n.value==null)return;const{selectionStart:u,selectionEnd:c,value:l}=n.value;if(u==null||c==null)return;const h=l.slice(0,Math.max(0,u)),y=l.slice(Math.max(0,c));d={selectionStart:u,selectionEnd:c,value:l,beforeTxt:h,afterTxt:y}}function o(){if(n.value==null||d==null)return;const{value:u}=n.value,{beforeTxt:c,afterTxt:l,selectionStart:h}=d;if(c==null||l==null||h==null)return;let y=u.length;if(u.endsWith(l))y=u.length-l.length;else if(u.startsWith(c))y=c.length;else{const f=c[h-1],p=u.indexOf(f,h-1);p!==-1&&(y=p+1)}n.value.setSelectionRange(y,y)}return[i,o]}const Ve="ElInput",ze=e.defineComponent({name:Ve,inheritAttrs:!1}),Pe=e.defineComponent({...ze,props:re,emits:ke,setup(n,{expose:d,emit:i}){const o=n,u=e.useAttrs(),c=Ie(),l=e.useSlots(),h=e.computed(()=>[o.type==="textarea"?H.b():r.b(),r.m(m.value),r.is("disabled",g.value),r.is("exceed",ce.value),{[r.b("group")]:l.prepend||l.append,[r.m("prefix")]:l.prefix||o.prefixIcon,[r.m("suffix")]:l.suffix||o.suffixIcon||o.clearable||o.showPassword,[r.bm("suffix","password-clear")]:D.value&&R.value,[r.b("hidden")]:o.type==="hidden"},u.class]),y=e.computed(()=>[r.e("wrapper"),r.is("focus",O.value)]),{form:f,formItem:p}=C.useFormItem(),{inputId:I}=C.useFormItemInputId(o,{formItemContext:p}),m=C.useFormSize(),g=C.useFormDisabled(),r=s.useNamespace("input"),H=s.useNamespace("textarea"),P=e.shallowRef(),E=e.shallowRef(),M=e.ref(!1),T=e.ref(!1),$=e.ref(),F=e.shallowRef(o.inputStyle),k=e.computed(()=>P.value||E.value),{wrapperRef:ae,isFocused:O,handleFocus:le,handleBlur:se}=oe.useFocusController(k,{disabled:g,afterBlur(){var t;o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"blur").catch(a=>b.debugWarn()))}}),K=e.computed(()=>{var t;return(t=f==null?void 0:f.statusIcon)!=null?t:!1}),B=e.computed(()=>(p==null?void 0:p.validateState)||""),U=e.computed(()=>B.value&&C.ValidateComponentsMap[B.value]),ie=e.computed(()=>T.value?x.view_default:x.hide_default),ue=e.computed(()=>[u.style]),j=e.computed(()=>[o.inputStyle,F.value,{resize:o.resize}]),w=e.computed(()=>s.isNil(o.modelValue)?"":String(o.modelValue)),D=e.computed(()=>o.clearable&&!g.value&&!o.readonly&&!!w.value&&(O.value||M.value)),R=e.computed(()=>o.showPassword&&!g.value&&!!w.value),S=e.computed(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!g.value&&!o.readonly&&!o.showPassword),L=e.computed(()=>w.value.length),ce=e.computed(()=>!!S.value&&L.value>Number(o.maxlength)),de=e.computed(()=>!!l.suffix||!!o.suffixIcon||D.value||o.showPassword||S.value||!!B.value&&K.value),[q,W]=Be(P);C.useResizeObserver(E,t=>{if(pe(),!S.value||o.resize!=="both")return;const a=t[0],{width:N}=a.contentRect;$.value={right:`calc(100% - ${N+15+6}px)`}});const V=()=>{const{type:t,autosize:a}=o;if(!(!s.isClient||t!=="textarea"||!E.value))if(a){const N=s.isObject(a)?a.minRows:void 0,ee=s.isObject(a)?a.maxRows:void 0,te=ne(E.value,N,ee);F.value={overflowY:"hidden",...te},e.nextTick(()=>{E.value.offsetHeight,F.value=te})}else F.value={minHeight:ne(E.value).minHeight}},pe=(t=>{let a=!1;return()=>{var N;if(a||!o.autosize)return;((N=E.value)==null?void 0:N.offsetParent)===null||(setTimeout(t),a=!0)}})(V),z=()=>{const t=k.value,a=o.formatter?o.formatter(w.value):w.value;!t||t.value===a||(t.value=a)},A=async t=>{q();let{value:a}=t.target;if(o.formatter&&o.parser&&(a=o.parser(a)),!Y.value){if(a===w.value){z();return}i(b.UPDATE_MODEL_EVENT,a),i(b.INPUT_EVENT,a),await e.nextTick(),z(),W()}},_=t=>{let{value:a}=t.target;o.formatter&&o.parser&&(a=o.parser(a)),i(b.CHANGE_EVENT,a)},{isComposing:Y,handleCompositionStart:X,handleCompositionUpdate:G,handleCompositionEnd:Z}=oe.useComposition({emit:i,afterComposition:A}),fe=()=>{q(),T.value=!T.value,setTimeout(W)},me=()=>{var t;return(t=k.value)==null?void 0:t.focus()},ve=()=>{var t;return(t=k.value)==null?void 0:t.blur()},he=t=>{M.value=!1,i("mouseleave",t)},ye=t=>{M.value=!0,i("mouseenter",t)},J=t=>{i("keydown",t)},ge=()=>{var t;(t=k.value)==null||t.select()},Q=()=>{i(b.UPDATE_MODEL_EVENT,""),i(b.CHANGE_EVENT,""),i("clear"),i(b.INPUT_EVENT,"")};return e.watch(()=>o.modelValue,()=>{var t;e.nextTick(()=>V()),o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"change").catch(a=>b.debugWarn()))}),e.watch(w,()=>z()),e.watch(()=>o.type,async()=>{await e.nextTick(),z(),V()}),e.onMounted(()=>{!o.formatter&&o.parser,z(),e.nextTick(V)}),d({input:P,textarea:E,ref:k,textareaStyle:j,autosize:e.toRef(o,"autosize"),isComposing:Y,focus:me,blur:ve,select:ge,clear:Q,resizeTextarea:V}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(h),{[e.unref(r).bm("group","append")]:t.$slots.append,[e.unref(r).bm("group","prepend")]:t.$slots.prepend}]),style:e.normalizeStyle(e.unref(ue)),onMouseenter:ye,onMouseleave:he},[e.createCommentVNode(" input "),t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" prepend slot "),t.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).be("group","prepend"))},[e.renderSlot(t.$slots,"prepend")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperRef",ref:ae,class:e.normalizeClass(e.unref(y))},[e.createCommentVNode(" prefix slot "),t.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("prefix-inner"))},[e.renderSlot(t.$slots,"prefix"),t.prefixIcon?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.prefixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(I),ref_key:"input",ref:P,class:e.unref(r).e("inner")},e.unref(c),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?T.value?"text":"password":t.type,disabled:e.unref(g),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(G),onCompositionend:e.unref(Z),onInput:A,onChange:_,onKeydown:J}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),e.createCommentVNode(" suffix slot "),e.unref(de)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("suffix-inner"))},[!e.unref(D)||!e.unref(R)||!e.unref(S)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(t.$slots,"suffix"),t.suffixIcon?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:0,class:e.normalizeClass(e.unref(r).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.suffixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0),e.unref(D)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("clear")]),onMousedown:e.withModifiers(e.unref(s.NOOP),["prevent"]),onClick:Q},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onMousedown"])):e.createCommentVNode("v-if",!0),e.unref(R)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:2,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("password")]),onClick:fe},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ie))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.unref(S)?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(r).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("count-inner"))},e.toDisplayString(e.unref(L))+" / "+e.toDisplayString(t.maxlength),3)],2)):e.createCommentVNode("v-if",!0),e.unref(B)&&e.unref(U)&&e.unref(K)?(e.openBlock(),e.createBlock(e.unref(x.ElIcon),{key:4,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("validateIcon"),e.unref(r).is("loading",e.unref(B)==="validating")])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(U))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0)],2),e.createCommentVNode(" append slot "),t.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).be("group","append"))},[e.renderSlot(t.$slots,"append")],2)):e.createCommentVNode("v-if",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" textarea "),e.createElementVNode("textarea",e.mergeProps({id:e.unref(I),ref_key:"textarea",ref:E,class:[e.unref(H).e("inner"),e.unref(r).is("focus",e.unref(O))]},e.unref(c),{minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:e.unref(g),readonly:t.readonly,autocomplete:t.autocomplete,style:e.unref(j),"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(G),onCompositionend:e.unref(Z),onInput:A,onFocus:e.unref(le),onBlur:e.unref(se),onChange:_,onKeydown:J}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),e.unref(S)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle($.value),class:e.normalizeClass(e.unref(r).e("count"))},e.toDisplayString(e.unref(L))+" / "+e.toDisplayString(t.maxlength),7)):e.createCommentVNode("v-if",!0)],64))],38))}});var Te=s._export_sfc(Pe,[["__file","input.vue"]]);const Fe=s.withInstall(Te);exports.ElInput=Fe;exports.inputProps=re;
@@ -1 +0,0 @@
1
- "use strict";const n=require("vue"),W=require("./el-input-9a9a7f7f.cjs"),E=require("./index-00f6ca75.cjs"),l=require("./base-ef747d02.cjs"),g=require("./use-form-common-props-ac666630.cjs"),c=require("./el-popper-a4f3ae4d.cjs"),X=require("./index-bb833443.cjs"),Y=100,j=600,L={beforeMount(o,v){const d=v.value,{interval:u=Y,delay:h=j}=l.isFunction(d)?{}:d;let f,p;const i=()=>l.isFunction(d)?d():d.handler(),b=()=>{p&&(clearTimeout(p),p=void 0),f&&(clearInterval(f),f=void 0)};o.addEventListener("mousedown",y=>{y.button===0&&(b(),i(),document.addEventListener("mouseup",()=>b(),{once:!0}),p=setTimeout(()=>{f=setInterval(()=>{i()},u)},h))})}},J=l.buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:g.useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:o=>o===null||l.isNumber(o)||["min","max"].includes(o),default:null},name:String,placeholder:String,precision:{type:Number,validator:o=>o>=0&&o===Number.parseInt(`${o}`,10)},validateEvent:{type:Boolean,default:!0},...c.useAriaProps(["ariaLabel"]),inputmode:{type:l.definePropType(String),default:void 0},align:{type:l.definePropType(String),default:"center"},disabledScientific:Boolean}),Q={[c.CHANGE_EVENT]:(o,v)=>v!==o,blur:o=>o instanceof FocusEvent,focus:o=>o instanceof FocusEvent,[c.INPUT_EVENT]:o=>l.isNumber(o)||l.isNil(o),[c.UPDATE_MODEL_EVENT]:o=>l.isNumber(o)||l.isNil(o)},Z=n.defineComponent({name:"ElInputNumber"}),ee=n.defineComponent({...Z,props:J,emits:Q,setup(o,{expose:v,emit:d}){const u=o,{t:h}=X.useLocale(),f=l.useNamespace("input-number"),p=n.ref(),i=n.reactive({currentValue:u.modelValue,userInput:null}),{formItem:b}=g.useFormItem(),y=n.computed(()=>l.isNumber(u.modelValue)&&u.modelValue<=u.min),B=n.computed(()=>l.isNumber(u.modelValue)&&u.modelValue>=u.max),x=n.computed(()=>{const e=M(u.step);return l.isUndefined(u.precision)?Math.max(M(u.modelValue),e):(e>u.precision,u.precision)}),w=n.computed(()=>u.controls&&u.controlsPosition==="right"),F=g.useFormSize(),V=g.useFormDisabled(),S=n.computed(()=>{if(i.userInput!==null)return i.userInput;let e=i.currentValue;if(l.isNil(e))return"";if(l.isNumber(e)){if(Number.isNaN(e))return"";l.isUndefined(u.precision)||(e=e.toFixed(u.precision))}return e}),A=(e,r)=>{if(l.isUndefined(r)&&(r=x.value),r===0)return Math.round(e);let t=String(e);const a=t.indexOf(".");if(a===-1||!t.replace(".","").split("")[a+r])return e;const I=t.length;return t.charAt(I-1)==="5"&&(t=`${t.slice(0,Math.max(0,I-1))}6`),Number.parseFloat(Number(t).toFixed(r))},M=e=>{if(l.isNil(e))return 0;const r=e.toString(),t=r.indexOf(".");let a=0;return t!==-1&&(a=r.length-t-1),a},U=(e,r=1)=>l.isNumber(e)?e>=Number.MAX_SAFE_INTEGER&&r===1||e<=Number.MIN_SAFE_INTEGER&&r===-1?e:A(e+u.step*r):i.currentValue,O=e=>{var r;const t=e;if(u.disabledScientific&&["e","E"].includes(t.key)){t.preventDefault();return}const a={[c.EVENT_CODE.up]:()=>{t.preventDefault(),P()},[c.EVENT_CODE.down]:()=>{t.preventDefault(),D()}};(r=a[t.key])==null||r.call(a)},P=()=>{if(u.readonly||V.value||B.value)return;const e=Number(S.value)||0,r=U(e);_(r),d(c.INPUT_EVENT,i.currentValue),C()},D=()=>{if(u.readonly||V.value||y.value)return;const e=Number(S.value)||0,r=U(e,-1);_(r),d(c.INPUT_EVENT,i.currentValue),C()},k=(e,r)=>{const{max:t,min:a,step:s,precision:N,stepStrictly:I,valueOnClear:T}=u;t<a&&c.throwError("InputNumber","min should not be greater than max.");let m=Number(e);if(l.isNil(e)||Number.isNaN(m))return null;if(e===""){if(T===null)return null;m=l.isString(T)?{min:a,max:t}[T]:T}return I&&(m=A(Math.round(m/s)*s,N),m!==e&&r&&d(c.UPDATE_MODEL_EVENT,m)),l.isUndefined(N)||(m=A(m,N)),(m>t||m<a)&&(m=m>t?t:a,r&&d(c.UPDATE_MODEL_EVENT,m)),m},_=(e,r=!0)=>{var t;const a=i.currentValue,s=k(e);if(!r){d(c.UPDATE_MODEL_EVENT,s);return}a===s&&e||(i.userInput=null,d(c.UPDATE_MODEL_EVENT,s),a!==s&&d(c.CHANGE_EVENT,s,a),u.validateEvent&&((t=b==null?void 0:b.validate)==null||t.call(b,"change").catch(N=>c.debugWarn())),i.currentValue=s)},$=e=>{i.userInput=e;const r=e===""?null:Number(e);d(c.INPUT_EVENT,r),_(r,!1)},z=e=>{const r=e!==""?Number(e):"";(l.isNumber(r)&&!Number.isNaN(r)||e==="")&&_(r),C(),i.userInput=null},R=()=>{var e,r;(r=(e=p.value)==null?void 0:e.focus)==null||r.call(e)},K=()=>{var e,r;(r=(e=p.value)==null?void 0:e.blur)==null||r.call(e)},q=e=>{d("focus",e)},G=e=>{var r,t;i.userInput=null,i.currentValue===null&&((r=p.value)!=null&&r.input)&&(p.value.input.value=""),d("blur",e),u.validateEvent&&((t=b==null?void 0:b.validate)==null||t.call(b,"blur").catch(a=>c.debugWarn()))},C=()=>{i.currentValue!==u.modelValue&&(i.currentValue=u.modelValue)},H=e=>{document.activeElement===e.target&&e.preventDefault()};return n.watch(()=>u.modelValue,(e,r)=>{const t=k(e,!0);i.userInput===null&&t!==r&&(i.currentValue=t)},{immediate:!0}),n.watch(()=>u.precision,()=>{i.currentValue=k(u.modelValue)}),n.onMounted(()=>{var e;const{min:r,max:t,modelValue:a}=u,s=(e=p.value)==null?void 0:e.input;if(s.setAttribute("role","spinbutton"),Number.isFinite(t)?s.setAttribute("aria-valuemax",String(t)):s.removeAttribute("aria-valuemax"),Number.isFinite(r)?s.setAttribute("aria-valuemin",String(r)):s.removeAttribute("aria-valuemin"),s.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),s.setAttribute("aria-disabled",String(V.value)),!l.isNumber(a)&&a!=null){let N=Number(a);Number.isNaN(N)&&(N=null),d(c.UPDATE_MODEL_EVENT,N)}s.addEventListener("wheel",H,{passive:!1})}),n.onUpdated(()=>{var e,r;const t=(e=p.value)==null?void 0:e.input;t==null||t.setAttribute("aria-valuenow",`${(r=i.currentValue)!=null?r:""}`)}),v({focus:R,blur:K}),(e,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([n.unref(f).b(),n.unref(f).m(n.unref(F)),n.unref(f).is("disabled",n.unref(V)),n.unref(f).is("without-controls",!e.controls),n.unref(f).is("controls-right",n.unref(w)),n.unref(f).is(e.align,!!e.align)]),onDragstart:n.withModifiers(()=>{},["prevent"])},[e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:0,role:"button","aria-label":n.unref(h)("el.inputNumber.decrease"),class:n.normalizeClass([n.unref(f).e("decrease"),n.unref(f).is("disabled",n.unref(y))]),onKeydown:n.withKeys(D,["enter"])},[n.renderSlot(e.$slots,"decrease-icon",{},()=>[n.createVNode(n.unref(E.ElIcon),null,{default:n.withCtx(()=>[n.unref(w)?(n.openBlock(),n.createBlock(n.unref(E.arrow_down_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(E.minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(L),D]]):n.createCommentVNode("v-if",!0),e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:1,role:"button","aria-label":n.unref(h)("el.inputNumber.increase"),class:n.normalizeClass([n.unref(f).e("increase"),n.unref(f).is("disabled",n.unref(B))]),onKeydown:n.withKeys(P,["enter"])},[n.renderSlot(e.$slots,"increase-icon",{},()=>[n.createVNode(n.unref(E.ElIcon),null,{default:n.withCtx(()=>[n.unref(w)?(n.openBlock(),n.createBlock(n.unref(E.arrow_up_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(E.plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(L),P]]):n.createCommentVNode("v-if",!0),n.createVNode(n.unref(W.ElInput),{id:e.id,ref_key:"input",ref:p,type:"number",step:e.step,"model-value":n.unref(S),placeholder:e.placeholder,readonly:e.readonly,disabled:n.unref(V),size:n.unref(F),max:e.max,min:e.min,name:e.name,"aria-label":e.ariaLabel,"validate-event":!1,inputmode:e.inputmode,onKeydown:O,onBlur:G,onFocus:q,onInput:$,onChange:z},n.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"prefix")])}:void 0,e.$slots.suffix?{name:"suffix",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],42,["onDragstart"]))}});var ne=l._export_sfc(ee,[["__file","input-number.vue"]]);const re=l.withInstall(ne);exports.ElInputNumber=re;