st-comp 0.0.143 → 0.0.144

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 (94) hide show
  1. package/es/ChartLayout.js +2 -2
  2. package/es/ConfigProvider.cjs +1 -1
  3. package/es/ConfigProvider.js +28 -11
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +22 -24
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +28 -27
  8. package/es/Kline.cjs +1 -1
  9. package/es/Kline.js +14 -14
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +24 -25
  12. package/es/KlineNew.cjs +1 -1
  13. package/es/KlineNew.js +12 -12
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +16 -16
  16. package/es/Table.cjs +1 -1
  17. package/es/Table.js +16 -16
  18. package/es/User.cjs +1 -1
  19. package/es/User.js +510 -382
  20. package/es/VarietySearch.cjs +1 -1
  21. package/es/VarietySearch.js +37 -36
  22. package/es/VirtualTable.js +10 -10
  23. package/es/_initCloneObject-14b53c6f.js +81 -0
  24. package/es/_initCloneObject-441db749.cjs +1 -0
  25. package/es/{base-3ecbc734.js → base-437d17f3.js} +25 -25
  26. package/es/{castArray-7d3fc921.js → castArray-4251bbe4.js} +1 -1
  27. package/es/{config-provider-83904b4d.js → config-provider-55482a43.js} +3 -3
  28. package/es/{debounce-7344b088.js → debounce-ac30be50.js} +14 -14
  29. package/es/{dropdown-7da44c8f.js → dropdown-634b5e27.js} +4 -4
  30. package/es/{dropdown-9a974876.cjs → dropdown-d7c59a21.cjs} +1 -1
  31. package/es/{el-button-24f79286.js → el-button-e1665717.js} +3 -3
  32. package/es/el-checkbox-group-492b95cc.cjs +1 -0
  33. package/es/el-checkbox-group-e8fece80.js +67 -0
  34. package/es/{el-empty-79c5f7a8.js → el-empty-bacc6613.js} +1 -1
  35. package/es/el-form-item-5bdffd07.cjs +12 -0
  36. package/es/el-form-item-af1855f0.js +1262 -0
  37. package/es/{el-input-6c6f5bda.cjs → el-input-23e2bac3.cjs} +1 -1
  38. package/es/{el-input-ee7db655.js → el-input-4961b99f.js} +71 -71
  39. package/es/{el-input-number-0524d787.cjs → el-input-number-40a81eb5.cjs} +1 -1
  40. package/es/{el-input-number-63c21037.js → el-input-number-610fc8ba.js} +24 -24
  41. package/es/{el-menu-item-dc904a35.cjs → el-menu-item-78b858f2.cjs} +1 -1
  42. package/es/{el-menu-item-0d92e7dc.js → el-menu-item-7d04c11a.js} +7 -7
  43. package/es/{el-message-71aa42ca.js → el-message-c3b3ac96.js} +16 -16
  44. package/es/{el-message-562e923d.cjs → el-message-d4df8136.cjs} +1 -1
  45. package/es/{el-overlay-6056c89a.js → el-overlay-12dd9b35.js} +140 -137
  46. package/es/el-overlay-bc0790a2.cjs +1 -0
  47. package/es/{el-popover-c8b2456c.js → el-popover-0aa071f2.js} +4 -4
  48. package/es/{el-popover-8735b1fa.cjs → el-popover-8a77e015.cjs} +1 -1
  49. package/es/el-popper-50100766.js +2262 -0
  50. package/es/el-popper-746070ba.cjs +1 -0
  51. package/es/{el-scrollbar-66f3bb72.js → el-scrollbar-562d0595.js} +11 -11
  52. package/es/{el-select-5fb7d469.js → el-select-9381b156.js} +55 -55
  53. package/es/el-select-b162dffc.cjs +1 -0
  54. package/es/{el-table-column-560db3aa.js → el-table-column-55bffba5.js} +1049 -1124
  55. package/es/el-table-column-6d761fce.cjs +14 -0
  56. package/es/el-tag-985d9aff.js +279 -0
  57. package/es/el-tag-c51a6490.cjs +1 -0
  58. package/es/{index-68ee64fa.js → index-09e01b1d.js} +7 -7
  59. package/es/{index-fa07a823.js → index-0cb48e01.js} +81 -78
  60. package/es/index-39ec9741.js +112 -0
  61. package/es/index-3bf8d597.cjs +1 -0
  62. package/es/index-a387515d.cjs +1 -0
  63. package/es/index-a902a0d9.js +59 -0
  64. package/es/index-deb8de52.cjs +1 -0
  65. package/es/{raf-377cf8f5.js → raf-b128c7b7.js} +1 -1
  66. package/es/{scroll-1efa8148.js → scroll-387fcfdb.js} +1 -1
  67. package/es/style.css +1 -1
  68. package/es/{use-form-common-props-9c0363ac.js → use-form-common-props-f377e500.js} +30 -30
  69. package/es/{vnode-cfcdab70.js → vnode-7dfd4ed5.js} +1 -1
  70. package/es/{zh-cn-4a476dc8.js → zh-cn-eb9c2820.js} +2 -2
  71. package/lib/bundle.js +1 -1
  72. package/lib/bundle.umd.cjs +141 -141
  73. package/lib/{index-a992391a.js → index-e7a32fed.js} +12131 -11996
  74. package/lib/{python-58a62aaf.js → python-ae8d98bd.js} +1 -1
  75. package/lib/style.css +1 -1
  76. package/package.json +1 -1
  77. package/packages/ConfigProvider/index.vue +28 -0
  78. package/packages/User/index.vue +87 -1
  79. package/es/el-form-item-7d32befa.cjs +0 -12
  80. package/es/el-form-item-afc3dcf2.js +0 -1324
  81. package/es/el-overlay-891dcc40.cjs +0 -1
  82. package/es/el-popper-d3eef7ed.js +0 -2093
  83. package/es/el-popper-f62316cd.cjs +0 -1
  84. package/es/el-select-928f8c19.cjs +0 -1
  85. package/es/el-table-column-dd8b62aa.cjs +0 -14
  86. package/es/el-tag-3b03d13e.cjs +0 -1
  87. package/es/el-tag-6a31c968.js +0 -450
  88. package/es/event-09e37cc8.js +0 -6
  89. package/es/event-61f49698.cjs +0 -1
  90. package/es/index-80a2b137.cjs +0 -1
  91. package/es/index-a1ecf26c.js +0 -167
  92. package/es/index-e1e83173.cjs +0 -1
  93. package/es/refs-46cf8186.js +0 -9
  94. package/es/refs-d00b710b.cjs +0 -1
