@xto/navigation 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.
package/es/index.mjs CHANGED
@@ -1,95 +1,99 @@
1
- import { defineComponent as y, useSlots as P, ref as _, watch as T, provide as I, computed as v, openBlock as u, createElementBlock as m, normalizeClass as s, createElementVNode as h, unref as r, Fragment as x, renderList as E, toDisplayString as k, renderSlot as p, inject as w, withDirectives as O, createCommentVNode as H, vShow as W, normalizeStyle as S, createTextVNode as C, createVNode as X, Transition as D, withCtx as F, onMounted as q } from "vue";
2
- import { useNamespace as L } from "@xto/core";
3
- const J = ["onClick"], s2 = /* @__PURE__ */ y({
1
+ import { defineComponent as V, useSlots as W, 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 j, withCtx as G, onMounted as J } from "vue";
2
+ import { useNamespace as g } from "@xto/core";
3
+ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
4
4
  name: "XTabs",
5
5
  __name: "index",
6
6
  props: {
7
- modelValue: { default: "" },
7
+ modelValue: { default: void 0 },
8
+ activeKey: { default: void 0 },
8
9
  type: { default: "line" },
9
10
  tabPosition: { default: "top" },
10
11
  addable: { type: Boolean, default: !1 },
11
12
  closable: { type: Boolean, default: !1 }
12
13
  },
13
- emits: ["update:modelValue", "tabClick", "edit"],
14
- setup(t, { emit: n }) {
15
- const a = t, e = n, l = L("tabs"), o = P(), d = _(a.modelValue);
16
- T(() => a.modelValue, (c) => {
17
- d.value = c;
14
+ emits: ["update:modelValue", "update:activeKey", "tabClick", "edit"],
15
+ setup(s, { emit: n }) {
16
+ const e = s, a = n, l = g("tabs"), t = W(), 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);
18
20
  });
19
- const f = (c, M) => {
20
- d.value = c, e("update:modelValue", c);
21
+ const z = (i, p) => {
22
+ v.value = i, a("update:modelValue", i), a("update:activeKey", i);
21
23
  };
22
- I("tabs", {
23
- props: a,
24
- activeName: d,
25
- handleTabClick: f
24
+ A("tabs", {
25
+ props: e,
26
+ activeName: v,
27
+ handleTabClick: z
26
28
  });
27
- const V = v(() => [
29
+ const M = m(() => [
28
30
  l.b(),
29
- l.m(a.type),
30
- l.is(`position-${a.tabPosition}`)
31
- ]), b = v(() => {
32
- var M;
33
- return (((M = o.default) == null ? void 0 : M.call(o)) || []).filter((i) => i.type && i.type.name === "XTabPane").map((i) => {
34
- var z, g, A, N;
31
+ l.m(e.type),
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;
35
37
  return {
36
- name: ((z = i.props) == null ? void 0 : z.name) || ((g = i.props) == null ? void 0 : g.label),
37
- label: (A = i.props) == null ? void 0 : A.label,
38
- disabled: ((N = i.props) == null ? void 0 : N.disabled) === !0
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
39
41
  };
40
42
  });
41
43
  });
42
- return (c, M) => (u(), m("div", {
43
- class: s(V.value)
44
+ return (i, p) => (u(), d("div", {
45
+ class: o(M.value)
44
46
  }, [
45
47
  h("div", {
46
- class: s(r(l).e("header"))
48
+ class: o(r(l).e("header"))
47
49
  }, [
48
50
  h("div", {
49
- class: s(r(l).e("nav"))
51
+ class: o(r(l).e("nav"))
50
52
  }, [
51
- (u(!0), m(x, null, E(b.value, (i) => (u(), m("div", {
52
- key: i.name,
53
- class: s([
53
+ (u(!0), d(S, null, q(b.value, (c) => (u(), d("div", {
54
+ key: c.name,
55
+ class: o([
54
56
  r(l).e("item"),
55
- r(l).em("item", d.value === i.name ? "active" : ""),
56
- r(l).is("disabled", i.disabled)
57
+ r(l).em("item", v.value === c.name ? "active" : ""),
58
+ r(l).is("disabled", c.disabled)
57
59
  ]),
58
- onClick: (z) => i.disabled ? null : f(i.name)
59
- }, k(i.label), 11, J))), 128))
60
+ onClick: (k) => c.disabled ? null : z(c.name)
61
+ }, H(c.label), 11, Q))), 128))
60
62
  ], 2)
61
63
  ], 2),
62
64
  h("div", {
63
- class: s(r(l).e("content"))
65
+ class: o(r(l).e("content"))
64
66
  }, [
65
- p(c.$slots, "default")
67
+ f(i.$slots, "default")
66
68
  ], 2)
67
69
  ], 2));
68
70
  }
69
- }), K = {
71
+ }), U = {
70
72
  class: "x-tab-pane",
71
73
  role: "tabpanel"
72
- }, t2 = /* @__PURE__ */ y({
74
+ }, c0 = /* @__PURE__ */ V({
73
75
  name: "XTabPane",
74
76
  __name: "TabPane",
75
77
  props: {
76
78
  label: {},
79
+ tab: {},
77
80
  name: {},
81
+ key: {},
78
82
  disabled: { type: Boolean, default: !1 },
79
83
  closable: { type: Boolean, default: !1 },
80
84
  lazy: { type: Boolean, default: !1 }
81
85
  },
82
- setup(t) {
83
- const n = t, a = w("tabs"), e = _(!1), l = v(() => n.name || n.label), o = v(() => (a == null ? void 0 : a.activeName.value) === l.value);
84
- return T(() => a == null ? void 0 : a.activeName.value, () => {
85
- o.value && n.lazy && !e.value && (e.value = !0);
86
- }, { immediate: !0 }), o.value && n.lazy && (e.value = !0), (d, f) => O((u(), m("div", K, [
87
- e.value || !t.lazy ? p(d.$slots, "default", { key: 0 }) : H("", !0)
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, () => {
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)
88
92
  ], 512)), [
89
- [W, o.value]
93
+ [O, t.value]
90
94
  ]);
91
95
  }
92
- }), o2 = /* @__PURE__ */ y({
96
+ }), i0 = /* @__PURE__ */ V({
93
97
  name: "XMenu",
94
98
  __name: "index",
95
99
  props: {
@@ -103,41 +107,41 @@ const J = ["onClick"], s2 = /* @__PURE__ */ y({
103
107
  router: { type: Boolean }
104
108
  },
105
109
  emits: ["update:modelValue", "select", "open", "close"],
106
- setup(t, { emit: n }) {
107
- const a = t, e = n, l = L("menu"), o = _(a.modelValue), d = _([...a.defaultOpeneds]);
108
- T(() => a.modelValue, (i) => {
109
- o.value = i;
110
- }), I("menu", {
111
- props: a,
112
- activeIndex: o,
113
- openedMenus: d,
114
- handleSelect: (i, z = []) => {
115
- o.value = i, e("update:modelValue", i), e("select", i, z);
110
+ 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", {
115
+ props: e,
116
+ activeIndex: t,
117
+ openedMenus: v,
118
+ handleSelect: (c, k = []) => {
119
+ t.value = c, a("update:modelValue", c), a("select", c, k);
116
120
  },
117
- handleOpen: (i, z = []) => {
118
- d.value.includes(i) || d.value.push(i), e("open", i, z);
121
+ handleOpen: (c, k = []) => {
122
+ v.value.includes(c) || v.value.push(c), a("open", c, k);
119
123
  },
120
- handleClose: (i, z = []) => {
121
- const g = d.value.indexOf(i);
122
- g > -1 && d.value.splice(g, 1), e("close", i, z);
124
+ handleClose: (c, k = []) => {
125
+ const y = v.value.indexOf(c);
126
+ y > -1 && v.value.splice(y, 1), a("close", c, k);
123
127
  }
124
128
  });
125
- const c = v(() => [
129
+ const i = m(() => [
126
130
  l.b(),
127
- l.is("collapse", a.collapse),
128
- l.is(`mode-${a.mode}`)
129
- ]), M = v(() => ({
130
- backgroundColor: a.backgroundColor,
131
- color: a.textColor
131
+ l.is("collapse", e.collapse),
132
+ l.is(`mode-${e.mode}`)
133
+ ]), p = m(() => ({
134
+ backgroundColor: e.backgroundColor,
135
+ color: e.textColor
132
136
  }));
133
- return (i, z) => (u(), m("ul", {
134
- class: s(c.value),
135
- style: S(M.value)
137
+ return (c, k) => (u(), d("ul", {
138
+ class: o(i.value),
139
+ style: I(p.value)
136
140
  }, [
137
- p(i.$slots, "default")
141
+ f(c.$slots, "default")
138
142
  ], 6));
139
143
  }
140
- }), G = {
144
+ }), F = {
141
145
  // 箭头类
142
146
  "arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
143
147
  "arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
@@ -240,6 +244,7 @@ const J = ["onClick"], s2 = /* @__PURE__ */ y({
240
244
  list: "M4 6h16M4 10h16M4 14h16M4 18h16",
241
245
  grid: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",
242
246
  fullscreen: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",
247
+ "fullscreen-exit": "M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5",
243
248
  "zoom-in": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7",
244
249
  "zoom-out": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",
245
250
  print: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",
@@ -250,12 +255,17 @@ const J = ["onClick"], s2 = /* @__PURE__ */ y({
250
255
  database: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",
251
256
  server: "M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",
252
257
  cloud: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
253
- gift: "M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7"
258
+ gift: "M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",
259
+ // 主题类
260
+ moon: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",
261
+ sun: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
262
+ theme: "M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",
263
+ skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z"
254
264
  };
255
- function Q(t) {
256
- return t in G;
265
+ function Y(s) {
266
+ return s in F;
257
267
  }
258
- const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
268
+ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
259
269
  name: "XIcon",
260
270
  __name: "index",
261
271
  props: {
@@ -265,38 +275,38 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
265
275
  spin: { type: Boolean, default: !1 },
266
276
  strokeWidth: { default: 2 }
267
277
  },
268
- setup(t) {
269
- const n = t, a = L("icon"), e = v(() => typeof n.size == "number" ? `${n.size}px` : n.size), l = v(() => ({
270
- width: e.value,
271
- height: e.value,
278
+ setup(s) {
279
+ const n = s, e = g("icon"), a = m(() => typeof n.size == "number" ? `${n.size}px` : n.size), l = m(() => ({
280
+ width: a.value,
281
+ height: a.value,
272
282
  color: n.color
273
- })), o = v(() => ({
283
+ })), t = m(() => ({
274
284
  strokeWidth: n.strokeWidth
275
- })), d = v(() => [
276
- a.b(),
277
- a.is("spin", n.spin)
278
- ]), f = v(() => n.name && Q(n.name) ? G[n.name] : "");
279
- return (V, b) => (u(), m("span", {
280
- class: s(d.value),
281
- style: S(l.value)
285
+ })), v = m(() => [
286
+ e.b(),
287
+ e.is("spin", n.spin)
288
+ ]), z = m(() => n.name && Y(n.name) ? F[n.name] : "");
289
+ return (M, b) => (u(), d("span", {
290
+ class: o(v.value),
291
+ style: I(l.value)
282
292
  }, [
283
- f.value ? (u(), m("svg", {
293
+ z.value ? (u(), d("svg", {
284
294
  key: 0,
285
295
  viewBox: "0 0 24 24",
286
296
  fill: "none",
287
297
  stroke: "currentColor",
288
- "stroke-width": t.strokeWidth,
298
+ "stroke-width": s.strokeWidth,
289
299
  "stroke-linecap": "round",
290
300
  "stroke-linejoin": "round",
291
- style: S(o.value)
301
+ style: I(t.value)
292
302
  }, [
293
- h("path", { d: f.value }, null, 8, U)
294
- ], 12, R)) : p(V.$slots, "default", { key: 1 }, () => [
295
- C(k(t.name), 1)
303
+ h("path", { d: z.value }, null, 8, e0)
304
+ ], 12, Z)) : f(M.$slots, "default", { key: 1 }, () => [
305
+ $(H(s.name), 1)
296
306
  ])
297
307
  ], 6));
298
308
  }
299
- }), B = "x-menu-item", n2 = /* @__PURE__ */ y({
309
+ }), x = "x-menu-item", r0 = /* @__PURE__ */ V({
300
310
  name: "XMenuItem",
301
311
  __name: "MenuItem",
302
312
  props: {
@@ -304,65 +314,65 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
304
314
  disabled: { type: Boolean, default: !1 },
305
315
  icon: {}
306
316
  },
307
- setup(t) {
308
- const n = t, a = w("menu");
309
- P();
310
- const e = v(() => (a == null ? void 0 : a.activeIndex.value) === n.index), l = v(() => a == null ? void 0 : a.props.collapse), o = v(() => (a == null ? void 0 : a.props.mode) === "horizontal"), d = v(() => [
311
- B,
317
+ setup(s) {
318
+ const n = s, e = B("menu");
319
+ W();
320
+ 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(() => [
321
+ x,
312
322
  {
313
- "is-active": e.value,
323
+ "is-active": a.value,
314
324
  "is-disabled": n.disabled,
315
- "is-horizontal": o.value,
325
+ "is-horizontal": t.value,
316
326
  "is-collapse": l.value
317
327
  }
318
- ]), f = v(() => e.value && (a != null && a.props.activeTextColor) ? { color: a.props.activeTextColor } : {}), V = () => {
319
- n.disabled || n.index && (a == null || a.handleSelect(n.index, [n.index]));
328
+ ]), z = m(() => a.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), M = () => {
329
+ n.disabled || n.index && (e == null || e.handleSelect(n.index, [n.index]));
320
330
  };
321
- return (b, c) => (u(), m("li", {
322
- class: s(d.value),
323
- style: S(f.value),
324
- onClick: V
331
+ return (b, i) => (u(), d("li", {
332
+ class: o(v.value),
333
+ style: I(z.value),
334
+ onClick: M
325
335
  }, [
326
336
  h("div", {
327
- class: s(B + "__content")
337
+ class: o(x + "__content")
328
338
  }, [
329
- t.icon ? (u(), m("span", {
339
+ s.icon ? (u(), d("span", {
330
340
  key: 0,
331
- class: s(B + "__icon")
341
+ class: o(x + "__icon")
332
342
  }, [
333
- X(r(j), {
334
- name: t.icon,
343
+ X(r(R), {
344
+ name: s.icon,
335
345
  size: 18
336
346
  }, null, 8, ["name"])
337
- ], 2)) : b.$slots.icon ? (u(), m("span", {
347
+ ], 2)) : b.$slots.icon ? (u(), d("span", {
338
348
  key: 1,
339
- class: s(B + "__icon")
349
+ class: o(x + "__icon")
340
350
  }, [
341
- p(b.$slots, "icon")
342
- ], 2)) : H("", !0),
351
+ f(b.$slots, "icon")
352
+ ], 2)) : C("", !0),
343
353
  h("span", {
344
- class: s(B + "__text")
354
+ class: o(x + "__text")
345
355
  }, [
346
- p(b.$slots, "default")
356
+ f(b.$slots, "default")
347
357
  ], 2)
348
358
  ], 2)
349
359
  ], 6));
350
360
  }
351
- }), Y = { class: "x-menu-item-group" }, Z = { class: "x-menu-item-group__title" }, c2 = /* @__PURE__ */ y({
361
+ }), a0 = { class: "x-menu-item-group" }, l0 = { class: "x-menu-item-group__title" }, u0 = /* @__PURE__ */ V({
352
362
  name: "XMenuItemGroup",
353
363
  __name: "MenuItemGroup",
354
364
  props: {
355
365
  title: {}
356
366
  },
357
- setup(t) {
358
- return (n, a) => (u(), m("li", Y, [
359
- h("div", Z, k(t.title), 1),
367
+ setup(s) {
368
+ return (n, e) => (u(), d("li", a0, [
369
+ h("div", l0, H(s.title), 1),
360
370
  h("ul", null, [
361
- p(n.$slots, "default")
371
+ f(n.$slots, "default")
362
372
  ])
363
373
  ]));
364
374
  }
365
- }), $ = "x-sub-menu", i2 = /* @__PURE__ */ y({
375
+ }), _ = "x-sub-menu", d0 = /* @__PURE__ */ V({
366
376
  name: "XSubMenu",
367
377
  __name: "SubMenu",
368
378
  props: {
@@ -371,65 +381,65 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
371
381
  disabled: { type: Boolean, default: !1 },
372
382
  icon: {}
373
383
  },
374
- setup(t) {
375
- const n = t, a = w("menu"), e = w("subMenu", null), l = _(!1), o = v(() => !!e), d = v(() => a == null ? void 0 : a.props.collapse), f = v(() => (a == null ? void 0 : a.activeIndex.value) === n.index), V = v(() => [
376
- $,
377
- $ + ((a == null ? void 0 : a.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
384
+ setup(s) {
385
+ 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(() => [
386
+ _,
387
+ _ + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
378
388
  {
379
- "is-active": f.value,
389
+ "is-active": z.value,
380
390
  "is-opened": l.value,
381
391
  "is-disabled": n.disabled,
382
- "is-nested": o.value,
383
- "is-collapse": d.value
392
+ "is-nested": t.value,
393
+ "is-collapse": v.value
384
394
  }
385
395
  ]), b = () => {
386
- n.disabled || d.value || (l.value = !l.value);
387
- }, c = () => {
388
- n.disabled || ((a == null ? void 0 : a.props.mode) === "horizontal" || d.value) && (l.value = !0);
389
- }, M = () => {
390
- ((a == null ? void 0 : a.props.mode) === "horizontal" || d.value) && (l.value = !1);
396
+ n.disabled || v.value || (l.value = !l.value);
397
+ }, i = () => {
398
+ n.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !0);
399
+ }, p = () => {
400
+ ((e == null ? void 0 : e.props.mode) === "horizontal" || v.value) && (l.value = !1);
391
401
  };
392
- return I("subMenu", {
402
+ return A("subMenu", {
393
403
  isOpen: l,
394
- isNested: o
395
- }), (i, z) => {
396
- var g;
397
- return u(), m("li", {
398
- class: s(V.value),
399
- onMouseenter: c,
400
- onMouseleave: M
404
+ isNested: t
405
+ }), (c, k) => {
406
+ var y;
407
+ return u(), d("li", {
408
+ class: o(M.value),
409
+ onMouseenter: i,
410
+ onMouseleave: p
401
411
  }, [
402
412
  h("div", {
403
- class: s($ + "__title"),
413
+ class: o(_ + "__title"),
404
414
  onClick: b
405
415
  }, [
406
416
  h("div", {
407
- class: s($ + "__content")
417
+ class: o(_ + "__content")
408
418
  }, [
409
- t.icon ? (u(), m("span", {
419
+ s.icon ? (u(), d("span", {
410
420
  key: 0,
411
- class: s($ + "__icon")
421
+ class: o(_ + "__icon")
412
422
  }, [
413
- X(r(j), {
414
- name: t.icon,
423
+ X(r(R), {
424
+ name: s.icon,
415
425
  size: 18
416
426
  }, null, 8, ["name"])
417
- ], 2)) : i.$slots.icon ? (u(), m("span", {
427
+ ], 2)) : c.$slots.icon ? (u(), d("span", {
418
428
  key: 1,
419
- class: s($ + "__icon")
429
+ class: o(_ + "__icon")
420
430
  }, [
421
- p(i.$slots, "icon")
422
- ], 2)) : H("", !0),
431
+ f(c.$slots, "icon")
432
+ ], 2)) : C("", !0),
423
433
  h("span", {
424
- class: s($ + "__text")
434
+ class: o(_ + "__text")
425
435
  }, [
426
- p(i.$slots, "title", {}, () => [
427
- C(k(t.title), 1)
436
+ f(c.$slots, "title", {}, () => [
437
+ $(H(s.title), 1)
428
438
  ])
429
439
  ], 2),
430
440
  h("span", {
431
- class: s([$ + "__arrow", { "is-open": l.value }])
432
- }, [...z[0] || (z[0] = [
441
+ class: o([_ + "__arrow", { "is-open": l.value }])
442
+ }, [...k[0] || (k[0] = [
433
443
  h("svg", {
434
444
  viewBox: "0 0 1024 1024",
435
445
  width: "12",
@@ -443,18 +453,18 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
443
453
  ])], 2)
444
454
  ], 2)
445
455
  ], 2),
446
- X(D, {
447
- name: ((g = r(a)) == null ? void 0 : g.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
456
+ X(j, {
457
+ name: ((y = r(e)) == null ? void 0 : y.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
448
458
  }, {
449
- default: F(() => {
450
- var A;
459
+ default: G(() => {
460
+ var L;
451
461
  return [
452
- O(h("ul", {
453
- class: s([$ + "__menu", { "is-horizontal": ((A = r(a)) == null ? void 0 : A.props.mode) === "horizontal", "is-collapse": d.value }])
462
+ N(h("ul", {
463
+ class: o([_ + "__menu", { "is-horizontal": ((L = r(e)) == null ? void 0 : L.props.mode) === "horizontal", "is-collapse": v.value }])
454
464
  }, [
455
- p(i.$slots, "default")
465
+ f(c.$slots, "default")
456
466
  ], 2), [
457
- [W, l.value]
467
+ [O, l.value]
458
468
  ])
459
469
  ];
460
470
  }),
@@ -463,32 +473,32 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
463
473
  ], 34);
464
474
  };
465
475
  }
466
- }), r2 = /* @__PURE__ */ y({
476
+ }), v0 = /* @__PURE__ */ V({
467
477
  name: "XBreadcrumb",
468
478
  __name: "index",
469
479
  props: {
470
480
  separator: { default: "/" },
471
481
  separatorIcon: {}
472
482
  },
473
- setup(t) {
474
- const n = t, a = L("breadcrumb");
475
- I("breadcrumb", {
476
- separator: v(() => n.separator),
477
- separatorIcon: v(() => n.separatorIcon)
483
+ setup(s) {
484
+ const n = s, e = g("breadcrumb");
485
+ A("breadcrumb", {
486
+ separator: m(() => n.separator),
487
+ separatorIcon: m(() => n.separatorIcon)
478
488
  });
479
- const e = v(() => [a.b()]);
480
- return (l, o) => (u(), m("nav", {
481
- class: s(e.value),
489
+ const a = m(() => [e.b()]);
490
+ return (l, t) => (u(), d("nav", {
491
+ class: o(a.value),
482
492
  "aria-label": "Breadcrumb"
483
493
  }, [
484
494
  h("ol", {
485
- class: s(r(a).e("list"))
495
+ class: o(r(e).e("list"))
486
496
  }, [
487
- p(l.$slots, "default")
497
+ f(l.$slots, "default")
488
498
  ], 2)
489
499
  ], 2));
490
500
  }
491
- }), a2 = ["aria-current"], u2 = /* @__PURE__ */ y({
501
+ }), s0 = ["aria-current"], m0 = /* @__PURE__ */ V({
492
502
  name: "XBreadcrumbItem",
493
503
  __name: "BreadcrumbItem",
494
504
  props: {
@@ -497,50 +507,50 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
497
507
  disabled: { type: Boolean }
498
508
  },
499
509
  emits: ["click"],
500
- setup(t, { emit: n }) {
501
- const a = t, e = n, l = L("breadcrumb"), o = w("breadcrumb"), d = v(() => [
510
+ setup(s, { emit: n }) {
511
+ const e = s, a = n, l = g("breadcrumb"), t = B("breadcrumb"), v = m(() => [
502
512
  l.e("item"),
503
- l.is("link", !!a.to && !a.disabled),
504
- l.is("disabled", a.disabled)
505
- ]), f = v(() => {
506
- var c;
507
- return ((c = o == null ? void 0 : o.separator) == null ? void 0 : c.value) || "/";
508
- }), V = v(() => {
509
- var c;
510
- return (c = o == null ? void 0 : o.separatorIcon) == null ? void 0 : c.value;
511
- }), b = (c) => {
512
- a.disabled || (e("click", c), a.to && typeof a.to == "string" && (a.replace ? window.location.replace(a.to) : window.location.href = a.to));
513
+ l.is("link", !!e.to && !e.disabled),
514
+ l.is("disabled", e.disabled)
515
+ ]), z = m(() => {
516
+ var i;
517
+ return ((i = t == null ? void 0 : t.separator) == null ? void 0 : i.value) || "/";
518
+ }), M = m(() => {
519
+ var i;
520
+ return (i = t == null ? void 0 : t.separatorIcon) == null ? void 0 : i.value;
521
+ }), b = (i) => {
522
+ e.disabled || (a("click", i), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
513
523
  };
514
- return (c, M) => (u(), m("li", {
515
- class: s(d.value)
524
+ return (i, p) => (u(), d("li", {
525
+ class: o(v.value)
516
526
  }, [
517
- t.to && !t.disabled ? (u(), m("span", {
527
+ s.to && !s.disabled ? (u(), d("span", {
518
528
  key: 0,
519
- class: s(r(l).e("link")),
529
+ class: o(r(l).e("link")),
520
530
  onClick: b
521
531
  }, [
522
- p(c.$slots, "default")
523
- ], 2)) : (u(), m("span", {
532
+ f(i.$slots, "default")
533
+ ], 2)) : (u(), d("span", {
524
534
  key: 1,
525
- class: s(r(l).e("text")),
526
- "aria-current": t.disabled ? "page" : void 0
535
+ class: o(r(l).e("text")),
536
+ "aria-current": s.disabled ? "page" : void 0
527
537
  }, [
528
- p(c.$slots, "default")
529
- ], 10, a2)),
538
+ f(i.$slots, "default")
539
+ ], 10, s0)),
530
540
  h("span", {
531
- class: s(r(l).e("separator")),
541
+ class: o(r(l).e("separator")),
532
542
  "aria-hidden": "true"
533
543
  }, [
534
- V.value ? (u(), m("span", {
544
+ M.value ? (u(), d("span", {
535
545
  key: 0,
536
- class: s(r(l).e("separator-icon"))
537
- }, k(V.value), 3)) : (u(), m(x, { key: 1 }, [
538
- C(k(f.value), 1)
546
+ class: o(r(l).e("separator-icon"))
547
+ }, H(M.value), 3)) : (u(), d(S, { key: 1 }, [
548
+ $(H(z.value), 1)
539
549
  ], 64))
540
550
  ], 2)
541
551
  ], 2));
542
552
  }
543
- }), m2 = /* @__PURE__ */ y({
553
+ }), h0 = /* @__PURE__ */ V({
544
554
  name: "XSteps",
545
555
  __name: "index",
546
556
  props: {
@@ -553,37 +563,37 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
553
563
  space: {}
554
564
  },
555
565
  emits: ["change", "update:active"],
556
- setup(t, { emit: n }) {
557
- const a = t, e = n, l = L("steps"), o = _(a.active), d = _(0);
558
- T(() => a.active, (M) => {
559
- o.value = M;
560
- }), I("steps", {
561
- props: a,
562
- currentActive: o,
563
- stepCount: d,
564
- setCurrentActive: (M) => {
565
- o.value = M, e("change", M), e("update:active", M);
566
+ setup(s, { emit: n }) {
567
+ const e = s, a = n, l = g("steps"), t = w(e.active), v = w(0);
568
+ T(() => e.active, (p) => {
569
+ t.value = p;
570
+ }), A("steps", {
571
+ props: e,
572
+ currentActive: t,
573
+ stepCount: v,
574
+ setCurrentActive: (p) => {
575
+ t.value = p, a("change", p), a("update:active", p);
566
576
  },
567
- setStepCount: (M) => {
568
- d.value = M;
577
+ setStepCount: (p) => {
578
+ v.value = p;
569
579
  }
570
580
  });
571
- const b = v(() => [
581
+ const b = m(() => [
572
582
  l.b(),
573
- l.m(a.direction),
574
- l.is("simple", a.simple),
575
- l.is("center", a.alignCenter)
576
- ]), c = v(() => a.space ? {
577
- "--steps-space": typeof a.space == "number" ? `${a.space}px` : a.space
583
+ l.m(e.direction),
584
+ l.is("simple", e.simple),
585
+ l.is("center", e.alignCenter)
586
+ ]), i = m(() => e.space ? {
587
+ "--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
578
588
  } : {});
579
- return (M, i) => (u(), m("div", {
580
- class: s(b.value),
581
- style: S(c.value)
589
+ return (p, c) => (u(), d("div", {
590
+ class: o(b.value),
591
+ style: I(i.value)
582
592
  }, [
583
- p(M.$slots, "default")
593
+ f(p.$slots, "default")
584
594
  ], 6));
585
595
  }
586
- }), v2 = /* @__PURE__ */ y({
596
+ }), p0 = /* @__PURE__ */ V({
587
597
  name: "XStep",
588
598
  __name: "Step",
589
599
  props: {
@@ -592,96 +602,96 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
592
602
  icon: {},
593
603
  status: {}
594
604
  },
595
- setup(t) {
596
- const n = t, a = L("step"), e = w("steps"), l = _(-1);
597
- q(() => {
598
- e && (l.value = e.stepCount.value, e.setStepCount(e.stepCount.value + 1));
605
+ setup(s) {
606
+ const n = s, e = g("step"), a = B("steps"), l = w(-1);
607
+ J(() => {
608
+ a && (l.value = a.stepCount.value, a.setStepCount(a.stepCount.value + 1));
599
609
  });
600
- const o = v(() => {
601
- var M, i, z;
610
+ const t = m(() => {
611
+ var p, c, k;
602
612
  if (n.status) return n.status;
603
- const c = ((M = e == null ? void 0 : e.currentActive) == null ? void 0 : M.value) ?? 0;
604
- return l.value < c ? ((i = e == null ? void 0 : e.props) == null ? void 0 : i.finishStatus) || "finish" : l.value === c ? ((z = e == null ? void 0 : e.props) == null ? void 0 : z.processStatus) || "process" : "wait";
605
- }), d = v(() => {
606
- var c;
607
- return l.value === (((c = e == null ? void 0 : e.stepCount) == null ? void 0 : c.value) || 0) - 1;
608
- }), f = v(() => l.value === 0);
609
- v(() => ({
613
+ const i = ((p = a == null ? void 0 : a.currentActive) == null ? void 0 : p.value) ?? 0;
614
+ 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";
615
+ }), v = m(() => {
616
+ var i;
617
+ return l.value === (((i = a == null ? void 0 : a.stepCount) == null ? void 0 : i.value) || 0) - 1;
618
+ }), z = m(() => l.value === 0);
619
+ m(() => ({
610
620
  wait: "#c0c4cc",
611
621
  process: "#409eff",
612
622
  finish: "#67c23a",
613
623
  error: "#f56c6c",
614
624
  success: "#67c23a"
615
- })[o.value] || "#c0c4cc");
616
- const V = v(() => {
617
- var c;
625
+ })[t.value] || "#c0c4cc");
626
+ const M = m(() => {
627
+ var i;
618
628
  return [
619
- a.b(),
620
- a.is(o.value),
621
- a.is("last", d.value),
622
- a.m(((c = e == null ? void 0 : e.props) == null ? void 0 : c.direction) || "horizontal")
629
+ e.b(),
630
+ e.is(t.value),
631
+ e.is("last", v.value),
632
+ e.m(((i = a == null ? void 0 : a.props) == null ? void 0 : i.direction) || "horizontal")
623
633
  ];
624
634
  }), b = () => {
625
- var c;
626
- l.value > -1 && ((c = e == null ? void 0 : e.setCurrentActive) == null || c.call(e, l.value));
635
+ var i;
636
+ l.value > -1 && ((i = a == null ? void 0 : a.setCurrentActive) == null || i.call(a, l.value));
627
637
  };
628
- return (c, M) => (u(), m("div", {
629
- class: s(V.value),
638
+ return (i, p) => (u(), d("div", {
639
+ class: o(M.value),
630
640
  onClick: b
631
641
  }, [
632
642
  h("div", {
633
- class: s(r(a).e("head"))
643
+ class: o(r(e).e("head"))
634
644
  }, [
635
- f.value ? H("", !0) : (u(), m("div", {
645
+ z.value ? C("", !0) : (u(), d("div", {
636
646
  key: 0,
637
- class: s([r(a).e("line"), r(a).em("line", "prev")])
647
+ class: o([r(e).e("line"), r(e).em("line", "prev")])
638
648
  }, null, 2)),
639
649
  h("div", {
640
- class: s(r(a).e("icon"))
650
+ class: o(r(e).e("icon"))
641
651
  }, [
642
- t.icon ? (u(), m("span", {
652
+ s.icon ? (u(), d("span", {
643
653
  key: 0,
644
- class: s(r(a).e("icon-inner"))
645
- }, k(t.icon), 3)) : (u(), m("span", {
654
+ class: o(r(e).e("icon-inner"))
655
+ }, H(s.icon), 3)) : (u(), d("span", {
646
656
  key: 1,
647
- class: s(r(a).e("icon-inner"))
657
+ class: o(r(e).e("icon-inner"))
648
658
  }, [
649
- o.value === "finish" || o.value === "success" ? (u(), m(x, { key: 0 }, [
650
- C("✓")
651
- ], 64)) : o.value === "error" ? (u(), m(x, { key: 1 }, [
652
- C("✕")
653
- ], 64)) : (u(), m(x, { key: 2 }, [
654
- C(k(l.value + 1), 1)
659
+ t.value === "finish" || t.value === "success" ? (u(), d(S, { key: 0 }, [
660
+ $("✓")
661
+ ], 64)) : t.value === "error" ? (u(), d(S, { key: 1 }, [
662
+ $("✕")
663
+ ], 64)) : (u(), d(S, { key: 2 }, [
664
+ $(H(l.value + 1), 1)
655
665
  ], 64))
656
666
  ], 2))
657
667
  ], 2),
658
- d.value ? H("", !0) : (u(), m("div", {
668
+ v.value ? C("", !0) : (u(), d("div", {
659
669
  key: 1,
660
- class: s(r(a).e("line"))
670
+ class: o(r(e).e("line"))
661
671
  }, null, 2))
662
672
  ], 2),
663
673
  h("div", {
664
- class: s(r(a).e("content"))
674
+ class: o(r(e).e("content"))
665
675
  }, [
666
676
  h("div", {
667
- class: s(r(a).e("title"))
677
+ class: o(r(e).e("title"))
668
678
  }, [
669
- p(c.$slots, "title", {}, () => [
670
- C(k(t.title), 1)
679
+ f(i.$slots, "title", {}, () => [
680
+ $(H(s.title), 1)
671
681
  ])
672
682
  ], 2),
673
- t.description || c.$slots.description ? (u(), m("div", {
683
+ s.description || i.$slots.description ? (u(), d("div", {
674
684
  key: 0,
675
- class: s(r(a).e("description"))
685
+ class: o(r(e).e("description"))
676
686
  }, [
677
- p(c.$slots, "description", {}, () => [
678
- C(k(t.description), 1)
687
+ f(i.$slots, "description", {}, () => [
688
+ $(H(s.description), 1)
679
689
  ])
680
- ], 2)) : H("", !0)
690
+ ], 2)) : C("", !0)
681
691
  ], 2)
682
692
  ], 2));
683
693
  }
684
- }), d2 = /* @__PURE__ */ y({
694
+ }), M0 = /* @__PURE__ */ V({
685
695
  name: "XPageHeader",
686
696
  __name: "index",
687
697
  props: {
@@ -691,79 +701,186 @@ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
691
701
  showBack: { type: Boolean, default: !1 }
692
702
  },
693
703
  emits: ["back"],
694
- setup(t, { emit: n }) {
695
- const a = n, e = L("page-header"), l = () => {
696
- a("back");
704
+ setup(s, { emit: n }) {
705
+ const e = n, a = g("page-header"), l = () => {
706
+ e("back");
697
707
  };
698
- return (o, d) => (u(), m("div", {
699
- class: s(r(e).b())
708
+ return (t, v) => (u(), d("div", {
709
+ class: o(r(a).b())
700
710
  }, [
701
711
  h("div", {
702
- class: s(r(e).e("main"))
712
+ class: o(r(a).e("main"))
703
713
  }, [
704
714
  h("div", {
705
- class: s(r(e).e("left"))
715
+ class: o(r(a).e("left"))
706
716
  }, [
707
- t.showBack ? (u(), m("span", {
717
+ s.showBack ? (u(), d("span", {
708
718
  key: 0,
709
- class: s(r(e).e("back")),
719
+ class: o(r(a).e("back")),
710
720
  onClick: l
711
721
  }, [
712
722
  h("span", {
713
- class: s(r(e).e("back-icon"))
723
+ class: o(r(a).e("back-icon"))
714
724
  }, "←", 2),
715
- t.backText ? (u(), m("span", {
725
+ s.backText ? (u(), d("span", {
716
726
  key: 0,
717
- class: s(r(e).e("back-text"))
718
- }, k(t.backText), 3)) : H("", !0)
719
- ], 2)) : H("", !0),
727
+ class: o(r(a).e("back-text"))
728
+ }, H(s.backText), 3)) : C("", !0)
729
+ ], 2)) : C("", !0),
720
730
  h("span", {
721
- class: s(r(e).e("title"))
731
+ class: o(r(a).e("title"))
722
732
  }, [
723
- p(o.$slots, "title", {}, () => [
724
- C(k(t.title), 1)
733
+ f(t.$slots, "title", {}, () => [
734
+ $(H(s.title), 1)
725
735
  ])
726
736
  ], 2),
727
- t.subtitle || o.$slots.subtitle ? (u(), m("span", {
737
+ s.subtitle || t.$slots.subtitle ? (u(), d("span", {
728
738
  key: 1,
729
- class: s(r(e).e("subtitle"))
739
+ class: o(r(a).e("subtitle"))
730
740
  }, [
731
- p(o.$slots, "subtitle", {}, () => [
732
- C(k(t.subtitle), 1)
741
+ f(t.$slots, "subtitle", {}, () => [
742
+ $(H(s.subtitle), 1)
733
743
  ])
734
- ], 2)) : H("", !0)
744
+ ], 2)) : C("", !0)
735
745
  ], 2),
736
746
  h("div", {
737
- class: s(r(e).e("extra"))
747
+ class: o(r(a).e("extra"))
738
748
  }, [
739
- p(o.$slots, "extra")
749
+ f(t.$slots, "extra")
740
750
  ], 2)
741
751
  ], 2),
742
- o.$slots.default ? (u(), m("div", {
752
+ t.$slots.default ? (u(), d("div", {
743
753
  key: 0,
744
- class: s(r(e).e("content"))
754
+ class: o(r(a).e("content"))
745
755
  }, [
746
- p(o.$slots, "default")
747
- ], 2)) : H("", !0),
748
- o.$slots.footer ? (u(), m("div", {
756
+ f(t.$slots, "default")
757
+ ], 2)) : C("", !0),
758
+ t.$slots.footer ? (u(), d("div", {
749
759
  key: 1,
750
- class: s(r(e).e("footer"))
760
+ class: o(r(a).e("footer"))
761
+ }, [
762
+ f(t.$slots, "footer")
763
+ ], 2)) : C("", !0)
764
+ ], 2));
765
+ }
766
+ }), f0 = /* @__PURE__ */ V({
767
+ name: "XDropdown",
768
+ __name: "index",
769
+ props: {
770
+ trigger: { default: "hover" },
771
+ placement: { default: "bottom" },
772
+ disabled: { type: Boolean, default: !1 },
773
+ visible: { type: Boolean },
774
+ hideOnClick: { type: Boolean, default: !0 }
775
+ },
776
+ emits: ["visible-change", "click", "command"],
777
+ setup(s, { emit: n }) {
778
+ const e = s, a = n, l = g("dropdown"), t = w(e.visible || !1), v = w(), z = () => {
779
+ e.disabled || (t.value = !0, a("visible-change", !0));
780
+ }, M = () => {
781
+ t.value = !1, a("visible-change", !1);
782
+ }, b = () => {
783
+ t.value ? M() : z();
784
+ };
785
+ A("x-dropdown", {
786
+ visible: t,
787
+ handleClick: (y) => {
788
+ a("click", y), a("command", y), e.hideOnClick && M();
789
+ },
790
+ hide: M
791
+ });
792
+ const p = () => {
793
+ e.trigger === "hover" && z();
794
+ }, c = () => {
795
+ e.trigger === "hover" && M();
796
+ }, k = (y) => {
797
+ v.value && !v.value.contains(y.target) && M();
798
+ };
799
+ return typeof window < "u" && document.addEventListener("click", k), (y, L) => (u(), d("div", {
800
+ ref_key: "dropdownRef",
801
+ ref: v,
802
+ class: o([r(l).b(), r(l).is("disabled", s.disabled)]),
803
+ onMouseenter: p,
804
+ onMouseleave: c
805
+ }, [
806
+ h("div", {
807
+ class: o(r(l).e("trigger")),
808
+ onClick: L[0] || (L[0] = (D) => s.trigger === "click" && b())
751
809
  }, [
752
- p(o.$slots, "footer")
753
- ], 2)) : H("", !0)
810
+ f(y.$slots, "default")
811
+ ], 2),
812
+ X(j, { name: "x-dropdown-zoom" }, {
813
+ default: G(() => [
814
+ N(h("div", {
815
+ class: o([r(l).e("menu"), r(l).m(s.placement)])
816
+ }, [
817
+ f(y.$slots, "dropdown")
818
+ ], 2), [
819
+ [O, t.value]
820
+ ])
821
+ ]),
822
+ _: 3
823
+ })
824
+ ], 34));
825
+ }
826
+ }), z0 = /* @__PURE__ */ V({
827
+ name: "XDropdownMenu",
828
+ __name: "DropdownMenu",
829
+ setup(s) {
830
+ const n = g("dropdown-menu");
831
+ return (e, a) => (u(), d("ul", {
832
+ class: o(r(n).b())
833
+ }, [
834
+ f(e.$slots, "default")
835
+ ], 2));
836
+ }
837
+ }), b0 = /* @__PURE__ */ V({
838
+ name: "XDropdownItem",
839
+ __name: "DropdownItem",
840
+ props: {
841
+ command: {},
842
+ disabled: { type: Boolean },
843
+ divided: { type: Boolean },
844
+ icon: {}
845
+ },
846
+ emits: ["click"],
847
+ setup(s, { emit: n }) {
848
+ const e = s, a = n, l = g("dropdown-item"), t = B("x-dropdown"), v = (M) => {
849
+ e.disabled || (a("click", M), t != null && t.handleClick && t.handleClick(e.command ?? M));
850
+ }, z = m(() => [
851
+ l.b(),
852
+ l.is("disabled", e.disabled),
853
+ l.is("divided", e.divided)
854
+ ]);
855
+ return (M, b) => (u(), d("li", {
856
+ class: o(z.value),
857
+ onClick: v
858
+ }, [
859
+ s.icon ? (u(), d("span", {
860
+ key: 0,
861
+ class: o(r(l).e("icon"))
862
+ }, H(s.icon), 3)) : C("", !0),
863
+ h("span", {
864
+ class: o(r(l).e("content"))
865
+ }, [
866
+ f(M.$slots, "default")
867
+ ], 2)
754
868
  ], 2));
755
869
  }
756
870
  });
757
871
  export {
758
- r2 as Breadcrumb,
759
- u2 as BreadcrumbItem,
760
- o2 as Menu,
761
- n2 as MenuItem,
762
- c2 as MenuItemGroup,
763
- d2 as PageHeader,
764
- v2 as Step,
765
- m2 as Steps,
766
- i2 as SubMenu,
767
- t2 as TabPane,
768
- s2 as Tabs
872
+ v0 as Breadcrumb,
873
+ m0 as BreadcrumbItem,
874
+ f0 as Dropdown,
875
+ b0 as DropdownItem,
876
+ z0 as DropdownMenu,
877
+ i0 as Menu,
878
+ r0 as MenuItem,
879
+ u0 as MenuItemGroup,
880
+ M0 as PageHeader,
881
+ p0 as Step,
882
+ h0 as Steps,
883
+ d0 as SubMenu,
884
+ c0 as TabPane,
885
+ n0 as Tabs
769
886
  };