st-comp 0.0.178 → 0.0.180
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +3 -3
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +29 -33
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +14 -18
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +25 -30
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +457 -419
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +13 -16
- package/es/KlinePlus.cjs +3 -3
- package/es/KlinePlus.js +140 -142
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +274 -276
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +21 -23
- package/es/User.cjs +1 -1
- package/es/User.js +472 -482
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +440 -2878
- package/es/VarietySearch.cjs +12 -12
- package/es/VarietySearch.js +1199 -1176
- package/es/VirtualTable.cjs +1 -13
- package/es/VirtualTable.js +1547 -1567
- package/es/{_initCloneObject-da90eef0.js → _initCloneObject-346b7ee2.js} +25 -26
- package/es/_initCloneObject-e2f0deb9.cjs +1 -0
- package/es/base-62a70f61.js +288 -0
- package/es/base-ef747d02.cjs +5 -0
- package/es/config-provider-178bb43c.cjs +1 -0
- package/es/config-provider-2e733cae.js +58 -0
- package/es/dayjs.min-2c20abe6.cjs +1 -0
- package/es/{dayjs.min-54a4e095.js → dayjs.min-8313b006.js} +96 -93
- package/es/{debounce-9e323221.cjs → debounce-0b77a317.cjs} +1 -1
- package/es/{debounce-3cec4646.js → debounce-5f2ec4be.js} +19 -19
- package/es/{dropdown-82b80e8b.js → dropdown-d06edf54.js} +49 -39
- package/es/dropdown-f2fec683.cjs +1 -0
- package/es/el-button-5b08c08a.js +272 -0
- package/es/el-button-fc46a173.cjs +1 -0
- package/es/el-dialog-0b7166c9.cjs +1 -0
- package/es/el-dialog-d8d0da7a.js +276 -0
- package/es/{el-divider-fd2b4e2e.js → el-divider-2f300113.js} +1 -1
- package/es/{el-divider-40c50ce7.cjs → el-divider-4713d74c.cjs} +1 -1
- package/es/{el-empty-412fc297.js → el-empty-87a86f30.js} +57 -80
- package/es/el-empty-bb2b0235.cjs +1 -0
- package/es/el-form-item-caffd133.cjs +12 -0
- package/es/el-form-item-ff9c7d98.js +1267 -0
- package/es/el-input-6db30c8c.js +531 -0
- package/es/el-input-9c912678.cjs +1 -0
- package/es/el-input-number-05f150e5.js +311 -0
- package/es/el-input-number-6fe73563.cjs +1 -0
- package/es/el-loading-8514feaa.cjs +1 -0
- package/es/el-loading-93842445.js +203 -0
- package/es/el-menu-item-7a57c1be.cjs +1 -0
- package/es/el-menu-item-a886fbdd.js +768 -0
- package/es/el-message-8aa674f2.js +406 -0
- package/es/el-message-aad5b42b.cjs +1 -0
- package/es/el-message-box-2b6b2b68.js +550 -0
- package/es/el-message-box-53f355d7.cjs +1 -0
- package/es/el-overlay-540b2a02.js +324 -0
- package/es/el-overlay-96630a2e.cjs +1 -0
- package/es/el-popconfirm-2afdf6fb.cjs +1 -0
- package/es/el-popconfirm-c18d8035.js +162 -0
- package/es/el-popper-544fd77e.js +2412 -0
- package/es/el-popper-73466d7a.cjs +1 -0
- package/es/el-scrollbar-691cfc11.cjs +1 -0
- package/es/el-scrollbar-fae984e3.js +763 -0
- package/es/el-segmented-a7493831.js +142 -0
- package/es/el-segmented-b6bd3c0e.cjs +1 -0
- package/es/el-select-5959e837.cjs +1 -0
- package/es/el-select-ea8feecf.js +1251 -0
- package/es/el-table-column-9ef52443.js +3878 -0
- package/es/el-table-column-b824ac5c.cjs +14 -0
- package/es/el-tag-2fc9b9eb.js +116 -0
- package/es/el-tag-ecad6d02.cjs +1 -0
- package/es/index-2e331d74.js +10 -0
- package/es/{index-a8e9ec0f.js → index-34592e82.js} +176 -182
- package/es/index-3a74eae4.cjs +1 -0
- package/es/{index-1c41bd56.js → index-5d4e5c51.js} +3 -3
- package/es/{index-e348d5e8.cjs → index-694bb944.cjs} +1 -1
- package/es/{index-ee1cebbc.js → index-74fb90c7.js} +5 -5
- package/es/{index-d577b81b.js → index-8d7ae5dc.js} +2 -2
- package/es/index-a9095b4a.js +163 -0
- package/es/index-a93dd9c4.cjs +1 -0
- package/es/index-ebd2fd7e.cjs +1 -0
- package/es/index-f1c702f6.cjs +1 -0
- package/es/{index-19fa1fcf.cjs → index-f6afafaa.cjs} +1 -1
- package/es/{raf-bfbf42e4.js → raf-41aed4d4.js} +1 -1
- package/es/{raf-07cb6953.cjs → raf-8249652f.cjs} +1 -1
- package/es/{scroll-e3cb691f.js → scroll-7d352c1f.js} +2 -2
- package/es/{scroll-4769a65d.cjs → scroll-b108dabd.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-global-config-03735617.cjs +1 -0
- package/es/use-global-config-4b185eb5.js +71 -0
- package/es/validator-0e688e4e.cjs +1 -0
- package/es/validator-d12a8f8c.js +5 -0
- package/es/vnode-4db20540.cjs +1 -0
- package/es/vnode-a0795a4b.js +70 -0
- package/es/{zh-cn-d883afa8.js → zh-cn-0ff32188.js} +5 -4
- package/es/{zh-cn-b24a7dc9.cjs → zh-cn-adf19c4b.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +226 -245
- package/lib/{index-0f16f8b0.js → index-9341884f.js} +44358 -46367
- package/lib/{python-e9c32bc9.js → python-5c9b3e4e.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +2 -2
- package/packages/KlinePlus/index.vue +2 -1
- package/packages/VarSelectDialog/index.vue +43 -67
- package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +4 -2
- package/packages/VarietySearch/components/FactorScreen/index.vue +6 -4
- package/packages/index.ts +0 -2
- package/src/pages/VarSelectDialog/index.vue +1 -1
- package/src/router/routes.ts +0 -5
- package/es/Dialog.cjs +0 -1
- package/es/Dialog.js +0 -95
- package/es/_commonjsHelpers-10dfc225.js +0 -8
- package/es/_commonjsHelpers-87b0abe8.cjs +0 -1
- package/es/_initCloneObject-9ccbb113.cjs +0 -1
- package/es/base-bdc10baa.cjs +0 -5
- package/es/base-d9284bf0.js +0 -304
- package/es/castArray-37eb9980.cjs +0 -1
- package/es/castArray-b0ab0165.js +0 -10
- package/es/config-provider-ec6b09df.cjs +0 -1
- package/es/config-provider-f0151e9f.js +0 -47
- package/es/dayjs.min-19fb125f.cjs +0 -1
- package/es/dropdown-b2dab5bb.cjs +0 -1
- package/es/el-button-34665425.js +0 -237
- package/es/el-button-960edd49.cjs +0 -1
- package/es/el-dialog-a412484e.js +0 -267
- package/es/el-dialog-cd484c1f.cjs +0 -1
- package/es/el-empty-627ec09e.cjs +0 -1
- package/es/el-form-item-668ba024.js +0 -1263
- package/es/el-form-item-e1c3104b.cjs +0 -12
- package/es/el-input-22e66e37.js +0 -523
- package/es/el-input-5163bda3.cjs +0 -1
- package/es/el-input-number-481e21c5.js +0 -284
- package/es/el-input-number-eb54cde4.cjs +0 -1
- package/es/el-loading-15a5501c.cjs +0 -1
- package/es/el-loading-d4e403ab.js +0 -187
- package/es/el-menu-item-404c10e5.js +0 -772
- package/es/el-menu-item-ac89e804.cjs +0 -1
- package/es/el-message-ad87b9dd.cjs +0 -1
- package/es/el-message-box-41f39f6d.js +0 -558
- package/es/el-message-box-6694f827.cjs +0 -1
- package/es/el-message-ef506caa.js +0 -375
- package/es/el-overlay-4a9fa4e1.js +0 -269
- package/es/el-overlay-e5d318c3.cjs +0 -1
- package/es/el-popconfirm-7b9183aa.js +0 -140
- package/es/el-popconfirm-a497b279.cjs +0 -1
- package/es/el-popper-14a9d493.cjs +0 -1
- package/es/el-popper-e73466eb.js +0 -2263
- package/es/el-scrollbar-45318df0.js +0 -201
- package/es/el-scrollbar-8bf765f2.cjs +0 -1
- package/es/el-segmented-3ba6d664.cjs +0 -1
- package/es/el-segmented-41820018.js +0 -135
- package/es/el-select-1d2309a1.cjs +0 -1
- package/es/el-select-d7a00294.js +0 -1130
- package/es/el-table-column-a2d0c635.js +0 -3805
- package/es/el-table-column-be9a76bb.cjs +0 -14
- package/es/el-tag-7f391090.js +0 -280
- package/es/el-tag-8d49d4d2.cjs +0 -1
- package/es/index-02ca0096.cjs +0 -5
- package/es/index-3120be08.js +0 -14
- package/es/index-5b81f4da.cjs +0 -1
- package/es/index-85a32a00.js +0 -59
- package/es/index-8d3c5e96.cjs +0 -3
- package/es/index-94f38460.js +0 -306
- package/es/index-a99a5307.cjs +0 -1
- package/es/index-b90c746b.cjs +0 -1
- package/es/index-d94bae37.cjs +0 -1
- package/es/index-d99fdc6d.js +0 -159
- package/es/use-form-common-props-592797e2.cjs +0 -2
- package/es/use-form-common-props-cc347a83.js +0 -171
- package/es/use-global-config-584b62f1.cjs +0 -1
- package/es/use-global-config-c7f0a7e3.js +0 -73
- package/es/validator-10fa54fe.js +0 -5
- package/es/validator-af488a9a.cjs +0 -1
- package/es/vnode-1b827c99.cjs +0 -1
- package/es/vnode-6be33bb1.js +0 -14
- package/packages/Dialog/index.ts +0 -8
- package/packages/Dialog/index.vue +0 -54
- package/src/pages/Dialog/index.vue +0 -16
package/es/index-85a32a00.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as C, shallowRef as E, ref as m, watch as g, onMounted as F, nextTick as b } from "vue";
|
|
2
|
-
import { b as r } from "./el-scrollbar-45318df0.js";
|
|
3
|
-
import { A as x, y as f } from "./base-d9284bf0.js";
|
|
4
|
-
function T(l, {
|
|
5
|
-
beforeFocus: t,
|
|
6
|
-
afterFocus: e,
|
|
7
|
-
beforeBlur: d,
|
|
8
|
-
afterBlur: c
|
|
9
|
-
} = {}) {
|
|
10
|
-
const p = C(), { emit: v } = p, o = E(), s = m(!1), a = (n) => {
|
|
11
|
-
f(t) && t(n) || s.value || (s.value = !0, v("focus", n), e == null || e());
|
|
12
|
-
}, i = (n) => {
|
|
13
|
-
var u;
|
|
14
|
-
f(d) && d(n) || n.relatedTarget && ((u = o.value) != null && u.contains(n.relatedTarget)) || (s.value = !1, v("blur", n), c == null || c());
|
|
15
|
-
}, h = () => {
|
|
16
|
-
var n, u;
|
|
17
|
-
(n = o.value) != null && n.contains(document.activeElement) && o.value !== document.activeElement || (u = l.value) == null || u.focus();
|
|
18
|
-
};
|
|
19
|
-
return g(o, (n) => {
|
|
20
|
-
n && n.setAttribute("tabindex", "-1");
|
|
21
|
-
}), r(o, "focus", a, !0), r(o, "blur", i, !0), r(o, "click", h, !0), process.env.NODE_ENV === "test" && F(() => {
|
|
22
|
-
const n = x(l.value) ? l.value : document.querySelector("input,textarea");
|
|
23
|
-
n && (r(n, "focus", a, !0), r(n, "blur", i, !0));
|
|
24
|
-
}), {
|
|
25
|
-
isFocused: s,
|
|
26
|
-
wrapperRef: o,
|
|
27
|
-
handleFocus: a,
|
|
28
|
-
handleBlur: i
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const _ = (l) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(l);
|
|
32
|
-
function D({
|
|
33
|
-
afterComposition: l,
|
|
34
|
-
emit: t
|
|
35
|
-
}) {
|
|
36
|
-
const e = m(!1), d = (o) => {
|
|
37
|
-
t == null || t("compositionstart", o), e.value = !0;
|
|
38
|
-
}, c = (o) => {
|
|
39
|
-
var s;
|
|
40
|
-
t == null || t("compositionupdate", o);
|
|
41
|
-
const a = (s = o.target) == null ? void 0 : s.value, i = a[a.length - 1] || "";
|
|
42
|
-
e.value = !_(i);
|
|
43
|
-
}, p = (o) => {
|
|
44
|
-
t == null || t("compositionend", o), e.value && (e.value = !1, b(() => l(o)));
|
|
45
|
-
};
|
|
46
|
-
return {
|
|
47
|
-
isComposing: e,
|
|
48
|
-
handleComposition: (o) => {
|
|
49
|
-
o.type === "compositionend" ? p(o) : c(o);
|
|
50
|
-
},
|
|
51
|
-
handleCompositionStart: d,
|
|
52
|
-
handleCompositionUpdate: c,
|
|
53
|
-
handleCompositionEnd: p
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
T as a,
|
|
58
|
-
D as u
|
|
59
|
-
};
|
package/es/index-8d3c5e96.cjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),n=require("./base-bdc10baa.cjs"),o=({from:t,replacement:s,scope:r,version:i,ref:a,type:u="API"},c)=>{e.watch(()=>e.unref(c),d=>{d&&n.debugWarn(r,`[${u}] ${t} is about to be deprecated in version ${i}, please use ${s} instead.
|
|
2
|
-
For more detail, please visit: ${a}
|
|
3
|
-
`)},{immediate:!0})};exports.useDeprecated=o;
|
package/es/index-94f38460.js
DELETED
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import { ref as y, onMounted as I, onBeforeUnmount as R, defineComponent as ee, provide as ae, watch as A, unref as b, nextTick as M, renderSlot as O, openBlock as ce, createBlock as ue, Teleport as ie } from "vue";
|
|
2
|
-
import { A as q, p as j, f as de, _ as te, i as fe, b as le, d as pe, w as Ee } from "./base-d9284bf0.js";
|
|
3
|
-
function De(e) {
|
|
4
|
-
return e === void 0;
|
|
5
|
-
}
|
|
6
|
-
const xe = "update:modelValue", Ke = "change", Ve = "input", ve = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', Te = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, Be = (e) => Array.from(e.querySelectorAll(ve)).filter((t) => ne(t) && Te(t)), ne = (e) => {
|
|
7
|
-
if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
|
|
8
|
-
return !0;
|
|
9
|
-
if (e.tabIndex < 0 || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true")
|
|
10
|
-
return !1;
|
|
11
|
-
switch (e.nodeName) {
|
|
12
|
-
case "A":
|
|
13
|
-
return !!e.href && e.rel !== "ignore";
|
|
14
|
-
case "INPUT":
|
|
15
|
-
return !(e.type === "hidden" || e.type === "file");
|
|
16
|
-
case "BUTTON":
|
|
17
|
-
case "SELECT":
|
|
18
|
-
case "TEXTAREA":
|
|
19
|
-
return !0;
|
|
20
|
-
default:
|
|
21
|
-
return !1;
|
|
22
|
-
}
|
|
23
|
-
}, $e = function(e, t, ...o) {
|
|
24
|
-
let s;
|
|
25
|
-
t.includes("mouse") || t.includes("click") ? s = "MouseEvents" : t.includes("key") ? s = "KeyboardEvent" : s = "HTMLEvents";
|
|
26
|
-
const a = document.createEvent(s);
|
|
27
|
-
return a.initEvent(t, ...o), e.dispatchEvent(a), e;
|
|
28
|
-
}, N = "focus-trap.focus-after-trapped", C = "focus-trap.focus-after-released", be = "focus-trap.focusout-prevented", W = {
|
|
29
|
-
cancelable: !0,
|
|
30
|
-
bubbles: !1
|
|
31
|
-
}, me = {
|
|
32
|
-
cancelable: !0,
|
|
33
|
-
bubbles: !1
|
|
34
|
-
}, G = "focusAfterTrapped", J = "focusAfterReleased", Fe = Symbol("elFocusTrap"), U = y(), h = y(0), k = y(0);
|
|
35
|
-
let m = 0;
|
|
36
|
-
const se = (e) => {
|
|
37
|
-
const t = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
38
|
-
acceptNode: (s) => {
|
|
39
|
-
const a = s.tagName === "INPUT" && s.type === "hidden";
|
|
40
|
-
return s.disabled || s.hidden || a ? NodeFilter.FILTER_SKIP : s.tabIndex >= 0 || s === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
for (; o.nextNode(); )
|
|
44
|
-
t.push(o.currentNode);
|
|
45
|
-
return t;
|
|
46
|
-
}, X = (e, t) => {
|
|
47
|
-
for (const o of e)
|
|
48
|
-
if (!_e(o, t))
|
|
49
|
-
return o;
|
|
50
|
-
}, _e = (e, t) => {
|
|
51
|
-
if (process.env.NODE_ENV === "test")
|
|
52
|
-
return !1;
|
|
53
|
-
if (getComputedStyle(e).visibility === "hidden")
|
|
54
|
-
return !0;
|
|
55
|
-
for (; e; ) {
|
|
56
|
-
if (t && e === t)
|
|
57
|
-
return !1;
|
|
58
|
-
if (getComputedStyle(e).display === "none")
|
|
59
|
-
return !0;
|
|
60
|
-
e = e.parentElement;
|
|
61
|
-
}
|
|
62
|
-
return !1;
|
|
63
|
-
}, ye = (e) => {
|
|
64
|
-
const t = se(e), o = X(t, e), s = X(t.reverse(), e);
|
|
65
|
-
return [o, s];
|
|
66
|
-
}, he = (e) => e instanceof HTMLInputElement && "select" in e, l = (e, t) => {
|
|
67
|
-
if (e && e.focus) {
|
|
68
|
-
const o = document.activeElement;
|
|
69
|
-
let s = !1;
|
|
70
|
-
q(e) && !ne(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), s = !0), e.focus({ preventScroll: !0 }), k.value = window.performance.now(), e !== o && he(e) && t && e.select(), q(e) && s && e.removeAttribute("tabindex");
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
function Y(e, t) {
|
|
74
|
-
const o = [...e], s = e.indexOf(t);
|
|
75
|
-
return s !== -1 && o.splice(s, 1), o;
|
|
76
|
-
}
|
|
77
|
-
const Pe = () => {
|
|
78
|
-
let e = [];
|
|
79
|
-
return {
|
|
80
|
-
push: (s) => {
|
|
81
|
-
const a = e[0];
|
|
82
|
-
a && s !== a && a.pause(), e = Y(e, s), e.unshift(s);
|
|
83
|
-
},
|
|
84
|
-
remove: (s) => {
|
|
85
|
-
var a, d;
|
|
86
|
-
e = Y(e, s), (d = (a = e[0]) == null ? void 0 : a.resume) == null || d.call(a);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}, ge = (e, t = !1) => {
|
|
90
|
-
const o = document.activeElement;
|
|
91
|
-
for (const s of e)
|
|
92
|
-
if (l(s, t), document.activeElement !== o)
|
|
93
|
-
return;
|
|
94
|
-
}, z = Pe(), we = () => h.value > k.value, F = () => {
|
|
95
|
-
U.value = "pointer", h.value = window.performance.now();
|
|
96
|
-
}, Q = () => {
|
|
97
|
-
U.value = "keyboard", h.value = window.performance.now();
|
|
98
|
-
}, Le = () => (I(() => {
|
|
99
|
-
m === 0 && (document.addEventListener("mousedown", F), document.addEventListener("touchstart", F), document.addEventListener("keydown", Q)), m++;
|
|
100
|
-
}), R(() => {
|
|
101
|
-
m--, m <= 0 && (document.removeEventListener("mousedown", F), document.removeEventListener("touchstart", F), document.removeEventListener("keydown", Q));
|
|
102
|
-
}), {
|
|
103
|
-
focusReason: U,
|
|
104
|
-
lastUserFocusTimestamp: h,
|
|
105
|
-
lastAutomatedFocusTimestamp: k
|
|
106
|
-
}), _ = (e) => new CustomEvent(be, {
|
|
107
|
-
...me,
|
|
108
|
-
detail: e
|
|
109
|
-
}), oe = {
|
|
110
|
-
tab: "Tab",
|
|
111
|
-
enter: "Enter",
|
|
112
|
-
space: "Space",
|
|
113
|
-
left: "ArrowLeft",
|
|
114
|
-
up: "ArrowUp",
|
|
115
|
-
right: "ArrowRight",
|
|
116
|
-
down: "ArrowDown",
|
|
117
|
-
esc: "Escape",
|
|
118
|
-
delete: "Delete",
|
|
119
|
-
backspace: "Backspace",
|
|
120
|
-
numpadEnter: "NumpadEnter",
|
|
121
|
-
pageUp: "PageUp",
|
|
122
|
-
pageDown: "PageDown",
|
|
123
|
-
home: "Home",
|
|
124
|
-
end: "End"
|
|
125
|
-
};
|
|
126
|
-
let E = [];
|
|
127
|
-
const Z = (e) => {
|
|
128
|
-
e.code === oe.esc && E.forEach((t) => t(e));
|
|
129
|
-
}, Se = (e) => {
|
|
130
|
-
I(() => {
|
|
131
|
-
E.length === 0 && document.addEventListener("keydown", Z), j && E.push(e);
|
|
132
|
-
}), R(() => {
|
|
133
|
-
E = E.filter((t) => t !== e), E.length === 0 && j && document.removeEventListener("keydown", Z);
|
|
134
|
-
});
|
|
135
|
-
}, Ae = ee({
|
|
136
|
-
name: "ElFocusTrap",
|
|
137
|
-
inheritAttrs: !1,
|
|
138
|
-
props: {
|
|
139
|
-
loop: Boolean,
|
|
140
|
-
trapped: Boolean,
|
|
141
|
-
focusTrapEl: Object,
|
|
142
|
-
focusStartEl: {
|
|
143
|
-
type: [Object, String],
|
|
144
|
-
default: "first"
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
emits: [
|
|
148
|
-
G,
|
|
149
|
-
J,
|
|
150
|
-
"focusin",
|
|
151
|
-
"focusout",
|
|
152
|
-
"focusout-prevented",
|
|
153
|
-
"release-requested"
|
|
154
|
-
],
|
|
155
|
-
setup(e, { emit: t }) {
|
|
156
|
-
const o = y();
|
|
157
|
-
let s, a;
|
|
158
|
-
const { focusReason: d } = Le();
|
|
159
|
-
Se((n) => {
|
|
160
|
-
e.trapped && !p.paused && t("release-requested", n);
|
|
161
|
-
});
|
|
162
|
-
const p = {
|
|
163
|
-
paused: !1,
|
|
164
|
-
pause() {
|
|
165
|
-
this.paused = !0;
|
|
166
|
-
},
|
|
167
|
-
resume() {
|
|
168
|
-
this.paused = !1;
|
|
169
|
-
}
|
|
170
|
-
}, v = (n) => {
|
|
171
|
-
if (!e.loop && !e.trapped || p.paused)
|
|
172
|
-
return;
|
|
173
|
-
const { code: r, altKey: c, ctrlKey: u, metaKey: i, currentTarget: B, shiftKey: $ } = n, { loop: H } = e, re = r === oe.tab && !c && !u && !i, T = document.activeElement;
|
|
174
|
-
if (re && T) {
|
|
175
|
-
const w = B, [L, S] = ye(w);
|
|
176
|
-
if (L && S) {
|
|
177
|
-
if (!$ && T === S) {
|
|
178
|
-
const f = _({
|
|
179
|
-
focusReason: d.value
|
|
180
|
-
});
|
|
181
|
-
t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(L, !0));
|
|
182
|
-
} else if ($ && [L, w].includes(T)) {
|
|
183
|
-
const f = _({
|
|
184
|
-
focusReason: d.value
|
|
185
|
-
});
|
|
186
|
-
t("focusout-prevented", f), f.defaultPrevented || (n.preventDefault(), H && l(S, !0));
|
|
187
|
-
}
|
|
188
|
-
} else if (T === w) {
|
|
189
|
-
const f = _({
|
|
190
|
-
focusReason: d.value
|
|
191
|
-
});
|
|
192
|
-
t("focusout-prevented", f), f.defaultPrevented || n.preventDefault();
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
ae(Fe, {
|
|
197
|
-
focusTrapRef: o,
|
|
198
|
-
onKeydown: v
|
|
199
|
-
}), A(() => e.focusTrapEl, (n) => {
|
|
200
|
-
n && (o.value = n);
|
|
201
|
-
}, { immediate: !0 }), A([o], ([n], [r]) => {
|
|
202
|
-
n && (n.addEventListener("keydown", v), n.addEventListener("focusin", P), n.addEventListener("focusout", g)), r && (r.removeEventListener("keydown", v), r.removeEventListener("focusin", P), r.removeEventListener("focusout", g));
|
|
203
|
-
});
|
|
204
|
-
const D = (n) => {
|
|
205
|
-
t(G, n);
|
|
206
|
-
}, x = (n) => t(J, n), P = (n) => {
|
|
207
|
-
const r = b(o);
|
|
208
|
-
if (!r)
|
|
209
|
-
return;
|
|
210
|
-
const c = n.target, u = n.relatedTarget, i = c && r.contains(c);
|
|
211
|
-
e.trapped || u && r.contains(u) || (s = u), i && t("focusin", n), !p.paused && e.trapped && (i ? a = c : l(a, !0));
|
|
212
|
-
}, g = (n) => {
|
|
213
|
-
const r = b(o);
|
|
214
|
-
if (!(p.paused || !r))
|
|
215
|
-
if (e.trapped) {
|
|
216
|
-
const c = n.relatedTarget;
|
|
217
|
-
!de(c) && !r.contains(c) && setTimeout(() => {
|
|
218
|
-
if (!p.paused && e.trapped) {
|
|
219
|
-
const u = _({
|
|
220
|
-
focusReason: d.value
|
|
221
|
-
});
|
|
222
|
-
t("focusout-prevented", u), u.defaultPrevented || l(a, !0);
|
|
223
|
-
}
|
|
224
|
-
}, 0);
|
|
225
|
-
} else {
|
|
226
|
-
const c = n.target;
|
|
227
|
-
c && r.contains(c) || t("focusout", n);
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
async function K() {
|
|
231
|
-
await M();
|
|
232
|
-
const n = b(o);
|
|
233
|
-
if (n) {
|
|
234
|
-
z.push(p);
|
|
235
|
-
const r = n.contains(document.activeElement) ? s : document.activeElement;
|
|
236
|
-
if (s = r, !n.contains(r)) {
|
|
237
|
-
const u = new Event(N, W);
|
|
238
|
-
n.addEventListener(N, D), n.dispatchEvent(u), u.defaultPrevented || M(() => {
|
|
239
|
-
let i = e.focusStartEl;
|
|
240
|
-
fe(i) || (l(i), document.activeElement !== i && (i = "first")), i === "first" && ge(se(n), !0), (document.activeElement === r || i === "container") && l(n);
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
function V() {
|
|
246
|
-
const n = b(o);
|
|
247
|
-
if (n) {
|
|
248
|
-
n.removeEventListener(N, D);
|
|
249
|
-
const r = new CustomEvent(C, {
|
|
250
|
-
...W,
|
|
251
|
-
detail: {
|
|
252
|
-
focusReason: d.value
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
n.addEventListener(C, x), n.dispatchEvent(r), !r.defaultPrevented && (d.value == "keyboard" || !we() || n.contains(document.activeElement)) && l(s ?? document.body), n.removeEventListener(C, x), z.remove(p);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return I(() => {
|
|
259
|
-
e.trapped && K(), A(() => e.trapped, (n) => {
|
|
260
|
-
n ? K() : V();
|
|
261
|
-
});
|
|
262
|
-
}), R(() => {
|
|
263
|
-
e.trapped && V(), o.value && (o.value.removeEventListener("keydown", v), o.value.removeEventListener("focusin", P), o.value.removeEventListener("focusout", g), o.value = void 0);
|
|
264
|
-
}), {
|
|
265
|
-
onKeydown: v
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
function Ne(e, t, o, s, a, d) {
|
|
270
|
-
return O(e.$slots, "default", { handleKeydown: e.onKeydown });
|
|
271
|
-
}
|
|
272
|
-
var He = /* @__PURE__ */ te(Ae, [["render", Ne], ["__file", "focus-trap.vue"]]);
|
|
273
|
-
const Ce = le({
|
|
274
|
-
to: {
|
|
275
|
-
type: pe([String, Object]),
|
|
276
|
-
required: !0
|
|
277
|
-
},
|
|
278
|
-
disabled: Boolean
|
|
279
|
-
}), Oe = /* @__PURE__ */ ee({
|
|
280
|
-
__name: "teleport",
|
|
281
|
-
props: Ce,
|
|
282
|
-
setup(e) {
|
|
283
|
-
return (t, o) => t.disabled ? O(t.$slots, "default", { key: 0 }) : (ce(), ue(ie, {
|
|
284
|
-
key: 1,
|
|
285
|
-
to: t.to
|
|
286
|
-
}, [
|
|
287
|
-
O(t.$slots, "default")
|
|
288
|
-
], 8, ["to"]));
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
var Ie = /* @__PURE__ */ te(Oe, [["__file", "teleport.vue"]]);
|
|
292
|
-
const Me = Ee(Ie);
|
|
293
|
-
export {
|
|
294
|
-
Ke as C,
|
|
295
|
-
oe as E,
|
|
296
|
-
Fe as F,
|
|
297
|
-
Ve as I,
|
|
298
|
-
xe as U,
|
|
299
|
-
Me as a,
|
|
300
|
-
He as b,
|
|
301
|
-
ne as c,
|
|
302
|
-
l as d,
|
|
303
|
-
De as i,
|
|
304
|
-
Be as o,
|
|
305
|
-
$e as t
|
|
306
|
-
};
|
package/es/index-a99a5307.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),r=require("./index-19fa1fcf.cjs"),c=require("./base-bdc10baa.cjs"),p=require("./use-form-common-props-592797e2.cjs"),f=c.buildProps({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:p.componentSizes},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),y={close:l=>l instanceof MouseEvent,click:l=>l instanceof MouseEvent},h=e.defineComponent({name:"ElTag"}),v=e.defineComponent({...h,props:f,emits:y,setup(l,{emit:i}){const k=l,C=p.useFormSize(),n=c.useNamespace("tag"),u=e.computed(()=>{const{type:o,hit:s,effect:t,closable:a,round:b}=k;return[n.b(),n.is("closable",a),n.m(o||"primary"),n.m(C.value),n.m(t),n.is("hit",s),n.is("round",b)]}),d=o=>{i("close",o)},m=o=>{i("click",o)},g=o=>{var s,t,a;(a=(t=(s=o==null?void 0:o.component)==null?void 0:s.subTree)==null?void 0:t.component)!=null&&a.bum&&(o.component.subTree.component.bum=null)};return(o,s)=>o.disableTransitions?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:o.color}),onClick:m},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),o.closable?(e.openBlock(),e.createBlock(e.unref(r.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("close")),onClick:e.withModifiers(d,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(r.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(e.Transition,{key:1,name:`${e.unref(n).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:g},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:o.color}),onClick:m},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),o.closable?(e.openBlock(),e.createBlock(e.unref(r.ElIcon),{key:0,class:e.normalizeClass(e.unref(n).e("close")),onClick:e.withModifiers(d,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(r.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var z=c._export_sfc(v,[["__file","tag.vue"]]);const _=c.withInstall(z);exports.ElTag=_;exports.tagProps=f;
|
package/es/index-b90c746b.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),o=require("./el-popper-14a9d493.cjs"),u=require("./dropdown-b2dab5bb.cjs"),i=require("./base-bdc10baa.cjs"),y=i.buildProps({trigger:o.useTooltipTriggerProps.trigger,placement:u.dropdownProps.placement,disabled:o.useTooltipTriggerProps.disabled,visible:o.useTooltipContentProps.visible,transition:o.useTooltipContentProps.transition,popperOptions:u.dropdownProps.popperOptions,tabindex:u.dropdownProps.tabindex,content:o.useTooltipContentProps.content,popperStyle:o.useTooltipContentProps.popperStyle,popperClass:o.useTooltipContentProps.popperClass,enterable:{...o.useTooltipContentProps.enterable,default:!0},effect:{...o.useTooltipContentProps.effect,default:"light"},teleported:o.useTooltipContentProps.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),T={"update:visible":r=>i.isBoolean(r),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},E="onUpdate:visible",S=t.defineComponent({name:"ElPopover"}),B=t.defineComponent({...S,props:y,emits:T,setup(r,{expose:p,emit:s}){const n=r,f=t.computed(()=>n[E]),l=i.useNamespace("popover"),a=t.ref(),c=t.computed(()=>{var e;return(e=t.unref(a))==null?void 0:e.popperRef}),v=t.computed(()=>[{width:i.addUnit(n.width)},n.popperStyle]),b=t.computed(()=>[l.b(),n.popperClass,{[l.m("plain")]:!!n.content}]),m=t.computed(()=>n.transition===`${l.namespace.value}-fade-in-linear`),h=()=>{var e;(e=a.value)==null||e.hide()},w=()=>{s("before-enter")},g=()=>{s("before-leave")},P=()=>{s("after-enter")},C=()=>{s("update:visible",!1),s("after-leave")};return p({popperRef:c,hide:h}),(e,D)=>(t.openBlock(),t.createBlock(t.unref(o.ElTooltip),t.mergeProps({ref_key:"tooltipRef",ref:a},e.$attrs,{trigger:e.trigger,placement:e.placement,disabled:e.disabled,visible:e.visible,transition:e.transition,"popper-options":e.popperOptions,tabindex:e.tabindex,content:e.content,offset:e.offset,"show-after":e.showAfter,"hide-after":e.hideAfter,"auto-close":e.autoClose,"show-arrow":e.showArrow,"aria-label":e.title,effect:e.effect,enterable:e.enterable,"popper-class":t.unref(b),"popper-style":t.unref(v),teleported:e.teleported,persistent:e.persistent,"gpu-acceleration":t.unref(m),"onUpdate:visible":t.unref(f),onBeforeShow:w,onBeforeHide:g,onShow:P,onHide:C}),{content:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(l).e("title")),role:"title"},t.toDisplayString(e.title),3)):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.content),1)])]),default:t.withCtx(()=>[e.$slots.reference?t.renderSlot(e.$slots,"reference",{key:0}):t.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var N=i._export_sfc(B,[["__file","popover.vue"]]);const d=(r,p)=>{const s=p.arg||p.value,n=s==null?void 0:s.popperRef;n&&(n.triggerRef=r)};var k={mounted(r,p){d(r,p)},updated(r,p){d(r,p)}};const A="popover",R=i.withInstallDirective(k,A),U=i.withInstall(N,{directive:R});exports.ElPopover=U;
|
package/es/index-d94bae37.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("vue"),f=require("./base-bdc10baa.cjs");function Q(e){return e===void 0}const Z="update:modelValue",ee="change",te="input",ne='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',oe=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,se=e=>Array.from(e.querySelectorAll(ne)).filter(t=>C(t)&&oe(t)),C=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},re=function(e,t,...s){let o;t.includes("mouse")||t.includes("click")?o="MouseEvents":t.includes("key")?o="KeyboardEvent":o="HTMLEvents";const c=document.createEvent(o);return c.initEvent(t,...s),e.dispatchEvent(c),e},w="focus-trap.focus-after-trapped",L="focus-trap.focus-after-released",ue="focus-trap.focusout-prevented",H={cancelable:!0,bubbles:!1},ce={cancelable:!0,bubbles:!1},M="focusAfterTrapped",$="focusAfterReleased",Y=Symbol("elFocusTrap"),O=r.ref(),P=r.ref(0),U=r.ref(0);let _=0;const X=e=>{const t=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const c=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||c?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t},q=(e,t)=>{for(const s of e)if(!ae(s,t))return s},ae=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},ie=e=>{const t=X(e),s=q(t,e),o=q(t.reverse(),e);return[s,o]},de=e=>e instanceof HTMLInputElement&&"select"in e,E=(e,t)=>{if(e&&e.focus){const s=document.activeElement;let o=!1;f.isElement(e)&&!C(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),o=!0),e.focus({preventScroll:!0}),U.value=window.performance.now(),e!==s&&de(e)&&t&&e.select(),f.isElement(e)&&o&&e.removeAttribute("tabindex")}};function j(e,t){const s=[...e],o=e.indexOf(t);return o!==-1&&s.splice(o,1),s}const fe=()=>{let e=[];return{push:o=>{const c=e[0];c&&o!==c&&c.pause(),e=j(e,o),e.unshift(o)},remove:o=>{var c,l;e=j(e,o),(l=(c=e[0])==null?void 0:c.resume)==null||l.call(c)}}},le=(e,t=!1)=>{const s=document.activeElement;for(const o of e)if(E(o,t),document.activeElement!==s)return},G=fe(),Ee=()=>P.value>U.value,F=()=>{O.value="pointer",P.value=window.performance.now()},J=()=>{O.value="keyboard",P.value=window.performance.now()},pe=()=>(r.onMounted(()=>{_===0&&(document.addEventListener("mousedown",F),document.addEventListener("touchstart",F),document.addEventListener("keydown",J)),_++}),r.onBeforeUnmount(()=>{_--,_<=0&&(document.removeEventListener("mousedown",F),document.removeEventListener("touchstart",F),document.removeEventListener("keydown",J))}),{focusReason:O,lastUserFocusTimestamp:P,lastAutomatedFocusTimestamp:U}),y=e=>new CustomEvent(ue,{...ce,detail:e}),I={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let T=[];const W=e=>{e.code===I.esc&&T.forEach(t=>t(e))},ve=e=>{r.onMounted(()=>{T.length===0&&document.addEventListener("keydown",W),f.isClient&&T.push(e)}),r.onBeforeUnmount(()=>{T=T.filter(t=>t!==e),T.length===0&&f.isClient&&document.removeEventListener("keydown",W)})},Te=r.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[M,$,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const s=r.ref();let o,c;const{focusReason:l}=pe();ve(n=>{e.trapped&&!v.paused&&t("release-requested",n)});const v={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},b=n=>{if(!e.loop&&!e.trapped||v.paused)return;const{code:u,altKey:a,ctrlKey:i,metaKey:d,currentTarget:x,shiftKey:K}=n,{loop:B}=e,z=u===I.tab&&!a&&!i&&!d,m=document.activeElement;if(z&&m){const S=x,[g,A]=ie(S);if(g&&A){if(!K&&m===A){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||(n.preventDefault(),B&&E(g,!0))}else if(K&&[g,S].includes(m)){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||(n.preventDefault(),B&&E(A,!0))}}else if(m===S){const p=y({focusReason:l.value});t("focusout-prevented",p),p.defaultPrevented||n.preventDefault()}}};r.provide(Y,{focusTrapRef:s,onKeydown:b}),r.watch(()=>e.focusTrapEl,n=>{n&&(s.value=n)},{immediate:!0}),r.watch([s],([n],[u])=>{n&&(n.addEventListener("keydown",b),n.addEventListener("focusin",h),n.addEventListener("focusout",N)),u&&(u.removeEventListener("keydown",b),u.removeEventListener("focusin",h),u.removeEventListener("focusout",N))});const R=n=>{t(M,n)},k=n=>t($,n),h=n=>{const u=r.unref(s);if(!u)return;const a=n.target,i=n.relatedTarget,d=a&&u.contains(a);e.trapped||i&&u.contains(i)||(o=i),d&&t("focusin",n),!v.paused&&e.trapped&&(d?c=a:E(c,!0))},N=n=>{const u=r.unref(s);if(!(v.paused||!u))if(e.trapped){const a=n.relatedTarget;!f.isNil(a)&&!u.contains(a)&&setTimeout(()=>{if(!v.paused&&e.trapped){const i=y({focusReason:l.value});t("focusout-prevented",i),i.defaultPrevented||E(c,!0)}},0)}else{const a=n.target;a&&u.contains(a)||t("focusout",n)}};async function D(){await r.nextTick();const n=r.unref(s);if(n){G.push(v);const u=n.contains(document.activeElement)?o:document.activeElement;if(o=u,!n.contains(u)){const i=new Event(w,H);n.addEventListener(w,R),n.dispatchEvent(i),i.defaultPrevented||r.nextTick(()=>{let d=e.focusStartEl;f.isString(d)||(E(d),document.activeElement!==d&&(d="first")),d==="first"&&le(X(n),!0),(document.activeElement===u||d==="container")&&E(n)})}}}function V(){const n=r.unref(s);if(n){n.removeEventListener(w,R);const u=new CustomEvent(L,{...H,detail:{focusReason:l.value}});n.addEventListener(L,k),n.dispatchEvent(u),!u.defaultPrevented&&(l.value=="keyboard"||!Ee()||n.contains(document.activeElement))&&E(o??document.body),n.removeEventListener(L,k),G.remove(v)}}return r.onMounted(()=>{e.trapped&&D(),r.watch(()=>e.trapped,n=>{n?D():V()})}),r.onBeforeUnmount(()=>{e.trapped&&V(),s.value&&(s.value.removeEventListener("keydown",b),s.value.removeEventListener("focusin",h),s.value.removeEventListener("focusout",N),s.value=void 0)}),{onKeydown:b}}});function be(e,t,s,o,c,l){return r.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var me=f._export_sfc(Te,[["render",be],["__file","focus-trap.vue"]]);const _e=f.buildProps({to:{type:f.definePropType([String,Object]),required:!0},disabled:Boolean}),Fe=r.defineComponent({__name:"teleport",props:_e,setup(e){return(t,s)=>t.disabled?r.renderSlot(t.$slots,"default",{key:0}):(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:t.to},[r.renderSlot(t.$slots,"default")],8,["to"]))}});var ye=f._export_sfc(Fe,[["__file","teleport.vue"]]);const Pe=f.withInstall(ye);exports.CHANGE_EVENT=ee;exports.EVENT_CODE=I;exports.ElFocusTrap=me;exports.ElTeleport=Pe;exports.FOCUS_TRAP_INJECTION_KEY=Y;exports.INPUT_EVENT=te;exports.UPDATE_MODEL_EVENT=Z;exports.isFocusable=C;exports.isUndefined=Q;exports.obtainAllFocusableElements=se;exports.triggerEvent=re;exports.tryFocus=E;
|
package/es/index-d99fdc6d.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, computed as a, ref as R, unref as s, openBlock as d, createBlock as U, mergeProps as T, withCtx as u, createElementBlock as $, normalizeClass as D, toDisplayString as c, createCommentVNode as v, renderSlot as b, createTextVNode as V } from "vue";
|
|
2
|
-
import { d as m, b as n, E as O } from "./el-popper-e73466eb.js";
|
|
3
|
-
import { d as f } from "./dropdown-82b80e8b.js";
|
|
4
|
-
import { b as H, l as I, u as L, k as z, _ as F, B as K, w as j } from "./base-d9284bf0.js";
|
|
5
|
-
const q = H({
|
|
6
|
-
trigger: m.trigger,
|
|
7
|
-
placement: f.placement,
|
|
8
|
-
disabled: m.disabled,
|
|
9
|
-
visible: n.visible,
|
|
10
|
-
transition: n.transition,
|
|
11
|
-
popperOptions: f.popperOptions,
|
|
12
|
-
tabindex: f.tabindex,
|
|
13
|
-
content: n.content,
|
|
14
|
-
popperStyle: n.popperStyle,
|
|
15
|
-
popperClass: n.popperClass,
|
|
16
|
-
enterable: {
|
|
17
|
-
...n.enterable,
|
|
18
|
-
default: !0
|
|
19
|
-
},
|
|
20
|
-
effect: {
|
|
21
|
-
...n.effect,
|
|
22
|
-
default: "light"
|
|
23
|
-
},
|
|
24
|
-
teleported: n.teleported,
|
|
25
|
-
title: String,
|
|
26
|
-
width: {
|
|
27
|
-
type: [String, Number],
|
|
28
|
-
default: 150
|
|
29
|
-
},
|
|
30
|
-
offset: {
|
|
31
|
-
type: Number,
|
|
32
|
-
default: void 0
|
|
33
|
-
},
|
|
34
|
-
showAfter: {
|
|
35
|
-
type: Number,
|
|
36
|
-
default: 0
|
|
37
|
-
},
|
|
38
|
-
hideAfter: {
|
|
39
|
-
type: Number,
|
|
40
|
-
default: 200
|
|
41
|
-
},
|
|
42
|
-
autoClose: {
|
|
43
|
-
type: Number,
|
|
44
|
-
default: 0
|
|
45
|
-
},
|
|
46
|
-
showArrow: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: !0
|
|
49
|
-
},
|
|
50
|
-
persistent: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: !0
|
|
53
|
-
},
|
|
54
|
-
"onUpdate:visible": {
|
|
55
|
-
type: Function
|
|
56
|
-
}
|
|
57
|
-
}), G = {
|
|
58
|
-
"update:visible": (t) => I(t),
|
|
59
|
-
"before-enter": () => !0,
|
|
60
|
-
"before-leave": () => !0,
|
|
61
|
-
"after-enter": () => !0,
|
|
62
|
-
"after-leave": () => !0
|
|
63
|
-
}, J = "onUpdate:visible", M = w({
|
|
64
|
-
name: "ElPopover"
|
|
65
|
-
}), Q = /* @__PURE__ */ w({
|
|
66
|
-
...M,
|
|
67
|
-
props: q,
|
|
68
|
-
emits: G,
|
|
69
|
-
setup(t, { expose: r, emit: p }) {
|
|
70
|
-
const o = t, g = a(() => o[J]), i = L("popover"), l = R(), y = a(() => {
|
|
71
|
-
var e;
|
|
72
|
-
return (e = s(l)) == null ? void 0 : e.popperRef;
|
|
73
|
-
}), E = a(() => [
|
|
74
|
-
{
|
|
75
|
-
width: z(o.width)
|
|
76
|
-
},
|
|
77
|
-
o.popperStyle
|
|
78
|
-
]), P = a(() => [i.b(), o.popperClass, { [i.m("plain")]: !!o.content }]), C = a(() => o.transition === `${i.namespace.value}-fade-in-linear`), B = () => {
|
|
79
|
-
var e;
|
|
80
|
-
(e = l.value) == null || e.hide();
|
|
81
|
-
}, S = () => {
|
|
82
|
-
p("before-enter");
|
|
83
|
-
}, k = () => {
|
|
84
|
-
p("before-leave");
|
|
85
|
-
}, N = () => {
|
|
86
|
-
p("after-enter");
|
|
87
|
-
}, A = () => {
|
|
88
|
-
p("update:visible", !1), p("after-leave");
|
|
89
|
-
};
|
|
90
|
-
return r({
|
|
91
|
-
popperRef: y,
|
|
92
|
-
hide: B
|
|
93
|
-
}), (e, _) => (d(), U(s(O), T({
|
|
94
|
-
ref_key: "tooltipRef",
|
|
95
|
-
ref: l
|
|
96
|
-
}, e.$attrs, {
|
|
97
|
-
trigger: e.trigger,
|
|
98
|
-
placement: e.placement,
|
|
99
|
-
disabled: e.disabled,
|
|
100
|
-
visible: e.visible,
|
|
101
|
-
transition: e.transition,
|
|
102
|
-
"popper-options": e.popperOptions,
|
|
103
|
-
tabindex: e.tabindex,
|
|
104
|
-
content: e.content,
|
|
105
|
-
offset: e.offset,
|
|
106
|
-
"show-after": e.showAfter,
|
|
107
|
-
"hide-after": e.hideAfter,
|
|
108
|
-
"auto-close": e.autoClose,
|
|
109
|
-
"show-arrow": e.showArrow,
|
|
110
|
-
"aria-label": e.title,
|
|
111
|
-
effect: e.effect,
|
|
112
|
-
enterable: e.enterable,
|
|
113
|
-
"popper-class": s(P),
|
|
114
|
-
"popper-style": s(E),
|
|
115
|
-
teleported: e.teleported,
|
|
116
|
-
persistent: e.persistent,
|
|
117
|
-
"gpu-acceleration": s(C),
|
|
118
|
-
"onUpdate:visible": s(g),
|
|
119
|
-
onBeforeShow: S,
|
|
120
|
-
onBeforeHide: k,
|
|
121
|
-
onShow: N,
|
|
122
|
-
onHide: A
|
|
123
|
-
}), {
|
|
124
|
-
content: u(() => [
|
|
125
|
-
e.title ? (d(), $("div", {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: D(s(i).e("title")),
|
|
128
|
-
role: "title"
|
|
129
|
-
}, c(e.title), 3)) : v("v-if", !0),
|
|
130
|
-
b(e.$slots, "default", {}, () => [
|
|
131
|
-
V(c(e.content), 1)
|
|
132
|
-
])
|
|
133
|
-
]),
|
|
134
|
-
default: u(() => [
|
|
135
|
-
e.$slots.reference ? b(e.$slots, "reference", { key: 0 }) : v("v-if", !0)
|
|
136
|
-
]),
|
|
137
|
-
_: 3
|
|
138
|
-
}, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]));
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
var W = /* @__PURE__ */ F(Q, [["__file", "popover.vue"]]);
|
|
142
|
-
const h = (t, r) => {
|
|
143
|
-
const p = r.arg || r.value, o = p == null ? void 0 : p.popperRef;
|
|
144
|
-
o && (o.triggerRef = t);
|
|
145
|
-
};
|
|
146
|
-
var X = {
|
|
147
|
-
mounted(t, r) {
|
|
148
|
-
h(t, r);
|
|
149
|
-
},
|
|
150
|
-
updated(t, r) {
|
|
151
|
-
h(t, r);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
const Y = "popover", Z = K(X, Y), re = j(W, {
|
|
155
|
-
directive: Z
|
|
156
|
-
});
|
|
157
|
-
export {
|
|
158
|
-
re as E
|
|
159
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const v=require("./index-02ca0096.cjs"),t=require("vue"),d=require("./base-bdc10baa.cjs"),l=require("./index-19fa1fcf.cjs");var T=function(){try{var n=v.getNative(Object,"defineProperty");return n({},"",{}),n}catch{}}();const I=T;var V=9007199254740991,Z=/^(?:0|[1-9]\d*)$/;function b(n,e){var o=typeof n;return e=e??V,!!e&&(o=="number"||o!="symbol"&&Z.test(n))&&n>-1&&n%1==0&&n<e}function E(n,e,o){e=="__proto__"&&I?I(n,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[e]=o}var j=Object.prototype,A=j.hasOwnProperty;function S(n,e,o){var r=n[e];(!(A.call(n,e)&&v.eq(r,o))||o===void 0&&!(e in n))&&E(n,e,o)}function L(n,e,o,r){if(!v.isObject(n))return n;e=v.castPath(e,n);for(var u=-1,s=e.length,c=s-1,i=n;i!=null&&++u<s;){var a=v.toKey(e[u]),f=o;if(a==="__proto__"||a==="constructor"||a==="prototype")return n;if(u!=c){var m=i[a];f=r?r(m,a,i):void 0,f===void 0&&(f=v.isObject(m)?m:b(e[u+1])?[]:{})}S(i,a,f),i=i[a]}return n}const _={current:0},C=t.ref(0),g=2e3,x=Symbol("elZIndexContextKey"),z=Symbol("zIndexContextKey"),w=n=>{const e=t.getCurrentInstance()?t.inject(x,_):_,o=n||(t.getCurrentInstance()?t.inject(z,void 0):void 0),r=t.computed(()=>{const c=t.unref(o);return d.isNumber(c)?c:g}),u=t.computed(()=>r.value+C.value),s=()=>(e.current++,C.value=e.current,u.value);return!d.isClient&&!t.inject(x)&&d.debugWarn("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
|
|
2
|
-
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,currentZIndex:u,nextZIndex:s}},O=["","default","small","large"],U=d.buildProp({type:String,values:O,required:!1}),F=Symbol("size"),P=()=>{const n=t.inject(F,{});return t.computed(()=>t.unref(n.size)||"")},K=Symbol("emptyValuesContextKey"),h="use-empty-values",q=["",void 0,null],D=void 0,Y=d.buildProps({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:n=>d.isFunction(n)?!n():!n}}),$=(n,e)=>{const o=t.getCurrentInstance()?t.inject(K,t.ref({})):t.ref({}),r=t.computed(()=>n.emptyValues||o.value.emptyValues||q),u=t.computed(()=>d.isFunction(n.valueOnClear)?n.valueOnClear():n.valueOnClear!==void 0?n.valueOnClear:d.isFunction(o.value.valueOnClear)?o.value.valueOnClear():o.value.valueOnClear!==void 0?o.value.valueOnClear:e!==void 0?e:D),s=c=>r.value.includes(c);return r.value.includes(u.value)||d.debugWarn(h,"value-on-clear should be a value of empty-values"),{emptyValues:r,valueOnClear:u,isEmptyValue:s}},J=d.definePropType([String,Object,Function]),M={Close:l.close_default},R={Close:l.close_default,SuccessFilled:l.success_filled_default,InfoFilled:l.info_filled_default,WarningFilled:l.warning_filled_default,CircleCloseFilled:l.circle_close_filled_default},W={success:l.success_filled_default,warning:l.warning_filled_default,error:l.circle_close_filled_default,info:l.info_filled_default},X={validating:l.loading_default,success:l.circle_check_default,error:l.circle_close_default},p=Symbol("formContextKey"),y=Symbol("formItemContextKey"),B=()=>{const n=t.inject(p,void 0),e=t.inject(y,void 0);return{form:n,formItem:e}},G=(n,{formItemContext:e,disableIdGeneration:o,disableIdManagement:r})=>{o||(o=t.ref(!1)),r||(r=t.ref(!1));const u=t.ref();let s;const c=t.computed(()=>{var i;return!!(!(n.label||n.ariaLabel)&&e&&e.inputIds&&((i=e.inputIds)==null?void 0:i.length)<=1)});return t.onMounted(()=>{s=t.watch([t.toRef(n,"id"),o],([i,a])=>{const f=i??(a?void 0:v.useId().value);f!==u.value&&(e!=null&&e.removeInputId&&(u.value&&e.removeInputId(u.value),!(r!=null&&r.value)&&!a&&f&&e.addInputId(f)),u.value=f)},{immediate:!0})}),t.onUnmounted(()=>{s&&s(),e!=null&&e.removeInputId&&u.value&&e.removeInputId(u.value)}),{isLabeledByFormItem:c,inputId:u}},N=n=>{const e=t.getCurrentInstance();return t.computed(()=>{var o,r;return(r=(o=e==null?void 0:e.proxy)==null?void 0:o.$props)==null?void 0:r[n]})},H=(n,e={})=>{const o=t.ref(void 0),r=e.prop?o:N("size"),u=e.global?o:P(),s=e.form?{size:void 0}:t.inject(p,void 0),c=e.formItem?{size:void 0}:t.inject(y,void 0);return t.computed(()=>r.value||t.unref(n)||(c==null?void 0:c.size)||(s==null?void 0:s.size)||u.value||"")},Q=n=>{const e=N("disabled"),o=t.inject(p,void 0);return t.computed(()=>e.value||t.unref(n)||(o==null?void 0:o.disabled)||!1)};exports.CloseComponents=M;exports.SIZE_INJECTION_KEY=F;exports.TypeComponents=R;exports.TypeComponentsMap=W;exports.ValidateComponentsMap=X;exports.assignValue=S;exports.baseAssignValue=E;exports.baseSet=L;exports.componentSizes=O;exports.defaultInitialZIndex=g;exports.defineProperty=I;exports.emptyValuesContextKey=K;exports.formContextKey=p;exports.formItemContextKey=y;exports.iconPropType=J;exports.isIndex=b;exports.useEmptyValues=$;exports.useEmptyValuesProps=Y;exports.useFormDisabled=Q;exports.useFormItem=B;exports.useFormItemInputId=G;exports.useFormSize=H;exports.useGlobalSize=P;exports.useSizeProp=U;exports.useZIndex=w;exports.zIndexContextKey=z;
|