@me-framework/me-ui-antdv-next 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/chunks/input-icon-selector-BrrR4KK6.js +228 -0
  2. package/dist/icon/index.js +1 -1
  3. package/dist/input-gps/index.js +85 -233
  4. package/dist/input-gps/index.vue.d.ts +3 -1
  5. package/dist/input-gps/map.vue.d.ts +1 -1
  6. package/dist/input-gps/types.d.ts +9 -5
  7. package/dist/input-icon-selector/index.js +1 -1
  8. package/dist/input-icon-selector/index.vue.d.ts +1 -1
  9. package/dist/load-json/index.css +1 -0
  10. package/dist/load-json/index.js +81 -24275
  11. package/dist/me-ui-antdv-next.js +61 -47
  12. package/dist/me-ui-antdv-next.umd.cjs +2 -2
  13. package/dist/message/index.js +1 -1
  14. package/dist/modal/index.js +1 -1
  15. package/dist/nav/index.js +1 -1
  16. package/dist/resolver/index.d.ts +1 -1
  17. package/dist/resolver/index.js +7 -4
  18. package/dist/tree-menu/index.js +2 -2
  19. package/package.json +6 -6
  20. package/dist/chunks/input-icon-selector-D5c45QL8.js +0 -227
  21. package/dist/chunks/rolldown-runtime-DtPi1Y-2.js +0 -13
  22. package/dist/load-json.css +0 -1
  23. /package/dist/{base.css → base/index.css} +0 -0
  24. /package/dist/{body.css → body/index.css} +0 -0
  25. /package/dist/{box.css → box/index.css} +0 -0
  26. /package/dist/{breadcrumb.css → breadcrumb/index.css} +0 -0
  27. /package/dist/{card.css → card/index.css} +0 -0
  28. /package/dist/chunks/{icon-DdoH0MfT.js → icon-CXjgApCy.js} +0 -0
  29. /package/dist/chunks/{message-CPHX2tAR.js → message-D2zYiiQe.js} +0 -0
  30. /package/dist/chunks/{modal-Dke8ng3P.js → modal-KBZYtIHD.js} +0 -0
  31. /package/dist/{icon.css → icon/index.css} +0 -0
  32. /package/dist/{input-gps.css → input-gps/index.css} +0 -0
  33. /package/dist/{input-icon-selector.css → input-icon-selector/index.css} +0 -0
  34. /package/dist/{input-radio.css → input-radio/index.css} +0 -0
  35. /package/dist/{login-page.css → login-page/index.css} +0 -0
  36. /package/dist/{menu.css → menu/index.css} +0 -0
  37. /package/dist/{message.css → message/index.css} +0 -0
  38. /package/dist/{modal.css → modal/index.css} +0 -0
  39. /package/dist/{nav.css → nav/index.css} +0 -0
  40. /package/dist/{skeleton.css → skeleton/index.css} +0 -0
  41. /package/dist/{tree-menu.css → tree-menu/index.css} +0 -0