@@ -1,9 +1,9 @@
1
- import { ref as y, onMounted as R, onBeforeUnmount as k, defineComponent as ee, provide as ae, watch as A, unref as T, nextTick as M, renderSlot as N, openBlock as ce, createBlock as ue, Teleport as ie } from "vue";
2
- import { m as q, j, q as de, _ as te, i as fe, b as le, d as pe, w as ve } from "./base-3ecbc734.js";
1
+ import { ref as y, onMounted as I, onBeforeUnmount as R, defineComponent as ee, provide as ae, watch as A, unref as b, nextTick as M, renderSlot as O, openBlock as ce, createBlock as ue, Teleport as ie } from "vue";
2
+ import { m as q, j, q as de, _ as te, i as fe, b as le, d as pe, w as Ee } from "./base-437d17f3.js";
3
3
  function De(e) {
4
4
  return e === void 0;
5
5
  }
6
- const Ee = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', be = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, xe = (e) => Array.from(e.querySelectorAll(Ee)).filter((t) => ne(t) && be(t)), ne = (e) => {
6
+ const xe = "update:modelValue", Ke = "change", Ve = "input", ve = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', Te = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, Be = (e) => Array.from(e.querySelectorAll(ve)).filter((t) => ne(t) && Te(t)), ne = (e) => {
7
7
  if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
8
8
  return !0;
9
9
  if (e.tabIndex < 0 || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true")
@@ -20,18 +20,18 @@ const Ee = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="
20
20
  default:
21
21
  return !1;
22
22
  }
23
- }, Ke = function(e, t, ...o) {
23
+ }, $e = function(e, t, ...o) {
24
24
  let s;
25
25
  t.includes("mouse") || t.includes("click") ? s = "MouseEvents" : t.includes("key") ? s = "KeyboardEvent" : s = "HTMLEvents";
26
26
  const a = document.createEvent(s);
27
27
  return a.initEvent(t, ...o), e.dispatchEvent(a), e;
28
- }, C = "focus-trap.focus-after-trapped", O = "focus-trap.focus-after-released", Te = "focus-trap.focusout-prevented", W = {
28
+ }, N = "focus-trap.focus-after-trapped", C = "focus-trap.focus-after-released", be = "focus-trap.focusout-prevented", W = {
29
29
  cancelable: !0,
30
30
  bubbles: !1
31
31
  }, me = {
32
32
  cancelable: !0,
33
33
  bubbles: !1
34
- }, J = "focusAfterTrapped", X = "focusAfterReleased", Fe = Symbol("elFocusTrap"), I = y(), h = y(0), U = y(0);
34
+ }, G = "focusAfterTrapped", J = "focusAfterReleased", Fe = Symbol("elFocusTrap"), U = y(), h = y(0), k = y(0);
35
35
  let m = 0;
36
36
  const se = (e) => {
37
37
  const t = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
@@ -43,7 +43,7 @@ const se = (e) => {
43
43
  for (; o.nextNode(); )
44
44
  t.push(o.currentNode);
45
45
  return t;
46
- }, Y = (e, t) => {
46
+ }, X = (e, t) => {
47
47
  for (const o of e)
48
48
  if (!_e(o, t))
49
49
  return o;
@@ -61,49 +61,49 @@ const se = (e) => {
61
61
  }
62
62
  return !1;
63
63
  }, ye = (e) => {
64
- const t = se(e), o = Y(t, e), s = Y(t.reverse(), e);
64
+ const t = se(e), o = X(t, e), s = X(t.reverse(), e);
65
65
  return [o, s];
66
66
  }, he = (e) => e instanceof HTMLInputElement && "select" in e, l = (e, t) => {
67
67
  if (e && e.focus) {
68
68
  const o = document.activeElement;
69
69
  let s = !1;
70
- q(e) && !ne(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), s = !0), e.focus({ preventScroll: !0 }), U.value = window.performance.now(), e !== o && he(e) && t && e.select(), q(e) && s && e.removeAttribute("tabindex");
70
+ q(e) && !ne(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), s = !0), e.focus({ preventScroll: !0 }), k.value = window.performance.now(), e !== o && he(e) && t && e.select(), q(e) && s && e.removeAttribute("tabindex");
71
71
  }
