@xto/navigation 1.0.1 → 1.1.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.
Files changed (3) hide show
  1. package/es/index.mjs +504 -335
  2. package/lib/index.cjs +1 -1
  3. package/package.json +3 -2
package/es/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as B, useSlots as L, ref as g, watch as N, provide as X, computed as v, openBlock as r, createElementBlock as d, normalizeClass as a, createElementVNode as f, unref as u, Fragment as V, renderList as G, toDisplayString as y, renderSlot as b, inject as I, withDirectives as O, createCommentVNode as _, vShow as E, normalizeStyle as A, createTextVNode as M, createVNode as H, Transition as D, withCtx as F, onMounted as j } from "vue";
2
- import { useNamespace as x } from "@xto/core";
3
- const q = ["onClick"], Y = /* @__PURE__ */ B({
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({
4
4
  name: "XTabs",
5
5
  __name: "index",
6
6
  props: {
@@ -11,65 +11,65 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
11
11
  closable: { type: Boolean, default: !1 }
12
12
  },
13
13
  emits: ["update:modelValue", "tabClick", "edit"],
14
- setup(o, { emit: i }) {
15
- const e = o, s = i, t = x("tabs"), l = L(), p = g(e.modelValue);
16
- N(() => e.modelValue, (n) => {
17
- p.value = n;
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;
18
18
  });
19
- const $ = (n, m) => {
20
- p.value = n, s("update:modelValue", n);
19
+ const f = (c, M) => {
20
+ d.value = c, e("update:modelValue", c);
21
21
  };
22
- X("tabs", {
23
- props: e,
24
- activeName: p,
25
- handleTabClick: $
22
+ I("tabs", {
23
+ props: a,
24
+ activeName: d,
25
+ handleTabClick: f
26
26
  });
27
- const C = v(() => [
28
- t.b(),
29
- t.m(e.type),
30
- t.is(`position-${e.tabPosition}`)
31
- ]), k = v(() => {
32
- var m;
33
- return (((m = l.default) == null ? void 0 : m.call(l)) || []).filter((c) => c.type && c.type.name === "XTabPane").map((c) => {
34
- var h, z, w, P;
27
+ const V = v(() => [
28
+ 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;
35
35
  return {
36
- name: ((h = c.props) == null ? void 0 : h.name) || ((z = c.props) == null ? void 0 : z.label),
37
- label: (w = c.props) == null ? void 0 : w.label,
38
- disabled: ((P = c.props) == null ? void 0 : P.disabled) === !0
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
39
39
  };
40
40
  });
41
41
  });
42
- return (n, m) => (r(), d("div", {
43
- class: a(C.value)
42
+ return (c, M) => (u(), m("div", {
43
+ class: s(V.value)
44
44
  }, [
45
- f("div", {
46
- class: a(u(t).e("header"))
45
+ h("div", {
46
+ class: s(r(l).e("header"))
47
47
  }, [
48
- f("div", {
49
- class: a(u(t).e("nav"))
48
+ h("div", {
49
+ class: s(r(l).e("nav"))
50
50
  }, [
51
- (r(!0), d(V, null, G(k.value, (c) => (r(), d("div", {
52
- key: c.name,
53
- class: a([
54
- u(t).e("item"),
55
- u(t).em("item", p.value === c.name ? "active" : ""),
56
- u(t).is("disabled", c.disabled)
51
+ (u(!0), m(x, null, E(b.value, (i) => (u(), m("div", {
52
+ key: i.name,
53
+ class: s([
54
+ r(l).e("item"),
55
+ r(l).em("item", d.value === i.name ? "active" : ""),
56
+ r(l).is("disabled", i.disabled)
57
57
  ]),
58
- onClick: (h) => c.disabled ? null : $(c.name)
59
- }, y(c.label), 11, q))), 128))
58
+ onClick: (z) => i.disabled ? null : f(i.name)
59
+ }, k(i.label), 11, J))), 128))
60
60
  ], 2)
61
61
  ], 2),
62
- f("div", {
63
- class: a(u(t).e("content"))
62
+ h("div", {
63
+ class: s(r(l).e("content"))
64
64
  }, [
65
- b(n.$slots, "default")
65
+ p(c.$slots, "default")
66
66
  ], 2)
67
67
  ], 2));
68
68
  }
69
- }), J = {
69
+ }), K = {
70
70
  class: "x-tab-pane",
71
71
  role: "tabpanel"
72
- }, Z = /* @__PURE__ */ B({
72
+ }, t2 = /* @__PURE__ */ y({
73
73
  name: "XTabPane",
74
74
  __name: "TabPane",
75
75
  props: {
@@ -79,17 +79,17 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
79
79
  closable: { type: Boolean, default: !1 },
80
80
  lazy: { type: Boolean, default: !1 }
81
81
  },
82
- setup(o) {
83
- const i = o, e = I("tabs"), s = g(!1), t = v(() => i.name || i.label), l = v(() => (e == null ? void 0 : e.activeName.value) === t.value);
84
- return N(() => e == null ? void 0 : e.activeName.value, () => {
85
- l.value && i.lazy && !s.value && (s.value = !0);
86
- }, { immediate: !0 }), l.value && i.lazy && (s.value = !0), (p, $) => O((r(), d("div", J, [
87
- s.value || !o.lazy ? b(p.$slots, "default", { key: 0 }) : _("", !0)
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)
88
88
  ], 512)), [
89
- [E, l.value]
89
+ [W, o.value]
90
90
  ]);
91
91
  }
92
- }), ee = /* @__PURE__ */ B({
92
+ }), o2 = /* @__PURE__ */ y({
93
93
  name: "XMenu",
94
94
  __name: "index",
95
95
  props: {
@@ -103,41 +103,200 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
103
103
  router: { type: Boolean }
104
104
  },
105
105
  emits: ["update:modelValue", "select", "open", "close"],
106
- setup(o, { emit: i }) {
107
- const e = o, s = i, t = x("menu"), l = g(e.modelValue), p = g([...e.defaultOpeneds]);
108
- N(() => e.modelValue, (c) => {
109
- l.value = c;
110
- }), X("menu", {
111
- props: e,
112
- activeIndex: l,
113
- openedMenus: p,
114
- handleSelect: (c, h = []) => {
115
- l.value = c, s("update:modelValue", c), s("select", c, h);
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);
116
116
  },
117
- handleOpen: (c, h = []) => {
118
- p.value.includes(c) || p.value.push(c), s("open", c, h);
117
+ handleOpen: (i, z = []) => {
118
+ d.value.includes(i) || d.value.push(i), e("open", i, z);
119
119
  },
120
- handleClose: (c, h = []) => {
121
- const z = p.value.indexOf(c);
122
- z > -1 && p.value.splice(z, 1), s("close", c, h);
120
+ handleClose: (i, z = []) => {
121
+ const g = d.value.indexOf(i);
122
+ g > -1 && d.value.splice(g, 1), e("close", i, z);
123
123
  }
124
124
  });
125
- const n = v(() => [
126
- t.b(),
127
- t.is("collapse", e.collapse),
128
- t.is(`mode-${e.mode}`)
129
- ]), m = v(() => ({
130
- backgroundColor: e.backgroundColor,
131
- color: e.textColor
125
+ const c = v(() => [
126
+ 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
132
132
  }));
133
- return (c, h) => (r(), d("ul", {
134
- class: a(n.value),
135
- style: A(m.value)
133
+ return (i, z) => (u(), m("ul", {
134
+ class: s(c.value),
135
+ style: S(M.value)
136
136
  }, [
137
- b(c.$slots, "default")
137
+ p(i.$slots, "default")
138
138
  ], 6));
139
139
  }
140
- }), T = "x-menu-item", se = /* @__PURE__ */ B({
140
+ }), G = {
141
+ // 箭头类
142
+ "arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
143
+ "arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
144
+ "arrow-left": "M19 12H5m0 0l7 7m-7-7l7-7",
145
+ "arrow-right": "M5 12h14m0 0l-7-7m7 7l-7 7",
146
+ "arrow-up-bold": "M12 5l-7 7h4v7h6v-7h4l-7-7z",
147
+ "arrow-down-bold": "M12 19l7-7h-4V5H9v7H5l7 7z",
148
+ "arrow-left-bold": "M5 12l7-7v4h7v6h-7v4l-7-7z",
149
+ "arrow-right-bold": "M19 12l-7 7v-4H5v-6h7V5l7 7z",
150
+ // 操作类
151
+ plus: "M12 5v14m-7-7h14",
152
+ minus: "M5 12h14",
153
+ close: "M6 18L18 6M6 6l12 12",
154
+ check: "M5 13l4 4L19 7",
155
+ "check-bold": "M4 12l5 5L20 6",
156
+ edit: "M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",
157
+ delete: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",
158
+ copy: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",
159
+ download: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",
160
+ upload: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",
161
+ refresh: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",
162
+ search: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
163
+ filter: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",
164
+ more: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z",
165
+ "more-h": "M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",
166
+ setting: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",
167
+ share: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",
168
+ // 状态类
169
+ loading: "M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",
170
+ info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
171
+ success: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
172
+ warning: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
173
+ error: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
174
+ question: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
175
+ // 用户类
176
+ user: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
177
+ "user-add": "M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",
178
+ "user-group": "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
179
+ logout: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",
180
+ login: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",
181
+ // 文件类
182
+ file: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",
183
+ folder: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",
184
+ "folder-open": "M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",
185
+ document: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
186
+ // 媒体类
187
+ image: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",
188
+ video: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",
189
+ music: "M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",
190
+ camera: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",
191
+ // 通信类
192
+ mail: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",
193
+ phone: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",
194
+ chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
195
+ bell: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
196
+ message: "M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",
197
+ // 视图类
198
+ eye: "M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z",
199
+ "eye-off": "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",
200
+ // 时间类
201
+ calendar: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",
202
+ clock: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
203
+ history: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
204
+ timer: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
205
+ // 位置类
206
+ location: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",
207
+ map: "M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",
208
+ globe: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",
209
+ // 其他
210
+ star: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",
211
+ heart: "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",
212
+ "thumb-up": "M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",
213
+ link: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",
214
+ "external-link": "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
215
+ lock: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",
216
+ unlock: "M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",
217
+ key: "M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",
218
+ home: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
219
+ menu: "M4 6h16M4 12h16M4 18h16",
220
+ "menu-fold": "M4 6h16M4 12h10M4 18h16",
221
+ "menu-unfold": "M4 6h16M10 12h10M4 18h16",
222
+ "menu-collapse": "M4 6h16M4 12h10M4 18h16",
223
+ "menu-expand": "M4 6h16M10 12h10M4 18h16",
224
+ "sidebar-fold": "M11 19l-7-7 7-7m8 14l-7-7 7-7",
225
+ "sidebar-expand": "M13 5l7 7-7 7M5 5l7 7-7 7",
226
+ // 菜单导航类
227
+ dashboard: "M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",
228
+ chart: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z",
229
+ "chart-pie": "M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z",
230
+ "chart-line": "M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",
231
+ report: "M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
232
+ analytics: "M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",
233
+ system: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",
234
+ permission: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",
235
+ role: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
236
+ "user-manage": "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",
237
+ log: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
238
+ notification: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
239
+ app: "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",
240
+ list: "M4 6h16M4 10h16M4 14h16M4 18h16",
241
+ 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
+ fullscreen: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",
243
+ "zoom-in": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7",
244
+ "zoom-out": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",
245
+ 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",
246
+ bookmark: "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",
247
+ tag: "M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",
248
+ code: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",
249
+ terminal: "M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",
250
+ 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
+ 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
+ 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"
254
+ };
255
+ function Q(t) {
256
+ return t in G;
257
+ }
258
+ const R = ["stroke-width"], U = ["d"], j = /* @__PURE__ */ y({
259
+ name: "XIcon",
260
+ __name: "index",
261
+ props: {
262
+ name: {},
263
+ size: { default: 24 },
264
+ color: {},
265
+ spin: { type: Boolean, default: !1 },
266
+ strokeWidth: { default: 2 }
267
+ },
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,
272
+ color: n.color
273
+ })), o = v(() => ({
274
+ 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)
282
+ }, [
283
+ f.value ? (u(), m("svg", {
284
+ key: 0,
285
+ viewBox: "0 0 24 24",
286
+ fill: "none",
287
+ stroke: "currentColor",
288
+ "stroke-width": t.strokeWidth,
289
+ "stroke-linecap": "round",
290
+ "stroke-linejoin": "round",
291
+ style: S(o.value)
292
+ }, [
293
+ h("path", { d: f.value }, null, 8, U)
294
+ ], 12, R)) : p(V.$slots, "default", { key: 1 }, () => [
295
+ C(k(t.name), 1)
296
+ ])
297
+ ], 6));
298
+ }
299
+ }), B = "x-menu-item", n2 = /* @__PURE__ */ y({
141
300
  name: "XMenuItem",
142
301
  __name: "MenuItem",
143
302
  props: {
@@ -145,60 +304,65 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
145
304
  disabled: { type: Boolean, default: !1 },
146
305
  icon: {}
147
306
  },
148
- setup(o) {
149
- const i = o, e = I("menu");
150
- L();
151
- const s = v(() => (e == null ? void 0 : e.activeIndex.value) === i.index), t = v(() => e == null ? void 0 : e.props.collapse), l = v(() => (e == null ? void 0 : e.props.mode) === "horizontal"), p = v(() => [
152
- T,
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,
153
312
  {
154
- "is-active": s.value,
155
- "is-disabled": i.disabled,
156
- "is-horizontal": l.value,
157
- "is-collapse": t.value
313
+ "is-active": e.value,
314
+ "is-disabled": n.disabled,
315
+ "is-horizontal": o.value,
316
+ "is-collapse": l.value
158
317
  }
159
- ]), $ = v(() => s.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), C = () => {
160
- i.disabled || i.index && (e == null || e.handleSelect(i.index, [i.index]));
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]));
161
320
  };
162
- return (k, n) => (r(), d("li", {
163
- class: a(p.value),
164
- style: A($.value),
165
- onClick: C
321
+ return (b, c) => (u(), m("li", {
322
+ class: s(d.value),
323
+ style: S(f.value),
324
+ onClick: V
166
325
  }, [
167
- f("div", {
168
- class: a(T + "__content")
326
+ h("div", {
327
+ class: s(B + "__content")
169
328
  }, [
170
- o.icon ? (r(), d("span", {
329
+ t.icon ? (u(), m("span", {
171
330
  key: 0,
172
- class: a(T + "__icon")
173
- }, y(o.icon), 3)) : k.$slots.icon ? (r(), d("span", {
331
+ class: s(B + "__icon")
332
+ }, [
333
+ X(r(j), {
334
+ name: t.icon,
335
+ size: 18
336
+ }, null, 8, ["name"])
337
+ ], 2)) : b.$slots.icon ? (u(), m("span", {
174
338
  key: 1,
175
- class: a(T + "__icon")
339
+ class: s(B + "__icon")
176
340
  }, [
177
- b(k.$slots, "icon")
178
- ], 2)) : _("", !0),
179
- f("span", {
180
- class: a(T + "__text")
341
+ p(b.$slots, "icon")
342
+ ], 2)) : H("", !0),
343
+ h("span", {
344
+ class: s(B + "__text")
181
345
  }, [
182
- b(k.$slots, "default")
346
+ p(b.$slots, "default")
183
347
  ], 2)
184
348
  ], 2)
185
349
  ], 6));
186
350
  }
187
- }), K = { class: "x-menu-item-group" }, Q = { class: "x-menu-item-group__title" }, te = /* @__PURE__ */ B({
351
+ }), Y = { class: "x-menu-item-group" }, Z = { class: "x-menu-item-group__title" }, c2 = /* @__PURE__ */ y({
188
352
  name: "XMenuItemGroup",
189
353
  __name: "MenuItemGroup",
190
354
  props: {
191
355
  title: {}
192
356
  },
193
- setup(o) {
194
- return (i, e) => (r(), d("li", K, [
195
- f("div", Q, y(o.title), 1),
196
- f("ul", null, [
197
- b(i.$slots, "default")
357
+ setup(t) {
358
+ return (n, a) => (u(), m("li", Y, [
359
+ h("div", Z, k(t.title), 1),
360
+ h("ul", null, [
361
+ p(n.$slots, "default")
198
362
  ])
199
363
  ]));
200
364
  }
201
- }), S = "x-sub-menu", ae = /* @__PURE__ */ B({
365
+ }), $ = "x-sub-menu", i2 = /* @__PURE__ */ y({
202
366
  name: "XSubMenu",
203
367
  __name: "SubMenu",
204
368
  props: {
@@ -207,66 +371,71 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
207
371
  disabled: { type: Boolean, default: !1 },
208
372
  icon: {}
209
373
  },
210
- setup(o) {
211
- const i = o, e = I("menu"), s = I("subMenu", null), t = g(!1), l = v(() => !!s), p = v(() => e == null ? void 0 : e.props.collapse), $ = v(() => (e == null ? void 0 : e.activeIndex.value) === i.index), C = v(() => [
212
- S,
213
- S + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
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"),
214
378
  {
215
- "is-active": $.value,
216
- "is-opened": t.value,
217
- "is-disabled": i.disabled,
218
- "is-nested": l.value,
219
- "is-collapse": p.value
379
+ "is-active": f.value,
380
+ "is-opened": l.value,
381
+ "is-disabled": n.disabled,
382
+ "is-nested": o.value,
383
+ "is-collapse": d.value
220
384
  }
221
- ]), k = () => {
222
- i.disabled || p.value || (t.value = !t.value);
223
- }, n = () => {
224
- i.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || p.value) && (t.value = !0);
225
- }, m = () => {
226
- ((e == null ? void 0 : e.props.mode) === "horizontal" || p.value) && (t.value = !1);
385
+ ]), 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);
227
391
  };
228
- return X("subMenu", {
229
- isOpen: t,
230
- isNested: l
231
- }), (c, h) => {
232
- var z;
233
- return r(), d("li", {
234
- class: a(C.value),
235
- onMouseenter: n,
236
- onMouseleave: m
392
+ return I("subMenu", {
393
+ 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
237
401
  }, [
238
- f("div", {
239
- class: a(S + "__title"),
240
- onClick: k
402
+ h("div", {
403
+ class: s($ + "__title"),
404
+ onClick: b
241
405
  }, [
242
- f("div", {
243
- class: a(S + "__content")
406
+ h("div", {
407
+ class: s($ + "__content")
244
408
  }, [
245
- o.icon ? (r(), d("span", {
409
+ t.icon ? (u(), m("span", {
246
410
  key: 0,
247
- class: a(S + "__icon")
248
- }, y(o.icon), 3)) : c.$slots.icon ? (r(), d("span", {
411
+ class: s($ + "__icon")
412
+ }, [
413
+ X(r(j), {
414
+ name: t.icon,
415
+ size: 18
416
+ }, null, 8, ["name"])
417
+ ], 2)) : i.$slots.icon ? (u(), m("span", {
249
418
  key: 1,
250
- class: a(S + "__icon")
419
+ class: s($ + "__icon")
251
420
  }, [
252
- b(c.$slots, "icon")
253
- ], 2)) : _("", !0),
254
- f("span", {
255
- class: a(S + "__text")
421
+ p(i.$slots, "icon")
422
+ ], 2)) : H("", !0),
423
+ h("span", {
424
+ class: s($ + "__text")
256
425
  }, [
257
- b(c.$slots, "title", {}, () => [
258
- M(y(o.title), 1)
426
+ p(i.$slots, "title", {}, () => [
427
+ C(k(t.title), 1)
259
428
  ])
260
429
  ], 2),
261
- f("span", {
262
- class: a([S + "__arrow", { "is-open": t.value }])
263
- }, [...h[0] || (h[0] = [
264
- f("svg", {
430
+ h("span", {
431
+ class: s([$ + "__arrow", { "is-open": l.value }])
432
+ }, [...z[0] || (z[0] = [
433
+ h("svg", {
265
434
  viewBox: "0 0 1024 1024",
266
435
  width: "12",
267
436
  height: "12"
268
437
  }, [
269
- f("path", {
438
+ h("path", {
270
439
  fill: "currentColor",
271
440
  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"
272
441
  })
@@ -274,18 +443,18 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
274
443
  ])], 2)
275
444
  ], 2)
276
445
  ], 2),
277
- H(D, {
278
- name: ((z = u(e)) == null ? void 0 : z.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
446
+ X(D, {
447
+ name: ((g = r(a)) == null ? void 0 : g.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
279
448
  }, {
280
449
  default: F(() => {
281
- var w;
450
+ var A;
282
451
  return [
283
- O(f("ul", {
284
- class: a([S + "__menu", { "is-horizontal": ((w = u(e)) == null ? void 0 : w.props.mode) === "horizontal", "is-collapse": p.value }])
452
+ O(h("ul", {
453
+ class: s([$ + "__menu", { "is-horizontal": ((A = r(a)) == null ? void 0 : A.props.mode) === "horizontal", "is-collapse": d.value }])
285
454
  }, [
286
- b(c.$slots, "default")
455
+ p(i.$slots, "default")
287
456
  ], 2), [
288
- [E, t.value]
457
+ [W, l.value]
289
458
  ])
290
459
  ];
291
460
  }),
@@ -294,32 +463,32 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
294
463
  ], 34);
295
464
  };
296
465
  }
297
- }), le = /* @__PURE__ */ B({
466
+ }), r2 = /* @__PURE__ */ y({
298
467
  name: "XBreadcrumb",
299
468
  __name: "index",
300
469
  props: {
301
470
  separator: { default: "/" },
302
471
  separatorIcon: {}
303
472
  },
304
- setup(o) {
305
- const i = o, e = x("breadcrumb");
306
- X("breadcrumb", {
307
- separator: v(() => i.separator),
308
- separatorIcon: v(() => i.separatorIcon)
473
+ setup(t) {
474
+ const n = t, a = L("breadcrumb");
475
+ I("breadcrumb", {
476
+ separator: v(() => n.separator),
477
+ separatorIcon: v(() => n.separatorIcon)
309
478
  });
310
- const s = v(() => [e.b()]);
311
- return (t, l) => (r(), d("nav", {
312
- class: a(s.value),
479
+ const e = v(() => [a.b()]);
480
+ return (l, o) => (u(), m("nav", {
481
+ class: s(e.value),
313
482
  "aria-label": "Breadcrumb"
314
483
  }, [
315
- f("ol", {
316
- class: a(u(e).e("list"))
484
+ h("ol", {
485
+ class: s(r(a).e("list"))
317
486
  }, [
318
- b(t.$slots, "default")
487
+ p(l.$slots, "default")
319
488
  ], 2)
320
489
  ], 2));
321
490
  }
322
- }), R = ["aria-current"], ne = /* @__PURE__ */ B({
491
+ }), a2 = ["aria-current"], u2 = /* @__PURE__ */ y({
323
492
  name: "XBreadcrumbItem",
324
493
  __name: "BreadcrumbItem",
325
494
  props: {
@@ -328,50 +497,50 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
328
497
  disabled: { type: Boolean }
329
498
  },
330
499
  emits: ["click"],
331
- setup(o, { emit: i }) {
332
- const e = o, s = i, t = x("breadcrumb"), l = I("breadcrumb"), p = v(() => [
333
- t.e("item"),
334
- t.is("link", !!e.to && !e.disabled),
335
- t.is("disabled", e.disabled)
336
- ]), $ = v(() => {
337
- var n;
338
- return ((n = l == null ? void 0 : l.separator) == null ? void 0 : n.value) || "/";
339
- }), C = v(() => {
340
- var n;
341
- return (n = l == null ? void 0 : l.separatorIcon) == null ? void 0 : n.value;
342
- }), k = (n) => {
343
- e.disabled || (s("click", n), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
500
+ setup(t, { emit: n }) {
501
+ const a = t, e = n, l = L("breadcrumb"), o = w("breadcrumb"), d = v(() => [
502
+ 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));
344
513
  };
345
- return (n, m) => (r(), d("li", {
346
- class: a(p.value)
514
+ return (c, M) => (u(), m("li", {
515
+ class: s(d.value)
347
516
  }, [
348
- o.to && !o.disabled ? (r(), d("span", {
517
+ t.to && !t.disabled ? (u(), m("span", {
349
518
  key: 0,
350
- class: a(u(t).e("link")),
351
- onClick: k
519
+ class: s(r(l).e("link")),
520
+ onClick: b
352
521
  }, [
353
- b(n.$slots, "default")
354
- ], 2)) : (r(), d("span", {
522
+ p(c.$slots, "default")
523
+ ], 2)) : (u(), m("span", {
355
524
  key: 1,
356
- class: a(u(t).e("text")),
357
- "aria-current": o.disabled ? "page" : void 0
525
+ class: s(r(l).e("text")),
526
+ "aria-current": t.disabled ? "page" : void 0
358
527
  }, [
359
- b(n.$slots, "default")
360
- ], 10, R)),
361
- f("span", {
362
- class: a(u(t).e("separator")),
528
+ p(c.$slots, "default")
529
+ ], 10, a2)),
530
+ h("span", {
531
+ class: s(r(l).e("separator")),
363
532
  "aria-hidden": "true"
364
533
  }, [
365
- C.value ? (r(), d("span", {
534
+ V.value ? (u(), m("span", {
366
535
  key: 0,
367
- class: a(u(t).e("separator-icon"))
368
- }, y(C.value), 3)) : (r(), d(V, { key: 1 }, [
369
- M(y($.value), 1)
536
+ class: s(r(l).e("separator-icon"))
537
+ }, k(V.value), 3)) : (u(), m(x, { key: 1 }, [
538
+ C(k(f.value), 1)
370
539
  ], 64))
371
540
  ], 2)
372
541
  ], 2));
373
542
  }
374
- }), oe = /* @__PURE__ */ B({
543
+ }), m2 = /* @__PURE__ */ y({
375
544
  name: "XSteps",
376
545
  __name: "index",
377
546
  props: {
@@ -384,37 +553,37 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
384
553
  space: {}
385
554
  },
386
555
  emits: ["change", "update:active"],
387
- setup(o, { emit: i }) {
388
- const e = o, s = i, t = x("steps"), l = g(e.active), p = g(0);
389
- N(() => e.active, (m) => {
390
- l.value = m;
391
- }), X("steps", {
392
- props: e,
393
- currentActive: l,
394
- stepCount: p,
395
- setCurrentActive: (m) => {
396
- l.value = m, s("change", m), s("update:active", m);
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);
397
566
  },
398
- setStepCount: (m) => {
399
- p.value = m;
567
+ setStepCount: (M) => {
568
+ d.value = M;
400
569
  }
401
570
  });
402
- const k = v(() => [
403
- t.b(),
404
- t.m(e.direction),
405
- t.is("simple", e.simple),
406
- t.is("center", e.alignCenter)
407
- ]), n = v(() => e.space ? {
408
- "--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
571
+ const b = v(() => [
572
+ 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
409
578
  } : {});
410
- return (m, c) => (r(), d("div", {
411
- class: a(k.value),
412
- style: A(n.value)
579
+ return (M, i) => (u(), m("div", {
580
+ class: s(b.value),
581
+ style: S(c.value)
413
582
  }, [
414
- b(m.$slots, "default")
583
+ p(M.$slots, "default")
415
584
  ], 6));
416
585
  }
417
- }), ce = /* @__PURE__ */ B({
586
+ }), v2 = /* @__PURE__ */ y({
418
587
  name: "XStep",
419
588
  __name: "Step",
420
589
  props: {
@@ -423,96 +592,96 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
423
592
  icon: {},
424
593
  status: {}
425
594
  },
426
- setup(o) {
427
- const i = o, e = x("step"), s = I("steps"), t = g(-1);
428
- j(() => {
429
- s && (t.value = s.stepCount.value, s.setStepCount(s.stepCount.value + 1));
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));
430
599
  });
431
- const l = v(() => {
432
- var m, c, h;
433
- if (i.status) return i.status;
434
- const n = ((m = s == null ? void 0 : s.currentActive) == null ? void 0 : m.value) ?? 0;
435
- return t.value < n ? ((c = s == null ? void 0 : s.props) == null ? void 0 : c.finishStatus) || "finish" : t.value === n ? ((h = s == null ? void 0 : s.props) == null ? void 0 : h.processStatus) || "process" : "wait";
436
- }), p = v(() => {
437
- var n;
438
- return t.value === (((n = s == null ? void 0 : s.stepCount) == null ? void 0 : n.value) || 0) - 1;
439
- }), $ = v(() => t.value === 0);
600
+ const o = v(() => {
601
+ var M, i, z;
602
+ 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);
440
609
  v(() => ({
441
610
  wait: "#c0c4cc",
442
611
  process: "#409eff",
443
612
  finish: "#67c23a",
444
613
  error: "#f56c6c",
445
614
  success: "#67c23a"
446
- })[l.value] || "#c0c4cc");
447
- const C = v(() => {
448
- var n;
615
+ })[o.value] || "#c0c4cc");
616
+ const V = v(() => {
617
+ var c;
449
618
  return [
450
- e.b(),
451
- e.is(l.value),
452
- e.is("last", p.value),
453
- e.m(((n = s == null ? void 0 : s.props) == null ? void 0 : n.direction) || "horizontal")
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")
454
623
  ];
455
- }), k = () => {
456
- var n;
457
- t.value > -1 && ((n = s == null ? void 0 : s.setCurrentActive) == null || n.call(s, t.value));
624
+ }), b = () => {
625
+ var c;
626
+ l.value > -1 && ((c = e == null ? void 0 : e.setCurrentActive) == null || c.call(e, l.value));
458
627
  };
459
- return (n, m) => (r(), d("div", {
460
- class: a(C.value),
461
- onClick: k
628
+ return (c, M) => (u(), m("div", {
629
+ class: s(V.value),
630
+ onClick: b
462
631
  }, [
463
- f("div", {
464
- class: a(u(e).e("head"))
632
+ h("div", {
633
+ class: s(r(a).e("head"))
465
634
  }, [
466
- $.value ? _("", !0) : (r(), d("div", {
635
+ f.value ? H("", !0) : (u(), m("div", {
467
636
  key: 0,
468
- class: a([u(e).e("line"), u(e).em("line", "prev")])
637
+ class: s([r(a).e("line"), r(a).em("line", "prev")])
469
638
  }, null, 2)),
470
- f("div", {
471
- class: a(u(e).e("icon"))
639
+ h("div", {
640
+ class: s(r(a).e("icon"))
472
641
  }, [
473
- o.icon ? (r(), d("span", {
642
+ t.icon ? (u(), m("span", {
474
643
  key: 0,
475
- class: a(u(e).e("icon-inner"))
476
- }, y(o.icon), 3)) : (r(), d("span", {
644
+ class: s(r(a).e("icon-inner"))
645
+ }, k(t.icon), 3)) : (u(), m("span", {
477
646
  key: 1,
478
- class: a(u(e).e("icon-inner"))
647
+ class: s(r(a).e("icon-inner"))
479
648
  }, [
480
- l.value === "finish" || l.value === "success" ? (r(), d(V, { key: 0 }, [
481
- M("✓")
482
- ], 64)) : l.value === "error" ? (r(), d(V, { key: 1 }, [
483
- M("✕")
484
- ], 64)) : (r(), d(V, { key: 2 }, [
485
- M(y(t.value + 1), 1)
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)
486
655
  ], 64))
487
656
  ], 2))
488
657
  ], 2),
489
- p.value ? _("", !0) : (r(), d("div", {
658
+ d.value ? H("", !0) : (u(), m("div", {
490
659
  key: 1,
491
- class: a(u(e).e("line"))
660
+ class: s(r(a).e("line"))
492
661
  }, null, 2))
493
662
  ], 2),
494
- f("div", {
495
- class: a(u(e).e("content"))
663
+ h("div", {
664
+ class: s(r(a).e("content"))
496
665
  }, [
497
- f("div", {
498
- class: a(u(e).e("title"))
666
+ h("div", {
667
+ class: s(r(a).e("title"))
499
668
  }, [
500
- b(n.$slots, "title", {}, () => [
501
- M(y(o.title), 1)
669
+ p(c.$slots, "title", {}, () => [
670
+ C(k(t.title), 1)
502
671
  ])
503
672
  ], 2),
504
- o.description || n.$slots.description ? (r(), d("div", {
673
+ t.description || c.$slots.description ? (u(), m("div", {
505
674
  key: 0,
506
- class: a(u(e).e("description"))
675
+ class: s(r(a).e("description"))
507
676
  }, [
508
- b(n.$slots, "description", {}, () => [
509
- M(y(o.description), 1)
677
+ p(c.$slots, "description", {}, () => [
678
+ C(k(t.description), 1)
510
679
  ])
511
- ], 2)) : _("", !0)
680
+ ], 2)) : H("", !0)
512
681
  ], 2)
513
682
  ], 2));
514
683
  }
515
- }), ie = /* @__PURE__ */ B({
684
+ }), d2 = /* @__PURE__ */ y({
516
685
  name: "XPageHeader",
517
686
  __name: "index",
518
687
  props: {
@@ -522,79 +691,79 @@ const q = ["onClick"], Y = /* @__PURE__ */ B({
522
691
  showBack: { type: Boolean, default: !1 }
523
692
  },
524
693
  emits: ["back"],
525
- setup(o, { emit: i }) {
526
- const e = i, s = x("page-header"), t = () => {
527
- e("back");
694
+ setup(t, { emit: n }) {
695
+ const a = n, e = L("page-header"), l = () => {
696
+ a("back");
528
697
  };
529
- return (l, p) => (r(), d("div", {
530
- class: a(u(s).b())
698
+ return (o, d) => (u(), m("div", {
699
+ class: s(r(e).b())
531
700
  }, [
532
- f("div", {
533
- class: a(u(s).e("main"))
701
+ h("div", {
702
+ class: s(r(e).e("main"))
534
703
  }, [
535
- f("div", {
536
- class: a(u(s).e("left"))
704
+ h("div", {
705
+ class: s(r(e).e("left"))
537
706
  }, [
538
- o.showBack ? (r(), d("span", {
707
+ t.showBack ? (u(), m("span", {
539
708
  key: 0,
540
- class: a(u(s).e("back")),
541
- onClick: t
709
+ class: s(r(e).e("back")),
710
+ onClick: l
542
711
  }, [
543
- f("span", {
544
- class: a(u(s).e("back-icon"))
712
+ h("span", {
713
+ class: s(r(e).e("back-icon"))
545
714
  }, "←", 2),
546
- o.backText ? (r(), d("span", {
715
+ t.backText ? (u(), m("span", {
547
716
  key: 0,
548
- class: a(u(s).e("back-text"))
549
- }, y(o.backText), 3)) : _("", !0)
550
- ], 2)) : _("", !0),
551
- f("span", {
552
- class: a(u(s).e("title"))
717
+ class: s(r(e).e("back-text"))
718
+ }, k(t.backText), 3)) : H("", !0)
719
+ ], 2)) : H("", !0),
720
+ h("span", {
721
+ class: s(r(e).e("title"))
553
722
  }, [
554
- b(l.$slots, "title", {}, () => [
555
- M(y(o.title), 1)
723
+ p(o.$slots, "title", {}, () => [
724
+ C(k(t.title), 1)
556
725
  ])
557
726
  ], 2),
558
- o.subtitle || l.$slots.subtitle ? (r(), d("span", {
727
+ t.subtitle || o.$slots.subtitle ? (u(), m("span", {
559
728
  key: 1,
560
- class: a(u(s).e("subtitle"))
729
+ class: s(r(e).e("subtitle"))
561
730
  }, [
562
- b(l.$slots, "subtitle", {}, () => [
563
- M(y(o.subtitle), 1)
731
+ p(o.$slots, "subtitle", {}, () => [
732
+ C(k(t.subtitle), 1)
564
733
  ])
565
- ], 2)) : _("", !0)
734
+ ], 2)) : H("", !0)
566
735
  ], 2),
567
- f("div", {
568
- class: a(u(s).e("extra"))
736
+ h("div", {
737
+ class: s(r(e).e("extra"))
569
738
  }, [
570
- b(l.$slots, "extra")
739
+ p(o.$slots, "extra")
571
740
  ], 2)
572
741
  ], 2),
573
- l.$slots.default ? (r(), d("div", {
742
+ o.$slots.default ? (u(), m("div", {
574
743
  key: 0,
575
- class: a(u(s).e("content"))
744
+ class: s(r(e).e("content"))
576
745
  }, [
577
- b(l.$slots, "default")
578
- ], 2)) : _("", !0),
579
- l.$slots.footer ? (r(), d("div", {
746
+ p(o.$slots, "default")
747
+ ], 2)) : H("", !0),
748
+ o.$slots.footer ? (u(), m("div", {
580
749
  key: 1,
581
- class: a(u(s).e("footer"))
750
+ class: s(r(e).e("footer"))
582
751
  }, [
583
- b(l.$slots, "footer")
584
- ], 2)) : _("", !0)
752
+ p(o.$slots, "footer")
753
+ ], 2)) : H("", !0)
585
754
  ], 2));
586
755
  }
587
756
  });
588
757
  export {
589
- le as Breadcrumb,
590
- ne as BreadcrumbItem,
591
- ee as Menu,
592
- se as MenuItem,
593
- te as MenuItemGroup,
594
- ie as PageHeader,
595
- ce as Step,
596
- oe as Steps,
597
- ae as SubMenu,
598
- Z as TabPane,
599
- Y as Tabs
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
600
769
  };
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("@xto/core"),z=["onClick"],h=e.defineComponent({name:"XTabs",__name:"index",props:{modelValue:{default:""},type:{default:"line"},tabPosition:{default:"top"},addable:{type:Boolean,default:!1},closable:{type:Boolean,default:!1}},emits:["update:modelValue","tabClick","edit"],setup(s,{emit:r}){const t=s,a=r,l=C.useNamespace("tabs"),o=e.useSlots(),i=e.ref(t.modelValue);e.watch(()=>t.modelValue,n=>{i.value=n});const m=(n,u)=>{i.value=n,a("update:modelValue",n)};e.provide("tabs",{props:t,activeName:i,handleTabClick:m});const f=e.computed(()=>[l.b(),l.m(t.type),l.is(`position-${t.tabPosition}`)]),p=e.computed(()=>{var u;return(((u=o.default)==null?void 0:u.call(o))||[]).filter(c=>c.type&&c.type.name==="XTabPane").map(c=>{var d,k,B,y;return{name:((d=c.props)==null?void 0:d.name)||((k=c.props)==null?void 0:k.label),label:(B=c.props)==null?void 0:B.label,disabled:((y=c.props)==null?void 0:y.disabled)===!0}})});return(n,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(f.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("nav"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.name,class:e.normalizeClass([e.unref(l).e("item"),e.unref(l).em("item",i.value===c.name?"active":""),e.unref(l).is("disabled",c.disabled)]),onClick:d=>c.disabled?null:m(c.name)},e.toDisplayString(c.label),11,z))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(n.$slots,"default")],2)],2))}}),S={class:"x-tab-pane",role:"tabpanel"},E=e.defineComponent({name:"XTabPane",__name:"TabPane",props:{label:{},name:{},disabled:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},setup(s){const r=s,t=e.inject("tabs"),a=e.ref(!1),l=e.computed(()=>r.name||r.label),o=e.computed(()=>(t==null?void 0:t.activeName.value)===l.value);return e.watch(()=>t==null?void 0:t.activeName.value,()=>{o.value&&r.lazy&&!a.value&&(a.value=!0)},{immediate:!0}),o.value&&r.lazy&&(a.value=!0),(i,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[a.value||!s.lazy?e.renderSlot(i.$slots,"default",{key:0}):e.createCommentVNode("",!0)],512)),[[e.vShow,o.value]])}}),N=e.defineComponent({name:"XMenu",__name:"index",props:{modelValue:{default:""},mode:{default:"vertical"},collapse:{type:Boolean,default:!1},backgroundColor:{default:"#fff"},textColor:{default:"#303133"},activeTextColor:{default:"#409eff"},defaultOpeneds:{default:()=>[]},router:{type:Boolean}},emits:["update:modelValue","select","open","close"],setup(s,{emit:r}){const t=s,a=r,l=C.useNamespace("menu"),o=e.ref(t.modelValue),i=e.ref([...t.defaultOpeneds]);e.watch(()=>t.modelValue,c=>{o.value=c});const m=(c,d=[])=>{o.value=c,a("update:modelValue",c),a("select",c,d)},f=(c,d=[])=>{i.value.includes(c)||i.value.push(c),a("open",c,d)},p=(c,d=[])=>{const k=i.value.indexOf(c);k>-1&&i.value.splice(k,1),a("close",c,d)};e.provide("menu",{props:t,activeIndex:o,openedMenus:i,handleSelect:m,handleOpen:f,handleClose:p});const n=e.computed(()=>[l.b(),l.is("collapse",t.collapse),l.is(`mode-${t.mode}`)]),u=e.computed(()=>({backgroundColor:t.backgroundColor,color:t.textColor}));return(c,d)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(n.value),style:e.normalizeStyle(u.value)},[e.renderSlot(c.$slots,"default")],6))}}),b="x-menu-item",V=e.defineComponent({name:"XMenuItem",__name:"MenuItem",props:{index:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(s){const r=s,t=e.inject("menu");e.useSlots();const a=e.computed(()=>(t==null?void 0:t.activeIndex.value)===r.index),l=e.computed(()=>t==null?void 0:t.props.collapse),o=e.computed(()=>(t==null?void 0:t.props.mode)==="horizontal"),i=e.computed(()=>[b,{"is-active":a.value,"is-disabled":r.disabled,"is-horizontal":o.value,"is-collapse":l.value}]),m=e.computed(()=>a.value&&(t!=null&&t.props.activeTextColor)?{color:t.props.activeTextColor}:{}),f=()=>{r.disabled||r.index&&(t==null||t.handleSelect(r.index,[r.index]))};return(p,n)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(i.value),style:e.normalizeStyle(m.value),onClick:f},[e.createElementVNode("div",{class:e.normalizeClass(b+"__content")},[s.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(b+"__icon")},e.toDisplayString(s.icon),3)):p.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b+"__icon")},[e.renderSlot(p.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(b+"__text")},[e.renderSlot(p.$slots,"default")],2)],2)],6))}}),$={class:"x-menu-item-group"},g={class:"x-menu-item-group__title"},_=e.defineComponent({name:"XMenuItemGroup",__name:"MenuItemGroup",props:{title:{}},setup(s){return(r,t)=>(e.openBlock(),e.createElementBlock("li",$,[e.createElementVNode("div",g,e.toDisplayString(s.title),1),e.createElementVNode("ul",null,[e.renderSlot(r.$slots,"default")])]))}}),v="x-sub-menu",x=e.defineComponent({name:"XSubMenu",__name:"SubMenu",props:{index:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(s){const r=s,t=e.inject("menu"),a=e.inject("subMenu",null),l=e.ref(!1),o=e.computed(()=>!!a),i=e.computed(()=>t==null?void 0:t.props.collapse),m=e.computed(()=>(t==null?void 0:t.activeIndex.value)===r.index),f=e.computed(()=>[v,v+((t==null?void 0:t.props.mode)==="horizontal"?"--horizontal":"--vertical"),{"is-active":m.value,"is-opened":l.value,"is-disabled":r.disabled,"is-nested":o.value,"is-collapse":i.value}]),p=()=>{r.disabled||i.value||(l.value=!l.value)},n=()=>{r.disabled||((t==null?void 0:t.props.mode)==="horizontal"||i.value)&&(l.value=!0)},u=()=>{((t==null?void 0:t.props.mode)==="horizontal"||i.value)&&(l.value=!1)};return e.provide("subMenu",{isOpen:l,isNested:o}),(c,d)=>{var k;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(f.value),onMouseenter:n,onMouseleave:u},[e.createElementVNode("div",{class:e.normalizeClass(v+"__title"),onClick:p},[e.createElementVNode("div",{class:e.normalizeClass(v+"__content")},[s.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(v+"__icon")},e.toDisplayString(s.icon),3)):c.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(v+"__icon")},[e.renderSlot(c.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(v+"__text")},[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])],2),e.createElementVNode("span",{class:e.normalizeClass([v+"__arrow",{"is-open":l.value}])},[...d[0]||(d[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12"},[e.createElementVNode("path",{fill:"currentColor",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"})],-1)])],2)],2)],2),e.createVNode(e.Transition,{name:((k=e.unref(t))==null?void 0:k.props.mode)==="horizontal"?"zoom-in-top":"zoom-in-left"},{default:e.withCtx(()=>{var B;return[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([v+"__menu",{"is-horizontal":((B=e.unref(t))==null?void 0:B.props.mode)==="horizontal","is-collapse":i.value}])},[e.renderSlot(c.$slots,"default")],2),[[e.vShow,l.value]])]}),_:3},8,["name"])],34)}}}),T=e.defineComponent({name:"XBreadcrumb",__name:"index",props:{separator:{default:"/"},separatorIcon:{}},setup(s){const r=s,t=C.useNamespace("breadcrumb");e.provide("breadcrumb",{separator:e.computed(()=>r.separator),separatorIcon:e.computed(()=>r.separatorIcon)});const a=e.computed(()=>[t.b()]);return(l,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(a.value),"aria-label":"Breadcrumb"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(t).e("list"))},[e.renderSlot(l.$slots,"default")],2)],2))}}),M=["aria-current"],w=e.defineComponent({name:"XBreadcrumbItem",__name:"BreadcrumbItem",props:{to:{},replace:{type:Boolean},disabled:{type:Boolean}},emits:["click"],setup(s,{emit:r}){const t=s,a=r,l=C.useNamespace("breadcrumb"),o=e.inject("breadcrumb"),i=e.computed(()=>[l.e("item"),l.is("link",!!t.to&&!t.disabled),l.is("disabled",t.disabled)]),m=e.computed(()=>{var n;return((n=o==null?void 0:o.separator)==null?void 0:n.value)||"/"}),f=e.computed(()=>{var n;return(n=o==null?void 0:o.separatorIcon)==null?void 0:n.value}),p=n=>{t.disabled||(a("click",n),t.to&&typeof t.to=="string"&&(t.replace?window.location.replace(t.to):window.location.href=t.to))};return(n,u)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(i.value)},[s.to&&!s.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("link")),onClick:p},[e.renderSlot(n.$slots,"default")],2)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("text")),"aria-current":s.disabled?"page":void 0},[e.renderSlot(n.$slots,"default")],10,M)),e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("separator")),"aria-hidden":"true"},[f.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("separator-icon"))},e.toDisplayString(f.value),3)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(m.value),1)],64))],2)],2))}}),I=e.defineComponent({name:"XSteps",__name:"index",props:{active:{default:0},direction:{default:"horizontal"},simple:{type:Boolean,default:!1},finishStatus:{default:"finish"},processStatus:{default:"process"},alignCenter:{type:Boolean,default:!1},space:{}},emits:["change","update:active"],setup(s,{emit:r}){const t=s,a=r,l=C.useNamespace("steps"),o=e.ref(t.active),i=e.ref(0);e.watch(()=>t.active,u=>{o.value=u});const m=u=>{o.value=u,a("change",u),a("update:active",u)},f=u=>{i.value=u};e.provide("steps",{props:t,currentActive:o,stepCount:i,setCurrentActive:m,setStepCount:f});const p=e.computed(()=>[l.b(),l.m(t.direction),l.is("simple",t.simple),l.is("center",t.alignCenter)]),n=e.computed(()=>t.space?{"--steps-space":typeof t.space=="number"?`${t.space}px`:t.space}:{});return(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),style:e.normalizeStyle(n.value)},[e.renderSlot(u.$slots,"default")],6))}}),D=e.defineComponent({name:"XStep",__name:"Step",props:{title:{default:""},description:{default:""},icon:{},status:{}},setup(s){const r=s,t=C.useNamespace("step"),a=e.inject("steps"),l=e.ref(-1);e.onMounted(()=>{a&&(l.value=a.stepCount.value,a.setStepCount(a.stepCount.value+1))});const o=e.computed(()=>{var u,c,d;if(r.status)return r.status;const n=((u=a==null?void 0:a.currentActive)==null?void 0:u.value)??0;return l.value<n?((c=a==null?void 0:a.props)==null?void 0:c.finishStatus)||"finish":l.value===n?((d=a==null?void 0:a.props)==null?void 0:d.processStatus)||"process":"wait"}),i=e.computed(()=>{var n;return l.value===(((n=a==null?void 0:a.stepCount)==null?void 0:n.value)||0)-1}),m=e.computed(()=>l.value===0);e.computed(()=>({wait:"#c0c4cc",process:"#409eff",finish:"#67c23a",error:"#f56c6c",success:"#67c23a"})[o.value]||"#c0c4cc");const f=e.computed(()=>{var n;return[t.b(),t.is(o.value),t.is("last",i.value),t.m(((n=a==null?void 0:a.props)==null?void 0:n.direction)||"horizontal")]}),p=()=>{var n;l.value>-1&&((n=a==null?void 0:a.setCurrentActive)==null||n.call(a,l.value))};return(n,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(f.value),onClick:p},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("head"))},[m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(t).e("line"),e.unref(t).em("line","prev")])},null,2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("icon"))},[s.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("icon-inner"))},e.toDisplayString(s.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).e("icon-inner"))},[o.value==="finish"||o.value==="success"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("✓")],64)):o.value==="error"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("✕")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(l.value+1),1)],64))],2))],2),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(t).e("line"))},null,2))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("title"))},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])],2),s.description||n.$slots.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(t).e("description"))},[e.renderSlot(n.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(s.description),1)])],2)):e.createCommentVNode("",!0)],2)],2))}}),X=e.defineComponent({name:"XPageHeader",__name:"index",props:{title:{default:""},subtitle:{default:""},backText:{default:"返回"},showBack:{type:Boolean,default:!1}},emits:["back"],setup(s,{emit:r}){const t=r,a=C.useNamespace("page-header"),l=()=>{t("back")};return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("left"))},[s.showBack?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("back")),onClick:l},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("back-icon"))},"←",2),s.backText?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("back-text"))},e.toDisplayString(s.backText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])],2),s.subtitle||o.$slots.subtitle?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("subtitle"))},[e.renderSlot(o.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(s.subtitle),1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("extra"))},[e.renderSlot(o.$slots,"extra")],2)],2),o.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("content"))},[e.renderSlot(o.$slots,"default")],2)):e.createCommentVNode("",!0),o.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("footer"))},[e.renderSlot(o.$slots,"footer")],2)):e.createCommentVNode("",!0)],2))}});exports.Breadcrumb=T;exports.BreadcrumbItem=w;exports.Menu=N;exports.MenuItem=V;exports.MenuItemGroup=_;exports.PageHeader=X;exports.Step=D;exports.Steps=I;exports.SubMenu=x;exports.TabPane=E;exports.Tabs=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("@xto/core"),B=["onClick"],y=e.defineComponent({name:"XTabs",__name:"index",props:{modelValue:{default:""},type:{default:"line"},tabPosition:{default:"top"},addable:{type:Boolean,default:!1},closable:{type:Boolean,default:!1}},emits:["update:modelValue","tabClick","edit"],setup(o,{emit:s}){const a=o,l=s,t=f.useNamespace("tabs"),n=e.useSlots(),i=e.ref(a.modelValue);e.watch(()=>a.modelValue,c=>{i.value=c});const u=(c,m)=>{i.value=c,l("update:modelValue",c)};e.provide("tabs",{props:a,activeName:i,handleTabClick:u});const d=e.computed(()=>[t.b(),t.m(a.type),t.is(`position-${a.tabPosition}`)]),v=e.computed(()=>{var m;return(((m=n.default)==null?void 0:m.call(n))||[]).filter(r=>r.type&&r.type.name==="XTabPane").map(r=>{var p,M,z,V;return{name:((p=r.props)==null?void 0:p.name)||((M=r.props)==null?void 0:M.label),label:(z=r.props)==null?void 0:z.label,disabled:((V=r.props)==null?void 0:V.disabled)===!0}})});return(c,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("nav"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,r=>(e.openBlock(),e.createElementBlock("div",{key:r.name,class:e.normalizeClass([e.unref(t).e("item"),e.unref(t).em("item",i.value===r.name?"active":""),e.unref(t).is("disabled",r.disabled)]),onClick:p=>r.disabled?null:u(r.name)},e.toDisplayString(r.label),11,B))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(t).e("content"))},[e.renderSlot(c.$slots,"default")],2)],2))}}),S={class:"x-tab-pane",role:"tabpanel"},E=e.defineComponent({name:"XTabPane",__name:"TabPane",props:{label:{},name:{},disabled:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},setup(o){const s=o,a=e.inject("tabs"),l=e.ref(!1),t=e.computed(()=>s.name||s.label),n=e.computed(()=>(a==null?void 0:a.activeName.value)===t.value);return e.watch(()=>a==null?void 0:a.activeName.value,()=>{n.value&&s.lazy&&!l.value&&(l.value=!0)},{immediate:!0}),n.value&&s.lazy&&(l.value=!0),(i,u)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[l.value||!o.lazy?e.renderSlot(i.$slots,"default",{key:0}):e.createCommentVNode("",!0)],512)),[[e.vShow,n.value]])}}),N=e.defineComponent({name:"XMenu",__name:"index",props:{modelValue:{default:""},mode:{default:"vertical"},collapse:{type:Boolean,default:!1},backgroundColor:{default:"#fff"},textColor:{default:"#303133"},activeTextColor:{default:"#409eff"},defaultOpeneds:{default:()=>[]},router:{type:Boolean}},emits:["update:modelValue","select","open","close"],setup(o,{emit:s}){const a=o,l=s,t=f.useNamespace("menu"),n=e.ref(a.modelValue),i=e.ref([...a.defaultOpeneds]);e.watch(()=>a.modelValue,r=>{n.value=r});const u=(r,p=[])=>{n.value=r,l("update:modelValue",r),l("select",r,p)},d=(r,p=[])=>{i.value.includes(r)||i.value.push(r),l("open",r,p)},v=(r,p=[])=>{const M=i.value.indexOf(r);M>-1&&i.value.splice(M,1),l("close",r,p)};e.provide("menu",{props:a,activeIndex:n,openedMenus:i,handleSelect:u,handleOpen:d,handleClose:v});const c=e.computed(()=>[t.b(),t.is("collapse",a.collapse),t.is(`mode-${a.mode}`)]),m=e.computed(()=>({backgroundColor:a.backgroundColor,color:a.textColor}));return(r,p)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(c.value),style:e.normalizeStyle(m.value)},[e.renderSlot(r.$slots,"default")],6))}}),C={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"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",list:"M4 6h16M4 10h16M4 14h16M4 18h16",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",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",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",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",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",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",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",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"};function H(o){return o in C}const g=["stroke-width"],$=["d"],b=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(o){const s=o,a=f.useNamespace("icon"),l=e.computed(()=>typeof s.size=="number"?`${s.size}px`:s.size),t=e.computed(()=>({width:l.value,height:l.value,color:s.color})),n=e.computed(()=>({strokeWidth:s.strokeWidth})),i=e.computed(()=>[a.b(),a.is("spin",s.spin)]),u=e.computed(()=>s.name&&H(s.name)?C[s.name]:"");return(d,v)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(i.value),style:e.normalizeStyle(t.value)},[u.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":o.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(n.value)},[e.createElementVNode("path",{d:u.value},null,8,$)],12,g)):e.renderSlot(d.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(o.name),1)])],6))}}),k="x-menu-item",_=e.defineComponent({name:"XMenuItem",__name:"MenuItem",props:{index:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(o){const s=o,a=e.inject("menu");e.useSlots();const l=e.computed(()=>(a==null?void 0:a.activeIndex.value)===s.index),t=e.computed(()=>a==null?void 0:a.props.collapse),n=e.computed(()=>(a==null?void 0:a.props.mode)==="horizontal"),i=e.computed(()=>[k,{"is-active":l.value,"is-disabled":s.disabled,"is-horizontal":n.value,"is-collapse":t.value}]),u=e.computed(()=>l.value&&(a!=null&&a.props.activeTextColor)?{color:a.props.activeTextColor}:{}),d=()=>{s.disabled||s.index&&(a==null||a.handleSelect(s.index,[s.index]))};return(v,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(i.value),style:e.normalizeStyle(u.value),onClick:d},[e.createElementVNode("div",{class:e.normalizeClass(k+"__content")},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(k+"__icon")},[e.createVNode(e.unref(b),{name:o.icon,size:18},null,8,["name"])],2)):v.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(k+"__icon")},[e.renderSlot(v.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(k+"__text")},[e.renderSlot(v.$slots,"default")],2)],2)],6))}}),w={class:"x-menu-item-group"},x={class:"x-menu-item-group__title"},L=e.defineComponent({name:"XMenuItemGroup",__name:"MenuItemGroup",props:{title:{}},setup(o){return(s,a)=>(e.openBlock(),e.createElementBlock("li",w,[e.createElementVNode("div",x,e.toDisplayString(o.title),1),e.createElementVNode("ul",null,[e.renderSlot(s.$slots,"default")])]))}}),h="x-sub-menu",A=e.defineComponent({name:"XSubMenu",__name:"SubMenu",props:{index:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},icon:{}},setup(o){const s=o,a=e.inject("menu"),l=e.inject("subMenu",null),t=e.ref(!1),n=e.computed(()=>!!l),i=e.computed(()=>a==null?void 0:a.props.collapse),u=e.computed(()=>(a==null?void 0:a.activeIndex.value)===s.index),d=e.computed(()=>[h,h+((a==null?void 0:a.props.mode)==="horizontal"?"--horizontal":"--vertical"),{"is-active":u.value,"is-opened":t.value,"is-disabled":s.disabled,"is-nested":n.value,"is-collapse":i.value}]),v=()=>{s.disabled||i.value||(t.value=!t.value)},c=()=>{s.disabled||((a==null?void 0:a.props.mode)==="horizontal"||i.value)&&(t.value=!0)},m=()=>{((a==null?void 0:a.props.mode)==="horizontal"||i.value)&&(t.value=!1)};return e.provide("subMenu",{isOpen:t,isNested:n}),(r,p)=>{var M;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(d.value),onMouseenter:c,onMouseleave:m},[e.createElementVNode("div",{class:e.normalizeClass(h+"__title"),onClick:v},[e.createElementVNode("div",{class:e.normalizeClass(h+"__content")},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(h+"__icon")},[e.createVNode(e.unref(b),{name:o.icon,size:18},null,8,["name"])],2)):r.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(h+"__icon")},[e.renderSlot(r.$slots,"icon")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(h+"__text")},[e.renderSlot(r.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),e.createElementVNode("span",{class:e.normalizeClass([h+"__arrow",{"is-open":t.value}])},[...p[0]||(p[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12"},[e.createElementVNode("path",{fill:"currentColor",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"})],-1)])],2)],2)],2),e.createVNode(e.Transition,{name:((M=e.unref(a))==null?void 0:M.props.mode)==="horizontal"?"zoom-in-top":"zoom-in-left"},{default:e.withCtx(()=>{var z;return[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([h+"__menu",{"is-horizontal":((z=e.unref(a))==null?void 0:z.props.mode)==="horizontal","is-collapse":i.value}])},[e.renderSlot(r.$slots,"default")],2),[[e.vShow,t.value]])]}),_:3},8,["name"])],34)}}}),T=e.defineComponent({name:"XBreadcrumb",__name:"index",props:{separator:{default:"/"},separatorIcon:{}},setup(o){const s=o,a=f.useNamespace("breadcrumb");e.provide("breadcrumb",{separator:e.computed(()=>s.separator),separatorIcon:e.computed(()=>s.separatorIcon)});const l=e.computed(()=>[a.b()]);return(t,n)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(l.value),"aria-label":"Breadcrumb"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(a).e("list"))},[e.renderSlot(t.$slots,"default")],2)],2))}}),I=["aria-current"],D=e.defineComponent({name:"XBreadcrumbItem",__name:"BreadcrumbItem",props:{to:{},replace:{type:Boolean},disabled:{type:Boolean}},emits:["click"],setup(o,{emit:s}){const a=o,l=s,t=f.useNamespace("breadcrumb"),n=e.inject("breadcrumb"),i=e.computed(()=>[t.e("item"),t.is("link",!!a.to&&!a.disabled),t.is("disabled",a.disabled)]),u=e.computed(()=>{var c;return((c=n==null?void 0:n.separator)==null?void 0:c.value)||"/"}),d=e.computed(()=>{var c;return(c=n==null?void 0:n.separatorIcon)==null?void 0:c.value}),v=c=>{a.disabled||(l("click",c),a.to&&typeof a.to=="string"&&(a.replace?window.location.replace(a.to):window.location.href=a.to))};return(c,m)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(i.value)},[o.to&&!o.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("link")),onClick:v},[e.renderSlot(c.$slots,"default")],2)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(t).e("text")),"aria-current":o.disabled?"page":void 0},[e.renderSlot(c.$slots,"default")],10,I)),e.createElementVNode("span",{class:e.normalizeClass(e.unref(t).e("separator")),"aria-hidden":"true"},[d.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(t).e("separator-icon"))},e.toDisplayString(d.value),3)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(u.value),1)],64))],2)],2))}}),X=e.defineComponent({name:"XSteps",__name:"index",props:{active:{default:0},direction:{default:"horizontal"},simple:{type:Boolean,default:!1},finishStatus:{default:"finish"},processStatus:{default:"process"},alignCenter:{type:Boolean,default:!1},space:{}},emits:["change","update:active"],setup(o,{emit:s}){const a=o,l=s,t=f.useNamespace("steps"),n=e.ref(a.active),i=e.ref(0);e.watch(()=>a.active,m=>{n.value=m});const u=m=>{n.value=m,l("change",m),l("update:active",m)},d=m=>{i.value=m};e.provide("steps",{props:a,currentActive:n,stepCount:i,setCurrentActive:u,setStepCount:d});const v=e.computed(()=>[t.b(),t.m(a.direction),t.is("simple",a.simple),t.is("center",a.alignCenter)]),c=e.computed(()=>a.space?{"--steps-space":typeof a.space=="number"?`${a.space}px`:a.space}:{});return(m,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(v.value),style:e.normalizeStyle(c.value)},[e.renderSlot(m.$slots,"default")],6))}}),j=e.defineComponent({name:"XStep",__name:"Step",props:{title:{default:""},description:{default:""},icon:{},status:{}},setup(o){const s=o,a=f.useNamespace("step"),l=e.inject("steps"),t=e.ref(-1);e.onMounted(()=>{l&&(t.value=l.stepCount.value,l.setStepCount(l.stepCount.value+1))});const n=e.computed(()=>{var m,r,p;if(s.status)return s.status;const c=((m=l==null?void 0:l.currentActive)==null?void 0:m.value)??0;return t.value<c?((r=l==null?void 0:l.props)==null?void 0:r.finishStatus)||"finish":t.value===c?((p=l==null?void 0:l.props)==null?void 0:p.processStatus)||"process":"wait"}),i=e.computed(()=>{var c;return t.value===(((c=l==null?void 0:l.stepCount)==null?void 0:c.value)||0)-1}),u=e.computed(()=>t.value===0);e.computed(()=>({wait:"#c0c4cc",process:"#409eff",finish:"#67c23a",error:"#f56c6c",success:"#67c23a"})[n.value]||"#c0c4cc");const d=e.computed(()=>{var c;return[a.b(),a.is(n.value),a.is("last",i.value),a.m(((c=l==null?void 0:l.props)==null?void 0:c.direction)||"horizontal")]}),v=()=>{var c;t.value>-1&&((c=l==null?void 0:l.setCurrentActive)==null||c.call(l,t.value))};return(c,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),onClick:v},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("head"))},[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(a).e("line"),e.unref(a).em("line","prev")])},null,2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("icon"))},[o.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("icon-inner"))},e.toDisplayString(o.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("icon-inner"))},[n.value==="finish"||n.value==="success"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("✓")],64)):n.value==="error"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("✕")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(t.value+1),1)],64))],2))],2),i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("line"))},null,2))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),o.description||c.$slots.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("description"))},[e.renderSlot(c.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(o.description),1)])],2)):e.createCommentVNode("",!0)],2)],2))}}),P=e.defineComponent({name:"XPageHeader",__name:"index",props:{title:{default:""},subtitle:{default:""},backText:{default:"返回"},showBack:{type:Boolean,default:!1}},emits:["back"],setup(o,{emit:s}){const a=s,l=f.useNamespace("page-header"),t=()=>{a("back")};return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("main"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("left"))},[o.showBack?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("back")),onClick:t},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("back-icon"))},"←",2),o.backText?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("back-text"))},e.toDisplayString(o.backText),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("title"))},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),o.subtitle||n.$slots.subtitle?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("subtitle"))},[e.renderSlot(n.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(o.subtitle),1)])],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("extra"))},[e.renderSlot(n.$slots,"extra")],2)],2),n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0),n.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("footer"))},[e.renderSlot(n.$slots,"footer")],2)):e.createCommentVNode("",!0)],2))}});exports.Breadcrumb=T;exports.BreadcrumbItem=D;exports.Menu=N;exports.MenuItem=_;exports.MenuItemGroup=L;exports.PageHeader=P;exports.Step=j;exports.Steps=X;exports.SubMenu=A;exports.TabPane=E;exports.Tabs=y;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xto/navigation",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Xto Navigation - Navigation components",
5
5
  "main": "./lib/index.cjs",
6
6
  "module": "./es/index.mjs",
@@ -23,7 +23,8 @@
23
23
  "build": "vite build"
24
24
  },
25
25
  "dependencies": {
26
- "@xto/core": "^1.0.0"
26
+ "@xto/core": "^1.0.0",
27
+ "@xto/base": "^1.1.0"
27
28
  },
28
29
  "peerDependencies": {
29
30
  "vue": "^3.4.0"