@xto/navigation 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as V, useSlots as G, ref as w, watch as T, provide as A, computed as m, openBlock as u, createElementBlock as d, normalizeClass as o, createElementVNode as h, unref as r, Fragment as S, renderList as q, toDisplayString as H, renderSlot as f, inject as B, withDirectives as N, createCommentVNode as C, vShow as O, normalizeStyle as I, createTextVNode as $, createVNode as X, Transition as W, withCtx as j, onMounted as J } from "vue";
2
- import { useNamespace as g } from "@xto/core";
1
+ import { defineComponent as V, useSlots as G, ref as _, watch as D, provide as x, computed as d, openBlock as r, createElementBlock as u, normalizeClass as o, createElementVNode as p, unref as c, Fragment as I, renderList as q, toDisplayString as H, renderSlot as b, inject as B, withDirectives as N, createCommentVNode as C, vShow as O, normalizeStyle as X, createTextVNode as w, createVNode as T, Transition as W, withCtx as j, onMounted as J } from "vue";
2
+ import { useNamespace as $ } from "@xto/core";
3
3
  const Q = ["onClick"], n0 = /* @__PURE__ */ V({
4
4
  name: "XTabs",
5
5
  __name: "index",
@@ -13,58 +13,58 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
13
13
  },
14
14
  emits: ["update:modelValue", "update:activeKey", "tabClick", "edit"],
15
15
  setup(s, { emit: n }) {
16
- const e = s, a = n, l = g("tabs"), t = G(), v = w(e.modelValue ?? e.activeKey ?? "");
17
- T([() => e.modelValue, () => e.activeKey], ([i, p]) => {
18
- const c = i ?? p;
19
- c !== void 0 && (v.value = c);
16
+ const e = s, a = n, l = $("tabs"), t = G(), v = _(e.modelValue ?? e.activeKey ?? "");
17
+ D([() => e.modelValue, () => e.activeKey], ([i, f]) => {
18
+ const m = i ?? f;
19
+ m !== void 0 && (v.value = m);
20
20
  });
21
- const z = (i, p) => {
21
+ const M = (i, f) => {
22
22
  v.value = i, a("update:modelValue", i), a("update:activeKey", i);
23
23
  };
24
- A("tabs", {
24
+ x("tabs", {
25
25
  props: e,
26
26
  activeName: v,
27
- handleTabClick: z
27
+ handleTabClick: M
28
28
  });
29
- const M = m(() => [
29
+ const z = d(() => [
30
30
  l.b(),
31
31
  l.m(e.type),
32
32
  l.is(`position-${e.tabPosition}`)
33
- ]), b = m(() => {
34
- var p;
35
- return (((p = t.default) == null ? void 0 : p.call(t)) || []).filter((c) => c.type && c.type.name === "XTabPane").map((c) => {
36
- var k, y, L, D, P, E, K;
33
+ ]), y = d(() => {
34
+ var f;
35
+ return (((f = t.default) == null ? void 0 : f.call(t)) || []).filter((m) => m.type && m.type.name === "XTabPane").map((m) => {
36
+ var h, k, g, A, P, E, K;
37
37
  return {
38
- name: ((k = c.props) == null ? void 0 : k.name) || ((y = c.props) == null ? void 0 : y.key) || ((L = c.props) == null ? void 0 : L.label) || ((D = c.props) == null ? void 0 : D.tab),
39
- label: ((P = c.props) == null ? void 0 : P.label) || ((E = c.props) == null ? void 0 : E.tab),
40
- disabled: ((K = c.props) == null ? void 0 : K.disabled) === !0
38
+ name: ((h = m.props) == null ? void 0 : h.name) || ((k = m.props) == null ? void 0 : k.key) || ((g = m.props) == null ? void 0 : g.label) || ((A = m.props) == null ? void 0 : A.tab),
39
+ label: ((P = m.props) == null ? void 0 : P.label) || ((E = m.props) == null ? void 0 : E.tab),
40
+ disabled: ((K = m.props) == null ? void 0 : K.disabled) === !0
41
41
  };
42
42
  });
43
43
  });
44
- return (i, p) => (u(), d("div", {
45
- class: o(M.value)
44
+ return (i, f) => (r(), u("div", {
45
+ class: o(z.value)
46
46
  }, [
47
- h("div", {
48
- class: o(r(l).e("header"))
47
+ p("div", {
48
+ class: o(c(l).e("header"))
49
49
  }, [
50
- h("div", {
51
- class: o(r(l).e("nav"))
50
+ p("div", {
51
+ class: o(c(l).e("nav"))
52
52
  }, [
53
- (u(!0), d(S, null, q(b.value, (c) => (u(), d("div", {
54
- key: c.name,
53
+ (r(!0), u(I, null, q(y.value, (m) => (r(), u("div", {
54
+ key: m.name,
55
55
  class: o([
56
- r(l).e("item"),
57
- r(l).em("item", v.value === c.name ? "active" : ""),
58
- r(l).is("disabled", c.disabled)
56
+ c(l).e("item"),
57
+ c(l).em("item", v.value === m.name ? "active" : ""),
58
+ c(l).is("disabled", m.disabled)
59
59
  ]),
60
- onClick: (k) => c.disabled ? null : z(c.name)
61
- }, H(c.label), 11, Q))), 128))
60
+ onClick: (h) => m.disabled ? null : M(m.name)
61
+ }, H(m.label), 11, Q))), 128))
62
62
  ], 2)
63
63
  ], 2),
64
- h("div", {
65
- class: o(r(l).e("content"))
64
+ p("div", {
65
+ class: o(c(l).e("content"))
66
66
  }, [
67
- f(i.$slots, "default")
67
+ b(i.$slots, "default")
68
68
  ], 2)
69
69
  ], 2));
70
70
  }
@@ -84,11 +84,11 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
84
84
  lazy: { type: Boolean, default: !1 }
85
85
  },
86
86
  setup(s) {
87
- const n = s, e = B("tabs"), a = w(!1), l = m(() => n.name || n.key || n.label || n.tab), t = m(() => (e == null ? void 0 : e.activeName.value) === l.value);
88
- return T(() => e == null ? void 0 : e.activeName.value, () => {
87
+ const n = s, e = B("tabs"), a = _(!1), l = d(() => n.name || n.key || n.label || n.tab), t = d(() => (e == null ? void 0 : e.activeName.value) === l.value);
88
+ return D(() => e == null ? void 0 : e.activeName.value, () => {
89
89
  t.value && n.lazy && !a.value && (a.value = !0);
90
- }, { immediate: !0 }), t.value && n.lazy && (a.value = !0), (v, z) => N((u(), d("div", U, [
91
- a.value || !s.lazy ? f(v.$slots, "default", { key: 0 }) : C("", !0)
90
+ }, { immediate: !0 }), t.value && n.lazy && (a.value = !0), (v, M) => N((r(), u("div", U, [
91
+ a.value || !s.lazy ? b(v.$slots, "default", { key: 0 }) : C("", !0)
92
92
  ], 512)), [
93
93
  [O, t.value]
94
94
  ]);
@@ -104,41 +104,51 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
104
104
  textColor: { default: "#303133" },
105
105
  activeTextColor: { default: "#409eff" },
106
106
  defaultOpeneds: { default: () => [] },
107
+ openeds: { default: void 0 },
107
108
  router: { type: Boolean }
108
109
  },
109
- emits: ["update:modelValue", "select", "open", "close"],
110
+ emits: ["update:modelValue", "update:openeds", "select", "open", "close"],
110
111
  setup(s, { emit: n }) {
111
- const e = s, a = n, l = g("menu"), t = w(e.modelValue), v = w([...e.defaultOpeneds]);
112
- T(() => e.modelValue, (c) => {
113
- t.value = c;
114
- }), A("menu", {
112
+ const e = s, a = n, l = $("menu"), t = _(e.modelValue), v = _([...e.defaultOpeneds]), M = d({
113
+ get: () => e.openeds ?? v.value,
114
+ set: (h) => {
115
+ v.value = h, a("update:openeds", h);
116
+ }
117
+ });
118
+ D(() => e.modelValue, (h) => {
119
+ t.value = h;
120
+ }), x("menu", {
115
121
  props: e,
116
122
  activeIndex: t,
117
- openedMenus: v,
118
- handleSelect: (c, k = []) => {
119
- t.value = c, a("update:modelValue", c), a("select", c, k);
123
+ openedMenus: M,
124
+ handleSelect: (h, k = []) => {
125
+ t.value = h, a("update:modelValue", h), a("select", h, k);
120
126
  },
121
- handleOpen: (c, k = []) => {
122
- v.value.includes(c) || v.value.push(c), a("open", c, k);
127
+ handleOpen: (h, k = []) => {
128
+ M.value.includes(h) || (M.value = [...M.value, h]), a("open", h, k);
123
129
  },
124
- handleClose: (c, k = []) => {
125
- const y = v.value.indexOf(c);
126
- y > -1 && v.value.splice(y, 1), a("close", c, k);
130
+ handleClose: (h, k = []) => {
131
+ const g = M.value.indexOf(h);
132
+ if (g > -1) {
133
+ const A = [...M.value];
134
+ A.splice(g, 1), M.value = A;
135
+ }
136
+ a("close", h, k);
127
137
  }
128
138
  });
129
- const i = m(() => [
139
+ const f = d(() => [
130
140
  l.b(),
131
141
  l.is("collapse", e.collapse),
132
142
  l.is(`mode-${e.mode}`)
133
- ]), p = m(() => ({
143
+ ]), m = d(() => ({
134
144
  backgroundColor: e.backgroundColor,
135
145
  color: e.textColor
136
146
  }));
137
- return (c, k) => (u(), d("ul", {
138
- class: o(i.value),
139
- style: I(p.value)
147
+ return (h, k) => (r(), u("ul", {
148
+ class: o(f.value),
149
+ style: X(m.value)
140
150
  }, [
141
- f(c.$slots, "default")
151
+ b(h.$slots, "default")
142
152
  ], 6));
143
153
  }
144
154
  }), F = {
@@ -280,21 +290,21 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
280
290
  strokeWidth: { default: 2 }
281
291
  },
282
292
  setup(s) {
283
- const n = s, e = g("icon"), a = m(() => typeof n.size == "number" ? `${n.size}px` : n.size), l = m(() => ({
293
+ const n = s, e = $("icon"), a = d(() => typeof n.size == "number" ? `${n.size}px` : n.size), l = d(() => ({
284
294
  width: a.value,
285
295
  height: a.value,
286
296
  color: n.color
287
- })), t = m(() => ({
297
+ })), t = d(() => ({
288
298
  strokeWidth: n.strokeWidth
289
- })), v = m(() => [
299
+ })), v = d(() => [
290
300
  e.b(),
291
301
  e.is("spin", n.spin)
292
- ]), z = m(() => n.name && Y(n.name) ? F[n.name] : "");
293
- return (M, b) => (u(), d("span", {
302
+ ]), M = d(() => n.name && Y(n.name) ? F[n.name] : "");
303
+ return (z, y) => (r(), u("span", {
294
304
  class: o(v.value),
295
- style: I(l.value)
305
+ style: X(l.value)
296
306
  }, [
297
- z.value ? (u(), d("svg", {
307
+ M.value ? (r(), u("svg", {
298
308
  key: 0,
299
309
  viewBox: "0 0 24 24",
300
310
  fill: "none",
@@ -302,15 +312,15 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
302
312
  "stroke-width": s.strokeWidth,
303
313
  "stroke-linecap": "round",
304
314
  "stroke-linejoin": "round",
305
- style: I(t.value)
315
+ style: X(t.value)
306
316
  }, [
307
- h("path", { d: z.value }, null, 8, e0)
308
- ], 12, Z)) : f(M.$slots, "default", { key: 1 }, () => [
309
- $(H(s.name), 1)
317
+ p("path", { d: M.value }, null, 8, e0)
318
+ ], 12, Z)) : b(z.$slots, "default", { key: 1 }, () => [
319
+ w(H(s.name), 1)
310
320
  ])
311
321
  ], 6));
312
322
  }
313
- }), x = "x-menu-item", r0 = /* @__PURE__ */ V({
323
+ }), S = "x-menu-item", r0 = /* @__PURE__ */ V({
314
324
  name: "XMenuItem",
315
325
  __name: "MenuItem",
316
326
  props: {
@@ -321,43 +331,43 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
321
331
  setup(s) {
322
332
  const n = s, e = B("menu");
323
333
  G();
324
- const a = m(() => (e == null ? void 0 : e.activeIndex.value) === n.index), l = m(() => e == null ? void 0 : e.props.collapse), t = m(() => (e == null ? void 0 : e.props.mode) === "horizontal"), v = m(() => [
325
- x,
334
+ const a = d(() => (e == null ? void 0 : e.activeIndex.value) === n.index), l = d(() => e == null ? void 0 : e.props.collapse), t = d(() => (e == null ? void 0 : e.props.mode) === "horizontal"), v = d(() => [
335
+ S,
326
336
  {
327
337
  "is-active": a.value,
328
338
  "is-disabled": n.disabled,
329
339
  "is-horizontal": t.value,
330
340
  "is-collapse": l.value
331
341
  }
332
- ]), z = m(() => a.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), M = () => {
342
+ ]), M = d(() => a.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), z = () => {
333
343
  n.disabled || n.index && (e == null || e.handleSelect(n.index, [n.index]));
334
344
  };
335
- return (b, i) => (u(), d("li", {
345
+ return (y, i) => (r(), u("li", {
336
346
  class: o(v.value),
337
- style: I(z.value),
338
- onClick: M
347
+ style: X(M.value),
348
+ onClick: z
339
349
  }, [
340
- h("div", {
341
- class: o(x + "__content")
350
+ p("div", {
351
+ class: o(S + "__content")
342
352
  }, [
343
- s.icon ? (u(), d("span", {
353
+ s.icon ? (r(), u("span", {
344
354
  key: 0,
345
- class: o(x + "__icon")
355
+ class: o(S + "__icon")
346
356
  }, [
347
- X(r(R), {
357
+ T(c(R), {
348
358
  name: s.icon,
349
359
  size: 18
350
360
  }, null, 8, ["name"])
351
- ], 2)) : b.$slots.icon ? (u(), d("span", {
361
+ ], 2)) : y.$slots.icon ? (r(), u("span", {
352
362
  key: 1,
353
- class: o(x + "__icon")
363
+ class: o(S + "__icon")
354
364
  }, [
355
- f(b.$slots, "icon")
365
+ b(y.$slots, "icon")
356
366
  ], 2)) : C("", !0),
357
- h("span", {
358
- class: o(x + "__text")
367
+ p("span", {
368
+ class: o(S + "__text")
359
369
  }, [
360
- f(b.$slots, "default")
370
+ b(y.$slots, "default")
361
371
  ], 2)
362
372
  ], 2)
363
373
  ], 6));
@@ -369,14 +379,14 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
369
379
  title: {}
370
380
  },
371
381
  setup(s) {
372
- return (n, e) => (u(), d("li", a0, [
373
- h("div", l0, H(s.title), 1),
374
- h("ul", null, [
375
- f(n.$slots, "default")
382
+ return (n, e) => (r(), u("li", a0, [
383
+ p("div", l0, H(s.title), 1),
384
+ p("ul", null, [
385
+ b(n.$slots, "default")
376
386
  ])
377
387
  ]));
378
388
  }
379
- }), _ = "x-sub-menu", d0 = /* @__PURE__ */ V({
389
+ }), L = "x-sub-menu", d0 = /* @__PURE__ */ V({
380
390
  name: "XSubMenu",
381
391
  __name: "SubMenu",
382
392
  props: {
@@ -386,70 +396,70 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
386
396
  icon: {}
387
397
  },
388
398
  setup(s) {
389
- const n = s, e = B("menu"), a = B("subMenu", null), l = w(!1), t = m(() => !!a), v = m(() => e == null ? void 0 : e.props.collapse), z = m(() => (e == null ? void 0 : e.activeIndex.value) === n.index), M = m(() => [
390
- _,
391
- _ + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
399
+ const n = s, e = B("menu"), a = B("subMenu", null), l = _(!1), t = d(() => !!a), v = d(() => e == null ? void 0 : e.props.collapse), M = d(() => (e == null ? void 0 : e.activeIndex.value) === n.index), z = d(() => [
400
+ L,
401
+ L + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
392
402
  {
393
- "is-active": z.value,
403
+ "is-active": M.value,
394
404
  "is-opened": l.value,
395
405
  "is-disabled": n.disabled,
396
406
  "is-nested": t.value,
397
407
  "is-collapse": v.value
398
408
  }
399
- ]), b = () => {
409
+ ]), y = () => {
400
410
  n.disabled || v.value || (l.value = !l.value);
401
411
  }, i = () => {
402
412
  n.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !0);
403
- }, p = () => {
413
+ }, f = () => {
404
414
  ((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !1);
405
415
  };
406
- return A("subMenu", {
416
+ return x("subMenu", {
407
417
  isOpen: l,
408
418
  isNested: t
409
- }), (c, k) => {
410
- var y;
411
- return u(), d("li", {
412
- class: o(M.value),
419
+ }), (m, h) => {
420
+ var k;
421
+ return r(), u("li", {
422
+ class: o(z.value),
413
423
  onMouseenter: i,
414
- onMouseleave: p
424
+ onMouseleave: f
415
425
  }, [
416
- h("div", {
417
- class: o(_ + "__title"),
418
- onClick: b
426
+ p("div", {
427
+ class: o(L + "__title"),
428
+ onClick: y
419
429
  }, [
420
- h("div", {
421
- class: o(_ + "__content")
430
+ p("div", {
431
+ class: o(L + "__content")
422
432
  }, [
423
- s.icon ? (u(), d("span", {
433
+ s.icon ? (r(), u("span", {
424
434
  key: 0,
425
- class: o(_ + "__icon")
435
+ class: o(L + "__icon")
426
436
  }, [
427
- X(r(R), {
437
+ T(c(R), {
428
438
  name: s.icon,
429
439
  size: 18
430
440
  }, null, 8, ["name"])
431
- ], 2)) : c.$slots.icon ? (u(), d("span", {
441
+ ], 2)) : m.$slots.icon ? (r(), u("span", {
432
442
  key: 1,
433
- class: o(_ + "__icon")
443
+ class: o(L + "__icon")
434
444
  }, [
435
- f(c.$slots, "icon")
445
+ b(m.$slots, "icon")
436
446
  ], 2)) : C("", !0),
437
- h("span", {
438
- class: o(_ + "__text")
447
+ p("span", {
448
+ class: o(L + "__text")
439
449
  }, [
440
- f(c.$slots, "title", {}, () => [
441
- $(H(s.title), 1)
450
+ b(m.$slots, "title", {}, () => [
451
+ w(H(s.title), 1)
442
452
  ])
443
453
  ], 2),
444
- h("span", {
445
- class: o([_ + "__arrow", { "is-open": l.value }])
446
- }, [...k[0] || (k[0] = [
447
- h("svg", {
454
+ p("span", {
455
+ class: o([L + "__arrow", { "is-open": l.value }])
456
+ }, [...h[0] || (h[0] = [
457
+ p("svg", {
448
458
  viewBox: "0 0 1024 1024",
449
459
  width: "12",
450
460
  height: "12"
451
461
  }, [
452
- h("path", {
462
+ p("path", {
453
463
  fill: "currentColor",
454
464
  d: "M512 714.667c-17.067 0-32-6.4-44.8-19.2L147.2 375.467c-25.6-25.6-25.6-64 0-89.6s64-25.6 89.6 0L512 561.067l275.2-275.2c25.6-25.6 64-25.6 89.6 0s25.6 64 0 89.6L556.8 695.467c-12.8 12.8-27.733 19.2-44.8 19.2z"
455
465
  })
@@ -457,16 +467,16 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
457
467
  ])], 2)
458
468
  ], 2)
459
469
  ], 2),
460
- X(W, {
461
- name: ((y = r(e)) == null ? void 0 : y.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
470
+ T(W, {
471
+ name: ((k = c(e)) == null ? void 0 : k.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
462
472
  }, {
463
473
  default: j(() => {
464
- var L;
474
+ var g;
465
475
  return [
466
- N(h("ul", {
467
- class: o([_ + "__menu", { "is-horizontal": ((L = r(e)) == null ? void 0 : L.props.mode) === "horizontal", "is-collapse": v.value }])
476
+ N(p("ul", {
477
+ class: o([L + "__menu", { "is-horizontal": ((g = c(e)) == null ? void 0 : g.props.mode) === "horizontal", "is-collapse": v.value }])
468
478
  }, [
469
- f(c.$slots, "default")
479
+ b(m.$slots, "default")
470
480
  ], 2), [
471
481
  [O, l.value]
472
482
  ])
@@ -485,20 +495,20 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
485
495
  separatorIcon: {}
486
496
  },
487
497
  setup(s) {
488
- const n = s, e = g("breadcrumb");
489
- A("breadcrumb", {
490
- separator: m(() => n.separator),
491
- separatorIcon: m(() => n.separatorIcon)
498
+ const n = s, e = $("breadcrumb");
499
+ x("breadcrumb", {
500
+ separator: d(() => n.separator),
501
+ separatorIcon: d(() => n.separatorIcon)
492
502
  });
493
- const a = m(() => [e.b()]);
494
- return (l, t) => (u(), d("nav", {
503
+ const a = d(() => [e.b()]);
504
+ return (l, t) => (r(), u("nav", {
495
505
  class: o(a.value),
496
506
  "aria-label": "Breadcrumb"
497
507
  }, [
498
- h("ol", {
499
- class: o(r(e).e("list"))
508
+ p("ol", {
509
+ class: o(c(e).e("list"))
500
510
  }, [
501
- f(l.$slots, "default")
511
+ b(l.$slots, "default")
502
512
  ], 2)
503
513
  ], 2));
504
514
  }
@@ -512,44 +522,44 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
512
522
  },
513
523
  emits: ["click"],
514
524
  setup(s, { emit: n }) {
515
- const e = s, a = n, l = g("breadcrumb"), t = B("breadcrumb"), v = m(() => [
525
+ const e = s, a = n, l = $("breadcrumb"), t = B("breadcrumb"), v = d(() => [
516
526
  l.e("item"),
517
527
  l.is("link", !!e.to && !e.disabled),
518
528
  l.is("disabled", e.disabled)
519
- ]), z = m(() => {
529
+ ]), M = d(() => {
520
530
  var i;
521
531
  return ((i = t == null ? void 0 : t.separator) == null ? void 0 : i.value) || "/";
522
- }), M = m(() => {
532
+ }), z = d(() => {
523
533
  var i;
524
534
  return (i = t == null ? void 0 : t.separatorIcon) == null ? void 0 : i.value;
525
- }), b = (i) => {
535
+ }), y = (i) => {
526
536
  e.disabled || (a("click", i), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
527
537
  };
528
- return (i, p) => (u(), d("li", {
538
+ return (i, f) => (r(), u("li", {
529
539
  class: o(v.value)
530
540
  }, [
531
- s.to && !s.disabled ? (u(), d("span", {
541
+ s.to && !s.disabled ? (r(), u("span", {
532
542
  key: 0,
533
- class: o(r(l).e("link")),
534
- onClick: b
543
+ class: o(c(l).e("link")),
544
+ onClick: y
535
545
  }, [
536
- f(i.$slots, "default")
537
- ], 2)) : (u(), d("span", {
546
+ b(i.$slots, "default")
547
+ ], 2)) : (r(), u("span", {
538
548
  key: 1,
539
- class: o(r(l).e("text")),
549
+ class: o(c(l).e("text")),
540
550
  "aria-current": s.disabled ? "page" : void 0
541
551
  }, [
542
- f(i.$slots, "default")
552
+ b(i.$slots, "default")
543
553
  ], 10, s0)),
544
- h("span", {
545
- class: o(r(l).e("separator")),
554
+ p("span", {
555
+ class: o(c(l).e("separator")),
546
556
  "aria-hidden": "true"
547
557
  }, [
548
- M.value ? (u(), d("span", {
558
+ z.value ? (r(), u("span", {
549
559
  key: 0,
550
- class: o(r(l).e("separator-icon"))
551
- }, H(M.value), 3)) : (u(), d(S, { key: 1 }, [
552
- $(H(z.value), 1)
560
+ class: o(c(l).e("separator-icon"))
561
+ }, H(z.value), 3)) : (r(), u(I, { key: 1 }, [
562
+ w(H(M.value), 1)
553
563
  ], 64))
554
564
  ], 2)
555
565
  ], 2));
@@ -568,33 +578,33 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
568
578
  },
569
579
  emits: ["change", "update:active"],
570
580
  setup(s, { emit: n }) {
571
- const e = s, a = n, l = g("steps"), t = w(e.active), v = w(0);
572
- T(() => e.active, (p) => {
573
- t.value = p;
574
- }), A("steps", {
581
+ const e = s, a = n, l = $("steps"), t = _(e.active), v = _(0);
582
+ D(() => e.active, (f) => {
583
+ t.value = f;
584
+ }), x("steps", {
575
585
  props: e,
576
586
  currentActive: t,
577
587
  stepCount: v,
578
- setCurrentActive: (p) => {
579
- t.value = p, a("change", p), a("update:active", p);
588
+ setCurrentActive: (f) => {
589
+ t.value = f, a("change", f), a("update:active", f);
580
590
  },
581
- setStepCount: (p) => {
582
- v.value = p;
591
+ setStepCount: (f) => {
592
+ v.value = f;
583
593
  }
584
594
  });
585
- const b = m(() => [
595
+ const y = d(() => [
586
596
  l.b(),
587
597
  l.m(e.direction),
588
598
  l.is("simple", e.simple),
589
599
  l.is("center", e.alignCenter)
590
- ]), i = m(() => e.space ? {
600
+ ]), i = d(() => e.space ? {
591
601
  "--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
592
602
  } : {});
593
- return (p, c) => (u(), d("div", {
594
- class: o(b.value),
595
- style: I(i.value)
603
+ return (f, m) => (r(), u("div", {
604
+ class: o(y.value),
605
+ style: X(i.value)
596
606
  }, [
597
- f(p.$slots, "default")
607
+ b(f.$slots, "default")
598
608
  ], 6));
599
609
  }
600
610
  }), p0 = /* @__PURE__ */ V({
@@ -607,27 +617,27 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
607
617
  status: {}
608
618
  },
609
619
  setup(s) {
610
- const n = s, e = g("step"), a = B("steps"), l = w(-1);
620
+ const n = s, e = $("step"), a = B("steps"), l = _(-1);
611
621
  J(() => {
612
622
  a && (l.value = a.stepCount.value, a.setStepCount(a.stepCount.value + 1));
613
623
  });
614
- const t = m(() => {
615
- var p, c, k;
624
+ const t = d(() => {
625
+ var f, m, h;
616
626
  if (n.status) return n.status;
617
- const i = ((p = a == null ? void 0 : a.currentActive) == null ? void 0 : p.value) ?? 0;
618
- return l.value < i ? ((c = a == null ? void 0 : a.props) == null ? void 0 : c.finishStatus) || "finish" : l.value === i ? ((k = a == null ? void 0 : a.props) == null ? void 0 : k.processStatus) || "process" : "wait";
619
- }), v = m(() => {
627
+ const i = ((f = a == null ? void 0 : a.currentActive) == null ? void 0 : f.value) ?? 0;
628
+ return l.value < i ? ((m = a == null ? void 0 : a.props) == null ? void 0 : m.finishStatus) || "finish" : l.value === i ? ((h = a == null ? void 0 : a.props) == null ? void 0 : h.processStatus) || "process" : "wait";
629
+ }), v = d(() => {
620
630
  var i;
621
631
  return l.value === (((i = a == null ? void 0 : a.stepCount) == null ? void 0 : i.value) || 0) - 1;
622
- }), z = m(() => l.value === 0);
623
- m(() => ({
632
+ }), M = d(() => l.value === 0);
633
+ d(() => ({
624
634
  wait: "#c0c4cc",
625
635
  process: "#409eff",
626
636
  finish: "#67c23a",
627
637
  error: "#f56c6c",
628
638
  success: "#67c23a"
629
639
  })[t.value] || "#c0c4cc");
630
- const M = m(() => {
640
+ const z = d(() => {
631
641
  var i;
632
642
  return [
633
643
  e.b(),
@@ -635,61 +645,61 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
635
645
  e.is("last", v.value),
636
646
  e.m(((i = a == null ? void 0 : a.props) == null ? void 0 : i.direction) || "horizontal")
637
647
  ];
638
- }), b = () => {
648
+ }), y = () => {
639
649
  var i;
640
650
  l.value > -1 && ((i = a == null ? void 0 : a.setCurrentActive) == null || i.call(a, l.value));
641
651
  };
642
- return (i, p) => (u(), d("div", {
643
- class: o(M.value),
644
- onClick: b
652
+ return (i, f) => (r(), u("div", {
653
+ class: o(z.value),
654
+ onClick: y
645
655
  }, [
646
- h("div", {
647
- class: o(r(e).e("head"))
656
+ p("div", {
657
+ class: o(c(e).e("head"))
648
658
  }, [
649
- z.value ? C("", !0) : (u(), d("div", {
659
+ M.value ? C("", !0) : (r(), u("div", {
650
660
  key: 0,
651
- class: o([r(e).e("line"), r(e).em("line", "prev")])
661
+ class: o([c(e).e("line"), c(e).em("line", "prev")])
652
662
  }, null, 2)),
653
- h("div", {
654
- class: o(r(e).e("icon"))
663
+ p("div", {
664
+ class: o(c(e).e("icon"))
655
665
  }, [
656
- s.icon ? (u(), d("span", {
666
+ s.icon ? (r(), u("span", {
657
667
  key: 0,
658
- class: o(r(e).e("icon-inner"))
659
- }, H(s.icon), 3)) : (u(), d("span", {
668
+ class: o(c(e).e("icon-inner"))
669
+ }, H(s.icon), 3)) : (r(), u("span", {
660
670
  key: 1,
661
- class: o(r(e).e("icon-inner"))
671
+ class: o(c(e).e("icon-inner"))
662
672
  }, [
663
- t.value === "finish" || t.value === "success" ? (u(), d(S, { key: 0 }, [
664
- $("✓")
665
- ], 64)) : t.value === "error" ? (u(), d(S, { key: 1 }, [
666
- $("✕")
667
- ], 64)) : (u(), d(S, { key: 2 }, [
668
- $(H(l.value + 1), 1)
673
+ t.value === "finish" || t.value === "success" ? (r(), u(I, { key: 0 }, [
674
+ w("✓")
675
+ ], 64)) : t.value === "error" ? (r(), u(I, { key: 1 }, [
676
+ w("✕")
677
+ ], 64)) : (r(), u(I, { key: 2 }, [
678
+ w(H(l.value + 1), 1)
669
679
  ], 64))
670
680
  ], 2))
671
681
  ], 2),
672
- v.value ? C("", !0) : (u(), d("div", {
682
+ v.value ? C("", !0) : (r(), u("div", {
673
683
  key: 1,
674
- class: o(r(e).e("line"))
684
+ class: o(c(e).e("line"))
675
685
  }, null, 2))
676
686
  ], 2),
677
- h("div", {
678
- class: o(r(e).e("content"))
687
+ p("div", {
688
+ class: o(c(e).e("content"))
679
689
  }, [
680
- h("div", {
681
- class: o(r(e).e("title"))
690
+ p("div", {
691
+ class: o(c(e).e("title"))
682
692
  }, [
683
- f(i.$slots, "title", {}, () => [
684
- $(H(s.title), 1)
693
+ b(i.$slots, "title", {}, () => [
694
+ w(H(s.title), 1)
685
695
  ])
686
696
  ], 2),
687
- s.description || i.$slots.description ? (u(), d("div", {
697
+ s.description || i.$slots.description ? (r(), u("div", {
688
698
  key: 0,
689
- class: o(r(e).e("description"))
699
+ class: o(c(e).e("description"))
690
700
  }, [
691
- f(i.$slots, "description", {}, () => [
692
- $(H(s.description), 1)
701
+ b(i.$slots, "description", {}, () => [
702
+ w(H(s.description), 1)
693
703
  ])
694
704
  ], 2)) : C("", !0)
695
705
  ], 2)
@@ -706,64 +716,64 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
706
716
  },
707
717
  emits: ["back"],
708
718
  setup(s, { emit: n }) {
709
- const e = n, a = g("page-header"), l = () => {
719
+ const e = n, a = $("page-header"), l = () => {
710
720
  e("back");
711
721
  };
712
- return (t, v) => (u(), d("div", {
713
- class: o(r(a).b())
722
+ return (t, v) => (r(), u("div", {
723
+ class: o(c(a).b())
714
724
  }, [
715
- h("div", {
716
- class: o(r(a).e("main"))
725
+ p("div", {
726
+ class: o(c(a).e("main"))
717
727
  }, [
718
- h("div", {
719
- class: o(r(a).e("left"))
728
+ p("div", {
729
+ class: o(c(a).e("left"))
720
730
  }, [
721
- s.showBack ? (u(), d("span", {
731
+ s.showBack ? (r(), u("span", {
722
732
  key: 0,
723
- class: o(r(a).e("back")),
733
+ class: o(c(a).e("back")),
724
734
  onClick: l
725
735
  }, [
726
- h("span", {
727
- class: o(r(a).e("back-icon"))
736
+ p("span", {
737
+ class: o(c(a).e("back-icon"))
728
738
  }, "←", 2),
729
- s.backText ? (u(), d("span", {
739
+ s.backText ? (r(), u("span", {
730
740
  key: 0,
731
- class: o(r(a).e("back-text"))
741
+ class: o(c(a).e("back-text"))
732
742
  }, H(s.backText), 3)) : C("", !0)
733
743
  ], 2)) : C("", !0),
734
- h("span", {
735
- class: o(r(a).e("title"))
744
+ p("span", {
745
+ class: o(c(a).e("title"))
736
746
  }, [
737
- f(t.$slots, "title", {}, () => [
738
- $(H(s.title), 1)
747
+ b(t.$slots, "title", {}, () => [
748
+ w(H(s.title), 1)
739
749
  ])
740
750
  ], 2),
741
- s.subtitle || t.$slots.subtitle ? (u(), d("span", {
751
+ s.subtitle || t.$slots.subtitle ? (r(), u("span", {
742
752
  key: 1,
743
- class: o(r(a).e("subtitle"))
753
+ class: o(c(a).e("subtitle"))
744
754
  }, [
745
- f(t.$slots, "subtitle", {}, () => [
746
- $(H(s.subtitle), 1)
755
+ b(t.$slots, "subtitle", {}, () => [
756
+ w(H(s.subtitle), 1)
747
757
  ])
748
758
  ], 2)) : C("", !0)
749
759
  ], 2),
750
- h("div", {
751
- class: o(r(a).e("extra"))
760
+ p("div", {
761
+ class: o(c(a).e("extra"))
752
762
  }, [
753
- f(t.$slots, "extra")
763
+ b(t.$slots, "extra")
754
764
  ], 2)
755
765
  ], 2),
756
- t.$slots.default ? (u(), d("div", {
766
+ t.$slots.default ? (r(), u("div", {
757
767
  key: 0,
758
- class: o(r(a).e("content"))
768
+ class: o(c(a).e("content"))
759
769
  }, [
760
- f(t.$slots, "default")
770
+ b(t.$slots, "default")
761
771
  ], 2)) : C("", !0),
762
- t.$slots.footer ? (u(), d("div", {
772
+ t.$slots.footer ? (r(), u("div", {
763
773
  key: 1,
764
- class: o(r(a).e("footer"))
774
+ class: o(c(a).e("footer"))
765
775
  }, [
766
- f(t.$slots, "footer")
776
+ b(t.$slots, "footer")
767
777
  ], 2)) : C("", !0)
768
778
  ], 2));
769
779
  }
@@ -779,46 +789,46 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
779
789
  },
780
790
  emits: ["visible-change", "click", "command"],
781
791
  setup(s, { emit: n }) {
782
- const e = s, a = n, l = g("dropdown"), t = w(e.visible || !1), v = w(), z = () => {
792
+ const e = s, a = n, l = $("dropdown"), t = _(e.visible || !1), v = _(), M = () => {
783
793
  e.disabled || (t.value = !0, a("visible-change", !0));
784
- }, M = () => {
794
+ }, z = () => {
785
795
  t.value = !1, a("visible-change", !1);
786
- }, b = () => {
787
- t.value ? M() : z();
796
+ }, y = () => {
797
+ t.value ? z() : M();
788
798
  };
789
- A("x-dropdown", {
799
+ x("x-dropdown", {
790
800
  visible: t,
791
- handleClick: (y) => {
792
- a("click", y), a("command", y), e.hideOnClick && M();
801
+ handleClick: (k) => {
802
+ a("click", k), a("command", k), e.hideOnClick && z();
793
803
  },
794
- hide: M
804
+ hide: z
795
805
  });
796
- const p = () => {
797
- e.trigger === "hover" && z();
798
- }, c = () => {
806
+ const f = () => {
799
807
  e.trigger === "hover" && M();
800
- }, k = (y) => {
801
- v.value && !v.value.contains(y.target) && M();
808
+ }, m = () => {
809
+ e.trigger === "hover" && z();
810
+ }, h = (k) => {
811
+ v.value && !v.value.contains(k.target) && z();
802
812
  };
803
- return typeof window < "u" && document.addEventListener("click", k), (y, L) => (u(), d("div", {
813
+ return typeof window < "u" && document.addEventListener("click", h), (k, g) => (r(), u("div", {
804
814
  ref_key: "dropdownRef",
805
815
  ref: v,
806
- class: o([r(l).b(), r(l).is("disabled", s.disabled)]),
807
- onMouseenter: p,
808
- onMouseleave: c
816
+ class: o([c(l).b(), c(l).is("disabled", s.disabled)]),
817
+ onMouseenter: f,
818
+ onMouseleave: m
809
819
  }, [
810
- h("div", {
811
- class: o(r(l).e("trigger")),
812
- onClick: L[0] || (L[0] = (D) => s.trigger === "click" && b())
820
+ p("div", {
821
+ class: o(c(l).e("trigger")),
822
+ onClick: g[0] || (g[0] = (A) => s.trigger === "click" && y())
813
823
  }, [
814
- f(y.$slots, "default")
824
+ b(k.$slots, "default")
815
825
  ], 2),
816
- X(W, { name: "x-dropdown-zoom" }, {
826
+ T(W, { name: "x-dropdown-zoom" }, {
817
827
  default: j(() => [
818
- N(h("div", {
819
- class: o([r(l).e("menu"), r(l).m(s.placement)])
828
+ N(p("div", {
829
+ class: o([c(l).e("menu"), c(l).m(s.placement)])
820
830
  }, [
821
- f(y.$slots, "dropdown")
831
+ b(k.$slots, "dropdown")
822
832
  ], 2), [
823
833
  [O, t.value]
824
834
  ])
@@ -831,11 +841,11 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
831
841
  name: "XDropdownMenu",
832
842
  __name: "DropdownMenu",
833
843
  setup(s) {
834
- const n = g("dropdown-menu");
835
- return (e, a) => (u(), d("ul", {
836
- class: o(r(n).b())
844
+ const n = $("dropdown-menu");
845
+ return (e, a) => (r(), u("ul", {
846
+ class: o(c(n).b())
837
847
  }, [
838
- f(e.$slots, "default")
848
+ b(e.$slots, "default")
839
849
  ], 2));
840
850
  }
841
851
  }), b0 = /* @__PURE__ */ V({
@@ -849,25 +859,25 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
849
859
  },
850
860
  emits: ["click"],
851
861
  setup(s, { emit: n }) {
852
- const e = s, a = n, l = g("dropdown-item"), t = B("x-dropdown"), v = (M) => {
853
- e.disabled || (a("click", M), t != null && t.handleClick && t.handleClick(e.command ?? M));
854
- }, z = m(() => [
862
+ const e = s, a = n, l = $("dropdown-item"), t = B("x-dropdown"), v = (z) => {
863
+ e.disabled || (a("click", z), t != null && t.handleClick && t.handleClick(e.command ?? z));
864
+ }, M = d(() => [
855
865
  l.b(),
856
866
  l.is("disabled", e.disabled),
857
867
  l.is("divided", e.divided)
858
868
  ]);
859
- return (M, b) => (u(), d("li", {
860
- class: o(z.value),
869
+ return (z, y) => (r(), u("li", {
870
+ class: o(M.value),
861
871
  onClick: v
862
872
  }, [
863
- s.icon ? (u(), d("span", {
873
+ s.icon ? (r(), u("span", {
864
874
  key: 0,
865
- class: o(r(l).e("icon"))
875
+ class: o(c(l).e("icon"))
866
876
  }, H(s.icon), 3)) : C("", !0),
867
- h("span", {
868
- class: o(r(l).e("content"))
877
+ p("span", {
878
+ class: o(c(l).e("content"))
869
879
  }, [
870
- f(M.$slots, "default")
880
+ b(z.$slots, "default")
871
881
  ], 2)
872
882
  ], 2));
873
883
  }