@dsh-plugin/dsh-ui-components-vue 0.0.0-stage → 0.1.0-dev.44009856440
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/LICENSE +21 -0
- package/NOTICE +57 -0
- package/README.md +66 -2
- package/README.zh_CN.md +67 -0
- package/dist/icons.js +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +2682 -0
- package/dist/style.css +1 -0
- package/dist/vue/arco.d.ts +8 -0
- package/dist/vue/basic.d.ts +3629 -0
- package/dist/vue/button.d.ts +78 -0
- package/dist/vue/color-model.d.ts +2 -0
- package/dist/vue/color.d.ts +3 -0
- package/dist/vue/components.d.ts +48 -0
- package/dist/vue/date-input.d.ts +35 -0
- package/dist/vue/icons.d.ts +2 -0
- package/dist/vue/overlays.d.ts +33 -0
- package/dist/vue/picker-model.d.ts +37 -0
- package/dist/vue/picker.d.ts +1290 -0
- package/dist/vue/popup.d.ts +28 -0
- package/dist/vue/primitives.d.ts +288 -0
- package/dist/vue/progress.d.ts +104 -0
- package/dist/vue/provider.d.ts +90 -0
- package/dist/vue/selection-model.d.ts +22 -0
- package/dist/vue/selection.d.ts +186 -0
- package/dist/vue/toast-layout.d.ts +2 -0
- package/docs/vue-coverage.md +75 -0
- package/licenses/HeroUI-Apache-2.0.txt +199 -0
- package/package.json +74 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,2682 @@
|
|
|
1
|
+
import * as N from "@arco-design/web-vue";
|
|
2
|
+
import Vt, { Progress as Ie, InputTag as Ue, Alert as Ke, Result as Ze, Spin as Oe, InputNumber as Ge, Tag as Qe, Tree as Je, ConfigProvider as Xe, Collapse as Ot, Button as Yt, Drawer as Lt, Modal as It, Scrollbar as ot, Input as Bt } from "@arco-design/web-vue";
|
|
3
|
+
export * from "@arco-design/web-vue";
|
|
4
|
+
import { CollapseItem as pn, Breadcrumb as gn, CollapseItem as bn, Collapse as yn, Empty as wn, Divider as Dn, TypographyText as Sn, Textarea as kn } from "@arco-design/web-vue";
|
|
5
|
+
import { defineComponent as F, inject as ye, h as m, shallowRef as j, useId as we, onMounted as fe, onUpdated as De, mergeProps as Ne, ref as q, computed as G, shallowReactive as be, provide as lt, watch as le, onBeforeUnmount as Se, Teleport as it, nextTick as ne, createTextVNode as Et, Fragment as Nt, cloneVNode as Be, isVNode as st, onBeforeUpdate as Ft, getCurrentInstance as ut } from "vue";
|
|
6
|
+
import { configProviderInjectionKey as Fe } from "@arco-design/web-vue/es/config-provider/context.js";
|
|
7
|
+
function Ht(e, t) {
|
|
8
|
+
for (var a = 0; a < t.length; a++) {
|
|
9
|
+
const i = t[a];
|
|
10
|
+
if (typeof i != "string" && !Array.isArray(i)) {
|
|
11
|
+
for (const n in i)
|
|
12
|
+
if (n !== "default" && !(n in e)) {
|
|
13
|
+
const r = Object.getOwnPropertyDescriptor(i, n);
|
|
14
|
+
r && Object.defineProperty(e, n, r.get ? r : {
|
|
15
|
+
enumerable: !0,
|
|
16
|
+
get: () => i[n]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
22
|
+
}
|
|
23
|
+
const Rt = F({
|
|
24
|
+
name: "DshProgress",
|
|
25
|
+
inheritAttrs: !1,
|
|
26
|
+
props: Ie.props,
|
|
27
|
+
setup(e, { attrs: t, slots: a }) {
|
|
28
|
+
const i = e, n = ye(Fe, void 0), r = () => i.type === "circle" && i.showText === !1 && !a.text && !i.steps && i.width === void 0 && ((i.size ?? (n == null ? void 0 : n.size)) === void 0 || (i.size ?? (n == null ? void 0 : n.size)) === "medium");
|
|
29
|
+
return () => m(Ie, {
|
|
30
|
+
...t,
|
|
31
|
+
...e,
|
|
32
|
+
class: [t.class, { "dsh-hero-progress-circle": r(), "dsh-hero-progress-circle-default-stroke": r() && i.strokeWidth === void 0 }],
|
|
33
|
+
width: r() ? 36 : i.width,
|
|
34
|
+
strokeWidth: i.strokeWidth ?? (i.type === "line" && !i.steps ? 8 : void 0)
|
|
35
|
+
}, a);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
function re(e, t) {
|
|
39
|
+
return Object.assign(e, {
|
|
40
|
+
install(a, i) {
|
|
41
|
+
function n(r, o) {
|
|
42
|
+
return o === void 0 ? a.component(r) : a.component(r, o === t ? e : o);
|
|
43
|
+
}
|
|
44
|
+
t.install({ ...a, component: n }, i);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const qt = re(Rt, Ie), jt = re(F({
|
|
49
|
+
name: "DshInputTag",
|
|
50
|
+
inheritAttrs: !1,
|
|
51
|
+
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
52
|
+
const n = j();
|
|
53
|
+
return i(new Proxy({}, {
|
|
54
|
+
get: (r, o) => {
|
|
55
|
+
var s;
|
|
56
|
+
return (s = n.value) == null ? void 0 : s[o];
|
|
57
|
+
},
|
|
58
|
+
has: (r, o) => n.value !== void 0 && o in n.value
|
|
59
|
+
})), () => m(Ue, { ...t, ref: n, class: ["dsh-hero-input-tag", t.class] }, a);
|
|
60
|
+
}
|
|
61
|
+
}), Ue), de = {
|
|
62
|
+
info: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",
|
|
63
|
+
success: "M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",
|
|
64
|
+
warning: "M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",
|
|
65
|
+
error: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z"
|
|
66
|
+
}, Wt = re(F({
|
|
67
|
+
name: "DshAlert",
|
|
68
|
+
inheritAttrs: !1,
|
|
69
|
+
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
70
|
+
const n = j();
|
|
71
|
+
return i(new Proxy({}, {
|
|
72
|
+
get: (r, o) => {
|
|
73
|
+
var s;
|
|
74
|
+
return (s = n.value) == null ? void 0 : s[o];
|
|
75
|
+
},
|
|
76
|
+
has: (r, o) => n.value !== void 0 && o in n.value
|
|
77
|
+
})), () => {
|
|
78
|
+
const r = t.type ?? "info", o = typeof r == "string" && r in de ? de[r] : void 0;
|
|
79
|
+
return m(Ke, { ...t, ref: n }, {
|
|
80
|
+
...a,
|
|
81
|
+
...o && !a.icon ? { icon: () => m("svg", { "aria-hidden": !0, fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg" }, [
|
|
82
|
+
m("path", { "clip-rule": "evenodd", d: o, fill: "currentColor", "fill-rule": "evenodd" })
|
|
83
|
+
]) } : {}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}), Ke), zt = re(F({
|
|
88
|
+
name: "DshResult",
|
|
89
|
+
inheritAttrs: !1,
|
|
90
|
+
setup(e, { attrs: t, slots: a }) {
|
|
91
|
+
return () => {
|
|
92
|
+
const i = t.status === void 0 ? "info" : t.status, n = typeof i == "string" && i in de ? de[i] : void 0;
|
|
93
|
+
return m(Ze, t, {
|
|
94
|
+
...a,
|
|
95
|
+
...n && !a.icon ? { icon: () => m("svg", { class: "dsh-result-icon", "aria-hidden": !0, fill: "none", viewBox: "0 0 16 16" }, [m("path", { d: n, fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })]) } : {}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}), Ze), He = re(F({
|
|
100
|
+
name: "DshSpin",
|
|
101
|
+
inheritAttrs: !1,
|
|
102
|
+
props: Oe.props,
|
|
103
|
+
setup(e, { attrs: t, slots: a }) {
|
|
104
|
+
const i = we(), n = ye(Fe, void 0), r = e, o = () => m("svg", { class: "dsh-spinner-icon", viewBox: "0 0 24 24", "aria-hidden": !0, style: r.size ? { width: `${r.size}px`, height: `${r.size}px` } : void 0 }, [
|
|
105
|
+
m("defs", {}, [
|
|
106
|
+
m("linearGradient", { id: `${i}-1`, x1: "50%", x2: "50%", y1: "5.271%", y2: "91.793%" }, [m("stop", { offset: "0%", "stop-color": "currentColor" }), m("stop", { offset: "100%", "stop-color": "currentColor", "stop-opacity": 0.55 })]),
|
|
107
|
+
m("linearGradient", { id: `${i}-2`, x1: "50%", x2: "50%", y1: "15.24%", y2: "87.15%" }, [m("stop", { offset: "0%", "stop-color": "currentColor", "stop-opacity": 0 }), m("stop", { offset: "100%", "stop-color": "currentColor", "stop-opacity": 0.55 })])
|
|
108
|
+
]),
|
|
109
|
+
m("path", { d: "M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021", fill: `url(#${i}-1)`, transform: "translate(1.5 1.625)" }),
|
|
110
|
+
m("path", { d: "M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118", fill: `url(#${i}-2)`, transform: "translate(1.5 1.625)" })
|
|
111
|
+
]);
|
|
112
|
+
return () => m(Oe, { ...e, ...t }, r.dot || a.icon || a.element || n != null && n.slots.loading ? a : { ...a, element: o });
|
|
113
|
+
}
|
|
114
|
+
}), Oe), Ut = re(F({
|
|
115
|
+
name: "DshInputNumber",
|
|
116
|
+
inheritAttrs: !1,
|
|
117
|
+
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
118
|
+
const n = j();
|
|
119
|
+
i(new Proxy({}, {
|
|
120
|
+
get: (o, s) => {
|
|
121
|
+
var f;
|
|
122
|
+
return (f = n.value) == null ? void 0 : f[s];
|
|
123
|
+
},
|
|
124
|
+
has: (o, s) => n.value !== void 0 && s in n.value
|
|
125
|
+
}));
|
|
126
|
+
const r = () => {
|
|
127
|
+
var s;
|
|
128
|
+
const o = (s = n.value) == null ? void 0 : s.$el;
|
|
129
|
+
if (!(!(o instanceof HTMLElement) || !o.classList.contains("arco-input-number-mode-button")))
|
|
130
|
+
for (const f of o.querySelectorAll(".arco-input-number-step-button :is(.arco-icon-minus,.arco-icon-plus)")) {
|
|
131
|
+
const p = f.querySelector("path");
|
|
132
|
+
p && (f.setAttribute("viewBox", "0 0 16 16"), f.setAttribute("stroke", "none"), p.setAttribute("fill", "currentColor"), p.setAttribute("fill-rule", "evenodd"), p.setAttribute("clip-rule", "evenodd"), p.setAttribute("d", f.classList.contains("arco-icon-minus") ? "M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8" : "M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75"));
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
return fe(r), De(r), () => m(Ge, { ...t, ref: n }, a);
|
|
136
|
+
}
|
|
137
|
+
}), Ge), Kt = re(F({
|
|
138
|
+
name: "DshTag",
|
|
139
|
+
inheritAttrs: !1,
|
|
140
|
+
setup(e, { attrs: t, slots: a }) {
|
|
141
|
+
const i = j(), n = () => {
|
|
142
|
+
var s;
|
|
143
|
+
const r = (s = i.value) == null ? void 0 : s.$el;
|
|
144
|
+
if (!(r instanceof HTMLElement))
|
|
145
|
+
return;
|
|
146
|
+
const o = r.querySelector(".arco-tag-close-btn");
|
|
147
|
+
o && !o.hasAttribute("tabindex") && (o.tabIndex = 0);
|
|
148
|
+
};
|
|
149
|
+
return fe(n), De(n), () => m(Qe, Ne(t, { ref: i, onKeydown: (r) => {
|
|
150
|
+
r.defaultPrevented || !["Enter", " "].includes(r.key) || !(r.target instanceof HTMLElement) || !r.target.classList.contains("arco-tag-close-btn") || (r.preventDefault(), r.target.click());
|
|
151
|
+
} }), {
|
|
152
|
+
...a,
|
|
153
|
+
"close-icon": a["close-icon"] ?? (() => m("svg", { class: "dsh-tag-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, [m("path", { d: "M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z", fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })]))
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}), Qe), Zt = re(F({
|
|
157
|
+
name: "DshTree",
|
|
158
|
+
inheritAttrs: !1,
|
|
159
|
+
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
160
|
+
const n = j();
|
|
161
|
+
return i(new Proxy({}, {
|
|
162
|
+
get: (r, o) => {
|
|
163
|
+
var s;
|
|
164
|
+
return (s = n.value) == null ? void 0 : s[o];
|
|
165
|
+
},
|
|
166
|
+
has: (r, o) => n.value !== void 0 && o in n.value
|
|
167
|
+
})), () => m(Je, { ...t, ref: n }, { ...a, extra: (r) => {
|
|
168
|
+
var o;
|
|
169
|
+
return [
|
|
170
|
+
...((o = a.extra) == null ? void 0 : o.call(a, r)) ?? [],
|
|
171
|
+
m("svg", { class: "dsh-tree-half-indicator", style: { display: "none" }, "aria-hidden": !0, viewBox: "0 0 24 24", width: 12, height: 12, fill: "none", stroke: "currentColor", "stroke-width": 3, "stroke-linecap": "round" }, [m("line", { x1: 21, x2: 3, y1: 12, y2: 12 })])
|
|
172
|
+
];
|
|
173
|
+
} });
|
|
174
|
+
}
|
|
175
|
+
}), Je), Ye = /* @__PURE__ */ new WeakMap();
|
|
176
|
+
function Gt(e) {
|
|
177
|
+
let t = Ye.get(e);
|
|
178
|
+
t || (t = { users: 0, stop: Qt(e) }, Ye.set(e, t));
|
|
179
|
+
const a = t;
|
|
180
|
+
return a.users++, () => {
|
|
181
|
+
a.users--, a.users === 0 && (a.stop(), Ye.delete(e));
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function Qt(e) {
|
|
185
|
+
const t = ".dsh-toast-region,.arco-message-wrapper,.arco-notification-wrapper", a = ".dsh-toast,.arco-message,.arco-notification", i = /* @__PURE__ */ new Set();
|
|
186
|
+
let n = 0;
|
|
187
|
+
const r = () => {
|
|
188
|
+
n || (n = requestAnimationFrame(f));
|
|
189
|
+
}, o = new ResizeObserver(r), s = (l, M, y) => {
|
|
190
|
+
l.style.getPropertyValue(M) !== y && l.style.setProperty(M, y);
|
|
191
|
+
}, f = () => {
|
|
192
|
+
var M;
|
|
193
|
+
n = 0;
|
|
194
|
+
const l = /* @__PURE__ */ new Set();
|
|
195
|
+
for (const y of e.querySelectorAll(t)) {
|
|
196
|
+
const P = Array.from(y.querySelectorAll(a)).reverse(), u = P.filter((Y) => {
|
|
197
|
+
var L;
|
|
198
|
+
return Y.style.opacity !== "0" && !((L = Y.parentElement) != null && L.className.includes("-exit"));
|
|
199
|
+
}), h = u.length > 1 && (y.matches(":hover") || y.contains(document.activeElement));
|
|
200
|
+
y.dataset.dshToastStack = String(u.length), y.dataset.dshToastDirection = y.className.includes("bottom") || (M = y.dataset.position) != null && M.startsWith("bottom") ? "bottom" : "top";
|
|
201
|
+
let O = 0, A = 0;
|
|
202
|
+
for (const [Y, L] of u.entries()) {
|
|
203
|
+
const $ = getComputedStyle(L), c = Array.from(L.children).filter((x) => !x.className.toString().includes("close")), w = L.style.height ? parseFloat($.height) : Math.max(0, ...c.map((x) => x.offsetHeight)) + parseFloat($.paddingTop) + parseFloat($.paddingBottom) + parseFloat($.borderTopWidth) + parseFloat($.borderBottomWidth);
|
|
204
|
+
Y === 0 && (A = w), s(L, "--dsh-toast-index", String(Y)), s(L, "--dsh-toast-offset", `${O}px`), s(L, "--dsh-toast-height", `${w}px`), s(L, "--dsh-toast-front-height", `${A}px`), s(L, "--dsh-toast-layer", String(u.length - Y)), L.dataset.dshToastIndex = String(Y), L.toggleAttribute("inert", Y >= 3), L.setAttribute("aria-hidden", String(Y >= 3));
|
|
205
|
+
const v = L.querySelector(":scope > .arco-message-close-btn,:scope > .arco-notification-close-btn");
|
|
206
|
+
v && (v.setAttribute("role", "button"), v.setAttribute("aria-label", "关闭通知"), v.tabIndex = Y < 3 && (Y === 0 || h) ? 0 : -1);
|
|
207
|
+
const T = L.matches(".dsh-toast") ? L : L.parentElement;
|
|
208
|
+
T && (T.dataset.dshToastItem = "");
|
|
209
|
+
for (const x of c)
|
|
210
|
+
l.add(x), i.has(x) || o.observe(x);
|
|
211
|
+
O += w + 12;
|
|
212
|
+
}
|
|
213
|
+
for (const Y of P.filter((L) => !u.includes(L)))
|
|
214
|
+
Y.dataset.dshToastIndex = "exiting";
|
|
215
|
+
s(y, "--dsh-toast-front-height", `${A}px`);
|
|
216
|
+
}
|
|
217
|
+
for (const y of i)
|
|
218
|
+
l.has(y) || o.unobserve(y);
|
|
219
|
+
i.clear(), l.forEach((y) => i.add(y));
|
|
220
|
+
}, p = new MutationObserver(r);
|
|
221
|
+
p.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] });
|
|
222
|
+
const d = (l) => {
|
|
223
|
+
const M = l.target;
|
|
224
|
+
!l.defaultPrevented && M instanceof HTMLElement && M.matches(".arco-message-close-btn,.arco-notification-close-btn") && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), M.click());
|
|
225
|
+
}, k = ["pointerover", "pointerout", "focusin", "focusout"];
|
|
226
|
+
return k.forEach((l) => e.addEventListener(l, r)), e.addEventListener("keydown", d), f(), () => {
|
|
227
|
+
p.disconnect(), o.disconnect(), cancelAnimationFrame(n), k.forEach((l) => e.removeEventListener(l, r)), e.removeEventListener("keydown", d);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
const Re = Symbol("dsh-theme");
|
|
231
|
+
function se() {
|
|
232
|
+
const e = ye(Re);
|
|
233
|
+
if (!e)
|
|
234
|
+
throw new Error("DSH 浮层组件必须在 DshProvider 内使用");
|
|
235
|
+
return e;
|
|
236
|
+
}
|
|
237
|
+
function Jt(e) {
|
|
238
|
+
lt(Re, { ...se(), container: e });
|
|
239
|
+
}
|
|
240
|
+
const Ea = F({
|
|
241
|
+
name: "DshProvider",
|
|
242
|
+
inheritAttrs: !1,
|
|
243
|
+
props: {
|
|
244
|
+
theme: { type: String, default: "auto" },
|
|
245
|
+
radius: { type: String, default: "md" },
|
|
246
|
+
reducedMotion: { type: Boolean, default: void 0 },
|
|
247
|
+
locale: Xe.props.locale,
|
|
248
|
+
rtl: Boolean
|
|
249
|
+
},
|
|
250
|
+
setup(e, { attrs: t, slots: a }) {
|
|
251
|
+
const i = j(), n = j(), r = q("light"), o = q(!1), s = q(!1), f = G(() => e.theme === "auto" ? r.value : e.theme), p = G(() => e.reducedMotion ?? s.value ? "reduced" : "full"), d = be([]), k = be([]), l = /* @__PURE__ */ new Map();
|
|
252
|
+
let M = 0, y = !1, P;
|
|
253
|
+
const u = (c) => {
|
|
254
|
+
var v;
|
|
255
|
+
clearTimeout(l.get(c)), l.delete(c);
|
|
256
|
+
const w = d.findIndex((T) => T.internalId === c);
|
|
257
|
+
if (w >= 0) {
|
|
258
|
+
const T = d.splice(w, 1)[0];
|
|
259
|
+
(v = T == null ? void 0 : T.onClose) == null || v.call(T, T.id ?? c);
|
|
260
|
+
}
|
|
261
|
+
}, h = (c) => {
|
|
262
|
+
if (clearTimeout(l.get(c.internalId)), !n.value)
|
|
263
|
+
return;
|
|
264
|
+
const w = c.duration ?? 4e3;
|
|
265
|
+
w > 0 && l.set(c.internalId, setTimeout(() => u(c.internalId), w));
|
|
266
|
+
}, O = (c) => {
|
|
267
|
+
if (y)
|
|
268
|
+
throw new Error("DshProvider 已卸载,无法显示消息");
|
|
269
|
+
const w = typeof c == "string" ? { content: c } : c, v = w.id === void 0 ? void 0 : d.find((x) => x.id === w.id && x.kind === w.kind);
|
|
270
|
+
if (v) {
|
|
271
|
+
const x = { ...v, ...w };
|
|
272
|
+
return d[d.indexOf(v)] = x, h(x), { close: () => u(v.internalId) };
|
|
273
|
+
}
|
|
274
|
+
const T = { ...w, internalId: ++M };
|
|
275
|
+
return d.push(T), h(T), { close: () => u(T.internalId) };
|
|
276
|
+
}, A = (c) => (w) => O({ ...typeof w == "string" ? { content: w } : w, type: c }), Y = {
|
|
277
|
+
show: O,
|
|
278
|
+
info: A("info"),
|
|
279
|
+
success: A("success"),
|
|
280
|
+
warning: A("warning"),
|
|
281
|
+
error: A("error"),
|
|
282
|
+
clear: (c, w) => [...d].filter(
|
|
283
|
+
(v) => (c === void 0 || (v.position ?? "top") === c) && (w === void 0 || v.kind === w)
|
|
284
|
+
).forEach((v) => u(v.internalId)),
|
|
285
|
+
remove: (c, w) => [...d].filter((v) => v.id === c && (w === void 0 || v.kind === w)).forEach((v) => u(v.internalId))
|
|
286
|
+
};
|
|
287
|
+
lt(Re, { container: n, toast: Y, mountOverlay: (c) => {
|
|
288
|
+
if (y)
|
|
289
|
+
throw new Error("DshProvider 已卸载,无法打开浮层");
|
|
290
|
+
const w = { id: ++M, content: c };
|
|
291
|
+
return k.push(w), () => {
|
|
292
|
+
const v = k.indexOf(w);
|
|
293
|
+
v >= 0 && k.splice(v, 1);
|
|
294
|
+
};
|
|
295
|
+
}, locale: G(() => {
|
|
296
|
+
var c;
|
|
297
|
+
return ((c = e.locale) == null ? void 0 : c.locale) ?? "zh-CN";
|
|
298
|
+
}) });
|
|
299
|
+
const $ = () => {
|
|
300
|
+
const c = n.value;
|
|
301
|
+
if (!c || !i.value)
|
|
302
|
+
return;
|
|
303
|
+
c.className = "dsh-ui dsh-ui-portal", c.dataset.theme = f.value, c.dataset.radius = e.radius, c.dataset.motion = p.value, c.dataset.hostTheme = String(e.theme === "auto" && o.value), c.dir = e.rtl ? "rtl" : "ltr", c.removeAttribute("style");
|
|
304
|
+
const w = getComputedStyle(i.value);
|
|
305
|
+
for (let v = 0; v < w.length; v++) {
|
|
306
|
+
const T = w.item(v);
|
|
307
|
+
T.startsWith("--") && c.style.setProperty(T, w.getPropertyValue(T));
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
return fe(() => {
|
|
311
|
+
const c = document.createElement("div");
|
|
312
|
+
c.className = "dsh-ui dsh-ui-portal", document.body.appendChild(c), n.value = c;
|
|
313
|
+
const w = Gt(c);
|
|
314
|
+
d.forEach(h);
|
|
315
|
+
const v = window.matchMedia("(prefers-color-scheme: dark)"), T = window.matchMedia("(prefers-reduced-motion: reduce)"), x = () => {
|
|
316
|
+
const V = document.body.getAttribute("data-ds-dark-theme"), C = document.body.getAttribute("arco-theme");
|
|
317
|
+
o.value = V !== null, r.value = V !== null ? V === "false" || V === "0" ? "light" : "dark" : C !== null ? C === "dark" ? "dark" : "light" : v.matches ? "dark" : "light", s.value = T.matches, ne($);
|
|
318
|
+
}, _ = new MutationObserver(x);
|
|
319
|
+
_.observe(document.body, { attributes: !0, attributeFilter: ["data-ds-dark-theme", "arco-theme", "style", "class"] }), v.addEventListener("change", x), T.addEventListener("change", x), P = () => {
|
|
320
|
+
w(), _.disconnect(), v.removeEventListener("change", x), T.removeEventListener("change", x);
|
|
321
|
+
}, x();
|
|
322
|
+
}), le([f, p, () => e.radius, () => e.rtl], $, { flush: "post" }), De($), Se(() => {
|
|
323
|
+
var c;
|
|
324
|
+
y = !0, P == null || P();
|
|
325
|
+
for (const w of l.values())
|
|
326
|
+
clearTimeout(w);
|
|
327
|
+
l.clear(), (c = n.value) == null || c.remove(), n.value = void 0;
|
|
328
|
+
}), () => m(Xe, { locale: e.locale, rtl: e.rtl, updateAtScroll: !0, global: !1 }, {
|
|
329
|
+
default: () => {
|
|
330
|
+
var c;
|
|
331
|
+
return [
|
|
332
|
+
m("div", {
|
|
333
|
+
...t,
|
|
334
|
+
ref: i,
|
|
335
|
+
class: ["dsh-ui", t.class],
|
|
336
|
+
"data-theme": f.value,
|
|
337
|
+
"data-radius": e.radius,
|
|
338
|
+
"data-motion": p.value,
|
|
339
|
+
"data-host-theme": String(e.theme === "auto" && o.value),
|
|
340
|
+
dir: e.rtl ? "rtl" : "ltr"
|
|
341
|
+
}, (c = a.default) == null ? void 0 : c.call(a)),
|
|
342
|
+
...k.map((w) => m("div", { key: w.id, style: { display: "contents" } }, [w.content()])),
|
|
343
|
+
n.value ? m(
|
|
344
|
+
it,
|
|
345
|
+
{ to: n.value },
|
|
346
|
+
["top", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"].map((w) => m("div", {
|
|
347
|
+
class: "dsh-toast-region",
|
|
348
|
+
"data-position": w,
|
|
349
|
+
"aria-label": "通知",
|
|
350
|
+
style: {
|
|
351
|
+
top: w.startsWith("top") ? "16px" : "auto",
|
|
352
|
+
bottom: w.startsWith("bottom") ? "16px" : "auto",
|
|
353
|
+
left: w.endsWith("Left") ? "16px" : w.endsWith("Right") ? "auto" : "50%",
|
|
354
|
+
right: w.endsWith("Right") ? "16px" : "auto",
|
|
355
|
+
transform: w.endsWith("Left") || w.endsWith("Right") ? "none" : "translateX(-50%)"
|
|
356
|
+
}
|
|
357
|
+
}, d.filter((v) => (v.position ?? "top") === w).map(
|
|
358
|
+
(v) => {
|
|
359
|
+
var T;
|
|
360
|
+
return m("div", {
|
|
361
|
+
key: v.internalId,
|
|
362
|
+
class: ["dsh-toast", v.class],
|
|
363
|
+
"data-type": v.type ?? "info",
|
|
364
|
+
style: v.style,
|
|
365
|
+
role: v.type === "error" ? "alert" : "status",
|
|
366
|
+
onMouseenter: () => {
|
|
367
|
+
v.resetOnHover !== !1 && clearTimeout(l.get(v.internalId));
|
|
368
|
+
},
|
|
369
|
+
onMouseleave: () => {
|
|
370
|
+
v.resetOnHover !== !1 && h(v);
|
|
371
|
+
},
|
|
372
|
+
onFocusin: () => clearTimeout(l.get(v.internalId)),
|
|
373
|
+
onFocusout: () => h(v)
|
|
374
|
+
}, [
|
|
375
|
+
v.showIcon ?? v.type !== "normal" ? m("div", { class: "dsh-toast-indicator", "aria-hidden": !0 }, [
|
|
376
|
+
v.icon ? v.icon() : v.type === "loading" ? m(He, { size: 16 }) : m("svg", { class: "dsh-toast-default-icon", viewBox: "0 0 16 16", fill: "none" }, m("path", {
|
|
377
|
+
d: de[v.type && v.type in de ? v.type : "info"],
|
|
378
|
+
fill: "currentColor",
|
|
379
|
+
"fill-rule": "evenodd",
|
|
380
|
+
"clip-rule": "evenodd"
|
|
381
|
+
}))
|
|
382
|
+
]) : null,
|
|
383
|
+
m("div", { class: "dsh-toast-content" }, [
|
|
384
|
+
v.title ? m("div", { class: "dsh-toast-title" }, [typeof v.title == "function" ? v.title() : v.title]) : null,
|
|
385
|
+
m("div", { class: v.title ? "dsh-toast-description" : "dsh-toast-title" }, [typeof v.content == "function" ? v.content() : v.content]),
|
|
386
|
+
(T = v.footer) == null ? void 0 : T.call(v)
|
|
387
|
+
]),
|
|
388
|
+
v.closable !== !1 ? m("button", {
|
|
389
|
+
type: "button",
|
|
390
|
+
class: "dsh-toast-close",
|
|
391
|
+
"aria-label": "关闭通知",
|
|
392
|
+
onClick: () => u(v.internalId)
|
|
393
|
+
}, [v.closeIconElement ?? v.closeIcon ? (v.closeIconElement ?? v.closeIcon)() : m("svg", { class: "dsh-toast-default-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, m("path", {
|
|
394
|
+
d: "M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",
|
|
395
|
+
fill: "currentColor",
|
|
396
|
+
"fill-rule": "evenodd",
|
|
397
|
+
"clip-rule": "evenodd"
|
|
398
|
+
}))]) : null
|
|
399
|
+
]);
|
|
400
|
+
}
|
|
401
|
+
)))
|
|
402
|
+
) : null
|
|
403
|
+
];
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
}), et = /* @__PURE__ */ new Map();
|
|
408
|
+
function W(e, t, a) {
|
|
409
|
+
const i = F({
|
|
410
|
+
name: `Dsh${t}`,
|
|
411
|
+
inheritAttrs: !1,
|
|
412
|
+
setup(r, { attrs: o, slots: s, expose: f }) {
|
|
413
|
+
const { container: p, locale: d } = se(), k = j(o.defaultValue ?? o["default-value"]), l = q(""), M = j(), y = j(), P = q(!!(o.defaultPopupVisible ?? o["default-popup-visible"])), u = j();
|
|
414
|
+
return f(new Proxy({}, {
|
|
415
|
+
get: (h, O) => {
|
|
416
|
+
var A;
|
|
417
|
+
return (A = M.value) == null ? void 0 : A[O];
|
|
418
|
+
},
|
|
419
|
+
has: (h, O) => M.value !== void 0 && O in M.value
|
|
420
|
+
})), () => {
|
|
421
|
+
var x;
|
|
422
|
+
if (!p.value)
|
|
423
|
+
return null;
|
|
424
|
+
const h = { ...o };
|
|
425
|
+
if (t === "Popconfirm")
|
|
426
|
+
for (const [_, V] of [["cancelButtonProps", "cancel-button-props"], ["okButtonProps", "ok-button-props"]])
|
|
427
|
+
h[_] = { size: "small", ...o[_] ?? o[V] ?? {} }, delete h[V];
|
|
428
|
+
if (["Select", "AutoComplete", "Cascader", "TreeSelect", "DatePicker", "RangePicker", "TimePicker", "ColorPicker"].includes(t) && (h.triggerProps = { popupOffset: 8, ...o.triggerProps ?? o["trigger-props"] ?? {} }, delete h["trigger-props"]), ["Tooltip", "Popover", "Dropdown", "Popconfirm"].includes(t)) {
|
|
429
|
+
const _ = o.showArrow ?? o["show-arrow"], V = _ !== void 0 && _ !== !1;
|
|
430
|
+
h.popupOffset = o.popupOffset ?? o["popup-offset"] ?? (t === "Tooltip" ? V ? 7 : 3 : 8), (t === "Tooltip" || t === "Popover" || t === "Popconfirm") && (h.showArrow = V, delete h["show-arrow"]);
|
|
431
|
+
}
|
|
432
|
+
t === "Dsubmenu" && (h.popupOffset = o.popupOffset ?? o["popup-offset"] ?? 7);
|
|
433
|
+
const O = a === "triggerProps" ? "trigger-props" : "preview-props", A = a ? h[a] ?? o[O] : void 0, Y = typeof A == "object" && A !== null ? { ...A } : {}, L = a ? Y.popupContainer ?? Y["popup-container"] : o.popupContainer ?? o["popup-container"];
|
|
434
|
+
delete Y["popup-container"], delete h["popup-container"], a && delete h[O];
|
|
435
|
+
const $ = a ? { [a]: { ...Y, popupContainer: L ?? p.value } } : { popupContainer: L ?? p.value }, c = ["Tooltip", "Popover", "Popconfirm", "Dropdown", "Dsubmenu"].includes(t), w = o.alignPoint ?? o["align-point"];
|
|
436
|
+
c && (w === void 0 || w === !1) && h.popupTranslate === void 0 && h["popup-translate"] === void 0 && L === void 0 && (h.popupTranslate = Object.defineProperties({}, Object.fromEntries(
|
|
437
|
+
["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"].map((_) => [_, { enumerable: !0, get() {
|
|
438
|
+
var S, g, b;
|
|
439
|
+
const V = t === "Dsubmenu" ? ((S = y.value) == null ? void 0 : S.closest(".arco-dropdown-option")) ?? (((g = M.value) == null ? void 0 : g.$el) instanceof Element ? M.value.$el : void 0) : y.value ?? (((b = M.value) == null ? void 0 : b.$el) instanceof Element ? M.value.$el : void 0), C = V == null ? void 0 : V.getBoundingClientRect();
|
|
440
|
+
return C ? ["top", "tl", "tr"].includes(_) ? [0, Math.ceil(C.top) - C.top] : ["bottom", "bl", "br"].includes(_) ? [0, Math.floor(C.bottom) - C.bottom] : ["left", "lt", "lb"].includes(_) ? [Math.ceil(C.left) - C.left, 0] : [Math.ceil(C.right) - C.right, 0] : [0, 0];
|
|
441
|
+
} }])
|
|
442
|
+
)));
|
|
443
|
+
let v = c ? {
|
|
444
|
+
...s,
|
|
445
|
+
default: (..._) => {
|
|
446
|
+
var V;
|
|
447
|
+
return (V = s.default) == null ? void 0 : V.call(s, ..._).map(function C(S) {
|
|
448
|
+
if (S.type === Nt && Array.isArray(S.children)) {
|
|
449
|
+
const g = Be(S);
|
|
450
|
+
return g.children = S.children.map((b) => st(b) ? C(b) : b), g;
|
|
451
|
+
}
|
|
452
|
+
return Be(S, {
|
|
453
|
+
ref: (g) => {
|
|
454
|
+
var D;
|
|
455
|
+
const b = g instanceof Element ? g : (g == null ? void 0 : g.$el) instanceof Element ? g.$el : void 0;
|
|
456
|
+
b && (!((D = y.value) != null && D.isConnected) || b.compareDocumentPosition(y.value) & Node.DOCUMENT_POSITION_FOLLOWING) && (y.value = b);
|
|
457
|
+
},
|
|
458
|
+
...["Popover", "Popconfirm"].includes(t) ? { class: { "dsh-popover-trigger-open": o.popupVisible ?? o["popup-visible"] ?? P.value } } : {}
|
|
459
|
+
}, !0);
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
} : s;
|
|
463
|
+
if (t === "Popconfirm" && !s.icon && (o.type === void 0 || o.type === "info") && (v = { ...v, icon: () => [m("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", style: { color: "var(--accent)" }, "aria-hidden": !0 }, [m("path", { d: "M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z", fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })])] }), t === "Tooltip" && h.showArrow && !(o.arrowClass ?? o["arrow-class"])) {
|
|
464
|
+
const _ = o.arrowStyle ?? o["arrow-style"], V = (_ == null ? void 0 : _.backgroundColor) ?? (_ == null ? void 0 : _.background) ?? o.backgroundColor ?? o["background-color"];
|
|
465
|
+
v = { ...v, content: () => {
|
|
466
|
+
var C;
|
|
467
|
+
return [
|
|
468
|
+
...((C = s.content) == null ? void 0 : C.call(s)) ?? [Et(String(o.content ?? ""))],
|
|
469
|
+
m(it, { to: u.value ?? p.value, disabled: !u.value }, [
|
|
470
|
+
m("svg", {
|
|
471
|
+
class: "dsh-tooltip-arrow",
|
|
472
|
+
"aria-hidden": !0,
|
|
473
|
+
width: 12,
|
|
474
|
+
height: 12,
|
|
475
|
+
viewBox: "0 0 12 12",
|
|
476
|
+
fill: "none",
|
|
477
|
+
style: { fill: V },
|
|
478
|
+
onVnodeMounted: (S) => {
|
|
479
|
+
ne(() => {
|
|
480
|
+
var b;
|
|
481
|
+
const g = S.el;
|
|
482
|
+
g.isConnected && (u.value = ((b = g.closest(".arco-trigger-popup-wrapper")) == null ? void 0 : b.querySelector(":scope > .arco-trigger-arrow")) ?? void 0);
|
|
483
|
+
});
|
|
484
|
+
},
|
|
485
|
+
onVnodeBeforeUnmount: () => {
|
|
486
|
+
u.value = void 0;
|
|
487
|
+
}
|
|
488
|
+
}, [m("path", { d: "M0 0C5.48483 8 6.5 8 12 0Z" })])
|
|
489
|
+
])
|
|
490
|
+
];
|
|
491
|
+
} };
|
|
492
|
+
}
|
|
493
|
+
if (t === "Select" && (o.allowSearch ?? o["allow-search"]) !== void 0 && (o.allowSearch ?? o["allow-search"]) !== !1 && Array.isArray(o.options) && !s.header) {
|
|
494
|
+
const _ = String(o.inputValue ?? o["input-value"] ?? l.value), V = o.filterOption ?? o["filter-option"];
|
|
495
|
+
h.showHeaderOnEmpty = !0, h.fallbackOption = !1, h.placeholder = o.placeholder ?? "Select an item", h.allowSearch = !1, delete h["allow-search"], h.inputValue = void 0, delete h["input-value"], h.options = V === !1 ? o.options : o.options.filter((C) => typeof V == "function" ? V(_, C) : String(C.label ?? C.value ?? C).toLocaleLowerCase().includes(_.toLocaleLowerCase())), v = { ...v, header: () => [m("div", { class: "dsh-select-search" }, m("div", { class: "dsh-select-search__group" }, m("input", {
|
|
496
|
+
type: "search",
|
|
497
|
+
"aria-label": "搜索",
|
|
498
|
+
value: _,
|
|
499
|
+
autofocus: h.options.length > 0,
|
|
500
|
+
onInput(C) {
|
|
501
|
+
const S = C.target.value;
|
|
502
|
+
l.value = S;
|
|
503
|
+
for (const g of ["onUpdate:inputValue", "onInputValueChange", "onSearch"]) {
|
|
504
|
+
const b = o[g];
|
|
505
|
+
for (const D of Array.isArray(b) ? b : [b])
|
|
506
|
+
typeof D == "function" && D(S);
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
onKeydown(C) {
|
|
510
|
+
var S, g;
|
|
511
|
+
["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(C.key) && (C.preventDefault(), (g = (S = M.value) == null ? void 0 : S.$el) == null || g.dispatchEvent(new KeyboardEvent("keydown", { key: C.key, bubbles: !0 })));
|
|
512
|
+
}
|
|
513
|
+
})))] };
|
|
514
|
+
}
|
|
515
|
+
if (t === "Select" && o.multiple && !s.label && !o.formatLabel && !o["format-label"]) {
|
|
516
|
+
const _ = o.modelValue ?? o["model-value"] ?? k.value ?? [], C = new Intl.ListFormat(d.value).formatToParts(_.map((g, b) => String(b))).filter((g) => g.type === "literal").map((g) => g.value);
|
|
517
|
+
v = { ...v, label: ({ data: g }) => {
|
|
518
|
+
const b = _.findIndex((D) => (typeof D == "object" && D ? D.value : D) === g.value);
|
|
519
|
+
return [m("span", { class: "dsh-select-summary" }, [g.label ?? String(g.value), C[b] ?? ""])];
|
|
520
|
+
} };
|
|
521
|
+
const S = o.onChange;
|
|
522
|
+
h.onChange = (g, ...b) => {
|
|
523
|
+
k.value = g;
|
|
524
|
+
for (const D of Array.isArray(S) ? S : [S])
|
|
525
|
+
typeof D == "function" && D(g, ...b);
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
if (t === "AutoComplete") {
|
|
529
|
+
const _ = ((x = h.triggerProps) == null ? void 0 : x.popupVisible) ?? P.value;
|
|
530
|
+
v = {
|
|
531
|
+
...v,
|
|
532
|
+
...s.suffix ? {} : { suffix: () => [m("span", { class: ["dsh-combobox-indicator", { "dsh-combobox-indicator--open": _ }], "aria-hidden": !0 })] },
|
|
533
|
+
...Array.isArray(o.data) && !o.data.length && !s.footer ? { footer: () => {
|
|
534
|
+
var V;
|
|
535
|
+
return [m("div", { class: "dsh-autocomplete-empty" }, m("span", { class: "dsh-autocomplete-empty__text" }, ((V = s.empty) == null ? void 0 : V.call(s)) ?? (d.value.startsWith("zh") ? "无结果" : "No results found")))];
|
|
536
|
+
} } : {}
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
const T = ["Popover", "Popconfirm", "AutoComplete"].includes(t) ? {
|
|
540
|
+
onPopupVisibleChange(_) {
|
|
541
|
+
P.value = _;
|
|
542
|
+
const V = o.onPopupVisibleChange;
|
|
543
|
+
Array.isArray(V) ? V.forEach((C) => {
|
|
544
|
+
typeof C == "function" && C(_);
|
|
545
|
+
}) : typeof V == "function" && V(_);
|
|
546
|
+
}
|
|
547
|
+
} : {};
|
|
548
|
+
return m(e, { ...h, ...$, ...T, ref: M }, v);
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
et.set(e, i);
|
|
553
|
+
const n = e.install;
|
|
554
|
+
return n && Object.assign(i, {
|
|
555
|
+
install(r, o) {
|
|
556
|
+
function s(f, p) {
|
|
557
|
+
return p === void 0 ? r.component(f) : r.component(f, et.get(p) ?? p);
|
|
558
|
+
}
|
|
559
|
+
n({ ...r, component: s }, o);
|
|
560
|
+
}
|
|
561
|
+
}), i;
|
|
562
|
+
}
|
|
563
|
+
const ct = W(N.AutoComplete, "AutoComplete", "triggerProps"), Na = ct, dt = W(N.Cascader, "Cascader"), Xt = W(N.ColorPicker, "ColorPicker"), ft = W(N.DatePicker, "DatePicker"), ke = W(N.MonthPicker, "MonthPicker"), Me = W(N.QuarterPicker, "QuarterPicker"), Ae = W(N.WeekPicker, "WeekPicker"), $e = W(N.YearPicker, "YearPicker"), ht = W(N.RangePicker, "RangePicker"), mt = W(N.Dropdown, "Dropdown"), vt = W(N.Dsubmenu, "Dsubmenu"), pt = W(N.DropdownButton, "DropdownButton"), gt = W(N.Select, "Select"), ea = W(N.TreeSelect, "TreeSelect"), ta = W(N.TimePicker, "TimePicker"), aa = W(N.Tooltip, "Tooltip"), na = W(N.Popover, "Popover"), ra = W(N.Popconfirm, "Popconfirm"), oa = W(N.Trigger, "Trigger"), la = W(N.Mention, "Mention"), bt = W(N.Menu, "Menu", "triggerProps"), yt = W(N.Image, "Image", "previewProps"), wt = W(N.ImagePreview, "ImagePreview"), Dt = W(N.ImagePreviewGroup, "ImagePreviewGroup");
|
|
564
|
+
Object.assign(dt, { CascaderPanel: N.CascaderPanel });
|
|
565
|
+
Object.assign(ft, { MonthPicker: ke, QuarterPicker: Me, WeekPicker: Ae, YearPicker: $e, RangePicker: ht });
|
|
566
|
+
Object.assign(mt, { Option: N.Doption, Group: N.Dgroup, Submenu: vt, Button: pt });
|
|
567
|
+
Object.assign(gt, { Option: N.Option, OptGroup: N.Optgroup });
|
|
568
|
+
Object.assign(bt, { Item: N.MenuItem, ItemGroup: N.MenuItemGroup, SubMenu: N.SubMenu });
|
|
569
|
+
Object.assign(yt, { Preview: wt, PreviewGroup: Dt });
|
|
570
|
+
function ia(e, t = !1) {
|
|
571
|
+
if (typeof e != "string")
|
|
572
|
+
return {};
|
|
573
|
+
let a;
|
|
574
|
+
const i = e.trim().replace(/^#/, "");
|
|
575
|
+
if (/^(?:[a-f\d]{3}|[a-f\d]{4}|[a-f\d]{6}|[a-f\d]{8})$/i.test(i)) {
|
|
576
|
+
const P = i.length < 5 ? [...i].map((u) => u.repeat(2)).join("") : i;
|
|
577
|
+
a = [0, 2, 4, 6].map((u) => u === 6 ? P.length === 8 ? parseInt(P.slice(u, u + 2), 16) / 255 : 1 : parseInt(P.slice(u, u + 2), 16));
|
|
578
|
+
} else {
|
|
579
|
+
const P = e.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+))?\s*\)$/i);
|
|
580
|
+
if (!P)
|
|
581
|
+
return {};
|
|
582
|
+
a = [Number(P[1]), Number(P[2]), Number(P[3]), P[4] === void 0 ? 1 : Number(P[4])];
|
|
583
|
+
}
|
|
584
|
+
const [n, r, o] = a, s = t ? 1 : a[3], f = Math.max(n, r, o), p = Math.min(n, r, o), d = f - p;
|
|
585
|
+
let k = d === 0 ? 0 : f === n ? ((r - o) / d + 6) % 6 : f === r ? (o - n) / d + 2 : (n - r) / d + 4;
|
|
586
|
+
k *= 60;
|
|
587
|
+
const l = f ? d / f * 100 : 0, M = f / 255 * 100;
|
|
588
|
+
return {
|
|
589
|
+
"--dsh-color": `rgb(${n}, ${r}, ${o})`,
|
|
590
|
+
"--dsh-color-current": `rgb(${n} ${r} ${o} / ${s})`,
|
|
591
|
+
"--dsh-color-transparent": `rgb(${n} ${r} ${o} / 0)`,
|
|
592
|
+
"--dsh-color-hue": `hsl(${k} 100% 50%)`,
|
|
593
|
+
"--dsh-color-x": `${Number(l.toFixed(2))}%`,
|
|
594
|
+
"--dsh-color-y": `${Number((100 - M).toFixed(2))}%`,
|
|
595
|
+
"--dsh-color-hue-x": `${Math.round(k) / 360 * 100}%`,
|
|
596
|
+
"--dsh-color-alpha-x": `${s * 100}%`
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
const Ee = F({
|
|
600
|
+
name: "DshColorPicker",
|
|
601
|
+
inheritAttrs: !1,
|
|
602
|
+
props: { showFormatControls: Boolean },
|
|
603
|
+
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
604
|
+
const n = j(t.defaultValue ?? t["default-value"]), r = j();
|
|
605
|
+
return i(new Proxy({}, { get: (o, s) => {
|
|
606
|
+
var f;
|
|
607
|
+
return (f = r.value) == null ? void 0 : f[s];
|
|
608
|
+
}, has: (o, s) => r.value !== void 0 && s in r.value })), () => {
|
|
609
|
+
const { class: o, style: s, ...f } = t, p = t.modelValue ?? t["model-value"] ?? n.value, d = t.disabledAlpha ?? t["disabled-alpha"], k = ia(p, d !== void 0 && d !== !1), l = t.triggerProps ?? t["trigger-props"] ?? {}, M = e.showFormatControls || t.format === "rgb", y = t.hideTrigger ?? t["hide-trigger"], P = y !== void 0 && y !== !1;
|
|
610
|
+
return m("span", {
|
|
611
|
+
class: ["dsh-color-trigger", P && "dsh-color-panel", P && M && "dsh-color-panel--advanced", !P && o],
|
|
612
|
+
style: P ? k : [k, s]
|
|
613
|
+
}, [m(Xt, {
|
|
614
|
+
...f,
|
|
615
|
+
ref: r,
|
|
616
|
+
...P ? { class: o, style: s } : {},
|
|
617
|
+
triggerProps: { ...l, contentClass: [l.contentClass, "dsh-color-panel", { "dsh-color-panel--advanced": M }], contentStyle: { ...k, ...l.contentStyle } },
|
|
618
|
+
"onUpdate:modelValue": (u) => {
|
|
619
|
+
n.value = u;
|
|
620
|
+
const h = t["onUpdate:modelValue"];
|
|
621
|
+
typeof h == "function" && h(u);
|
|
622
|
+
}
|
|
623
|
+
}, a)]);
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
Object.assign(Ee, { install(e, t) {
|
|
628
|
+
e.component(`${(t == null ? void 0 : t.componentPrefix) ?? "A"}ColorPicker`, Ee);
|
|
629
|
+
} });
|
|
630
|
+
function St(e) {
|
|
631
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
632
|
+
}
|
|
633
|
+
var pe = { exports: {} }, sa = pe.exports, tt;
|
|
634
|
+
function ua() {
|
|
635
|
+
return tt || (tt = 1, (function(e, t) {
|
|
636
|
+
(function(a, i) {
|
|
637
|
+
e.exports = i();
|
|
638
|
+
})(sa, (function() {
|
|
639
|
+
var a = 1e3, i = 6e4, n = 36e5, r = "millisecond", o = "second", s = "minute", f = "hour", p = "day", d = "week", k = "month", l = "quarter", M = "year", y = "date", P = "Invalid Date", u = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, O = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(C) {
|
|
640
|
+
var S = ["th", "st", "nd", "rd"], g = C % 100;
|
|
641
|
+
return "[" + C + (S[(g - 20) % 10] || S[g] || S[0]) + "]";
|
|
642
|
+
} }, A = function(C, S, g) {
|
|
643
|
+
var b = String(C);
|
|
644
|
+
return !b || b.length >= S ? C : "" + Array(S + 1 - b.length).join(g) + C;
|
|
645
|
+
}, Y = { s: A, z: function(C) {
|
|
646
|
+
var S = -C.utcOffset(), g = Math.abs(S), b = Math.floor(g / 60), D = g % 60;
|
|
647
|
+
return (S <= 0 ? "+" : "-") + A(b, 2, "0") + ":" + A(D, 2, "0");
|
|
648
|
+
}, m: function C(S, g) {
|
|
649
|
+
if (S.date() < g.date()) return -C(g, S);
|
|
650
|
+
var b = 12 * (g.year() - S.year()) + (g.month() - S.month()), D = S.clone().add(b, k), B = g - D < 0, E = S.clone().add(b + (B ? -1 : 1), k);
|
|
651
|
+
return +(-(b + (g - D) / (B ? D - E : E - D)) || 0);
|
|
652
|
+
}, a: function(C) {
|
|
653
|
+
return C < 0 ? Math.ceil(C) || 0 : Math.floor(C);
|
|
654
|
+
}, p: function(C) {
|
|
655
|
+
return { M: k, y: M, w: d, d: p, D: y, h: f, m: s, s: o, ms: r, Q: l }[C] || String(C || "").toLowerCase().replace(/s$/, "");
|
|
656
|
+
}, u: function(C) {
|
|
657
|
+
return C === void 0;
|
|
658
|
+
} }, L = "en", $ = {};
|
|
659
|
+
$[L] = O;
|
|
660
|
+
var c = "$isDayjsObject", w = function(C) {
|
|
661
|
+
return C instanceof _ || !(!C || !C[c]);
|
|
662
|
+
}, v = function C(S, g, b) {
|
|
663
|
+
var D;
|
|
664
|
+
if (!S) return L;
|
|
665
|
+
if (typeof S == "string") {
|
|
666
|
+
var B = S.toLowerCase();
|
|
667
|
+
$[B] && (D = B), g && ($[B] = g, D = B);
|
|
668
|
+
var E = S.split("-");
|
|
669
|
+
if (!D && E.length > 1) return C(E[0]);
|
|
670
|
+
} else {
|
|
671
|
+
var I = S.name;
|
|
672
|
+
$[I] = S, D = I;
|
|
673
|
+
}
|
|
674
|
+
return !b && D && (L = D), D || !b && L;
|
|
675
|
+
}, T = function(C, S) {
|
|
676
|
+
if (w(C)) return C.clone();
|
|
677
|
+
var g = typeof S == "object" ? S : {};
|
|
678
|
+
return g.date = C, g.args = arguments, new _(g);
|
|
679
|
+
}, x = Y;
|
|
680
|
+
x.l = v, x.i = w, x.w = function(C, S) {
|
|
681
|
+
return T(C, { locale: S.$L, utc: S.$u, x: S.$x, $offset: S.$offset });
|
|
682
|
+
};
|
|
683
|
+
var _ = (function() {
|
|
684
|
+
function C(g) {
|
|
685
|
+
this.$L = v(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[c] = !0;
|
|
686
|
+
}
|
|
687
|
+
var S = C.prototype;
|
|
688
|
+
return S.parse = function(g) {
|
|
689
|
+
this.$d = (function(b) {
|
|
690
|
+
var D = b.date, B = b.utc;
|
|
691
|
+
if (D === null) return /* @__PURE__ */ new Date(NaN);
|
|
692
|
+
if (x.u(D)) return /* @__PURE__ */ new Date();
|
|
693
|
+
if (D instanceof Date) return new Date(D);
|
|
694
|
+
if (typeof D == "string" && !/Z$/i.test(D)) {
|
|
695
|
+
var E = D.match(u);
|
|
696
|
+
if (E) {
|
|
697
|
+
var I = E[2] - 1 || 0, H = (E[7] || "0").substring(0, 3);
|
|
698
|
+
return B ? new Date(Date.UTC(E[1], I, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, H)) : new Date(E[1], I, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, H);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return new Date(D);
|
|
702
|
+
})(g), this.init();
|
|
703
|
+
}, S.init = function() {
|
|
704
|
+
var g = this.$d;
|
|
705
|
+
this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
|
|
706
|
+
}, S.$utils = function() {
|
|
707
|
+
return x;
|
|
708
|
+
}, S.isValid = function() {
|
|
709
|
+
return this.$d.toString() !== P;
|
|
710
|
+
}, S.isSame = function(g, b) {
|
|
711
|
+
var D = T(g);
|
|
712
|
+
return this.startOf(b) <= D && D <= this.endOf(b);
|
|
713
|
+
}, S.isAfter = function(g, b) {
|
|
714
|
+
return T(g) < this.startOf(b);
|
|
715
|
+
}, S.isBefore = function(g, b) {
|
|
716
|
+
return this.endOf(b) < T(g);
|
|
717
|
+
}, S.$g = function(g, b, D) {
|
|
718
|
+
return x.u(g) ? this[b] : this.set(D, g);
|
|
719
|
+
}, S.unix = function() {
|
|
720
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
721
|
+
}, S.valueOf = function() {
|
|
722
|
+
return this.$d.getTime();
|
|
723
|
+
}, S.startOf = function(g, b) {
|
|
724
|
+
var D = this, B = !!x.u(b) || b, E = x.p(g), I = function(Q, K) {
|
|
725
|
+
var Z = x.w(D.$u ? Date.UTC(D.$y, K, Q) : new Date(D.$y, K, Q), D);
|
|
726
|
+
return B ? Z : Z.endOf(p);
|
|
727
|
+
}, H = function(Q, K) {
|
|
728
|
+
return x.w(D.toDate()[Q].apply(D.toDate("s"), (B ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), D);
|
|
729
|
+
}, R = this.$W, z = this.$M, U = this.$D, ee = "set" + (this.$u ? "UTC" : "");
|
|
730
|
+
switch (E) {
|
|
731
|
+
case M:
|
|
732
|
+
return B ? I(1, 0) : I(31, 11);
|
|
733
|
+
case k:
|
|
734
|
+
return B ? I(1, z) : I(0, z + 1);
|
|
735
|
+
case d:
|
|
736
|
+
var J = this.$locale().weekStart || 0, oe = (R < J ? R + 7 : R) - J;
|
|
737
|
+
return I(B ? U - oe : U + (6 - oe), z);
|
|
738
|
+
case p:
|
|
739
|
+
case y:
|
|
740
|
+
return H(ee + "Hours", 0);
|
|
741
|
+
case f:
|
|
742
|
+
return H(ee + "Minutes", 1);
|
|
743
|
+
case s:
|
|
744
|
+
return H(ee + "Seconds", 2);
|
|
745
|
+
case o:
|
|
746
|
+
return H(ee + "Milliseconds", 3);
|
|
747
|
+
default:
|
|
748
|
+
return this.clone();
|
|
749
|
+
}
|
|
750
|
+
}, S.endOf = function(g) {
|
|
751
|
+
return this.startOf(g, !1);
|
|
752
|
+
}, S.$set = function(g, b) {
|
|
753
|
+
var D, B = x.p(g), E = "set" + (this.$u ? "UTC" : ""), I = (D = {}, D[p] = E + "Date", D[y] = E + "Date", D[k] = E + "Month", D[M] = E + "FullYear", D[f] = E + "Hours", D[s] = E + "Minutes", D[o] = E + "Seconds", D[r] = E + "Milliseconds", D)[B], H = B === p ? this.$D + (b - this.$W) : b;
|
|
754
|
+
if (B === k || B === M) {
|
|
755
|
+
var R = this.clone().set(y, 1);
|
|
756
|
+
R.$d[I](H), R.init(), this.$d = R.set(y, Math.min(this.$D, R.daysInMonth())).$d;
|
|
757
|
+
} else I && this.$d[I](H);
|
|
758
|
+
return this.init(), this;
|
|
759
|
+
}, S.set = function(g, b) {
|
|
760
|
+
return this.clone().$set(g, b);
|
|
761
|
+
}, S.get = function(g) {
|
|
762
|
+
return this[x.p(g)]();
|
|
763
|
+
}, S.add = function(g, b) {
|
|
764
|
+
var D, B = this;
|
|
765
|
+
g = Number(g);
|
|
766
|
+
var E = x.p(b), I = function(z) {
|
|
767
|
+
var U = T(B);
|
|
768
|
+
return x.w(U.date(U.date() + Math.round(z * g)), B);
|
|
769
|
+
};
|
|
770
|
+
if (E === k) return this.set(k, this.$M + g);
|
|
771
|
+
if (E === M) return this.set(M, this.$y + g);
|
|
772
|
+
if (E === p) return I(1);
|
|
773
|
+
if (E === d) return I(7);
|
|
774
|
+
var H = (D = {}, D[s] = i, D[f] = n, D[o] = a, D)[E] || 1, R = this.$d.getTime() + g * H;
|
|
775
|
+
return x.w(R, this);
|
|
776
|
+
}, S.subtract = function(g, b) {
|
|
777
|
+
return this.add(-1 * g, b);
|
|
778
|
+
}, S.format = function(g) {
|
|
779
|
+
var b = this, D = this.$locale();
|
|
780
|
+
if (!this.isValid()) return D.invalidDate || P;
|
|
781
|
+
var B = g || "YYYY-MM-DDTHH:mm:ssZ", E = x.z(this), I = this.$H, H = this.$m, R = this.$M, z = D.weekdays, U = D.months, ee = D.meridiem, J = function(K, Z, X, te) {
|
|
782
|
+
return K && (K[Z] || K(b, B)) || X[Z].slice(0, te);
|
|
783
|
+
}, oe = function(K) {
|
|
784
|
+
return x.s(I % 12 || 12, K, "0");
|
|
785
|
+
}, Q = ee || function(K, Z, X) {
|
|
786
|
+
var te = K < 12 ? "AM" : "PM";
|
|
787
|
+
return X ? te.toLowerCase() : te;
|
|
788
|
+
};
|
|
789
|
+
return B.replace(h, (function(K, Z) {
|
|
790
|
+
return Z || (function(X) {
|
|
791
|
+
switch (X) {
|
|
792
|
+
case "YY":
|
|
793
|
+
return String(b.$y).slice(-2);
|
|
794
|
+
case "YYYY":
|
|
795
|
+
return x.s(b.$y, 4, "0");
|
|
796
|
+
case "M":
|
|
797
|
+
return R + 1;
|
|
798
|
+
case "MM":
|
|
799
|
+
return x.s(R + 1, 2, "0");
|
|
800
|
+
case "MMM":
|
|
801
|
+
return J(D.monthsShort, R, U, 3);
|
|
802
|
+
case "MMMM":
|
|
803
|
+
return J(U, R);
|
|
804
|
+
case "D":
|
|
805
|
+
return b.$D;
|
|
806
|
+
case "DD":
|
|
807
|
+
return x.s(b.$D, 2, "0");
|
|
808
|
+
case "d":
|
|
809
|
+
return String(b.$W);
|
|
810
|
+
case "dd":
|
|
811
|
+
return J(D.weekdaysMin, b.$W, z, 2);
|
|
812
|
+
case "ddd":
|
|
813
|
+
return J(D.weekdaysShort, b.$W, z, 3);
|
|
814
|
+
case "dddd":
|
|
815
|
+
return z[b.$W];
|
|
816
|
+
case "H":
|
|
817
|
+
return String(I);
|
|
818
|
+
case "HH":
|
|
819
|
+
return x.s(I, 2, "0");
|
|
820
|
+
case "h":
|
|
821
|
+
return oe(1);
|
|
822
|
+
case "hh":
|
|
823
|
+
return oe(2);
|
|
824
|
+
case "a":
|
|
825
|
+
return Q(I, H, !0);
|
|
826
|
+
case "A":
|
|
827
|
+
return Q(I, H, !1);
|
|
828
|
+
case "m":
|
|
829
|
+
return String(H);
|
|
830
|
+
case "mm":
|
|
831
|
+
return x.s(H, 2, "0");
|
|
832
|
+
case "s":
|
|
833
|
+
return String(b.$s);
|
|
834
|
+
case "ss":
|
|
835
|
+
return x.s(b.$s, 2, "0");
|
|
836
|
+
case "SSS":
|
|
837
|
+
return x.s(b.$ms, 3, "0");
|
|
838
|
+
case "Z":
|
|
839
|
+
return E;
|
|
840
|
+
}
|
|
841
|
+
return null;
|
|
842
|
+
})(K) || E.replace(":", "");
|
|
843
|
+
}));
|
|
844
|
+
}, S.utcOffset = function() {
|
|
845
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
846
|
+
}, S.diff = function(g, b, D) {
|
|
847
|
+
var B, E = this, I = x.p(b), H = T(g), R = (H.utcOffset() - this.utcOffset()) * i, z = this - H, U = function() {
|
|
848
|
+
return x.m(E, H);
|
|
849
|
+
};
|
|
850
|
+
switch (I) {
|
|
851
|
+
case M:
|
|
852
|
+
B = U() / 12;
|
|
853
|
+
break;
|
|
854
|
+
case k:
|
|
855
|
+
B = U();
|
|
856
|
+
break;
|
|
857
|
+
case l:
|
|
858
|
+
B = U() / 3;
|
|
859
|
+
break;
|
|
860
|
+
case d:
|
|
861
|
+
B = (z - R) / 6048e5;
|
|
862
|
+
break;
|
|
863
|
+
case p:
|
|
864
|
+
B = (z - R) / 864e5;
|
|
865
|
+
break;
|
|
866
|
+
case f:
|
|
867
|
+
B = z / n;
|
|
868
|
+
break;
|
|
869
|
+
case s:
|
|
870
|
+
B = z / i;
|
|
871
|
+
break;
|
|
872
|
+
case o:
|
|
873
|
+
B = z / a;
|
|
874
|
+
break;
|
|
875
|
+
default:
|
|
876
|
+
B = z;
|
|
877
|
+
}
|
|
878
|
+
return D ? B : x.a(B);
|
|
879
|
+
}, S.daysInMonth = function() {
|
|
880
|
+
return this.endOf(k).$D;
|
|
881
|
+
}, S.$locale = function() {
|
|
882
|
+
return $[this.$L];
|
|
883
|
+
}, S.locale = function(g, b) {
|
|
884
|
+
if (!g) return this.$L;
|
|
885
|
+
var D = this.clone(), B = v(g, b, !0);
|
|
886
|
+
return B && (D.$L = B), D;
|
|
887
|
+
}, S.clone = function() {
|
|
888
|
+
return x.w(this.$d, this);
|
|
889
|
+
}, S.toDate = function() {
|
|
890
|
+
return new Date(this.valueOf());
|
|
891
|
+
}, S.toJSON = function() {
|
|
892
|
+
return this.isValid() ? this.toISOString() : null;
|
|
893
|
+
}, S.toISOString = function() {
|
|
894
|
+
return this.$d.toISOString();
|
|
895
|
+
}, S.toString = function() {
|
|
896
|
+
return this.$d.toUTCString();
|
|
897
|
+
}, C;
|
|
898
|
+
})(), V = _.prototype;
|
|
899
|
+
return T.prototype = V, [["$ms", r], ["$s", o], ["$m", s], ["$H", f], ["$W", p], ["$M", k], ["$y", M], ["$D", y]].forEach((function(C) {
|
|
900
|
+
V[C[1]] = function(S) {
|
|
901
|
+
return this.$g(S, C[0], C[1]);
|
|
902
|
+
};
|
|
903
|
+
})), T.extend = function(C, S) {
|
|
904
|
+
return C.$i || (C(S, _, T), C.$i = !0), T;
|
|
905
|
+
}, T.locale = v, T.isDayjs = w, T.unix = function(C) {
|
|
906
|
+
return T(1e3 * C);
|
|
907
|
+
}, T.en = $[L], T.Ls = $, T.p = {}, T;
|
|
908
|
+
}));
|
|
909
|
+
})(pe)), pe.exports;
|
|
910
|
+
}
|
|
911
|
+
var ca = ua();
|
|
912
|
+
const ie = /* @__PURE__ */ St(ca);
|
|
913
|
+
function da(e) {
|
|
914
|
+
return (e.match(/YYYY|MM?|DD?|\[[^\]]*\]|./g) ?? []).map((t) => ({
|
|
915
|
+
unit: t === "YYYY" ? "year" : /^M+$/.test(t) ? "month" : /^D+$/.test(t) ? "day" : void 0,
|
|
916
|
+
text: t.startsWith("[") ? t.slice(1, -1) : t
|
|
917
|
+
}));
|
|
918
|
+
}
|
|
919
|
+
function Le(e) {
|
|
920
|
+
if (e.year === void 0 || e.month === void 0 || e.day === void 0)
|
|
921
|
+
return;
|
|
922
|
+
const t = ie().date(1).year(Math.max(1, Math.min(9999, e.year))).month(Math.max(1, Math.min(12, e.month)) - 1);
|
|
923
|
+
return t.date(Math.max(1, Math.min(e.day, t.daysInMonth()))).startOf("day");
|
|
924
|
+
}
|
|
925
|
+
function fa(e, t) {
|
|
926
|
+
const { dates: a, range: i, draft: n, disabled: r, readonly: o } = t, s = a.map((l) => (l == null ? void 0 : l.format("YYYY-MM-DD")) ?? "").join("/");
|
|
927
|
+
s !== n.source && (n.source = s, n.parts = a.map((l) => l ? { year: l.year(), month: l.month() + 1, day: l.date() } : {}));
|
|
928
|
+
const f = (l, M, y) => {
|
|
929
|
+
var h;
|
|
930
|
+
const P = (h = n.parts)[l] ?? (h[l] = {});
|
|
931
|
+
P[M] = y;
|
|
932
|
+
const u = Le(P);
|
|
933
|
+
if (u && !t.disabledDate(u)) {
|
|
934
|
+
const O = Array.from({ length: i ? 2 : 1 }, (A, Y) => Le(n.parts[Y] ?? {}));
|
|
935
|
+
O[l] = u, O.every((A) => !A || !t.disabledDate(A)) && t.change(O);
|
|
936
|
+
}
|
|
937
|
+
y === void 0 && a[l] && t.change([]), t.invalidate();
|
|
938
|
+
}, p = (l, M) => {
|
|
939
|
+
var u;
|
|
940
|
+
const y = l.closest(".dsh-date-input"), P = Array.from((y == null ? void 0 : y.querySelectorAll("[role=spinbutton]")) ?? []);
|
|
941
|
+
(u = P[P.indexOf(l) + M]) == null || u.focus();
|
|
942
|
+
}, d = Array.from({ length: i ? 2 : 1 }, (l, M) => e("div", { className: "dsh-date-input__field", key: M }, ...da(t.format).map(({ unit: y, text: P }, u) => {
|
|
943
|
+
var $;
|
|
944
|
+
if (!y)
|
|
945
|
+
return e("span", { key: u, className: "dsh-date-input__literal", "aria-hidden": !0 }, P);
|
|
946
|
+
const h = ($ = n.parts)[M] ?? ($[M] = {}), O = h[y], A = y === "year" ? 9999 : y === "month" ? 12 : Le({ year: h.year ?? 2e3, month: h.month ?? 1, day: 1 }).daysInMonth(), Y = `${M}-${y}`, L = (c, w) => {
|
|
947
|
+
if (r || o || !/^\d+$/.test(c))
|
|
948
|
+
return;
|
|
949
|
+
const v = (n.target === Y ? n.buffer : "") + c, T = Number(v) > A ? c : v;
|
|
950
|
+
n.target = Y, n.buffer = T, Number(T) > 0 && f(M, y, Math.min(A, Number(T))), (T.length >= (y === "year" ? 4 : 2) || +(T + "0") > A) && (n.buffer = "", p(w, 1));
|
|
951
|
+
};
|
|
952
|
+
return e("span", {
|
|
953
|
+
key: u,
|
|
954
|
+
className: "dsh-date-input__segment",
|
|
955
|
+
role: "spinbutton",
|
|
956
|
+
tabIndex: r ? -1 : 0,
|
|
957
|
+
contentEditable: !r && !o,
|
|
958
|
+
suppressContentEditableWarning: !0,
|
|
959
|
+
spellCheck: !1,
|
|
960
|
+
inputMode: "numeric",
|
|
961
|
+
"aria-label": `${y}, ${t.label}${i ? M === 0 ? ", start" : ", end" : ""}`,
|
|
962
|
+
"aria-valuenow": O,
|
|
963
|
+
"aria-valuemin": 1,
|
|
964
|
+
"aria-valuemax": A,
|
|
965
|
+
"aria-disabled": r || void 0,
|
|
966
|
+
"aria-readonly": o || void 0,
|
|
967
|
+
"data-placeholder": O === void 0 || void 0,
|
|
968
|
+
onFocus: () => {
|
|
969
|
+
n.target = Y, n.buffer = "";
|
|
970
|
+
},
|
|
971
|
+
onClick: (c) => c.stopPropagation(),
|
|
972
|
+
onBeforeInput: (c) => {
|
|
973
|
+
var w;
|
|
974
|
+
c.preventDefault(), L(c.data ?? ((w = c.nativeEvent) == null ? void 0 : w.data) ?? "", c.target);
|
|
975
|
+
},
|
|
976
|
+
onPaste: (c) => {
|
|
977
|
+
var w;
|
|
978
|
+
c.preventDefault(), L(((w = c.clipboardData) == null ? void 0 : w.getData("text")) ?? "", c.target);
|
|
979
|
+
},
|
|
980
|
+
onKeyDown: (c) => {
|
|
981
|
+
if (c.altKey && c.key === "ArrowDown") {
|
|
982
|
+
c.preventDefault(), t.toggle();
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
if (c.key === "ArrowLeft" || c.key === "ArrowRight") {
|
|
986
|
+
c.preventDefault(), p(c.target, c.key === "ArrowLeft" ? -1 : 1);
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
if (!(r || o)) {
|
|
990
|
+
if (/^\d$/.test(c.key)) {
|
|
991
|
+
c.preventDefault(), L(c.key, c.target);
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
if (c.key === "Backspace" || c.key === "Delete") {
|
|
995
|
+
c.preventDefault(), n.buffer = "", f(M, y, void 0);
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(c.key)) {
|
|
999
|
+
c.preventDefault(), n.buffer = "";
|
|
1000
|
+
const w = c.key === "Home" ? 1 : c.key === "End" ? A : (O ?? 0) + (c.key === "ArrowUp" ? 1 : -1);
|
|
1001
|
+
f(M, y, w < 1 ? A : w > A ? 1 : w);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}, O === void 0 ? y === "year" ? "yyyy" : y === "month" ? "mm" : "dd" : String(O));
|
|
1006
|
+
}))), k = [d[0]];
|
|
1007
|
+
return i && k.push(e("span", { className: "dsh-date-input__separator", "aria-hidden": !0 }, "-"), d[1]), k.push(e("button", {
|
|
1008
|
+
type: "button",
|
|
1009
|
+
className: "dsh-date-input__trigger",
|
|
1010
|
+
disabled: r,
|
|
1011
|
+
"aria-label": "Calendar",
|
|
1012
|
+
"aria-haspopup": "dialog",
|
|
1013
|
+
"aria-expanded": t.open,
|
|
1014
|
+
onClick: (l) => {
|
|
1015
|
+
l.stopPropagation(), t.toggle();
|
|
1016
|
+
}
|
|
1017
|
+
}, e("span", { className: "dsh-date-input__indicator" }, e("svg", { viewBox: "0 0 13 14", width: 14, height: 14, fill: "none", "aria-hidden": !0 }, e("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M3.75 4.5A.75.75 0 0 1 3 3.75v-.748a1.5 1.5 0 0 0-1.5 1.5v1h10v-1a1.5 1.5 0 0 0-1.5-1.5v.75a.75.75 0 1 1-1.5 0v-.75h-4v.747a.75.75 0 0 1-.75.75ZM8.5 1.501h-4V.75a.75.75 0 0 0-1.5 0v.752a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3v-.75a.75.75 0 0 0-1.5 0v.75Zm-7 5.5v3.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-3.5h-10Z" }))))), t.allowClear && a.some(Boolean) && !o && !r && k.push(e("button", { type: "button", className: "dsh-date-input__clear", "aria-label": "Clear", onClick: (l) => {
|
|
1018
|
+
l.stopPropagation(), t.change([]);
|
|
1019
|
+
} }, "×")), e("div", {
|
|
1020
|
+
className: "dsh-date-input",
|
|
1021
|
+
role: "group",
|
|
1022
|
+
"aria-label": t.label,
|
|
1023
|
+
"data-disabled": r || void 0,
|
|
1024
|
+
onBlur: (l) => {
|
|
1025
|
+
(!(l.relatedTarget instanceof Node) || !l.currentTarget.contains(l.relatedTarget)) && (n.source = "\0", n.buffer = "", t.invalidate());
|
|
1026
|
+
},
|
|
1027
|
+
onClick: () => {
|
|
1028
|
+
!r && !o && t.toggle();
|
|
1029
|
+
}
|
|
1030
|
+
}, ...k);
|
|
1031
|
+
}
|
|
1032
|
+
var ge = { exports: {} }, ha = ge.exports, at;
|
|
1033
|
+
function ma() {
|
|
1034
|
+
return at || (at = 1, (function(e, t) {
|
|
1035
|
+
(function(a, i) {
|
|
1036
|
+
e.exports = i();
|
|
1037
|
+
})(ha, (function() {
|
|
1038
|
+
var a = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, o = /\d\d?/, s = /\d*[^-_:/,()\s\d]+/, f = {}, p = function(u) {
|
|
1039
|
+
return (u = +u) + (u > 68 ? 1900 : 2e3);
|
|
1040
|
+
}, d = function(u) {
|
|
1041
|
+
return function(h) {
|
|
1042
|
+
this[u] = +h;
|
|
1043
|
+
};
|
|
1044
|
+
}, k = [/[+-]\d\d:?(\d\d)?|Z/, function(u) {
|
|
1045
|
+
(this.zone || (this.zone = {})).offset = (function(h) {
|
|
1046
|
+
if (!h || h === "Z") return 0;
|
|
1047
|
+
var O = h.match(/([+-]|\d\d)/g), A = 60 * O[1] + (+O[2] || 0);
|
|
1048
|
+
return A === 0 ? 0 : O[0] === "+" ? -A : A;
|
|
1049
|
+
})(u);
|
|
1050
|
+
}], l = function(u) {
|
|
1051
|
+
var h = f[u];
|
|
1052
|
+
return h && (h.indexOf ? h : h.s.concat(h.f));
|
|
1053
|
+
}, M = function(u, h) {
|
|
1054
|
+
var O, A = f.meridiem;
|
|
1055
|
+
if (A) {
|
|
1056
|
+
for (var Y = 1; Y <= 24; Y += 1) if (u.indexOf(A(Y, 0, h)) > -1) {
|
|
1057
|
+
O = Y > 12;
|
|
1058
|
+
break;
|
|
1059
|
+
}
|
|
1060
|
+
} else O = u === (h ? "pm" : "PM");
|
|
1061
|
+
return O;
|
|
1062
|
+
}, y = { A: [s, function(u) {
|
|
1063
|
+
this.afternoon = M(u, !1);
|
|
1064
|
+
}], a: [s, function(u) {
|
|
1065
|
+
this.afternoon = M(u, !0);
|
|
1066
|
+
}], Q: [n, function(u) {
|
|
1067
|
+
this.month = 3 * (u - 1) + 1;
|
|
1068
|
+
}], S: [n, function(u) {
|
|
1069
|
+
this.milliseconds = 100 * +u;
|
|
1070
|
+
}], SS: [r, function(u) {
|
|
1071
|
+
this.milliseconds = 10 * +u;
|
|
1072
|
+
}], SSS: [/\d{3}/, function(u) {
|
|
1073
|
+
this.milliseconds = +u;
|
|
1074
|
+
}], s: [o, d("seconds")], ss: [o, d("seconds")], m: [o, d("minutes")], mm: [o, d("minutes")], H: [o, d("hours")], h: [o, d("hours")], HH: [o, d("hours")], hh: [o, d("hours")], D: [o, d("day")], DD: [r, d("day")], Do: [s, function(u) {
|
|
1075
|
+
var h = f.ordinal, O = u.match(/\d+/);
|
|
1076
|
+
if (this.day = O[0], h) for (var A = 1; A <= 31; A += 1) h(A).replace(/\[|\]/g, "") === u && (this.day = A);
|
|
1077
|
+
}], w: [o, d("week")], ww: [r, d("week")], M: [o, d("month")], MM: [r, d("month")], MMM: [s, function(u) {
|
|
1078
|
+
var h = l("months"), O = (l("monthsShort") || h.map((function(A) {
|
|
1079
|
+
return A.slice(0, 3);
|
|
1080
|
+
}))).indexOf(u) + 1;
|
|
1081
|
+
if (O < 1) throw new Error();
|
|
1082
|
+
this.month = O % 12 || O;
|
|
1083
|
+
}], MMMM: [s, function(u) {
|
|
1084
|
+
var h = l("months").indexOf(u) + 1;
|
|
1085
|
+
if (h < 1) throw new Error();
|
|
1086
|
+
this.month = h % 12 || h;
|
|
1087
|
+
}], Y: [/[+-]?\d+/, d("year")], YY: [r, function(u) {
|
|
1088
|
+
this.year = p(u);
|
|
1089
|
+
}], YYYY: [/\d{4}/, d("year")], Z: k, ZZ: k };
|
|
1090
|
+
function P(u) {
|
|
1091
|
+
var h, O;
|
|
1092
|
+
h = u, O = f && f.formats;
|
|
1093
|
+
for (var A = (u = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(T, x, _) {
|
|
1094
|
+
var V = _ && _.toUpperCase();
|
|
1095
|
+
return x || O[_] || a[_] || O[V].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(C, S, g) {
|
|
1096
|
+
return S || g.slice(1);
|
|
1097
|
+
}));
|
|
1098
|
+
}))).match(i), Y = A.length, L = 0; L < Y; L += 1) {
|
|
1099
|
+
var $ = A[L], c = y[$], w = c && c[0], v = c && c[1];
|
|
1100
|
+
A[L] = v ? { regex: w, parser: v } : $.replace(/^\[|\]$/g, "");
|
|
1101
|
+
}
|
|
1102
|
+
return function(T) {
|
|
1103
|
+
for (var x = {}, _ = 0, V = 0; _ < Y; _ += 1) {
|
|
1104
|
+
var C = A[_];
|
|
1105
|
+
if (typeof C == "string") V += C.length;
|
|
1106
|
+
else {
|
|
1107
|
+
var S = C.regex, g = C.parser, b = T.slice(V), D = S.exec(b)[0];
|
|
1108
|
+
g.call(x, D), T = T.replace(D, "");
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return (function(B) {
|
|
1112
|
+
var E = B.afternoon;
|
|
1113
|
+
if (E !== void 0) {
|
|
1114
|
+
var I = B.hours;
|
|
1115
|
+
E ? I < 12 && (B.hours += 12) : I === 12 && (B.hours = 0), delete B.afternoon;
|
|
1116
|
+
}
|
|
1117
|
+
})(x), x;
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
return function(u, h, O) {
|
|
1121
|
+
O.p.customParseFormat = !0, u && u.parseTwoDigitYear && (p = u.parseTwoDigitYear);
|
|
1122
|
+
var A = h.prototype, Y = A.parse;
|
|
1123
|
+
A.parse = function(L) {
|
|
1124
|
+
var $ = L.date, c = L.utc, w = L.args;
|
|
1125
|
+
this.$u = c;
|
|
1126
|
+
var v = w[1];
|
|
1127
|
+
if (typeof v == "string") {
|
|
1128
|
+
var T = w[2] === !0, x = w[3] === !0, _ = T || x, V = w[2];
|
|
1129
|
+
x && (V = w[2]), f = this.$locale(), !T && V && (f = O.Ls[V]), this.$d = (function(b, D, B, E) {
|
|
1130
|
+
try {
|
|
1131
|
+
if (["x", "X"].indexOf(D) > -1) return new Date((D === "X" ? 1e3 : 1) * b);
|
|
1132
|
+
var I = P(D)(b), H = I.year, R = I.month, z = I.day, U = I.hours, ee = I.minutes, J = I.seconds, oe = I.milliseconds, Q = I.zone, K = I.week, Z = /* @__PURE__ */ new Date(), X = z || (H || R ? 1 : Z.getDate()), te = H || Z.getFullYear(), me = 0;
|
|
1133
|
+
H && !R || (me = R > 0 ? R - 1 : Z.getMonth());
|
|
1134
|
+
var ve, Pe = U || 0, _e = ee || 0, Te = J || 0, Ve = oe || 0;
|
|
1135
|
+
return Q ? new Date(Date.UTC(te, me, X, Pe, _e, Te, Ve + 60 * Q.offset * 1e3)) : B ? new Date(Date.UTC(te, me, X, Pe, _e, Te, Ve)) : (ve = new Date(te, me, X, Pe, _e, Te, Ve), K && (ve = E(ve).week(K).toDate()), ve);
|
|
1136
|
+
} catch {
|
|
1137
|
+
return /* @__PURE__ */ new Date("");
|
|
1138
|
+
}
|
|
1139
|
+
})($, v, c, O), this.init(), V && V !== !0 && (this.$L = this.locale(V).$L), _ && $ != this.format(v) && (this.$d = /* @__PURE__ */ new Date("")), f = {};
|
|
1140
|
+
} else if (v instanceof Array) for (var C = v.length, S = 1; S <= C; S += 1) {
|
|
1141
|
+
w[1] = v[S - 1];
|
|
1142
|
+
var g = O.apply(this, w);
|
|
1143
|
+
if (g.isValid()) {
|
|
1144
|
+
this.$d = g.$d, this.$L = g.$L, this.init();
|
|
1145
|
+
break;
|
|
1146
|
+
}
|
|
1147
|
+
S === C && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1148
|
+
}
|
|
1149
|
+
else Y.call(this, L);
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
}));
|
|
1153
|
+
})(ge)), ge.exports;
|
|
1154
|
+
}
|
|
1155
|
+
var va = ma();
|
|
1156
|
+
const pa = /* @__PURE__ */ St(va);
|
|
1157
|
+
ie.extend(pa);
|
|
1158
|
+
function ue(e, t) {
|
|
1159
|
+
if (e == null || e === "")
|
|
1160
|
+
return;
|
|
1161
|
+
const a = typeof e == "string" && t ? ie(e, t, !0) : void 0, i = a != null && a.isValid() ? a : ie(e);
|
|
1162
|
+
return i.isValid() ? i.startOf("day") : void 0;
|
|
1163
|
+
}
|
|
1164
|
+
function nt(e, t) {
|
|
1165
|
+
const a = e.startOf("month"), i = (a.day() - t + 7) % 7, n = a.subtract(i, "day"), r = Math.ceil((i + a.daysInMonth()) / 7) * 7;
|
|
1166
|
+
return Array.from({ length: r }, (o, s) => n.add(s, "day"));
|
|
1167
|
+
}
|
|
1168
|
+
function ga(e, t, a, i) {
|
|
1169
|
+
const n = e.startOf("month"), r = n.add(a ? 2 : 1, "month").subtract(1, "day"), o = t.isBefore(n, "day") ? n : t.isAfter(r, "day") ? r : t, s = r.diff(n, "day");
|
|
1170
|
+
for (let f = 0; f <= s; f++) {
|
|
1171
|
+
const p = o.add(f, "day");
|
|
1172
|
+
if (!p.isAfter(r, "day") && !i(p))
|
|
1173
|
+
return p;
|
|
1174
|
+
const d = o.subtract(f, "day");
|
|
1175
|
+
if (f && !d.isBefore(n, "day") && !i(d))
|
|
1176
|
+
return d;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
function kt(e, t) {
|
|
1180
|
+
return e.isAfter(t, "day") ? [t, e] : [e, t];
|
|
1181
|
+
}
|
|
1182
|
+
function ba(e) {
|
|
1183
|
+
return /^(en-US|en-CA|ja|ko|zh-TW|zh-HK)/i.test(e) ? 0 : 1;
|
|
1184
|
+
}
|
|
1185
|
+
function ya(e, t, a, i = !1) {
|
|
1186
|
+
switch (t) {
|
|
1187
|
+
case "ArrowLeft":
|
|
1188
|
+
return e.subtract(1, "day");
|
|
1189
|
+
case "ArrowRight":
|
|
1190
|
+
return e.add(1, "day");
|
|
1191
|
+
case "ArrowUp":
|
|
1192
|
+
return e.subtract(7, "day");
|
|
1193
|
+
case "ArrowDown":
|
|
1194
|
+
return e.add(7, "day");
|
|
1195
|
+
case "Home":
|
|
1196
|
+
return e.subtract((e.day() - a + 7) % 7, "day");
|
|
1197
|
+
case "End":
|
|
1198
|
+
return e.add(6 - (e.day() - a + 7) % 7, "day");
|
|
1199
|
+
case "PageUp":
|
|
1200
|
+
return e.subtract(1, i ? "year" : "month");
|
|
1201
|
+
case "PageDown":
|
|
1202
|
+
return e.add(1, i ? "year" : "month");
|
|
1203
|
+
default:
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
const wa = {
|
|
1208
|
+
previous: "M10.53 2.97a.75.75 0 0 1 0 1.06L6.56 8l3.97 3.97a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0",
|
|
1209
|
+
next: "M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z"
|
|
1210
|
+
};
|
|
1211
|
+
function Da(e, t, a) {
|
|
1212
|
+
const { month: i, range: n, locale: r, firstDay: o, yearOpen: s } = t, f = new Intl.DateTimeFormat(r, { month: "long", year: "numeric" }).format(i.toDate()), p = new Intl.DateTimeFormat(r, { weekday: "short" }), d = new Intl.DateTimeFormat(r, { dateStyle: "full" }), k = (Y) => e("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", "aria-hidden": "true" }, e("path", { d: wa[Y], fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" })), l = (Y) => e("button", { type: "button", className: "dsh-calendar__nav", "aria-label": Y < 0 ? "Previous" : "Next", onClick: () => a.month(i.add(Y * (n ? 2 : 1), "month")) }, k(Y < 0 ? "previous" : "next")), M = t.anchor && t.hover ? kt(t.anchor, t.hover) : t.selected, y = ga(i, t.focused, n, t.disabled), P = Array.from({ length: n ? 2 : 1 }, (Y, L) => {
|
|
1213
|
+
const $ = i.add(L, "month"), c = nt($, o), w = Array.from({ length: c.length / 7 }, (v, T) => e("tr", { key: T }, ...c.slice(T * 7, T * 7 + 7).map((x) => {
|
|
1214
|
+
var D, B, E;
|
|
1215
|
+
const _ = x.month() !== $.month(), V = t.disabled(x), C = n && !!((D = M[0]) != null && D.isSame(x, "day")), S = n && !!((B = M[1]) != null && B.isSame(x, "day")), g = n ? !!(M[0] && M[1] && !x.isBefore(M[0], "day") && !x.isAfter(M[1], "day")) : !!((E = t.selected[0]) != null && E.isSame(x, "day")), b = !_ && !V && !!(y != null && y.isSame(x, "day"));
|
|
1216
|
+
return e("td", { key: x.format("YYYY-MM-DD"), role: "gridcell", "aria-selected": g, "aria-disabled": V || void 0 }, e("button", {
|
|
1217
|
+
type: "button",
|
|
1218
|
+
className: "dsh-calendar__cell arco-picker-cell",
|
|
1219
|
+
"data-date": x.format("YYYY-MM-DD"),
|
|
1220
|
+
"data-outside-month": _ || void 0,
|
|
1221
|
+
"data-selected": g || void 0,
|
|
1222
|
+
"data-selection-start": C || void 0,
|
|
1223
|
+
"data-selection-end": S || void 0,
|
|
1224
|
+
"data-today": x.isSame(ie(), "day") || void 0,
|
|
1225
|
+
"data-disabled": V || void 0,
|
|
1226
|
+
"aria-label": d.format(x.toDate()),
|
|
1227
|
+
tabIndex: b && !s ? 0 : -1,
|
|
1228
|
+
disabled: V,
|
|
1229
|
+
onClick: () => a.select(x),
|
|
1230
|
+
onMouseEnter: (I) => {
|
|
1231
|
+
a.hover(x), t.anchor && !V && (a.focus(x), I.currentTarget.focus({ preventScroll: !0 }));
|
|
1232
|
+
},
|
|
1233
|
+
onFocus: () => a.focus(x),
|
|
1234
|
+
onKeyDown: (I) => {
|
|
1235
|
+
const H = ya(x, I.key, o, I.shiftKey);
|
|
1236
|
+
H && (I.preventDefault(), !t.disabled(H) && (a.focus(H), H.isSame(i, "month") || a.month(H.startOf("month")), requestAnimationFrame(() => {
|
|
1237
|
+
var z;
|
|
1238
|
+
const R = I.target.closest(".dsh-calendar");
|
|
1239
|
+
(z = R == null ? void 0 : R.querySelector(`[data-date="${H.format("YYYY-MM-DD")}"]:not([data-outside-month])`)) == null || z.focus();
|
|
1240
|
+
})));
|
|
1241
|
+
}
|
|
1242
|
+
}, n ? e("span", { className: "dsh-calendar__cell-button" }, x.date()) : String(x.date())));
|
|
1243
|
+
})));
|
|
1244
|
+
return e(
|
|
1245
|
+
"table",
|
|
1246
|
+
{ className: "dsh-calendar__grid", key: L, role: "grid", "aria-label": new Intl.DateTimeFormat(r, { month: "long", year: "numeric" }).format($.toDate()) },
|
|
1247
|
+
e("thead", {}, e("tr", {}, ...c.slice(0, 7).map((v) => e("th", { className: "dsh-calendar__weekday", key: v.day(), scope: "col" }, p.format(v.toDate()))))),
|
|
1248
|
+
e("tbody", {}, ...w)
|
|
1249
|
+
);
|
|
1250
|
+
}), u = n ? e("button", { type: "button", className: "dsh-calendar__heading", style: { background: "transparent", color: "inherit", textAlign: "start" }, "aria-expanded": s, onClick: () => a.year(!s) }, f) : e("button", { type: "button", className: "dsh-calendar__year-trigger arco-picker-header-label", "aria-expanded": s, "data-open": s || void 0, onClick: () => a.year(!s) }, e("span", {}, f), k("next")), h = Math.min(1900, Math.floor(i.year() / 100) * 100), O = Math.max(2099, Math.floor(i.year() / 100) * 100 + 99), A = s ? e("div", { className: "dsh-calendar__years", role: "listbox", "aria-label": "Year", tabIndex: -1, style: { top: "40px", height: `${28 + nt(i, o).length / 7 * 36}px` } }, ...Array.from({ length: O - h + 1 }, (Y, L) => {
|
|
1251
|
+
const $ = h + L;
|
|
1252
|
+
return e("button", {
|
|
1253
|
+
key: $,
|
|
1254
|
+
type: "button",
|
|
1255
|
+
className: "dsh-calendar__year",
|
|
1256
|
+
role: "option",
|
|
1257
|
+
"data-year": $,
|
|
1258
|
+
"aria-selected": $ === i.year(),
|
|
1259
|
+
"data-selected": $ === i.year() || void 0,
|
|
1260
|
+
tabIndex: $ === i.year() ? 0 : -1,
|
|
1261
|
+
onClick: () => a.yearSelect($),
|
|
1262
|
+
onKeyDown: (c) => {
|
|
1263
|
+
var T, x;
|
|
1264
|
+
if (c.key === "Escape") {
|
|
1265
|
+
c.preventDefault(), a.year(!1);
|
|
1266
|
+
return;
|
|
1267
|
+
}
|
|
1268
|
+
const w = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3 }[c.key];
|
|
1269
|
+
if (w === void 0 && c.key !== "Home" && c.key !== "End")
|
|
1270
|
+
return;
|
|
1271
|
+
c.preventDefault();
|
|
1272
|
+
const v = c.key === "Home" ? h : c.key === "End" ? O : Math.max(h, Math.min(O, $ + (w ?? 0)));
|
|
1273
|
+
(x = (T = c.target.closest(".dsh-calendar__years")) == null ? void 0 : T.querySelector(`[data-year="${v}"]`)) == null || x.focus();
|
|
1274
|
+
}
|
|
1275
|
+
}, $);
|
|
1276
|
+
})) : null;
|
|
1277
|
+
return e(
|
|
1278
|
+
"div",
|
|
1279
|
+
{ className: `dsh-calendar${n ? " dsh-calendar--range" : ""}`, "data-year-open": s || void 0 },
|
|
1280
|
+
e("div", { className: "dsh-calendar__header" }, l(-1), u, l(1)),
|
|
1281
|
+
e("div", { className: "dsh-calendar__grids" }, ...P),
|
|
1282
|
+
A
|
|
1283
|
+
);
|
|
1284
|
+
}
|
|
1285
|
+
const Mt = (e, t, ...a) => {
|
|
1286
|
+
const { className: i, fillRule: n, clipRule: r, suppressContentEditableWarning: o, onKeyDown: s, onBeforeInput: f, onMouseEnter: p, onBlur: d, ...k } = t;
|
|
1287
|
+
return m(e, { ...k, class: i, "fill-rule": n, "clip-rule": r, onKeydown: s, onBeforeinput: f, onMouseenter: p, onFocusout: d }, a);
|
|
1288
|
+
}, At = F({
|
|
1289
|
+
name: "DshCalendarPanel",
|
|
1290
|
+
props: {
|
|
1291
|
+
standalone: Boolean,
|
|
1292
|
+
range: Boolean,
|
|
1293
|
+
value: { type: Array, required: !0 },
|
|
1294
|
+
view: { type: Object, required: !0 },
|
|
1295
|
+
locale: { type: String, required: !0 },
|
|
1296
|
+
weekStart: Number,
|
|
1297
|
+
disabled: { type: Function, required: !0 },
|
|
1298
|
+
onSelect: { type: Function, required: !0 },
|
|
1299
|
+
onView: { type: Function, required: !0 }
|
|
1300
|
+
},
|
|
1301
|
+
setup(e) {
|
|
1302
|
+
const t = j(e.view.startOf("month")), a = j(e.value.at(-1) ?? e.view), i = q(!1), n = j(), r = j(), o = j();
|
|
1303
|
+
le(() => e.view.valueOf(), () => {
|
|
1304
|
+
t.value = e.view.startOf("month"), !a.value.isSame(t.value, "month") && !(e.range && a.value.isSame(t.value.add(1, "month"), "month")) && (a.value = e.view);
|
|
1305
|
+
});
|
|
1306
|
+
async function s(d) {
|
|
1307
|
+
var M, y;
|
|
1308
|
+
if (await ne(), d) {
|
|
1309
|
+
const P = document.activeElement;
|
|
1310
|
+
if (P !== d && !(P === document.body && (!d.isConnected || d.disabled)))
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
const k = i.value ? ".dsh-calendar__year[data-selected]" : '.dsh-calendar__cell[tabindex="0"]', l = ((M = o.value) == null ? void 0 : M.querySelector(k)) ?? ((y = o.value) == null ? void 0 : y.querySelector(".dsh-calendar__year-trigger, .dsh-calendar__heading"));
|
|
1314
|
+
l == null || l.focus({ preventScroll: !0 }), i.value && (l != null && l.parentElement) && (l.parentElement.scrollTop = Math.max(0, l.offsetTop - (l.parentElement.clientHeight - l.offsetHeight) / 2));
|
|
1315
|
+
}
|
|
1316
|
+
let f;
|
|
1317
|
+
Ft(() => {
|
|
1318
|
+
var d;
|
|
1319
|
+
f = ((d = o.value) == null ? void 0 : d.querySelector(".dsh-calendar__cell:focus")) ?? void 0;
|
|
1320
|
+
}), De(() => {
|
|
1321
|
+
f && s(f);
|
|
1322
|
+
}), fe(() => {
|
|
1323
|
+
e.standalone || s();
|
|
1324
|
+
}), le(i, () => {
|
|
1325
|
+
s();
|
|
1326
|
+
});
|
|
1327
|
+
const p = (d) => {
|
|
1328
|
+
e.onView(d);
|
|
1329
|
+
};
|
|
1330
|
+
return () => m("div", { ref: o, class: ["dsh-picker-popover", { "dsh-picker-popover--range": e.range, "dsh-calendar-standalone": e.standalone }] }, [Da(Mt, {
|
|
1331
|
+
month: t.value,
|
|
1332
|
+
focused: a.value,
|
|
1333
|
+
selected: e.value,
|
|
1334
|
+
anchor: n.value,
|
|
1335
|
+
hover: r.value,
|
|
1336
|
+
range: e.range,
|
|
1337
|
+
yearOpen: i.value,
|
|
1338
|
+
locale: e.locale,
|
|
1339
|
+
firstDay: e.weekStart ?? ba(e.locale),
|
|
1340
|
+
disabled: e.disabled
|
|
1341
|
+
}, {
|
|
1342
|
+
month: p,
|
|
1343
|
+
focus: (d) => {
|
|
1344
|
+
a.value = d;
|
|
1345
|
+
},
|
|
1346
|
+
year: (d) => {
|
|
1347
|
+
i.value = d;
|
|
1348
|
+
},
|
|
1349
|
+
hover: (d) => {
|
|
1350
|
+
n.value && (r.value = d);
|
|
1351
|
+
},
|
|
1352
|
+
yearSelect: (d) => {
|
|
1353
|
+
const k = t.value.year(d).date(Math.min(a.value.date(), t.value.year(d).daysInMonth()));
|
|
1354
|
+
a.value = k, p(k), i.value = !1;
|
|
1355
|
+
},
|
|
1356
|
+
select: (d) => {
|
|
1357
|
+
if (e.disabled(d))
|
|
1358
|
+
return;
|
|
1359
|
+
if (a.value = d, !e.range) {
|
|
1360
|
+
e.onSelect([d], !0);
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
if (!n.value) {
|
|
1364
|
+
n.value = d, r.value = d, e.onSelect([d], !1);
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
const k = kt(n.value, d);
|
|
1368
|
+
let l = k[0];
|
|
1369
|
+
for (; !l.isAfter(k[1], "day"); ) {
|
|
1370
|
+
if (e.disabled(l))
|
|
1371
|
+
return;
|
|
1372
|
+
l = l.add(1, "day");
|
|
1373
|
+
}
|
|
1374
|
+
n.value = void 0, r.value = void 0, e.onSelect(k, !0);
|
|
1375
|
+
}
|
|
1376
|
+
})]);
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
function $t(e) {
|
|
1380
|
+
const t = e ? ht : ft, a = F({
|
|
1381
|
+
name: e ? "DshRangePicker" : "DshDatePicker",
|
|
1382
|
+
inheritAttrs: !1,
|
|
1383
|
+
setup(i, { attrs: n, slots: r, expose: o }) {
|
|
1384
|
+
const s = se(), f = j(), p = j(), d = q(0), k = { parts: [], source: "", buffer: "" }, l = ($) => n[$] ?? n[$.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)], M = ($) => ue($, String(l("valueFormat") ?? (typeof l("format") == "string" ? l("format") : "YYYY-MM-DD"))), y = j(l("defaultValue")), P = q(!!l("defaultPopupVisible")), u = ($) => e && Array.isArray($) ? $[0] : $, h = j(M(u(l("pickerValue") ?? l("defaultPickerValue") ?? l("modelValue") ?? l("defaultValue"))) ?? ie()), O = G(() => l("modelValue") === void 0 ? y.value : l("modelValue")), A = ($, ...c) => {
|
|
1385
|
+
const w = n[$];
|
|
1386
|
+
Array.isArray(w) ? w.forEach((v) => {
|
|
1387
|
+
typeof v == "function" && v(...c);
|
|
1388
|
+
}) : typeof w == "function" && w(...c);
|
|
1389
|
+
};
|
|
1390
|
+
o(new Proxy({}, { get: ($, c) => {
|
|
1391
|
+
var w;
|
|
1392
|
+
return c === "focus" ? (v = 0) => {
|
|
1393
|
+
var T, x, _, V;
|
|
1394
|
+
p.value ? (x = (T = p.value.querySelectorAll(".dsh-date-input__field")[v]) == null ? void 0 : T.querySelector("[role=spinbutton]")) == null || x.focus() : (V = (_ = f.value) == null ? void 0 : _.focus) == null || V.call(_, v);
|
|
1395
|
+
} : c === "blur" ? () => {
|
|
1396
|
+
var v, T, x;
|
|
1397
|
+
p.value ? (v = p.value.querySelector(":focus")) == null || v.blur() : (x = (T = f.value) == null ? void 0 : T.blur) == null || x.call(T);
|
|
1398
|
+
} : (w = f.value) == null ? void 0 : w[c];
|
|
1399
|
+
}, has: ($, c) => f.value !== void 0 && (c === "focus" || c === "blur" || c in f.value) }));
|
|
1400
|
+
const Y = ($) => {
|
|
1401
|
+
P.value = $, A("onUpdate:popupVisible", $), A("onPopupVisibleChange", $);
|
|
1402
|
+
}, L = ($) => {
|
|
1403
|
+
const c = l("valueFormat") ?? (typeof l("format") == "string" ? l("format") : "YYYY-MM-DD");
|
|
1404
|
+
return c === "Date" ? $.toDate() : c === "timestamp" ? $.valueOf() : $.format(String(c));
|
|
1405
|
+
};
|
|
1406
|
+
return () => {
|
|
1407
|
+
var g;
|
|
1408
|
+
d.value;
|
|
1409
|
+
const $ = O.value, c = (e ? Array.isArray($) ? $ : [] : [$]).map(M).filter((b) => !!b), w = l("mode"), v = !!(l("panelRender") || l("showTime") || l("showNowBtn") === !0 || l("showConfirmBtn") || (g = l("shortcuts")) != null && g.length || r.extra || r.cell || l("utcOffset") !== void 0 || l("timezone") || w && w !== "date" || Array.isArray(l("disabled"))), T = l("triggerProps") ?? {}, x = () => m(At, {
|
|
1410
|
+
range: e,
|
|
1411
|
+
value: c,
|
|
1412
|
+
view: M(u(l("pickerValue"))) ?? h.value,
|
|
1413
|
+
locale: s.locale.value,
|
|
1414
|
+
weekStart: l("dayStartOfWeek"),
|
|
1415
|
+
disabled: (b) => {
|
|
1416
|
+
const D = l("disabledDate");
|
|
1417
|
+
return !!(D != null && D(b.toDate(), e ? c.length ? "end" : "start" : void 0));
|
|
1418
|
+
},
|
|
1419
|
+
onView: (b) => {
|
|
1420
|
+
l("pickerValue") === void 0 && (h.value = b);
|
|
1421
|
+
const D = e ? [b, b.add(1, "month")] : [b], B = D.map(L), E = D.map((H) => H.toDate()), I = D.map((H) => H.format("YYYY-MM-DD"));
|
|
1422
|
+
A("onPickerValueChange", e ? B : B[0], e ? E : E[0], e ? I : I[0]);
|
|
1423
|
+
},
|
|
1424
|
+
onSelect: (b, D) => {
|
|
1425
|
+
const B = b.map(L), E = b.map((R) => R.toDate()), I = b.map((R) => R.format(typeof l("format") == "string" ? String(l("format")) : "YYYY-MM-DD"));
|
|
1426
|
+
if (e && A("onSelect", B, E, I), !D)
|
|
1427
|
+
return;
|
|
1428
|
+
const H = e ? B : B[0];
|
|
1429
|
+
b.every((R, z) => {
|
|
1430
|
+
var U;
|
|
1431
|
+
return (U = c[z]) == null ? void 0 : U.isSame(R, "day");
|
|
1432
|
+
}) || (y.value = H, A("onUpdate:modelValue", H), A("onChange", H, e ? E : E[0], e ? I : I[0])), Y(!1);
|
|
1433
|
+
}
|
|
1434
|
+
}), _ = typeof l("format") == "string" ? String(l("format")) : s.locale.value.startsWith("en-US") ? "M/D/YYYY" : "YYYY-MM-DD", V = !v && !r.default && !r.prefix && !r["suffix-icon"] && !l("inputProps") && /^(?:YYYY|MM?|DD?|[\/\-.\s])+$/.test(_), C = (b) => {
|
|
1435
|
+
var B, E;
|
|
1436
|
+
if (b.length && b.some((I) => !I))
|
|
1437
|
+
return;
|
|
1438
|
+
const D = e ? b.map((I) => I ? L(I) : void 0) : b[0] ? L(b[0]) : void 0;
|
|
1439
|
+
y.value = D, A("onUpdate:modelValue", D), A("onChange", D, e ? b.map((I) => I == null ? void 0 : I.toDate()) : (B = b[0]) == null ? void 0 : B.toDate(), e ? b.map((I) => I == null ? void 0 : I.format(_)) : (E = b[0]) == null ? void 0 : E.format(_));
|
|
1440
|
+
}, S = V ? { ...r, default: () => {
|
|
1441
|
+
const b = fa(Mt, {
|
|
1442
|
+
dates: e ? [M(Array.isArray($) ? $[0] : void 0), M(Array.isArray($) ? $[1] : void 0)] : [M($)],
|
|
1443
|
+
range: e,
|
|
1444
|
+
format: _,
|
|
1445
|
+
label: String(l("aria-label") ?? "日期"),
|
|
1446
|
+
disabled: !!l("disabled"),
|
|
1447
|
+
readonly: !!(l("readonly") || l("disabledInput")),
|
|
1448
|
+
open: !!(l("popupVisible") ?? P.value),
|
|
1449
|
+
allowClear: l("allowClear") !== !1,
|
|
1450
|
+
draft: k,
|
|
1451
|
+
invalidate: () => {
|
|
1452
|
+
d.value++;
|
|
1453
|
+
},
|
|
1454
|
+
change: C,
|
|
1455
|
+
toggle: () => Y(!(l("popupVisible") ?? P.value)),
|
|
1456
|
+
disabledDate: (D) => {
|
|
1457
|
+
var B;
|
|
1458
|
+
return !!((B = l("disabledDate")) != null && B(D.toDate()));
|
|
1459
|
+
}
|
|
1460
|
+
});
|
|
1461
|
+
return m("div", { ref: p, class: n.class, style: n.style }, [b]);
|
|
1462
|
+
} } : r;
|
|
1463
|
+
return m(t, {
|
|
1464
|
+
...n,
|
|
1465
|
+
ref: f,
|
|
1466
|
+
modelValue: O.value,
|
|
1467
|
+
popupVisible: l("popupVisible") ?? P.value,
|
|
1468
|
+
triggerProps: { popupOffset: 8, ...T },
|
|
1469
|
+
panelRender: v ? l("panelRender") : x,
|
|
1470
|
+
"onUpdate:modelValue": (b) => {
|
|
1471
|
+
y.value = b, A("onUpdate:modelValue", b);
|
|
1472
|
+
},
|
|
1473
|
+
"onUpdate:popupVisible": (b) => {
|
|
1474
|
+
P.value = b, A("onUpdate:popupVisible", b);
|
|
1475
|
+
},
|
|
1476
|
+
onPopupVisibleChange: (b) => {
|
|
1477
|
+
P.value = b, A("onPopupVisibleChange", b);
|
|
1478
|
+
}
|
|
1479
|
+
}, S);
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
return Object.assign(a, { install(i, n) {
|
|
1484
|
+
if (e) {
|
|
1485
|
+
i.component(`${(n == null ? void 0 : n.componentPrefix) ?? "A"}RangePicker`, a);
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
const r = /* @__PURE__ */ new Map([[N.DatePicker, a], [N.RangePicker, xe], [N.MonthPicker, ke], [N.YearPicker, $e], [N.QuarterPicker, Me], [N.WeekPicker, Ae]]);
|
|
1489
|
+
function o(s, f) {
|
|
1490
|
+
return f === void 0 ? i.component(s) : i.component(s, r.get(f) ?? f);
|
|
1491
|
+
}
|
|
1492
|
+
N.DatePicker.install({ ...i, component: o }, n);
|
|
1493
|
+
} }), a;
|
|
1494
|
+
}
|
|
1495
|
+
const xe = $t(!0), Fa = xe, Sa = Object.assign($t(!1), { RangePicker: xe, MonthPicker: ke, YearPicker: $e, QuarterPicker: Me, WeekPicker: Ae }), xt = Object.assign(F({
|
|
1496
|
+
name: "DshCalendar",
|
|
1497
|
+
inheritAttrs: !1,
|
|
1498
|
+
setup(e, { attrs: t, slots: a }) {
|
|
1499
|
+
const { locale: i } = se(), n = ye(Fe, void 0), r = (p) => t[p] ?? t[p.replace(/[A-Z]/g, (d) => `-${d.toLowerCase()}`)], o = j(ue(r("defaultValue")) ?? ie().startOf("day")), s = j(ue(r("defaultPageShowDate")) ?? ue(r("modelValue")) ?? o.value), f = (p, d) => {
|
|
1500
|
+
const k = t[p];
|
|
1501
|
+
for (const l of Array.isArray(k) ? k : [k])
|
|
1502
|
+
typeof l == "function" && l(d);
|
|
1503
|
+
};
|
|
1504
|
+
return () => {
|
|
1505
|
+
var u, h, O;
|
|
1506
|
+
const p = ((u = n == null ? void 0 : n.locale) == null ? void 0 : u.locale) ?? i.value, d = (h = n == null ? void 0 : n.locale) == null ? void 0 : h.calendar, k = p === "en-US" ? { month: "MMM YYYY", year: "YYYY", days: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] } : p === "zh-CN" ? { month: "YYYY 年 MM 月", year: "YYYY 年", days: ["日", "一", "二", "三", "四", "五", "六"] } : void 0, l = d && (!k || d.formatMonth !== k.month || d.formatYear !== k.year || ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"].some((A, Y) => {
|
|
1507
|
+
var L, $;
|
|
1508
|
+
return (($ = (L = d.week) == null ? void 0 : L.short) == null ? void 0 : $[A]) !== k.days[Y];
|
|
1509
|
+
}) || Array.from({ length: 12 }, (A, Y) => new Date(2020, Y, 1)).some((A) => {
|
|
1510
|
+
var Y, L;
|
|
1511
|
+
return ((L = (Y = d.month) == null ? void 0 : Y.long) == null ? void 0 : L[new Intl.DateTimeFormat("en-US", { month: "long" }).format(A)]) !== new Intl.DateTimeFormat(p, { month: "long" }).format(A);
|
|
1512
|
+
}));
|
|
1513
|
+
if (r("panel") === void 0 || r("panel") === !1 || (r("mode") ?? r("defaultMode") ?? "month") !== "month" || ["headerRender", "dateRender", "dateInnerContent", "monthRender", "panelOperations", "panelWidth"].some((A) => r(A) !== void 0) || !!r("panelTodayBtn") || !!r("isWeek") || l || (n == null ? void 0 : n.rtl) || (n == null ? void 0 : n.prefixCls) && n.prefixCls !== "arco" || Object.keys(a).length > 0)
|
|
1514
|
+
return m(N.Calendar, t, a);
|
|
1515
|
+
const y = ue(r("modelValue")) ?? o.value, P = Object.fromEntries(Object.entries(t).filter(([A]) => ["id", "title", "role", "tabindex"].includes(A) || /^(aria-|data-)/.test(A) || /^on[A-Z]/.test(A) && !["onChange", "onPanelChange", "onUpdate:modelValue"].includes(A)));
|
|
1516
|
+
return m("div", { ...P, class: ["arco-calendar dsh-hero-calendar", t.class], style: t.style }, [m(At, {
|
|
1517
|
+
standalone: !0,
|
|
1518
|
+
range: !1,
|
|
1519
|
+
value: [y],
|
|
1520
|
+
view: ue(r("pageShowDate")) ?? s.value,
|
|
1521
|
+
locale: ((O = n == null ? void 0 : n.locale) == null ? void 0 : O.locale) ?? i.value,
|
|
1522
|
+
weekStart: r("dayStartOfWeek") ?? 0,
|
|
1523
|
+
disabled: (A) => {
|
|
1524
|
+
var Y;
|
|
1525
|
+
return !!((Y = r("disabledDate")) != null && Y(A));
|
|
1526
|
+
},
|
|
1527
|
+
onView: (A) => {
|
|
1528
|
+
r("pageShowDate") === void 0 && (s.value = A), f("onPanelChange", A.toDate());
|
|
1529
|
+
},
|
|
1530
|
+
onSelect: (A) => {
|
|
1531
|
+
if (r("allowSelect") === !1)
|
|
1532
|
+
return;
|
|
1533
|
+
const Y = A[0];
|
|
1534
|
+
o.value = Y, r("pageShowDate") === void 0 && (s.value = Y), f("onUpdate:modelValue", Y.toDate()), f("onChange", Y.toDate()), f("onPanelChange", Y.toDate());
|
|
1535
|
+
}
|
|
1536
|
+
})]);
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
}), { install(e, t) {
|
|
1540
|
+
function a(i, n) {
|
|
1541
|
+
return n === void 0 ? e.component(i) : e.component(i, n === N.Calendar ? xt : n);
|
|
1542
|
+
}
|
|
1543
|
+
N.Calendar.install({ ...e, component: a }, t);
|
|
1544
|
+
} }), Ha = /* @__PURE__ */ Ht({
|
|
1545
|
+
__proto__: null,
|
|
1546
|
+
Alert: Wt,
|
|
1547
|
+
AutoComplete: ct,
|
|
1548
|
+
Calendar: xt,
|
|
1549
|
+
Cascader: dt,
|
|
1550
|
+
ColorPicker: Ee,
|
|
1551
|
+
DatePicker: Sa,
|
|
1552
|
+
Dropdown: mt,
|
|
1553
|
+
DropdownButton: pt,
|
|
1554
|
+
Dsubmenu: vt,
|
|
1555
|
+
Image: yt,
|
|
1556
|
+
ImagePreview: wt,
|
|
1557
|
+
ImagePreviewGroup: Dt,
|
|
1558
|
+
InputNumber: Ut,
|
|
1559
|
+
InputTag: jt,
|
|
1560
|
+
Mention: la,
|
|
1561
|
+
Menu: bt,
|
|
1562
|
+
MonthPicker: ke,
|
|
1563
|
+
Popconfirm: ra,
|
|
1564
|
+
Popover: na,
|
|
1565
|
+
Progress: qt,
|
|
1566
|
+
QuarterPicker: Me,
|
|
1567
|
+
RangePicker: xe,
|
|
1568
|
+
Result: zt,
|
|
1569
|
+
Select: gt,
|
|
1570
|
+
Spin: He,
|
|
1571
|
+
Tag: Kt,
|
|
1572
|
+
TimePicker: ta,
|
|
1573
|
+
Tooltip: aa,
|
|
1574
|
+
Tree: Zt,
|
|
1575
|
+
TreeSelect: ea,
|
|
1576
|
+
Trigger: oa,
|
|
1577
|
+
WeekPicker: Ae,
|
|
1578
|
+
YearPicker: $e,
|
|
1579
|
+
default: Vt
|
|
1580
|
+
}, [N]), Ra = F({
|
|
1581
|
+
name: "DshAccordion",
|
|
1582
|
+
setup(e, { attrs: t, slots: a }) {
|
|
1583
|
+
return () => m(Ot, { accordion: !0, ...t }, a);
|
|
1584
|
+
}
|
|
1585
|
+
}), qa = F({
|
|
1586
|
+
name: "DshSwitchGroup",
|
|
1587
|
+
props: { label: String, disabled: Boolean, orientation: { type: String, default: "vertical" } },
|
|
1588
|
+
setup(e, { slots: t }) {
|
|
1589
|
+
return () => {
|
|
1590
|
+
var a;
|
|
1591
|
+
return m("fieldset", { class: "dsh-switch-group", disabled: e.disabled, "data-orientation": e.orientation }, [
|
|
1592
|
+
e.label ? m("legend", e.label) : null,
|
|
1593
|
+
(a = t.default) == null ? void 0 : a.call(t)
|
|
1594
|
+
]);
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
}), ja = F({
|
|
1598
|
+
name: "DshSpinner",
|
|
1599
|
+
props: { label: { type: String, default: "正在加载" } },
|
|
1600
|
+
setup(e, { attrs: t, slots: a }) {
|
|
1601
|
+
return () => m(He, { ...t, loading: !0, role: "status", "aria-label": e.label }, a);
|
|
1602
|
+
}
|
|
1603
|
+
}), ka = F({
|
|
1604
|
+
name: "DshButton",
|
|
1605
|
+
inheritAttrs: !1,
|
|
1606
|
+
props: {
|
|
1607
|
+
type: String,
|
|
1608
|
+
shape: String,
|
|
1609
|
+
status: String,
|
|
1610
|
+
htmlType: { type: String, default: "button" },
|
|
1611
|
+
href: String,
|
|
1612
|
+
autofocus: Boolean,
|
|
1613
|
+
long: Boolean,
|
|
1614
|
+
loadingFixedWidth: Boolean,
|
|
1615
|
+
variant: { type: String, default: "primary" },
|
|
1616
|
+
size: { type: String, default: "md" },
|
|
1617
|
+
radius: String,
|
|
1618
|
+
disabled: Boolean,
|
|
1619
|
+
loading: Boolean,
|
|
1620
|
+
iconOnly: Boolean,
|
|
1621
|
+
block: Boolean
|
|
1622
|
+
},
|
|
1623
|
+
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
1624
|
+
const n = q();
|
|
1625
|
+
return i({ focus: () => {
|
|
1626
|
+
var r, o;
|
|
1627
|
+
return (o = (r = n.value) == null ? void 0 : r.$el) == null ? void 0 : o.focus();
|
|
1628
|
+
}, blur: () => {
|
|
1629
|
+
var r, o;
|
|
1630
|
+
return (o = (r = n.value) == null ? void 0 : r.$el) == null ? void 0 : o.blur();
|
|
1631
|
+
} }), () => m(Yt, {
|
|
1632
|
+
...e,
|
|
1633
|
+
...t,
|
|
1634
|
+
ref: n,
|
|
1635
|
+
class: ["dsh-button", t.class],
|
|
1636
|
+
"data-variant": e.variant,
|
|
1637
|
+
"data-size": e.size,
|
|
1638
|
+
"data-radius": e.radius,
|
|
1639
|
+
"data-icon-only": e.iconOnly || void 0,
|
|
1640
|
+
type: e.type ?? (e.variant === "primary" || e.variant === "danger" ? "primary" : "secondary"),
|
|
1641
|
+
size: { sm: "small", md: "medium", lg: "large" }[e.size],
|
|
1642
|
+
disabled: e.disabled,
|
|
1643
|
+
loading: e.loading,
|
|
1644
|
+
long: e.block || e.long,
|
|
1645
|
+
"aria-busy": e.loading || void 0
|
|
1646
|
+
}, { ...a, default: () => {
|
|
1647
|
+
var r, o, s;
|
|
1648
|
+
return [(r = a.startContent) == null ? void 0 : r.call(a), (o = a.default) == null ? void 0 : o.call(a), (s = a.endContent) == null ? void 0 : s.call(a)];
|
|
1649
|
+
} });
|
|
1650
|
+
}
|
|
1651
|
+
}), Wa = F({
|
|
1652
|
+
name: "DshCloseButton",
|
|
1653
|
+
setup(e, { attrs: t }) {
|
|
1654
|
+
return () => m(ka, { variant: "ghost", iconOnly: !0, "aria-label": "关闭", ...t }, () => "×");
|
|
1655
|
+
}
|
|
1656
|
+
}), qe = {
|
|
1657
|
+
value: Number,
|
|
1658
|
+
min: { type: Number, default: 0 },
|
|
1659
|
+
max: { type: Number, default: 100 },
|
|
1660
|
+
label: String,
|
|
1661
|
+
showValue: Boolean
|
|
1662
|
+
};
|
|
1663
|
+
function je(e, t, a) {
|
|
1664
|
+
if (!Number.isFinite(t) || !Number.isFinite(a) || a <= t)
|
|
1665
|
+
throw new RangeError("进度最大值必须大于最小值且均为有限数值");
|
|
1666
|
+
if (e === void 0)
|
|
1667
|
+
return 0;
|
|
1668
|
+
if (!Number.isFinite(e))
|
|
1669
|
+
throw new RangeError("进度值必须是有限数值");
|
|
1670
|
+
return Math.min(1, Math.max(0, (e - t) / (a - t)));
|
|
1671
|
+
}
|
|
1672
|
+
const za = F({
|
|
1673
|
+
name: "DshProgressBar",
|
|
1674
|
+
props: qe,
|
|
1675
|
+
setup(e, { attrs: t }) {
|
|
1676
|
+
return () => {
|
|
1677
|
+
const a = je(e.value, e.min, e.max);
|
|
1678
|
+
return m("div", {
|
|
1679
|
+
...t,
|
|
1680
|
+
class: ["dsh-progress", t.class],
|
|
1681
|
+
role: "progressbar",
|
|
1682
|
+
"aria-label": e.label ?? t["aria-label"],
|
|
1683
|
+
"aria-valuemin": e.min,
|
|
1684
|
+
"aria-valuemax": e.max,
|
|
1685
|
+
"aria-valuenow": e.value === void 0 ? void 0 : e.min + a * (e.max - e.min),
|
|
1686
|
+
"data-indeterminate": e.value === void 0 || void 0
|
|
1687
|
+
}, [e.label ? m("span", e.label) : null, m("div", { class: "dsh-progress__track" }, [
|
|
1688
|
+
m("div", { class: "dsh-progress__fill", style: { width: `${a * 100}%` } })
|
|
1689
|
+
]), e.showValue && e.value !== void 0 ? m("span", `${Math.round(a * 100)}%`) : null]);
|
|
1690
|
+
};
|
|
1691
|
+
}
|
|
1692
|
+
}), Ua = F({
|
|
1693
|
+
name: "DshProgressCircle",
|
|
1694
|
+
props: qe,
|
|
1695
|
+
setup(e, { attrs: t }) {
|
|
1696
|
+
return () => {
|
|
1697
|
+
const a = je(e.value, e.min, e.max);
|
|
1698
|
+
return m("div", {
|
|
1699
|
+
...t,
|
|
1700
|
+
class: ["dsh-progress-circle", t.class],
|
|
1701
|
+
role: "progressbar",
|
|
1702
|
+
"aria-label": e.label ?? t["aria-label"],
|
|
1703
|
+
"aria-valuemin": e.min,
|
|
1704
|
+
"aria-valuemax": e.max,
|
|
1705
|
+
"aria-valuenow": e.value === void 0 ? void 0 : e.min + a * (e.max - e.min),
|
|
1706
|
+
"data-indeterminate": e.value === void 0 || void 0
|
|
1707
|
+
}, [m("svg", { viewBox: "0 0 40 40", "aria-hidden": "true" }, [
|
|
1708
|
+
m("circle", { cx: 20, cy: 20, r: 17, class: "dsh-progress-circle__track" }),
|
|
1709
|
+
m("circle", {
|
|
1710
|
+
cx: 20,
|
|
1711
|
+
cy: 20,
|
|
1712
|
+
r: 17,
|
|
1713
|
+
pathLength: 100,
|
|
1714
|
+
class: "dsh-progress-circle__fill",
|
|
1715
|
+
"stroke-dasharray": `${e.value === void 0 ? 25 : a * 100} 100`
|
|
1716
|
+
})
|
|
1717
|
+
]), e.showValue && e.value !== void 0 ? m("span", `${Math.round(a * 100)}%`) : null]);
|
|
1718
|
+
};
|
|
1719
|
+
}
|
|
1720
|
+
}), Ka = F({
|
|
1721
|
+
name: "DshMeter",
|
|
1722
|
+
props: { ...qe, value: { type: Number, required: !0 } },
|
|
1723
|
+
setup(e, { attrs: t }) {
|
|
1724
|
+
return () => {
|
|
1725
|
+
const a = je(e.value, e.min, e.max);
|
|
1726
|
+
return m("div", {
|
|
1727
|
+
...t,
|
|
1728
|
+
role: "meter",
|
|
1729
|
+
class: ["dsh-meter", t.class],
|
|
1730
|
+
"aria-label": e.label ?? t["aria-label"],
|
|
1731
|
+
"aria-valuemin": e.min,
|
|
1732
|
+
"aria-valuemax": e.max,
|
|
1733
|
+
"aria-valuenow": e.min + a * (e.max - e.min)
|
|
1734
|
+
}, [e.label ? m("span", e.label) : null, m("div", { class: "dsh-progress__track" }, [
|
|
1735
|
+
m("div", { class: "dsh-progress__fill", style: { width: `${a * 100}%` } })
|
|
1736
|
+
]), e.showValue ? m("span", String(e.value)) : null]);
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
}), Ma = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', ae = [];
|
|
1740
|
+
function We(e, t, a) {
|
|
1741
|
+
return F({
|
|
1742
|
+
name: e,
|
|
1743
|
+
inheritAttrs: !1,
|
|
1744
|
+
props: {
|
|
1745
|
+
visible: { type: Boolean, default: void 0 },
|
|
1746
|
+
defaultVisible: Boolean,
|
|
1747
|
+
title: String,
|
|
1748
|
+
label: String,
|
|
1749
|
+
escToClose: { type: Boolean, default: !0 },
|
|
1750
|
+
maskClosable: { type: Boolean, default: void 0 },
|
|
1751
|
+
popupContainer: { type: [String, Object] }
|
|
1752
|
+
},
|
|
1753
|
+
emits: ["update:visible", "ok", "cancel", "open", "close", "beforeOpen", "beforeClose"],
|
|
1754
|
+
setup(i, { attrs: n, slots: r, emit: o, expose: s }) {
|
|
1755
|
+
const f = se(), p = j();
|
|
1756
|
+
Jt(p);
|
|
1757
|
+
const d = q(i.defaultVisible), k = G(() => i.visible ?? d.value), l = `dsh-dialog-${we().replace(/[^a-zA-Z0-9_-]/g, "")}`, M = `${l}-title`;
|
|
1758
|
+
let y, P, u;
|
|
1759
|
+
le(f.container, ($) => {
|
|
1760
|
+
var c;
|
|
1761
|
+
if ((c = p.value) == null || c.remove(), $) {
|
|
1762
|
+
const w = document.createElement("div");
|
|
1763
|
+
w.dataset.dshDialogOwner = l, $.appendChild(w), p.value = w;
|
|
1764
|
+
} else
|
|
1765
|
+
p.value = void 0;
|
|
1766
|
+
}, { immediate: !0, flush: "post" });
|
|
1767
|
+
const h = ($) => {
|
|
1768
|
+
d.value = $, o("update:visible", $);
|
|
1769
|
+
}, O = () => h(!1), A = () => h(!0);
|
|
1770
|
+
s({ open: A, close: O });
|
|
1771
|
+
const Y = ($) => {
|
|
1772
|
+
if (u == null || u(), u = void 0, y) {
|
|
1773
|
+
const c = ae.indexOf(y);
|
|
1774
|
+
c >= 0 && ae.splice(c, 1);
|
|
1775
|
+
}
|
|
1776
|
+
y = void 0, P != null && P.isConnected && P.focus(), P = void 0;
|
|
1777
|
+
}, L = () => {
|
|
1778
|
+
const $ = typeof i.popupContainer == "string" ? document.querySelector(i.popupContainer) : i.popupContainer ?? f.container.value;
|
|
1779
|
+
if (y = ($ == null ? void 0 : $.querySelector(t ? `.${l} .arco-drawer` : `.${l}`)) ?? void 0, !y || ae.includes(y))
|
|
1780
|
+
return;
|
|
1781
|
+
const c = y;
|
|
1782
|
+
c.id = l, ae.push(c), c.setAttribute("role", a ? "alertdialog" : "dialog"), c.setAttribute("aria-modal", "true"), c.tabIndex = -1, i.label ? c.setAttribute("aria-label", i.label) : (i.title || r.header || r.title) && c.setAttribute("aria-labelledby", M);
|
|
1783
|
+
const w = c.querySelector(".arco-modal-close-btn, .arco-drawer-close-btn");
|
|
1784
|
+
w && (w.tabIndex = 0, w.setAttribute("aria-label", "关闭"));
|
|
1785
|
+
const v = () => Array.from(c.querySelectorAll(Ma)).filter((V) => V.getClientRects().length > 0 && V.getAttribute("aria-hidden") !== "true" && !V.closest("[inert]")), T = (V) => {
|
|
1786
|
+
if (ae[ae.length - 1] !== c || (w && V.target === w && (V.key === "Enter" || V.key === " ") && (V.preventDefault(), w.click()), V.key !== "Tab"))
|
|
1787
|
+
return;
|
|
1788
|
+
const C = v(), S = C[0], g = C[C.length - 1];
|
|
1789
|
+
!S || !g ? (V.preventDefault(), c.focus()) : V.shiftKey && (document.activeElement === S || document.activeElement === c) ? (V.preventDefault(), g.focus()) : !V.shiftKey && (document.activeElement === g || document.activeElement === c) && (V.preventDefault(), S.focus());
|
|
1790
|
+
}, x = (V) => {
|
|
1791
|
+
var S;
|
|
1792
|
+
const C = V.target instanceof Element ? V.target.closest(".arco-trigger-popup") : null;
|
|
1793
|
+
C && ((S = p.value) != null && S.contains(C)) || ae[ae.length - 1] === c && V.target instanceof Node && !c.contains(V.target) && (v()[0] ?? c).focus();
|
|
1794
|
+
};
|
|
1795
|
+
c.addEventListener("keydown", T), document.addEventListener("focusin", x), u = () => {
|
|
1796
|
+
c.removeEventListener("keydown", T), document.removeEventListener("focusin", x);
|
|
1797
|
+
}, (c.querySelector("[autofocus]") ?? c).focus();
|
|
1798
|
+
};
|
|
1799
|
+
return le(k, async ($) => {
|
|
1800
|
+
$ && typeof document < "u" ? (P = document.activeElement instanceof HTMLElement ? document.activeElement : void 0, await ne(), L()) : $ || Y();
|
|
1801
|
+
}, { immediate: !0, flush: "post" }), Se(() => {
|
|
1802
|
+
var $;
|
|
1803
|
+
Y(), ($ = p.value) == null || $.remove();
|
|
1804
|
+
}), () => {
|
|
1805
|
+
var T, x;
|
|
1806
|
+
const $ = { open: A, close: O, visible: k.value }, c = {
|
|
1807
|
+
...n,
|
|
1808
|
+
visible: k.value,
|
|
1809
|
+
title: i.title,
|
|
1810
|
+
popupContainer: i.popupContainer ?? f.container.value,
|
|
1811
|
+
escToClose: i.escToClose,
|
|
1812
|
+
maskClosable: i.maskClosable ?? !a,
|
|
1813
|
+
"onUpdate:visible": h,
|
|
1814
|
+
onOk: (_) => o("ok", _),
|
|
1815
|
+
onCancel: (_) => o("cancel", _),
|
|
1816
|
+
onOpen: () => {
|
|
1817
|
+
L(), o("open");
|
|
1818
|
+
},
|
|
1819
|
+
onClose: () => {
|
|
1820
|
+
Y(), o("close");
|
|
1821
|
+
},
|
|
1822
|
+
onBeforeOpen: () => o("beforeOpen"),
|
|
1823
|
+
onBeforeClose: () => o("beforeClose")
|
|
1824
|
+
}, w = {
|
|
1825
|
+
...r,
|
|
1826
|
+
trigger: void 0,
|
|
1827
|
+
title: i.title || r.header || r.title ? () => {
|
|
1828
|
+
var _, V;
|
|
1829
|
+
return m("span", { id: M }, ((_ = r.header) == null ? void 0 : _.call(r, $)) ?? ((V = r.title) == null ? void 0 : V.call(r, $)) ?? i.title);
|
|
1830
|
+
} : void 0,
|
|
1831
|
+
header: t && r.header ? () => {
|
|
1832
|
+
var _;
|
|
1833
|
+
return m("div", { id: M }, (_ = r.header) == null ? void 0 : _.call(r, $));
|
|
1834
|
+
} : void 0,
|
|
1835
|
+
default: () => m(ot, { outerClass: "dsh-overlay-scroll", style: { maxHeight: "inherit", overflow: "auto" } }, {
|
|
1836
|
+
default: () => {
|
|
1837
|
+
var _;
|
|
1838
|
+
return (_ = r.default) == null ? void 0 : _.call(r, $);
|
|
1839
|
+
}
|
|
1840
|
+
}),
|
|
1841
|
+
footer: r.footer ? () => {
|
|
1842
|
+
var _;
|
|
1843
|
+
return (_ = r.footer) == null ? void 0 : _.call(r, $);
|
|
1844
|
+
} : void 0
|
|
1845
|
+
};
|
|
1846
|
+
return [(x = (T = r.trigger) == null ? void 0 : T.call(r, $)) == null ? void 0 : x.map((_) => st(_) ? Be(_, {
|
|
1847
|
+
"aria-haspopup": "dialog",
|
|
1848
|
+
"aria-expanded": k.value,
|
|
1849
|
+
"aria-controls": l,
|
|
1850
|
+
class: { "dsh-overlay-trigger-open": k.value },
|
|
1851
|
+
onClick: (V) => {
|
|
1852
|
+
V.defaultPrevented || A();
|
|
1853
|
+
}
|
|
1854
|
+
}) : _), f.container.value ? t ? m(Lt, {
|
|
1855
|
+
...c,
|
|
1856
|
+
width: typeof n.width == "string" || typeof n.width == "number" ? n.width : "var(--dsh-drawer-width)",
|
|
1857
|
+
height: typeof n.height == "string" || typeof n.height == "number" ? n.height : "auto",
|
|
1858
|
+
class: ["dsh-drawer", `dsh-drawer-${n.placement === "top" || n.placement === "bottom" ? n.placement : "side"}`, l, n.class]
|
|
1859
|
+
}, w) : m(It, { ...c, alignCenter: !0, modalClass: ["dsh-modal", l, n.modalClass] }, w) : null];
|
|
1860
|
+
};
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
const Aa = We("DshModal", !1, !1), $a = We("DshDrawer", !0, !1), Za = We("DshAlertDialog", !1, !0);
|
|
1865
|
+
function xa() {
|
|
1866
|
+
return se().toast;
|
|
1867
|
+
}
|
|
1868
|
+
function Ga() {
|
|
1869
|
+
const e = xa(), t = (i) => (n) => e.show({
|
|
1870
|
+
...typeof n == "string" ? { content: n } : n,
|
|
1871
|
+
kind: "message",
|
|
1872
|
+
type: i
|
|
1873
|
+
}), a = (i) => (n) => e.show({
|
|
1874
|
+
position: "topRight",
|
|
1875
|
+
...typeof n == "string" ? { content: n } : n,
|
|
1876
|
+
kind: "notification",
|
|
1877
|
+
type: i
|
|
1878
|
+
});
|
|
1879
|
+
return {
|
|
1880
|
+
message: {
|
|
1881
|
+
info: t("info"),
|
|
1882
|
+
success: t("success"),
|
|
1883
|
+
warning: t("warning"),
|
|
1884
|
+
error: t("error"),
|
|
1885
|
+
loading: t("loading"),
|
|
1886
|
+
normal: t("normal"),
|
|
1887
|
+
clear: (i) => e.clear(i, "message")
|
|
1888
|
+
},
|
|
1889
|
+
notification: {
|
|
1890
|
+
info: a("info"),
|
|
1891
|
+
success: a("success"),
|
|
1892
|
+
warning: a("warning"),
|
|
1893
|
+
error: a("error"),
|
|
1894
|
+
remove: (i) => e.remove(i, "notification"),
|
|
1895
|
+
clear: (i) => e.clear(i, "notification")
|
|
1896
|
+
}
|
|
1897
|
+
};
|
|
1898
|
+
}
|
|
1899
|
+
const rt = /* @__PURE__ */ new WeakMap();
|
|
1900
|
+
function Qa() {
|
|
1901
|
+
const e = se(), t = rt.get(e.mountOverlay);
|
|
1902
|
+
if (t)
|
|
1903
|
+
return t;
|
|
1904
|
+
const a = {}, i = /* @__PURE__ */ new Set(), n = (s) => {
|
|
1905
|
+
const f = be({ ...a, ...s, visible: !0 });
|
|
1906
|
+
let p = !1;
|
|
1907
|
+
const d = () => {
|
|
1908
|
+
var l;
|
|
1909
|
+
p || (p = !0, i.delete(d), k(), (l = f.onClose) == null || l.call(f));
|
|
1910
|
+
}, k = e.mountOverlay(() => {
|
|
1911
|
+
const { title: l, content: M, footer: y, ...P } = f;
|
|
1912
|
+
return m(Aa, {
|
|
1913
|
+
...P,
|
|
1914
|
+
footer: typeof y == "boolean" ? y : !0,
|
|
1915
|
+
"onUpdate:visible": (u) => {
|
|
1916
|
+
f.visible = u;
|
|
1917
|
+
},
|
|
1918
|
+
onClose: d
|
|
1919
|
+
}, {
|
|
1920
|
+
title: l === void 0 ? void 0 : () => typeof l == "function" ? l() : l,
|
|
1921
|
+
default: () => typeof M == "function" ? M() : M,
|
|
1922
|
+
footer: y !== void 0 && typeof y != "boolean" ? () => typeof y == "function" ? y() : y : void 0
|
|
1923
|
+
});
|
|
1924
|
+
});
|
|
1925
|
+
return i.add(d), { close: d, update: (l) => Object.assign(f, l) };
|
|
1926
|
+
}, o = {
|
|
1927
|
+
modal: {
|
|
1928
|
+
open: n,
|
|
1929
|
+
confirm: (s) => n({ maskClosable: !1, ...s }),
|
|
1930
|
+
info: (s) => n({ hideCancel: !0, ...s, messageType: "info" }),
|
|
1931
|
+
success: (s) => n({ hideCancel: !0, ...s, messageType: "success" }),
|
|
1932
|
+
warning: (s) => n({ hideCancel: !0, ...s, messageType: "warning" }),
|
|
1933
|
+
error: (s) => n({ hideCancel: !0, ...s, messageType: "error" }),
|
|
1934
|
+
config: (s) => {
|
|
1935
|
+
Object.assign(a, s);
|
|
1936
|
+
},
|
|
1937
|
+
destroyAll: () => [...i].forEach((s) => s())
|
|
1938
|
+
},
|
|
1939
|
+
drawer: { open: (s) => {
|
|
1940
|
+
const f = be({ ...s, visible: !0 });
|
|
1941
|
+
let p = !1;
|
|
1942
|
+
const d = () => {
|
|
1943
|
+
var l;
|
|
1944
|
+
p || (p = !0, k(), (l = f.onClose) == null || l.call(f));
|
|
1945
|
+
}, k = e.mountOverlay(() => {
|
|
1946
|
+
const { title: l, content: M, footer: y, header: P, ...u } = f;
|
|
1947
|
+
return m($a, {
|
|
1948
|
+
...u,
|
|
1949
|
+
header: typeof P == "boolean" ? P : !0,
|
|
1950
|
+
footer: typeof y == "boolean" ? y : !0,
|
|
1951
|
+
"onUpdate:visible": (h) => {
|
|
1952
|
+
f.visible = h;
|
|
1953
|
+
},
|
|
1954
|
+
onClose: d
|
|
1955
|
+
}, {
|
|
1956
|
+
title: l === void 0 ? void 0 : () => typeof l == "function" ? l() : l,
|
|
1957
|
+
default: () => typeof M == "function" ? M() : M,
|
|
1958
|
+
header: P !== void 0 && typeof P != "boolean" ? () => typeof P == "function" ? P() : P : void 0,
|
|
1959
|
+
footer: y !== void 0 && typeof y != "boolean" ? () => typeof y == "function" ? y() : y : void 0
|
|
1960
|
+
});
|
|
1961
|
+
});
|
|
1962
|
+
return { close: d, update: (l) => Object.assign(f, l) };
|
|
1963
|
+
} }
|
|
1964
|
+
};
|
|
1965
|
+
return rt.set(e.mountOverlay, o), o;
|
|
1966
|
+
}
|
|
1967
|
+
function he(e, t, a, i = !0) {
|
|
1968
|
+
const n = e.flatMap((f, p) => f.disabled ? [] : [p]);
|
|
1969
|
+
if (n.length === 0)
|
|
1970
|
+
return -1;
|
|
1971
|
+
if (a === "Home")
|
|
1972
|
+
return n[0];
|
|
1973
|
+
if (a === "End")
|
|
1974
|
+
return n[n.length - 1];
|
|
1975
|
+
const r = a === "ArrowDown" || a === "ArrowRight" ? 1 : a === "ArrowUp" || a === "ArrowLeft" ? -1 : 0;
|
|
1976
|
+
if (r === 0)
|
|
1977
|
+
return t;
|
|
1978
|
+
const o = n.indexOf(t);
|
|
1979
|
+
if (o === -1)
|
|
1980
|
+
return r > 0 ? n[0] : n[n.length - 1];
|
|
1981
|
+
const s = o + r;
|
|
1982
|
+
return n[i ? (s + n.length) % n.length : Math.max(0, Math.min(n.length - 1, s))];
|
|
1983
|
+
}
|
|
1984
|
+
function Ca(e, t, a) {
|
|
1985
|
+
const i = a.trim().toLocaleLowerCase();
|
|
1986
|
+
if (i.length === 0)
|
|
1987
|
+
return -1;
|
|
1988
|
+
for (let n = 1; n <= e.length; n += 1) {
|
|
1989
|
+
const r = (t + n + e.length) % e.length, o = e[r];
|
|
1990
|
+
if (!o.disabled && o.label.toLocaleLowerCase().startsWith(i))
|
|
1991
|
+
return r;
|
|
1992
|
+
}
|
|
1993
|
+
return -1;
|
|
1994
|
+
}
|
|
1995
|
+
function Ct(e, t, a, i) {
|
|
1996
|
+
const n = Array.isArray(e) ? e : e === void 0 ? [] : [e], r = n.includes(t);
|
|
1997
|
+
return a ? r ? !i && n.length === 1 ? [...n] : n.filter((o) => o !== t) : [...n, t] : r && i ? void 0 : t;
|
|
1998
|
+
}
|
|
1999
|
+
function ce(e, t, a) {
|
|
2000
|
+
return (a ? e.replace(/[^0-9]/g, "") : e).slice(0, t);
|
|
2001
|
+
}
|
|
2002
|
+
function Pa(e, t, a, i, n, r) {
|
|
2003
|
+
const o = ce(t, n, r), s = ce(e.slice(0, a) + o + e.slice(i), n, r);
|
|
2004
|
+
return { value: s, cursor: Math.min(a + o.length, s.length) };
|
|
2005
|
+
}
|
|
2006
|
+
function ze() {
|
|
2007
|
+
var t;
|
|
2008
|
+
const e = ((t = ut()) == null ? void 0 : t.vnode.props) ?? {};
|
|
2009
|
+
return "modelValue" in e || "model-value" in e;
|
|
2010
|
+
}
|
|
2011
|
+
const Ja = F({
|
|
2012
|
+
name: "DshLink",
|
|
2013
|
+
inheritAttrs: !1,
|
|
2014
|
+
props: { href: String, disabled: Boolean, external: Boolean },
|
|
2015
|
+
emits: ["click"],
|
|
2016
|
+
setup(e, { attrs: t, slots: a, emit: i }) {
|
|
2017
|
+
return () => {
|
|
2018
|
+
var n;
|
|
2019
|
+
return m("a", {
|
|
2020
|
+
...t,
|
|
2021
|
+
class: ["dsh-link", t.class],
|
|
2022
|
+
role: "link",
|
|
2023
|
+
href: e.disabled ? void 0 : e.href,
|
|
2024
|
+
target: e.disabled ? void 0 : e.external ? "_blank" : t.target,
|
|
2025
|
+
rel: e.external || t.target === "_blank" ? `${t.rel ?? ""} noopener noreferrer`.trim() : t.rel,
|
|
2026
|
+
tabindex: e.disabled ? -1 : t.tabindex,
|
|
2027
|
+
"aria-disabled": e.disabled || void 0,
|
|
2028
|
+
onClick(r) {
|
|
2029
|
+
if (e.disabled) {
|
|
2030
|
+
r.preventDefault(), r.stopImmediatePropagation();
|
|
2031
|
+
return;
|
|
2032
|
+
}
|
|
2033
|
+
i("click", r);
|
|
2034
|
+
}
|
|
2035
|
+
}, (n = a.default) == null ? void 0 : n.call(a));
|
|
2036
|
+
};
|
|
2037
|
+
}
|
|
2038
|
+
}), Xa = F({
|
|
2039
|
+
name: "DshKbd",
|
|
2040
|
+
props: { keys: { type: Array, default: () => [] } },
|
|
2041
|
+
setup(e, { slots: t }) {
|
|
2042
|
+
return () => {
|
|
2043
|
+
var a;
|
|
2044
|
+
return m("kbd", { class: "dsh-kbd" }, [
|
|
2045
|
+
...e.keys.map((i) => m("span", { class: "dsh-kbd__key", key: i }, i)),
|
|
2046
|
+
(a = t.default) == null ? void 0 : a.call(t)
|
|
2047
|
+
]);
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
2050
|
+
}), en = F({
|
|
2051
|
+
name: "DshSurface",
|
|
2052
|
+
props: {
|
|
2053
|
+
as: { type: String, default: "div" },
|
|
2054
|
+
variant: { type: String, default: "default" }
|
|
2055
|
+
},
|
|
2056
|
+
setup(e, { slots: t }) {
|
|
2057
|
+
return () => {
|
|
2058
|
+
var a;
|
|
2059
|
+
return m(e.as, { class: "dsh-surface", "data-variant": e.variant }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2060
|
+
};
|
|
2061
|
+
}
|
|
2062
|
+
}), tn = F({
|
|
2063
|
+
name: "DshHeader",
|
|
2064
|
+
setup(e, { slots: t }) {
|
|
2065
|
+
return () => {
|
|
2066
|
+
var a;
|
|
2067
|
+
return m("header", { class: "dsh-header" }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2068
|
+
};
|
|
2069
|
+
}
|
|
2070
|
+
}), _a = F({
|
|
2071
|
+
name: "DshLabel",
|
|
2072
|
+
props: { required: Boolean },
|
|
2073
|
+
setup(e, { slots: t }) {
|
|
2074
|
+
return () => {
|
|
2075
|
+
var a;
|
|
2076
|
+
return m("label", { class: "dsh-label" }, [(a = t.default) == null ? void 0 : a.call(t), e.required ? m("span", { "aria-hidden": "true", class: "dsh-label__required" }, " *") : null]);
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
}), Ta = F({
|
|
2080
|
+
name: "DshDescription",
|
|
2081
|
+
setup(e, { slots: t }) {
|
|
2082
|
+
return () => {
|
|
2083
|
+
var a;
|
|
2084
|
+
return m("div", { class: "dsh-description" }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2085
|
+
};
|
|
2086
|
+
}
|
|
2087
|
+
}), Pt = F({
|
|
2088
|
+
name: "DshFieldError",
|
|
2089
|
+
setup(e, { slots: t }) {
|
|
2090
|
+
return () => {
|
|
2091
|
+
var a;
|
|
2092
|
+
return m("div", { class: "dsh-field-error", "aria-live": "polite" }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2093
|
+
};
|
|
2094
|
+
}
|
|
2095
|
+
}), an = Pt, nn = F({
|
|
2096
|
+
name: "DshFieldset",
|
|
2097
|
+
props: { legend: String, disabled: Boolean },
|
|
2098
|
+
setup(e, { slots: t }) {
|
|
2099
|
+
return () => {
|
|
2100
|
+
var a, i;
|
|
2101
|
+
return m("fieldset", { class: "dsh-fieldset", disabled: e.disabled }, [
|
|
2102
|
+
t.legend || e.legend ? m("legend", {}, ((a = t.legend) == null ? void 0 : a.call(t)) ?? e.legend) : null,
|
|
2103
|
+
(i = t.default) == null ? void 0 : i.call(t)
|
|
2104
|
+
]);
|
|
2105
|
+
};
|
|
2106
|
+
}
|
|
2107
|
+
}), rn = F({
|
|
2108
|
+
name: "DshInputGroup",
|
|
2109
|
+
setup(e, { slots: t }) {
|
|
2110
|
+
return () => {
|
|
2111
|
+
var a;
|
|
2112
|
+
return m("div", { class: "dsh-input-group" }, [
|
|
2113
|
+
t.start ? m("span", { class: "dsh-input-group__start" }, t.start()) : null,
|
|
2114
|
+
(a = t.default) == null ? void 0 : a.call(t),
|
|
2115
|
+
t.end ? m("span", { class: "dsh-input-group__end" }, t.end()) : null
|
|
2116
|
+
]);
|
|
2117
|
+
};
|
|
2118
|
+
}
|
|
2119
|
+
}), _t = {
|
|
2120
|
+
modelValue: String,
|
|
2121
|
+
defaultValue: { type: String, default: "" },
|
|
2122
|
+
id: String,
|
|
2123
|
+
label: String,
|
|
2124
|
+
description: String,
|
|
2125
|
+
errorMessage: String,
|
|
2126
|
+
invalid: Boolean,
|
|
2127
|
+
required: Boolean,
|
|
2128
|
+
disabled: Boolean,
|
|
2129
|
+
readonly: Boolean,
|
|
2130
|
+
name: String,
|
|
2131
|
+
placeholder: String,
|
|
2132
|
+
type: { type: String, default: "text" }
|
|
2133
|
+
}, Va = F({
|
|
2134
|
+
name: "DshTextField",
|
|
2135
|
+
inheritAttrs: !1,
|
|
2136
|
+
props: _t,
|
|
2137
|
+
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
2138
|
+
setup(e, { attrs: t, slots: a, emit: i, expose: n }) {
|
|
2139
|
+
const r = ze(), o = we(), s = q(null), f = q(e.defaultValue);
|
|
2140
|
+
return n({ focus: () => {
|
|
2141
|
+
var p;
|
|
2142
|
+
return (p = s.value) == null ? void 0 : p.focus();
|
|
2143
|
+
}, blur: () => {
|
|
2144
|
+
var p;
|
|
2145
|
+
return (p = s.value) == null ? void 0 : p.blur();
|
|
2146
|
+
} }), () => {
|
|
2147
|
+
const p = e.id ?? `dsh-field-${o}`, d = !!(e.description || a.description), k = !!(e.errorMessage || a.error), l = [t["aria-describedby"], d ? `${p}-description` : "", k ? `${p}-error` : ""].filter(Boolean).join(" ") || void 0, { class: M, style: y, ...P } = t;
|
|
2148
|
+
return m("div", { class: ["dsh-field", M], style: y, "data-invalid": e.invalid || k || void 0 }, [
|
|
2149
|
+
e.label || a.label ? m(_a, { for: p, required: e.required }, { default: () => {
|
|
2150
|
+
var u;
|
|
2151
|
+
return ((u = a.label) == null ? void 0 : u.call(a)) ?? e.label;
|
|
2152
|
+
} }) : null,
|
|
2153
|
+
m(Bt, {
|
|
2154
|
+
...P,
|
|
2155
|
+
ref: s,
|
|
2156
|
+
type: e.type === "password" ? "password" : "text",
|
|
2157
|
+
inputAttrs: {
|
|
2158
|
+
...typeof t.inputAttrs == "object" ? t.inputAttrs : {},
|
|
2159
|
+
id: p,
|
|
2160
|
+
name: e.name,
|
|
2161
|
+
type: e.type,
|
|
2162
|
+
required: e.required,
|
|
2163
|
+
"aria-label": t["aria-label"],
|
|
2164
|
+
"aria-invalid": e.invalid || k || void 0,
|
|
2165
|
+
"aria-describedby": l,
|
|
2166
|
+
"aria-required": e.required || void 0
|
|
2167
|
+
},
|
|
2168
|
+
placeholder: e.placeholder,
|
|
2169
|
+
modelValue: r ? e.modelValue ?? "" : f.value,
|
|
2170
|
+
disabled: e.disabled,
|
|
2171
|
+
readonly: e.readonly,
|
|
2172
|
+
error: e.invalid || k,
|
|
2173
|
+
"onUpdate:modelValue": (u) => {
|
|
2174
|
+
f.value = u, i("update:modelValue", u);
|
|
2175
|
+
},
|
|
2176
|
+
onChange: (u, h) => i("change", u, h),
|
|
2177
|
+
onInput: (u, h) => i("input", u, h),
|
|
2178
|
+
onFocus: (u) => i("focus", u),
|
|
2179
|
+
onBlur: (u) => i("blur", u)
|
|
2180
|
+
}, { prefix: a.prefix, suffix: a.suffix, prepend: a.prepend, append: a.append }),
|
|
2181
|
+
d ? m(Ta, { id: `${p}-description` }, { default: () => {
|
|
2182
|
+
var u;
|
|
2183
|
+
return ((u = a.description) == null ? void 0 : u.call(a)) ?? e.description;
|
|
2184
|
+
} }) : null,
|
|
2185
|
+
k ? m(Pt, { id: `${p}-error` }, { default: () => {
|
|
2186
|
+
var u;
|
|
2187
|
+
return ((u = a.error) == null ? void 0 : u.call(a)) ?? e.errorMessage;
|
|
2188
|
+
} }) : null
|
|
2189
|
+
]);
|
|
2190
|
+
};
|
|
2191
|
+
}
|
|
2192
|
+
}), on = F({
|
|
2193
|
+
name: "DshSearchField",
|
|
2194
|
+
inheritAttrs: !1,
|
|
2195
|
+
props: _t,
|
|
2196
|
+
emits: ["update:modelValue", "search"],
|
|
2197
|
+
setup(e, { attrs: t, slots: a, emit: i }) {
|
|
2198
|
+
const n = ze(), r = q(e.defaultValue);
|
|
2199
|
+
return () => m(Va, Ne(t, {
|
|
2200
|
+
...e,
|
|
2201
|
+
type: "search",
|
|
2202
|
+
allowClear: !0,
|
|
2203
|
+
modelValue: n ? e.modelValue ?? "" : r.value,
|
|
2204
|
+
"onUpdate:modelValue": (o) => {
|
|
2205
|
+
r.value = o, i("update:modelValue", o);
|
|
2206
|
+
},
|
|
2207
|
+
onKeydown: (o) => {
|
|
2208
|
+
o.key === "Enter" && !o.isComposing && !e.disabled && i("search", n ? e.modelValue ?? "" : r.value);
|
|
2209
|
+
}
|
|
2210
|
+
}), a);
|
|
2211
|
+
}
|
|
2212
|
+
}), ln = F({
|
|
2213
|
+
name: "DshInputOTP",
|
|
2214
|
+
inheritAttrs: !1,
|
|
2215
|
+
props: {
|
|
2216
|
+
modelValue: String,
|
|
2217
|
+
defaultValue: { type: String, default: "" },
|
|
2218
|
+
length: { type: Number, default: 6, validator: (e) => Number.isInteger(e) && e > 0 },
|
|
2219
|
+
type: { type: String, default: "numeric" },
|
|
2220
|
+
disabled: Boolean,
|
|
2221
|
+
readonly: Boolean,
|
|
2222
|
+
invalid: Boolean,
|
|
2223
|
+
label: { type: String, default: "验证码" }
|
|
2224
|
+
},
|
|
2225
|
+
emits: ["update:modelValue", "complete", "change"],
|
|
2226
|
+
setup(e, { attrs: t, emit: a, expose: i }) {
|
|
2227
|
+
const n = ze(), r = q(null), o = q(ce(e.defaultValue, e.length, e.type === "numeric")), s = G(() => ce(n ? e.modelValue ?? "" : o.value, e.length, e.type === "numeric")), f = q(!1), p = q(0), d = () => {
|
|
2228
|
+
var l;
|
|
2229
|
+
p.value = ((l = r.value) == null ? void 0 : l.selectionStart) ?? 0;
|
|
2230
|
+
}, k = (l, M) => {
|
|
2231
|
+
const y = s.value;
|
|
2232
|
+
o.value = l, a("update:modelValue", l), y !== l && (a("change", l), l.length === e.length && a("complete", l)), ne(() => {
|
|
2233
|
+
r.value && (r.value.value = s.value, r.value.setSelectionRange(M, M), d());
|
|
2234
|
+
});
|
|
2235
|
+
};
|
|
2236
|
+
return i({ focus: () => {
|
|
2237
|
+
var l;
|
|
2238
|
+
return (l = r.value) == null ? void 0 : l.focus();
|
|
2239
|
+
}, blur: () => {
|
|
2240
|
+
var l;
|
|
2241
|
+
return (l = r.value) == null ? void 0 : l.blur();
|
|
2242
|
+
} }), () => {
|
|
2243
|
+
const { class: l, style: M, ...y } = t;
|
|
2244
|
+
return m("div", {
|
|
2245
|
+
class: ["dsh-otp", l],
|
|
2246
|
+
style: M,
|
|
2247
|
+
"data-invalid": e.invalid || void 0,
|
|
2248
|
+
"data-disabled": e.disabled || void 0,
|
|
2249
|
+
onMousedown(P) {
|
|
2250
|
+
var u;
|
|
2251
|
+
!e.disabled && !P.defaultPrevented && (P.preventDefault(), (u = r.value) == null || u.focus());
|
|
2252
|
+
}
|
|
2253
|
+
}, [
|
|
2254
|
+
m("div", { class: "dsh-otp__cells", "aria-hidden": "true" }, Array.from({ length: e.length }, (P, u) => m("span", {
|
|
2255
|
+
class: "dsh-otp__cell",
|
|
2256
|
+
"data-active": f.value && Math.min(p.value, e.length - 1) === u || void 0,
|
|
2257
|
+
"data-filled": !!s.value[u] || void 0,
|
|
2258
|
+
onMousedown(h) {
|
|
2259
|
+
var O, A;
|
|
2260
|
+
e.disabled || (h.preventDefault(), (O = r.value) == null || O.focus(), (A = r.value) == null || A.setSelectionRange(Math.min(u, s.value.length), Math.min(u, s.value.length)), d());
|
|
2261
|
+
}
|
|
2262
|
+
}, s.value[u] ?? ""))),
|
|
2263
|
+
m("input", Ne(y, {
|
|
2264
|
+
ref: r,
|
|
2265
|
+
class: "dsh-otp__input",
|
|
2266
|
+
value: s.value,
|
|
2267
|
+
type: "text",
|
|
2268
|
+
inputmode: e.type === "numeric" ? "numeric" : "text",
|
|
2269
|
+
autocomplete: "one-time-code",
|
|
2270
|
+
maxlength: e.length,
|
|
2271
|
+
disabled: e.disabled,
|
|
2272
|
+
readonly: e.readonly,
|
|
2273
|
+
"aria-label": t["aria-label"] ?? e.label,
|
|
2274
|
+
"aria-invalid": e.invalid || void 0,
|
|
2275
|
+
onFocus: () => {
|
|
2276
|
+
f.value = !0, d();
|
|
2277
|
+
},
|
|
2278
|
+
onBlur: () => {
|
|
2279
|
+
f.value = !1;
|
|
2280
|
+
},
|
|
2281
|
+
onSelect: d,
|
|
2282
|
+
onKeyup: d,
|
|
2283
|
+
onInput(P) {
|
|
2284
|
+
const u = P.target, h = ce(u.value.slice(0, u.selectionStart ?? 0), e.length, e.type === "numeric").length;
|
|
2285
|
+
k(ce(u.value, e.length, e.type === "numeric"), h);
|
|
2286
|
+
},
|
|
2287
|
+
onPaste(P) {
|
|
2288
|
+
var h, O;
|
|
2289
|
+
if (e.disabled || e.readonly || !P.clipboardData)
|
|
2290
|
+
return;
|
|
2291
|
+
P.preventDefault();
|
|
2292
|
+
const u = Pa(s.value, P.clipboardData.getData("text"), ((h = r.value) == null ? void 0 : h.selectionStart) ?? 0, ((O = r.value) == null ? void 0 : O.selectionEnd) ?? 0, e.length, e.type === "numeric");
|
|
2293
|
+
k(u.value, u.cursor);
|
|
2294
|
+
}
|
|
2295
|
+
}))
|
|
2296
|
+
]);
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2299
|
+
}), sn = F({
|
|
2300
|
+
name: "DshScrollShadow",
|
|
2301
|
+
props: { maxHeight: { type: [Number, String], default: 240 } },
|
|
2302
|
+
setup(e, { slots: t }) {
|
|
2303
|
+
const a = q(null), i = q({ top: !1, bottom: !1, left: !1, right: !1 });
|
|
2304
|
+
let n, r;
|
|
2305
|
+
const o = () => {
|
|
2306
|
+
var f;
|
|
2307
|
+
const s = (f = a.value) == null ? void 0 : f.querySelector(".arco-scrollbar-container");
|
|
2308
|
+
s && (i.value = {
|
|
2309
|
+
top: s.scrollTop > 1,
|
|
2310
|
+
bottom: s.scrollTop + s.clientHeight < s.scrollHeight - 1,
|
|
2311
|
+
left: s.scrollLeft > 1,
|
|
2312
|
+
right: s.scrollLeft + s.clientWidth < s.scrollWidth - 1
|
|
2313
|
+
});
|
|
2314
|
+
};
|
|
2315
|
+
return fe(() => {
|
|
2316
|
+
if (o(), typeof ResizeObserver < "u" && a.value) {
|
|
2317
|
+
n = new ResizeObserver(o), n.observe(a.value);
|
|
2318
|
+
const s = a.value.querySelector(".dsh-scroll-shadow__content");
|
|
2319
|
+
s && n.observe(s);
|
|
2320
|
+
}
|
|
2321
|
+
if (a.value) {
|
|
2322
|
+
r = new MutationObserver(o);
|
|
2323
|
+
const s = a.value.querySelector(".dsh-scroll-shadow__content");
|
|
2324
|
+
s && r.observe(s, { childList: !0, subtree: !0, characterData: !0 });
|
|
2325
|
+
}
|
|
2326
|
+
}), Se(() => {
|
|
2327
|
+
n == null || n.disconnect(), r == null || r.disconnect();
|
|
2328
|
+
}), () => m("div", {
|
|
2329
|
+
ref: a,
|
|
2330
|
+
class: "dsh-scroll-shadow",
|
|
2331
|
+
onScrollCapture: o,
|
|
2332
|
+
"data-top": i.value.top || void 0,
|
|
2333
|
+
"data-bottom": i.value.bottom || void 0,
|
|
2334
|
+
"data-left": i.value.left || void 0,
|
|
2335
|
+
"data-right": i.value.right || void 0
|
|
2336
|
+
}, m(ot, { style: { height: "100%", overflow: "auto", maxHeight: typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight }, outerStyle: { height: "100%", maxHeight: typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight } }, { default: () => {
|
|
2337
|
+
var s;
|
|
2338
|
+
return m("div", { class: "dsh-scroll-shadow__content" }, (s = t.default) == null ? void 0 : s.call(t));
|
|
2339
|
+
} }));
|
|
2340
|
+
}
|
|
2341
|
+
});
|
|
2342
|
+
function Ce() {
|
|
2343
|
+
var t;
|
|
2344
|
+
const e = ((t = ut()) == null ? void 0 : t.vnode.props) ?? {};
|
|
2345
|
+
return "modelValue" in e || "model-value" in e;
|
|
2346
|
+
}
|
|
2347
|
+
const Tt = {
|
|
2348
|
+
options: { type: Array, default: () => [] },
|
|
2349
|
+
modelValue: [String, Number, Array],
|
|
2350
|
+
defaultValue: [String, Number, Array],
|
|
2351
|
+
multiple: Boolean,
|
|
2352
|
+
disabled: Boolean,
|
|
2353
|
+
allowEmpty: { type: Boolean, default: !0 },
|
|
2354
|
+
label: String
|
|
2355
|
+
}, un = F({
|
|
2356
|
+
name: "DshListBox",
|
|
2357
|
+
props: Tt,
|
|
2358
|
+
emits: ["update:modelValue", "change"],
|
|
2359
|
+
setup(e, { slots: t, emit: a }) {
|
|
2360
|
+
const i = Ce(), n = we(), r = q(null), o = q(e.defaultValue), s = G(() => i ? e.modelValue : o.value), f = G(() => Array.isArray(s.value) ? s.value : s.value === void 0 ? [] : [s.value]), p = q(-1);
|
|
2361
|
+
let d = "", k = 0;
|
|
2362
|
+
const l = () => {
|
|
2363
|
+
const u = e.options.findIndex((h) => !h.disabled && f.value.includes(h.value));
|
|
2364
|
+
p.value = u < 0 ? he(e.options, -1, "Home") : u;
|
|
2365
|
+
};
|
|
2366
|
+
le(() => e.options, l, { immediate: !0, deep: !0 });
|
|
2367
|
+
const M = (u) => {
|
|
2368
|
+
const h = e.options[u];
|
|
2369
|
+
if (e.disabled || !h || h.disabled)
|
|
2370
|
+
return;
|
|
2371
|
+
p.value = u;
|
|
2372
|
+
const O = Ct(s.value, h.value, e.multiple, e.allowEmpty);
|
|
2373
|
+
o.value = O, a("update:modelValue", O), a("change", O);
|
|
2374
|
+
}, y = () => {
|
|
2375
|
+
ne(() => {
|
|
2376
|
+
var u, h;
|
|
2377
|
+
return (h = (u = r.value) == null ? void 0 : u.querySelector(`[data-index="${p.value}"]`)) == null ? void 0 : h.scrollIntoView({ block: "nearest" });
|
|
2378
|
+
});
|
|
2379
|
+
}, P = (u) => {
|
|
2380
|
+
if (!(e.disabled || u.isComposing)) {
|
|
2381
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(u.key))
|
|
2382
|
+
u.preventDefault(), p.value = he(e.options, p.value, u.key), y();
|
|
2383
|
+
else if (u.key === "Enter" || u.key === " ")
|
|
2384
|
+
u.preventDefault(), M(p.value);
|
|
2385
|
+
else if (e.multiple && (u.ctrlKey || u.metaKey) && u.key.toLowerCase() === "a") {
|
|
2386
|
+
u.preventDefault();
|
|
2387
|
+
const h = e.options.filter((O) => !O.disabled || f.value.includes(O.value)).map((O) => O.value);
|
|
2388
|
+
o.value = h, a("update:modelValue", h), a("change", h);
|
|
2389
|
+
} else if (u.key.length === 1 && !u.ctrlKey && !u.metaKey && !u.altKey) {
|
|
2390
|
+
const h = Date.now();
|
|
2391
|
+
d = h - k > 700 ? u.key : d + u.key, k = h;
|
|
2392
|
+
const A = [...d].every((L) => L.toLocaleLowerCase() === u.key.toLocaleLowerCase()) ? u.key : d, Y = Ca(e.options, A.length > 1 ? p.value - 1 : p.value, A);
|
|
2393
|
+
Y >= 0 && (p.value = Y, y()), u.preventDefault();
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
};
|
|
2397
|
+
return () => {
|
|
2398
|
+
var u;
|
|
2399
|
+
return m("div", {
|
|
2400
|
+
ref: r,
|
|
2401
|
+
class: "dsh-listbox",
|
|
2402
|
+
role: "listbox",
|
|
2403
|
+
tabindex: e.disabled ? -1 : 0,
|
|
2404
|
+
"aria-label": e.label,
|
|
2405
|
+
"aria-multiselectable": e.multiple || void 0,
|
|
2406
|
+
"aria-disabled": e.disabled || void 0,
|
|
2407
|
+
"aria-activedescendant": p.value < 0 ? void 0 : `dsh-listbox-${n}-${p.value}`,
|
|
2408
|
+
onKeydown: P,
|
|
2409
|
+
onFocus: l
|
|
2410
|
+
}, e.options.length === 0 ? (u = t.empty) == null ? void 0 : u.call(t) : e.options.map((h, O) => {
|
|
2411
|
+
var A;
|
|
2412
|
+
return m("div", {
|
|
2413
|
+
key: h.value,
|
|
2414
|
+
id: `dsh-listbox-${n}-${O}`,
|
|
2415
|
+
role: "option",
|
|
2416
|
+
"aria-selected": f.value.includes(h.value),
|
|
2417
|
+
"aria-disabled": e.disabled || h.disabled || void 0,
|
|
2418
|
+
"data-selected": f.value.includes(h.value) || void 0,
|
|
2419
|
+
"data-disabled": e.disabled || h.disabled || void 0,
|
|
2420
|
+
"data-active": p.value === O || void 0,
|
|
2421
|
+
"data-index": O,
|
|
2422
|
+
class: "dsh-listbox__option",
|
|
2423
|
+
onMousedown(Y) {
|
|
2424
|
+
Y.preventDefault();
|
|
2425
|
+
},
|
|
2426
|
+
onClick() {
|
|
2427
|
+
var Y;
|
|
2428
|
+
(Y = r.value) == null || Y.focus(), M(O);
|
|
2429
|
+
}
|
|
2430
|
+
}, ((A = t.option) == null ? void 0 : A.call(t, { option: h, selected: f.value.includes(h.value), active: p.value === O })) ?? [
|
|
2431
|
+
m("span", { class: "dsh-listbox__label" }, h.label),
|
|
2432
|
+
h.description ? m("span", { class: "dsh-description" }, h.description) : null,
|
|
2433
|
+
m("span", { class: "dsh-listbox__indicator", "aria-hidden": "true" }, f.value.includes(h.value) ? "✓" : "")
|
|
2434
|
+
]);
|
|
2435
|
+
}));
|
|
2436
|
+
};
|
|
2437
|
+
}
|
|
2438
|
+
}), Oa = F({
|
|
2439
|
+
name: "DshToggleButton",
|
|
2440
|
+
inheritAttrs: !1,
|
|
2441
|
+
props: {
|
|
2442
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
2443
|
+
defaultValue: Boolean,
|
|
2444
|
+
disabled: Boolean
|
|
2445
|
+
},
|
|
2446
|
+
emits: ["update:modelValue", "change", "click"],
|
|
2447
|
+
setup(e, { attrs: t, slots: a, emit: i }) {
|
|
2448
|
+
const n = Ce(), r = q(e.defaultValue), o = G(() => n ? e.modelValue ?? !1 : r.value);
|
|
2449
|
+
return () => {
|
|
2450
|
+
var s;
|
|
2451
|
+
return m("button", {
|
|
2452
|
+
...t,
|
|
2453
|
+
class: ["dsh-toggle-button", t.class],
|
|
2454
|
+
type: "button",
|
|
2455
|
+
disabled: e.disabled,
|
|
2456
|
+
"aria-pressed": o.value,
|
|
2457
|
+
"data-selected": o.value || void 0,
|
|
2458
|
+
onClick(f) {
|
|
2459
|
+
e.disabled || (r.value = !o.value, i("update:modelValue", r.value), i("change", r.value), i("click", f));
|
|
2460
|
+
}
|
|
2461
|
+
}, (s = a.default) == null ? void 0 : s.call(a));
|
|
2462
|
+
};
|
|
2463
|
+
}
|
|
2464
|
+
}), cn = F({
|
|
2465
|
+
name: "DshToggleButtonGroup",
|
|
2466
|
+
props: { ...Tt, orientation: { type: String, default: "horizontal" } },
|
|
2467
|
+
emits: ["update:modelValue", "change"],
|
|
2468
|
+
setup(e, { slots: t, emit: a }) {
|
|
2469
|
+
const i = Ce(), n = q(null), r = q(e.defaultValue), o = G(() => i ? e.modelValue : r.value), s = G(() => Array.isArray(o.value) ? o.value : o.value === void 0 ? [] : [o.value]), f = q(-1);
|
|
2470
|
+
le(() => e.options, () => {
|
|
2471
|
+
var d;
|
|
2472
|
+
if (!e.options[f.value] || (d = e.options[f.value]) != null && d.disabled) {
|
|
2473
|
+
const k = e.options.findIndex((l) => !l.disabled && s.value.includes(l.value));
|
|
2474
|
+
f.value = k < 0 ? he(e.options, -1, "Home") : k;
|
|
2475
|
+
}
|
|
2476
|
+
}, { immediate: !0, deep: !0 });
|
|
2477
|
+
const p = (d) => {
|
|
2478
|
+
if (e.disabled || d.disabled)
|
|
2479
|
+
return;
|
|
2480
|
+
const k = Ct(o.value, d.value, e.multiple, e.allowEmpty);
|
|
2481
|
+
r.value = k, a("update:modelValue", k), a("change", k);
|
|
2482
|
+
};
|
|
2483
|
+
return () => m("div", {
|
|
2484
|
+
ref: n,
|
|
2485
|
+
role: "group",
|
|
2486
|
+
class: "dsh-toggle-group",
|
|
2487
|
+
"aria-label": e.label,
|
|
2488
|
+
"aria-disabled": e.disabled || void 0,
|
|
2489
|
+
"data-orientation": e.orientation,
|
|
2490
|
+
onKeydown(d) {
|
|
2491
|
+
if (e.disabled || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(d.key))
|
|
2492
|
+
return;
|
|
2493
|
+
d.preventDefault();
|
|
2494
|
+
let l = d.key;
|
|
2495
|
+
e.orientation === "horizontal" && n.value && getComputedStyle(n.value).direction === "rtl" && (l === "ArrowLeft" ? l = "ArrowRight" : l === "ArrowRight" && (l = "ArrowLeft")), f.value = he(e.options, f.value, l), ne(() => {
|
|
2496
|
+
var M, y;
|
|
2497
|
+
return (y = (M = n.value) == null ? void 0 : M.querySelector(`[data-index="${f.value}"]`)) == null ? void 0 : y.focus();
|
|
2498
|
+
});
|
|
2499
|
+
}
|
|
2500
|
+
}, e.options.map((d, k) => m(Oa, {
|
|
2501
|
+
key: d.value,
|
|
2502
|
+
modelValue: s.value.includes(d.value),
|
|
2503
|
+
disabled: e.disabled || d.disabled,
|
|
2504
|
+
tabindex: f.value === k ? 0 : -1,
|
|
2505
|
+
"data-index": k,
|
|
2506
|
+
onFocus: () => {
|
|
2507
|
+
f.value = k;
|
|
2508
|
+
},
|
|
2509
|
+
"onUpdate:modelValue": () => p(d)
|
|
2510
|
+
}, { default: () => {
|
|
2511
|
+
var l;
|
|
2512
|
+
return ((l = t.option) == null ? void 0 : l.call(t, { option: d, selected: s.value.includes(d.value) })) ?? d.label;
|
|
2513
|
+
} })));
|
|
2514
|
+
}
|
|
2515
|
+
}), dn = F({
|
|
2516
|
+
name: "DshToolbar",
|
|
2517
|
+
props: { label: String, orientation: { type: String, default: "horizontal" } },
|
|
2518
|
+
setup(e, { slots: t }) {
|
|
2519
|
+
const a = q(null);
|
|
2520
|
+
let i;
|
|
2521
|
+
const n = /* @__PURE__ */ new Map(), r = () => {
|
|
2522
|
+
var s;
|
|
2523
|
+
return Array.from(((s = a.value) == null ? void 0 : s.querySelectorAll("button, a[href], input, select, textarea, [tabindex]")) ?? []).filter((f) => !f.matches(':disabled, [aria-disabled="true"], [hidden]') && !f.closest("[hidden], [inert]"));
|
|
2524
|
+
}, o = (s) => {
|
|
2525
|
+
const f = r(), p = s && f.includes(s) ? s : f.find((d) => d === document.activeElement) ?? f.find((d) => d.tabIndex === 0) ?? f[0];
|
|
2526
|
+
for (const d of f)
|
|
2527
|
+
n.has(d) || n.set(d, d.getAttribute("tabindex")), d.tabIndex = d === p ? 0 : -1;
|
|
2528
|
+
};
|
|
2529
|
+
return fe(() => {
|
|
2530
|
+
o(), a.value && (i = new MutationObserver(() => o()), i.observe(a.value, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["disabled", "aria-disabled", "hidden"] }));
|
|
2531
|
+
}), Se(() => {
|
|
2532
|
+
i == null || i.disconnect();
|
|
2533
|
+
for (const [s, f] of n)
|
|
2534
|
+
f === null ? s.removeAttribute("tabindex") : s.setAttribute("tabindex", f);
|
|
2535
|
+
}), () => {
|
|
2536
|
+
var s;
|
|
2537
|
+
return m("div", {
|
|
2538
|
+
ref: a,
|
|
2539
|
+
class: "dsh-toolbar",
|
|
2540
|
+
role: "toolbar",
|
|
2541
|
+
"aria-label": e.label,
|
|
2542
|
+
"aria-orientation": e.orientation,
|
|
2543
|
+
onFocusin(f) {
|
|
2544
|
+
o(f.target);
|
|
2545
|
+
},
|
|
2546
|
+
onKeydown(f) {
|
|
2547
|
+
var y;
|
|
2548
|
+
const p = f.target;
|
|
2549
|
+
if (p.matches('input, textarea, select, [contenteditable="true"]') || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(f.key))
|
|
2550
|
+
return;
|
|
2551
|
+
const k = r();
|
|
2552
|
+
let l = f.key;
|
|
2553
|
+
e.orientation === "horizontal" && a.value && getComputedStyle(a.value).direction === "rtl" && (l === "ArrowLeft" ? l = "ArrowRight" : l === "ArrowRight" && (l = "ArrowLeft"));
|
|
2554
|
+
const M = he(k.map((P, u) => ({ value: u, label: "" })), k.indexOf(p), l);
|
|
2555
|
+
M >= 0 && (f.preventDefault(), (y = k[M]) == null || y.focus());
|
|
2556
|
+
}
|
|
2557
|
+
}, (s = t.default) == null ? void 0 : s.call(t));
|
|
2558
|
+
};
|
|
2559
|
+
}
|
|
2560
|
+
}), fn = F({
|
|
2561
|
+
name: "DshTagGroup",
|
|
2562
|
+
props: {
|
|
2563
|
+
modelValue: Array,
|
|
2564
|
+
defaultValue: { type: Array, default: () => [] },
|
|
2565
|
+
label: String,
|
|
2566
|
+
removable: { type: Boolean, default: !0 },
|
|
2567
|
+
disabled: Boolean,
|
|
2568
|
+
removeLabel: { type: Function, default: (e) => `移除 ${e.label}` }
|
|
2569
|
+
},
|
|
2570
|
+
emits: ["update:modelValue", "remove"],
|
|
2571
|
+
setup(e, { slots: t, emit: a }) {
|
|
2572
|
+
const i = Ce(), n = q(null), r = q(e.defaultValue), o = G(() => i ? e.modelValue ?? [] : r.value), s = (f, p) => {
|
|
2573
|
+
e.disabled || f.disabled || (r.value = o.value.filter((d) => d.value !== f.value), a("update:modelValue", r.value), a("remove", f.value), ne(() => {
|
|
2574
|
+
var k, l, M;
|
|
2575
|
+
const d = (k = n.value) == null ? void 0 : k.querySelectorAll("button:not(:disabled)");
|
|
2576
|
+
d != null && d.length ? (l = d[Math.min(p, d.length - 1)]) == null || l.focus() : (M = n.value) == null || M.focus();
|
|
2577
|
+
}));
|
|
2578
|
+
};
|
|
2579
|
+
return () => m("div", { ref: n, class: "dsh-tag-group", role: "group", "aria-label": e.label, tabindex: -1 }, o.value.map((f, p) => {
|
|
2580
|
+
var d;
|
|
2581
|
+
return m("span", {
|
|
2582
|
+
class: ["arco-tag", "dsh-tag-group__tag"],
|
|
2583
|
+
key: f.value,
|
|
2584
|
+
"data-disabled": e.disabled || f.disabled || void 0
|
|
2585
|
+
}, [
|
|
2586
|
+
((d = t.item) == null ? void 0 : d.call(t, { item: f })) ?? m("span", {}, f.label),
|
|
2587
|
+
e.removable ? m("button", {
|
|
2588
|
+
class: "dsh-tag-group__remove",
|
|
2589
|
+
type: "button",
|
|
2590
|
+
disabled: e.disabled || f.disabled,
|
|
2591
|
+
"aria-label": e.removeLabel(f),
|
|
2592
|
+
onClick: () => s(f, p)
|
|
2593
|
+
}, "×") : null
|
|
2594
|
+
]);
|
|
2595
|
+
}));
|
|
2596
|
+
}
|
|
2597
|
+
});
|
|
2598
|
+
export {
|
|
2599
|
+
Ra as Accordion,
|
|
2600
|
+
pn as AccordionItem,
|
|
2601
|
+
Wt as Alert,
|
|
2602
|
+
Za as AlertDialog,
|
|
2603
|
+
Ha as Arco,
|
|
2604
|
+
ct as AutoComplete,
|
|
2605
|
+
Na as Autocomplete,
|
|
2606
|
+
gn as Breadcrumbs,
|
|
2607
|
+
ka as Button,
|
|
2608
|
+
xt as Calendar,
|
|
2609
|
+
dt as Cascader,
|
|
2610
|
+
Kt as Chip,
|
|
2611
|
+
Wa as CloseButton,
|
|
2612
|
+
Ee as ColorPicker,
|
|
2613
|
+
Sa as DatePicker,
|
|
2614
|
+
Fa as DateRangePicker,
|
|
2615
|
+
Ta as Description,
|
|
2616
|
+
bn as Disclosure,
|
|
2617
|
+
yn as DisclosureGroup,
|
|
2618
|
+
$a as Drawer,
|
|
2619
|
+
mt as Dropdown,
|
|
2620
|
+
pt as DropdownButton,
|
|
2621
|
+
Ea as DshProvider,
|
|
2622
|
+
vt as Dsubmenu,
|
|
2623
|
+
wn as EmptyState,
|
|
2624
|
+
an as ErrorMessage,
|
|
2625
|
+
Pt as FieldError,
|
|
2626
|
+
nn as Fieldset,
|
|
2627
|
+
tn as Header,
|
|
2628
|
+
yt as Image,
|
|
2629
|
+
wt as ImagePreview,
|
|
2630
|
+
Dt as ImagePreviewGroup,
|
|
2631
|
+
rn as InputGroup,
|
|
2632
|
+
Ut as InputNumber,
|
|
2633
|
+
ln as InputOTP,
|
|
2634
|
+
jt as InputTag,
|
|
2635
|
+
Xa as Kbd,
|
|
2636
|
+
_a as Label,
|
|
2637
|
+
Ja as Link,
|
|
2638
|
+
un as ListBox,
|
|
2639
|
+
la as Mention,
|
|
2640
|
+
bt as Menu,
|
|
2641
|
+
Ka as Meter,
|
|
2642
|
+
Aa as Modal,
|
|
2643
|
+
ke as MonthPicker,
|
|
2644
|
+
Ut as NumberField,
|
|
2645
|
+
ra as Popconfirm,
|
|
2646
|
+
na as Popover,
|
|
2647
|
+
qt as Progress,
|
|
2648
|
+
za as ProgressBar,
|
|
2649
|
+
Ua as ProgressCircle,
|
|
2650
|
+
Me as QuarterPicker,
|
|
2651
|
+
xe as RangePicker,
|
|
2652
|
+
zt as Result,
|
|
2653
|
+
sn as ScrollShadow,
|
|
2654
|
+
on as SearchField,
|
|
2655
|
+
gt as Select,
|
|
2656
|
+
Dn as Separator,
|
|
2657
|
+
He as Spin,
|
|
2658
|
+
ja as Spinner,
|
|
2659
|
+
en as Surface,
|
|
2660
|
+
qa as SwitchGroup,
|
|
2661
|
+
Kt as Tag,
|
|
2662
|
+
fn as TagGroup,
|
|
2663
|
+
Sn as Text,
|
|
2664
|
+
kn as TextArea,
|
|
2665
|
+
Va as TextField,
|
|
2666
|
+
ta as TimePicker,
|
|
2667
|
+
Oa as ToggleButton,
|
|
2668
|
+
cn as ToggleButtonGroup,
|
|
2669
|
+
dn as Toolbar,
|
|
2670
|
+
aa as Tooltip,
|
|
2671
|
+
Zt as Tree,
|
|
2672
|
+
ea as TreeSelect,
|
|
2673
|
+
oa as Trigger,
|
|
2674
|
+
Ae as WeekPicker,
|
|
2675
|
+
$e as YearPicker,
|
|
2676
|
+
je as progressRatio,
|
|
2677
|
+
Jt as provideDshPopupScope,
|
|
2678
|
+
Qa as useDialog,
|
|
2679
|
+
se as useDshTheme,
|
|
2680
|
+
Ga as useFeedback,
|
|
2681
|
+
xa as useToast
|
|
2682
|
+
};
|