x-next 1.3.1 → 1.5.0

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 (182) hide show
  1. package/AI_USAGE.md +2 -2
  2. package/CHANGELOG.md +71 -0
  3. package/dist/_utils/constant.d.ts +1 -1
  4. package/dist/_utils/palette.d.ts +6 -14
  5. package/dist/components/alert/Alert.vue.d.ts +9 -9
  6. package/dist/components/alert/index.d.ts +6 -6
  7. package/dist/components/button/ButtonGroup.vue.d.ts +22 -18
  8. package/dist/components/date-picker/DatePanel.vue.d.ts +342 -1
  9. package/dist/components/date-picker/DatePicker.vue.d.ts +343 -2
  10. package/dist/components/date-picker/index.d.ts +1765 -1083
  11. package/dist/components/dropdown/DropdownButton.vue.d.ts +2 -1
  12. package/dist/components/dropdown/index.d.ts +3 -0
  13. package/dist/components/form-input-tag/index.d.ts +26 -25
  14. package/dist/components/form-input-tag/interface.d.ts +8 -0
  15. package/dist/components/link/Link.vue.d.ts +4 -4
  16. package/dist/components/link/index.d.ts +6 -6
  17. package/dist/components/message/index.d.ts +3 -3
  18. package/dist/components/message/message.vue.d.ts +1 -1
  19. package/dist/components/notification/Notification.d.ts +1 -1
  20. package/dist/components/notification/index.d.ts +3 -3
  21. package/dist/components/popconfirm/src/types.d.ts +1 -1
  22. package/dist/components/progress/Progress.vue.d.ts +3 -3
  23. package/dist/components/progress/index.d.ts +3 -3
  24. package/dist/components/steps/context.d.ts +9 -0
  25. package/dist/components/tabs/TabPane.vue.d.ts +2 -0
  26. package/dist/components/tabs/index.d.ts +6 -0
  27. package/dist/components/tabs/interface.d.ts +4 -0
  28. package/dist/components/tag/Tag.vue.d.ts +14 -0
  29. package/dist/components/tag/index.d.ts +9 -0
  30. package/dist/components/tag/interface.d.ts +5 -0
  31. package/dist/components/trend-chart/components/TrendChart.d.ts +127 -17
  32. package/dist/components/trend-chart/components/trend-chart-curve.d.ts +27 -7
  33. package/dist/components/trend-chart/components/trend-chart-labels.d.ts +4 -0
  34. package/dist/components/trend-chart/helpers/getPadding.d.ts +3 -2
  35. package/dist/components/trend-chart/index.d.ts +223 -28
  36. package/dist/components/trend-chart/props.d.ts +63 -5
  37. package/dist/es/_styles/palette-aliases.js +182 -127
  38. package/dist/es/_utils/palette.js +49 -43
  39. package/dist/es/components/_components/picker/input-range.vue2.js +10 -10
  40. package/dist/es/components/_components/picker/input.vue2.js +20 -20
  41. package/dist/es/components/_components/select-view/select-view.js +2 -2
  42. package/dist/es/components/alert/Alert.vue.js +2 -2
  43. package/dist/es/components/alert/Alert.vue2.js +21 -20
  44. package/dist/es/components/button/Button.js +17 -17
  45. package/dist/es/components/button/ButtonGroup.vue2.js +11 -9
  46. package/dist/es/components/date-picker/DatePanel.vue.js +71 -62
  47. package/dist/es/components/date-picker/DatePanel.vue2.js +50 -40
  48. package/dist/es/components/date-picker/DatePicker.vue2.js +1 -1
  49. package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
  50. package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
  51. package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
  52. package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
  53. package/dist/es/components/form/form-item-label.vue.js +25 -22
  54. package/dist/es/components/form/form-item-label.vue2.js +1 -1
  55. package/dist/es/components/form-checkbox/icon-check.js +12 -43
  56. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  57. package/dist/es/components/form-input/InputSearch.js +1 -1
  58. package/dist/es/components/form-input-number/InputNumber.js +4 -4
  59. package/dist/es/components/form-input-tag/InputTag.js +168 -147
  60. package/dist/es/components/form-input-tag/utils.js +21 -19
  61. package/dist/es/components/form-textarea/Textarea.vue2.js +1 -1
  62. package/dist/es/components/link/Link.vue2.js +1 -1
  63. package/dist/es/components/menu/MenuSubMenu.js +50 -36
  64. package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
  65. package/dist/es/components/pagination/Pagination.js +73 -70
  66. package/dist/es/components/popconfirm/src/popup.vue.js +1 -1
  67. package/dist/es/components/progress/Progress.vue2.js +1 -1
  68. package/dist/es/components/steps/Step.vue2.js +51 -47
  69. package/dist/es/components/steps/Steps.vue2.js +22 -19
  70. package/dist/es/components/table/Table.js +1 -1
  71. package/dist/es/components/table/table-th.js +2 -2
  72. package/dist/es/components/tabs/TabPane.vue.js +11 -9
  73. package/dist/es/components/tabs/TabPane.vue2.js +28 -24
  74. package/dist/es/components/tabs/tabs-button.js +2 -2
  75. package/dist/es/components/tabs/tabs-nav.js +21 -19
  76. package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
  77. package/dist/es/components/tag/Tag.vue.js +20 -20
  78. package/dist/es/components/tag/Tag.vue2.js +35 -28
  79. package/dist/es/components/time-picker/TimePanel.vue.js +30 -29
  80. package/dist/es/components/time-picker/TimePicker.vue2.js +1 -1
  81. package/dist/es/components/time-picker/TimeRangePanel.js +26 -23
  82. package/dist/es/components/trend-chart/components/TrendChart.js +208 -142
  83. package/dist/es/components/trend-chart/components/trend-chart-curve.js +124 -59
  84. package/dist/es/components/trend-chart/components/trend-chart-labels.js +43 -41
  85. package/dist/es/components/trend-chart/helpers/getPadding.js +3 -3
  86. package/dist/es/components/trend-chart/props.js +101 -33
  87. package/dist/es/components/trend-chart/themes.js +15 -15
  88. package/dist/es/components/watermark/controller.js +40 -40
  89. package/dist/es/icons/default/calendar.js +15 -0
  90. package/dist/es/icons/default/clock-circle.js +15 -0
  91. package/dist/es/icons/default/double-left.js +15 -0
  92. package/dist/es/icons/default/double-right.js +15 -0
  93. package/dist/es/icons/default/down.js +16 -0
  94. package/dist/es/icons/default/eye-invisible.js +20 -0
  95. package/dist/es/icons/default/eye.js +18 -0
  96. package/dist/es/icons/default/left.js +15 -0
  97. package/dist/es/icons/default/minus.js +16 -0
  98. package/dist/es/icons/default/plus.js +16 -0
  99. package/dist/es/icons/default/question-circle.js +18 -0
  100. package/dist/es/icons/default/right.js +15 -0
  101. package/dist/es/icons/default/search.js +16 -0
  102. package/dist/es/icons/default/up.js +16 -0
  103. package/dist/es/icons/icon.js +26 -25
  104. package/dist/es/icons/public/boxicons/basic.js +1893 -0
  105. package/dist/es/icons/public/boxicons/brands.js +304 -0
  106. package/dist/es/icons/public/boxicons/filled.js +1893 -0
  107. package/dist/es/icons/public/boxicons/index.js +24 -0
  108. package/dist/es/icons/public/boxicons/names.js +4082 -0
  109. package/dist/es/icons/registry.js +15 -15
  110. package/dist/es/locale/en-US.js +2 -1
  111. package/dist/es/locale/zh-CN.js +2 -1
  112. package/dist/es/style.css +1 -1
  113. package/dist/icons/default/calendar.d.ts +93 -0
  114. package/dist/icons/default/clock-circle.d.ts +93 -0
  115. package/dist/icons/{_self/down.d.ts → default/double-left.d.ts} +6 -0
  116. package/dist/icons/{_self/eye-invisible.d.ts → default/double-right.d.ts} +6 -0
  117. package/dist/icons/default/down.d.ts +93 -0
  118. package/dist/icons/default/eye-invisible.d.ts +93 -0
  119. package/dist/icons/default/eye.d.ts +93 -0
  120. package/dist/icons/{_self/eye.d.ts → default/left.d.ts} +7 -0
  121. package/dist/icons/default/minus.d.ts +93 -0
  122. package/dist/icons/{_self → default}/plus.d.ts +7 -0
  123. package/dist/icons/default/question-circle.d.ts +93 -0
  124. package/dist/icons/{_self/minus.d.ts → default/right.d.ts} +7 -0
  125. package/dist/icons/{_self → default}/search.d.ts +7 -0
  126. package/dist/icons/{_self → default}/up.d.ts +7 -0
  127. package/dist/icons/public/boxicons/basic.cjs +1 -0
  128. package/dist/icons/public/boxicons/basic.d.ts +2 -0
  129. package/dist/icons/public/boxicons/brands.cjs +1 -0
  130. package/dist/icons/public/boxicons/brands.d.ts +2 -0
  131. package/dist/icons/public/boxicons/filled.cjs +1 -0
  132. package/dist/icons/public/boxicons/filled.d.ts +2 -0
  133. package/dist/icons/public/boxicons/index.cjs +1 -0
  134. package/dist/icons/public/boxicons/index.d.ts +10 -0
  135. package/dist/icons/public/boxicons/names.d.ts +10 -0
  136. package/dist/icons/registry.d.ts +5 -0
  137. package/dist/index.cjs +4 -4
  138. package/dist/index.umd.js +4 -4
  139. package/dist/locale/interface.d.ts +2 -0
  140. package/dist/style/alert.css +1 -1
  141. package/dist/style/base.css +1 -1
  142. package/dist/style/button.css +1 -1
  143. package/dist/style/date-picker.css +1 -1
  144. package/dist/style/dialog.css +1 -1
  145. package/dist/style/drawer.css +1 -1
  146. package/dist/style/dropdown.css +1 -1
  147. package/dist/style/form-input-number.css +1 -1
  148. package/dist/style/form-input-tag.css +1 -1
  149. package/dist/style/form-input.css +1 -1
  150. package/dist/style/form-radio.css +1 -1
  151. package/dist/style/form-select.css +1 -1
  152. package/dist/style/form-textarea.css +1 -1
  153. package/dist/style/form.css +1 -1
  154. package/dist/style/link.css +1 -1
  155. package/dist/style/menu.css +1 -1
  156. package/dist/style/message-box.css +1 -1
  157. package/dist/style/network.css +1 -1
  158. package/dist/style/pagination.css +1 -1
  159. package/dist/style/popconfirm.css +1 -1
  160. package/dist/style/popover.css +1 -1
  161. package/dist/style/popup.css +1 -1
  162. package/dist/style/progress.css +1 -1
  163. package/dist/style/rate.css +1 -1
  164. package/dist/style/spin.css +1 -1
  165. package/dist/style/steps.css +1 -1
  166. package/dist/style/table.css +1 -1
  167. package/dist/style/tabs.css +1 -1
  168. package/dist/style/tag.css +1 -1
  169. package/dist/style/time-picker.css +1 -1
  170. package/dist/style/time-range-selector.css +1 -1
  171. package/dist/style.css +1 -1
  172. package/package.json +31 -4
  173. package/dist/es/icons/_self/down.js +0 -16
  174. package/dist/es/icons/_self/eye-invisible.js +0 -13
  175. package/dist/es/icons/_self/eye.js +0 -13
  176. package/dist/es/icons/_self/minus.js +0 -13
  177. package/dist/es/icons/_self/plus.js +0 -12
  178. package/dist/es/icons/_self/question-message.js +0 -12
  179. package/dist/es/icons/_self/search.js +0 -13
  180. package/dist/es/icons/_self/up.js +0 -16
  181. package/dist/es/icons/_ui/calendar.js +0 -13
  182. package/dist/es/icons/_ui/time.js +0 -12
