x-next 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_USAGE.md +57 -4
- package/CHANGELOG.md +36 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/draggable/Draggable.d.ts +1 -1
- package/dist/components/draggable/index.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +6 -6
- package/dist/components/drawer/src/Drawer.vue.d.ts +3 -3
- package/dist/components/dropdown/Dropdown.vue.d.ts +4 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +5 -5
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +4 -4
- package/dist/components/dropdown/index.d.ts +29 -29
- package/dist/components/form/FormItem.vue.d.ts +12 -12
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +24 -24
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/index.d.ts +6 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/grid/Row.vue.d.ts +3 -3
- package/dist/components/grid/index.d.ts +9 -9
- package/dist/components/image/Image.vue.d.ts +125 -17
- package/dist/components/image/ImagePreview.vue.d.ts +97 -7
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +100 -7
- package/dist/components/image/hooks/use-image-drag.d.ts +2 -2
- package/dist/components/image/index.d.ts +712 -124
- package/dist/components/image/interface.d.ts +9 -1
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/popconfirm/src/popup.vue.d.ts +3 -3
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +372 -0
- package/dist/components/upload/context.d.ts +28 -0
- package/dist/components/upload/index.d.ts +656 -0
- package/dist/components/upload/interface.d.ts +110 -0
- package/dist/components/upload/props.d.ts +321 -0
- package/dist/components/upload/upload-list-item.d.ts +15 -0
- package/dist/components/upload/upload-list.d.ts +11 -0
- package/dist/components/upload/upload-picture-item.d.ts +20 -0
- package/dist/components/upload/upload-trigger.d.ts +8 -0
- package/dist/components/upload/utils.d.ts +48 -0
- package/dist/es/_styles/palette-aliases.js +2 -4
- package/dist/es/components/image/Image.vue.js +55 -45
- package/dist/es/components/image/Image.vue2.js +113 -92
- package/dist/es/components/image/ImagePreview.vue.js +66 -53
- package/dist/es/components/image/ImagePreview.vue2.js +219 -171
- package/dist/es/components/image/ImagePreviewAction.js +12 -15
- package/dist/es/components/image/ImagePreviewGroup.vue.js +21 -20
- package/dist/es/components/image/ImagePreviewGroup.vue2.js +45 -39
- package/dist/es/components/image/hooks/use-image-drag.js +16 -14
- package/dist/es/components/index.js +33 -31
- package/dist/es/components/upload/Upload.js +420 -0
- package/dist/es/components/upload/context.js +4 -0
- package/dist/es/components/upload/index.js +8 -0
- package/dist/es/components/upload/props.js +321 -0
- package/dist/es/components/upload/upload-list-item.js +138 -0
- package/dist/es/components/upload/upload-list.js +48 -0
- package/dist/es/components/upload/upload-picture-item.js +109 -0
- package/dist/es/components/upload/upload-trigger.js +89 -0
- package/dist/es/components/upload/utils.js +195 -0
- package/dist/es/icons/_self/upload-icons.js +103 -0
- package/dist/es/index.js +40 -38
- package/dist/es/locale/en-US.js +22 -0
- package/dist/es/locale/zh-CN.js +22 -0
- package/dist/es/style.css +1 -1
- package/dist/icons/_self/upload-icons.d.ts +523 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +32 -0
- package/dist/style/base.css +1 -1
- package/dist/style/image.css +1 -1
- package/dist/style/upload.css +1 -0
- package/dist/style/upload.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/volar.d.ts +1 -0
- package/dist/es/_hooks/use-popup-overflow-hidden.js +0 -29
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent as I, inject as L, computed as n, watch as P, createVNode as l, mergeProps as v } from "vue";
|
|
2
|
+
import { getClassNameMixin as E } from "../../_utils/config.js";
|
|
3
|
+
import { useLocale as K } from "../../locale/index.js";
|
|
4
|
+
import { IconUploadCloud as N } from "../../icons/_self/upload-icons.js";
|
|
5
|
+
import { uploadInjectionKey as U } from "./context.js";
|
|
6
|
+
import { useFormItem as j, useFormItemControl as A } from "../../_hooks/use-form-item.js";
|
|
7
|
+
const S = /* @__PURE__ */ I({
|
|
8
|
+
name: "UploadTrigger",
|
|
9
|
+
setup() {
|
|
10
|
+
const e = L(U);
|
|
11
|
+
if (!e) return () => null;
|
|
12
|
+
const {
|
|
13
|
+
t: o
|
|
14
|
+
} = K(), r = E("upload"), {
|
|
15
|
+
formItemCtx: m,
|
|
16
|
+
eventHandlers: b
|
|
17
|
+
} = j(), d = A(m, () => ({
|
|
18
|
+
...e.getTriggerAttrs(),
|
|
19
|
+
...e.props.ariaLabel ? {
|
|
20
|
+
"aria-label": e.props.ariaLabel
|
|
21
|
+
} : {}
|
|
22
|
+
}), {
|
|
23
|
+
labelable: !1
|
|
24
|
+
}), t = n(() => e.props.draggable), c = n(() => e.listType.value === "picture-card"), y = n(() => e.props.ariaLabel || o("upload.trigger")), D = n(() => [r.element("trigger"), t.value && r.element("dragger"), t.value && e.dragging.value && r.is("dragging"), e.listType.value === "picture-card" && r.element("picture-trigger"), e.disabled.value && r.is("disabled")]), T = n(() => e.dragging.value ? o("upload.dragHover") : t.value ? o("upload.drag") : o("upload.buttonText"));
|
|
25
|
+
P(e.disabled, (a) => {
|
|
26
|
+
a && (e.dragging.value = !1);
|
|
27
|
+
});
|
|
28
|
+
const g = () => {
|
|
29
|
+
e.disabled.value || e.openFileDialog();
|
|
30
|
+
}, C = (a) => {
|
|
31
|
+
a.key !== "Enter" && a.key !== " " || (a.preventDefault(), g());
|
|
32
|
+
}, h = (a) => {
|
|
33
|
+
t.value && (a.preventDefault(), !e.disabled.value && (e.dragging.value = !0));
|
|
34
|
+
}, x = (a) => {
|
|
35
|
+
t.value && (a.preventDefault(), a.dataTransfer && (a.dataTransfer.dropEffect = e.disabled.value ? "none" : "copy"), !e.disabled.value && (e.dragging.value = !0));
|
|
36
|
+
}, k = (a) => {
|
|
37
|
+
if (e.disabled.value || !t.value) return;
|
|
38
|
+
const i = a.currentTarget, s = a.relatedTarget;
|
|
39
|
+
s && i.contains(s) || (e.dragging.value = !1);
|
|
40
|
+
}, F = (a) => {
|
|
41
|
+
t.value && (a.preventDefault(), e.dragging.value = !1, !e.disabled.value && e.onDropFiles(a));
|
|
42
|
+
};
|
|
43
|
+
return () => {
|
|
44
|
+
const a = {
|
|
45
|
+
type: "file",
|
|
46
|
+
class: r.element("input"),
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
tabindex: -1
|
|
49
|
+
};
|
|
50
|
+
e.props.accept && (a.accept = e.props.accept), (e.props.multiple || e.props.directory) && (a.multiple = !0), a.disabled = e.disabled.value, e.props.directory && (a.directory = "", a.webkitdirectory = ""), e.props.capture !== void 0 && e.props.capture !== !1 && (a.capture = e.props.capture === !0 ? "" : e.props.capture);
|
|
51
|
+
const i = e.slots["upload-button"] ?? e.slots.default, s = i ? i() : [l("span", {
|
|
52
|
+
class: r.element("trigger-icon"),
|
|
53
|
+
key: "icon"
|
|
54
|
+
}, [l(N, {
|
|
55
|
+
size: t.value ? 40 : c.value ? 20 : 16
|
|
56
|
+
}, null)]), l("span", {
|
|
57
|
+
class: r.element("trigger-text"),
|
|
58
|
+
key: "text"
|
|
59
|
+
}, [T.value])], w = !!e.props.tip && !c.value;
|
|
60
|
+
return l("div", v(d.value, {
|
|
61
|
+
class: D.value,
|
|
62
|
+
role: "button",
|
|
63
|
+
tabindex: e.disabled.value ? void 0 : 0,
|
|
64
|
+
"aria-disabled": e.disabled.value || void 0,
|
|
65
|
+
"aria-label": d.value["aria-label"] || (d.value["aria-labelledby"] ? void 0 : y.value),
|
|
66
|
+
onClick: g,
|
|
67
|
+
onKeydown: C,
|
|
68
|
+
onDragenter: h,
|
|
69
|
+
onDragover: x,
|
|
70
|
+
onDragleave: k,
|
|
71
|
+
onDrop: F,
|
|
72
|
+
onFocusout: (u) => {
|
|
73
|
+
var p, f;
|
|
74
|
+
u.currentTarget.contains(u.relatedTarget) || (f = (p = b.value) == null ? void 0 : p.onBlur) == null || f.call(p);
|
|
75
|
+
}
|
|
76
|
+
}), [l("input", v({
|
|
77
|
+
ref: e.inputRef
|
|
78
|
+
}, a, {
|
|
79
|
+
onChange: e.onFileChange,
|
|
80
|
+
onClick: (u) => u.stopPropagation()
|
|
81
|
+
}), null), s, w && l("span", {
|
|
82
|
+
class: r.element("tip")
|
|
83
|
+
}, [e.props.tip])]);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export {
|
|
88
|
+
S as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { isFunction as j } from "../../_utils/is.js";
|
|
2
|
+
const u = [
|
|
3
|
+
"avif",
|
|
4
|
+
"bmp",
|
|
5
|
+
"dpg",
|
|
6
|
+
"gif",
|
|
7
|
+
"heic",
|
|
8
|
+
"heif",
|
|
9
|
+
"ico",
|
|
10
|
+
"jfif",
|
|
11
|
+
"jpeg",
|
|
12
|
+
"jpg",
|
|
13
|
+
"png",
|
|
14
|
+
"svg",
|
|
15
|
+
"tif",
|
|
16
|
+
"tiff",
|
|
17
|
+
"webp"
|
|
18
|
+
], E = {
|
|
19
|
+
"audio/mp3": "audio/mpeg",
|
|
20
|
+
"image/jpg": "image/jpeg",
|
|
21
|
+
"text/xml": "application/xml"
|
|
22
|
+
}, R = {
|
|
23
|
+
jpeg: ["jpeg", "jpg"],
|
|
24
|
+
jpg: ["jpeg", "jpg"],
|
|
25
|
+
tif: ["tif", "tiff"],
|
|
26
|
+
tiff: ["tif", "tiff"]
|
|
27
|
+
};
|
|
28
|
+
let x = 0;
|
|
29
|
+
const L = () => `${Date.now().toString(36)}-${(x++).toString(36)}`, d = (t) => {
|
|
30
|
+
const e = (t ?? "").toLowerCase().split(";")[0].trim();
|
|
31
|
+
return E[e] ?? e;
|
|
32
|
+
}, a = (t) => {
|
|
33
|
+
const e = t.lastIndexOf(".");
|
|
34
|
+
return e >= 0 ? t.slice(e + 1).toLowerCase() : "";
|
|
35
|
+
}, p = (t, e) => (R[t] ?? [t]).includes(e), P = (t, e) => {
|
|
36
|
+
const r = (e ?? "").split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
37
|
+
if (!r.length) return !0;
|
|
38
|
+
const n = d(t.type), o = a(t.name);
|
|
39
|
+
return r.some((s) => {
|
|
40
|
+
if (s === "*" || s === "*/*") return !0;
|
|
41
|
+
if (s.startsWith("."))
|
|
42
|
+
return p(s.slice(1), o);
|
|
43
|
+
if (s.endsWith("/*"))
|
|
44
|
+
return n.startsWith(s.slice(0, -1));
|
|
45
|
+
const i = d(s);
|
|
46
|
+
if (n && i === n) return !0;
|
|
47
|
+
if (n) return !1;
|
|
48
|
+
const c = i.lastIndexOf("/");
|
|
49
|
+
return c >= 0 && p(i.slice(c + 1), o);
|
|
50
|
+
});
|
|
51
|
+
}, h = (t) => d(t).startsWith("image/"), S = (t) => h(t.type) || !t.type && u.includes(a(t.name)), $ = (t) => {
|
|
52
|
+
if (t.type) return h(t.type);
|
|
53
|
+
const e = t.url || t.thumbUrl || t.name;
|
|
54
|
+
return e.startsWith("data:image/") ? !0 : u.includes(a(e.split(/[?#]/)[0])) || u.includes(a(t.name));
|
|
55
|
+
}, m = /* @__PURE__ */ new WeakMap(), A = (t) => {
|
|
56
|
+
const e = m.get(t), r = t.uid || e || L();
|
|
57
|
+
!t.uid && !e && m.set(t, r);
|
|
58
|
+
const n = t.status ?? "done";
|
|
59
|
+
return {
|
|
60
|
+
...t,
|
|
61
|
+
uid: r,
|
|
62
|
+
status: n,
|
|
63
|
+
percent: t.percent ?? (n === "done" ? 1 : 0)
|
|
64
|
+
};
|
|
65
|
+
}, q = (t) => (t ?? []).map(A), g = /* @__PURE__ */ new Set(), C = (t) => {
|
|
66
|
+
if (!S(t) || typeof URL > "u" || typeof URL.createObjectURL != "function") return;
|
|
67
|
+
const e = URL.createObjectURL(t);
|
|
68
|
+
return g.add(e), e;
|
|
69
|
+
}, N = (t) => {
|
|
70
|
+
if (!(!t || !g.delete(t)))
|
|
71
|
+
try {
|
|
72
|
+
URL.revokeObjectURL(t);
|
|
73
|
+
} catch {
|
|
74
|
+
}
|
|
75
|
+
}, U = (t) => {
|
|
76
|
+
const e = t.responseText ?? "";
|
|
77
|
+
if ((t.getResponseHeader("content-type") ?? "").includes("json"))
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(e || "null");
|
|
80
|
+
} catch {
|
|
81
|
+
return e;
|
|
82
|
+
}
|
|
83
|
+
return t.response ?? e;
|
|
84
|
+
}, W = (t) => t === null || typeof t != "object" && typeof t != "function" ? !1 : typeof t.then == "function", T = (t) => {
|
|
85
|
+
if (t === null || typeof t != "object") return;
|
|
86
|
+
const e = t.abort;
|
|
87
|
+
return j(e) ? () => e.call(t) : void 0;
|
|
88
|
+
}, I = (t) => {
|
|
89
|
+
if (t === null || typeof t != "object") return !1;
|
|
90
|
+
const e = t;
|
|
91
|
+
return typeof e.ok == "boolean" && typeof e.status == "number" && typeof e.text == "function" && typeof e.json == "function";
|
|
92
|
+
}, z = async (t) => {
|
|
93
|
+
var r, n;
|
|
94
|
+
if (!I(t)) return t;
|
|
95
|
+
if (!t.ok) {
|
|
96
|
+
const o = new Error(`Request failed with status ${t.status}`);
|
|
97
|
+
throw o.status = t.status, o.response = t, o;
|
|
98
|
+
}
|
|
99
|
+
const e = ((n = (r = t.headers) == null ? void 0 : r.get) == null ? void 0 : n.call(r, "content-type")) ?? "";
|
|
100
|
+
if (e.includes("json")) {
|
|
101
|
+
const o = await t.text();
|
|
102
|
+
if (!o) return;
|
|
103
|
+
try {
|
|
104
|
+
return JSON.parse(o);
|
|
105
|
+
} catch {
|
|
106
|
+
return o;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return e.startsWith("text/") ? t.text() : t;
|
|
110
|
+
}, f = (t, e) => {
|
|
111
|
+
const r = new Error(e);
|
|
112
|
+
return r.status = t.status, r;
|
|
113
|
+
}, y = (t, e, r) => {
|
|
114
|
+
if (r != null) {
|
|
115
|
+
if (Array.isArray(r)) {
|
|
116
|
+
r.forEach((n) => y(t, `${e}[]`, n));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (typeof Blob < "u" && r instanceof Blob) {
|
|
120
|
+
t.append(e, r);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
t.append(e, String(r));
|
|
124
|
+
}
|
|
125
|
+
}, B = (t) => {
|
|
126
|
+
const e = new XMLHttpRequest();
|
|
127
|
+
e.open(t.method.toUpperCase(), t.action || "", !0), t.withCredentials && (e.withCredentials = !0), t.timeout > 0 && (e.timeout = t.timeout), Object.entries(t.headers ?? {}).forEach(([n, o]) => {
|
|
128
|
+
o != null && e.setRequestHeader(n, String(o));
|
|
129
|
+
}), e.upload.onprogress = (n) => {
|
|
130
|
+
t.onProgress(n.total > 0 ? Math.min(1, n.loaded / n.total) : 0, n);
|
|
131
|
+
}, e.onload = () => {
|
|
132
|
+
if (e.status >= 200 && e.status < 300) {
|
|
133
|
+
t.onSuccess(U(e));
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
t.onError(f(e, `Request failed with status ${e.status}`));
|
|
137
|
+
}, e.onerror = () => t.onError(f(e, "Network error")), e.ontimeout = () => t.onError(f(e, "Request timeout")), e.onabort = () => {
|
|
138
|
+
};
|
|
139
|
+
const r = new FormData();
|
|
140
|
+
return Object.entries(t.data ?? {}).forEach(([n, o]) => y(r, n, o)), r.append(t.name || "file", t.file, t.file.name), e.send(r), {
|
|
141
|
+
abort: () => e.abort()
|
|
142
|
+
};
|
|
143
|
+
}, O = (t) => new Promise((e, r) => {
|
|
144
|
+
t.readEntries(e, r);
|
|
145
|
+
}), F = async (t) => {
|
|
146
|
+
const e = [];
|
|
147
|
+
for (; ; ) {
|
|
148
|
+
const r = await O(t);
|
|
149
|
+
if (!r.length) break;
|
|
150
|
+
e.push(...r);
|
|
151
|
+
}
|
|
152
|
+
return e;
|
|
153
|
+
}, M = (t) => new Promise((e, r) => {
|
|
154
|
+
t.file(e, r);
|
|
155
|
+
}), H = async (t) => {
|
|
156
|
+
const r = (t.items ? Array.from(t.items) : []).map((s) => {
|
|
157
|
+
var i;
|
|
158
|
+
return (i = s.webkitGetAsEntry) == null ? void 0 : i.call(s);
|
|
159
|
+
}).filter((s) => !!s);
|
|
160
|
+
if (!r.length) return Array.from(t.files ?? []);
|
|
161
|
+
const n = [], o = async (s, i) => {
|
|
162
|
+
if (s.isFile) {
|
|
163
|
+
const c = await M(s);
|
|
164
|
+
i && Object.defineProperty(c, "webkitRelativePath", { value: i, configurable: !0 }), n.push(c);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (s.isDirectory) {
|
|
168
|
+
const c = s.createReader(), b = await F(c), w = i ? `${i}/` : "";
|
|
169
|
+
for (const l of b)
|
|
170
|
+
await o(l, `${w}${l.name}`);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
for (const s of r)
|
|
174
|
+
await o(s, s.name);
|
|
175
|
+
return n;
|
|
176
|
+
}, D = (t) => t ? Array.from(t.files ?? []) : [];
|
|
177
|
+
export {
|
|
178
|
+
H as collectDropFiles,
|
|
179
|
+
D as collectPasteFiles,
|
|
180
|
+
C as createThumbUrl,
|
|
181
|
+
L as genUid,
|
|
182
|
+
a as getExtension,
|
|
183
|
+
S as isImageFile,
|
|
184
|
+
$ as isImageItem,
|
|
185
|
+
h as isImageMime,
|
|
186
|
+
W as isPromiseLike,
|
|
187
|
+
P as matchAccept,
|
|
188
|
+
A as normalizeFile,
|
|
189
|
+
q as normalizeFileList,
|
|
190
|
+
d as normalizeMime,
|
|
191
|
+
z as normalizePromiseResponse,
|
|
192
|
+
T as resolveAbortHandle,
|
|
193
|
+
N as revokeThumbUrl,
|
|
194
|
+
B as uploadRequest
|
|
195
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { h as t, createVNode as o } from "vue";
|
|
2
|
+
import { generateIcon as l } from "../icon.js";
|
|
3
|
+
const r = l("UploadCloud", t(o("svg", {
|
|
4
|
+
viewBox: "0 0 48 48",
|
|
5
|
+
fill: "none",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-width": "4",
|
|
9
|
+
"stroke-linecap": "butt",
|
|
10
|
+
"stroke-linejoin": "miter"
|
|
11
|
+
}, [o("path", {
|
|
12
|
+
d: "M32 34h4a7 7 0 0 0 1.2-13.9A9 9 0 0 0 20.7 17 7 7 0 0 0 12 34h4"
|
|
13
|
+
}, null), o("path", {
|
|
14
|
+
d: "M24 40V22"
|
|
15
|
+
}, null), o("path", {
|
|
16
|
+
d: "m17 29 7-7 7 7"
|
|
17
|
+
}, null)]))), a = l("UploadFile", t(o("svg", {
|
|
18
|
+
viewBox: "0 0 48 48",
|
|
19
|
+
fill: "none",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
"stroke-width": "4",
|
|
23
|
+
"stroke-linecap": "butt",
|
|
24
|
+
"stroke-linejoin": "miter"
|
|
25
|
+
}, [o("path", {
|
|
26
|
+
d: "M28 6H16a4 4 0 0 0-4 4v28a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V14Z"
|
|
27
|
+
}, null), o("path", {
|
|
28
|
+
d: "M28 6v8h8"
|
|
29
|
+
}, null)]))), s = l("UploadImage", t(o("svg", {
|
|
30
|
+
viewBox: "0 0 48 48",
|
|
31
|
+
fill: "none",
|
|
32
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
33
|
+
stroke: "currentColor",
|
|
34
|
+
"stroke-width": "4",
|
|
35
|
+
"stroke-linecap": "butt",
|
|
36
|
+
"stroke-linejoin": "miter"
|
|
37
|
+
}, [o("rect", {
|
|
38
|
+
x: "7",
|
|
39
|
+
y: "9",
|
|
40
|
+
width: "34",
|
|
41
|
+
height: "30",
|
|
42
|
+
rx: "4"
|
|
43
|
+
}, null), o("circle", {
|
|
44
|
+
cx: "17.5",
|
|
45
|
+
cy: "19.5",
|
|
46
|
+
r: "3.5"
|
|
47
|
+
}, null), o("path", {
|
|
48
|
+
d: "m12 35 9-9 6 6 4-4 6 6"
|
|
49
|
+
}, null)]))), i = l("UploadTrash", t(o("svg", {
|
|
50
|
+
viewBox: "0 0 48 48",
|
|
51
|
+
fill: "none",
|
|
52
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
53
|
+
stroke: "currentColor",
|
|
54
|
+
"stroke-width": "4",
|
|
55
|
+
"stroke-linecap": "butt",
|
|
56
|
+
"stroke-linejoin": "miter"
|
|
57
|
+
}, [o("path", {
|
|
58
|
+
d: "M9 14h30"
|
|
59
|
+
}, null), o("path", {
|
|
60
|
+
d: "M20 14V9a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v5"
|
|
61
|
+
}, null), o("path", {
|
|
62
|
+
d: "M13 14v24a4 4 0 0 0 4 4h14a4 4 0 0 0 4-4V14"
|
|
63
|
+
}, null), o("path", {
|
|
64
|
+
d: "M20 22v12M28 22v12"
|
|
65
|
+
}, null)]))), h = l("UploadRefresh", t(o("svg", {
|
|
66
|
+
viewBox: "0 0 48 48",
|
|
67
|
+
fill: "none",
|
|
68
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
"stroke-width": "4",
|
|
71
|
+
"stroke-linecap": "butt",
|
|
72
|
+
"stroke-linejoin": "miter"
|
|
73
|
+
}, [o("path", {
|
|
74
|
+
d: "M41 10v10H31"
|
|
75
|
+
}, null), o("path", {
|
|
76
|
+
d: "M10.8 16A15 15 0 0 1 38.6 13.4L41 20"
|
|
77
|
+
}, null), o("path", {
|
|
78
|
+
d: "M7 38V28h10"
|
|
79
|
+
}, null), o("path", {
|
|
80
|
+
d: "M37.2 32A15 15 0 0 1 9.4 34.6L7 28"
|
|
81
|
+
}, null)]))), p = l("UploadDownload", t(o("svg", {
|
|
82
|
+
viewBox: "0 0 48 48",
|
|
83
|
+
fill: "none",
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
stroke: "currentColor",
|
|
86
|
+
"stroke-width": "4",
|
|
87
|
+
"stroke-linecap": "butt",
|
|
88
|
+
"stroke-linejoin": "miter"
|
|
89
|
+
}, [o("path", {
|
|
90
|
+
d: "M24 8v22"
|
|
91
|
+
}, null), o("path", {
|
|
92
|
+
d: "m15 23 9 9 9-9"
|
|
93
|
+
}, null), o("path", {
|
|
94
|
+
d: "M9 32v4a6 6 0 0 0 6 6h18a6 6 0 0 0 6-6v-4"
|
|
95
|
+
}, null)])));
|
|
96
|
+
export {
|
|
97
|
+
r as IconUploadCloud,
|
|
98
|
+
p as IconUploadDownload,
|
|
99
|
+
a as IconUploadFile,
|
|
100
|
+
s as IconUploadImage,
|
|
101
|
+
h as IconUploadRefresh,
|
|
102
|
+
i as IconUploadTrash
|
|
103
|
+
};
|
package/dist/es/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as r from "./components/index.js";
|
|
|
3
3
|
import { Icon as m } from "./icons/index.js";
|
|
4
4
|
import { setupDirectives as p } from "./directives/index.js";
|
|
5
5
|
import { default as c } from "./components/dialog/use.js";
|
|
6
|
-
import { default as
|
|
6
|
+
import { default as u } from "./components/message/warp.js";
|
|
7
7
|
import { default as g } from "./components/message-box/MessageBox.js";
|
|
8
8
|
import { default as S } from "./components/notification/warp.js";
|
|
9
9
|
import { Dialog as P } from "./components/dialog/index.js";
|
|
@@ -16,7 +16,7 @@ import { LOCALES as E, formatMessage as O, getGlobalLocale as R, setGlobalLocale
|
|
|
16
16
|
import { useDraggable as F } from "./components/draggable/useDraggable.js";
|
|
17
17
|
import { vDraggable as z } from "./components/draggable/directive.js";
|
|
18
18
|
import { Watermark as K } from "./components/watermark/index.js";
|
|
19
|
-
import { default as
|
|
19
|
+
import { default as W } from "./locale/en-US.js";
|
|
20
20
|
import { default as X } from "./locale/zh-CN.js";
|
|
21
21
|
import { Alert as Z } from "./components/alert/index.js";
|
|
22
22
|
import { Button as J, ButtonGroup as V } from "./components/button/index.js";
|
|
@@ -24,7 +24,7 @@ import { Checkbox as oo, CheckboxGroup as eo } from "./components/form-checkbox/
|
|
|
24
24
|
import { Col as to, Grid as mo, GridItem as po, Row as fo } from "./components/grid/index.js";
|
|
25
25
|
import { ColorPicker as no } from "./components/color-picker/index.js";
|
|
26
26
|
import { ConfigProvider as io } from "./components/config-provider/index.js";
|
|
27
|
-
import { DatePicker as co, MonthPicker as
|
|
27
|
+
import { DatePicker as co, MonthPicker as lo, QuarterPicker as uo, RangePicker as go, WeekPicker as Io, YearPicker as So } from "./components/date-picker/index.js";
|
|
28
28
|
import { Draggable as Po } from "./components/draggable/index.js";
|
|
29
29
|
import { Drawer as ko } from "./components/drawer/index.js";
|
|
30
30
|
import { Dropdown as Co, DropdownButton as Do, DropdownGroup as wo, DropdownOption as ho, DropdownSubmenu as yo } from "./components/dropdown/index.js";
|
|
@@ -32,7 +32,7 @@ import { Empty as Mo } from "./components/empty/index.js";
|
|
|
32
32
|
import { Form as No, FormItem as Eo } from "./components/form/index.js";
|
|
33
33
|
import { Heatmap as Ro } from "./components/heatmap/index.js";
|
|
34
34
|
import { Image as Bo, ImagePreview as _o, ImagePreviewAction as Fo, ImagePreviewGroup as jo } from "./components/image/index.js";
|
|
35
|
-
import { Input as Ho, InputGroup as Ko, InputPassword as
|
|
35
|
+
import { Input as Ho, InputGroup as Ko, InputPassword as Uo, InputSearch as Wo } from "./components/form-input/index.js";
|
|
36
36
|
import { InputNumber as Xo } from "./components/form-input-number/index.js";
|
|
37
37
|
import { InputTag as Zo } from "./components/form-input-tag/index.js";
|
|
38
38
|
import { Layout as Jo, LayoutContent as Vo, LayoutFooter as $o, LayoutHeader as oe, LayoutSidebar as ee } from "./components/layout/index.js";
|
|
@@ -40,7 +40,7 @@ import { Link as te } from "./components/link/index.js";
|
|
|
40
40
|
import { Menu as pe, MenuItem as fe, MenuItemGroup as ae, MenuSubMenu as ne } from "./components/menu/index.js";
|
|
41
41
|
import { Network as ie } from "./components/network/index.js";
|
|
42
42
|
import { Pagination as ce } from "./components/pagination/index.js";
|
|
43
|
-
import { Popconfirm as
|
|
43
|
+
import { Popconfirm as ue } from "./components/popconfirm/index.js";
|
|
44
44
|
import { Popover as ge } from "./components/popover/index.js";
|
|
45
45
|
import { Popup as Se } from "./components/popup/index.js";
|
|
46
46
|
import { Progress as Pe } from "./components/progress/index.js";
|
|
@@ -52,7 +52,7 @@ import { Select as ve, SelectDropdown as Ne, SelectOption as Ee, SelectOptionGro
|
|
|
52
52
|
import { Skeleton as Ae, SkeletonLine as Be, SkeletonShape as _e } from "./components/skeleton/index.js";
|
|
53
53
|
import { Slider as je } from "./components/form-slider/index.js";
|
|
54
54
|
import { Space as He } from "./components/space/index.js";
|
|
55
|
-
import { Spin as
|
|
55
|
+
import { Spin as Ue } from "./components/spin/index.js";
|
|
56
56
|
import { Step as Qe, Steps as Xe } from "./components/steps/index.js";
|
|
57
57
|
import { Switch as Ze } from "./components/form-switch/index.js";
|
|
58
58
|
import { TABLE_LOCALE_EN_US as Je, TABLE_LOCALE_ZH_CN as Ve, formatLocaleText as $e } from "./components/table/locale.js";
|
|
@@ -61,7 +61,7 @@ import { Table as mr, TableColumn as pr } from "./components/table/index.js";
|
|
|
61
61
|
import { Tag as ar } from "./components/tag/index.js";
|
|
62
62
|
import { default as xr } from "./components/table/table-tbody.js";
|
|
63
63
|
import { default as sr } from "./components/table/table-td.js";
|
|
64
|
-
import { Textarea as
|
|
64
|
+
import { Textarea as lr } from "./components/form-textarea/index.js";
|
|
65
65
|
import { default as dr } from "./components/table/table-th.js";
|
|
66
66
|
import { default as Ir } from "./components/table/table-thead.js";
|
|
67
67
|
import { TimePicker as Tr } from "./components/time-picker/index.js";
|
|
@@ -72,13 +72,14 @@ import { Tooltip as hr } from "./components/tooltip/index.js";
|
|
|
72
72
|
import { default as Gr } from "./components/table/table-tr.js";
|
|
73
73
|
import { TrendChart as vr } from "./components/trend-chart/index.js";
|
|
74
74
|
import { Trigger as Er } from "./components/trigger/index.js";
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
75
|
+
import { Upload as Rr } from "./components/upload/index.js";
|
|
76
|
+
import { addIcon as Br, hasIcon as _r, registerIcons as Fr, removeIcon as jr } from "./icons/registry.js";
|
|
77
|
+
import { configProviderInjectionKey as Hr } from "./components/config-provider/context.js";
|
|
78
|
+
import { finiconCategories as Ur, finiconIconsMeta as Wr } from "./icons/public/finicon-meta.js";
|
|
79
|
+
import { finiconIconNames as Xr, finiconIcons as Yr, registerFiniconIcons as Zr } from "./icons/public/finicon.js";
|
|
80
|
+
import { formInjectionKey as Jr, formItemInjectionKey as Vr } from "./components/form/context.js";
|
|
81
|
+
import { publicIconNames as ot, registerPublicIcons as et } from "./icons/public/lucide.js";
|
|
82
|
+
import { vWatermark as tt } from "./components/watermark/directive.js";
|
|
82
83
|
const x = {
|
|
83
84
|
install: function(o) {
|
|
84
85
|
p(o), o.use(m), Object.keys(r).forEach((t) => {
|
|
@@ -120,8 +121,8 @@ export {
|
|
|
120
121
|
Ho as Input,
|
|
121
122
|
Ko as InputGroup,
|
|
122
123
|
Xo as InputNumber,
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
Uo as InputPassword,
|
|
125
|
+
Wo as InputSearch,
|
|
125
126
|
Zo as InputTag,
|
|
126
127
|
E as LOCALES,
|
|
127
128
|
Jo as Layout,
|
|
@@ -134,19 +135,19 @@ export {
|
|
|
134
135
|
fe as MenuItem,
|
|
135
136
|
ae as MenuItemGroup,
|
|
136
137
|
ne as MenuSubMenu,
|
|
137
|
-
|
|
138
|
+
u as Message,
|
|
138
139
|
g as MessageBox,
|
|
139
140
|
k as MessageComponent,
|
|
140
|
-
|
|
141
|
+
lo as MonthPicker,
|
|
141
142
|
ie as Network,
|
|
142
143
|
S as Notification,
|
|
143
144
|
C as NotificationComponent,
|
|
144
145
|
ce as Pagination,
|
|
145
|
-
|
|
146
|
+
ue as Popconfirm,
|
|
146
147
|
ge as Popover,
|
|
147
148
|
Se as Popup,
|
|
148
149
|
Pe as Progress,
|
|
149
|
-
|
|
150
|
+
uo as QuarterPicker,
|
|
150
151
|
ke as Radio,
|
|
151
152
|
Le as RadioGroup,
|
|
152
153
|
go as RangePicker,
|
|
@@ -163,7 +164,7 @@ export {
|
|
|
163
164
|
_e as SkeletonShape,
|
|
164
165
|
je as Slider,
|
|
165
166
|
He as Space,
|
|
166
|
-
|
|
167
|
+
Ue as Spin,
|
|
167
168
|
Qe as Step,
|
|
168
169
|
Xe as Steps,
|
|
169
170
|
Ze as Switch,
|
|
@@ -176,7 +177,7 @@ export {
|
|
|
176
177
|
ar as Tag,
|
|
177
178
|
xr as Tbody,
|
|
178
179
|
sr as Td,
|
|
179
|
-
|
|
180
|
+
lr as Textarea,
|
|
180
181
|
dr as Th,
|
|
181
182
|
Ir as Thead,
|
|
182
183
|
Tr as TimePicker,
|
|
@@ -187,36 +188,37 @@ export {
|
|
|
187
188
|
Gr as Tr,
|
|
188
189
|
vr as TrendChart,
|
|
189
190
|
Er as Trigger,
|
|
191
|
+
Rr as Upload,
|
|
190
192
|
K as Watermark,
|
|
191
193
|
Io as WeekPicker,
|
|
192
194
|
So as YearPicker,
|
|
193
|
-
|
|
195
|
+
Br as addIcon,
|
|
194
196
|
M as applyThemeColor,
|
|
195
|
-
|
|
197
|
+
Hr as configProviderInjectionKey,
|
|
196
198
|
x as default,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
W as enUS,
|
|
200
|
+
Ur as finiconCategories,
|
|
201
|
+
Xr as finiconIconNames,
|
|
202
|
+
Yr as finiconIcons,
|
|
203
|
+
Wr as finiconIconsMeta,
|
|
204
|
+
Jr as formInjectionKey,
|
|
205
|
+
Vr as formItemInjectionKey,
|
|
204
206
|
$e as formatLocaleText,
|
|
205
207
|
O as formatMessage,
|
|
206
208
|
v as generatePalette,
|
|
207
209
|
R as getGlobalLocale,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
_r as hasIcon,
|
|
211
|
+
ot as publicIconNames,
|
|
212
|
+
Zr as registerFiniconIcons,
|
|
213
|
+
Fr as registerIcons,
|
|
214
|
+
et as registerPublicIcons,
|
|
215
|
+
jr as removeIcon,
|
|
214
216
|
A as setGlobalLocale,
|
|
215
217
|
F as useDraggable,
|
|
216
218
|
y as useFormItem,
|
|
217
219
|
B as useLocale,
|
|
218
220
|
w as useResizeObserver,
|
|
219
221
|
z as vDraggable,
|
|
220
|
-
|
|
222
|
+
tt as vWatermark,
|
|
221
223
|
X as zhCN
|
|
222
224
|
};
|
package/dist/es/locale/en-US.js
CHANGED
|
@@ -79,6 +79,9 @@ const e = {
|
|
|
79
79
|
zoomIn: "Zoom in",
|
|
80
80
|
zoomOut: "Zoom out",
|
|
81
81
|
originalSize: "Original size",
|
|
82
|
+
openLabel: "Preview image",
|
|
83
|
+
loadError: "Image could not be loaded",
|
|
84
|
+
loading: "Loading image",
|
|
82
85
|
previewLabel: "Image {index} of {total}",
|
|
83
86
|
closeLabel: "Close preview",
|
|
84
87
|
prevLabel: "Previous image",
|
|
@@ -101,6 +104,25 @@ const e = {
|
|
|
101
104
|
message: {
|
|
102
105
|
closeLabel: "Close{id} message"
|
|
103
106
|
},
|
|
107
|
+
upload: {
|
|
108
|
+
trigger: "Select files",
|
|
109
|
+
buttonText: "Select files",
|
|
110
|
+
drag: "Click or drag files here to upload",
|
|
111
|
+
dragHover: "Release to start uploading",
|
|
112
|
+
start: "Start upload",
|
|
113
|
+
retry: "Retry upload",
|
|
114
|
+
cancel: "Cancel upload",
|
|
115
|
+
remove: "Remove file",
|
|
116
|
+
preview: "Preview file",
|
|
117
|
+
download: "Download file",
|
|
118
|
+
error: "Upload failed",
|
|
119
|
+
empty: "No files",
|
|
120
|
+
fileAdded: "{name} added to the list",
|
|
121
|
+
fileRemoved: "{name} removed",
|
|
122
|
+
fileUploaded: "{name} uploaded",
|
|
123
|
+
fileFailed: "{name} failed to upload",
|
|
124
|
+
exceed: "{count} file(s) exceed the limit"
|
|
125
|
+
},
|
|
104
126
|
datePicker: {
|
|
105
127
|
prevPage: "Previous page",
|
|
106
128
|
prevItem: "Previous",
|
package/dist/es/locale/zh-CN.js
CHANGED
|
@@ -79,6 +79,9 @@ const e = {
|
|
|
79
79
|
zoomIn: "放大",
|
|
80
80
|
zoomOut: "缩小",
|
|
81
81
|
originalSize: "原始尺寸",
|
|
82
|
+
openLabel: "预览图片",
|
|
83
|
+
loadError: "图片暂时无法加载",
|
|
84
|
+
loading: "图片加载中",
|
|
82
85
|
previewLabel: "第 {index} 张,共 {total} 张",
|
|
83
86
|
closeLabel: "关闭预览",
|
|
84
87
|
prevLabel: "上一张图片",
|
|
@@ -101,6 +104,25 @@ const e = {
|
|
|
101
104
|
message: {
|
|
102
105
|
closeLabel: "关闭{id}提示"
|
|
103
106
|
},
|
|
107
|
+
upload: {
|
|
108
|
+
trigger: "选择文件",
|
|
109
|
+
buttonText: "选择文件",
|
|
110
|
+
drag: "点击或拖拽文件到此处上传",
|
|
111
|
+
dragHover: "松开鼠标开始上传",
|
|
112
|
+
start: "开始上传",
|
|
113
|
+
retry: "重新上传",
|
|
114
|
+
cancel: "取消上传",
|
|
115
|
+
remove: "移除文件",
|
|
116
|
+
preview: "预览文件",
|
|
117
|
+
download: "下载文件",
|
|
118
|
+
error: "上传失败",
|
|
119
|
+
empty: "暂无文件",
|
|
120
|
+
fileAdded: "{name} 已加入列表",
|
|
121
|
+
fileRemoved: "{name} 已移除",
|
|
122
|
+
fileUploaded: "{name} 上传成功",
|
|
123
|
+
fileFailed: "{name} 上传失败",
|
|
124
|
+
exceed: "{count} 个文件超出数量限制"
|
|
125
|
+
},
|
|
104
126
|
datePicker: {
|
|
105
127
|
prevPage: "上一页",
|
|
106
128
|
prevItem: "上一项",
|