st-comp 0.0.149 → 0.0.150

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 (124) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +5 -4
  3. package/es/Dialog.cjs +1 -1
  4. package/es/Dialog.js +24 -22
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +52 -50
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +18 -16
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +26 -24
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +16 -14
  13. package/es/Pagination.cjs +1 -1
  14. package/es/Pagination.js +58 -56
  15. package/es/PasswordPrompt.cjs +1 -0
  16. package/es/PasswordPrompt.js +13 -0
  17. package/es/Table.cjs +1 -1
  18. package/es/Table.js +105 -103
  19. package/es/User.cjs +1 -1
  20. package/es/User.js +400 -378
  21. package/es/VarietySearch.cjs +1 -1
  22. package/es/VarietySearch.js +230 -228
  23. package/es/VirtualTable.cjs +3 -3
  24. package/es/VirtualTable.js +196 -194
  25. package/es/_initCloneObject-47814efa.cjs +1 -0
  26. package/es/{_initCloneObject-14b53c6f.js → _initCloneObject-e3d8a9ab.js} +21 -21
  27. package/es/base-0ca7c43a.cjs +5 -0
  28. package/es/base-19787dfb.js +303 -0
  29. package/es/{castArray-4251bbe4.js → castArray-8405000b.js} +1 -1
  30. package/es/castArray-a78ae889.cjs +1 -0
  31. package/es/{config-provider-55482a43.js → config-provider-0f6672af.js} +3 -3
  32. package/es/{config-provider-7cdfca4d.cjs → config-provider-cfbb9cd8.cjs} +1 -1
  33. package/es/{debounce-ac30be50.js → debounce-6cb0781f.js} +19 -19
  34. package/es/debounce-cf26af24.cjs +1 -0
  35. package/es/{dropdown-634b5e27.js → dropdown-17b3ef6a.js} +4 -4
  36. package/es/{dropdown-d7c59a21.cjs → dropdown-790d31ea.cjs} +1 -1
  37. package/es/{el-button-e1665717.js → el-button-0bf1d532.js} +17 -16
  38. package/es/el-button-62966947.cjs +1 -0
  39. package/es/{el-checkbox-group-492b95cc.cjs → el-checkbox-group-45247bbf.cjs} +1 -1
  40. package/es/{el-checkbox-group-e8fece80.js → el-checkbox-group-d53bc316.js} +5 -5
  41. package/es/el-empty-2ece1134.cjs +1 -0
  42. package/es/{el-empty-bacc6613.js → el-empty-bd5343a7.js} +10 -9
  43. package/es/{el-form-item-af1855f0.js → el-form-item-05c0e335.js} +52 -51
  44. package/es/el-form-item-47e255d4.cjs +12 -0
  45. package/es/{el-input-4961b99f.js → el-input-1e309239.js} +79 -78
  46. package/es/el-input-6a3805c5.cjs +1 -0
  47. package/es/{el-input-number-610fc8ba.js → el-input-number-60ebc58f.js} +57 -55
  48. package/es/el-input-number-96ff2e47.cjs +1 -0
  49. package/es/el-menu-item-4c9eb7ad.cjs +1 -0
  50. package/es/{el-menu-item-7d04c11a.js → el-menu-item-6c6236a1.js} +84 -83
  51. package/es/{el-message-c3b3ac96.js → el-message-7d927756.js} +55 -54
  52. package/es/el-message-d5ed7a4f.cjs +1 -0
  53. package/es/{el-overlay-12dd9b35.js → el-overlay-26bf0945.js} +73 -71
  54. package/es/el-overlay-41994f67.cjs +1 -0
  55. package/es/{el-popover-0aa071f2.js → el-popover-17e2e66c.js} +26 -24
  56. package/es/el-popover-7bd8a7c3.cjs +1 -0
  57. package/es/el-popper-7adbf1c6.cjs +1 -0
  58. package/es/{el-popper-50100766.js → el-popper-b6527ae2.js} +194 -193
  59. package/es/{el-scrollbar-562d0595.js → el-scrollbar-29bcab5f.js} +28 -28
  60. package/es/{el-scrollbar-d1c3e7f7.cjs → el-scrollbar-ac525239.cjs} +1 -1
  61. package/es/el-select-31f8ac8a.cjs +1 -0
  62. package/es/{el-select-9381b156.js → el-select-7395562b.js} +42 -40
  63. package/es/{el-table-column-55bffba5.js → el-table-column-47d80736.js} +329 -327
  64. package/es/el-table-column-bdc46568.cjs +14 -0
  65. package/es/{el-tag-985d9aff.js → el-tag-7414e0c7.js} +78 -77
  66. package/es/el-tag-9732314f.cjs +1 -0
  67. package/es/{index-deb8de52.cjs → index-1d85ba4b.cjs} +1 -1
  68. package/es/{index-39ec9741.js → index-273822d1.js} +21 -20
  69. package/es/index-2f958e56.cjs +3 -0
  70. package/es/index-375e8de4.cjs +5 -0
  71. package/es/{index-0cb48e01.js → index-621b092b.js} +1 -1
  72. package/es/{index-3bf8d597.cjs → index-65b4113e.cjs} +1 -1
  73. package/es/index-70372cdb.js +519 -0
  74. package/es/{use-form-common-props-f377e500.js → index-72151b24.js} +150 -312
  75. package/es/index-9e6e8d03.cjs +1 -0
  76. package/es/index-ab96bbf4.js +156 -0
  77. package/es/index-afc88a4b.cjs +1 -0
  78. package/es/{index-09e01b1d.js → index-c066fe0d.js} +32 -31
  79. package/es/index-ce3223db.cjs +1 -0
  80. package/es/{index-a902a0d9.js → index-dc22ffe4.js} +2 -2
  81. package/es/{raf-b128c7b7.js → raf-a532c514.js} +1 -1
  82. package/es/{raf-8fc301fd.cjs → raf-f46caea0.cjs} +1 -1
  83. package/es/{scroll-41224831.cjs → scroll-339681d4.cjs} +1 -1
  84. package/es/{scroll-387fcfdb.js → scroll-d787d648.js} +1 -1
  85. package/es/style.css +1 -1
  86. package/es/use-form-common-props-5ff2f51b.js +171 -0
  87. package/es/use-form-common-props-74a96df2.cjs +2 -0
  88. package/es/{vnode-7dfd4ed5.js → vnode-6a0c7411.js} +1 -1
  89. package/es/{vnode-7fbc61e1.cjs → vnode-b15eb11b.cjs} +1 -1
  90. package/es/{zh-cn-ab9a583d.cjs → zh-cn-36f34912.cjs} +1 -1
  91. package/es/{zh-cn-eb9c2820.js → zh-cn-f37255ae.js} +2 -2
  92. package/lib/bundle.js +1 -1
  93. package/lib/bundle.umd.cjs +136 -136
  94. package/lib/{index-d2de454d.js → index-d0cb2fa2.js} +14674 -14502
  95. package/lib/{python-22975586.js → python-050ba5a4.js} +1 -1
  96. package/lib/style.css +1 -1
  97. package/package.json +1 -1
  98. package/packages/PasswordPrompt/index.ts +8 -0
  99. package/packages/PasswordPrompt/index.vue +266 -0
  100. package/packages/User/index.vue +97 -58
  101. package/packages/index.ts +2 -0
  102. package/src/pages/PasswordPrompt/index.vue +12 -0
  103. package/src/router/routes.ts +5 -0
  104. package/es/_initCloneObject-441db749.cjs +0 -1
  105. package/es/base-437d17f3.js +0 -816
  106. package/es/base-ec05f348.cjs +0 -9
  107. package/es/castArray-a45823fe.cjs +0 -1
  108. package/es/debounce-b2ff12bd.cjs +0 -1
  109. package/es/el-button-196807af.cjs +0 -1
  110. package/es/el-empty-19ea04f4.cjs +0 -1
  111. package/es/el-form-item-5bdffd07.cjs +0 -12
  112. package/es/el-input-23e2bac3.cjs +0 -1
  113. package/es/el-input-number-40a81eb5.cjs +0 -1
  114. package/es/el-menu-item-78b858f2.cjs +0 -1
  115. package/es/el-message-d4df8136.cjs +0 -1
  116. package/es/el-overlay-bc0790a2.cjs +0 -1
  117. package/es/el-popover-8a77e015.cjs +0 -1
  118. package/es/el-popper-746070ba.cjs +0 -1
  119. package/es/el-select-b162dffc.cjs +0 -1
  120. package/es/el-table-column-6d761fce.cjs +0 -14
  121. package/es/el-tag-c51a6490.cjs +0 -1
  122. package/es/index-8a0b1c53.cjs +0 -3
  123. package/es/index-a387515d.cjs +0 -1
  124. package/es/use-form-common-props-1b84d8f4.cjs +0 -2
