@xto/navigation 1.3.2 → 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 T, 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 O, 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
- T([() => 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, x, 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) || ((x = p.props) == null ? void 0 : x.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 T(() => 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
- T(() => 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 x = [...h.value];
134
- x.splice(g, 1), h.value = x;
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
- O(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
- }), L = "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,83 +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);
400
- T(
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(
401
485
  () => e == null ? void 0 : e.activeIndex.value,
402
486
  () => {
403
- (e == null ? void 0 : e.props.mode) === "horizontal" && (l.value = !1);
487
+ (e == null ? void 0 : e.props.mode) === "horizontal" && (a.value = !1);
404
488
  }
405
489
  );
406
- const h = v(() => {
407
- var d, z;
408
- 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;
409
- }), b = v(() => (e == null ? void 0 : e.activeIndex.value) === t.index), y = v(() => [
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(() => [
410
494
  L,
411
495
  L + ((e == null ? void 0 : e.props.mode) === "horizontal" ? "--horizontal" : "--vertical"),
412
496
  {
413
- "is-active": b.value,
414
- "is-opened": h.value,
415
- "is-disabled": t.disabled,
416
- "is-nested": o.value,
417
- "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
418
502
  }
419
- ]), c = () => {
420
- var d, z;
421
- 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));
422
- }, f = () => {
423
- t.disabled || ((e == null ? void 0 : e.props.mode) === "horizontal" || m.value) && (l.value = !0);
424
- }, p = () => {
425
- ((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);
426
510
  };
427
- return A("subMenu", {
428
- isOpen: h,
429
- isNested: o,
430
- index: t.index
431
- }), (d, z) => {
511
+ return X("subMenu", {
512
+ isOpen: p,
513
+ isNested: s,
514
+ index: v.index
515
+ }), (i, f) => {
432
516
  var g;
433
- return r(), u("li", {
434
- class: n(y.value),
435
- onMouseenter: f,
436
- onMouseleave: p
517
+ return u(), m("li", {
518
+ class: o(k.value),
519
+ onMouseenter: c,
520
+ onMouseleave: d
437
521
  }, [
438
- M("div", {
439
- class: n(L + "__title"),
440
- onClick: c
522
+ z("div", {
523
+ class: o(L + "__title"),
524
+ onClick: r
441
525
  }, [
442
- M("div", {
443
- class: n(L + "__content")
526
+ z("div", {
527
+ class: o(L + "__content")
444
528
  }, [
445
- s.icon ? (r(), u("span", {
529
+ t.icon ? (u(), m("span", {
446
530
  key: 0,
447
- class: n(L + "__icon")
531
+ class: o(L + "__icon")
448
532
  }, [
449
- O(i(R), {
450
- name: s.icon,
533
+ R(n(_), {
534
+ name: t.icon,
451
535
  size: 18
452
536
  }, null, 8, ["name"])
453
- ], 2)) : d.$slots.icon ? (r(), u("span", {
537
+ ], 2)) : i.$slots.icon ? (u(), m("span", {
454
538
  key: 1,
455
- class: n(L + "__icon")
539
+ class: o(L + "__icon")
456
540
  }, [
457
- k(d.$slots, "icon")
541
+ y(i.$slots, "icon")
458
542
  ], 2)) : C("", !0),
459
- M("span", {
460
- class: n(L + "__text")
543
+ z("span", {
544
+ class: o(L + "__text")
461
545
  }, [
462
- k(d.$slots, "title", {}, () => [
463
- w(H(s.title), 1)
546
+ y(i.$slots, "title", {}, () => [
547
+ A(H(t.title), 1)
464
548
  ])
465
549
  ], 2),
466
- M("span", {
467
- class: n([L + "__arrow", { "is-open": h.value }])
468
- }, [...z[0] || (z[0] = [
469
- M("svg", {
550
+ z("span", {
551
+ class: o([L + "__arrow", { "is-open": p.value }])
552
+ }, [...f[0] || (f[0] = [
553
+ z("svg", {
470
554
  viewBox: "0 0 1024 1024",
471
555
  width: "12",
472
556
  height: "12"
473
557
  }, [
474
- M("path", {
558
+ z("path", {
475
559
  fill: "currentColor",
476
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"
477
561
  })
@@ -479,18 +563,18 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
479
563
  ])], 2)
480
564
  ], 2)
481
565
  ], 2),
482
- O(W, {
483
- 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"
484
568
  }, {
485
- default: j(() => {
486
- var x;
569
+ default: U(() => {
570
+ var $;
487
571
  return [
488
- D(M("ul", {
489
- class: n([L + "__menu", { "is-horizontal": ((x = i(e)) == null ? void 0 : x.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 }])
490
574
  }, [
491
- k(d.$slots, "default")
575
+ y(i.$slots, "default")
492
576
  ], 2), [
493
- [K, h.value]
577
+ [q, p.value]
494
578
  ])
495
579
  ];
496
580
  }),
@@ -499,32 +583,32 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
499
583
  ], 34);
500
584
  };
501
585
  }
502
- }), v0 = /* @__PURE__ */ V({
586
+ }), ge = /* @__PURE__ */ V({
503
587
  name: "XBreadcrumb",
504
588
  __name: "index",
505
589
  props: {
506
590
  separator: { default: "/" },
507
591
  separatorIcon: {}
508
592
  },
509
- setup(s) {
510
- const t = s, e = $("breadcrumb");
511
- A("breadcrumb", {
512
- separator: v(() => t.separator),
513
- 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)
514
598
  });
515
- const a = v(() => [e.b()]);
516
- return (l, o) => (r(), u("nav", {
517
- class: n(a.value),
599
+ const l = b(() => [e.b()]);
600
+ return (a, s) => (u(), m("nav", {
601
+ class: o(l.value),
518
602
  "aria-label": "Breadcrumb"
519
603
  }, [
520
- M("ol", {
521
- class: n(i(e).e("list"))
604
+ z("ol", {
605
+ class: o(n(e).e("list"))
522
606
  }, [
523
- k(l.$slots, "default")
607
+ y(a.$slots, "default")
524
608
  ], 2)
525
609
  ], 2));
526
610
  }
527
- }), s0 = ["aria-current"], m0 = /* @__PURE__ */ V({
611
+ }), ce = ["aria-current"], we = /* @__PURE__ */ V({
528
612
  name: "XBreadcrumbItem",
529
613
  __name: "BreadcrumbItem",
530
614
  props: {
@@ -533,50 +617,50 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
533
617
  disabled: { type: Boolean }
534
618
  },
535
619
  emits: ["click"],
536
- setup(s, { emit: t }) {
537
- const e = s, a = t, l = $("breadcrumb"), o = B("breadcrumb"), m = v(() => [
538
- l.e("item"),
539
- l.is("link", !!e.to && !e.disabled),
540
- l.is("disabled", e.disabled)
541
- ]), h = v(() => {
542
- var c;
543
- return ((c = o == null ? void 0 : o.separator) == null ? void 0 : c.value) || "/";
544
- }), b = v(() => {
545
- var c;
546
- return (c = o == null ? void 0 : o.separatorIcon) == null ? void 0 : c.value;
547
- }), y = (c) => {
548
- 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));
549
633
  };
550
- return (c, f) => (r(), u("li", {
551
- class: n(m.value)
634
+ return (r, c) => (u(), m("li", {
635
+ class: o(h.value)
552
636
  }, [
553
- s.to && !s.disabled ? (r(), u("span", {
637
+ t.to && !t.disabled ? (u(), m("span", {
554
638
  key: 0,
555
- class: n(i(l).e("link")),
556
- onClick: y
639
+ class: o(n(a).e("link")),
640
+ onClick: k
557
641
  }, [
558
- k(c.$slots, "default")
559
- ], 2)) : (r(), u("span", {
642
+ y(r.$slots, "default")
643
+ ], 2)) : (u(), m("span", {
560
644
  key: 1,
561
- class: n(i(l).e("text")),
562
- "aria-current": s.disabled ? "page" : void 0
645
+ class: o(n(a).e("text")),
646
+ "aria-current": t.disabled ? "page" : void 0
563
647
  }, [
564
- k(c.$slots, "default")
565
- ], 10, s0)),
566
- M("span", {
567
- class: n(i(l).e("separator")),
648
+ y(r.$slots, "default")
649
+ ], 10, ce)),
650
+ z("span", {
651
+ class: o(n(a).e("separator")),
568
652
  "aria-hidden": "true"
569
653
  }, [
570
- b.value ? (r(), u("span", {
654
+ M.value ? (u(), m("span", {
571
655
  key: 0,
572
- class: n(i(l).e("separator-icon"))
573
- }, H(b.value), 3)) : (r(), u(I, { key: 1 }, [
574
- 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)
575
659
  ], 64))
576
660
  ], 2)
577
661
  ], 2));
578
662
  }
579
- }), h0 = /* @__PURE__ */ V({
663
+ }), Ve = /* @__PURE__ */ V({
580
664
  name: "XSteps",
581
665
  __name: "index",
582
666
  props: {
@@ -589,37 +673,37 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
589
673
  space: {}
590
674
  },
591
675
  emits: ["change", "update:active"],
592
- setup(s, { emit: t }) {
593
- const e = s, a = t, l = $("steps"), o = _(e.active), m = _(0);
594
- T(() => e.active, (f) => {
595
- o.value = f;
596
- }), 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", {
597
681
  props: e,
598
- currentActive: o,
599
- stepCount: m,
600
- setCurrentActive: (f) => {
601
- 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);
602
686
  },
603
- setStepCount: (f) => {
604
- m.value = f;
687
+ setStepCount: (c) => {
688
+ h.value = c;
605
689
  }
606
690
  });
607
- const y = v(() => [
608
- l.b(),
609
- l.m(e.direction),
610
- l.is("simple", e.simple),
611
- l.is("center", e.alignCenter)
612
- ]), 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 ? {
613
697
  "--steps-space": typeof e.space == "number" ? `${e.space}px` : e.space
614
698
  } : {});
615
- return (f, p) => (r(), u("div", {
616
- class: n(y.value),
617
- style: X(c.value)
699
+ return (c, d) => (u(), m("div", {
700
+ class: o(k.value),
701
+ style: I(r.value)
618
702
  }, [
619
- k(f.$slots, "default")
703
+ y(c.$slots, "default")
620
704
  ], 6));
621
705
  }
622
- }), p0 = /* @__PURE__ */ V({
706
+ }), Ce = /* @__PURE__ */ V({
623
707
  name: "XStep",
624
708
  __name: "Step",
625
709
  props: {
@@ -628,96 +712,100 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
628
712
  icon: {},
629
713
  status: {}
630
714
  },
631
- setup(s) {
632
- const t = s, e = $("step"), a = B("steps"), l = _(-1);
633
- J(() => {
634
- 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));
635
719
  });
636
- const o = v(() => {
637
- var f, p, d;
638
- if (t.status) return t.status;
639
- const c = ((f = a == null ? void 0 : a.currentActive) == null ? void 0 : f.value) ?? 0;
640
- 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";
641
- }), m = v(() => {
642
- var c;
643
- return l.value === (((c = a == null ? void 0 : a.stepCount) == null ? void 0 : c.value) || 0) - 1;
644
- }), h = v(() => l.value === 0);
645
- 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(() => ({
646
730
  wait: "#c0c4cc",
647
731
  process: "#409eff",
648
732
  finish: "#67c23a",
649
733
  error: "#f56c6c",
650
734
  success: "#67c23a"
651
- })[o.value] || "#c0c4cc");
652
- const b = v(() => {
653
- var c;
735
+ })[s.value] || "#c0c4cc");
736
+ const M = b(() => {
737
+ var r;
654
738
  return [
655
739
  e.b(),
656
- e.is(o.value),
657
- e.is("last", m.value),
658
- 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")
659
743
  ];
660
- }), y = () => {
661
- var c;
662
- 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));
663
747
  };
664
- return (c, f) => (r(), u("div", {
665
- class: n(b.value),
666
- onClick: y
748
+ return (r, c) => (u(), m("div", {
749
+ class: o(M.value),
750
+ onClick: k
667
751
  }, [
668
- M("div", {
669
- class: n(i(e).e("head"))
752
+ z("div", {
753
+ class: o(n(e).e("head"))
670
754
  }, [
671
- h.value ? C("", !0) : (r(), u("div", {
755
+ p.value ? C("", !0) : (u(), m("div", {
672
756
  key: 0,
673
- class: n([i(e).e("line"), i(e).em("line", "prev")])
757
+ class: o([n(e).e("line"), n(e).em("line", "prev")])
674
758
  }, null, 2)),
675
- M("div", {
676
- class: n(i(e).e("icon"))
759
+ z("div", {
760
+ class: o(n(e).e("icon"))
677
761
  }, [
678
- s.icon ? (r(), u("span", {
762
+ t.icon ? (u(), m("span", {
679
763
  key: 0,
680
- class: n(i(e).e("icon-inner"))
681
- }, H(s.icon), 3)) : (r(), u("span", {
764
+ class: o(n(e).e("icon-inner"))
765
+ }, H(t.icon), 3)) : (u(), m("span", {
682
766
  key: 1,
683
- class: n(i(e).e("icon-inner"))
767
+ class: o(n(e).e("icon-inner"))
684
768
  }, [
685
- o.value === "finish" || o.value === "success" ? (r(), u(I, { key: 0 }, [
686
- w("✓")
687
- ], 64)) : o.value === "error" ? (r(), u(I, { key: 1 }, [
688
- w("✕")
689
- ], 64)) : (r(), u(I, { key: 2 }, [
690
- 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)
691
779
  ], 64))
692
780
  ], 2))
693
781
  ], 2),
694
- m.value ? C("", !0) : (r(), u("div", {
782
+ h.value ? C("", !0) : (u(), m("div", {
695
783
  key: 1,
696
- class: n(i(e).e("line"))
784
+ class: o(n(e).e("line"))
697
785
  }, null, 2))
698
786
  ], 2),
699
- M("div", {
700
- class: n(i(e).e("content"))
787
+ z("div", {
788
+ class: o(n(e).e("content"))
701
789
  }, [
702
- M("div", {
703
- class: n(i(e).e("title"))
790
+ z("div", {
791
+ class: o(n(e).e("title"))
704
792
  }, [
705
- k(c.$slots, "title", {}, () => [
706
- w(H(s.title), 1)
793
+ y(r.$slots, "title", {}, () => [
794
+ A(H(t.title), 1)
707
795
  ])
708
796
  ], 2),
709
- s.description || c.$slots.description ? (r(), u("div", {
797
+ t.description || r.$slots.description ? (u(), m("div", {
710
798
  key: 0,
711
- class: n(i(e).e("description"))
799
+ class: o(n(e).e("description"))
712
800
  }, [
713
- k(c.$slots, "description", {}, () => [
714
- w(H(s.description), 1)
801
+ y(r.$slots, "description", {}, () => [
802
+ A(H(t.description), 1)
715
803
  ])
716
804
  ], 2)) : C("", !0)
717
805
  ], 2)
718
806
  ], 2));
719
807
  }
720
- }), M0 = /* @__PURE__ */ V({
808
+ }), $e = /* @__PURE__ */ V({
721
809
  name: "XPageHeader",
722
810
  __name: "index",
723
811
  props: {
@@ -727,69 +815,74 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
727
815
  showBack: { type: Boolean, default: !1 }
728
816
  },
729
817
  emits: ["back"],
730
- setup(s, { emit: t }) {
731
- const e = t, a = $("page-header"), l = () => {
818
+ setup(t, { emit: v }) {
819
+ const e = v, l = x("page-header"), a = () => {
732
820
  e("back");
733
821
  };
734
- return (o, m) => (r(), u("div", {
735
- class: n(i(a).b())
822
+ return (s, h) => (u(), m("div", {
823
+ class: o(n(l).b())
736
824
  }, [
737
- M("div", {
738
- class: n(i(a).e("main"))
825
+ z("div", {
826
+ class: o(n(l).e("main"))
739
827
  }, [
740
- M("div", {
741
- class: n(i(a).e("left"))
828
+ z("div", {
829
+ class: o(n(l).e("left"))
742
830
  }, [
743
- s.showBack ? (r(), u("span", {
831
+ t.showBack ? (u(), m("span", {
744
832
  key: 0,
745
- class: n(i(a).e("back")),
746
- onClick: l
833
+ class: o(n(l).e("back")),
834
+ onClick: a
747
835
  }, [
748
- M("span", {
749
- class: n(i(a).e("back-icon"))
750
- }, "←", 2),
751
- 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", {
752
845
  key: 0,
753
- class: n(i(a).e("back-text"))
754
- }, H(s.backText), 3)) : C("", !0)
846
+ class: o(n(l).e("back-text"))
847
+ }, H(t.backText), 3)) : C("", !0)
755
848
  ], 2)) : C("", !0),
756
- M("span", {
757
- class: n(i(a).e("title"))
849
+ z("span", {
850
+ class: o(n(l).e("title"))
758
851
  }, [
759
- k(o.$slots, "title", {}, () => [
760
- w(H(s.title), 1)
852
+ y(s.$slots, "title", {}, () => [
853
+ A(H(t.title), 1)
761
854
  ])
762
855
  ], 2),
763
- s.subtitle || o.$slots.subtitle ? (r(), u("span", {
856
+ t.subtitle || s.$slots.subtitle ? (u(), m("span", {
764
857
  key: 1,
765
- class: n(i(a).e("subtitle"))
858
+ class: o(n(l).e("subtitle"))
766
859
  }, [
767
- k(o.$slots, "subtitle", {}, () => [
768
- w(H(s.subtitle), 1)
860
+ y(s.$slots, "subtitle", {}, () => [
861
+ A(H(t.subtitle), 1)
769
862
  ])
770
863
  ], 2)) : C("", !0)
771
864
  ], 2),
772
- M("div", {
773
- class: n(i(a).e("extra"))
865
+ z("div", {
866
+ class: o(n(l).e("extra"))
774
867
  }, [
775
- k(o.$slots, "extra")
868
+ y(s.$slots, "extra")
776
869
  ], 2)
777
870
  ], 2),
778
- o.$slots.default ? (r(), u("div", {
871
+ s.$slots.default ? (u(), m("div", {
779
872
  key: 0,
780
- class: n(i(a).e("content"))
873
+ class: o(n(l).e("content"))
781
874
  }, [
782
- k(o.$slots, "default")
875
+ y(s.$slots, "default")
783
876
  ], 2)) : C("", !0),
784
- o.$slots.footer ? (r(), u("div", {
877
+ s.$slots.footer ? (u(), m("div", {
785
878
  key: 1,
786
- class: n(i(a).e("footer"))
879
+ class: o(n(l).e("footer"))
787
880
  }, [
788
- k(o.$slots, "footer")
881
+ y(s.$slots, "footer")
789
882
  ], 2)) : C("", !0)
790
883
  ], 2));
791
884
  }
792
- }), f0 = /* @__PURE__ */ V({
885
+ }), He = /* @__PURE__ */ V({
793
886
  name: "XDropdown",
794
887
  __name: "index",
795
888
  props: {
@@ -800,67 +893,67 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
800
893
  hideOnClick: { type: Boolean, default: !0 }
801
894
  },
802
895
  emits: ["visible-change", "click", "command"],
803
- setup(s, { emit: t }) {
804
- const e = s, a = t, l = $("dropdown"), o = _(e.visible || !1), m = _(), h = () => {
805
- e.disabled || (o.value = !0, a("visible-change", !0));
806
- }, b = () => {
807
- o.value = !1, a("visible-change", !1);
808
- }, y = () => {
809
- 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();
810
903
  };
811
- A("x-dropdown", {
812
- visible: o,
813
- handleClick: (z) => {
814
- 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();
815
908
  },
816
- hide: b
909
+ hide: M
817
910
  });
818
- const f = () => {
819
- e.trigger === "hover" && h();
820
- }, p = () => {
821
- e.trigger === "hover" && b();
822
- }, d = (z) => {
823
- 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();
824
917
  };
825
- 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", {
826
919
  ref_key: "dropdownRef",
827
- ref: m,
828
- class: n([i(l).b(), i(l).is("disabled", s.disabled)]),
829
- onMouseenter: f,
830
- onMouseleave: p
920
+ ref: h,
921
+ class: o([n(a).b(), n(a).is("disabled", t.disabled)]),
922
+ onMouseenter: c,
923
+ onMouseleave: d
831
924
  }, [
832
- M("div", {
833
- class: n(i(l).e("trigger")),
834
- onClick: g[0] || (g[0] = (x) => s.trigger === "click" && y())
925
+ z("div", {
926
+ class: o(n(a).e("trigger")),
927
+ onClick: g[0] || (g[0] = ($) => t.trigger === "click" && k())
835
928
  }, [
836
- k(z.$slots, "default")
929
+ y(f.$slots, "default")
837
930
  ], 2),
838
- O(W, { name: "x-dropdown-zoom" }, {
839
- default: j(() => [
840
- D(M("div", {
841
- 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)])
842
935
  }, [
843
- k(z.$slots, "dropdown")
936
+ y(f.$slots, "dropdown")
844
937
  ], 2), [
845
- [K, o.value]
938
+ [q, s.value]
846
939
  ])
847
940
  ]),
848
941
  _: 3
849
942
  })
850
943
  ], 34));
851
944
  }
852
- }), z0 = /* @__PURE__ */ V({
945
+ }), xe = /* @__PURE__ */ V({
853
946
  name: "XDropdownMenu",
854
947
  __name: "DropdownMenu",
855
- setup(s) {
856
- const t = $("dropdown-menu");
857
- return (e, a) => (r(), u("ul", {
858
- 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())
859
952
  }, [
860
- k(e.$slots, "default")
953
+ y(e.$slots, "default")
861
954
  ], 2));
862
955
  }
863
- }), b0 = /* @__PURE__ */ V({
956
+ }), Be = /* @__PURE__ */ V({
864
957
  name: "XDropdownItem",
865
958
  __name: "DropdownItem",
866
959
  props: {
@@ -870,43 +963,334 @@ const Z = ["stroke-width"], e0 = ["d"], R = /* @__PURE__ */ V({
870
963
  icon: {}
871
964
  },
872
965
  emits: ["click"],
873
- setup(s, { emit: t }) {
874
- const e = s, a = t, l = $("dropdown-item"), o = B("x-dropdown"), m = (b) => {
875
- e.disabled || (a("click", b), o != null && o.handleClick && o.handleClick(e.command ?? b));
876
- }, h = v(() => [
877
- l.b(),
878
- l.is("disabled", e.disabled),
879
- 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)
880
973
  ]);
881
- return (b, y) => (r(), u("li", {
882
- class: n(h.value),
883
- onClick: m
974
+ return (M, k) => (u(), m("li", {
975
+ class: o(p.value),
976
+ onClick: h
884
977
  }, [
885
- s.icon ? (r(), u("span", {
978
+ t.icon ? (u(), m("span", {
886
979
  key: 0,
887
- class: n(i(l).e("icon"))
888
- }, H(s.icon), 3)) : C("", !0),
889
- M("span", {
890
- 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"))
891
984
  }, [
892
- k(b.$slots, "default")
985
+ y(M.$slots, "default")
893
986
  ], 2)
894
987
  ], 2));
895
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
+ }
896
1276
  });
897
1277
  export {
898
- v0 as Breadcrumb,
899
- m0 as BreadcrumbItem,
900
- f0 as Dropdown,
901
- b0 as DropdownItem,
902
- z0 as DropdownMenu,
903
- i0 as Menu,
904
- r0 as MenuItem,
905
- u0 as MenuItemGroup,
906
- M0 as PageHeader,
907
- p0 as Step,
908
- h0 as Steps,
909
- d0 as SubMenu,
910
- c0 as TabPane,
911
- 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
912
1296
  };