@@ -1,25 +1,25 @@
1
- import { defineComponent as me, toRefs as pe, ref as v, computed as s, reactive as ge, watch as $, onMounted as be, createVNode as d, mergeProps as z, TransitionGroup as he, nextTick as U } from "vue";
2
- import { INPUT_EVENTS as W } from "../../_utils/constant.js";
3
- import { Enter as ye, Backspace as Ve } from "../../_utils/keycode.js";
1
+ import { defineComponent as pe, toRefs as ge, ref as m, computed as d, reactive as be, watch as j, onMounted as he, createVNode as f, mergeProps as F, TransitionGroup as ye, nextTick as T } from "vue";
2
+ import { INPUT_EVENTS as U } from "../../_utils/constant.js";
3
+ import { Enter as Ve, Backspace as Ie } from "../../_utils/keycode.js";
4
4
  import { getValueData as Ce } from "./utils.js";
5
- import { Tag as Ie } from "../tag/index.js";
5
+ import { Tag as xe } from "../tag/index.js";
6
6
  import we from "../_components/icon-hover/index.vue.js";
7
- import xe from "../../icons/default/close.js";
8
- import { omit as q } from "../../_utils/omit.js";
9
- import Be from "../../_utils/pick.js";
7
+ import Be from "../../icons/default/close.js";
8
+ import { omit as W } from "../../_utils/omit.js";
9
+ import Te from "../../_utils/pick.js";
10
10
  import _e from "../../_container/resize-observer.js";
