st-comp 0.0.85 → 0.0.87
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/components.d.ts +1 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +10 -10
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +8 -8
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +7 -7
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +1 -1
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +10 -10
- package/es/Table.cjs +1 -20
- package/es/Table.js +390 -3589
- package/es/VarietySearch.cjs +2 -2
- package/es/VarietySearch.js +1414 -1349
- package/es/VirtualTable.cjs +4 -4
- package/es/VirtualTable.js +89 -89
- package/es/{base-4865d432.cjs → base-315cbfab.cjs} +1 -1
- package/es/{base-6faccb01.js → base-e85dae08.js} +31 -31
- package/es/{castArray-bdee0d50.js → castArray-b93d1330.js} +1 -1
- package/es/{castArray-3341cbb4.cjs → castArray-f54f6f75.cjs} +1 -1
- package/es/{config-provider-465c8253.cjs → config-provider-17c85684.cjs} +1 -1
- package/es/{config-provider-be0e9c36.js → config-provider-cb918d0f.js} +7 -7
- package/es/{el-button-1b9c4fd6.js → el-button-aab1dbd4.js} +8 -8
- package/es/{el-button-aad5268b.cjs → el-button-ec16f484.cjs} +1 -1
- package/es/{el-empty-608948d9.cjs → el-empty-16ceef82.cjs} +1 -1
- package/es/{el-empty-348c46f7.js → el-empty-ab3ce002.js} +14 -14
- package/es/el-icon-2d22f211.js +3795 -0
- package/es/el-icon-773986c7.cjs +20 -0
- package/es/el-overlay-6d0c5cc3.cjs +5 -0
- package/es/{el-overlay-400ac6ce.js → el-overlay-98d7f866.js} +48 -48
- package/es/{el-scrollbar-83abe3de.js → el-scrollbar-7b9d83d5.js} +3 -3
- package/es/{el-scrollbar-bc381e35.cjs → el-scrollbar-9473fd47.cjs} +1 -1
- package/es/el-select-d3f15536.cjs +9 -0
- package/es/{el-select-895360ba.js → el-select-fd76b16b.js} +206 -206
- package/es/{el-tag-30cecca3.js → el-tag-87576c55.js} +137 -137
- package/es/el-tag-a6a4d4ef.cjs +1 -0
- package/es/{focus-trap-5ac78614.js → focus-trap-067be6d2.js} +7 -7
- package/es/{focus-trap-a169f160.cjs → focus-trap-ea177336.cjs} +1 -1
- package/es/{index-caa490bf.js → index-07e788d7.js} +5 -2
- package/es/{index-a091492d.cjs → index-47fc965e.cjs} +1 -1
- package/es/{python-0b8dfd75.js → python-86b2bf30.js} +1 -1
- package/es/{python-bd86111b.cjs → python-a0dc573a.cjs} +1 -1
- package/es/raf-b091dc88.js +6 -0
- package/es/{raf-5e5c53db.cjs → raf-c437ab23.cjs} +1 -1
- package/es/{scroll-264c50f3.js → scroll-510cef88.js} +1 -1
- package/es/{scroll-bb8039ba.cjs → scroll-a80e1458.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-item-0e9cae13.js → use-form-item-439ac27c.js} +47 -46
- package/es/{use-form-item-6cef6b15.cjs → use-form-item-7924b6c1.cjs} +2 -2
- package/es/{use-global-config-8c9c775f.js → use-global-config-857b51f5.js} +29 -29
- package/es/{use-global-config-17f3d7c7.cjs → use-global-config-d02be80b.cjs} +1 -1
- package/es/{vnode-abafec9e.cjs → vnode-85a610a2.cjs} +1 -1
- package/es/{vnode-b78096e3.js → vnode-8c7963dc.js} +4 -4
- package/es/{zh-cn-e4d38144.cjs → zh-cn-0024c96d.cjs} +1 -1
- package/es/{zh-cn-8aaa7dd2.js → zh-cn-c2b42b5f.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +143 -143
- package/lib/{index-6c0c83c3.js → index-b5647f94.js} +12712 -12647
- package/lib/{python-e2c7a534.js → python-e2bb6788.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/MonacoEditor/index.vue +3 -0
- package/packages/VarietySearch/components/FactorScreen/index.vue +84 -27
- package/packages/VarietySearch/config.js +9 -5
- package/src/pages/MonacoEditor/index.vue +8 -2
- package/src/pages/VarietySearch/index.vue +41 -6
- package/es/el-icon-158ddc19.cjs +0 -1
- package/es/el-icon-d385d377.js +0 -593
- package/es/el-overlay-4713107e.cjs +0 -5
- package/es/el-select-7116533b.cjs +0 -9
- package/es/el-tag-2c7e5d4a.cjs +0 -1
- package/es/raf-92c5ed6d.js +0 -6
package/es/el-icon-d385d377.js
DELETED
|
@@ -1,593 +0,0 @@
|
|
|
1
|
-
import { d as M, b as Se, a as we, e as Le } from "./use-global-config-8c9c775f.js";
|
|
2
|
-
import { a as Ee, v as ne, b as Be, w as Ie, e as $e, m as Oe, x as Pe, U as K, z as Fe, i as Ne } from "./el-tag-30cecca3.js";
|
|
3
|
-
import { l as te, S as R, p as Ve, U as Te, V as Ge, W as ze, i as H, k as W, x as N, E as V, j as le, A as E, e as De, u as z, _ as D, b as Ue, d as Ae, w as Me, f as ae } from "./base-6faccb01.js";
|
|
4
|
-
import { inject as B, computed as g, getCurrentInstance as oe, watch as se, nextTick as ie, ref as T, toRaw as q, defineComponent as w, useSlots as re, openBlock as y, createBlock as ue, resolveDynamicComponent as de, unref as r, normalizeClass as x, withCtx as ce, createElementVNode as J, withDirectives as I, createElementBlock as C, isRef as $, withModifiers as O, vModelCheckbox as P, renderSlot as U, Fragment as Ke, createTextVNode as ve, toDisplayString as be, createCommentVNode as G, normalizeStyle as Re, provide as He, toRefs as We } from "vue";
|
|
5
|
-
import { n as fe, s as qe, t as A, l as Q, v as me } from "./use-form-item-0e9cae13.js";
|
|
6
|
-
import { U as F } from "./focus-trap-5ac78614.js";
|
|
7
|
-
var X = Object.create, Je = function() {
|
|
8
|
-
function e() {
|
|
9
|
-
}
|
|
10
|
-
return function(n) {
|
|
11
|
-
if (!te(n))
|
|
12
|
-
return {};
|
|
13
|
-
if (X)
|
|
14
|
-
return X(n);
|
|
15
|
-
e.prototype = n;
|
|
16
|
-
var t = new e();
|
|
17
|
-
return e.prototype = void 0, t;
|
|
18
|
-
};
|
|
19
|
-
}();
|
|
20
|
-
const Qe = Je;
|
|
21
|
-
function Xe(e, n, t) {
|
|
22
|
-
switch (t.length) {
|
|
23
|
-
case 0:
|
|
24
|
-
return e.call(n);
|
|
25
|
-
case 1:
|
|
26
|
-
return e.call(n, t[0]);
|
|
27
|
-
case 2:
|
|
28
|
-
return e.call(n, t[0], t[1]);
|
|
29
|
-
case 3:
|
|
30
|
-
return e.call(n, t[0], t[1], t[2]);
|
|
31
|
-
}
|
|
32
|
-
return e.apply(n, t);
|
|
33
|
-
}
|
|
34
|
-
function Jn(e, n) {
|
|
35
|
-
var t = -1, l = e.length;
|
|
36
|
-
for (n || (n = Array(l)); ++t < l; )
|
|
37
|
-
n[t] = e[t];
|
|
38
|
-
return n;
|
|
39
|
-
}
|
|
40
|
-
var Ye = 800, Ze = 16, je = Date.now;
|
|
41
|
-
function _e(e) {
|
|
42
|
-
var n = 0, t = 0;
|
|
43
|
-
return function() {
|
|
44
|
-
var l = je(), s = Ze - (l - t);
|
|
45
|
-
if (t = l, s > 0) {
|
|
46
|
-
if (++n >= Ye)
|
|
47
|
-
return arguments[0];
|
|
48
|
-
} else
|
|
49
|
-
n = 0;
|
|
50
|
-
return e.apply(void 0, arguments);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function en(e) {
|
|
54
|
-
return function() {
|
|
55
|
-
return e;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
var nn = M ? function(e, n) {
|
|
59
|
-
return M(e, "toString", {
|
|
60
|
-
configurable: !0,
|
|
61
|
-
enumerable: !1,
|
|
62
|
-
value: en(n),
|
|
63
|
-
writable: !0
|
|
64
|
-
});
|
|
65
|
-
} : Ee;
|
|
66
|
-
const tn = nn;
|
|
67
|
-
var ln = _e(tn);
|
|
68
|
-
const an = ln;
|
|
69
|
-
function Qn(e, n, t, l) {
|
|
70
|
-
var s = !t;
|
|
71
|
-
t || (t = {});
|
|
72
|
-
for (var d = -1, c = n.length; ++d < c; ) {
|
|
73
|
-
var a = n[d], v = l ? l(t[a], e[a], a, t, e) : void 0;
|
|
74
|
-
v === void 0 && (v = e[a]), s ? Se(t, a, v) : we(t, a, v);
|
|
75
|
-
}
|
|
76
|
-
return t;
|
|
77
|
-
}
|
|
78
|
-
var Y = Math.max;
|
|
79
|
-
function on(e, n, t) {
|
|
80
|
-
return n = Y(n === void 0 ? e.length - 1 : n, 0), function() {
|
|
81
|
-
for (var l = arguments, s = -1, d = Y(l.length - n, 0), c = Array(d); ++s < d; )
|
|
82
|
-
c[s] = l[n + s];
|
|
83
|
-
s = -1;
|
|
84
|
-
for (var a = Array(n + 1); ++s < n; )
|
|
85
|
-
a[s] = l[s];
|
|
86
|
-
return a[n] = t(c), Xe(e, this, a);
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function sn(e) {
|
|
90
|
-
var n = [];
|
|
91
|
-
if (e != null)
|
|
92
|
-
for (var t in Object(e))
|
|
93
|
-
n.push(t);
|
|
94
|
-
return n;
|
|
95
|
-
}
|
|
96
|
-
var rn = Object.prototype, un = rn.hasOwnProperty;
|
|
97
|
-
function dn(e) {
|
|
98
|
-
if (!te(e))
|
|
99
|
-
return sn(e);
|
|
100
|
-
var n = ne(e), t = [];
|
|
101
|
-
for (var l in e)
|
|
102
|
-
l == "constructor" && (n || !un.call(e, l)) || t.push(l);
|
|
103
|
-
return t;
|
|
104
|
-
}
|
|
105
|
-
function Xn(e) {
|
|
106
|
-
return Be(e) ? Ie(e, !0) : dn(e);
|
|
107
|
-
}
|
|
108
|
-
var Z = R ? R.isConcatSpreadable : void 0;
|
|
109
|
-
function cn(e) {
|
|
110
|
-
return Ve(e) || $e(e) || !!(Z && e && e[Z]);
|
|
111
|
-
}
|
|
112
|
-
function pe(e, n, t, l, s) {
|
|
113
|
-
var d = -1, c = e.length;
|
|
114
|
-
for (t || (t = cn), s || (s = []); ++d < c; ) {
|
|
115
|
-
var a = e[d];
|
|
116
|
-
n > 0 && t(a) ? n > 1 ? pe(a, n - 1, t, l, s) : Oe(s, a) : l || (s[s.length] = a);
|
|
117
|
-
}
|
|
118
|
-
return s;
|
|
119
|
-
}
|
|
120
|
-
function vn(e) {
|
|
121
|
-
var n = e == null ? 0 : e.length;
|
|
122
|
-
return n ? pe(e, 1) : [];
|
|
123
|
-
}
|
|
124
|
-
function bn(e) {
|
|
125
|
-
return an(on(e, void 0, vn), e + "");
|
|
126
|
-
}
|
|
127
|
-
var fn = Pe(Object.getPrototypeOf, Object);
|
|
128
|
-
const mn = fn;
|
|
129
|
-
var he = typeof exports == "object" && exports && !exports.nodeType && exports, j = he && typeof module == "object" && module && !module.nodeType && module, pn = j && j.exports === he, _ = pn ? Te.Buffer : void 0, ee = _ ? _.allocUnsafe : void 0;
|
|
130
|
-
function Yn(e, n) {
|
|
131
|
-
if (n)
|
|
132
|
-
return e.slice();
|
|
133
|
-
var t = e.length, l = ee ? ee(t) : new e.constructor(t);
|
|
134
|
-
return e.copy(l), l;
|
|
135
|
-
}
|
|
136
|
-
function hn(e) {
|
|
137
|
-
var n = new e.constructor(e.byteLength);
|
|
138
|
-
return new K(n).set(new K(e)), n;
|
|
139
|
-
}
|
|
140
|
-
function Zn(e, n) {
|
|
141
|
-
var t = n ? hn(e.buffer) : e.buffer;
|
|
142
|
-
return new e.constructor(t, e.byteOffset, e.length);
|
|
143
|
-
}
|
|
144
|
-
function jn(e) {
|
|
145
|
-
return typeof e.constructor == "function" && !ne(e) ? Qe(mn(e)) : {};
|
|
146
|
-
}
|
|
147
|
-
function gn(e, n, t) {
|
|
148
|
-
for (var l = -1, s = n.length, d = {}; ++l < s; ) {
|
|
149
|
-
var c = n[l], a = Ge(e, c);
|
|
150
|
-
t(a, c) && Le(d, ze(c, e), a);
|
|
151
|
-
}
|
|
152
|
-
return d;
|
|
153
|
-
}
|
|
154
|
-
function kn(e, n) {
|
|
155
|
-
return gn(e, n, function(t, l) {
|
|
156
|
-
return Fe(e, l);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
var xn = bn(function(e, n) {
|
|
160
|
-
return e == null ? {} : kn(e, n);
|
|
161
|
-
});
|
|
162
|
-
const yn = xn, ge = {
|
|
163
|
-
modelValue: {
|
|
164
|
-
type: [Number, String, Boolean],
|
|
165
|
-
default: void 0
|
|
166
|
-
},
|
|
167
|
-
label: {
|
|
168
|
-
type: [String, Boolean, Number, Object]
|
|
169
|
-
},
|
|
170
|
-
indeterminate: Boolean,
|
|
171
|
-
disabled: Boolean,
|
|
172
|
-
checked: Boolean,
|
|
173
|
-
name: {
|
|
174
|
-
type: String,
|
|
175
|
-
default: void 0
|
|
176
|
-
},
|
|
177
|
-
trueLabel: {
|
|
178
|
-
type: [String, Number],
|
|
179
|
-
default: void 0
|
|
180
|
-
},
|
|
181
|
-
falseLabel: {
|
|
182
|
-
type: [String, Number],
|
|
183
|
-
default: void 0
|
|
184
|
-
},
|
|
185
|
-
id: {
|
|
186
|
-
type: String,
|
|
187
|
-
default: void 0
|
|
188
|
-
},
|
|
189
|
-
controls: {
|
|
190
|
-
type: String,
|
|
191
|
-
default: void 0
|
|
192
|
-
},
|
|
193
|
-
border: Boolean,
|
|
194
|
-
size: fe,
|
|
195
|
-
tabindex: [String, Number],
|
|
196
|
-
validateEvent: {
|
|
197
|
-
type: Boolean,
|
|
198
|
-
default: !0
|
|
199
|
-
}
|
|
200
|
-
}, ke = {
|
|
201
|
-
[F]: (e) => H(e) || W(e) || N(e),
|
|
202
|
-
change: (e) => H(e) || W(e) || N(e)
|
|
203
|
-
}, L = Symbol("checkboxGroupContextKey"), Cn = ({
|
|
204
|
-
model: e,
|
|
205
|
-
isChecked: n
|
|
206
|
-
}) => {
|
|
207
|
-
const t = B(L, void 0), l = g(() => {
|
|
208
|
-
var d, c;
|
|
209
|
-
const a = (d = t == null ? void 0 : t.max) == null ? void 0 : d.value, v = (c = t == null ? void 0 : t.min) == null ? void 0 : c.value;
|
|
210
|
-
return !V(a) && e.value.length >= a && !n.value || !V(v) && e.value.length <= v && n.value;
|
|
211
|
-
});
|
|
212
|
-
return {
|
|
213
|
-
isDisabled: qe(g(() => (t == null ? void 0 : t.disabled.value) || l.value)),
|
|
214
|
-
isLimitDisabled: l
|
|
215
|
-
};
|
|
216
|
-
}, Sn = (e, {
|
|
217
|
-
model: n,
|
|
218
|
-
isLimitExceeded: t,
|
|
219
|
-
hasOwnLabel: l,
|
|
220
|
-
isDisabled: s,
|
|
221
|
-
isLabeledByFormItem: d
|
|
222
|
-
}) => {
|
|
223
|
-
const c = B(L, void 0), { formItem: a } = A(), { emit: v } = oe();
|
|
224
|
-
function o(i) {
|
|
225
|
-
var f, m;
|
|
226
|
-
return i === e.trueLabel || i === !0 ? (f = e.trueLabel) != null ? f : !0 : (m = e.falseLabel) != null ? m : !1;
|
|
227
|
-
}
|
|
228
|
-
function p(i, f) {
|
|
229
|
-
v("change", o(i), f);
|
|
230
|
-
}
|
|
231
|
-
function h(i) {
|
|
232
|
-
if (t.value)
|
|
233
|
-
return;
|
|
234
|
-
const f = i.target;
|
|
235
|
-
v("change", o(f.checked), i);
|
|
236
|
-
}
|
|
237
|
-
async function S(i) {
|
|
238
|
-
t.value || !l.value && !s.value && d.value && (i.composedPath().some((b) => b.tagName === "LABEL") || (n.value = o([!1, e.falseLabel].includes(n.value)), await ie(), p(n.value, i)));
|
|
239
|
-
}
|
|
240
|
-
const u = g(() => (c == null ? void 0 : c.validateEvent) || e.validateEvent);
|
|
241
|
-
return se(() => e.modelValue, () => {
|
|
242
|
-
u.value && (a == null || a.validate("change").catch((i) => le(i)));
|
|
243
|
-
}), {
|
|
244
|
-
handleChange: h,
|
|
245
|
-
onClickRoot: S
|
|
246
|
-
};
|
|
247
|
-
}, wn = (e) => {
|
|
248
|
-
const n = T(!1), { emit: t } = oe(), l = B(L, void 0), s = g(() => V(l) === !1), d = T(!1);
|
|
249
|
-
return {
|
|
250
|
-
model: g({
|
|
251
|
-
get() {
|
|
252
|
-
var a, v;
|
|
253
|
-
return s.value ? (a = l == null ? void 0 : l.modelValue) == null ? void 0 : a.value : (v = e.modelValue) != null ? v : n.value;
|
|
254
|
-
},
|
|
255
|
-
set(a) {
|
|
256
|
-
var v, o;
|
|
257
|
-
s.value && E(a) ? (d.value = ((v = l == null ? void 0 : l.max) == null ? void 0 : v.value) !== void 0 && a.length > (l == null ? void 0 : l.max.value), d.value === !1 && ((o = l == null ? void 0 : l.changeEvent) == null || o.call(l, a))) : (t(F, a), n.value = a);
|
|
258
|
-
}
|
|
259
|
-
}),
|
|
260
|
-
isGroup: s,
|
|
261
|
-
isLimitExceeded: d
|
|
262
|
-
};
|
|
263
|
-
}, Ln = (e, n, { model: t }) => {
|
|
264
|
-
const l = B(L, void 0), s = T(!1), d = g(() => {
|
|
265
|
-
const o = t.value;
|
|
266
|
-
return N(o) ? o : E(o) ? De(e.label) ? o.map(q).some((p) => Ne(p, e.label)) : o.map(q).includes(e.label) : o != null ? o === e.trueLabel : !!o;
|
|
267
|
-
}), c = Q(g(() => {
|
|
268
|
-
var o;
|
|
269
|
-
return (o = l == null ? void 0 : l.size) == null ? void 0 : o.value;
|
|
270
|
-
}), {
|
|
271
|
-
prop: !0
|
|
272
|
-
}), a = Q(g(() => {
|
|
273
|
-
var o;
|
|
274
|
-
return (o = l == null ? void 0 : l.size) == null ? void 0 : o.value;
|
|
275
|
-
})), v = g(() => !!(n.default || e.label));
|
|
276
|
-
return {
|
|
277
|
-
checkboxButtonSize: c,
|
|
278
|
-
isChecked: d,
|
|
279
|
-
isFocused: s,
|
|
280
|
-
checkboxSize: a,
|
|
281
|
-
hasOwnLabel: v
|
|
282
|
-
};
|
|
283
|
-
}, En = (e, { model: n }) => {
|
|
284
|
-
function t() {
|
|
285
|
-
E(n.value) && !n.value.includes(e.label) ? n.value.push(e.label) : n.value = e.trueLabel || !0;
|
|
286
|
-
}
|
|
287
|
-
e.checked && t();
|
|
288
|
-
}, xe = (e, n) => {
|
|
289
|
-
const { formItem: t } = A(), { model: l, isGroup: s, isLimitExceeded: d } = wn(e), {
|
|
290
|
-
isFocused: c,
|
|
291
|
-
isChecked: a,
|
|
292
|
-
checkboxButtonSize: v,
|
|
293
|
-
checkboxSize: o,
|
|
294
|
-
hasOwnLabel: p
|
|
295
|
-
} = Ln(e, n, { model: l }), { isDisabled: h } = Cn({ model: l, isChecked: a }), { inputId: S, isLabeledByFormItem: u } = me(e, {
|
|
296
|
-
formItemContext: t,
|
|
297
|
-
disableIdGeneration: p,
|
|
298
|
-
disableIdManagement: s
|
|
299
|
-
}), { handleChange: i, onClickRoot: f } = Sn(e, {
|
|
300
|
-
model: l,
|
|
301
|
-
isLimitExceeded: d,
|
|
302
|
-
hasOwnLabel: p,
|
|
303
|
-
isDisabled: h,
|
|
304
|
-
isLabeledByFormItem: u
|
|
305
|
-
});
|
|
306
|
-
return En(e, { model: l }), {
|
|
307
|
-
inputId: S,
|
|
308
|
-
isLabeledByFormItem: u,
|
|
309
|
-
isChecked: a,
|
|
310
|
-
isDisabled: h,
|
|
311
|
-
isFocused: c,
|
|
312
|
-
checkboxButtonSize: v,
|
|
313
|
-
checkboxSize: o,
|
|
314
|
-
hasOwnLabel: p,
|
|
315
|
-
model: l,
|
|
316
|
-
handleChange: i,
|
|
317
|
-
onClickRoot: f
|
|
318
|
-
};
|
|
319
|
-
}, Bn = ["tabindex", "role", "aria-checked"], In = ["id", "aria-hidden", "name", "tabindex", "disabled", "true-value", "false-value"], $n = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"], On = w({
|
|
320
|
-
name: "ElCheckbox"
|
|
321
|
-
}), Pn = /* @__PURE__ */ w({
|
|
322
|
-
...On,
|
|
323
|
-
props: ge,
|
|
324
|
-
emits: ke,
|
|
325
|
-
setup(e) {
|
|
326
|
-
const n = e, t = re(), {
|
|
327
|
-
inputId: l,
|
|
328
|
-
isLabeledByFormItem: s,
|
|
329
|
-
isChecked: d,
|
|
330
|
-
isDisabled: c,
|
|
331
|
-
isFocused: a,
|
|
332
|
-
checkboxSize: v,
|
|
333
|
-
hasOwnLabel: o,
|
|
334
|
-
model: p,
|
|
335
|
-
handleChange: h,
|
|
336
|
-
onClickRoot: S
|
|
337
|
-
} = xe(n, t), u = z("checkbox"), i = g(() => [
|
|
338
|
-
u.b(),
|
|
339
|
-
u.m(v.value),
|
|
340
|
-
u.is("disabled", c.value),
|
|
341
|
-
u.is("bordered", n.border),
|
|
342
|
-
u.is("checked", d.value)
|
|
343
|
-
]), f = g(() => [
|
|
344
|
-
u.e("input"),
|
|
345
|
-
u.is("disabled", c.value),
|
|
346
|
-
u.is("checked", d.value),
|
|
347
|
-
u.is("indeterminate", n.indeterminate),
|
|
348
|
-
u.is("focus", a.value)
|
|
349
|
-
]);
|
|
350
|
-
return (m, b) => (y(), ue(de(!r(o) && r(s) ? "span" : "label"), {
|
|
351
|
-
class: x(r(i)),
|
|
352
|
-
"aria-controls": m.indeterminate ? m.controls : null,
|
|
353
|
-
onClick: r(S)
|
|
354
|
-
}, {
|
|
355
|
-
default: ce(() => [
|
|
356
|
-
J("span", {
|
|
357
|
-
class: x(r(f)),
|
|
358
|
-
tabindex: m.indeterminate ? 0 : void 0,
|
|
359
|
-
role: m.indeterminate ? "checkbox" : void 0,
|
|
360
|
-
"aria-checked": m.indeterminate ? "mixed" : void 0
|
|
361
|
-
}, [
|
|
362
|
-
m.trueLabel || m.falseLabel ? I((y(), C("input", {
|
|
363
|
-
key: 0,
|
|
364
|
-
id: r(l),
|
|
365
|
-
"onUpdate:modelValue": b[0] || (b[0] = (k) => $(p) ? p.value = k : null),
|
|
366
|
-
class: x(r(u).e("original")),
|
|
367
|
-
type: "checkbox",
|
|
368
|
-
"aria-hidden": m.indeterminate ? "true" : "false",
|
|
369
|
-
name: m.name,
|
|
370
|
-
tabindex: m.tabindex,
|
|
371
|
-
disabled: r(c),
|
|
372
|
-
"true-value": m.trueLabel,
|
|
373
|
-
"false-value": m.falseLabel,
|
|
374
|
-
onChange: b[1] || (b[1] = (...k) => r(h) && r(h)(...k)),
|
|
375
|
-
onFocus: b[2] || (b[2] = (k) => a.value = !0),
|
|
376
|
-
onBlur: b[3] || (b[3] = (k) => a.value = !1),
|
|
377
|
-
onClick: b[4] || (b[4] = O(() => {
|
|
378
|
-
}, ["stop"]))
|
|
379
|
-
}, null, 42, In)), [
|
|
380
|
-
[P, r(p)]
|
|
381
|
-
]) : I((y(), C("input", {
|
|
382
|
-
key: 1,
|
|
383
|
-
id: r(l),
|
|
384
|
-
"onUpdate:modelValue": b[5] || (b[5] = (k) => $(p) ? p.value = k : null),
|
|
385
|
-
class: x(r(u).e("original")),
|
|
386
|
-
type: "checkbox",
|
|
387
|
-
"aria-hidden": m.indeterminate ? "true" : "false",
|
|
388
|
-
disabled: r(c),
|
|
389
|
-
value: m.label,
|
|
390
|
-
name: m.name,
|
|
391
|
-
tabindex: m.tabindex,
|
|
392
|
-
onChange: b[6] || (b[6] = (...k) => r(h) && r(h)(...k)),
|
|
393
|
-
onFocus: b[7] || (b[7] = (k) => a.value = !0),
|
|
394
|
-
onBlur: b[8] || (b[8] = (k) => a.value = !1),
|
|
395
|
-
onClick: b[9] || (b[9] = O(() => {
|
|
396
|
-
}, ["stop"]))
|
|
397
|
-
}, null, 42, $n)), [
|
|
398
|
-
[P, r(p)]
|
|
399
|
-
]),
|
|
400
|
-
J("span", {
|
|
401
|
-
class: x(r(u).e("inner"))
|
|
402
|
-
}, null, 2)
|
|
403
|
-
], 10, Bn),
|
|
404
|
-
r(o) ? (y(), C("span", {
|
|
405
|
-
key: 0,
|
|
406
|
-
class: x(r(u).e("label"))
|
|
407
|
-
}, [
|
|
408
|
-
U(m.$slots, "default"),
|
|
409
|
-
m.$slots.default ? G("v-if", !0) : (y(), C(Ke, { key: 0 }, [
|
|
410
|
-
ve(be(m.label), 1)
|
|
411
|
-
], 64))
|
|
412
|
-
], 2)) : G("v-if", !0)
|
|
413
|
-
]),
|
|
414
|
-
_: 3
|
|
415
|
-
}, 8, ["class", "aria-controls", "onClick"]));
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
var Fn = /* @__PURE__ */ D(Pn, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);
|
|
419
|
-
const Nn = ["name", "tabindex", "disabled", "true-value", "false-value"], Vn = ["name", "tabindex", "disabled", "value"], Tn = w({
|
|
420
|
-
name: "ElCheckboxButton"
|
|
421
|
-
}), Gn = /* @__PURE__ */ w({
|
|
422
|
-
...Tn,
|
|
423
|
-
props: ge,
|
|
424
|
-
emits: ke,
|
|
425
|
-
setup(e) {
|
|
426
|
-
const n = e, t = re(), {
|
|
427
|
-
isFocused: l,
|
|
428
|
-
isChecked: s,
|
|
429
|
-
isDisabled: d,
|
|
430
|
-
checkboxButtonSize: c,
|
|
431
|
-
model: a,
|
|
432
|
-
handleChange: v
|
|
433
|
-
} = xe(n, t), o = B(L, void 0), p = z("checkbox"), h = g(() => {
|
|
434
|
-
var u, i, f, m;
|
|
435
|
-
const b = (i = (u = o == null ? void 0 : o.fill) == null ? void 0 : u.value) != null ? i : "";
|
|
436
|
-
return {
|
|
437
|
-
backgroundColor: b,
|
|
438
|
-
borderColor: b,
|
|
439
|
-
color: (m = (f = o == null ? void 0 : o.textColor) == null ? void 0 : f.value) != null ? m : "",
|
|
440
|
-
boxShadow: b ? `-1px 0 0 0 ${b}` : void 0
|
|
441
|
-
};
|
|
442
|
-
}), S = g(() => [
|
|
443
|
-
p.b("button"),
|
|
444
|
-
p.bm("button", c.value),
|
|
445
|
-
p.is("disabled", d.value),
|
|
446
|
-
p.is("checked", s.value),
|
|
447
|
-
p.is("focus", l.value)
|
|
448
|
-
]);
|
|
449
|
-
return (u, i) => (y(), C("label", {
|
|
450
|
-
class: x(r(S))
|
|
451
|
-
}, [
|
|
452
|
-
u.trueLabel || u.falseLabel ? I((y(), C("input", {
|
|
453
|
-
key: 0,
|
|
454
|
-
"onUpdate:modelValue": i[0] || (i[0] = (f) => $(a) ? a.value = f : null),
|
|
455
|
-
class: x(r(p).be("button", "original")),
|
|
456
|
-
type: "checkbox",
|
|
457
|
-
name: u.name,
|
|
458
|
-
tabindex: u.tabindex,
|
|
459
|
-
disabled: r(d),
|
|
460
|
-
"true-value": u.trueLabel,
|
|
461
|
-
"false-value": u.falseLabel,
|
|
462
|
-
onChange: i[1] || (i[1] = (...f) => r(v) && r(v)(...f)),
|
|
463
|
-
onFocus: i[2] || (i[2] = (f) => l.value = !0),
|
|
464
|
-
onBlur: i[3] || (i[3] = (f) => l.value = !1),
|
|
465
|
-
onClick: i[4] || (i[4] = O(() => {
|
|
466
|
-
}, ["stop"]))
|
|
467
|
-
}, null, 42, Nn)), [
|
|
468
|
-
[P, r(a)]
|
|
469
|
-
]) : I((y(), C("input", {
|
|
470
|
-
key: 1,
|
|
471
|
-
"onUpdate:modelValue": i[5] || (i[5] = (f) => $(a) ? a.value = f : null),
|
|
472
|
-
class: x(r(p).be("button", "original")),
|
|
473
|
-
type: "checkbox",
|
|
474
|
-
name: u.name,
|
|
475
|
-
tabindex: u.tabindex,
|
|
476
|
-
disabled: r(d),
|
|
477
|
-
value: u.label,
|
|
478
|
-
onChange: i[6] || (i[6] = (...f) => r(v) && r(v)(...f)),
|
|
479
|
-
onFocus: i[7] || (i[7] = (f) => l.value = !0),
|
|
480
|
-
onBlur: i[8] || (i[8] = (f) => l.value = !1),
|
|
481
|
-
onClick: i[9] || (i[9] = O(() => {
|
|
482
|
-
}, ["stop"]))
|
|
483
|
-
}, null, 42, Vn)), [
|
|
484
|
-
[P, r(a)]
|
|
485
|
-
]),
|
|
486
|
-
u.$slots.default || u.label ? (y(), C("span", {
|
|
487
|
-
key: 2,
|
|
488
|
-
class: x(r(p).be("button", "inner")),
|
|
489
|
-
style: Re(r(s) ? r(h) : void 0)
|
|
490
|
-
}, [
|
|
491
|
-
U(u.$slots, "default", {}, () => [
|
|
492
|
-
ve(be(u.label), 1)
|
|
493
|
-
])
|
|
494
|
-
], 6)) : G("v-if", !0)
|
|
495
|
-
], 2));
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
var ye = /* @__PURE__ */ D(Gn, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);
|
|
499
|
-
const zn = Ue({
|
|
500
|
-
modelValue: {
|
|
501
|
-
type: Ae(Array),
|
|
502
|
-
default: () => []
|
|
503
|
-
},
|
|
504
|
-
disabled: Boolean,
|
|
505
|
-
min: Number,
|
|
506
|
-
max: Number,
|
|
507
|
-
size: fe,
|
|
508
|
-
label: String,
|
|
509
|
-
fill: String,
|
|
510
|
-
textColor: String,
|
|
511
|
-
tag: {
|
|
512
|
-
type: String,
|
|
513
|
-
default: "div"
|
|
514
|
-
},
|
|
515
|
-
validateEvent: {
|
|
516
|
-
type: Boolean,
|
|
517
|
-
default: !0
|
|
518
|
-
}
|
|
519
|
-
}), Dn = {
|
|
520
|
-
[F]: (e) => E(e),
|
|
521
|
-
change: (e) => E(e)
|
|
522
|
-
}, Un = w({
|
|
523
|
-
name: "ElCheckboxGroup"
|
|
524
|
-
}), An = /* @__PURE__ */ w({
|
|
525
|
-
...Un,
|
|
526
|
-
props: zn,
|
|
527
|
-
emits: Dn,
|
|
528
|
-
setup(e, { emit: n }) {
|
|
529
|
-
const t = e, l = z("checkbox"), { formItem: s } = A(), { inputId: d, isLabeledByFormItem: c } = me(t, {
|
|
530
|
-
formItemContext: s
|
|
531
|
-
}), a = async (o) => {
|
|
532
|
-
n(F, o), await ie(), n("change", o);
|
|
533
|
-
}, v = g({
|
|
534
|
-
get() {
|
|
535
|
-
return t.modelValue;
|
|
536
|
-
},
|
|
537
|
-
set(o) {
|
|
538
|
-
a(o);
|
|
539
|
-
}
|
|
540
|
-
});
|
|
541
|
-
return He(L, {
|
|
542
|
-
...yn(We(t), [
|
|
543
|
-
"size",
|
|
544
|
-
"min",
|
|
545
|
-
"max",
|
|
546
|
-
"disabled",
|
|
547
|
-
"validateEvent",
|
|
548
|
-
"fill",
|
|
549
|
-
"textColor"
|
|
550
|
-
]),
|
|
551
|
-
modelValue: v,
|
|
552
|
-
changeEvent: a
|
|
553
|
-
}), se(() => t.modelValue, () => {
|
|
554
|
-
t.validateEvent && (s == null || s.validate("change").catch((o) => le(o)));
|
|
555
|
-
}), (o, p) => {
|
|
556
|
-
var h;
|
|
557
|
-
return y(), ue(de(o.tag), {
|
|
558
|
-
id: r(d),
|
|
559
|
-
class: x(r(l).b("group")),
|
|
560
|
-
role: "group",
|
|
561
|
-
"aria-label": r(c) ? void 0 : o.label || "checkbox-group",
|
|
562
|
-
"aria-labelledby": r(c) ? (h = r(s)) == null ? void 0 : h.labelId : void 0
|
|
563
|
-
}, {
|
|
564
|
-
default: ce(() => [
|
|
565
|
-
U(o.$slots, "default")
|
|
566
|
-
]),
|
|
567
|
-
_: 3
|
|
568
|
-
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
var Ce = /* @__PURE__ */ D(An, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);
|
|
573
|
-
const _n = Me(Fn, {
|
|
574
|
-
CheckboxButton: ye,
|
|
575
|
-
CheckboxGroup: Ce
|
|
576
|
-
});
|
|
577
|
-
ae(ye);
|
|
578
|
-
const et = ae(Ce);
|
|
579
|
-
export {
|
|
580
|
-
_n as E,
|
|
581
|
-
Jn as a,
|
|
582
|
-
Yn as b,
|
|
583
|
-
Qn as c,
|
|
584
|
-
Zn as d,
|
|
585
|
-
pe as e,
|
|
586
|
-
hn as f,
|
|
587
|
-
mn as g,
|
|
588
|
-
et as h,
|
|
589
|
-
jn as i,
|
|
590
|
-
Xn as k,
|
|
591
|
-
on as o,
|
|
592
|
-
an as s
|
|
593
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),l=require("./base-4865d432.cjs"),$=require("./vnode-abafec9e.cjs"),M=require("./use-form-item-6cef6b15.cjs"),V=require("./focus-trap-a169f160.cjs"),J=require("./use-global-config-17f3d7c7.cjs"),Q=require("./scroll-bb8039ba.cjs"),ee=(...t)=>o=>{t.forEach(s=>{l.isFunction$1(s)?s(o):s.value=o})},te=(t,o,s)=>{let a={offsetX:0,offsetY:0};const n=c=>{const f=c.clientX,v=c.clientY,{offsetX:m,offsetY:y}=a,p=t.value.getBoundingClientRect(),d=p.left,_=p.top,N=p.width,B=p.height,O=document.documentElement.clientWidth,D=document.documentElement.clientHeight,P=-d+m,T=-_+y,b=O-d-N+m,k=D-_-B+y,I=E=>{const u=Math.min(Math.max(m+E.clientX-f,P),b),C=Math.min(Math.max(y+E.clientY-v,T),k);a={offsetX:u,offsetY:C},t.value.style.transform=`translate(${l.addUnit(u)}, ${l.addUnit(C)})`},h=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",h)},r=()=>{o.value&&t.value&&o.value.addEventListener("mousedown",n)},i=()=>{o.value&&t.value&&o.value.removeEventListener("mousedown",n)};e.onMounted(()=>{e.watchEffect(()=>{s.value?r():i()})}),e.onBeforeUnmount(()=>{i()})};/**
|
|
2
|
-
* @vue/reactivity v3.4.19
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/function U(t,...o){console.warn(`[Vue warn] ${t}`,...o)}let oe;function ne(t,o=oe){o&&o.active&&o.effects.push(t)}let F;class se{constructor(o,s,a,n){this.fn=o,this.trigger=s,this.scheduler=a,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,ne(this,n)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,ae();for(let o=0;o<this._depsLength;o++){const s=this.deps[o];if(s.computed&&(le(s.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),re()}return this._dirtyLevel>=4}set dirty(o){this._dirtyLevel=o?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let o=L,s=F;try{return L=!0,F=this,this._runnings++,q(this),this.fn()}finally{Y(this),this._runnings--,F=s,L=o}}stop(){var o;this.active&&(q(this),Y(this),(o=this.onStop)==null||o.call(this),this.active=!1)}}function le(t){return t.value}function q(t){t._trackId++,t._depsLength=0}function Y(t){if(t.deps.length>t._depsLength){for(let o=t._depsLength;o<t.deps.length;o++)W(t.deps[o],t);t.deps.length=t._depsLength}}function W(t,o){const s=t.get(o);s!==void 0&&o._trackId!==s&&(t.delete(o),t.size===0&&t.cleanup())}let L=!0,R=0;const j=[];function ae(){j.push(L),L=!1}function re(){const t=j.pop();L=t===void 0?!0:t}function ie(){R++}function ue(){for(R--;!R&&x.length;)x.shift()()}function ce(t,o,s){var a;if(o.get(t)!==t._trackId){o.set(t,t._trackId);const n=t.deps[t._depsLength];n!==o?(n&&W(n,t),t.deps[t._depsLength++]=o):t._depsLength++,process.env.NODE_ENV!=="production"&&((a=t.onTrack)==null||a.call(t,l.extend({effect:t},s)))}}const x=[];function de(t,o,s){var a;ie();for(const n of t.keys()){let r;n._dirtyLevel<o&&(r??(r=t.get(n)===n._trackId))&&(n._shouldSchedule||(n._shouldSchedule=n._dirtyLevel===0),n._dirtyLevel=o),n._shouldSchedule&&(r??(r=t.get(n)===n._trackId))&&(process.env.NODE_ENV!=="production"&&((a=n.onTrigger)==null||a.call(n,l.extend({effect:n},s))),n.trigger(),(!n._runnings||n.allowRecurse)&&n._dirtyLevel!==2&&(n._shouldSchedule=!1,n.scheduler&&x.push(n.scheduler)))}ue()}const fe=(t,o)=>{const s=new Map;return s.cleanup=t,s.computed=o,s};Symbol(process.env.NODE_ENV!=="production"?"iterate":"");Symbol(process.env.NODE_ENV!=="production"?"Map key iterate":"");new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(l.isSymbol));function A(t){const o=t&&t.__v_raw;return o?A(o):t}const me="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class H{constructor(o,s,a,n){this._setter=s,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new se(()=>o(this._value),()=>z(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=a}get value(){const o=A(this);return(!o._cacheable||o.effect.dirty)&&l.hasChanged(o._value,o._value=o.effect.run())&&z(o,4),ve(o),o.effect._dirtyLevel>=2&&(process.env.NODE_ENV!=="production"&&U(me),z(o,2)),o._value}set value(o){this._setter(o)}get _dirty(){return this.effect.dirty}set _dirty(o){this.effect.dirty=o}}function pe(t,o,s=!1){let a,n;const r=l.isFunction$1(t);r?(a=t,n=process.env.NODE_ENV!=="production"?()=>{U("Write operation failed: computed value is readonly")}:l.NOOP):(a=t.get,n=t.set);const i=new H(a,n,r||!n,s);return process.env.NODE_ENV!=="production"&&o&&!s&&(i.effect.onTrack=o.onTrack,i.effect.onTrigger=o.onTrigger),i}function ve(t){var o;L&&F&&(t=A(t),ce(F,(o=t.dep)!=null?o:t.dep=fe(()=>t.dep=void 0,t instanceof H?t:void 0),process.env.NODE_ENV!=="production"?{target:t,type:"get",key:"value"}:void 0))}function z(t,o=4,s){t=A(t);const a=t.dep;a&&de(a,o,process.env.NODE_ENV!=="production"?{target:t,type:"set",key:"value",newValue:s}:void 0)}const he=(t,o={})=>{e.isRef(t)||l.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=o.ns||l.useNamespace("popup"),a=pe(()=>s.bm("parent","hidden"));if(!l.isClient||l.hasClass(document.body,a.value))return;let n=0,r=!1,i="0";const c=()=>{setTimeout(()=>{l.removeClass(document==null?void 0:document.body,a.value),r&&document&&(document.body.style.width=i)},200)};e.watch(t,f=>{if(!f){c();return}r=!l.hasClass(document.body,a.value),r&&(i=document.body.style.width),n=Q.getScrollBarWidth(s.namespace.value);const v=document.documentElement.clientHeight<document.body.scrollHeight,m=l.getStyle(document.body,"overflowY");n>0&&(v||m==="scroll")&&r&&(document.body.style.width=`calc(100% - ${n}px)`),l.addClass(document.body,a.value)}),e.onScopeDispose(()=>c())},X=t=>{if(!t)return{onClick:l.NOOP,onMousedown:l.NOOP,onMouseup:l.NOOP};let o=!1,s=!1;return{onClick:i=>{o&&s&&t(i),o=s=!1},onMousedown:i=>{o=i.target===i.currentTarget},onMouseup:i=>{s=i.target===i.currentTarget}}},ge=l.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:l.definePropType([String,Array,Object])},zIndex:{type:l.definePropType([String,Number])}}),ye={click:t=>t instanceof MouseEvent},Ce="overlay";var _e=e.defineComponent({name:"ElOverlay",props:ge,emits:ye,setup(t,{slots:o,emit:s}){const a=l.useNamespace(Ce),n=f=>{s("click",f)},{onClick:r,onMousedown:i,onMouseup:c}=X(t.customMaskEvent?void 0:n);return()=>t.mask?e.createVNode("div",{class:[a.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:r,onMousedown:i,onMouseup:c},[e.renderSlot(o,"default")],$.PatchFlags.STYLE|$.PatchFlags.CLASS|$.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):e.h("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[e.renderSlot(o,"default")])}});const Ee=_e,K=Symbol("dialogInjectionKey"),G=l.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:M.iconPropType},customClass:{type:String,default:""},draggable:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),be={close:()=>!0},ke=["aria-level"],we=["aria-label"],Se=["id"],Le=e.defineComponent({name:"ElDialogContent"}),Ne=e.defineComponent({...Le,props:G,emits:be,setup(t){const o=t,{t:s}=l.useLocale(),{Close:a}=M.CloseComponents,{dialogRef:n,headerRef:r,bodyId:i,ns:c,style:f}=e.inject(K),{focusTrapRef:v}=e.inject(V.FOCUS_TRAP_INJECTION_KEY),m=e.computed(()=>[c.b(),c.is("fullscreen",o.fullscreen),c.is("draggable",o.draggable),c.is("align-center",o.alignCenter),{[c.m("center")]:o.center},o.customClass]),y=ee(v,n),p=e.computed(()=>o.draggable);return te(n,r,p),(d,_)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(y),class:e.normalizeClass(e.unref(m)),style:e.normalizeStyle(e.unref(f)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:r,class:e.normalizeClass(e.unref(c).e("header"))},[e.renderSlot(d.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":d.ariaLevel,class:e.normalizeClass(e.unref(c).e("title"))},e.toDisplayString(d.title),11,ke)]),d.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(s)("el.dialog.close"),class:e.normalizeClass(e.unref(c).e("headerbtn")),type:"button",onClick:_[0]||(_[0]=N=>d.$emit("close"))},[e.createVNode(e.unref(M.ElIcon),{class:e.normalizeClass(e.unref(c).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.closeIcon||e.unref(a))))]),_:1},8,["class"])],10,we)):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(i),class:e.normalizeClass(e.unref(c).e("body"))},[e.renderSlot(d.$slots,"default")],10,Se),d.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass(e.unref(c).e("footer"))},[e.renderSlot(d.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var De=l._export_sfc(Ne,[["__file","/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);const Te=l.buildProps({...G,appendToBody:Boolean,beforeClose:{type:l.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),Ie={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[V.UPDATE_MODEL_EVENT]:t=>l.isBoolean(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Me=(t,o)=>{const a=e.getCurrentInstance().emit,{nextZIndex:n}=M.useZIndex();let r="";const i=l.useId(),c=l.useId(),f=e.ref(!1),v=e.ref(!1),m=e.ref(!1),y=e.ref(t.zIndex||n());let p,d;const _=J.useGlobalConfig("namespace",l.defaultNamespace),N=e.computed(()=>{const g={},S=`--${_.value}-dialog`;return t.fullscreen||(t.top&&(g[`${S}-margin-top`]=t.top),t.width&&(g[`${S}-width`]=l.addUnit(t.width))),g}),B=e.computed(()=>t.alignCenter?{display:"flex"}:{});function O(){a("opened")}function D(){a("closed"),a(V.UPDATE_MODEL_EVENT,!1),t.destroyOnClose&&(m.value=!1)}function P(){a("close")}function T(){d==null||d(),p==null||p(),t.openDelay&&t.openDelay>0?{stop:p}=l.useTimeoutFn(()=>h(),t.openDelay):h()}function b(){p==null||p(),d==null||d(),t.closeDelay&&t.closeDelay>0?{stop:d}=l.useTimeoutFn(()=>E(),t.closeDelay):E()}function k(){function g(S){S||(v.value=!0,f.value=!1)}t.beforeClose?t.beforeClose(g):b()}function I(){t.closeOnClickModal&&k()}function h(){l.isClient&&(f.value=!0)}function E(){f.value=!1}function u(){a("openAutoFocus")}function C(){a("closeAutoFocus")}function w(g){var S;((S=g.detail)==null?void 0:S.focusReason)==="pointer"&&g.preventDefault()}t.lockScroll&&he(f);function Z(){t.closeOnPressEscape&&k()}return e.watch(()=>t.modelValue,g=>{g?(v.value=!1,T(),m.value=!0,y.value=t.zIndex?y.value++:n(),e.nextTick(()=>{a("open"),o.value&&(o.value.scrollTop=0)})):f.value&&b()}),e.watch(()=>t.fullscreen,g=>{o.value&&(g?(r=o.value.style.transform,o.value.style.transform=""):o.value.style.transform=r)}),e.onMounted(()=>{t.modelValue&&(f.value=!0,m.value=!0,T())}),{afterEnter:O,afterLeave:D,beforeLeave:P,handleClose:k,onModalClick:I,close:b,doClose:E,onOpenAutoFocus:u,onCloseAutoFocus:C,onCloseRequested:Z,onFocusoutPrevented:w,titleId:i,bodyId:c,closed:v,style:N,overlayDialogStyle:B,rendered:m,visible:f,zIndex:y}},Be=["aria-label","aria-labelledby","aria-describedby"],Oe=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),Pe=e.defineComponent({...Oe,props:Te,emits:Ie,setup(t,{expose:o}){const s=t,a=e.useSlots();M.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!a.title)),M.useDeprecated({scope:"el-dialog",from:"custom-class",replacement:"class",version:"2.3.0",ref:"https://element-plus.org/en-US/component/dialog.html#attributes",type:"Attribute"},e.computed(()=>!!s.customClass));const n=l.useNamespace("dialog"),r=e.ref(),i=e.ref(),c=e.ref(),{visible:f,titleId:v,bodyId:m,style:y,overlayDialogStyle:p,rendered:d,zIndex:_,afterEnter:N,afterLeave:B,beforeLeave:O,handleClose:D,onModalClick:P,onOpenAutoFocus:T,onCloseAutoFocus:b,onCloseRequested:k,onFocusoutPrevented:I}=Me(s,r);e.provide(K,{dialogRef:r,headerRef:i,bodyId:m,ns:n,rendered:d,style:y});const h=X(P),E=e.computed(()=>s.draggable&&!s.fullscreen);return o({visible:f,dialogContentRef:c}),(u,C)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!u.appendToBody},[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(N),onAfterLeave:e.unref(B),onBeforeLeave:e.unref(O),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(Ee),{"custom-mask-event":"",mask:u.modal,"overlay-class":u.modalClass,"z-index":e.unref(_)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":u.title||void 0,"aria-labelledby":u.title?void 0:e.unref(v),"aria-describedby":e.unref(m),class:e.normalizeClass(`${e.unref(n).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(p)),onClick:C[0]||(C[0]=(...w)=>e.unref(h).onClick&&e.unref(h).onClick(...w)),onMousedown:C[1]||(C[1]=(...w)=>e.unref(h).onMousedown&&e.unref(h).onMousedown(...w)),onMouseup:C[2]||(C[2]=(...w)=>e.unref(h).onMouseup&&e.unref(h).onMouseup(...w))},[e.createVNode(e.unref(V.ElFocusTrap),{loop:"",trapped:e.unref(f),"focus-start-el":"container",onFocusAfterTrapped:e.unref(T),onFocusAfterReleased:e.unref(b),onFocusoutPrevented:e.unref(I),onReleaseRequested:e.unref(k)},{default:e.withCtx(()=>[e.unref(d)?(e.openBlock(),e.createBlock(De,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:c},u.$attrs,{"custom-class":u.customClass,center:u.center,"align-center":u.alignCenter,"close-icon":u.closeIcon,draggable:e.unref(E),fullscreen:u.fullscreen,"show-close":u.showClose,title:u.title,"aria-level":u.headerAriaLevel,onClose:e.unref(D)}),e.createSlots({header:e.withCtx(()=>[u.$slots.title?e.renderSlot(u.$slots,"title",{key:1}):e.renderSlot(u.$slots,"header",{key:0,close:e.unref(D),titleId:e.unref(v),titleClass:e.unref(n).e("title")})]),default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:2},[u.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(u.$slots,"footer")])}:void 0]),1040,["custom-class","center","align-center","close-icon","draggable","fullscreen","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,Be)]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(f)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"]))}});var Fe=l._export_sfc(Pe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);const Ve=l.withInstall(Fe);exports.ElDialog=Ve;
|