st-comp 0.0.93 → 0.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/components.d.ts +13 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +2 -2
  4. package/es/Dialog.cjs +1 -5
  5. package/es/Dialog.js +45 -711
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +463 -1
  8. package/es/Kline.cjs +1 -1
  9. package/es/Kline.js +92 -91
  10. package/es/KlineNew.cjs +1 -1
  11. package/es/KlineNew.js +10 -9
  12. package/es/Pagination.cjs +1 -1
  13. package/es/Pagination.js +106 -104
  14. package/es/Table.cjs +1 -20
  15. package/es/Table.js +361 -4253
  16. package/es/VarietySearch.cjs +1 -1
  17. package/es/VarietySearch.js +2545 -1
  18. package/es/VirtualTable.cjs +3 -3
  19. package/es/VirtualTable.js +249 -254
  20. package/es/base-6e64c2e6.js +762 -0
  21. package/es/base-8776b83e.cjs +9 -0
  22. package/es/castArray-59d5ae43.cjs +1 -0
  23. package/es/castArray-8ec29ca6.js +10 -0
  24. package/es/config-provider-76ef1b35.cjs +1 -0
  25. package/es/config-provider-f4278c8e.js +46 -0
  26. package/es/{el-button-9476b767.js → el-button-4c7ae9df.js} +52 -52
  27. package/es/{el-button-ed961332.cjs → el-button-65e4598f.cjs} +1 -1
  28. package/es/{el-empty-f4c08c01.js → el-empty-05e13b3c.js} +3 -3
  29. package/es/{el-empty-7adcc7f0.cjs → el-empty-dfe11c21.cjs} +1 -1
  30. package/es/el-icon-0ea8fbf8.cjs +1 -0
  31. package/es/el-icon-4ed993c7.js +1 -0
  32. package/es/el-input-11327619.cjs +9 -0
  33. package/es/el-input-f4898cfa.js +544 -0
  34. package/es/el-overlay-9d9c6ba9.cjs +5 -0
  35. package/es/el-overlay-d7af7dda.js +678 -0
  36. package/es/el-popover-4a4a4b02.cjs +1 -0
  37. package/es/el-popover-dc9c7ff7.js +133 -0
  38. package/es/el-radio-group-a31fb7c0.js +1743 -0
  39. package/es/el-radio-group-cc2d6c87.cjs +12 -0
  40. package/es/{el-scrollbar-ffb7b9c1.js → el-scrollbar-a00aca2f.js} +48 -48
  41. package/es/{el-scrollbar-586be9bd.cjs → el-scrollbar-f197b544.cjs} +1 -1
  42. package/es/el-select-5dbb0da3.cjs +1 -0
  43. package/es/el-select-b9cf452e.js +1360 -0
  44. package/es/el-table-column-1e15361e.cjs +20 -0
  45. package/es/el-table-column-675f51e6.js +3795 -0
  46. package/es/el-tag-c9d5baa7.cjs +1 -0
  47. package/es/{el-tag-7549c103.js → el-tag-f878b1f1.js} +126 -119
  48. package/es/{focus-trap-5fc152a0.js → focus-trap-2677bd39.js} +35 -34
  49. package/es/focus-trap-5f42842b.cjs +1 -0
  50. package/es/raf-32ed81f4.js +6 -0
  51. package/es/{raf-c4bba516.cjs → raf-7c366b55.cjs} +1 -1
  52. package/es/{scroll-38e17abc.cjs → scroll-22a00b05.cjs} +1 -1
  53. package/es/{scroll-c6e51ef8.js → scroll-9b9249e9.js} +5 -5
  54. package/es/style.css +1 -1
  55. package/es/use-form-item-67e7ef93.cjs +3 -0
  56. package/es/use-form-item-bfc7dddf.js +669 -0
  57. package/es/use-global-config-89daeba3.js +110 -0
  58. package/es/use-global-config-f9103903.cjs +1 -0
  59. package/es/{vnode-40f9df3c.cjs → vnode-69f3ca85.cjs} +1 -1
  60. package/es/{vnode-f4b846cb.js → vnode-aa3448ec.js} +1 -1
  61. package/es/zh-cn-720e514b.cjs +1 -0
  62. package/es/{zh-cn-e36dfbf4.js → zh-cn-e662dc89.js} +6 -45
  63. package/lib/bundle.js +1 -1
  64. package/lib/bundle.umd.cjs +174 -174
  65. package/lib/{index-4635557b.js → index-5fe750ca.js} +27924 -27395
  66. package/lib/{python-aa056c80.js → python-65fdc0e1.js} +1 -1
  67. package/lib/style.css +1 -1
  68. package/package.json +1 -1
  69. package/packages/VarietySearch/components/CommonIndicator/index.vue +270 -112
  70. package/packages/VarietySearch/components/FactorScreen/index.vue +44 -5
  71. package/packages/VarietySearch/config.js +12 -1
  72. package/packages/VarietySearch/index.vue +8 -0
  73. package/es/base-8aa55db5.js +0 -725
  74. package/es/base-b187e78f.cjs +0 -9
  75. package/es/el-select-a6cf0236.js +0 -1893
  76. package/es/el-select-eaa79c54.cjs +0 -9
  77. package/es/el-tag-5a8b728a.cjs +0 -1
  78. package/es/focus-trap-ea1e7a19.cjs +0 -1
  79. package/es/raf-3a2b250a.js +0 -6
  80. package/es/use-form-item-bd4b9eeb.js +0 -531
  81. package/es/use-form-item-c25c7251.cjs +0 -3
  82. package/es/use-global-config-2d21cd56.js +0 -110
  83. package/es/use-global-config-bce8cdd8.cjs +0 -1
  84. package/es/zh-cn-a61d484e.cjs +0 -1