@@ -1,11 +1,12 @@
1
- import { computed as p, getCurrentInstance as je, defineComponent as ze, useAttrs as Ke, useSlots as We, shallowRef as _, ref as G, watch as J, nextTick as M, onMounted as Ue, toRef as Ye, openBlock as c, createElementBlock as b, normalizeClass as m, unref as t, normalizeStyle as be, createCommentVNode as f, Fragment as Q, renderSlot as j, createElementVNode as F, createBlock as S, withCtx as R, resolveDynamicComponent as K, mergeProps as xe, withModifiers as Xe, createVNode as qe, toDisplayString as W } from "vue";
2
- import { a as Ze } from "./el-scrollbar-562d0595.js";
3
- import { u as _e, j as we, d as Ge, e as Je, a as Qe, b as et, V as tt, L as ot, M as nt, E as B, A as at } from "./use-form-common-props-f377e500.js";
4
- import { j as Pe, a as Se, b as st, d as ee, i as te, f as U, W as lt, u as Ce, q as rt, U as it, _ as ut, g as Ie, w as dt } from "./base-437d17f3.js";
1
+ import { computed as p, getCurrentInstance as Ke, defineComponent as ze, useAttrs as je, useSlots as We, shallowRef as _, ref as q, watch as J, nextTick as L, onMounted as Ue, toRef as Ye, openBlock as c, createElementBlock as b, normalizeClass as m, unref as t, normalizeStyle as be, createCommentVNode as f, Fragment as Q, renderSlot as K, createElementVNode as k, createBlock as S, withCtx as M, resolveDynamicComponent as j, mergeProps as xe, withModifiers as Xe, createVNode as Ge, toDisplayString as W } from "vue";
2
+ import { a as Ze } from "./el-scrollbar-29bcab5f.js";
3
+ import { v as _e, s as qe, E as B, n as Je } from "./index-72151b24.js";
4
+ import { h as Pe, a as we, b as Qe, d as ee, i as te, e as U, G as et, u as Se, p as tt, N as ot, _ as nt, f as Ce, w as at } from "./base-19787dfb.js";
5
+ import { u as st, i as Ie, d as lt, e as rt, a as it, b as ut, V as dt } from "./use-form-common-props-5ff2f51b.js";
5
6
  import { m as ct } from "./typescript-7ae59c4c.js";