11
- import Te from "../_components/feedback-icon/index.vue.js";
12
- import { useFormItem as ke, useFormItemControl as Ne } from "../../_hooks/use-form-item.js";
11
+ import ke from "../_components/feedback-icon/index.vue.js";
12
+ import { useFormItem as Ee, useFormItemControl as Ne } from "../../_hooks/use-form-item.js";
13
13
  import { useLocale as Ae } from "../../locale/index.js";
14
- import { useSize as Ee } from "../../_hooks/use-size.js";
15
- import { isObject as Se, isUndefined as ze, isNull as Fe } from "../../_utils/is.js";
16
- import { getClassNameMixin as G, getRemovePrefixComponentName as Re } from "../../_utils/config.js";
14
+ import { useSize as Se } from "../../_hooks/use-size.js";
15
+ import { isObject as ze, isUndefined as Fe, isNull as Re } from "../../_utils/is.js";
16
+ import { getClassNameMixin as q, getRemovePrefixComponentName as De } from "../../_utils/config.js";
17
17
  const Pe = {
18
18
  value: "value",
19
19
  label: "label",
20
20
  closable: "closable",
21
21
  tagProps: "tagProps"
22
- }, De = "__x_input_tag_more__", aa = /* @__PURE__ */ me({
22
+ }, Me = "__x_input_tag_more__", la = /* @__PURE__ */ pe({
23
23
  name: "InputTag",
24
24
  inheritAttrs: !1,
25
25
  props: {
@@ -164,28 +164,28 @@ const Pe = {
164
164
  * @param {(string | number | TagData)[]} value
165
165
  * @param {Event} ev
166
166
  */
167
- change: (a, o) => !0,
167
+ change: (a, i) => !0,
168
168
  /**
169
169
  * @zh 输入值发生改变时触发
170
170
  * @en Trigger when the input value changes
171
171
  * @param {string} inputValue
172
172
  * @param {Event} ev
173
173
  */
174
- inputValueChange: (a, o) => !0,
174
+ inputValueChange: (a, i) => !0,
175
175
  /**
176
176
  * @zh 按下回车键时触发
177
177
  * @en Triggered when the enter key is pressed
178
178
  * @param {string} inputValue
179
179
  * @param {KeyboardEvent} ev
180
180
  */
181
- pressEnter: (a, o) => !0,
181
+ pressEnter: (a, i) => !0,
182
182
  /**
183
183
  * @zh 点击标签的删除按钮时触发
184
184
  * @en Triggered when the delete button of the label is clicked
185
185
  * @param {string | number} removed
186
186
  * @param {Event} ev
187
187
  */
188
- remove: (a, o) => !0,
188
+ remove: (a, i) => !0,
189
189
  /**
190
190
  * @zh 点击清除按钮时触发
191
191
  * @en Triggered when the clear button is clicked
@@ -223,165 +223,184 @@ const Pe = {
223
223
  * @binding {TagData} data
224
224
  */
225
225
  setup(a, {
226
- emit: o,
227
- slots: i,
228
- attrs: I
226
+ emit: i,
227
+ slots: c,
228
+ attrs: C
229
229
  }) {
230
230
  const {
231
- size: H,
232
- disabled: K,
233
- error: J,
234
- uninjectFormItemContext: T,
235
- modelValue: Q
236
- } = pe(a), u = a.baseCls ? G(Re(a.baseCls)) : G("input-tag"), r = v(), p = v(), {
237
- formItemCtx: X,
238
- mergedSize: Y,
239
- mergedDisabled: g,
240
- mergedError: F,
241
- feedback: w,
242
- eventHandlers: x
243
- } = ke({
244
- size: H,
245
- disabled: K,
246
- error: J,
247
- uninject: T == null ? void 0 : T.value
231
+ size: G,
232
+ disabled: H,
233
+ error: K,
234
+ uninjectFormItemContext: _,
235
+ modelValue: J
236
+ } = ge(a), u = a.baseCls ? q(De(a.baseCls)) : q("input-tag"), r = m(), g = m(), {
237
+ formItemCtx: Q,
238
+ mergedSize: X,
239
+ mergedDisabled: b,
240
+ mergedError: R,
241
+ feedback: x,
242
+ eventHandlers: h
243
+ } = Ee({
244
+ size: G,
245
+ disabled: H,
246
+ error: K,
247
+ uninject: _ == null ? void 0 : _.value
248
248
  }), {
249
- t: R
249
+ t: w
250
250
  } = Ae(), {
251
- mergedSize: Z
252
- } = Ee(Y), ee = s(() => ({
251
+ mergedSize: Y
252
+ } = Se(X), Z = d(() => ({
253
253
  ...Pe,
254
254
  ...a.fieldNames
255
- })), k = v(!1), N = v(a.defaultValue), P = v(a.defaultInputValue), m = v(!1), B = v(""), D = s(() => Se(a.retainInputValue) ? {
255
+ })), k = m(!1), E = m(a.defaultValue), D = m(a.defaultInputValue), p = m(!1), B = m(""), P = d(() => ze(a.retainInputValue) ? {
256
256
  create: !1,
257
257
  blur: !1,
258
258
  ...a.retainInputValue
259
259
  } : {
260
260
  create: a.retainInputValue,
261
261
  blur: a.retainInputValue
262
- }), A = ge({
262
+ }), N = be({
263
263
  width: "12px"
264
- }), ae = s(() => a.focused || k.value), b = (e, t) => {
265
- P.value = e, o("update:inputValue", e), o("inputValueChange", e, t);
266
- }, E = (e) => {
264
+ }), ee = d(() => a.focused || k.value), y = (e, t) => {
265
+ D.value = e, i("update:inputValue", e), i("inputValueChange", e, t);
266
+ }, A = (e) => {
267
+ var l, n;
267
268
  const {
268
269
  value: t
269
270
  } = e.target;
270
- e.type === "compositionend" ? (m.value = !1, B.value = "", b(t, e), U(() => {
271
- r.value && n.value !== r.value.value && (r.value.value = n.value);
272
- })) : (m.value = !0, B.value = n.value + (e.data ?? ""));
273
- }, h = s(() => a.modelValue ?? N.value), n = s(() => a.inputValue ?? P.value);
274
- $(Q, (e) => {
275
- (ze(e) || Fe(e)) && (N.value = []);
271
+ e.type === "compositionend" ? (p.value = !1, B.value = "", y(t, e), (n = (l = h.value) == null ? void 0 : l.onInput) == null || n.call(l, e), T(() => {
272
+ r.value && o.value !== r.value.value && (r.value.value = o.value);
273
+ })) : (p.value = !0, B.value = o.value + (e.data ?? ""));
274
+ }, V = d(() => a.modelValue ?? E.value), o = d(() => a.inputValue ?? D.value);
275
+ j(J, (e) => {
276
+ (Fe(e) || Re(e)) && (E.value = []);
276
277
  });
277
- const le = (e) => {
278
+ const ae = (e) => {
278
279
  r.value && e.target !== r.value && (e.preventDefault(), r.value.focus());
279
- }, te = (e) => {
280
- var l, f;
280
+ }, le = (e) => {
281
+ var l, n;
281
282
  const {
282
283
  value: t
283
284
  } = e.target;
284
- m.value || (b(t, e), (f = (l = x.value) == null ? void 0 : l.onInput) == null || f.call(l, e), U(() => {
285
- r.value && n.value !== r.value.value && (r.value.value = n.value);
285
+ p.value || (y(t, e), (n = (l = h.value) == null ? void 0 : l.onInput) == null || n.call(l, e), T(() => {
286
+ r.value && o.value !== r.value.value && (r.value.value = o.value);
286
287
  }));
287
- }, c = s(() => Ce(h.value, ee.value)), y = s(() => {
288
+ }, v = d(() => Ce(V.value, Z.value)), I = d(() => {
288
289
  if (a.maxTagCount > 0) {
289
- const e = c.value.length - a.maxTagCount;
290
+ const e = v.value.length - a.maxTagCount;
290
291
  if (e > 0) {
291
- const t = c.value.slice(0, a.maxTagCount), l = {
292
- value: De,
292
+ const t = v.value.slice(0, a.maxTagCount), l = {
293
+ value: Me,
293
294
  label: `+${e}...`,
294
295
  closable: !1
295
296
  };
296
297
  return t.push({
297
298
  raw: l,
299
+ originalIndex: -1,
298
300
  ...l
299
301
  }), t;
300
302
  }
301
303
  }
302
- return c.value;
304
+ return v.value;
303
305
  }), S = (e, t) => {
304
- var l, f;
305
- N.value = e, o("update:modelValue", e), o("change", e, t), (f = (l = x.value) == null ? void 0 : l.onChange) == null || f.call(l, t);
306
+ var l, n;
307
+ E.value = e, i("update:modelValue", e), i("change", e, t), (n = (l = h.value) == null ? void 0 : l.onChange) == null || n.call(l, t);
306
308
  }, M = (e, t, l) => {
307
- var V;
308
- const f = (V = h.value) == null ? void 0 : V.filter((C, _) => _ !== t);
309
- S(f, l), o("remove", e, l);
309
+ var s;
310
+ const n = (s = V.value) == null ? void 0 : s.filter((z, me) => me !== t);
311
+ S(n, l), i("remove", e, l);
312
+ }, te = (e, t, l) => {
313
+ const n = document.activeElement === l.currentTarget;
314
+ M(e, t, l), n && T(() => {
315
+ var s;
316
+ return (s = r.value) == null ? void 0 : s.focus();
317
+ });
310
318
  }, ue = (e) => {
311
- e.stopPropagation(), S([], e), n.value && b("", e), o("clear", e);
312
- }, O = s(() => !g.value && !a.readonly && a.allowClear && !!h.value.length), ne = (e) => {
313
- if (n.value) {
314
- if (e.preventDefault(), a.uniqueValue && c.value.some((l) => l.value === n.value)) {
315
- o("pressEnter", n.value, e);
319
+ e.stopPropagation();
320
+ const t = document.activeElement === e.currentTarget;
321
+ S([], e), o.value && y("", e), i("clear", e), t && T(() => {
322
+ var n;
323
+ return (n = r.value) == null ? void 0 : n.focus();
324
+ });
325
+ }, $ = d(() => !b.value && !a.readonly && a.allowClear && !!V.value.length), ne = (e) => {
326
+ if (o.value) {
327
+ if (e.preventDefault(), a.uniqueValue && v.value.some((l) => l.value === o.value)) {
328
+ i("pressEnter", o.value, e);
316
329
  return;
317
330
  }
318
- const t = h.value.concat(n.value);
319
- S(t, e), o("pressEnter", n.value, e), D.value.create || b("", e);
331
+ const t = V.value.concat(o.value);
332
+ S(t, e), i("pressEnter", o.value, e), P.value.create || y("", e);
320
333
  }
321
334
  }, oe = (e) => {
322
335
  var t, l;
323
- k.value = !0, o("focus", e), (l = (t = x.value) == null ? void 0 : t.onFocus) == null || l.call(t, e);
336
+ k.value = !0, i("focus", e), (l = (t = h.value) == null ? void 0 : t.onFocus) == null || l.call(t, e);
324
337
  }, re = (e) => {
325
338
  var t, l;
326
- k.value = !1, !D.value.blur && n.value && b("", e), o("blur", e), (l = (t = x.value) == null ? void 0 : t.onBlur) == null || l.call(t, e);
339
+ k.value = !1, !P.value.blur && o.value && y("", e), i("blur", e), (l = (t = h.value) == null ? void 0 : t.onBlur) == null || l.call(t, e);
327
340
  }, ie = () => {
328
- for (let e = c.value.length - 1; e >= 0; e--)
329
- if (c.value[e].closable)
341
+ for (let e = v.value.length - 1; e >= 0; e--)
342
+ if (v.value[e].closable)
330
343
  return e;
331
344
  return -1;
332
345
  }, se = (e) => {
333
- if (g.value || a.readonly)
346
+ if (b.value || a.readonly)
334
347
  return;
335
348
  const t = e.key || e.code;
336
- if (!m.value && n.value && t === ye.key && ne(e), !m.value && y.value.length > 0 && !n.value && t === Ve.key) {
349
+ if (!p.value && o.value && t === Ve.key && ne(e), !p.value && I.value.length > 0 && !o.value && t === Ie.key) {
337
350
  const l = ie();
338
- l >= 0 && (e.preventDefault(), M(c.value[l].value, l, e));
351
+ if (l >= 0) {
352
+ const {
353
+ value: n,
354
+ originalIndex: s
355
+ } = v.value[l];
356
+ e.preventDefault(), M(n, s, e);
357
+ }
339
358
  }
340
- o("keydown", e);
341
- }, j = (e) => {
342
- e > 12 ? A.width = `${e}px` : A.width = "12px";
359
+ i("keydown", e);
360
+ }, L = (e) => {
361
+ e > 12 ? N.width = `${e}px` : N.width = "12px";
343
362
  };
344
- be(() => {
345
- p.value && j(p.value.offsetWidth);
363
+ he(() => {
364
+ g.value && L(g.value.offsetWidth);
346
365
  });
347
- const de = () => {
348
- p.value && j(p.value.offsetWidth);
366
+ const ce = () => {
367
+ g.value && L(g.value.offsetWidth);
349
368
  };
350
- $(n, (e) => {
351
- r.value && !m.value && e !== r.value.value && (r.value.value = e);
369
+ j(o, (e) => {
370
+ r.value && !p.value && e !== r.value.value && (r.value.value = e);
352
371
  });
353
- const fe = s(() => [u.block, u.modifier(`size-${Z.value}`), {
354
- [u.modifier("disabled")]: g.value,
372
+ const de = d(() => [u.block, u.modifier(`size-${Y.value}`), {
373
+ [u.modifier("disabled")]: b.value,
355
374
  [u.modifier("disabled-input")]: a.disabledInput,
356
- [u.modifier("error")]: F.value,
357
- [u.modifier("focus")]: ae.value,
375
+ [u.modifier("error")]: R.value,
376
+ [u.modifier("focus")]: ee.value,
358
377
  [u.modifier("readonly")]: a.readonly,
359
- [u.modifier("has-tag")]: y.value.length > 0,
360
- [u.modifier("has-prefix")]: !!i.prefix,
361
- [u.modifier("has-suffix")]: !!i.suffix || O.value || !!w.value,
362
- [u.modifier("has-placeholder")]: !h.value.length
363
- }]), ce = s(() => q(q(I, W), ["class", "style"])), L = s(() => Be(I, W)), ve = Ne(X, () => ({
364
- ...L.value,
378
+ [u.modifier("has-tag")]: I.value.length > 0,
379
+ [u.modifier("has-prefix")]: !!c.prefix,
380
+ [u.modifier("has-suffix")]: !!c.suffix || $.value || !!x.value,
381
+ [u.modifier("has-placeholder")]: !V.value.length
382
+ }]), fe = d(() => W(W(C, U), ["class", "style"])), O = d(() => Te(C, U)), ve = Ne(Q, () => ({
383
+ ...O.value,
365
384
  ...a.inputAttrs
366
385
  }));
367
386
  return {
368
387
  inputRef: r,
369
388
  render: () => {
370
389
  var e;
371
- return d("span", z({
372
- class: [fe.value, I.class],
373
- style: I.style,
374
- onMousedown: le
375
- }, ce.value), [d(_e, {
376
- onResize: de
390
+ return f("span", F({
391
+ class: [de.value, C.class],
392
+ style: C.style,
393
+ onMousedown: ae
394
+ }, fe.value), [f(_e, {
395
+ onResize: ce
377
396
  }, {
378
- default: () => [d("span", {
379
- ref: p,
397
+ default: () => [f("span", {
398
+ ref: g,
380
399
  class: u.element("mirror")
381
- }, [y.value.length > 0 ? B.value || n.value : B.value || n.value || a.placeholder])]
382
- }), i.prefix && d("span", {
400
+ }, [I.value.length > 0 ? B.value || o.value : B.value || o.value || a.placeholder])]
401
+ }), c.prefix && f("span", {
383
402
  class: u.element("prefix")
384
- }, [i.prefix()]), d(he, {
403
+ }, [c.prefix()]), f(ye, {
385
404
  tag: "span",
386
405
  name: "input-tag-zoom",
387
406
  class: [u.element("inner"), {
@@ -390,57 +409,59 @@ const Pe = {
390
409
  }, {
391
410
  default: () => {
392
411
  var t;
393
- return [y.value.map((l, f) => {
394
- var V;
395
- return d(Ie, z({
396
- key: `tag-${l.value}-${f}`,
397
- class: u.element("tag"),
398
- visible: !0,
399
- nowrap: a.tagNowrap
400
- }, l.tagProps, {
401
- closable: !g.value && !a.readonly && (((V = l.tagProps) == null ? void 0 : V.closable) ?? l.closable),
402
- onClose: (C) => M(l.value, f, C)
403
- }), {
404
- default: () => {
405
- var C, _;
406
- return [((C = i.tag) == null ? void 0 : C.call(i, {
407
- data: l.raw
408
- })) ?? ((_ = a.formatTag) == null ? void 0 : _.call(a, l.raw)) ?? l.label];
409
- }
410
- });
411
- }), d("input", z(ve.value, {
412
+ return [I.value.map((l, n) => f(xe, F({
413
+ key: `tag-${l.value}-${n}`,
414
+ class: u.element("tag"),
415
+ visible: !0,
416
+ nowrap: a.tagNowrap
417
+ }, l.tagProps, {
418
+ closable: !b.value && !a.readonly && l.closable,
419
+ closeAriaLabel: `${w("common.closeTarget", {
420
+ target: w("common.tag")
421
+ })} ${l.label}`,
422
+ onClose: (s) => te(l.value, l.originalIndex, s)
423
+ }), {
424
+ default: () => {
425
+ var s, z;
426
+ return [((s = c.tag) == null ? void 0 : s.call(c, {
427
+ data: l.raw
428
+ })) ?? ((z = a.formatTag) == null ? void 0 : z.call(a, l.raw)) ?? l.label];
429
+ }
430
+ })), f("input", F(ve.value, {
412
431
  ref: r,
413
432
  key: "input-tag-input",
414
433
  class: u.element("input"),
415
- style: A,
416
- value: n.value,
417
- placeholder: y.value.length === 0 ? a.placeholder : void 0,
418
- disabled: g.value,
434
+ style: N,
435
+ value: o.value,
436
+ placeholder: I.value.length === 0 ? a.placeholder : void 0,
437
+ disabled: b.value,
419
438
  readonly: a.readonly || a.disabledInput,
420
- "aria-invalid": F.value ? !0 : ((t = a.inputAttrs) == null ? void 0 : t["aria-invalid"]) ?? L.value["aria-invalid"],
421
- onInput: te,
439
+ "aria-invalid": R.value ? !0 : ((t = a.inputAttrs) == null ? void 0 : t["aria-invalid"]) ?? O.value["aria-invalid"],
440
+ onInput: le,
422
441
  onKeydown: se,
423
442
  onFocus: oe,
424
443
  onBlur: re,
425
- onCompositionstart: E,
426
- onCompositionupdate: E,
427
- onCompositionend: E
444
+ onCompositionstart: A,
445
+ onCompositionupdate: A,
446
+ onCompositionend: A
428
447
  }), null)];
429
448
  }
430
- }), O.value && d(we, {
449
+ }), $.value && f(we, {
431
450
  as: "button",
432
- "aria-label": R("common.clearTarget", {
433
- target: R("common.tag")
451
+ "aria-label": w("common.clearTarget", {
452
+ target: w("common.tag")
434
453
  }),
435
454
  class: u.element("clear-btn"),
436
455
  onClick: ue,
437
- onMousedown: (t) => t.stopPropagation()
456
+ onMousedown: (t) => {
457
+ t.preventDefault(), t.stopPropagation();
458
+ }
438
459
  }, {
439
- default: () => [d(xe, null, null)]
440
- }), (i.suffix || !!w.value) && d("span", {
460
+ default: () => [f(Be, null, null)]
461
+ }), (c.suffix || !!x.value) && f("span", {
441
462
  class: u.element("suffix")
442
- }, [(e = i.suffix) == null ? void 0 : e.call(i), !!w.value && d(Te, {
443
- type: w.value
463
+ }, [(e = c.suffix) == null ? void 0 : e.call(c), !!x.value && f(ke, {
464
+ type: x.value
444
465
  }, null)])]);
445
466
  }
446
467
  };
@@ -470,5 +491,5 @@ const Pe = {
470
491
  }
471
492
  });
472
493
  export {
473
- aa as default
494
+ la as default
474
495
  };
@@ -1,32 +1,34 @@
1
- import { isObject as u, isUndefined as s, isNull as a } from "../../_utils/is.js";
2
- const i = (r, e) => {
3
- const o = [];
4
- for (const t of r)
5
- if (u(t)) {
6
- const l = t[e.value];
7
- if (s(l) || a(l))
1
+ import { isObject as i, isUndefined as a, isNull as r } from "../../_utils/is.js";
2
+ const f = (c, t) => {
3
+ const n = [];
4
+ for (const [s, e] of c.entries())
5
+ if (i(e)) {
6
+ const l = e[t.value];
7
+ if (a(l) || r(l))
8
8
  continue;
9
- const n = t[e.closable];
10
- o.push({
11
- raw: t,
9
+ const o = e[t.tagProps], u = (e[t.closable] ?? !0) && (o == null ? void 0 : o.closable) !== !1;
10
+ n.push({
11
+ raw: e,
12
+ originalIndex: s,
12
13
  value: l,
13
- label: t[e.label] ?? String(l),
14
- closable: n ?? !0,
15
- tagProps: t[e.tagProps]
14
+ label: e[t.label] ?? String(l),
15
+ closable: u,
16
+ tagProps: o
16
17
  });
17
- } else if (!s(t) && !a(t)) {
18
+ } else if (!a(e) && !r(e)) {
18
19
  const l = {
19
- value: t,
20
- label: String(t),
20
+ value: e,
21
+ label: String(e),
21
22
  closable: !0
22
23
  };
23
- o.push({
24
+ n.push({
24
25
  raw: l,
26
+ originalIndex: s,
25
27
  ...l
26
28
  });
27
29
  }
28
- return o;
30
+ return n;
29
31
  };
30
32
  export {
31
- i as getValueData
33
+ f as getValueData
32
34
  };
@@ -2,7 +2,7 @@ import { defineComponent as de, toRefs as he, ref as s, computed as r, watch as
2
2
  import Se from "../../_container/resize-observer.js";
3
3
  import { useLocale as we } from "../../locale/index.js";
4
4
  import ye from "../_components/icon-hover/index.vue.js";
5
- import xe from "../../icons/default/close-circle-fill.js";
5
+ import xe from "../../icons/default/close.js";
6
6
  import { getSizeStyles as ze } from "./utils.js";
7
7
  import { isUndefined as be, isNull as Ce, isObject as b, isFunction as pe } from "../../_utils/is.js";
8
8
  import { omit as W } from "../../_utils/omit.js";
@@ -15,7 +15,7 @@ const C = g({
15
15
  /**
16
16
  * @zh 链接的状态
17
17
  * @en Link status
18
- * @values 'normal','warning','success','danger'
18
+ * @values 'normal','warning','success','danger','strong'
19
19
  */
20
20
  status: {
21
21
  type: String,