package/es/Dialog.js CHANGED
@@ -1,682 +1,16 @@
1
- import { H as fe, f as K, I as Le, N as U, J as De, K as me, L as Te, u as te, a as pe, M as ne, O as Ie, P as Me, Q as Ne, b as oe, d as G, e as Be, _ as ve, R as $e, c as le, q as Ve, S as ae, w as Oe } from "./base-8aa55db5.js";
2
- import { z as Fe, E as Pe } from "./zh-cn-e36dfbf4.js";
3
- import { E as Ae } from "./el-button-9476b767.js";
4
- import { onMounted as he, watchEffect as Re, onBeforeUnmount as ze, isRef as Ye, watch as J, onScopeDispose as xe, defineComponent as A, createVNode as w, renderSlot as b, h as Ue, inject as ie, computed as S, openBlock as M, createElementBlock as q, unref as n, normalizeClass as k, normalizeStyle as se, createElementVNode as P, toDisplayString as He, withCtx as y, createBlock as H, resolveDynamicComponent as We, createCommentVNode as Z, getCurrentInstance as qe, ref as N, nextTick as Xe, useSlots as je, provide as Ke, Teleport as Ge, Transition as Je, withDirectives as Ze, mergeProps as Qe, createSlots as et, vShow as tt, createTextVNode as re } from "vue";
5
- import { P as X } from "./vnode-f4b846cb.js";
6
- import { g as ot, E as st, C as nt, a as lt, b as ue } from "./use-form-item-bd4b9eeb.js";
7
- import { F as at, U as ge, E as it } from "./focus-trap-5fc152a0.js";
8
- import { u as rt } from "./use-global-config-2d21cd56.js";
9
- import { g as ut } from "./scroll-c6e51ef8.js";
1
+ import "./base-6e64c2e6.js";
2
+ import { z as V, E as g } from "./zh-cn-e662dc89.js";
3
+ import { E as y } from "./el-overlay-d7af7dda.js";
4
+ import { E as v } from "./el-button-4c7ae9df.js";
5
+ import { defineComponent as C, computed as E, openBlock as x, createBlock as k, unref as B, withCtx as o, createVNode as i, normalizeStyle as b, createElementVNode as d, createTextVNode as m } from "vue";
6
+ import "./config-provider-f4278c8e.js";
7
+ import "./use-global-config-89daeba3.js";
8
+ import "./use-form-item-bfc7dddf.js";
9
+ import "./vnode-aa3448ec.js";
10
+ import "./focus-trap-2677bd39.js";
11
+ import "./scroll-9b9249e9.js";
10
12
  import "./index-657047bb.js";
