@xto/feedback 1.1.9 → 1.2.1

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,259 @@
1
- import { defineComponent as N, ref as I, computed as L, watch as te, resolveComponent as ke, openBlock as f, createBlock as j, Teleport as oe, createVNode as K, Transition as q, withCtx as D, createElementBlock as x, normalizeStyle as O, normalizeClass as a, unref as i, createElementVNode as C, withModifiers as ie, renderSlot as S, createTextVNode as H, toDisplayString as z, createCommentVNode as $, withDirectives as re, vShow as ce, Fragment as ge, renderList as ye, nextTick as ee, onUnmounted as ue, onMounted as be, reactive as Ce, createApp as ve, h as T } from "vue";
2
- import { useNamespace as F, useZIndex as $e, useEscape as Be, nextMessageZIndex as Te } from "@xto/core";
3
- const ot = /* @__PURE__ */ N({
1
+ import { defineComponent as R, computed as B, openBlock as u, createElementBlock as f, normalizeStyle as P, normalizeClass as s, createElementVNode as z, renderSlot as H, createTextVNode as S, toDisplayString as $, ref as I, watch as ae, resolveComponent as ze, createBlock as Z, Teleport as oe, createVNode as E, Transition as K, withCtx as D, unref as o, withModifiers as re, createCommentVNode as C, withDirectives as ce, vShow as ue, Fragment as ge, renderList as be, nextTick as te, onUnmounted as de, onMounted as ye, reactive as Ce, createApp as Me, h as k } from "vue";
2
+ import { useNamespace as N, useZIndex as Ve, useEscape as Le, nextMessageZIndex as He } from "@xto/core";
3
+ const we = {
4
+ // 箭头类
5
+ "arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
6
+ "arrow-down": "M12 5v14m0 0l7-7m-7 7l-7-7",
7
+ "arrow-left": "M19 12H5m0 0l7 7m-7-7l7-7",
8
+ "arrow-right": "M5 12h14m0 0l-7-7m7 7l-7 7",
9
+ "arrow-up-bold": "M12 5l-7 7h4v7h6v-7h4l-7-7z",
10
+ "arrow-down-bold": "M12 19l7-7h-4V5H9v7H5l7 7z",
11
+ "arrow-left-bold": "M5 12l7-7v4h7v6h-7v4l-7-7z",
12
+ "arrow-right-bold": "M19 12l-7 7v-4H5v-6h7V5l7 7z",
13
+ // 树形结构类
14
+ "caret-down": "M6 9l6 6 6-6",
15
+ "caret-right": "M9 18l6-6-6-6",
16
+ // 操作类
17
+ plus: "M12 5v14m-7-7h14",
18
+ minus: "M5 12h14",
19
+ close: "M6 18L18 6M6 6l12 12",
20
+ check: "M5 13l4 4L19 7",
21
+ "check-bold": "M4 12l5 5L20 6",
22
+ edit: "M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",
23
+ delete: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",
24
+ copy: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",
25
+ download: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",
26
+ upload: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",
27
+ refresh: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",
28
+ search: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
29
+ filter: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",
30
+ more: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z",
31
+ "more-h": "M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",
32
+ setting: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",
33
+ share: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",
34
+ // 状态类
35
+ loading: "M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",
36
+ info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
37
+ success: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
38
+ warning: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",
39
+ error: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
40
+ question: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
41
+ // 用户类
42
+ user: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
43
+ "user-add": "M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",
44
+ "user-group": "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
45
+ logout: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",
46
+ login: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",
47
+ // 文件类
48
+ file: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",
49
+ folder: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",
50
+ "folder-open": "M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",
51
+ document: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
52
+ // 媒体类
53
+ image: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",
54
+ video: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",
55
+ music: "M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",
56
+ camera: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",
57
+ // 通信类
58
+ mail: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",
59
+ phone: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",
60
+ chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
61
+ bell: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
62
+ message: "M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",
63
+ // 视图类
64
+ eye: "M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z",
65
+ "eye-off": "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",
66
+ // 时间类
67
+ calendar: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",
68
+ clock: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
69
+ history: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
70
+ timer: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",
71
+ // 位置类
72
+ location: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",
73
+ map: "M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",
74
+ globe: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",
75
+ // 其他
76
+ star: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",
77
+ heart: "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",
78
+ "thumb-up": "M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",
79
+ link: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",
80
+ "external-link": "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",
81
+ lock: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",
82
+ unlock: "M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",
83
+ key: "M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",
84
+ home: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
85
+ menu: "M4 6h16M4 12h16M4 18h16",
86
+ "menu-fold": "M4 6h16M4 12h10M4 18h16",
87
+ "menu-unfold": "M4 6h16M10 12h10M4 18h16",
88
+ "menu-collapse": "M4 6h16M4 12h10M4 18h16",
89
+ "menu-expand": "M4 6h16M10 12h10M4 18h16",
90
+ "sidebar-fold": "M11 19l-7-7 7-7m8 14l-7-7 7-7",
91
+ "sidebar-expand": "M13 5l7 7-7 7M5 5l7 7-7 7",
92
+ "sidebar-left": "M11 19l-7-7 7-7m8 14l-7-7 7-7",
93
+ // 菜单导航类
94
+ dashboard: "M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",
95
+ chart: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z",
96
+ "chart-pie": "M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z",
97
+ "chart-line": "M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",
98
+ report: "M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
99
+ analytics: "M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",
100
+ system: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",
101
+ permission: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",
102
+ role: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
103
+ "user-manage": "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",
104
+ log: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",
105
+ notification: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
106
+ app: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",
107
+ list: "M4 6h16M4 10h16M4 14h16M4 18h16",
108
+ grid: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",
109
+ fullscreen: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",
110
+ "fullscreen-exit": "M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5",
111
+ "zoom-in": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7",
112
+ "zoom-out": "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",
113
+ print: "M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",
114
+ bookmark: "M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",
115
+ tag: "M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",
116
+ code: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",
117
+ terminal: "M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",
118
+ database: "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",
119
+ server: "M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",
120
+ cloud: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
121
+ gift: "M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",
122
+ // 主题类
123
+ 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",
124
+ 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",
125
+ 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",
126
+ skin: "M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",
127
+ // Markdown 编辑器类
128
+ heading: "M4 6h16M4 12h8m-8 6h16",
129
+ // 标题
130
+ 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",
131
+ // 粗体
132
+ italic: "M10 4h4m-2 0v16m-4 0h8",
133
+ // 斜体
134
+ 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",
135
+ // 删除线
136
+ "list-bullet": "M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12",
137
+ // 无序列表
138
+ "list-number": "M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12",
139
+ // 有序列表
140
+ "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",
141
+ // 链接
142
+ "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",
143
+ // 图片
144
+ "code-inline": "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",
145
+ // 代码
146
+ "divider-h": "M4 12h16",
147
+ // 分割线
148
+ 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",
149
+ // 引用
150
+ "code-block": "M4 4h16v16H4z M8 8h8M8 12h8M8 16h4",
151
+ // 代码块
152
+ // 排序和展开类
153
+ "sort-up": "M12 5v14m-7-7l7-7 7 7",
154
+ // 向上排序
155
+ "sort-down": "M12 19V5m7 7l-7 7-7-7",
156
+ // 向下排序
157
+ "chevron-down": "M6 9l6 6 6-6",
158
+ // 向下展开
159
+ "chevron-right": "M9 18l6-6-6-6",
160
+ // 向右展开
161
+ "chevron-up": "M18 15l-6-6-6 6",
162
+ // 向上收起
163
+ "chevron-left": "M15 18l-6-6 6-6",
164
+ // 向左收起
165
+ // 移动类
166
+ "move-up": "M5 15l7-7 7 7",
167
+ // 上移
168
+ "move-down": "M19 9l-7 7-7-7",
169
+ // 下移
170
+ "back-top": "M12 19V5m-7 7l7-7 7 7",
171
+ // 回到顶部
172
+ // 下拉箭头
173
+ "dropdown-arrow": "M6 9l6 6 6-6",
174
+ // 关闭/错误类
175
+ "close-circle": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
176
+ // 圆形关闭
177
+ "close-bold": "M6 18L18 6M6 6l12 12",
178
+ // 加粗关闭
179
+ // 圆形状态类
180
+ "check-circle": "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
181
+ // 圆形勾选
182
+ "info-circle": "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",
183
+ // 圆形信息
184
+ "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",
185
+ // 圆形警告
186
+ // 返回类
187
+ "back-arrow": "M19 12H5m0 0l7 7m-7-7l7-7",
188
+ // 返回箭头
189
+ // 日历导航类
190
+ "d-arrow-left": "M11 17l-5-5 5-5M18 17l-5-5 5-5",
191
+ // 双左箭头
192
+ "d-arrow-right": "M6 7l5 5-5 5M13 7l5 5-5 5",
193
+ // 双右箭头
194
+ // 方向箭头类
195
+ left: "M15 19l-7-7 7-7",
196
+ // 左箭头
197
+ right: "M9 5l7 7-7 7",
198
+ // 右箭头
199
+ down: "M19 9l-7 7-7-7",
200
+ // 下箭头
201
+ up: "M5 15l7-7 7 7"
202
+ // 上箭头
203
+ };
204
+ function $e(e) {
205
+ return e in we;
206
+ }
207
+ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X = /* @__PURE__ */ R({
208
+ name: "XIcon",
209
+ __name: "index",
210
+ props: {
211
+ name: {},
212
+ size: { default: 24 },
213
+ color: {},
214
+ spin: { type: Boolean, default: !1 },
215
+ strokeWidth: { default: 2 }
216
+ },
217
+ setup(e, { expose: n }) {
218
+ const t = e, r = N("icon"), a = B(() => typeof t.size == "number" ? `${t.size}px` : t.size), i = B(() => ({
219
+ width: a.value,
220
+ height: a.value,
221
+ color: t.color
222
+ })), m = B(() => ({
223
+ strokeWidth: t.strokeWidth
224
+ })), g = B(() => [
225
+ r.b(),
226
+ r.is("spin", t.spin)
227
+ ]), v = B(() => t.name && $e(t.name) ? we[t.name] : "");
228
+ return n({
229
+ iconSize: a,
230
+ iconStyle: i,
231
+ iconPath: v
232
+ }), (c, x) => (u(), f("span", {
233
+ class: s(g.value),
234
+ style: P(i.value),
235
+ "aria-hidden": !e.name,
236
+ "aria-label": e.name,
237
+ role: "img"
238
+ }, [
239
+ v.value ? (u(), f("svg", {
240
+ key: 0,
241
+ viewBox: "0 0 24 24",
242
+ fill: "none",
243
+ stroke: "currentColor",
244
+ "stroke-width": e.strokeWidth,
245
+ "stroke-linecap": "round",
246
+ "stroke-linejoin": "round",
247
+ style: P(m.value),
248
+ "aria-hidden": "true"
249
+ }, [
250
+ z("path", { d: v.value }, null, 8, Ie)
251
+ ], 12, Te)) : H(c.$slots, "default", { key: 1 }, () => [
252
+ S($(e.name), 1)
253
+ ])
254
+ ], 14, Be));
255
+ }
256
+ }), rt = /* @__PURE__ */ R({
4
257
  name: "XModal",
5
258
  inheritAttrs: !1,
6
259
  __name: "index",
@@ -18,108 +271,113 @@ const ot = /* @__PURE__ */ N({
18
271
  destroyOnClose: { type: Boolean, default: !1 }
19
272
  },
20
273
  emits: ["update:modelValue", "update:open", "close", "open", "ok", "cancel"],
21
- setup(e, { emit: s }) {
22
- const t = e, r = s, o = F("modal"), { next: l } = $e(), m = I(l()), g = L({
274
+ setup(e, { emit: n }) {
275
+ const t = e, r = n, a = N("modal"), { next: i } = Ve(), m = I(i()), g = B({
23
276
  get: () => t.modelValue !== void 0 ? t.modelValue : t.open !== void 0 ? t.open : !1,
24
- set: (d) => {
25
- t.modelValue !== void 0 && r("update:modelValue", d), t.open !== void 0 && r("update:open", d), t.modelValue === void 0 && t.open === void 0 && r("update:modelValue", d);
277
+ set: (h) => {
278
+ t.modelValue !== void 0 && r("update:modelValue", h), t.open !== void 0 && r("update:open", h), t.modelValue === void 0 && t.open === void 0 && r("update:modelValue", h);
26
279
  }
27
280
  }), v = I(), c = () => {
28
281
  g.value = !1, r("cancel"), r("close");
29
- }, k = () => {
282
+ }, x = () => {
30
283
  r("ok");
31
284
  }, p = () => {
32
285
  t.closeOnClickModal && t.modal && c();
33
286
  };
34
- Be(() => {
287
+ Le(() => {
35
288
  t.closeOnPressEscape && g.value && c();
36
- }), te(() => [t.modelValue, t.open], ([d, n]) => {
37
- (d !== void 0 ? d : n) && (m.value = l(), r("open"));
289
+ }), ae(() => [t.modelValue, t.open], ([h, l]) => {
290
+ (h !== void 0 ? h : l) && (m.value = i(), r("open"));
38
291
  }, { immediate: !0 });
39
- const w = L(() => ({
292
+ const w = B(() => ({
40
293
  paddingTop: t.top
41
- })), h = L(() => ({
294
+ })), M = B(() => ({
42
295
  width: typeof t.width == "number" ? `${t.width}px` : t.width,
43
296
  zIndex: m.value
44
297
  }));
45
- return (d, n) => {
46
- const y = ke("x-button");
47
- return f(), j(oe, { to: "body" }, [
48
- K(q, { name: "x-modal-fade" }, {
298
+ return (h, l) => {
299
+ const b = ze("x-button");
300
+ return u(), Z(oe, { to: "body" }, [
301
+ E(K, { name: "x-modal-fade" }, {
49
302
  default: D(() => [
50
- g.value ? (f(), x("div", {
303
+ g.value ? (u(), f("div", {
51
304
  key: 0,
52
- class: a(i(o).e("wrapper")),
53
- style: O(w.value),
305
+ class: s(o(a).e("wrapper")),
306
+ style: P(w.value),
54
307
  onClick: p
55
308
  }, [
56
- C("div", {
309
+ z("div", {
57
310
  ref_key: "modalRef",
58
311
  ref: v,
59
- class: a(i(o).b()),
60
- style: O(h.value),
61
- onClick: n[0] || (n[0] = ie(() => {
312
+ class: s(o(a).b()),
313
+ style: P(M.value),
314
+ onClick: l[0] || (l[0] = re(() => {
62
315
  }, ["stop"]))
63
316
  }, [
64
- C("div", {
65
- class: a(i(o).e("header"))
317
+ z("div", {
318
+ class: s(o(a).e("header"))
66
319
  }, [
67
- C("span", {
68
- class: a(i(o).e("title"))
320
+ z("span", {
321
+ class: s(o(a).e("title"))
69
322
  }, [
70
- S(d.$slots, "title", {}, () => [
71
- H(z(e.title), 1)
323
+ H(h.$slots, "title", {}, () => [
324
+ S($(e.title), 1)
72
325
  ])
73
326
  ], 2),
74
- e.showClose ? (f(), x("button", {
327
+ e.showClose ? (u(), f("button", {
75
328
  key: 0,
76
- class: a(i(o).e("close")),
329
+ class: s(o(a).e("close")),
77
330
  onClick: c
78
- }, " ✕ ", 2)) : $("", !0)
331
+ }, [
332
+ E(o(X), {
333
+ name: "close",
334
+ size: 16
335
+ })
336
+ ], 2)) : C("", !0)
79
337
  ], 2),
80
- C("div", {
81
- class: a(i(o).e("body"))
338
+ z("div", {
339
+ class: s(o(a).e("body"))
82
340
  }, [
83
- S(d.$slots, "default")
341
+ H(h.$slots, "default")
84
342
  ], 2),
85
- d.$slots.footer ? (f(), x("div", {
343
+ h.$slots.footer ? (u(), f("div", {
86
344
  key: 0,
87
- class: a(i(o).e("footer"))
345
+ class: s(o(a).e("footer"))
88
346
  }, [
89
- S(d.$slots, "footer", {
90
- ok: k,
347
+ H(h.$slots, "footer", {
348
+ ok: x,
91
349
  cancel: c
92
350
  })
93
- ], 2)) : d.$slots.footer ? $("", !0) : (f(), x("div", {
351
+ ], 2)) : h.$slots.footer ? C("", !0) : (u(), f("div", {
94
352
  key: 1,
95
- class: a(i(o).e("footer"))
353
+ class: s(o(a).e("footer"))
96
354
  }, [
97
- K(y, { onClick: c }, {
98
- default: D(() => [...n[1] || (n[1] = [
99
- H("取消", -1)
355
+ E(b, { onClick: c }, {
356
+ default: D(() => [...l[1] || (l[1] = [
357
+ S("取消", -1)
100
358
  ])]),
101
359
  _: 1
102
360
  }),
103
- K(y, {
361
+ E(b, {
104
362
  type: "primary",
105
363
  style: { "margin-left": "8px" },
106
- onClick: k
364
+ onClick: x
107
365
  }, {
108
- default: D(() => [...n[2] || (n[2] = [
109
- H("确定", -1)
366
+ default: D(() => [...l[2] || (l[2] = [
367
+ S("确定", -1)
110
368
  ])]),
111
369
  _: 1
112
370
  })
113
371
  ], 2))
114
372
  ], 6)
115
- ], 6)) : $("", !0)
373
+ ], 6)) : C("", !0)
116
374
  ]),
117
375
  _: 3
118
376
  })
119
377
  ]);
120
378
  };
121
379
  }
122
- }), nt = /* @__PURE__ */ N({
380
+ }), ct = /* @__PURE__ */ R({
123
381
  name: "XDrawer",
124
382
  inheritAttrs: !1,
125
383
  __name: "index",
@@ -137,73 +395,78 @@ const ot = /* @__PURE__ */ N({
137
395
  modal: { type: Boolean, default: !0 }
138
396
  },
139
397
  emits: ["update:modelValue", "close", "open"],
140
- setup(e, { emit: s }) {
141
- const t = e, r = s, o = F("drawer"), l = I(2e3), m = () => {
398
+ setup(e, { emit: n }) {
399
+ const t = e, r = n, a = N("drawer"), i = I(2e3), m = () => {
142
400
  r("update:modelValue", !1), r("close");
143
401
  }, g = () => {
144
402
  t.closeOnClickModal && m();
145
403
  }, v = (p) => {
146
404
  p.key === "Escape" && t.modelValue && m();
147
405
  };
148
- te(() => t.modelValue, (p) => {
149
- p ? (l.value = 2e3 + Math.floor(Math.random() * 100), r("open"), document.addEventListener("keydown", v)) : document.removeEventListener("keydown", v);
406
+ ae(() => t.modelValue, (p) => {
407
+ p ? (i.value = 2e3 + Math.floor(Math.random() * 100), r("open"), document.addEventListener("keydown", v)) : document.removeEventListener("keydown", v);
150
408
  });
151
- const c = L(() => ({
152
- zIndex: l.value
153
- })), k = L(() => {
154
- const p = t.direction ?? t.placement ?? "rtl", w = t.size ?? t.width ?? "30%", h = typeof w == "number" ? `${w}px` : w;
409
+ const c = B(() => ({
410
+ zIndex: i.value
411
+ })), x = B(() => {
412
+ const p = t.direction ?? t.placement ?? "rtl", w = t.size ?? t.width ?? "30%", M = typeof w == "number" ? `${w}px` : w;
155
413
  return {
156
- ltr: { width: h, height: "100%" },
157
- rtl: { width: h, height: "100%" },
158
- ttb: { width: "100%", height: h },
159
- btt: { width: "100%", height: h }
414
+ ltr: { width: M, height: "100%" },
415
+ rtl: { width: M, height: "100%" },
416
+ ttb: { width: "100%", height: M },
417
+ btt: { width: "100%", height: M }
160
418
  }[p];
161
419
  });
162
- return (p, w) => (f(), j(oe, { to: "body" }, [
163
- K(q, { name: "x-drawer-fade" }, {
420
+ return (p, w) => (u(), Z(oe, { to: "body" }, [
421
+ E(K, { name: "x-drawer-fade" }, {
164
422
  default: D(() => [
165
- re(C("div", {
166
- class: a([i(o).e("overlay"), { [i(o).em("overlay", "no-modal")]: !e.modal }]),
167
- style: O(c.value),
423
+ ce(z("div", {
424
+ class: s([o(a).e("overlay"), { [o(a).em("overlay", "no-modal")]: !e.modal }]),
425
+ style: P(c.value),
168
426
  onClick: g
169
427
  }, [
170
- C("div", {
171
- class: a([i(o).b(), i(o).m(e.direction ?? e.placement ?? "rtl")]),
172
- style: O(k.value),
173
- onClick: w[0] || (w[0] = ie(() => {
428
+ z("div", {
429
+ class: s([o(a).b(), o(a).m(e.direction ?? e.placement ?? "rtl")]),
430
+ style: P(x.value),
431
+ onClick: w[0] || (w[0] = re(() => {
174
432
  }, ["stop"]))
175
433
  }, [
176
- e.withHeader ? (f(), x("div", {
434
+ e.withHeader ? (u(), f("div", {
177
435
  key: 0,
178
- class: a(i(o).e("header"))
436
+ class: s(o(a).e("header"))
179
437
  }, [
180
- C("span", {
181
- class: a(i(o).e("title"))
438
+ z("span", {
439
+ class: s(o(a).e("title"))
182
440
  }, [
183
- S(p.$slots, "title", {}, () => [
184
- H(z(e.title), 1)
441
+ H(p.$slots, "title", {}, () => [
442
+ S($(e.title), 1)
185
443
  ])
186
444
  ], 2),
187
- e.showClose ? (f(), x("button", {
445
+ e.showClose ? (u(), f("button", {
188
446
  key: 0,
189
- class: a(i(o).e("close")),
447
+ class: s(o(a).e("close")),
190
448
  onClick: m
191
- }, " ✕ ", 2)) : $("", !0)
192
- ], 2)) : $("", !0),
193
- C("div", {
194
- class: a([i(o).e("body"), p.$slots.footer && i(o).em("body", "has-footer")])
449
+ }, [
450
+ E(o(X), {
451
+ name: "close",
452
+ size: 18
453
+ })
454
+ ], 2)) : C("", !0)
455
+ ], 2)) : C("", !0),
456
+ z("div", {
457
+ class: s([o(a).e("body"), p.$slots.footer && o(a).em("body", "has-footer")])
195
458
  }, [
196
- S(p.$slots, "default")
459
+ H(p.$slots, "default")
197
460
  ], 2),
198
- p.$slots.footer ? (f(), x("div", {
461
+ p.$slots.footer ? (u(), f("div", {
199
462
  key: 1,
200
- class: a(i(o).e("footer"))
463
+ class: s(o(a).e("footer"))
201
464
  }, [
202
- S(p.$slots, "footer")
203
- ], 2)) : $("", !0)
465
+ H(p.$slots, "footer")
466
+ ], 2)) : C("", !0)
204
467
  ], 6)
205
468
  ], 6), [
206
- [ce, e.modelValue]
469
+ [ue, e.modelValue]
207
470
  ])
208
471
  ]),
209
472
  _: 3
@@ -213,7 +476,7 @@ const ot = /* @__PURE__ */ N({
213
476
  }), Ee = {
214
477
  key: 0,
215
478
  class: "required-mark"
216
- }, Me = ["value", "placeholder", "disabled", "onInput"], ze = ["value", "placeholder", "disabled", "onInput"], Ie = ["value", "placeholder", "disabled", "onInput"], Se = ["value", "disabled", "onChange"], Le = ["value"], Ve = ["disabled", "onClick"], st = /* @__PURE__ */ N({
479
+ }, Ae = ["value", "placeholder", "disabled", "onInput"], Pe = ["value", "placeholder", "disabled", "onInput"], Se = ["value", "placeholder", "disabled", "onInput"], Re = ["value", "disabled", "onChange"], Oe = ["value"], We = ["disabled", "onClick"], ut = /* @__PURE__ */ R({
217
480
  name: "XDrawerForm",
218
481
  __name: "index",
219
482
  props: {
@@ -230,155 +493,160 @@ const ot = /* @__PURE__ */ N({
230
493
  destroyOnClose: { type: Boolean, default: !1 }
231
494
  },
232
495
  emits: ["update:modelValue", "confirm", "cancel", "close", "field-change"],
233
- setup(e, { emit: s }) {
234
- const t = e, r = s, o = F("drawer-form"), l = I({}), m = I({});
235
- L(() => [
236
- o.b()
237
- ]), te(() => t.formData, (h) => {
238
- l.value = { ...h };
496
+ setup(e, { emit: n }) {
497
+ const t = e, r = n, a = N("drawer-form"), i = I({}), m = I({});
498
+ B(() => [
499
+ a.b()
500
+ ]), ae(() => t.formData, (M) => {
501
+ i.value = { ...M };
239
502
  }, { immediate: !0, deep: !0 });
240
- const g = L(() => typeof t.size == "number" ? `${t.size}px` : t.size), v = () => {
503
+ const g = B(() => typeof t.size == "number" ? `${t.size}px` : t.size), v = () => {
241
504
  r("update:modelValue", !1), r("close");
242
505
  }, c = () => {
243
506
  r("cancel"), v();
244
- }, k = () => {
245
- p() && (r("confirm", l.value), v());
507
+ }, x = () => {
508
+ p() && (r("confirm", i.value), v());
246
509
  }, p = () => {
247
510
  m.value = {};
248
- for (const h of t.fields) {
249
- if (h.required) {
250
- const d = l.value[h.name];
251
- if (d == null || d === "") {
252
- m.value[h.name] = `${h.label}为必填项`;
511
+ for (const M of t.fields) {
512
+ if (M.required) {
513
+ const h = i.value[M.name];
514
+ if (h == null || h === "") {
515
+ m.value[M.name] = `${M.label}为必填项`;
253
516
  continue;
254
517
  }
255
518
  }
256
- if (h.rules)
257
- for (const d of h.rules) {
258
- const n = l.value[h.name];
259
- d.type === "email" && n && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n) && (m.value[h.name] = d.message), d.type === "minLength" && n && n.length < d.min && (m.value[h.name] = d.message);
519
+ if (M.rules)
520
+ for (const h of M.rules) {
521
+ const l = i.value[M.name];
522
+ h.type === "email" && l && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l) && (m.value[M.name] = h.message), h.type === "minLength" && l && l.length < h.min && (m.value[M.name] = h.message);
260
523
  }
261
524
  }
262
525
  return Object.keys(m.value).length === 0;
263
- }, w = (h, d) => {
264
- l.value[h] = d, r("field-change", h, d);
526
+ }, w = (M, h) => {
527
+ i.value[M] = h, r("field-change", M, h);
265
528
  };
266
- return (h, d) => (f(), j(oe, { to: "body" }, [
267
- K(q, { name: "drawer-form-fade" }, {
529
+ return (M, h) => (u(), Z(oe, { to: "body" }, [
530
+ E(K, { name: "drawer-form-fade" }, {
268
531
  default: D(() => [
269
- re(C("div", {
270
- class: a(i(o).e("overlay")),
532
+ ce(z("div", {
533
+ class: s(o(a).e("overlay")),
271
534
  onClick: v
272
535
  }, [
273
- C("div", {
274
- class: a(i(o).b()),
275
- style: O({ width: g.value }),
276
- onClick: d[0] || (d[0] = ie(() => {
536
+ z("div", {
537
+ class: s(o(a).b()),
538
+ style: P({ width: g.value }),
539
+ onClick: h[0] || (h[0] = re(() => {
277
540
  }, ["stop"]))
278
541
  }, [
279
- C("div", {
280
- class: a(i(o).e("header"))
542
+ z("div", {
543
+ class: s(o(a).e("header"))
281
544
  }, [
282
- C("span", {
283
- class: a(i(o).e("title"))
284
- }, z(e.title), 3),
285
- C("button", {
286
- class: a(i(o).e("close")),
545
+ z("span", {
546
+ class: s(o(a).e("title"))
547
+ }, $(e.title), 3),
548
+ z("button", {
549
+ class: s(o(a).e("close")),
287
550
  onClick: v
288
- }, "✕", 2)
551
+ }, [
552
+ E(o(X), {
553
+ name: "close",
554
+ size: 16
555
+ })
556
+ ], 2)
289
557
  ], 2),
290
- C("div", {
291
- class: a(i(o).e("body"))
558
+ z("div", {
559
+ class: s(o(a).e("body"))
292
560
  }, [
293
- !e.destroyOnClose || e.modelValue ? (f(), x("div", {
561
+ !e.destroyOnClose || e.modelValue ? (u(), f("div", {
294
562
  key: 0,
295
- class: a(i(o).e("form"))
563
+ class: s(o(a).e("form"))
296
564
  }, [
297
- (f(!0), x(ge, null, ye(e.fields, (n) => (f(), x("div", {
298
- key: n.name,
299
- class: a(i(o).e("field"))
565
+ (u(!0), f(ge, null, be(e.fields, (l) => (u(), f("div", {
566
+ key: l.name,
567
+ class: s(o(a).e("field"))
300
568
  }, [
301
- C("label", {
302
- class: a(i(o).e("label"))
569
+ z("label", {
570
+ class: s(o(a).e("label"))
303
571
  }, [
304
- H(z(n.label) + " ", 1),
305
- n.required ? (f(), x("span", Ee, "*")) : $("", !0)
572
+ S($(l.label) + " ", 1),
573
+ l.required ? (u(), f("span", Ee, "*")) : C("", !0)
306
574
  ], 2),
307
- n.type === "input" ? (f(), x("input", {
575
+ l.type === "input" ? (u(), f("input", {
308
576
  key: 0,
309
- class: a([i(o).e("input"), { "has-error": m.value[n.name] }]),
310
- value: l.value[n.name],
311
- placeholder: n.placeholder,
312
- disabled: e.disabled || n.disabled,
313
- onInput: (y) => w(n.name, y.target.value)
314
- }, null, 42, Me)) : n.type === "textarea" ? (f(), x("textarea", {
577
+ class: s([o(a).e("input"), { "has-error": m.value[l.name] }]),
578
+ value: i.value[l.name],
579
+ placeholder: l.placeholder,
580
+ disabled: e.disabled || l.disabled,
581
+ onInput: (b) => w(l.name, b.target.value)
582
+ }, null, 42, Ae)) : l.type === "textarea" ? (u(), f("textarea", {
315
583
  key: 1,
316
- class: a([i(o).e("textarea"), { "has-error": m.value[n.name] }]),
317
- value: l.value[n.name],
318
- placeholder: n.placeholder,
319
- disabled: e.disabled || n.disabled,
584
+ class: s([o(a).e("textarea"), { "has-error": m.value[l.name] }]),
585
+ value: i.value[l.name],
586
+ placeholder: l.placeholder,
587
+ disabled: e.disabled || l.disabled,
320
588
  rows: "4",
321
- onInput: (y) => w(n.name, y.target.value)
322
- }, null, 42, ze)) : n.type === "number" ? (f(), x("input", {
589
+ onInput: (b) => w(l.name, b.target.value)
590
+ }, null, 42, Pe)) : l.type === "number" ? (u(), f("input", {
323
591
  key: 2,
324
592
  type: "number",
325
- class: a([i(o).e("input"), { "has-error": m.value[n.name] }]),
326
- value: l.value[n.name],
327
- placeholder: n.placeholder,
328
- disabled: e.disabled || n.disabled,
329
- onInput: (y) => w(n.name, Number(y.target.value))
330
- }, null, 42, Ie)) : n.type === "select" ? (f(), x("select", {
593
+ class: s([o(a).e("input"), { "has-error": m.value[l.name] }]),
594
+ value: i.value[l.name],
595
+ placeholder: l.placeholder,
596
+ disabled: e.disabled || l.disabled,
597
+ onInput: (b) => w(l.name, Number(b.target.value))
598
+ }, null, 42, Se)) : l.type === "select" ? (u(), f("select", {
331
599
  key: 3,
332
- class: a([i(o).e("select"), { "has-error": m.value[n.name] }]),
333
- value: l.value[n.name],
334
- disabled: e.disabled || n.disabled,
335
- onChange: (y) => w(n.name, y.target.value)
600
+ class: s([o(a).e("select"), { "has-error": m.value[l.name] }]),
601
+ value: i.value[l.name],
602
+ disabled: e.disabled || l.disabled,
603
+ onChange: (b) => w(l.name, b.target.value)
336
604
  }, [
337
- (f(!0), x(ge, null, ye(n.options, (y) => (f(), x("option", {
338
- key: y.value,
339
- value: y.value
340
- }, z(y.label), 9, Le))), 128))
341
- ], 42, Se)) : n.type === "switch" ? (f(), x("div", {
605
+ (u(!0), f(ge, null, be(l.options, (b) => (u(), f("option", {
606
+ key: b.value,
607
+ value: b.value
608
+ }, $(b.label), 9, Oe))), 128))
609
+ ], 42, Re)) : l.type === "switch" ? (u(), f("div", {
342
610
  key: 4,
343
- class: a(i(o).e("switch"))
611
+ class: s(o(a).e("switch"))
344
612
  }, [
345
- C("button", {
346
- class: a(["switch-btn", { "is-on": l.value[n.name] }]),
347
- disabled: e.disabled || n.disabled,
348
- onClick: (y) => w(n.name, !l.value[n.name])
349
- }, z(l.value[n.name] ? "开启" : "关闭"), 11, Ve)
350
- ], 2)) : $("", !0),
351
- m.value[n.name] ? (f(), x("span", {
613
+ z("button", {
614
+ class: s(["switch-btn", { "is-on": i.value[l.name] }]),
615
+ disabled: e.disabled || l.disabled,
616
+ onClick: (b) => w(l.name, !i.value[l.name])
617
+ }, $(i.value[l.name] ? "开启" : "关闭"), 11, We)
618
+ ], 2)) : C("", !0),
619
+ m.value[l.name] ? (u(), f("span", {
352
620
  key: 5,
353
- class: a(i(o).e("error"))
354
- }, z(m.value[n.name]), 3)) : $("", !0)
621
+ class: s(o(a).e("error"))
622
+ }, $(m.value[l.name]), 3)) : C("", !0)
355
623
  ], 2))), 128))
356
- ], 2)) : $("", !0)
624
+ ], 2)) : C("", !0)
357
625
  ], 2),
358
- C("div", {
359
- class: a(i(o).e("footer"))
626
+ z("div", {
627
+ class: s(o(a).e("footer"))
360
628
  }, [
361
- e.showCancel ? (f(), x("button", {
629
+ e.showCancel ? (u(), f("button", {
362
630
  key: 0,
363
- class: a(i(o).e("cancel")),
631
+ class: s(o(a).e("cancel")),
364
632
  onClick: c
365
- }, z(e.cancelText), 3)) : $("", !0),
366
- e.showConfirm ? (f(), x("button", {
633
+ }, $(e.cancelText), 3)) : C("", !0),
634
+ e.showConfirm ? (u(), f("button", {
367
635
  key: 1,
368
- class: a(i(o).e("confirm")),
369
- onClick: k
370
- }, z(e.confirmText), 3)) : $("", !0)
636
+ class: s(o(a).e("confirm")),
637
+ onClick: x
638
+ }, $(e.confirmText), 3)) : C("", !0)
371
639
  ], 2)
372
640
  ], 6)
373
641
  ], 2), [
374
- [ce, e.modelValue]
642
+ [ue, e.modelValue]
375
643
  ])
376
644
  ]),
377
645
  _: 1
378
646
  })
379
647
  ]));
380
648
  }
381
- }), lt = /* @__PURE__ */ N({
649
+ }), dt = /* @__PURE__ */ R({
382
650
  name: "XAlert",
383
651
  __name: "index",
384
652
  props: {
@@ -390,61 +658,71 @@ const ot = /* @__PURE__ */ N({
390
658
  center: { type: Boolean, default: !1 }
391
659
  },
392
660
  emits: ["close"],
393
- setup(e, { emit: s }) {
394
- const t = e, r = s, o = F("alert"), l = I(!0), m = {
395
- success: "",
396
- warning: "",
397
- error: "",
398
- info: ""
399
- }, g = L(() => [
400
- o.b(),
401
- o.m(t.type),
402
- o.is("center", t.center),
403
- o.is("with-description", t.description)
661
+ setup(e, { emit: n }) {
662
+ const t = e, r = n, a = N("alert"), i = I(!0), m = {
663
+ success: "check",
664
+ warning: "warning",
665
+ error: "close-circle",
666
+ info: "info"
667
+ }, g = B(() => [
668
+ a.b(),
669
+ a.m(t.type),
670
+ a.is("center", t.center),
671
+ a.is("with-description", t.description)
404
672
  ]), v = (c) => {
405
- l.value = !1, r("close", c);
673
+ i.value = !1, r("close", c);
406
674
  };
407
- return (c, k) => (f(), j(q, { name: "x-alert-fade" }, {
675
+ return (c, x) => (u(), Z(K, { name: "x-alert-fade" }, {
408
676
  default: D(() => [
409
- l.value ? (f(), x("div", {
677
+ i.value ? (u(), f("div", {
410
678
  key: 0,
411
- class: a(g.value)
679
+ class: s(g.value)
412
680
  }, [
413
- e.showIcon ? (f(), x("span", {
681
+ e.showIcon ? (u(), f("span", {
414
682
  key: 0,
415
- class: a(i(o).e("icon"))
416
- }, z(m[e.type]), 3)) : $("", !0),
417
- C("div", {
418
- class: a(i(o).e("content"))
683
+ class: s(o(a).e("icon"))
419
684
  }, [
420
- e.title || c.$slots.title ? (f(), x("span", {
685
+ E(o(X), {
686
+ name: m[e.type],
687
+ size: 16
688
+ }, null, 8, ["name"])
689
+ ], 2)) : C("", !0),
690
+ z("div", {
691
+ class: s(o(a).e("content"))
692
+ }, [
693
+ e.title || c.$slots.title ? (u(), f("span", {
421
694
  key: 0,
422
- class: a(i(o).e("title"))
695
+ class: s(o(a).e("title"))
423
696
  }, [
424
- S(c.$slots, "title", {}, () => [
425
- H(z(e.title), 1)
697
+ H(c.$slots, "title", {}, () => [
698
+ S($(e.title), 1)
426
699
  ])
427
- ], 2)) : $("", !0),
428
- e.description || c.$slots.default ? (f(), x("span", {
700
+ ], 2)) : C("", !0),
701
+ e.description || c.$slots.default ? (u(), f("span", {
429
702
  key: 1,
430
- class: a(i(o).e("description"))
703
+ class: s(o(a).e("description"))
431
704
  }, [
432
- S(c.$slots, "default", {}, () => [
433
- H(z(e.description), 1)
705
+ H(c.$slots, "default", {}, () => [
706
+ S($(e.description), 1)
434
707
  ])
435
- ], 2)) : $("", !0)
708
+ ], 2)) : C("", !0)
436
709
  ], 2),
437
- e.closable ? (f(), x("button", {
710
+ e.closable ? (u(), f("button", {
438
711
  key: 1,
439
- class: a(i(o).e("close")),
712
+ class: s(o(a).e("close")),
440
713
  onClick: v
441
- }, " ✕ ", 2)) : $("", !0)
442
- ], 2)) : $("", !0)
714
+ }, [
715
+ E(o(X), {
716
+ name: "close",
717
+ size: 14
718
+ })
719
+ ], 2)) : C("", !0)
720
+ ], 2)) : C("", !0)
443
721
  ]),
444
722
  _: 3
445
723
  }));
446
724
  }
447
- }), at = /* @__PURE__ */ N({
725
+ }), mt = /* @__PURE__ */ R({
448
726
  name: "XTooltip",
449
727
  __name: "index",
450
728
  props: {
@@ -460,115 +738,115 @@ const ot = /* @__PURE__ */ N({
460
738
  closeDelay: { default: 0 }
461
739
  },
462
740
  emits: ["update:visible", "show", "hide"],
463
- setup(e, { emit: s }) {
464
- const t = e, r = s, o = F("tooltip"), l = I(!1), m = I(), g = I();
741
+ setup(e, { emit: n }) {
742
+ const t = e, r = n, a = N("tooltip"), i = I(!1), m = I(), g = I();
465
743
  let v, c;
466
- const k = I({}), p = () => {
744
+ const x = I({}), p = () => {
467
745
  if (!m.value || !g.value) return;
468
- const E = m.value.getBoundingClientRect(), W = g.value;
469
- W.style.visibility = "hidden", W.style.display = "block";
470
- const A = W.offsetWidth, Z = W.offsetHeight, X = t.offset, fe = window.innerWidth, me = window.innerHeight;
471
- let P = 0, R = 0, G = t.placement;
746
+ const L = m.value.getBoundingClientRect(), F = g.value;
747
+ F.style.visibility = "hidden", F.style.display = "block";
748
+ const j = F.offsetWidth, U = F.offsetHeight, q = t.offset, he = window.innerWidth, fe = window.innerHeight;
749
+ let O = 0, W = 0, J = t.placement;
472
750
  switch (t.placement) {
473
751
  case "top":
474
- P = E.top - Z - X, R = E.left + (E.width - A) / 2;
752
+ O = L.top - U - q, W = L.left + (L.width - j) / 2;
475
753
  break;
476
754
  case "bottom":
477
- P = E.bottom + X, R = E.left + (E.width - A) / 2;
755
+ O = L.bottom + q, W = L.left + (L.width - j) / 2;
478
756
  break;
479
757
  case "left":
480
- P = E.top + (E.height - Z) / 2, R = E.left - A - X;
758
+ O = L.top + (L.height - U) / 2, W = L.left - j - q;
481
759
  break;
482
760
  case "right":
483
- P = E.top + (E.height - Z) / 2, R = E.right + X;
761
+ O = L.top + (L.height - U) / 2, W = L.right + q;
484
762
  break;
485
763
  }
486
- t.placement === "top" && P < 0 ? (G = "bottom", P = E.bottom + X) : t.placement === "bottom" && P + Z > me ? (G = "top", P = E.top - Z - X) : t.placement === "left" && R < 0 ? (G = "right", R = E.right + X) : t.placement === "right" && R + A > fe && (G = "left", R = E.left - A - X), R < 8 && (R = 8), R + A > fe - 8 && (R = fe - A - 8), P < 8 && (P = 8), P + Z > me - 8 && (P = me - Z - 8), k.value = {
764
+ t.placement === "top" && O < 0 ? (J = "bottom", O = L.bottom + q) : t.placement === "bottom" && O + U > fe ? (J = "top", O = L.top - U - q) : t.placement === "left" && W < 0 ? (J = "right", W = L.right + q) : t.placement === "right" && W + j > he && (J = "left", W = L.left - j - q), W < 8 && (W = 8), W + j > he - 8 && (W = he - j - 8), O < 8 && (O = 8), O + U > fe - 8 && (O = fe - U - 8), x.value = {
487
765
  position: "fixed",
488
- top: `${P}px`,
489
- left: `${R}px`,
766
+ top: `${O}px`,
767
+ left: `${W}px`,
490
768
  visibility: "visible",
491
769
  zIndex: "2000"
492
- }, w.value = G;
493
- }, w = I(t.placement), h = () => {
770
+ }, w.value = J;
771
+ }, w = I(t.placement), M = () => {
494
772
  t.disabled || (clearTimeout(c), v = setTimeout(() => {
495
- l.value = !0, r("update:visible", !0), r("show"), ee(() => {
773
+ i.value = !0, r("update:visible", !0), r("show"), te(() => {
496
774
  p();
497
775
  });
498
776
  }, t.openDelay));
499
- }, d = () => {
777
+ }, h = () => {
500
778
  clearTimeout(v), c = setTimeout(() => {
501
- l.value = !1, r("update:visible", !1), r("hide");
779
+ i.value = !1, r("update:visible", !1), r("hide");
502
780
  }, t.closeDelay);
503
- }, n = () => {
504
- l.value ? d() : h();
505
- }, y = () => {
506
- t.trigger === "hover" && h();
507
- }, u = () => {
508
- t.trigger === "hover" && d();
781
+ }, l = () => {
782
+ i.value ? h() : M();
509
783
  }, b = () => {
510
- t.trigger === "click" && n();
511
- }, U = () => {
784
+ t.trigger === "hover" && M();
785
+ }, d = () => {
786
+ t.trigger === "hover" && h();
787
+ }, y = () => {
788
+ t.trigger === "click" && l();
789
+ }, Y = () => {
790
+ t.trigger === "focus" && M();
791
+ }, A = () => {
512
792
  t.trigger === "focus" && h();
793
+ }, T = (L) => {
794
+ var F, j;
795
+ t.trigger === "click" && !((F = m.value) != null && F.contains(L.target)) && !((j = g.value) != null && j.contains(L.target)) && h();
513
796
  }, V = () => {
514
- t.trigger === "focus" && d();
515
- }, M = (E) => {
516
- var W, A;
517
- t.trigger === "click" && !((W = m.value) != null && W.contains(E.target)) && !((A = g.value) != null && A.contains(E.target)) && d();
518
- }, B = () => {
519
- l.value && p();
797
+ i.value && p();
520
798
  };
521
- te(l, (E) => {
522
- E ? ee(() => {
523
- p(), t.trigger === "click" && document.addEventListener("click", M), window.addEventListener("scroll", B, !0), window.addEventListener("resize", B);
524
- }) : (document.removeEventListener("click", M), window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B));
525
- }), ue(() => {
526
- clearTimeout(v), clearTimeout(c), document.removeEventListener("click", M), window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B);
799
+ ae(i, (L) => {
800
+ L ? te(() => {
801
+ p(), t.trigger === "click" && document.addEventListener("click", T), window.addEventListener("scroll", V, !0), window.addEventListener("resize", V);
802
+ }) : (document.removeEventListener("click", T), window.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V));
803
+ }), de(() => {
804
+ clearTimeout(v), clearTimeout(c), document.removeEventListener("click", T), window.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V);
527
805
  });
528
- const ne = L(() => [
529
- o.b(),
530
- o.m(t.effect)
531
- ]), se = L(() => [
532
- o.e("arrow"),
533
- o.e(`arrow-${w.value}`)
806
+ const le = B(() => [
807
+ a.b(),
808
+ a.m(t.effect)
809
+ ]), ne = B(() => [
810
+ a.e("arrow"),
811
+ a.e(`arrow-${w.value}`)
534
812
  ]);
535
- return (E, W) => (f(), x("div", {
536
- class: a(i(o).e("wrapper"))
813
+ return (L, F) => (u(), f("div", {
814
+ class: s(o(a).e("wrapper"))
537
815
  }, [
538
- C("div", {
816
+ z("div", {
539
817
  ref_key: "triggerRef",
540
818
  ref: m,
541
- class: a(i(o).e("trigger")),
542
- onMouseenter: y,
543
- onMouseleave: u,
544
- onClick: b,
545
- onFocus: U,
546
- onBlur: V
819
+ class: s(o(a).e("trigger")),
820
+ onMouseenter: b,
821
+ onMouseleave: d,
822
+ onClick: y,
823
+ onFocus: Y,
824
+ onBlur: A
547
825
  }, [
548
- S(E.$slots, "default")
826
+ H(L.$slots, "default")
549
827
  ], 34),
550
- (f(), j(oe, { to: "body" }, [
551
- K(q, {
828
+ (u(), Z(oe, { to: "body" }, [
829
+ E(K, {
552
830
  name: `x-tooltip-${e.transition}`
553
831
  }, {
554
832
  default: D(() => [
555
- re(C("div", {
833
+ ce(z("div", {
556
834
  ref_key: "tooltipRef",
557
835
  ref: g,
558
- class: a(ne.value),
559
- style: O(k.value),
560
- onMouseenter: y,
561
- onMouseleave: u
836
+ class: s(le.value),
837
+ style: P(x.value),
838
+ onMouseenter: b,
839
+ onMouseleave: d
562
840
  }, [
563
- S(E.$slots, "content", {}, () => [
564
- H(z(e.content), 1)
841
+ H(L.$slots, "content", {}, () => [
842
+ S($(e.content), 1)
565
843
  ]),
566
- e.visibleArrow ? (f(), x("div", {
844
+ e.visibleArrow ? (u(), f("div", {
567
845
  key: 0,
568
- class: a(se.value)
569
- }, null, 2)) : $("", !0)
846
+ class: s(ne.value)
847
+ }, null, 2)) : C("", !0)
570
848
  ], 38), [
571
- [ce, l.value]
849
+ [ue, i.value]
572
850
  ])
573
851
  ]),
574
852
  _: 3
@@ -576,7 +854,7 @@ const ot = /* @__PURE__ */ N({
576
854
  ]))
577
855
  ], 2));
578
856
  }
579
- }), Pe = { class: "x-popconfirm-wrapper" }, Re = { class: "x-popconfirm__main" }, Oe = { class: "x-popconfirm__title" }, Ne = { class: "x-popconfirm__action" }, it = /* @__PURE__ */ N({
857
+ }), Ne = { class: "x-popconfirm-wrapper" }, je = { class: "x-popconfirm__main" }, De = { class: "x-popconfirm__title" }, Xe = { class: "x-popconfirm__action" }, ht = /* @__PURE__ */ R({
580
858
  name: "XPopconfirm",
581
859
  __name: "index",
582
860
  props: {
@@ -597,167 +875,167 @@ const ot = /* @__PURE__ */ N({
597
875
  showArrow: { type: Boolean, default: !0 }
598
876
  },
599
877
  emits: ["confirm", "cancel"],
600
- setup(e, { emit: s }) {
601
- const t = e, r = s, o = I(!1), l = I(null), m = I(null), g = I({}), v = () => {
602
- if (!l.value || !m.value) return;
603
- const u = l.value.getBoundingClientRect(), b = m.value.getBoundingClientRect(), U = t.placement, V = t.offset;
604
- let M = 0, B = 0;
605
- switch (U) {
878
+ setup(e, { emit: n }) {
879
+ const t = e, r = n, a = I(!1), i = I(null), m = I(null), g = I({}), v = () => {
880
+ if (!i.value || !m.value) return;
881
+ const d = i.value.getBoundingClientRect(), y = m.value.getBoundingClientRect(), Y = t.placement, A = t.offset;
882
+ let T = 0, V = 0;
883
+ switch (Y) {
606
884
  case "top":
607
- M = u.top - b.height - V, B = u.left + (u.width - b.width) / 2;
885
+ T = d.top - y.height - A, V = d.left + (d.width - y.width) / 2;
608
886
  break;
609
887
  case "top-start":
610
- M = u.top - b.height - V, B = u.left;
888
+ T = d.top - y.height - A, V = d.left;
611
889
  break;
612
890
  case "top-end":
613
- M = u.top - b.height - V, B = u.right - b.width;
891
+ T = d.top - y.height - A, V = d.right - y.width;
614
892
  break;
615
893
  case "bottom":
616
- M = u.bottom + V, B = u.left + (u.width - b.width) / 2;
894
+ T = d.bottom + A, V = d.left + (d.width - y.width) / 2;
617
895
  break;
618
896
  case "bottom-start":
619
- M = u.bottom + V, B = u.left;
897
+ T = d.bottom + A, V = d.left;
620
898
  break;
621
899
  case "bottom-end":
622
- M = u.bottom + V, B = u.right - b.width;
900
+ T = d.bottom + A, V = d.right - y.width;
623
901
  break;
624
902
  case "left":
625
- M = u.top + (u.height - b.height) / 2, B = u.left - b.width - V;
903
+ T = d.top + (d.height - y.height) / 2, V = d.left - y.width - A;
626
904
  break;
627
905
  case "left-start":
628
- M = u.top, B = u.left - b.width - V;
906
+ T = d.top, V = d.left - y.width - A;
629
907
  break;
630
908
  case "left-end":
631
- M = u.bottom - b.height, B = u.left - b.width - V;
909
+ T = d.bottom - y.height, V = d.left - y.width - A;
632
910
  break;
633
911
  case "right":
634
- M = u.top + (u.height - b.height) / 2, B = u.right + V;
912
+ T = d.top + (d.height - y.height) / 2, V = d.right + A;
635
913
  break;
636
914
  case "right-start":
637
- M = u.top, B = u.right + V;
915
+ T = d.top, V = d.right + A;
638
916
  break;
639
917
  case "right-end":
640
- M = u.bottom - b.height, B = u.right + V;
918
+ T = d.bottom - y.height, V = d.right + A;
641
919
  break;
642
920
  default:
643
- M = u.top - b.height - V, B = u.left + (u.width - b.width) / 2;
921
+ T = d.top - y.height - A, V = d.left + (d.width - y.width) / 2;
644
922
  }
645
- const ne = window.innerWidth, se = window.innerHeight;
646
- B < 0 && (B = 10), B + b.width > ne && (B = ne - b.width - 10), M < 0 && (M = 10), M + b.height > se && (M = se - b.height - 10), g.value = {
923
+ const le = window.innerWidth, ne = window.innerHeight;
924
+ V < 0 && (V = 10), V + y.width > le && (V = le - y.width - 10), T < 0 && (T = 10), T + y.height > ne && (T = ne - y.height - 10), g.value = {
647
925
  position: "fixed",
648
- top: `${M}px`,
649
- left: `${B}px`,
926
+ top: `${T}px`,
927
+ left: `${V}px`,
650
928
  zIndex: "2000"
651
929
  };
652
- }, c = (u) => {
653
- var b, U;
654
- o.value && ((b = l.value) != null && b.contains(u.target) || (U = m.value) != null && U.contains(u.target) || (o.value = !1));
655
- }, k = (u) => {
656
- t.disabled || (u.stopPropagation(), o.value = !o.value, o.value && setTimeout(v, 0));
930
+ }, c = (d) => {
931
+ var y, Y;
932
+ a.value && ((y = i.value) != null && y.contains(d.target) || (Y = m.value) != null && Y.contains(d.target) || (a.value = !1));
933
+ }, x = (d) => {
934
+ t.disabled || (d.stopPropagation(), a.value = !a.value, a.value && setTimeout(v, 0));
657
935
  }, p = () => {
658
- o.value = !1, r("confirm");
936
+ a.value = !1, r("confirm");
659
937
  }, w = () => {
660
- o.value = !1, r("cancel");
938
+ a.value = !1, r("cancel");
939
+ }, M = () => {
940
+ a.value && v();
661
941
  }, h = () => {
662
- o.value && v();
663
- }, d = () => {
664
- o.value && v();
942
+ a.value && v();
665
943
  };
666
- te(o, (u) => {
667
- u ? (setTimeout(v, 0), document.addEventListener("click", c), window.addEventListener("scroll", h, !0), window.addEventListener("resize", d)) : (document.removeEventListener("click", c), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", d));
668
- }), ue(() => {
669
- document.removeEventListener("click", c), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", d);
944
+ ae(a, (d) => {
945
+ d ? (setTimeout(v, 0), document.addEventListener("click", c), window.addEventListener("scroll", M, !0), window.addEventListener("resize", h)) : (document.removeEventListener("click", c), window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", h));
946
+ }), de(() => {
947
+ document.removeEventListener("click", c), window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", h);
670
948
  });
671
- const n = L(() => ({
949
+ const l = B(() => ({
672
950
  width: typeof t.width == "number" ? `${t.width}px` : t.width
673
- })), y = L(() => {
674
- const u = t.placement, b = {};
675
- switch (u) {
951
+ })), b = B(() => {
952
+ const d = t.placement, y = {};
953
+ switch (d) {
676
954
  case "top":
677
955
  case "top-start":
678
956
  case "top-end":
679
- b.bottom = "-6px", b.transform = "rotate(45deg)";
957
+ y.bottom = "-6px", y.transform = "rotate(45deg)";
680
958
  break;
681
959
  case "bottom":
682
960
  case "bottom-start":
683
961
  case "bottom-end":
684
- b.top = "-6px", b.transform = "rotate(225deg)";
962
+ y.top = "-6px", y.transform = "rotate(225deg)";
685
963
  break;
686
964
  case "left":
687
965
  case "left-start":
688
966
  case "left-end":
689
- b.right = "-6px", b.transform = "rotate(315deg)";
967
+ y.right = "-6px", y.transform = "rotate(315deg)";
690
968
  break;
691
969
  case "right":
692
970
  case "right-start":
693
971
  case "right-end":
694
- b.left = "-6px", b.transform = "rotate(135deg)";
972
+ y.left = "-6px", y.transform = "rotate(135deg)";
695
973
  break;
696
974
  }
697
- return b;
975
+ return y;
698
976
  });
699
- return (u, b) => (f(), x("span", Pe, [
700
- C("span", {
977
+ return (d, y) => (u(), f("span", Ne, [
978
+ z("span", {
701
979
  ref_key: "triggerRef",
702
- ref: l,
980
+ ref: i,
703
981
  class: "x-popconfirm-trigger",
704
- onClick: k
982
+ onClick: x
705
983
  }, [
706
- S(u.$slots, "default")
984
+ H(d.$slots, "default")
707
985
  ], 512),
708
- (f(), j(oe, { to: "body" }, [
709
- K(q, { name: "x-popconfirm-fade" }, {
986
+ (u(), Z(oe, { to: "body" }, [
987
+ E(K, { name: "x-popconfirm-fade" }, {
710
988
  default: D(() => [
711
- o.value ? (f(), x("div", {
989
+ a.value ? (u(), f("div", {
712
990
  key: 0,
713
991
  ref_key: "popperRef",
714
992
  ref: m,
715
993
  class: "x-popconfirm",
716
- style: O({ ...g.value, ...n.value }),
717
- onClick: b[0] || (b[0] = ie(() => {
994
+ style: P({ ...g.value, ...l.value }),
995
+ onClick: y[0] || (y[0] = re(() => {
718
996
  }, ["stop"]))
719
997
  }, [
720
- e.showArrow ? (f(), x("span", {
998
+ e.showArrow ? (u(), f("span", {
721
999
  key: 0,
722
1000
  class: "x-popconfirm__arrow",
723
- style: O(y.value)
724
- }, null, 4)) : $("", !0),
725
- C("div", Re, [
726
- e.hideIcon ? $("", !0) : (f(), x("span", {
1001
+ style: P(b.value)
1002
+ }, null, 4)) : C("", !0),
1003
+ z("div", je, [
1004
+ e.hideIcon ? C("", !0) : (u(), f("span", {
727
1005
  key: 0,
728
1006
  class: "x-popconfirm__icon",
729
- style: O({ color: e.iconColor })
1007
+ style: P({ color: e.iconColor })
730
1008
  }, [
731
- S(u.$slots, "icon", {}, () => [
732
- H(z(e.icon || "⚠"), 1)
1009
+ H(d.$slots, "icon", {}, () => [
1010
+ S($(e.icon || "⚠"), 1)
733
1011
  ])
734
1012
  ], 4)),
735
- C("div", Oe, [
736
- S(u.$slots, "title", {}, () => [
737
- H(z(e.title), 1)
1013
+ z("div", De, [
1014
+ H(d.$slots, "title", {}, () => [
1015
+ S($(e.title), 1)
738
1016
  ])
739
1017
  ])
740
1018
  ]),
741
- C("div", Ne, [
742
- e.hideCancelButton ? $("", !0) : (f(), x("button", {
1019
+ z("div", Xe, [
1020
+ e.hideCancelButton ? C("", !0) : (u(), f("button", {
743
1021
  key: 0,
744
1022
  class: "x-button p-button--default p-button--small",
745
1023
  onClick: w
746
- }, z(e.cancelButtonText), 1)),
747
- e.hideConfirmButton ? $("", !0) : (f(), x("button", {
1024
+ }, $(e.cancelButtonText), 1)),
1025
+ e.hideConfirmButton ? C("", !0) : (u(), f("button", {
748
1026
  key: 1,
749
- class: a(["x-button x-button--small", `x-button--${e.confirmButtonType}`]),
1027
+ class: s(["x-button x-button--small", `x-button--${e.confirmButtonType}`]),
750
1028
  onClick: p
751
- }, z(e.confirmButtonText), 3))
1029
+ }, $(e.confirmButtonText), 3))
752
1030
  ])
753
- ], 4)) : $("", !0)
1031
+ ], 4)) : C("", !0)
754
1032
  ]),
755
1033
  _: 3
756
1034
  })
757
1035
  ]))
758
1036
  ]));
759
1037
  }
760
- }), rt = /* @__PURE__ */ N({
1038
+ }), ft = /* @__PURE__ */ R({
761
1039
  name: "XBacktop",
762
1040
  __name: "index",
763
1041
  props: {
@@ -766,54 +1044,118 @@ const ot = /* @__PURE__ */ N({
766
1044
  bottom: { default: 40 }
767
1045
  },
768
1046
  emits: ["click"],
769
- setup(e, { emit: s }) {
770
- const t = e, r = s, o = F("backtop"), l = I(!1), m = () => {
1047
+ setup(e, { emit: n }) {
1048
+ const t = e, r = n, a = N("backtop"), i = I(!1), m = () => {
771
1049
  const c = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
772
- l.value = c >= t.visibilityHeight;
1050
+ i.value = c >= t.visibilityHeight;
773
1051
  }, g = (c) => {
774
1052
  window.scrollTo({
775
1053
  top: 0,
776
1054
  behavior: "smooth"
777
1055
  }), r("click", c);
778
- }, v = L(() => ({
1056
+ }, v = B(() => ({
779
1057
  right: `${t.right}px`,
780
1058
  bottom: `${t.bottom}px`
781
1059
  }));
782
- return be(() => {
1060
+ return ye(() => {
783
1061
  window.addEventListener("scroll", m, { passive: !0, capture: !0 }), setTimeout(m, 100);
784
- }), ue(() => {
1062
+ }), de(() => {
785
1063
  window.removeEventListener("scroll", m, !0);
786
- }), (c, k) => (f(), j(q, { name: "x-fade" }, {
1064
+ }), (c, x) => (u(), Z(K, { name: "x-fade" }, {
787
1065
  default: D(() => [
788
- re(C("div", {
789
- class: a(i(o).b()),
790
- style: O(v.value),
1066
+ ce(z("div", {
1067
+ class: s(o(a).b()),
1068
+ style: P(v.value),
791
1069
  onClick: g
792
1070
  }, [
793
- S(c.$slots, "default", {}, () => [
794
- C("span", {
795
- class: a(i(o).e("icon"))
796
- }, "↑", 2)
1071
+ H(c.$slots, "default", {}, () => [
1072
+ z("span", {
1073
+ class: s(o(a).e("icon"))
1074
+ }, [
1075
+ E(o(X), {
1076
+ name: "back-top",
1077
+ size: 20
1078
+ })
1079
+ ], 2)
797
1080
  ])
798
1081
  ], 6), [
799
- [ce, l.value]
1082
+ [ue, i.value]
800
1083
  ])
801
1084
  ]),
802
1085
  _: 3
803
1086
  }));
804
1087
  }
805
- }), ct = /* @__PURE__ */ N({
1088
+ }), vt = /* @__PURE__ */ R({
1089
+ name: "XResult",
1090
+ __name: "index",
1091
+ props: {
1092
+ status: { default: "info" },
1093
+ title: { default: "" },
1094
+ subTitle: { default: "" },
1095
+ icon: {}
1096
+ },
1097
+ setup(e) {
1098
+ const n = e, t = N("result"), r = B(() => n.icon ? n.icon : {
1099
+ success: "check-circle",
1100
+ warning: "warning",
1101
+ error: "close-circle",
1102
+ info: "info-circle"
1103
+ }[n.status]);
1104
+ return (a, i) => (u(), f("div", {
1105
+ class: s([o(t).b(), o(t).m(e.status)])
1106
+ }, [
1107
+ z("div", {
1108
+ class: s(o(t).e("icon"))
1109
+ }, [
1110
+ H(a.$slots, "icon", {}, () => [
1111
+ E(o(X), {
1112
+ name: r.value,
1113
+ size: 72
1114
+ }, null, 8, ["name"])
1115
+ ])
1116
+ ], 2),
1117
+ e.title || a.$slots.title ? (u(), f("div", {
1118
+ key: 0,
1119
+ class: s(o(t).e("title"))
1120
+ }, [
1121
+ H(a.$slots, "title", {}, () => [
1122
+ S($(e.title), 1)
1123
+ ])
1124
+ ], 2)) : C("", !0),
1125
+ e.subTitle || a.$slots.subTitle ? (u(), f("div", {
1126
+ key: 1,
1127
+ class: s(o(t).e("subtitle"))
1128
+ }, [
1129
+ H(a.$slots, "subTitle", {}, () => [
1130
+ S($(e.subTitle), 1)
1131
+ ])
1132
+ ], 2)) : C("", !0),
1133
+ a.$slots.extra ? (u(), f("div", {
1134
+ key: 2,
1135
+ class: s(o(t).e("extra"))
1136
+ }, [
1137
+ H(a.$slots, "extra")
1138
+ ], 2)) : C("", !0),
1139
+ a.$slots.default ? (u(), f("div", {
1140
+ key: 3,
1141
+ class: s(o(t).e("content"))
1142
+ }, [
1143
+ H(a.$slots, "default")
1144
+ ], 2)) : C("", !0)
1145
+ ], 2));
1146
+ }
1147
+ }), pt = /* @__PURE__ */ R({
806
1148
  name: "XTimeline",
807
1149
  __name: "index",
808
1150
  setup(e) {
809
- const s = F("timeline");
810
- return (t, r) => (f(), x("ul", {
811
- class: a(i(s).b())
1151
+ const n = N("timeline");
1152
+ return (t, r) => (u(), f("ul", {
1153
+ class: s(o(n).b())
812
1154
  }, [
813
- S(t.$slots, "default")
1155
+ H(t.$slots, "default")
814
1156
  ], 2));
815
1157
  }
816
- }), ut = /* @__PURE__ */ N({
1158
+ }), Mt = /* @__PURE__ */ R({
817
1159
  name: "XTimelineItem",
818
1160
  __name: "TimelineItem",
819
1161
  props: {
@@ -826,44 +1168,44 @@ const ot = /* @__PURE__ */ N({
826
1168
  hollow: { type: Boolean, default: !1 }
827
1169
  },
828
1170
  setup(e) {
829
- const s = F("timeline-item");
830
- return (t, r) => (f(), x("li", {
831
- class: a([i(s).b(), i(s).m(e.placement)])
1171
+ const n = N("timeline-item");
1172
+ return (t, r) => (u(), f("li", {
1173
+ class: s([o(n).b(), o(n).m(e.placement)])
832
1174
  }, [
833
- C("div", {
834
- class: a(i(s).e("tail"))
1175
+ z("div", {
1176
+ class: s(o(n).e("tail"))
835
1177
  }, null, 2),
836
- C("div", {
837
- class: a([i(s).e("node"), i(s).m(e.type), i(s).is("hollow", e.hollow)]),
838
- style: O(e.color ? { backgroundColor: e.color, borderColor: e.color } : void 0)
1178
+ z("div", {
1179
+ class: s([o(n).e("node"), o(n).m(e.type), o(n).is("hollow", e.hollow)]),
1180
+ style: P(e.color ? { backgroundColor: e.color, borderColor: e.color } : void 0)
839
1181
  }, [
840
- S(t.$slots, "icon", {}, () => [
841
- e.icon ? (f(), x("span", {
1182
+ H(t.$slots, "icon", {}, () => [
1183
+ e.icon ? (u(), f("span", {
842
1184
  key: 0,
843
- class: a(i(s).e("icon"))
844
- }, z(e.icon), 3)) : $("", !0)
1185
+ class: s(o(n).e("icon"))
1186
+ }, $(e.icon), 3)) : C("", !0)
845
1187
  ])
846
1188
  ], 6),
847
- C("div", {
848
- class: a(i(s).e("wrapper"))
1189
+ z("div", {
1190
+ class: s(o(n).e("wrapper"))
849
1191
  }, [
850
- e.timestamp && e.placement === "top" ? (f(), x("div", {
1192
+ e.timestamp && e.placement === "top" ? (u(), f("div", {
851
1193
  key: 0,
852
- class: a(i(s).e("timestamp"))
853
- }, z(e.timestamp), 3)) : $("", !0),
854
- C("div", {
855
- class: a(i(s).e("content"))
1194
+ class: s(o(n).e("timestamp"))
1195
+ }, $(e.timestamp), 3)) : C("", !0),
1196
+ z("div", {
1197
+ class: s(o(n).e("content"))
856
1198
  }, [
857
- S(t.$slots, "default")
1199
+ H(t.$slots, "default")
858
1200
  ], 2),
859
- e.timestamp && e.placement === "bottom" ? (f(), x("div", {
1201
+ e.timestamp && e.placement === "bottom" ? (u(), f("div", {
860
1202
  key: 1,
861
- class: a(i(s).e("timestamp"))
862
- }, z(e.timestamp), 3)) : $("", !0)
1203
+ class: s(o(n).e("timestamp"))
1204
+ }, $(e.timestamp), 3)) : C("", !0)
863
1205
  ], 2)
864
1206
  ], 2));
865
1207
  }
866
- }), He = /* @__PURE__ */ N({
1208
+ }), Fe = /* @__PURE__ */ R({
867
1209
  name: "XMessage",
868
1210
  __name: "index",
869
1211
  props: {
@@ -877,119 +1219,129 @@ const ot = /* @__PURE__ */ N({
877
1219
  onClose: {}
878
1220
  },
879
1221
  emits: ["close", "destroy"],
880
- setup(e, { expose: s, emit: t }) {
881
- const r = e, o = t, l = F("message"), m = I(!1), g = I(Te()), v = {
882
- success: "",
883
- warning: "",
884
- error: "",
885
- info: ""
886
- }, c = L(() => [
887
- l.b(),
888
- l.m(r.type),
889
- l.is("center", r.center),
890
- l.is("closable", r.showClose),
1222
+ setup(e, { expose: n, emit: t }) {
1223
+ const r = e, a = t, i = N("message"), m = I(!1), g = I(He()), v = {
1224
+ success: "check",
1225
+ warning: "warning",
1226
+ error: "close-circle",
1227
+ info: "info"
1228
+ }, c = B(() => [
1229
+ i.b(),
1230
+ i.m(r.type),
1231
+ i.is("center", r.center),
1232
+ i.is("closable", r.showClose),
891
1233
  r.customClass
892
- ]), k = L(() => ({
1234
+ ]), x = B(() => ({
893
1235
  top: `${r.offset}px`,
894
1236
  zIndex: g.value
895
1237
  }));
896
1238
  let p = null;
897
1239
  const w = () => {
898
1240
  r.duration > 0 && (p = setTimeout(() => {
899
- d();
1241
+ h();
900
1242
  }, r.duration));
901
- }, h = () => {
1243
+ }, M = () => {
902
1244
  p && (clearTimeout(p), p = null);
903
- }, d = () => {
904
- var y;
905
- m.value = !1, (y = r.onClose) == null || y.call(r), o("close");
906
- }, n = () => {
907
- o("destroy");
1245
+ }, h = () => {
1246
+ var b;
1247
+ m.value = !1, (b = r.onClose) == null || b.call(r), a("close");
1248
+ }, l = () => {
1249
+ a("destroy");
908
1250
  };
909
- return be(() => {
1251
+ return ye(() => {
910
1252
  w(), m.value = !0;
911
- }), ue(() => {
912
- h();
913
- }), s({
914
- close: d
915
- }), (y, u) => (f(), j(q, {
1253
+ }), de(() => {
1254
+ M();
1255
+ }), n({
1256
+ close: h
1257
+ }), (b, d) => (u(), Z(K, {
916
1258
  name: "x-message-fade",
917
- onAfterLeave: n
1259
+ onAfterLeave: l
918
1260
  }, {
919
1261
  default: D(() => [
920
- m.value ? (f(), x("div", {
1262
+ m.value ? (u(), f("div", {
921
1263
  key: 0,
922
- class: a(c.value),
923
- style: O(k.value),
924
- onMouseenter: h,
1264
+ class: s(c.value),
1265
+ style: P(x.value),
1266
+ onMouseenter: M,
925
1267
  onMouseleave: w
926
1268
  }, [
927
- C("span", {
928
- class: a(i(l).e("icon"))
929
- }, z(v[e.type]), 3),
930
- C("span", {
931
- class: a(i(l).e("content"))
1269
+ z("span", {
1270
+ class: s(o(i).e("icon"))
932
1271
  }, [
933
- S(y.$slots, "default", {}, () => [
934
- H(z(e.message), 1)
1272
+ E(o(X), {
1273
+ name: v[e.type],
1274
+ size: 16
1275
+ }, null, 8, ["name"])
1276
+ ], 2),
1277
+ z("span", {
1278
+ class: s(o(i).e("content"))
1279
+ }, [
1280
+ H(b.$slots, "default", {}, () => [
1281
+ S($(e.message), 1)
935
1282
  ])
936
1283
  ], 2),
937
- e.showClose ? (f(), x("button", {
1284
+ e.showClose ? (u(), f("button", {
938
1285
  key: 0,
939
- class: a(i(l).e("close")),
940
- onClick: d
941
- }, " ✕ ", 2)) : $("", !0)
942
- ], 38)) : $("", !0)
1286
+ class: s(o(i).e("close")),
1287
+ onClick: h
1288
+ }, [
1289
+ E(o(X), {
1290
+ name: "close",
1291
+ size: 14
1292
+ })
1293
+ ], 2)) : C("", !0)
1294
+ ], 38)) : C("", !0)
943
1295
  ]),
944
1296
  _: 3
945
1297
  }));
946
1298
  }
947
- }), J = [];
948
- let Ae = 1;
949
- const De = () => {
950
- J.slice().forEach((e) => e.close());
1299
+ }), Q = [];
1300
+ let qe = 1;
1301
+ const Ze = () => {
1302
+ Q.slice().forEach((e) => e.close());
951
1303
  };
952
1304
  function xe(e) {
953
- const s = Ae++, t = document.createElement("div");
1305
+ const n = qe++, t = document.createElement("div");
954
1306
  document.body.appendChild(t);
955
1307
  const r = {
956
- success: { bg: "#f0f9eb", border: "#67c23a", icon: "" },
957
- warning: { bg: "#fdf6ec", border: "#e6a23c", icon: "" },
958
- error: { bg: "#fef0f0", border: "#f56c6c", icon: "" },
959
- info: { bg: "#f4f4f5", border: "#909399", icon: "" }
960
- }, o = e.type || "info", l = r[o] || r.info, m = Ce({
1308
+ success: { bg: "#f0f9eb", border: "#67c23a", iconPath: "M5 13l4 4L19 7" },
1309
+ warning: { bg: "#fdf6ec", border: "#e6a23c", iconPath: "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" },
1310
+ error: { bg: "#fef0f0", border: "#f56c6c", iconPath: "M6 18L18 6M6 6l12 12" },
1311
+ info: { bg: "#f4f4f5", border: "#909399", iconPath: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }
1312
+ }, a = e.type || "info", i = r[a] || r.info, m = Ce({
961
1313
  visible: !1,
962
1314
  offset: e.offset ?? 20
963
1315
  });
964
1316
  let g = e.offset ?? 20;
965
- J.forEach((n) => {
966
- const y = n.container.firstElementChild;
967
- y && y.offsetHeight && (g += y.offsetHeight + 16);
1317
+ Q.forEach((l) => {
1318
+ const b = l.container.firstElementChild;
1319
+ b && b.offsetHeight && (g += b.offsetHeight + 16);
968
1320
  }), m.offset = g;
969
1321
  let v = null, c = !1;
970
- const k = () => {
1322
+ const x = () => {
971
1323
  c || (m.visible = !1, setTimeout(() => {
972
1324
  if (c) return;
973
1325
  c = !0;
974
- const n = J.findIndex((y) => y.id === s);
975
- n !== -1 && J.splice(n, 1);
1326
+ const l = Q.findIndex((b) => b.id === n);
1327
+ l !== -1 && Q.splice(l, 1);
976
1328
  try {
977
- h.unmount();
1329
+ M.unmount();
978
1330
  } catch {
979
1331
  }
980
1332
  t.parentNode && t.parentNode.removeChild(t);
981
1333
  }, 300));
982
1334
  }, p = () => {
983
- const n = e.duration ?? 3e3;
984
- n > 0 && (v = setTimeout(k, n));
1335
+ const l = e.duration ?? 3e3;
1336
+ l > 0 && (v = setTimeout(x, l));
985
1337
  }, w = () => {
986
1338
  v && (clearTimeout(v), v = null);
987
- }, h = ve({
1339
+ }, M = Me({
988
1340
  render() {
989
1341
  if (!m.visible) return null;
990
- const n = [
1342
+ const l = [
991
1343
  // Icon
992
- T("span", {
1344
+ k("span", {
993
1345
  style: {
994
1346
  display: "inline-flex",
995
1347
  alignItems: "center",
@@ -997,12 +1349,25 @@ function xe(e) {
997
1349
  width: "20px",
998
1350
  height: "20px",
999
1351
  marginRight: "10px",
1000
- fontSize: "16px",
1001
- color: l.border
1352
+ color: i.border
1002
1353
  }
1003
- }, l.icon),
1354
+ }, [
1355
+ k("svg", {
1356
+ xmlns: "http://www.w3.org/2000/svg",
1357
+ width: "16",
1358
+ height: "16",
1359
+ viewBox: "0 0 24 24",
1360
+ fill: "none",
1361
+ stroke: "currentColor",
1362
+ strokeWidth: "2",
1363
+ strokeLinecap: "round",
1364
+ strokeLinejoin: "round"
1365
+ }, [
1366
+ k("path", { d: i.iconPath })
1367
+ ])
1368
+ ]),
1004
1369
  // Content
1005
- T("span", {
1370
+ k("span", {
1006
1371
  style: {
1007
1372
  flex: "1",
1008
1373
  fontSize: "14px",
@@ -1011,8 +1376,8 @@ function xe(e) {
1011
1376
  }
1012
1377
  }, e.message || "")
1013
1378
  ];
1014
- return e.showClose && n.push(
1015
- T("button", {
1379
+ return e.showClose && l.push(
1380
+ k("button", {
1016
1381
  style: {
1017
1382
  position: "absolute",
1018
1383
  top: "50%",
@@ -1021,16 +1386,32 @@ function xe(e) {
1021
1386
  background: "none",
1022
1387
  border: "none",
1023
1388
  cursor: "pointer",
1024
- fontSize: "14px",
1025
1389
  color: "#909399",
1026
- padding: "0"
1390
+ padding: "0",
1391
+ display: "flex",
1392
+ alignItems: "center",
1393
+ justifyContent: "center"
1027
1394
  },
1028
- onClick: (y) => {
1029
- y.stopPropagation(), k();
1395
+ onClick: (b) => {
1396
+ b.stopPropagation(), x();
1030
1397
  }
1031
- }, "✕")
1032
- ), T("div", {
1033
- class: ["x-message", `x-message--${o}`, e.center ? "is-center" : "", e.showClose ? "is-closable" : ""],
1398
+ }, [
1399
+ k("svg", {
1400
+ xmlns: "http://www.w3.org/2000/svg",
1401
+ width: "14",
1402
+ height: "14",
1403
+ viewBox: "0 0 24 24",
1404
+ fill: "none",
1405
+ stroke: "currentColor",
1406
+ strokeWidth: "2",
1407
+ strokeLinecap: "round",
1408
+ strokeLinejoin: "round"
1409
+ }, [
1410
+ k("path", { d: "M6 18L18 6M6 6l12 12" })
1411
+ ])
1412
+ ])
1413
+ ), k("div", {
1414
+ class: ["x-message", `x-message--${a}`, e.center ? "is-center" : "", e.showClose ? "is-closable" : ""],
1034
1415
  style: {
1035
1416
  position: "fixed",
1036
1417
  left: "50%",
@@ -1043,62 +1424,62 @@ function xe(e) {
1043
1424
  boxShadow: "0 2px 12px rgba(0,0,0,0.1)",
1044
1425
  minWidth: "280px",
1045
1426
  maxWidth: "480px",
1046
- backgroundColor: l.bg,
1047
- border: `1px solid ${l.border}`,
1048
- zIndex: 2e3 + s,
1427
+ backgroundColor: i.bg,
1428
+ border: `1px solid ${i.border}`,
1429
+ zIndex: 2e3 + n,
1049
1430
  transition: "opacity 0.3s, transform 0.3s"
1050
1431
  },
1051
1432
  onMouseenter: w,
1052
1433
  onMouseleave: p
1053
- }, n);
1434
+ }, l);
1054
1435
  }
1055
1436
  });
1056
- h.mount(t), ee(() => {
1437
+ M.mount(t), te(() => {
1057
1438
  m.visible = !0, p();
1058
1439
  });
1059
- const d = { id: s, app: h, container: t, close: k };
1060
- return J.push(d), { close: k };
1440
+ const h = { id: n, app: M, container: t, close: x };
1441
+ return Q.push(h), { close: x };
1061
1442
  }
1062
- function Fe(e) {
1443
+ function Ke(e) {
1063
1444
  return xe(typeof e == "string" ? { message: e } : e);
1064
1445
  }
1065
- const le = (e) => (s) => xe({ ...typeof s == "string" ? { message: s } : s, type: e }), pe = Object.assign(Fe, {
1066
- info: le("info"),
1067
- success: le("success"),
1068
- warning: le("warning"),
1069
- error: le("error"),
1070
- closeAll: De
1071
- }), dt = pe, ft = He, mt = {
1446
+ const se = (e) => (n) => xe({ ...typeof n == "string" ? { message: n } : n, type: e }), ve = Object.assign(Ke, {
1447
+ info: se("info"),
1448
+ success: se("success"),
1449
+ warning: se("warning"),
1450
+ error: se("error"),
1451
+ closeAll: Ze
1452
+ }), gt = ve, bt = Fe, yt = {
1072
1453
  install(e) {
1073
- e.config.globalProperties.$message = pe, e.provide("message", pe);
1454
+ e.config.globalProperties.$message = ve, e.provide("message", ve);
1074
1455
  }
1075
- }, Q = [], We = () => {
1076
- Q.slice().forEach((e) => e.close());
1077
- }, Xe = {
1078
- success: { icon: "", color: "#67c23a" },
1079
- warning: { icon: "", color: "#e6a23c" },
1080
- error: { icon: "", color: "#f56c6c" },
1081
- info: { icon: "", color: "#909399" }
1456
+ }, _ = [], Ue = () => {
1457
+ _.slice().forEach((e) => e.close());
1458
+ }, Ye = {
1459
+ success: { iconPath: "M5 13l4 4L19 7", color: "#67c23a" },
1460
+ warning: { iconPath: "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", color: "#e6a23c" },
1461
+ error: { iconPath: "M6 18L18 6M6 6l12 12", color: "#f56c6c" },
1462
+ info: { iconPath: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z", color: "#909399" }
1082
1463
  };
1083
- function de(e) {
1084
- return new Promise((s) => {
1464
+ function me(e) {
1465
+ return new Promise((n) => {
1085
1466
  const t = document.createElement("div");
1086
1467
  document.body.appendChild(t);
1087
1468
  let r = !1;
1088
- const o = N({
1469
+ const a = R({
1089
1470
  name: "TMessageBox",
1090
1471
  setup() {
1091
- const g = I(!1), v = I(e.inputValue ?? ""), c = I(""), k = 2e3 + Q.length + 1, p = (y) => {
1472
+ const g = I(!1), v = I(e.inputValue ?? ""), c = I(""), x = 2e3 + _.length + 1, p = (b) => {
1092
1473
  r || (r = !0, g.value = !1, setTimeout(() => {
1093
- const u = Q.findIndex((b) => b.container === t);
1094
- u !== -1 && Q.splice(u, 1);
1474
+ const d = _.findIndex((y) => y.container === t);
1475
+ d !== -1 && _.splice(d, 1);
1095
1476
  try {
1096
- l.unmount();
1477
+ i.unmount();
1097
1478
  } catch {
1098
1479
  }
1099
- t.parentNode && t.parentNode.removeChild(t), s({
1100
- action: y,
1101
- value: y === "confirm" ? v.value : void 0
1480
+ t.parentNode && t.parentNode.removeChild(t), n({
1481
+ action: b,
1482
+ value: b === "confirm" ? v.value : void 0
1102
1483
  });
1103
1484
  }, 300));
1104
1485
  }, w = () => {
@@ -1107,48 +1488,77 @@ function de(e) {
1107
1488
  return;
1108
1489
  }
1109
1490
  c.value = "", p("confirm");
1110
- }, h = () => {
1491
+ }, M = () => {
1111
1492
  p("cancel");
1112
- }, d = () => {
1493
+ }, h = () => {
1113
1494
  p("close");
1114
- }, n = () => {
1115
- e.closeOnClickModal !== !1 && d();
1495
+ }, l = () => {
1496
+ e.closeOnClickModal !== !1 && h();
1116
1497
  };
1117
- return ee(() => {
1498
+ return te(() => {
1118
1499
  g.value = !0;
1119
1500
  }), {
1120
1501
  visible: g,
1121
1502
  inputValue: v,
1122
1503
  inputError: c,
1123
- zIndex: k,
1504
+ zIndex: x,
1124
1505
  handleConfirm: w,
1125
- handleCancel: h,
1126
- handleClose: d,
1127
- handleMaskClick: n
1506
+ handleCancel: M,
1507
+ handleClose: h,
1508
+ handleMaskClick: l
1128
1509
  };
1129
1510
  },
1130
1511
  render() {
1131
1512
  if (!this.visible) return null;
1132
- const g = e.type, v = g ? Xe[g] : null, c = [];
1513
+ const g = e.type, v = g ? Ye[g] : null, c = [];
1133
1514
  v && c.push(
1134
- T("span", {
1515
+ k("span", {
1135
1516
  class: "x-message-box__icon",
1136
- style: { color: v.color, marginRight: "10px", fontSize: "20px" }
1137
- }, v.icon)
1517
+ style: { color: v.color, marginRight: "10px", display: "flex", alignItems: "center" }
1518
+ }, [
1519
+ k("svg", {
1520
+ xmlns: "http://www.w3.org/2000/svg",
1521
+ width: "20",
1522
+ height: "20",
1523
+ viewBox: "0 0 24 24",
1524
+ fill: "none",
1525
+ stroke: "currentColor",
1526
+ strokeWidth: "2",
1527
+ strokeLinecap: "round",
1528
+ strokeLinejoin: "round"
1529
+ }, [
1530
+ k("path", { d: v.iconPath })
1531
+ ])
1532
+ ])
1138
1533
  ), c.push(
1139
- T("span", { class: "x-message-box__title" }, e.title || "提示")
1534
+ k("span", { class: "x-message-box__title" }, e.title || "提示")
1140
1535
  ), e.showClose !== !1 && c.push(
1141
- T("button", {
1536
+ k("button", {
1142
1537
  class: "x-message-box__close",
1143
- onClick: this.handleClose
1144
- }, "")
1538
+ onClick: this.handleClose,
1539
+ style: { display: "flex", alignItems: "center", justifyContent: "center" }
1540
+ }, [
1541
+ k("svg", {
1542
+ xmlns: "http://www.w3.org/2000/svg",
1543
+ width: "14",
1544
+ height: "14",
1545
+ viewBox: "0 0 24 24",
1546
+ fill: "none",
1547
+ stroke: "currentColor",
1548
+ strokeWidth: "2",
1549
+ strokeLinecap: "round",
1550
+ strokeLinejoin: "round"
1551
+ }, [
1552
+ k("path", { d: "M6 18L18 6M6 6l12 12" })
1553
+ ])
1554
+ ])
1145
1555
  );
1146
- const k = [];
1147
- k.push(
1148
- T("div", { class: "x-message-box__content" }, e.message || "")
1149
- ), e.showInput && k.push(
1150
- T("div", { class: "x-message-box__input", style: { marginTop: "12px" } }, [
1151
- T("input", {
1556
+ const x = [];
1557
+ x.push(
1558
+ k("div", { class: "x-message-box__content" }, e.message || "")
1559
+ ), e.showInput && x.push(
1560
+ k("div", { class: "x-message-box__input", style: { marginTop: "12px" } }, [
1561
+ k("input", {
1152
1562
  class: ["x-message-box__input-inner", this.inputError ? "is-error" : ""].filter(Boolean),
1153
1563
  type: e.inputType || "text",
1154
1564
  placeholder: e.inputPlaceholder || "请输入",
@@ -1160,22 +1570,22 @@ function de(e) {
1160
1570
  w.key === "Enter" && this.handleConfirm();
1161
1571
  }
1162
1572
  }),
1163
- this.inputError ? T("div", { class: "x-message-box__error", style: { color: "#f56c6c", fontSize: "12px", marginTop: "4px" } }, this.inputError) : null
1573
+ this.inputError ? k("div", { class: "x-message-box__error", style: { color: "#f56c6c", fontSize: "12px", marginTop: "4px" } }, this.inputError) : null
1164
1574
  ])
1165
1575
  );
1166
1576
  const p = [];
1167
1577
  return e.showCancelButton && p.push(
1168
- T("button", {
1578
+ k("button", {
1169
1579
  class: "x-button p-button--default",
1170
1580
  onClick: this.handleCancel
1171
1581
  }, e.cancelButtonText || "取消")
1172
1582
  ), e.showConfirmButton !== !1 && p.push(
1173
- T("button", {
1583
+ k("button", {
1174
1584
  class: "x-button p-button--primary",
1175
1585
  onClick: this.handleConfirm,
1176
1586
  style: { marginLeft: "10px" }
1177
1587
  }, e.confirmButtonText || "确定")
1178
- ), T("div", {
1588
+ ), k("div", {
1179
1589
  class: ["x-message-box-wrapper", e.center ? "is-center" : ""],
1180
1590
  style: {
1181
1591
  position: "fixed",
@@ -1191,7 +1601,7 @@ function de(e) {
1191
1601
  },
1192
1602
  onClick: this.handleMaskClick
1193
1603
  }, [
1194
- T("div", {
1604
+ k("div", {
1195
1605
  class: ["x-message-box", e.customClass],
1196
1606
  style: {
1197
1607
  backgroundColor: "#fff",
@@ -1203,7 +1613,7 @@ function de(e) {
1203
1613
  onClick: (w) => w.stopPropagation()
1204
1614
  }, [
1205
1615
  // Header
1206
- T("div", {
1616
+ k("div", {
1207
1617
  class: "x-message-box__header",
1208
1618
  style: {
1209
1619
  display: "flex",
@@ -1214,16 +1624,16 @@ function de(e) {
1214
1624
  }
1215
1625
  }, c),
1216
1626
  // Body
1217
- T("div", {
1627
+ k("div", {
1218
1628
  class: "x-message-box__body",
1219
1629
  style: {
1220
1630
  padding: "20px",
1221
1631
  fontSize: "14px",
1222
1632
  color: "#606266"
1223
1633
  }
1224
- }, k),
1634
+ }, x),
1225
1635
  // Footer
1226
- T("div", {
1636
+ k("div", {
1227
1637
  class: "x-message-box__footer",
1228
1638
  style: {
1229
1639
  padding: "10px 20px 16px",
@@ -1233,79 +1643,79 @@ function de(e) {
1233
1643
  ])
1234
1644
  ]);
1235
1645
  }
1236
- }), l = ve(o);
1237
- l.mount(t);
1646
+ }), i = Me(a);
1647
+ i.mount(t);
1238
1648
  const m = {
1239
- app: l,
1649
+ app: i,
1240
1650
  container: t,
1241
1651
  close: () => {
1242
1652
  var v;
1243
- const g = (v = l._instance) == null ? void 0 : v.proxy;
1653
+ const g = (v = i._instance) == null ? void 0 : v.proxy;
1244
1654
  g != null && g.handleClose && g.handleClose();
1245
1655
  }
1246
1656
  };
1247
- Q.push(m);
1657
+ _.push(m);
1248
1658
  });
1249
1659
  }
1250
- async function je(e, s, t) {
1251
- return de({
1660
+ async function Ge(e, n, t) {
1661
+ return me({
1252
1662
  message: e,
1253
- title: s,
1663
+ title: n,
1254
1664
  ...t,
1255
1665
  showConfirmButton: !0,
1256
1666
  showCancelButton: !1
1257
1667
  });
1258
1668
  }
1259
- async function qe(e, s, t) {
1260
- return de({
1669
+ async function Je(e, n, t) {
1670
+ return me({
1261
1671
  message: e,
1262
- title: s,
1672
+ title: n,
1263
1673
  ...t,
1264
1674
  showConfirmButton: !0,
1265
1675
  showCancelButton: !0
1266
1676
  });
1267
1677
  }
1268
- async function Ze(e, s, t) {
1269
- return de({
1678
+ async function Qe(e, n, t) {
1679
+ return me({
1270
1680
  message: e,
1271
- title: s,
1681
+ title: n,
1272
1682
  ...t,
1273
1683
  showInput: !0,
1274
1684
  showConfirmButton: !0,
1275
1685
  showCancelButton: !0
1276
1686
  });
1277
1687
  }
1278
- function Ke(e) {
1279
- return de(e);
1688
+ function _e(e) {
1689
+ return me(e);
1280
1690
  }
1281
- const Y = Object.assign(Ke, {
1282
- alert: je,
1283
- confirm: qe,
1284
- prompt: Ze,
1285
- closeAll: We
1286
- }), pt = Y, ht = {
1691
+ const G = Object.assign(_e, {
1692
+ alert: Ge,
1693
+ confirm: Je,
1694
+ prompt: Qe,
1695
+ closeAll: Ue
1696
+ }), wt = G, xt = {
1287
1697
  install(e) {
1288
- e.config.globalProperties.$msgbox = Y, e.config.globalProperties.$alert = Y.alert, e.config.globalProperties.$confirm = Y.confirm, e.config.globalProperties.$prompt = Y.prompt, e.provide("messageBox", Y);
1698
+ e.config.globalProperties.$msgbox = G, e.config.globalProperties.$alert = G.alert, e.config.globalProperties.$confirm = G.confirm, e.config.globalProperties.$prompt = G.prompt, e.provide("messageBox", G);
1289
1699
  }
1290
- }, _ = [];
1291
- let Ue = 1;
1292
- const Ye = () => {
1293
- _.slice().forEach((e) => e.close());
1294
- }, Ge = {
1295
- success: { icon: "", color: "#67c23a" },
1296
- warning: { icon: "", color: "#e6a23c" },
1297
- error: { icon: "", color: "#f56c6c" },
1298
- info: { icon: "", color: "#909399" }
1299
- }, Je = (e, s) => {
1300
- const t = _.filter((o) => o.position === e);
1700
+ }, ee = [];
1701
+ let et = 1;
1702
+ const tt = () => {
1703
+ ee.slice().forEach((e) => e.close());
1704
+ }, at = {
1705
+ success: { iconPath: "M5 13l4 4L19 7", color: "#67c23a" },
1706
+ warning: { iconPath: "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", color: "#e6a23c" },
1707
+ error: { iconPath: "M6 18L18 6M6 6l12 12", color: "#f56c6c" },
1708
+ info: { iconPath: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z", color: "#909399" }
1709
+ }, ot = (e, n) => {
1710
+ const t = ee.filter((a) => a.position === e);
1301
1711
  let r = 16;
1302
- for (const o of t)
1303
- if (o.id < s) {
1304
- const l = o.container.firstElementChild;
1305
- l && (r += l.offsetHeight + 16);
1712
+ for (const a of t)
1713
+ if (a.id < n) {
1714
+ const i = a.container.firstElementChild;
1715
+ i && (r += i.offsetHeight + 16);
1306
1716
  }
1307
1717
  return r;
1308
- }, Qe = (e, s) => {
1718
+ }, lt = (e, n) => {
1309
1719
  const t = {
1310
1720
  position: "fixed",
1311
1721
  width: "330px",
@@ -1313,34 +1723,34 @@ const Ye = () => {
1313
1723
  };
1314
1724
  switch (e) {
1315
1725
  case "top-right":
1316
- t.top = `${s}px`, t.right = "16px";
1726
+ t.top = `${n}px`, t.right = "16px";
1317
1727
  break;
1318
1728
  case "top-left":
1319
- t.top = `${s}px`, t.left = "16px";
1729
+ t.top = `${n}px`, t.left = "16px";
1320
1730
  break;
1321
1731
  case "bottom-right":
1322
- t.bottom = `${s}px`, t.right = "16px";
1732
+ t.bottom = `${n}px`, t.right = "16px";
1323
1733
  break;
1324
1734
  case "bottom-left":
1325
- t.bottom = `${s}px`, t.left = "16px";
1735
+ t.bottom = `${n}px`, t.left = "16px";
1326
1736
  break;
1327
1737
  default:
1328
- t.top = `${s}px`, t.right = "16px";
1738
+ t.top = `${n}px`, t.right = "16px";
1329
1739
  }
1330
1740
  return t;
1331
1741
  };
1332
- function we(e) {
1333
- const s = Ue++, t = e.position || "top-right", r = document.createElement("div");
1742
+ function ke(e) {
1743
+ const n = et++, t = e.position || "top-right", r = document.createElement("div");
1334
1744
  document.body.appendChild(r);
1335
- let o = null, l = !1;
1336
- const m = N({
1745
+ let a = null, i = !1;
1746
+ const m = R({
1337
1747
  name: "TNotification",
1338
1748
  setup() {
1339
- const c = I(!1), k = () => {
1340
- l || (l = !0, c.value = !1, setTimeout(() => {
1341
- var y;
1342
- const n = _.findIndex((u) => u.id === s);
1343
- n !== -1 && _.splice(n, 1), o && clearTimeout(o), (y = e.onClose) == null || y.call(e);
1749
+ const c = I(!1), x = () => {
1750
+ i || (i = !0, c.value = !1, setTimeout(() => {
1751
+ var b;
1752
+ const l = ee.findIndex((d) => d.id === n);
1753
+ l !== -1 && ee.splice(l, 1), a && clearTimeout(a), (b = e.onClose) == null || b.call(e);
1344
1754
  try {
1345
1755
  g.unmount();
1346
1756
  } catch {
@@ -1348,26 +1758,26 @@ function we(e) {
1348
1758
  r.parentNode && r.parentNode.removeChild(r);
1349
1759
  }, 300));
1350
1760
  }, p = () => {
1351
- const n = e.duration ?? 4500;
1352
- n > 0 && (o = setTimeout(k, n));
1761
+ const l = e.duration ?? 4500;
1762
+ l > 0 && (a = setTimeout(x, l));
1353
1763
  }, w = () => {
1354
- o && (clearTimeout(o), o = null);
1355
- }, h = L(() => (e.offset ?? 0) + Je(t, s)), d = L(() => Qe(t, h.value));
1356
- return ee(() => {
1764
+ a && (clearTimeout(a), a = null);
1765
+ }, M = B(() => (e.offset ?? 0) + ot(t, n)), h = B(() => lt(t, M.value));
1766
+ return te(() => {
1357
1767
  c.value = !0, p();
1358
1768
  }), {
1359
1769
  visible: c,
1360
- close: k,
1361
- positionStyles: d,
1770
+ close: x,
1771
+ positionStyles: h,
1362
1772
  startTimer: p,
1363
1773
  clearTimer: w
1364
1774
  };
1365
1775
  },
1366
1776
  render() {
1367
1777
  if (!this.visible) return null;
1368
- const c = e.type, k = c ? Ge[c] : null, p = [];
1778
+ const c = e.type, x = c ? at[c] : null, p = [];
1369
1779
  e.title && p.push(
1370
- T("div", {
1780
+ k("div", {
1371
1781
  class: "x-notification__title",
1372
1782
  style: {
1373
1783
  fontWeight: "600",
@@ -1377,7 +1787,7 @@ function we(e) {
1377
1787
  }
1378
1788
  }, e.title)
1379
1789
  ), e.message && (e.dangerouslyUseHTMLString ? p.push(
1380
- T("div", {
1790
+ k("div", {
1381
1791
  class: "x-notification__content",
1382
1792
  style: {
1383
1793
  fontSize: "14px",
@@ -1387,7 +1797,7 @@ function we(e) {
1387
1797
  innerHTML: e.message
1388
1798
  })
1389
1799
  ) : p.push(
1390
- T("div", {
1800
+ k("div", {
1391
1801
  class: "x-notification__content",
1392
1802
  style: {
1393
1803
  fontSize: "14px",
@@ -1397,8 +1807,8 @@ function we(e) {
1397
1807
  }, e.message)
1398
1808
  ));
1399
1809
  const w = [];
1400
- return k && w.push(
1401
- T("div", {
1810
+ return x && w.push(
1811
+ k("div", {
1402
1812
  class: "x-notification__icon",
1403
1813
  style: {
1404
1814
  display: "flex",
@@ -1407,19 +1817,32 @@ function we(e) {
1407
1817
  width: "24px",
1408
1818
  height: "24px",
1409
1819
  marginRight: "12px",
1410
- fontSize: "18px",
1411
- color: k.color
1820
+ color: x.color
1412
1821
  }
1413
- }, k.icon)
1822
+ }, [
1823
+ k("svg", {
1824
+ xmlns: "http://www.w3.org/2000/svg",
1825
+ width: "18",
1826
+ height: "18",
1827
+ viewBox: "0 0 24 24",
1828
+ fill: "none",
1829
+ stroke: "currentColor",
1830
+ strokeWidth: "2",
1831
+ strokeLinecap: "round",
1832
+ strokeLinejoin: "round"
1833
+ }, [
1834
+ k("path", { d: x.iconPath })
1835
+ ])
1836
+ ])
1414
1837
  ), w.push(
1415
- T("div", {
1838
+ k("div", {
1416
1839
  class: "x-notification__main",
1417
1840
  style: {
1418
1841
  flex: "1"
1419
1842
  }
1420
1843
  }, p)
1421
1844
  ), e.showClose !== !1 && w.push(
1422
- T("button", {
1845
+ k("button", {
1423
1846
  class: "x-notification__close",
1424
1847
  style: {
1425
1848
  position: "absolute",
@@ -1428,15 +1851,31 @@ function we(e) {
1428
1851
  background: "none",
1429
1852
  border: "none",
1430
1853
  cursor: "pointer",
1431
- fontSize: "14px",
1432
1854
  color: "#909399",
1433
- padding: "0"
1855
+ padding: "0",
1856
+ display: "flex",
1857
+ alignItems: "center",
1858
+ justifyContent: "center"
1434
1859
  },
1435
- onClick: (h) => {
1436
- h.stopPropagation(), this.close();
1860
+ onClick: (M) => {
1861
+ M.stopPropagation(), this.close();
1437
1862
  }
1438
- }, "✕")
1439
- ), T("div", {
1863
+ }, [
1864
+ k("svg", {
1865
+ xmlns: "http://www.w3.org/2000/svg",
1866
+ width: "14",
1867
+ height: "14",
1868
+ viewBox: "0 0 24 24",
1869
+ fill: "none",
1870
+ stroke: "currentColor",
1871
+ strokeWidth: "2",
1872
+ strokeLinecap: "round",
1873
+ strokeLinejoin: "round"
1874
+ }, [
1875
+ k("path", { d: "M6 18L18 6M6 6l12 12" })
1876
+ ])
1877
+ ])
1878
+ ), k("div", {
1440
1879
  class: ["x-notification", e.customClass],
1441
1880
  style: {
1442
1881
  ...this.positionStyles,
@@ -1453,50 +1892,51 @@ function we(e) {
1453
1892
  onMouseleave: this.startTimer
1454
1893
  }, w);
1455
1894
  }
1456
- }), g = ve(m);
1895
+ }), g = Me(m);
1457
1896
  g.mount(r);
1458
1897
  const v = {
1459
- id: s,
1898
+ id: n,
1460
1899
  app: g,
1461
1900
  container: r,
1462
1901
  position: t,
1463
1902
  close: () => {
1464
- var k;
1465
- const c = (k = g._instance) == null ? void 0 : k.proxy;
1903
+ var x;
1904
+ const c = (x = g._instance) == null ? void 0 : x.proxy;
1466
1905
  c != null && c.close && c.close();
1467
1906
  }
1468
1907
  };
1469
- return _.push(v), { close: v.close };
1908
+ return ee.push(v), { close: v.close };
1470
1909
  }
1471
- function _e(e) {
1472
- return we(typeof e == "string" ? { message: e } : e);
1910
+ function nt(e) {
1911
+ return ke(typeof e == "string" ? { message: e } : e);
1473
1912
  }
1474
- const ae = (e) => (s) => we({ ...typeof s == "string" ? { message: s } : s, type: e }), he = Object.assign(_e, {
1475
- info: ae("info"),
1476
- success: ae("success"),
1477
- warning: ae("warning"),
1478
- error: ae("error"),
1479
- closeAll: Ye
1480
- }), vt = he, gt = {
1913
+ const ie = (e) => (n) => ke({ ...typeof n == "string" ? { message: n } : n, type: e }), pe = Object.assign(nt, {
1914
+ info: ie("info"),
1915
+ success: ie("success"),
1916
+ warning: ie("warning"),
1917
+ error: ie("error"),
1918
+ closeAll: tt
1919
+ }), kt = pe, zt = {
1481
1920
  install(e) {
1482
- e.config.globalProperties.$notify = he, e.provide("notification", he);
1921
+ e.config.globalProperties.$notify = pe, e.provide("notification", pe);
1483
1922
  }
1484
1923
  };
1485
1924
  export {
1486
- lt as Alert,
1487
- rt as Backtop,
1488
- nt as Drawer,
1489
- st as DrawerForm,
1490
- dt as Message,
1491
- pt as MessageBox,
1492
- ft as MessageComponent,
1493
- ot as Modal,
1494
- vt as Notification,
1495
- it as Popconfirm,
1496
- mt as TMessage,
1497
- ht as TMessageBox,
1498
- gt as TNotification,
1499
- ct as Timeline,
1500
- ut as TimelineItem,
1501
- at as Tooltip
1925
+ dt as Alert,
1926
+ ft as Backtop,
1927
+ ct as Drawer,
1928
+ ut as DrawerForm,
1929
+ gt as Message,
1930
+ wt as MessageBox,
1931
+ bt as MessageComponent,
1932
+ rt as Modal,
1933
+ kt as Notification,
1934
+ ht as Popconfirm,
1935
+ vt as Result,
1936
+ yt as TMessage,
1937
+ xt as TMessageBox,
1938
+ zt as TNotification,
1939
+ pt as Timeline,
1940
+ Mt as TimelineItem,
1941
+ mt as Tooltip
1502
1942
  };