x-next 1.5.0 → 1.7.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 +57 -4
- package/CHANGELOG.md +72 -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/draggable/Draggable.d.ts +1 -1
- package/dist/components/draggable/index.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +6 -6
- package/dist/components/drawer/src/Drawer.vue.d.ts +3 -3
- 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 +12 -12
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +24 -24
- 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/grid/Row.vue.d.ts +3 -3
- package/dist/components/grid/index.d.ts +9 -9
- 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 +125 -17
- package/dist/components/image/ImagePreview.vue.d.ts +97 -7
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +100 -7
- package/dist/components/image/hooks/use-image-drag.d.ts +2 -2
- package/dist/components/image/index.d.ts +712 -124
- package/dist/components/image/interface.d.ts +9 -1
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +3 -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/popconfirm/src/popup.vue.d.ts +3 -3
- 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/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +3 -3
- 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/upload/Upload.d.ts +372 -0
- package/dist/components/upload/context.d.ts +28 -0
- package/dist/components/upload/index.d.ts +656 -0
- package/dist/components/upload/interface.d.ts +110 -0
- package/dist/components/upload/props.d.ts +321 -0
- package/dist/components/upload/upload-list-item.d.ts +15 -0
- package/dist/components/upload/upload-list.d.ts +11 -0
- package/dist/components/upload/upload-picture-item.d.ts +20 -0
- package/dist/components/upload/upload-trigger.d.ts +8 -0
- package/dist/components/upload/utils.d.ts +48 -0
- 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 +10 -4
- 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/image/Image.vue.js +55 -45
- package/dist/es/components/image/Image.vue2.js +113 -92
- package/dist/es/components/image/ImagePreview.vue.js +66 -53
- package/dist/es/components/image/ImagePreview.vue2.js +219 -171
- package/dist/es/components/image/ImagePreviewAction.js +12 -15
- package/dist/es/components/image/ImagePreviewGroup.vue.js +21 -20
- package/dist/es/components/image/ImagePreviewGroup.vue2.js +45 -39
- package/dist/es/components/image/hooks/use-image-drag.js +16 -14
- package/dist/es/components/index.js +123 -117
- 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/components/upload/Upload.js +420 -0
- package/dist/es/components/upload/context.js +4 -0
- package/dist/es/components/upload/index.js +8 -0
- package/dist/es/components/upload/props.js +321 -0
- package/dist/es/components/upload/upload-list-item.js +138 -0
- package/dist/es/components/upload/upload-list.js +48 -0
- package/dist/es/components/upload/upload-picture-item.js +109 -0
- package/dist/es/components/upload/upload-trigger.js +89 -0
- package/dist/es/components/upload/utils.js +195 -0
- package/dist/es/icons/_self/empty-better.js +25 -8
- package/dist/es/icons/_self/upload-icons.js +103 -0
- package/dist/es/index.js +168 -162
- package/dist/es/locale/en-US.js +39 -1
- package/dist/es/locale/zh-CN.js +39 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/_self/upload-icons.d.ts +523 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +60 -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/upload.css +1 -0
- package/dist/style/upload.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
- package/volar.d.ts +3 -0
- package/dist/es/_hooks/use-popup-overflow-hidden.js +0 -29
|
@@ -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
|
})])]
|