72
72
  };
73
- function z(e, t) {
73
+ function Y(e, t) {
74
74
  const o = [...e], s = e.indexOf(t);
75
75
  return s !== -1 && o.splice(s, 1), o;
76
76
  }
77
- const we = () => {
77
+ const Pe = () => {
78
78
  let e = [];
79
79
  return {
80
80
  push: (s) => {
81
81
  const a = e[0];
82
- a && s !== a && a.pause(), e = z(e, s), e.unshift(s);
82
+ a && s !== a && a.pause(), e = Y(e, s), e.unshift(s);
83
83
  },
84
84
  remove: (s) => {
85
85
  var a, d;
86
- e = z(e, s), (d = (a = e[0]) == null ? void 0 : a.resume) == null || d.call(a);
86
+ e = Y(e, s), (d = (a = e[0]) == null ? void 0 : a.resume) == null || d.call(a);
87
87
  }
88
88
  };
89
- }, Pe = (e, t = !1) => {
89
+ }, ge = (e, t = !1) => {
90
90
  const o = document.activeElement;
91
91
  for (const s of e)
92
92
  if (l(s, t), document.activeElement !== o)
93
93
  return;
94
- }, G = we(), Se = () => h.value > U.value, F = () => {
95
- I.value = "pointer", h.value = window.performance.now();
94
+ }, z = Pe(), we = () => h.value > k.value, F = () => {
95
+ U.value = "pointer", h.value = window.performance.now();
96
96
  }, Q = () => {
97
- I.value = "keyboard", h.value = window.performance.now();
98
- }, ge = () => (R(() => {
97
+ U.value = "keyboard", h.value = window.performance.now();
98
+ }, Le = () => (I(() => {
99
99
  m === 0 && (document.addEventListener("mousedown", F), document.addEventListener("touchstart", F), document.addEventListener("keydown", Q)), m++;
100
- }), k(() => {
100
+ }), R(() => {
101
101
  m--, m <= 0 && (document.removeEventListener("mousedown", F), document.removeEventListener("touchstart", F), document.removeEventListener("keydown", Q));
102
102
  }), {
103
- focusReason: I,
103
+ focusReason: U,
104
104
  lastUserFocusTimestamp: h,
105
- lastAutomatedFocusTimestamp: U
106
- }), _ = (e) => new CustomEvent(Te, {
105
+ lastAutomatedFocusTimestamp: k
106
+ }), _ = (e) => new CustomEvent(be, {
107
107
  ...me,
108
108
  detail: e
109
109
  }), oe = {
@@ -123,14 +123,14 @@ const we = () => {
123
123
  home: "Home",
124
124
  end: "End"
125
125
  };
126
- let v = [];
126
+ let E = [];
127
127
  const Z = (e) => {
128
- e.code === oe.esc && v.forEach((t) => t(e));
129
- }, Le = (e) => {
130
- R(() => {
131
- v.length === 0 && document.addEventListener("keydown", Z), j && v.push(e);
132
- }), k(() => {
133
- v = v.filter((t) => t !== e), v.length === 0 && j && document.removeEventListener("keydown", Z);
128
+ e.code === oe.esc && E.forEach((t) => t(e));
129
+ }, Se = (e) => {
130
+ I(() => {
131
+ E.length === 0 && document.addEventListener("keydown", Z), j && E.push(e);
132
+ }), R(() => {
133
+ E = E.filter((t) => t !== e), E.length === 0 && j && document.removeEventListener("keydown", Z);
134
134
  });
135
135
  }, Ae = ee({
136
136
  name: "ElFocusTrap",
@@ -145,8 +145,8 @@ const Z = (e) => {
145
145
  }
146
146
  },
147
147
  emits: [
148
+ G,
148
149
  J,
149
- X,
150
150
  "focusin",
151
151
  "focusout",
152
152
  "focusout-prevented",
@@ -155,8 +155,8 @@ const Z = (e) => {
155
155
  setup(e, { emit: t }) {
156
156
  const o = y();
157
157
  let s, a;
158
- const { focusReason: d } = ge();
159
- Le((n) => {
158
+ const { focusReason: d } = Le();
159
+ Se((n) => {
160
160
  e.trapped && !p.paused && t("release-requested", n);
161
161
  });
162
162
  const p = {
@@ -167,25 +167,25 @@ const Z = (e) => {
167
167
  resume() {
168
168
  this.paused = !1;
169
169
  }
170
- }, E = (n) => {
170
+ }, v = (n) => {
171
171
  if (!e.loop && !e.trapped || p.paused)
172
172
  return;
173
- const { code: r, altKey: c, ctrlKey: u, metaKey: i, currentTarget: $, shiftKey: V } = n, { loop: H } = e, re = r === oe.tab && !c && !u && !i, b = document.activeElement;
174
- if (re && b) {
175
- const S = $, [g, L] = ye(S);
176
- if (g && L) {
177
- if (!V && b === L) {
173
+ const { code: r, altKey: c, ctrlKey: u, metaKey: i, currentTarget: B, shiftKey: $ } = n, { loop: H } = e, re = r === oe.tab && !c && !u && !i, T = document.activeElement;
174
+ if (re && T) {
175
+ const w = B, [L, S] = ye(w);
176
+ if (L && S) {
177
+ if (!$ && T === S) {
178
178
  const f = _({
179
179
  focusReason: d.value
180
180
  });
181
- t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(g, !0));
182
- } else if (V && [g, S].includes(b)) {
181
+ t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(L, !0));
182
+ } else if ($ && [L, w].includes(T)) {
183
183
  const f = _({
184
184
  focusReason: d.value
185
185
  });
186
- t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(L, !0));
186
+ t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(S, !0));
187
187
  }
188
- } else if (b === S) {
188
+ } else if (T === w) {
189
189
  const f = _({
190
190
  focusReason: d.value
191
191
  });
@@ -195,22 +195,22 @@ const Z = (e) => {
195
195
  };
196
196
  ae(Fe, {
197
197
  focusTrapRef: o,
198
- onKeydown: E
198
+ onKeydown: v
199
199
  }), A(() => e.focusTrapEl, (n) => {
200
200
  n && (o.value = n);
201
201
  }, { immediate: !0 }), A([o], ([n], [r]) => {
202
- n && (n.addEventListener("keydown", E), n.addEventListener("focusin", w), n.addEventListener("focusout", P)), r && (r.removeEventListener("keydown", E), r.removeEventListener("focusin", w), r.removeEventListener("focusout", P));
202
+ n && (n.addEventListener("keydown", v), n.addEventListener("focusin", P), n.addEventListener("focusout", g)), r && (r.removeEventListener("keydown", v), r.removeEventListener("focusin", P), r.removeEventListener("focusout", g));
203
203
  });
204
204
  const D = (n) => {
205
- t(J, n);
206
- }, x = (n) => t(X, n), w = (n) => {
207
- const r = T(o);
205
+ t(G, n);
206
+ }, x = (n) => t(J, n), P = (n) => {
207
+ const r = b(o);
208
208
  if (!r)
209
209
  return;
210
210
  const c = n.target, u = n.relatedTarget, i = c && r.contains(c);
211
211
  e.trapped || u && r.contains(u) || (s = u), i && t("focusin", n), !p.paused && e.trapped && (i ? a = c : l(a, !0));
212
- }, P = (n) => {
213
- const r = T(o);
212
+ }, g = (n) => {
213
+ const r = b(o);
214
214
  if (!(p.paused || !r))
215
215
  if (e.trapped) {
216
216
  const c = n.relatedTarget;
@@ -229,75 +229,78 @@ const Z = (e) => {
229
229
  };
230
230
  async function K() {
231
231
  await M();
232
- const n = T(o);
232
+ const n = b(o);
233
233
  if (n) {
234
- G.push(p);
234
+ z.push(p);
235
235
  const r = n.contains(document.activeElement) ? s : document.activeElement;
236
236
  if (s = r, !n.contains(r)) {
237
- const u = new Event(C, W);
238
- n.addEventListener(C, D), n.dispatchEvent(u), u.defaultPrevented || M(() => {
237
+ const u = new Event(N, W);
238
+ n.addEventListener(N, D), n.dispatchEvent(u), u.defaultPrevented || M(() => {
239
239
  let i = e.focusStartEl;
240
- fe(i) || (l(i), document.activeElement !== i && (i = "first")), i === "first" && Pe(se(n), !0), (document.activeElement === r || i === "container") && l(n);
240
+ fe(i) || (l(i), document.activeElement !== i && (i = "first")), i === "first" && ge(se(n), !0), (document.activeElement === r || i === "container") && l(n);
241
241
  });
242
242
  }
243
243
  }
244
244
  }
245
- function B() {
246
- const n = T(o);
245
+ function V() {
246
+ const n = b(o);
247
247
  if (n) {
248
- n.removeEventListener(C, D);
249
- const r = new CustomEvent(O, {
248
+ n.removeEventListener(N, D);
249
+ const r = new CustomEvent(C, {
250
250
  ...W,
251
251
  detail: {
252
252
  focusReason: d.value
253
253
  }
254
254
  });
255
- n.addEventListener(O, x), n.dispatchEvent(r), !r.defaultPrevented && (d.value == "keyboard" || !Se() || n.contains(document.activeElement)) && l(s ?? document.body), n.removeEventListener(O, x), G.remove(p);
255
+ n.addEventListener(C, x), n.dispatchEvent(r), !r.defaultPrevented && (d.value == "keyboard" || !we() || n.contains(document.activeElement)) && l(s ?? document.body), n.removeEventListener(C, x), z.remove(p);
256
256
  }
257
257
  }
258
- return R(() => {
258
+ return I(() => {
259
259
  e.trapped && K(), A(() => e.trapped, (n) => {
260
- n ? K() : B();
260
+ n ? K() : V();
261
261
  });
262
- }), k(() => {
263
- e.trapped && B(), o.value && (o.value.removeEventListener("keydown", E), o.value.removeEventListener("focusin", w), o.value.removeEventListener("focusout", P), o.value = void 0);
262
+ }), R(() => {
263
+ e.trapped && V(), o.value && (o.value.removeEventListener("keydown", v), o.value.removeEventListener("focusin", P), o.value.removeEventListener("focusout", g), o.value = void 0);
264
264
  }), {
265
- onKeydown: E
265
+ onKeydown: v
266
266
  };
267
267
  }
268
268
  });
269
- function Ce(e, t, o, s, a, d) {
270
- return N(e.$slots, "default", { handleKeydown: e.onKeydown });
269
+ function Ne(e, t, o, s, a, d) {
270
+ return O(e.$slots, "default", { handleKeydown: e.onKeydown });
271
271
  }
272
- var Be = /* @__PURE__ */ te(Ae, [["render", Ce], ["__file", "focus-trap.vue"]]);
273
- const Oe = le({
272
+ var He = /* @__PURE__ */ te(Ae, [["render", Ne], ["__file", "focus-trap.vue"]]);
273
+ const Ce = le({
274
274
  to: {
275
275
  type: pe([String, Object]),
276
276
  required: !0
277
277
  },
278
278
  disabled: Boolean
279
- }), Ne = /* @__PURE__ */ ee({
279
+ }), Oe = /* @__PURE__ */ ee({
280
280
  __name: "teleport",
281
- props: Oe,
281
+ props: Ce,
282
282
  setup(e) {
283
- return (t, o) => t.disabled ? N(t.$slots, "default", { key: 0 }) : (ce(), ue(ie, {
283
+ return (t, o) => t.disabled ? O(t.$slots, "default", { key: 0 }) : (ce(), ue(ie, {
284
284
  key: 1,
285
285
  to: t.to
286
286
  }, [
287
- N(t.$slots, "default")
287
+ O(t.$slots, "default")
288
288
  ], 8, ["to"]));
289
289
  }
290
290
  });
291
- var Re = /* @__PURE__ */ te(Ne, [["__file", "teleport.vue"]]);
292
- const $e = ve(Re);
291
+ var Ie = /* @__PURE__ */ te(Oe, [["__file", "teleport.vue"]]);
292
+ const Me = Ee(Ie);
293
293
  export {
294
+ Ke as C,
294
295
  oe as E,
295
296
  Fe as F,
296
- Be as a,
297
- $e as b,
297
+ Ve as I,
298
+ xe as U,
299
+ He as a,
300
+ Me as b,
298
301
  ne as c,
299
302
  l as d,
300
303
  De as i,
301
- xe as o,
302
- Ke as t
304
+ Be as o,
305
+ $e as t
303
306
  };
@@ -0,0 +1,112 @@
1
+ import { defineComponent as E, computed as w, openBlock as i, createElementBlock as M, normalizeClass as n, unref as s, normalizeStyle as g, createElementVNode as r, renderSlot as b, createBlock as u, withModifiers as y, withCtx as p, createVNode as C, createCommentVNode as v, Transition as N } from "vue";
2
+ import { c as V, a as $, E as _, C as h } from "./use-form-common-props-f377e500.js";
3
+ import { b as I, u as P, _ as F, w as K } from "./base-437d17f3.js";
4
+ const j = I({
5
+ type: {
6
+ type: String,
7
+ values: ["primary", "success", "info", "warning", "danger"],
8
+ default: "primary"
9
+ },
10
+ closable: Boolean,
11
+ disableTransitions: Boolean,
12
+ hit: Boolean,
13
+ color: String,
14
+ size: {
15
+ type: String,
16
+ values: V
17
+ },
18
+ effect: {
19
+ type: String,
20
+ values: ["dark", "light", "plain"],
21
+ default: "light"
22
+ },
23
+ round: Boolean
24
+ }), q = {
25
+ close: (a) => a instanceof MouseEvent,
26
+ click: (a) => a instanceof MouseEvent
27
+ }, A = E({
28
+ name: "ElTag"
29
+ }), D = /* @__PURE__ */ E({
30
+ ...A,
31
+ props: j,
32
+ emits: q,
33
+ setup(a, { emit: m }) {
34
+ const S = a, T = $(), o = P("tag"), d = w(() => {
35
+ const { type: e, hit: l, effect: t, closable: c, round: B } = S;
36
+ return [
37
+ o.b(),
38
+ o.is("closable", c),
39
+ o.m(e || "primary"),
40
+ o.m(T.value),
41
+ o.m(t),
42
+ o.is("hit", l),
43
+ o.is("round", B)
44
+ ];
45
+ }), f = (e) => {
46
+ m("close", e);
47
+ }, k = (e) => {
48
+ m("click", e);
49
+ }, z = (e) => {
50
+ var l, t, c;
51
+ (c = (t = (l = e == null ? void 0 : e.component) == null ? void 0 : l.subTree) == null ? void 0 : t.component) != null && c.bum && (e.component.subTree.component.bum = null);
52
+ };
53
+ return (e, l) => e.disableTransitions ? (i(), M("span", {
54
+ key: 0,
55
+ class: n(s(d)),
56
+ style: g({ backgroundColor: e.color }),
57
+ onClick: k
58
+ }, [
59
+ r("span", {
60
+ class: n(s(o).e("content"))
61
+ }, [
62
+ b(e.$slots, "default")
63
+ ], 2),
64
+ e.closable ? (i(), u(s(_), {
65
+ key: 0,
66
+ class: n(s(o).e("close")),
67
+ onClick: y(f, ["stop"])
68
+ }, {
69
+ default: p(() => [
70
+ C(s(h))
71
+ ]),
72
+ _: 1
73
+ }, 8, ["class", "onClick"])) : v("v-if", !0)
74
+ ], 6)) : (i(), u(N, {
75
+ key: 1,
76
+ name: `${s(o).namespace.value}-zoom-in-center`,
77
+ appear: "",
78
+ onVnodeMounted: z
79
+ }, {
80
+ default: p(() => [
81
+ r("span", {
82
+ class: n(s(d)),
83
+ style: g({ backgroundColor: e.color }),
84
+ onClick: k
85
+ }, [
86
+ r("span", {
87
+ class: n(s(o).e("content"))
88
+ }, [
89
+ b(e.$slots, "default")
90
+ ], 2),
91
+ e.closable ? (i(), u(s(_), {
92
+ key: 0,
93
+ class: n(s(o).e("close")),
94
+ onClick: y(f, ["stop"])
95
+ }, {
96
+ default: p(() => [
97
+ C(s(h))
98
+ ]),
99
+ _: 1
100
+ }, 8, ["class", "onClick"])) : v("v-if", !0)
101
+ ], 6)
102
+ ]),
103
+ _: 3
104
+ }, 8, ["name"]));
105
+ }
106
+ });
107
+ var G = /* @__PURE__ */ F(D, [["__file", "tag.vue"]]);
108
+ const O = K(G);
109
+ export {
110
+ O as E,
111
+ j as t
112
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("vue"),f=require("./base-ec05f348.cjs");function Q(e){return e===void 0}const Z="update:modelValue",ee="change",te="input",ne='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',oe=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,se=e=>Array.from(e.querySelectorAll(ne)).filter(t=>C(t)&&oe(t)),C=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},re=function(e,t,...s){let o;t.includes("mouse")||t.includes("click")?o="MouseEvents":t.includes("key")?o="KeyboardEvent":o="HTMLEvents";const c=document.createEvent(o);return c.initEvent(t,...s),e.dispatchEvent(c),e},w="focus-trap.focus-after-trapped",L="focus-trap.focus-after-released",ue="focus-trap.focusout-prevented",H={cancelable:!0,bubbles:!1},ce={cancelable:!0,bubbles:!1},M="focusAfterTrapped",$="focusAfterReleased",Y=Symbol("elFocusTrap"),O=r.ref(),P=r.ref(0),U=r.ref(0);let _=0;const X=e=>{const t=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const c=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||c?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t},q=(e,t)=>{for(const s of e)if(!ae(s,t))return s},ae=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},ie=e=>{const t=X(e),s=q(t,e),o=q(t.reverse(),e);return[s,o]},de=e=>e instanceof HTMLInputElement&&"select"in e,E=(e,t)=>{if(e&&e.focus){const s=document.activeElement;let o=!1;f.isElement(e)&&!C(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),o=!0),e.focus({preventScroll:!0}),U.value=window.performance.now(),e!==s&&de(e)&&t&&e.select(),f.isElement(e)&&o&&e.removeAttribute("tabindex")}};function j(e,t){const s=[...e],o=e.indexOf(t);return o!==-1&&s.splice(o,1),s}const fe=()=>{let e=[];return{push:o=>{const c=e[0];c&&o!==c&&c.pause(),e=j(e,o),e.unshift(o)},remove:o=>{var c,l;e=j(e,o),(l=(c=e[0])==null?void 0:c.resume)==null||l.call(c)}}},le=(e,t=!1)=>{const s=document.activeElement;for(const o of e)if(E(o,t),document.activeElement!==s)return},G=fe(),Ee=()=>P.value>U.value,F=()=>{O.value="pointer",P.value=window.performance.now()},J=()=>{O.value="keyboard",P.value=window.performance.now()},pe=()=>(r.onMounted(()=>{_===0&&(document.addEventListener("mousedown",F),document.addEventListener("touchstart",F),document.addEventListener("keydown",J)),_++}),r.onBeforeUnmount(()=>{_--,_<=0&&(document.removeEventListener("mousedown",F),document.removeEventListener("touchstart",F),document.removeEventListener("keydown",J))}),{focusReason:O,lastUserFocusTimestamp:P,lastAutomatedFocusTimestamp:U}),y=e=>new CustomEvent(ue,{...ce,detail:e}),I={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let T=[];const W=e=>{e.code===I.esc&&T.forEach(t=>t(e))},ve=e=>{r.onMounted(()=>{T.length===0&&document.addEventListener("keydown",W),f.isClient&&T.push(e)}),r.onBeforeUnmount(()=>{T=T.filter(t=>t!==e),T.length===0&&f.isClient&&document.removeEventListener("keydown",W)})},Te=r.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[M,$,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const s=r.ref();let o,c;const{focusReason:l}=pe();ve(n=>{e.trapped&&!v.paused&&t("release-requested",n)});const v={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},b=n=>{if(!e.loop&&!e.trapped||v.paused)return;const{code:u,altKey:a,ctrlKey:i,metaKey:d,currentTarget:x,shiftKey:K}=n,{loop:B}=e,z=u===I.tab&&!a&&!i&&!d,m=document.activeElement;if(z&&m){const S=x,[g,A]=ie(S);if(g&&A){if(!K&&m===A){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||(n.preventDefault(),B&&E(g,!0))}else if(K&&[g,S].includes(m)){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||(n.preventDefault(),B&&E(A,!0))}}else if(m===S){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||n.preventDefault()}}};r.provide(Y,{focusTrapRef:s,onKeydown:b}),r.watch(()=>e.focusTrapEl,n=>{n&&(s.value=n)},{immediate:!0}),r.watch([s],([n],[u])=>{n&&(n.addEventListener("keydown",b),n.addEventListener("focusin",h),n.addEventListener("focusout",N)),u&&(u.removeEventListener("keydown",b),u.removeEventListener("focusin",h),u.removeEventListener("focusout",N))});const R=n=>{t(M,n)},k=n=>t($,n),h=n=>{const u=r.unref(s);if(!u)return;const a=n.target,i=n.relatedTarget,d=a&&u.contains(a);e.trapped||i&&u.contains(i)||(o=i),d&&t("focusin",n),!v.paused&&e.trapped&&(d?c=a:E(c,!0))},N=n=>{const u=r.unref(s);if(!(v.paused||!u))if(e.trapped){const a=n.relatedTarget;!f.isNil(a)&&!u.contains(a)&&setTimeout(()=>{if(!v.paused&&e.trapped){const i=y({focusReason:l.value});t("focusout-prevented",i),i.defaultPrevented||E(c,!0)}},0)}else{const a=n.target;a&&u.contains(a)||t("focusout",n)}};async function D(){await r.nextTick();const n=r.unref(s);if(n){G.push(v);const u=n.contains(document.activeElement)?o:document.activeElement;if(o=u,!n.contains(u)){const i=new Event(w,H);n.addEventListener(w,R),n.dispatchEvent(i),i.defaultPrevented||r.nextTick(()=>{let d=e.focusStartEl;f.isString(d)||(E(d),document.activeElement!==d&&(d="first")),d==="first"&&le(X(n),!0),(document.activeElement===u||d==="container")&&E(n)})}}}function V(){const n=r.unref(s);if(n){n.removeEventListener(w,R);const u=new CustomEvent(L,{...H,detail:{focusReason:l.value}});n.addEventListener(L,k),n.dispatchEvent(u),!u.defaultPrevented&&(l.value=="keyboard"||!Ee()||n.contains(document.activeElement))&&E(o??document.body),n.removeEventListener(L,k),G.remove(v)}}return r.onMounted(()=>{e.trapped&&D(),r.watch(()=>e.trapped,n=>{n?D():V()})}),r.onBeforeUnmount(()=>{e.trapped&&V(),s.value&&(s.value.removeEventListener("keydown",b),s.value.removeEventListener("focusin",h),s.value.removeEventListener("focusout",N),s.value=void 0)}),{onKeydown:b}}});function be(e,t,s,o,c,l){return r.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var me=f._export_sfc(Te,[["render",be],["__file","focus-trap.vue"]]);const _e=f.buildProps({to:{type:f.definePropType([String,Object]),required:!0},disabled:Boolean}),Fe=r.defineComponent({__name:"teleport",props:_e,setup(e){return(t,s)=>t.disabled?r.renderSlot(t.$slots,"default",{key:0}):(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:t.to},[r.renderSlot(t.$slots,"default")],8,["to"]))}});var ye=f._export_sfc(Fe,[["__file","teleport.vue"]]);const Pe=f.withInstall(ye);exports.CHANGE_EVENT=ee;exports.EVENT_CODE=I;exports.ElFocusTrap=me;exports.ElTeleport=Pe;exports.FOCUS_TRAP_INJECTION_KEY=Y;exports.INPUT_EVENT=te;exports.UPDATE_MODEL_EVENT=Z;exports.isFocusable=C;exports.isUndefined=Q;exports.obtainAllFocusableElements=se;exports.triggerEvent=re;exports.tryFocus=E;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),l=require("./use-form-common-props-1b84d8f4.cjs"),c=require("./base-ec05f348.cjs"),p=c.buildProps({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:l.componentSizes},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),b={close:s=>s instanceof MouseEvent,click:s=>s instanceof MouseEvent},y=e.defineComponent({name:"ElTag"}),h=e.defineComponent({...y,props:p,emits:b,setup(s,{emit:i}){const f=s,k=l.useFormSize(),n=c.useNamespace("tag"),u=e.computed(()=>{const{type:o,hit:t,effect:a,closable:r,round:g}=f;return[n.b(),n.is("closable",r),n.m(o||"primary"),n.m(k.value),n.m(a),n.is("hit",t),n.is("round",g)]}),m=o=>{i("close",o)},d=o=>{i("click",o)},C=o=>{var t,a,r;(r=(a=(t=o==null?void 0:o.component)==null?void 0:t.subTree)==null?void 0:a.component)!=null&&r.bum&&(o.component.subTree.component.bum=null)};return(o,t)=>o.disableTransitions?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:o.color}),onClick:d},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),o.closable?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("close")),onClick:e.withModifiers(m,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(e.Transition,{key:1,name:`${e.unref(n).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:C},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:o.color}),onClick:d},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),o.closable?(e.openBlock(),e.createBlock(e.unref(l.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("close")),onClick:e.withModifiers(m,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var v=c._export_sfc(h,[["__file","tag.vue"]]);const z=c.withInstall(v);exports.ElTag=z;exports.tagProps=p;
@@ -0,0 +1,59 @@
1
+ import { getCurrentInstance as C, shallowRef as E, ref as m, watch as g, onMounted as F, nextTick as b } from "vue";
2
+ import { b as r } from "./el-scrollbar-562d0595.js";
3
+ import { m as x, h as f } from "./base-437d17f3.js";
4
+ function y(l, {
5
+ beforeFocus: t,
6
+ afterFocus: e,
7
+ beforeBlur: d,
8
+ afterBlur: c
9
+ } = {}) {
10
+ const p = C(), { emit: v } = p, o = E(), s = m(!1), a = (n) => {
11
+ f(t) && t(n) || s.value || (s.value = !0, v("focus", n), e == null || e());
12
+ }, i = (n) => {
13
+ var u;
14
+ f(d) && d(n) || n.relatedTarget && ((u = o.value) != null && u.contains(n.relatedTarget)) || (s.value = !1, v("blur", n), c == null || c());
15
+ }, h = () => {
16
+ var n, u;
17
+ (n = o.value) != null && n.contains(document.activeElement) && o.value !== document.activeElement || (u = l.value) == null || u.focus();
18
+ };
19
+ return g(o, (n) => {
20
+ n && n.setAttribute("tabindex", "-1");
21
+ }), r(o, "focus", a, !0), r(o, "blur", i, !0), r(o, "click", h, !0), process.env.NODE_ENV === "test" && F(() => {
22
+ const n = x(l.value) ? l.value : document.querySelector("input,textarea");
23
+ n && (r(n, "focus", a, !0), r(n, "blur", i, !0));
24
+ }), {
25
+ isFocused: s,
26
+ wrapperRef: o,
27
+ handleFocus: a,
28
+ handleBlur: i
29
+ };
30
+ }
31
+ const _ = (l) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(l);
32
+ function D({
33
+ afterComposition: l,
34
+ emit: t
35
+ }) {
36
+ const e = m(!1), d = (o) => {
37
+ t == null || t("compositionstart", o), e.value = !0;
38
+ }, c = (o) => {
39
+ var s;
40
+ t == null || t("compositionupdate", o);
41
+ const a = (s = o.target) == null ? void 0 : s.value, i = a[a.length - 1] || "";
42
+ e.value = !_(i);
43
+ }, p = (o) => {
44
+ t == null || t("compositionend", o), e.value && (e.value = !1, b(() => l(o)));
45
+ };
46
+ return {
47
+ isComposing: e,
48
+ handleComposition: (o) => {
49
+ o.type === "compositionend" ? p(o) : c(o);
50
+ },
51
+ handleCompositionStart: d,
52
+ handleCompositionUpdate: c,
53
+ handleCompositionEnd: p
54
+ };
55
+ }
56
+ export {
57
+ y as a,
58
+ D as u
59
+ };
@@ -0,0 +1 @@
1
+ "use strict";const l=require("vue"),d=require("./el-scrollbar-d1c3e7f7.cjs"),m=require("./base-ec05f348.cjs");function h(s,{beforeFocus:t,afterFocus:o,beforeBlur:v,afterBlur:a}={}){const f=l.getCurrentInstance(),{emit:p}=f,e=l.shallowRef(),u=l.ref(!1),i=n=>{m.isFunction(t)&&t(n)||u.value||(u.value=!0,p("focus",n),o==null||o())},r=n=>{var c;m.isFunction(v)&&v(n)||n.relatedTarget&&((c=e.value)!=null&&c.contains(n.relatedTarget))||(u.value=!1,p("blur",n),a==null||a())},C=()=>{var n,c;(n=e.value)!=null&&n.contains(document.activeElement)&&e.value!==document.activeElement||(c=s.value)==null||c.focus()};return l.watch(e,n=>{n&&n.setAttribute("tabindex","-1")}),d.useEventListener(e,"focus",i,!0),d.useEventListener(e,"blur",r,!0),d.useEventListener(e,"click",C,!0),process.env.NODE_ENV==="test"&&l.onMounted(()=>{const n=m.isElement(s.value)?s.value:document.querySelector("input,textarea");n&&(d.useEventListener(n,"focus",i,!0),d.useEventListener(n,"blur",r,!0))}),{isFocused:u,wrapperRef:e,handleFocus:i,handleBlur:r}}const E=s=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(s);function F({afterComposition:s,emit:t}){const o=l.ref(!1),v=e=>{t==null||t("compositionstart",e),o.value=!0},a=e=>{var u;t==null||t("compositionupdate",e);const i=(u=e.target)==null?void 0:u.value,r=i[i.length-1]||"";o.value=!E(r)},f=e=>{t==null||t("compositionend",e),o.value&&(o.value=!1,l.nextTick(()=>s(e)))};return{isComposing:o,handleComposition:e=>{e.type==="compositionend"?f(e):a(e)},handleCompositionStart:v,handleCompositionUpdate:a,handleCompositionEnd:f}}exports.useComposition=F;exports.useFocusController=h;
@@ -1,4 +1,4 @@
1
- import { j as o } from "./base-3ecbc734.js";
1
+ import { j as o } from "./base-437d17f3.js";
2
2
  const e = (i) => o ? window.requestAnimationFrame(i) : setTimeout(i, 16), r = (i) => o ? window.cancelAnimationFrame(i) : clearTimeout(i);
3
3
  export {
4
4
  r as c,
@@ -1,4 +1,4 @@
1
- import { j as f } from "./base-3ecbc734.js";
1
+ import { j as f } from "./base-437d17f3.js";
2
2
  let r;
3
3
  const u = (o) => {
4
4
  var l;