x-next 1.5.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 (128) hide show
  1. package/AI_USAGE.md +2 -2
  2. package/CHANGELOG.md +36 -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 +35 -5
  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 +209 -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/table/Table.d.ts +1 -1
  52. package/dist/components/table/index.d.ts +3 -3
  53. package/dist/components/tabs/Tabs.d.ts +1 -1
  54. package/dist/components/tabs/index.d.ts +3 -3
  55. package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
  56. package/dist/components/time-picker/index.d.ts +6 -6
  57. package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
  58. package/dist/components/tooltip/index.d.ts +3 -3
  59. package/dist/components/trigger/Trigger.d.ts +1 -1
  60. package/dist/components/trigger/index.d.ts +3 -3
  61. package/dist/components/watermark/Watermark.d.ts +1 -1
  62. package/dist/components/watermark/index.d.ts +3 -3
  63. package/dist/es/_styles/palette-aliases.js +8 -0
  64. package/dist/es/_utils/color.js +73 -0
  65. package/dist/es/components/button/Button.js +2 -2
  66. package/dist/es/components/color-picker/ColorPicker.js +239 -0
  67. package/dist/es/components/color-picker/gradient-slider.js +79 -0
  68. package/dist/es/components/color-picker/index.js +8 -0
  69. package/dist/es/components/color-picker/panel.js +307 -0
  70. package/dist/es/components/color-picker/sv-panel.js +99 -0
  71. package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
  72. package/dist/es/components/form-input/Input.js +7 -7
  73. package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
  74. package/dist/es/components/form-input/InputSearch.js +2 -2
  75. package/dist/es/components/form-input-number/InputNumber.js +12 -12
  76. package/dist/es/components/heatmap/Heatmap.js +334 -0
  77. package/dist/es/components/heatmap/helpers/matrix.js +106 -0
  78. package/dist/es/components/heatmap/index.js +8 -0
  79. package/dist/es/components/index.js +118 -114
  80. package/dist/es/components/menu/sub-menu-pop.vue2.js +12 -12
  81. package/dist/es/components/network/Network.vue2.js +72 -72
  82. package/dist/es/components/network/utils.js +44 -35
  83. package/dist/es/components/pagination/Pagination.js +113 -104
  84. package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
  85. package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
  86. package/dist/es/components/pagination/page-jumper.vue.js +13 -12
  87. package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
  88. package/dist/es/components/pagination/page-options.vue.js +4 -3
  89. package/dist/es/components/pagination/page-options.vue2.js +17 -15
  90. package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
  91. package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
  92. package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
  93. package/dist/es/components/spin/Spin.js +124 -60
  94. package/dist/es/components/table/Table.js +3 -1
  95. package/dist/es/components/trigger/Trigger.js +19 -19
  96. package/dist/es/icons/_self/empty-better.js +25 -8
  97. package/dist/es/index.js +162 -158
  98. package/dist/es/locale/en-US.js +17 -1
  99. package/dist/es/locale/zh-CN.js +17 -1
  100. package/dist/es/style.css +1 -1
  101. package/dist/index.cjs +4 -4
  102. package/dist/index.umd.js +4 -4
  103. package/dist/locale/interface.d.ts +28 -0
  104. package/dist/style/base.css +1 -1
  105. package/dist/style/button.css +1 -1
  106. package/dist/style/color-picker.css +1 -0
  107. package/dist/style/color-picker.js +2 -0
  108. package/dist/style/date-picker.css +1 -1
  109. package/dist/style/empty.css +1 -1
  110. package/dist/style/form-checkbox.css +1 -1
  111. package/dist/style/form-input-tag.css +1 -1
  112. package/dist/style/form-input.css +1 -1
  113. package/dist/style/form-radio.css +1 -1
  114. package/dist/style/form-textarea.css +1 -1
  115. package/dist/style/form.css +1 -1
  116. package/dist/style/heatmap.css +1 -0
  117. package/dist/style/heatmap.js +2 -0
  118. package/dist/style/image.css +1 -1
  119. package/dist/style/menu.css +1 -1
  120. package/dist/style/pagination.css +1 -1
  121. package/dist/style/skeleton.css +1 -1
  122. package/dist/style/spin.css +1 -1
  123. package/dist/style/steps.css +1 -1
  124. package/dist/style/table.css +1 -1
  125. package/dist/style.css +1 -1
  126. package/dist/types.d.ts +2 -0
  127. package/package.json +1 -1
  128. package/volar.d.ts +2 -0
