x-next 1.4.0 → 1.6.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 (144) hide show
  1. package/AI_USAGE.md +2 -2
  2. package/CHANGELOG.md +71 -0
  3. package/dist/_utils/color.d.ts +53 -0
  4. package/dist/components/color-picker/ColorPicker.d.ts +239 -0
  5. package/dist/components/color-picker/gradient-slider.d.ts +52 -0
  6. package/dist/components/color-picker/index.d.ts +238 -0
  7. package/dist/components/color-picker/panel.d.ts +721 -0
  8. package/dist/components/color-picker/sv-panel.d.ts +48 -0
  9. package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
  10. package/dist/components/date-picker/index.d.ts +6 -6
  11. package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
  12. package/dist/components/dropdown/DropdownButton.vue.d.ts +37 -6
  13. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
  14. package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
  15. package/dist/components/dropdown/index.d.ts +212 -29
  16. package/dist/components/form/FormItem.vue.d.ts +3 -3
  17. package/dist/components/form/form-item-label.vue.d.ts +3 -3
  18. package/dist/components/form/index.d.ts +6 -6
  19. package/dist/components/form-select/Select.d.ts +3 -3
  20. package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
  21. package/dist/components/form-select/index.d.ts +66 -6
  22. package/dist/components/form-slider/Slider.vue.d.ts +3 -3
  23. package/dist/components/form-slider/index.d.ts +6 -6
  24. package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
  25. package/dist/components/heatmap/Heatmap.d.ts +311 -0
  26. package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
  27. package/dist/components/heatmap/index.d.ts +372 -0
  28. package/dist/components/heatmap/interface.d.ts +57 -0
  29. package/dist/components/image/Image.vue.d.ts +3 -3
  30. package/dist/components/image/ImagePreview.vue.d.ts +3 -3
  31. package/dist/components/image/ImagePreviewAction.d.ts +3 -3
  32. package/dist/components/image/ImagePreviewGroup.vue.d.ts +3 -3
  33. package/dist/components/image/index.d.ts +24 -24
  34. package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
  35. package/dist/components/index.d.ts +2 -0
  36. package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
  37. package/dist/components/network/Network.vue.d.ts +1 -1
  38. package/dist/components/network/index.d.ts +3 -3
  39. package/dist/components/network/utils.d.ts +2 -0
  40. package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
  41. package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
  42. package/dist/components/pagination/page-options.vue.d.ts +6 -6
  43. package/dist/components/popover/Popover.d.ts +1 -1
  44. package/dist/components/popover/index.d.ts +3 -3
  45. package/dist/components/popup/Popup.d.ts +1 -1
  46. package/dist/components/popup/index.d.ts +3 -3
  47. package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
  48. package/dist/components/skeleton/index.d.ts +6 -6
  49. package/dist/components/spin/Spin.d.ts +38 -0
  50. package/dist/components/spin/index.d.ts +30 -0
  51. package/dist/components/steps/context.d.ts +9 -0
  52. package/dist/components/table/Table.d.ts +1 -1
  53. package/dist/components/table/index.d.ts +3 -3
  54. package/dist/components/tabs/TabPane.vue.d.ts +2 -0
  55. package/dist/components/tabs/Tabs.d.ts +1 -1
  56. package/dist/components/tabs/index.d.ts +9 -3
  57. package/dist/components/tabs/interface.d.ts +4 -0
  58. package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
  59. package/dist/components/time-picker/index.d.ts +6 -6
  60. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  61. package/dist/components/tooltip/index.d.ts +3 -3
  62. package/dist/components/trigger/Trigger.d.ts +1 -1
  63. package/dist/components/trigger/index.d.ts +3 -3
  64. package/dist/components/watermark/Watermark.d.ts +1 -1
  65. package/dist/components/watermark/index.d.ts +3 -3
  66. package/dist/es/_styles/palette-aliases.js +8 -0
  67. package/dist/es/_utils/color.js +73 -0
  68. package/dist/es/components/button/Button.js +2 -2
  69. package/dist/es/components/color-picker/ColorPicker.js +239 -0
  70. package/dist/es/components/color-picker/gradient-slider.js +79 -0
  71. package/dist/es/components/color-picker/index.js +8 -0
  72. package/dist/es/components/color-picker/panel.js +307 -0
  73. package/dist/es/components/color-picker/sv-panel.js +99 -0
  74. package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
  75. package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
  76. package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
  77. package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
  78. package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
  79. package/dist/es/components/form-input/Input.js +7 -7
  80. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  81. package/dist/es/components/form-input/InputSearch.js +2 -2
  82. package/dist/es/components/form-input-number/InputNumber.js +12 -12
  83. package/dist/es/components/heatmap/Heatmap.js +334 -0
  84. package/dist/es/components/heatmap/helpers/matrix.js +106 -0
  85. package/dist/es/components/heatmap/index.js +8 -0
  86. package/dist/es/components/index.js +118 -114
  87. package/dist/es/components/menu/MenuSubMenu.js +50 -36
  88. package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
  89. package/dist/es/components/network/Network.vue2.js +72 -72
  90. package/dist/es/components/network/utils.js +44 -35
  91. package/dist/es/components/pagination/Pagination.js +124 -112
  92. package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
  93. package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
  94. package/dist/es/components/pagination/page-jumper.vue.js +13 -12
  95. package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
  96. package/dist/es/components/pagination/page-options.vue.js +4 -3
  97. package/dist/es/components/pagination/page-options.vue2.js +17 -15
  98. package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
  99. package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
  100. package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
  101. package/dist/es/components/spin/Spin.js +124 -60
  102. package/dist/es/components/steps/Step.vue2.js +51 -47
  103. package/dist/es/components/steps/Steps.vue2.js +22 -19
  104. package/dist/es/components/table/Table.js +3 -1
  105. package/dist/es/components/tabs/TabPane.vue.js +11 -9
  106. package/dist/es/components/tabs/TabPane.vue2.js +28 -24
  107. package/dist/es/components/tabs/tabs-nav.js +20 -18
  108. package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
  109. package/dist/es/components/trigger/Trigger.js +19 -19
  110. package/dist/es/icons/_self/empty-better.js +25 -8
  111. package/dist/es/index.js +162 -158
  112. package/dist/es/locale/en-US.js +19 -2
  113. package/dist/es/locale/zh-CN.js +19 -2
  114. package/dist/es/style.css +1 -1
  115. package/dist/index.cjs +4 -4
  116. package/dist/index.umd.js +4 -4
  117. package/dist/locale/interface.d.ts +30 -0
  118. package/dist/style/base.css +1 -1
  119. package/dist/style/button.css +1 -1
  120. package/dist/style/color-picker.css +1 -0
  121. package/dist/style/color-picker.js +2 -0
  122. package/dist/style/date-picker.css +1 -1
  123. package/dist/style/dropdown.css +1 -1
  124. package/dist/style/empty.css +1 -1
  125. package/dist/style/form-checkbox.css +1 -1
  126. package/dist/style/form-input-tag.css +1 -1
  127. package/dist/style/form-input.css +1 -1
  128. package/dist/style/form-radio.css +1 -1
  129. package/dist/style/form-textarea.css +1 -1
  130. package/dist/style/form.css +1 -1
  131. package/dist/style/heatmap.css +1 -0
  132. package/dist/style/heatmap.js +2 -0
  133. package/dist/style/image.css +1 -1
  134. package/dist/style/menu.css +1 -1
  135. package/dist/style/pagination.css +1 -1
  136. package/dist/style/skeleton.css +1 -1
  137. package/dist/style/spin.css +1 -1
  138. package/dist/style/steps.css +1 -1
  139. package/dist/style/table.css +1 -1
  140. package/dist/style/tabs.css +1 -1
  141. package/dist/style.css +1 -1
  142. package/dist/types.d.ts +2 -0
  143. package/package.json +3 -2
  144. package/volar.d.ts +2 -0
