@cghbcf/xp-ui 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { ref as z, openBlock as a, createBlock as R, Transition as D, withCtx as E, createElementBlock as r, normalizeClass as B, createElementVNode as o, toDisplayString as k, renderSlot as b, createTextVNode as W, createCommentVNode as g, computed as M, normalizeStyle as T, onUnmounted as ie, Teleport as H, createVNode as A, withModifiers as j, Fragment as _, renderList as V, watch as re, onMounted as de, onBeforeUnmount as Q, nextTick as ue, inject as _e, provide as ke, reactive as $e, unref as ce, TransitionGroup as we } from "vue";
2
- const C = (e, n) => {
1
+ import { ref as S, openBlock as i, createBlock as R, Transition as A, withCtx as j, createElementBlock as a, normalizeClass as B, createElementVNode as n, toDisplayString as b, renderSlot as y, createTextVNode as H, createCommentVNode as x, computed as z, normalizeStyle as T, onUnmounted as re, Teleport as J, createVNode as E, withModifiers as D, Fragment as k, renderList as V, watch as ae, onMounted as de, onBeforeUnmount as Q, nextTick as ue, inject as ke, provide as be, reactive as we, unref as ce, TransitionGroup as $e } from "vue";
2
+ const C = (e, o) => {
3
3
  const t = e.__vccOpts || e;
4
- for (const [s, l] of n)
4
+ for (const [s, l] of o)
5
5
  t[s] = l;
6
6
  return t;
7
- }, Ce = { class: "xp-alert__icon" }, Se = { class: "xp-alert__content" }, ze = { class: "xp-alert__title" }, Be = {
7
+ }, Ce = { class: "xp-alert__icon" }, Me = { class: "xp-alert__content" }, Se = { class: "xp-alert__title" }, Be = {
8
8
  key: 0,
9
9
  class: "xp-alert__description"
10
- }, Me = {
10
+ }, ze = {
11
11
  __name: "Alert",
12
12
  props: {
13
13
  title: {
@@ -34,8 +34,8 @@ const C = (e, n) => {
34
34
  }
35
35
  },
36
36
  emits: ["close"],
37
- setup(e, { emit: n }) {
38
- const t = n, s = z(!0), l = {
37
+ setup(e, { emit: o }) {
38
+ const t = o, s = S(!0), l = {
39
39
  success: "✓",
40
40
  warning: "!",
41
41
  danger: "×",
@@ -43,9 +43,9 @@ const C = (e, n) => {
43
43
  }, u = () => {
44
44
  s.value = !1, t("close");
45
45
  };
46
- return (d, x) => (a(), R(D, { name: "xp-alert-fade" }, {
47
- default: E(() => [
48
- s.value ? (a(), r("div", {
46
+ return (d, v) => (i(), R(A, { name: "xp-alert-fade" }, {
47
+ default: j(() => [
48
+ s.value ? (i(), a("div", {
49
49
  key: 0,
50
50
  class: B(["xp-alert", [
51
51
  `xp-alert--${e.type}`,
@@ -54,34 +54,34 @@ const C = (e, n) => {
54
54
  ]]),
55
55
  role: "alert"
56
56
  }, [
57
- o("span", Ce, k(l[e.type]), 1),
58
- o("div", Se, [
59
- o("span", ze, [
60
- b(d.$slots, "default", {}, () => [
61
- W(k(e.title), 1)
57
+ n("span", Ce, b(l[e.type]), 1),
58
+ n("div", Me, [
59
+ n("span", Se, [
60
+ y(d.$slots, "default", {}, () => [
61
+ H(b(e.title), 1)
62
62
  ], !0)
63
63
  ]),
64
- d.$slots.default ? (a(), r("p", Be, [
65
- b(d.$slots, "default", {}, void 0, !0)
66
- ])) : g("", !0)
64
+ d.$slots.default ? (i(), a("p", Be, [
65
+ y(d.$slots, "default", {}, void 0, !0)
66
+ ])) : x("", !0)
67
67
  ]),
68
- e.closable ? (a(), r("i", {
68
+ e.closable ? (i(), a("i", {
69
69
  key: 0,
70
70
  class: "xp-alert__close-btn",
71
71
  onClick: u
72
- }, "×")) : g("", !0)
73
- ], 2)) : g("", !0)
72
+ }, "×")) : x("", !0)
73
+ ], 2)) : x("", !0)
74
74
  ]),
75
75
  _: 3
76
76
  }));
77
77
  }
78
- }, Ie = /* @__PURE__ */ C(Me, [["__scopeId", "data-v-91d792bd"]]), Te = ["src", "alt"], Ve = {
78
+ }, Ie = /* @__PURE__ */ C(ze, [["__scopeId", "data-v-91d792bd"]]), Te = ["src", "alt"], Ve = {
79
79
  key: 1,
80
80
  class: "xp-avatar__slot"
81
- }, Ee = {
81
+ }, je = {
82
82
  key: 2,
83
83
  class: "xp-avatar__text"
84
- }, Ae = {
84
+ }, Ee = {
85
85
  __name: "Avatar",
86
86
  props: {
87
87
  src: {
@@ -108,14 +108,14 @@ const C = (e, n) => {
108
108
  }
109
109
  },
110
110
  emits: ["error"],
111
- setup(e, { emit: n }) {
112
- const t = e, s = n, l = z(!1), u = M(() => ({
111
+ setup(e, { emit: o }) {
112
+ const t = e, s = o, l = S(!1), u = z(() => ({
113
113
  backgroundColor: t.src ? "transparent" : "var(--xp-color-primary-bg)",
114
114
  color: t.src ? void 0 : "var(--xp-color-primary)"
115
115
  })), d = () => {
116
116
  l.value = !0, s("error");
117
117
  };
118
- return (x, m) => (a(), r("span", {
118
+ return (v, h) => (i(), a("span", {
119
119
  class: B(["xp-avatar", [
120
120
  `xp-avatar--${e.shape}`,
121
121
  `xp-avatar--${e.size}`,
@@ -123,17 +123,17 @@ const C = (e, n) => {
123
123
  ]]),
124
124
  style: T(u.value)
125
125
  }, [
126
- e.src && !l.value ? (a(), r("img", {
126
+ e.src && !l.value ? (i(), a("img", {
127
127
  key: 0,
128
128
  src: e.src,
129
129
  alt: e.alt,
130
130
  onError: d
131
- }, null, 40, Te)) : x.$slots.default ? (a(), r("span", Ve, [
132
- b(x.$slots, "default", {}, void 0, !0)
133
- ])) : (a(), r("span", Ee, k(e.alt || "A"), 1))
131
+ }, null, 40, Te)) : v.$slots.default ? (i(), a("span", Ve, [
132
+ y(v.$slots, "default", {}, void 0, !0)
133
+ ])) : (i(), a("span", je, b(e.alt || "A"), 1))
134
134
  ], 6));
135
135
  }
136
- }, De = /* @__PURE__ */ C(Ae, [["__scopeId", "data-v-a9a54bc5"]]), je = { key: 0 }, Ne = {
136
+ }, Ae = /* @__PURE__ */ C(Ee, [["__scopeId", "data-v-a9a54bc5"]]), De = { key: 0 }, Ne = {
137
137
  __name: "Badge",
138
138
  props: {
139
139
  value: {
@@ -159,20 +159,20 @@ const C = (e, n) => {
159
159
  }
160
160
  },
161
161
  setup(e) {
162
- const n = e, t = M(() => typeof n.value == "number" && n.value > n.max ? `${n.max}+` : n.value), s = M(() => n.value !== 0 && n.value !== "" && n.value !== null && n.value !== void 0);
163
- return (l, u) => (a(), r("div", {
162
+ const o = e, t = z(() => typeof o.value == "number" && o.value > o.max ? `${o.max}+` : o.value), s = z(() => o.value !== 0 && o.value !== "" && o.value !== null && o.value !== void 0);
163
+ return (l, u) => (i(), a("div", {
164
164
  class: B(["xp-badge", { "xp-badge--dot": e.isDot, "xp-badge--hidden": e.hidden }])
165
165
  }, [
166
- b(l.$slots, "default", {}, void 0, !0),
167
- !e.hidden && (e.isDot || s.value) ? (a(), r("sup", {
166
+ y(l.$slots, "default", {}, void 0, !0),
167
+ !e.hidden && (e.isDot || s.value) ? (i(), a("sup", {
168
168
  key: 0,
169
169
  class: B(["xp-badge__content", [
170
170
  `xp-badge__content--${e.type}`,
171
171
  { "xp-badge__content--dot": e.isDot }
172
172
  ]])
173
173
  }, [
174
- e.isDot ? g("", !0) : (a(), r("span", je, k(t.value), 1))
175
- ], 2)) : g("", !0)
174
+ e.isDot ? x("", !0) : (i(), a("span", De, b(t.value), 1))
175
+ ], 2)) : x("", !0)
176
176
  ], 2));
177
177
  }
178
178
  }, Fe = /* @__PURE__ */ C(Ne, [["__scopeId", "data-v-207db6dd"]]), Re = ["disabled"], Oe = {
@@ -209,11 +209,11 @@ const C = (e, n) => {
209
209
  }
210
210
  },
211
211
  emits: ["click"],
212
- setup(e, { emit: n }) {
213
- const t = e, s = n, l = (u) => {
212
+ setup(e, { emit: o }) {
213
+ const t = e, s = o, l = (u) => {
214
214
  !t.disabled && !t.loading && s("click", u);
215
215
  };
216
- return (u, d) => (a(), r("button", {
216
+ return (u, d) => (i(), a("button", {
217
217
  class: B(["xp-button", [
218
218
  `xp-button--${e.type}`,
219
219
  `xp-button--${e.size}`,
@@ -227,19 +227,19 @@ const C = (e, n) => {
227
227
  disabled: e.disabled || e.loading,
228
228
  onClick: l
229
229
  }, [
230
- e.loading ? (a(), r("span", Oe)) : g("", !0),
231
- o("span", Xe, [
232
- b(u.$slots, "default", {}, void 0, !0)
230
+ e.loading ? (i(), a("span", Oe)) : x("", !0),
231
+ n("span", Xe, [
232
+ y(u.$slots, "default", {}, void 0, !0)
233
233
  ])
234
234
  ], 10, Re));
235
235
  }
236
236
  }, K = /* @__PURE__ */ C(Le, [["__scopeId", "data-v-9c6bc634"]]), Pe = {
237
237
  key: 0,
238
238
  class: "xp-card__header"
239
- }, We = { class: "xp-card__title" }, Je = {
239
+ }, He = { class: "xp-card__title" }, We = {
240
240
  key: 0,
241
241
  class: "xp-card__extra"
242
- }, He = { class: "xp-card__body" }, Ue = {
242
+ }, Je = { class: "xp-card__body" }, Ue = {
243
243
  key: 1,
244
244
  class: "xp-card__footer"
245
245
  }, Ge = {
@@ -264,7 +264,7 @@ const C = (e, n) => {
264
264
  }
265
265
  },
266
266
  setup(e) {
267
- return (n, t) => (a(), r("div", {
267
+ return (o, t) => (i(), a("div", {
268
268
  class: B(["xp-card", [
269
269
  `xp-card--${e.shadow}`,
270
270
  {
@@ -273,20 +273,20 @@ const C = (e, n) => {
273
273
  }
274
274
  ]])
275
275
  }, [
276
- e.title || n.$slots.header ? (a(), r("div", Pe, [
277
- b(n.$slots, "header", {}, () => [
278
- o("h3", We, k(e.title), 1)
276
+ e.title || o.$slots.header ? (i(), a("div", Pe, [
277
+ y(o.$slots, "header", {}, () => [
278
+ n("h3", He, b(e.title), 1)
279
279
  ], !0),
280
- n.$slots.extra ? (a(), r("div", Je, [
281
- b(n.$slots, "extra", {}, void 0, !0)
282
- ])) : g("", !0)
283
- ])) : g("", !0),
284
- o("div", He, [
285
- b(n.$slots, "default", {}, void 0, !0)
280
+ o.$slots.extra ? (i(), a("div", We, [
281
+ y(o.$slots, "extra", {}, void 0, !0)
282
+ ])) : x("", !0)
283
+ ])) : x("", !0),
284
+ n("div", Je, [
285
+ y(o.$slots, "default", {}, void 0, !0)
286
286
  ]),
287
- n.$slots.footer ? (a(), r("div", Ue, [
288
- b(n.$slots, "footer", {}, void 0, !0)
289
- ])) : g("", !0)
287
+ o.$slots.footer ? (i(), a("div", Ue, [
288
+ y(o.$slots, "footer", {}, void 0, !0)
289
+ ])) : x("", !0)
290
290
  ], 2));
291
291
  }
292
292
  }, qe = /* @__PURE__ */ C(Ge, [["__scopeId", "data-v-e65cbe05"]]), Ye = { class: "xp-checkbox__input" }, Ke = ["checked", "disabled", ".indeterminate"], Ze = { class: "xp-checkbox__label" }, Qe = {
@@ -306,13 +306,13 @@ const C = (e, n) => {
306
306
  }
307
307
  },
308
308
  emits: ["update:modelValue", "change"],
309
- setup(e, { emit: n }) {
310
- const t = e, s = n, l = (u) => {
309
+ setup(e, { emit: o }) {
310
+ const t = e, s = o, l = (u) => {
311
311
  if (t.disabled) return;
312
312
  const d = u.target.checked;
313
313
  s("update:modelValue", d), s("change", d);
314
314
  };
315
- return (u, d) => (a(), r("label", {
315
+ return (u, d) => (i(), a("label", {
316
316
  class: B(["xp-checkbox", [
317
317
  {
318
318
  "xp-checkbox--checked": e.modelValue,
@@ -321,9 +321,9 @@ const C = (e, n) => {
321
321
  }
322
322
  ]])
323
323
  }, [
324
- o("span", Ye, [
325
- d[0] || (d[0] = o("span", { class: "xp-checkbox__inner" }, null, -1)),
326
- o("input", {
324
+ n("span", Ye, [
325
+ d[0] || (d[0] = n("span", { class: "xp-checkbox__inner" }, null, -1)),
326
+ n("input", {
327
327
  type: "checkbox",
328
328
  class: "xp-checkbox__original",
329
329
  checked: e.modelValue,
@@ -332,15 +332,15 @@ const C = (e, n) => {
332
332
  ".indeterminate": e.indeterminate
333
333
  }, null, 40, Ke)
334
334
  ]),
335
- o("span", Ze, [
336
- b(u.$slots, "default", {}, void 0, !0)
335
+ n("span", Ze, [
336
+ y(u.$slots, "default", {}, void 0, !0)
337
337
  ])
338
338
  ], 2));
339
339
  }
340
340
  }, et = /* @__PURE__ */ C(Qe, [["__scopeId", "data-v-7c078f46"]]), tt = {
341
341
  key: 0,
342
342
  class: "xp-menu__divider"
343
- }, nt = ["disabled", "onClick"], ot = {
343
+ }, ot = ["disabled", "onClick"], nt = {
344
344
  key: 0,
345
345
  class: "xp-menu__icon",
346
346
  "aria-hidden": "true"
@@ -357,62 +357,62 @@ const C = (e, n) => {
357
357
  items: { type: Array, default: () => [] }
358
358
  },
359
359
  emits: ["close", "select", "command"],
360
- setup(e, { emit: n }) {
361
- const t = e, s = n;
362
- z(null);
363
- const l = M(() => {
364
- const f = Math.min(t.items.filter((h) => !h.divider).length, 12) * 32 + 12;
365
- let i = t.x, c = t.y;
366
- return i + 220 > window.innerWidth - 8 && (i = Math.max(8, window.innerWidth - 220 - 8)), c + f > window.innerHeight - 8 && (c = Math.max(8, window.innerHeight - f - 8)), { left: `${i}px`, top: `${c}px` };
360
+ setup(e, { emit: o }) {
361
+ const t = e, s = o;
362
+ S(null);
363
+ const l = z(() => {
364
+ const f = Math.min(t.items.filter((m) => !m.divider).length, 12) * 32 + 12;
365
+ let r = t.x, c = t.y;
366
+ return r + 220 > window.innerWidth - 8 && (r = Math.max(8, window.innerWidth - 220 - 8)), c + f > window.innerHeight - 8 && (c = Math.max(8, window.innerHeight - f - 8)), { left: `${r}px`, top: `${c}px` };
367
367
  });
368
368
  function u() {
369
369
  s("close");
370
370
  }
371
- function d(m) {
372
- m.disabled || (s("close"), s("select", m), s("command", m.command), m.onClick && m.onClick());
371
+ function d(h) {
372
+ h.disabled || (s("close"), s("select", h), s("command", h.command), h.onClick && h.onClick());
373
373
  }
374
- function x(m) {
375
- m.key === "Escape" && t.visible && s("close");
374
+ function v(h) {
375
+ h.key === "Escape" && t.visible && s("close");
376
376
  }
377
- return ie(() => window.removeEventListener("keydown", x)), (m, f) => (a(), R(H, { to: "body" }, [
378
- A(D, { name: "xp-menu" }, {
379
- default: E(() => [
380
- e.visible ? (a(), r("div", {
377
+ return re(() => window.removeEventListener("keydown", v)), (h, f) => (i(), R(J, { to: "body" }, [
378
+ E(A, { name: "xp-menu" }, {
379
+ default: j(() => [
380
+ e.visible ? (i(), a("div", {
381
381
  key: 0,
382
382
  class: "xp-menu-mask",
383
383
  onMousedown: u,
384
- onContextmenu: f[2] || (f[2] = j(() => {
384
+ onContextmenu: f[2] || (f[2] = D(() => {
385
385
  }, ["prevent"]))
386
386
  }, [
387
- o("div", {
387
+ n("div", {
388
388
  class: "xp-menu",
389
389
  style: T(l.value),
390
390
  role: "menu",
391
- onMousedown: f[0] || (f[0] = j(() => {
391
+ onMousedown: f[0] || (f[0] = D(() => {
392
392
  }, ["stop"])),
393
- onMouseup: f[1] || (f[1] = j(() => {
393
+ onMouseup: f[1] || (f[1] = D(() => {
394
394
  }, ["stop"]))
395
395
  }, [
396
- (a(!0), r(_, null, V(e.items, (i, c) => (a(), r(_, { key: c }, [
397
- i.divider ? (a(), r("div", tt)) : (a(), r("button", {
396
+ (i(!0), a(k, null, V(e.items, (r, c) => (i(), a(k, { key: c }, [
397
+ r.divider ? (i(), a("div", tt)) : (i(), a("button", {
398
398
  key: 1,
399
- class: B(["xp-menu__item", { "xp-menu__item--danger": i.danger, "xp-menu__item--disabled": i.disabled }]),
399
+ class: B(["xp-menu__item", { "xp-menu__item--danger": r.danger, "xp-menu__item--disabled": r.disabled }]),
400
400
  role: "menuitem",
401
- disabled: i.disabled,
402
- onClick: (h) => d(i)
401
+ disabled: r.disabled,
402
+ onClick: (m) => d(r)
403
403
  }, [
404
- i.icon ? (a(), r("span", ot, k(i.icon), 1)) : g("", !0),
405
- o("span", st, k(i.label), 1)
406
- ], 10, nt))
404
+ r.icon ? (i(), a("span", nt, b(r.icon), 1)) : x("", !0),
405
+ n("span", st, b(r.label), 1)
406
+ ], 10, ot))
407
407
  ], 64))), 128))
408
408
  ], 36)
409
- ], 32)) : g("", !0)
409
+ ], 32)) : x("", !0)
410
410
  ]),
411
411
  _: 1
412
412
  })
413
413
  ]));
414
414
  }
415
- }, at = /* @__PURE__ */ C(lt, [["__scopeId", "data-v-7477a575"]]), it = { class: "xp-dialog__header" }, rt = { class: "xp-dialog__title" }, dt = { class: "xp-dialog__body" }, ut = {
415
+ }, it = /* @__PURE__ */ C(lt, [["__scopeId", "data-v-7477a575"]]), rt = { class: "xp-dialog__header" }, at = { class: "xp-dialog__title" }, dt = { class: "xp-dialog__body" }, ut = {
416
416
  key: 0,
417
417
  class: "xp-dialog__footer"
418
418
  }, ct = {
@@ -448,86 +448,86 @@ const C = (e, n) => {
448
448
  }
449
449
  },
450
450
  emits: ["confirm", "cancel", "update:visible", "close"],
451
- setup(e, { emit: n }) {
452
- const t = e, s = n, l = () => {
451
+ setup(e, { emit: o }) {
452
+ const t = e, s = o, l = () => {
453
453
  s("update:visible", !1), s("close");
454
454
  }, u = () => {
455
455
  t.closeOnClickModal && l();
456
456
  }, d = () => {
457
457
  s("confirm"), l();
458
- }, x = () => {
458
+ }, v = () => {
459
459
  s("cancel"), l();
460
460
  };
461
- function m(f) {
461
+ function h(f) {
462
462
  f.key === "Escape" && t.visible && l();
463
463
  }
464
- return re(
464
+ return ae(
465
465
  () => t.visible,
466
466
  (f) => {
467
- f ? window.addEventListener("keydown", m) : window.removeEventListener("keydown", m);
467
+ f ? window.addEventListener("keydown", h) : window.removeEventListener("keydown", h);
468
468
  }
469
- ), ie(() => window.removeEventListener("keydown", m)), (f, i) => (a(), R(H, { to: "body" }, [
470
- A(D, { name: "xp-dialog-fade" }, {
471
- default: E(() => [
472
- e.visible ? (a(), r("div", {
469
+ ), re(() => window.removeEventListener("keydown", h)), (f, r) => (i(), R(J, { to: "body" }, [
470
+ E(A, { name: "xp-dialog-fade" }, {
471
+ default: j(() => [
472
+ e.visible ? (i(), a("div", {
473
473
  key: 0,
474
474
  class: "xp-dialog__wrapper",
475
- onClick: j(u, ["self"])
475
+ onClick: D(u, ["self"])
476
476
  }, [
477
- i[0] || (i[0] = o("div", { class: "xp-dialog__mask" }, null, -1)),
478
- A(D, {
477
+ r[0] || (r[0] = n("div", { class: "xp-dialog__mask" }, null, -1)),
478
+ E(A, {
479
479
  name: "xp-dialog-slide",
480
480
  appear: ""
481
481
  }, {
482
- default: E(() => [
483
- e.visible ? (a(), r("div", {
482
+ default: j(() => [
483
+ e.visible ? (i(), a("div", {
484
484
  key: 0,
485
485
  class: "xp-dialog",
486
486
  style: T({ width: e.width })
487
487
  }, [
488
- o("div", it, [
489
- o("h3", rt, k(e.title), 1),
490
- o("button", {
488
+ n("div", rt, [
489
+ n("h3", at, b(e.title), 1),
490
+ n("button", {
491
491
  class: "xp-dialog__close",
492
492
  onClick: l
493
493
  }, "×")
494
494
  ]),
495
- o("div", dt, [
496
- b(f.$slots, "default", {}, void 0, !0)
495
+ n("div", dt, [
496
+ y(f.$slots, "default", {}, void 0, !0)
497
497
  ]),
498
- f.$slots.footer || e.showDefaultFooter ? (a(), r("div", ut, [
499
- b(f.$slots, "footer", {}, () => [
500
- A(K, { onClick: x }, {
501
- default: E(() => [
502
- W(k(e.cancelButtonText), 1)
498
+ f.$slots.footer || e.showDefaultFooter ? (i(), a("div", ut, [
499
+ y(f.$slots, "footer", {}, () => [
500
+ E(K, { onClick: v }, {
501
+ default: j(() => [
502
+ H(b(e.cancelButtonText), 1)
503
503
  ]),
504
504
  _: 1
505
505
  }),
506
- A(K, {
506
+ E(K, {
507
507
  type: "primary",
508
508
  onClick: d
509
509
  }, {
510
- default: E(() => [
511
- W(k(e.confirmButtonText), 1)
510
+ default: j(() => [
511
+ H(b(e.confirmButtonText), 1)
512
512
  ]),
513
513
  _: 1
514
514
  })
515
515
  ], !0)
516
- ])) : g("", !0)
517
- ], 4)) : g("", !0)
516
+ ])) : x("", !0)
517
+ ], 4)) : x("", !0)
518
518
  ]),
519
519
  _: 3
520
520
  })
521
- ])) : g("", !0)
521
+ ])) : x("", !0)
522
522
  ]),
523
523
  _: 3
524
524
  })
525
525
  ]));
526
526
  }
527
- }, pt = /* @__PURE__ */ C(ct, [["__scopeId", "data-v-f85c5a46"]]), ft = ["onClick"], mt = { key: 0 }, ht = {
527
+ }, pt = /* @__PURE__ */ C(ct, [["__scopeId", "data-v-f85c5a46"]]), ft = ["onClick"], ht = { key: 0 }, mt = {
528
528
  key: 1,
529
529
  class: "xp-dropdown__divider"
530
- }, xt = {
530
+ }, vt = {
531
531
  __name: "Dropdown",
532
532
  props: {
533
533
  items: {
@@ -540,91 +540,91 @@ const C = (e, n) => {
540
540
  }
541
541
  },
542
542
  emits: ["select", "command", "open", "close"],
543
- setup(e, { emit: n }) {
544
- const t = e, s = n, l = z(!1), u = z({}), d = z(null), x = z(null), m = () => {
543
+ setup(e, { emit: o }) {
544
+ const t = e, s = o, l = S(!1), u = S({}), d = S(null), v = S(null), h = () => {
545
545
  ue(() => {
546
- if (!d.value || !x.value) return;
547
- const h = d.value.getBoundingClientRect(), $ = x.value.getBoundingClientRect();
548
- let w = h.bottom + 6, I = h.left;
549
- I + $.width > window.innerWidth - 10 && (I = window.innerWidth - $.width - 10), w + $.height > window.innerHeight - 10 && (w = h.top - $.height - 6), u.value = {
550
- top: `${w + window.scrollY}px`,
546
+ if (!d.value || !v.value) return;
547
+ const m = d.value.getBoundingClientRect(), w = v.value.getBoundingClientRect();
548
+ let $ = m.bottom + 6, I = m.left;
549
+ I + w.width > window.innerWidth - 10 && (I = window.innerWidth - w.width - 10), $ + w.height > window.innerHeight - 10 && ($ = m.top - w.height - 6), u.value = {
550
+ top: `${$ + window.scrollY}px`,
551
551
  left: `${I + window.scrollX}px`
552
552
  };
553
553
  });
554
554
  }, f = () => {
555
- t.disabled || (l.value = !l.value, l.value ? (m(), s("open")) : s("close"));
556
- }, i = (h) => {
557
- h.disabled || h.divider || (s("select", h), h.command !== void 0 && s("command", h.command, h), l.value = !1, s("close"));
558
- }, c = (h) => {
559
- var $;
560
- l.value && d.value && !d.value.contains(h.target) && !(($ = x.value) != null && $.contains(h.target)) && (l.value = !1, s("close"));
555
+ t.disabled || (l.value = !l.value, l.value ? (h(), s("open")) : s("close"));
556
+ }, r = (m) => {
557
+ m.disabled || m.divider || (s("select", m), m.command !== void 0 && s("command", m.command, m), l.value = !1, s("close"));
558
+ }, c = (m) => {
559
+ var w;
560
+ l.value && d.value && !d.value.contains(m.target) && !((w = v.value) != null && w.contains(m.target)) && (l.value = !1, s("close"));
561
561
  };
562
562
  return de(() => {
563
563
  document.addEventListener("click", c);
564
564
  }), Q(() => {
565
565
  document.removeEventListener("click", c);
566
- }), (h, $) => (a(), r("div", {
566
+ }), (m, w) => (i(), a("div", {
567
567
  class: "xp-dropdown",
568
568
  ref_key: "dropdownRef",
569
569
  ref: d
570
570
  }, [
571
- o("div", {
571
+ n("div", {
572
572
  class: "xp-dropdown__trigger",
573
573
  onClick: f
574
574
  }, [
575
- b(h.$slots, "default", {}, void 0, !0)
575
+ y(m.$slots, "default", {}, void 0, !0)
576
576
  ]),
577
- (a(), R(H, { to: "body" }, [
578
- A(D, { name: "xp-dropdown-fade" }, {
579
- default: E(() => [
580
- l.value ? (a(), r("div", {
577
+ (i(), R(J, { to: "body" }, [
578
+ E(A, { name: "xp-dropdown-fade" }, {
579
+ default: j(() => [
580
+ l.value ? (i(), a("div", {
581
581
  key: 0,
582
582
  class: "xp-dropdown__menu",
583
583
  style: T(u.value),
584
584
  ref_key: "menuRef",
585
- ref: x
585
+ ref: v
586
586
  }, [
587
- (a(!0), r(_, null, V(e.items, (w, I) => (a(), r("div", {
587
+ (i(!0), a(k, null, V(e.items, ($, I) => (i(), a("div", {
588
588
  key: I,
589
- class: B(["xp-dropdown__item", { "xp-dropdown__item--disabled": w.disabled, "xp-dropdown__item--divider": w.divider }]),
590
- onClick: (te) => i(w)
589
+ class: B(["xp-dropdown__item", { "xp-dropdown__item--disabled": $.disabled, "xp-dropdown__item--divider": $.divider }]),
590
+ onClick: (te) => r($)
591
591
  }, [
592
- w.divider ? g("", !0) : (a(), r("span", mt, k(w.label), 1)),
593
- w.divider ? (a(), r("span", ht)) : g("", !0)
592
+ $.divider ? x("", !0) : (i(), a("span", ht, b($.label), 1)),
593
+ $.divider ? (i(), a("span", mt)) : x("", !0)
594
594
  ], 10, ft))), 128))
595
- ], 4)) : g("", !0)
595
+ ], 4)) : x("", !0)
596
596
  ]),
597
597
  _: 1
598
598
  })
599
599
  ]))
600
600
  ], 512));
601
601
  }
602
- }, vt = /* @__PURE__ */ C(xt, [["__scopeId", "data-v-ad741cd8"]]), gt = { class: "xp-empty" }, yt = { class: "xp-empty__title" }, bt = {
602
+ }, gt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-ad741cd8"]]), xt = { class: "xp-empty" }, _t = { class: "xp-empty__title" }, yt = {
603
603
  key: 0,
604
604
  class: "xp-empty__hint"
605
- }, _t = {
605
+ }, kt = {
606
606
  key: 1,
607
607
  class: "xp-empty__action"
608
- }, kt = {
608
+ }, bt = {
609
609
  __name: "Empty",
610
610
  props: {
611
611
  title: { type: String, default: "暂无内容" },
612
612
  hint: { type: String, default: "" }
613
613
  },
614
614
  setup(e) {
615
- return (n, t) => (a(), r("div", gt, [
616
- b(n.$slots, "icon", {}, () => [
617
- t[0] || (t[0] = o("div", {
615
+ return (o, t) => (i(), a("div", xt, [
616
+ y(o.$slots, "icon", {}, () => [
617
+ t[0] || (t[0] = n("div", {
618
618
  class: "xp-empty__icon",
619
619
  "aria-hidden": "true"
620
620
  }, [
621
- o("svg", {
621
+ n("svg", {
622
622
  width: "46",
623
623
  height: "46",
624
624
  viewBox: "0 0 24 24",
625
625
  fill: "none"
626
626
  }, [
627
- o("path", {
627
+ n("path", {
628
628
  d: "M4 7a2 2 0 0 1 2-2h4l2 2h6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z",
629
629
  stroke: "var(--xp-border-color)",
630
630
  "stroke-width": "1.5",
@@ -633,43 +633,43 @@ const C = (e, n) => {
633
633
  ])
634
634
  ], -1))
635
635
  ], !0),
636
- o("p", yt, k(e.title), 1),
637
- e.hint ? (a(), r("p", bt, k(e.hint), 1)) : g("", !0),
638
- n.$slots.default ? (a(), r("div", _t, [
639
- b(n.$slots, "default", {}, void 0, !0)
640
- ])) : g("", !0)
636
+ n("p", _t, b(e.title), 1),
637
+ e.hint ? (i(), a("p", yt, b(e.hint), 1)) : x("", !0),
638
+ o.$slots.default ? (i(), a("div", kt, [
639
+ y(o.$slots, "default", {}, void 0, !0)
640
+ ])) : x("", !0)
641
641
  ]));
642
642
  }
643
- }, $t = /* @__PURE__ */ C(kt, [["__scopeId", "data-v-93d5e1e9"]]), wt = ["width", "height"], Ct = {
643
+ }, wt = /* @__PURE__ */ C(bt, [["__scopeId", "data-v-93d5e1e9"]]), $t = ["width", "height"], Ct = {
644
644
  __name: "FileIcon",
645
645
  props: {
646
646
  type: { type: String, default: "file" },
647
647
  size: { type: Number, default: 20 }
648
648
  },
649
649
  setup(e) {
650
- return (n, t) => (a(), r("span", {
650
+ return (o, t) => (i(), a("span", {
651
651
  class: "xp-file-icon",
652
652
  style: T({ width: e.size + "px", height: e.size + "px" }),
653
653
  "aria-hidden": "true"
654
654
  }, [
655
- (a(), r("svg", {
655
+ (i(), a("svg", {
656
656
  width: e.size,
657
657
  height: e.size,
658
658
  viewBox: "0 0 24 24",
659
659
  fill: "none"
660
660
  }, [
661
- e.type === "folder" ? (a(), r(_, { key: 0 }, [
662
- t[0] || (t[0] = o("path", {
661
+ e.type === "folder" ? (i(), a(k, { key: 0 }, [
662
+ t[0] || (t[0] = n("path", {
663
663
  d: "M3 6.5A2.5 2.5 0 0 1 5.5 4h4l2 2h7A2.5 2.5 0 0 1 21 8.5v9A2.5 2.5 0 0 1 18.5 20h-13A2.5 2.5 0 0 1 3 17.5z",
664
664
  fill: "#E8B64E",
665
665
  "fill-opacity": "0.9"
666
666
  }, null, -1)),
667
- t[1] || (t[1] = o("path", {
667
+ t[1] || (t[1] = n("path", {
668
668
  d: "M3 8.5h18v9A2.5 2.5 0 0 1 18.5 20h-13A2.5 2.5 0 0 1 3 17.5z",
669
669
  fill: "#F3CE78"
670
670
  }, null, -1))
671
- ], 64)) : e.type === "image" ? (a(), r(_, { key: 1 }, [
672
- t[2] || (t[2] = o("rect", {
671
+ ], 64)) : e.type === "image" ? (i(), a(k, { key: 1 }, [
672
+ t[2] || (t[2] = n("rect", {
673
673
  x: "3",
674
674
  y: "4",
675
675
  width: "18",
@@ -680,13 +680,13 @@ const C = (e, n) => {
680
680
  stroke: "#3D8EAD",
681
681
  "stroke-width": "1.4"
682
682
  }, null, -1)),
683
- t[3] || (t[3] = o("circle", {
683
+ t[3] || (t[3] = n("circle", {
684
684
  cx: "9",
685
685
  cy: "10",
686
686
  r: "1.8",
687
687
  fill: "#3D8EAD"
688
688
  }, null, -1)),
689
- t[4] || (t[4] = o("path", {
689
+ t[4] || (t[4] = n("path", {
690
690
  d: "M4.4 17.4l4.6-4.4 3 2.8 3.2-3.2 4.4 4.2",
691
691
  stroke: "#3D8EAD",
692
692
  "stroke-width": "1.4",
@@ -694,8 +694,8 @@ const C = (e, n) => {
694
694
  "stroke-linejoin": "round",
695
695
  fill: "none"
696
696
  }, null, -1))
697
- ], 64)) : e.type === "video" ? (a(), r(_, { key: 2 }, [
698
- t[5] || (t[5] = o("rect", {
697
+ ], 64)) : e.type === "video" ? (i(), a(k, { key: 2 }, [
698
+ t[5] || (t[5] = n("rect", {
699
699
  x: "3",
700
700
  y: "5",
701
701
  width: "13",
@@ -706,12 +706,12 @@ const C = (e, n) => {
706
706
  stroke: "#8A48C4",
707
707
  "stroke-width": "1.4"
708
708
  }, null, -1)),
709
- t[6] || (t[6] = o("path", {
709
+ t[6] || (t[6] = n("path", {
710
710
  d: "M16 10.5l5-3v9l-5-3z",
711
711
  fill: "#8A48C4"
712
712
  }, null, -1))
713
- ], 64)) : e.type === "audio" ? (a(), r(_, { key: 3 }, [
714
- t[7] || (t[7] = o("path", {
713
+ ], 64)) : e.type === "audio" ? (i(), a(k, { key: 3 }, [
714
+ t[7] || (t[7] = n("path", {
715
715
  d: "M9 18V6l10-2v11",
716
716
  stroke: "#C2569B",
717
717
  "stroke-width": "1.6",
@@ -719,20 +719,20 @@ const C = (e, n) => {
719
719
  "stroke-linejoin": "round",
720
720
  fill: "none"
721
721
  }, null, -1)),
722
- t[8] || (t[8] = o("circle", {
722
+ t[8] || (t[8] = n("circle", {
723
723
  cx: "6.6",
724
724
  cy: "18",
725
725
  r: "2.4",
726
726
  fill: "#C2569B"
727
727
  }, null, -1)),
728
- t[9] || (t[9] = o("circle", {
728
+ t[9] || (t[9] = n("circle", {
729
729
  cx: "16.6",
730
730
  cy: "15",
731
731
  r: "2.4",
732
732
  fill: "#C2569B"
733
733
  }, null, -1))
734
- ], 64)) : e.type === "pdf" ? (a(), r(_, { key: 4 }, [
735
- t[10] || (t[10] = o("rect", {
734
+ ], 64)) : e.type === "pdf" ? (i(), a(k, { key: 4 }, [
735
+ t[10] || (t[10] = n("rect", {
736
736
  x: "4",
737
737
  y: "3",
738
738
  width: "16",
@@ -743,7 +743,7 @@ const C = (e, n) => {
743
743
  stroke: "#C24842",
744
744
  "stroke-width": "1.4"
745
745
  }, null, -1)),
746
- t[11] || (t[11] = o("text", {
746
+ t[11] || (t[11] = n("text", {
747
747
  x: "12",
748
748
  y: "16.2",
749
749
  "text-anchor": "middle",
@@ -752,8 +752,8 @@ const C = (e, n) => {
752
752
  fill: "#C24842",
753
753
  "font-family": "Arial, sans-serif"
754
754
  }, "PDF", -1))
755
- ], 64)) : e.type === "doc" ? (a(), r(_, { key: 5 }, [
756
- t[12] || (t[12] = o("path", {
755
+ ], 64)) : e.type === "doc" ? (i(), a(k, { key: 5 }, [
756
+ t[12] || (t[12] = n("path", {
757
757
  d: "M5 3.5h9l5 5v12h-14z",
758
758
  fill: "#3B7FD6",
759
759
  "fill-opacity": "0.14",
@@ -761,27 +761,27 @@ const C = (e, n) => {
761
761
  "stroke-width": "1.4",
762
762
  "stroke-linejoin": "round"
763
763
  }, null, -1)),
764
- t[13] || (t[13] = o("path", {
764
+ t[13] || (t[13] = n("path", {
765
765
  d: "M14 3.5v5h5",
766
766
  fill: "none",
767
767
  stroke: "#2F6DC0",
768
768
  "stroke-width": "1.4",
769
769
  "stroke-linejoin": "round"
770
770
  }, null, -1)),
771
- t[14] || (t[14] = o("path", {
771
+ t[14] || (t[14] = n("path", {
772
772
  d: "M7.5 12v5M7.5 14.5h3",
773
773
  stroke: "#2F6DC0",
774
774
  "stroke-width": "1.4",
775
775
  "stroke-linecap": "round"
776
776
  }, null, -1)),
777
- t[15] || (t[15] = o("path", {
777
+ t[15] || (t[15] = n("path", {
778
778
  d: "M13.5 12h3M13.5 14.5h3M13.5 17h2",
779
779
  stroke: "#2F6DC0",
780
780
  "stroke-width": "1.4",
781
781
  "stroke-linecap": "round"
782
782
  }, null, -1))
783
- ], 64)) : e.type === "sheet" ? (a(), r(_, { key: 6 }, [
784
- t[16] || (t[16] = o("rect", {
783
+ ], 64)) : e.type === "sheet" ? (i(), a(k, { key: 6 }, [
784
+ t[16] || (t[16] = n("rect", {
785
785
  x: "4",
786
786
  y: "3.5",
787
787
  width: "16",
@@ -792,14 +792,14 @@ const C = (e, n) => {
792
792
  stroke: "#33854F",
793
793
  "stroke-width": "1.4"
794
794
  }, null, -1)),
795
- t[17] || (t[17] = o("path", {
795
+ t[17] || (t[17] = n("path", {
796
796
  d: "M4 9h16M4 14h16M10 9v11.5M14.5 9v11.5",
797
797
  stroke: "#33854F",
798
798
  "stroke-width": "1.2",
799
799
  "stroke-linecap": "round"
800
800
  }, null, -1))
801
- ], 64)) : e.type === "slide" ? (a(), r(_, { key: 7 }, [
802
- t[18] || (t[18] = o("rect", {
801
+ ], 64)) : e.type === "slide" ? (i(), a(k, { key: 7 }, [
802
+ t[18] || (t[18] = n("rect", {
803
803
  x: "3",
804
804
  y: "5",
805
805
  width: "18",
@@ -810,19 +810,19 @@ const C = (e, n) => {
810
810
  stroke: "#CC8420",
811
811
  "stroke-width": "1.4"
812
812
  }, null, -1)),
813
- t[19] || (t[19] = o("path", {
813
+ t[19] || (t[19] = n("path", {
814
814
  d: "M12 17v3M9.5 20h5",
815
815
  stroke: "#CC8420",
816
816
  "stroke-width": "1.4",
817
817
  "stroke-linecap": "round"
818
818
  }, null, -1)),
819
- t[20] || (t[20] = o("circle", {
819
+ t[20] || (t[20] = n("circle", {
820
820
  cx: "9",
821
821
  cy: "10.4",
822
822
  r: "1.3",
823
823
  fill: "#CC8420"
824
824
  }, null, -1)),
825
- t[21] || (t[21] = o("path", {
825
+ t[21] || (t[21] = n("path", {
826
826
  d: "M6 14.4l2.8-2.8 2 1.8L14 9.6l4 4.4",
827
827
  stroke: "#CC8420",
828
828
  "stroke-width": "1.4",
@@ -830,8 +830,8 @@ const C = (e, n) => {
830
830
  "stroke-linejoin": "round",
831
831
  fill: "none"
832
832
  }, null, -1))
833
- ], 64)) : e.type === "archive" ? (a(), r(_, { key: 8 }, [
834
- t[22] || (t[22] = o("rect", {
833
+ ], 64)) : e.type === "archive" ? (i(), a(k, { key: 8 }, [
834
+ t[22] || (t[22] = n("rect", {
835
835
  x: "4",
836
836
  y: "3.5",
837
837
  width: "16",
@@ -842,13 +842,13 @@ const C = (e, n) => {
842
842
  stroke: "#8F6539",
843
843
  "stroke-width": "1.4"
844
844
  }, null, -1)),
845
- t[23] || (t[23] = o("path", {
845
+ t[23] || (t[23] = n("path", {
846
846
  d: "M9.5 4v16M14.5 4v16M4 12h16",
847
847
  stroke: "#8F6539",
848
848
  "stroke-width": "1.3"
849
849
  }, null, -1))
850
- ], 64)) : e.type === "code" ? (a(), r(_, { key: 9 }, [
851
- t[24] || (t[24] = o("path", {
850
+ ], 64)) : e.type === "code" ? (i(), a(k, { key: 9 }, [
851
+ t[24] || (t[24] = n("path", {
852
852
  d: "M8.5 8l-4.5 4 4.5 4M15.5 8l4.5 4-4.5 4",
853
853
  stroke: "#6B62E0",
854
854
  "stroke-width": "1.7",
@@ -856,28 +856,28 @@ const C = (e, n) => {
856
856
  "stroke-linejoin": "round",
857
857
  fill: "none"
858
858
  }, null, -1)),
859
- t[25] || (t[25] = o("path", {
859
+ t[25] || (t[25] = n("path", {
860
860
  d: "M13.6 5.8l-3.2 12.4",
861
861
  stroke: "#6B62E0",
862
862
  "stroke-width": "1.5",
863
863
  "stroke-linecap": "round"
864
864
  }, null, -1))
865
- ], 64)) : e.type === "text" ? (a(), r(_, { key: 10 }, [
866
- t[26] || (t[26] = o("path", {
865
+ ], 64)) : e.type === "text" ? (i(), a(k, { key: 10 }, [
866
+ t[26] || (t[26] = n("path", {
867
867
  d: "M4 6.2C4 5 4.9 4 6.5 4h11C19 4 20 5 20 6.2v11.6C20 19 19 20 17.5 20h-11C4.9 20 4 19 4 17.8z",
868
868
  fill: "#7D8894",
869
869
  "fill-opacity": "0.12",
870
870
  stroke: "#5F6B78",
871
871
  "stroke-width": "1.4"
872
872
  }, null, -1)),
873
- t[27] || (t[27] = o("path", {
873
+ t[27] || (t[27] = n("path", {
874
874
  d: "M7.5 8.5h9M7.5 12h6.5",
875
875
  stroke: "#5F6B78",
876
876
  "stroke-width": "1.5",
877
877
  "stroke-linecap": "round"
878
878
  }, null, -1))
879
- ], 64)) : (a(), r(_, { key: 11 }, [
880
- t[28] || (t[28] = o("path", {
879
+ ], 64)) : (i(), a(k, { key: 11 }, [
880
+ t[28] || (t[28] = n("path", {
881
881
  d: "M6 3.5h8l5 5v12h-13z",
882
882
  fill: "#A2AAB4",
883
883
  "fill-opacity": "0.16",
@@ -885,27 +885,27 @@ const C = (e, n) => {
885
885
  "stroke-width": "1.4",
886
886
  "stroke-linejoin": "round"
887
887
  }, null, -1)),
888
- t[29] || (t[29] = o("path", {
888
+ t[29] || (t[29] = n("path", {
889
889
  d: "M14 3.5v5h5",
890
890
  fill: "none",
891
891
  stroke: "#7C8590",
892
892
  "stroke-width": "1.4",
893
893
  "stroke-linejoin": "round"
894
894
  }, null, -1)),
895
- t[30] || (t[30] = o("path", {
895
+ t[30] || (t[30] = n("path", {
896
896
  d: "M8 12.5h8M8 15.5h8M8 18.5h5",
897
897
  stroke: "#7C8590",
898
898
  "stroke-width": "1.3",
899
899
  "stroke-linecap": "round"
900
900
  }, null, -1))
901
901
  ], 64))
902
- ], 8, wt))
902
+ ], 8, $t))
903
903
  ], 4));
904
904
  }
905
- }, St = /* @__PURE__ */ C(Ct, [["__scopeId", "data-v-c598c294"]]), zt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M330.666667 512c0-14.933333 4.266667-29.866667 14.933333-40.533333l234.666667-277.33333399c23.466667-27.733333 64-29.866667 89.6-8.53333301 27.733333 23.466667 29.866667 64 8.53333299 89.6L477.866667 512l200.53333299 236.8c23.466667 27.733333 19.19999999 68.266667-8.53333299 89.6-27.733333 23.466667-68.266667 19.19999999-89.6-8.53333301l-234.666667-277.33333399c-10.666667-10.666667-14.933333-25.6-14.933333-40.533333z" /></svg>', Bt = ["viewBox", "innerHTML"], Mt = {
905
+ }, Mt = /* @__PURE__ */ C(Ct, [["__scopeId", "data-v-c598c294"]]), St = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M4 12h10M10 8l4 4-4 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', Bt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M15 5l-7 7 7 7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', zt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M6 9l6 6 6-6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', It = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M6 14l6-6 6 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', Tt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M6 6l12 12M18 6L6 18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>', Vt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/><path d="M12 11v5M9.5 13.5h5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>', jt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/></svg>', Et = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M9 5l7 7-7 7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', At = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><rect x="4" y="4" width="6" height="6" rx="1.2" stroke="currentColor" stroke-width="1.8"/><rect x="14" y="4" width="6" height="6" rx="1.2" stroke="currentColor" stroke-width="1.8"/><rect x="4" y="14" width="6" height="6" rx="1.2" stroke="currentColor" stroke-width="1.8"/><rect x="14" y="14" width="6" height="6" rx="1.2" stroke="currentColor" stroke-width="1.8"/></svg>', Dt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M4 11l8-7 8 7v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/><path d="M10 21v-6h4v6" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>', Nt = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M330.666667 512c0-14.933333 4.266667-29.866667 14.933333-40.533333l234.666667-277.33333399c23.466667-27.733333 64-29.866667 89.6-8.53333301 27.733333 23.466667 29.866667 64 8.53333299 89.6L477.866667 512l200.53333299 236.8c23.466667 27.733333 19.19999999 68.266667-8.53333299 89.6-27.733333 23.466667-68.266667 19.19999999-89.6-8.53333301l-234.666667-277.33333399c-10.666667-10.666667-14.933333-25.6-14.933333-40.533333z" /></svg>', Ft = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M4 6h16M4 12h16M4 18h16" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>', Rt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M20 12a8 8 0 1 1-2.34-5.66M20 4v5h-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', Ot = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><circle cx="12" cy="12" r="3.2" stroke="currentColor" stroke-width="1.8"/><path d="M12 2.8v2.6M12 18.6v2.6M2.8 12h2.6M18.6 12h2.6M5.5 5.5l1.8 1.8M16.7 16.7l1.8 1.8M18.5 5.5l-1.8 1.8M7.3 16.7l-1.8 1.8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>', Xt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.5 9.7l5.9-.9z" fill="currentColor" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></svg>', Lt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.5 9.7l5.9-.9z" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></svg>', Pt = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M12 19V6M6 12l6-6 6 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>', Ht = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path d="M12 16V5M7.5 9.5L12 5l4.5 4.5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>', Wt = ["viewBox", "innerHTML"], Jt = {
906
906
  key: 2,
907
907
  class: "xp-icon__fallback"
908
- }, It = {
908
+ }, Ut = {
909
909
  __name: "Icon",
910
910
  props: {
911
911
  name: {
@@ -930,44 +930,44 @@ const C = (e, n) => {
930
930
  }
931
931
  },
932
932
  setup(e) {
933
- const n = ["small", "medium", "large"], t = e, s = /* @__PURE__ */ Object.assign({ "./icons/jiantou.svg": zt }), l = (i) => i && i.replace(/\bfill\s*=\s*["'](?!none["'])[^"']+["']/gi, 'fill="currentColor"').replace(/\bstroke\s*=\s*["'](?!none["'])[^"']+["']/gi, 'stroke="currentColor"'), u = M(() => {
933
+ const o = ["small", "medium", "large"], t = e, s = /* @__PURE__ */ Object.assign({ "./icons/arrow-right.svg": St, "./icons/back.svg": Bt, "./icons/chevron-down.svg": zt, "./icons/chevron-up.svg": It, "./icons/close.svg": Tt, "./icons/folder-add.svg": Vt, "./icons/folder.svg": jt, "./icons/forward.svg": Et, "./icons/grid.svg": At, "./icons/home.svg": Dt, "./icons/jiantou.svg": Nt, "./icons/list.svg": Ft, "./icons/refresh.svg": Rt, "./icons/settings.svg": Ot, "./icons/star-fill.svg": Xt, "./icons/star.svg": Lt, "./icons/up.svg": Pt, "./icons/upload.svg": Ht }), l = (r) => r && r.replace(/\bfill\s*=\s*["'](?!none["'])[^"']+["']/gi, 'fill="currentColor"').replace(/\bstroke\s*=\s*["'](?!none["'])[^"']+["']/gi, 'stroke="currentColor"'), u = z(() => {
934
934
  if (!t.name) return null;
935
- const i = `./icons/${t.name}.svg`, c = s[i];
935
+ const r = `./icons/${t.name}.svg`, c = s[r];
936
936
  if (!c) return null;
937
- const h = c.match(/<svg[^>]*>([\s\S]*)<\/svg>/i), $ = l(h ? h[1] : c), w = c.match(/viewBox\s*=\s*["']([^"']+)["']/i);
937
+ const m = c.match(/<svg[^>]*>([\s\S]*)<\/svg>/i), w = l(m ? m[1] : c), $ = c.match(/viewBox\s*=\s*["']([^"']+)["']/i);
938
938
  return {
939
- inner: $,
940
- viewBox: w ? w[1] : "0 0 24 24"
939
+ inner: w,
940
+ viewBox: $ ? $[1] : "0 0 24 24"
941
941
  };
942
- }), d = M(() => n.includes(String(t.size))), x = M(() => {
942
+ }), d = z(() => o.includes(String(t.size))), v = z(() => {
943
943
  if (d.value) return null;
944
- const i = t.size;
945
- return typeof i == "number" ? `${i}px` : typeof i == "string" && i.trim() ? /^\d+(\.\d+)?$/.test(i.trim()) ? `${i}px` : i.trim() : null;
946
- }), m = M(() => {
947
- const i = [];
948
- return d.value && i.push(`xp-icon--${t.size}`), t.spin && i.push("xp-icon--spin"), i;
949
- }), f = M(() => {
950
- const i = {};
951
- return t.color && (i.color = t.color), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), x.value && (i.width = x.value, i.height = x.value, i.fontSize = x.value), i;
944
+ const r = t.size;
945
+ return typeof r == "number" ? `${r}px` : typeof r == "string" && r.trim() ? /^\d+(\.\d+)?$/.test(r.trim()) ? `${r}px` : r.trim() : null;
946
+ }), h = z(() => {
947
+ const r = [];
948
+ return d.value && r.push(`xp-icon--${t.size}`), t.spin && r.push("xp-icon--spin"), r;
949
+ }), f = z(() => {
950
+ const r = {};
951
+ return t.color && (r.color = t.color), t.rotate && (r.transform = `rotate(${t.rotate}deg)`), v.value && (r.width = v.value, r.height = v.value, r.fontSize = v.value), r;
952
952
  });
953
- return (i, c) => (a(), r("i", {
954
- class: B(["xp-icon", m.value]),
953
+ return (r, c) => (i(), a("i", {
954
+ class: B(["xp-icon", h.value]),
955
955
  style: T(f.value)
956
956
  }, [
957
- i.$slots.default ? b(i.$slots, "default", { key: 0 }, void 0, !0) : u.value ? (a(), r("svg", {
957
+ r.$slots.default ? y(r.$slots, "default", { key: 0 }, void 0, !0) : u.value ? (i(), a("svg", {
958
958
  key: 1,
959
959
  viewBox: u.value.viewBox,
960
960
  innerHTML: u.value.inner
961
- }, null, 8, Bt)) : (a(), r("span", Mt, "?"))
961
+ }, null, 8, Wt)) : (i(), a("span", Jt, "?"))
962
962
  ], 6));
963
963
  }
964
- }, Tt = /* @__PURE__ */ C(It, [["__scopeId", "data-v-14319319"]]), Vt = {
964
+ }, Gt = /* @__PURE__ */ C(Ut, [["__scopeId", "data-v-9ed9f36d"]]), qt = {
965
965
  key: 0,
966
966
  class: "xp-input__prefix"
967
- }, Et = ["id", "type", "value", "placeholder", "disabled", "maxlength"], At = {
967
+ }, Yt = ["id", "type", "value", "placeholder", "disabled", "maxlength"], Kt = {
968
968
  key: 2,
969
969
  class: "xp-input__suffix"
970
- }, Dt = {
970
+ }, Zt = {
971
971
  __name: "Input",
972
972
  props: {
973
973
  modelValue: {
@@ -1007,35 +1007,35 @@ const C = (e, n) => {
1007
1007
  }
1008
1008
  },
1009
1009
  emits: ["update:modelValue", "focus", "blur", "clear"],
1010
- setup(e, { expose: n, emit: t }) {
1011
- const s = t, l = z(null), u = z(!1), d = (i) => {
1012
- s("update:modelValue", i.target.value);
1013
- }, x = (i) => {
1014
- u.value = !0, s("focus", i);
1015
- }, m = (i) => {
1016
- u.value = !1, s("blur", i);
1010
+ setup(e, { expose: o, emit: t }) {
1011
+ const s = t, l = S(null), u = S(!1), d = (r) => {
1012
+ s("update:modelValue", r.target.value);
1013
+ }, v = (r) => {
1014
+ u.value = !0, s("focus", r);
1015
+ }, h = (r) => {
1016
+ u.value = !1, s("blur", r);
1017
1017
  }, f = () => {
1018
1018
  s("update:modelValue", ""), s("clear"), l.value && l.value.focus();
1019
1019
  };
1020
- return n({
1020
+ return o({
1021
1021
  focus: () => l.value && l.value.focus(),
1022
1022
  select: () => l.value && l.value.select(),
1023
1023
  blur: () => l.value && l.value.blur()
1024
- }), (i, c) => (a(), r("div", {
1024
+ }), (r, c) => (i(), a("div", {
1025
1025
  class: B(["xp-input", [
1026
1026
  `xp-input--${e.size}`,
1027
1027
  {
1028
1028
  "xp-input--disabled": e.disabled,
1029
- "xp-input--prefix": i.$slots.prefix,
1030
- "xp-input--suffix": i.$slots.suffix || e.showClear,
1029
+ "xp-input--prefix": r.$slots.prefix,
1030
+ "xp-input--suffix": r.$slots.suffix || e.showClear,
1031
1031
  "xp-input--focus": u.value
1032
1032
  }
1033
1033
  ]])
1034
1034
  }, [
1035
- i.$slots.prefix ? (a(), r("span", Vt, [
1036
- b(i.$slots, "prefix", {}, void 0, !0)
1037
- ])) : g("", !0),
1038
- o("input", {
1035
+ r.$slots.prefix ? (i(), a("span", qt, [
1036
+ y(r.$slots, "prefix", {}, void 0, !0)
1037
+ ])) : x("", !0),
1038
+ n("input", {
1039
1039
  ref_key: "inputRef",
1040
1040
  ref: l,
1041
1041
  class: "xp-input__inner",
@@ -1046,23 +1046,23 @@ const C = (e, n) => {
1046
1046
  disabled: e.disabled,
1047
1047
  maxlength: e.maxlength,
1048
1048
  onInput: d,
1049
- onFocus: x,
1050
- onBlur: m
1051
- }, null, 40, Et),
1052
- e.showClear && e.modelValue && !e.disabled ? (a(), r("span", {
1049
+ onFocus: v,
1050
+ onBlur: h
1051
+ }, null, 40, Yt),
1052
+ e.showClear && e.modelValue && !e.disabled ? (i(), a("span", {
1053
1053
  key: 1,
1054
1054
  class: "xp-input__clear",
1055
1055
  onClick: f
1056
- }, "×")) : g("", !0),
1057
- i.$slots.suffix && !e.showClear ? (a(), r("span", At, [
1058
- b(i.$slots, "suffix", {}, void 0, !0)
1059
- ])) : g("", !0)
1056
+ }, "×")) : x("", !0),
1057
+ r.$slots.suffix && !e.showClear ? (i(), a("span", Kt, [
1058
+ y(r.$slots, "suffix", {}, void 0, !0)
1059
+ ])) : x("", !0)
1060
1060
  ], 2));
1061
1061
  }
1062
- }, jt = /* @__PURE__ */ C(Dt, [["__scopeId", "data-v-46247483"]]), Nt = {
1062
+ }, Qt = /* @__PURE__ */ C(Zt, [["__scopeId", "data-v-46247483"]]), eo = {
1063
1063
  key: 0,
1064
1064
  class: "xp-progress__text"
1065
- }, Ft = {
1065
+ }, to = {
1066
1066
  __name: "Progress",
1067
1067
  props: {
1068
1068
  percentage: {
@@ -1095,29 +1095,29 @@ const C = (e, n) => {
1095
1095
  }
1096
1096
  },
1097
1097
  setup(e) {
1098
- const n = e, t = M(
1099
- () => n.type === "line" ? { height: `${n.strokeWidth}px` } : {}
1100
- ), s = M(() => n.color ? n.color : n.status === "success" ? "var(--xp-color-success)" : n.status === "warning" ? "var(--xp-color-warning)" : n.status === "exception" ? "var(--xp-color-danger)" : "var(--xp-color-primary)");
1101
- return (l, u) => (a(), r("div", {
1098
+ const o = e, t = z(
1099
+ () => o.type === "line" ? { height: `${o.strokeWidth}px` } : {}
1100
+ ), s = z(() => o.color ? o.color : o.status === "success" ? "var(--xp-color-success)" : o.status === "warning" ? "var(--xp-color-warning)" : o.status === "exception" ? "var(--xp-color-danger)" : "var(--xp-color-primary)");
1101
+ return (l, u) => (i(), a("div", {
1102
1102
  class: B(["xp-progress", [`xp-progress--${e.type}`]])
1103
1103
  }, [
1104
- o("div", {
1104
+ n("div", {
1105
1105
  class: "xp-progress__bar",
1106
1106
  style: T(t.value)
1107
1107
  }, [
1108
- o("div", {
1108
+ n("div", {
1109
1109
  class: "xp-progress__inner",
1110
1110
  style: T({ width: `${e.percentage}%`, backgroundColor: s.value })
1111
1111
  }, null, 4)
1112
1112
  ], 4),
1113
- e.showText ? (a(), r("span", Nt, [
1114
- b(l.$slots, "default", {}, () => [
1115
- W(k(e.percentage) + "%", 1)
1113
+ e.showText ? (i(), a("span", eo, [
1114
+ y(l.$slots, "default", {}, () => [
1115
+ H(b(e.percentage) + "%", 1)
1116
1116
  ], !0)
1117
- ])) : g("", !0)
1117
+ ])) : x("", !0)
1118
1118
  ], 2));
1119
1119
  }
1120
- }, Rt = /* @__PURE__ */ C(Ft, [["__scopeId", "data-v-244dca2c"]]), Ot = { class: "xp-radio__input" }, Xt = ["checked", "disabled"], Lt = { class: "xp-radio__label" }, Pt = {
1120
+ }, oo = /* @__PURE__ */ C(to, [["__scopeId", "data-v-244dca2c"]]), no = { class: "xp-radio__input" }, so = ["checked", "disabled"], lo = { class: "xp-radio__label" }, io = {
1121
1121
  __name: "Radio",
1122
1122
  props: {
1123
1123
  modelValue: {
@@ -1134,11 +1134,11 @@ const C = (e, n) => {
1134
1134
  }
1135
1135
  },
1136
1136
  emits: ["update:modelValue", "change"],
1137
- setup(e, { emit: n }) {
1138
- const t = e, s = n, l = () => {
1137
+ setup(e, { emit: o }) {
1138
+ const t = e, s = o, l = () => {
1139
1139
  t.disabled || (s("update:modelValue", t.value), s("change", t.value));
1140
1140
  };
1141
- return (u, d) => (a(), r("label", {
1141
+ return (u, d) => (i(), a("label", {
1142
1142
  class: B(["xp-radio", [
1143
1143
  {
1144
1144
  "xp-radio--checked": e.modelValue === e.value,
@@ -1146,25 +1146,25 @@ const C = (e, n) => {
1146
1146
  }
1147
1147
  ]])
1148
1148
  }, [
1149
- o("span", Ot, [
1150
- d[0] || (d[0] = o("span", { class: "xp-radio__inner" }, null, -1)),
1151
- o("input", {
1149
+ n("span", no, [
1150
+ d[0] || (d[0] = n("span", { class: "xp-radio__inner" }, null, -1)),
1151
+ n("input", {
1152
1152
  type: "radio",
1153
1153
  class: "xp-radio__original",
1154
1154
  checked: e.modelValue === e.value,
1155
1155
  disabled: e.disabled,
1156
1156
  onChange: l
1157
- }, null, 40, Xt)
1157
+ }, null, 40, so)
1158
1158
  ]),
1159
- o("span", Lt, [
1160
- b(u.$slots, "default", {}, void 0, !0)
1159
+ n("span", lo, [
1160
+ y(u.$slots, "default", {}, void 0, !0)
1161
1161
  ])
1162
1162
  ], 2));
1163
1163
  }
1164
- }, Wt = /* @__PURE__ */ C(Pt, [["__scopeId", "data-v-02a0d80d"]]), Jt = { class: "xp-rate" }, Ht = ["onClick", "onMouseenter"], Ut = { class: "xp-rate__star" }, Gt = {
1164
+ }, ro = /* @__PURE__ */ C(io, [["__scopeId", "data-v-02a0d80d"]]), ao = { class: "xp-rate" }, uo = ["onClick", "onMouseenter"], co = { class: "xp-rate__star" }, po = {
1165
1165
  key: 0,
1166
1166
  class: "xp-rate__text"
1167
- }, qt = {
1167
+ }, fo = {
1168
1168
  __name: "Rate",
1169
1169
  props: {
1170
1170
  modelValue: {
@@ -1189,39 +1189,39 @@ const C = (e, n) => {
1189
1189
  }
1190
1190
  },
1191
1191
  emits: ["update:modelValue", "change"],
1192
- setup(e, { emit: n }) {
1193
- const t = e, s = n, l = z(0), u = M(() => l.value || t.modelValue), d = (m) => {
1194
- const f = u.value - m + 1;
1192
+ setup(e, { emit: o }) {
1193
+ const t = e, s = o, l = S(0), u = z(() => l.value || t.modelValue), d = (h) => {
1194
+ const f = u.value - h + 1;
1195
1195
  return f >= 1 ? 100 : f > 0 ? f * 100 : 0;
1196
- }, x = (m) => {
1197
- t.disabled || (s("update:modelValue", m), s("change", m));
1196
+ }, v = (h) => {
1197
+ t.disabled || (s("update:modelValue", h), s("change", h));
1198
1198
  };
1199
- return (m, f) => (a(), r("div", Jt, [
1200
- (a(!0), r(_, null, V(e.max, (i) => (a(), r("span", {
1201
- key: i,
1199
+ return (h, f) => (i(), a("div", ao, [
1200
+ (i(!0), a(k, null, V(e.max, (r) => (i(), a("span", {
1201
+ key: r,
1202
1202
  class: B(["xp-rate__item", {
1203
1203
  "xp-rate__item--disabled": e.disabled
1204
1204
  }]),
1205
1205
  style: T({ cursor: e.disabled ? "default" : "pointer" }),
1206
- onClick: (c) => x(i),
1207
- onMouseenter: (c) => l.value = i,
1206
+ onClick: (c) => v(r),
1207
+ onMouseenter: (c) => l.value = r,
1208
1208
  onMouseleave: f[0] || (f[0] = (c) => l.value = 0)
1209
1209
  }, [
1210
- o("span", Ut, [
1211
- f[1] || (f[1] = o("span", { class: "xp-rate__star-outer" }, "★", -1)),
1212
- o("span", {
1210
+ n("span", co, [
1211
+ f[1] || (f[1] = n("span", { class: "xp-rate__star-outer" }, "★", -1)),
1212
+ n("span", {
1213
1213
  class: "xp-rate__star-inner",
1214
- style: T({ width: d(i) + "%", color: e.color })
1214
+ style: T({ width: d(r) + "%", color: e.color })
1215
1215
  }, " ★ ", 4)
1216
1216
  ])
1217
- ], 46, Ht))), 128)),
1218
- e.showText && !e.disabled ? (a(), r("span", Gt, k(e.modelValue) + " / " + k(e.max), 1)) : g("", !0)
1217
+ ], 46, uo))), 128)),
1218
+ e.showText && !e.disabled ? (i(), a("span", po, b(e.modelValue) + " / " + b(e.max), 1)) : x("", !0)
1219
1219
  ]));
1220
1220
  }
1221
- }, Yt = /* @__PURE__ */ C(qt, [["__scopeId", "data-v-214323a3"]]), Kt = ["aria-checked"], Zt = {
1221
+ }, ho = /* @__PURE__ */ C(fo, [["__scopeId", "data-v-214323a3"]]), mo = ["aria-checked"], vo = {
1222
1222
  key: 0,
1223
1223
  class: "xp-switch__label"
1224
- }, Qt = {
1224
+ }, go = {
1225
1225
  __name: "Switch",
1226
1226
  props: {
1227
1227
  modelValue: {
@@ -1239,13 +1239,13 @@ const C = (e, n) => {
1239
1239
  }
1240
1240
  },
1241
1241
  emits: ["update:modelValue", "change"],
1242
- setup(e, { emit: n }) {
1243
- const t = e, s = n, l = () => {
1242
+ setup(e, { emit: o }) {
1243
+ const t = e, s = o, l = () => {
1244
1244
  if (t.disabled) return;
1245
1245
  const u = !t.modelValue;
1246
1246
  s("update:modelValue", u), s("change", u);
1247
1247
  };
1248
- return (u, d) => (a(), r("div", {
1248
+ return (u, d) => (i(), a("div", {
1249
1249
  class: B(["xp-switch", [
1250
1250
  `xp-switch--${e.size}`,
1251
1251
  {
@@ -1257,18 +1257,18 @@ const C = (e, n) => {
1257
1257
  "aria-checked": e.modelValue,
1258
1258
  onClick: l
1259
1259
  }, [
1260
- d[0] || (d[0] = o("span", { class: "xp-switch__core" }, [
1261
- o("span", { class: "xp-switch__action" })
1260
+ d[0] || (d[0] = n("span", { class: "xp-switch__core" }, [
1261
+ n("span", { class: "xp-switch__action" })
1262
1262
  ], -1)),
1263
- u.$slots.default ? (a(), r("span", Zt, [
1264
- b(u.$slots, "default", {}, void 0, !0)
1265
- ])) : g("", !0)
1266
- ], 10, Kt));
1263
+ u.$slots.default ? (i(), a("span", vo, [
1264
+ y(u.$slots, "default", {}, void 0, !0)
1265
+ ])) : x("", !0)
1266
+ ], 10, mo));
1267
1267
  }
1268
- }, en = /* @__PURE__ */ C(Qt, [["__scopeId", "data-v-5a5e33c5"]]), tn = {
1268
+ }, xo = /* @__PURE__ */ C(go, [["__scopeId", "data-v-5a5e33c5"]]), _o = {
1269
1269
  key: 0,
1270
1270
  class: "xp-tab-pane"
1271
- }, nn = {
1271
+ }, yo = {
1272
1272
  __name: "TabPane",
1273
1273
  props: {
1274
1274
  name: {
@@ -1285,19 +1285,19 @@ const C = (e, n) => {
1285
1285
  }
1286
1286
  },
1287
1287
  setup(e) {
1288
- const n = e, t = _e("xpTabs", null), s = M(() => t ? t.currentValue.value === n.name : !0);
1288
+ const o = e, t = ke("xpTabs", null), s = z(() => t ? t.currentValue.value === o.name : !0);
1289
1289
  return de(() => {
1290
- t && t.addTab && t.addTab({ name: n.name, title: n.title, disabled: n.disabled });
1290
+ t && t.addTab && t.addTab({ name: o.name, title: o.title, disabled: o.disabled });
1291
1291
  }), Q(() => {
1292
- t && t.removeTab && t.removeTab(n.name);
1293
- }), (l, u) => s.value ? (a(), r("div", tn, [
1294
- b(l.$slots, "default", {}, void 0, !0)
1295
- ])) : g("", !0);
1292
+ t && t.removeTab && t.removeTab(o.name);
1293
+ }), (l, u) => s.value ? (i(), a("div", _o, [
1294
+ y(l.$slots, "default", {}, void 0, !0)
1295
+ ])) : x("", !0);
1296
1296
  }
1297
- }, on = /* @__PURE__ */ C(nn, [["__scopeId", "data-v-6fe7943a"]]), sn = { class: "xp-tabs" }, ln = {
1297
+ }, ko = /* @__PURE__ */ C(yo, [["__scopeId", "data-v-6fe7943a"]]), bo = { class: "xp-tabs" }, wo = {
1298
1298
  class: "xp-tabs__nav",
1299
1299
  role: "tablist"
1300
- }, an = ["onClick"], rn = { class: "xp-tabs__content" }, dn = {
1300
+ }, $o = ["onClick"], Co = { class: "xp-tabs__content" }, Mo = {
1301
1301
  __name: "Tabs",
1302
1302
  props: {
1303
1303
  modelValue: {
@@ -1306,48 +1306,48 @@ const C = (e, n) => {
1306
1306
  }
1307
1307
  },
1308
1308
  emits: ["update:modelValue", "change"],
1309
- setup(e, { emit: n }) {
1310
- const t = e, s = n, l = z([]), u = M(() => {
1311
- var i;
1312
- return t.modelValue !== null && t.modelValue !== void 0 && t.modelValue !== "" ? t.modelValue : ((i = l.value[0]) == null ? void 0 : i.name) ?? null;
1313
- }), d = M(() => {
1314
- const i = l.value.findIndex((h) => h.name === u.value);
1309
+ setup(e, { emit: o }) {
1310
+ const t = e, s = o, l = S([]), u = z(() => {
1311
+ var r;
1312
+ return t.modelValue !== null && t.modelValue !== void 0 && t.modelValue !== "" ? t.modelValue : ((r = l.value[0]) == null ? void 0 : r.name) ?? null;
1313
+ }), d = z(() => {
1314
+ const r = l.value.findIndex((m) => m.name === u.value);
1315
1315
  return {
1316
- transform: `translateX(${(i >= 0 ? i : 0) * 100}%)`,
1316
+ transform: `translateX(${(r >= 0 ? r : 0) * 100}%)`,
1317
1317
  width: `${l.value.length ? 100 / l.value.length : 0}%`
1318
1318
  };
1319
- }), x = (i) => {
1320
- i.disabled || (s("update:modelValue", i.name), s("change", i.name));
1319
+ }), v = (r) => {
1320
+ r.disabled || (s("update:modelValue", r.name), s("change", r.name));
1321
1321
  };
1322
- return ke("xpTabs", { addTab: (i) => {
1323
- l.value.find((c) => c.name === i.name) || l.value.push(i);
1324
- }, removeTab: (i) => {
1325
- const c = l.value.findIndex((h) => h.name === i);
1322
+ return be("xpTabs", { addTab: (r) => {
1323
+ l.value.find((c) => c.name === r.name) || l.value.push(r);
1324
+ }, removeTab: (r) => {
1325
+ const c = l.value.findIndex((m) => m.name === r);
1326
1326
  c >= 0 && l.value.splice(c, 1);
1327
- }, currentValue: u }), (i, c) => (a(), r("div", sn, [
1328
- o("div", ln, [
1329
- (a(!0), r(_, null, V(l.value, (h, $) => (a(), r("div", {
1330
- key: h.name || $,
1327
+ }, currentValue: u }), (r, c) => (i(), a("div", bo, [
1328
+ n("div", wo, [
1329
+ (i(!0), a(k, null, V(l.value, (m, w) => (i(), a("div", {
1330
+ key: m.name || w,
1331
1331
  class: B(["xp-tabs__item", [
1332
1332
  {
1333
- "xp-tabs__item--active": u.value === h.name,
1334
- "xp-tabs__item--disabled": h.disabled
1333
+ "xp-tabs__item--active": u.value === m.name,
1334
+ "xp-tabs__item--disabled": m.disabled
1335
1335
  }
1336
1336
  ]]),
1337
1337
  role: "tab",
1338
- onClick: (w) => x(h)
1339
- }, k(h.title), 11, an))), 128)),
1340
- o("div", {
1338
+ onClick: ($) => v(m)
1339
+ }, b(m.title), 11, $o))), 128)),
1340
+ n("div", {
1341
1341
  class: "xp-tabs__active-bar",
1342
1342
  style: T(d.value)
1343
1343
  }, null, 4)
1344
1344
  ]),
1345
- o("div", rn, [
1346
- b(i.$slots, "default", {}, void 0, !0)
1345
+ n("div", Co, [
1346
+ y(r.$slots, "default", {}, void 0, !0)
1347
1347
  ])
1348
1348
  ]));
1349
1349
  }
1350
- }, un = /* @__PURE__ */ C(dn, [["__scopeId", "data-v-3e658dba"]]), cn = {
1350
+ }, So = /* @__PURE__ */ C(Mo, [["__scopeId", "data-v-3e658dba"]]), Bo = {
1351
1351
  __name: "Tag",
1352
1352
  props: {
1353
1353
  type: {
@@ -1378,17 +1378,17 @@ const C = (e, n) => {
1378
1378
  }
1379
1379
  },
1380
1380
  emits: ["click", "close"],
1381
- setup(e, { emit: n }) {
1382
- const t = e, s = n, l = M(() => t.color ? t.color.startsWith("#") || t.color.startsWith("rgb") ? {
1381
+ setup(e, { emit: o }) {
1382
+ const t = e, s = o, l = z(() => t.color ? t.color.startsWith("#") || t.color.startsWith("rgb") ? {
1383
1383
  backgroundColor: t.color,
1384
1384
  borderColor: t.color,
1385
1385
  color: "#fff"
1386
- } : {} : {}), u = (x) => {
1387
- s("click", x);
1388
- }, d = (x) => {
1389
- s("close", x);
1386
+ } : {} : {}), u = (v) => {
1387
+ s("click", v);
1388
+ }, d = (v) => {
1389
+ s("close", v);
1390
1390
  };
1391
- return (x, m) => (a(), r("span", {
1391
+ return (v, h) => (i(), a("span", {
1392
1392
  class: B(["xp-tag", [
1393
1393
  `xp-tag--${e.type}`,
1394
1394
  `xp-tag--${e.size}`,
@@ -1401,25 +1401,25 @@ const C = (e, n) => {
1401
1401
  style: T(l.value),
1402
1402
  onClick: u
1403
1403
  }, [
1404
- b(x.$slots, "default", {}, void 0, !0),
1405
- e.closable ? (a(), r("span", {
1404
+ y(v.$slots, "default", {}, void 0, !0),
1405
+ e.closable ? (i(), a("span", {
1406
1406
  key: 0,
1407
1407
  class: "xp-tag__close",
1408
- onClick: j(d, ["stop"])
1409
- }, "×")) : g("", !0)
1408
+ onClick: D(d, ["stop"])
1409
+ }, "×")) : x("", !0)
1410
1410
  ], 6));
1411
1411
  }
1412
- }, pn = /* @__PURE__ */ C(cn, [["__scopeId", "data-v-903813de"]]), fn = /^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, mn = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*([\d.]+))?\s*\)$/;
1412
+ }, zo = /* @__PURE__ */ C(Bo, [["__scopeId", "data-v-903813de"]]), Io = /^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, To = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*([\d.]+))?\s*\)$/;
1413
1413
  function Y(e) {
1414
1414
  if (typeof e != "string") return null;
1415
- const n = e.trim(), t = n.match(fn);
1415
+ const o = e.trim(), t = o.match(Io);
1416
1416
  if (t) {
1417
1417
  let l = t[1];
1418
- l.length === 3 && (l = l.split("").map((m) => m + m).join(""));
1419
- const u = parseInt(l.slice(0, 2), 16), d = parseInt(l.slice(2, 4), 16), x = parseInt(l.slice(4, 6), 16);
1420
- return { r: u, g: d, b: x, a: 1 };
1418
+ l.length === 3 && (l = l.split("").map((h) => h + h).join(""));
1419
+ const u = parseInt(l.slice(0, 2), 16), d = parseInt(l.slice(2, 4), 16), v = parseInt(l.slice(4, 6), 16);
1420
+ return { r: u, g: d, b: v, a: 1 };
1421
1421
  }
1422
- const s = n.match(mn);
1422
+ const s = o.match(To);
1423
1423
  return s ? {
1424
1424
  r: parseInt(s[1], 10),
1425
1425
  g: parseInt(s[2], 10),
@@ -1427,43 +1427,43 @@ function Y(e) {
1427
1427
  a: s[4] ? parseFloat(s[4]) : 1
1428
1428
  } : null;
1429
1429
  }
1430
- function hn(e) {
1430
+ function Vo(e) {
1431
1431
  return Math.max(0, Math.min(255, Math.round(e)));
1432
1432
  }
1433
- function xn(e, n, t) {
1434
- const s = (l) => hn(l).toString(16).padStart(2, "0");
1435
- return "#" + s(e) + s(n) + s(t);
1433
+ function jo(e, o, t) {
1434
+ const s = (l) => Vo(l).toString(16).padStart(2, "0");
1435
+ return "#" + s(e) + s(o) + s(t);
1436
1436
  }
1437
- function pe(e, n, t = 0.5) {
1438
- const s = Y(e), l = Y(n);
1437
+ function pe(e, o, t = 0.5) {
1438
+ const s = Y(e), l = Y(o);
1439
1439
  if (!s || !l) return "#000000";
1440
- const u = Math.max(0, Math.min(1, t)), d = s.r * (1 - u) + l.r * u, x = s.g * (1 - u) + l.g * u, m = s.b * (1 - u) + l.b * u;
1441
- return xn(d, x, m);
1440
+ const u = Math.max(0, Math.min(1, t)), d = s.r * (1 - u) + l.r * u, v = s.g * (1 - u) + l.g * u, h = s.b * (1 - u) + l.b * u;
1441
+ return jo(d, v, h);
1442
1442
  }
1443
- function G(e, n) {
1444
- return pe(e, "#ffffff", n);
1443
+ function G(e, o) {
1444
+ return pe(e, "#ffffff", o);
1445
1445
  }
1446
- function q(e, n) {
1447
- return pe(e, "#000000", n);
1446
+ function q(e, o) {
1447
+ return pe(e, "#000000", o);
1448
1448
  }
1449
- function xo(e) {
1449
+ function jn(e) {
1450
1450
  return G(e, 0.3);
1451
1451
  }
1452
- function vo(e) {
1452
+ function En(e) {
1453
1453
  return q(e, 0.2);
1454
1454
  }
1455
- function go(e, n) {
1455
+ function An(e, o) {
1456
1456
  const t = Y(e);
1457
1457
  if (!t) return e;
1458
- const s = Math.max(0, Math.min(1, n));
1458
+ const s = Math.max(0, Math.min(1, o));
1459
1459
  return `rgba(${t.r}, ${t.g}, ${t.b}, ${s})`;
1460
1460
  }
1461
- function yo(e) {
1462
- const n = Y(e);
1463
- return n ? (n.r * 299 + n.g * 587 + n.b * 114) / 1e3 < 128 : !1;
1461
+ function Dn(e) {
1462
+ const o = Y(e);
1463
+ return o ? (o.r * 299 + o.g * 587 + o.b * 114) / 1e3 < 128 : !1;
1464
1464
  }
1465
- function fe(e, n) {
1466
- const t = G(e, 0.3), s = q(e, 0.2), l = n === "dark" ? q(e, 0.85) : G(e, 0.9), u = n === "dark" ? q(e, 0.7) : G(e, 0.7);
1465
+ function fe(e, o) {
1466
+ const t = G(e, 0.3), s = q(e, 0.2), l = o === "dark" ? q(e, 0.85) : G(e, 0.9), u = o === "dark" ? q(e, 0.7) : G(e, 0.7);
1467
1467
  return { base: e, light: t, dark: s, bg: l, border: u };
1468
1468
  }
1469
1469
  const N = {
@@ -1472,7 +1472,7 @@ const N = {
1472
1472
  warning: "#e6a23c",
1473
1473
  danger: "#f56c6c",
1474
1474
  info: "#909399"
1475
- }, J = {
1475
+ }, W = {
1476
1476
  light: {
1477
1477
  text: { primary: "#303133", regular: "#606266", secondary: "#909399", placeholder: "#c0c4cc" },
1478
1478
  border: { base: "#dcdfe6", light: "#ebeef5", lighter: "#f2f6fc" },
@@ -1501,45 +1501,45 @@ const N = {
1501
1501
  function F() {
1502
1502
  return {
1503
1503
  primary: { ...N },
1504
- light: se(J.light),
1505
- dark: se(J.dark)
1504
+ light: se(W.light),
1505
+ dark: se(W.dark)
1506
1506
  };
1507
1507
  }
1508
1508
  function se(e) {
1509
1509
  return JSON.parse(JSON.stringify(e));
1510
1510
  }
1511
- function le(e, n) {
1511
+ function le(e, o) {
1512
1512
  const t = ["primary", "success", "warning", "danger", "info"], s = [];
1513
1513
  for (const l of t) {
1514
- const u = e[l] || N[l], d = fe(u, n);
1514
+ const u = e[l] || N[l], d = fe(u, o);
1515
1515
  s.push(` --xp-color-${l}: ${u};`), s.push(` --xp-color-${l}-light: ${d.light};`), s.push(` --xp-color-${l}-dark: ${d.dark};`), s.push(` --xp-color-${l}-bg: ${d.bg};`), s.push(` --xp-color-${l}-border: ${d.border};`);
1516
1516
  }
1517
1517
  return s.join(`
1518
1518
  `);
1519
1519
  }
1520
- function ae(e) {
1521
- const n = [];
1522
- for (const t of Object.keys(e.text)) n.push(` --xp-text-color-${t}: ${e.text[t]};`);
1523
- n.push(` --xp-border-color: ${e.border.base};`), n.push(` --xp-border-color-light: ${e.border.light};`), n.push(` --xp-border-color-lighter: ${e.border.lighter};`);
1520
+ function ie(e) {
1521
+ const o = [];
1522
+ for (const t of Object.keys(e.text)) o.push(` --xp-text-color-${t}: ${e.text[t]};`);
1523
+ o.push(` --xp-border-color: ${e.border.base};`), o.push(` --xp-border-color-light: ${e.border.light};`), o.push(` --xp-border-color-lighter: ${e.border.lighter};`);
1524
1524
  for (const t of Object.keys(e.bg)) {
1525
1525
  const s = t === "base" ? "" : `-${t}`;
1526
- n.push(` --xp-bg-color${s}: ${e.bg[t]};`);
1526
+ o.push(` --xp-bg-color${s}: ${e.bg[t]};`);
1527
1527
  }
1528
1528
  for (const t of Object.keys(e.fill)) {
1529
1529
  const s = t === "base" ? "" : `-${t}`;
1530
- n.push(` --xp-fill-color${s}: ${e.fill[t]};`);
1530
+ o.push(` --xp-fill-color${s}: ${e.fill[t]};`);
1531
1531
  }
1532
- for (const t of Object.keys(e.shadow)) n.push(` --xp-shadow-${t}: ${e.shadow[t]};`);
1533
- return n.join(`
1532
+ for (const t of Object.keys(e.shadow)) o.push(` --xp-shadow-${t}: ${e.shadow[t]};`);
1533
+ return o.join(`
1534
1534
  `);
1535
1535
  }
1536
- function vn(e, n) {
1536
+ function Eo(e, o) {
1537
1537
  const t = {}, s = e.primary || N, l = ["primary", "success", "warning", "danger", "info"];
1538
1538
  for (const d of l) {
1539
- const x = s[d] || N[d], m = fe(x, n);
1540
- t[`--xp-color-${d}`] = x, t[`--xp-color-${d}-light`] = m.light, t[`--xp-color-${d}-dark`] = m.dark, t[`--xp-color-${d}-bg`] = m.bg, t[`--xp-color-${d}-border`] = m.border;
1539
+ const v = s[d] || N[d], h = fe(v, o);
1540
+ t[`--xp-color-${d}`] = v, t[`--xp-color-${d}-light`] = h.light, t[`--xp-color-${d}-dark`] = h.dark, t[`--xp-color-${d}-bg`] = h.bg, t[`--xp-color-${d}-border`] = h.border;
1541
1541
  }
1542
- const u = e[n] || J[n];
1542
+ const u = e[o] || W[o];
1543
1543
  for (const d of Object.keys(u.text)) t[`--xp-text-color-${d}`] = u.text[d];
1544
1544
  t["--xp-border-color"] = u.border.base, t["--xp-border-color-light"] = u.border.light, t["--xp-border-color-lighter"] = u.border.lighter;
1545
1545
  for (const d of Object.keys(u.bg)) t[`--xp-bg-color${d === "base" ? "" : "-" + d}`] = u.bg[d];
@@ -1547,32 +1547,32 @@ function vn(e, n) {
1547
1547
  for (const d of Object.keys(u.shadow)) t[`--xp-shadow-${d}`] = u.shadow[d];
1548
1548
  return t;
1549
1549
  }
1550
- function me(e) {
1550
+ function he(e) {
1551
1551
  return [
1552
1552
  ':root, [data-theme="light"] {',
1553
1553
  le(e.primary || N, "light"),
1554
- ae(e.light || J.light),
1554
+ ie(e.light || W.light),
1555
1555
  "}",
1556
1556
  "",
1557
1557
  '[data-theme="dark"] {',
1558
1558
  le(e.primary || N, "dark"),
1559
- ae(e.dark || J.dark),
1559
+ ie(e.dark || W.dark),
1560
1560
  "}"
1561
1561
  ].join(`
1562
1562
  `);
1563
1563
  }
1564
1564
  let U = null;
1565
- function gn() {
1565
+ function Ao() {
1566
1566
  if (typeof document > "u") return null;
1567
1567
  if (U && document.contains(U)) return U;
1568
1568
  let e = document.querySelector("style[data-xp-ui-theme]");
1569
1569
  return e || (e = document.createElement("style"), e.setAttribute("data-xp-ui-theme", "true"), document.head.appendChild(e)), U = e, e;
1570
1570
  }
1571
- function yn(e) {
1572
- const n = gn();
1573
- n && (n.textContent = me(e));
1571
+ function Do(e) {
1572
+ const o = Ao();
1573
+ o && (o.textContent = he(e));
1574
1574
  }
1575
- const ee = z("light"), he = z(F());
1575
+ const ee = S("light"), me = S(F());
1576
1576
  function L(e) {
1577
1577
  if (["light", "dark"].includes(e) && (ee.value = e, typeof document < "u")) {
1578
1578
  document.documentElement.setAttribute("data-theme", e);
@@ -1582,22 +1582,22 @@ function L(e) {
1582
1582
  }
1583
1583
  }
1584
1584
  }
1585
- function bn() {
1585
+ function No() {
1586
1586
  L(ee.value === "light" ? "dark" : "light");
1587
1587
  }
1588
1588
  function P(e) {
1589
1589
  if (!e) return;
1590
- const n = F();
1591
- e.primary && (n.primary = { ...n.primary, ...e.primary }), e.light && (n.light = Z(n.light, e.light)), e.dark && (n.dark = Z(n.dark, e.dark)), he.value = n, yn(n);
1590
+ const o = F();
1591
+ e.primary && (o.primary = { ...o.primary, ...e.primary }), e.light && (o.light = Z(o.light, e.light)), e.dark && (o.dark = Z(o.dark, e.dark)), me.value = o, Do(o);
1592
1592
  try {
1593
- localStorage.setItem("xp-ui-theme-config", JSON.stringify(n));
1593
+ localStorage.setItem("xp-ui-theme-config", JSON.stringify(o));
1594
1594
  } catch {
1595
1595
  }
1596
1596
  }
1597
- function _n() {
1597
+ function Fo() {
1598
1598
  P(F());
1599
1599
  }
1600
- function kn() {
1600
+ function Ro() {
1601
1601
  if (typeof document > "u") return;
1602
1602
  let e = null;
1603
1603
  try {
@@ -1605,42 +1605,42 @@ function kn() {
1605
1605
  } catch {
1606
1606
  }
1607
1607
  e === "light" || e === "dark" ? L(e) : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? L("dark") : L("light");
1608
- let n = null;
1608
+ let o = null;
1609
1609
  try {
1610
- n = localStorage.getItem("xp-ui-theme-config");
1610
+ o = localStorage.getItem("xp-ui-theme-config");
1611
1611
  } catch {
1612
1612
  }
1613
- if (n)
1613
+ if (o)
1614
1614
  try {
1615
- P(JSON.parse(n));
1615
+ P(JSON.parse(o));
1616
1616
  } catch {
1617
1617
  P(F());
1618
1618
  }
1619
1619
  else
1620
1620
  P(F());
1621
1621
  }
1622
- function Z(e, n) {
1623
- if (!n || typeof n != "object") return e;
1622
+ function Z(e, o) {
1623
+ if (!o || typeof o != "object") return e;
1624
1624
  const t = Array.isArray(e) ? [...e] : { ...e };
1625
- for (const s of Object.keys(n))
1626
- n[s] && typeof n[s] == "object" && !Array.isArray(n[s]) ? t[s] = Z(e[s] || {}, n[s]) : t[s] = n[s];
1625
+ for (const s of Object.keys(o))
1626
+ o[s] && typeof o[s] == "object" && !Array.isArray(o[s]) ? t[s] = Z(e[s] || {}, o[s]) : t[s] = o[s];
1627
1627
  return t;
1628
1628
  }
1629
- function $n() {
1629
+ function Oo() {
1630
1630
  return {
1631
1631
  theme: ee,
1632
- themeConfig: he,
1632
+ themeConfig: me,
1633
1633
  setTheme: L,
1634
- toggleTheme: bn,
1635
- initTheme: kn,
1634
+ toggleTheme: No,
1635
+ initTheme: Ro,
1636
1636
  applyThemeConfig: P,
1637
- resetThemeConfig: _n,
1637
+ resetThemeConfig: Fo,
1638
1638
  getDefaultThemeConfig: F,
1639
- buildCssString: me,
1640
- buildCssVars: vn
1639
+ buildCssString: he,
1640
+ buildCssVars: Eo
1641
1641
  };
1642
1642
  }
1643
- const wn = ["data-theme"], Cn = { class: "xp-theme-customizer__header" }, Sn = { class: "xp-theme-customizer__body" }, zn = { class: "xp-theme-customizer__section" }, Bn = { class: "xp-theme-customizer__modes" }, Mn = ["onClick"], In = { class: "xp-theme-customizer__section" }, Tn = { class: "xp-theme-customizer__grid" }, Vn = { class: "xp-theme-customizer__label" }, En = { class: "xp-theme-customizer__input" }, An = ["value", "onInput"], Dn = ["value", "onChange"], jn = { class: "xp-theme-customizer__section" }, Nn = { class: "xp-theme-customizer__grid" }, Fn = { class: "xp-theme-customizer__label" }, Rn = { class: "xp-theme-customizer__input" }, On = ["value", "onInput"], Xn = ["value", "onChange"], Ln = { class: "xp-theme-customizer__section" }, Pn = { class: "xp-theme-customizer__grid" }, Wn = { class: "xp-theme-customizer__label" }, Jn = { class: "xp-theme-customizer__input" }, Hn = ["value", "onInput"], Un = ["value", "onChange"], Gn = { class: "xp-theme-customizer__section" }, qn = { class: "xp-theme-customizer__grid" }, Yn = { class: "xp-theme-customizer__label" }, Kn = { class: "xp-theme-customizer__input" }, Zn = ["value", "onInput"], Qn = ["value", "onChange"], eo = { class: "xp-theme-customizer__label" }, to = { class: "xp-theme-customizer__input" }, no = ["value", "onInput"], oo = ["value", "onChange"], so = {
1643
+ const Xo = ["data-theme"], Lo = { class: "xp-theme-customizer__header" }, Po = { class: "xp-theme-customizer__body" }, Ho = { class: "xp-theme-customizer__section" }, Wo = { class: "xp-theme-customizer__modes" }, Jo = ["onClick"], Uo = { class: "xp-theme-customizer__section" }, Go = { class: "xp-theme-customizer__grid" }, qo = { class: "xp-theme-customizer__label" }, Yo = { class: "xp-theme-customizer__input" }, Ko = ["value", "onInput"], Zo = ["value", "onChange"], Qo = { class: "xp-theme-customizer__section" }, en = { class: "xp-theme-customizer__grid" }, tn = { class: "xp-theme-customizer__label" }, on = { class: "xp-theme-customizer__input" }, nn = ["value", "onInput"], sn = ["value", "onChange"], ln = { class: "xp-theme-customizer__section" }, rn = { class: "xp-theme-customizer__grid" }, an = { class: "xp-theme-customizer__label" }, dn = { class: "xp-theme-customizer__input" }, un = ["value", "onInput"], cn = ["value", "onChange"], pn = { class: "xp-theme-customizer__section" }, fn = { class: "xp-theme-customizer__grid" }, hn = { class: "xp-theme-customizer__label" }, mn = { class: "xp-theme-customizer__input" }, vn = ["value", "onInput"], gn = ["value", "onChange"], xn = { class: "xp-theme-customizer__label" }, _n = { class: "xp-theme-customizer__input" }, yn = ["value", "onInput"], kn = ["value", "onChange"], bn = {
1644
1644
  __name: "ThemeCustomizer",
1645
1645
  props: {
1646
1646
  modelValue: {
@@ -1649,8 +1649,8 @@ const wn = ["data-theme"], Cn = { class: "xp-theme-customizer__header" }, Sn = {
1649
1649
  }
1650
1650
  },
1651
1651
  emits: ["update:modelValue"],
1652
- setup(e, { emit: n }) {
1653
- const { theme: t, applyThemeConfig: s, resetThemeConfig: l, getDefaultThemeConfig: u, buildCssString: d, themeConfig: x } = $n(), m = {
1652
+ setup(e, { emit: o }) {
1653
+ const { theme: t, applyThemeConfig: s, resetThemeConfig: l, getDefaultThemeConfig: u, buildCssString: d, themeConfig: v } = Oo(), h = {
1654
1654
  primary: "主色",
1655
1655
  success: "成功",
1656
1656
  warning: "警告",
@@ -1664,255 +1664,255 @@ const wn = ["data-theme"], Cn = { class: "xp-theme-customizer__header" }, Sn = {
1664
1664
  soft: "柔和",
1665
1665
  light: "亮",
1666
1666
  lighter: "更亮"
1667
- }, f = z("light"), i = z(null), c = $e(h(x.value));
1668
- re(x, (S) => Object.assign(c, h(S)), { deep: !0 });
1669
- function h(S) {
1670
- return JSON.parse(JSON.stringify(S));
1667
+ }, f = S("light"), r = S(null), c = we(m(v.value));
1668
+ ae(v, (M) => Object.assign(c, m(M)), { deep: !0 });
1669
+ function m(M) {
1670
+ return JSON.parse(JSON.stringify(M));
1671
1671
  }
1672
- function $(S) {
1673
- if (!S) return "#ffffff";
1674
- if (/^#([0-9a-f]{6})$/i.test(S)) return S.toLowerCase();
1675
- const v = S.match(/rgba?\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/);
1676
- return v ? "#" + [v[1], v[2], v[3]].map((p) => Number(p).toString(16).padStart(2, "0")).join("") : "#ffffff";
1672
+ function w(M) {
1673
+ if (!M) return "#ffffff";
1674
+ if (/^#([0-9a-f]{6})$/i.test(M)) return M.toLowerCase();
1675
+ const g = M.match(/rgba?\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/);
1676
+ return g ? "#" + [g[1], g[2], g[3]].map((p) => Number(p).toString(16).padStart(2, "0")).join("") : "#ffffff";
1677
1677
  }
1678
- function w(S, v) {
1679
- c.primary[S] = v, s(c);
1678
+ function $(M, g) {
1679
+ c.primary[M] = g, s(c);
1680
1680
  }
1681
- function I(S, v, p) {
1682
- c[f.value][S][v] = p, s(c);
1681
+ function I(M, g, p) {
1682
+ c[f.value][M][g] = p, s(c);
1683
1683
  }
1684
1684
  function te() {
1685
1685
  l();
1686
1686
  }
1687
- function ve() {
1688
- ne("xp-ui-theme.json", JSON.stringify(c, null, 2), "application/json");
1689
- }
1690
1687
  function ge() {
1691
- ne("xp-ui-theme.css", d(c), "text/css");
1688
+ oe("xp-ui-theme.json", JSON.stringify(c, null, 2), "application/json");
1689
+ }
1690
+ function xe() {
1691
+ oe("xp-ui-theme.css", d(c), "text/css");
1692
1692
  }
1693
- function ye() {
1694
- i.value && i.value.click();
1693
+ function _e() {
1694
+ r.value && r.value.click();
1695
1695
  }
1696
- function be(S) {
1697
- const v = S.target.files && S.target.files[0];
1698
- if (!v) return;
1696
+ function ye(M) {
1697
+ const g = M.target.files && M.target.files[0];
1698
+ if (!g) return;
1699
1699
  const p = new FileReader();
1700
1700
  p.onload = () => {
1701
1701
  try {
1702
- const y = JSON.parse(p.result);
1703
- s(y);
1704
- } catch (y) {
1702
+ const _ = JSON.parse(p.result);
1703
+ s(_);
1704
+ } catch (_) {
1705
1705
  alert(`主题配置解析失败:
1706
- ` + y.message);
1706
+ ` + _.message);
1707
1707
  } finally {
1708
- S.target.value = "";
1708
+ M.target.value = "";
1709
1709
  }
1710
- }, p.readAsText(v);
1710
+ }, p.readAsText(g);
1711
1711
  }
1712
- function ne(S, v, p) {
1713
- const y = new Blob([v], { type: p + ";charset=utf-8" }), oe = URL.createObjectURL(y), O = document.createElement("a");
1714
- O.href = oe, O.download = S, document.body.appendChild(O), O.click(), O.remove(), setTimeout(() => URL.revokeObjectURL(oe), 0);
1712
+ function oe(M, g, p) {
1713
+ const _ = new Blob([g], { type: p + ";charset=utf-8" }), ne = URL.createObjectURL(_), O = document.createElement("a");
1714
+ O.href = ne, O.download = M, document.body.appendChild(O), O.click(), O.remove(), setTimeout(() => URL.revokeObjectURL(ne), 0);
1715
1715
  }
1716
- return (S, v) => (a(), r(_, null, [
1717
- A(D, { name: "xp-fade" }, {
1718
- default: E(() => [
1719
- e.modelValue ? (a(), r("div", {
1716
+ return (M, g) => (i(), a(k, null, [
1717
+ E(A, { name: "xp-fade" }, {
1718
+ default: j(() => [
1719
+ e.modelValue ? (i(), a("div", {
1720
1720
  key: 0,
1721
1721
  class: "xp-theme-customizer-backdrop",
1722
- onClick: v[0] || (v[0] = j((p) => S.$emit("update:modelValue", !1), ["self"]))
1723
- })) : g("", !0)
1722
+ onClick: g[0] || (g[0] = D((p) => M.$emit("update:modelValue", !1), ["self"]))
1723
+ })) : x("", !0)
1724
1724
  ]),
1725
1725
  _: 1
1726
1726
  }),
1727
- A(D, { name: "xp-slide" }, {
1728
- default: E(() => [
1729
- e.modelValue ? (a(), r("aside", {
1727
+ E(A, { name: "xp-slide" }, {
1728
+ default: j(() => [
1729
+ e.modelValue ? (i(), a("aside", {
1730
1730
  key: 0,
1731
1731
  class: "xp-theme-customizer",
1732
1732
  "data-theme": ce(t)
1733
1733
  }, [
1734
- o("header", Cn, [
1735
- v[2] || (v[2] = o("div", { class: "xp-theme-customizer__title" }, "🎨 主题定制", -1)),
1736
- o("button", {
1734
+ n("header", Lo, [
1735
+ g[2] || (g[2] = n("div", { class: "xp-theme-customizer__title" }, "🎨 主题定制", -1)),
1736
+ n("button", {
1737
1737
  class: "xp-theme-customizer__close",
1738
- onClick: v[1] || (v[1] = (p) => S.$emit("update:modelValue", !1)),
1738
+ onClick: g[1] || (g[1] = (p) => M.$emit("update:modelValue", !1)),
1739
1739
  "aria-label": "关闭"
1740
1740
  }, "✕")
1741
1741
  ]),
1742
- o("div", Sn, [
1743
- o("section", zn, [
1744
- v[3] || (v[3] = o("p", { class: "xp-theme-customizer__desc" }, " 修改下方颜色即可改变整个示例/库的外观。导出后可直接放进你自己的项目中应用。 ", -1)),
1745
- o("div", Bn, [
1746
- (a(), r(_, null, V(["light", "dark"], (p) => o("button", {
1742
+ n("div", Po, [
1743
+ n("section", Ho, [
1744
+ g[3] || (g[3] = n("p", { class: "xp-theme-customizer__desc" }, " 修改下方颜色即可改变整个示例/库的外观。导出后可直接放进你自己的项目中应用。 ", -1)),
1745
+ n("div", Wo, [
1746
+ (i(), a(k, null, V(["light", "dark"], (p) => n("button", {
1747
1747
  key: p,
1748
1748
  class: B(["xp-theme-customizer__mode-btn", { "is-active": f.value === p }]),
1749
- onClick: (y) => f.value = p
1750
- }, k(p === "light" ? "浅色" : "暗黑"), 11, Mn)), 64))
1749
+ onClick: (_) => f.value = p
1750
+ }, b(p === "light" ? "浅色" : "暗黑"), 11, Jo)), 64))
1751
1751
  ])
1752
1752
  ]),
1753
- o("section", In, [
1754
- v[4] || (v[4] = o("h3", { class: "xp-theme-customizer__h" }, "主色", -1)),
1755
- o("div", Tn, [
1756
- (a(), r(_, null, V(["primary", "success", "warning", "danger", "info"], (p) => o("div", {
1753
+ n("section", Uo, [
1754
+ g[4] || (g[4] = n("h3", { class: "xp-theme-customizer__h" }, "主色", -1)),
1755
+ n("div", Go, [
1756
+ (i(), a(k, null, V(["primary", "success", "warning", "danger", "info"], (p) => n("div", {
1757
1757
  key: p,
1758
1758
  class: "xp-theme-customizer__item"
1759
1759
  }, [
1760
- o("div", Vn, k(m[p]), 1),
1761
- o("div", En, [
1762
- o("input", {
1760
+ n("div", qo, b(h[p]), 1),
1761
+ n("div", Yo, [
1762
+ n("input", {
1763
1763
  type: "color",
1764
1764
  value: c.primary[p],
1765
- onInput: (y) => w(p, y.target.value)
1766
- }, null, 40, An),
1767
- o("input", {
1765
+ onInput: (_) => $(p, _.target.value)
1766
+ }, null, 40, Ko),
1767
+ n("input", {
1768
1768
  type: "text",
1769
1769
  value: c.primary[p],
1770
- onChange: (y) => w(p, y.target.value)
1771
- }, null, 40, Dn)
1770
+ onChange: (_) => $(p, _.target.value)
1771
+ }, null, 40, Zo)
1772
1772
  ])
1773
1773
  ])), 64))
1774
1774
  ])
1775
1775
  ]),
1776
- o("section", jn, [
1777
- v[5] || (v[5] = o("h3", { class: "xp-theme-customizer__h" }, "文本", -1)),
1778
- o("div", Nn, [
1779
- (a(), r(_, null, V(["primary", "regular", "secondary", "placeholder"], (p) => o("div", {
1776
+ n("section", Qo, [
1777
+ g[5] || (g[5] = n("h3", { class: "xp-theme-customizer__h" }, "文本", -1)),
1778
+ n("div", en, [
1779
+ (i(), a(k, null, V(["primary", "regular", "secondary", "placeholder"], (p) => n("div", {
1780
1780
  key: "t-" + p,
1781
1781
  class: "xp-theme-customizer__item"
1782
1782
  }, [
1783
- o("div", Fn, k(m[p]), 1),
1784
- o("div", Rn, [
1785
- o("input", {
1783
+ n("div", tn, b(h[p]), 1),
1784
+ n("div", on, [
1785
+ n("input", {
1786
1786
  type: "color",
1787
- value: $(c[f.value].text[p]),
1788
- onInput: (y) => I("text", p, y.target.value)
1789
- }, null, 40, On),
1790
- o("input", {
1787
+ value: w(c[f.value].text[p]),
1788
+ onInput: (_) => I("text", p, _.target.value)
1789
+ }, null, 40, nn),
1790
+ n("input", {
1791
1791
  type: "text",
1792
1792
  value: c[f.value].text[p],
1793
- onChange: (y) => I("text", p, y.target.value)
1794
- }, null, 40, Xn)
1793
+ onChange: (_) => I("text", p, _.target.value)
1794
+ }, null, 40, sn)
1795
1795
  ])
1796
1796
  ])), 64))
1797
1797
  ])
1798
1798
  ]),
1799
- o("section", Ln, [
1800
- v[6] || (v[6] = o("h3", { class: "xp-theme-customizer__h" }, "背景", -1)),
1801
- o("div", Pn, [
1802
- (a(), r(_, null, V(["base", "page", "soft"], (p) => o("div", {
1799
+ n("section", ln, [
1800
+ g[6] || (g[6] = n("h3", { class: "xp-theme-customizer__h" }, "背景", -1)),
1801
+ n("div", rn, [
1802
+ (i(), a(k, null, V(["base", "page", "soft"], (p) => n("div", {
1803
1803
  key: "bg-" + p,
1804
1804
  class: "xp-theme-customizer__item"
1805
1805
  }, [
1806
- o("div", Wn, k(m[p]), 1),
1807
- o("div", Jn, [
1808
- o("input", {
1806
+ n("div", an, b(h[p]), 1),
1807
+ n("div", dn, [
1808
+ n("input", {
1809
1809
  type: "color",
1810
- value: $(c[f.value].bg[p]),
1811
- onInput: (y) => I("bg", p, y.target.value)
1812
- }, null, 40, Hn),
1813
- o("input", {
1810
+ value: w(c[f.value].bg[p]),
1811
+ onInput: (_) => I("bg", p, _.target.value)
1812
+ }, null, 40, un),
1813
+ n("input", {
1814
1814
  type: "text",
1815
1815
  value: c[f.value].bg[p],
1816
- onChange: (y) => I("bg", p, y.target.value)
1817
- }, null, 40, Un)
1816
+ onChange: (_) => I("bg", p, _.target.value)
1817
+ }, null, 40, cn)
1818
1818
  ])
1819
1819
  ])), 64))
1820
1820
  ])
1821
1821
  ]),
1822
- o("section", Gn, [
1823
- v[7] || (v[7] = o("h3", { class: "xp-theme-customizer__h" }, "边框 / 填充", -1)),
1824
- o("div", qn, [
1825
- (a(), r(_, null, V(["base", "light", "lighter"], (p) => o("div", {
1822
+ n("section", pn, [
1823
+ g[7] || (g[7] = n("h3", { class: "xp-theme-customizer__h" }, "边框 / 填充", -1)),
1824
+ n("div", fn, [
1825
+ (i(), a(k, null, V(["base", "light", "lighter"], (p) => n("div", {
1826
1826
  key: "bd-" + p,
1827
1827
  class: "xp-theme-customizer__item"
1828
1828
  }, [
1829
- o("div", Yn, "边框 - " + k(m[p]), 1),
1830
- o("div", Kn, [
1831
- o("input", {
1829
+ n("div", hn, "边框 - " + b(h[p]), 1),
1830
+ n("div", mn, [
1831
+ n("input", {
1832
1832
  type: "color",
1833
- value: $(c[f.value].border[p]),
1834
- onInput: (y) => I("border", p, y.target.value)
1835
- }, null, 40, Zn),
1836
- o("input", {
1833
+ value: w(c[f.value].border[p]),
1834
+ onInput: (_) => I("border", p, _.target.value)
1835
+ }, null, 40, vn),
1836
+ n("input", {
1837
1837
  type: "text",
1838
1838
  value: c[f.value].border[p],
1839
- onChange: (y) => I("border", p, y.target.value)
1840
- }, null, 40, Qn)
1839
+ onChange: (_) => I("border", p, _.target.value)
1840
+ }, null, 40, gn)
1841
1841
  ])
1842
1842
  ])), 64)),
1843
- (a(), r(_, null, V(["base", "light", "lighter"], (p) => o("div", {
1843
+ (i(), a(k, null, V(["base", "light", "lighter"], (p) => n("div", {
1844
1844
  key: "fl-" + p,
1845
1845
  class: "xp-theme-customizer__item"
1846
1846
  }, [
1847
- o("div", eo, "填充 - " + k(m[p]), 1),
1848
- o("div", to, [
1849
- o("input", {
1847
+ n("div", xn, "填充 - " + b(h[p]), 1),
1848
+ n("div", _n, [
1849
+ n("input", {
1850
1850
  type: "color",
1851
- value: $(c[f.value].fill[p]),
1852
- onInput: (y) => I("fill", p, y.target.value)
1853
- }, null, 40, no),
1854
- o("input", {
1851
+ value: w(c[f.value].fill[p]),
1852
+ onInput: (_) => I("fill", p, _.target.value)
1853
+ }, null, 40, yn),
1854
+ n("input", {
1855
1855
  type: "text",
1856
1856
  value: c[f.value].fill[p],
1857
- onChange: (y) => I("fill", p, y.target.value)
1858
- }, null, 40, oo)
1857
+ onChange: (_) => I("fill", p, _.target.value)
1858
+ }, null, 40, kn)
1859
1859
  ])
1860
1860
  ])), 64))
1861
1861
  ])
1862
1862
  ]),
1863
- v[8] || (v[8] = o("section", { class: "xp-theme-customizer__section" }, [
1864
- o("h3", { class: "xp-theme-customizer__h" }, "实时预览"),
1865
- o("div", { class: "xp-theme-customizer__preview" }, [
1866
- o("div", { class: "xp-preview-row" }, [
1867
- o("button", { class: "xp-preview-btn xp-preview-btn--primary" }, "Primary"),
1868
- o("button", { class: "xp-preview-btn xp-preview-btn--success" }, "Success"),
1869
- o("button", { class: "xp-preview-btn xp-preview-btn--warning" }, "Warning"),
1870
- o("button", { class: "xp-preview-btn xp-preview-btn--danger" }, "Danger")
1863
+ g[8] || (g[8] = n("section", { class: "xp-theme-customizer__section" }, [
1864
+ n("h3", { class: "xp-theme-customizer__h" }, "实时预览"),
1865
+ n("div", { class: "xp-theme-customizer__preview" }, [
1866
+ n("div", { class: "xp-preview-row" }, [
1867
+ n("button", { class: "xp-preview-btn xp-preview-btn--primary" }, "Primary"),
1868
+ n("button", { class: "xp-preview-btn xp-preview-btn--success" }, "Success"),
1869
+ n("button", { class: "xp-preview-btn xp-preview-btn--warning" }, "Warning"),
1870
+ n("button", { class: "xp-preview-btn xp-preview-btn--danger" }, "Danger")
1871
1871
  ]),
1872
- o("div", { class: "xp-preview-text xp-preview-text--primary" }, "主标题文本"),
1873
- o("div", { class: "xp-preview-text" }, "正文内容样例 Regular text"),
1874
- o("div", { class: "xp-preview-text xp-preview-text--secondary" }, "次要提示")
1872
+ n("div", { class: "xp-preview-text xp-preview-text--primary" }, "主标题文本"),
1873
+ n("div", { class: "xp-preview-text" }, "正文内容样例 Regular text"),
1874
+ n("div", { class: "xp-preview-text xp-preview-text--secondary" }, "次要提示")
1875
1875
  ])
1876
1876
  ], -1))
1877
1877
  ]),
1878
- o("footer", { class: "xp-theme-customizer__footer" }, [
1879
- o("button", {
1878
+ n("footer", { class: "xp-theme-customizer__footer" }, [
1879
+ n("button", {
1880
1880
  class: "xp-theme-customizer__action",
1881
1881
  onClick: te
1882
1882
  }, "恢复默认"),
1883
- o("button", {
1883
+ n("button", {
1884
1884
  class: "xp-theme-customizer__action xp-theme-customizer__action--secondary",
1885
- onClick: ye
1885
+ onClick: _e
1886
1886
  }, "导入 JSON"),
1887
- o("button", {
1887
+ n("button", {
1888
1888
  class: "xp-theme-customizer__action xp-theme-customizer__action--primary",
1889
- onClick: ve
1889
+ onClick: ge
1890
1890
  }, "导出 JSON"),
1891
- o("button", {
1891
+ n("button", {
1892
1892
  class: "xp-theme-customizer__action xp-theme-customizer__action--primary",
1893
- onClick: ge
1893
+ onClick: xe
1894
1894
  }, "导出 CSS")
1895
1895
  ]),
1896
- o("input", {
1896
+ n("input", {
1897
1897
  ref_key: "importFileInput",
1898
- ref: i,
1898
+ ref: r,
1899
1899
  type: "file",
1900
1900
  accept: "application/json,.json,.txt",
1901
1901
  class: "xp-theme-customizer__hidden",
1902
- onChange: be
1902
+ onChange: ye
1903
1903
  }, null, 544)
1904
- ], 8, wn)) : g("", !0)
1904
+ ], 8, Xo)) : x("", !0)
1905
1905
  ]),
1906
1906
  _: 1
1907
1907
  })
1908
1908
  ], 64));
1909
1909
  }
1910
- }, X = z([]);
1911
- let lo = 0;
1912
- function bo() {
1913
- function e(n, t = "info", s = 2600) {
1914
- const l = ++lo;
1915
- X.value.push({ id: l, message: n, type: t }), setTimeout(() => {
1910
+ }, X = S([]);
1911
+ let wn = 0;
1912
+ function Nn() {
1913
+ function e(o, t = "info", s = 2600) {
1914
+ const l = ++wn;
1915
+ X.value.push({ id: l, message: o, type: t }), setTimeout(() => {
1916
1916
  const u = X.value.findIndex((d) => d.id === l);
1917
1917
  u >= 0 && X.value.splice(u, 1);
1918
1918
  }, s);
@@ -1920,31 +1920,31 @@ function bo() {
1920
1920
  return {
1921
1921
  toasts: X,
1922
1922
  toast: e,
1923
- success: (n) => e(n, "success", 2200),
1924
- error: (n) => e(n, "error", 3600),
1925
- info: (n) => e(n, "info"),
1926
- warn: (n) => e(n, "warn", 2800)
1923
+ success: (o) => e(o, "success", 2200),
1924
+ error: (o) => e(o, "error", 3600),
1925
+ info: (o) => e(o, "info"),
1926
+ warn: (o) => e(o, "warn", 2800)
1927
1927
  };
1928
1928
  }
1929
- const ao = {
1929
+ const $n = {
1930
1930
  class: "xp-toast-wrap",
1931
1931
  "aria-live": "polite"
1932
- }, io = { class: "xp-toast__msg" }, ro = {
1932
+ }, Cn = { class: "xp-toast__msg" }, Mn = {
1933
1933
  __name: "Toast",
1934
1934
  setup(e) {
1935
- return (n, t) => (a(), R(H, { to: "body" }, [
1936
- o("div", ao, [
1937
- A(we, { name: "xp-toast" }, {
1938
- default: E(() => [
1939
- (a(!0), r(_, null, V(ce(X), (s) => (a(), r("div", {
1935
+ return (o, t) => (i(), R(J, { to: "body" }, [
1936
+ n("div", $n, [
1937
+ E($e, { name: "xp-toast" }, {
1938
+ default: j(() => [
1939
+ (i(!0), a(k, null, V(ce(X), (s) => (i(), a("div", {
1940
1940
  key: s.id,
1941
1941
  class: B(["xp-toast", `xp-toast--${s.type}`])
1942
1942
  }, [
1943
- t[0] || (t[0] = o("span", {
1943
+ t[0] || (t[0] = n("span", {
1944
1944
  class: "xp-toast__dot",
1945
1945
  "aria-hidden": "true"
1946
1946
  }, null, -1)),
1947
- o("span", io, k(s.message), 1)
1947
+ n("span", Cn, b(s.message), 1)
1948
1948
  ], 2))), 128))
1949
1949
  ]),
1950
1950
  _: 1
@@ -1952,7 +1952,7 @@ const ao = {
1952
1952
  ])
1953
1953
  ]));
1954
1954
  }
1955
- }, uo = /* @__PURE__ */ C(ro, [["__scopeId", "data-v-b564201c"]]), co = { class: "xp-tooltip__content" }, po = {
1955
+ }, Sn = /* @__PURE__ */ C(Mn, [["__scopeId", "data-v-b564201c"]]), Bn = { class: "xp-tooltip__content" }, zn = {
1956
1956
  __name: "Tooltip",
1957
1957
  props: {
1958
1958
  content: {
@@ -1975,159 +1975,159 @@ const ao = {
1975
1975
  }
1976
1976
  },
1977
1977
  setup(e) {
1978
- const n = e, t = z(!1), s = z({}), l = z(null), u = z(null);
1978
+ const o = e, t = S(!1), s = S({}), l = S(null), u = S(null);
1979
1979
  let d = null;
1980
- const x = () => {
1980
+ const v = () => {
1981
1981
  ue(() => {
1982
1982
  if (!l.value || !u.value) return;
1983
- const c = l.value.getBoundingClientRect(), h = u.value.getBoundingClientRect();
1984
- let $ = 0, w = 0;
1985
- switch (n.placement) {
1983
+ const c = l.value.getBoundingClientRect(), m = u.value.getBoundingClientRect();
1984
+ let w = 0, $ = 0;
1985
+ switch (o.placement) {
1986
1986
  case "top":
1987
- $ = c.top - h.height - 8, w = c.left + c.width / 2 - h.width / 2;
1987
+ w = c.top - m.height - 8, $ = c.left + c.width / 2 - m.width / 2;
1988
1988
  break;
1989
1989
  case "bottom":
1990
- $ = c.bottom + 8, w = c.left + c.width / 2 - h.width / 2;
1990
+ w = c.bottom + 8, $ = c.left + c.width / 2 - m.width / 2;
1991
1991
  break;
1992
1992
  case "left":
1993
- $ = c.top + c.height / 2 - h.height / 2, w = c.left - h.width - 8;
1993
+ w = c.top + c.height / 2 - m.height / 2, $ = c.left - m.width - 8;
1994
1994
  break;
1995
1995
  case "right":
1996
- $ = c.top + c.height / 2 - h.height / 2, w = c.right + 8;
1996
+ w = c.top + c.height / 2 - m.height / 2, $ = c.right + 8;
1997
1997
  break;
1998
1998
  }
1999
1999
  s.value = {
2000
- top: `${$ + window.scrollY}px`,
2001
- left: `${w + window.scrollX}px`
2000
+ top: `${w + window.scrollY}px`,
2001
+ left: `${$ + window.scrollX}px`
2002
2002
  };
2003
2003
  });
2004
- }, m = () => {
2005
- n.disabled || (clearTimeout(d), d = setTimeout(() => {
2006
- t.value = !0, x();
2004
+ }, h = () => {
2005
+ o.disabled || (clearTimeout(d), d = setTimeout(() => {
2006
+ t.value = !0, v();
2007
2007
  }, 100));
2008
2008
  }, f = () => {
2009
2009
  clearTimeout(d), d = setTimeout(() => {
2010
2010
  t.value = !1;
2011
2011
  }, 150);
2012
- }, i = () => {
2013
- n.trigger !== "click" || n.disabled || (t.value = !t.value, t.value && x());
2012
+ }, r = () => {
2013
+ o.trigger !== "click" || o.disabled || (t.value = !t.value, t.value && v());
2014
2014
  };
2015
2015
  return Q(() => {
2016
2016
  clearTimeout(d);
2017
- }), (c, h) => (a(), r("div", {
2017
+ }), (c, m) => (i(), a("div", {
2018
2018
  class: "xp-tooltip",
2019
2019
  ref_key: "tooltipRef",
2020
2020
  ref: l
2021
2021
  }, [
2022
- o("div", {
2022
+ n("div", {
2023
2023
  class: "xp-tooltip__trigger",
2024
- onMouseenter: m,
2024
+ onMouseenter: h,
2025
2025
  onMouseleave: f,
2026
- onClick: i
2026
+ onClick: r
2027
2027
  }, [
2028
- b(c.$slots, "default", {}, void 0, !0)
2028
+ y(c.$slots, "default", {}, void 0, !0)
2029
2029
  ], 32),
2030
- (a(), R(H, { to: "body" }, [
2031
- A(D, { name: "xp-tooltip-fade" }, {
2032
- default: E(() => [
2033
- t.value ? (a(), r("div", {
2030
+ (i(), R(J, { to: "body" }, [
2031
+ E(A, { name: "xp-tooltip-fade" }, {
2032
+ default: j(() => [
2033
+ t.value ? (i(), a("div", {
2034
2034
  key: 0,
2035
2035
  class: B(["xp-tooltip__popper", [`xp-tooltip__popper--${e.placement}`]]),
2036
2036
  style: T(s.value),
2037
2037
  ref_key: "popperRef",
2038
2038
  ref: u
2039
2039
  }, [
2040
- o("div", co, [
2041
- b(c.$slots, "content", {}, () => [
2042
- W(k(e.content), 1)
2040
+ n("div", Bn, [
2041
+ y(c.$slots, "content", {}, () => [
2042
+ H(b(e.content), 1)
2043
2043
  ], !0)
2044
2044
  ]),
2045
- h[0] || (h[0] = o("div", { class: "xp-tooltip__arrow" }, null, -1))
2046
- ], 6)) : g("", !0)
2045
+ m[0] || (m[0] = n("div", { class: "xp-tooltip__arrow" }, null, -1))
2046
+ ], 6)) : x("", !0)
2047
2047
  ]),
2048
2048
  _: 3
2049
2049
  })
2050
2050
  ]))
2051
2051
  ], 512));
2052
2052
  }
2053
- }, fo = /* @__PURE__ */ C(po, [["__scopeId", "data-v-6d9af40b"]]), xe = {
2053
+ }, In = /* @__PURE__ */ C(zn, [["__scopeId", "data-v-6d9af40b"]]), ve = {
2054
2054
  XpAlert: Ie,
2055
- XpAvatar: De,
2055
+ XpAvatar: Ae,
2056
2056
  XpBadge: Fe,
2057
2057
  XpButton: K,
2058
2058
  XpCard: qe,
2059
2059
  XpCheckbox: et,
2060
- XpContextMenu: at,
2060
+ XpContextMenu: it,
2061
2061
  XpDialog: pt,
2062
- XpDropdown: vt,
2063
- XpEmpty: $t,
2064
- XpFileIcon: St,
2065
- XpIcon: Tt,
2066
- XpInput: jt,
2067
- XpProgress: Rt,
2068
- XpRadio: Wt,
2069
- XpRate: Yt,
2070
- XpSwitch: en,
2071
- XpTabPane: on,
2072
- XpTabs: un,
2073
- XpTag: pn,
2074
- XpThemeCustomizer: so,
2075
- XpToast: uo,
2076
- XpTooltip: fo
2077
- }, mo = (e) => {
2078
- Object.entries(xe).forEach(([n, t]) => {
2079
- e.component(n, t);
2062
+ XpDropdown: gt,
2063
+ XpEmpty: wt,
2064
+ XpFileIcon: Mt,
2065
+ XpIcon: Gt,
2066
+ XpInput: Qt,
2067
+ XpProgress: oo,
2068
+ XpRadio: ro,
2069
+ XpRate: ho,
2070
+ XpSwitch: xo,
2071
+ XpTabPane: ko,
2072
+ XpTabs: So,
2073
+ XpTag: zo,
2074
+ XpThemeCustomizer: bn,
2075
+ XpToast: Sn,
2076
+ XpTooltip: In
2077
+ }, Tn = (e) => {
2078
+ Object.entries(ve).forEach(([o, t]) => {
2079
+ e.component(o, t);
2080
2080
  });
2081
- }, _o = {
2082
- install: mo,
2083
- ...xe
2081
+ }, Fn = {
2082
+ install: Tn,
2083
+ ...ve
2084
2084
  };
2085
2085
  export {
2086
2086
  N as DEFAULT_PRIMARY,
2087
- J as DEFAULT_TOKENS,
2087
+ W as DEFAULT_TOKENS,
2088
2088
  Ie as XpAlert,
2089
- De as XpAvatar,
2089
+ Ae as XpAvatar,
2090
2090
  Fe as XpBadge,
2091
2091
  K as XpButton,
2092
2092
  qe as XpCard,
2093
2093
  et as XpCheckbox,
2094
- at as XpContextMenu,
2094
+ it as XpContextMenu,
2095
2095
  pt as XpDialog,
2096
- vt as XpDropdown,
2097
- $t as XpEmpty,
2098
- St as XpFileIcon,
2099
- Tt as XpIcon,
2100
- jt as XpInput,
2101
- Rt as XpProgress,
2102
- Wt as XpRadio,
2103
- Yt as XpRate,
2104
- en as XpSwitch,
2105
- on as XpTabPane,
2106
- un as XpTabs,
2107
- pn as XpTag,
2108
- so as XpThemeCustomizer,
2109
- uo as XpToast,
2110
- fo as XpTooltip,
2096
+ gt as XpDropdown,
2097
+ wt as XpEmpty,
2098
+ Mt as XpFileIcon,
2099
+ Gt as XpIcon,
2100
+ Qt as XpInput,
2101
+ oo as XpProgress,
2102
+ ro as XpRadio,
2103
+ ho as XpRate,
2104
+ xo as XpSwitch,
2105
+ ko as XpTabPane,
2106
+ So as XpTabs,
2107
+ zo as XpTag,
2108
+ bn as XpThemeCustomizer,
2109
+ Sn as XpToast,
2110
+ In as XpTooltip,
2111
2111
  P as applyThemeConfig,
2112
- me as buildCssString,
2113
- vn as buildCssVars,
2112
+ he as buildCssString,
2113
+ Eo as buildCssVars,
2114
2114
  q as darken,
2115
- _o as default,
2116
- vo as deriveDark,
2117
- xo as deriveLight,
2115
+ Fn as default,
2116
+ En as deriveDark,
2117
+ jn as deriveLight,
2118
2118
  F as getDefaultThemeConfig,
2119
- kn as initTheme,
2120
- mo as install,
2121
- yo as isDark,
2119
+ Ro as initTheme,
2120
+ Tn as install,
2121
+ Dn as isDark,
2122
2122
  G as lighten,
2123
2123
  pe as mix,
2124
2124
  Y as parseColor,
2125
- _n as resetThemeConfig,
2125
+ Fo as resetThemeConfig,
2126
2126
  L as setTheme,
2127
- xn as toHex,
2127
+ jo as toHex,
2128
2128
  X as toasts,
2129
- bn as toggleTheme,
2130
- $n as useTheme,
2131
- bo as useToast,
2132
- go as withAlpha
2129
+ No as toggleTheme,
2130
+ Oo as useTheme,
2131
+ Nn as useToast,
2132
+ An as withAlpha
2133
2133
  };