@factoringplus/pl-components-pack-v3 0.1.27 → 0.1.30

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.
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, openBlock, createElementBlock, createElementVNode, warn, getCurrentInstance, computed, ref, inject, unref, mergeProps, renderSlot, useAttrs as useAttrs$1, useSlots, shallowRef, watch, nextTick, onMounted, onUpdated, toRef, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, vShow, Text, provide, reactive, onUnmounted, createTextVNode, resolveComponent } from "vue";
20
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, warn, getCurrentInstance, computed, ref, inject, unref, mergeProps, renderSlot, shallowRef, watch, nextTick, onMounted, onUpdated, resolveComponent, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, vShow, useSlots, Text, provide, reactive, toRef, onUnmounted, createTextVNode } from "vue";
21
21
  function fromPairs(pairs) {
22
22
  var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
23
23
  while (++index < length) {
@@ -26,9 +26,6 @@ function fromPairs(pairs) {
26
26
  }
27
27
  return result;
28
28
  }
29
- function isNil(value) {
30
- return value == null;
31
- }
32
29
  const isClient = typeof window !== "undefined";
33
30
  const isNumber = (val) => typeof val === "number";
34
31
  const NOOP = () => {
@@ -38,7 +35,7 @@ const hasOwn = (val, key) => hasOwnProperty.call(val, key);
38
35
  const isString = (val) => typeof val === "string";
39
36
  const isObject = (val) => val !== null && typeof val === "object";
40
37
  const isUndefined = (val) => val === void 0;
41
- var _export_sfc$1 = (sfc, props) => {
38
+ var _export_sfc$2 = (sfc, props) => {
42
39
  const target = sfc.__vccOpts || sfc;
43
40
  for (const [key, val] of props) {
44
41
  target[key] = val;
@@ -49,84 +46,96 @@ const _sfc_main$a = defineComponent({
49
46
  name: "CircleCheck"
50
47
  });
51
48
  const _hoisted_1$7 = {
49
+ class: "icon",
50
+ width: "200",
51
+ height: "200",
52
52
  viewBox: "0 0 1024 1024",
53
53
  xmlns: "http://www.w3.org/2000/svg"
54
54
  };
55
55
  const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("path", {
56
56
  fill: "currentColor",
57
- 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"
57
+ d: "M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"
58
58
  }, null, -1);
59
59
  const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("path", {
60
60
  fill: "currentColor",
61
- 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"
61
+ d: "M745.344 361.344a32 32 0 0145.312 45.312l-288 288a32 32 0 01-45.312 0l-160-160a32 32 0 1145.312-45.312L480 626.752l265.344-265.408z"
62
62
  }, null, -1);
63
63
  const _hoisted_4$1 = [
64
64
  _hoisted_2$5,
65
65
  _hoisted_3$3
66
66
  ];
67
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
67
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
68
68
  return openBlock(), createElementBlock("svg", _hoisted_1$7, _hoisted_4$1);
69
69
  }
70
- var circleCheck = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["render", _sfc_render$3]]);
70
+ var circleCheck = /* @__PURE__ */ _export_sfc$2(_sfc_main$a, [["render", _sfc_render$4]]);
71
71
  const _sfc_main$9 = defineComponent({
72
72
  name: "CircleClose"
73
73
  });
74
74
  const _hoisted_1$6 = {
75
+ class: "icon",
76
+ width: "200",
77
+ height: "200",
75
78
  viewBox: "0 0 1024 1024",
76
79
  xmlns: "http://www.w3.org/2000/svg"
77
80
  };
78
81
  const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("path", {
79
82
  fill: "currentColor",
80
- 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"
83
+ d: "M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"
81
84
  }, null, -1);
82
85
  const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("path", {
83
86
  fill: "currentColor",
84
- 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"
87
+ d: "M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"
85
88
  }, null, -1);
86
89
  const _hoisted_4 = [
87
90
  _hoisted_2$4,
88
91
  _hoisted_3$2
89
92
  ];
90
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
93
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
91
94
  return openBlock(), createElementBlock("svg", _hoisted_1$6, _hoisted_4);
92
95
  }
93
- var circleClose = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$2]]);
96
+ var circleClose = /* @__PURE__ */ _export_sfc$2(_sfc_main$9, [["render", _sfc_render$3]]);
94
97
  const _sfc_main$8 = defineComponent({
95
98
  name: "Loading"
96
99
  });
97
100
  const _hoisted_1$5 = {
101
+ class: "icon",
102
+ width: "200",
103
+ height: "200",
98
104
  viewBox: "0 0 1024 1024",
99
105
  xmlns: "http://www.w3.org/2000/svg"
100
106
  };
