st-comp 0.0.279 → 0.0.280

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +342 -547
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +253 -253
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +46 -46
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +605 -443
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
  36. package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1929 -2261
  41. package/es/_baseClone-10bdb989.cjs +1 -0
  42. package/es/_baseClone-98af8b33.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-33a127c4.cjs +1 -0
  50. package/es/config-provider-563023c9.js +86 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-ce7496c7.cjs +1 -0
  54. package/es/dropdown-feea8702.js +178 -0
  55. package/es/el-autocomplete-d9253bba.cjs +1 -0
  56. package/es/el-autocomplete-eac54f9f.js +434 -0
  57. package/es/el-button-8259594b.cjs +1 -0
  58. package/es/el-button-8a9721f8.js +343 -0
  59. package/es/el-checkbox-6303fc92.cjs +1 -0
  60. package/es/el-checkbox-c328b097.js +566 -0
  61. package/es/el-dialog-67536fac.js +252 -0
  62. package/es/el-dialog-8788bcc1.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-8efcf2c3.js +1265 -0
  68. package/es/el-form-item-95e68669.cjs +12 -0
  69. package/es/el-input-c8a9bb71.cjs +1 -0
  70. package/es/el-input-e66500b7.js +761 -0
  71. package/es/el-input-number-68ee0d65.js +390 -0
  72. package/es/el-input-number-d7a81922.cjs +1 -0
  73. package/es/el-loading-62132db2.cjs +1 -0
  74. package/es/el-loading-db4c6d13.js +190 -0
  75. package/es/el-menu-item-4b8e7794.cjs +1 -0
  76. package/es/el-menu-item-c2523d82.js +824 -0
  77. package/es/el-message-box-7c13546c.js +481 -0
  78. package/es/el-message-box-fed174f0.cjs +1 -0
  79. package/es/el-overlay-17299785.cjs +1 -0
  80. package/es/el-overlay-36f223e9.js +444 -0
  81. package/es/el-popconfirm-520b2928.cjs +1 -0
  82. package/es/el-popconfirm-a857c54a.js +190 -0
  83. package/es/el-popper-852446fd.js +2235 -0
  84. package/es/el-popper-f824c63b.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-45dcc036.cjs +1 -0
  88. package/es/el-segmented-bf08279f.js +168 -0
  89. package/es/el-select-a34348e1.js +1535 -0
  90. package/es/el-select-d2958ae8.cjs +1 -0
  91. package/es/el-table-column-ad70ee0e.cjs +14 -0
  92. package/es/el-table-column-e2be313e.js +3651 -0
  93. package/es/el-tag-527f06f0.cjs +1 -0
  94. package/es/el-tag-9bcfae32.js +77 -0
  95. package/es/el-text-f9379288.js +84 -0
  96. package/es/el-text-fc345ffd.cjs +1 -0
  97. package/es/index-2419d69a.js +468 -0
  98. package/es/index-3806160e.js +710 -0
  99. package/es/index-3a0a7c36.cjs +1 -0
  100. package/es/index-3e7d5ffb.cjs +1 -0
  101. package/es/index-3ed0c678.cjs +1 -0
  102. package/es/index-47d30a52.js +372 -0
  103. package/es/index-5dec535a.cjs +1 -0
  104. package/es/index-5e76a22d.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
  106. package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
  107. package/es/index-71ba4c28.cjs +1 -0
  108. package/es/index-7711aa69.cjs +1 -0
  109. package/es/index-7c4d8f5d.js +47 -0
  110. package/es/index-86678b72.js +131 -0
  111. package/es/index-99bb359f.cjs +1 -0
  112. package/es/index-99d4335d.cjs +1 -0
  113. package/es/index-a0522466.js +413 -0
  114. package/es/index-a181f161.js +429 -0
  115. package/es/index-b9a26e7f.js +141 -0
  116. package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
  117. package/es/index-d372e68f.cjs +5 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
  122. package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-0a831287.cjs +2 -0
  131. package/es/use-form-item-187cd7db.js +422 -0
  132. package/es/use-global-config-17dafd40.js +71 -0
  133. package/es/use-global-config-c90c91f7.cjs +1 -0
  134. package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
  135. package/es/validator-ee5bc3eb.cjs +1 -0
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
  139. package/es/zh-cn-a22a6792.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +271 -252
  142. package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
  143. package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -0,0 +1,434 @@
