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,14 +1,14 @@
1
- import { defineComponent as y, getCurrentInstance as h, inject as N, computed as n, ref as j, reactive as w, onBeforeUnmount as B } from "vue";
2
- import E from "../../icons/default/check.js";
3
- import K from "../../icons/default/close.js";
4
- import { stepsInjectionKey as _ } from "./context.js";
5
- import { useIndex as A } from "../../_hooks/use-index.js";
6
- import { getClassNameMixin as u } from "../../_utils/config.js";
7
- const T = y({
1
+ import { defineComponent as j, getCurrentInstance as w, inject as B, computed as o, ref as f, reactive as E, onBeforeUnmount as K } from "vue";
2
+ import O from "../../icons/default/check.js";
3
+ import _ from "../../icons/default/close.js";
4
+ import { stepsInjectionKey as A } from "./context.js";
5
+ import { useIndex as D } from "../../_hooks/use-index.js";
6
+ import { getClassNameMixin as v } from "../../_utils/config.js";
7
+ const $ = j({
8
8
  name: "Step",
9
9
  components: {
10
- IconCheck: E,
11
- IconClose: K
10
+ IconCheck: O,
11
+ IconClose: _
12
12
  },
13
13
  slots: Object,
14
14
  props: {
@@ -59,57 +59,61 @@ const T = y({
59
59
  * @slot description
60
60
  */
61
61
  setup(a) {
62
- const o = u("steps--item"), l = h(), f = u("steps--icon"), e = N(_, void 0), s = n(() => (e == null ? void 0 : e.type) ?? "default"), t = j(), { innerIndex: v } = A({
63
- itemRef: t,
64
- selector: `.${o.block}`,
62
+ var m;
63
+ const i = v("steps--item"), c = w(), s = v("steps--icon"), e = B(A, void 0), b = o(() => (e == null ? void 0 : e.type) ?? "default"), d = f(), I = f(((m = e == null ? void 0 : e.registerOrder) == null ? void 0 : m.call(e)) ?? 1), { innerIndex: g } = D({
64
+ itemRef: d,
65
+ selector: `.${i.block}`,
65
66
  parentClassName: e == null ? void 0 : e.parentCls
66
- }), i = n(() => v.value + 1), r = n(
67
- () => a.status ?? (e == null ? void 0 : e.getStatus(i.value)) ?? "process"
68
- ), b = n(
69
- () => (e == null ? void 0 : e.errorSteps.includes(i.value + 1)) ?? !1
67
+ }), r = o(() => {
68
+ const n = g.value;
69
+ return (n >= 0 ? n : I.value - 1) + 1;
70
+ }), l = o(
71
+ () => a.status ?? (e == null ? void 0 : e.getStatus(r.value)) ?? "process"
72
+ ), S = o(
73
+ () => (e == null ? void 0 : e.errorSteps.includes(r.value + 1)) ?? !1
70
74
  );
71
- l && (e == null || e.addItem(
72
- l.uid,
73
- w({
74
- step: i,
75
- status: r
75
+ c && (e == null || e.addItem(
76
+ c.uid,
77
+ E({
78
+ step: r,
79
+ status: l
76
80
  })
77
- )), B(() => {
78
- l && (e == null || e.removeItem(l.uid));
81
+ )), K(() => {
82
+ c && (e == null || e.removeItem(c.uid));
79
83
  });
80
- const I = n(
84
+ const k = o(
81
85
  () => !(e != null && e.lineLess) && ((e == null ? void 0 : e.labelPlacement) === "vertical" || (e == null ? void 0 : e.direction) === "vertical")
82
- ), d = n(() => !!(e != null && e.changeable) && !a.disabled), m = n(() => i.value === (e == null ? void 0 : e.current)), S = (c) => {
83
- a.disabled || e == null || e.onClick(i.value, c);
84
- }, g = (c) => {
85
- !d.value || !["Enter", " "].includes(c.key) || (c.preventDefault(), e == null || e.onClick(i.value, c));
86
- }, k = n(() => [
87
- o.block,
88
- o.modifier(r.value),
86
+ ), t = o(() => !!(e != null && e.changeable) && !a.disabled), u = o(() => r.value === (e == null ? void 0 : e.current)), y = (n) => {
87
+ a.disabled || e == null || e.onClick(r.value, n);
88
+ }, h = (n) => {
89
+ !t.value || !["Enter", " "].includes(n.key) || (n.preventDefault(), e == null || e.onClick(r.value, n));
90
+ }, N = o(() => [
91
+ i.block,
92
+ i.modifier(l.value),
89
93
  {
90
- [o.modifier("active")]: m.value,
91
- [o.modifier("next-error")]: b.value,
92
- [o.modifier("disabled")]: a.disabled
94
+ [i.modifier("active")]: u.value,
95
+ [i.modifier("next-error")]: S.value,
96
+ [i.modifier("disabled")]: a.disabled
93
97
  // [`${prefixCls}-custom`]: !!icon,
94
98
  }
95
99
  ]);
96
100
  return {
97
- className: o,
98
- iconClassName: f,
99
- cls: k,
100
- itemRef: t,
101
- showTail: I,
102
- stepNumber: i,
103
- computedStatus: r,
104
- type: s,
101
+ className: i,
102
+ iconClassName: s,
103
+ cls: N,
104
+ itemRef: d,
105
+ showTail: k,
106
+ stepNumber: r,
107
+ computedStatus: l,
108
+ type: b,
105
109
  disabled: a.disabled,
106
- interactive: d,
107
- isActive: m,
108
- handleClick: S,
109
- handleKeydown: g
110
+ interactive: t,
111
+ isActive: u,
112
+ handleClick: y,
113
+ handleKeydown: h
110
114
  };
111
115
  }
112
116
  });
113
117
  export {
114
- T as default
118
+ $ as default
115
119
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as S, toRefs as z, ref as k, computed as n, reactive as m, provide as N } from "vue";
2
- import { stepsInjectionKey as w } from "./context.js";
3
- import { getClassNameMixin as B } from "../../_utils/config.js";
4
- const x = S({
1
+ import { defineComponent as k, toRefs as N, ref as w, computed as n, reactive as m, provide as B } from "vue";
2
+ import { stepsInjectionKey as I } from "./context.js";
3
+ import { getClassNameMixin as M } from "../../_utils/config.js";
4
+ const $ = k({
5
5
  name: "Steps",
6
6
  props: {
7
7
  /**
@@ -92,20 +92,22 @@ const x = S({
92
92
  */
93
93
  change: (e, l) => !0
94
94
  },
95
- setup(e, { emit: l, slots: I }) {
96
- const { type: s, lineLess: c, changeable: v } = z(e), a = B("steps"), d = k(e.defaultCurrent), r = n(() => e.current ?? d.value), i = n(
95
+ setup(e, { emit: l, slots: P }) {
96
+ const { type: s, lineLess: c, changeable: v } = N(e), a = M("steps"), d = w(e.defaultCurrent), r = n(() => e.current ?? d.value), o = n(
97
97
  () => ["navigation", "arrow"].includes(e.type) ? "horizontal" : e.direction
98
- ), f = n(() => e.type === "dot" ? i.value === "vertical" ? "horizontal" : "vertical" : e.type === "navigation" ? "horizontal" : e.labelPlacement), y = (t) => t < r.value ? "finish" : t > r.value ? "wait" : e.status, g = (t, u) => {
98
+ ), f = n(() => e.type === "dot" ? o.value === "vertical" ? "horizontal" : "vertical" : e.type === "navigation" ? "horizontal" : e.labelPlacement), y = (t) => t < r.value ? "finish" : t > r.value ? "wait" : e.status, g = (t, u) => {
99
99
  e.changeable && (d.value = t, l("update:current", t), l("change", t, u));
100
- }, o = m(/* @__PURE__ */ new Map()), h = n(
101
- () => Array.from(o.values()).filter((t) => t.status === "error").map((t) => t.step)
100
+ }, i = m(/* @__PURE__ */ new Map()), h = n(
101
+ () => Array.from(i.values()).filter((t) => t.status === "error").map((t) => t.step)
102
102
  ), p = (t, u) => {
103
- o.set(t, u);
103
+ i.set(t, u);
104
104
  }, b = (t) => {
105
- o.delete(t);
106
- }, C = n(() => [
105
+ i.delete(t);
106
+ };
107
+ let C = 0;
108
+ const S = () => ++C, z = n(() => [
107
109
  a.block,
108
- a.modifier(i.value),
110
+ a.modifier(o.value),
109
111
  a.element(`label-${f.value}`),
110
112
  a.modifier(`mode-${s.value}`),
111
113
  {
@@ -114,11 +116,11 @@ const x = S({
114
116
  [a.modifier("line-less")]: c.value
115
117
  }
116
118
  ]);
117
- return N(
118
- w,
119
+ return B(
120
+ I,
119
121
  m({
120
122
  type: s,
121
- direction: i,
123
+ direction: o,
122
124
  labelPlacement: f,
123
125
  lineLess: c,
124
126
  changeable: v,
@@ -128,13 +130,14 @@ const x = S({
128
130
  addItem: p,
129
131
  removeItem: b,
130
132
  onClick: g,
131
- parentCls: a.block
133
+ parentCls: a.block,
134
+ registerOrder: S
132
135
  })
133
136
  ), {
134
- cls: C
137
+ cls: z
135
138
  };
136
139
  }
137
140
  });
138
141
  export {
139
- x as default
142
+ $ as default
140
143
  };
@@ -5,7 +5,7 @@ import { getGroupColumns as Gl, mapArrayWithChildren as Ul, mapRawTableData as Y
5
5
  import { useRowSelection as Jl } from "./hooks/use-row-selection.js";
6
6
  import { useExpand as Ql } from "./hooks/use-expand.js";
7
7
  import { usePagination as Xl } from "./hooks/use-pagination.js";
8
- import Zl from "../../icons/_self/plus.js";
8
+ import Zl from "../../icons/default/plus.js";
9
9
  import ea from "../../icons/default/minus-circle-fill.js";
10
10
  import { Spin as ta } from "../spin/index.js";
11
11
  import { Pagination as la } from "../pagination/index.js";
@@ -3,8 +3,8 @@ import { Checkbox as ne } from "../form-checkbox/index.js";
3
3
  import { Radio as oe } from "../form-radio/index.js";
4
4
  import { Button as N } from "../button/index.js";
5
5
  import { Trigger as ie } from "../trigger/index.js";
6
- import re from "../../icons/_self/down.js";
7
- import ue from "../../icons/_self/up.js";
6
+ import re from "../../icons/default/down.js";
7
+ import ue from "../../icons/default/up.js";
8
8
  import ae from "../../icons/default/filter.js";
9
9
  import { useColumnSorter as ce } from "./hooks/use-column-sorter.js";
10
10
  import { useColumnFilter as me } from "./hooks/use-column-filter.js";
@@ -1,13 +1,15 @@
1
- import o from "./TabPane.vue2.js";
2
- import { openBlock as a, createElementBlock as t, normalizeClass as n, renderSlot as r, createCommentVNode as s } from "vue";
3
- import i from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = ["tabindex", "aria-hidden"];
5
- function l(e, d, c, p, f, u) {
1
+ import i from "./TabPane.vue2.js";
2
+ import { openBlock as a, createElementBlock as t, normalizeClass as n, renderSlot as o, createCommentVNode as r } from "vue";
3
+ import l from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = ["id", "tabindex", "aria-hidden", "aria-labelledby"];
5
+ function d(e, m, c, p, f, b) {
6
6
  return a(), t("div", {
7
7
  ref: "itemRef",
8
8
  role: "tabpanel",
9
+ id: e.panelId,
9
10
  tabindex: e.active ? 0 : -1,
10
11
  "aria-hidden": !e.active,
12
+ "aria-labelledby": e.tabId,
11
13
  class: n([
12
14
  e.className.element("content--item"),
13
15
  { [`${e.className.element("content--item")}-active`]: e.active }
@@ -17,11 +19,11 @@ function l(e, d, c, p, f, u) {
17
19
  key: 0,
18
20
  class: n(e.className.element("pane"))
19
21
  }, [
20
- r(e.$slots, "default")
21
- ], 2)) : s("", !0)
22
- ], 10, m);
22
+ o(e.$slots, "default")
23
+ ], 2)) : r("", !0)
24
+ ], 10, s);
23
25
  }
24
- const h = /* @__PURE__ */ i(o, [["render", l]]);
26
+ const h = /* @__PURE__ */ l(i, [["render", d]]);
25
27
  export {
26
28
  h as default
27
29
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as I, toRefs as g, getCurrentInstance as H, inject as O, ref as m, computed as c, reactive as j, onBeforeUnmount as k, watch as K, onUpdated as N } from "vue";
2
- import { tabsInjectionKey as R } from "./context.js";
3
- import { getClassNameMixin as U } from "../../_utils/config.js";
4
- const z = I({
1
+ import { defineComponent as O, toRefs as j, getCurrentInstance as k, inject as K, ref as y, computed as d, reactive as N, onBeforeUnmount as R, watch as U, onUpdated as _ } from "vue";
2
+ import { tabsInjectionKey as $ } from "./context.js";
3
+ import { getClassNameMixin as h } from "../../_utils/config.js";
4
+ const L = O({
5
5
  name: "TabPane",
6
6
  props: {
7
7
  /**
@@ -40,34 +40,38 @@ const z = I({
40
40
  * @en Tab title
41
41
  * @slot title
42
42
  */
43
- setup(d, { slots: n }) {
44
- var s, r;
45
- const { title: v, disabled: p, closable: y } = g(d), e = H(), b = U("tabs"), t = O(R, {}), B = m(), i = c(() => e == null ? void 0 : e.vnode.key), l = c(() => {
43
+ setup(n, { slots: s }) {
44
+ var m, p;
45
+ const { title: b, disabled: I, closable: B } = j(n), e = k(), g = h("tabs"), t = K($, {}), H = y(), u = d(() => e == null ? void 0 : e.vnode.key), l = d(() => {
46
46
  var o;
47
- return i.value === ((o = t.activeKey) == null ? void 0 : o.value);
48
- }), a = m((s = t.lazyLoad) != null && s.value ? l.value : !0), u = j({
49
- key: i,
50
- title: v,
51
- disabled: p,
52
- closable: y,
53
- slots: n
47
+ return u.value === ((o = t.activeKey) == null ? void 0 : o.value);
48
+ }), a = y((m = t.lazyLoad) != null && m.value ? l.value : !0), i = e == null ? void 0 : e.uid, r = d(() => `x-tabs-tab-${i}`), f = d(() => `x-tabs-panel-${i}`), c = N({
49
+ key: u,
50
+ title: b,
51
+ disabled: I,
52
+ closable: B,
53
+ slots: s,
54
+ tabId: r,
55
+ panelId: f
54
56
  });
55
- return e != null && e.uid && ((r = t.addItem) == null || r.call(t, e.uid, u)), k(() => {
57
+ return e != null && e.uid && ((p = t.addItem) == null || p.call(t, e.uid, c)), R(() => {
56
58
  var o;
57
59
  e != null && e.uid && ((o = t.removeItem) == null || o.call(t, e.uid));
58
- }), K(l, (o) => {
59
- var f;
60
- o ? a.value || (a.value = !0) : (d.destroyOnHide || (f = t.destroyOnHide) != null && f.value) && (a.value = !1);
61
- }), N(() => {
62
- u.slots = { ...n };
60
+ }), U(l, (o) => {
61
+ var v;
62
+ o ? a.value || (a.value = !0) : (n.destroyOnHide || (v = t.destroyOnHide) != null && v.value) && (a.value = !1);
63
+ }), _(() => {
64
+ c.slots = { ...s };
63
65
  }), {
64
- className: b,
66
+ className: g,
65
67
  active: l,
66
- itemRef: B,
67
- mounted: a
68
+ itemRef: H,
69
+ mounted: a,
70
+ tabId: r,
71
+ panelId: f
68
72
  };
69
73
  }
70
74
  });
71
75
  export {
72
- z as default
76
+ L as default
73
77
  };
@@ -2,8 +2,8 @@ import { defineComponent as d, computed as u, createVNode as n, isVNode as f } f
2
2
  import m from "../_components/icon-hover/index.vue.js";
3
3
  import s from "../../icons/_self/left.js";
4
4
  import b from "../../icons/_self/right.js";
5
- import y from "../../icons/_self/up.js";
6
- import v from "../../icons/_self/down.js";
5
+ import y from "../../icons/default/up.js";
6
+ import v from "../../icons/default/down.js";
7
7
  import { getClassNameMixin as x } from "../../_utils/config.js";
8
8
  import { useLocale as h } from "../../locale/index.js";
9
9
  function g(t) {
@@ -1,10 +1,10 @@
1
- import { defineComponent as ae, toRefs as le, ref as y, computed as h, watch as I, nextTick as N, onMounted as ie, createVNode as r } from "vue";
1
+ import { defineComponent as ae, toRefs as le, ref as b, computed as h, watch as H, nextTick as I, onMounted as ie, createVNode as r } from "vue";
2
2
  import { getTabListStyle as ne, updateScrollOffset as oe } from "./utils.js";
3
3
  import re from "./tabs-tab.vue.js";
4
4
  import W from "./tabs-button.js";
5
5
  import ue from "./tabs-nav-ink.vue.js";
6
6
  import se from "../_components/icon-hover/index.vue.js";
7
- import de from "../../icons/_self/plus.js";
7
+ import de from "../../icons/default/plus.js";
8
8
  import O from "../../_container/resize-observer.js";
9
9
  import { isUndefined as P, isNumber as fe } from "../../_utils/is.js";
10
10
  import { getClassNameMixin as ce } from "../../_utils/config.js";
@@ -56,7 +56,9 @@ const Re = /* @__PURE__ */ ae({
56
56
  default: !0
57
57
  },
58
58
  scrollPosition: {
59
- type: String,
59
+ /* ScrollPosition 含 number(滚动到指定像素),只声明 String 会让
60
+ `:scroll-position="200"` 触发 prop 类型校验告警 */
61
+ type: [String, Number],
60
62
  default: "auto"
61
63
  }
62
64
  },
@@ -73,10 +75,10 @@ const Re = /* @__PURE__ */ ae({
73
75
  scrollPosition: s
74
76
  } = le(a), u = ce("tabs--nav"), {
75
77
  t: q
76
- } = ve(), n = y(), m = y(), g = y({}), b = h(() => {
78
+ } = ve(), n = b(), m = b(), g = b({}), y = h(() => {
77
79
  if (!P(S.value))
78
80
  return g.value[S.value];
79
- }), C = y(), L = h(() => a.editable && ["line", "card", "card-gutter"].includes(a.type)), d = y(!1), B = y(0), k = y(0), o = y(0), M = () => {
81
+ }), C = b(), L = h(() => a.editable && ["line", "card", "card-gutter"].includes(a.type)), d = b(!1), B = b(0), k = b(0), o = b(0), M = () => {
80
82
  var e, t;
81
83
  return (T.value === "vertical" ? (e = n.value) == null ? void 0 : e.offsetHeight : (t = n.value) == null ? void 0 : t.offsetWidth) ?? 0;
82
84
  }, D = () => !m.value || !n.value ? 0 : T.value === "vertical" ? m.value.offsetHeight - n.value.offsetHeight : m.value.offsetWidth - n.value.offsetWidth, w = () => {
@@ -84,9 +86,9 @@ const Re = /* @__PURE__ */ ae({
84
86
  }, K = () => n.value && m.value ? a.direction === "vertical" ? m.value.offsetHeight > n.value.offsetHeight : m.value.offsetWidth > n.value.offsetWidth : !1, f = (e) => {
85
87
  (!n.value || !m.value || e < 0) && (e = 0), o.value = Math.min(e, k.value);
86
88
  }, E = () => {
87
- if (!b.value || !n.value || !d.value) return;
89
+ if (!y.value || !n.value || !d.value) return;
88
90
  oe(n.value, T.value);
89
- const e = T.value === "horizontal", t = e ? "offsetLeft" : "offsetTop", c = e ? "offsetWidth" : "offsetHeight", l = b.value[t], i = b.value[c], v = n.value[c], ee = window.getComputedStyle(b.value), te = e ? s.value === "end" ? "marginRight" : "marginLeft" : s.value === "end" ? "marginBottom" : "marginTop", x = parseFloat(ee[te]) || 0;
91
+ const e = T.value === "horizontal", t = e ? "offsetLeft" : "offsetTop", c = e ? "offsetWidth" : "offsetHeight", l = y.value[t], i = y.value[c], v = n.value[c], ee = window.getComputedStyle(y.value), te = e ? s.value === "end" ? "marginRight" : "marginLeft" : s.value === "end" ? "marginBottom" : "marginTop", x = parseFloat(ee[te]) || 0;
90
92
  s.value === "auto" ? l < o.value ? f(l - x) : l + i > o.value + v && f(l + i - v + x) : s.value === "center" ? f(l + (i - v + x) / 2) : s.value === "start" ? f(l - x) : s.value === "end" ? f(l + i - v + x) : fe(s.value) && f(l - s.value);
91
93
  }, U = (e) => {
92
94
  if (!d.value) return;
@@ -99,7 +101,7 @@ const Re = /* @__PURE__ */ ae({
99
101
  }, j = (e, t) => {
100
102
  z("click", e, t);
101
103
  }, F = () => a.tabs.filter((e) => !e.disabled), V = (e) => {
102
- N(() => {
104
+ I(() => {
103
105
  var t;
104
106
  (t = g.value[e]) == null || t.focus();
105
107
  });
@@ -115,27 +117,27 @@ const Re = /* @__PURE__ */ ae({
115
117
  }
116
118
  }, Y = (e, t) => {
117
119
  z("delete", e, t);
118
- }, A = (e) => {
120
+ }, N = (e) => {
119
121
  const t = e === "previous" ? o.value - B.value : o.value + B.value;
120
122
  f(t);
121
123
  }, G = () => {
122
124
  w(), C.value && C.value.$forceUpdate();
123
125
  };
124
- I($, () => {
125
- N(() => {
126
+ H($, () => {
127
+ I(() => {
126
128
  const e = new Set(a.tabs.map((t) => String(t.key)));
127
129
  Object.keys(g.value).forEach((t) => {
128
130
  e.has(t) || delete g.value[t];
129
131
  }), w();
130
132
  });
131
- }), I([p, s], () => {
133
+ }), H([p, s], () => {
132
134
  setTimeout(() => {
133
135
  E();
134
136
  }, 0);
135
137
  }), ie(() => {
136
138
  w();
137
139
  });
138
- const H = () => !L.value || !a.showAddButton ? null : r(se, {
140
+ const A = () => !L.value || !a.showAddButton ? null : r(se, {
139
141
  as: "button",
140
142
  "aria-label": q("tabs.add"),
141
143
  class: u.element("add-btn"),
@@ -162,7 +164,7 @@ const Re = /* @__PURE__ */ ae({
162
164
  type: "previous",
163
165
  direction: a.direction,
164
166
  disabled: o.value <= 0,
165
- onClick: A
167
+ onClick: N
166
168
  }, null), r(O, {
167
169
  onResize: () => w()
168
170
  }, {
@@ -192,22 +194,22 @@ const Re = /* @__PURE__ */ ae({
192
194
  var l, i;
193
195
  return [((i = (l = t.slots).title) == null ? void 0 : i.call(l)) ?? t.title];
194
196
  }
195
- })), a.type === "line" && b.value && r(ue, {
197
+ })), a.type === "line" && y.value && r(ue, {
196
198
  ref: C,
197
- activeTabRef: b.value,
199
+ activeTabRef: y.value,
198
200
  direction: a.direction,
199
201
  disabled: !1,
200
202
  animation: a.animation
201
203
  }, null)])]
202
- }), !d.value && H()])]
204
+ }), !d.value && A()])]
203
205
  }), d.value && r(W, {
204
206
  type: "next",
205
207
  direction: a.direction,
206
208
  disabled: o.value >= k.value,
207
- onClick: A
209
+ onClick: N
208
210
  }, null), r("div", {
209
211
  class: u.element("extra")
210
- }, [d.value && H(), (e = R.extra) == null ? void 0 : e.call(R)])]);
212
+ }, [d.value && A(), (e = R.extra) == null ? void 0 : e.call(R)])]);
211
213
  };
212
214
  }
213
215
  });
@@ -1,14 +1,16 @@
1
- import n from "./tabs-tab.vue2.js";
2
- import { resolveComponent as a, openBlock as o, createElementBlock as i, mergeProps as r, createElementVNode as d, normalizeClass as t, renderSlot as c, createBlock as b, withModifiers as m, withCtx as p, createVNode as f, createCommentVNode as u } from "vue";
1
+ import i from "./tabs-tab.vue2.js";
2
+ import { resolveComponent as a, openBlock as o, createElementBlock as n, mergeProps as r, createElementVNode as d, normalizeClass as t, renderSlot as c, createBlock as b, withModifiers as m, withCtx as p, createVNode as f, createCommentVNode as u } from "vue";
3
3
  import v from "../../_virtual/_plugin-vue_export-helper.js";
4
- const h = ["tabindex", "aria-selected", "aria-disabled"];
4
+ const h = ["id", "tabindex", "aria-selected", "aria-disabled", "aria-controls"];
5
5
  function k(e, C, N, $, B, V) {
6
- const s = a("icon-close"), l = a("icon-hover");
7
- return o(), i("div", r({
6
+ const l = a("icon-close"), s = a("icon-hover");
7
+ return o(), n("div", r({
8
8
  role: "tab",
9
+ id: e.tab.tabId,
9
10
  tabindex: e.active && !e.tab.disabled ? 0 : -1,
10
11
  "aria-selected": e.active,
11
12
  "aria-disabled": e.tab.disabled || void 0,
13
+ "aria-controls": e.tab.panelId,
12
14
  class: e.cls
13
15
  }, e.eventHandlers), [
14
16
  d("span", {
@@ -16,7 +18,7 @@ function k(e, C, N, $, B, V) {
16
18
  }, [
17
19
  c(e.$slots, "default")
18
20
  ], 2),
19
- e.editable && e.tab.closable ? (o(), b(l, {
21
+ e.editable && e.tab.closable ? (o(), b(s, {
20
22
  key: 0,
21
23
  as: "button",
22
24
  "aria-label": e.t("tabs.close", { title: String(e.tab.title ?? e.tab.key) }),
@@ -24,13 +26,13 @@ function k(e, C, N, $, B, V) {
24
26
  onClick: m(e.handleDelete, ["stop"])
25
27
  }, {
26
28
  default: p(() => [
27
- f(s)
29
+ f(l)
28
30
  ]),
29
31
  _: 1
30
32
  }, 8, ["aria-label", "class", "onClick"])) : u("", !0)
31
33
  ], 16, h);
32
34
  }
33
- const E = /* @__PURE__ */ v(n, [["render", k]]);
35
+ const E = /* @__PURE__ */ v(i, [["render", k]]);
34
36
  export {
35
37
  E as default
36
38
  };
@@ -1,48 +1,48 @@
1
1
  import k from "./Tag.vue2.js";
2
- import { resolveComponent as t, openBlock as o, createElementBlock as l, normalizeStyle as f, normalizeClass as s, renderSlot as n, createCommentVNode as a, createBlock as u, withModifiers as C, withCtx as g, createVNode as r } from "vue";
2
+ import { resolveComponent as t, openBlock as o, createElementBlock as s, normalizeStyle as f, normalizeClass as l, renderSlot as a, createCommentVNode as n, createBlock as u, withModifiers as C, withCtx as g, createVNode as r } from "vue";
3
3
  import y from "../../_virtual/_plugin-vue_export-helper.js";
4
- function $(e, i, h, N, b, v) {
4
+ function $(e, i, b, h, N, v) {
5
5
  const m = t("close"), c = t("icon-hover"), p = t("animation-loading");
6
- return e.computedVisible ? (o(), l("span", {
6
+ return e.computedVisible ? (o(), s("span", {
7
7
  key: 0,
8
- class: s(e.cls),
8
+ class: l(e.cls),
9
9
  style: f(e.style),
10
10
  onClick: i[0] || (i[0] = (...d) => e.handleClick && e.handleClick(...d))
11
11
  }, [
12
- e.$slots.icon ? (o(), l("span", {
12
+ e.$slots.icon ? (o(), s("span", {
13
13
  key: 0,
14
- class: s(e.className.element("icon"))
14
+ class: l(e.className.element("icon"))
15
15
  }, [
16
- n(e.$slots, "icon")
17
- ], 2)) : a("", !0),
18
- e.nowrap ? (o(), l("span", {
16
+ a(e.$slots, "icon")
17
+ ], 2)) : n("", !0),
18
+ e.nowrap ? (o(), s("span", {
19
19
  key: 1,
20
- class: s(e.className.element("text"))
20
+ class: l(e.className.element("text"))
21
21
  }, [
22
- n(e.$slots, "default")
23
- ], 2)) : n(e.$slots, "default", { key: 2 }),
22
+ a(e.$slots, "default")
23
+ ], 2)) : a(e.$slots, "default", { key: 2 }),
24
24
  e.closable ? (o(), u(c, {
25
25
  key: 3,
26
26
  as: "button",
27
- "aria-label": e.t("common.closeTarget", { target: e.t("common.tag") }),
27
+ "aria-label": e.closeAriaLabel ?? e.t("common.closeTarget", { target: e.t("common.tag") }),
28
28
  prefix: "tag",
29
- class: s(e.className.element("close-icon")),
29
+ class: l(e.className.element("close-icon")),
30
30
  onClick: C(e.handleClose, ["stop"])
31
31
  }, {
32
32
  default: g(() => [
33
- n(e.$slots, "close-icon", {}, () => [
33
+ a(e.$slots, "close-icon", {}, () => [
34
34
  r(m)
35
35
  ])
36
36
  ]),
37
37
  _: 3
38
- }, 8, ["aria-label", "class", "onClick"])) : a("", !0),
39
- e.loading ? (o(), l("span", {
38
+ }, 8, ["aria-label", "class", "onClick"])) : n("", !0),
39
+ e.loading ? (o(), s("span", {
40
40
  key: 4,
41
- class: s(e.className.element("loading-icon"))
41
+ class: l(e.className.element("loading-icon"))
42
42
  }, [
43
43
  r(p)
44
- ], 2)) : a("", !0)
45
- ], 6)) : a("", !0);
44
+ ], 2)) : n("", !0)
45
+ ], 6)) : n("", !0);
46
46
  }
47
47
  const z = /* @__PURE__ */ y(k, [["render", $]]);
48
48
  export {