@xto/feedback 1.1.6 → 1.1.8

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as D, ref as z, computed as S, watch as te, resolveComponent as ke, openBlock as h, createBlock as X, Teleport as oe, createVNode as q, Transition as _, withCtx as A, createElementBlock as k, normalizeStyle as O, normalizeClass as r, unref as f, createElementVNode as C, withModifiers as ie, renderSlot as V, createTextVNode as N, toDisplayString as I, createCommentVNode as T, withDirectives as re, vShow as ce, Fragment as ge, renderList as be, nextTick as ee, onUnmounted as ue, onMounted as ye, reactive as Ce, createApp as ve, h as $ } from "vue";
2
- import { useNamespace as Z, useZIndex as Be, useEscape as $e, nextMessageZIndex as Te } from "@xto/core";
3
- const ot = /* @__PURE__ */ D({
1
+ import { defineComponent as N, ref as I, computed as L, watch as te, resolveComponent as ke, openBlock as d, createBlock as j, Teleport as oe, createVNode as K, Transition as q, withCtx as D, createElementBlock as x, normalizeStyle as O, normalizeClass as a, unref as i, createElementVNode as C, withModifiers as ie, renderSlot as S, createTextVNode as H, toDisplayString as z, createCommentVNode as $, withDirectives as re, vShow as ce, Fragment as ge, renderList as ye, nextTick as ee, onUnmounted as ue, onMounted as be, reactive as Ce, createApp as ve, h as T } from "vue";
2
+ import { useNamespace as F, useZIndex as $e, useEscape as Be, nextMessageZIndex as Te } from "@xto/core";
3
+ const ot = /* @__PURE__ */ N({
4
4
  name: "XModal",
5
5
  inheritAttrs: !1,
6
6
  __name: "index",
@@ -18,108 +18,108 @@ const ot = /* @__PURE__ */ D({
18
18
  destroyOnClose: { type: Boolean, default: !1 }
19
19
  },
20
20
  emits: ["update:modelValue", "update:open", "close", "open", "ok", "cancel"],
21
- setup(e, { emit: c }) {
22
- const t = e, a = c, o = Z("modal"), { next: s } = Be(), u = z(s()), g = S({
21
+ setup(e, { emit: s }) {
22
+ const t = e, r = s, o = F("modal"), { next: l } = $e(), f = I(l()), g = L({
23
23
  get: () => t.modelValue !== void 0 ? t.modelValue : t.open !== void 0 ? t.open : !1,
24
- set: (d) => {
25
- a("update:modelValue", d), a("update:open", d);
24
+ set: (m) => {
25
+ r("update:modelValue", m), r("update:open", m);
26
26
  }
27
- }), v = z(), l = () => {
28
- g.value = !1, a("cancel"), a("close");
29
- }, w = () => {
30
- a("ok");
27
+ }), v = I(), c = () => {
28
+ g.value = !1, r("cancel"), r("close");
29
+ }, k = () => {
30
+ r("ok");
31
31
  }, p = () => {
32
- t.closeOnClickModal && t.modal && l();
32
+ t.closeOnClickModal && t.modal && c();
33
33
  };
34
- $e(() => {
35
- t.closeOnPressEscape && g.value && l();
36
- }), te(() => [t.modelValue, t.open], ([d, n]) => {
37
- (d !== void 0 ? d : n) && (u.value = s(), a("open"));
34
+ Be(() => {
35
+ t.closeOnPressEscape && g.value && c();
36
+ }), te(() => [t.modelValue, t.open], ([m, n]) => {
37
+ (m !== void 0 ? m : n) && (f.value = l(), r("open"));
38
38
  }, { immediate: !0 });
39
- const x = S(() => ({
39
+ const w = L(() => ({
40
40
  paddingTop: t.top
41
- })), m = S(() => ({
41
+ })), h = L(() => ({
42
42
  width: typeof t.width == "number" ? `${t.width}px` : t.width,
43
- zIndex: u.value
43
+ zIndex: f.value
44
44
  }));
45
- return (d, n) => {
46
- const b = ke("x-button");
47
- return h(), X(oe, { to: "body" }, [
48
- q(_, { name: "x-modal-fade" }, {
49
- default: A(() => [
50
- g.value ? (h(), k("div", {
45
+ return (m, n) => {
46
+ const y = ke("x-button");
47
+ return d(), j(oe, { to: "body" }, [
48
+ K(q, { name: "x-modal-fade" }, {
49
+ default: D(() => [
50
+ g.value ? (d(), x("div", {
51
51
  key: 0,
52
- class: r(f(o).e("wrapper")),
53
- style: O(x.value),
52
+ class: a(i(o).e("wrapper")),
53
+ style: O(w.value),
54
54
  onClick: p
55
55
  }, [
56
56
  C("div", {
57
57
  ref_key: "modalRef",
58
58
  ref: v,
59
- class: r(f(o).b()),
60
- style: O(m.value),
59
+ class: a(i(o).b()),
60
+ style: O(h.value),
61
61
  onClick: n[0] || (n[0] = ie(() => {
62
62
  }, ["stop"]))
63
63
  }, [
64
64
  C("div", {
65
- class: r(f(o).e("header"))
65
+ class: a(i(o).e("header"))
66
66
  }, [
67
67
  C("span", {
68
- class: r(f(o).e("title"))
68
+ class: a(i(o).e("title"))
69
69
  }, [
70
- V(d.$slots, "title", {}, () => [
71
- N(I(e.title), 1)
70
+ S(m.$slots, "title", {}, () => [
71
+ H(z(e.title), 1)
72
72
  ])
73
73
  ], 2),
74
- e.showClose ? (h(), k("button", {
74
+ e.showClose ? (d(), x("button", {
75
75
  key: 0,
76
- class: r(f(o).e("close")),
77
- onClick: l
78
- }, " ✕ ", 2)) : T("", !0)
76
+ class: a(i(o).e("close")),
77
+ onClick: c
78
+ }, " ✕ ", 2)) : $("", !0)
79
79
  ], 2),
80
80
  C("div", {
81
- class: r(f(o).e("body"))
81
+ class: a(i(o).e("body"))
82
82
  }, [
83
- V(d.$slots, "default")
83
+ S(m.$slots, "default")
84
84
  ], 2),
85
- d.$slots.footer ? (h(), k("div", {
85
+ m.$slots.footer ? (d(), x("div", {
86
86
  key: 0,
87
- class: r(f(o).e("footer"))
87
+ class: a(i(o).e("footer"))
88
88
  }, [
89
- V(d.$slots, "footer", {
90
- ok: w,
91
- cancel: l
89
+ S(m.$slots, "footer", {
90
+ ok: k,
91
+ cancel: c
92
92
  })
93
- ], 2)) : d.$slots.footer ? T("", !0) : (h(), k("div", {
93
+ ], 2)) : m.$slots.footer ? $("", !0) : (d(), x("div", {
94
94
  key: 1,
95
- class: r(f(o).e("footer"))
95
+ class: a(i(o).e("footer"))
96
96
  }, [
97
- q(b, { onClick: l }, {
98
- default: A(() => [...n[1] || (n[1] = [
99
- N("取消", -1)
97
+ K(y, { onClick: c }, {
98
+ default: D(() => [...n[1] || (n[1] = [
99
+ H("取消", -1)
100
100
  ])]),
101
101
  _: 1
102
102
  }),
103
- q(b, {
103
+ K(y, {
104
104
  type: "primary",
105
105
  style: { "margin-left": "8px" },
106
- onClick: w
106
+ onClick: k
107
107
  }, {
108
- default: A(() => [...n[2] || (n[2] = [
109
- N("确定", -1)
108
+ default: D(() => [...n[2] || (n[2] = [
109
+ H("确定", -1)
110
110
  ])]),
111
111
  _: 1
112
112
  })
113
113
  ], 2))
114
114
  ], 6)
115
- ], 6)) : T("", !0)
115
+ ], 6)) : $("", !0)
116
116
  ]),
117
117
  _: 3
118
118
  })
119
119
  ]);
120
120
  };
121
121
  }
122
- }), nt = /* @__PURE__ */ D({
122
+ }), nt = /* @__PURE__ */ N({
123
123
  name: "XDrawer",
124
124
  inheritAttrs: !1,
125
125
  __name: "index",
@@ -133,73 +133,74 @@ const ot = /* @__PURE__ */ D({
133
133
  withHeader: { type: Boolean, default: !0 },
134
134
  showClose: { type: Boolean, default: !0 },
135
135
  closeOnClickModal: { type: Boolean, default: !0 },
136
- destroyOnClose: { type: Boolean, default: !1 }
136
+ destroyOnClose: { type: Boolean, default: !1 },
137
+ modal: { type: Boolean, default: !0 }
137
138
  },
138
139
  emits: ["update:modelValue", "close", "open"],
139
- setup(e, { emit: c }) {
140
- const t = e, a = c, o = Z("drawer"), s = z(2e3), u = () => {
141
- a("update:modelValue", !1), a("close");
140
+ setup(e, { emit: s }) {
141
+ const t = e, r = s, o = F("drawer"), l = I(2e3), f = () => {
142
+ r("update:modelValue", !1), r("close");
142
143
  }, g = () => {
143
- t.closeOnClickModal && u();
144
+ t.closeOnClickModal && f();
144
145
  }, v = (p) => {
145
- p.key === "Escape" && t.modelValue && u();
146
+ p.key === "Escape" && t.modelValue && f();
146
147
  };
147
148
  te(() => t.modelValue, (p) => {
148
- p ? (s.value = 2e3 + Math.floor(Math.random() * 100), a("open"), document.addEventListener("keydown", v)) : document.removeEventListener("keydown", v);
149
+ p ? (l.value = 2e3 + Math.floor(Math.random() * 100), r("open"), document.addEventListener("keydown", v)) : document.removeEventListener("keydown", v);
149
150
  });
150
- const l = S(() => ({
151
- zIndex: s.value
152
- })), w = S(() => {
153
- const p = t.direction ?? t.placement ?? "rtl", x = t.size ?? t.width ?? "30%", m = typeof x == "number" ? `${x}px` : x;
151
+ const c = L(() => ({
152
+ zIndex: l.value
153
+ })), k = L(() => {
154
+ const p = t.direction ?? t.placement ?? "rtl", w = t.size ?? t.width ?? "30%", h = typeof w == "number" ? `${w}px` : w;
154
155
  return {
155
- ltr: { width: m, height: "100%" },
156
- rtl: { width: m, height: "100%" },
157
- ttb: { width: "100%", height: m },
158
- btt: { width: "100%", height: m }
156
+ ltr: { width: h, height: "100%" },
157
+ rtl: { width: h, height: "100%" },
158
+ ttb: { width: "100%", height: h },
159
+ btt: { width: "100%", height: h }
159
160
  }[p];
160
161
  });
161
- return (p, x) => (h(), X(oe, { to: "body" }, [
162
- q(_, { name: "x-drawer-fade" }, {
163
- default: A(() => [
162
+ return (p, w) => (d(), j(oe, { to: "body" }, [
163
+ K(q, { name: "x-drawer-fade" }, {
164
+ default: D(() => [
164
165
  re(C("div", {
165
- class: r(f(o).e("overlay")),
166
- style: O(l.value),
166
+ class: a([i(o).e("overlay"), { [i(o).em("overlay", "no-modal")]: !e.modal }]),
167
+ style: O(c.value),
167
168
  onClick: g
168
169
  }, [
169
170
  C("div", {
170
- class: r([f(o).b(), f(o).m(e.direction ?? e.placement ?? "rtl")]),
171
- style: O(w.value),
172
- onClick: x[0] || (x[0] = ie(() => {
171
+ class: a([i(o).b(), i(o).m(e.direction ?? e.placement ?? "rtl")]),
172
+ style: O(k.value),
173
+ onClick: w[0] || (w[0] = ie(() => {
173
174
  }, ["stop"]))
174
175
  }, [
175
- e.withHeader ? (h(), k("div", {
176
+ e.withHeader ? (d(), x("div", {
176
177
  key: 0,
177
- class: r(f(o).e("header"))
178
+ class: a(i(o).e("header"))
178
179
  }, [
179
180
  C("span", {
180
- class: r(f(o).e("title"))
181
+ class: a(i(o).e("title"))
181
182
  }, [
182
- V(p.$slots, "title", {}, () => [
183
- N(I(e.title), 1)
183
+ S(p.$slots, "title", {}, () => [
184
+ H(z(e.title), 1)
184
185
  ])
185
186
  ], 2),
186
- e.showClose ? (h(), k("button", {
187
+ e.showClose ? (d(), x("button", {
187
188
  key: 0,
188
- class: r(f(o).e("close")),
189
- onClick: u
190
- }, " ✕ ", 2)) : T("", !0)
191
- ], 2)) : T("", !0),
189
+ class: a(i(o).e("close")),
190
+ onClick: f
191
+ }, " ✕ ", 2)) : $("", !0)
192
+ ], 2)) : $("", !0),
192
193
  C("div", {
193
- class: r([f(o).e("body"), p.$slots.footer && f(o).em("body", "has-footer")])
194
+ class: a([i(o).e("body"), p.$slots.footer && i(o).em("body", "has-footer")])
194
195
  }, [
195
- V(p.$slots, "default")
196
+ S(p.$slots, "default")
196
197
  ], 2),
197
- p.$slots.footer ? (h(), k("div", {
198
+ p.$slots.footer ? (d(), x("div", {
198
199
  key: 1,
199
- class: r(f(o).e("footer"))
200
+ class: a(i(o).e("footer"))
200
201
  }, [
201
- V(p.$slots, "footer")
202
- ], 2)) : T("", !0)
202
+ S(p.$slots, "footer")
203
+ ], 2)) : $("", !0)
203
204
  ], 6)
204
205
  ], 6), [
205
206
  [ce, e.modelValue]
@@ -212,7 +213,7 @@ const ot = /* @__PURE__ */ D({
212
213
  }), Ee = {
213
214
  key: 0,
214
215
  class: "required-mark"
215
- }, Me = ["value", "placeholder", "disabled", "onInput"], ze = ["value", "placeholder", "disabled", "onInput"], Ie = ["value", "placeholder", "disabled", "onInput"], Se = ["value", "disabled", "onChange"], Le = ["value"], Ve = ["disabled", "onClick"], st = /* @__PURE__ */ D({
216
+ }, Me = ["value", "placeholder", "disabled", "onInput"], ze = ["value", "placeholder", "disabled", "onInput"], Ie = ["value", "placeholder", "disabled", "onInput"], Se = ["value", "disabled", "onChange"], Le = ["value"], Ve = ["disabled", "onClick"], st = /* @__PURE__ */ N({
216
217
  name: "XDrawerForm",
217
218
  __name: "index",
218
219
  props: {
@@ -229,144 +230,144 @@ const ot = /* @__PURE__ */ D({
229
230
  destroyOnClose: { type: Boolean, default: !1 }
230
231
  },
231
232
  emits: ["update:modelValue", "confirm", "cancel", "close", "field-change"],
232
- setup(e, { emit: c }) {
233
- const t = e, a = c, o = Z("drawer-form"), s = z({}), u = z({});
234
- S(() => [
233
+ setup(e, { emit: s }) {
234
+ const t = e, r = s, o = F("drawer-form"), l = I({}), f = I({});
235
+ L(() => [
235
236
  o.b()
236
- ]), te(() => t.formData, (m) => {
237
- s.value = { ...m };
237
+ ]), te(() => t.formData, (h) => {
238
+ l.value = { ...h };
238
239
  }, { immediate: !0, deep: !0 });
239
- const g = S(() => typeof t.size == "number" ? `${t.size}px` : t.size), v = () => {
240
- a("update:modelValue", !1), a("close");
241
- }, l = () => {
242
- a("cancel"), v();
243
- }, w = () => {
244
- p() && (a("confirm", s.value), v());
240
+ const g = L(() => typeof t.size == "number" ? `${t.size}px` : t.size), v = () => {
241
+ r("update:modelValue", !1), r("close");
242
+ }, c = () => {
243
+ r("cancel"), v();
244
+ }, k = () => {
245
+ p() && (r("confirm", l.value), v());
245
246
  }, p = () => {
246
- u.value = {};
247
- for (const m of t.fields) {
248
- if (m.required) {
249
- const d = s.value[m.name];
250
- if (d == null || d === "") {
251
- u.value[m.name] = `${m.label}为必填项`;
247
+ f.value = {};
248
+ for (const h of t.fields) {
249
+ if (h.required) {
250
+ const m = l.value[h.name];
251
+ if (m == null || m === "") {
252
+ f.value[h.name] = `${h.label}为必填项`;
252
253
  continue;
253
254
  }
254
255
  }
255
- if (m.rules)
256
- for (const d of m.rules) {
257
- const n = s.value[m.name];
258
- d.type === "email" && n && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n) && (u.value[m.name] = d.message), d.type === "minLength" && n && n.length < d.min && (u.value[m.name] = d.message);
256
+ if (h.rules)
257
+ for (const m of h.rules) {
258
+ const n = l.value[h.name];
259
+ m.type === "email" && n && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n) && (f.value[h.name] = m.message), m.type === "minLength" && n && n.length < m.min && (f.value[h.name] = m.message);
259
260
  }
260
261
  }
261
- return Object.keys(u.value).length === 0;
262
- }, x = (m, d) => {
263
- s.value[m] = d, a("field-change", m, d);
262
+ return Object.keys(f.value).length === 0;
263
+ }, w = (h, m) => {
264
+ l.value[h] = m, r("field-change", h, m);
264
265
  };
265
- return (m, d) => (h(), X(oe, { to: "body" }, [
266
- q(_, { name: "drawer-form-fade" }, {
267
- default: A(() => [
266
+ return (h, m) => (d(), j(oe, { to: "body" }, [
267
+ K(q, { name: "drawer-form-fade" }, {
268
+ default: D(() => [
268
269
  re(C("div", {
269
- class: r(f(o).e("overlay")),
270
+ class: a(i(o).e("overlay")),
270
271
  onClick: v
271
272
  }, [
272
273
  C("div", {
273
- class: r(f(o).b()),
274
+ class: a(i(o).b()),
274
275
  style: O({ width: g.value }),
275
- onClick: d[0] || (d[0] = ie(() => {
276
+ onClick: m[0] || (m[0] = ie(() => {
276
277
  }, ["stop"]))
277
278
  }, [
278
279
  C("div", {
279
- class: r(f(o).e("header"))
280
+ class: a(i(o).e("header"))
280
281
  }, [
281
282
  C("span", {
282
- class: r(f(o).e("title"))
283
- }, I(e.title), 3),
283
+ class: a(i(o).e("title"))
284
+ }, z(e.title), 3),
284
285
  C("button", {
285
- class: r(f(o).e("close")),
286
+ class: a(i(o).e("close")),
286
287
  onClick: v
287
288
  }, "✕", 2)
288
289
  ], 2),
289
290
  C("div", {
290
- class: r(f(o).e("body"))
291
+ class: a(i(o).e("body"))
291
292
  }, [
292
- !e.destroyOnClose || e.modelValue ? (h(), k("div", {
293
+ !e.destroyOnClose || e.modelValue ? (d(), x("div", {
293
294
  key: 0,
294
- class: r(f(o).e("form"))
295
+ class: a(i(o).e("form"))
295
296
  }, [
296
- (h(!0), k(ge, null, be(e.fields, (n) => (h(), k("div", {
297
+ (d(!0), x(ge, null, ye(e.fields, (n) => (d(), x("div", {
297
298
  key: n.name,
298
- class: r(f(o).e("field"))
299
+ class: a(i(o).e("field"))
299
300
  }, [
300
301
  C("label", {
301
- class: r(f(o).e("label"))
302
+ class: a(i(o).e("label"))
302
303
  }, [
303
- N(I(n.label) + " ", 1),
304
- n.required ? (h(), k("span", Ee, "*")) : T("", !0)
304
+ H(z(n.label) + " ", 1),
305
+ n.required ? (d(), x("span", Ee, "*")) : $("", !0)
305
306
  ], 2),
306
- n.type === "input" ? (h(), k("input", {
307
+ n.type === "input" ? (d(), x("input", {
307
308
  key: 0,
308
- class: r([f(o).e("input"), { "has-error": u.value[n.name] }]),
309
- value: s.value[n.name],
309
+ class: a([i(o).e("input"), { "has-error": f.value[n.name] }]),
310
+ value: l.value[n.name],
310
311
  placeholder: n.placeholder,
311
312
  disabled: e.disabled || n.disabled,
312
- onInput: (b) => x(n.name, b.target.value)
313
- }, null, 42, Me)) : n.type === "textarea" ? (h(), k("textarea", {
313
+ onInput: (y) => w(n.name, y.target.value)
314
+ }, null, 42, Me)) : n.type === "textarea" ? (d(), x("textarea", {
314
315
  key: 1,
315
- class: r([f(o).e("textarea"), { "has-error": u.value[n.name] }]),
316
- value: s.value[n.name],
316
+ class: a([i(o).e("textarea"), { "has-error": f.value[n.name] }]),
317
+ value: l.value[n.name],
317
318
  placeholder: n.placeholder,
318
319
  disabled: e.disabled || n.disabled,
319
320
  rows: "4",
320
- onInput: (b) => x(n.name, b.target.value)
321
- }, null, 42, ze)) : n.type === "number" ? (h(), k("input", {
321
+ onInput: (y) => w(n.name, y.target.value)
322
+ }, null, 42, ze)) : n.type === "number" ? (d(), x("input", {
322
323
  key: 2,
323
324
  type: "number",
324
- class: r([f(o).e("input"), { "has-error": u.value[n.name] }]),
325
- value: s.value[n.name],
325
+ class: a([i(o).e("input"), { "has-error": f.value[n.name] }]),
326
+ value: l.value[n.name],
326
327
  placeholder: n.placeholder,
327
328
  disabled: e.disabled || n.disabled,
328
- onInput: (b) => x(n.name, Number(b.target.value))
329
- }, null, 42, Ie)) : n.type === "select" ? (h(), k("select", {
329
+ onInput: (y) => w(n.name, Number(y.target.value))
330
+ }, null, 42, Ie)) : n.type === "select" ? (d(), x("select", {
330
331
  key: 3,
331
- class: r([f(o).e("select"), { "has-error": u.value[n.name] }]),
332
- value: s.value[n.name],
332
+ class: a([i(o).e("select"), { "has-error": f.value[n.name] }]),
333
+ value: l.value[n.name],
333
334
  disabled: e.disabled || n.disabled,
334
- onChange: (b) => x(n.name, b.target.value)
335
+ onChange: (y) => w(n.name, y.target.value)
335
336
  }, [
336
- (h(!0), k(ge, null, be(n.options, (b) => (h(), k("option", {
337
- key: b.value,
338
- value: b.value
339
- }, I(b.label), 9, Le))), 128))
340
- ], 42, Se)) : n.type === "switch" ? (h(), k("div", {
337
+ (d(!0), x(ge, null, ye(n.options, (y) => (d(), x("option", {
338
+ key: y.value,
339
+ value: y.value
340
+ }, z(y.label), 9, Le))), 128))
341
+ ], 42, Se)) : n.type === "switch" ? (d(), x("div", {
341
342
  key: 4,
342
- class: r(f(o).e("switch"))
343
+ class: a(i(o).e("switch"))
343
344
  }, [
344
345
  C("button", {
345
- class: r(["switch-btn", { "is-on": s.value[n.name] }]),
346
+ class: a(["switch-btn", { "is-on": l.value[n.name] }]),
346
347
  disabled: e.disabled || n.disabled,
347
- onClick: (b) => x(n.name, !s.value[n.name])
348
- }, I(s.value[n.name] ? "开启" : "关闭"), 11, Ve)
349
- ], 2)) : T("", !0),
350
- u.value[n.name] ? (h(), k("span", {
348
+ onClick: (y) => w(n.name, !l.value[n.name])
349
+ }, z(l.value[n.name] ? "开启" : "关闭"), 11, Ve)
350
+ ], 2)) : $("", !0),
351
+ f.value[n.name] ? (d(), x("span", {
351
352
  key: 5,
352
- class: r(f(o).e("error"))
353
- }, I(u.value[n.name]), 3)) : T("", !0)
353
+ class: a(i(o).e("error"))
354
+ }, z(f.value[n.name]), 3)) : $("", !0)
354
355
  ], 2))), 128))
355
- ], 2)) : T("", !0)
356
+ ], 2)) : $("", !0)
356
357
  ], 2),
357
358
  C("div", {
358
- class: r(f(o).e("footer"))
359
+ class: a(i(o).e("footer"))
359
360
  }, [
360
- e.showCancel ? (h(), k("button", {
361
+ e.showCancel ? (d(), x("button", {
361
362
  key: 0,
362
- class: r(f(o).e("cancel")),
363
- onClick: l
364
- }, I(e.cancelText), 3)) : T("", !0),
365
- e.showConfirm ? (h(), k("button", {
363
+ class: a(i(o).e("cancel")),
364
+ onClick: c
365
+ }, z(e.cancelText), 3)) : $("", !0),
366
+ e.showConfirm ? (d(), x("button", {
366
367
  key: 1,
367
- class: r(f(o).e("confirm")),
368
- onClick: w
369
- }, I(e.confirmText), 3)) : T("", !0)
368
+ class: a(i(o).e("confirm")),
369
+ onClick: k
370
+ }, z(e.confirmText), 3)) : $("", !0)
370
371
  ], 2)
371
372
  ], 6)
372
373
  ], 2), [
@@ -377,7 +378,7 @@ const ot = /* @__PURE__ */ D({
377
378
  })
378
379
  ]));
379
380
  }
380
- }), lt = /* @__PURE__ */ D({
381
+ }), lt = /* @__PURE__ */ N({
381
382
  name: "XAlert",
382
383
  __name: "index",
383
384
  props: {
@@ -389,61 +390,61 @@ const ot = /* @__PURE__ */ D({
389
390
  center: { type: Boolean, default: !1 }
390
391
  },
391
392
  emits: ["close"],
392
- setup(e, { emit: c }) {
393
- const t = e, a = c, o = Z("alert"), s = z(!0), u = {
393
+ setup(e, { emit: s }) {
394
+ const t = e, r = s, o = F("alert"), l = I(!0), f = {
394
395
  success: "✓",
395
396
  warning: "⚠",
396
397
  error: "✕",
397
398
  info: "ℹ"
398
- }, g = S(() => [
399
+ }, g = L(() => [
399
400
  o.b(),
400
401
  o.m(t.type),
401
402
  o.is("center", t.center),
402
403
  o.is("with-description", t.description)
403
- ]), v = (l) => {
404
- s.value = !1, a("close", l);
404
+ ]), v = (c) => {
405
+ l.value = !1, r("close", c);
405
406
  };
406
- return (l, w) => (h(), X(_, { name: "x-alert-fade" }, {
407
- default: A(() => [
408
- s.value ? (h(), k("div", {
407
+ return (c, k) => (d(), j(q, { name: "x-alert-fade" }, {
408
+ default: D(() => [
409
+ l.value ? (d(), x("div", {
409
410
  key: 0,
410
- class: r(g.value)
411
+ class: a(g.value)
411
412
  }, [
412
- e.showIcon ? (h(), k("span", {
413
+ e.showIcon ? (d(), x("span", {
413
414
  key: 0,
414
- class: r(f(o).e("icon"))
415
- }, I(u[e.type]), 3)) : T("", !0),
415
+ class: a(i(o).e("icon"))
416
+ }, z(f[e.type]), 3)) : $("", !0),
416
417
  C("div", {
417
- class: r(f(o).e("content"))
418
+ class: a(i(o).e("content"))
418
419
  }, [
419
- e.title || l.$slots.title ? (h(), k("span", {
420
+ e.title || c.$slots.title ? (d(), x("span", {
420
421
  key: 0,
421
- class: r(f(o).e("title"))
422
+ class: a(i(o).e("title"))
422
423
  }, [
423
- V(l.$slots, "title", {}, () => [
424
- N(I(e.title), 1)
424
+ S(c.$slots, "title", {}, () => [
425
+ H(z(e.title), 1)
425
426
  ])
426
- ], 2)) : T("", !0),
427
- e.description || l.$slots.default ? (h(), k("span", {
427
+ ], 2)) : $("", !0),
428
+ e.description || c.$slots.default ? (d(), x("span", {
428
429
  key: 1,
429
- class: r(f(o).e("description"))
430
+ class: a(i(o).e("description"))
430
431
  }, [
431
- V(l.$slots, "default", {}, () => [
432
- N(I(e.description), 1)
432
+ S(c.$slots, "default", {}, () => [
433
+ H(z(e.description), 1)
433
434
  ])
434
- ], 2)) : T("", !0)
435
+ ], 2)) : $("", !0)
435
436
  ], 2),
436
- e.closable ? (h(), k("button", {
437
+ e.closable ? (d(), x("button", {
437
438
  key: 1,
438
- class: r(f(o).e("close")),
439
+ class: a(i(o).e("close")),
439
440
  onClick: v
440
- }, " ✕ ", 2)) : T("", !0)
441
- ], 2)) : T("", !0)
441
+ }, " ✕ ", 2)) : $("", !0)
442
+ ], 2)) : $("", !0)
442
443
  ]),
443
444
  _: 3
444
445
  }));
445
446
  }
446
- }), at = /* @__PURE__ */ D({
447
+ }), at = /* @__PURE__ */ N({
447
448
  name: "XTooltip",
448
449
  __name: "index",
449
450
  props: {
@@ -459,115 +460,115 @@ const ot = /* @__PURE__ */ D({
459
460
  closeDelay: { default: 0 }
460
461
  },
461
462
  emits: ["update:visible", "show", "hide"],
462
- setup(e, { emit: c }) {
463
- const t = e, a = c, o = Z("tooltip"), s = z(!1), u = z(), g = z();
464
- let v, l;
465
- const w = z({}), p = () => {
466
- if (!u.value || !g.value) return;
467
- const E = u.value.getBoundingClientRect(), F = g.value;
468
- F.style.visibility = "hidden", F.style.display = "block";
469
- const H = F.offsetWidth, j = F.offsetHeight, W = t.offset, fe = window.innerWidth, pe = window.innerHeight;
470
- let P = 0, R = 0, Y = t.placement;
463
+ setup(e, { emit: s }) {
464
+ const t = e, r = s, o = F("tooltip"), l = I(!1), f = I(), g = I();
465
+ let v, c;
466
+ const k = I({}), p = () => {
467
+ if (!f.value || !g.value) return;
468
+ const E = f.value.getBoundingClientRect(), W = g.value;
469
+ W.style.visibility = "hidden", W.style.display = "block";
470
+ const A = W.offsetWidth, Z = W.offsetHeight, X = t.offset, fe = window.innerWidth, me = window.innerHeight;
471
+ let P = 0, R = 0, G = t.placement;
471
472
  switch (t.placement) {
472
473
  case "top":
473
- P = E.top - j - W, R = E.left + (E.width - H) / 2;
474
+ P = E.top - Z - X, R = E.left + (E.width - A) / 2;
474
475
  break;
475
476
  case "bottom":
476
- P = E.bottom + W, R = E.left + (E.width - H) / 2;
477
+ P = E.bottom + X, R = E.left + (E.width - A) / 2;
477
478
  break;
478
479
  case "left":
479
- P = E.top + (E.height - j) / 2, R = E.left - H - W;
480
+ P = E.top + (E.height - Z) / 2, R = E.left - A - X;
480
481
  break;
481
482
  case "right":
482
- P = E.top + (E.height - j) / 2, R = E.right + W;
483
+ P = E.top + (E.height - Z) / 2, R = E.right + X;
483
484
  break;
484
485
  }
485
- t.placement === "top" && P < 0 ? (Y = "bottom", P = E.bottom + W) : t.placement === "bottom" && P + j > pe ? (Y = "top", P = E.top - j - W) : t.placement === "left" && R < 0 ? (Y = "right", R = E.right + W) : t.placement === "right" && R + H > fe && (Y = "left", R = E.left - H - W), R < 8 && (R = 8), R + H > fe - 8 && (R = fe - H - 8), P < 8 && (P = 8), P + j > pe - 8 && (P = pe - j - 8), w.value = {
486
+ t.placement === "top" && P < 0 ? (G = "bottom", P = E.bottom + X) : t.placement === "bottom" && P + Z > me ? (G = "top", P = E.top - Z - X) : t.placement === "left" && R < 0 ? (G = "right", R = E.right + X) : t.placement === "right" && R + A > fe && (G = "left", R = E.left - A - X), R < 8 && (R = 8), R + A > fe - 8 && (R = fe - A - 8), P < 8 && (P = 8), P + Z > me - 8 && (P = me - Z - 8), k.value = {
486
487
  position: "fixed",
487
488
  top: `${P}px`,
488
489
  left: `${R}px`,
489
490
  visibility: "visible",
490
491
  zIndex: "2000"
491
- }, x.value = Y;
492
- }, x = z(t.placement), m = () => {
493
- t.disabled || (clearTimeout(l), v = setTimeout(() => {
494
- s.value = !0, a("update:visible", !0), a("show"), ee(() => {
492
+ }, w.value = G;
493
+ }, w = I(t.placement), h = () => {
494
+ t.disabled || (clearTimeout(c), v = setTimeout(() => {
495
+ l.value = !0, r("update:visible", !0), r("show"), ee(() => {
495
496
  p();
496
497
  });
497
498
  }, t.openDelay));
498
- }, d = () => {
499
- clearTimeout(v), l = setTimeout(() => {
500
- s.value = !1, a("update:visible", !1), a("hide");
499
+ }, m = () => {
500
+ clearTimeout(v), c = setTimeout(() => {
501
+ l.value = !1, r("update:visible", !1), r("hide");
501
502
  }, t.closeDelay);
502
503
  }, n = () => {
503
- s.value ? d() : m();
504
- }, b = () => {
505
- t.trigger === "hover" && m();
506
- }, i = () => {
507
- t.trigger === "hover" && d();
504
+ l.value ? m() : h();
508
505
  }, y = () => {
506
+ t.trigger === "hover" && h();
507
+ }, u = () => {
508
+ t.trigger === "hover" && m();
509
+ }, b = () => {
509
510
  t.trigger === "click" && n();
510
- }, K = () => {
511
+ }, U = () => {
512
+ t.trigger === "focus" && h();
513
+ }, V = () => {
511
514
  t.trigger === "focus" && m();
512
- }, L = () => {
513
- t.trigger === "focus" && d();
514
515
  }, M = (E) => {
515
- var F, H;
516
- t.trigger === "click" && !((F = u.value) != null && F.contains(E.target)) && !((H = g.value) != null && H.contains(E.target)) && d();
516
+ var W, A;
517
+ t.trigger === "click" && !((W = f.value) != null && W.contains(E.target)) && !((A = g.value) != null && A.contains(E.target)) && m();
517
518
  }, B = () => {
518
- s.value && p();
519
+ l.value && p();
519
520
  };
520
- te(s, (E) => {
521
+ te(l, (E) => {
521
522
  E ? ee(() => {
522
523
  p(), t.trigger === "click" && document.addEventListener("click", M), window.addEventListener("scroll", B, !0), window.addEventListener("resize", B);
523
524
  }) : (document.removeEventListener("click", M), window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B));
524
525
  }), ue(() => {
525
- clearTimeout(v), clearTimeout(l), document.removeEventListener("click", M), window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B);
526
+ clearTimeout(v), clearTimeout(c), document.removeEventListener("click", M), window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B);
526
527
  });
527
- const ne = S(() => [
528
+ const ne = L(() => [
528
529
  o.b(),
529
530
  o.m(t.effect)
530
- ]), se = S(() => [
531
+ ]), se = L(() => [
531
532
  o.e("arrow"),
532
- o.e(`arrow-${x.value}`)
533
+ o.e(`arrow-${w.value}`)
533
534
  ]);
534
- return (E, F) => (h(), k("div", {
535
- class: r(f(o).e("wrapper"))
535
+ return (E, W) => (d(), x("div", {
536
+ class: a(i(o).e("wrapper"))
536
537
  }, [
537
538
  C("div", {
538
539
  ref_key: "triggerRef",
539
- ref: u,
540
- class: r(f(o).e("trigger")),
541
- onMouseenter: b,
542
- onMouseleave: i,
543
- onClick: y,
544
- onFocus: K,
545
- onBlur: L
540
+ ref: f,
541
+ class: a(i(o).e("trigger")),
542
+ onMouseenter: y,
543
+ onMouseleave: u,
544
+ onClick: b,
545
+ onFocus: U,
546
+ onBlur: V
546
547
  }, [
547
- V(E.$slots, "default")
548
+ S(E.$slots, "default")
548
549
  ], 34),
549
- (h(), X(oe, { to: "body" }, [
550
- q(_, {
550
+ (d(), j(oe, { to: "body" }, [
551
+ K(q, {
551
552
  name: `x-tooltip-${e.transition}`
552
553
  }, {
553
- default: A(() => [
554
+ default: D(() => [
554
555
  re(C("div", {
555
556
  ref_key: "tooltipRef",
556
557
  ref: g,
557
- class: r(ne.value),
558
- style: O(w.value),
559
- onMouseenter: b,
560
- onMouseleave: i
558
+ class: a(ne.value),
559
+ style: O(k.value),
560
+ onMouseenter: y,
561
+ onMouseleave: u
561
562
  }, [
562
- V(E.$slots, "content", {}, () => [
563
- N(I(e.content), 1)
563
+ S(E.$slots, "content", {}, () => [
564
+ H(z(e.content), 1)
564
565
  ]),
565
- e.visibleArrow ? (h(), k("div", {
566
+ e.visibleArrow ? (d(), x("div", {
566
567
  key: 0,
567
- class: r(se.value)
568
- }, null, 2)) : T("", !0)
568
+ class: a(se.value)
569
+ }, null, 2)) : $("", !0)
569
570
  ], 38), [
570
- [ce, s.value]
571
+ [ce, l.value]
571
572
  ])
572
573
  ]),
573
574
  _: 3
@@ -575,7 +576,7 @@ const ot = /* @__PURE__ */ D({
575
576
  ]))
576
577
  ], 2));
577
578
  }
578
- }), Pe = { class: "x-popconfirm-wrapper" }, Re = { class: "x-popconfirm__main" }, Oe = { class: "x-popconfirm__title" }, Ne = { class: "x-popconfirm__action" }, it = /* @__PURE__ */ D({
579
+ }), Pe = { class: "x-popconfirm-wrapper" }, Re = { class: "x-popconfirm__main" }, Oe = { class: "x-popconfirm__title" }, Ne = { class: "x-popconfirm__action" }, it = /* @__PURE__ */ N({
579
580
  name: "XPopconfirm",
580
581
  __name: "index",
581
582
  props: {
@@ -596,167 +597,167 @@ const ot = /* @__PURE__ */ D({
596
597
  showArrow: { type: Boolean, default: !0 }
597
598
  },
598
599
  emits: ["confirm", "cancel"],
599
- setup(e, { emit: c }) {
600
- const t = e, a = c, o = z(!1), s = z(null), u = z(null), g = z({}), v = () => {
601
- if (!s.value || !u.value) return;
602
- const i = s.value.getBoundingClientRect(), y = u.value.getBoundingClientRect(), K = t.placement, L = t.offset;
600
+ setup(e, { emit: s }) {
601
+ const t = e, r = s, o = I(!1), l = I(null), f = I(null), g = I({}), v = () => {
602
+ if (!l.value || !f.value) return;
603
+ const u = l.value.getBoundingClientRect(), b = f.value.getBoundingClientRect(), U = t.placement, V = t.offset;
603
604
  let M = 0, B = 0;
604
- switch (K) {
605
+ switch (U) {
605
606
  case "top":
606
- M = i.top - y.height - L, B = i.left + (i.width - y.width) / 2;
607
+ M = u.top - b.height - V, B = u.left + (u.width - b.width) / 2;
607
608
  break;
608
609
  case "top-start":
609
- M = i.top - y.height - L, B = i.left;
610
+ M = u.top - b.height - V, B = u.left;
610
611
  break;
611
612
  case "top-end":
612
- M = i.top - y.height - L, B = i.right - y.width;
613
+ M = u.top - b.height - V, B = u.right - b.width;
613
614
  break;
614
615
  case "bottom":
615
- M = i.bottom + L, B = i.left + (i.width - y.width) / 2;
616
+ M = u.bottom + V, B = u.left + (u.width - b.width) / 2;
616
617
  break;
617
618
  case "bottom-start":
618
- M = i.bottom + L, B = i.left;
619
+ M = u.bottom + V, B = u.left;
619
620
  break;
620
621
  case "bottom-end":
621
- M = i.bottom + L, B = i.right - y.width;
622
+ M = u.bottom + V, B = u.right - b.width;
622
623
  break;
623
624
  case "left":
624
- M = i.top + (i.height - y.height) / 2, B = i.left - y.width - L;
625
+ M = u.top + (u.height - b.height) / 2, B = u.left - b.width - V;
625
626
  break;
626
627
  case "left-start":
627
- M = i.top, B = i.left - y.width - L;
628
+ M = u.top, B = u.left - b.width - V;
628
629
  break;
629
630
  case "left-end":
630
- M = i.bottom - y.height, B = i.left - y.width - L;
631
+ M = u.bottom - b.height, B = u.left - b.width - V;
631
632
  break;
632
633
  case "right":
633
- M = i.top + (i.height - y.height) / 2, B = i.right + L;
634
+ M = u.top + (u.height - b.height) / 2, B = u.right + V;
634
635
  break;
635
636
  case "right-start":
636
- M = i.top, B = i.right + L;
637
+ M = u.top, B = u.right + V;
637
638
  break;
638
639
  case "right-end":
639
- M = i.bottom - y.height, B = i.right + L;
640
+ M = u.bottom - b.height, B = u.right + V;
640
641
  break;
641
642
  default:
642
- M = i.top - y.height - L, B = i.left + (i.width - y.width) / 2;
643
+ M = u.top - b.height - V, B = u.left + (u.width - b.width) / 2;
643
644
  }
644
645
  const ne = window.innerWidth, se = window.innerHeight;
645
- B < 0 && (B = 10), B + y.width > ne && (B = ne - y.width - 10), M < 0 && (M = 10), M + y.height > se && (M = se - y.height - 10), g.value = {
646
+ B < 0 && (B = 10), B + b.width > ne && (B = ne - b.width - 10), M < 0 && (M = 10), M + b.height > se && (M = se - b.height - 10), g.value = {
646
647
  position: "fixed",
647
648
  top: `${M}px`,
648
649
  left: `${B}px`,
649
650
  zIndex: "2000"
650
651
  };
651
- }, l = (i) => {
652
- var y, K;
653
- o.value && ((y = s.value) != null && y.contains(i.target) || (K = u.value) != null && K.contains(i.target) || (o.value = !1));
654
- }, w = (i) => {
655
- t.disabled || (i.stopPropagation(), o.value = !o.value, o.value && setTimeout(v, 0));
652
+ }, c = (u) => {
653
+ var b, U;
654
+ o.value && ((b = l.value) != null && b.contains(u.target) || (U = f.value) != null && U.contains(u.target) || (o.value = !1));
655
+ }, k = (u) => {
656
+ t.disabled || (u.stopPropagation(), o.value = !o.value, o.value && setTimeout(v, 0));
656
657
  }, p = () => {
657
- o.value = !1, a("confirm");
658
- }, x = () => {
659
- o.value = !1, a("cancel");
660
- }, m = () => {
658
+ o.value = !1, r("confirm");
659
+ }, w = () => {
660
+ o.value = !1, r("cancel");
661
+ }, h = () => {
661
662
  o.value && v();
662
- }, d = () => {
663
+ }, m = () => {
663
664
  o.value && v();
664
665
  };
665
- te(o, (i) => {
666
- i ? (setTimeout(v, 0), document.addEventListener("click", l), window.addEventListener("scroll", m, !0), window.addEventListener("resize", d)) : (document.removeEventListener("click", l), window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", d));
666
+ te(o, (u) => {
667
+ u ? (setTimeout(v, 0), document.addEventListener("click", c), window.addEventListener("scroll", h, !0), window.addEventListener("resize", m)) : (document.removeEventListener("click", c), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", m));
667
668
  }), ue(() => {
668
- document.removeEventListener("click", l), window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", d);
669
+ document.removeEventListener("click", c), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", m);
669
670
  });
670
- const n = S(() => ({
671
+ const n = L(() => ({
671
672
  width: typeof t.width == "number" ? `${t.width}px` : t.width
672
- })), b = S(() => {
673
- const i = t.placement, y = {};
674
- switch (i) {
673
+ })), y = L(() => {
674
+ const u = t.placement, b = {};
675
+ switch (u) {
675
676
  case "top":
676
677
  case "top-start":
677
678
  case "top-end":
678
- y.bottom = "-6px", y.transform = "rotate(45deg)";
679
+ b.bottom = "-6px", b.transform = "rotate(45deg)";
679
680
  break;
680
681
  case "bottom":
681
682
  case "bottom-start":
682
683
  case "bottom-end":
683
- y.top = "-6px", y.transform = "rotate(225deg)";
684
+ b.top = "-6px", b.transform = "rotate(225deg)";
684
685
  break;
685
686
  case "left":
686
687
  case "left-start":
687
688
  case "left-end":
688
- y.right = "-6px", y.transform = "rotate(315deg)";
689
+ b.right = "-6px", b.transform = "rotate(315deg)";
689
690
  break;
690
691
  case "right":
691
692
  case "right-start":
692
693
  case "right-end":
693
- y.left = "-6px", y.transform = "rotate(135deg)";
694
+ b.left = "-6px", b.transform = "rotate(135deg)";
694
695
  break;
695
696
  }
696
- return y;
697
+ return b;
697
698
  });
698
- return (i, y) => (h(), k("span", Pe, [
699
+ return (u, b) => (d(), x("span", Pe, [
699
700
  C("span", {
700
701
  ref_key: "triggerRef",
701
- ref: s,
702
+ ref: l,
702
703
  class: "x-popconfirm-trigger",
703
- onClick: w
704
+ onClick: k
704
705
  }, [
705
- V(i.$slots, "default")
706
+ S(u.$slots, "default")
706
707
  ], 512),
707
- (h(), X(oe, { to: "body" }, [
708
- q(_, { name: "x-popconfirm-fade" }, {
709
- default: A(() => [
710
- o.value ? (h(), k("div", {
708
+ (d(), j(oe, { to: "body" }, [
709
+ K(q, { name: "x-popconfirm-fade" }, {
710
+ default: D(() => [
711
+ o.value ? (d(), x("div", {
711
712
  key: 0,
712
713
  ref_key: "popperRef",
713
- ref: u,
714
+ ref: f,
714
715
  class: "x-popconfirm",
715
716
  style: O({ ...g.value, ...n.value }),
716
- onClick: y[0] || (y[0] = ie(() => {
717
+ onClick: b[0] || (b[0] = ie(() => {
717
718
  }, ["stop"]))
718
719
  }, [
719
- e.showArrow ? (h(), k("span", {
720
+ e.showArrow ? (d(), x("span", {
720
721
  key: 0,
721
722
  class: "x-popconfirm__arrow",
722
- style: O(b.value)
723
- }, null, 4)) : T("", !0),
723
+ style: O(y.value)
724
+ }, null, 4)) : $("", !0),
724
725
  C("div", Re, [
725
- e.hideIcon ? T("", !0) : (h(), k("span", {
726
+ e.hideIcon ? $("", !0) : (d(), x("span", {
726
727
  key: 0,
727
728
  class: "x-popconfirm__icon",
728
729
  style: O({ color: e.iconColor })
729
730
  }, [
730
- V(i.$slots, "icon", {}, () => [
731
- N(I(e.icon || "⚠"), 1)
731
+ S(u.$slots, "icon", {}, () => [
732
+ H(z(e.icon || "⚠"), 1)
732
733
  ])
733
734
  ], 4)),
734
735
  C("div", Oe, [
735
- V(i.$slots, "title", {}, () => [
736
- N(I(e.title), 1)
736
+ S(u.$slots, "title", {}, () => [
737
+ H(z(e.title), 1)
737
738
  ])
738
739
  ])
739
740
  ]),
740
741
  C("div", Ne, [
741
- e.hideCancelButton ? T("", !0) : (h(), k("button", {
742
+ e.hideCancelButton ? $("", !0) : (d(), x("button", {
742
743
  key: 0,
743
744
  class: "x-button p-button--default p-button--small",
744
- onClick: x
745
- }, I(e.cancelButtonText), 1)),
746
- e.hideConfirmButton ? T("", !0) : (h(), k("button", {
745
+ onClick: w
746
+ }, z(e.cancelButtonText), 1)),
747
+ e.hideConfirmButton ? $("", !0) : (d(), x("button", {
747
748
  key: 1,
748
- class: r(["x-button x-button--small", `x-button--${e.confirmButtonType}`]),
749
+ class: a(["x-button x-button--small", `x-button--${e.confirmButtonType}`]),
749
750
  onClick: p
750
- }, I(e.confirmButtonText), 3))
751
+ }, z(e.confirmButtonText), 3))
751
752
  ])
752
- ], 4)) : T("", !0)
753
+ ], 4)) : $("", !0)
753
754
  ]),
754
755
  _: 3
755
756
  })
756
757
  ]))
757
758
  ]));
758
759
  }
759
- }), rt = /* @__PURE__ */ D({
760
+ }), rt = /* @__PURE__ */ N({
760
761
  name: "XBacktop",
761
762
  __name: "index",
762
763
  props: {
@@ -765,43 +766,104 @@ const ot = /* @__PURE__ */ D({
765
766
  bottom: { default: 40 }
766
767
  },
767
768
  emits: ["click"],
768
- setup(e, { emit: c }) {
769
- const t = e, a = c, o = Z("backtop"), s = z(!1), u = () => {
770
- const l = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
771
- s.value = l >= t.visibilityHeight;
772
- }, g = (l) => {
769
+ setup(e, { emit: s }) {
770
+ const t = e, r = s, o = F("backtop"), l = I(!1), f = () => {
771
+ const c = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
772
+ l.value = c >= t.visibilityHeight;
773
+ }, g = (c) => {
773
774
  window.scrollTo({
774
775
  top: 0,
775
776
  behavior: "smooth"
776
- }), a("click", l);
777
- }, v = S(() => ({
777
+ }), r("click", c);
778
+ }, v = L(() => ({
778
779
  right: `${t.right}px`,
779
780
  bottom: `${t.bottom}px`
780
781
  }));
781
- return ye(() => {
782
- window.addEventListener("scroll", u, { passive: !0, capture: !0 }), setTimeout(u, 100);
782
+ return be(() => {
783
+ window.addEventListener("scroll", f, { passive: !0, capture: !0 }), setTimeout(f, 100);
783
784
  }), ue(() => {
784
- window.removeEventListener("scroll", u, !0);
785
- }), (l, w) => (h(), X(_, { name: "x-fade" }, {
786
- default: A(() => [
785
+ window.removeEventListener("scroll", f, !0);
786
+ }), (c, k) => (d(), j(q, { name: "x-fade" }, {
787
+ default: D(() => [
787
788
  re(C("div", {
788
- class: r(f(o).b()),
789
+ class: a(i(o).b()),
789
790
  style: O(v.value),
790
791
  onClick: g
791
792
  }, [
792
- V(l.$slots, "default", {}, () => [
793
+ S(c.$slots, "default", {}, () => [
793
794
  C("span", {
794
- class: r(f(o).e("icon"))
795
+ class: a(i(o).e("icon"))
795
796
  }, "↑", 2)
796
797
  ])
797
798
  ], 6), [
798
- [ce, s.value]
799
+ [ce, l.value]
799
800
  ])
800
801
  ]),
801
802
  _: 3
802
803
  }));
803
804
  }
804
- }), He = /* @__PURE__ */ D({
805
+ }), ct = /* @__PURE__ */ N({
806
+ name: "XTimeline",
807
+ __name: "index",
808
+ setup(e) {
809
+ const s = F("timeline");
810
+ return (t, r) => (d(), x("ul", {
811
+ class: a(i(s).b())
812
+ }, [
813
+ S(t.$slots, "default")
814
+ ], 2));
815
+ }
816
+ }), ut = /* @__PURE__ */ N({
817
+ name: "XTimelineItem",
818
+ __name: "TimelineItem",
819
+ props: {
820
+ timestamp: {},
821
+ placement: { default: "bottom" },
822
+ type: { default: "primary" },
823
+ color: {},
824
+ size: { default: "normal" },
825
+ icon: {},
826
+ hollow: { type: Boolean, default: !1 }
827
+ },
828
+ setup(e) {
829
+ const s = F("timeline-item");
830
+ return (t, r) => (d(), x("li", {
831
+ class: a([i(s).b(), i(s).m(e.placement)])
832
+ }, [
833
+ C("div", {
834
+ class: a(i(s).e("tail"))
835
+ }, null, 2),
836
+ C("div", {
837
+ class: a([i(s).e("node"), i(s).m(e.type), i(s).is("hollow", e.hollow)]),
838
+ style: O(e.color ? { backgroundColor: e.color, borderColor: e.color } : void 0)
839
+ }, [
840
+ S(t.$slots, "icon", {}, () => [
841
+ e.icon ? (d(), x("span", {
842
+ key: 0,
843
+ class: a(i(s).e("icon"))
844
+ }, z(e.icon), 3)) : $("", !0)
845
+ ])
846
+ ], 6),
847
+ C("div", {
848
+ class: a(i(s).e("wrapper"))
849
+ }, [
850
+ e.timestamp && e.placement === "top" ? (d(), x("div", {
851
+ key: 0,
852
+ class: a(i(s).e("timestamp"))
853
+ }, z(e.timestamp), 3)) : $("", !0),
854
+ C("div", {
855
+ class: a(i(s).e("content"))
856
+ }, [
857
+ S(t.$slots, "default")
858
+ ], 2),
859
+ e.timestamp && e.placement === "bottom" ? (d(), x("div", {
860
+ key: 1,
861
+ class: a(i(s).e("timestamp"))
862
+ }, z(e.timestamp), 3)) : $("", !0)
863
+ ], 2)
864
+ ], 2));
865
+ }
866
+ }), He = /* @__PURE__ */ N({
805
867
  name: "XMessage",
806
868
  __name: "index",
807
869
  props: {
@@ -815,119 +877,119 @@ const ot = /* @__PURE__ */ D({
815
877
  onClose: {}
816
878
  },
817
879
  emits: ["close", "destroy"],
818
- setup(e, { expose: c, emit: t }) {
819
- const a = e, o = t, s = Z("message"), u = z(!1), g = z(Te()), v = {
880
+ setup(e, { expose: s, emit: t }) {
881
+ const r = e, o = t, l = F("message"), f = I(!1), g = I(Te()), v = {
820
882
  success: "✓",
821
883
  warning: "⚠",
822
884
  error: "✕",
823
885
  info: "ℹ"
824
- }, l = S(() => [
825
- s.b(),
826
- s.m(a.type),
827
- s.is("center", a.center),
828
- s.is("closable", a.showClose),
829
- a.customClass
830
- ]), w = S(() => ({
831
- top: `${a.offset}px`,
886
+ }, c = L(() => [
887
+ l.b(),
888
+ l.m(r.type),
889
+ l.is("center", r.center),
890
+ l.is("closable", r.showClose),
891
+ r.customClass
892
+ ]), k = L(() => ({
893
+ top: `${r.offset}px`,
832
894
  zIndex: g.value
833
895
  }));
834
896
  let p = null;
835
- const x = () => {
836
- a.duration > 0 && (p = setTimeout(() => {
837
- d();
838
- }, a.duration));
839
- }, m = () => {
897
+ const w = () => {
898
+ r.duration > 0 && (p = setTimeout(() => {
899
+ m();
900
+ }, r.duration));
901
+ }, h = () => {
840
902
  p && (clearTimeout(p), p = null);
841
- }, d = () => {
842
- var b;
843
- u.value = !1, (b = a.onClose) == null || b.call(a), o("close");
903
+ }, m = () => {
904
+ var y;
905
+ f.value = !1, (y = r.onClose) == null || y.call(r), o("close");
844
906
  }, n = () => {
845
907
  o("destroy");
846
908
  };
847
- return ye(() => {
848
- x(), u.value = !0;
909
+ return be(() => {
910
+ w(), f.value = !0;
849
911
  }), ue(() => {
850
- m();
851
- }), c({
852
- close: d
853
- }), (b, i) => (h(), X(_, {
912
+ h();
913
+ }), s({
914
+ close: m
915
+ }), (y, u) => (d(), j(q, {
854
916
  name: "x-message-fade",
855
917
  onAfterLeave: n
856
918
  }, {
857
- default: A(() => [
858
- u.value ? (h(), k("div", {
919
+ default: D(() => [
920
+ f.value ? (d(), x("div", {
859
921
  key: 0,
860
- class: r(l.value),
861
- style: O(w.value),
862
- onMouseenter: m,
863
- onMouseleave: x
922
+ class: a(c.value),
923
+ style: O(k.value),
924
+ onMouseenter: h,
925
+ onMouseleave: w
864
926
  }, [
865
927
  C("span", {
866
- class: r(f(s).e("icon"))
867
- }, I(v[e.type]), 3),
928
+ class: a(i(l).e("icon"))
929
+ }, z(v[e.type]), 3),
868
930
  C("span", {
869
- class: r(f(s).e("content"))
931
+ class: a(i(l).e("content"))
870
932
  }, [
871
- V(b.$slots, "default", {}, () => [
872
- N(I(e.message), 1)
933
+ S(y.$slots, "default", {}, () => [
934
+ H(z(e.message), 1)
873
935
  ])
874
936
  ], 2),
875
- e.showClose ? (h(), k("button", {
937
+ e.showClose ? (d(), x("button", {
876
938
  key: 0,
877
- class: r(f(s).e("close")),
878
- onClick: d
879
- }, " ✕ ", 2)) : T("", !0)
880
- ], 38)) : T("", !0)
939
+ class: a(i(l).e("close")),
940
+ onClick: m
941
+ }, " ✕ ", 2)) : $("", !0)
942
+ ], 38)) : $("", !0)
881
943
  ]),
882
944
  _: 3
883
945
  }));
884
946
  }
885
- }), G = [];
947
+ }), J = [];
886
948
  let Ae = 1;
887
949
  const De = () => {
888
- G.slice().forEach((e) => e.close());
950
+ J.slice().forEach((e) => e.close());
889
951
  };
890
952
  function xe(e) {
891
- const c = Ae++, t = document.createElement("div");
953
+ const s = Ae++, t = document.createElement("div");
892
954
  document.body.appendChild(t);
893
- const a = {
955
+ const r = {
894
956
  success: { bg: "#f0f9eb", border: "#67c23a", icon: "✓" },
895
957
  warning: { bg: "#fdf6ec", border: "#e6a23c", icon: "⚠" },
896
958
  error: { bg: "#fef0f0", border: "#f56c6c", icon: "✕" },
897
959
  info: { bg: "#f4f4f5", border: "#909399", icon: "ℹ" }
898
- }, o = e.type || "info", s = a[o] || a.info, u = Ce({
960
+ }, o = e.type || "info", l = r[o] || r.info, f = Ce({
899
961
  visible: !1,
900
962
  offset: e.offset ?? 20
901
963
  });
902
964
  let g = e.offset ?? 20;
903
- G.forEach((n) => {
904
- const b = n.container.firstElementChild;
905
- b && b.offsetHeight && (g += b.offsetHeight + 16);
906
- }), u.offset = g;
907
- let v = null, l = !1;
908
- const w = () => {
909
- l || (u.visible = !1, setTimeout(() => {
910
- if (l) return;
911
- l = !0;
912
- const n = G.findIndex((b) => b.id === c);
913
- n !== -1 && G.splice(n, 1);
965
+ J.forEach((n) => {
966
+ const y = n.container.firstElementChild;
967
+ y && y.offsetHeight && (g += y.offsetHeight + 16);
968
+ }), f.offset = g;
969
+ let v = null, c = !1;
970
+ const k = () => {
971
+ c || (f.visible = !1, setTimeout(() => {
972
+ if (c) return;
973
+ c = !0;
974
+ const n = J.findIndex((y) => y.id === s);
975
+ n !== -1 && J.splice(n, 1);
914
976
  try {
915
- m.unmount();
977
+ h.unmount();
916
978
  } catch {
917
979
  }
918
980
  t.parentNode && t.parentNode.removeChild(t);
919
981
  }, 300));
920
982
  }, p = () => {
921
983
  const n = e.duration ?? 3e3;
922
- n > 0 && (v = setTimeout(w, n));
923
- }, x = () => {
984
+ n > 0 && (v = setTimeout(k, n));
985
+ }, w = () => {
924
986
  v && (clearTimeout(v), v = null);
925
- }, m = ve({
987
+ }, h = ve({
926
988
  render() {
927
- if (!u.visible) return null;
989
+ if (!f.visible) return null;
928
990
  const n = [
929
991
  // Icon
930
- $("span", {
992
+ T("span", {
931
993
  style: {
932
994
  display: "inline-flex",
933
995
  alignItems: "center",
@@ -936,11 +998,11 @@ function xe(e) {
936
998
  height: "20px",
937
999
  marginRight: "10px",
938
1000
  fontSize: "16px",
939
- color: s.border
1001
+ color: l.border
940
1002
  }
941
- }, s.icon),
1003
+ }, l.icon),
942
1004
  // Content
943
- $("span", {
1005
+ T("span", {
944
1006
  style: {
945
1007
  flex: "1",
946
1008
  fontSize: "14px",
@@ -950,7 +1012,7 @@ function xe(e) {
950
1012
  }, e.message || "")
951
1013
  ];
952
1014
  return e.showClose && n.push(
953
- $("button", {
1015
+ T("button", {
954
1016
  style: {
955
1017
  position: "absolute",
956
1018
  top: "50%",
@@ -963,16 +1025,16 @@ function xe(e) {
963
1025
  color: "#909399",
964
1026
  padding: "0"
965
1027
  },
966
- onClick: (b) => {
967
- b.stopPropagation(), w();
1028
+ onClick: (y) => {
1029
+ y.stopPropagation(), k();
968
1030
  }
969
1031
  }, "✕")
970
- ), $("div", {
1032
+ ), T("div", {
971
1033
  class: ["x-message", `x-message--${o}`, e.center ? "is-center" : "", e.showClose ? "is-closable" : ""],
972
1034
  style: {
973
1035
  position: "fixed",
974
1036
  left: "50%",
975
- top: `${u.offset}px`,
1037
+ top: `${f.offset}px`,
976
1038
  transform: "translateX(-50%)",
977
1039
  display: "flex",
978
1040
  alignItems: "center",
@@ -981,37 +1043,37 @@ function xe(e) {
981
1043
  boxShadow: "0 2px 12px rgba(0,0,0,0.1)",
982
1044
  minWidth: "280px",
983
1045
  maxWidth: "480px",
984
- backgroundColor: s.bg,
985
- border: `1px solid ${s.border}`,
986
- zIndex: 2e3 + c,
1046
+ backgroundColor: l.bg,
1047
+ border: `1px solid ${l.border}`,
1048
+ zIndex: 2e3 + s,
987
1049
  transition: "opacity 0.3s, transform 0.3s"
988
1050
  },
989
- onMouseenter: x,
1051
+ onMouseenter: w,
990
1052
  onMouseleave: p
991
1053
  }, n);
992
1054
  }
993
1055
  });
994
- m.mount(t), ee(() => {
995
- u.visible = !0, p();
1056
+ h.mount(t), ee(() => {
1057
+ f.visible = !0, p();
996
1058
  });
997
- const d = { id: c, app: m, container: t, close: w };
998
- return G.push(d), { close: w };
1059
+ const m = { id: s, app: h, container: t, close: k };
1060
+ return J.push(m), { close: k };
999
1061
  }
1000
1062
  function Fe(e) {
1001
1063
  return xe(typeof e == "string" ? { message: e } : e);
1002
1064
  }
1003
- const le = (e) => (c) => xe({ ...typeof c == "string" ? { message: c } : c, type: e }), me = Object.assign(Fe, {
1065
+ const le = (e) => (s) => xe({ ...typeof s == "string" ? { message: s } : s, type: e }), pe = Object.assign(Fe, {
1004
1066
  info: le("info"),
1005
1067
  success: le("success"),
1006
1068
  warning: le("warning"),
1007
1069
  error: le("error"),
1008
1070
  closeAll: De
1009
- }), ct = me, ut = He, dt = {
1071
+ }), dt = pe, ft = He, mt = {
1010
1072
  install(e) {
1011
- e.config.globalProperties.$message = me, e.provide("message", me);
1073
+ e.config.globalProperties.$message = pe, e.provide("message", pe);
1012
1074
  }
1013
- }, J = [], We = () => {
1014
- J.slice().forEach((e) => e.close());
1075
+ }, Q = [], We = () => {
1076
+ Q.slice().forEach((e) => e.close());
1015
1077
  }, Xe = {
1016
1078
  success: { icon: "✓", color: "#67c23a" },
1017
1079
  warning: { icon: "⚠", color: "#e6a23c" },
@@ -1019,101 +1081,101 @@ const le = (e) => (c) => xe({ ...typeof c == "string" ? { message: c } : c, type
1019
1081
  info: { icon: "ℹ", color: "#909399" }
1020
1082
  };
1021
1083
  function de(e) {
1022
- return new Promise((c) => {
1084
+ return new Promise((s) => {
1023
1085
  const t = document.createElement("div");
1024
1086
  document.body.appendChild(t);
1025
- let a = !1;
1026
- const o = D({
1087
+ let r = !1;
1088
+ const o = N({
1027
1089
  name: "TMessageBox",
1028
1090
  setup() {
1029
- const g = z(!1), v = z(e.inputValue ?? ""), l = z(""), w = 2e3 + J.length + 1, p = (b) => {
1030
- a || (a = !0, g.value = !1, setTimeout(() => {
1031
- const i = J.findIndex((y) => y.container === t);
1032
- i !== -1 && J.splice(i, 1);
1091
+ const g = I(!1), v = I(e.inputValue ?? ""), c = I(""), k = 2e3 + Q.length + 1, p = (y) => {
1092
+ r || (r = !0, g.value = !1, setTimeout(() => {
1093
+ const u = Q.findIndex((b) => b.container === t);
1094
+ u !== -1 && Q.splice(u, 1);
1033
1095
  try {
1034
- s.unmount();
1096
+ l.unmount();
1035
1097
  } catch {
1036
1098
  }
1037
- t.parentNode && t.parentNode.removeChild(t), c({
1038
- action: b,
1039
- value: b === "confirm" ? v.value : void 0
1099
+ t.parentNode && t.parentNode.removeChild(t), s({
1100
+ action: y,
1101
+ value: y === "confirm" ? v.value : void 0
1040
1102
  });
1041
1103
  }, 300));
1042
- }, x = () => {
1104
+ }, w = () => {
1043
1105
  if (e.showInput && e.inputPattern && !e.inputPattern.test(v.value)) {
1044
- l.value = e.inputErrorMessage || "输入格式不正确";
1106
+ c.value = e.inputErrorMessage || "输入格式不正确";
1045
1107
  return;
1046
1108
  }
1047
- l.value = "", p("confirm");
1048
- }, m = () => {
1109
+ c.value = "", p("confirm");
1110
+ }, h = () => {
1049
1111
  p("cancel");
1050
- }, d = () => {
1112
+ }, m = () => {
1051
1113
  p("close");
1052
1114
  }, n = () => {
1053
- e.closeOnClickModal !== !1 && d();
1115
+ e.closeOnClickModal !== !1 && m();
1054
1116
  };
1055
1117
  return ee(() => {
1056
1118
  g.value = !0;
1057
1119
  }), {
1058
1120
  visible: g,
1059
1121
  inputValue: v,
1060
- inputError: l,
1061
- zIndex: w,
1062
- handleConfirm: x,
1063
- handleCancel: m,
1064
- handleClose: d,
1122
+ inputError: c,
1123
+ zIndex: k,
1124
+ handleConfirm: w,
1125
+ handleCancel: h,
1126
+ handleClose: m,
1065
1127
  handleMaskClick: n
1066
1128
  };
1067
1129
  },
1068
1130
  render() {
1069
1131
  if (!this.visible) return null;
1070
- const g = e.type, v = g ? Xe[g] : null, l = [];
1071
- v && l.push(
1072
- $("span", {
1132
+ const g = e.type, v = g ? Xe[g] : null, c = [];
1133
+ v && c.push(
1134
+ T("span", {
1073
1135
  class: "x-message-box__icon",
1074
1136
  style: { color: v.color, marginRight: "10px", fontSize: "20px" }
1075
1137
  }, v.icon)
1076
- ), l.push(
1077
- $("span", { class: "x-message-box__title" }, e.title || "提示")
1078
- ), e.showClose !== !1 && l.push(
1079
- $("button", {
1138
+ ), c.push(
1139
+ T("span", { class: "x-message-box__title" }, e.title || "提示")
1140
+ ), e.showClose !== !1 && c.push(
1141
+ T("button", {
1080
1142
  class: "x-message-box__close",
1081
1143
  onClick: this.handleClose
1082
1144
  }, "✕")
1083
1145
  );
1084
- const w = [];
1085
- w.push(
1086
- $("div", { class: "x-message-box__content" }, e.message || "")
1087
- ), e.showInput && w.push(
1088
- $("div", { class: "x-message-box__input", style: { marginTop: "12px" } }, [
1089
- $("input", {
1146
+ const k = [];
1147
+ k.push(
1148
+ T("div", { class: "x-message-box__content" }, e.message || "")
1149
+ ), e.showInput && k.push(
1150
+ T("div", { class: "x-message-box__input", style: { marginTop: "12px" } }, [
1151
+ T("input", {
1090
1152
  class: ["x-message-box__input-inner", this.inputError ? "is-error" : ""].filter(Boolean),
1091
1153
  type: e.inputType || "text",
1092
1154
  placeholder: e.inputPlaceholder || "请输入",
1093
1155
  value: this.inputValue,
1094
- onInput: (x) => {
1095
- this.inputValue = x.target.value, this.inputError = "";
1156
+ onInput: (w) => {
1157
+ this.inputValue = w.target.value, this.inputError = "";
1096
1158
  },
1097
- onKeyup: (x) => {
1098
- x.key === "Enter" && this.handleConfirm();
1159
+ onKeyup: (w) => {
1160
+ w.key === "Enter" && this.handleConfirm();
1099
1161
  }
1100
1162
  }),
1101
- this.inputError ? $("div", { class: "x-message-box__error", style: { color: "#f56c6c", fontSize: "12px", marginTop: "4px" } }, this.inputError) : null
1163
+ this.inputError ? T("div", { class: "x-message-box__error", style: { color: "#f56c6c", fontSize: "12px", marginTop: "4px" } }, this.inputError) : null
1102
1164
  ])
1103
1165
  );
1104
1166
  const p = [];
1105
1167
  return e.showCancelButton && p.push(
1106
- $("button", {
1168
+ T("button", {
1107
1169
  class: "x-button p-button--default",
1108
1170
  onClick: this.handleCancel
1109
1171
  }, e.cancelButtonText || "取消")
1110
1172
  ), e.showConfirmButton !== !1 && p.push(
1111
- $("button", {
1173
+ T("button", {
1112
1174
  class: "x-button p-button--primary",
1113
1175
  onClick: this.handleConfirm,
1114
1176
  style: { marginLeft: "10px" }
1115
1177
  }, e.confirmButtonText || "确定")
1116
- ), $("div", {
1178
+ ), T("div", {
1117
1179
  class: ["x-message-box-wrapper", e.center ? "is-center" : ""],
1118
1180
  style: {
1119
1181
  position: "fixed",
@@ -1129,7 +1191,7 @@ function de(e) {
1129
1191
  },
1130
1192
  onClick: this.handleMaskClick
1131
1193
  }, [
1132
- $("div", {
1194
+ T("div", {
1133
1195
  class: ["x-message-box", e.customClass],
1134
1196
  style: {
1135
1197
  backgroundColor: "#fff",
@@ -1138,10 +1200,10 @@ function de(e) {
1138
1200
  minWidth: "300px",
1139
1201
  maxWidth: "500px"
1140
1202
  },
1141
- onClick: (x) => x.stopPropagation()
1203
+ onClick: (w) => w.stopPropagation()
1142
1204
  }, [
1143
1205
  // Header
1144
- $("div", {
1206
+ T("div", {
1145
1207
  class: "x-message-box__header",
1146
1208
  style: {
1147
1209
  display: "flex",
@@ -1150,18 +1212,18 @@ function de(e) {
1150
1212
  padding: "16px 20px",
1151
1213
  borderBottom: "1px solid #eee"
1152
1214
  }
1153
- }, l),
1215
+ }, c),
1154
1216
  // Body
1155
- $("div", {
1217
+ T("div", {
1156
1218
  class: "x-message-box__body",
1157
1219
  style: {
1158
1220
  padding: "20px",
1159
1221
  fontSize: "14px",
1160
1222
  color: "#606266"
1161
1223
  }
1162
- }, w),
1224
+ }, k),
1163
1225
  // Footer
1164
- $("div", {
1226
+ T("div", {
1165
1227
  class: "x-message-box__footer",
1166
1228
  style: {
1167
1229
  padding: "10px 20px 16px",
@@ -1171,79 +1233,79 @@ function de(e) {
1171
1233
  ])
1172
1234
  ]);
1173
1235
  }
1174
- }), s = ve(o);
1175
- s.mount(t);
1176
- const u = {
1177
- app: s,
1236
+ }), l = ve(o);
1237
+ l.mount(t);
1238
+ const f = {
1239
+ app: l,
1178
1240
  container: t,
1179
1241
  close: () => {
1180
1242
  var v;
1181
- const g = (v = s._instance) == null ? void 0 : v.proxy;
1243
+ const g = (v = l._instance) == null ? void 0 : v.proxy;
1182
1244
  g != null && g.handleClose && g.handleClose();
1183
1245
  }
1184
1246
  };
1185
- J.push(u);
1247
+ Q.push(f);
1186
1248
  });
1187
1249
  }
1188
- async function _e(e, c, t) {
1250
+ async function je(e, s, t) {
1189
1251
  return de({
1190
1252
  message: e,
1191
- title: c,
1253
+ title: s,
1192
1254
  ...t,
1193
1255
  showConfirmButton: !0,
1194
1256
  showCancelButton: !1
1195
1257
  });
1196
1258
  }
1197
- async function je(e, c, t) {
1259
+ async function qe(e, s, t) {
1198
1260
  return de({
1199
1261
  message: e,
1200
- title: c,
1262
+ title: s,
1201
1263
  ...t,
1202
1264
  showConfirmButton: !0,
1203
1265
  showCancelButton: !0
1204
1266
  });
1205
1267
  }
1206
- async function qe(e, c, t) {
1268
+ async function Ze(e, s, t) {
1207
1269
  return de({
1208
1270
  message: e,
1209
- title: c,
1271
+ title: s,
1210
1272
  ...t,
1211
1273
  showInput: !0,
1212
1274
  showConfirmButton: !0,
1213
1275
  showCancelButton: !0
1214
1276
  });
1215
1277
  }
1216
- function Ze(e) {
1278
+ function Ke(e) {
1217
1279
  return de(e);
1218
1280
  }
1219
- const U = Object.assign(Ze, {
1220
- alert: _e,
1221
- confirm: je,
1222
- prompt: qe,
1281
+ const Y = Object.assign(Ke, {
1282
+ alert: je,
1283
+ confirm: qe,
1284
+ prompt: Ze,
1223
1285
  closeAll: We
1224
- }), ft = U, pt = {
1286
+ }), pt = Y, ht = {
1225
1287
  install(e) {
1226
- e.config.globalProperties.$msgbox = U, e.config.globalProperties.$alert = U.alert, e.config.globalProperties.$confirm = U.confirm, e.config.globalProperties.$prompt = U.prompt, e.provide("messageBox", U);
1288
+ e.config.globalProperties.$msgbox = Y, e.config.globalProperties.$alert = Y.alert, e.config.globalProperties.$confirm = Y.confirm, e.config.globalProperties.$prompt = Y.prompt, e.provide("messageBox", Y);
1227
1289
  }
1228
- }, Q = [];
1229
- let Ke = 1;
1230
- const Ue = () => {
1231
- Q.slice().forEach((e) => e.close());
1232
- }, Ye = {
1290
+ }, _ = [];
1291
+ let Ue = 1;
1292
+ const Ye = () => {
1293
+ _.slice().forEach((e) => e.close());
1294
+ }, Ge = {
1233
1295
  success: { icon: "✓", color: "#67c23a" },
1234
1296
  warning: { icon: "⚠", color: "#e6a23c" },
1235
1297
  error: { icon: "✕", color: "#f56c6c" },
1236
1298
  info: { icon: "ℹ", color: "#909399" }
1237
- }, Ge = (e, c) => {
1238
- const t = Q.filter((o) => o.position === e);
1239
- let a = 16;
1299
+ }, Je = (e, s) => {
1300
+ const t = _.filter((o) => o.position === e);
1301
+ let r = 16;
1240
1302
  for (const o of t)
1241
- if (o.id < c) {
1242
- const s = o.container.firstElementChild;
1243
- s && (a += s.offsetHeight + 16);
1303
+ if (o.id < s) {
1304
+ const l = o.container.firstElementChild;
1305
+ l && (r += l.offsetHeight + 16);
1244
1306
  }
1245
- return a;
1246
- }, Je = (e, c) => {
1307
+ return r;
1308
+ }, Qe = (e, s) => {
1247
1309
  const t = {
1248
1310
  position: "fixed",
1249
1311
  width: "330px",
@@ -1251,61 +1313,61 @@ const Ue = () => {
1251
1313
  };
1252
1314
  switch (e) {
1253
1315
  case "top-right":
1254
- t.top = `${c}px`, t.right = "16px";
1316
+ t.top = `${s}px`, t.right = "16px";
1255
1317
  break;
1256
1318
  case "top-left":
1257
- t.top = `${c}px`, t.left = "16px";
1319
+ t.top = `${s}px`, t.left = "16px";
1258
1320
  break;
1259
1321
  case "bottom-right":
1260
- t.bottom = `${c}px`, t.right = "16px";
1322
+ t.bottom = `${s}px`, t.right = "16px";
1261
1323
  break;
1262
1324
  case "bottom-left":
1263
- t.bottom = `${c}px`, t.left = "16px";
1325
+ t.bottom = `${s}px`, t.left = "16px";
1264
1326
  break;
1265
1327
  default:
1266
- t.top = `${c}px`, t.right = "16px";
1328
+ t.top = `${s}px`, t.right = "16px";
1267
1329
  }
1268
1330
  return t;
1269
1331
  };
1270
1332
  function we(e) {
1271
- const c = Ke++, t = e.position || "top-right", a = document.createElement("div");
1272
- document.body.appendChild(a);
1273
- let o = null, s = !1;
1274
- const u = D({
1333
+ const s = Ue++, t = e.position || "top-right", r = document.createElement("div");
1334
+ document.body.appendChild(r);
1335
+ let o = null, l = !1;
1336
+ const f = N({
1275
1337
  name: "TNotification",
1276
1338
  setup() {
1277
- const l = z(!1), w = () => {
1278
- s || (s = !0, l.value = !1, setTimeout(() => {
1279
- var b;
1280
- const n = Q.findIndex((i) => i.id === c);
1281
- n !== -1 && Q.splice(n, 1), o && clearTimeout(o), (b = e.onClose) == null || b.call(e);
1339
+ const c = I(!1), k = () => {
1340
+ l || (l = !0, c.value = !1, setTimeout(() => {
1341
+ var y;
1342
+ const n = _.findIndex((u) => u.id === s);
1343
+ n !== -1 && _.splice(n, 1), o && clearTimeout(o), (y = e.onClose) == null || y.call(e);
1282
1344
  try {
1283
1345
  g.unmount();
1284
1346
  } catch {
1285
1347
  }
1286
- a.parentNode && a.parentNode.removeChild(a);
1348
+ r.parentNode && r.parentNode.removeChild(r);
1287
1349
  }, 300));
1288
1350
  }, p = () => {
1289
1351
  const n = e.duration ?? 4500;
1290
- n > 0 && (o = setTimeout(w, n));
1291
- }, x = () => {
1352
+ n > 0 && (o = setTimeout(k, n));
1353
+ }, w = () => {
1292
1354
  o && (clearTimeout(o), o = null);
1293
- }, m = S(() => (e.offset ?? 0) + Ge(t, c)), d = S(() => Je(t, m.value));
1355
+ }, h = L(() => (e.offset ?? 0) + Je(t, s)), m = L(() => Qe(t, h.value));
1294
1356
  return ee(() => {
1295
- l.value = !0, p();
1357
+ c.value = !0, p();
1296
1358
  }), {
1297
- visible: l,
1298
- close: w,
1299
- positionStyles: d,
1359
+ visible: c,
1360
+ close: k,
1361
+ positionStyles: m,
1300
1362
  startTimer: p,
1301
- clearTimer: x
1363
+ clearTimer: w
1302
1364
  };
1303
1365
  },
1304
1366
  render() {
1305
1367
  if (!this.visible) return null;
1306
- const l = e.type, w = l ? Ye[l] : null, p = [];
1368
+ const c = e.type, k = c ? Ge[c] : null, p = [];
1307
1369
  e.title && p.push(
1308
- $("div", {
1370
+ T("div", {
1309
1371
  class: "x-notification__title",
1310
1372
  style: {
1311
1373
  fontWeight: "600",
@@ -1315,7 +1377,7 @@ function we(e) {
1315
1377
  }
1316
1378
  }, e.title)
1317
1379
  ), e.message && (e.dangerouslyUseHTMLString ? p.push(
1318
- $("div", {
1380
+ T("div", {
1319
1381
  class: "x-notification__content",
1320
1382
  style: {
1321
1383
  fontSize: "14px",
@@ -1325,7 +1387,7 @@ function we(e) {
1325
1387
  innerHTML: e.message
1326
1388
  })
1327
1389
  ) : p.push(
1328
- $("div", {
1390
+ T("div", {
1329
1391
  class: "x-notification__content",
1330
1392
  style: {
1331
1393
  fontSize: "14px",
@@ -1334,9 +1396,9 @@ function we(e) {
1334
1396
  }
1335
1397
  }, e.message)
1336
1398
  ));
1337
- const x = [];
1338
- return w && x.push(
1339
- $("div", {
1399
+ const w = [];
1400
+ return k && w.push(
1401
+ T("div", {
1340
1402
  class: "x-notification__icon",
1341
1403
  style: {
1342
1404
  display: "flex",
@@ -1346,18 +1408,18 @@ function we(e) {
1346
1408
  height: "24px",
1347
1409
  marginRight: "12px",
1348
1410
  fontSize: "18px",
1349
- color: w.color
1411
+ color: k.color
1350
1412
  }
1351
- }, w.icon)
1352
- ), x.push(
1353
- $("div", {
1413
+ }, k.icon)
1414
+ ), w.push(
1415
+ T("div", {
1354
1416
  class: "x-notification__main",
1355
1417
  style: {
1356
1418
  flex: "1"
1357
1419
  }
1358
1420
  }, p)
1359
- ), e.showClose !== !1 && x.push(
1360
- $("button", {
1421
+ ), e.showClose !== !1 && w.push(
1422
+ T("button", {
1361
1423
  class: "x-notification__close",
1362
1424
  style: {
1363
1425
  position: "absolute",
@@ -1370,11 +1432,11 @@ function we(e) {
1370
1432
  color: "#909399",
1371
1433
  padding: "0"
1372
1434
  },
1373
- onClick: (m) => {
1374
- m.stopPropagation(), this.close();
1435
+ onClick: (h) => {
1436
+ h.stopPropagation(), this.close();
1375
1437
  }
1376
1438
  }, "✕")
1377
- ), $("div", {
1439
+ ), T("div", {
1378
1440
  class: ["x-notification", e.customClass],
1379
1441
  style: {
1380
1442
  ...this.positionStyles,
@@ -1389,33 +1451,33 @@ function we(e) {
1389
1451
  },
1390
1452
  onMouseenter: this.clearTimer,
1391
1453
  onMouseleave: this.startTimer
1392
- }, x);
1454
+ }, w);
1393
1455
  }
1394
- }), g = ve(u);
1395
- g.mount(a);
1456
+ }), g = ve(f);
1457
+ g.mount(r);
1396
1458
  const v = {
1397
- id: c,
1459
+ id: s,
1398
1460
  app: g,
1399
- container: a,
1461
+ container: r,
1400
1462
  position: t,
1401
1463
  close: () => {
1402
- var w;
1403
- const l = (w = g._instance) == null ? void 0 : w.proxy;
1404
- l != null && l.close && l.close();
1464
+ var k;
1465
+ const c = (k = g._instance) == null ? void 0 : k.proxy;
1466
+ c != null && c.close && c.close();
1405
1467
  }
1406
1468
  };
1407
- return Q.push(v), { close: v.close };
1469
+ return _.push(v), { close: v.close };
1408
1470
  }
1409
- function Qe(e) {
1471
+ function _e(e) {
1410
1472
  return we(typeof e == "string" ? { message: e } : e);
1411
1473
  }
1412
- const ae = (e) => (c) => we({ ...typeof c == "string" ? { message: c } : c, type: e }), he = Object.assign(Qe, {
1474
+ const ae = (e) => (s) => we({ ...typeof s == "string" ? { message: s } : s, type: e }), he = Object.assign(_e, {
1413
1475
  info: ae("info"),
1414
1476
  success: ae("success"),
1415
1477
  warning: ae("warning"),
1416
1478
  error: ae("error"),
1417
- closeAll: Ue
1418
- }), mt = he, ht = {
1479
+ closeAll: Ye
1480
+ }), vt = he, gt = {
1419
1481
  install(e) {
1420
1482
  e.config.globalProperties.$notify = he, e.provide("notification", he);
1421
1483
  }
@@ -1425,14 +1487,16 @@ export {
1425
1487
  rt as Backtop,
1426
1488
  nt as Drawer,
1427
1489
  st as DrawerForm,
1428
- ct as Message,
1429
- ft as MessageBox,
1430
- ut as MessageComponent,
1490
+ dt as Message,
1491
+ pt as MessageBox,
1492
+ ft as MessageComponent,
1431
1493
  ot as Modal,
1432
- mt as Notification,
1494
+ vt as Notification,
1433
1495
  it as Popconfirm,
1434
- dt as TMessage,
1435
- pt as TMessageBox,
1436
- ht as TNotification,
1496
+ mt as TMessage,
1497
+ ht as TMessageBox,
1498
+ gt as TNotification,
1499
+ ct as Timeline,
1500
+ ut as TimelineItem,
1437
1501
  at as Tooltip
1438
1502
  };