101
107
  const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("path", {
102
108
  fill: "currentColor",
103
- 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"
109
+ d: "M512 64a32 32 0 0132 32v192a32 32 0 01-64 0V96a32 32 0 0132-32zm0 640a32 32 0 0132 32v192a32 32 0 11-64 0V736a32 32 0 0132-32zm448-192a32 32 0 01-32 32H736a32 32 0 110-64h192a32 32 0 0132 32zm-640 0a32 32 0 01-32 32H96a32 32 0 010-64h192a32 32 0 0132 32zM195.2 195.2a32 32 0 0145.248 0L376.32 331.008a32 32 0 01-45.248 45.248L195.2 240.448a32 32 0 010-45.248zm452.544 452.544a32 32 0 0145.248 0L828.8 783.552a32 32 0 01-45.248 45.248L647.744 692.992a32 32 0 010-45.248zM828.8 195.264a32 32 0 010 45.184L692.992 376.32a32 32 0 01-45.248-45.248l135.808-135.808a32 32 0 0145.248 0zm-452.544 452.48a32 32 0 010 45.248L240.448 828.8a32 32 0 01-45.248-45.248l135.808-135.808a32 32 0 0145.248 0z"
104
110
  }, null, -1);
105
111
  const _hoisted_3$1 = [
106
112
  _hoisted_2$3
107
113
  ];
108
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
114
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
109
115
  return openBlock(), createElementBlock("svg", _hoisted_1$5, _hoisted_3$1);
110
116
  }
111
- var loading = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$1]]);
117
+ var loading = /* @__PURE__ */ _export_sfc$2(_sfc_main$8, [["render", _sfc_render$2]]);
112
118
  const _sfc_main$7 = defineComponent({
113
119
  name: "View"
114
120
  });
115
121
  const _hoisted_1$4 = {
122
+ class: "icon",
123
+ width: "200",
124
+ height: "200",
116
125
  viewBox: "0 0 1024 1024",
117
126
  xmlns: "http://www.w3.org/2000/svg"
118
127
  };
119
128
  const _hoisted_2$2 = /* @__PURE__ */ createElementVNode("path", {
120
129
  fill: "currentColor",
121
- 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"
130
+ 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 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"
122
131
  }, null, -1);
123
132
  const _hoisted_3 = [
124
133
  _hoisted_2$2
125
134
  ];
126
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
127
136
  return openBlock(), createElementBlock("svg", _hoisted_1$4, _hoisted_3);
128
137
  }
129
- var view = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["render", _sfc_render]]);
138
+ var view = /* @__PURE__ */ _export_sfc$2(_sfc_main$7, [["render", _sfc_render$1]]);
130
139
  const wrapperKey = Symbol();
131
140
  const propKey = "__elPropsReservedKey";
