st-comp 0.0.207 → 0.0.208

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 (160) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +1 -74
  3. package/es/CustomFunction.cjs +1 -1
  4. package/es/CustomFunction.js +53 -56
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +45 -48
  7. package/es/HeatMap.cjs +1 -1
  8. package/es/HeatMap.js +1 -118
  9. package/es/Kline.cjs +1 -1
  10. package/es/Kline.js +16 -19
  11. package/es/KlineBasic.cjs +1 -1
  12. package/es/KlineBasic.js +81 -84
  13. package/es/KlineConfig.cjs +1 -1
  14. package/es/KlineConfig.js +161 -164
  15. package/es/KlineNew.cjs +1 -1
  16. package/es/KlineNew.js +15 -18
  17. package/es/KlinePlus.cjs +1 -1
  18. package/es/KlinePlus.js +18 -21
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +140 -143
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +2 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +55 -58
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +85 -88
  27. package/es/VarSelectDialog.cjs +2 -2
  28. package/es/VarSelectDialog.js +53 -56
  29. package/es/VarietyAutoComplete.cjs +1 -1
  30. package/es/VarietyAutoComplete.js +15 -17
  31. package/es/VarietySearch.cjs +10 -10
  32. package/es/VarietySearch.js +53 -56
  33. package/es/VarietyTextCopy.cjs +3 -3
  34. package/es/VarietyTextCopy.js +33 -36
  35. package/es/VirtualTable.cjs +1 -1
  36. package/es/VirtualTable.js +103 -106
  37. package/es/{_initCloneObject-eaef9418.js → _initCloneObject-c477c74d.js} +25 -26
  38. package/es/_initCloneObject-e660897e.cjs +1 -0
  39. package/es/base-7ba08794.cjs +5 -0
  40. package/es/{index-a871c3eb.js → base-aa512893.js} +454 -171
  41. package/es/{castArray-7741a212.js → castArray-1eb17278.js} +1 -1
  42. package/es/castArray-efa457a5.cjs +1 -0
  43. package/es/{config-provider-a584d81e.cjs → config-provider-18c0a68a.cjs} +1 -1
  44. package/es/{config-provider-b16efd62.js → config-provider-49c17381.js} +6 -6
  45. package/es/{debounce-8d53f4dd.js → debounce-33406a0d.js} +9 -9
  46. package/es/debounce-4aa22feb.cjs +1 -0
  47. package/es/{dropdown-071c5d7e.cjs → dropdown-3f1fe325.cjs} +1 -1
  48. package/es/{dropdown-a59bba73.js → dropdown-6e7b1df0.js} +15 -15
  49. package/es/el-autocomplete-609ac86d.cjs +1 -0
  50. package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-87b7f461.js} +51 -53
  51. package/es/el-button-08310c06.cjs +1 -0
  52. package/es/{el-button-c95adb85.js → el-button-56624e61.js} +45 -46
  53. package/es/{el-checkbox-c25236a6.cjs → el-checkbox-09f3b57f.cjs} +1 -1
  54. package/es/{el-checkbox-7421ccd3.js → el-checkbox-f13560e9.js} +40 -40
  55. package/es/{el-dialog-41ab8417.js → el-dialog-1d5f5877.js} +9 -10
  56. package/es/el-dialog-ea480083.cjs +1 -0
  57. package/es/{el-divider-4e059794.js → el-divider-1cda1783.js} +1 -1
  58. package/es/{el-divider-4713d74c.cjs → el-divider-8a4c87e3.cjs} +1 -1
  59. package/es/{el-empty-33cb66f1.js → el-empty-04682b5d.js} +3 -3
  60. package/es/el-empty-b40fa7ea.cjs +1 -0
  61. package/es/el-form-item-338ea2f7.cjs +12 -0
  62. package/es/{el-form-item-c53c374d.js → el-form-item-505c0b70.js} +75 -76
  63. package/es/{el-input-2f75c4ba.js → el-input-262851e8.js} +84 -85
  64. package/es/el-input-b04b5bfc.cjs +1 -0
  65. package/es/el-input-number-7242c8b5.cjs +1 -0
  66. package/es/{el-input-number-5193fe6d.js → el-input-number-fdac2b86.js} +82 -83
  67. package/es/{el-loading-cfd86c15.cjs → el-loading-3cf7b796.cjs} +1 -1
  68. package/es/{el-loading-f6022062.js → el-loading-7440dc64.js} +2 -2
  69. package/es/{el-menu-item-7e881203.js → el-menu-item-36c3004c.js} +53 -54
  70. package/es/el-menu-item-7aca344e.cjs +1 -0
  71. package/es/el-message-05cd85bf.cjs +1 -0
  72. package/es/{el-message-e544a8f5.js → el-message-416bd265.js} +28 -29
  73. package/es/{el-message-box-a93d2f6a.js → el-message-box-8f5e34ca.js} +20 -22
  74. package/es/el-message-box-b7e9917e.cjs +1 -0
  75. package/es/{el-overlay-09ad71cd.js → el-overlay-04426e36.js} +52 -53
  76. package/es/el-overlay-60bc5a02.cjs +1 -0
  77. package/es/el-popconfirm-24b622c5.cjs +1 -0
  78. package/es/{el-popconfirm-81dcd202.js → el-popconfirm-3790cda2.js} +38 -39
  79. package/es/el-popper-1dd8f5b4.cjs +1 -0
  80. package/es/{el-popper-b4f97157.js → el-popper-49152708.js} +191 -192
  81. package/es/{el-segmented-b868d074.js → el-segmented-05509f9d.js} +12 -13
  82. package/es/el-segmented-a928d89b.cjs +1 -0
  83. package/es/el-select-5fd77a96.cjs +1 -0
  84. package/es/{el-select-95627997.js → el-select-700f3686.js} +292 -295
  85. package/es/{el-table-column-376cd907.js → el-table-column-44360700.js} +54 -57
  86. package/es/el-table-column-bf3ab2a6.cjs +14 -0
  87. package/es/{el-tag-66cab138.js → el-tag-55a172c9.js} +30 -31
  88. package/es/el-tag-d59f3463.cjs +1 -0
  89. package/es/{el-text-c20a9f48.cjs → el-text-5bcaffb6.cjs} +1 -1
  90. package/es/{el-text-ac60d0f2.js → el-text-ab6bfc40.js} +4 -4
  91. package/es/{index-1f7d4f70.js → index-0afedcbd.js} +11 -12
  92. package/es/{index-88546436.js → index-29418a8d.js} +18 -18
  93. package/es/index-3d0bc5da.js +566 -0
  94. package/es/{index-57672682.js → index-4e46f96c.js} +12 -13
  95. package/es/{index-844bdd85.js → index-66ad0d6a.js} +34 -34
  96. package/es/{index-f967d6c1.cjs → index-882d77d3.cjs} +1 -1
  97. package/es/index-a206f6eb.cjs +1 -0
  98. package/es/{index-298075cf.cjs → index-ae6c9d97.cjs} +1 -1
  99. package/es/index-b4700d83.cjs +1 -0
  100. package/es/index-c30cf7f9.cjs +1 -0
  101. package/es/{index-d91dc23f.js → index-cbbd78b4.js} +12 -12
  102. package/es/{index-11547a0c.cjs → index-d8294b1a.cjs} +1 -1
  103. package/es/{raf-8249652f.cjs → raf-336ef01e.cjs} +1 -1
  104. package/es/raf-d8c44079.js +6 -0
  105. package/es/{scroll-679bd6bf.js → scroll-0a48995c.js} +5 -5
  106. package/es/{scroll-b108dabd.cjs → scroll-19533c53.cjs} +1 -1
  107. package/es/style.css +1 -1
  108. package/es/use-form-common-props-41182853.cjs +1 -0
  109. package/es/use-form-common-props-4cdda474.js +671 -0
  110. package/es/use-global-config-7bfbe48c.js +71 -0
  111. package/es/use-global-config-dc5527e8.cjs +1 -0
  112. package/es/{validator-1b8a6128.cjs → validator-28b22907.cjs} +1 -1
  113. package/es/{validator-764a9db0.js → validator-e35f7978.js} +1 -1
  114. package/es/{vnode-b906ae6d.cjs → vnode-8cb31692.cjs} +1 -1
  115. package/es/{vnode-5ddb7ed1.js → vnode-b62d0045.js} +1 -1
  116. package/es/{zh-cn-e963c628.js → zh-cn-346f3a73.js} +2 -2
  117. package/es/{zh-cn-90317f62.cjs → zh-cn-7c8640bb.cjs} +1 -1
  118. package/lib/bundle.js +1 -1
  119. package/lib/bundle.umd.cjs +1 -1
  120. package/lib/{index-f27d8c7a.js → index-da0f2951.js} +3 -3
  121. package/lib/{python-c345f0e2.js → python-c0a1e4ef.js} +1 -1
  122. package/lib/style.css +1 -1
  123. package/package.json +1 -1
  124. package/packages/KlineBasic/components/KlineTips/index.vue +1 -1
  125. package/es/_initCloneObject-52b6a510.cjs +0 -1
  126. package/es/base-a5af3db3.js +0 -288
  127. package/es/base-ef747d02.cjs +0 -5
  128. package/es/castArray-35947698.cjs +0 -1
  129. package/es/debounce-62f5b6e8.cjs +0 -1
  130. package/es/el-autocomplete-a07e9439.cjs +0 -1
  131. package/es/el-button-eec58cff.cjs +0 -1
  132. package/es/el-dialog-ae86edb8.cjs +0 -1
  133. package/es/el-empty-1697ded8.cjs +0 -1
  134. package/es/el-form-item-c3fe189b.cjs +0 -12
  135. package/es/el-input-7fd293af.cjs +0 -1
  136. package/es/el-input-number-22e21d16.cjs +0 -1
  137. package/es/el-menu-item-17dc717e.cjs +0 -1
  138. package/es/el-message-5e6a6be9.cjs +0 -1
  139. package/es/el-message-box-c10adb52.cjs +0 -1
  140. package/es/el-overlay-9e34965f.cjs +0 -1
  141. package/es/el-popconfirm-70a976bf.cjs +0 -1
  142. package/es/el-popper-b6c99b28.cjs +0 -1
  143. package/es/el-segmented-f8fce9ac.cjs +0 -1
  144. package/es/el-select-d8d91db1.cjs +0 -1
  145. package/es/el-table-column-c974cb96.cjs +0 -14
  146. package/es/el-tag-a33c4b22.cjs +0 -1
  147. package/es/index-098c2447.cjs +0 -1
  148. package/es/index-960806da.js +0 -314
  149. package/es/index-9780a537.cjs +0 -1
  150. package/es/index-9b9ef5dd.cjs +0 -1
  151. package/es/index-bb833443.cjs +0 -1
  152. package/es/index-c108567d.cjs +0 -1
  153. package/es/index-d77a7336.js +0 -204
  154. package/es/index-e5566b94.js +0 -368
  155. package/es/index-f3562b52.cjs +0 -1
  156. package/es/raf-80ef0c0a.js +0 -6
  157. package/es/use-form-common-props-815d48a6.js +0 -364
  158. package/es/use-form-common-props-fd9b61a0.cjs +0 -1
  159. package/es/use-global-config-30d7d8ce.cjs +0 -1
  160. package/es/use-global-config-b5e9d3d5.js +0 -72