11
- const ct = (...e) => (t) => {
12
- e.forEach((s) => {
13
- fe(s) ? s(t) : s.value = t;
14
- });
15
- }, dt = (e, t, s) => {
16
- let l = {
17
- offsetX: 0,
18
- offsetY: 0
19
- };
20
- const o = (a) => {
21
- const c = a.clientX, p = a.clientY, { offsetX: f, offsetY: m } = l, v = e.value.getBoundingClientRect(), d = v.left, C = v.top, $ = v.width, R = v.height, z = document.documentElement.clientWidth, V = document.documentElement.clientHeight, Y = -d + f, O = -C + m, L = z - d - $ + f, D = V - C - R + m, F = (E) => {
22
- const u = Math.min(Math.max(f + E.clientX - c, Y), L), _ = Math.min(Math.max(m + E.clientY - p, O), D);
23
- l = {
24
- offsetX: u,
25
- offsetY: _
26
- }, e.value.style.transform = `translate(${K(u)}, ${K(_)})`;
27
- }, h = () => {
28
- document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", h);
29
- };
30
- document.addEventListener("mousemove", F), document.addEventListener("mouseup", h);
31
- }, i = () => {
32
- t.value && e.value && t.value.addEventListener("mousedown", o);
33
- }, r = () => {
34
- t.value && e.value && t.value.removeEventListener("mousedown", o);
35
- };
36
- he(() => {
37
- Re(() => {
38
- s.value ? i() : r();
39
- });
40
- }), ze(() => {
41
- r();
42
- });
43
- };
44
- /**
45
- * @vue/reactivity v3.4.19
46
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
47
- * @license MIT
48
- **/
49
- function ye(e, ...t) {
50
- console.warn(`[Vue warn] ${e}`, ...t);
51
- }
52
- let ft;
53
- function mt(e, t = ft) {
54
- t && t.active && t.effects.push(e);
55
- }
56
- let x;
57
- class pt {
58
- constructor(t, s, l, o) {
59
- this.fn = t, this.trigger = s, this.scheduler = l, this.active = !0, this.deps = [], this._dirtyLevel = 4, this._trackId = 0, this._runnings = 0, this._shouldSchedule = !1, this._depsLength = 0, mt(this, o);
60
- }
61
- get dirty() {
62
- if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
63
- this._dirtyLevel = 1, ht();
64
- for (let t = 0; t < this._depsLength; t++) {
65
- const s = this.deps[t];
66
- if (s.computed && (vt(s.computed), this._dirtyLevel >= 4))
67
- break;
68
- }
69
- this._dirtyLevel === 1 && (this._dirtyLevel = 0), gt();
70
- }
71
- return this._dirtyLevel >= 4;
72
- }
73
- set dirty(t) {
74
- this._dirtyLevel = t ? 4 : 0;
75
- }
76
- run() {
77
- if (this._dirtyLevel = 0, !this.active)
78
- return this.fn();
79
- let t = B, s = x;
80
- try {
81
- return B = !0, x = this, this._runnings++, ce(this), this.fn();
82
- } finally {
83
- de(this), this._runnings--, x = s, B = t;
84
- }
85
- }
86
- stop() {
87
- var t;
88
- this.active && (ce(this), de(this), (t = this.onStop) == null || t.call(this), this.active = !1);
89
- }
90
- }
91
- function vt(e) {
92
- return e.value;
93
- }
94
- function ce(e) {
95
- e._trackId++, e._depsLength = 0;
96
- }
97
- function de(e) {
98
- if (e.deps.length > e._depsLength) {
99
- for (let t = e._depsLength; t < e.deps.length; t++)
100
- _e(e.deps[t], e);
101
- e.deps.length = e._depsLength;
102
- }
103
- }
104
- function _e(e, t) {
105
- const s = e.get(t);
106
- s !== void 0 && t._trackId !== s && (e.delete(t), e.size === 0 && e.cleanup());
107
- }
108
- let B = !0, Q = 0;
109
- const Ce = [];
110
- function ht() {
111
- Ce.push(B), B = !1;
112
- }
113
- function gt() {
114
- const e = Ce.pop();
115
- B = e === void 0 ? !0 : e;
116
- }
117
- function yt() {
118
- Q++;
119
- }
120
- function _t() {
121
- for (Q--; !Q && ee.length; )
122
- ee.shift()();
123
- }
124
- function Ct(e, t, s) {
125
- var l;
126
- if (t.get(e) !== e._trackId) {
127
- t.set(e, e._trackId);
128
- const o = e.deps[e._depsLength];
129
- o !== t ? (o && _e(o, e), e.deps[e._depsLength++] = t) : e._depsLength++, process.env.NODE_ENV !== "production" && ((l = e.onTrack) == null || l.call(e, me({ effect: e }, s)));
130
- }
131
- }
132
- const ee = [];
133
- function bt(e, t, s) {
134
- var l;
135
- yt();
136
- for (const o of e.keys()) {
137
- let i;
138
- o._dirtyLevel < t && (i ?? (i = e.get(o) === o._trackId)) && (o._shouldSchedule || (o._shouldSchedule = o._dirtyLevel === 0), o._dirtyLevel = t), o._shouldSchedule && (i ?? (i = e.get(o) === o._trackId)) && (process.env.NODE_ENV !== "production" && ((l = o.onTrigger) == null || l.call(o, me({ effect: o }, s))), o.trigger(), (!o._runnings || o.allowRecurse) && o._dirtyLevel !== 2 && (o._shouldSchedule = !1, o.scheduler && ee.push(o.scheduler)));
139
- }
140
- _t();
141
- }
142
- const Et = (e, t) => {
143
- const s = /* @__PURE__ */ new Map();
144
- return s.cleanup = e, s.computed = t, s;
145
- };
146
- Symbol(process.env.NODE_ENV !== "production" ? "iterate" : "");
147
- Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : "");
148
- new Set(
149
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Le)
150
- );
151
- function W(e) {
152
- const t = e && e.__v_raw;
153
- return t ? W(t) : e;
154
- }
155
- const kt = "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";
156
- class be {
157
- constructor(t, s, l, o) {
158
- this._setter = s, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this.effect = new pt(
159
- () => t(this._value),
160
- () => j(
161
- this,
162
- this.effect._dirtyLevel === 2 ? 2 : 3
163
- )
164
- ), this.effect.computed = this, this.effect.active = this._cacheable = !o, this.__v_isReadonly = l;
165
- }
166
- get value() {
167
- const t = W(this);
168
- return (!t._cacheable || t.effect.dirty) && De(t._value, t._value = t.effect.run()) && j(t, 4), St(t), t.effect._dirtyLevel >= 2 && (process.env.NODE_ENV !== "production" && ye(kt), j(t, 2)), t._value;
169
- }
170
- set value(t) {
171
- this._setter(t);
172
- }
173
- // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
174
- get _dirty() {
175
- return this.effect.dirty;
176
- }
177
- set _dirty(t) {
178
- this.effect.dirty = t;
179
- }
180
- // #endregion
181
- }
182
- function wt(e, t, s = !1) {
183
- let l, o;
184
- const i = fe(e);
185
- i ? (l = e, o = process.env.NODE_ENV !== "production" ? () => {
186
- ye("Write operation failed: computed value is readonly");
187
- } : U) : (l = e.get, o = e.set);
188
- const r = new be(l, o, i || !o, s);
189
- return process.env.NODE_ENV !== "production" && t && !s && (r.effect.onTrack = t.onTrack, r.effect.onTrigger = t.onTrigger), r;
190
- }
191
- function St(e) {
192
- var t;
193
- B && x && (e = W(e), Ct(
194
- x,
195
- (t = e.dep) != null ? t : e.dep = Et(
196
- () => e.dep = void 0,
197
- e instanceof be ? e : void 0
198
- ),
199
- process.env.NODE_ENV !== "production" ? {
200
- target: e,
201
- type: "get",
202
- key: "value"
203
- } : void 0
204
- ));
205
- }
206
- function j(e, t = 4, s) {
207
- e = W(e);
208
- const l = e.dep;
209
- l && bt(
210
- l,
211
- t,
212
- process.env.NODE_ENV !== "production" ? {
213
- target: e,
214
- type: "set",
215
- key: "value",
216
- newValue: s
217
- } : void 0
218
- );
219
- }
220
- const Lt = (e, t = {}) => {
221
- Ye(e) || Te("[useLockscreen]", "You need to pass a ref param to this function");
222
- const s = t.ns || te("popup"), l = wt(() => s.bm("parent", "hidden"));
223
- if (!pe || ne(document.body, l.value))
224
- return;
225
- let o = 0, i = !1, r = "0";
226
- const a = () => {
227
- setTimeout(() => {
228
- Ne(document == null ? void 0 : document.body, l.value), i && document && (document.body.style.width = r);
229
- }, 200);
230
- };
231
- J(e, (c) => {
232
- if (!c) {
233
- a();
234
- return;
235
- }
236
- i = !ne(document.body, l.value), i && (r = document.body.style.width), o = ut(s.namespace.value);
237
- const p = document.documentElement.clientHeight < document.body.scrollHeight, f = Ie(document.body, "overflowY");
238
- o > 0 && (p || f === "scroll") && i && (document.body.style.width = `calc(100% - ${o}px)`), Me(document.body, l.value);
239
- }), xe(() => a());
240
- }, Ee = (e) => {
241
- if (!e)
242
- return { onClick: U, onMousedown: U, onMouseup: U };
243
- let t = !1, s = !1;
244
- return { onClick: (r) => {
245
- t && s && e(r), t = s = !1;
246
- }, onMousedown: (r) => {
247
- t = r.target === r.currentTarget;
248
- }, onMouseup: (r) => {
249
- s = r.target === r.currentTarget;
250
- } };
251
- }, Dt = oe({
252
- mask: {
253
- type: Boolean,
254
- default: !0
255
- },
256
- customMaskEvent: {
257
- type: Boolean,
258
- default: !1
259
- },
260
- overlayClass: {
261
- type: G([
262
- String,
263
- Array,
264
- Object
265
- ])
266
- },
267
- zIndex: {
268
- type: G([String, Number])
269
- }
270
- }), Tt = {
271
- click: (e) => e instanceof MouseEvent
272
- }, It = "overlay";
273
- var Mt = A({
274
- name: "ElOverlay",
275
- props: Dt,
276
- emits: Tt,
277
- setup(e, { slots: t, emit: s }) {
278
- const l = te(It), o = (c) => {
279
- s("click", c);
280
- }, { onClick: i, onMousedown: r, onMouseup: a } = Ee(e.customMaskEvent ? void 0 : o);
281
- return () => e.mask ? w("div", {
282
- class: [l.b(), e.overlayClass],
283
- style: {
284
- zIndex: e.zIndex
285
- },
286
- onClick: i,
287
- onMousedown: r,
288
- onMouseup: a
289
- }, [b(t, "default")], X.STYLE | X.CLASS | X.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Ue("div", {
290
- class: e.overlayClass,
291
- style: {
292
- zIndex: e.zIndex,
293
- position: "fixed",
294
- top: "0px",
295
- right: "0px",
296
- bottom: "0px",
297
- left: "0px"
298
- }
299
- }, [b(t, "default")]);
300
- }
301
- });
302
- const Nt = Mt, ke = Symbol("dialogInjectionKey"), we = oe({
303
- center: Boolean,
304
- alignCenter: Boolean,
305
- closeIcon: {
306
- type: ot
307
- },
308
- customClass: {
309
- type: String,
310
- default: ""
311
- },
312
- draggable: Boolean,
313
- fullscreen: Boolean,
314
- showClose: {
315
- type: Boolean,
316
- default: !0
317
- },
318
- title: {
319
- type: String,
320
- default: ""
321
- },
322
- ariaLevel: {
323
- type: String,
324
- default: "2"
325
- }
326
- }), Bt = {
327
- close: () => !0
328
- }, $t = ["aria-level"], Vt = ["aria-label"], Ot = ["id"], Ft = A({ name: "ElDialogContent" }), Pt = /* @__PURE__ */ A({
329
- ...Ft,
330
- props: we,
331
- emits: Bt,
332
- setup(e) {
333
- const t = e, { t: s } = Be(), { Close: l } = nt, { dialogRef: o, headerRef: i, bodyId: r, ns: a, style: c } = ie(ke), { focusTrapRef: p } = ie(at), f = S(() => [
334
- a.b(),
335
- a.is("fullscreen", t.fullscreen),
336
- a.is("draggable", t.draggable),
337
- a.is("align-center", t.alignCenter),
338
- { [a.m("center")]: t.center },
339
- t.customClass
340
- ]), m = ct(p, o), v = S(() => t.draggable);
341
- return dt(o, i, v), (d, C) => (M(), q("div", {
342
- ref: n(m),
343
- class: k(n(f)),
344
- style: se(n(c)),
345
- tabindex: "-1"
346
- }, [
347
- P("header", {
348
- ref_key: "headerRef",
349
- ref: i,
350
- class: k(n(a).e("header"))
351
- }, [
352
- b(d.$slots, "header", {}, () => [
353
- P("span", {
354
- role: "heading",
355
- "aria-level": d.ariaLevel,
356
- class: k(n(a).e("title"))
357
- }, He(d.title), 11, $t)
358
- ]),
359
- d.showClose ? (M(), q("button", {
360
- key: 0,
361
- "aria-label": n(s)("el.dialog.close"),
362
- class: k(n(a).e("headerbtn")),
363
- type: "button",
364
- onClick: C[0] || (C[0] = ($) => d.$emit("close"))
365
- }, [
366
- w(n(st), {
367
- class: k(n(a).e("close"))
368
- }, {
369
- default: y(() => [
370
- (M(), H(We(d.closeIcon || n(l))))
371
- ]),
372
- _: 1
373
- }, 8, ["class"])
374
- ], 10, Vt)) : Z("v-if", !0)
375
- ], 2),
376
- P("div", {
377
- id: n(r),
378
- class: k(n(a).e("body"))
379
- }, [
380
- b(d.$slots, "default")
381
- ], 10, Ot),
382
- d.$slots.footer ? (M(), q("footer", {
383
- key: 0,
384
- class: k(n(a).e("footer"))
385
- }, [
386
- b(d.$slots, "footer")
387
- ], 2)) : Z("v-if", !0)
388
- ], 6));
389
- }
390
- });
391
- var At = /* @__PURE__ */ ve(Pt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);
392
- const Rt = oe({
393
- ...we,
394
- appendToBody: Boolean,
395
- beforeClose: {
396
- type: G(Function)
397
- },
398
- destroyOnClose: Boolean,
399
- closeOnClickModal: {
400
- type: Boolean,
401
- default: !0
402
- },
403
- closeOnPressEscape: {
404
- type: Boolean,
405
- default: !0
406
- },
407
- lockScroll: {
408
- type: Boolean,
409
- default: !0
410
- },
411
- modal: {
412
- type: Boolean,
413
- default: !0
414
- },
415
- openDelay: {
416
- type: Number,
417
- default: 0
418
- },
419
- closeDelay: {
420
- type: Number,
421
- default: 0
422
- },
423
- top: {
424
- type: String
425
- },
426
- modelValue: Boolean,
427
- modalClass: String,
428
- width: {
429
- type: [String, Number]
430
- },
431
- zIndex: {
432
- type: Number
433
- },
434
- trapFocus: {
435
- type: Boolean,
436
- default: !1
437
- },
438
- headerAriaLevel: {
439
- type: String,
440
- default: "2"
441
- }
442
- }), zt = {
443
- open: () => !0,
444
- opened: () => !0,
445
- close: () => !0,
446
- closed: () => !0,
447
- [ge]: (e) => $e(e),
448
- openAutoFocus: () => !0,
449
- closeAutoFocus: () => !0
450
- }, Yt = (e, t) => {
451
- const l = qe().emit, { nextZIndex: o } = lt();
452
- let i = "";
453
- const r = le(), a = le(), c = N(!1), p = N(!1), f = N(!1), m = N(e.zIndex || o());
454
- let v, d;
455
- const C = rt("namespace", Ve), $ = S(() => {
456
- const g = {}, I = `--${C.value}-dialog`;
457
- return e.fullscreen || (e.top && (g[`${I}-margin-top`] = e.top), e.width && (g[`${I}-width`] = K(e.width))), g;
458
- }), R = S(() => e.alignCenter ? { display: "flex" } : {});
459
- function z() {
460
- l("opened");
461
- }
462
- function V() {
463
- l("closed"), l(ge, !1), e.destroyOnClose && (f.value = !1);
464
- }
465
- function Y() {
466
- l("close");
467
- }
468
- function O() {
469
- d == null || d(), v == null || v(), e.openDelay && e.openDelay > 0 ? { stop: v } = ae(() => h(), e.openDelay) : h();
470
- }
471
- function L() {
472
- v == null || v(), d == null || d(), e.closeDelay && e.closeDelay > 0 ? { stop: d } = ae(() => E(), e.closeDelay) : E();
473
- }
474
- function D() {
475
- function g(I) {
476
- I || (p.value = !0, c.value = !1);
477
- }
478
- e.beforeClose ? e.beforeClose(g) : L();
479
- }
480
- function F() {
481
- e.closeOnClickModal && D();
482
- }
483
- function h() {
484
- pe && (c.value = !0);
485
- }
486
- function E() {
487
- c.value = !1;
488
- }
489
- function u() {
490
- l("openAutoFocus");
491
- }
492
- function _() {
493
- l("closeAutoFocus");
494
- }
495
- function T(g) {
496
- var I;
497
- ((I = g.detail) == null ? void 0 : I.focusReason) === "pointer" && g.preventDefault();
498
- }
499
- e.lockScroll && Lt(c);
500
- function Se() {
501
- e.closeOnPressEscape && D();
502
- }
503
- return J(() => e.modelValue, (g) => {
504
- g ? (p.value = !1, O(), f.value = !0, m.value = e.zIndex ? m.value++ : o(), Xe(() => {
505
- l("open"), t.value && (t.value.scrollTop = 0);
506
- })) : c.value && L();
507
- }), J(() => e.fullscreen, (g) => {
508
- t.value && (g ? (i = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = i);
509
- }), he(() => {
510
- e.modelValue && (c.value = !0, f.value = !0, O());
511
- }), {
512
- afterEnter: z,
513
- afterLeave: V,
514
- beforeLeave: Y,
515
- handleClose: D,
516
- onModalClick: F,
517
- close: L,
518
- doClose: E,
519
- onOpenAutoFocus: u,
520
- onCloseAutoFocus: _,
521
- onCloseRequested: Se,
522
- onFocusoutPrevented: T,
523
- titleId: r,
524
- bodyId: a,
525
- closed: p,
526
- style: $,
527
- overlayDialogStyle: R,
528
- rendered: f,
529
- visible: c,
530
- zIndex: m
531
- };
532
- }, xt = ["aria-label", "aria-labelledby", "aria-describedby"], Ut = A({
533
- name: "ElDialog",
534
- inheritAttrs: !1
535
- }), Ht = /* @__PURE__ */ A({
536
- ...Ut,
537
- props: Rt,
538
- emits: zt,
539
- setup(e, { expose: t }) {
540
- const s = e, l = je();
541
- ue({
542
- scope: "el-dialog",
543
- from: "the title slot",
544
- replacement: "the header slot",
545
- version: "3.0.0",
546
- ref: "https://element-plus.org/en-US/component/dialog.html#slots"
547
- }, S(() => !!l.title)), ue({
548
- scope: "el-dialog",
549
- from: "custom-class",
550
- replacement: "class",
551
- version: "2.3.0",
552
- ref: "https://element-plus.org/en-US/component/dialog.html#attributes",
553
- type: "Attribute"
554
- }, S(() => !!s.customClass));
555
- const o = te("dialog"), i = N(), r = N(), a = N(), {
556
- visible: c,
557
- titleId: p,
558
- bodyId: f,
559
- style: m,
560
- overlayDialogStyle: v,
561
- rendered: d,
562
- zIndex: C,
563
- afterEnter: $,
564
- afterLeave: R,
565
- beforeLeave: z,
566
- handleClose: V,
567
- onModalClick: Y,
568
- onOpenAutoFocus: O,
569
- onCloseAutoFocus: L,
570
- onCloseRequested: D,
571
- onFocusoutPrevented: F
572
- } = Yt(s, i);
573
- Ke(ke, {
574
- dialogRef: i,
575
- headerRef: r,
576
- bodyId: f,
577
- ns: o,
578
- rendered: d,
579
- style: m
580
- });
581
- const h = Ee(Y), E = S(() => s.draggable && !s.fullscreen);
582
- return t({
583
- visible: c,
584
- dialogContentRef: a
585
- }), (u, _) => (M(), H(Ge, {
586
- to: "body",
587
- disabled: !u.appendToBody
588
- }, [
589
- w(Je, {
590
- name: "dialog-fade",
591
- onAfterEnter: n($),
592
- onAfterLeave: n(R),
593
- onBeforeLeave: n(z),
594
- persisted: ""
595
- }, {
596
- default: y(() => [
597
- Ze(w(n(Nt), {
598
- "custom-mask-event": "",
599
- mask: u.modal,
600
- "overlay-class": u.modalClass,
601
- "z-index": n(C)
602
- }, {
603
- default: y(() => [
604
- P("div", {
605
- role: "dialog",
606
- "aria-modal": "true",
607
- "aria-label": u.title || void 0,
608
- "aria-labelledby": u.title ? void 0 : n(p),
609
- "aria-describedby": n(f),
610
- class: k(`${n(o).namespace.value}-overlay-dialog`),
611
- style: se(n(v)),
612
- onClick: _[0] || (_[0] = (...T) => n(h).onClick && n(h).onClick(...T)),
613
- onMousedown: _[1] || (_[1] = (...T) => n(h).onMousedown && n(h).onMousedown(...T)),
614
- onMouseup: _[2] || (_[2] = (...T) => n(h).onMouseup && n(h).onMouseup(...T))
615
- }, [
616
- w(n(it), {
617
- loop: "",
618
- trapped: n(c),
619
- "focus-start-el": "container",
620
- onFocusAfterTrapped: n(O),
621
- onFocusAfterReleased: n(L),
622
- onFocusoutPrevented: n(F),
623
- onReleaseRequested: n(D)
624
- }, {
625
- default: y(() => [
626
- n(d) ? (M(), H(At, Qe({
627
- key: 0,
628
- ref_key: "dialogContentRef",
629
- ref: a
630
- }, u.$attrs, {
631
- "custom-class": u.customClass,
632
- center: u.center,
633
- "align-center": u.alignCenter,
634
- "close-icon": u.closeIcon,
635
- draggable: n(E),
636
- fullscreen: u.fullscreen,
637
- "show-close": u.showClose,
638
- title: u.title,
639
- "aria-level": u.headerAriaLevel,
640
- onClose: n(V)
641
- }), et({
642
- header: y(() => [
643
- u.$slots.title ? b(u.$slots, "title", { key: 1 }) : b(u.$slots, "header", {
644
- key: 0,
645
- close: n(V),
646
- titleId: n(p),
647
- titleClass: n(o).e("title")
648
- })
649
- ]),
650
- default: y(() => [
651
- b(u.$slots, "default")
652
- ]),
653
- _: 2
654
- }, [
655
- u.$slots.footer ? {
656
- name: "footer",
657
- fn: y(() => [
658
- b(u.$slots, "footer")
659
- ])
660
- } : void 0
661
- ]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : Z("v-if", !0)
662
- ]),
663
- _: 3
664
- }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
665
- ], 46, xt)
666
- ]),
667
- _: 3
668
- }, 8, ["mask", "overlay-class", "z-index"]), [
669
- [tt, n(c)]
670
- ])
671
- ]),
672
- _: 3
673
- }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
674
- ], 8, ["disabled"]));
675
- }
676
- });
677
- var Wt = /* @__PURE__ */ ve(Ht, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);
678
- const qt = Oe(Wt);
679
- const Xt = /* @__PURE__ */ P("span", null, "This is a message", -1), jt = { class: "dialog-footer" }, Kt = /* @__PURE__ */ A({
13
+ const z = /* @__PURE__ */ d("span", null, "This is a message", -1), N = { class: "dialog-footer" }, S = /* @__PURE__ */ C({
680
14
  __name: "index",
681
15
  props: {
682
16
  modelValue: {
@@ -693,52 +27,52 @@ const Xt = /* @__PURE__ */ P("span", null, "This is a message", -1), jt = { clas
693
27
  }
694
28
  },
695
29
  emits: ["update:modelValue"],
696
- setup(e, { emit: t }) {
697
- const s = t, l = e, o = S({
30
+ setup(t, { emit: p }) {
31
+ const r = p, u = t, l = E({
698
32
  get() {
699
- return l.modelValue;
33
+ return u.modelValue;
700
34
  },
701
- set(r) {
702
- s("update:modelValue", r);
35
+ set(n) {
36
+ r("update:modelValue", n);
703
37
  }
704
- }), i = (r) => {
705
- s("update:modelValue", !1);
38
+ }), f = (n) => {
39
+ r("update:modelValue", !1);
706
40
  };
707
- return (r, a) => {
708
- const c = Ae, p = qt, f = Pe;
709
- return M(), H(f, { locale: n(Fe) }, {
710
- default: y(() => [
711
- w(p, {
712
- modelValue: o.value,
713
- "onUpdate:modelValue": a[2] || (a[2] = (m) => o.value = m),
714
- title: e.title,
41
+ return (n, e) => {
42
+ const s = v, c = y, _ = g;
43
+ return x(), k(_, { locale: B(V) }, {
44
+ default: o(() => [
45
+ i(c, {
46
+ modelValue: l.value,
47
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
48
+ title: t.title,
715
49
  width: "30%",
716
- "before-close": i,
717
- style: se(e.style)
50
+ "before-close": f,
51
+ style: b(t.style)
718
52
  }, {
719
- footer: y(() => [
720
- P("span", jt, [
721
- w(c, {
722
- onClick: a[0] || (a[0] = (m) => o.value = !1)
53
+ footer: o(() => [
54
+ d("span", N, [
55
+ i(s, {
56
+ onClick: e[0] || (e[0] = (a) => l.value = !1)
723
57
  }, {
724
- default: y(() => [
725
- re("Cancel")
58
+ default: o(() => [
59
+ m("Cancel")
726
60
  ]),
727
61
  _: 1
728
62
  }),
729
- w(c, {
63
+ i(s, {
730
64
  type: "primary",
731
- onClick: a[1] || (a[1] = (m) => o.value = !1)
65
+ onClick: e[1] || (e[1] = (a) => l.value = !1)
732
66
  }, {
733
- default: y(() => [
734
- re(" Confirm ")
67
+ default: o(() => [
68
+ m(" Confirm ")
735
69
  ]),
736
70
  _: 1
737
71
  })
738
72
  ])
739
73
  ]),
740
- default: y(() => [
741
- Xt
74
+ default: o(() => [
75
+ z
742
76
  ]),
743
77
  _: 1
744
78
  }, 8, ["modelValue", "title", "style"])
@@ -747,11 +81,11 @@ const Xt = /* @__PURE__ */ P("span", null, "This is a message", -1), jt = { clas
747
81
  }, 8, ["locale"]);
748
82
  };
749
83
  }
750
- }), ao = {
751
- install(e) {
752
- e.component("st-dialog", Kt);
84
+ }), H = {
85
+ install(t) {
86
+ t.component("st-dialog", S);
753
87
  }
754
88
  };
755
89
  export {
756
- ao as default
90
+ H as default
757
91
  };