132
141
  function buildProp(option, key) {
@@ -193,8 +202,6 @@ const withNoopInstall = (component) => {
193
202
  component.install = NOOP;
194
203
  return component;
195
204
  };
196
- function debugWarn(scope, message) {
197
- }
198
205
  function addUnit(value, defaultUnit = "px") {
199
206
  if (!value)
200
207
  return "";
@@ -222,10 +229,10 @@ const useAttrs = (params = {}) => {
222
229
  return fromPairs(Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter(([key]) => !allExcludeKeys.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
223
230
  });
224
231
  };
232
+ const elFormKey = Symbol("elForm");
233
+ const elFormItemKey = Symbol("elFormItem");
225
234
  const buttonGroupContextKey = Symbol("buttonGroupContextKey");
226
235
  const configProviderContextKey = Symbol();
227
- const formContextKey = Symbol("formContextKey");
228
- const formItemContextKey = Symbol("formItemContextKey");
229
236
  const useProp = (name) => {
230
237
  const vm = getCurrentInstance();
231
238
  return computed(() => {
@@ -254,18 +261,18 @@ const useSize = (fallback, ignore = {}) => {
254
261
  const emptyRef = ref(void 0);
255
262
  const size = ignore.prop ? emptyRef : useProp("size");
256
263
  const globalConfig2 = ignore.global ? emptyRef : useGlobalConfig("size");
257
- const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
258
- const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
264
+ const form = ignore.form ? { size: void 0 } : inject(elFormKey, void 0);
265
+ const formItem = ignore.formItem ? { size: void 0 } : inject(elFormItemKey, void 0);
259
266
  return computed(() => size.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig2.value || "default");
260
267
  };
261
268
  const useDisabled = (fallback) => {
262
269
  const disabled = useProp("disabled");
263
- const form = inject(formContextKey, void 0);
270
+ const form = inject(elFormKey, void 0);
264
271
  return computed(() => disabled.value || unref(fallback) || (form == null ? void 0 : form.disabled) || false);
265
272
  };
266
273
  const useFormItem = () => {
267
- const form = inject(formContextKey, void 0);
268
- const formItem = inject(formItemContextKey, void 0);
274
+ const form = inject(elFormKey, void 0);
275
+ const formItem = inject(elFormItemKey, void 0);
269
276
  return {
270
277
  form,
271
278
  formItem
@@ -320,11 +327,11 @@ const iconProps = buildProps({
320
327
  type: String
321
328
  }
322
329
  });
323
- const __default__$5 = {
330
+ const __default__$4 = {
324
331
  name: "ElIcon",
325
332
  inheritAttrs: false
326
333
  };
327
- const _sfc_main$6 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$5), {
334
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
328
335
  props: iconProps,
329
336
  setup(__props) {
330
337
  const props = __props;
@@ -378,8 +385,8 @@ const CONTEXT_STYLE = [
378
385
  function calculateNodeStyling(targetElement) {
379
386
  const style = window.getComputedStyle(targetElement);
380
387
  const boxSizing = style.getPropertyValue("box-sizing");
381
- const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
382
- const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
388
+ const paddingSize = parseFloat(style.getPropertyValue("padding-bottom")) + parseFloat(style.getPropertyValue("padding-top"));
389
+ const borderSize = parseFloat(style.getPropertyValue("border-bottom-width")) + parseFloat(style.getPropertyValue("border-top-width"));
383
390
  const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
384
391
  return { contextStyle, paddingSize, borderSize, boxSizing };
385
392
  }
@@ -425,11 +432,7 @@ const inputProps = buildProps({
425
432
  size: useSizeProp,
426
433
  disabled: Boolean,
427
434
  modelValue: {
428
- type: definePropType([
429
- String,
430
- Number,
431
- Object
432
- ]),
435
+ type: definePropType(void 0),
433
436
  default: ""
434
437
  },
435
438
  type: {
@@ -508,60 +511,57 @@ const inputEmits = {
508
511
  compositionupdate: (evt) => evt instanceof CompositionEvent,
509
512
  compositionend: (evt) => evt instanceof CompositionEvent
510
513
  };
511
- const _hoisted_1$3 = ["type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder"];
512
- const _hoisted_2$1 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
513
- const __default__$4 = {
514
- name: "ElInput",
515
- inheritAttrs: false
514
+ var _export_sfc$1 = (sfc, props) => {
515
+ const target = sfc.__vccOpts || sfc;
516
+ for (const [key, val] of props) {
517
+ target[key] = val;
518
+ }
519
+ return target;
516
520
  };
517
- const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__$4), {
521
+ const PENDANT_MAP = {
522
+ suffix: "append",
523
+ prefix: "prepend"
524
+ };
525
+ const _sfc_main$5 = defineComponent({
526
+ name: "ElInput",
527
+ components: { ElIcon, CircleClose: circleClose, IconView: view },
528
+ inheritAttrs: false,
518
529
  props: inputProps,
519
530
  emits: inputEmits,
520
- setup(__props, { expose, emit }) {
521
- const props = __props;
522
- const PENDANT_MAP = {
523
- suffix: "append",
524
- prefix: "prepend"
525
- };
531
+ setup(props, { slots, emit, attrs: rawAttrs }) {
526
532
  const instance = getCurrentInstance();
527
- const rawAttrs = useAttrs$1();
528
- const slots = useSlots();
529
533
  const attrs = useAttrs();
530
534
  const { form, formItem } = useFormItem();
531
535
  const inputSize = useSize();
532
536
  const inputDisabled = useDisabled();
533
537
  const nsInput = useNamespace("input");
534
538
  const nsTextarea = useNamespace("textarea");
535
- const input2 = shallowRef();
536
- const textarea = shallowRef();
539
+ const input2 = ref();
540
+ const textarea = ref();
537
541
  const focused = ref(false);
538
542
  const hovering = ref(false);
539
543
  const isComposing = ref(false);
540
544
  const passwordVisible = ref(false);
541
- const textareaCalcStyle = shallowRef(props.inputStyle);
542
- const _ref = computed(() => input2.value || textarea.value);
545
+ const _textareaCalcStyle = shallowRef(props.inputStyle);
546
+ const inputOrTextarea = computed(() => input2.value || textarea.value);
543
547
  const needStatusIcon = computed(() => {
544
548
  var _a;
545
549
  return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false;
546
550
  });
547
551
  const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
548
552
  const validateIcon = computed(() => ValidateComponentsMap[validateState.value]);
549
- const containerStyle = computed(() => [
550
- rawAttrs.style,
551
- props.inputStyle
552
- ]);
553
- const textareaStyle = computed(() => [
553
+ const containerStyle = computed(() => rawAttrs.style);
554
+ const computedTextareaStyle = computed(() => [
554
555
  props.inputStyle,
555
- textareaCalcStyle.value,
556
+ _textareaCalcStyle.value,
556
557
  { resize: props.resize }
557
558
  ]);
558
- const nativeInputValue = computed(() => isNil(props.modelValue) ? "" : String(props.modelValue));
559
+ const nativeInputValue = computed(() => props.modelValue === null || props.modelValue === void 0 ? "" : String(props.modelValue));
559
560
  const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
560
561
  const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !props.readonly && (!!nativeInputValue.value || focused.value));
561
562
  const isWordLimitVisible = computed(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
562
563
  const textLength = computed(() => Array.from(nativeInputValue.value).length);
563
564
  const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
564
- const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
565
565
  const resizeTextarea = () => {
566
566
  const { type, autosize } = props;
567
567
  if (!isClient || type !== "textarea")
@@ -569,15 +569,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
569
569
  if (autosize) {
570
570
  const minRows = isObject(autosize) ? autosize.minRows : void 0;
571
571
  const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
572
- textareaCalcStyle.value = __spreadValues({}, calcTextareaHeight(textarea.value, minRows, maxRows));
572
+ _textareaCalcStyle.value = __spreadValues({}, calcTextareaHeight(textarea.value, minRows, maxRows));
573
573
  } else {
574
- textareaCalcStyle.value = {
574
+ _textareaCalcStyle.value = {
575
575
  minHeight: calcTextareaHeight(textarea.value).minHeight
576
576
  };
577
577
  }
578
578
  };
579
579
  const setNativeInputValue = () => {
580
- const input22 = _ref.value;
580
+ const input22 = inputOrTextarea.value;
581
581
  if (!input22 || input22.value === nativeInputValue.value)
582
582
  return;
583
583
  input22.value = nativeInputValue.value;
@@ -601,7 +601,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
601
601
  calcIconOffset("prefix");
602
602
  calcIconOffset("suffix");
603
603
  };
604
- const handleInput = async (event) => {
604
+ const handleInput = (event) => {
605
605
  const { value } = event.target;
606
606
  if (isComposing.value)
607
607
  return;
@@ -609,42 +609,20 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
609
609
  return;
610
610
  emit(UPDATE_MODEL_EVENT, value);
611
611
  emit("input", value);
612
- await nextTick();
613
- setNativeInputValue();
612
+ nextTick(setNativeInputValue);
614
613
  };
615
614
  const handleChange = (event) => {
616
615
  emit("change", event.target.value);
617
616
  };
618
- const handleCompositionStart = (event) => {
619
- emit("compositionstart", event);
620
- isComposing.value = true;
621
- };
622
- const handleCompositionUpdate = (event) => {
623
- var _a;
624
- emit("compositionupdate", event);
625
- const text = (_a = event.target) == null ? void 0 : _a.value;
626
- const lastCharacter = text[text.length - 1] || "";
627
- isComposing.value = !isKorean(lastCharacter);
628
- };
629
- const handleCompositionEnd = (event) => {
630
- emit("compositionend", event);
631
- if (isComposing.value) {
632
- isComposing.value = false;
633
- handleInput(event);
634
- }
635
- };
636
- const handlePasswordVisible = () => {
637
- passwordVisible.value = !passwordVisible.value;
638
- focus();
639
- };
640
- const focus = async () => {
641
- var _a;
642
- await nextTick();
643
- (_a = _ref.value) == null ? void 0 : _a.focus();
617
+ const focus = () => {
618
+ nextTick(() => {
619
+ var _a;
620
+ (_a = inputOrTextarea.value) == null ? void 0 : _a.focus();
621
+ });
644
622
  };
645
623
  const blur = () => {
646
624
  var _a;
647
- return (_a = _ref.value) == null ? void 0 : _a.blur();
625
+ (_a = inputOrTextarea.value) == null ? void 0 : _a.blur();
648
626
  };
649
627
  const handleFocus = (event) => {
650
628
  focused.value = true;
@@ -655,23 +633,30 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
655
633
  focused.value = false;
656
634
  emit("blur", event);
657
635
  if (props.validateEvent) {
658
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn());
636
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur");
659
637
  }
660
638
  };
661
- const handleMouseLeave = (evt) => {
662
- hovering.value = false;
663
- emit("mouseleave", evt);
664
- };
665
- const handleMouseEnter = (evt) => {
666
- hovering.value = true;
667
- emit("mouseenter", evt);
639
+ const select = () => {
640
+ var _a;
641
+ (_a = inputOrTextarea.value) == null ? void 0 : _a.select();
668
642
  };
669
- const handleKeydown = (evt) => {
670
- emit("keydown", evt);
643
+ const handleCompositionStart = (event) => {
644
+ emit("compositionstart", event);
645
+ isComposing.value = true;
671
646
  };
672
- const select = () => {
647
+ const handleCompositionUpdate = (event) => {
673
648
  var _a;
674
- (_a = _ref.value) == null ? void 0 : _a.select();
649
+ emit("compositionupdate", event);
650
+ const text = (_a = event.target) == null ? void 0 : _a.value;
651
+ const lastCharacter = text[text.length - 1] || "";
652
+ isComposing.value = !isKorean(lastCharacter);
653
+ };
654
+ const handleCompositionEnd = (event) => {
655
+ emit("compositionend", event);
656
+ if (isComposing.value) {
657
+ isComposing.value = false;
658
+ handleInput(event);
659
+ }
675
660
  };
676
661
  const clear = () => {
677
662
  emit(UPDATE_MODEL_EVENT, "");
@@ -679,221 +664,263 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
679
664
  emit("clear");
680
665
  emit("input", "");
681
666
  };
667
+ const handlePasswordVisible = () => {
668
+ passwordVisible.value = !passwordVisible.value;
669
+ focus();
670
+ };
671
+ const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
682
672
  watch(() => props.modelValue, () => {
683
673
  var _a;
684
- nextTick(() => resizeTextarea());
674
+ nextTick(resizeTextarea);
685
675
  if (props.validateEvent) {
686
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn());
676
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change");
687
677
  }
688
678
  });
689
679
  watch(nativeInputValue, () => setNativeInputValue());
690
- watch(() => props.type, async () => {
691
- await nextTick();
692
- setNativeInputValue();
693
- resizeTextarea();
694
- updateIconOffset();
680
+ watch(() => props.type, () => {
681
+ nextTick(() => {
682
+ setNativeInputValue();
683
+ resizeTextarea();
684
+ updateIconOffset();
685
+ });
695
686
  });
696
- onMounted(async () => {
687
+ onMounted(() => {
697
688
  setNativeInputValue();
698
689
  updateIconOffset();
699
- await nextTick();
700
- resizeTextarea();
690
+ nextTick(resizeTextarea);
701
691
  });
702
- onUpdated(async () => {
703
- await nextTick();
704
- updateIconOffset();
692
+ onUpdated(() => {
693
+ nextTick(updateIconOffset);
705
694
  });
706
- expose({
695
+ const onMouseLeave = (evt) => {
696
+ hovering.value = false;
697
+ emit("mouseleave", evt);
698
+ };
699
+ const onMouseEnter = (evt) => {
700
+ hovering.value = true;
701
+ emit("mouseenter", evt);
702
+ };
703
+ const handleKeydown = (evt) => {
704
+ emit("keydown", evt);
705
+ };
706
+ return {
707
707
  input: input2,
708
708
  textarea,
709
- ref: _ref,
710
- textareaStyle,
711
- autosize: toRef(props, "autosize"),
709
+ attrs,
710
+ inputSize,
711
+ validateState,
712
+ validateIcon,
713
+ containerStyle,
714
+ computedTextareaStyle,
715
+ inputDisabled,
716
+ showClear,
717
+ showPwdVisible,
718
+ isWordLimitVisible,
719
+ textLength,
720
+ hovering,
721
+ inputExceed,
722
+ passwordVisible,
723
+ inputOrTextarea,
724
+ suffixVisible,
725
+ needStatusIcon,
726
+ resizeTextarea,
727
+ handleInput,
728
+ handleChange,
729
+ handleFocus,
730
+ handleBlur,
731
+ handleCompositionStart,
732
+ handleCompositionUpdate,
733
+ handleCompositionEnd,
734
+ handlePasswordVisible,
735
+ clear,
736
+ select,
712
737
  focus,
713
738
  blur,
714
- select,
715
- clear,
716
- resizeTextarea
717
- });
718
- return (_ctx, _cache) => {
719
- return withDirectives((openBlock(), createElementBlock("div", {
720
- class: normalizeClass([
721
- _ctx.type === "textarea" ? unref(nsTextarea).b() : unref(nsInput).b(),
722
- unref(nsInput).m(unref(inputSize)),
723
- unref(nsInput).is("disabled", unref(inputDisabled)),
724
- unref(nsInput).is("exceed", unref(inputExceed)),
725
- {
726
- [unref(nsInput).b("group")]: _ctx.$slots.prepend || _ctx.$slots.append,
727
- [unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
728
- [unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend,
729
- [unref(nsInput).m("prefix")]: _ctx.$slots.prefix || _ctx.prefixIcon,
730
- [unref(nsInput).m("suffix")]: _ctx.$slots.suffix || _ctx.suffixIcon || _ctx.clearable || _ctx.showPassword,
731
- [unref(nsInput).m("suffix--password-clear")]: unref(showClear) && unref(showPwdVisible)
732
- },
733
- _ctx.$attrs.class
734
- ]),
735
- style: normalizeStyle(unref(containerStyle)),
736
- onMouseenter: handleMouseEnter,
737
- onMouseleave: handleMouseLeave
739
+ onMouseLeave,
740
+ onMouseEnter,
741
+ handleKeydown,
742
+ nsInput,
743
+ nsTextarea
744
+ };
745
+ }
746
+ });
747
+ const _hoisted_1$3 = ["type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder"];
748
+ const _hoisted_2$1 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
749
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
750
+ const _component_el_icon = resolveComponent("el-icon");
751
+ const _component_circle_close = resolveComponent("circle-close");
752
+ const _component_icon_view = resolveComponent("icon-view");
753
+ return withDirectives((openBlock(), createElementBlock("div", {
754
+ class: normalizeClass([
755
+ _ctx.type === "textarea" ? _ctx.nsTextarea.b() : _ctx.nsInput.b(),
756
+ _ctx.nsInput.m(_ctx.inputSize),
757
+ _ctx.nsInput.is("disabled", _ctx.inputDisabled),
758
+ _ctx.nsInput.is("exceed", _ctx.inputExceed),
759
+ {
760
+ [_ctx.nsInput.b("group")]: _ctx.$slots.prepend || _ctx.$slots.append,
761
+ [_ctx.nsInput.bm("group", "append")]: _ctx.$slots.append,
762
+ [_ctx.nsInput.bm("group", "prepend")]: _ctx.$slots.prepend,
763
+ [_ctx.nsInput.m("prefix")]: _ctx.$slots.prefix || _ctx.prefixIcon,
764
+ [_ctx.nsInput.m("suffix")]: _ctx.$slots.suffix || _ctx.suffixIcon || _ctx.clearable || _ctx.showPassword,
765
+ [_ctx.nsInput.m("suffix--password-clear")]: _ctx.showClear && _ctx.showPwdVisible
766
+ },
767
+ _ctx.$attrs.class
768
+ ]),
769
+ style: normalizeStyle(_ctx.containerStyle),
770
+ onMouseenter: _cache[17] || (_cache[17] = (...args) => _ctx.onMouseEnter && _ctx.onMouseEnter(...args)),
771
+ onMouseleave: _cache[18] || (_cache[18] = (...args) => _ctx.onMouseLeave && _ctx.onMouseLeave(...args))
772
+ }, [
773
+ createCommentVNode(" input "),
774
+ _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
775
+ createCommentVNode(" prepend slot "),
776
+ _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
777
+ key: 0,
778
+ class: normalizeClass(_ctx.nsInput.be("group", "prepend"))
779
+ }, [
780
+ renderSlot(_ctx.$slots, "prepend")
781
+ ], 2)) : createCommentVNode("v-if", true),
782
+ createElementVNode("input", mergeProps({
783
+ ref: "input",
784
+ class: _ctx.nsInput.e("inner")
785
+ }, _ctx.attrs, {
786
+ type: _ctx.showPassword ? _ctx.passwordVisible ? "text" : "password" : _ctx.type,
787
+ disabled: _ctx.inputDisabled,
788
+ readonly: _ctx.readonly,
789
+ autocomplete: _ctx.autocomplete,
790
+ tabindex: _ctx.tabindex,
791
+ "aria-label": _ctx.label,
792
+ placeholder: _ctx.placeholder,
793
+ style: _ctx.inputStyle,
794
+ onCompositionstart: _cache[0] || (_cache[0] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
795
+ onCompositionupdate: _cache[1] || (_cache[1] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
796
+ onCompositionend: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
797
+ onInput: _cache[3] || (_cache[3] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
798
+ onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
799
+ onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
800
+ onChange: _cache[6] || (_cache[6] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
801
+ onKeydown: _cache[7] || (_cache[7] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
802
+ }), null, 16, _hoisted_1$3),
803
+ createCommentVNode(" prefix slot "),
804
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
805
+ key: 1,
806
+ class: normalizeClass(_ctx.nsInput.e("prefix"))
738
807
  }, [
739
- createCommentVNode(" input "),
740
- _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
741
- createCommentVNode(" prepend slot "),
742
- _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
808
+ createElementVNode("span", {
809
+ class: normalizeClass(_ctx.nsInput.e("prefix-inner"))
810
+ }, [
811
+ renderSlot(_ctx.$slots, "prefix"),
812
+ _ctx.prefixIcon ? (openBlock(), createBlock(_component_el_icon, {
743
813
  key: 0,
744
- class: normalizeClass(unref(nsInput).be("group", "prepend"))
745
- }, [
746
- renderSlot(_ctx.$slots, "prepend")
747
- ], 2)) : createCommentVNode("v-if", true),
748
- createElementVNode("input", mergeProps({
749
- ref_key: "input",
750
- ref: input2,
751
- class: unref(nsInput).e("inner")
752
- }, unref(attrs), {
753
- type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
754
- disabled: unref(inputDisabled),
755
- readonly: _ctx.readonly,
756
- autocomplete: _ctx.autocomplete,
757
- tabindex: _ctx.tabindex,
758
- "aria-label": _ctx.label,
759
- placeholder: _ctx.placeholder,
760
- style: _ctx.inputStyle,
761
- onCompositionstart: handleCompositionStart,
762
- onCompositionupdate: handleCompositionUpdate,
763
- onCompositionend: handleCompositionEnd,
764
- onInput: handleInput,
765
- onFocus: handleFocus,
766
- onBlur: handleBlur,
767
- onChange: handleChange,
768
- onKeydown: handleKeydown
769
- }), null, 16, _hoisted_1$3),
770
- createCommentVNode(" prefix slot "),
771
- _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
772
- key: 1,
773
- class: normalizeClass(unref(nsInput).e("prefix"))
774
- }, [
775
- createElementVNode("span", {
776
- class: normalizeClass(unref(nsInput).e("prefix-inner"))
777
- }, [
778
- renderSlot(_ctx.$slots, "prefix"),
779
- _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
780
- key: 0,
781
- class: normalizeClass(unref(nsInput).e("icon"))
782
- }, {
783
- default: withCtx(() => [
784
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
785
- ]),
786
- _: 1
787
- }, 8, ["class"])) : createCommentVNode("v-if", true)
788
- ], 2)
789
- ], 2)) : createCommentVNode("v-if", true),
790
- createCommentVNode(" suffix slot "),
791
- unref(suffixVisible) ? (openBlock(), createElementBlock("span", {
792
- key: 2,
793
- class: normalizeClass(unref(nsInput).e("suffix"))
794
- }, [
795
- createElementVNode("span", {
796
- class: normalizeClass(unref(nsInput).e("suffix-inner"))
797
- }, [
798
- !unref(showClear) || !unref(showPwdVisible) || !unref(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
799
- renderSlot(_ctx.$slots, "suffix"),
800
- _ctx.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
801
- key: 0,
802
- class: normalizeClass(unref(nsInput).e("icon"))
803
- }, {
804
- default: withCtx(() => [
805
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))
806
- ]),
807
- _: 1
808
- }, 8, ["class"])) : createCommentVNode("v-if", true)
809
- ], 64)) : createCommentVNode("v-if", true),
810
- unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
811
- key: 1,
812
- class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
813
- onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
814
- }, ["prevent"])),
815
- onClick: clear
816
- }, {
817
- default: withCtx(() => [
818
- createVNode(unref(circleClose))
819
- ]),
820
- _: 1
821
- }, 8, ["class"])) : createCommentVNode("v-if", true),
822
- unref(showPwdVisible) ? (openBlock(), createBlock(unref(ElIcon), {
823
- key: 2,
824
- class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
825
- onClick: handlePasswordVisible
826
- }, {
827
- default: withCtx(() => [
828
- createVNode(unref(view))
829
- ]),
830
- _: 1
831
- }, 8, ["class"])) : createCommentVNode("v-if", true),
832
- unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
833
- key: 3,
834
- class: normalizeClass(unref(nsInput).e("count"))
835
- }, [
836
- createElementVNode("span", {
837
- class: normalizeClass(unref(nsInput).e("count-inner"))
838
- }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 3)
839
- ], 2)) : createCommentVNode("v-if", true)
840
- ], 2),
841
- unref(validateState) && unref(validateIcon) && unref(needStatusIcon) ? (openBlock(), createBlock(unref(ElIcon), {
814
+ class: normalizeClass(_ctx.nsInput.e("icon"))
815
+ }, {
816
+ default: withCtx(() => [
817
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
818
+ ]),
819
+ _: 1
820
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
821
+ ], 2)
822
+ ], 2)) : createCommentVNode("v-if", true),
823
+ createCommentVNode(" suffix slot "),
824
+ _ctx.suffixVisible ? (openBlock(), createElementBlock("span", {
825
+ key: 2,
826
+ class: normalizeClass(_ctx.nsInput.e("suffix"))
827
+ }, [
828
+ createElementVNode("span", {
829
+ class: normalizeClass(_ctx.nsInput.e("suffix-inner"))
830
+ }, [
831
+ !_ctx.showClear || !_ctx.showPwdVisible || !_ctx.isWordLimitVisible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
832
+ renderSlot(_ctx.$slots, "suffix"),
833
+ _ctx.suffixIcon ? (openBlock(), createBlock(_component_el_icon, {
842
834
  key: 0,
843
- class: normalizeClass([
844
- unref(nsInput).e("icon"),
845
- unref(nsInput).e("validateIcon"),
846
- unref(nsInput).is("loading", unref(validateState) === "validating")
847
- ])
835
+ class: normalizeClass(_ctx.nsInput.e("icon"))
848
836
  }, {
849
837
  default: withCtx(() => [
850
- (openBlock(), createBlock(resolveDynamicComponent(unref(validateIcon))))
838
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))
851
839
  ]),
852
840
  _: 1
853
841
  }, 8, ["class"])) : createCommentVNode("v-if", true)
854
- ], 2)) : createCommentVNode("v-if", true),
855
- createCommentVNode(" append slot "),
856
- _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
842
+ ], 64)) : createCommentVNode("v-if", true),
843
+ _ctx.showClear ? (openBlock(), createBlock(_component_el_icon, {
844
+ key: 1,
845
+ class: normalizeClass([_ctx.nsInput.e("icon"), _ctx.nsInput.e("clear")]),
846
+ onMousedown: _cache[8] || (_cache[8] = withModifiers(() => {
847
+ }, ["prevent"])),
848
+ onClick: _ctx.clear
849
+ }, {
850
+ default: withCtx(() => [
851
+ createVNode(_component_circle_close)
852
+ ]),
853
+ _: 1
854
+ }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
855
+ _ctx.showPwdVisible ? (openBlock(), createBlock(_component_el_icon, {
856
+ key: 2,
857
+ class: normalizeClass([_ctx.nsInput.e("icon"), _ctx.nsInput.e("clear")]),
858
+ onClick: _ctx.handlePasswordVisible
859
+ }, {
860
+ default: withCtx(() => [
861
+ createVNode(_component_icon_view)
862
+ ]),
863
+ _: 1
864
+ }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
865
+ _ctx.isWordLimitVisible ? (openBlock(), createElementBlock("span", {
857
866
  key: 3,
858
- class: normalizeClass(unref(nsInput).be("group", "append"))
867
+ class: normalizeClass(_ctx.nsInput.e("count"))
859
868
  }, [
860
- renderSlot(_ctx.$slots, "append")
869
+ createElementVNode("span", {
870
+ class: normalizeClass(_ctx.nsInput.e("count-inner"))
871
+ }, toDisplayString(_ctx.textLength) + " / " + toDisplayString(_ctx.attrs.maxlength), 3)
861
872
  ], 2)) : createCommentVNode("v-if", true)
862
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
863
- createCommentVNode(" textarea "),
864
- createElementVNode("textarea", mergeProps({
865
- ref_key: "textarea",
866
- ref: textarea,
867
- class: unref(nsTextarea).e("inner")
868
- }, unref(attrs), {
869
- tabindex: _ctx.tabindex,
870
- disabled: unref(inputDisabled),
871
- readonly: _ctx.readonly,
872
- autocomplete: _ctx.autocomplete,
873
- style: unref(textareaStyle),
874
- "aria-label": _ctx.label,
875
- placeholder: _ctx.placeholder,
876
- onCompositionstart: handleCompositionStart,
877
- onCompositionupdate: handleCompositionUpdate,
878
- onCompositionend: handleCompositionEnd,
879
- onInput: handleInput,
880
- onFocus: handleFocus,
881
- onBlur: handleBlur,
882
- onChange: handleChange,
883
- onKeydown: handleKeydown
884
- }), null, 16, _hoisted_2$1),
885
- unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
886
- key: 0,
887
- class: normalizeClass(unref(nsInput).e("count"))
888
- }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 3)) : createCommentVNode("v-if", true)
889
- ], 64))
890
- ], 38)), [
891
- [vShow, _ctx.type !== "hidden"]
892
- ]);
893
- };
894
- }
895
- }));
896
- const ElInput = withInstall(_sfc_main$5);
873
+ ], 2),
874
+ _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
875
+ key: 0,
876
+ class: normalizeClass([_ctx.nsInput.e("icon"), _ctx.nsInput.e("validateIcon")])
877
+ }, {
878
+ default: withCtx(() => [
879
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))
880
+ ]),
881
+ _: 1
882
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
883
+ ], 2)) : createCommentVNode("v-if", true),
884
+ createCommentVNode(" append slot "),
885
+ _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
886
+ key: 3,
887
+ class: normalizeClass(_ctx.nsInput.be("group", "append"))
888
+ }, [
889
+ renderSlot(_ctx.$slots, "append")
890
+ ], 2)) : createCommentVNode("v-if", true)
891
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
892
+ createCommentVNode(" textarea "),
893
+ createElementVNode("textarea", mergeProps({
894
+ ref: "textarea",
895
+ class: _ctx.nsTextarea.e("inner")
896
+ }, _ctx.attrs, {
897
+ tabindex: _ctx.tabindex,
898
+ disabled: _ctx.inputDisabled,
899
+ readonly: _ctx.readonly,
900
+ autocomplete: _ctx.autocomplete,
901
+ style: _ctx.computedTextareaStyle,
902
+ "aria-label": _ctx.label,
903
+ placeholder: _ctx.placeholder,
904
+ onCompositionstart: _cache[9] || (_cache[9] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
905
+ onCompositionupdate: _cache[10] || (_cache[10] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
906
+ onCompositionend: _cache[11] || (_cache[11] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
907
+ onInput: _cache[12] || (_cache[12] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
908
+ onFocus: _cache[13] || (_cache[13] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
909
+ onBlur: _cache[14] || (_cache[14] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
910
+ onChange: _cache[15] || (_cache[15] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
911
+ onKeydown: _cache[16] || (_cache[16] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
912
+ }), null, 16, _hoisted_2$1),
913
+ _ctx.isWordLimitVisible ? (openBlock(), createElementBlock("span", {
914
+ key: 0,
915
+ class: normalizeClass(_ctx.nsInput.e("count"))
916
+ }, toDisplayString(_ctx.textLength) + " / " + toDisplayString(_ctx.attrs.maxlength), 3)) : createCommentVNode("v-if", true)
917
+ ], 64))
918
+ ], 38)), [
919
+ [vShow, _ctx.type !== "hidden"]
920
+ ]);
921
+ }
922
+ var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render]]);
923
+ const ElInput = withInstall(Input);
897
924
  function bound01(n, max) {
898
925
  if (isOnePointZero(n)) {
899
926
  n = "100%";
@@ -1837,7 +1864,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1837
1864
  const slot = defaultSlot[0];
1838
1865
  if ((slot == null ? void 0 : slot.type) === Text) {
1839
1866
  const text = slot.children;
1840
- return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
1867
+ return /^\p{Unified_Ideograph}{2}$/u.test(text);
1841
1868
  }
1842
1869
  }
1843
1870
  return false;
@@ -1921,11 +1948,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
1921
1948
  ]),