6
- import { u as pt } from "./el-popper-50100766.js";
7
- import { U as oe } from "./index-0cb48e01.js";
8
- import { a as ft, u as vt } from "./index-a902a0d9.js";
7
+ import { u as pt } from "./el-popper-b6527ae2.js";
8
+ import { U as oe } from "./index-621b092b.js";
9
+ import { a as ft, u as vt } from "./index-dc22ffe4.js";
9
10
  const mt = () => Pe && /firefox/i.test(window.navigator.userAgent);
10
11
  let g;
11
12
  const ht = {
@@ -44,27 +45,27 @@ function Ee(n, v = 1, i) {
44
45
  var o;
45
46
  g || (g = document.createElement("textarea"), document.body.appendChild(g));
46
47
  const { paddingSize: r, borderSize: u, boxSizing: l, contextStyle: x } = gt(n);
47
- x.forEach(([y, N]) => g == null ? void 0 : g.style.setProperty(y, N)), Object.entries(ht).forEach(([y, N]) => g == null ? void 0 : g.style.setProperty(y, N, "important")), g.value = n.value || n.placeholder || "";
48
+ x.forEach(([y, F]) => g == null ? void 0 : g.style.setProperty(y, F)), Object.entries(ht).forEach(([y, F]) => g == null ? void 0 : g.style.setProperty(y, F, "important")), g.value = n.value || n.placeholder || "";
48
49
  let d = g.scrollHeight;
49
50
  const C = {};
50
51
  l === "border-box" ? d = d + u : l === "content-box" && (d = d - r), g.value = "";
51
52
  const h = g.scrollHeight - r;
52
- if (Se(v)) {
53
+ if (we(v)) {
53
54
  let y = h * v;
54
55
  l === "border-box" && (y = y + r + u), d = Math.max(y, d), C.minHeight = `${y}px`;
55
56
  }
56
- if (Se(i)) {
57
+ if (we(i)) {
57
58
  let y = h * i;
58
59
  l === "border-box" && (y = y + r + u), d = Math.min(y, d);
59
60
  }
60
61
  return C.height = `${d}px`, (o = g.parentNode) == null || o.removeChild(g), g = void 0, C;
61
62
  }
62
- const bt = st({
63
+ const bt = Qe({
63
64
  id: {
64
65
  type: String,
65
66
  default: void 0
66
67
  },
67
- size: _e,
68
+ size: st,
68
69
  disabled: Boolean,
69
70
  modelValue: {
70
71
  type: ee([
@@ -113,10 +114,10 @@ const bt = st({
113
114
  showPassword: Boolean,
114
115
  showWordLimit: Boolean,
115
116
  suffixIcon: {
116
- type: we
117
+ type: Ie
117
118
  },
118
119
  prefixIcon: {
119
- type: we
120
+ type: Ie
120
121
  },
121
122
  containerRole: {
122
123
  type: String,
@@ -154,10 +155,10 @@ const bt = st({
154
155
  compositionupdate: (n) => n instanceof CompositionEvent,
155
156
  compositionend: (n) => n instanceof CompositionEvent
156
157
  }, wt = ["class", "style"], St = /^on[A-Z]/, Ct = (n = {}) => {
157
- const { excludeListeners: v = !1, excludeKeys: i } = n, o = p(() => ((i == null ? void 0 : i.value) || []).concat(wt)), r = je();
158
+ const { excludeListeners: v = !1, excludeKeys: i } = n, o = p(() => ((i == null ? void 0 : i.value) || []).concat(wt)), r = Ke();
158
159
  return r ? p(() => {
159
160
  var u;
160
- return lt(Object.entries((u = r.proxy) == null ? void 0 : u.$attrs).filter(([l]) => !o.value.includes(l) && !(v && St.test(l))));
161
+ return et(Object.entries((u = r.proxy) == null ? void 0 : u.$attrs).filter(([l]) => !o.value.includes(l) && !(v && St.test(l))));
161
162
  }) : (U("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), p(() => ({})));
162
163
  };
163
164
  function It(n) {
@@ -204,11 +205,11 @@ const Et = ze({
204
205
  props: bt,
205
206
  emits: xt,
206
207
  setup(n, { expose: v, emit: i }) {
207
- const o = n, r = Ke(), u = Ct(), l = We(), x = p(() => [
208
+ const o = n, r = je(), u = Ct(), l = We(), x = p(() => [
208
209
  o.type === "textarea" ? ne.b() : a.b(),
209
- a.m(N.value),
210
+ a.m(F.value),
210
211
  a.is("disabled", E.value),
211
- a.is("exceed", Le.value),
212
+ a.is("exceed", Re.value),
212
213
  {
213
214
  [a.b("group")]: l.prepend || l.append,
214
215
  [a.m("prefix")]: l.prefix || o.prefixIcon,
@@ -219,10 +220,10 @@ const Et = ze({
219
220
  r.class
220
221
  ]), d = p(() => [
221
222
  a.e("wrapper"),
222
- a.is("focus", H.value)
223
- ]), { form: C, formItem: h } = Ge(), { inputId: y } = Je(o, {
223
+ a.is("focus", A.value)
224
+ ]), { form: C, formItem: h } = lt(), { inputId: y } = rt(o, {
224
225
  formItemContext: h
225
- }), N = Qe(), E = et(), a = Ce("input"), ne = Ce("textarea"), O = _(), w = _(), Y = G(!1), $ = G(!1), ae = G(), A = _(o.inputStyle), z = p(() => O.value || w.value), { wrapperRef: ke, isFocused: H, handleFocus: Fe, handleBlur: Ne } = ft(z, {
226
+ }), F = it(), E = ut(), a = Se("input"), ne = Se("textarea"), O = _(), w = _(), Y = q(!1), $ = q(!1), ae = q(), H = _(o.inputStyle), z = p(() => O.value || w.value), { wrapperRef: Ne, isFocused: A, handleFocus: ke, handleBlur: Fe } = ft(z, {
226
227
  beforeFocus() {
227
228
  return E.value;
228
229
  },
@@ -233,45 +234,45 @@ const Et = ze({
233
234
  }), se = p(() => {
234
235
  var e;
235
236
  return (e = C == null ? void 0 : C.statusIcon) != null ? e : !1;
236
- }), V = p(() => (h == null ? void 0 : h.validateState) || ""), le = p(() => V.value && tt[V.value]), Ve = p(() => $.value ? ot : nt), Te = p(() => [
237
+ }), V = p(() => (h == null ? void 0 : h.validateState) || ""), le = p(() => V.value && dt[V.value]), Ve = p(() => $.value ? _e : qe), Te = p(() => [
237
238
  r.style
238
239
  ]), re = p(() => [
239
240
  o.inputStyle,
240
- A.value,
241
+ H.value,
241
242
  { resize: o.resize }
242
- ]), I = p(() => rt(o.modelValue) ? "" : String(o.modelValue)), D = p(() => o.clearable && !E.value && !o.readonly && !!I.value && (H.value || Y.value)), X = p(() => o.showPassword && !E.value && !!I.value && (!!I.value || H.value)), P = p(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !E.value && !o.readonly && !o.showPassword), q = p(() => I.value.length), Le = p(() => !!P.value && q.value > Number(o.maxlength)), Me = p(() => !!l.suffix || !!o.suffixIcon || D.value || o.showPassword || P.value || !!V.value && se.value), [ie, ue] = It(O);
243
+ ]), I = p(() => tt(o.modelValue) ? "" : String(o.modelValue)), D = p(() => o.clearable && !E.value && !o.readonly && !!I.value && (A.value || Y.value)), X = p(() => o.showPassword && !E.value && !!I.value && (!!I.value || A.value)), P = p(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !E.value && !o.readonly && !o.showPassword), G = p(() => I.value.length), Re = p(() => !!P.value && G.value > Number(o.maxlength)), Le = p(() => !!l.suffix || !!o.suffixIcon || D.value || o.showPassword || P.value || !!V.value && se.value), [ie, ue] = It(O);
243
244
  Ze(w, (e) => {
244
- if (Re(), !P.value || o.resize !== "both")
245
+ if (Me(), !P.value || o.resize !== "both")
245
246
  return;
246
- const s = e[0], { width: k } = s.contentRect;
247
+ const s = e[0], { width: N } = s.contentRect;
247
248
  ae.value = {
248
- right: `calc(100% - ${k + 15 + 6}px)`
249
+ right: `calc(100% - ${N + 15 + 6}px)`
249
250
  };
250
251
  });
251
252
  const T = () => {
252
253
  const { type: e, autosize: s } = o;
253
254
  if (!(!Pe || e !== "textarea" || !w.value))
254
255
  if (s) {
255
- const k = Ie(s) ? s.minRows : void 0, ye = Ie(s) ? s.maxRows : void 0, ge = Ee(w.value, k, ye);
256
- A.value = {
256
+ const N = Ce(s) ? s.minRows : void 0, ye = Ce(s) ? s.maxRows : void 0, ge = Ee(w.value, N, ye);
257
+ H.value = {
257
258
  overflowY: "hidden",
258
259
  ...ge
259
- }, M(() => {
260
- w.value.offsetHeight, A.value = ge;
260
+ }, L(() => {
261
+ w.value.offsetHeight, H.value = ge;
261
262
  });
262
263
  } else
263
- A.value = {
264
+ H.value = {
264
265
  minHeight: Ee(w.value).minHeight
265
266
  };
266
- }, Re = ((e) => {
267
+ }, Me = ((e) => {
267
268
  let s = !1;
268
269
  return () => {
269
- var k;
270
+ var N;
270
271
  if (s || !o.autosize)
271
272
  return;
272
- ((k = w.value) == null ? void 0 : k.offsetParent) === null || (e(), s = !0);
273
+ ((N = w.value) == null ? void 0 : N.offsetParent) === null || (e(), s = !0);
273
274
  };
274
- })(T), L = () => {
275
+ })(T), R = () => {
275
276
  const e = z.value, s = o.formatter ? o.formatter(I.value) : I.value;
276
277
  !e || e.value === s || (e.value = s);
277
278
  }, Z = async (e) => {
@@ -279,10 +280,10 @@ const Et = ze({
279
280
  let { value: s } = e.target;
280
281
  if (o.formatter && (s = o.parser ? o.parser(s) : s), !ce.value) {
281
282
  if (s === I.value) {
282
- L();
283
+ R();
283
284
  return;
284
285
  }
285
- i(oe, s), i("input", s), await M(), L(), ue();
286
+ i(oe, s), i("input", s), await L(), R(), ue();
286
287
  }
287
288
  }, de = (e) => {
288
289
  i("change", e.target.value);
@@ -299,9 +300,9 @@ const Et = ze({
299
300
  }, $e = () => {
300
301
  var e;
301
302
  return (e = z.value) == null ? void 0 : e.blur();
302
- }, Ae = (e) => {
303
- Y.value = !1, i("mouseleave", e);
304
303
  }, He = (e) => {
304
+ Y.value = !1, i("mouseleave", e);
305
+ }, Ae = (e) => {
305
306
  Y.value = !0, i("mouseenter", e);
306
307
  }, me = (e) => {
307
308
  i("keydown", e);
@@ -313,11 +314,11 @@ const Et = ze({
313
314
  };
314
315
  return J(() => o.modelValue, () => {
315
316
  var e;
316
- M(() => T()), o.validateEvent && ((e = h == null ? void 0 : h.validate) == null || e.call(h, "change").catch((s) => U(s)));
317
- }), J(I, () => L()), J(() => o.type, async () => {
318
- await M(), L(), T();
317
+ L(() => T()), o.validateEvent && ((e = h == null ? void 0 : h.validate) == null || e.call(h, "change").catch((s) => U(s)));
318
+ }), J(I, () => R()), J(() => o.type, async () => {
319
+ await L(), R(), T();
319
320
  }), Ue(() => {
320
- !o.formatter && o.parser && U("ElInput", "If you set the parser, you also need to set the formatter."), L(), M(T);
321
+ !o.formatter && o.parser && U("ElInput", "If you set the parser, you also need to set the formatter."), R(), L(T);
321
322
  }), v({
322
323
  input: O,
323
324
  textarea: w,
@@ -339,8 +340,8 @@ const Et = ze({
339
340
  }
340
341
  ]),
341
342
  style: be(t(Te)),
342
- onMouseenter: He,
343
- onMouseleave: Ae
343
+ onMouseenter: Ae,
344
+ onMouseleave: He
344
345
  }, [
345
346
  f(" input "),
346
347
  e.type !== "textarea" ? (c(), b(Q, { key: 0 }, [
@@ -349,11 +350,11 @@ const Et = ze({
349
350
  key: 0,
350
351
  class: m(t(a).be("group", "prepend"))
351
352
  }, [
352
- j(e.$slots, "prepend")
353
+ K(e.$slots, "prepend")
353
354
  ], 2)) : f("v-if", !0),
354
- F("div", {
355
+ k("div", {
355
356
  ref_key: "wrapperRef",
356
- ref: ke,
357
+ ref: Ne,
357
358
  class: m(t(d))
358
359
  }, [
359
360
  f(" prefix slot "),
@@ -361,22 +362,22 @@ const Et = ze({
361
362
  key: 0,
362
363
  class: m(t(a).e("prefix"))
363
364
  }, [
364
- F("span", {
365
+ k("span", {
365
366
  class: m(t(a).e("prefix-inner"))
366
367
  }, [
367
- j(e.$slots, "prefix"),
368
+ K(e.$slots, "prefix"),
368
369
  e.prefixIcon ? (c(), S(t(B), {
369
370
  key: 0,
370
371
  class: m(t(a).e("icon"))
371
372
  }, {
372
- default: R(() => [
373
- (c(), S(K(e.prefixIcon)))
373
+ default: M(() => [
374
+ (c(), S(j(e.prefixIcon)))
374
375
  ]),
375
376
  _: 1
376
377
  }, 8, ["class"])) : f("v-if", !0)
377
378
  ], 2)
378
379
  ], 2)) : f("v-if", !0),
379
- F("input", xe({
380
+ k("input", xe({
380
381
  id: t(y),
381
382
  ref_key: "input",
382
383
  ref: O,
@@ -403,21 +404,21 @@ const Et = ze({
403
404
  onKeydown: me
404
405
  }), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
405
406
  f(" suffix slot "),
406
- t(Me) ? (c(), b("span", {
407
+ t(Le) ? (c(), b("span", {
407
408
  key: 1,
408
409
  class: m(t(a).e("suffix"))
409
410
  }, [
410
- F("span", {
411
+ k("span", {
411
412
  class: m(t(a).e("suffix-inner"))
412
413
  }, [
413
414
  !t(D) || !t(X) || !t(P) ? (c(), b(Q, { key: 0 }, [
414
- j(e.$slots, "suffix"),
415
+ K(e.$slots, "suffix"),
415
416
  e.suffixIcon ? (c(), S(t(B), {
416
417
  key: 0,
417
418
  class: m(t(a).e("icon"))
418
419
  }, {
419
- default: R(() => [
420
- (c(), S(K(e.suffixIcon)))
420
+ default: M(() => [
421
+ (c(), S(j(e.suffixIcon)))
421
422
  ]),
422
423
  _: 1
423
424
  }, 8, ["class"])) : f("v-if", !0)
@@ -425,11 +426,11 @@ const Et = ze({
425
426
  t(D) ? (c(), S(t(B), {
426
427
  key: 1,
427
428
  class: m([t(a).e("icon"), t(a).e("clear")]),
428
- onMousedown: Xe(t(it), ["prevent"]),
429
+ onMousedown: Xe(t(ot), ["prevent"]),
429
430
  onClick: he
430
431
  }, {
431
- default: R(() => [
432
- qe(t(at))
432
+ default: M(() => [
433
+ Ge(t(Je))
433
434
  ]),
434
435
  _: 1
435
436
  }, 8, ["class", "onMousedown"])) : f("v-if", !0),
@@ -438,8 +439,8 @@ const Et = ze({
438
439
  class: m([t(a).e("icon"), t(a).e("password")]),
439
440
  onClick: Be
440
441
  }, {
441
- default: R(() => [
442
- (c(), S(K(t(Ve))))
442
+ default: M(() => [
443
+ (c(), S(j(t(Ve))))
443
444
  ]),
444
445
  _: 1
445
446
  }, 8, ["class"])) : f("v-if", !0),
@@ -447,9 +448,9 @@ const Et = ze({
447
448
  key: 3,
448
449
  class: m(t(a).e("count"))
449
450
  }, [
450
- F("span", {
451
+ k("span", {
451
452
  class: m(t(a).e("count-inner"))
452
- }, W(t(q)) + " / " + W(e.maxlength), 3)
453
+ }, W(t(G)) + " / " + W(e.maxlength), 3)
453
454
  ], 2)) : f("v-if", !0),
454
455
  t(V) && t(le) && t(se) ? (c(), S(t(B), {
455
456
  key: 4,
@@ -459,8 +460,8 @@ const Et = ze({
459
460
  t(a).is("loading", t(V) === "validating")
460
461
  ])
461
462
  }, {
462
- default: R(() => [
463
- (c(), S(K(t(le))))
463
+ default: M(() => [
464
+ (c(), S(j(t(le))))
464
465
  ]),
465
466
  _: 1
466
467
  }, 8, ["class"])) : f("v-if", !0)
@@ -472,15 +473,15 @@ const Et = ze({
472
473
  key: 1,
473
474
  class: m(t(a).be("group", "append"))
474
475
  }, [
475
- j(e.$slots, "append")
476
+ K(e.$slots, "append")
476
477
  ], 2)) : f("v-if", !0)
477
478
  ], 64)) : (c(), b(Q, { key: 1 }, [
478
479
  f(" textarea "),
479
- F("textarea", xe({
480
+ k("textarea", xe({
480
481
  id: t(y),
481
482
  ref_key: "textarea",
482
483
  ref: w,
483
- class: [t(ne).e("inner"), t(a).is("focus", t(H))]
484
+ class: [t(ne).e("inner"), t(a).is("focus", t(A))]
484
485
  }, t(u), {
485
486
  minlength: e.minlength,
486
487
  maxlength: e.maxlength,
@@ -499,8 +500,8 @@ const Et = ze({
499
500
  onCompositionupdate: t(fe),
500
501
  onCompositionend: t(ve),
501
502
  onInput: Z,
502
- onFocus: t(Fe),
503
- onBlur: t(Ne),
503
+ onFocus: t(ke),
504
+ onBlur: t(Fe),
504
505
  onChange: de,
505
506
  onKeydown: me
506
507
  }), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
@@ -508,14 +509,14 @@ const Et = ze({
508
509
  key: 0,
509
510
  style: be(ae.value),
510
511
  class: m(t(a).e("count"))
511
- }, W(t(q)) + " / " + W(e.maxlength), 7)) : f("v-if", !0)
512
+ }, W(t(G)) + " / " + W(e.maxlength), 7)) : f("v-if", !0)
512
513
  ], 64))
513
514
  ], 38));
514
515
  }
515
516
  });
516
- var Pt = /* @__PURE__ */ ut(zt, [["__file", "input.vue"]]);
517
- const Ot = dt(Pt);
517
+ var Pt = /* @__PURE__ */ nt(zt, [["__file", "input.vue"]]);
518
+ const $t = at(Pt);
518
519
  export {
519
- Ot as E,
520
+ $t as E,
520
521
  mt as i
521
522
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),be=require("./el-scrollbar-ac525239.cjs"),C=require("./index-afc88a4b.cjs"),s=require("./base-0ca7c43a.cjs"),x=require("./use-form-common-props-74a96df2.cjs"),Ce=require("./typescript-b63f8e83.cjs"),xe=require("./el-popper-7adbf1c6.cjs"),$=require("./index-65b4113e.cjs"),oe=require("./index-1d85ba4b.cjs"),re=()=>s.isClient&&/firefox/i.test(window.navigator.userAgent);let v;const we={height:"0",visibility:"hidden",overflow:re()?"":"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"];function ke(n){const p=window.getComputedStyle(n),u=p.getPropertyValue("box-sizing"),o=Number.parseFloat(p.getPropertyValue("padding-bottom"))+Number.parseFloat(p.getPropertyValue("padding-top")),i=Number.parseFloat(p.getPropertyValue("border-bottom-width"))+Number.parseFloat(p.getPropertyValue("border-top-width"));return{contextStyle:Ee.map(l=>[l,p.getPropertyValue(l)]),paddingSize:o,borderSize:i,boxSizing:u}}function ne(n,p=1,u){var o;v||(v=document.createElement("textarea"),document.body.appendChild(v));const{paddingSize:i,borderSize:c,boxSizing:l,contextStyle:h}=ke(n);h.forEach(([m,I])=>v==null?void 0:v.style.setProperty(m,I)),Object.entries(we).forEach(([m,I])=>v==null?void 0:v.style.setProperty(m,I,"important")),v.value=n.value||n.placeholder||"";let d=v.scrollHeight;const g={};l==="border-box"?d=d+c:l==="content-box"&&(d=d-i),v.value="";const f=v.scrollHeight-i;if(s.isNumber(p)){let m=f*p;l==="border-box"&&(m=m+i+c),d=Math.max(m,d),g.minHeight=`${m}px`}if(s.isNumber(u)){let m=f*u;l==="border-box"&&(m=m+i+c),d=Math.min(m,d)}return g.height=`${d}px`,(o=v.parentNode)==null||o.removeChild(v),v=void 0,g}const Se=s.buildProps({id:{type:String,default:void 0},size:x.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:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:x.iconPropType},prefixIcon:{type:x.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:()=>Ce.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...xe.useAriaProps(["ariaLabel"])}),Ie={[$.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},Be=["class","style"],Ne=/^on[A-Z]/,ze=(n={})=>{const{excludeListeners:p=!1,excludeKeys:u}=n,o=e.computed(()=>((u==null?void 0:u.value)||[]).concat(Be)),i=e.getCurrentInstance();return i?e.computed(()=>{var c;return s.fromPairs(Object.entries((c=i.proxy)==null?void 0:c.$attrs).filter(([l])=>!o.value.includes(l)&&!(p&&Ne.test(l))))}):(s.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),e.computed(()=>({})))};function Ve(n){let p;function u(){if(n.value==null)return;const{selectionStart:i,selectionEnd:c,value:l}=n.value;if(i==null||c==null)return;const h=l.slice(0,Math.max(0,i)),d=l.slice(Math.max(0,c));p={selectionStart:i,selectionEnd:c,value:l,beforeTxt:h,afterTxt:d}}function o(){if(n.value==null||p==null)return;const{value:i}=n.value,{beforeTxt:c,afterTxt:l,selectionStart:h}=p;if(c==null||l==null||h==null)return;let d=i.length;if(i.endsWith(l))d=i.length-l.length;else if(i.startsWith(c))d=c.length;else{const g=c[h-1],f=i.indexOf(g,h-1);f!==-1&&(d=f+1)}n.value.setSelectionRange(d,d)}return[u,o]}const Pe=e.defineComponent({name:"ElInput",inheritAttrs:!1}),Te=e.defineComponent({...Pe,props:Se,emits:Ie,setup(n,{expose:p,emit:u}){const o=n,i=e.useAttrs(),c=ze(),l=e.useSlots(),h=e.computed(()=>[o.type==="textarea"?A.b():r.b(),r.m(I.value),r.is("disabled",w.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&&L.value,[r.b("hidden")]:o.type==="hidden"},i.class]),d=e.computed(()=>[r.e("wrapper"),r.is("focus",F.value)]),{form:g,formItem:f}=x.useFormItem(),{inputId:m}=x.useFormItemInputId(o,{formItemContext:f}),I=x.useFormSize(),w=x.useFormDisabled(),r=s.useNamespace("input"),A=s.useNamespace("textarea"),V=e.shallowRef(),y=e.shallowRef(),R=e.ref(!1),P=e.ref(!1),H=e.ref(),T=e.shallowRef(o.inputStyle),E=e.computed(()=>V.value||y.value),{wrapperRef:ae,isFocused:F,handleFocus:le,handleBlur:se}=oe.useFocusController(E,{beforeFocus(){return w.value},afterBlur(){var t;o.validateEvent&&((t=f==null?void 0:f.validate)==null||t.call(f,"blur").catch(a=>s.debugWarn(a)))}}),q=e.computed(()=>{var t;return(t=g==null?void 0:g.statusIcon)!=null?t:!1}),B=e.computed(()=>(f==null?void 0:f.validateState)||""),W=e.computed(()=>B.value&&x.ValidateComponentsMap[B.value]),ie=e.computed(()=>P.value?C.view_default:C.hide_default),ue=e.computed(()=>[i.style]),K=e.computed(()=>[o.inputStyle,T.value,{resize:o.resize}]),b=e.computed(()=>s.isNil(o.modelValue)?"":String(o.modelValue)),D=e.computed(()=>o.clearable&&!w.value&&!o.readonly&&!!b.value&&(F.value||R.value)),L=e.computed(()=>o.showPassword&&!w.value&&!!b.value&&(!!b.value||F.value)),k=e.computed(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!w.value&&!o.readonly&&!o.showPassword),M=e.computed(()=>b.value.length),ce=e.computed(()=>!!k.value&&M.value>Number(o.maxlength)),de=e.computed(()=>!!l.suffix||!!o.suffixIcon||D.value||o.showPassword||k.value||!!B.value&&q.value),[j,U]=Ve(V);be.useResizeObserver(y,t=>{if(pe(),!k.value||o.resize!=="both")return;const a=t[0],{width:S}=a.contentRect;H.value={right:`calc(100% - ${S+15+6}px)`}});const N=()=>{const{type:t,autosize:a}=o;if(!(!s.isClient||t!=="textarea"||!y.value))if(a){const S=s.isObject(a)?a.minRows:void 0,ee=s.isObject(a)?a.maxRows:void 0,te=ne(y.value,S,ee);T.value={overflowY:"hidden",...te},e.nextTick(()=>{y.value.offsetHeight,T.value=te})}else T.value={minHeight:ne(y.value).minHeight}},pe=(t=>{let a=!1;return()=>{var S;if(a||!o.autosize)return;((S=y.value)==null?void 0:S.offsetParent)===null||(t(),a=!0)}})(N),z=()=>{const t=E.value,a=o.formatter?o.formatter(b.value):b.value;!t||t.value===a||(t.value=a)},O=async t=>{j();let{value:a}=t.target;if(o.formatter&&(a=o.parser?o.parser(a):a),!_.value){if(a===b.value){z();return}u($.UPDATE_MODEL_EVENT,a),u("input",a),await e.nextTick(),z(),U()}},Y=t=>{u("change",t.target.value)},{isComposing:_,handleCompositionStart:X,handleCompositionUpdate:Z,handleCompositionEnd:G}=oe.useComposition({emit:u,afterComposition:O}),fe=()=>{j(),P.value=!P.value,setTimeout(U)},me=()=>{var t;return(t=E.value)==null?void 0:t.focus()},ve=()=>{var t;return(t=E.value)==null?void 0:t.blur()},he=t=>{R.value=!1,u("mouseleave",t)},ye=t=>{R.value=!0,u("mouseenter",t)},J=t=>{u("keydown",t)},ge=()=>{var t;(t=E.value)==null||t.select()},Q=()=>{u($.UPDATE_MODEL_EVENT,""),u("change",""),u("clear"),u("input","")};return e.watch(()=>o.modelValue,()=>{var t;e.nextTick(()=>N()),o.validateEvent&&((t=f==null?void 0:f.validate)==null||t.call(f,"change").catch(a=>s.debugWarn(a)))}),e.watch(b,()=>z()),e.watch(()=>o.type,async()=>{await e.nextTick(),z(),N()}),e.onMounted(()=>{!o.formatter&&o.parser&&s.debugWarn("ElInput","If you set the parser, you also need to set the formatter."),z(),e.nextTick(N)}),p({input:V,textarea:y,ref:E,textareaStyle:K,autosize:e.toRef(o,"autosize"),isComposing:_,focus:me,blur:ve,select:ge,clear:Q,resizeTextarea:N}),(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(d))},[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(C.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(m),ref_key:"input",ref:V,class:e.unref(r).e("inner")},e.unref(c),{minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?P.value?"text":"password":t.type,disabled:e.unref(w),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,onCompositionstart:e.unref(X),onCompositionupdate:e.unref(Z),onCompositionend:e.unref(G),onInput:O,onChange:Y,onKeydown:J}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","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(L)||!e.unref(k)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(t.$slots,"suffix"),t.suffixIcon?(e.openBlock(),e.createBlock(e.unref(C.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(C.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.createVNode(e.unref(C.circle_close_default))]),_:1},8,["class","onMousedown"])):e.createCommentVNode("v-if",!0),e.unref(L)?(e.openBlock(),e.createBlock(e.unref(C.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(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(M))+" / "+e.toDisplayString(t.maxlength),3)],2)):e.createCommentVNode("v-if",!0),e.unref(B)&&e.unref(W)&&e.unref(q)?(e.openBlock(),e.createBlock(e.unref(C.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(W))))]),_: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(m),ref_key:"textarea",ref:y,class:[e.unref(A).e("inner"),e.unref(r).is("focus",e.unref(F))]},e.unref(c),{minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:e.unref(w),readonly:t.readonly,autocomplete:t.autocomplete,style:e.unref(K),"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(Z),onCompositionend:e.unref(G),onInput:O,onFocus:e.unref(le),onBlur:e.unref(se),onChange:Y,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(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(M))+" / "+e.toDisplayString(t.maxlength),7)):e.createCommentVNode("v-if",!0)],64))],38))}});var Fe=s._export_sfc(Te,[["__file","input.vue"]]);const De=s.withInstall(Fe);exports.ElInput=De;exports.isFirefox=re;