@xto/navigation 1.3.1 → 1.4.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,6 +1,6 @@
1
- import { defineComponent as V, useSlots as G, ref as _, watch as O, provide as A, computed as v, openBlock as r, createElementBlock as u, normalizeClass as n, createElementVNode as M, unref as i, Fragment as I, renderList as q, toDisplayString as H, renderSlot as k, inject as B, withDirectives as D, createCommentVNode as C, vShow as K, normalizeStyle as X, createTextVNode as w, createVNode as T, Transition as W, withCtx as j, onMounted as J } from "vue";
2
- import { useNamespace as $ } from "@xto/core";
3
- const Q = ["onClick"], n0 = /* @__PURE__ */ V({
1
+ import { defineComponent as V, useSlots as j, ref as w, watch as S, provide as X, computed as b, openBlock as u, createElementBlock as m, normalizeClass as o, createElementVNode as z, unref as n, Fragment as O, renderList as K, toDisplayString as H, renderSlot as y, inject as T, withDirectives as N, createCommentVNode as C, vShow as q, normalizeStyle as I, createTextVNode as A, createVNode as R, Transition as Y, withCtx as U, onMounted as W, createBlock as D, nextTick as F, onBeforeUnmount as J, withModifiers as Z } from "vue";
2
+ import { useNamespace as x } from "@xto/core";
3
+ const ee = ["onClick"], pe = /* @__PURE__ */ V({
4
4
  name: "XTabs",
5
5
  __name: "index",
6
6
  props: {
@@ -12,66 +12,66 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
12
12
  closable: { type: Boolean, default: !1 }
13
13
  },
14
14
  emits: ["update:modelValue", "update:activeKey", "tabClick", "edit"],
15
- setup(s, { emit: t }) {
16
- const e = s, a = t, l = $("tabs"), o = G(), m = _(e.modelValue ?? e.activeKey ?? "");
17
- O([() => e.modelValue, () => e.activeKey], ([c, f]) => {
18
- const p = c ?? f;
19
- p !== void 0 && (m.value = p);
15
+ setup(t, { emit: v }) {
16
+ const e = t, l = v, a = x("tabs"), s = j(), h = w(e.modelValue ?? e.activeKey ?? "");
17
+ S([() => e.modelValue, () => e.activeKey], ([r, c]) => {
18
+ const d = r ?? c;
19
+ d !== void 0 && (h.value = d);
20
20
  });
21
- const h = (c, f) => {
22
- m.value = c, e.modelValue !== void 0 && a("update:modelValue", c), e.activeKey !== void 0 && a("update:activeKey", c), e.modelValue === void 0 && e.activeKey === void 0 && a("update:modelValue", c);
21
+ const p = (r, c) => {
22
+ h.value = r, e.modelValue !== void 0 && l("update:modelValue", r), e.activeKey !== void 0 && l("update:activeKey", r), e.modelValue === void 0 && e.activeKey === void 0 && l("update:modelValue", r);
23
23
  };
24
- A("tabs", {
24
+ X("tabs", {
25
25
  props: e,
26
- activeName: m,
27
- handleTabClick: h
26
+ activeName: h,
27
+ handleTabClick: p
28
28
  });
29
- const b = v(() => [
30
- l.b(),
31
- l.m(e.type),
32
- l.is(`position-${e.tabPosition}`)
33
- ]), y = v(() => {
34
- var f;
35
- return (((f = o.default) == null ? void 0 : f.call(o)) || []).filter((p) => p.type && p.type.name === "XTabPane").map((p) => {
36
- var d, z, g, L, N, P, E;
29
+ const M = b(() => [
30
+ a.b(),
31
+ a.m(e.type),
32
+ a.is(`position-${e.tabPosition}`)
33
+ ]), k = b(() => {
34
+ var c;
35
+ return (((c = s.default) == null ? void 0 : c.call(s)) || []).filter((d) => d.type && d.type.name === "XTabPane").map((d) => {
36
+ var i, f, g, $, B, P, G;
37
37
  return {
38
- name: ((d = p.props) == null ? void 0 : d.name) || ((z = p.props) == null ? void 0 : z.paneKey) || ((g = p.props) == null ? void 0 : g.label) || ((L = p.props) == null ? void 0 : L.tab),
39
- label: ((N = p.props) == null ? void 0 : N.label) || ((P = p.props) == null ? void 0 : P.tab),
40
- disabled: ((E = p.props) == null ? void 0 : E.disabled) === !0
38
+ name: ((i = d.props) == null ? void 0 : i.name) || ((f = d.props) == null ? void 0 : f.paneKey) || ((g = d.props) == null ? void 0 : g.label) || (($ = d.props) == null ? void 0 : $.tab),
39
+ label: ((B = d.props) == null ? void 0 : B.label) || ((P = d.props) == null ? void 0 : P.tab),
40
+ disabled: ((G = d.props) == null ? void 0 : G.disabled) === !0
41
41
  };
42
42
  });
43
43
  });
44
- return (c, f) => (r(), u("div", {
45
- class: n(b.value)
44
+ return (r, c) => (u(), m("div", {
45
+ class: o(M.value)
46
46
  }, [
47
- M("div", {
48
- class: n(i(l).e("header"))
47
+ z("div", {
48
+ class: o(n(a).e("header"))
49
49
  }, [
50
- M("div", {
51
- class: n(i(l).e("nav"))
50
+ z("div", {
51
+ class: o(n(a).e("nav"))
52
52
  }, [
53
- (r(!0), u(I, null, q(y.value, (p) => (r(), u("div", {
54
- key: p.name,
55
- class: n([
56
- i(l).e("item"),
57
- i(l).em("item", m.value === p.name ? "active" : ""),
58
- i(l).is("disabled", p.disabled)
53
+ (u(!0), m(O, null, K(k.value, (d) => (u(), m("div", {
54
+ key: d.name,
55
+ class: o([
56
+ n(a).e("item"),
57
+ n(a).em("item", h.value === d.name ? "active" : ""),
58
+ n(a).is("disabled", d.disabled)
59
59
  ]),
60
- onClick: (d) => p.disabled ? null : h(p.name)
61
- }, H(p.label), 11, Q))), 128))
60
+ onClick: (i) => d.disabled ? null : p(d.name)
61
+ }, H(d.label), 11, ee))), 128))
62
62
  ], 2)
63
63
  ], 2),
64
- M("div", {
65
- class: n(i(l).e("content"))
64
+ z("div", {
65
+ class: o(n(a).e("content"))
66
66
  }, [
67
- k(c.$slots, "default")
67
+ y(r.$slots, "default")
68
68
  ], 2)
69
69
  ], 2));
70
70
  }
71
- }), U = {
71
+ }), ae = {
72
72
  class: "x-tab-pane",
73
73
  role: "tabpanel"
74
- }, c0 = /* @__PURE__ */ V({
74
+ }, Me = /* @__PURE__ */ V({
75
75
  name: "XTabPane",
76
76
  __name: "TabPane",
77
77
  props: {
@@ -83,17 +83,17 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
83
83
  closable: { type: Boolean, default: !1 },
84
84
  lazy: { type: Boolean, default: !1 }
85
85
  },
86
- setup(s) {
87
- const t = s, e = B("tabs"), a = _(!1), l = v(() => t.name || t.paneKey || t.label || t.tab), o = v(() => (e == null ? void 0 : e.activeName.value) === l.value);
88
- return O(() => e == null ? void 0 : e.activeName.value, () => {
89
- o.value && t.lazy && !a.value && (a.value = !0);
90
- }, { immediate: !0 }), o.value && t.lazy && (a.value = !0), (m, h) => D((r(), u("div", U, [
91
- a.value || !s.lazy ? k(m.$slots, "default", { key: 0 }) : C("", !0)
86
+ setup(t) {
87
+ const v = t, e = T("tabs"), l = w(!1), a = b(() => v.name || v.paneKey || v.label || v.tab), s = b(() => (e == null ? void 0 : e.activeName.value) === a.value);
88
+ return S(() => e == null ? void 0 : e.activeName.value, () => {
89
+ s.value && v.lazy && !l.value && (l.value = !0);
90
+ }, { immediate: !0 }), s.value && v.lazy && (l.value = !0), (h, p) => N((u(), m("div", ae, [
91
+ l.value || !t.lazy ? y(h.$slots, "default", { key: 0 }) : C("", !0)
92
92
  ], 512)), [
93
- [K, o.value]
93
+ [q, s.value]
94
94
  ]);
95
95
  }
96
- }), i0 = /* @__PURE__ */ V({
96
+ }), be = /* @__PURE__ */ V({
97
97
  name: "XMenu",
98
98
  __name: "index",
99
99
  props: {
@@ -108,50 +108,50 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
108
108
  router: { type: Boolean }
109
109
  },
110
110
  emits: ["update:modelValue", "update:openeds", "select", "open", "close"],
111
- setup(s, { emit: t }) {
112
- const e = s, a = t, l = $("menu"), o = _(e.modelValue), m = _([...e.defaultOpeneds]), h = v({
113
- get: () => e.openeds ?? m.value,
114
- set: (d) => {
115
- m.value = d, a("update:openeds", d);
111
+ setup(t, { emit: v }) {
112
+ const e = t, l = v, a = x("menu"), s = w(e.modelValue), h = w([...e.defaultOpeneds]), p = b({
113
+ get: () => e.openeds ?? h.value,
114
+ set: (i) => {
115
+ h.value = i, l("update:openeds", i);
116
116
  }
117
117
  });
118
- O(() => e.modelValue, (d) => {
119
- o.value = d;
120
- }), A("menu", {
118
+ S(() => e.modelValue, (i) => {
119
+ s.value = i;
120
+ }), X("menu", {
121
121
  props: e,
122
- activeIndex: o,
123
- openedMenus: h,
124
- handleSelect: (d, z = []) => {
125
- o.value = d, a("update:modelValue", d), a("select", d, z);
122
+ activeIndex: s,
123
+ openedMenus: p,
124
+ handleSelect: (i, f = []) => {
125
+ s.value = i, l("update:modelValue", i), l("select", i, f);
126
126
  },
127
- handleOpen: (d, z = []) => {
128
- h.value.includes(d) || (h.value = [...h.value, d]), a("open", d, z);
127
+ handleOpen: (i, f = []) => {
128
+ p.value.includes(i) || (p.value = [...p.value, i]), l("open", i, f);
129
129
  },
130
- handleClose: (d, z = []) => {
131
- const g = h.value.indexOf(d);
130
+ handleClose: (i, f = []) => {
131
+ const g = p.value.indexOf(i);
132
132
  if (g > -1) {
133
- const L = [...h.value];
134
- L.splice(g, 1), h.value = L;
133
+ const $ = [...p.value];
134
+ $.splice(g, 1), p.value = $;
135
135
  }
136
- a("close", d, z);
136
+ l("close", i, f);
137
137
  }
138
138
  });
139
- const f = v(() => [
140
- l.b(),
141
- l.is("collapse", e.collapse),
142
- l.is(`mode-${e.mode}`)
143
- ]), p = v(() => ({
139
+ const c = b(() => [
140
+ a.b(),
141
+ a.is("collapse", e.collapse),
142
+ a.is(`mode-${e.mode}`)
143
+ ]), d = b(() => ({
144
144
  backgroundColor: e.backgroundColor,
145
145
  color: e.textColor
146
146
  }));
147
- return (d, z) => (r(), u("ul", {
148
- class: n(f.value),
149
- style: X(p.value)
147
+ return (i, f) => (u(), m("ul", {
148
+ class: o(c.value),
149
+ style: I(d.value)
150
150
  }, [
151
- k(d.$slots, "default")
151
+ y(i.$slots, "default")
152
152
  ], 6));
153
153
  }
154
- }), F = {
154
+ }), Q = {
155
155
  // 箭头类
156
156
  "arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
157
157
  "arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
@@ -274,12 +274,88 @@ const Q = ["onClick"], n0 = /* @__PURE__ */ V({
274
274
  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",
275
275
  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",
276
276
  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",
277
- skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z"
277
+ skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",
278
+ // Markdown 编辑器类
279
+ heading: "M4 6h16M4 12h8m-8 6h16",
280
+ // 标题
281
+ bold: "M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",
282
+ // 粗体
283
+ italic: "M10 4h4m-2 0v16m-4 0h8",
284
+ // 斜体
285
+ strikethrough: "M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z",
286
+ // 删除线
287
+ "list-bullet": "M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12",
288
+ // 无序列表
289
+ "list-number": "M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12",
290
+ // 有序列表
291
+ "link-text": "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",
292
+ // 链接
293
+ "image-insert": "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",
294
+ // 图片
295
+ "code-inline": "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",
296
+ // 代码
297
+ "divider-h": "M4 12h16",
298
+ // 分割线
299
+ quote: "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",
300
+ // 引用
301
+ "code-block": "M4 4h16v16H4z M8 8h8M8 12h8M8 16h4",
302
+ // 代码块
303
+ // 排序和展开类
304
+ "sort-up": "M12 5v14m-7-7l7-7 7 7",
305
+ // 向上排序
306
+ "sort-down": "M12 19V5m7 7l-7 7-7-7",
307
+ // 向下排序
308
+ "chevron-down": "M6 9l6 6 6-6",
309
+ // 向下展开
310
+ "chevron-right": "M9 18l6-6-6-6",
311
+ // 向右展开
312
+ "chevron-up": "M18 15l-6-6-6 6",
313
+ // 向上收起
314
+ "chevron-left": "M15 18l-6-6 6-6",
315
+ // 向左收起
316
+ // 移动类
317
+ "move-up": "M5 15l7-7 7 7",
318
+ // 上移
319
+ "move-down": "M19 9l-7 7-7-7",
320
+ // 下移
321
+ "back-top": "M12 19V5m-7 7l7-7 7 7",
322
+ // 回到顶部
323
+ // 下拉箭头
324
+ "dropdown-arrow": "M6 9l6 6 6-6",
325
+ // 关闭/错误类
326
+ "close-circle": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
327
+ // 圆形关闭
328
+ "close-bold": "M6 18L18 6M6 6l12 12",
329
+ // 加粗关闭
330
+ // 圆形状态类
331
+ "check-circle": "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
332
+ // 圆形勾选
333
+ "info-circle": "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
334
+ // 圆形信息
335
+ "warning-circle": "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",
336
+ // 圆形警告
337
+ // 返回类
338
+ "back-arrow": "M19 12H5m0 0l7 7m-7-7l7-7",
339
+ // 返回箭头
340
+ // 日历导航类
341
+ "d-arrow-left": "M11 17l-5-5 5-5M18 17l-5-5 5-5",
342
+ // 双左箭头
343
+ "d-arrow-right": "M6 7l5 5-5 5M13 7l5 5-5 5",
344
+ // 双右箭头
345
+ // 方向箭头类
346
+ left: "M15 19l-7-7 7-7",
347
+ // 左箭头
348
+ right: "M9 5l7 7-7 7",
349
+ // 右箭头
350
+ down: "M19 9l-7 7-7-7",
351
+ // 下箭头
352
+ up: "M5 15l7-7 7 7"
353
+ // 上箭头
278
354
  };
279
- function Y(s) {
280
- return s in F;
355
+ function le(t) {
356
+ return t in Q;
281
357
  }
282
- const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
358
+ const te = ["aria-hidden", "aria-label"], se = ["stroke-width"], ne = ["d"], _ = /* @__PURE__ */ V({
283
359
  name: "XIcon",
284
360
  __name: "index",
285
361
  props: {
@@ -289,38 +365,46 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
289
365
  spin: { type: Boolean, default: !1 },
290
366
  strokeWidth: { default: 2 }
291
367
  },
292
- setup(s) {
293
- const t = s, e = $("icon"), a = v(() => typeof t.size == "number" ? `${t.size}px` : t.size), l = v(() => ({
368
+ setup(t, { expose: v }) {
369
+ const e = t, l = x("icon"), a = b(() => typeof e.size == "number" ? `${e.size}px` : e.size), s = b(() => ({
294
370
  width: a.value,
295
371
  height: a.value,
296
- color: t.color
297
- })), o = v(() => ({
298
- strokeWidth: t.strokeWidth
299
- })), m = v(() => [
300
- e.b(),
301
- e.is("spin", t.spin)
302
- ]), h = v(() => t.name && Y(t.name) ? F[t.name] : "");
303
- return (b, y) => (r(), u("span", {
304
- class: n(m.value),
305
- style: X(l.value)
372
+ color: e.color
373
+ })), h = b(() => ({
374
+ strokeWidth: e.strokeWidth
375
+ })), p = b(() => [
376
+ l.b(),
377
+ l.is("spin", e.spin)
378
+ ]), M = b(() => e.name && le(e.name) ? Q[e.name] : "");
379
+ return v({
380
+ iconSize: a,
381
+ iconStyle: s,
382
+ iconPath: M
383
+ }), (k, r) => (u(), m("span", {
384
+ class: o(p.value),
385
+ style: I(s.value),
386
+ "aria-hidden": !t.name,
387
+ "aria-label": t.name,
388
+ role: "img"
306
389
  }, [
307
- h.value ? (r(), u("svg", {
390
+ M.value ? (u(), m("svg", {
308
391
  key: 0,
309
392
  viewBox: "0 0 24 24",
310
393
  fill: "none",
311
394
  stroke: "currentColor",
312
- "stroke-width": s.strokeWidth,
395
+ "stroke-width": t.strokeWidth,
313
396
  "stroke-linecap": "round",
314
397
  "stroke-linejoin": "round",
315
- style: X(o.value)
398
+ style: I(h.value),
399
+ "aria-hidden": "true"
316
400
  }, [
317
- M("path", { d: h.value }, null, 8, e0)
318
- ], 12, Z)) : k(b.$slots, "default", { key: 1 }, () => [
319
- w(H(s.name), 1)
401
+ z("path", { d: M.value }, null, 8, ne)
402
+ ], 12, se)) : y(k.$slots, "default", { key: 1 }, () => [
403
+ A(H(t.name), 1)
320
404
  ])
321
- ], 6));
405
+ ], 14, te));
322
406
  }
323
- }), S = "x-menu-item", r0 = /* @__PURE__ */ V({
407
+ }), E = "x-menu-item", ze = /* @__PURE__ */ V({
324
408
  name: "XMenuItem",
325
409
  __name: "MenuItem",
326
410
  props: {
@@ -328,65 +412,65 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
328
412
  disabled: { type: Boolean, default: !1 },
329
413
  icon: {}
330
414
  },
331
- setup(s) {
332
- const t = s, e = B("menu");
333
- G();
334
- const a = v(() => (e == null ? void 0 : e.activeIndex.value) === t.index), l = v(() => e == null ? void 0 : e.props.collapse), o = v(() => (e == null ? void 0 : e.props.mode) === "horizontal"), m = v(() => [
335
- S,
415
+ setup(t) {
416
+ const v = t, e = T("menu");
417
+ j();
418
+ const l = b(() => (e == null ? void 0 : e.activeIndex.value) === v.index), a = b(() => e == null ? void 0 : e.props.collapse), s = b(() => (e == null ? void 0 : e.props.mode) === "horizontal"), h = b(() => [
419
+ E,
336
420
  {
337
- "is-active": a.value,
338
- "is-disabled": t.disabled,
339
- "is-horizontal": o.value,
340
- "is-collapse": l.value
421
+ "is-active": l.value,
422
+ "is-disabled": v.disabled,
423
+ "is-horizontal": s.value,
424
+ "is-collapse": a.value
341
425
  }
342
- ]), h = v(() => a.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), b = () => {
343
- t.disabled || t.index && (e == null || e.handleSelect(t.index, [t.index]));
426
+ ]), p = b(() => l.value && (e != null && e.props.activeTextColor) ? { color: e.props.activeTextColor } : {}), M = () => {
427
+ v.disabled || v.index && (e == null || e.handleSelect(v.index, [v.index]));
344
428
  };
345
- return (y, c) => (r(), u("li", {
346
- class: n(m.value),
347
- style: X(h.value),
348
- onClick: b
429
+ return (k, r) => (u(), m("li", {
430
+ class: o(h.value),
431
+ style: I(p.value),
432
+ onClick: M
349
433
  }, [
350
- M("div", {
351
- class: n(S + "__content")
434
+ z("div", {
435
+ class: o(E + "__content")
352
436
  }, [
353
- s.icon ? (r(), u("span", {
437
+ t.icon ? (u(), m("span", {
354
438
  key: 0,
355
- class: n(S + "__icon")
439
+ class: o(E + "__icon")
356
440
  }, [
357
- T(i(R), {
358
- name: s.icon,
441
+ R(n(_), {
442
+ name: t.icon,
359
443
  size: 18
360
444
  }, null, 8, ["name"])
361
- ], 2)) : y.$slots.icon ? (r(), u("span", {
445
+ ], 2)) : k.$slots.icon ? (u(), m("span", {
362
446
  key: 1,
363
- class: n(S + "__icon")
447
+ class: o(E + "__icon")
364
448
  }, [
365
- k(y.$slots, "icon")
449
+ y(k.$slots, "icon")
366
450
  ], 2)) : C("", !0),
367
- M("span", {
368
- class: n(S + "__text")
451
+ z("span", {
452
+ class: o(E + "__text")
369
453
  }, [
370
- k(y.$slots, "default")
454
+ y(k.$slots, "default")
371
455
  ], 2)
372
456
  ], 2)
373
457
  ], 6));
374
458
  }
375
- }), a0 = { class: "x-menu-item-group" }, l0 = { class: "x-menu-item-group__title" }, u0 = /* @__PURE__ */ V({
459
+ }), oe = { class: "x-menu-item-group" }, ie = { class: "x-menu-item-group__title" }, ke = /* @__PURE__ */ V({
376
460
  name: "XMenuItemGroup",
377
461
  __name: "MenuItemGroup",
378
462
  props: {
379
463
  title: {}
380
464
  },
381
- setup(s) {
382
- return (t, e) => (r(), u("li", a0, [
383
- M("div", l0, H(s.title), 1),
384
- M("ul", null, [
385
- k(t.$slots, "default")
465
+ setup(t) {
466
+ return (v, e) => (u(), m("li", oe, [
467
+ z("div", ie, H(t.title), 1),
468
+ z("ul", null, [
469
+ y(v.$slots, "default")
386
470
  ])
387
471
  ]));
388
472
  }
389
- }), x = "x-sub-menu", d0 = /* @__PURE__ */ V({
473
+ }), L = "x-sub-menu", ye = /* @__PURE__ */ V({
390
474
  name: "XSubMenu",
391
475
  __name: "SubMenu",
392
476
  props: {
@@ -395,76 +479,83 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
395
479
  disabled: { type: Boolean, default: !1 },
396
480
  icon: {}
397
481
  },
398
- setup(s) {
399
- const t = s, e = B("menu"), a = B("subMenu", null), l = _(!1), o = v(() => !!a), m = v(() => e == null ? void 0 : e.props.collapse), h = v(() => {
400
- var d, z;
401
- return m.value ? l.value : ((z = (d = e == null ? void 0 : e.openedMenus) == null ? void 0 : d.value) == null ? void 0 : z.includes(t.index)) ?? !1;
402
- }), b = v(() => (e == null ? void 0 : e.activeIndex.value) === t.index), y = v(() => [
403
- x,
404
- x + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
482
+ setup(t) {
483
+ const v = t, e = T("menu"), l = T("subMenu", null), a = w(!1), s = b(() => !!l), h = b(() => e == null ? void 0 : e.props.collapse);
484
+ S(
485
+ () => e == null ? void 0 : e.activeIndex.value,
486
+ () => {
487
+ (e == null ? void 0 : e.props.mode) === "horizontal" && (a.value = !1);
488
+ }
489
+ );
490
+ const p = b(() => {
491
+ var i, f;
492
+ return h.value ? a.value : ((f = (i = e == null ? void 0 : e.openedMenus) == null ? void 0 : i.value) == null ? void 0 : f.includes(v.index)) ?? !1;
493
+ }), M = b(() => (e == null ? void 0 : e.activeIndex.value) === v.index), k = b(() => [
494
+ L,
495
+ L + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
405
496
  {
406
- "is-active": b.value,
407
- "is-opened": h.value,
408
- "is-disabled": t.disabled,
409
- "is-nested": o.value,
410
- "is-collapse": m.value
497
+ "is-active": M.value,
498
+ "is-opened": p.value,
499
+ "is-disabled": v.disabled,
500
+ "is-nested": s.value,
501
+ "is-collapse": h.value
411
502
  }
412
- ]), c = () => {
413
- var d, z;
414
- t.disabled || m.value || (h.value ? (d = e == null ? void 0 : e.handleClose) == null || d.call(e, t.index) : (z = e == null ? void 0 : e.handleOpen) == null || z.call(e, t.index));
415
- }, f = () => {
416
- t.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || m.value) && (l.value = !0);
417
- }, p = () => {
418
- ((e == null ? void 0 : e.props.mode) === "horizontal" || m.value) && (l.value = !1);
503
+ ]), r = () => {
504
+ var i, f;
505
+ v.disabled || h.value || (p.value ? (i = e == null ? void 0 : e.handleClose) == null || i.call(e, v.index) : (f = e == null ? void 0 : e.handleOpen) == null || f.call(e, v.index));
506
+ }, c = () => {
507
+ v.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || h.value) && (a.value = !0);
508
+ }, d = () => {
509
+ ((e == null ? void 0 : e.props.mode) === "horizontal" || h.value) && (a.value = !1);
419
510
  };
420
- return A("subMenu", {
421
- isOpen: h,
422
- isNested: o,
423
- index: t.index
424
- }), (d, z) => {
511
+ return X("subMenu", {
512
+ isOpen: p,
513
+ isNested: s,
514
+ index: v.index
515
+ }), (i, f) => {
425
516
  var g;
426
- return r(), u("li", {
427
- class: n(y.value),
428
- onMouseenter: f,
429
- onMouseleave: p
517
+ return u(), m("li", {
518
+ class: o(k.value),
519
+ onMouseenter: c,
520
+ onMouseleave: d
430
521
  }, [
431
- M("div", {
432
- class: n(x + "__title"),
433
- onClick: c
522
+ z("div", {
523
+ class: o(L + "__title"),
524
+ onClick: r
434
525
  }, [
435
- M("div", {
436
- class: n(x + "__content")
526
+ z("div", {
527
+ class: o(L + "__content")
437
528
  }, [
438
- s.icon ? (r(), u("span", {
529
+ t.icon ? (u(), m("span", {
439
530
  key: 0,
440
- class: n(x + "__icon")
531
+ class: o(L + "__icon")
441
532
  }, [
442
- T(i(R), {
443
- name: s.icon,
533
+ R(n(_), {
534
+ name: t.icon,
444
535
  size: 18
445
536
  }, null, 8, ["name"])
446
- ], 2)) : d.$slots.icon ? (r(), u("span", {
537
+ ], 2)) : i.$slots.icon ? (u(), m("span", {
447
538
  key: 1,
448
- class: n(x + "__icon")
539
+ class: o(L + "__icon")
449
540
  }, [
450
- k(d.$slots, "icon")
541
+ y(i.$slots, "icon")
451
542
  ], 2)) : C("", !0),
452
- M("span", {
453
- class: n(x + "__text")
543
+ z("span", {
544
+ class: o(L + "__text")
454
545
  }, [
455
- k(d.$slots, "title", {}, () => [
456
- w(H(s.title), 1)
546
+ y(i.$slots, "title", {}, () => [
547
+ A(H(t.title), 1)
457
548
  ])
458
549
  ], 2),
459
- M("span", {
460
- class: n([x + "__arrow", { "is-open": h.value }])
461
- }, [...z[0] || (z[0] = [
462
- M("svg", {
550
+ z("span", {
551
+ class: o([L + "__arrow", { "is-open": p.value }])
552
+ }, [...f[0] || (f[0] = [
553
+ z("svg", {
463
554
  viewBox: "0 0 1024 1024",
464
555
  width: "12",
465
556
  height: "12"
466
557
  }, [
467
- M("path", {
558
+ z("path", {
468
559
  fill: "currentColor",
469
560
  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"
470
561
  })
@@ -472,18 +563,18 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
472
563
  ])], 2)
473
564
  ], 2)
474
565
  ], 2),
475
- T(W, {
476
- name: ((g = i(e)) == null ? void 0 : g.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
566
+ R(Y, {
567
+ name: ((g = n(e)) == null ? void 0 : g.props.mode) === "horizontal" ? "zoom-in-top" : "zoom-in-left"
477
568
  }, {
478
- default: j(() => {
479
- var L;
569
+ default: U(() => {
570
+ var $;
480
571
  return [
481
- D(M("ul", {
482
- class: n([x + "__menu", { "is-horizontal": ((L = i(e)) == null ? void 0 : L.props.mode) === "horizontal", "is-collapse": m.value }])
572
+ N(z("ul", {
573
+ class: o([L + "__menu", { "is-horizontal": (($ = n(e)) == null ? void 0 : $.props.mode) === "horizontal", "is-collapse": h.value }])
483
574
  }, [
484
- k(d.$slots, "default")
575
+ y(i.$slots, "default")
485
576
  ], 2), [
486
- [K, h.value]
577
+ [q, p.value]
487
578
  ])
488
579
  ];
489
580
  }),
@@ -492,32 +583,32 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
492
583
  ], 34);
493
584
  };
494
585
  }
495
- }), v0 = /* @__PURE__ */ V({
586
+ }), ge = /* @__PURE__ */ V({
496
587
  name: "XBreadcrumb",
497
588
  __name: "index",
498
589
  props: {
499
590
  separator: { default: "/" },
500
591
  separatorIcon: {}
501
592
  },
502
- setup(s) {
503
- const t = s, e = $("breadcrumb");
504
- A("breadcrumb", {
505
- separator: v(() => t.separator),
506
- separatorIcon: v(() => t.separatorIcon)
593
+ setup(t) {
594
+ const v = t, e = x("breadcrumb");
595
+ X("breadcrumb", {
596
+ separator: b(() => v.separator),
597
+ separatorIcon: b(() => v.separatorIcon)
507
598
  });
508
- const a = v(() => [e.b()]);
509
- return (l, o) => (r(), u("nav", {
510
- class: n(a.value),
599
+ const l = b(() => [e.b()]);
600
+ return (a, s) => (u(), m("nav", {
601
+ class: o(l.value),
511
602
  "aria-label": "Breadcrumb"
512
603
  }, [
513
- M("ol", {
514
- class: n(i(e).e("list"))
604
+ z("ol", {
605
+ class: o(n(e).e("list"))
515
606
  }, [
516
- k(l.$slots, "default")
607
+ y(a.$slots, "default")
517
608
  ], 2)
518
609
  ], 2));
519
610
  }
520
- }), s0 = ["aria-current"], m0 = /* @__PURE__ */ V({
611
+ }), ce = ["aria-current"], we = /* @__PURE__ */ V({
521
612
  name: "XBreadcrumbItem",
522
613
  __name: "BreadcrumbItem",
523
614
  props: {
@@ -526,50 +617,50 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
526
617
  disabled: { type: Boolean }
527
618
  },
528
619
  emits: ["click"],
529
- setup(s, { emit: t }) {
530
- const e = s, a = t, l = $("breadcrumb"), o = B("breadcrumb"), m = v(() => [
531
- l.e("item"),
532
- l.is("link", !!e.to && !e.disabled),
533
- l.is("disabled", e.disabled)
534
- ]), h = v(() => {
535
- var c;
536
- return ((c = o == null ? void 0 : o.separator) == null ? void 0 : c.value) || "/";
537
- }), b = v(() => {
538
- var c;
539
- return (c = o == null ? void 0 : o.separatorIcon) == null ? void 0 : c.value;
540
- }), y = (c) => {
541
- e.disabled || (a("click", c), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
620
+ setup(t, { emit: v }) {
621
+ const e = t, l = v, a = x("breadcrumb"), s = T("breadcrumb"), h = b(() => [
622
+ a.e("item"),
623
+ a.is("link", !!e.to && !e.disabled),
624
+ a.is("disabled", e.disabled)
625
+ ]), p = b(() => {
626
+ var r;
627
+ return ((r = s == null ? void 0 : s.separator) == null ? void 0 : r.value) || "/";
628
+ }), M = b(() => {
629
+ var r;
630
+ return (r = s == null ? void 0 : s.separatorIcon) == null ? void 0 : r.value;
631
+ }), k = (r) => {
632
+ e.disabled || (l("click", r), e.to && typeof e.to == "string" && (e.replace ? window.location.replace(e.to) : window.location.href = e.to));
542
633
  };
543
- return (c, f) => (r(), u("li", {
544
- class: n(m.value)
634
+ return (r, c) => (u(), m("li", {
635
+ class: o(h.value)
545
636
  }, [
546
- s.to && !s.disabled ? (r(), u("span", {
637
+ t.to && !t.disabled ? (u(), m("span", {
547
638
  key: 0,
548
- class: n(i(l).e("link")),
549
- onClick: y
639
+ class: o(n(a).e("link")),
640
+ onClick: k
550
641
  }, [
551
- k(c.$slots, "default")
552
- ], 2)) : (r(), u("span", {
642
+ y(r.$slots, "default")
643
+ ], 2)) : (u(), m("span", {
553
644
  key: 1,
554
- class: n(i(l).e("text")),
555
- "aria-current": s.disabled ? "page" : void 0
645
+ class: o(n(a).e("text")),
646
+ "aria-current": t.disabled ? "page" : void 0
556
647
  }, [
557
- k(c.$slots, "default")
558
- ], 10, s0)),
559
- M("span", {
560
- class: n(i(l).e("separator")),
648
+ y(r.$slots, "default")
649
+ ], 10, ce)),
650
+ z("span", {
651
+ class: o(n(a).e("separator")),
561
652
  "aria-hidden": "true"
562
653
  }, [
563
- b.value ? (r(), u("span", {
654
+ M.value ? (u(), m("span", {
564
655
  key: 0,
565
- class: n(i(l).e("separator-icon"))
566
- }, H(b.value), 3)) : (r(), u(I, { key: 1 }, [
567
- w(H(h.value), 1)
656
+ class: o(n(a).e("separator-icon"))
657
+ }, H(M.value), 3)) : (u(), m(O, { key: 1 }, [
658
+ A(H(p.value), 1)
568
659
  ], 64))
569
660
  ], 2)
570
661
  ], 2));
571
662
  }
572
- }), h0 = /* @__PURE__ */ V({
663
+ }), Ve = /* @__PURE__ */ V({
573
664
  name: "XSteps",
574
665
  __name: "index",
575
666
  props: {
@@ -582,37 +673,37 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
582
673
  space: {}
583
674
  },
584
675
  emits: ["change", "update:active"],
585
- setup(s, { emit: t }) {
586
- const e = s, a = t, l = $("steps"), o = _(e.active), m = _(0);
587
- O(() => e.active, (f) => {
588
- o.value = f;
589
- }), A("steps", {
676
+ setup(t, { emit: v }) {
677
+ const e = t, l = v, a = x("steps"), s = w(e.active), h = w(0);
678
+ S(() => e.active, (c) => {
679
+ s.value = c;
680
+ }), X("steps", {
590
681
  props: e,
591
- currentActive: o,
592
- stepCount: m,
593
- setCurrentActive: (f) => {
594
- o.value = f, a("change", f), a("update:active", f);
682
+ currentActive: s,
683
+ stepCount: h,
684
+ setCurrentActive: (c) => {
685
+ s.value = c, l("change", c), l("update:active", c);
595
686
  },
596
- setStepCount: (f) => {
597
- m.value = f;
687
+ setStepCount: (c) => {
688
+ h.value = c;
598
689
  }
599
690
  });
600
- const y = v(() => [
601
- l.b(),
602
- l.m(e.direction),
603
- l.is("simple", e.simple),
604
- l.is("center", e.alignCenter)
605
- ]), c = v(() => e.space ? {
691
+ const k = b(() => [
692
+ a.b(),
693
+ a.m(e.direction),
694
+ a.is("simple", e.simple),
695
+ a.is("center", e.alignCenter)
696
+ ]), r = b(() => e.space ? {
606
697
  "--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
607
698
  } : {});
608
- return (f, p) => (r(), u("div", {
609
- class: n(y.value),
610
- style: X(c.value)
699
+ return (c, d) => (u(), m("div", {
700
+ class: o(k.value),
701
+ style: I(r.value)
611
702
  }, [
612
- k(f.$slots, "default")
703
+ y(c.$slots, "default")
613
704
  ], 6));
614
705
  }
615
- }), p0 = /* @__PURE__ */ V({
706
+ }), Ce = /* @__PURE__ */ V({
616
707
  name: "XStep",
617
708
  __name: "Step",
618
709
  props: {
@@ -621,96 +712,100 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
621
712
  icon: {},
622
713
  status: {}
623
714
  },
624
- setup(s) {
625
- const t = s, e = $("step"), a = B("steps"), l = _(-1);
626
- J(() => {
627
- a && (l.value = a.stepCount.value, a.setStepCount(a.stepCount.value + 1));
715
+ setup(t) {
716
+ const v = t, e = x("step"), l = T("steps"), a = w(-1);
717
+ W(() => {
718
+ l && (a.value = l.stepCount.value, l.setStepCount(l.stepCount.value + 1));
628
719
  });
629
- const o = v(() => {
630
- var f, p, d;
631
- if (t.status) return t.status;
632
- const c = ((f = a == null ? void 0 : a.currentActive) == null ? void 0 : f.value) ?? 0;
633
- return l.value < c ? ((p = a == null ? void 0 : a.props) == null ? void 0 : p.finishStatus) || "finish" : l.value === c ? ((d = a == null ? void 0 : a.props) == null ? void 0 : d.processStatus) || "process" : "wait";
634
- }), m = v(() => {
635
- var c;
636
- return l.value === (((c = a == null ? void 0 : a.stepCount) == null ? void 0 : c.value) || 0) - 1;
637
- }), h = v(() => l.value === 0);
638
- v(() => ({
720
+ const s = b(() => {
721
+ var c, d, i;
722
+ if (v.status) return v.status;
723
+ const r = ((c = l == null ? void 0 : l.currentActive) == null ? void 0 : c.value) ?? 0;
724
+ return a.value < r ? ((d = l == null ? void 0 : l.props) == null ? void 0 : d.finishStatus) || "finish" : a.value === r ? ((i = l == null ? void 0 : l.props) == null ? void 0 : i.processStatus) || "process" : "wait";
725
+ }), h = b(() => {
726
+ var r;
727
+ return a.value === (((r = l == null ? void 0 : l.stepCount) == null ? void 0 : r.value) || 0) - 1;
728
+ }), p = b(() => a.value === 0);
729
+ b(() => ({
639
730
  wait: "#c0c4cc",
640
731
  process: "#409eff",
641
732
  finish: "#67c23a",
642
733
  error: "#f56c6c",
643
734
  success: "#67c23a"
644
- })[o.value] || "#c0c4cc");
645
- const b = v(() => {
646
- var c;
735
+ })[s.value] || "#c0c4cc");
736
+ const M = b(() => {
737
+ var r;
647
738
  return [
648
739
  e.b(),
649
- e.is(o.value),
650
- e.is("last", m.value),
651
- e.m(((c = a == null ? void 0 : a.props) == null ? void 0 : c.direction) || "horizontal")
740
+ e.is(s.value),
741
+ e.is("last", h.value),
742
+ e.m(((r = l == null ? void 0 : l.props) == null ? void 0 : r.direction) || "horizontal")
652
743
  ];
653
- }), y = () => {
654
- var c;
655
- l.value > -1 && ((c = a == null ? void 0 : a.setCurrentActive) == null || c.call(a, l.value));
744
+ }), k = () => {
745
+ var r;
746
+ a.value > -1 && ((r = l == null ? void 0 : l.setCurrentActive) == null || r.call(l, a.value));
656
747
  };
657
- return (c, f) => (r(), u("div", {
658
- class: n(b.value),
659
- onClick: y
748
+ return (r, c) => (u(), m("div", {
749
+ class: o(M.value),
750
+ onClick: k
660
751
  }, [
661
- M("div", {
662
- class: n(i(e).e("head"))
752
+ z("div", {
753
+ class: o(n(e).e("head"))
663
754
  }, [
664
- h.value ? C("", !0) : (r(), u("div", {
755
+ p.value ? C("", !0) : (u(), m("div", {
665
756
  key: 0,
666
- class: n([i(e).e("line"), i(e).em("line", "prev")])
757
+ class: o([n(e).e("line"), n(e).em("line", "prev")])
667
758
  }, null, 2)),
668
- M("div", {
669
- class: n(i(e).e("icon"))
759
+ z("div", {
760
+ class: o(n(e).e("icon"))
670
761
  }, [
671
- s.icon ? (r(), u("span", {
762
+ t.icon ? (u(), m("span", {
672
763
  key: 0,
673
- class: n(i(e).e("icon-inner"))
674
- }, H(s.icon), 3)) : (r(), u("span", {
764
+ class: o(n(e).e("icon-inner"))
765
+ }, H(t.icon), 3)) : (u(), m("span", {
675
766
  key: 1,
676
- class: n(i(e).e("icon-inner"))
767
+ class: o(n(e).e("icon-inner"))
677
768
  }, [
678
- o.value === "finish" || o.value === "success" ? (r(), u(I, { key: 0 }, [
679
- w("✓")
680
- ], 64)) : o.value === "error" ? (r(), u(I, { key: 1 }, [
681
- w("✕")
682
- ], 64)) : (r(), u(I, { key: 2 }, [
683
- w(H(l.value + 1), 1)
769
+ s.value === "finish" || s.value === "success" ? (u(), D(n(_), {
770
+ key: 0,
771
+ name: "check",
772
+ size: 14
773
+ })) : s.value === "error" ? (u(), D(n(_), {
774
+ key: 1,
775
+ name: "close",
776
+ size: 14
777
+ })) : (u(), m(O, { key: 2 }, [
778
+ A(H(a.value + 1), 1)
684
779
  ], 64))
685
780
  ], 2))
686
781
  ], 2),
687
- m.value ? C("", !0) : (r(), u("div", {
782
+ h.value ? C("", !0) : (u(), m("div", {
688
783
  key: 1,
689
- class: n(i(e).e("line"))
784
+ class: o(n(e).e("line"))
690
785
  }, null, 2))
691
786
  ], 2),
692
- M("div", {
693
- class: n(i(e).e("content"))
787
+ z("div", {
788
+ class: o(n(e).e("content"))
694
789
  }, [
695
- M("div", {
696
- class: n(i(e).e("title"))
790
+ z("div", {
791
+ class: o(n(e).e("title"))
697
792
  }, [
698
- k(c.$slots, "title", {}, () => [
699
- w(H(s.title), 1)
793
+ y(r.$slots, "title", {}, () => [
794
+ A(H(t.title), 1)
700
795
  ])
701
796
  ], 2),
702
- s.description || c.$slots.description ? (r(), u("div", {
797
+ t.description || r.$slots.description ? (u(), m("div", {
703
798
  key: 0,
704
- class: n(i(e).e("description"))
799
+ class: o(n(e).e("description"))
705
800
  }, [
706
- k(c.$slots, "description", {}, () => [
707
- w(H(s.description), 1)
801
+ y(r.$slots, "description", {}, () => [
802
+ A(H(t.description), 1)
708
803
  ])
709
804
  ], 2)) : C("", !0)
710
805
  ], 2)
711
806
  ], 2));
712
807
  }
713
- }), M0 = /* @__PURE__ */ V({
808
+ }), $e = /* @__PURE__ */ V({
714
809
  name: "XPageHeader",
715
810
  __name: "index",
716
811
  props: {
@@ -720,69 +815,74 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
720
815
  showBack: { type: Boolean, default: !1 }
721
816
  },
722
817
  emits: ["back"],
723
- setup(s, { emit: t }) {
724
- const e = t, a = $("page-header"), l = () => {
818
+ setup(t, { emit: v }) {
819
+ const e = v, l = x("page-header"), a = () => {
725
820
  e("back");
726
821
  };
727
- return (o, m) => (r(), u("div", {
728
- class: n(i(a).b())
822
+ return (s, h) => (u(), m("div", {
823
+ class: o(n(l).b())
729
824
  }, [
730
- M("div", {
731
- class: n(i(a).e("main"))
825
+ z("div", {
826
+ class: o(n(l).e("main"))
732
827
  }, [
733
- M("div", {
734
- class: n(i(a).e("left"))
828
+ z("div", {
829
+ class: o(n(l).e("left"))
735
830
  }, [
736
- s.showBack ? (r(), u("span", {
831
+ t.showBack ? (u(), m("span", {
737
832
  key: 0,
738
- class: n(i(a).e("back")),
739
- onClick: l
833
+ class: o(n(l).e("back")),
834
+ onClick: a
740
835
  }, [
741
- M("span", {
742
- class: n(i(a).e("back-icon"))
743
- }, "←", 2),
744
- s.backText ? (r(), u("span", {
836
+ z("span", {
837
+ class: o(n(l).e("back-icon"))
838
+ }, [
839
+ R(n(_), {
840
+ name: "arrow-left",
841
+ size: 16
842
+ })
843
+ ], 2),
844
+ t.backText ? (u(), m("span", {
745
845
  key: 0,
746
- class: n(i(a).e("back-text"))
747
- }, H(s.backText), 3)) : C("", !0)
846
+ class: o(n(l).e("back-text"))
847
+ }, H(t.backText), 3)) : C("", !0)
748
848
  ], 2)) : C("", !0),
749
- M("span", {
750
- class: n(i(a).e("title"))
849
+ z("span", {
850
+ class: o(n(l).e("title"))
751
851
  }, [
752
- k(o.$slots, "title", {}, () => [
753
- w(H(s.title), 1)
852
+ y(s.$slots, "title", {}, () => [
853
+ A(H(t.title), 1)
754
854
  ])
755
855
  ], 2),
756
- s.subtitle || o.$slots.subtitle ? (r(), u("span", {
856
+ t.subtitle || s.$slots.subtitle ? (u(), m("span", {
757
857
  key: 1,
758
- class: n(i(a).e("subtitle"))
858
+ class: o(n(l).e("subtitle"))
759
859
  }, [
760
- k(o.$slots, "subtitle", {}, () => [
761
- w(H(s.subtitle), 1)
860
+ y(s.$slots, "subtitle", {}, () => [
861
+ A(H(t.subtitle), 1)
762
862
  ])
763
863
  ], 2)) : C("", !0)
764
864
  ], 2),
765
- M("div", {
766
- class: n(i(a).e("extra"))
865
+ z("div", {
866
+ class: o(n(l).e("extra"))
767
867
  }, [
768
- k(o.$slots, "extra")
868
+ y(s.$slots, "extra")
769
869
  ], 2)
770
870
  ], 2),
771
- o.$slots.default ? (r(), u("div", {
871
+ s.$slots.default ? (u(), m("div", {
772
872
  key: 0,
773
- class: n(i(a).e("content"))
873
+ class: o(n(l).e("content"))
774
874
  }, [
775
- k(o.$slots, "default")
875
+ y(s.$slots, "default")
776
876
  ], 2)) : C("", !0),
777
- o.$slots.footer ? (r(), u("div", {
877
+ s.$slots.footer ? (u(), m("div", {
778
878
  key: 1,
779
- class: n(i(a).e("footer"))
879
+ class: o(n(l).e("footer"))
780
880
  }, [
781
- k(o.$slots, "footer")
881
+ y(s.$slots, "footer")
782
882
  ], 2)) : C("", !0)
783
883
  ], 2));
784
884
  }
785
- }), f0 = /* @__PURE__ */ V({
885
+ }), He = /* @__PURE__ */ V({
786
886
  name: "XDropdown",
787
887
  __name: "index",
788
888
  props: {
@@ -793,67 +893,67 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
793
893
  hideOnClick: { type: Boolean, default: !0 }
794
894
  },
795
895
  emits: ["visible-change", "click", "command"],
796
- setup(s, { emit: t }) {
797
- const e = s, a = t, l = $("dropdown"), o = _(e.visible || !1), m = _(), h = () => {
798
- e.disabled || (o.value = !0, a("visible-change", !0));
799
- }, b = () => {
800
- o.value = !1, a("visible-change", !1);
801
- }, y = () => {
802
- o.value ? b() : h();
896
+ setup(t, { emit: v }) {
897
+ const e = t, l = v, a = x("dropdown"), s = w(e.visible || !1), h = w(), p = () => {
898
+ e.disabled || (s.value = !0, l("visible-change", !0));
899
+ }, M = () => {
900
+ s.value = !1, l("visible-change", !1);
901
+ }, k = () => {
902
+ s.value ? M() : p();
803
903
  };
804
- A("x-dropdown", {
805
- visible: o,
806
- handleClick: (z) => {
807
- a("click", z), a("command", z), e.hideOnClick && b();
904
+ X("x-dropdown", {
905
+ visible: s,
906
+ handleClick: (f) => {
907
+ l("click", f), l("command", f), e.hideOnClick && M();
808
908
  },
809
- hide: b
909
+ hide: M
810
910
  });
811
- const f = () => {
812
- e.trigger === "hover" && h();
813
- }, p = () => {
814
- e.trigger === "hover" && b();
815
- }, d = (z) => {
816
- m.value && !m.value.contains(z.target) && b();
911
+ const c = () => {
912
+ e.trigger === "hover" && p();
913
+ }, d = () => {
914
+ e.trigger === "hover" && M();
915
+ }, i = (f) => {
916
+ h.value && !h.value.contains(f.target) && M();
817
917
  };
818
- return typeof window < "u" && document.addEventListener("click", d), (z, g) => (r(), u("div", {
918
+ return typeof window < "u" && document.addEventListener("click", i), (f, g) => (u(), m("div", {
819
919
  ref_key: "dropdownRef",
820
- ref: m,
821
- class: n([i(l).b(), i(l).is("disabled", s.disabled)]),
822
- onMouseenter: f,
823
- onMouseleave: p
920
+ ref: h,
921
+ class: o([n(a).b(), n(a).is("disabled", t.disabled)]),
922
+ onMouseenter: c,
923
+ onMouseleave: d
824
924
  }, [
825
- M("div", {
826
- class: n(i(l).e("trigger")),
827
- onClick: g[0] || (g[0] = (L) => s.trigger === "click" && y())
925
+ z("div", {
926
+ class: o(n(a).e("trigger")),
927
+ onClick: g[0] || (g[0] = ($) => t.trigger === "click" && k())
828
928
  }, [
829
- k(z.$slots, "default")
929
+ y(f.$slots, "default")
830
930
  ], 2),
831
- T(W, { name: "x-dropdown-zoom" }, {
832
- default: j(() => [
833
- D(M("div", {
834
- class: n([i(l).e("menu"), i(l).m(s.placement)])
931
+ R(Y, { name: "x-dropdown-zoom" }, {
932
+ default: U(() => [
933
+ N(z("div", {
934
+ class: o([n(a).e("menu"), n(a).m(t.placement)])
835
935
  }, [
836
- k(z.$slots, "dropdown")
936
+ y(f.$slots, "dropdown")
837
937
  ], 2), [
838
- [K, o.value]
938
+ [q, s.value]
839
939
  ])
840
940
  ]),
841
941
  _: 3
842
942
  })
843
943
  ], 34));
844
944
  }
845
- }), z0 = /* @__PURE__ */ V({
945
+ }), xe = /* @__PURE__ */ V({
846
946
  name: "XDropdownMenu",
847
947
  __name: "DropdownMenu",
848
- setup(s) {
849
- const t = $("dropdown-menu");
850
- return (e, a) => (r(), u("ul", {
851
- class: n(i(t).b())
948
+ setup(t) {
949
+ const v = x("dropdown-menu");
950
+ return (e, l) => (u(), m("ul", {
951
+ class: o(n(v).b())
852
952
  }, [
853
- k(e.$slots, "default")
953
+ y(e.$slots, "default")
854
954
  ], 2));
855
955
  }
856
- }), b0 = /* @__PURE__ */ V({
956
+ }), Be = /* @__PURE__ */ V({
857
957
  name: "XDropdownItem",
858
958
  __name: "DropdownItem",
859
959
  props: {
@@ -863,43 +963,334 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
863
963
  icon: {}
864
964
  },
865
965
  emits: ["click"],
866
- setup(s, { emit: t }) {
867
- const e = s, a = t, l = $("dropdown-item"), o = B("x-dropdown"), m = (b) => {
868
- e.disabled || (a("click", b), o != null && o.handleClick && o.handleClick(e.command ?? b));
869
- }, h = v(() => [
870
- l.b(),
871
- l.is("disabled", e.disabled),
872
- l.is("divided", e.divided)
966
+ setup(t, { emit: v }) {
967
+ const e = t, l = v, a = x("dropdown-item"), s = T("x-dropdown"), h = (M) => {
968
+ e.disabled || (l("click", M), s != null && s.handleClick && s.handleClick(e.command ?? M));
969
+ }, p = b(() => [
970
+ a.b(),
971
+ a.is("disabled", e.disabled),
972
+ a.is("divided", e.divided)
873
973
  ]);
874
- return (b, y) => (r(), u("li", {
875
- class: n(h.value),
876
- onClick: m
974
+ return (M, k) => (u(), m("li", {
975
+ class: o(p.value),
976
+ onClick: h
877
977
  }, [
878
- s.icon ? (r(), u("span", {
978
+ t.icon ? (u(), m("span", {
879
979
  key: 0,
880
- class: n(i(l).e("icon"))
881
- }, H(s.icon), 3)) : C("", !0),
882
- M("span", {
883
- class: n(i(l).e("content"))
980
+ class: o(n(a).e("icon"))
981
+ }, H(t.icon), 3)) : C("", !0),
982
+ z("span", {
983
+ class: o(n(a).e("content"))
884
984
  }, [
885
- k(b.$slots, "default")
985
+ y(M.$slots, "default")
886
986
  ], 2)
887
987
  ], 2));
888
988
  }
989
+ }), Le = /* @__PURE__ */ V({
990
+ name: "XAffix",
991
+ __name: "index",
992
+ props: {
993
+ offset: { default: 0 },
994
+ position: { default: "top" },
995
+ target: {},
996
+ zIndex: { default: 100 }
997
+ },
998
+ emits: ["change"],
999
+ setup(t, { emit: v }) {
1000
+ const e = t, l = v, a = x("affix"), s = w(!1), h = w(), p = w(), M = () => e.target ? document.querySelector(e.target) : window, k = () => {
1001
+ if (!h.value || !p.value) return;
1002
+ const f = M(), g = p.value.getBoundingClientRect(), $ = f === window ? { top: 0, bottom: window.innerHeight } : f.getBoundingClientRect();
1003
+ let B = !1;
1004
+ e.position === "top" ? B = g.top < $.top + e.offset : B = g.bottom > $.bottom - e.offset, B !== s.value && (s.value = B, l("change", B));
1005
+ }, r = w({}), c = () => {
1006
+ if (!s.value || !p.value) return;
1007
+ const f = p.value.getBoundingClientRect(), g = {
1008
+ width: `${f.width}px`,
1009
+ height: `${f.height}px`,
1010
+ zIndex: String(e.zIndex)
1011
+ };
1012
+ e.position === "top" ? g.top = `${e.offset}px` : g.bottom = `${e.offset}px`, r.value = g;
1013
+ }, d = () => {
1014
+ k(), s.value && c();
1015
+ };
1016
+ let i = null;
1017
+ return W(() => {
1018
+ i = M(), i == null || i.addEventListener("scroll", d), window.addEventListener("resize", d), F(() => {
1019
+ k();
1020
+ });
1021
+ }), J(() => {
1022
+ i == null || i.removeEventListener("scroll", d), window.removeEventListener("resize", d);
1023
+ }), S(s, () => {
1024
+ c();
1025
+ }), (f, g) => (u(), m("div", {
1026
+ ref_key: "affixPlaceholderRef",
1027
+ ref: p,
1028
+ class: o(n(a).b())
1029
+ }, [
1030
+ s.value ? (u(), m("div", {
1031
+ key: 0,
1032
+ ref_key: "affixRef",
1033
+ ref: h,
1034
+ class: o(n(a).e("fixed")),
1035
+ style: I(r.value)
1036
+ }, [
1037
+ y(f.$slots, "default")
1038
+ ], 6)) : (u(), m("div", {
1039
+ key: 1,
1040
+ ref_key: "affixRef",
1041
+ ref: h
1042
+ }, [
1043
+ y(f.$slots, "default")
1044
+ ], 512))
1045
+ ], 2));
1046
+ }
1047
+ }), re = ["href", "target", "onClick"], Se = /* @__PURE__ */ V({
1048
+ name: "XAnchor",
1049
+ __name: "index",
1050
+ props: {
1051
+ links: { default: () => [] },
1052
+ container: { default: "" },
1053
+ offset: { default: 0 },
1054
+ showBorder: { type: Boolean, default: !1 },
1055
+ sticky: { type: Boolean, default: !1 }
1056
+ },
1057
+ emits: ["change"],
1058
+ setup(t, { emit: v }) {
1059
+ const e = t, l = v, a = x("anchor"), s = w(""), h = w(), p = () => e.container ? document.querySelector(e.container) : window, M = () => {
1060
+ const c = p();
1061
+ c === window ? window.scrollY : c.scrollTop;
1062
+ for (const d of e.links) {
1063
+ const i = document.querySelector(d.href);
1064
+ if (i) {
1065
+ const f = i.getBoundingClientRect(), g = c === window ? { top: 0 } : c.getBoundingClientRect(), $ = f.top - g.top - e.offset;
1066
+ if ($ <= 0 && $ + f.height > 0) {
1067
+ s.value !== d.href && (s.value = d.href, l("change", d.href));
1068
+ return;
1069
+ }
1070
+ }
1071
+ }
1072
+ }, k = (c, d) => {
1073
+ d.preventDefault();
1074
+ const i = document.querySelector(c.href);
1075
+ if (i) {
1076
+ const f = p(), g = i.getBoundingClientRect(), $ = f === window ? { top: 0 } : f.getBoundingClientRect(), P = (f === window ? window.scrollY : f.scrollTop) + g.top - $.top - e.offset;
1077
+ f === window ? window.scrollTo({
1078
+ top: P,
1079
+ behavior: "smooth"
1080
+ }) : f.scrollTo({
1081
+ top: P,
1082
+ behavior: "smooth"
1083
+ }), s.value = c.href, l("change", c.href);
1084
+ }
1085
+ };
1086
+ let r = null;
1087
+ return W(() => {
1088
+ r = p(), r == null || r.addEventListener("scroll", M), F(() => {
1089
+ M();
1090
+ });
1091
+ }), J(() => {
1092
+ r == null || r.removeEventListener("scroll", M);
1093
+ }), S(() => e.links, () => {
1094
+ F(() => {
1095
+ M();
1096
+ });
1097
+ }), (c, d) => (u(), m("div", {
1098
+ ref_key: "anchorRef",
1099
+ ref: h,
1100
+ class: o([
1101
+ n(a).b(),
1102
+ n(a).is("border", t.showBorder),
1103
+ n(a).is("sticky", t.sticky)
1104
+ ])
1105
+ }, [
1106
+ z("ul", {
1107
+ class: o(n(a).e("list"))
1108
+ }, [
1109
+ (u(!0), m(O, null, K(t.links, (i) => (u(), m("li", {
1110
+ key: i.href,
1111
+ class: o([
1112
+ n(a).e("item"),
1113
+ n(a).is("active", s.value === i.href)
1114
+ ])
1115
+ }, [
1116
+ z("a", {
1117
+ href: i.href,
1118
+ target: i.target,
1119
+ class: o(n(a).e("link")),
1120
+ onClick: (f) => k(i, f)
1121
+ }, H(i.title), 11, re)
1122
+ ], 2))), 128))
1123
+ ], 2),
1124
+ s.value ? (u(), m("div", {
1125
+ key: 0,
1126
+ class: o(n(a).e("indicator"))
1127
+ }, null, 2)) : C("", !0)
1128
+ ], 2));
1129
+ }
1130
+ }), ue = ["onClick"], _e = /* @__PURE__ */ V({
1131
+ name: "XPopselect",
1132
+ __name: "index",
1133
+ props: {
1134
+ modelValue: { default: "" },
1135
+ options: { default: () => [] },
1136
+ disabled: { type: Boolean, default: !1 },
1137
+ placement: { default: "bottom" },
1138
+ width: { default: 200 },
1139
+ multiple: { type: Boolean, default: !1 }
1140
+ },
1141
+ emits: ["update:modelValue", "change"],
1142
+ setup(t, { emit: v }) {
1143
+ const e = t, l = v, a = x("popselect"), s = w(!1), h = w(e.multiple ? [] : "");
1144
+ S(() => e.modelValue, (c) => {
1145
+ h.value = c;
1146
+ }, { immediate: !0 });
1147
+ const p = b(() => ({
1148
+ width: typeof e.width == "number" ? `${e.width}px` : e.width
1149
+ })), M = (c) => e.multiple ? h.value.includes(c.value) : h.value === c.value, k = (c) => {
1150
+ if (!(c.disabled || e.disabled))
1151
+ if (e.multiple) {
1152
+ const d = h.value, i = d.indexOf(c.value);
1153
+ i > -1 ? d.splice(i, 1) : d.push(c.value), l("update:modelValue", d), l("change", d);
1154
+ } else
1155
+ h.value = c.value, l("update:modelValue", c.value), l("change", c.value), s.value = !1;
1156
+ }, r = (c) => {
1157
+ c.target.closest(`.${a.b()}`) || (s.value = !1);
1158
+ };
1159
+ return S(s, (c) => {
1160
+ c ? document.addEventListener("click", r) : document.removeEventListener("click", r);
1161
+ }), (c, d) => (u(), m("div", {
1162
+ class: o(n(a).b()),
1163
+ onClick: d[1] || (d[1] = Z(() => {
1164
+ }, ["stop"]))
1165
+ }, [
1166
+ z("div", {
1167
+ class: o(n(a).e("trigger")),
1168
+ onClick: d[0] || (d[0] = (i) => !t.disabled && (s.value = !s.value))
1169
+ }, [
1170
+ y(c.$slots, "default")
1171
+ ], 2),
1172
+ N(z("div", {
1173
+ class: o([n(a).e("dropdown"), n(a).em("dropdown", t.placement)]),
1174
+ style: I(p.value)
1175
+ }, [
1176
+ z("ul", {
1177
+ class: o(n(a).e("list"))
1178
+ }, [
1179
+ (u(!0), m(O, null, K(t.options, (i) => (u(), m("li", {
1180
+ key: i.value,
1181
+ class: o([
1182
+ n(a).e("item"),
1183
+ n(a).is("selected", M(i)),
1184
+ n(a).is("disabled", i.disabled)
1185
+ ]),
1186
+ onClick: (f) => k(i)
1187
+ }, [
1188
+ i.icon ? (u(), D(n(_), {
1189
+ key: 0,
1190
+ name: i.icon,
1191
+ size: 16
1192
+ }, null, 8, ["name"])) : C("", !0),
1193
+ z("span", {
1194
+ class: o(n(a).e("label"))
1195
+ }, H(i.label), 3),
1196
+ M(i) ? (u(), m("span", {
1197
+ key: 1,
1198
+ class: o(n(a).e("check"))
1199
+ }, [
1200
+ R(n(_), {
1201
+ name: "check",
1202
+ size: 14
1203
+ })
1204
+ ], 2)) : C("", !0)
1205
+ ], 10, ue))), 128))
1206
+ ], 2)
1207
+ ], 6), [
1208
+ [q, s.value]
1209
+ ])
1210
+ ], 2));
1211
+ }
1212
+ }), de = ["onClick"], ve = { key: 1 }, me = ["disabled"], Ae = /* @__PURE__ */ V({
1213
+ name: "XFloatButton",
1214
+ __name: "index",
1215
+ props: {
1216
+ icon: { default: "plus" },
1217
+ type: { default: "primary" },
1218
+ shape: { default: "circle" },
1219
+ size: { default: "large" },
1220
+ position: { default: "right" },
1221
+ bottom: { default: 80 },
1222
+ offset: { default: 24 },
1223
+ menu: { default: () => [] },
1224
+ disabled: { type: Boolean, default: !1 }
1225
+ },
1226
+ emits: ["click"],
1227
+ setup(t, { emit: v }) {
1228
+ const e = t, l = v, a = x("float-button"), s = w(!1), h = b(() => ({
1229
+ bottom: `${e.bottom}px`,
1230
+ [e.position]: `${e.offset}px`
1231
+ })), p = () => {
1232
+ e.disabled || (e.menu.length > 0 ? s.value = !s.value : l("click"));
1233
+ }, M = (k) => {
1234
+ var r;
1235
+ (r = k.onClick) == null || r.call(k), s.value = !1;
1236
+ };
1237
+ return (k, r) => (u(), m("div", {
1238
+ class: o([n(a).b(), n(a).m(t.position)]),
1239
+ style: I(h.value)
1240
+ }, [
1241
+ t.menu.length > 0 ? (u(), m("div", {
1242
+ key: 0,
1243
+ class: o([n(a).e("menu"), n(a).is("visible", s.value)])
1244
+ }, [
1245
+ (u(!0), m(O, null, K(t.menu, (c, d) => (u(), m("div", {
1246
+ key: d,
1247
+ class: o(n(a).e("menu-item")),
1248
+ onClick: (i) => M(c)
1249
+ }, [
1250
+ c.icon ? (u(), D(n(_), {
1251
+ key: 0,
1252
+ name: c.icon,
1253
+ size: 16
1254
+ }, null, 8, ["name"])) : C("", !0),
1255
+ c.label ? (u(), m("span", ve, H(c.label), 1)) : C("", !0)
1256
+ ], 10, de))), 128))
1257
+ ], 2)) : C("", !0),
1258
+ z("button", {
1259
+ class: o([
1260
+ n(a).e("button"),
1261
+ n(a).m(t.type),
1262
+ n(a).m(t.shape),
1263
+ n(a).m(t.size),
1264
+ n(a).is("disabled", t.disabled)
1265
+ ]),
1266
+ disabled: t.disabled,
1267
+ onClick: p
1268
+ }, [
1269
+ R(n(_), {
1270
+ name: t.icon,
1271
+ size: t.size === "large" ? 24 : t.size === "small" ? 16 : 20
1272
+ }, null, 8, ["name", "size"])
1273
+ ], 10, me)
1274
+ ], 6));
1275
+ }
889
1276
  });
890
1277
  export {
891
- v0 as Breadcrumb,
892
- m0 as BreadcrumbItem,
893
- f0 as Dropdown,
894
- b0 as DropdownItem,
895
- z0 as DropdownMenu,
896
- i0 as Menu,
897
- r0 as MenuItem,
898
- u0 as MenuItemGroup,
899
- M0 as PageHeader,
900
- p0 as Step,
901
- h0 as Steps,
902
- d0 as SubMenu,
903
- c0 as TabPane,
904
- n0 as Tabs
1278
+ Le as Affix,
1279
+ Se as Anchor,
1280
+ ge as Breadcrumb,
1281
+ we as BreadcrumbItem,
1282
+ He as Dropdown,
1283
+ Be as DropdownItem,
1284
+ xe as DropdownMenu,
1285
+ Ae as FloatButton,
1286
+ be as Menu,
1287
+ ze as MenuItem,
1288
+ ke as MenuItemGroup,
1289
+ $e as PageHeader,
1290
+ _e as Popselect,
1291
+ Ce as Step,
1292
+ Ve as Steps,
1293
+ ye as SubMenu,
1294
+ Me as TabPane,
1295
+ pe as Tabs
905
1296
  };