1922
1949
  _: 1
1923
1950
  }, 8, ["class"]))
1924
- ], 2112)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
1951
+ ], 2112)) : _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
1925
1952
  default: withCtx(() => [
1926
- _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
1953
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
1927
1954
  ]),
1928
- _: 3
1955
+ _: 1
1929
1956
  })) : createCommentVNode("v-if", true),
1930
1957
  _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
1931
1958
  key: 2,
@@ -2589,7 +2616,6 @@ var _export_sfc = (sfc, props) => {
2589
2616
  };
2590
2617
  const _sfc_main = {
2591
2618
  props: {
2592
- value: { type: String, default: null },
2593
2619
  beforeIcon: {
2594
2620
  type: String,
2595
2621
  default: null
@@ -2653,7 +2679,9 @@ const _sfc_main = {
2653
2679
  props.type === "secondary" ? "btn-text-secondary" : "",
2654
2680
  props.type === "tertiary" ? "btn-text-tertiary" : ""
2655
2681
  ]])
2656
- }, toDisplayString(__props.value), 3)) : createCommentVNode("", true),
2682
+ }, [
2683
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
2684
+ ], 2)) : createCommentVNode("", true),
2657
2685
  __props.afterIcon && !__props.onlyIcon ? (openBlock(), createBlock(_component_vue_feather, {
2658
2686
  key: 3,
2659
2687
  class: normalizeClass([[
@@ -2663,12 +2691,12 @@ const _sfc_main = {
2663
2691
  type: __props.afterIcon
2664
2692
  }, null, 8, ["class", "type"])) : createCommentVNode("", true)
2665
2693
  ]),
2666
- _: 1
2694
+ _: 3
2667
2695
  }, 8, ["class", "disabled", "type", "onClick"]);
2668
2696
  };
2669
2697
  }
2670
2698
  };
2671
- var PlButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-30f87e98"]]);
2699
+ var PlButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bba88be2"]]);
2672
2700
  const PlButtonPlugin = {
2673
2701
  install(app) {
2674
2702
  app.component("PlButton", PlButton);