@@ -0,0 +1,228 @@
1
+ import { t as e } from "./icon-CXjgApCy.js";
2
+ import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, onMounted as f, openBlock as p, ref as m, renderList as h, renderSlot as g, resolveComponent as _, unref as v, watch as y, withCtx as b } from "vue";
3
+ import * as x from "@lucide/vue";
4
+ import S from "remixicon/fonts/remixicon.symbol.svg";
5
+ //#region src/components/input-icon-selector/index.vue?vue&type=script&setup=true&lang.ts
6
+ var C = { class: "me-input-icon-selector__search" }, w = {
7
+ key: 0,
8
+ class: "me-input-icon-selector__list"
9
+ }, T = ["title", "onClick"], E = {
10
+ key: 1,
11
+ class: "me-input-icon-selector__empty"
12
+ }, D = { class: "me-input-icon-selector__footer" }, O = {
13
+ key: 0,
14
+ href: "https://remixicon.com/",
15
+ target: "_blank",
16
+ class: "me-input-icon-selector__link"
17
+ }, k = {
18
+ key: 1,
19
+ href: "https://lucide.dev/icons/",
20
+ target: "_blank",
21
+ class: "me-input-icon-selector__link"
22
+ }, A = { key: 2 }, j = /* @__PURE__ */ l({
23
+ name: "MeInputIconSelector",
24
+ __name: "index",
25
+ props: {
26
+ modelValue: { default: "" },
27
+ sources: { default: () => [
28
+ "lucide",
29
+ "remixicon",
30
+ "iconfont"
31
+ ] },
32
+ iconfontData: { default: () => [] },
33
+ placeholder: { default: "请选择图标" },
34
+ searchPlaceholder: { default: "搜索图标" },
35
+ pageSize: { default: 30 },
36
+ popoverWidth: { default: 280 },
37
+ disabled: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ size: { default: "middle" },
42
+ clearable: {
43
+ type: Boolean,
44
+ default: !0
45
+ },
46
+ iconfontPrefix: { default: "iconfont" },
47
+ iconfontMode: { default: "class" }
48
+ },
49
+ emits: ["update:modelValue", "change"],
50
+ setup(l, { emit: j }) {
51
+ let M = l, N = j, P = m(!1), F = m(""), I = m(1), L = m("lucide"), R = n(() => {
52
+ if (typeof M.popoverWidth == "number") return M.popoverWidth;
53
+ let e = parseInt(M.popoverWidth, 10);
54
+ return isNaN(e) ? 280 : e;
55
+ }), z = n(() => Object.keys(x).filter((e) => {
56
+ if (!/^[A-Z]/.test(e)) return !1;
57
+ let t = x[e];
58
+ return typeof t != "object" && typeof t != "function" || e === "icons" || e === "createLucideIcon" || e === "default" ? !1 : t && (t.render || t.setup || t.__name) ? !0 : typeof t == "function" || typeof t == "object";
59
+ })), B = m([]), V = !1;
60
+ function H() {
61
+ typeof document > "u" || V || (V = !0, fetch(S).then((e) => e.text()).then((e) => {
62
+ let t = new DOMParser().parseFromString(e, "image/svg+xml").querySelectorAll("symbol[id^=\"ri-\"]");
63
+ B.value = Array.from(t).map((e) => e.getAttribute("id") || "");
64
+ }).catch((e) => {
65
+ console.warn("[MeInputIconSelector] Failed to load remixicon list:", e), V = !1;
66
+ }));
67
+ }
68
+ f(() => {
69
+ H();
70
+ });
71
+ let U = {
72
+ lucide: {
73
+ label: "Lucide",
74
+ get data() {
75
+ return z.value;
76
+ }
77
+ },
78
+ remixicon: {
79
+ label: "Remixicon",
80
+ get data() {
81
+ return B.value;
82
+ }
83
+ },
84
+ iconfont: {
85
+ label: "Iconfont",
86
+ data: []
87
+ }
88
+ }, W = n(() => M.sources.map((e) => ({
89
+ key: e,
90
+ label: U[e].label
91
+ })));
92
+ y(() => M.sources, (e) => {
93
+ e.includes(L.value) || (L.value = e[0] || "lucide");
94
+ }, { immediate: !0 });
95
+ let G = n(() => L.value === "iconfont" ? M.iconfontData : U[L.value].data), K = n(() => {
96
+ let e = F.value.trim().toLowerCase();
97
+ return e ? G.value.filter((t) => t.toLowerCase().includes(e)) : G.value;
98
+ }), q = n(() => {
99
+ let e = (I.value - 1) * M.pageSize, t = e + M.pageSize;
100
+ return K.value.slice(e, t);
101
+ });
102
+ y(F, () => {
103
+ I.value = 1;
104
+ }), y(L, () => {
105
+ I.value = 1, F.value = "";
106
+ });
107
+ function J(e) {
108
+ N("update:modelValue", e), N("change", e), P.value = !1;
109
+ }
110
+ function Y(e) {
111
+ let t = typeof e == "string" ? e : e.target?.value || "";
112
+ N("update:modelValue", t), N("change", t);
113
+ }
114
+ function X() {
115
+ N("update:modelValue", ""), N("change", "");
116
+ }
117
+ return (n, f) => {
118
+ let m = _("a-space-addon"), y = _("a-input"), x = _("a-tab-pane"), S = _("a-tabs"), j = _("a-pagination"), N = _("a-button"), z = _("a-popover"), B = _("a-space-compact");
119
+ return p(), r(B, {
120
+ class: "me-input-icon-selector",
121
+ style: { width: "100%" }
122
+ }, {
123
+ default: b(() => [
124
+ l.modelValue ? (p(), r(m, { key: 0 }, {
125
+ default: b(() => [c(v(e), {
126
+ name: l.modelValue,
127
+ size: 16
128
+ }, null, 8, ["name"])]),
129
+ _: 1
130
+ })) : i("", !0),
131
+ c(y, {
132
+ value: l.modelValue,
133
+ placeholder: M.placeholder,
134
+ disabled: M.disabled,
135
+ size: M.size,
136
+ "allow-clear": M.clearable,
137
+ style: { width: "100%" },
138
+ "onUpdate:value": Y,
139
+ onChange: Y,
140
+ onClear: X
141
+ }, null, 8, [
142
+ "value",
143
+ "placeholder",
144
+ "disabled",
145
+ "size",
146
+ "allow-clear"
147
+ ]),
148
+ c(z, {
149
+ open: P.value,
150
+ "onUpdate:open": f[3] ||= (e) => P.value = e,
151
+ trigger: "click",
152
+ placement: "bottomRight",
153
+ "overlay-class-name": "me-input-icon-selector-popover"
154
+ }, {
155
+ content: b(() => [o("div", {
156
+ class: "me-input-icon-selector__popover",
157
+ style: d({ width: R.value + "px" })
158
+ }, [
159
+ o("div", C, [c(y, {
160
+ value: F.value,
161
+ "onUpdate:value": f[0] ||= (e) => F.value = e,
162
+ "allow-clear": "",
163
+ placeholder: M.searchPlaceholder,
164
+ size: "small"
165
+ }, null, 8, ["value", "placeholder"])]),
166
+ c(S, {
167
+ activeKey: L.value,
168
+ "onUpdate:activeKey": f[1] ||= (e) => L.value = e,
169
+ class: "me-input-icon-selector__tabs",
170
+ size: "small"
171
+ }, {
172
+ default: b(() => [(p(!0), a(t, null, h(W.value, (e) => (p(), r(x, {
173
+ key: e.key,
174
+ tab: e.label
175
+ }, null, 8, ["tab"]))), 128))]),
176
+ _: 1
177
+ }, 8, ["activeKey"]),
178
+ q.value.length > 0 ? (p(), a("div", w, [(p(!0), a(t, null, h(q.value, (t, n) => (p(), a("div", {
179
+ key: n,
180
+ class: u(["icon-item", { "is-active": t === l.modelValue }]),
181
+ title: t,
182
+ onClick: (e) => J(t)
183
+ }, [c(v(e), {
184
+ name: t,
185
+ type: L.value,
186
+ size: 18,
187
+ "iconfont-prefix": M.iconfontPrefix,
188
+ "iconfont-mode": M.iconfontMode
189
+ }, null, 8, [
190
+ "name",
191
+ "type",
192
+ "iconfont-prefix",
193
+ "iconfont-mode"
194
+ ])], 10, T))), 128))])) : (p(), a("div", E, " 暂无匹配的图标 ")),
195
+ o("div", D, [L.value === "remixicon" ? (p(), a("a", O, " remixicon.com ")) : L.value === "lucide" ? (p(), a("a", k, " lucide.dev ")) : (p(), a("span", A)), c(j, {
196
+ current: I.value,
197
+ "onUpdate:current": f[2] ||= (e) => I.value = e,
198
+ "page-size": M.pageSize,
199
+ total: K.value.length,
200
+ size: "small",
201
+ simple: "",
202
+ class: "me-input-icon-selector__pagination"
203
+ }, null, 8, [
204
+ "current",
205
+ "page-size",
206
+ "total"
207
+ ])])
208
+ ], 4)]),
209
+ default: b(() => [g(n.$slots, "default", {}, () => [c(N, { size: M.size }, {
210
+ default: b(() => [...f[4] ||= [s("选择", -1)]]),
211
+ _: 1
212
+ }, 8, ["size"])])]),
213
+ _: 3
214
+ }, 8, ["open"])
215
+ ]),
216
+ _: 3
217
+ });
218
+ };
219
+ }
220
+ });
221
+ //#endregion
222
+ //#region src/components/input-icon-selector/index.ts
223
+ j.install = (e) => {
224
+ e.component("MeInputIconSelector", j);
225
+ };
226
+ var M = j;
227
+ //#endregion
228
+ export { j as n, M as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../chunks/icon-DdoH0MfT.js";
1
+ import { t as e } from "../chunks/icon-CXjgApCy.js";
2
2
  //#region src/components/icon/index.ts
3
3
  e.install = (t) => {
4
4
  t.component("MeIcon", e);