@@ -1,7 +1,7 @@
1
- import i from "./page-jumper.vue2.js";
2
- import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as p, createTextVNode as f, toDisplayString as r, createCommentVNode as l, createVNode as g, Fragment as N, createElementVNode as m } from "vue";
3
- import V from "../../_virtual/_plugin-vue_export-helper.js";
4
- function $(e, o, b, c, C, h) {
1
+ import d from "./page-jumper.vue2.js";
2
+ import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as r, createTextVNode as g, toDisplayString as p, createCommentVNode as l, createVNode as f, Fragment as N, createElementVNode as m } from "vue";
3
+ import b from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function V(e, o, $, C, h, j) {
5
5
  const t = u("input-number");
6
6
  return s(), n("span", {
7
7
  class: a(e.cls)
@@ -10,13 +10,13 @@ function $(e, o, b, c, C, h) {
10
10
  key: 0,
11
11
  class: a([e.className.element("prepend"), e.className.modifier("text-goto")])
12
12
  }, [
13
- p(e.$slots, "jumper-prepend", {}, () => [
14
- f(r(e.t("pagination.jumpTo")), 1)
13
+ r(e.$slots, "jumper-prepend", {}, () => [
14
+ g(p(e.t("pagination.jumpTo")), 1)
15
15
  ])
16
16
  ], 2)),
17
- g(t, {
17
+ f(t, {
18
18
  modelValue: e.inputValue,
19
- "onUpdate:modelValue": o[0] || (o[0] = (d) => e.inputValue = d),
19
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => e.inputValue = i),
20
20
  class: a(e.className.element("input")),
21
21
  min: 1,
22
22
  max: e.pages,
@@ -24,13 +24,14 @@ function $(e, o, b, c, C, h) {
24
24
  disabled: e.disabled,
25
25
  "hide-button": "",
26
26
  formatter: e.handleFormatter,
27
+ "aria-label": e.ariaLabel || e.t("pagination.jumpTo"),
27
28
  onChange: e.handleChange
28
- }, null, 8, ["modelValue", "class", "max", "size", "disabled", "formatter", "onChange"]),
29
+ }, null, 8, ["modelValue", "class", "max", "size", "disabled", "formatter", "aria-label", "onChange"]),
29
30
  e.$slots["jumper-append"] ? (s(), n("span", {
30
31
  key: 1,
31
32
  class: a(e.className.element("append"))
32
33
  }, [
33
- p(e.$slots, "jumper-append")
34
+ r(e.$slots, "jumper-append")
34
35
  ], 2)) : l("", !0),
35
36
  e.simple ? (s(), n(N, { key: 2 }, [
36
37
  m("span", {
@@ -38,11 +39,11 @@ function $(e, o, b, c, C, h) {
38
39
  }, "/", 2),
39
40
  m("span", {
40
41
  class: a(e.className.element("total-page"))
41
- }, r(e.pages), 3)
42
+ }, p(e.pages), 3)
42
43
  ], 64)) : l("", !0)
43
44
  ], 2);
44
45
  }
45
- const z = /* @__PURE__ */ V(i, [["render", $]]);
46
+ const z = /* @__PURE__ */ b(d, [["render", V]]);
46
47
  export {
47
48
  z as default
48
49
  };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as l, ref as c, watch as p, computed as d, nextTick as f } from "vue";
2
2
  import { InputNumber as g } from "../form-input-number/index.js";
3
3
  import { getClassNameMixin as N } from "../../_utils/config.js";