@@ -1,11 +1,10 @@
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-815d48a6.js";
3
- import { w as nt, x as at, y as st, E as B } from "./index-a871c3eb.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";
1
+ import { computed as c, getCurrentInstance as Ue, defineComponent as ze, useAttrs as We, useSlots as Ye, shallowRef as Q, ref as Z, watch as q, nextTick as O, onMounted as Xe, toRef as _e, openBlock as d, createElementBlock as S, normalizeClass as m, unref as t, normalizeStyle as be, createCommentVNode as p, Fragment as J, renderSlot as j, createElementVNode as k, createBlock as C, withCtx as R, resolveDynamicComponent as L, mergeProps as we, withModifiers as Ge, toDisplayString as U } from "vue";
2
+ import { u as Qe, k as ee, f as Ze, g as qe, a as Je, e as et, V as tt, j as ot } from "./use-form-common-props-4cdda474.js";
3
+ import { a as ke, n as xe, b as nt, d as B, M as at, m as te, O as st, u as Se, P as lt, Q as rt, H as it, E as H, N as ut, _ as dt, p as Ce, w as ct } from "./base-aa512893.js";
5
4
  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-b4f97157.js";
7
- import { a as vt, u as mt } from "./index-d91dc23f.js";
8
- const ht = () => Te && /firefox/i.test(window.navigator.userAgent);
5
+ import { u as ft, U as oe, d as Ie, I as Ee, C as Ne } from "./el-popper-49152708.js";
6
+ import { u as vt, a as mt } from "./index-cbbd78b4.js";
7
+ const ht = () => ke && /firefox/i.test(window.navigator.userAgent);
9
8
  let g;
