rx-compo 1.0.52 → 1.0.54

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 (77) hide show
  1. package/entry/types/index.d.ts +0 -1
  2. package/es/components/RxButton/index.js +16 -25
  3. package/es/components/RxCheckbox/index.js +3712 -0
  4. package/es/components/RxCheckboxGroup/index.js +6430 -0
  5. package/es/components/RxDatePicker/index.js +13042 -0
  6. package/es/components/RxInput/index.js +1560 -0
  7. package/es/components/RxOption/index.js +8859 -0
  8. package/es/components/RxRadio/index.js +646 -0
  9. package/es/components/RxRadioButton/index.js +646 -0
  10. package/es/components/RxRadioGroup/index.js +1117 -0
  11. package/es/components/RxScrollbar/index.js +867 -0
  12. package/es/components/RxSelect/index.js +9022 -0
  13. package/es/components/RxSelectPlus/index.js +17471 -0
  14. package/es/components/RxSuperCondition/index.js +8690 -0
  15. package/es/components/RxTooltip/index.js +2470 -0
  16. package/es/components/index.js +13 -0
  17. package/es/index.d.ts +0 -1
  18. package/es/index.js +0 -1
  19. package/es/utils/useContext.d.ts +10 -0
  20. package/es/utils/useContext.js +13 -0
  21. package/es/utils/useTextOverflow.d.ts +4 -0
  22. package/es/utils/useTextOverflow.js +13 -0
  23. package/es/utils/with-install.d.ts +3 -0
  24. package/es/utils/with-install.js +7 -0
  25. package/index.esm.js +43171 -1577
  26. package/index.js +43192 -1585
  27. package/lib/components/RxButton/index.js +15 -24
  28. package/lib/components/RxCheckbox/index.js +3717 -0
  29. package/lib/components/RxCheckboxGroup/index.js +6435 -0
  30. package/lib/components/RxDatePicker/index.js +13047 -0
  31. package/lib/components/RxInput/index.js +1565 -0
  32. package/lib/components/RxOption/index.js +8864 -0
  33. package/lib/components/RxRadio/index.js +651 -0
  34. package/lib/components/RxRadioButton/index.js +651 -0
  35. package/lib/components/RxRadioGroup/index.js +1122 -0
  36. package/lib/components/RxScrollbar/index.js +872 -0
  37. package/lib/components/RxSelect/index.js +9027 -0
  38. package/lib/components/RxSelectPlus/index.js +17476 -0
  39. package/lib/components/RxSuperCondition/index.js +8695 -0
  40. package/lib/components/RxTooltip/index.js +2475 -0
  41. package/lib/components/index.js +91 -0
  42. package/lib/index.d.ts +0 -1
  43. package/lib/index.js +0 -1
  44. package/lib/utils/useContext.d.ts +10 -0
  45. package/lib/utils/useContext.js +18 -0
  46. package/lib/utils/useTextOverflow.d.ts +4 -0
  47. package/lib/utils/useTextOverflow.js +17 -0
  48. package/lib/utils/with-install.d.ts +3 -0
  49. package/lib/utils/with-install.js +11 -0
  50. package/package.json +4 -2
  51. package/theme-chalk/css/index.css +1 -1
  52. package/theme-chalk/css/rx-button.css +1 -0
  53. package/theme-chalk/css/rx-checkbox-group.css +1 -0
  54. package/theme-chalk/css/rx-checkbox.css +1 -0
  55. package/theme-chalk/css/rx-date-picker.css +0 -0
  56. package/theme-chalk/css/rx-input.css +1 -0
  57. package/theme-chalk/css/rx-option.css +1 -0
  58. package/theme-chalk/css/rx-radio-button.css +0 -0
  59. package/theme-chalk/css/rx-radio-group.css +1 -0
  60. package/theme-chalk/css/rx-radio.css +1 -0
  61. package/theme-chalk/css/rx-scrollbar.css +0 -0
  62. package/theme-chalk/css/rx-select.css +1 -0
  63. package/theme-chalk/css/rx-super-condition.css +0 -0
  64. package/theme-chalk/css/rx-tooltip.css +0 -0
  65. package/es/components/RxButton/index.d.ts +0 -3
  66. package/es/components/RxButton/src/index.d.ts +0 -3
  67. package/es/components/RxButton/src/index.vue.d.ts +0 -10
  68. package/es/components/index.d.ts +0 -2
  69. package/lib/components/RxButton/index.d.ts +0 -3
  70. package/lib/components/RxButton/src/index.d.ts +0 -3
  71. package/lib/components/RxButton/src/index.vue.d.ts +0 -10
  72. package/lib/components/index.d.ts +0 -2
  73. package/types/components/RxButton/index.d.ts +0 -3
  74. package/types/components/RxButton/src/index.d.ts +0 -3
  75. package/types/components/RxButton/src/index.vue.d.ts +0 -10
  76. package/types/components/index.d.ts +0 -2
  77. package/types/utils/with-install.d.ts +0 -3