4
- import { useLocale as h } from "../../locale/index.js";
5
- const x = l({
4
+ import { useLocale as b } from "../../locale/index.js";
5
+ const S = l({
6
6
  name: "PageJumper",
7
7
  components: {
8
8
  InputNumber: g
@@ -27,13 +27,16 @@ const x = l({
27
27
  size: {
28
28
  type: String
29
29
  },
30
+ ariaLabel: {
31
+ type: String
32
+ },
30
33
  onChange: {
31
34
  type: Function
32
35
  }
33
36
  },
34
37
  emits: ["change"],
35
38
  setup(e, { emit: i }) {
36
- const a = N("pagination--jumper"), { t: o } = h(), t = c(e.simple ? e.current : void 0), m = (n) => {
39
+ const a = N("pagination--jumper"), { t: o } = b(), t = c(e.simple ? e.current : void 0), m = (n) => {
37
40
  const r = parseInt(n.toString(), 10);
38
41
  return Number.isNaN(r) ? void 0 : String(r);
39
42
  }, s = (n) => {
@@ -64,5 +67,5 @@ const x = l({
64
67
  }
65
68
  });
66
69
  export {
67
- x as default
70
+ S as default
68
71
  };
@@ -6,12 +6,13 @@ function m(e, d, c, f, u, g) {
6
6
  return a(), l("span", {
7
7
  class: r(e.className.block)
8
8
  }, [
9
- p(o, t({
9
+ p(o, t(e.selectProps, {
10
10
  "model-value": e.pageSize,
11
11
  options: e.options,
12
12
  size: e.size,
13
- disabled: e.disabled
14
- }, e.selectProps, { onChange: e.handleChange }), null, 16, ["model-value", "options", "size", "disabled", "onChange"])
13
+ disabled: e.disabled,
14
+ onChange: e.handleChange
15
+ }), null, 16, ["model-value", "options", "size", "disabled", "onChange"])
15
16
  ], 2);
16
17
  }
17
18
  const b = /* @__PURE__ */ i(s, [["render", m]]);
@@ -1,11 +1,12 @@
1
- import { defineComponent as p, computed as a } from "vue";
2
- import { Select as r } from "../form-select/index.js";
3
- import { getClassNameMixin as m } from "../../_utils/config.js";
4
- import { useLocale as c } from "../../locale/index.js";
5
- const u = p({
1
+ import { defineComponent as r, computed as m } from "vue";
2
+ import { Select as c } from "../form-select/index.js";
3
+ import { getClassNameMixin as g } from "../../_utils/config.js";
4
+ import { useLocale as f } from "../../locale/index.js";
5
+ import { isNumber as u } from "../../_utils/is.js";
6
+ const y = r({
6
7
  name: "PageOptions",
7
8
  components: {
8
- Select: r
9
+ Select: c
9
10
  },
10
11
  props: {
11
12
  sizeOptions: {
@@ -25,16 +26,17 @@ const u = p({
25
26
  }
26
27
  },
27
28
  emits: ["change"],
28
- setup(t, { emit: n }) {
29
- const o = m("pagination--options"), { t: i } = c(), s = a(
30
- () => t.sizeOptions.map((e) => ({
31
- value: e,
32
- label: i("pagination.pageSizeOption", { size: e })
33
- }))
34
- );
29
+ setup(i, { emit: n }) {
30
+ const o = g("pagination--options"), { t: s } = f(), a = m(() => {
31
+ const e = i.sizeOptions.slice();
32
+ return u(i.pageSize) && i.pageSize > 0 && !e.includes(i.pageSize) && (e.push(i.pageSize), e.sort((t, p) => t - p)), e.map((t) => ({
33
+ value: t,
34
+ label: s("pagination.pageSizeOption", { size: t })
35
+ }));
36
+ });
35
37
  return {
36
38
  className: o,
37
- options: s,
39
+ options: a,
38
40
  handleChange: (e) => {
39
41
  typeof e == "number" && Number.isFinite(e) && e > 0 && n("change", e);
40
42
  }
@@ -42,5 +44,5 @@ const u = p({
42
44
  }
43
45
  });
44
46
  export {
45
- u as default
47
+ y as default
46
48
  };
@@ -1,14 +1,16 @@
1
1
  import r from "./Skeleton.vue2.js";
2
- import { openBlock as t, createElementBlock as s, normalizeClass as n, renderSlot as o } from "vue";
3
- import l from "../../_virtual/_plugin-vue_export-helper.js";
4
- function a(e, c, p, f, i, m) {
5
- return t(), s("div", {
6
- class: n(e.cls)
2
+ import { openBlock as s, createElementBlock as t, normalizeClass as n, renderSlot as e } from "vue";
3
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const l = ["aria-busy"];
5
+ function i(o, d, c, p, f, m) {
6
+ return s(), t("div", {
7
+ class: n(o.cls),
8
+ "aria-busy": o.loading ? "true" : void 0
7
9
  }, [
8
- e.loading ? o(e.$slots, "default", { key: 0 }) : o(e.$slots, "content", { key: 1 })
9
- ], 2);
10
+ o.loading ? e(o.$slots, "default", { key: 0 }) : e(o.$slots, "content", { key: 1 })
11
+ ], 10, l);
10
12
  }
11
- const u = /* @__PURE__ */ l(r, [["render", a]]);
13
+ const k = /* @__PURE__ */ a(r, [["render", i]]);
12
14
  export {
13
- u as default
15
+ k as default
14
16
  };
@@ -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
  };
@@ -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) => {
@@ -2,12 +2,12 @@ import { defineComponent as Be, toRefs as Oe, computed as P, inject as Ee, ref a
2
2
  import { getScrollElements as le, getElementScrollRect as ne, getPopupStyle as $e, getTransformOrigin as Ge, getArrowStyle as He } from "./utils.js";
3
3
  import ue from "../../_container/resize-observer-v2.js";
4
4
  import { on as G, off as ie } from "../../_utils/dom.js";
5
- import { isEmptyChildren as Ue, mergeFirstChild as _e } from "../../_utils/vue-eco.js";
6
- import Ke from "../../_hooks/use-pick-slots.js";
5
+ import { isEmptyChildren as Ue, mergeFirstChild as Ke } from "../../_utils/vue-eco.js";
6
+ import Xe from "../../_hooks/use-pick-slots.js";
7
7
  import { triggerInjectionKey as ae } from "./context.js";
8
8
  import { throttleByRaf as se } from "../../_utils/throttle-by-raf.js";
9
- import Xe from "../../_hooks/use-popup-manager.js";
10
- import { useResizeObserver as Ye } from "../../_hooks/use-resize-observer.js";
9
+ import Ye from "../../_hooks/use-popup-manager.js";
10
+ import { useResizeObserver as _e } from "../../_hooks/use-resize-observer.js";
11
11
  import qe from "../../_container/client-only.js";
12
12
  import { useTeleportContainer as Je } from "../../_hooks/use-teleport-container.js";
13
13
  import { useFirstElement as Qe } from "../../_hooks/use-first-element.js";
@@ -337,7 +337,7 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
337
337
  } = Oe(o), g = eo("trigger"), ce = P(() => Ze(n, oo)), p = P(() => [].concat(o.trigger)), k = /* @__PURE__ */ new Set(), u = Ee(ae, void 0), {
338
338
  children: M,
339
339
  firstElement: T
340
- } = Qe(), y = s(), H = s(o.defaultPopupVisible), B = s(o.position), U = s({}), _ = s({}), K = s({}), S = s(!1), fe = s(), f = s({
340
+ } = Qe(), y = s(), H = s(o.defaultPopupVisible), B = s(o.position), U = s({}), K = s({}), X = s({}), S = s(!1), fe = s(), f = s({
341
341
  top: 0,
342
342
  left: 0
343
343
  });
@@ -351,7 +351,7 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
351
351
  documentContainer: !0
352
352
  }), {
353
353
  zIndex: me
354
- } = Xe("popup", {
354
+ } = Ye("popup", {
355
355
  visible: l
356
356
  });
357
357
  let R = 0, h = !1, z = !1;
@@ -368,7 +368,7 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
368
368
  left: t
369
369
  };
370
370
  }
371
- }, X = () => {
371
+ }, Y = () => {
372
372
  S.value = !0;
373
373
  }, m = () => {
374
374
  if (!T.value || !y.value || !D.value)
@@ -396,13 +396,13 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
396
396
  customStyle: o.popupStyle,
397
397
  autoFitPosition: o.autoFitPosition
398
398
  });
399
- o.autoFitTransformOrigin && (_.value = {
399
+ o.autoFitTransformOrigin && (K.value = {
400
400
  transformOrigin: Ge(C)
401
401
  }), o.autoFitPopupMinWidth ? w.minWidth = `${t.width}px` : o.autoFitPopupWidth && (w.width = `${t.width}px`), B.value !== C && (B.value = C), U.value = w, o.showArrow ? $(() => {
402
- K.value = He(C, t, i(), {
402
+ X.value = He(C, t, i(), {
403
403
  customStyle: o.arrowStyle
404
- }), X();
405
- }) : X();
404
+ }), Y();
405
+ }) : Y();
406
406
  }, a = (e, t) => {
407
407
  const i = R !== 0;
408
408
  if (e === l.value && !i)
@@ -420,11 +420,11 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
420
420
  }, pe = (e) => {
421
421
  var t;
422
422
  (t = n.onClick) == null || t.call(n, e), !(o.disabled || l.value && !o.clickToClose) && (p.value.includes("click") ? (V(e), a(!l.value)) : p.value.includes("contextMenu") && l.value && a(!1));
423
- }, Y = (e) => {
423
+ }, _ = (e) => {
424
424
  var t;
425
425
  (t = n.onMouseenter) == null || t.call(n, e), !(o.disabled || !p.value.includes("hover")) && (V(e), a(!0, o.mouseEnterDelay));
426
426
  }, q = (e) => {
427
- u == null || u.onMouseenter(e), Y(e);
427
+ u == null || u.onMouseenter(e), _(e);
428
428
  }, J = (e) => {
429
429
  var t;
430
430
  (t = n.onMouseleave) == null || t.call(n, e), !(o.disabled || !p.value.includes("hover")) && a(!1, o.mouseLeaveDelay);
@@ -452,7 +452,7 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
452
452
  }));
453
453
  const j = () => {
454
454
  ie(document.documentElement, "mousedown", W), h = !1;
455
- }, N = Ke(v, "content"), Ce = P(() => {
455
+ }, N = Xe(v, "content"), Ce = P(() => {
456
456
  var e;
457
457
  return o.hideEmpty && Ue((e = N.value) == null ? void 0 : e.call(N));
458
458
  }), W = (e) => {
@@ -512,7 +512,7 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
512
512
  const {
513
513
  createResizeObserver: Se,
514
514
  destroyResizeObserver: Re
515
- } = Ye({
515
+ } = _e({
516
516
  elementRef: D,
517
517
  onResize: x
518
518
  });
@@ -542,10 +542,10 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
542
542
  };
543
543
  return () => {
544
544
  var e;
545
- return M.value = ((e = v.default) == null ? void 0 : e.call(v)) ?? [], _e(M.value, {
545
+ return M.value = ((e = v.default) == null ? void 0 : e.call(v)) ?? [], Ke(M.value, {
546
546
  class: Te.value,
547
547
  onClick: pe,
548
- onMouseenter: Y,
548
+ onMouseenter: _,
549
549
  onMouseleave: J,
550
550
  onFocusin: ye,
551
551
  onFocusout: he,
@@ -590,14 +590,14 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
590
590
  var t;
591
591
  return [xe(c("div", {
592
592
  class: g.element("popup-wrapper"),
593
- style: _.value
593
+ style: K.value
594
594
  }, [c("div", {
595
595
  class: [g.element("content"), o.contentClass],
596
596
  style: o.contentStyle
597
597
  }, [(t = v.content) == null ? void 0 : t.call(v)]), o.showArrow && c("div", {
598
598
  ref: fe,
599
599
  class: [g.element("arrow"), o.arrowClass],
600
- style: K.value
600
+ style: X.value
601
601
  }, null)]), [[Ie, l.value]])];
602
602
  }
603
603
  })])]