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