@@ -1,18 +1,19 @@
1
1
  import t from "./SkeletonLine.vue2.js";
2
- import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as m, normalizeStyle as c } from "vue";
3
- import i from "../../_virtual/_plugin-vue_export-helper.js";
4
- function p(e, u, f, _, d, k) {
2
+ import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as i, normalizeStyle as m } from "vue";
3
+ import c from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function p(e, u, f, d, _, k) {
5
5
  return r(), l("ul", {
6
- class: n(e.className.block)
6
+ class: n(e.className.block),
7
+ "aria-hidden": "true"
7
8
  }, [
8
- (r(!0), l(a, null, m(e.lines, (o, s) => (r(), l("li", {
9
+ (r(!0), l(a, null, i(e.lines, (o, s) => (r(), l("li", {
9
10
  key: s,
10
11
  class: n(e.className.element("row")),
11
- style: c(o)
12
+ style: m(o)
12
13
  }, null, 6))), 128))
13
14
  ], 2);
14
15
  }
15
- const B = /* @__PURE__ */ i(t, [["render", p]]);
16
+ const z = /* @__PURE__ */ c(t, [["render", p]]);
16
17
  export {
17
- B as default
18
+ z as default
18
19
  };
@@ -1,12 +1,13 @@
1
- import o from "./SkeletonShape.vue2.js";
2
- import { openBlock as r, createElementBlock as t, normalizeClass as n } from "vue";
3
- import s from "../../_virtual/_plugin-vue_export-helper.js";
4
- function c(e, a, l, p, m, f) {
5
- return r(), t("div", {
6
- class: n(e.cls)
1
+ import r from "./SkeletonShape.vue2.js";
2
+ import { openBlock as o, createElementBlock as t, normalizeClass as n } from "vue";
3
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function s(e, c, l, p, i, m) {
5
+ return o(), t("div", {
6
+ class: n(e.cls),
7
+ "aria-hidden": "true"
7
8
  }, null, 2);
8
9
  }
9
- const u = /* @__PURE__ */ s(o, [["render", c]]);
10
+ const u = /* @__PURE__ */ a(r, [["render", s]]);
10
11
  export {
11
12
  u as default
12
13
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as p, computed as B, createVNode as t, mergeProps as S, Fragment as c, cloneVNode as N } from "vue";
2
- import L from "../../icons/animation/animation-loading.js";
3
- import k from "./dot-loading.js";
4
- import { getFirstComponent as C } from "../../_utils/vue-eco.js";
5
- import { getClassNameMixin as I } from "../../_utils/config.js";
6
- import { useLocale as x } from "../../locale/index.js";
7
- const M = /* @__PURE__ */ p({
1
+ import { defineComponent as D, computed as s, ref as S, watch as x, onUnmounted as B, onMounted as R, onUpdated as U, createVNode as r, mergeProps as V, Fragment as A, cloneVNode as H } from "vue";
2
+ import O from "../../icons/animation/animation-loading.js";
3
+ import _ from "./dot-loading.js";
4
+ import { getFirstComponent as q } from "../../_utils/vue-eco.js";
5
+ import { getClassNameMixin as P } from "../../_utils/config.js";
6
+ import { useLocale as $ } from "../../locale/index.js";
7
+ const j = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])', Y = /* @__PURE__ */ D({
8
8
  name: "Spin",
9
9
  inheritAttrs: !1,
10
10
  props: {
@@ -28,6 +28,16 @@ const M = /* @__PURE__ */ p({
28
28
  * @en Whether it is loading state (Only effective in container mode)
29
29
  */
30
30
  loading: Boolean,
31
+ /**
32
+ * @zh 延迟显示加载态的时间,单位毫秒。用于避免「请求很快就结束」时闪一下加载态;
33
+ * 加载结束时立即收起,不会拖住已经加载好的内容(这一点与 AntDV 的双向延迟不同)
34
+ * @en Delay in milliseconds before showing the loading state. Prevents a flash of
35
+ * loading for fast requests; hiding is immediate (unlike AntDV's symmetric delay)
36
+ */
37
+ delay: {
38
+ type: Number,
39
+ default: 0
40
+ },
31
41
  /**
32
42
  * @zh 是否使用点类型的动画
33
43
  * @en Whether to use dot type animation
@@ -47,6 +57,14 @@ const M = /* @__PURE__ */ p({
47
57
  hideIcon: {
48
58
  type: Boolean,
49
59
  default: !1
60
+ },
61
+ /**
62
+ * @zh 提示文字是否开启扫光效果(需要同时设置 tip)
63
+ * @en Whether the tip text uses a shimmer sweep (requires tip)
64
+ */
65
+ tipShimmer: {
66
+ type: Boolean,
67
+ default: !1
50
68
  }
51
69
  },
52
70
  /**
@@ -65,71 +83,117 @@ const M = /* @__PURE__ */ p({
65
83
  * @slot tip
66
84
  */
67
85
  setup(e, {
68
- attrs: u,
69
- slots: i
86
+ attrs: T,
87
+ slots: n
70
88
  }) {
71
- const n = I("spin"), {
72
- t: m
73
- } = x(), f = B(() => [n.block, e.display === "inline" ? n.modifier("inline") : n.modifier("block"), {
74
- [n.modifier("loading")]: e.loading,
75
- [n.modifier("with-tip")]: e.tip && !i.default
76
- }]), s = () => {
77
- if (i.icon) {
78
- const a = C(i.icon());
79
- if (a)
80
- return N(a, {
89
+ const a = P("spin"), {
90
+ t: k
91
+ } = $(), o = s(() => !!n.default), u = S(!1);
92
+ let c;
93
+ const v = () => {
94
+ c !== void 0 && (clearTimeout(c), c = void 0);
95
+ };
96
+ x(() => [e.loading, e.delay, o.value], ([t, i, d]) => {
97
+ if (v(), !d) {
98
+ u.value = !0;
99
+ return;
100
+ }
101
+ if (!t) {
102
+ u.value = !1;
103
+ return;
104
+ }
105
+ if (u.value || !i || !Number.isFinite(i) || i <= 0) {
106
+ u.value = !0;
107
+ return;
108
+ }
109
+ c = setTimeout(() => {
110
+ u.value = !0, c = void 0;
111
+ }, i);
112
+ }, {
113
+ immediate: !0
114
+ }), B(v);
115
+ const l = s(() => e.loading && u.value), z = s(() => [a.block, e.display === "inline" ? a.modifier("inline") : a.modifier("block"), {
116
+ [a.modifier("loading")]: l.value,
117
+ [a.modifier("with-tip")]: e.tip && !n.default,
118
+ /*
119
+ * 扫光只作用于提示文字。tip 是 prop 时 with-tip 才成立;
120
+ * 自定义 tip 插槽的内容结构未知,不加扫光,避免破坏使用方自己的样式。
121
+ */
122
+ [a.modifier("tip-shimmer")]: e.tipShimmer && !!e.tip
123
+ }]), C = () => {
124
+ if (n.icon) {
125
+ const t = q(n.icon());
126
+ if (t)
127
+ return H(t, {
81
128
  spin: !0
82
129
  });
83
130
  }
84
- return i.element ? i.element() : e.dot ? t(k, {
131
+ return n.element ? n.element() : e.dot ? r(_, {
85
132
  size: e.size,
86
133
  type: e.dot === "color" ? "color" : "default"
87
- }, null) : t(L, {
88
- spin: !0,
134
+ }, null) : r(O, {
89
135
  size: e.size
90
136
  }, null);
91
- }, o = () => {
92
- var l;
93
- const a = e.size ? {
137
+ }, p = () => {
138
+ var d;
139
+ const t = e.size ? {
94
140
  fontSize: `${e.size}px`
95
- } : void 0, d = !!(i.tip ?? e.tip);
96
- return t(c, null, [!e.hideIcon && t("div", {
97
- class: n.element("icon"),
98
- style: a
99
- }, [s()]), d && t("div", {
100
- class: n.element("tip")
101
- }, [((l = i.tip) == null ? void 0 : l.call(i)) ?? e.tip])]);
141
+ } : void 0, i = !!(n.tip ?? e.tip);
142
+ return r(A, null, [!e.hideIcon && r("div", {
143
+ class: a.element("icon"),
144
+ style: t
145
+ }, [C()]), i && r("div", {
146
+ class: a.element("tip")
147
+ }, [((d = n.tip) == null ? void 0 : d.call(n)) ?? e.tip])]);
148
+ }, m = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, y = S(), f = /* @__PURE__ */ new Map(), b = () => {
149
+ const t = y.value;
150
+ t && t.querySelectorAll(j).forEach((i) => {
151
+ f.has(i) || (f.set(i, i.getAttribute("tabindex")), i.setAttribute("tabindex", "-1"));
152
+ });
153
+ }, h = () => {
154
+ f.forEach((t, i) => {
155
+ t === null ? i.removeAttribute("tabindex") : i.setAttribute("tabindex", t);
156
+ }), f.clear();
157
+ }, g = (t) => {
158
+ m || (t ? b() : h());
102
159
  };
103
- return () => {
104
- var r;
105
- const a = !!i.default, {
106
- class: d,
107
- style: l,
108
- role: g,
109
- "aria-live": y,
110
- "aria-busy": v,
111
- "aria-label": h,
112
- ...b
113
- } = u, z = !!(i.tip ?? e.tip);
114
- return t("div", S(b, {
115
- class: [f.value, d],
116
- style: l,
117
- role: g ?? (a ? void 0 : "status"),
118
- "aria-live": y ?? (a && !e.loading ? void 0 : "polite"),
119
- "aria-busy": v ?? (a ? e.loading : !0),
120
- "aria-label": h ?? (z ? void 0 : m("common.loading"))
121
- }), [a ? t(c, null, [t("div", {
122
- class: n.element("children"),
123
- "aria-hidden": e.loading ? "true" : void 0,
124
- inert: e.loading ? "" : void 0
125
- }, [(r = i.default) == null ? void 0 : r.call(i)]), e.loading && t("div", {
126
- class: n.element("mask")
127
- }, [t("div", {
128
- class: n.element("mask--icon")
129
- }, [o()])])]) : o()]);
160
+ return x(l, g, {
161
+ flush: "post"
162
+ }), R(() => g(l.value)), U(() => {
163
+ !m && l.value && b();
164
+ }), B(() => {
165
+ m || h();
166
+ }), () => {
167
+ var L;
168
+ const {
169
+ class: t,
170
+ style: i,
171
+ role: d,
172
+ "aria-live": E,
173
+ "aria-busy": N,
174
+ "aria-label": F,
175
+ ...I
176
+ } = T, M = !!(n.tip ?? e.tip), w = o.value ? l.value : !0;
177
+ return r("div", V(I, {
178
+ class: [z.value, t],
179
+ style: i,
180
+ role: d ?? (o.value ? void 0 : "status"),
181
+ "aria-live": E ?? (o.value && !l.value ? void 0 : "polite"),
182
+ "aria-busy": N ?? (o.value ? l.value : !0),
183
+ "aria-label": F ?? (w && !M ? k("common.loading") : void 0)
184
+ }), [o.value ? r(A, null, [r("div", {
185
+ ref: y,
186
+ class: a.element("children"),
187
+ "aria-hidden": l.value ? "true" : void 0,
188
+ inert: l.value ? "" : void 0
189
+ }, [(L = n.default) == null ? void 0 : L.call(n)]), l.value && r("div", {
190
+ class: a.element("mask")
191
+ }, [r("div", {
192
+ class: a.element("mask--icon")
193
+ }, [p()])])]) : p()]);
130
194
  };
131
195
  }
132
196
  });
133
197
  export {
134
- M as default
198
+ Y as default
135
199
  };
@@ -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
  };
@@ -1033,7 +1033,9 @@ const bt = {
1033
1033
  }, {
1034
1034
  default: () => {
1035
1035
  var e;
1036
- return [((e = s.empty) == null ? void 0 : e.call(s)) ?? u(aa, null, null)];
1036
+ return [((e = s.empty) == null ? void 0 : e.call(s)) ?? u(aa, {
1037
+ component: "table"
1038
+ }, null)];
1037
1039
  }
1038
1040
  })]
1039
1041
  }), Al = (e) => {
@@ -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
  };