10
9
  const yt = {
11
10
  height: "0",
@@ -40,7 +39,7 @@ function bt(n) {
40
39
  f.getPropertyValue(l)
41
40
  ]), paddingSize: o, borderSize: i, boxSizing: r };
42
41
  }
43
- function ze(n, f = 1, r) {
42
+ function Pe(n, f = 1, r) {
44
43
  var o, i;
45
44
  g || (g = document.createElement("textarea"), ((o = n.parentNode) != null ? o : document.body).appendChild(g));
46
45
  const { paddingSize: u, borderSize: l, boxSizing: b, contextStyle: w } = bt(n);
@@ -48,26 +47,26 @@ function ze(n, f = 1, r) {
48
47
  let h = g.scrollHeight;
49
48
  const v = {};
50
49
  b === "border-box" ? h = h + l : b === "content-box" && (h = h - u), g.value = "";
51
- const k = g.scrollHeight - u;
50
+ const T = g.scrollHeight - u;
52
51
  if (xe(f)) {
53
- let y = k * f;
52
+ let y = T * f;
54
53
  b === "border-box" && (y = y + u + l), h = Math.max(y, h), v.minHeight = `${y}px`;
55
54
  }
56
55
  if (xe(r)) {
57
- let y = k * r;
56
+ let y = T * r;
58
57
  b === "border-box" && (y = y + u + l), h = Math.min(y, h);
59
58
  }
60
59
  return v.height = `${h}px`, (i = g.parentNode) == null || i.removeChild(g), g = void 0, v;
61
60
  }
62
- const wt = lt({
61
+ const wt = nt({
63
62
  id: {
64
63
  type: String,
65
64
  default: void 0
66
65
  },
67
- size: Ze,
66
+ size: Qe,
68
67
  disabled: Boolean,
69
68
  modelValue: {
70
- type: H([
69
+ type: B([
71
70
  String,
72
71
  Number,
73
72
  Object
@@ -89,11 +88,11 @@ const wt = lt({
89
88
  values: ["none", "both", "horizontal", "vertical"]
90
89
  },
91
90
  autosize: {
92
- type: H([Boolean, Object]),
91
+ type: B([Boolean, Object]),
93
92
  default: !1
94
93
  },
95
94
  autocomplete: {
96
- type: H(String),
95
+ type: B(String),
97
96
  default: "off"
98
97
  },
99
98
  formatter: {
@@ -112,7 +111,7 @@ const wt = lt({
112
111
  clearable: Boolean,
113
112
  clearIcon: {
114
113
  type: ee,
115
- default: nt
114
+ default: at
116
115
  },
117
116
  showPassword: Boolean,
118
117
  showWordLimit: Boolean,
@@ -135,7 +134,7 @@ const wt = lt({
135
134
  default: !0
136
135
  },
137
136
  inputStyle: {
138
- type: H([Object, Array, String]),
137
+ type: B([Object, Array, String]),
139
138
  default: () => pt({})
140
139
  },
141
140
  autofocus: Boolean,
@@ -145,7 +144,7 @@ const wt = lt({
145
144
  },
146
145
  ...ft(["ariaLabel"]),
147
146
  inputmode: {
148
- type: H(String),
147
+ type: B(String),
149
148
  default: void 0
150
149
  },
151
150
  name: String
@@ -166,7 +165,7 @@ const wt = lt({
166
165
  const { excludeListeners: f = !1, excludeKeys: r } = n, o = c(() => ((r == null ? void 0 : r.value) || []).concat(St)), i = Ue();
167
166
  return i ? c(() => {
168
167
  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))));
168
+ return st(Object.entries((u = i.proxy) == null ? void 0 : u.$attrs).filter(([l]) => !o.value.includes(l) && !(f && Ct.test(l))));
170
169
  }) : c(() => ({}));
171
170
  };
172
171
  function Et(n) {
@@ -205,11 +204,11 @@ function Et(n) {
205
204
  }
206
205
  return [r, o];
207
206
  }
208
- const Nt = "ElInput", zt = Pe({
207
+ const Nt = "ElInput", Pt = ze({
209
208
  name: Nt,
210
209
  inheritAttrs: !1
211
- }), Pt = /* @__PURE__ */ Pe({
212
- ...zt,
210
+ }), zt = /* @__PURE__ */ ze({
211
+ ...Pt,
213
212
  props: wt,
214
213
  emits: xt,
215
214
  setup(n, { expose: f, emit: r }) {
@@ -217,7 +216,7 @@ const Nt = "ElInput", zt = Pe({
217
216
  o.type === "textarea" ? ne.b() : a.b(),
218
217
  a.m(y.value),
219
218
  a.is("disabled", x.value),
220
- a.is("exceed", Le.value),
219
+ a.is("exceed", Re.value),
221
220
  {
222
221
  [a.b("group")]: l.prepend || l.append,
223
222
  [a.m("prefix")]: l.prefix || o.prefixIcon,
@@ -229,9 +228,9 @@ const Nt = "ElInput", zt = Pe({
229
228
  ]), w = c(() => [
230
229
  a.e("wrapper"),
231
230
  a.is("focus", Y.value)
232
- ]), { form: h, formItem: v } = qe(), { inputId: k } = Je(o, {
231
+ ]), { form: h, formItem: v } = Ze(), { inputId: T } = qe(o, {
233
232
  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, {
233
+ }), y = Je(), x = et(), a = Se("input"), ne = Se("textarea"), $ = Q(), I = Q(), W = Z(!1), A = Z(!1), ae = Z(), D = Q(o.inputStyle), N = c(() => $.value || I.value), { wrapperRef: Te, isFocused: Y, handleFocus: Ve, handleBlur: Fe } = vt(N, {
235
234
  disabled: x,
236
235
  afterBlur() {
237
236
  var e;
@@ -240,48 +239,48 @@ const Nt = "ElInput", zt = Pe({
240
239
  }), se = c(() => {
241
240
  var e;
242
241
  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(() => [
242
+ }), V = c(() => (v == null ? void 0 : v.validateState) || ""), le = c(() => V.value && tt[V.value]), Me = c(() => A.value ? lt : rt), Oe = c(() => [
244
243
  i.style
245
244
  ]), re = c(() => [
246
245
  o.inputStyle,
247
246
  D.value,
248
247
  { 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($);
248
+ ]), 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), P = c(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !x.value && !o.readonly && !o.showPassword), _ = c(() => E.value.length), Re = c(() => !!P.value && _.value > Number(o.maxlength)), Le = c(() => !!l.suffix || !!o.suffixIcon || K.value || o.showPassword || P.value || !!V.value && se.value), [ie, ue] = Et($);
250
249
  ot(I, (e) => {
251
- if (Be(), !z.value || o.resize !== "both")
250
+ if (Be(), !P.value || o.resize !== "both")
252
251
  return;
253
- const s = e[0], { width: P } = s.contentRect;
252
+ const s = e[0], { width: z } = s.contentRect;
254
253
  ae.value = {
255
- right: `calc(100% - ${P + 15 + 6}px)`
254
+ right: `calc(100% - ${z + 15 + 6}px)`
256
255
  };
257
256
  });
258
257
  const F = () => {
259
258
  const { type: e, autosize: s } = o;
260
- if (!(!Te || e !== "textarea" || !I.value))
259
+ if (!(!ke || e !== "textarea" || !I.value))
261
260
  if (s) {
262
- const P = Ce(s) ? s.minRows : void 0, ye = Ce(s) ? s.maxRows : void 0, ge = ze(I.value, P, ye);
261
+ const z = Ce(s) ? s.minRows : void 0, ye = Ce(s) ? s.maxRows : void 0, ge = Pe(I.value, z, ye);
263
262
  D.value = {
264
263
  overflowY: "hidden",
265
264
  ...ge
266
- }, R(() => {
265
+ }, O(() => {
267
266
  I.value.offsetHeight, D.value = ge;
268
267
  });
269
268
  } else
270
269
  D.value = {
271
- minHeight: ze(I.value).minHeight
270
+ minHeight: Pe(I.value).minHeight
272
271
  };
273
272
  }, Be = ((e) => {
274
273
  let s = !1;
275
274
  return () => {
276
- var P;
275
+ var z;
277
276
  if (s || !o.autosize)
278
277
  return;
279
- ((P = I.value) == null ? void 0 : P.offsetParent) === null || (setTimeout(e), s = !0);
278
+ ((z = I.value) == null ? void 0 : z.offsetParent) === null || (setTimeout(e), s = !0);
280
279
  };
281
280
  })(F), M = () => {
282
281
  const e = N.value, s = o.formatter ? o.formatter(E.value) : E.value;
283
282
  !e || e.value === s || (e.value = s);
284
- }, _ = async (e) => {
283
+ }, G = async (e) => {
285
284
  ie();
286
285
  let { value: s } = e.target;
287
286
  if (o.formatter && o.parser && (s = o.parser(s)), !ce.value) {
@@ -289,7 +288,7 @@ const Nt = "ElInput", zt = Pe({
289
288
  M();
290
289
  return;
291
290
  }
292
- r(oe, s), r(Ee, s), await R(), M(), ue();
291
+ r(oe, s), r(Ee, s), await O(), M(), ue();
293
292
  }
294
293
  }, de = (e) => {
295
294
  let { value: s } = e.target;
@@ -299,7 +298,7 @@ const Nt = "ElInput", zt = Pe({
299
298
  handleCompositionStart: pe,
300
299
  handleCompositionUpdate: fe,
301
300
  handleCompositionEnd: ve
302
- } = mt({ emit: r, afterComposition: _ }), He = () => {
301
+ } = mt({ emit: r, afterComposition: G }), He = () => {
303
302
  ie(), A.value = !A.value, setTimeout(ue);
304
303
  }, $e = () => {
305
304
  var e;
@@ -319,19 +318,19 @@ const Nt = "ElInput", zt = Pe({
319
318
  }, he = () => {
320
319
  r(oe, ""), r(Ne, ""), r("clear"), r(Ee, "");
321
320
  };
322
- return J(() => o.modelValue, () => {
321
+ return q(() => o.modelValue, () => {
323
322
  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();
323
+ O(() => F()), o.validateEvent && ((e = v == null ? void 0 : v.validate) == null || e.call(v, "change").catch((s) => Ie()));
324
+ }), q(E, () => M()), q(() => o.type, async () => {
325
+ await O(), M(), F();
327
326
  }), Xe(() => {
328
- !o.formatter && o.parser, M(), R(F);
327
+ !o.formatter && o.parser, M(), O(F);
329
328
  }), f({
330
329
  input: $,
331
330
  textarea: I,
332
331
  ref: N,
333
332
  textareaStyle: re,
334
- autosize: Ge(o, "autosize"),
333
+ autosize: _e(o, "autosize"),
335
334
  isComposing: ce,
336
335
  focus: $e,
337
336
  blur: Ae,
@@ -346,12 +345,12 @@ const Nt = "ElInput", zt = Pe({
346
345
  [t(a).bm("group", "prepend")]: e.$slots.prepend
347
346
  }
348
347
  ]),
349
- style: be(t(Re)),
348
+ style: be(t(Oe)),
350
349
  onMouseenter: Ke,
351
350
  onMouseleave: De
352
351
  }, [
353
352
  p(" input "),
354
- e.type !== "textarea" ? (d(), S(Q, { key: 0 }, [
353
+ e.type !== "textarea" ? (d(), S(J, { key: 0 }, [
355
354
  p(" prepend slot "),
356
355
  e.$slots.prepend ? (d(), S("div", {
357
356
  key: 0,
@@ -359,9 +358,9 @@ const Nt = "ElInput", zt = Pe({
359
358
  }, [
360
359
  j(e.$slots, "prepend")
361
360
  ], 2)) : p("v-if", !0),
362
- T("div", {
361
+ k("div", {
363
362
  ref_key: "wrapperRef",
364
- ref: ke,
363
+ ref: Te,
365
364
  class: m(t(w))
366
365
  }, [
367
366
  p(" prefix slot "),
@@ -369,23 +368,23 @@ const Nt = "ElInput", zt = Pe({
369
368
  key: 0,
370
369
  class: m(t(a).e("prefix"))
371
370
  }, [
372
- T("span", {
371
+ k("span", {
373
372
  class: m(t(a).e("prefix-inner"))
374
373
  }, [
375
374
  j(e.$slots, "prefix"),
376
- e.prefixIcon ? (d(), C(t(B), {
375
+ e.prefixIcon ? (d(), C(t(H), {
377
376
  key: 0,
378
377
  class: m(t(a).e("icon"))
379
378
  }, {
380
- default: L(() => [
381
- (d(), C(O(e.prefixIcon)))
379
+ default: R(() => [
380
+ (d(), C(L(e.prefixIcon)))
382
381
  ]),
383
382
  _: 1
384
383
  }, 8, ["class"])) : p("v-if", !0)
385
384
  ], 2)
386
385
  ], 2)) : p("v-if", !0),
387
- T("input", we({
388
- id: t(k),
386
+ k("input", we({
387
+ id: t(T),
389
388
  ref_key: "input",
390
389
  ref: $,
391
390
  class: t(a).e("inner")
@@ -408,60 +407,60 @@ const Nt = "ElInput", zt = Pe({
408
407
  onCompositionstart: t(pe),
409
408
  onCompositionupdate: t(fe),
410
409
  onCompositionend: t(ve),
411
- onInput: _,
410
+ onInput: G,
412
411
  onChange: de,
413
412
  onKeydown: me
414
413
  }), null, 16, ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
415
414
  p(" suffix slot "),
416
- t(Oe) ? (d(), S("span", {
415
+ t(Le) ? (d(), S("span", {
417
416
  key: 1,
418
417
  class: m(t(a).e("suffix"))
419
418
  }, [
420
- T("span", {
419
+ k("span", {
421
420
  class: m(t(a).e("suffix-inner"))
422
421
  }, [
423
- !t(K) || !t(X) || !t(z) ? (d(), S(Q, { key: 0 }, [
422
+ !t(K) || !t(X) || !t(P) ? (d(), S(J, { key: 0 }, [
424
423
  j(e.$slots, "suffix"),
425
- e.suffixIcon ? (d(), C(t(B), {
424
+ e.suffixIcon ? (d(), C(t(H), {
426
425
  key: 0,
427
426
  class: m(t(a).e("icon"))
428
427
  }, {
429
- default: L(() => [
430
- (d(), C(O(e.suffixIcon)))
428
+ default: R(() => [
429
+ (d(), C(L(e.suffixIcon)))
431
430
  ]),
432
431
  _: 1
433
432
  }, 8, ["class"])) : p("v-if", !0)
434
433
  ], 64)) : p("v-if", !0),
435
- t(K) ? (d(), C(t(B), {
434
+ t(K) ? (d(), C(t(H), {
436
435
  key: 1,
437
436
  class: m([t(a).e("icon"), t(a).e("clear")]),
438
- onMousedown: _e(t(ut), ["prevent"]),
437
+ onMousedown: Ge(t(ut), ["prevent"]),
439
438
  onClick: he
440
439
  }, {
441
- default: L(() => [
442
- (d(), C(O(e.clearIcon)))
440
+ default: R(() => [
441
+ (d(), C(L(e.clearIcon)))
443
442
  ]),
444
443
  _: 1
445
444
  }, 8, ["class", "onMousedown"])) : p("v-if", !0),
446
- t(X) ? (d(), C(t(B), {
445
+ t(X) ? (d(), C(t(H), {
447
446
  key: 2,
448
447
  class: m([t(a).e("icon"), t(a).e("password")]),
449
448
  onClick: He
450
449
  }, {
451
- default: L(() => [
452
- (d(), C(O(t(Me))))
450
+ default: R(() => [
451
+ (d(), C(L(t(Me))))
453
452
  ]),
454
453
  _: 1
455
454
  }, 8, ["class"])) : p("v-if", !0),
456
- t(z) ? (d(), S("span", {
455
+ t(P) ? (d(), S("span", {
457
456
  key: 3,
458
457
  class: m(t(a).e("count"))
459
458
  }, [
460
- T("span", {
459
+ k("span", {
461
460
  class: m(t(a).e("count-inner"))
462
- }, U(t(G)) + " / " + U(e.maxlength), 3)
461
+ }, U(t(_)) + " / " + U(e.maxlength), 3)
463
462
  ], 2)) : p("v-if", !0),
464
- t(V) && t(le) && t(se) ? (d(), C(t(B), {
463
+ t(V) && t(le) && t(se) ? (d(), C(t(H), {
465
464
  key: 4,
466
465
  class: m([
467
466
  t(a).e("icon"),
@@ -469,8 +468,8 @@ const Nt = "ElInput", zt = Pe({
469
468
  t(a).is("loading", t(V) === "validating")
470
469
  ])
471
470
  }, {
472
- default: L(() => [
473
- (d(), C(O(t(le))))
471
+ default: R(() => [
472
+ (d(), C(L(t(le))))
474
473
  ]),
475
474
  _: 1
476
475
  }, 8, ["class"])) : p("v-if", !0)
@@ -484,10 +483,10 @@ const Nt = "ElInput", zt = Pe({
484
483
  }, [
485
484
  j(e.$slots, "append")
486
485
  ], 2)) : p("v-if", !0)
487
- ], 64)) : (d(), S(Q, { key: 1 }, [
486
+ ], 64)) : (d(), S(J, { key: 1 }, [
488
487
  p(" textarea "),
489
- T("textarea", we({
490
- id: t(k),
488
+ k("textarea", we({
489
+ id: t(T),
491
490
  ref_key: "textarea",
492
491
  ref: I,
493
492
  class: [t(ne).e("inner"), t(a).is("focus", t(Y))]
@@ -508,24 +507,24 @@ const Nt = "ElInput", zt = Pe({
508
507
  onCompositionstart: t(pe),
509
508
  onCompositionupdate: t(fe),
510
509
  onCompositionend: t(ve),
511
- onInput: _,
510
+ onInput: G,
512
511
  onFocus: t(Ve),
513
512
  onBlur: t(Fe),
514
513
  onChange: de,
515
514
  onKeydown: me
516
515
  }), 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", {
516
+ t(P) ? (d(), S("span", {
518
517
  key: 0,
519
518
  style: be(ae.value),
520
519
  class: m(t(a).e("count"))
521
- }, U(t(G)) + " / " + U(e.maxlength), 7)) : p("v-if", !0)
520
+ }, U(t(_)) + " / " + U(e.maxlength), 7)) : p("v-if", !0)
522
521
  ], 64))
523
522
  ], 38));
524
523
  }
525
524
  });
526
- var Tt = /* @__PURE__ */ dt(Pt, [["__file", "input.vue"]]);
527
- const Ht = ct(Tt);
525
+ var kt = /* @__PURE__ */ dt(zt, [["__file", "input.vue"]]);
526
+ const Bt = ct(kt);
528
527
  export {
529
- Ht as E,
528
+ Bt as E,
530
529
  wt as i
531
530
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),C=require("./use-form-common-props-41182853.cjs"),a=require("./base-7ba08794.cjs"),ge=require("./typescript-b63f8e83.cjs"),b=require("./el-popper-1dd8f5b4.cjs"),te=require("./index-d8294b1a.cjs"),be=()=>a.isClient&&/firefox/i.test(window.navigator.userAgent);let v;const Ce={height:"0",visibility:"hidden",overflow:be()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ee=["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 xe(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:Ee.map(s=>[s,d.getPropertyValue(s)]),paddingSize:o,borderSize:u,boxSizing:i}}function oe(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:s,boxSizing:h,contextStyle:y}=xe(n);y.forEach(([m,g])=>v==null?void 0:v.style.setProperty(m,g)),Object.entries(Ce).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+s:h==="content-box"&&(f=f-c),v.value="";const N=v.scrollHeight-c;if(a.isNumber(d)){let m=N*d;h==="border-box"&&(m=m+c+s),f=Math.max(m,f),p.minHeight=`${m}px`}if(a.isNumber(i)){let m=N*i;h==="border-box"&&(m=m+c+s),f=Math.min(m,f)}return p.height=`${f}px`,(u=v.parentNode)==null||u.removeChild(v),v=void 0,p}const ne=a.buildProps({id:{type:String,default:void 0},size:C.useSizeProp,disabled:Boolean,modelValue:{type:a.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:a.definePropType([Boolean,Object]),default:!1},autocomplete:{type:a.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:a.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:a.definePropType([Object,Array,String]),default:()=>ge.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...b.useAriaProps(["ariaLabel"]),inputmode:{type:a.definePropType(String),default:void 0},name:String}),we={[b.UPDATE_MODEL_EVENT]:n=>a.isString(n),input:n=>a.isString(n),change:n=>a.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},ke=["class","style"],Se=/^on[A-Z]/,Ne=(n={})=>{const{excludeListeners:d=!1,excludeKeys:i}=n,o=e.computed(()=>((i==null?void 0:i.value)||[]).concat(ke)),u=e.getCurrentInstance();return u?e.computed(()=>{var c;return a.fromPairs(Object.entries((c=u.proxy)==null?void 0:c.$attrs).filter(([s])=>!o.value.includes(s)&&!(d&&Se.test(s))))}):e.computed(()=>({}))};function Ie(n){let d;function i(){if(n.value==null)return;const{selectionStart:u,selectionEnd:c,value:s}=n.value;if(u==null||c==null)return;const h=s.slice(0,Math.max(0,u)),y=s.slice(Math.max(0,c));d={selectionStart:u,selectionEnd:c,value:s,beforeTxt:h,afterTxt:y}}function o(){if(n.value==null||d==null)return;const{value:u}=n.value,{beforeTxt:c,afterTxt:s,selectionStart:h}=d;if(c==null||s==null||h==null)return;let y=u.length;if(u.endsWith(s))y=u.length-s.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 Be="ElInput",Ve=e.defineComponent({name:Be,inheritAttrs:!1}),ze=e.defineComponent({...Ve,props:ne,emits:we,setup(n,{expose:d,emit:i}){const o=n,u=e.useAttrs(),c=Ne(),s=e.useSlots(),h=e.computed(()=>[o.type==="textarea"?A.b():r.b(),r.m(m.value),r.is("disabled",g.value),r.is("exceed",ue.value),{[r.b("group")]:s.prepend||s.append,[r.m("prefix")]:s.prefix||o.prefixIcon,[r.m("suffix")]:s.suffix||o.suffixIcon||o.clearable||o.showPassword,[r.bm("suffix","password-clear")]:F.value&&O.value,[r.b("hidden")]:o.type==="hidden"},u.class]),y=e.computed(()=>[r.e("wrapper"),r.is("focus",M.value)]),{form:f,formItem:p}=C.useFormItem(),{inputId:N}=C.useFormItemInputId(o,{formItemContext:p}),m=C.useFormSize(),g=C.useFormDisabled(),r=a.useNamespace("input"),A=a.useNamespace("textarea"),z=e.shallowRef(),E=e.shallowRef(),D=e.ref(!1),P=e.ref(!1),H=e.ref(),T=e.shallowRef(o.inputStyle),w=e.computed(()=>z.value||E.value),{wrapperRef:re,isFocused:M,handleFocus:ae,handleBlur:le}=te.useFocusController(w,{disabled:g,afterBlur(){var t;o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"blur").catch(l=>b.debugWarn()))}}),$=e.computed(()=>{var t;return(t=f==null?void 0:f.statusIcon)!=null?t:!1}),I=e.computed(()=>(p==null?void 0:p.validateState)||""),K=e.computed(()=>I.value&&C.ValidateComponentsMap[I.value]),se=e.computed(()=>P.value?a.view_default:a.hide_default),ie=e.computed(()=>[u.style]),U=e.computed(()=>[o.inputStyle,T.value,{resize:o.resize}]),x=e.computed(()=>a.isNil(o.modelValue)?"":String(o.modelValue)),F=e.computed(()=>o.clearable&&!g.value&&!o.readonly&&!!x.value&&(M.value||D.value)),O=e.computed(()=>o.showPassword&&!g.value&&!!x.value),k=e.computed(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!g.value&&!o.readonly&&!o.showPassword),R=e.computed(()=>x.value.length),ue=e.computed(()=>!!k.value&&R.value>Number(o.maxlength)),ce=e.computed(()=>!!s.suffix||!!o.suffixIcon||F.value||o.showPassword||k.value||!!I.value&&$.value),[j,W]=Ie(z);C.useResizeObserver(E,t=>{if(de(),!k.value||o.resize!=="both")return;const l=t[0],{width:S}=l.contentRect;H.value={right:`calc(100% - ${S+15+6}px)`}});const B=()=>{const{type:t,autosize:l}=o;if(!(!a.isClient||t!=="textarea"||!E.value))if(l){const S=a.isObject(l)?l.minRows:void 0,Q=a.isObject(l)?l.maxRows:void 0,ee=oe(E.value,S,Q);T.value={overflowY:"hidden",...ee},e.nextTick(()=>{E.value.offsetHeight,T.value=ee})}else T.value={minHeight:oe(E.value).minHeight}},de=(t=>{let l=!1;return()=>{var S;if(l||!o.autosize)return;((S=E.value)==null?void 0:S.offsetParent)===null||(setTimeout(t),l=!0)}})(B),V=()=>{const t=w.value,l=o.formatter?o.formatter(x.value):x.value;!t||t.value===l||(t.value=l)},L=async t=>{j();let{value:l}=t.target;if(o.formatter&&o.parser&&(l=o.parser(l)),!q.value){if(l===x.value){V();return}i(b.UPDATE_MODEL_EVENT,l),i(b.INPUT_EVENT,l),await e.nextTick(),V(),W()}},_=t=>{let{value:l}=t.target;o.formatter&&o.parser&&(l=o.parser(l)),i(b.CHANGE_EVENT,l)},{isComposing:q,handleCompositionStart:Y,handleCompositionUpdate:X,handleCompositionEnd:G}=te.useComposition({emit:i,afterComposition:L}),pe=()=>{j(),P.value=!P.value,setTimeout(W)},fe=()=>{var t;return(t=w.value)==null?void 0:t.focus()},me=()=>{var t;return(t=w.value)==null?void 0:t.blur()},ve=t=>{D.value=!1,i("mouseleave",t)},he=t=>{D.value=!0,i("mouseenter",t)},Z=t=>{i("keydown",t)},ye=()=>{var t;(t=w.value)==null||t.select()},J=()=>{i(b.UPDATE_MODEL_EVENT,""),i(b.CHANGE_EVENT,""),i("clear"),i(b.INPUT_EVENT,"")};return e.watch(()=>o.modelValue,()=>{var t;e.nextTick(()=>B()),o.validateEvent&&((t=p==null?void 0:p.validate)==null||t.call(p,"change").catch(l=>b.debugWarn()))}),e.watch(x,()=>V()),e.watch(()=>o.type,async()=>{await e.nextTick(),V(),B()}),e.onMounted(()=>{!o.formatter&&o.parser,V(),e.nextTick(B)}),d({input:z,textarea:E,ref:w,textareaStyle:U,autosize:e.toRef(o,"autosize"),isComposing:q,focus:fe,blur:me,select:ye,clear:J,resizeTextarea:B}),(t,l)=>(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(ie)),onMouseenter:he,onMouseleave:ve},[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:re,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(a.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(N),ref_key:"input",ref:z,class:e.unref(r).e("inner")},e.unref(c),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?P.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(Y),onCompositionupdate:e.unref(X),onCompositionend:e.unref(G),onInput:L,onChange:_,onKeydown:Z}),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(ce)?(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(F)||!e.unref(O)||!e.unref(k)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(t.$slots,"suffix"),t.suffixIcon?(e.openBlock(),e.createBlock(e.unref(a.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(F)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:1,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("clear")]),onMousedown:e.withModifiers(e.unref(a.NOOP),["prevent"]),onClick:J},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onMousedown"])):e.createCommentVNode("v-if",!0),e.unref(O)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:2,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("password")]),onClick:pe},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(se))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.unref(k)?(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(R))+" / "+e.toDisplayString(t.maxlength),3)],2)):e.createCommentVNode("v-if",!0),e.unref(I)&&e.unref(K)&&e.unref($)?(e.openBlock(),e.createBlock(e.unref(a.ElIcon),{key:4,class:e.normalizeClass([e.unref(r).e("icon"),e.unref(r).e("validateIcon"),e.unref(r).is("loading",e.unref(I)==="validating")])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(K))))]),_: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(N),ref_key:"textarea",ref:E,class:[e.unref(A).e("inner"),e.unref(r).is("focus",e.unref(M))]},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(U),"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,onCompositionstart:e.unref(Y),onCompositionupdate:e.unref(X),onCompositionend:e.unref(G),onInput:L,onFocus:e.unref(ae),onBlur:e.unref(le),onChange:_,onKeydown:Z}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),e.unref(k)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(H.value),class:e.normalizeClass(e.unref(r).e("count"))},e.toDisplayString(e.unref(R))+" / "+e.toDisplayString(t.maxlength),7)):e.createCommentVNode("v-if",!0)],64))],38))}});var Pe=a._export_sfc(ze,[["__file","input.vue"]]);const Te=a.withInstall(Pe);exports.ElInput=Te;exports.inputProps=ne;
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),H=require("./el-input-b04b5bfc.cjs"),u=require("./base-7ba08794.cjs"),T=require("./use-form-common-props-41182853.cjs"),c=require("./el-popper-1dd8f5b4.cjs"),W=require("./index-c30cf7f9.cjs"),X=100,Y=600,U={beforeMount(o,E){const d=E.value,{interval:l=X,delay:V=Y}=u.isFunction(d)?{}:d;let f,p;const i=()=>u.isFunction(d)?d():d.handler(),b=()=>{p&&(clearTimeout(p),p=void 0),f&&(clearInterval(f),f=void 0)};o.addEventListener("mousedown",h=>{h.button===0&&(b(),i(),document.addEventListener("mouseup",()=>b(),{once:!0}),p=setTimeout(()=>{f=setInterval(()=>{i()},l)},V))})}},j=u.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:T.useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:o=>o===null||u.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:u.definePropType(String),default:void 0},align:{type:u.definePropType(String),default:"center"},disabledScientific:Boolean}),J={[c.CHANGE_EVENT]:(o,E)=>E!==o,blur:o=>o instanceof FocusEvent,focus:o=>o instanceof FocusEvent,[c.INPUT_EVENT]:o=>u.isNumber(o)||u.isNil(o),[c.UPDATE_MODEL_EVENT]:o=>u.isNumber(o)||u.isNil(o)},Q=n.defineComponent({name:"ElInputNumber"}),Z=n.defineComponent({...Q,props:j,emits:J,setup(o,{expose:E,emit:d}){const l=o,{t:V}=W.useLocale(),f=u.useNamespace("input-number"),p=n.ref(),i=n.reactive({currentValue:l.modelValue,userInput:null}),{formItem:b}=T.useFormItem(),h=n.computed(()=>u.isNumber(l.modelValue)&&l.modelValue<=l.min),C=n.computed(()=>u.isNumber(l.modelValue)&&l.modelValue>=l.max),L=n.computed(()=>{const e=F(l.step);return u.isUndefined(l.precision)?Math.max(F(l.modelValue),e):(e>l.precision,l.precision)}),g=n.computed(()=>l.controls&&l.controlsPosition==="right"),B=T.useFormSize(),v=T.useFormDisabled(),w=n.computed(()=>{if(i.userInput!==null)return i.userInput;let e=i.currentValue;if(u.isNil(e))return"";if(u.isNumber(e)){if(Number.isNaN(e))return"";u.isUndefined(l.precision)||(e=e.toFixed(l.precision))}return e}),S=(e,t)=>{if(u.isUndefined(t)&&(t=L.value),t===0)return Math.round(e);let r=String(e);const a=r.indexOf(".");if(a===-1||!r.replace(".","").split("")[a+t])return e;const _=r.length;return r.charAt(_-1)==="5"&&(r=`${r.slice(0,Math.max(0,_-1))}6`),Number.parseFloat(Number(r).toFixed(t))},F=e=>{if(u.isNil(e))return 0;const t=e.toString(),r=t.indexOf(".");let a=0;return r!==-1&&(a=t.length-r-1),a},M=(e,t=1)=>u.isNumber(e)?e>=Number.MAX_SAFE_INTEGER&&t===1||e<=Number.MIN_SAFE_INTEGER&&t===-1?e:S(e+l.step*t):i.currentValue,O=e=>{var t;const r=e;if(l.disabledScientific&&["e","E"].includes(r.key)){r.preventDefault();return}const a={[c.EVENT_CODE.up]:()=>{r.preventDefault(),A()},[c.EVENT_CODE.down]:()=>{r.preventDefault(),P()}};(t=a[r.key])==null||t.call(a)},A=()=>{if(l.readonly||v.value||C.value)return;const e=Number(w.value)||0,t=M(e);y(t),d(c.INPUT_EVENT,i.currentValue),k()},P=()=>{if(l.readonly||v.value||h.value)return;const e=Number(w.value)||0,t=M(e,-1);y(t),d(c.INPUT_EVENT,i.currentValue),k()},D=(e,t)=>{const{max:r,min:a,step:s,precision:N,stepStrictly:_,valueOnClear:I}=l;r<a&&c.throwError("InputNumber","min should not be greater than max.");let m=Number(e);if(u.isNil(e)||Number.isNaN(m))return null;if(e===""){if(I===null)return null;m=u.isString(I)?{min:a,max:r}[I]:I}return _&&(m=S(Math.round(m/s)*s,N),m!==e&&t&&d(c.UPDATE_MODEL_EVENT,m)),u.isUndefined(N)||(m=S(m,N)),(m>r||m<a)&&(m=m>r?r:a,t&&d(c.UPDATE_MODEL_EVENT,m)),m},y=(e,t=!0)=>{var r;const a=i.currentValue,s=D(e);if(!t){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),l.validateEvent&&((r=b==null?void 0:b.validate)==null||r.call(b,"change").catch(N=>c.debugWarn())),i.currentValue=s)},x=e=>{i.userInput=e;const t=e===""?null:Number(e);d(c.INPUT_EVENT,t),y(t,!1)},z=e=>{const t=e!==""?Number(e):"";(u.isNumber(t)&&!Number.isNaN(t)||e==="")&&y(t),k(),i.userInput=null},R=()=>{var e,t;(t=(e=p.value)==null?void 0:e.focus)==null||t.call(e)},$=()=>{var e,t;(t=(e=p.value)==null?void 0:e.blur)==null||t.call(e)},K=e=>{d("focus",e)},q=e=>{var t,r;i.userInput=null,i.currentValue===null&&((t=p.value)!=null&&t.input)&&(p.value.input.value=""),d("blur",e),l.validateEvent&&((r=b==null?void 0:b.validate)==null||r.call(b,"blur").catch(a=>c.debugWarn()))},k=()=>{i.currentValue!==l.modelValue&&(i.currentValue=l.modelValue)},G=e=>{document.activeElement===e.target&&e.preventDefault()};return n.watch(()=>l.modelValue,(e,t)=>{const r=D(e,!0);i.userInput===null&&r!==t&&(i.currentValue=r)},{immediate:!0}),n.watch(()=>l.precision,()=>{i.currentValue=D(l.modelValue)}),n.onMounted(()=>{var e;const{min:t,max:r,modelValue:a}=l,s=(e=p.value)==null?void 0:e.input;if(s.setAttribute("role","spinbutton"),Number.isFinite(r)?s.setAttribute("aria-valuemax",String(r)):s.removeAttribute("aria-valuemax"),Number.isFinite(t)?s.setAttribute("aria-valuemin",String(t)):s.removeAttribute("aria-valuemin"),s.setAttribute("aria-valuenow",i.currentValue||i.currentValue===0?String(i.currentValue):""),s.setAttribute("aria-disabled",String(v.value)),!u.isNumber(a)&&a!=null){let N=Number(a);Number.isNaN(N)&&(N=null),d(c.UPDATE_MODEL_EVENT,N)}s.addEventListener("wheel",G,{passive:!1})}),n.onUpdated(()=>{var e,t;const r=(e=p.value)==null?void 0:e.input;r==null||r.setAttribute("aria-valuenow",`${(t=i.currentValue)!=null?t:""}`)}),E({focus:R,blur:$}),(e,t)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([n.unref(f).b(),n.unref(f).m(n.unref(B)),n.unref(f).is("disabled",n.unref(v)),n.unref(f).is("without-controls",!e.controls),n.unref(f).is("controls-right",n.unref(g)),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(V)("el.inputNumber.decrease"),class:n.normalizeClass([n.unref(f).e("decrease"),n.unref(f).is("disabled",n.unref(h))]),onKeydown:n.withKeys(P,["enter"])},[n.renderSlot(e.$slots,"decrease-icon",{},()=>[n.createVNode(n.unref(u.ElIcon),null,{default:n.withCtx(()=>[n.unref(g)?(n.openBlock(),n.createBlock(n.unref(u.arrow_down_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(u.minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(U),P]]):n.createCommentVNode("v-if",!0),e.controls?n.withDirectives((n.openBlock(),n.createElementBlock("span",{key:1,role:"button","aria-label":n.unref(V)("el.inputNumber.increase"),class:n.normalizeClass([n.unref(f).e("increase"),n.unref(f).is("disabled",n.unref(C))]),onKeydown:n.withKeys(A,["enter"])},[n.renderSlot(e.$slots,"increase-icon",{},()=>[n.createVNode(n.unref(u.ElIcon),null,{default:n.withCtx(()=>[n.unref(g)?(n.openBlock(),n.createBlock(n.unref(u.arrow_up_default),{key:0})):(n.openBlock(),n.createBlock(n.unref(u.plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[n.unref(U),A]]):n.createCommentVNode("v-if",!0),n.createVNode(n.unref(H.ElInput),{id:e.id,ref_key:"input",ref:p,type:"number",step:e.step,"model-value":n.unref(w),placeholder:e.placeholder,readonly:e.readonly,disabled:n.unref(v),size:n.unref(B),max:e.max,min:e.min,name:e.name,"aria-label":e.ariaLabel,"validate-event":!1,inputmode:e.inputmode,onKeydown:O,onBlur:q,onFocus:K,onInput:x,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 ee=u._export_sfc(Z,[["__file","input-number.vue"]]);const ne=u.withInstall(ee);exports.ElInputNumber=ne;