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.
- package/AI_USAGE.md +2 -2
- package/CHANGELOG.md +36 -0
- package/dist/_utils/color.d.ts +53 -0
- package/dist/components/color-picker/ColorPicker.d.ts +239 -0
- package/dist/components/color-picker/gradient-slider.d.ts +52 -0
- package/dist/components/color-picker/index.d.ts +238 -0
- package/dist/components/color-picker/panel.d.ts +721 -0
- package/dist/components/color-picker/sv-panel.d.ts +48 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +35 -5
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
- package/dist/components/dropdown/index.d.ts +209 -29
- package/dist/components/form/FormItem.vue.d.ts +3 -3
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +6 -6
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
- package/dist/components/form-select/index.d.ts +66 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/heatmap/Heatmap.d.ts +311 -0
- package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
- package/dist/components/heatmap/index.d.ts +372 -0
- package/dist/components/heatmap/interface.d.ts +57 -0
- package/dist/components/image/Image.vue.d.ts +3 -3
- package/dist/components/image/ImagePreview.vue.d.ts +3 -3
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +3 -3
- package/dist/components/image/index.d.ts +24 -24
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/network/Network.vue.d.ts +1 -1
- package/dist/components/network/index.d.ts +3 -3
- package/dist/components/network/utils.d.ts +2 -0
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
- package/dist/components/skeleton/index.d.ts +6 -6
- package/dist/components/spin/Spin.d.ts +38 -0
- package/dist/components/spin/index.d.ts +30 -0
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +8 -0
- package/dist/es/_utils/color.js +73 -0
- package/dist/es/components/button/Button.js +2 -2
- package/dist/es/components/color-picker/ColorPicker.js +239 -0
- package/dist/es/components/color-picker/gradient-slider.js +79 -0
- package/dist/es/components/color-picker/index.js +8 -0
- package/dist/es/components/color-picker/panel.js +307 -0
- package/dist/es/components/color-picker/sv-panel.js +99 -0
- package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
- package/dist/es/components/form-input/Input.js +7 -7
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +2 -2
- package/dist/es/components/form-input-number/InputNumber.js +12 -12
- package/dist/es/components/heatmap/Heatmap.js +334 -0
- package/dist/es/components/heatmap/helpers/matrix.js +106 -0
- package/dist/es/components/heatmap/index.js +8 -0
- package/dist/es/components/index.js +118 -114
- package/dist/es/components/menu/sub-menu-pop.vue2.js +12 -12
- package/dist/es/components/network/Network.vue2.js +72 -72
- package/dist/es/components/network/utils.js +44 -35
- package/dist/es/components/pagination/Pagination.js +113 -104
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
- package/dist/es/components/pagination/page-jumper.vue.js +13 -12
- package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
- package/dist/es/components/pagination/page-options.vue.js +4 -3
- package/dist/es/components/pagination/page-options.vue2.js +17 -15
- package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
- package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
- package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
- package/dist/es/components/spin/Spin.js +124 -60
- package/dist/es/components/table/Table.js +3 -1
- package/dist/es/components/trigger/Trigger.js +19 -19
- package/dist/es/icons/_self/empty-better.js +25 -8
- package/dist/es/index.js +162 -158
- package/dist/es/locale/en-US.js +17 -1
- package/dist/es/locale/zh-CN.js +17 -1
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +28 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -0
- package/dist/style/color-picker.js +2 -0
- package/dist/style/date-picker.css +1 -1
- package/dist/style/empty.css +1 -1
- package/dist/style/form-checkbox.css +1 -1
- package/dist/style/form-input-tag.css +1 -1
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-radio.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/heatmap.css +1 -0
- package/dist/style/heatmap.js +2 -0
- package/dist/style/image.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/skeleton.css +1 -1
- package/dist/style/spin.css +1 -1
- package/dist/style/steps.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/volar.d.ts +2 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as u, openBlock as s, createElementBlock as n, normalizeClass as a, renderSlot as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
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
|
-
|
|
14
|
-
|
|
13
|
+
r(e.$slots, "jumper-prepend", {}, () => [
|
|
14
|
+
g(p(e.t("pagination.jumpTo")), 1)
|
|
15
15
|
])
|
|
16
16
|
], 2)),
|
|
17
|
-
|
|
17
|
+
f(t, {
|
|
18
18
|
modelValue: e.inputValue,
|
|
19
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
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
|
-
|
|
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
|
-
},
|
|
42
|
+
}, p(e.pages), 3)
|
|
42
43
|
], 64)) : l("", !0)
|
|
43
44
|
], 2);
|
|
44
45
|
}
|
|
45
|
-
const z = /* @__PURE__ */
|
|
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
|
|
5
|
-
const
|
|
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 } =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import { Select as
|
|
3
|
-
import { getClassNameMixin as
|
|
4
|
-
import { useLocale as
|
|
5
|
-
|
|
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:
|
|
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(
|
|
29
|
-
const o =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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:
|
|
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
|
-
|
|
47
|
+
y as default
|
|
46
48
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import r from "./Skeleton.vue2.js";
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
],
|
|
10
|
+
o.loading ? e(o.$slots, "default", { key: 0 }) : e(o.$slots, "content", { key: 1 })
|
|
11
|
+
], 10, l);
|
|
10
12
|
}
|
|
11
|
-
const
|
|
13
|
+
const k = /* @__PURE__ */ a(r, [["render", i]]);
|
|
12
14
|
export {
|
|
13
|
-
|
|
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
|
|
3
|
-
import
|
|
4
|
-
function p(e, u, f,
|
|
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,
|
|
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:
|
|
12
|
+
style: m(o)
|
|
12
13
|
}, null, 6))), 128))
|
|
13
14
|
], 2);
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const z = /* @__PURE__ */ c(t, [["render", p]]);
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
z as default
|
|
18
19
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
return
|
|
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__ */
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getFirstComponent as
|
|
5
|
-
import { getClassNameMixin as
|
|
6
|
-
import { useLocale as
|
|
7
|
-
const
|
|
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:
|
|
69
|
-
slots:
|
|
86
|
+
attrs: T,
|
|
87
|
+
slots: n
|
|
70
88
|
}) {
|
|
71
|
-
const
|
|
72
|
-
t:
|
|
73
|
-
} =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
|
131
|
+
return n.element ? n.element() : e.dot ? r(_, {
|
|
85
132
|
size: e.size,
|
|
86
133
|
type: e.dot === "color" ? "color" : "default"
|
|
87
|
-
}, null) :
|
|
88
|
-
spin: !0,
|
|
134
|
+
}, null) : r(O, {
|
|
89
135
|
size: e.size
|
|
90
136
|
}, null);
|
|
91
|
-
},
|
|
92
|
-
var
|
|
93
|
-
const
|
|
137
|
+
}, p = () => {
|
|
138
|
+
var d;
|
|
139
|
+
const t = e.size ? {
|
|
94
140
|
fontSize: `${e.size}px`
|
|
95
|
-
} : void 0,
|
|
96
|
-
return
|
|
97
|
-
class:
|
|
98
|
-
style:
|
|
99
|
-
}, [
|
|
100
|
-
class:
|
|
101
|
-
}, [((
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, [
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
6
|
-
import
|
|
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
|
|
10
|
-
import { useResizeObserver as
|
|
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({}),
|
|
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
|
-
} =
|
|
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
|
-
},
|
|
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 && (
|
|
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
|
-
|
|
402
|
+
X.value = He(C, t, i(), {
|
|
403
403
|
customStyle: o.arrowStyle
|
|
404
|
-
}),
|
|
405
|
-
}) :
|
|
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
|
-
},
|
|
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),
|
|
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 =
|
|
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
|
-
} =
|
|
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)) ?? [],
|
|
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:
|
|
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:
|
|
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:
|
|
600
|
+
style: X.value
|
|
601
601
|
}, null)]), [[Ie, l.value]])];
|
|
602
602
|
}
|
|
603
603
|
})])]
|