@@ -0,0 +1,1560 @@
1
+ import { withInstall as withInstall$1 } from 'rx-compo/es/utils/with-install';
2
+ import { openBlock, createElementBlock, createElementVNode, warn, computed as computed$1, getCurrentInstance as getCurrentInstance$1, inject, ref as ref$1, unref as unref$1, defineComponent, mergeProps, renderSlot, onMounted as onMounted$1, watch as watch$1, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, shallowRef, nextTick as nextTick$1, withDirectives, createCommentVNode, Fragment, normalizeClass, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, normalizeStyle, vShow, resolveComponent } from 'vue';
3
+ import { RxInputProps } from 'rx-compo/es/components/RxInput/src/index';
4
+ import { getCurrentInstance, isVue2, ref, watch, computed, getCurrentScope, onScopeDispose, unref, onMounted, nextTick } from 'vue-demi';
5
+ import { useTotalInput } from 'rx-compo/es/components/RxInput/src/hooks/useTotalInput';
6
+
7
+ const isClient$1 = typeof window !== "undefined";
8
+ const isDef = (val) => typeof val !== "undefined";
9
+
10
+ isClient$1 ? window : void 0;
11
+ isClient$1 ? window.document : void 0;
12
+ isClient$1 ? window.navigator : void 0;
13
+ isClient$1 ? window.location : void 0;
14
+ function cloneFnJSON(source) {
15
+ return JSON.parse(JSON.stringify(source));
16
+ }
17
+
18
+ function useVModel(props, key, emit, options = {}) {
19
+ var _a, _b, _c, _d, _e;
20
+ const {
21
+ clone = false,
22
+ passive = false,
23
+ eventName,
24
+ deep = false,
25
+ defaultValue,
26
+ shouldEmit
27
+ } = options;
28
+ const vm = getCurrentInstance();
29
+ const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
30
+ let event = eventName;
31
+ if (!key) {
32
+ if (isVue2) {
33
+ const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;
34
+ key = (modelOptions == null ? void 0 : modelOptions.value) || "value";
35
+ if (!eventName)
36
+ event = (modelOptions == null ? void 0 : modelOptions.event) || "input";
37
+ } else {
38
+ key = "modelValue";
39
+ }
40
+ }
41
+ event = event || `update:${key.toString()}`;
42
+ const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
43
+ const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
44
+ const triggerEmit = (value) => {
45
+ if (shouldEmit) {
46
+ if (shouldEmit(value))
47
+ _emit(event, value);
48
+ } else {
49
+ _emit(event, value);
50
+ }
51
+ };
52
+ if (passive) {
53
+ const initialValue = getValue();
54
+ const proxy = ref(initialValue);
55
+ watch(
56
+ () => props[key],
57
+ (v) => proxy.value = cloneFn(v)
58
+ );
59
+ watch(
60
+ proxy,
61
+ (v) => {
62
+ if (v !== props[key] || deep)
63
+ triggerEmit(v);
64
+ },
65
+ { deep }
66
+ );
67
+ return proxy;
68
+ } else {
69
+ return computed({
70
+ get() {
71
+ return getValue();
72
+ },
73
+ set(value) {
74
+ triggerEmit(value);
75
+ }
76
+ });
77
+ }
78
+ }
79
+
80
+ var _a;
81
+ const isClient = typeof window !== "undefined";
82
+ isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
83
+
84
+ function resolveUnref(r) {
85
+ return typeof r === "function" ? r() : unref(r);
86
+ }
87
+ function identity(arg) {
88
+ return arg;
89
+ }
90
+
91
+ function tryOnScopeDispose(fn) {
92
+ if (getCurrentScope()) {
93
+ onScopeDispose(fn);
94
+ return true;
95
+ }
96
+ return false;
97
+ }
98
+
99
+ function tryOnMounted(fn, sync = true) {
100
+ if (getCurrentInstance())
101
+ onMounted(fn);
102
+ else if (sync)
103
+ fn();
104
+ else
105
+ nextTick(fn);
106
+ }
107
+
108
+ function unrefElement(elRef) {
109
+ var _a;
110
+ const plain = resolveUnref(elRef);
111
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
112
+ }
113
+
114
+ const defaultWindow = isClient ? window : void 0;
115
+ isClient ? window.document : void 0;
116
+ isClient ? window.navigator : void 0;
117
+ isClient ? window.location : void 0;
118
+
119
+ function useSupported(callback, sync = false) {
120
+ const isSupported = ref();
121
+ const update = () => isSupported.value = Boolean(callback());
122
+ update();
123
+ tryOnMounted(update, sync);
124
+ return isSupported;
125
+ }
126
+
127
+ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
128
+ const globalKey = "__vueuse_ssr_handlers__";
129
+ _global[globalKey] = _global[globalKey] || {};
130
+ _global[globalKey];
131
+
132
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
133
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
134
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
135
+ var __objRest$2 = (source, exclude) => {
136
+ var target = {};
137
+ for (var prop in source)
138
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
139
+ target[prop] = source[prop];
140
+ if (source != null && __getOwnPropSymbols$g)
141
+ for (var prop of __getOwnPropSymbols$g(source)) {
142
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
143
+ target[prop] = source[prop];
144
+ }
145
+ return target;
146
+ };
147
+ function useResizeObserver(target, callback, options = {}) {
148
+ const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, ["window"]);
149
+ let observer;
150
+ const isSupported = useSupported(() => window && "ResizeObserver" in window);
151
+ const cleanup = () => {
152
+ if (observer) {
153
+ observer.disconnect();
154
+ observer = void 0;
155
+ }
156
+ };
157
+ const stopWatch = watch(() => unrefElement(target), (el) => {
158
+ cleanup();
159
+ if (isSupported.value && window && el) {
160
+ observer = new ResizeObserver(callback);
161
+ observer.observe(el, observerOptions);
162
+ }
163
+ }, { immediate: true, flush: "post" });
164
+ const stop = () => {
165
+ cleanup();
166
+ stopWatch();
167
+ };
168
+ tryOnScopeDispose(stop);
169
+ return {
170
+ isSupported,
171
+ stop
172
+ };
173
+ }
174
+
175
+ var SwipeDirection;
176
+ (function(SwipeDirection2) {
177
+ SwipeDirection2["UP"] = "UP";
178
+ SwipeDirection2["RIGHT"] = "RIGHT";
179
+ SwipeDirection2["DOWN"] = "DOWN";
180
+ SwipeDirection2["LEFT"] = "LEFT";
181
+ SwipeDirection2["NONE"] = "NONE";
182
+ })(SwipeDirection || (SwipeDirection = {}));
183
+
184
+ var __defProp = Object.defineProperty;
185
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
186
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
187
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
188
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
189
+ var __spreadValues = (a, b) => {
190
+ for (var prop in b || (b = {}))
191
+ if (__hasOwnProp.call(b, prop))
192
+ __defNormalProp(a, prop, b[prop]);
193
+ if (__getOwnPropSymbols)
194
+ for (var prop of __getOwnPropSymbols(b)) {
195
+ if (__propIsEnum.call(b, prop))
196
+ __defNormalProp(a, prop, b[prop]);
197
+ }
198
+ return a;
199
+ };
200
+ const _TransitionPresets = {
201
+ easeInSine: [0.12, 0, 0.39, 0],
202
+ easeOutSine: [0.61, 1, 0.88, 1],
203
+ easeInOutSine: [0.37, 0, 0.63, 1],
204
+ easeInQuad: [0.11, 0, 0.5, 0],
205
+ easeOutQuad: [0.5, 1, 0.89, 1],
206
+ easeInOutQuad: [0.45, 0, 0.55, 1],
207
+ easeInCubic: [0.32, 0, 0.67, 0],
208
+ easeOutCubic: [0.33, 1, 0.68, 1],
209
+ easeInOutCubic: [0.65, 0, 0.35, 1],
210
+ easeInQuart: [0.5, 0, 0.75, 0],
211
+ easeOutQuart: [0.25, 1, 0.5, 1],
212
+ easeInOutQuart: [0.76, 0, 0.24, 1],
213
+ easeInQuint: [0.64, 0, 0.78, 0],
214
+ easeOutQuint: [0.22, 1, 0.36, 1],
215
+ easeInOutQuint: [0.83, 0, 0.17, 1],
216
+ easeInExpo: [0.7, 0, 0.84, 0],
217
+ easeOutExpo: [0.16, 1, 0.3, 1],
218
+ easeInOutExpo: [0.87, 0, 0.13, 1],
219
+ easeInCirc: [0.55, 0, 1, 0.45],
220
+ easeOutCirc: [0, 0.55, 0.45, 1],
221
+ easeInOutCirc: [0.85, 0, 0.15, 1],
222
+ easeInBack: [0.36, 0, 0.66, -0.56],
223
+ easeOutBack: [0.34, 1.56, 0.64, 1],
224
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
225
+ };
226
+ __spreadValues({
227
+ linear: identity
228
+ }, _TransitionPresets);
229
+
230
+ const isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
231
+
232
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
233
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
234
+ const NOOP = () => {
235
+ };
236
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
237
+ const hasOwn = (val, key) => hasOwnProperty.call(val, key);
238
+ const isString = (val) => typeof val === "string";
239
+ const isObject = (val) => val !== null && typeof val === "object";
240
+
241
+ /**
242
+ * The inverse of `_.toPairs`; this method returns an object composed
243
+ * from key-value `pairs`.
244
+ *
245
+ * @static
246
+ * @memberOf _
247
+ * @since 4.0.0
248
+ * @category Array
249
+ * @param {Array} pairs The key-value pairs.
250
+ * @returns {Object} Returns the new object.
251
+ * @example
252
+ *
253
+ * _.fromPairs([['a', 1], ['b', 2]]);
254
+ * // => { 'a': 1, 'b': 2 }
255
+ */
256
+ function fromPairs(pairs) {
257
+ var index = -1,
258
+ length = pairs == null ? 0 : pairs.length,
259
+ result = {};
260
+
261
+ while (++index < length) {
262
+ var pair = pairs[index];
263
+ result[pair[0]] = pair[1];
264
+ }
265
+ return result;
266
+ }
267
+
268
+ /**
269
+ * Checks if `value` is `null` or `undefined`.
270
+ *
271
+ * @static
272
+ * @memberOf _
273
+ * @since 4.0.0
274
+ * @category Lang
275
+ * @param {*} value The value to check.
276
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
277
+ * @example
278
+ *
279
+ * _.isNil(null);
280
+ * // => true
281
+ *
282
+ * _.isNil(void 0);
283
+ * // => true
284
+ *
285
+ * _.isNil(NaN);
286
+ * // => false
287
+ */
288
+ function isNil(value) {
289
+ return value == null;
290
+ }
291
+
292
+ const isUndefined = (val) => val === void 0;
293
+ const isNumber = (val) => typeof val === "number";
294
+ const isStringNumber = (val) => {
295
+ if (!isString(val)) {
296
+ return false;
297
+ }
298
+ return !Number.isNaN(Number(val));
299
+ };
300
+
301
+ class ElementPlusError extends Error {
302
+ constructor(m) {
303
+ super(m);
304
+ this.name = "ElementPlusError";
305
+ }
306
+ }
307
+ function debugWarn(scope, message) {
308
+ if (process.env.NODE_ENV !== "production") {
309
+ const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
310
+ console.warn(error);
311
+ }
312
+ }
313
+
314
+ const SCOPE = "utils/dom/style";
315
+ function addUnit(value, defaultUnit = "px") {
316
+ if (!value)
317
+ return "";
318
+ if (isNumber(value) || isStringNumber(value)) {
319
+ return `${value}${defaultUnit}`;
320
+ } else if (isString(value)) {
321
+ return value;
322
+ }
323
+ debugWarn(SCOPE, "binding value must be a string or number");
324
+ }
325
+
326
+ /*! Element Plus Icons Vue v2.1.0 */
327
+
328
+ // unplugin-vue:/plugin-vue/export-helper
329
+ var export_helper_default = (sfc, props) => {
330
+ let target = sfc.__vccOpts || sfc;
331
+ for (let [key, val] of props)
332
+ target[key] = val;
333
+ return target;
334
+ };
335
+
336
+ // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/circle-check.vue?vue&type=script&lang.ts
337
+ var circle_check_vue_vue_type_script_lang_default = {
338
+ name: "CircleCheck"
339
+ };
340
+ var _hoisted_149 = {
341
+ xmlns: "http://www.w3.org/2000/svg",
342
+ viewBox: "0 0 1024 1024"
343
+ }, _hoisted_249 = /* @__PURE__ */ createElementVNode(
344
+ "path",
345
+ {
346
+ fill: "currentColor",
347
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
348
+ },
349
+ null,
350
+ -1
351
+ /* HOISTED */
352
+ ), _hoisted_348 = /* @__PURE__ */ createElementVNode(
353
+ "path",
354
+ {
355
+ fill: "currentColor",
356
+ d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
357
+ },
358
+ null,
359
+ -1
360
+ /* HOISTED */
361
+ ), _hoisted_415 = [
362
+ _hoisted_249,
363
+ _hoisted_348
364
+ ];
365
+ function _sfc_render49(_ctx, _cache, $props, $setup, $data, $options) {
366
+ return openBlock(), createElementBlock("svg", _hoisted_149, _hoisted_415);
367
+ }
368
+ var circle_check_default = /* @__PURE__ */ export_helper_default(circle_check_vue_vue_type_script_lang_default, [["render", _sfc_render49], ["__file", "circle-check.vue"]]);
369
+
370
+ // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/circle-close.vue?vue&type=script&lang.ts
371
+ var circle_close_vue_vue_type_script_lang_default = {
372
+ name: "CircleClose"
373
+ };
374
+ var _hoisted_151 = {
375
+ xmlns: "http://www.w3.org/2000/svg",
376
+ viewBox: "0 0 1024 1024"
377
+ }, _hoisted_251 = /* @__PURE__ */ createElementVNode(
378
+ "path",
379
+ {
380
+ fill: "currentColor",
381
+ d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"
382
+ },
383
+ null,
384
+ -1
385
+ /* HOISTED */
386
+ ), _hoisted_350 = /* @__PURE__ */ createElementVNode(
387
+ "path",
388
+ {
389
+ fill: "currentColor",
390
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
391
+ },
392
+ null,
393
+ -1
394
+ /* HOISTED */
395
+ ), _hoisted_416 = [
396
+ _hoisted_251,
397
+ _hoisted_350
398
+ ];
399
+ function _sfc_render51(_ctx, _cache, $props, $setup, $data, $options) {
400
+ return openBlock(), createElementBlock("svg", _hoisted_151, _hoisted_416);
401
+ }
402
+ var circle_close_default = /* @__PURE__ */ export_helper_default(circle_close_vue_vue_type_script_lang_default, [["render", _sfc_render51], ["__file", "circle-close.vue"]]);
403
+
404
+ // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/hide.vue?vue&type=script&lang.ts
405
+ var hide_vue_vue_type_script_lang_default = {
406
+ name: "Hide"
407
+ };
408
+ var _hoisted_1133 = {
409
+ xmlns: "http://www.w3.org/2000/svg",
410
+ viewBox: "0 0 1024 1024"
411
+ }, _hoisted_2133 = /* @__PURE__ */ createElementVNode(
412
+ "path",
413
+ {
414
+ fill: "currentColor",
415
+ d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2L371.2 588.8ZM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
416
+ },
417
+ null,
418
+ -1
419
+ /* HOISTED */
420
+ ), _hoisted_3132 = /* @__PURE__ */ createElementVNode(
421
+ "path",
422
+ {
423
+ fill: "currentColor",
424
+ d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
425
+ },
426
+ null,
427
+ -1
428
+ /* HOISTED */
429
+ ), _hoisted_438 = [
430
+ _hoisted_2133,
431
+ _hoisted_3132
432
+ ];
433
+ function _sfc_render133(_ctx, _cache, $props, $setup, $data, $options) {
434
+ return openBlock(), createElementBlock("svg", _hoisted_1133, _hoisted_438);
435
+ }
436
+ var hide_default = /* @__PURE__ */ export_helper_default(hide_vue_vue_type_script_lang_default, [["render", _sfc_render133], ["__file", "hide.vue"]]);
437
+
438
+ // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/loading.vue?vue&type=script&lang.ts
439
+ var loading_vue_vue_type_script_lang_default = {
440
+ name: "Loading"
441
+ };
442
+ var _hoisted_1150 = {
443
+ xmlns: "http://www.w3.org/2000/svg",
444
+ viewBox: "0 0 1024 1024"
445
+ }, _hoisted_2150 = /* @__PURE__ */ createElementVNode(
446
+ "path",
447
+ {
448
+ fill: "currentColor",
449
+ d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
450
+ },
451
+ null,
452
+ -1
453
+ /* HOISTED */
454
+ ), _hoisted_3149 = [
455
+ _hoisted_2150
456
+ ];
457
+ function _sfc_render150(_ctx, _cache, $props, $setup, $data, $options) {
458
+ return openBlock(), createElementBlock("svg", _hoisted_1150, _hoisted_3149);
459
+ }
460
+ var loading_default = /* @__PURE__ */ export_helper_default(loading_vue_vue_type_script_lang_default, [["render", _sfc_render150], ["__file", "loading.vue"]]);
461
+
462
+ // unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/view.vue?vue&type=script&lang.ts
463
+ var view_vue_vue_type_script_lang_default = {
464
+ name: "View"
465
+ };
466
+ var _hoisted_1283 = {
467
+ xmlns: "http://www.w3.org/2000/svg",
468
+ viewBox: "0 0 1024 1024"
469
+ }, _hoisted_2283 = /* @__PURE__ */ createElementVNode(
470
+ "path",
471
+ {
472
+ fill: "currentColor",
473
+ d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448zm0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"
474
+ },
475
+ null,
476
+ -1
477
+ /* HOISTED */
478
+ ), _hoisted_3282 = [
479
+ _hoisted_2283
480
+ ];
481
+ function _sfc_render283(_ctx, _cache, $props, $setup, $data, $options) {
482
+ return openBlock(), createElementBlock("svg", _hoisted_1283, _hoisted_3282);
483
+ }
484
+ var view_default = /* @__PURE__ */ export_helper_default(view_vue_vue_type_script_lang_default, [["render", _sfc_render283], ["__file", "view.vue"]]);
485
+
486
+ const epPropKey = "__epPropKey";
487
+ const definePropType = (val) => val;
488
+ const isEpProp = (val) => isObject(val) && !!val[epPropKey];
489
+ const buildProp = (prop, key) => {
490
+ if (!isObject(prop) || isEpProp(prop))
491
+ return prop;
492
+ const { values, required, default: defaultValue, type, validator } = prop;
493
+ const _validator = values || validator ? (val) => {
494
+ let valid = false;
495
+ let allowedValues = [];
496
+ if (values) {
497
+ allowedValues = Array.from(values);
498
+ if (hasOwn(prop, "default")) {
499
+ allowedValues.push(defaultValue);
500
+ }
501
+ valid || (valid = allowedValues.includes(val));
502
+ }
503
+ if (validator)
504
+ valid || (valid = validator(val));
505
+ if (!valid && allowedValues.length > 0) {
506
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
507
+ warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
508
+ }
509
+ return valid;
510
+ } : void 0;
511
+ const epProp = {
512
+ type,
513
+ required: !!required,
514
+ validator: _validator,
515
+ [epPropKey]: true
516
+ };
517
+ if (hasOwn(prop, "default"))
518
+ epProp.default = defaultValue;
519
+ return epProp;
520
+ };
521
+ const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
522
+ key,
523
+ buildProp(option, key)
524
+ ]));
525
+
526
+ const iconPropType = definePropType([
527
+ String,
528
+ Object,
529
+ Function
530
+ ]);
531
+ const ValidateComponentsMap = {
532
+ validating: loading_default,
533
+ success: circle_check_default,
534
+ error: circle_close_default
535
+ };
536
+
537
+ const withInstall = (main, extra) => {
538
+ main.install = (app) => {
539
+ for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
540
+ app.component(comp.name, comp);
541
+ }
542
+ };
543
+ if (extra) {
544
+ for (const [key, comp] of Object.entries(extra)) {
545
+ main[key] = comp;
546
+ }
547
+ }
548
+ return main;
549
+ };
550
+
551
+ const UPDATE_MODEL_EVENT = "update:modelValue";
552
+
553
+ const componentSizes = ["", "default", "small", "large"];
554
+
555
+ const isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
556
+
557
+ const mutable = (val) => val;
558
+
559
+ const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
560
+ const LISTENER_PREFIX = /^on[A-Z]/;
561
+ const useAttrs = (params = {}) => {
562
+ const { excludeListeners = false, excludeKeys } = params;
563
+ const allExcludeKeys = computed$1(() => {
564
+ return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
565
+ });
566
+ const instance = getCurrentInstance$1();
567
+ if (!instance) {
568
+ debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
569
+ return computed$1(() => ({}));
570
+ }
571
+ return computed$1(() => {
572
+ var _a;
573
+ return fromPairs(Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
574
+ });
575
+ };
576
+
577
+ const defaultNamespace = "el";
578
+ const statePrefix = "is-";
579
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
580
+ let cls = `${namespace}-${block}`;
581
+ if (blockSuffix) {
582
+ cls += `-${blockSuffix}`;
583
+ }
584
+ if (element) {
585
+ cls += `__${element}`;
586
+ }
587
+ if (modifier) {
588
+ cls += `--${modifier}`;
589
+ }
590
+ return cls;
591
+ };
592
+ const namespaceContextKey = Symbol("namespaceContextKey");
593
+ const useGetDerivedNamespace = (namespaceOverrides) => {
594
+ const derivedNamespace = namespaceOverrides || inject(namespaceContextKey, ref$1(defaultNamespace));
595
+ const namespace = computed$1(() => {
596
+ return unref$1(derivedNamespace) || defaultNamespace;
597
+ });
598
+ return namespace;
599
+ };
600
+ const useNamespace = (block, namespaceOverrides) => {
601
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
602
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
603
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
604
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
605
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
606
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
607
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
608
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
609
+ const is = (name, ...args) => {
610
+ const state = args.length >= 1 ? args[0] : true;
611
+ return name && state ? `${statePrefix}${name}` : "";
612
+ };
613
+ const cssVar = (object) => {
614
+ const styles = {};
615
+ for (const key in object) {
616
+ if (object[key]) {
617
+ styles[`--${namespace.value}-${key}`] = object[key];
618
+ }
619
+ }
620
+ return styles;
621
+ };
622
+ const cssVarBlock = (object) => {
623
+ const styles = {};
624
+ for (const key in object) {
625
+ if (object[key]) {
626
+ styles[`--${namespace.value}-${block}-${key}`] = object[key];
627
+ }
628
+ }
629
+ return styles;
630
+ };
631
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
632
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
633
+ return {
634
+ namespace,
635
+ b,
636
+ e,
637
+ m,
638
+ be,
639
+ em,
640
+ bm,
641
+ bem,
642
+ is,
643
+ cssVar,
644
+ cssVarName,
645
+ cssVarBlock,
646
+ cssVarBlockName
647
+ };
648
+ };
649
+
650
+ const useProp = (name) => {
651
+ const vm = getCurrentInstance$1();
652
+ return computed$1(() => {
653
+ var _a, _b;
654
+ return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name];
655
+ });
656
+ };
657
+
658
+ const defaultIdInjection = {
659
+ prefix: Math.floor(Math.random() * 1e4),
660
+ current: 0
661
+ };
662
+ const ID_INJECTION_KEY = Symbol("elIdInjection");
663
+ const useIdInjection = () => {
664
+ return getCurrentInstance$1() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
665
+ };
666
+ const useId = (deterministicId) => {
667
+ const idInjection = useIdInjection();
668
+ if (!isClient && idInjection === defaultIdInjection) {
669
+ debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
670
+ usage: app.provide(ID_INJECTION_KEY, {
671
+ prefix: number,
672
+ current: number,
673
+ })`);
674
+ }
675
+ const namespace = useGetDerivedNamespace();
676
+ const idRef = computed$1(() => unref$1(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
677
+ return idRef;
678
+ };
679
+
680
+ function useCursor(input) {
681
+ const selectionRef = ref$1();
682
+ function recordCursor() {
683
+ if (input.value == void 0)
684
+ return;
685
+ const { selectionStart, selectionEnd, value } = input.value;
686
+ if (selectionStart == null || selectionEnd == null)
687
+ return;
688
+ const beforeTxt = value.slice(0, Math.max(0, selectionStart));
689
+ const afterTxt = value.slice(Math.max(0, selectionEnd));
690
+ selectionRef.value = {
691
+ selectionStart,
692
+ selectionEnd,
693
+ value,
694
+ beforeTxt,
695
+ afterTxt
696
+ };
697
+ }
698
+ function setCursor() {
699
+ if (input.value == void 0 || selectionRef.value == void 0)
700
+ return;
701
+ const { value } = input.value;
702
+ const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
703
+ if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
704
+ return;
705
+ let startPos = value.length;
706
+ if (value.endsWith(afterTxt)) {
707
+ startPos = value.length - afterTxt.length;
708
+ } else if (value.startsWith(beforeTxt)) {
709
+ startPos = beforeTxt.length;
710
+ } else {
711
+ const beforeLastChar = beforeTxt[selectionStart - 1];
712
+ const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
713
+ if (newIndex !== -1) {
714
+ startPos = newIndex + 1;
715
+ }
716
+ }
717
+ input.value.setSelectionRange(startPos, startPos);
718
+ }
719
+ return [recordCursor, setCursor];
720
+ }
721
+
722
+ const useSizeProp = buildProp({
723
+ type: String,
724
+ values: componentSizes,
725
+ required: false
726
+ });
727
+ const SIZE_INJECTION_KEY = Symbol("size");
728
+ const useGlobalSize = () => {
729
+ const injectedSize = inject(SIZE_INJECTION_KEY, {});
730
+ return computed$1(() => {
731
+ return unref$1(injectedSize.size) || "";
732
+ });
733
+ };
734
+
735
+ var _export_sfc = (sfc, props) => {
736
+ const target = sfc.__vccOpts || sfc;
737
+ for (const [key, val] of props) {
738
+ target[key] = val;
739
+ }
740
+ return target;
741
+ };
742
+
743
+ const iconProps = buildProps({
744
+ size: {
745
+ type: definePropType([Number, String])
746
+ },
747
+ color: {
748
+ type: String
749
+ }
750
+ });
751
+
752
+ const __default__$1 = defineComponent({
753
+ name: "ElIcon",
754
+ inheritAttrs: false
755
+ });
756
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
757
+ ...__default__$1,
758
+ props: iconProps,
759
+ setup(__props) {
760
+ const props = __props;
761
+ const ns = useNamespace("icon");
762
+ const style = computed$1(() => {
763
+ const { size, color } = props;
764
+ if (!size && !color)
765
+ return {};
766
+ return {
767
+ fontSize: isUndefined(size) ? void 0 : addUnit(size),
768
+ "--color": color
769
+ };
770
+ });
771
+ return (_ctx, _cache) => {
772
+ return openBlock(), createElementBlock("i", mergeProps({
773
+ class: unref$1(ns).b(),
774
+ style: unref$1(style)
775
+ }, _ctx.$attrs), [
776
+ renderSlot(_ctx.$slots, "default")
777
+ ], 16);
778
+ };
779
+ }
780
+ });
781
+ var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
782
+
783
+ const ElIcon = withInstall(Icon);
784
+
785
+ const formContextKey = Symbol("formContextKey");
786
+ const formItemContextKey = Symbol("formItemContextKey");
787
+
788
+ const useFormSize = (fallback, ignore = {}) => {
789
+ const emptyRef = ref$1(void 0);
790
+ const size = ignore.prop ? emptyRef : useProp("size");
791
+ const globalConfig = ignore.global ? emptyRef : useGlobalSize();
792
+ const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
793
+ const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
794
+ return computed$1(() => size.value || unref$1(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig.value || "");
795
+ };
796
+ const useFormDisabled = (fallback) => {
797
+ const disabled = useProp("disabled");
798
+ const form = inject(formContextKey, void 0);
799
+ return computed$1(() => disabled.value || unref$1(fallback) || (form == null ? void 0 : form.disabled) || false);
800
+ };
801
+
802
+ const useFormItem = () => {
803
+ const form = inject(formContextKey, void 0);
804
+ const formItem = inject(formItemContextKey, void 0);
805
+ return {
806
+ form,
807
+ formItem
808
+ };
809
+ };
810
+ const useFormItemInputId = (props, {
811
+ formItemContext,
812
+ disableIdGeneration,
813
+ disableIdManagement
814
+ }) => {
815
+ if (!disableIdGeneration) {
816
+ disableIdGeneration = ref$1(false);
817
+ }
818
+ if (!disableIdManagement) {
819
+ disableIdManagement = ref$1(false);
820
+ }
821
+ const inputId = ref$1();
822
+ let idUnwatch = void 0;
823
+ const isLabeledByFormItem = computed$1(() => {
824
+ var _a;
825
+ return !!(!props.label && formItemContext && formItemContext.inputIds && ((_a = formItemContext.inputIds) == null ? void 0 : _a.length) <= 1);
826
+ });
827
+ onMounted$1(() => {
828
+ idUnwatch = watch$1([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
829
+ const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
830
+ if (newId !== inputId.value) {
831
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
832
+ inputId.value && formItemContext.removeInputId(inputId.value);
833
+ if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) {
834
+ formItemContext.addInputId(newId);
835
+ }
836
+ }
837
+ inputId.value = newId;
838
+ }
839
+ }, { immediate: true });
840
+ });
841
+ onUnmounted(() => {
842
+ idUnwatch && idUnwatch();
843
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
844
+ inputId.value && formItemContext.removeInputId(inputId.value);
845
+ }
846
+ });
847
+ return {
848
+ isLabeledByFormItem,
849
+ inputId
850
+ };
851
+ };
852
+
853
+ let hiddenTextarea = void 0;
854
+ const HIDDEN_STYLE = `
855
+ height:0 !important;
856
+ visibility:hidden !important;
857
+ ${isFirefox() ? "" : "overflow:hidden !important;"}
858
+ position:absolute !important;
859
+ z-index:-1000 !important;
860
+ top:0 !important;
861
+ right:0 !important;
862
+ `;
863
+ const CONTEXT_STYLE = [
864
+ "letter-spacing",
865
+ "line-height",
866
+ "padding-top",
867
+ "padding-bottom",
868
+ "font-family",
869
+ "font-weight",
870
+ "font-size",
871
+ "text-rendering",
872
+ "text-transform",
873
+ "width",
874
+ "text-indent",
875
+ "padding-left",
876
+ "padding-right",
877
+ "border-width",
878
+ "box-sizing"
879
+ ];
880
+ function calculateNodeStyling(targetElement) {
881
+ const style = window.getComputedStyle(targetElement);
882
+ const boxSizing = style.getPropertyValue("box-sizing");
883
+ const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
884
+ const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
885
+ const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
886
+ return { contextStyle, paddingSize, borderSize, boxSizing };
887
+ }
888
+ function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
889
+ var _a;
890
+ if (!hiddenTextarea) {
891
+ hiddenTextarea = document.createElement("textarea");
892
+ document.body.appendChild(hiddenTextarea);
893
+ }
894
+ const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
895
+ hiddenTextarea.setAttribute("style", `${contextStyle};${HIDDEN_STYLE}`);
896
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
897
+ let height = hiddenTextarea.scrollHeight;
898
+ const result = {};
899
+ if (boxSizing === "border-box") {
900
+ height = height + borderSize;
901
+ } else if (boxSizing === "content-box") {
902
+ height = height - paddingSize;
903
+ }
904
+ hiddenTextarea.value = "";
905
+ const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
906
+ if (isNumber(minRows)) {
907
+ let minHeight = singleRowHeight * minRows;
908
+ if (boxSizing === "border-box") {
909
+ minHeight = minHeight + paddingSize + borderSize;
910
+ }
911
+ height = Math.max(minHeight, height);
912
+ result.minHeight = `${minHeight}px`;
913
+ }
914
+ if (isNumber(maxRows)) {
915
+ let maxHeight = singleRowHeight * maxRows;
916
+ if (boxSizing === "border-box") {
917
+ maxHeight = maxHeight + paddingSize + borderSize;
918
+ }
919
+ height = Math.min(maxHeight, height);
920
+ }
921
+ result.height = `${height}px`;
922
+ (_a = hiddenTextarea.parentNode) == null ? void 0 : _a.removeChild(hiddenTextarea);
923
+ hiddenTextarea = void 0;
924
+ return result;
925
+ }
926
+
927
+ const inputProps = buildProps({
928
+ id: {
929
+ type: String,
930
+ default: void 0
931
+ },
932
+ size: useSizeProp,
933
+ disabled: Boolean,
934
+ modelValue: {
935
+ type: definePropType([
936
+ String,
937
+ Number,
938
+ Object
939
+ ]),
940
+ default: ""
941
+ },
942
+ type: {
943
+ type: String,
944
+ default: "text"
945
+ },
946
+ resize: {
947
+ type: String,
948
+ values: ["none", "both", "horizontal", "vertical"]
949
+ },
950
+ autosize: {
951
+ type: definePropType([Boolean, Object]),
952
+ default: false
953
+ },
954
+ autocomplete: {
955
+ type: String,
956
+ default: "off"
957
+ },
958
+ formatter: {
959
+ type: Function
960
+ },
961
+ parser: {
962
+ type: Function
963
+ },
964
+ placeholder: {
965
+ type: String
966
+ },
967
+ form: {
968
+ type: String
969
+ },
970
+ readonly: {
971
+ type: Boolean,
972
+ default: false
973
+ },
974
+ clearable: {
975
+ type: Boolean,
976
+ default: false
977
+ },
978
+ showPassword: {
979
+ type: Boolean,
980
+ default: false
981
+ },
982
+ showWordLimit: {
983
+ type: Boolean,
984
+ default: false
985
+ },
986
+ suffixIcon: {
987
+ type: iconPropType
988
+ },
989
+ prefixIcon: {
990
+ type: iconPropType
991
+ },
992
+ containerRole: {
993
+ type: String,
994
+ default: void 0
995
+ },
996
+ label: {
997
+ type: String,
998
+ default: void 0
999
+ },
1000
+ tabindex: {
1001
+ type: [String, Number],
1002
+ default: 0
1003
+ },
1004
+ validateEvent: {
1005
+ type: Boolean,
1006
+ default: true
1007
+ },
1008
+ inputStyle: {
1009
+ type: definePropType([Object, Array, String]),
1010
+ default: () => mutable({})
1011
+ }
1012
+ });
1013
+ const inputEmits = {
1014
+ [UPDATE_MODEL_EVENT]: (value) => isString(value),
1015
+ input: (value) => isString(value),
1016
+ change: (value) => isString(value),
1017
+ focus: (evt) => evt instanceof FocusEvent,
1018
+ blur: (evt) => evt instanceof FocusEvent,
1019
+ clear: () => true,
1020
+ mouseleave: (evt) => evt instanceof MouseEvent,
1021
+ mouseenter: (evt) => evt instanceof MouseEvent,
1022
+ keydown: (evt) => evt instanceof Event,
1023
+ compositionstart: (evt) => evt instanceof CompositionEvent,
1024
+ compositionupdate: (evt) => evt instanceof CompositionEvent,
1025
+ compositionend: (evt) => evt instanceof CompositionEvent
1026
+ };
1027
+
1028
+ const _hoisted_1 = ["role"];
1029
+ const _hoisted_2 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"];
1030
+ const _hoisted_3 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"];
1031
+ const __default__ = defineComponent({
1032
+ name: "ElInput",
1033
+ inheritAttrs: false
1034
+ });
1035
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1036
+ ...__default__,
1037
+ props: inputProps,
1038
+ emits: inputEmits,
1039
+ setup(__props, { expose, emit }) {
1040
+ const props = __props;
1041
+ const rawAttrs = useAttrs$1();
1042
+ const slots = useSlots();
1043
+ const containerAttrs = computed$1(() => {
1044
+ const comboBoxAttrs = {};
1045
+ if (props.containerRole === "combobox") {
1046
+ comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
1047
+ comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
1048
+ comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
1049
+ }
1050
+ return comboBoxAttrs;
1051
+ });
1052
+ const containerKls = computed$1(() => [
1053
+ props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
1054
+ nsInput.m(inputSize.value),
1055
+ nsInput.is("disabled", inputDisabled.value),
1056
+ nsInput.is("exceed", inputExceed.value),
1057
+ {
1058
+ [nsInput.b("group")]: slots.prepend || slots.append,
1059
+ [nsInput.bm("group", "append")]: slots.append,
1060
+ [nsInput.bm("group", "prepend")]: slots.prepend,
1061
+ [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
1062
+ [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
1063
+ [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value
1064
+ },
1065
+ rawAttrs.class
1066
+ ]);
1067
+ const wrapperKls = computed$1(() => [
1068
+ nsInput.e("wrapper"),
1069
+ nsInput.is("focus", focused.value)
1070
+ ]);
1071
+ const attrs = useAttrs({
1072
+ excludeKeys: computed$1(() => {
1073
+ return Object.keys(containerAttrs.value);
1074
+ })
1075
+ });
1076
+ const { form, formItem } = useFormItem();
1077
+ const { inputId } = useFormItemInputId(props, {
1078
+ formItemContext: formItem
1079
+ });
1080
+ const inputSize = useFormSize();
1081
+ const inputDisabled = useFormDisabled();
1082
+ const nsInput = useNamespace("input");
1083
+ const nsTextarea = useNamespace("textarea");
1084
+ const input = shallowRef();
1085
+ const textarea = shallowRef();
1086
+ const focused = ref$1(false);
1087
+ const hovering = ref$1(false);
1088
+ const isComposing = ref$1(false);
1089
+ const passwordVisible = ref$1(false);
1090
+ const countStyle = ref$1();
1091
+ const textareaCalcStyle = shallowRef(props.inputStyle);
1092
+ const _ref = computed$1(() => input.value || textarea.value);
1093
+ const needStatusIcon = computed$1(() => {
1094
+ var _a;
1095
+ return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false;
1096
+ });
1097
+ const validateState = computed$1(() => (formItem == null ? void 0 : formItem.validateState) || "");
1098
+ const validateIcon = computed$1(() => validateState.value && ValidateComponentsMap[validateState.value]);
1099
+ const passwordIcon = computed$1(() => passwordVisible.value ? view_default : hide_default);
1100
+ const containerStyle = computed$1(() => [
1101
+ rawAttrs.style,
1102
+ props.inputStyle
1103
+ ]);
1104
+ const textareaStyle = computed$1(() => [
1105
+ props.inputStyle,
1106
+ textareaCalcStyle.value,
1107
+ { resize: props.resize }
1108
+ ]);
1109
+ const nativeInputValue = computed$1(() => isNil(props.modelValue) ? "" : String(props.modelValue));
1110
+ const showClear = computed$1(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
1111
+ const showPwdVisible = computed$1(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || focused.value));
1112
+ const isWordLimitVisible = computed$1(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
1113
+ const textLength = computed$1(() => nativeInputValue.value.length);
1114
+ const inputExceed = computed$1(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
1115
+ const suffixVisible = computed$1(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
1116
+ const [recordCursor, setCursor] = useCursor(input);
1117
+ useResizeObserver(textarea, (entries) => {
1118
+ onceInitSizeTextarea();
1119
+ if (!isWordLimitVisible.value || props.resize !== "both")
1120
+ return;
1121
+ const entry = entries[0];
1122
+ const { width } = entry.contentRect;
1123
+ countStyle.value = {
1124
+ right: `calc(100% - ${width + 15 + 6}px)`
1125
+ };
1126
+ });
1127
+ const resizeTextarea = () => {
1128
+ const { type, autosize } = props;
1129
+ if (!isClient || type !== "textarea" || !textarea.value)
1130
+ return;
1131
+ if (autosize) {
1132
+ const minRows = isObject(autosize) ? autosize.minRows : void 0;
1133
+ const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
1134
+ const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows);
1135
+ textareaCalcStyle.value = {
1136
+ overflowY: "hidden",
1137
+ ...textareaStyle2
1138
+ };
1139
+ nextTick$1(() => {
1140
+ textarea.value.offsetHeight;
1141
+ textareaCalcStyle.value = textareaStyle2;
1142
+ });
1143
+ } else {
1144
+ textareaCalcStyle.value = {
1145
+ minHeight: calcTextareaHeight(textarea.value).minHeight
1146
+ };
1147
+ }
1148
+ };
1149
+ const createOnceInitResize = (resizeTextarea2) => {
1150
+ let isInit = false;
1151
+ return () => {
1152
+ var _a;
1153
+ if (isInit || !props.autosize)
1154
+ return;
1155
+ const isElHidden = ((_a = textarea.value) == null ? void 0 : _a.offsetParent) === null;
1156
+ if (!isElHidden) {
1157
+ resizeTextarea2();
1158
+ isInit = true;
1159
+ }
1160
+ };
1161
+ };
1162
+ const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
1163
+ const setNativeInputValue = () => {
1164
+ const input2 = _ref.value;
1165
+ const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
1166
+ if (!input2 || input2.value === formatterValue)
1167
+ return;
1168
+ input2.value = formatterValue;
1169
+ };
1170
+ const handleInput = async (event) => {
1171
+ recordCursor();
1172
+ let { value } = event.target;
1173
+ if (props.formatter) {
1174
+ value = props.parser ? props.parser(value) : value;
1175
+ }
1176
+ if (isComposing.value)
1177
+ return;
1178
+ if (value === nativeInputValue.value) {
1179
+ setNativeInputValue();
1180
+ return;
1181
+ }
1182
+ emit(UPDATE_MODEL_EVENT, value);
1183
+ emit("input", value);
1184
+ await nextTick$1();
1185
+ setNativeInputValue();
1186
+ setCursor();
1187
+ };
1188
+ const handleChange = (event) => {
1189
+ emit("change", event.target.value);
1190
+ };
1191
+ const handleCompositionStart = (event) => {
1192
+ emit("compositionstart", event);
1193
+ isComposing.value = true;
1194
+ };
1195
+ const handleCompositionUpdate = (event) => {
1196
+ var _a;
1197
+ emit("compositionupdate", event);
1198
+ const text = (_a = event.target) == null ? void 0 : _a.value;
1199
+ const lastCharacter = text[text.length - 1] || "";
1200
+ isComposing.value = !isKorean(lastCharacter);
1201
+ };
1202
+ const handleCompositionEnd = (event) => {
1203
+ emit("compositionend", event);
1204
+ if (isComposing.value) {
1205
+ isComposing.value = false;
1206
+ handleInput(event);
1207
+ }
1208
+ };
1209
+ const handlePasswordVisible = () => {
1210
+ passwordVisible.value = !passwordVisible.value;
1211
+ focus();
1212
+ };
1213
+ const focus = async () => {
1214
+ var _a;
1215
+ await nextTick$1();
1216
+ (_a = _ref.value) == null ? void 0 : _a.focus();
1217
+ };
1218
+ const blur = () => {
1219
+ var _a;
1220
+ return (_a = _ref.value) == null ? void 0 : _a.blur();
1221
+ };
1222
+ const handleFocus = (event) => {
1223
+ focused.value = true;
1224
+ emit("focus", event);
1225
+ };
1226
+ const handleBlur = (event) => {
1227
+ var _a;
1228
+ focused.value = false;
1229
+ emit("blur", event);
1230
+ if (props.validateEvent) {
1231
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
1232
+ }
1233
+ };
1234
+ const handleMouseLeave = (evt) => {
1235
+ hovering.value = false;
1236
+ emit("mouseleave", evt);
1237
+ };
1238
+ const handleMouseEnter = (evt) => {
1239
+ hovering.value = true;
1240
+ emit("mouseenter", evt);
1241
+ };
1242
+ const handleKeydown = (evt) => {
1243
+ emit("keydown", evt);
1244
+ };
1245
+ const select = () => {
1246
+ var _a;
1247
+ (_a = _ref.value) == null ? void 0 : _a.select();
1248
+ };
1249
+ const clear = () => {
1250
+ emit(UPDATE_MODEL_EVENT, "");
1251
+ emit("change", "");
1252
+ emit("clear");
1253
+ emit("input", "");
1254
+ };
1255
+ watch$1(() => props.modelValue, () => {
1256
+ var _a;
1257
+ nextTick$1(() => resizeTextarea());
1258
+ if (props.validateEvent) {
1259
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
1260
+ }
1261
+ });
1262
+ watch$1(nativeInputValue, () => setNativeInputValue());
1263
+ watch$1(() => props.type, async () => {
1264
+ await nextTick$1();
1265
+ setNativeInputValue();
1266
+ resizeTextarea();
1267
+ });
1268
+ onMounted$1(() => {
1269
+ if (!props.formatter && props.parser) {
1270
+ debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
1271
+ }
1272
+ setNativeInputValue();
1273
+ nextTick$1(resizeTextarea);
1274
+ });
1275
+ expose({
1276
+ input,
1277
+ textarea,
1278
+ ref: _ref,
1279
+ textareaStyle,
1280
+ autosize: toRef(props, "autosize"),
1281
+ focus,
1282
+ blur,
1283
+ select,
1284
+ clear,
1285
+ resizeTextarea
1286
+ });
1287
+ return (_ctx, _cache) => {
1288
+ return withDirectives((openBlock(), createElementBlock("div", mergeProps(unref$1(containerAttrs), {
1289
+ class: unref$1(containerKls),
1290
+ style: unref$1(containerStyle),
1291
+ role: _ctx.containerRole,
1292
+ onMouseenter: handleMouseEnter,
1293
+ onMouseleave: handleMouseLeave
1294
+ }), [
1295
+ createCommentVNode(" input "),
1296
+ _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1297
+ createCommentVNode(" prepend slot "),
1298
+ _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
1299
+ key: 0,
1300
+ class: normalizeClass(unref$1(nsInput).be("group", "prepend"))
1301
+ }, [
1302
+ renderSlot(_ctx.$slots, "prepend")
1303
+ ], 2)) : createCommentVNode("v-if", true),
1304
+ createElementVNode("div", {
1305
+ class: normalizeClass(unref$1(wrapperKls))
1306
+ }, [
1307
+ createCommentVNode(" prefix slot "),
1308
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
1309
+ key: 0,
1310
+ class: normalizeClass(unref$1(nsInput).e("prefix"))
1311
+ }, [
1312
+ createElementVNode("span", {
1313
+ class: normalizeClass(unref$1(nsInput).e("prefix-inner")),
1314
+ onClick: focus
1315
+ }, [
1316
+ renderSlot(_ctx.$slots, "prefix"),
1317
+ _ctx.prefixIcon ? (openBlock(), createBlock(unref$1(ElIcon), {
1318
+ key: 0,
1319
+ class: normalizeClass(unref$1(nsInput).e("icon"))
1320
+ }, {
1321
+ default: withCtx(() => [
1322
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
1323
+ ]),
1324
+ _: 1
1325
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
1326
+ ], 2)
1327
+ ], 2)) : createCommentVNode("v-if", true),
1328
+ createElementVNode("input", mergeProps({
1329
+ id: unref$1(inputId),
1330
+ ref_key: "input",
1331
+ ref: input,
1332
+ class: unref$1(nsInput).e("inner")
1333
+ }, unref$1(attrs), {
1334
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
1335
+ disabled: unref$1(inputDisabled),
1336
+ formatter: _ctx.formatter,
1337
+ parser: _ctx.parser,
1338
+ readonly: _ctx.readonly,
1339
+ autocomplete: _ctx.autocomplete,
1340
+ tabindex: _ctx.tabindex,
1341
+ "aria-label": _ctx.label,
1342
+ placeholder: _ctx.placeholder,
1343
+ style: _ctx.inputStyle,
1344
+ form: props.form,
1345
+ onCompositionstart: handleCompositionStart,
1346
+ onCompositionupdate: handleCompositionUpdate,
1347
+ onCompositionend: handleCompositionEnd,
1348
+ onInput: handleInput,
1349
+ onFocus: handleFocus,
1350
+ onBlur: handleBlur,
1351
+ onChange: handleChange,
1352
+ onKeydown: handleKeydown
1353
+ }), null, 16, _hoisted_2),
1354
+ createCommentVNode(" suffix slot "),
1355
+ unref$1(suffixVisible) ? (openBlock(), createElementBlock("span", {
1356
+ key: 1,
1357
+ class: normalizeClass(unref$1(nsInput).e("suffix"))
1358
+ }, [
1359
+ createElementVNode("span", {
1360
+ class: normalizeClass(unref$1(nsInput).e("suffix-inner")),
1361
+ onClick: focus
1362
+ }, [
1363
+ !unref$1(showClear) || !unref$1(showPwdVisible) || !unref$1(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1364
+ renderSlot(_ctx.$slots, "suffix"),
1365
+ _ctx.suffixIcon ? (openBlock(), createBlock(unref$1(ElIcon), {
1366
+ key: 0,
1367
+ class: normalizeClass(unref$1(nsInput).e("icon"))
1368
+ }, {
1369
+ default: withCtx(() => [
1370
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))
1371
+ ]),
1372
+ _: 1
1373
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
1374
+ ], 64)) : createCommentVNode("v-if", true),
1375
+ unref$1(showClear) ? (openBlock(), createBlock(unref$1(ElIcon), {
1376
+ key: 1,
1377
+ class: normalizeClass([unref$1(nsInput).e("icon"), unref$1(nsInput).e("clear")]),
1378
+ onMousedown: withModifiers(unref$1(NOOP), ["prevent"]),
1379
+ onClick: clear
1380
+ }, {
1381
+ default: withCtx(() => [
1382
+ createVNode(unref$1(circle_close_default))
1383
+ ]),
1384
+ _: 1
1385
+ }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
1386
+ unref$1(showPwdVisible) ? (openBlock(), createBlock(unref$1(ElIcon), {
1387
+ key: 2,
1388
+ class: normalizeClass([unref$1(nsInput).e("icon"), unref$1(nsInput).e("password")]),
1389
+ onClick: handlePasswordVisible
1390
+ }, {
1391
+ default: withCtx(() => [
1392
+ (openBlock(), createBlock(resolveDynamicComponent(unref$1(passwordIcon))))
1393
+ ]),
1394
+ _: 1
1395
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
1396
+ unref$1(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
1397
+ key: 3,
1398
+ class: normalizeClass(unref$1(nsInput).e("count"))
1399
+ }, [
1400
+ createElementVNode("span", {
1401
+ class: normalizeClass(unref$1(nsInput).e("count-inner"))
1402
+ }, toDisplayString(unref$1(textLength)) + " / " + toDisplayString(unref$1(attrs).maxlength), 3)
1403
+ ], 2)) : createCommentVNode("v-if", true),
1404
+ unref$1(validateState) && unref$1(validateIcon) && unref$1(needStatusIcon) ? (openBlock(), createBlock(unref$1(ElIcon), {
1405
+ key: 4,
1406
+ class: normalizeClass([
1407
+ unref$1(nsInput).e("icon"),
1408
+ unref$1(nsInput).e("validateIcon"),
1409
+ unref$1(nsInput).is("loading", unref$1(validateState) === "validating")
1410
+ ])
1411
+ }, {
1412
+ default: withCtx(() => [
1413
+ (openBlock(), createBlock(resolveDynamicComponent(unref$1(validateIcon))))
1414
+ ]),
1415
+ _: 1
1416
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
1417
+ ], 2)
1418
+ ], 2)) : createCommentVNode("v-if", true)
1419
+ ], 2),
1420
+ createCommentVNode(" append slot "),
1421
+ _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
1422
+ key: 1,
1423
+ class: normalizeClass(unref$1(nsInput).be("group", "append"))
1424
+ }, [
1425
+ renderSlot(_ctx.$slots, "append")
1426
+ ], 2)) : createCommentVNode("v-if", true)
1427
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1428
+ createCommentVNode(" textarea "),
1429
+ createElementVNode("textarea", mergeProps({
1430
+ id: unref$1(inputId),
1431
+ ref_key: "textarea",
1432
+ ref: textarea,
1433
+ class: unref$1(nsTextarea).e("inner")
1434
+ }, unref$1(attrs), {
1435
+ tabindex: _ctx.tabindex,
1436
+ disabled: unref$1(inputDisabled),
1437
+ readonly: _ctx.readonly,
1438
+ autocomplete: _ctx.autocomplete,
1439
+ style: unref$1(textareaStyle),
1440
+ "aria-label": _ctx.label,
1441
+ placeholder: _ctx.placeholder,
1442
+ form: props.form,
1443
+ onCompositionstart: handleCompositionStart,
1444
+ onCompositionupdate: handleCompositionUpdate,
1445
+ onCompositionend: handleCompositionEnd,
1446
+ onInput: handleInput,
1447
+ onFocus: handleFocus,
1448
+ onBlur: handleBlur,
1449
+ onChange: handleChange,
1450
+ onKeydown: handleKeydown
1451
+ }), null, 16, _hoisted_3),
1452
+ unref$1(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
1453
+ key: 0,
1454
+ style: normalizeStyle(countStyle.value),
1455
+ class: normalizeClass(unref$1(nsInput).e("count"))
1456
+ }, toDisplayString(unref$1(textLength)) + " / " + toDisplayString(unref$1(attrs).maxlength), 7)) : createCommentVNode("v-if", true)
1457
+ ], 64))
1458
+ ], 16, _hoisted_1)), [
1459
+ [vShow, _ctx.type !== "hidden"]
1460
+ ]);
1461
+ };
1462
+ }
1463
+ });
1464
+ var Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);
1465
+
1466
+ const ElInput = withInstall(Input);
1467
+
1468
+ var script = defineComponent({
1469
+ name: 'RxInput',
1470
+ components: {
1471
+ ElInput
1472
+ },
1473
+ props: RxInputProps,
1474
+ setup(props, { emit }) {
1475
+ const valuePass = useVModel(props, 'value', emit);
1476
+ const { formmatterTotalInputValue, formatterTotalBlurForAddDecimal, checkPropsIsVaildWhenTotal } = useTotalInput(valuePass, props);
1477
+ nextTick$1(() => {
1478
+ switch (props.inputType) {
1479
+ case 'total':
1480
+ checkPropsIsVaildWhenTotal();
1481
+ break;
1482
+ }
1483
+ });
1484
+ return {
1485
+ valuePass,
1486
+ formmatterTotalInputValue,
1487
+ formatterTotalBlurForAddDecimal
1488
+ };
1489
+ }
1490
+ });
1491
+
1492
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
1493
+ const _component_el_input = resolveComponent("el-input");
1494
+
1495
+ return (openBlock(), createElementBlock(Fragment, null, [
1496
+ createCommentVNode(" 默认input "),
1497
+ (_ctx.inputType == 'default')
1498
+ ? (openBlock(), createBlock(_component_el_input, mergeProps({
1499
+ key: 0,
1500
+ modelValue: _ctx.valuePass,
1501
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.valuePass) = $event)),
1502
+ class: "rx-input input-default"
1503
+ }, _ctx.$attrs, { clearable: "" }), {
1504
+ default: withCtx(() => [
1505
+ renderSlot(_ctx.$slots, "prefix"),
1506
+ renderSlot(_ctx.$slots, "suffix"),
1507
+ renderSlot(_ctx.$slots, "prepend"),
1508
+ renderSlot(_ctx.$slots, "append")
1509
+ ]),
1510
+ _: 3 /* FORWARDED */
1511
+ }, 16 /* FULL_PROPS */, ["modelValue"]))
1512
+ : createCommentVNode("v-if", true),
1513
+ createCommentVNode(" 数量input "),
1514
+ (_ctx.inputType == 'total')
1515
+ ? (openBlock(), createBlock(_component_el_input, mergeProps({
1516
+ key: 1,
1517
+ modelValue: _ctx.valuePass,
1518
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((_ctx.valuePass) = $event)),
1519
+ class: "rx-input input-total",
1520
+ clearable: ""
1521
+ }, _ctx.$attrs, {
1522
+ onInput: _ctx.formmatterTotalInputValue,
1523
+ onBlur: _ctx.formatterTotalBlurForAddDecimal
1524
+ }), {
1525
+ default: withCtx(() => [
1526
+ renderSlot(_ctx.$slots, "prefix"),
1527
+ renderSlot(_ctx.$slots, "suffix"),
1528
+ renderSlot(_ctx.$slots, "prepend"),
1529
+ renderSlot(_ctx.$slots, "append")
1530
+ ]),
1531
+ _: 3 /* FORWARDED */
1532
+ }, 16 /* FULL_PROPS */, ["modelValue", "onInput", "onBlur"]))
1533
+ : createCommentVNode("v-if", true),
1534
+ createCommentVNode(" 金额input "),
1535
+ (_ctx.inputType == 'money')
1536
+ ? (openBlock(), createBlock(_component_el_input, mergeProps({
1537
+ key: 2,
1538
+ modelValue: _ctx.valuePass,
1539
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((_ctx.valuePass) = $event)),
1540
+ class: "rx-input input-money",
1541
+ clearable: ""
1542
+ }, _ctx.$attrs), {
1543
+ default: withCtx(() => [
1544
+ renderSlot(_ctx.$slots, "prefix"),
1545
+ renderSlot(_ctx.$slots, "suffix"),
1546
+ renderSlot(_ctx.$slots, "prepend"),
1547
+ renderSlot(_ctx.$slots, "append")
1548
+ ]),
1549
+ _: 3 /* FORWARDED */
1550
+ }, 16 /* FULL_PROPS */, ["modelValue"]))
1551
+ : createCommentVNode("v-if", true)
1552
+ ], 64 /* STABLE_FRAGMENT */))
1553
+ }
1554
+
1555
+ script.render = render;
1556
+ script.__file = "packages/components/RxInput/src/index.vue";
1557
+
1558
+ const RxInput = withInstall$1(script);
1559
+
1560
+ export { RxInput, RxInput as default };