1
+ import { b as Ne, c as _, N as Ie, a as R, s as U, k as Te, m as F, u as Ae, V as De, t as Fe, w as Oe } from "./base-dd156b8e.js";
2
+ import { b as N, U as P, I as W, C as re, l as Pe, E as Ve, g as Be, a as d } from "./el-popper-852446fd.js";
3
+ import { a as Me } from "./index-a181f161.js";
4
+ import { E as Ke, l as Re } from "./index-60900c6c.js";
5
+ import { g as Ue, w as We } from "./use-form-item-187cd7db.js";
6
+ import { i as Le, E as ee } from "./el-input-e66500b7.js";
7
+ import { E as qe } from "./index-a0522466.js";
8
+ import { defineComponent as He, computed as k, useAttrs as ze, ref as f, onBeforeUnmount as je, onMounted as xe, openBlock as w, createBlock as Ge, unref as s, withCtx as g, createElementVNode as te, normalizeClass as $, normalizeStyle as oe, createElementBlock as I, withModifiers as ae, renderSlot as m, createCommentVNode as se, createVNode as O, Fragment as Je, renderList as Qe, createTextVNode as Xe, toDisplayString as Ye, mergeProps as le, createSlots as Ze } from "vue";
9
+ const _e = Ne({
10
+ ...Le,
11
+ /**
12
+ * @description key name of the input suggestion object for display
13
+ */
14
+ valueKey: {
15
+ type: String,
16
+ default: "value"
17
+ },
18
+ /**
19
+ * @description binding value
20
+ */
21
+ modelValue: {
22
+ type: [String, Number],
23
+ default: ""
24
+ },
25
+ /**
26
+ * @description debounce delay when typing, in milliseconds
27
+ */
28
+ debounce: {
29
+ type: Number,
30
+ default: 300
31
+ },
32
+ /**
33
+ * @description placement of the popup menu
34
+ */
35
+ placement: {
36
+ type: _(String),
37
+ values: [
38
+ "top",
39
+ "top-start",
40
+ "top-end",
41
+ "bottom",
42
+ "bottom-start",
43
+ "bottom-end"
44
+ ],
45
+ default: "bottom-start"
46
+ },
47
+ /**
48
+ * @description a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete
49
+ */
50
+ fetchSuggestions: {
51
+ type: _([Function, Array]),
52
+ default: Ie
53
+ },
54
+ /**
55
+ * @description custom class name for autocomplete's dropdown
56
+ */
57
+ popperClass: N.popperClass,
58
+ /**
59
+ * @description custom style for autocomplete's dropdown
60
+ */
61
+ popperStyle: N.popperStyle,
62
+ /**
63
+ * @description [popper.js](https://popper.js.org/docs/v2/) parameters
64
+ */
65
+ popperOptions: N.popperOptions,
66
+ /**
67
+ * @description determines whether the arrow is displayed
68
+ */
69
+ showArrow: {
70
+ type: Boolean,
71
+ default: !0
72
+ },
73
+ /**
74
+ * @description whether show suggestions when input focus
75
+ */
76
+ triggerOnFocus: {
77
+ type: Boolean,
78
+ default: !0
79
+ },
80
+ /**
81
+ * @description whether to emit a `select` event on enter when there is no autocomplete match
82
+ */
83
+ selectWhenUnmatched: Boolean,
84
+ /**
85
+ * @description whether to hide the loading icon in remote search
86
+ */
87
+ hideLoading: Boolean,
88
+ /**
89
+ * @description whether select dropdown is teleported to the body
90
+ */
91
+ teleported: N.teleported,
92
+ /**
93
+ * @description which select dropdown appends to
94
+ */
95
+ appendTo: N.appendTo,
96
+ /**
97
+ * @description whether to highlight first item in remote search suggestions by default
98
+ */
99
+ highlightFirstItem: Boolean,
100
+ /**
101
+ * @description whether the width of the dropdown is the same as the input
102
+ */
103
+ fitInputWidth: Boolean,
104
+ /**
105
+ * @description whether keyboard navigation loops from end to start
106
+ */
107
+ loopNavigation: {
108
+ type: Boolean,
109
+ default: !0
110
+ }
111
+ }), et = {
112
+ [P]: (o) => R(o) || U(o),
113
+ [W]: (o) => R(o) || U(o),
114
+ [re]: (o) => R(o) || U(o),
115
+ focus: (o) => o instanceof FocusEvent,
116
+ blur: (o) => o instanceof FocusEvent,
117
+ clear: () => !0,
118
+ select: (o) => Te(o)
119
+ }, tt = ["aria-expanded", "aria-owns"], ot = { key: 0 }, at = [
120
+ "id",
121
+ "aria-selected",
122
+ "onClick"
123
+ ], ne = "ElAutocomplete";
124
+ var st = /* @__PURE__ */ He({
125
+ name: ne,
126
+ inheritAttrs: !1,
127
+ __name: "autocomplete",
128
+ props: _e,
129
+ emits: et,
130
+ setup(o, { expose: ue, emit: ie }) {
131
+ const l = o, i = ie, pe = k(() => {
132
+ const e = ee.props ?? [];
133
+ return Pe(l, F(e) ? e : Object.keys(e));
134
+ }), ce = ze(), L = Ue(), u = Ae("autocomplete"), c = f(), q = f(), T = f(), H = f();
135
+ let z = !1, S = !1;
136
+ const r = f([]), a = f(-1), j = f(""), p = f(!1), A = f(!1), y = f(!1), E = Me(), de = k(() => ce.style), h = k(() => (r.value.length > 0 || y.value) && p.value), x = k(() => !l.hideLoading && y.value), fe = k(() => c.value ? Array.from(c.value.$el.querySelectorAll("input")) : []), ve = () => {
137
+ h.value && (j.value = `${c.value.$el.offsetWidth}px`);
138
+ }, ge = () => {
139
+ a.value = -1;
140
+ }, G = async (e) => {
141
+ if (A.value)
142
+ return;
143
+ const t = (n) => {
144
+ y.value = !1, !A.value && (F(n) ? (r.value = n, a.value = l.highlightFirstItem ? 0 : -1) : Fe(ne, "autocomplete suggestions must be an array"));
145
+ };
146
+ if (y.value = !0, F(l.fetchSuggestions))
147
+ t(l.fetchSuggestions);
148
+ else {
149
+ const n = await l.fetchSuggestions(e, t);
150
+ F(n) && t(n);
151
+ }
152
+ }, V = De(G, k(() => l.debounce)), me = (e) => {
153
+ const t = !!e;
154
+ if (i(W, e), i(P, e), A.value = !1, p.value || (p.value = t), !l.triggerOnFocus && !e) {
155
+ A.value = !0, r.value = [];
156
+ return;
157
+ }
158
+ V(e);
159
+ }, he = (e) => {
160
+ var t;
161
+ L.value || (((t = e.target) == null ? void 0 : t.tagName) !== "INPUT" || fe.value.includes(document.activeElement)) && (p.value = !0);
162
+ }, be = (e) => {
163
+ i(re, e);
164
+ }, ye = (e) => {
165
+ if (S)
166
+ S = !1;
167
+ else {
168
+ p.value = !0, i("focus", e);
169
+ const t = l.modelValue ?? "";
170
+ l.triggerOnFocus && !z && (r.value = [], a.value = -1, V(String(t)));
171
+ }
172
+ }, J = (e) => {
173
+ setTimeout(() => {
174
+ var t;
175
+ if ((t = T.value) != null && t.isFocusInsideContent()) {
176
+ S = !0;
177
+ return;
178
+ }
179
+ p.value && C(), i("blur", e);
180
+ });
181
+ }, Ee = () => {
182
+ p.value = !1, i(P, ""), i("clear");
183
+ }, Q = async () => {
184
+ var e;
185
+ (e = c.value) != null && e.isComposing || (h.value && a.value >= 0 && a.value < r.value.length ? B(r.value[a.value]) : (l.selectWhenUnmatched && (i("select", { value: l.modelValue }), r.value = [], a.value = -1), p.value = !0, V(String(l.modelValue))));
186
+ }, ke = (e) => {
187
+ h.value && (e.preventDefault(), e.stopPropagation(), C());
188
+ }, C = () => {
189
+ p.value = !1;
190
+ }, we = () => {
191
+ var e;
192
+ (e = c.value) == null || e.focus();
193
+ }, $e = () => {
194
+ var e;
195
+ (e = c.value) == null || e.blur();
196
+ }, B = async (e) => {
197
+ i(W, e[l.valueKey]), i(P, e[l.valueKey]), i("select", e), r.value = [], a.value = -1;
198
+ }, b = (e) => {
199
+ var Y, Z;
200
+ if (!h.value || y.value)
201
+ return;
202
+ if (e < 0) {
203
+ if (!l.loopNavigation) {
204
+ a.value = -1;
205
+ return;
206
+ }
207
+ e = r.value.length - 1;
208
+ }
209
+ e >= r.value.length && (e = l.loopNavigation ? 0 : r.value.length - 1);
210
+ const [t, n] = Se(), v = n[e], K = t.scrollTop, { offsetTop: D, scrollHeight: X } = v;
211
+ D + X > K + t.clientHeight && (t.scrollTop = D + X - t.clientHeight), D < K && (t.scrollTop = D), a.value = e, (Z = (Y = c.value) == null ? void 0 : Y.ref) == null || Z.setAttribute("aria-activedescendant", `${E.value}-item-${a.value}`);
212
+ }, Se = () => {
213
+ const e = q.value.querySelector(`.${u.be("suggestion", "wrap")}`);
214
+ return [e, e.querySelectorAll(`.${u.be("suggestion", "list")} li`)];
215
+ }, M = We(H, (e) => {
216
+ var n;
217
+ if ((n = T.value) != null && n.isFocusInsideContent())
218
+ return;
219
+ const t = S;
220
+ S = !1, h.value && (t ? J(new FocusEvent("blur", e)) : C());
221
+ }), Ce = (e) => {
222
+ switch (Be(e)) {
223
+ case d.up:
224
+ e.preventDefault(), b(a.value - 1);
225
+ break;
226
+ case d.down:
227
+ e.preventDefault(), b(a.value + 1);
228
+ break;
229
+ case d.enter:
230
+ case d.numpadEnter:
231
+ e.preventDefault(), Q();
232
+ break;
233
+ case d.tab:
234
+ C();
235
+ break;
236
+ case d.esc:
237
+ ke(e);
238
+ break;
239
+ case d.home:
240
+ e.preventDefault(), b(0);
241
+ break;
242
+ case d.end:
243
+ e.preventDefault(), b(r.value.length - 1);
244
+ break;
245
+ case d.pageUp:
246
+ e.preventDefault(), b(Math.max(0, a.value - 10));
247
+ break;
248
+ case d.pageDown:
249
+ e.preventDefault(), b(Math.min(r.value.length - 1, a.value + 10));
250
+ break;
251
+ }
252
+ };
253
+ return je(() => {
254
+ M == null || M();
255
+ }), xe(() => {
256
+ var t;
257
+ const e = (t = c.value) == null ? void 0 : t.ref;
258
+ e && ([
259
+ {
260
+ key: "role",
261
+ value: "textbox"
262
+ },
263
+ {
264
+ key: "aria-autocomplete",
265
+ value: "list"
266
+ },
267
+ {
268
+ key: "aria-controls",
269
+ value: E.value
270
+ },
271
+ {
272
+ key: "aria-activedescendant",
273
+ value: `${E.value}-item-${a.value}`
274
+ }
275
+ ].forEach(({ key: n, value: v }) => e.setAttribute(n, v)), z = e.hasAttribute("readonly"));
276
+ }), ue({
277
+ /** @description the index of the currently highlighted item */
278
+ highlightedIndex: a,
279
+ /** @description autocomplete whether activated */
280
+ activated: p,
281
+ /** @description remote search loading status */
282
+ loading: y,
283
+ /** @description el-input component instance */
284
+ inputRef: c,
285
+ /** @description el-tooltip component instance */
286
+ popperRef: T,
287
+ /** @description fetch suggestions result */
288
+ suggestions: r,
289
+ /** @description triggers when a suggestion is clicked */
290
+ handleSelect: B,
291
+ /** @description handle keyboard enter event */
292
+ handleKeyEnter: Q,
293
+ /** @description focus the input element */
294
+ focus: we,
295
+ /** @description blur the input element */
296
+ blur: $e,
297
+ /** @description close suggestion */
298
+ close: C,
299
+ /** @description highlight an item in a suggestion */
300
+ highlight: b,
301
+ /** @description loading suggestion list */
302
+ getData: G
303
+ }), (e, t) => (w(), Ge(s(Ve), {
304
+ ref_key: "popperRef",
305
+ ref: T,
306
+ visible: h.value,
307
+ placement: o.placement,
308
+ "fallback-placements": ["bottom-start", "top-start"],
309
+ "popper-class": [s(u).e("popper"), o.popperClass],
310
+ "popper-style": o.popperStyle,
311
+ "popper-options": o.popperOptions,
312
+ "show-arrow": o.showArrow,
313
+ teleported: o.teleported,
314
+ "append-to": o.appendTo,
315
+ "gpu-acceleration": !1,
316
+ pure: "",
317
+ "manual-mode": "",
318
+ effect: "light",
319
+ trigger: "click",
320
+ transition: `${s(u).namespace.value}-zoom-in-top`,
321
+ persistent: "",
322
+ role: "listbox",
323
+ onBeforeShow: ve,
324
+ onHide: ge
325
+ }, {
326
+ content: g(() => [te("div", {
327
+ ref_key: "regionRef",
328
+ ref: q,
329
+ class: $([s(u).b("suggestion"), s(u).is("loading", x.value)]),
330
+ style: oe({
331
+ [o.fitInputWidth ? "width" : "minWidth"]: j.value,
332
+ outline: "none"
333
+ }),
334
+ role: "region"
335
+ }, [
336
+ e.$slots.header ? (w(), I("div", {
337
+ key: 0,
338
+ class: $(s(u).be("suggestion", "header")),
339
+ onClick: t[0] || (t[0] = ae(() => {
340
+ }, ["stop"]))
341
+ }, [m(e.$slots, "header")], 2)) : se("v-if", !0),
342
+ O(s(qe), {
343
+ id: s(E),
344
+ tag: "ul",
345
+ "wrap-class": s(u).be("suggestion", "wrap"),
346
+ "view-class": s(u).be("suggestion", "list"),
347
+ role: "listbox"
348
+ }, {
349
+ default: g(() => [x.value ? (w(), I("li", ot, [m(e.$slots, "loading", {}, () => [O(s(Ke), { class: $(s(u).is("loading")) }, {
350
+ default: g(() => [O(s(Re))]),
351
+ _: 1
352
+ }, 8, ["class"])])])) : (w(!0), I(Je, { key: 1 }, Qe(r.value, (n, v) => (w(), I("li", {
353
+ id: `${s(E)}-item-${v}`,
354
+ key: v,
355
+ class: $({ highlighted: a.value === v }),
356
+ role: "option",
357
+ "aria-selected": a.value === v,
358
+ onClick: (K) => B(n)
359
+ }, [m(e.$slots, "default", { item: n }, () => [Xe(Ye(n[o.valueKey]), 1)])], 10, at))), 128))]),
360
+ _: 3
361
+ }, 8, [
362
+ "id",
363
+ "wrap-class",
364
+ "view-class"
365
+ ]),
366
+ e.$slots.footer ? (w(), I("div", {
367
+ key: 1,
368
+ class: $(s(u).be("suggestion", "footer")),
369
+ onClick: t[1] || (t[1] = ae(() => {
370
+ }, ["stop"]))
371
+ }, [m(e.$slots, "footer")], 2)) : se("v-if", !0)
372
+ ], 6)]),
373
+ default: g(() => [te("div", {
374
+ ref_key: "listboxRef",
375
+ ref: H,
376
+ class: $([s(u).b(), e.$attrs.class]),
377
+ style: oe(de.value),
378
+ role: "combobox",
379
+ "aria-haspopup": "listbox",
380
+ "aria-expanded": h.value,
381
+ "aria-owns": s(E)
382
+ }, [O(s(ee), le({
383
+ ref_key: "inputRef",
384
+ ref: c
385
+ }, le(pe.value, e.$attrs), {
386
+ "model-value": o.modelValue,
387
+ disabled: s(L),
388
+ onInput: me,
389
+ onChange: be,
390
+ onFocus: ye,
391
+ onBlur: J,
392
+ onClear: Ee,
393
+ onKeydown: Ce,
394
+ onMousedown: he
395
+ }), Ze({ _: 2 }, [
396
+ e.$slots.prepend ? {
397
+ name: "prepend",
398
+ fn: g(() => [m(e.$slots, "prepend")]),
399
+ key: "0"
400
+ } : void 0,
401
+ e.$slots.append ? {
402
+ name: "append",
403
+ fn: g(() => [m(e.$slots, "append")]),
404
+ key: "1"
405
+ } : void 0,
406
+ e.$slots.prefix ? {
407
+ name: "prefix",
408
+ fn: g(() => [m(e.$slots, "prefix")]),
409
+ key: "2"
410
+ } : void 0,
411
+ e.$slots.suffix ? {
412
+ name: "suffix",
413
+ fn: g(() => [m(e.$slots, "suffix")]),
414
+ key: "3"
415
+ } : void 0
416
+ ]), 1040, ["model-value", "disabled"])], 14, tt)]),
417
+ _: 3
418
+ }, 8, [
419
+ "visible",
420
+ "placement",
421
+ "popper-class",
422
+ "popper-style",
423
+ "popper-options",
424
+ "show-arrow",
425
+ "teleported",
426
+ "append-to",
427
+ "transition"
428
+ ]));
429
+ }
430
+ }), lt = st;
431
+ const vt = Oe(lt);
432
+ export {
433
+ vt as E
434
+ };
@@ -0,0 +1 @@
1
+ "use strict";const b=require("./base-d987e5c9.cjs"),C=require("./index-3e7d5ffb.cjs"),v=require("./use-form-item-0a831287.cjs"),I=require("./index-f5474dcc.cjs"),E=require("./use-global-config-c90c91f7.cjs"),e=require("vue"),T=require("./index-71ba4c28.cjs"),V=["default","primary","success","warning","info","danger","text",""],P=["button","submit","reset"],x=b.buildProps({size:v.useSizeProp,disabled:{type:Boolean,default:void 0},type:{type:String,values:V,default:""},icon:{type:v.iconPropType},nativeType:{type:String,values:P,default:"button"},loading:Boolean,loadingIcon:{type:v.iconPropType,default:()=>C.loading_default},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:b.definePropType([String,Object]),default:"button"}}),D={click:t=>t instanceof MouseEvent},z=Symbol("buttonGroupContextKey"),q=(t,c)=>{I.useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},e.computed(()=>t.type==="text"));const n=e.inject(z,void 0),l=E.useGlobalConfig("button"),{form:r}=v.useFormItem(),g=v.useFormSize(e.computed(()=>n==null?void 0:n.size)),o=v.useFormDisabled(),i=e.ref(),s=e.useSlots(),d=e.computed(()=>{var a;return t.type||(n==null?void 0:n.type)||((a=l.value)==null?void 0:a.type)||""}),f=e.computed(()=>{var a;return t.autoInsertSpace??((a=l.value)==null?void 0:a.autoInsertSpace)??!1}),y=e.computed(()=>{var a;return t.plain??((a=l.value)==null?void 0:a.plain)??!1}),B=e.computed(()=>{var a;return t.round??((a=l.value)==null?void 0:a.round)??!1}),h=e.computed(()=>{var a;return t.text??((a=l.value)==null?void 0:a.text)??!1}),_=e.computed(()=>{var a;return t.dashed??((a=l.value)==null?void 0:a.dashed)??!1}),S=e.computed(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),k=e.computed(()=>{var m;const a=(m=s.default)==null?void 0:m.call(s);if(f.value&&(a==null?void 0:a.length)===1){const p=a[0];if((p==null?void 0:p.type)===e.Text){const $=p.children;return/^\p{Unified_Ideograph}{2}$/u.test($.trim())}}return!1});return{_disabled:o,_size:g,_type:d,_ref:i,_props:S,_plain:y,_round:B,_text:h,_dashed:_,shouldAddSpace:k,handleClick:a=>{if(o.value||t.loading){a.stopPropagation();return}t.nativeType==="reset"&&(r==null||r.resetFields()),c("click",a)}}};function u(t,c=20){return t.mix("#141414",c).toString()}function F(t){const c=v.useFormDisabled(),n=b.useNamespace("button");return e.computed(()=>{let l={},r=t.color;if(r){const g=r.match(/var\((.*?)\)/);g&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(g[1]));const o=new T.TinyColor(r),i=t.dark?o.tint(20).toString():u(o,20);if(t.plain)l=n.cssVarBlock({"bg-color":t.dark?u(o,90):o.tint(90).toString(),"text-color":r,"border-color":t.dark?u(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),c.value&&(l[n.cssVarBlockName("disabled-bg-color")]=t.dark?u(o,90):o.tint(90).toString(),l[n.cssVarBlockName("disabled-text-color")]=t.dark?u(o,50):o.tint(50).toString(),l[n.cssVarBlockName("disabled-border-color")]=t.dark?u(o,80):o.tint(80).toString());else if(t.link||t.text){const s=t.dark?u(o,30):o.tint(30).toString();if(l=n.cssVarBlock({"text-color":r,"hover-text-color":s,"active-text-color":i}),t.link&&(l[n.cssVarBlockName("hover-link-text-color")]=s,l[n.cssVarBlockName("active-color")]=i),c.value){const d=t.dark?u(o,50):o.tint(50).toString();l[n.cssVarBlockName("disabled-bg-color")]="transparent",l[n.cssVarBlockName("disabled-text-color")]=d,l[n.cssVarBlockName("disabled-border-color")]="transparent"}}else{const s=t.dark?u(o,30):o.tint(30).toString(),d=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(l=n.cssVarBlock({"bg-color":r,"text-color":d,"border-color":r,"hover-bg-color":s,"hover-text-color":d,"hover-border-color":s,"active-bg-color":i,"active-border-color":i}),c.value){const f=t.dark?u(o,50):o.tint(50).toString();l[n.cssVarBlockName("disabled-bg-color")]=f,l[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,l[n.cssVarBlockName("disabled-border-color")]=f}}}return l})}var G=e.defineComponent({name:"ElButton",__name:"button",props:x,emits:D,setup(t,{expose:c,emit:n}){const l=t,r=n,g=F(l),o=b.useNamespace("button"),{_ref:i,_size:s,_type:d,_disabled:f,_props:y,_plain:B,_round:h,_text:_,_dashed:S,shouldAddSpace:k,handleClick:N}=q(l,r),a=e.computed(()=>[o.b(),o.m(d.value),o.m(s.value),o.is("disabled",f.value),o.is("loading",l.loading),o.is("plain",B.value),o.is("round",h.value),o.is("circle",l.circle),o.is("text",_.value),o.is("dashed",S.value),o.is("link",l.link),o.is("has-bg",l.bg)]);return c({ref:i,size:s,type:d,disabled:f,shouldAddSpace:k}),(m,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps({ref_key:"_ref",ref:i},e.unref(y),{class:a.value,style:e.unref(g),onClick:e.unref(N)}),{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.$slots.loading?e.renderSlot(m.$slots,"loading",{key:0}):(e.openBlock(),e.createBlock(e.unref(C.ElIcon),{key:1,class:e.normalizeClass(e.unref(o).is("loading"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||m.$slots.icon?(e.openBlock(),e.createBlock(e.unref(C.ElIcon),{key:1},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0})):e.renderSlot(m.$slots,"icon",{key:1})]),_:3})):e.createCommentVNode("v-if",!0),m.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({[e.unref(o).em("text","expand")]:e.unref(k)})},[e.renderSlot(m.$slots,"default")],2)):e.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),K=G;const j={size:x.size,type:x.type,direction:{type:b.definePropType(String),values:["horizontal","vertical"],default:"horizontal"}};var A=e.defineComponent({name:"ElButtonGroup",__name:"button-group",props:j,setup(t){const c=t;e.provide(z,e.reactive({size:e.toRef(c,"size"),type:e.toRef(c,"type")}));const n=b.useNamespace("button");return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n).b("group"),e.unref(n).bm("group",c.direction)])},[e.renderSlot(l.$slots,"default")],2))}}),w=A;const R=b.withInstall(K,{ButtonGroup:w});b.withNoopInstall(w);exports.ElButton=R;exports.buttonTypes=V;