@dsh-plugin/dsh-ui-components-vue 0.1.0-dev.44231462940 → 0.1.0-dev.44257063091
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.js +1029 -1029
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as N from "@arco-design/web-vue";
|
|
2
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 yn, Breadcrumb as wn, CollapseItem as Dn, Collapse as Sn, Empty as kn, Divider as Mn, TypographyText as An, Textarea as
|
|
5
|
-
import { defineComponent as F, inject as we, h
|
|
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 xn } from "@arco-design/web-vue";
|
|
5
|
+
import { defineComponent as F, inject as we, h, shallowRef as W, onBeforeUnmount as me, mergeProps as De, useId as Se, onMounted as fe, onUpdated as ke, ref as q, computed as J, 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
7
|
function qt(e, t) {
|
|
8
8
|
for (var a = 0; a < t.length; a++) {
|
|
@@ -26,7 +26,7 @@ const jt = F({
|
|
|
26
26
|
props: Be.props,
|
|
27
27
|
setup(e, { attrs: t, slots: a }) {
|
|
28
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 () =>
|
|
29
|
+
return () => h(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 jt = F({
|
|
|
35
35
|
}, a);
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
-
function
|
|
38
|
+
function te(e, t) {
|
|
39
39
|
return Object.assign(e, {
|
|
40
40
|
install(a, i) {
|
|
41
41
|
function n(r, o) {
|
|
@@ -45,19 +45,19 @@ function ee(e, t) {
|
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
const Wt =
|
|
48
|
+
const Wt = te(jt, Be), zt = te(F({
|
|
49
49
|
name: "DshTable",
|
|
50
50
|
inheritAttrs: !1,
|
|
51
51
|
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
52
|
-
const n =
|
|
52
|
+
const n = W(), r = W(!1);
|
|
53
53
|
let o;
|
|
54
54
|
return i(new Proxy({}, {
|
|
55
55
|
get: (s, c) => {
|
|
56
|
-
var
|
|
57
|
-
return (
|
|
56
|
+
var p;
|
|
57
|
+
return (p = n.value) == null ? void 0 : p[c];
|
|
58
58
|
},
|
|
59
59
|
has: (s, c) => n.value !== void 0 && c in n.value
|
|
60
|
-
})), me(() => clearTimeout(o)), () =>
|
|
60
|
+
})), me(() => clearTimeout(o)), () => h(Ue, De(t, {
|
|
61
61
|
ref: n,
|
|
62
62
|
class: "dsh-scroll-table",
|
|
63
63
|
"data-scrolling": r.value || void 0,
|
|
@@ -68,29 +68,29 @@ const Wt = ee(jt, Be), zt = ee(F({
|
|
|
68
68
|
}
|
|
69
69
|
}), a);
|
|
70
70
|
}
|
|
71
|
-
}), Ue), Ut =
|
|
71
|
+
}), Ue), Ut = te(F({
|
|
72
72
|
name: "DshInputTag",
|
|
73
73
|
inheritAttrs: !1,
|
|
74
74
|
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
75
|
-
const n =
|
|
75
|
+
const n = W();
|
|
76
76
|
return i(new Proxy({}, {
|
|
77
77
|
get: (r, o) => {
|
|
78
78
|
var s;
|
|
79
79
|
return (s = n.value) == null ? void 0 : s[o];
|
|
80
80
|
},
|
|
81
81
|
has: (r, o) => n.value !== void 0 && o in n.value
|
|
82
|
-
})), () =>
|
|
82
|
+
})), () => h(Ke, { ...t, ref: n, class: ["dsh-hero-input-tag", t.class] }, a);
|
|
83
83
|
}
|
|
84
84
|
}), Ke), de = {
|
|
85
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",
|
|
86
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",
|
|
87
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",
|
|
88
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"
|
|
89
|
-
}, Kt =
|
|
89
|
+
}, Kt = te(F({
|
|
90
90
|
name: "DshAlert",
|
|
91
91
|
inheritAttrs: !1,
|
|
92
92
|
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
93
|
-
const n =
|
|
93
|
+
const n = W();
|
|
94
94
|
return i(new Proxy({}, {
|
|
95
95
|
get: (r, o) => {
|
|
96
96
|
var s;
|
|
@@ -99,46 +99,46 @@ const Wt = ee(jt, Be), zt = ee(F({
|
|
|
99
99
|
has: (r, o) => n.value !== void 0 && o in n.value
|
|
100
100
|
})), () => {
|
|
101
101
|
const r = t.type ?? "info", o = typeof r == "string" && r in de ? de[r] : void 0;
|
|
102
|
-
return
|
|
102
|
+
return h(Ge, { ...t, ref: n }, {
|
|
103
103
|
...a,
|
|
104
|
-
...o && !a.icon ? { icon: () =>
|
|
105
|
-
|
|
104
|
+
...o && !a.icon ? { icon: () => h("svg", { "aria-hidden": !0, fill: "none", height: 16, role: "presentation", viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg" }, [
|
|
105
|
+
h("path", { "clip-rule": "evenodd", d: o, fill: "currentColor", "fill-rule": "evenodd" })
|
|
106
106
|
]) } : {}
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
}), Ge), Gt =
|
|
110
|
+
}), Ge), Gt = te(F({
|
|
111
111
|
name: "DshResult",
|
|
112
112
|
inheritAttrs: !1,
|
|
113
113
|
setup(e, { attrs: t, slots: a }) {
|
|
114
114
|
return () => {
|
|
115
115
|
const i = t.status === void 0 ? "info" : t.status, n = typeof i == "string" && i in de ? de[i] : void 0;
|
|
116
|
-
return
|
|
116
|
+
return h(Ze, t, {
|
|
117
117
|
...a,
|
|
118
|
-
...n && !a.icon ? { icon: () =>
|
|
118
|
+
...n && !a.icon ? { icon: () => h("svg", { class: "dsh-result-icon", "aria-hidden": !0, fill: "none", viewBox: "0 0 16 16" }, [h("path", { d: n, fill: "currentColor", "fill-rule": "evenodd", "clip-rule": "evenodd" })]) } : {}
|
|
119
119
|
});
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
}), Ze), He =
|
|
122
|
+
}), Ze), He = te(F({
|
|
123
123
|
name: "DshSpin",
|
|
124
124
|
inheritAttrs: !1,
|
|
125
125
|
props: Ye.props,
|
|
126
126
|
setup(e, { attrs: t, slots: a }) {
|
|
127
|
-
const i = Se(), n = we(Fe, void 0), r = e, o = () =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
const i = Se(), n = we(Fe, void 0), r = e, o = () => h("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 }, [
|
|
128
|
+
h("defs", {}, [
|
|
129
|
+
h("linearGradient", { id: `${i}-1`, x1: "50%", x2: "50%", y1: "5.271%", y2: "91.793%" }, [h("stop", { offset: "0%", "stop-color": "currentColor" }), h("stop", { offset: "100%", "stop-color": "currentColor", "stop-opacity": 0.55 })]),
|
|
130
|
+
h("linearGradient", { id: `${i}-2`, x1: "50%", x2: "50%", y1: "15.24%", y2: "87.15%" }, [h("stop", { offset: "0%", "stop-color": "currentColor", "stop-opacity": 0 }), h("stop", { offset: "100%", "stop-color": "currentColor", "stop-opacity": 0.55 })])
|
|
131
131
|
]),
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
h("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)" }),
|
|
133
|
+
h("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)" })
|
|
134
134
|
]);
|
|
135
|
-
return () =>
|
|
135
|
+
return () => h(Ye, { ...e, ...t }, r.dot || a.icon || a.element || n != null && n.slots.loading ? a : { ...a, element: o });
|
|
136
136
|
}
|
|
137
|
-
}), Ye), Zt =
|
|
137
|
+
}), Ye), Zt = te(F({
|
|
138
138
|
name: "DshInputNumber",
|
|
139
139
|
inheritAttrs: !1,
|
|
140
140
|
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
141
|
-
const n =
|
|
141
|
+
const n = W();
|
|
142
142
|
i(new Proxy({}, {
|
|
143
143
|
get: (o, s) => {
|
|
144
144
|
var c;
|
|
@@ -151,17 +151,17 @@ const Wt = ee(jt, Be), zt = ee(F({
|
|
|
151
151
|
const o = (s = n.value) == null ? void 0 : s.$el;
|
|
152
152
|
if (!(!(o instanceof HTMLElement) || !o.classList.contains("arco-input-number-mode-button")))
|
|
153
153
|
for (const c of o.querySelectorAll(".arco-input-number-step-button :is(.arco-icon-minus,.arco-icon-plus)")) {
|
|
154
|
-
const
|
|
155
|
-
|
|
154
|
+
const p = c.querySelector("path");
|
|
155
|
+
p && (c.setAttribute("viewBox", "0 0 16 16"), c.setAttribute("stroke", "none"), p.setAttribute("fill", "currentColor"), p.setAttribute("fill-rule", "evenodd"), p.setAttribute("clip-rule", "evenodd"), p.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"));
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
return fe(r), ke(r), () =>
|
|
158
|
+
return fe(r), ke(r), () => h(Qe, { ...t, ref: n }, a);
|
|
159
159
|
}
|
|
160
|
-
}), Qe), Qt =
|
|
160
|
+
}), Qe), Qt = te(F({
|
|
161
161
|
name: "DshTag",
|
|
162
162
|
inheritAttrs: !1,
|
|
163
163
|
setup(e, { attrs: t, slots: a }) {
|
|
164
|
-
const i =
|
|
164
|
+
const i = W(), n = () => {
|
|
165
165
|
var s;
|
|
166
166
|
const r = (s = i.value) == null ? void 0 : s.$el;
|
|
167
167
|
if (!(r instanceof HTMLElement))
|
|
@@ -169,29 +169,29 @@ const Wt = ee(jt, Be), zt = ee(F({
|
|
|
169
169
|
const o = r.querySelector(".arco-tag-close-btn");
|
|
170
170
|
o && !o.hasAttribute("tabindex") && (o.tabIndex = 0);
|
|
171
171
|
};
|
|
172
|
-
return fe(n), ke(n), () =>
|
|
172
|
+
return fe(n), ke(n), () => h(Je, De(t, { ref: i, onKeydown: (r) => {
|
|
173
173
|
r.defaultPrevented || !["Enter", " "].includes(r.key) || !(r.target instanceof HTMLElement) || !r.target.classList.contains("arco-tag-close-btn") || (r.preventDefault(), r.target.click());
|
|
174
174
|
} }), {
|
|
175
175
|
...a,
|
|
176
|
-
"close-icon": a["close-icon"] ?? (() =>
|
|
176
|
+
"close-icon": a["close-icon"] ?? (() => h("svg", { class: "dsh-tag-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, [h("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" })]))
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
}), Je), Jt =
|
|
179
|
+
}), Je), Jt = te(F({
|
|
180
180
|
name: "DshTree",
|
|
181
181
|
inheritAttrs: !1,
|
|
182
182
|
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
183
|
-
const n =
|
|
183
|
+
const n = W();
|
|
184
184
|
return i(new Proxy({}, {
|
|
185
185
|
get: (r, o) => {
|
|
186
186
|
var s;
|
|
187
187
|
return (s = n.value) == null ? void 0 : s[o];
|
|
188
188
|
},
|
|
189
189
|
has: (r, o) => n.value !== void 0 && o in n.value
|
|
190
|
-
})), () =>
|
|
190
|
+
})), () => h(Xe, { ...t, ref: n }, { ...a, extra: (r) => {
|
|
191
191
|
var o;
|
|
192
192
|
return [
|
|
193
193
|
...((o = a.extra) == null ? void 0 : o.call(a, r)) ?? [],
|
|
194
|
-
|
|
194
|
+
h("svg", { class: "dsh-tree-half-indicator", style: { display: "none" }, "aria-hidden": !0, viewBox: "0 0 24 24", width: 12, height: 12, fill: "none", stroke: "currentColor", "stroke-width": 3, "stroke-linecap": "round" }, [h("line", { x1: 21, x2: 3, y1: 12, y2: 12 })])
|
|
195
195
|
];
|
|
196
196
|
} });
|
|
197
197
|
}
|
|
@@ -209,45 +209,45 @@ function ea(e) {
|
|
|
209
209
|
let n = 0;
|
|
210
210
|
const r = () => {
|
|
211
211
|
n || (n = requestAnimationFrame(c));
|
|
212
|
-
}, o = new ResizeObserver(r), s = (l,
|
|
213
|
-
l.style.getPropertyValue(
|
|
212
|
+
}, o = new ResizeObserver(r), s = (l, x, w) => {
|
|
213
|
+
l.style.getPropertyValue(x) !== w && l.style.setProperty(x, w);
|
|
214
214
|
}, c = () => {
|
|
215
|
-
var
|
|
215
|
+
var x;
|
|
216
216
|
n = 0;
|
|
217
217
|
const l = /* @__PURE__ */ new Set();
|
|
218
|
-
for (const
|
|
219
|
-
const
|
|
218
|
+
for (const w of e.querySelectorAll(t)) {
|
|
219
|
+
const $ = Array.from(w.querySelectorAll(a)).reverse(), u = $.filter((Y) => {
|
|
220
220
|
var L;
|
|
221
221
|
return Y.style.opacity !== "0" && !Y.classList.contains("dsh-toast-slide-leave-active") && !((L = Y.parentElement) != null && L.className.includes("-exit"));
|
|
222
|
-
}),
|
|
223
|
-
|
|
224
|
-
let
|
|
222
|
+
}), m = u.length > 1 && (w.matches(":hover") || w.contains(document.activeElement));
|
|
223
|
+
w.dataset.dshToastStack = String(u.length), w.dataset.dshToastDirection = w.className.includes("bottom") || (x = w.dataset.position) != null && x.startsWith("bottom") ? "bottom" : "top";
|
|
224
|
+
let V = 0, A = 0;
|
|
225
225
|
for (const [Y, L] of u.entries()) {
|
|
226
|
-
const
|
|
227
|
-
Y === 0 && (A =
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
for (const
|
|
233
|
-
l.add(
|
|
234
|
-
|
|
226
|
+
const P = getComputedStyle(L), f = Array.from(L.children).filter((O) => !O.className.toString().includes("close")), S = L.style.height ? parseFloat(P.height) : Math.max(0, ...f.map((O) => O.offsetHeight)) + parseFloat(P.paddingTop) + parseFloat(P.paddingBottom) + parseFloat(P.borderTopWidth) + parseFloat(P.borderBottomWidth);
|
|
227
|
+
Y === 0 && (A = S), s(L, "--dsh-toast-index", String(Y)), s(L, "--dsh-toast-offset", `${V}px`), s(L, "--dsh-toast-height", `${S}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));
|
|
228
|
+
const v = L.querySelector(":scope > .arco-message-close-btn,:scope > .arco-notification-close-btn");
|
|
229
|
+
v && (v.setAttribute("role", "button"), v.setAttribute("aria-label", "关闭通知"), v.tabIndex = Y < 3 && (Y === 0 || m) ? 0 : -1);
|
|
230
|
+
const C = L.matches(".dsh-toast") ? L : L.parentElement;
|
|
231
|
+
C && (C.dataset.dshToastItem = "");
|
|
232
|
+
for (const O of f)
|
|
233
|
+
l.add(O), i.has(O) || o.observe(O);
|
|
234
|
+
V += S + 12;
|
|
235
235
|
}
|
|
236
|
-
for (const Y of
|
|
236
|
+
for (const Y of $.filter((L) => !u.includes(L)))
|
|
237
237
|
Y.dataset.dshToastIndex = "exiting";
|
|
238
|
-
s(
|
|
238
|
+
s(w, "--dsh-toast-front-height", `${A}px`);
|
|
239
239
|
}
|
|
240
|
-
for (const
|
|
241
|
-
l.has(
|
|
242
|
-
i.clear(), l.forEach((
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
!l.defaultPrevented &&
|
|
248
|
-
},
|
|
249
|
-
return
|
|
250
|
-
|
|
240
|
+
for (const w of i)
|
|
241
|
+
l.has(w) || o.unobserve(w);
|
|
242
|
+
i.clear(), l.forEach((w) => i.add(w));
|
|
243
|
+
}, p = new MutationObserver(r);
|
|
244
|
+
p.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] });
|
|
245
|
+
const d = (l) => {
|
|
246
|
+
const x = l.target;
|
|
247
|
+
!l.defaultPrevented && x instanceof HTMLElement && x.matches(".arco-message-close-btn,.arco-notification-close-btn") && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), x.click());
|
|
248
|
+
}, M = ["pointerover", "pointerout", "focusin", "focusout"];
|
|
249
|
+
return M.forEach((l) => e.addEventListener(l, r)), e.addEventListener("keydown", d), c(), () => {
|
|
250
|
+
p.disconnect(), o.disconnect(), cancelAnimationFrame(n), M.forEach((l) => e.removeEventListener(l, r)), e.removeEventListener("keydown", d);
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
const Re = Symbol("dsh-theme");
|
|
@@ -271,151 +271,151 @@ const Ha = F({
|
|
|
271
271
|
rtl: Boolean
|
|
272
272
|
},
|
|
273
273
|
setup(e, { attrs: t, slots: a }) {
|
|
274
|
-
const i =
|
|
275
|
-
let
|
|
276
|
-
const u = (
|
|
277
|
-
var
|
|
278
|
-
clearTimeout(l.get(
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
const
|
|
282
|
-
(
|
|
274
|
+
const i = W(), n = W(), r = q("light"), o = q(!1), s = q(!1), c = J(() => e.theme === "auto" ? r.value : e.theme), p = J(() => e.reducedMotion ?? s.value ? "reduced" : "full"), d = ye([]), M = ye([]), l = /* @__PURE__ */ new Map();
|
|
275
|
+
let x = 0, w = !1, $;
|
|
276
|
+
const u = (f) => {
|
|
277
|
+
var v;
|
|
278
|
+
clearTimeout(l.get(f)), l.delete(f);
|
|
279
|
+
const S = d.findIndex((C) => C.internalId === f);
|
|
280
|
+
if (S >= 0) {
|
|
281
|
+
const C = d.splice(S, 1)[0];
|
|
282
|
+
(v = C == null ? void 0 : C.onClose) == null || v.call(C, C.id ?? f);
|
|
283
283
|
}
|
|
284
|
-
},
|
|
285
|
-
if (clearTimeout(l.get(
|
|
284
|
+
}, m = (f) => {
|
|
285
|
+
if (clearTimeout(l.get(f.internalId)), !n.value)
|
|
286
286
|
return;
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
if (
|
|
287
|
+
const S = f.duration ?? 4e3;
|
|
288
|
+
S > 0 && l.set(f.internalId, setTimeout(() => u(f.internalId), S));
|
|
289
|
+
}, V = (f) => {
|
|
290
|
+
if (w)
|
|
291
291
|
throw new Error("DshProvider 已卸载,无法显示消息");
|
|
292
|
-
const
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
295
|
-
return
|
|
292
|
+
const S = typeof f == "string" ? { content: f } : f, v = S.id === void 0 ? void 0 : d.find((O) => O.id === S.id && O.kind === S.kind);
|
|
293
|
+
if (v) {
|
|
294
|
+
const O = { ...v, ...S };
|
|
295
|
+
return d[d.indexOf(v)] = O, m(O), { close: () => u(v.internalId) };
|
|
296
296
|
}
|
|
297
|
-
const
|
|
298
|
-
return
|
|
299
|
-
}, A = (
|
|
300
|
-
show:
|
|
297
|
+
const C = { ...S, internalId: ++x };
|
|
298
|
+
return d.push(C), m(C), { close: () => u(C.internalId) };
|
|
299
|
+
}, A = (f) => (S) => V({ ...typeof S == "string" ? { content: S } : S, type: f }), Y = {
|
|
300
|
+
show: V,
|
|
301
301
|
info: A("info"),
|
|
302
302
|
success: A("success"),
|
|
303
303
|
warning: A("warning"),
|
|
304
304
|
error: A("error"),
|
|
305
|
-
clear: (
|
|
306
|
-
(
|
|
307
|
-
).forEach((
|
|
308
|
-
remove: (
|
|
305
|
+
clear: (f, S) => [...d].filter(
|
|
306
|
+
(v) => (f === void 0 || (v.position ?? "top") === f) && (S === void 0 || v.kind === S)
|
|
307
|
+
).forEach((v) => u(v.internalId)),
|
|
308
|
+
remove: (f, S) => [...d].filter((v) => v.id === f && (S === void 0 || v.kind === S)).forEach((v) => u(v.internalId))
|
|
309
309
|
};
|
|
310
|
-
it(Re, { container: n, toast: Y, mountOverlay: (
|
|
311
|
-
if (
|
|
310
|
+
it(Re, { container: n, toast: Y, mountOverlay: (f) => {
|
|
311
|
+
if (w)
|
|
312
312
|
throw new Error("DshProvider 已卸载,无法打开浮层");
|
|
313
|
-
const
|
|
314
|
-
return
|
|
315
|
-
const
|
|
316
|
-
|
|
313
|
+
const S = { id: ++x, content: f };
|
|
314
|
+
return M.push(S), () => {
|
|
315
|
+
const v = M.indexOf(S);
|
|
316
|
+
v >= 0 && M.splice(v, 1);
|
|
317
317
|
};
|
|
318
|
-
}, locale:
|
|
319
|
-
var
|
|
320
|
-
return ((
|
|
318
|
+
}, locale: J(() => {
|
|
319
|
+
var f;
|
|
320
|
+
return ((f = e.locale) == null ? void 0 : f.locale) ?? "zh-CN";
|
|
321
321
|
}) });
|
|
322
|
-
const
|
|
323
|
-
const
|
|
324
|
-
if (!
|
|
322
|
+
const P = () => {
|
|
323
|
+
const f = n.value;
|
|
324
|
+
if (!f || !i.value)
|
|
325
325
|
return;
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
for (let
|
|
329
|
-
const
|
|
330
|
-
|
|
326
|
+
f.className = "dsh-ui dsh-ui-portal", f.dataset.theme = c.value, f.dataset.radius = e.radius, f.dataset.motion = p.value, f.dataset.hostTheme = String(e.theme === "auto" && o.value), f.dir = e.rtl ? "rtl" : "ltr", f.removeAttribute("style");
|
|
327
|
+
const S = getComputedStyle(i.value);
|
|
328
|
+
for (let v = 0; v < S.length; v++) {
|
|
329
|
+
const C = S.item(v);
|
|
330
|
+
C.startsWith("--") && f.style.setProperty(C, S.getPropertyValue(C));
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
return fe(() => {
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
o.value =
|
|
341
|
-
},
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
},
|
|
345
|
-
}), le([c,
|
|
346
|
-
var
|
|
347
|
-
|
|
348
|
-
for (const
|
|
349
|
-
clearTimeout(
|
|
350
|
-
l.clear(), (
|
|
351
|
-
}), () =>
|
|
334
|
+
const f = document.createElement("div");
|
|
335
|
+
f.className = "dsh-ui dsh-ui-portal", document.body.appendChild(f), n.value = f;
|
|
336
|
+
const S = Xt(f);
|
|
337
|
+
d.forEach(m);
|
|
338
|
+
const v = window.matchMedia("(prefers-color-scheme: dark)"), C = window.matchMedia("(prefers-reduced-motion: reduce)"), O = () => {
|
|
339
|
+
const T = document.body.getAttribute("data-ds-dark-theme"), b = document.body.getAttribute("arco-theme");
|
|
340
|
+
o.value = T !== null, r.value = T !== null ? T === "false" || T === "0" ? "light" : "dark" : b !== null ? b === "dark" ? "dark" : "light" : v.matches ? "dark" : "light", s.value = C.matches, re(P);
|
|
341
|
+
}, _ = new MutationObserver(O);
|
|
342
|
+
_.observe(document.body, { attributes: !0, attributeFilter: ["data-ds-dark-theme", "arco-theme", "style", "class"] }), v.addEventListener("change", O), C.addEventListener("change", O), $ = () => {
|
|
343
|
+
S(), _.disconnect(), v.removeEventListener("change", O), C.removeEventListener("change", O);
|
|
344
|
+
}, O();
|
|
345
|
+
}), le([c, p, () => e.radius, () => e.rtl], P, { flush: "post" }), ke(P), me(() => {
|
|
346
|
+
var f;
|
|
347
|
+
w = !0, $ == null || $();
|
|
348
|
+
for (const S of l.values())
|
|
349
|
+
clearTimeout(S);
|
|
350
|
+
l.clear(), (f = n.value) == null || f.remove(), n.value = void 0;
|
|
351
|
+
}), () => h(et, { locale: e.locale, rtl: e.rtl, updateAtScroll: !0, global: !1 }, {
|
|
352
352
|
default: () => {
|
|
353
|
-
var
|
|
353
|
+
var f;
|
|
354
354
|
return [
|
|
355
|
-
|
|
355
|
+
h("div", {
|
|
356
356
|
...t,
|
|
357
357
|
ref: i,
|
|
358
358
|
class: ["dsh-ui", t.class],
|
|
359
359
|
"data-theme": c.value,
|
|
360
360
|
"data-radius": e.radius,
|
|
361
|
-
"data-motion":
|
|
361
|
+
"data-motion": p.value,
|
|
362
362
|
"data-host-theme": String(e.theme === "auto" && o.value),
|
|
363
363
|
dir: e.rtl ? "rtl" : "ltr"
|
|
364
|
-
}, (
|
|
365
|
-
...
|
|
366
|
-
n.value ?
|
|
364
|
+
}, (f = a.default) == null ? void 0 : f.call(a)),
|
|
365
|
+
...M.map((S) => h("div", { key: S.id, style: { display: "contents" } }, [S.content()])),
|
|
366
|
+
n.value ? h(
|
|
367
367
|
st,
|
|
368
368
|
{ to: n.value },
|
|
369
|
-
["top", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"].map((
|
|
369
|
+
["top", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"].map((S) => h(Nt, {
|
|
370
370
|
tag: "div",
|
|
371
371
|
name: "dsh-toast-slide",
|
|
372
372
|
class: "dsh-toast-region",
|
|
373
|
-
"data-position":
|
|
373
|
+
"data-position": S,
|
|
374
374
|
"aria-label": "通知",
|
|
375
375
|
style: {
|
|
376
|
-
top:
|
|
377
|
-
bottom:
|
|
378
|
-
left:
|
|
379
|
-
right:
|
|
380
|
-
transform:
|
|
376
|
+
top: S.startsWith("top") ? "16px" : "auto",
|
|
377
|
+
bottom: S.startsWith("bottom") ? "16px" : "auto",
|
|
378
|
+
left: S.endsWith("Left") ? "16px" : S.endsWith("Right") ? "auto" : "50%",
|
|
379
|
+
right: S.endsWith("Right") ? "16px" : "auto",
|
|
380
|
+
transform: S.endsWith("Left") || S.endsWith("Right") ? "none" : "translateX(-50%)"
|
|
381
381
|
}
|
|
382
|
-
}, { default: () =>
|
|
383
|
-
(
|
|
384
|
-
var
|
|
385
|
-
return
|
|
386
|
-
key:
|
|
387
|
-
class: ["dsh-toast",
|
|
388
|
-
"data-type":
|
|
389
|
-
style:
|
|
390
|
-
role:
|
|
382
|
+
}, { default: () => d.filter((v) => (v.position ?? "top") === S).map(
|
|
383
|
+
(v) => {
|
|
384
|
+
var C;
|
|
385
|
+
return h("div", {
|
|
386
|
+
key: v.internalId,
|
|
387
|
+
class: ["dsh-toast", v.class],
|
|
388
|
+
"data-type": v.type ?? "info",
|
|
389
|
+
style: v.style,
|
|
390
|
+
role: v.type === "error" ? "alert" : "status",
|
|
391
391
|
onMouseenter: () => {
|
|
392
|
-
|
|
392
|
+
v.resetOnHover !== !1 && clearTimeout(l.get(v.internalId));
|
|
393
393
|
},
|
|
394
394
|
onMouseleave: () => {
|
|
395
|
-
|
|
395
|
+
v.resetOnHover !== !1 && m(v);
|
|
396
396
|
},
|
|
397
|
-
onFocusin: () => clearTimeout(l.get(
|
|
398
|
-
onFocusout: () =>
|
|
397
|
+
onFocusin: () => clearTimeout(l.get(v.internalId)),
|
|
398
|
+
onFocusout: () => m(v)
|
|
399
399
|
}, [
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
d: de[
|
|
400
|
+
v.showIcon ?? v.type !== "normal" ? h("div", { class: "dsh-toast-indicator", "aria-hidden": !0 }, [
|
|
401
|
+
v.icon ? v.icon() : v.type === "loading" ? h(He, { size: 16 }) : h("svg", { class: "dsh-toast-default-icon", viewBox: "0 0 16 16", fill: "none" }, h("path", {
|
|
402
|
+
d: de[v.type && v.type in de ? v.type : "info"],
|
|
403
403
|
fill: "currentColor",
|
|
404
404
|
"fill-rule": "evenodd",
|
|
405
405
|
"clip-rule": "evenodd"
|
|
406
406
|
}))
|
|
407
407
|
]) : null,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
(
|
|
408
|
+
h("div", { class: "dsh-toast-content" }, [
|
|
409
|
+
v.title ? h("div", { class: "dsh-toast-title" }, [typeof v.title == "function" ? v.title() : v.title]) : null,
|
|
410
|
+
h("div", { class: v.title ? "dsh-toast-description" : "dsh-toast-title" }, [typeof v.content == "function" ? v.content() : v.content]),
|
|
411
|
+
(C = v.footer) == null ? void 0 : C.call(v)
|
|
412
412
|
]),
|
|
413
|
-
|
|
413
|
+
v.closable !== !1 ? h("button", {
|
|
414
414
|
type: "button",
|
|
415
415
|
class: "dsh-toast-close",
|
|
416
416
|
"aria-label": "关闭通知",
|
|
417
|
-
onClick: () => u(
|
|
418
|
-
}, [
|
|
417
|
+
onClick: () => u(v.internalId)
|
|
418
|
+
}, [v.closeIconElement ?? v.closeIcon ? (v.closeIconElement ?? v.closeIcon)() : h("svg", { class: "dsh-toast-default-close-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0 }, h("path", {
|
|
419
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",
|
|
420
420
|
fill: "currentColor",
|
|
421
421
|
"fill-rule": "evenodd",
|
|
@@ -430,147 +430,147 @@ const Ha = F({
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
}), tt = /* @__PURE__ */ new Map();
|
|
433
|
-
function
|
|
433
|
+
function U(e, t, a) {
|
|
434
434
|
const i = F({
|
|
435
435
|
name: `Dsh${t}`,
|
|
436
436
|
inheritAttrs: !1,
|
|
437
437
|
setup(r, { attrs: o, slots: s, expose: c }) {
|
|
438
|
-
const { container:
|
|
438
|
+
const { container: p, locale: d } = se(), M = W(o.defaultValue ?? o["default-value"]), l = q(""), x = W(), w = W(), $ = q(!!(o.defaultPopupVisible ?? o["default-popup-visible"])), u = W();
|
|
439
439
|
return c(new Proxy({}, {
|
|
440
|
-
get: (
|
|
440
|
+
get: (m, V) => {
|
|
441
441
|
var A;
|
|
442
|
-
return (A =
|
|
442
|
+
return (A = x.value) == null ? void 0 : A[V];
|
|
443
443
|
},
|
|
444
|
-
has: (
|
|
444
|
+
has: (m, V) => x.value !== void 0 && V in x.value
|
|
445
445
|
})), () => {
|
|
446
|
-
var
|
|
447
|
-
if (!
|
|
446
|
+
var O;
|
|
447
|
+
if (!p.value)
|
|
448
448
|
return null;
|
|
449
|
-
const
|
|
449
|
+
const m = { ...o };
|
|
450
450
|
if (t === "Popconfirm")
|
|
451
|
-
for (const [
|
|
452
|
-
|
|
453
|
-
if (["Select", "AutoComplete", "Cascader", "TreeSelect", "DatePicker", "RangePicker", "TimePicker", "ColorPicker"].includes(t) && (
|
|
454
|
-
const
|
|
455
|
-
|
|
451
|
+
for (const [_, T] of [["cancelButtonProps", "cancel-button-props"], ["okButtonProps", "ok-button-props"]])
|
|
452
|
+
m[_] = { size: "small", ...o[_] ?? o[T] ?? {} }, delete m[T];
|
|
453
|
+
if (["Select", "AutoComplete", "Cascader", "TreeSelect", "DatePicker", "RangePicker", "TimePicker", "ColorPicker"].includes(t) && (m.triggerProps = { popupOffset: 8, ...o.triggerProps ?? o["trigger-props"] ?? {} }, delete m["trigger-props"]), ["Tooltip", "Popover", "Dropdown", "Popconfirm"].includes(t)) {
|
|
454
|
+
const _ = o.showArrow ?? o["show-arrow"], T = _ !== void 0 && _ !== !1;
|
|
455
|
+
m.popupOffset = o.popupOffset ?? o["popup-offset"] ?? (t === "Tooltip" ? T ? 7 : 3 : 8), (t === "Tooltip" || t === "Popover" || t === "Popconfirm") && (m.showArrow = T, delete m["show-arrow"]);
|
|
456
456
|
}
|
|
457
|
-
t === "Dsubmenu" && (
|
|
458
|
-
const
|
|
459
|
-
delete Y["popup-container"], delete
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"].map((
|
|
463
|
-
var
|
|
464
|
-
const
|
|
465
|
-
return
|
|
457
|
+
t === "Dsubmenu" && (m.popupOffset = o.popupOffset ?? o["popup-offset"] ?? 7);
|
|
458
|
+
const V = a === "triggerProps" ? "trigger-props" : "preview-props", A = a ? m[a] ?? o[V] : void 0, Y = typeof A == "object" && A !== null ? { ...A } : {}, L = a ? Y.popupContainer ?? Y["popup-container"] : o.popupContainer ?? o["popup-container"];
|
|
459
|
+
delete Y["popup-container"], delete m["popup-container"], a && delete m[V];
|
|
460
|
+
const P = a ? { [a]: { ...Y, popupContainer: L ?? p.value } } : { popupContainer: L ?? p.value }, f = ["Tooltip", "Popover", "Popconfirm", "Dropdown", "Dsubmenu"].includes(t), S = o.alignPoint ?? o["align-point"];
|
|
461
|
+
f && (S === void 0 || S === !1) && m.popupTranslate === void 0 && m["popup-translate"] === void 0 && L === void 0 && (m.popupTranslate = Object.defineProperties({}, Object.fromEntries(
|
|
462
|
+
["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"].map((_) => [_, { enumerable: !0, get() {
|
|
463
|
+
var D, g, y;
|
|
464
|
+
const T = t === "Dsubmenu" ? ((D = w.value) == null ? void 0 : D.closest(".arco-dropdown-option")) ?? (((g = x.value) == null ? void 0 : g.$el) instanceof Element ? x.value.$el : void 0) : w.value ?? (((y = x.value) == null ? void 0 : y.$el) instanceof Element ? x.value.$el : void 0), b = T == null ? void 0 : T.getBoundingClientRect();
|
|
465
|
+
return b ? ["top", "tl", "tr"].includes(_) ? [0, Math.ceil(b.top) - b.top] : ["bottom", "bl", "br"].includes(_) ? [0, Math.floor(b.bottom) - b.bottom] : ["left", "lt", "lb"].includes(_) ? [Math.ceil(b.left) - b.left, 0] : [Math.ceil(b.right) - b.right, 0] : [0, 0];
|
|
466
466
|
} }])
|
|
467
467
|
)));
|
|
468
|
-
let
|
|
468
|
+
let v = f ? {
|
|
469
469
|
...s,
|
|
470
|
-
default: (...
|
|
471
|
-
var
|
|
472
|
-
return (
|
|
473
|
-
if (
|
|
474
|
-
const g = Ee(
|
|
475
|
-
return g.children =
|
|
470
|
+
default: (..._) => {
|
|
471
|
+
var T;
|
|
472
|
+
return (T = s.default) == null ? void 0 : T.call(s, ..._).map(function b(D) {
|
|
473
|
+
if (D.type === Ht && Array.isArray(D.children)) {
|
|
474
|
+
const g = Ee(D);
|
|
475
|
+
return g.children = D.children.map((y) => ut(y) ? b(y) : y), g;
|
|
476
476
|
}
|
|
477
|
-
return Ee(
|
|
477
|
+
return Ee(D, {
|
|
478
478
|
ref: (g) => {
|
|
479
|
-
var
|
|
480
|
-
const
|
|
481
|
-
|
|
479
|
+
var k;
|
|
480
|
+
const y = g instanceof Element ? g : (g == null ? void 0 : g.$el) instanceof Element ? g.$el : void 0;
|
|
481
|
+
y && (!((k = w.value) != null && k.isConnected) || y.compareDocumentPosition(w.value) & Node.DOCUMENT_POSITION_FOLLOWING) && (w.value = y);
|
|
482
482
|
},
|
|
483
|
-
...["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 } } : {}
|
|
484
484
|
}, !0);
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
487
|
} : s;
|
|
488
|
-
if (t === "Popconfirm" && !s.icon && (o.type === void 0 || o.type === "info") && (
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
var
|
|
488
|
+
if (t === "Popconfirm" && !s.icon && (o.type === void 0 || o.type === "info") && (v = { ...v, icon: () => [h("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", style: { color: "var(--accent)" }, "aria-hidden": !0 }, [h("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" && m.showArrow && !(o.arrowClass ?? o["arrow-class"])) {
|
|
489
|
+
const _ = o.arrowStyle ?? o["arrow-style"], T = (_ == null ? void 0 : _.backgroundColor) ?? (_ == null ? void 0 : _.background) ?? o.backgroundColor ?? o["background-color"];
|
|
490
|
+
v = { ...v, content: () => {
|
|
491
|
+
var b;
|
|
492
492
|
return [
|
|
493
|
-
...((
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
...((b = s.content) == null ? void 0 : b.call(s)) ?? [Ft(String(o.content ?? ""))],
|
|
494
|
+
h(st, { to: u.value ?? p.value, disabled: !u.value }, [
|
|
495
|
+
h("svg", {
|
|
496
496
|
class: "dsh-tooltip-arrow",
|
|
497
497
|
"aria-hidden": !0,
|
|
498
498
|
width: 12,
|
|
499
499
|
height: 12,
|
|
500
500
|
viewBox: "0 0 12 12",
|
|
501
501
|
fill: "none",
|
|
502
|
-
style: { fill:
|
|
503
|
-
onVnodeMounted: (
|
|
502
|
+
style: { fill: T },
|
|
503
|
+
onVnodeMounted: (D) => {
|
|
504
504
|
re(() => {
|
|
505
|
-
var
|
|
506
|
-
const g =
|
|
507
|
-
g.isConnected && (u.value = ((
|
|
505
|
+
var y;
|
|
506
|
+
const g = D.el;
|
|
507
|
+
g.isConnected && (u.value = ((y = g.closest(".arco-trigger-popup-wrapper")) == null ? void 0 : y.querySelector(":scope > .arco-trigger-arrow")) ?? void 0);
|
|
508
508
|
});
|
|
509
509
|
},
|
|
510
510
|
onVnodeBeforeUnmount: () => {
|
|
511
511
|
u.value = void 0;
|
|
512
512
|
}
|
|
513
|
-
}, [
|
|
513
|
+
}, [h("path", { d: "M0 0C5.48483 8 6.5 8 12 0Z" })])
|
|
514
514
|
])
|
|
515
515
|
];
|
|
516
516
|
} };
|
|
517
517
|
}
|
|
518
518
|
if (t === "Select" && (o.allowSearch ?? o["allow-search"]) !== void 0 && (o.allowSearch ?? o["allow-search"]) !== !1 && Array.isArray(o.options) && !s.header) {
|
|
519
|
-
const
|
|
520
|
-
|
|
519
|
+
const _ = String(o.inputValue ?? o["input-value"] ?? l.value), T = o.filterOption ?? o["filter-option"];
|
|
520
|
+
m.showHeaderOnEmpty = !0, m.fallbackOption = !1, m.placeholder = o.placeholder ?? "Select an item", m.allowSearch = !1, delete m["allow-search"], m.inputValue = void 0, delete m["input-value"], m.options = T === !1 ? o.options : o.options.filter((b) => typeof T == "function" ? T(_, b) : String(b.label ?? b.value ?? b).toLocaleLowerCase().includes(_.toLocaleLowerCase())), v = { ...v, header: () => [h("div", { class: "dsh-select-search" }, h("div", { class: "dsh-select-search__group" }, h("input", {
|
|
521
521
|
type: "search",
|
|
522
522
|
"aria-label": "搜索",
|
|
523
|
-
value:
|
|
524
|
-
autofocus:
|
|
525
|
-
onInput(
|
|
526
|
-
const
|
|
527
|
-
l.value =
|
|
523
|
+
value: _,
|
|
524
|
+
autofocus: m.options.length > 0,
|
|
525
|
+
onInput(b) {
|
|
526
|
+
const D = b.target.value;
|
|
527
|
+
l.value = D;
|
|
528
528
|
for (const g of ["onUpdate:inputValue", "onInputValueChange", "onSearch"]) {
|
|
529
|
-
const
|
|
530
|
-
for (const
|
|
531
|
-
typeof
|
|
529
|
+
const y = o[g];
|
|
530
|
+
for (const k of Array.isArray(y) ? y : [y])
|
|
531
|
+
typeof k == "function" && k(D);
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
|
-
onKeydown(
|
|
535
|
-
var
|
|
536
|
-
["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(
|
|
534
|
+
onKeydown(b) {
|
|
535
|
+
var D, g;
|
|
536
|
+
["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(b.key) && (b.preventDefault(), (g = (D = x.value) == null ? void 0 : D.$el) == null || g.dispatchEvent(new KeyboardEvent("keydown", { key: b.key, bubbles: !0 })));
|
|
537
537
|
}
|
|
538
538
|
})))] };
|
|
539
539
|
}
|
|
540
540
|
if (t === "Select" && o.multiple && !s.label && !o.formatLabel && !o["format-label"]) {
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
const
|
|
544
|
-
return [
|
|
541
|
+
const _ = o.modelValue ?? o["model-value"] ?? M.value ?? [], b = new Intl.ListFormat(d.value).formatToParts(_.map((g, y) => String(y))).filter((g) => g.type === "literal").map((g) => g.value);
|
|
542
|
+
v = { ...v, label: ({ data: g }) => {
|
|
543
|
+
const y = _.findIndex((k) => (typeof k == "object" && k ? k.value : k) === g.value);
|
|
544
|
+
return [h("span", { class: "dsh-select-summary" }, [g.label ?? String(g.value), b[y] ?? ""])];
|
|
545
545
|
} };
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
for (const
|
|
550
|
-
typeof
|
|
546
|
+
const D = o.onChange;
|
|
547
|
+
m.onChange = (g, ...y) => {
|
|
548
|
+
M.value = g;
|
|
549
|
+
for (const k of Array.isArray(D) ? D : [D])
|
|
550
|
+
typeof k == "function" && k(g, ...y);
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
if (t === "AutoComplete") {
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
...
|
|
557
|
-
...s.suffix ? {} : { suffix: () => [
|
|
554
|
+
const _ = ((O = m.triggerProps) == null ? void 0 : O.popupVisible) ?? $.value;
|
|
555
|
+
v = {
|
|
556
|
+
...v,
|
|
557
|
+
...s.suffix ? {} : { suffix: () => [h("span", { class: ["dsh-combobox-indicator", { "dsh-combobox-indicator--open": _ }], "aria-hidden": !0 })] },
|
|
558
558
|
...Array.isArray(o.data) && !o.data.length && !s.footer ? { footer: () => {
|
|
559
|
-
var
|
|
560
|
-
return [
|
|
559
|
+
var T;
|
|
560
|
+
return [h("div", { class: "dsh-autocomplete-empty" }, h("span", { class: "dsh-autocomplete-empty__text" }, ((T = s.empty) == null ? void 0 : T.call(s)) ?? (d.value.startsWith("zh") ? "无结果" : "No results found")))];
|
|
561
561
|
} } : {}
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
const
|
|
565
|
-
onPopupVisibleChange(
|
|
566
|
-
|
|
567
|
-
const
|
|
568
|
-
Array.isArray(
|
|
569
|
-
typeof
|
|
570
|
-
}) : typeof
|
|
564
|
+
const C = ["Popover", "Popconfirm", "AutoComplete"].includes(t) ? {
|
|
565
|
+
onPopupVisibleChange(_) {
|
|
566
|
+
$.value = _;
|
|
567
|
+
const T = o.onPopupVisibleChange;
|
|
568
|
+
Array.isArray(T) ? T.forEach((b) => {
|
|
569
|
+
typeof b == "function" && b(_);
|
|
570
|
+
}) : typeof T == "function" && T(_);
|
|
571
571
|
}
|
|
572
572
|
} : {};
|
|
573
|
-
return
|
|
573
|
+
return h(e, { ...m, ...P, ...C, ref: x }, v);
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
});
|
|
@@ -578,16 +578,16 @@ function W(e, t, a) {
|
|
|
578
578
|
const n = e.install;
|
|
579
579
|
return n && Object.assign(i, {
|
|
580
580
|
install(r, o) {
|
|
581
|
-
function s(c,
|
|
582
|
-
return
|
|
581
|
+
function s(c, p) {
|
|
582
|
+
return p === void 0 ? r.component(c) : r.component(c, tt.get(p) ?? p);
|
|
583
583
|
}
|
|
584
584
|
n({ ...r, component: s }, o);
|
|
585
585
|
}
|
|
586
586
|
}), i;
|
|
587
587
|
}
|
|
588
|
-
const dt =
|
|
588
|
+
const dt = U(N.AutoComplete, "AutoComplete", "triggerProps"), Ra = dt, ft = U(N.Cascader, "Cascader"), aa = U(N.ColorPicker, "ColorPicker"), ht = U(N.DatePicker, "DatePicker"), Me = U(N.MonthPicker, "MonthPicker"), Ae = U(N.QuarterPicker, "QuarterPicker"), xe = U(N.WeekPicker, "WeekPicker"), $e = U(N.YearPicker, "YearPicker"), mt = U(N.RangePicker, "RangePicker"), vt = U(N.Dropdown, "Dropdown"), pt = U(N.Dsubmenu, "Dsubmenu"), gt = U(N.DropdownButton, "DropdownButton"), bt = U(N.Select, "Select"), na = U(N.TreeSelect, "TreeSelect"), ra = U(N.TimePicker, "TimePicker"), oa = U(N.Tooltip, "Tooltip"), la = U(N.Popover, "Popover"), ia = U(N.Popconfirm, "Popconfirm"), sa = U(N.Trigger, "Trigger"), ua = U(N.Mention, "Mention"), yt = U(N.Menu, "Menu", "triggerProps"), wt = U(N.Image, "Image", "previewProps"), Dt = U(N.ImagePreview, "ImagePreview"), St = U(N.ImagePreviewGroup, "ImagePreviewGroup");
|
|
589
589
|
Object.assign(ft, { CascaderPanel: N.CascaderPanel });
|
|
590
|
-
Object.assign(ht, { MonthPicker: Me, QuarterPicker: Ae, WeekPicker:
|
|
590
|
+
Object.assign(ht, { MonthPicker: Me, QuarterPicker: Ae, WeekPicker: xe, YearPicker: $e, RangePicker: mt });
|
|
591
591
|
Object.assign(vt, { Option: N.Doption, Group: N.Dgroup, Submenu: pt, Button: gt });
|
|
592
592
|
Object.assign(bt, { Option: N.Option, OptGroup: N.Optgroup });
|
|
593
593
|
Object.assign(yt, { Item: N.MenuItem, ItemGroup: N.MenuItemGroup, SubMenu: N.SubMenu });
|
|
@@ -598,26 +598,26 @@ function ca(e, t = !1) {
|
|
|
598
598
|
let a;
|
|
599
599
|
const i = e.trim().replace(/^#/, "");
|
|
600
600
|
if (/^(?:[a-f\d]{3}|[a-f\d]{4}|[a-f\d]{6}|[a-f\d]{8})$/i.test(i)) {
|
|
601
|
-
const
|
|
602
|
-
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));
|
|
603
603
|
} else {
|
|
604
|
-
const
|
|
605
|
-
if (
|
|
604
|
+
const $ = e.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+))?\s*\)$/i);
|
|
605
|
+
if (!$)
|
|
606
606
|
return {};
|
|
607
|
-
a = [Number(
|
|
607
|
+
a = [Number($[1]), Number($[2]), Number($[3]), $[4] === void 0 ? 1 : Number($[4])];
|
|
608
608
|
}
|
|
609
|
-
const [n, r, o] = a, s = t ? 1 : a[3], c = Math.max(n, r, o),
|
|
610
|
-
let
|
|
611
|
-
|
|
612
|
-
const l = c ?
|
|
609
|
+
const [n, r, o] = a, s = t ? 1 : a[3], c = Math.max(n, r, o), p = Math.min(n, r, o), d = c - p;
|
|
610
|
+
let M = d === 0 ? 0 : c === n ? ((r - o) / d + 6) % 6 : c === r ? (o - n) / d + 2 : (n - r) / d + 4;
|
|
611
|
+
M *= 60;
|
|
612
|
+
const l = c ? d / c * 100 : 0, x = c / 255 * 100;
|
|
613
613
|
return {
|
|
614
614
|
"--dsh-color": `rgb(${n}, ${r}, ${o})`,
|
|
615
615
|
"--dsh-color-current": `rgb(${n} ${r} ${o} / ${s})`,
|
|
616
616
|
"--dsh-color-transparent": `rgb(${n} ${r} ${o} / 0)`,
|
|
617
|
-
"--dsh-color-hue": `hsl(${
|
|
617
|
+
"--dsh-color-hue": `hsl(${M} 100% 50%)`,
|
|
618
618
|
"--dsh-color-x": `${Number(l.toFixed(2))}%`,
|
|
619
|
-
"--dsh-color-y": `${Number((100 -
|
|
620
|
-
"--dsh-color-hue-x": `${Math.round(
|
|
619
|
+
"--dsh-color-y": `${Number((100 - x).toFixed(2))}%`,
|
|
620
|
+
"--dsh-color-hue-x": `${Math.round(M) / 360 * 100}%`,
|
|
621
621
|
"--dsh-color-alpha-x": `${s * 100}%`
|
|
622
622
|
};
|
|
623
623
|
}
|
|
@@ -626,24 +626,24 @@ const Ne = F({
|
|
|
626
626
|
inheritAttrs: !1,
|
|
627
627
|
props: { showFormatControls: Boolean },
|
|
628
628
|
setup(e, { attrs: t, slots: a, expose: i }) {
|
|
629
|
-
const n =
|
|
629
|
+
const n = W(t.defaultValue ?? t["default-value"]), r = W();
|
|
630
630
|
return i(new Proxy({}, { get: (o, s) => {
|
|
631
631
|
var c;
|
|
632
632
|
return (c = r.value) == null ? void 0 : c[s];
|
|
633
633
|
}, has: (o, s) => r.value !== void 0 && s in r.value })), () => {
|
|
634
|
-
const { class: o, style: s, ...c } = t,
|
|
635
|
-
return
|
|
636
|
-
class: ["dsh-color-trigger",
|
|
637
|
-
style:
|
|
638
|
-
}, [
|
|
634
|
+
const { class: o, style: s, ...c } = t, p = t.modelValue ?? t["model-value"] ?? n.value, d = t.disabledAlpha ?? t["disabled-alpha"], M = ca(p, d !== void 0 && d !== !1), l = t.triggerProps ?? t["trigger-props"] ?? {}, x = e.showFormatControls || t.format === "rgb", w = t.hideTrigger ?? t["hide-trigger"], $ = w !== void 0 && w !== !1;
|
|
635
|
+
return h("span", {
|
|
636
|
+
class: ["dsh-color-trigger", $ && "dsh-color-panel", $ && x && "dsh-color-panel--advanced", !$ && o],
|
|
637
|
+
style: $ ? M : [M, s]
|
|
638
|
+
}, [h(aa, {
|
|
639
639
|
...c,
|
|
640
640
|
ref: r,
|
|
641
|
-
|
|
642
|
-
triggerProps: { ...l, contentClass: [l.contentClass, "dsh-color-panel", { "dsh-color-panel--advanced":
|
|
641
|
+
...$ ? { class: o, style: s } : {},
|
|
642
|
+
triggerProps: { ...l, contentClass: [l.contentClass, "dsh-color-panel", { "dsh-color-panel--advanced": x }], contentStyle: { ...M, ...l.contentStyle } },
|
|
643
643
|
"onUpdate:modelValue": (u) => {
|
|
644
644
|
n.value = u;
|
|
645
|
-
const
|
|
646
|
-
typeof
|
|
645
|
+
const m = t["onUpdate:modelValue"];
|
|
646
|
+
typeof m == "function" && m(u);
|
|
647
647
|
}
|
|
648
648
|
}, a)]);
|
|
649
649
|
};
|
|
@@ -661,275 +661,275 @@ function fa() {
|
|
|
661
661
|
(function(a, i) {
|
|
662
662
|
e.exports = i();
|
|
663
663
|
})(da, (function() {
|
|
664
|
-
var a = 1e3, i = 6e4, n = 36e5, r = "millisecond", o = "second", s = "minute", c = "hour",
|
|
665
|
-
var
|
|
666
|
-
return "[" +
|
|
667
|
-
} }, A = function(
|
|
668
|
-
var
|
|
669
|
-
return !
|
|
670
|
-
}, Y = { s: A, z: function(
|
|
671
|
-
var
|
|
672
|
-
return (
|
|
673
|
-
}, m: function
|
|
674
|
-
if (
|
|
675
|
-
var
|
|
676
|
-
return +(-(
|
|
677
|
-
}, a: function(
|
|
678
|
-
return
|
|
679
|
-
}, p: function(
|
|
680
|
-
return { M
|
|
681
|
-
}, u: function(
|
|
682
|
-
return
|
|
683
|
-
} }, L = "en",
|
|
684
|
-
|
|
685
|
-
var
|
|
686
|
-
return
|
|
687
|
-
},
|
|
688
|
-
var
|
|
689
|
-
if (!
|
|
690
|
-
if (typeof
|
|
691
|
-
var
|
|
692
|
-
|
|
693
|
-
var E =
|
|
694
|
-
if (!
|
|
664
|
+
var a = 1e3, i = 6e4, n = 36e5, r = "millisecond", o = "second", s = "minute", c = "hour", p = "day", d = "week", M = "month", l = "quarter", x = "year", w = "date", $ = "Invalid Date", u = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m = /\[([^\]]+)]|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, V = { 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(b) {
|
|
665
|
+
var D = ["th", "st", "nd", "rd"], g = b % 100;
|
|
666
|
+
return "[" + b + (D[(g - 20) % 10] || D[g] || D[0]) + "]";
|
|
667
|
+
} }, A = function(b, D, g) {
|
|
668
|
+
var y = String(b);
|
|
669
|
+
return !y || y.length >= D ? b : "" + Array(D + 1 - y.length).join(g) + b;
|
|
670
|
+
}, Y = { s: A, z: function(b) {
|
|
671
|
+
var D = -b.utcOffset(), g = Math.abs(D), y = Math.floor(g / 60), k = g % 60;
|
|
672
|
+
return (D <= 0 ? "+" : "-") + A(y, 2, "0") + ":" + A(k, 2, "0");
|
|
673
|
+
}, m: function b(D, g) {
|
|
674
|
+
if (D.date() < g.date()) return -b(g, D);
|
|
675
|
+
var y = 12 * (g.year() - D.year()) + (g.month() - D.month()), k = D.clone().add(y, M), I = g - k < 0, E = D.clone().add(y + (I ? -1 : 1), M);
|
|
676
|
+
return +(-(y + (g - k) / (I ? k - E : E - k)) || 0);
|
|
677
|
+
}, a: function(b) {
|
|
678
|
+
return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
|
|
679
|
+
}, p: function(b) {
|
|
680
|
+
return { M, y: x, w: d, d: p, D: w, h: c, m: s, s: o, ms: r, Q: l }[b] || String(b || "").toLowerCase().replace(/s$/, "");
|
|
681
|
+
}, u: function(b) {
|
|
682
|
+
return b === void 0;
|
|
683
|
+
} }, L = "en", P = {};
|
|
684
|
+
P[L] = V;
|
|
685
|
+
var f = "$isDayjsObject", S = function(b) {
|
|
686
|
+
return b instanceof _ || !(!b || !b[f]);
|
|
687
|
+
}, v = function b(D, g, y) {
|
|
688
|
+
var k;
|
|
689
|
+
if (!D) return L;
|
|
690
|
+
if (typeof D == "string") {
|
|
691
|
+
var I = D.toLowerCase();
|
|
692
|
+
P[I] && (k = I), g && (P[I] = g, k = I);
|
|
693
|
+
var E = D.split("-");
|
|
694
|
+
if (!k && E.length > 1) return b(E[0]);
|
|
695
695
|
} else {
|
|
696
|
-
var
|
|
697
|
-
|
|
696
|
+
var B = D.name;
|
|
697
|
+
P[B] = D, k = B;
|
|
698
698
|
}
|
|
699
|
-
return !
|
|
700
|
-
},
|
|
701
|
-
if (
|
|
702
|
-
var g = typeof
|
|
703
|
-
return g.date =
|
|
704
|
-
},
|
|
705
|
-
|
|
706
|
-
return
|
|
699
|
+
return !y && k && (L = k), k || !y && L;
|
|
700
|
+
}, C = function(b, D) {
|
|
701
|
+
if (S(b)) return b.clone();
|
|
702
|
+
var g = typeof D == "object" ? D : {};
|
|
703
|
+
return g.date = b, g.args = arguments, new _(g);
|
|
704
|
+
}, O = Y;
|
|
705
|
+
O.l = v, O.i = S, O.w = function(b, D) {
|
|
706
|
+
return C(b, { locale: D.$L, utc: D.$u, x: D.$x, $offset: D.$offset });
|
|
707
707
|
};
|
|
708
|
-
var
|
|
709
|
-
function
|
|
710
|
-
this.$L =
|
|
708
|
+
var _ = (function() {
|
|
709
|
+
function b(g) {
|
|
710
|
+
this.$L = v(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[f] = !0;
|
|
711
711
|
}
|
|
712
|
-
var
|
|
713
|
-
return
|
|
714
|
-
this.$d = (function(
|
|
715
|
-
var
|
|
716
|
-
if (
|
|
717
|
-
if (
|
|
718
|
-
if (
|
|
719
|
-
if (typeof
|
|
720
|
-
var E =
|
|
712
|
+
var D = b.prototype;
|
|
713
|
+
return D.parse = function(g) {
|
|
714
|
+
this.$d = (function(y) {
|
|
715
|
+
var k = y.date, I = y.utc;
|
|
716
|
+
if (k === null) return /* @__PURE__ */ new Date(NaN);
|
|
717
|
+
if (O.u(k)) return /* @__PURE__ */ new Date();
|
|
718
|
+
if (k instanceof Date) return new Date(k);
|
|
719
|
+
if (typeof k == "string" && !/Z$/i.test(k)) {
|
|
720
|
+
var E = k.match(u);
|
|
721
721
|
if (E) {
|
|
722
|
-
var
|
|
723
|
-
return
|
|
722
|
+
var B = E[2] - 1 || 0, H = (E[7] || "0").substring(0, 3);
|
|
723
|
+
return I ? new Date(Date.UTC(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, H)) : new Date(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, H);
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
return new Date(
|
|
726
|
+
return new Date(k);
|
|
727
727
|
})(g), this.init();
|
|
728
|
-
},
|
|
728
|
+
}, D.init = function() {
|
|
729
729
|
var g = this.$d;
|
|
730
730
|
this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
|
|
731
|
-
},
|
|
732
|
-
return
|
|
733
|
-
},
|
|
734
|
-
return this.$d.toString() !==
|
|
735
|
-
},
|
|
736
|
-
var
|
|
737
|
-
return this.startOf(
|
|
738
|
-
},
|
|
739
|
-
return
|
|
740
|
-
},
|
|
741
|
-
return this.endOf(
|
|
742
|
-
},
|
|
743
|
-
return
|
|
744
|
-
},
|
|
731
|
+
}, D.$utils = function() {
|
|
732
|
+
return O;
|
|
733
|
+
}, D.isValid = function() {
|
|
734
|
+
return this.$d.toString() !== $;
|
|
735
|
+
}, D.isSame = function(g, y) {
|
|
736
|
+
var k = C(g);
|
|
737
|
+
return this.startOf(y) <= k && k <= this.endOf(y);
|
|
738
|
+
}, D.isAfter = function(g, y) {
|
|
739
|
+
return C(g) < this.startOf(y);
|
|
740
|
+
}, D.isBefore = function(g, y) {
|
|
741
|
+
return this.endOf(y) < C(g);
|
|
742
|
+
}, D.$g = function(g, y, k) {
|
|
743
|
+
return O.u(g) ? this[y] : this.set(k, g);
|
|
744
|
+
}, D.unix = function() {
|
|
745
745
|
return Math.floor(this.valueOf() / 1e3);
|
|
746
|
-
},
|
|
746
|
+
}, D.valueOf = function() {
|
|
747
747
|
return this.$d.getTime();
|
|
748
|
-
},
|
|
749
|
-
var
|
|
750
|
-
var
|
|
751
|
-
return
|
|
752
|
-
}, H = function(
|
|
753
|
-
return
|
|
754
|
-
}, R = this.$W,
|
|
748
|
+
}, D.startOf = function(g, y) {
|
|
749
|
+
var k = this, I = !!O.u(y) || y, E = O.p(g), B = function(X, K) {
|
|
750
|
+
var Q = O.w(k.$u ? Date.UTC(k.$y, K, X) : new Date(k.$y, K, X), k);
|
|
751
|
+
return I ? Q : Q.endOf(p);
|
|
752
|
+
}, H = function(X, K) {
|
|
753
|
+
return O.w(k.toDate()[X].apply(k.toDate("s"), (I ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(K)), k);
|
|
754
|
+
}, R = this.$W, j = this.$M, z = this.$D, G = "set" + (this.$u ? "UTC" : "");
|
|
755
755
|
switch (E) {
|
|
756
|
+
case x:
|
|
757
|
+
return I ? B(1, 0) : B(31, 11);
|
|
756
758
|
case M:
|
|
757
|
-
return
|
|
758
|
-
case
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
case y:
|
|
765
|
-
return H(te + "Hours", 0);
|
|
759
|
+
return I ? B(1, j) : B(0, j + 1);
|
|
760
|
+
case d:
|
|
761
|
+
var Z = this.$locale().weekStart || 0, oe = (R < Z ? R + 7 : R) - Z;
|
|
762
|
+
return B(I ? z - oe : z + (6 - oe), j);
|
|
763
|
+
case p:
|
|
764
|
+
case w:
|
|
765
|
+
return H(G + "Hours", 0);
|
|
766
766
|
case c:
|
|
767
|
-
return H(
|
|
767
|
+
return H(G + "Minutes", 1);
|
|
768
768
|
case s:
|
|
769
|
-
return H(
|
|
769
|
+
return H(G + "Seconds", 2);
|
|
770
770
|
case o:
|
|
771
|
-
return H(
|
|
771
|
+
return H(G + "Milliseconds", 3);
|
|
772
772
|
default:
|
|
773
773
|
return this.clone();
|
|
774
774
|
}
|
|
775
|
-
},
|
|
775
|
+
}, D.endOf = function(g) {
|
|
776
776
|
return this.startOf(g, !1);
|
|
777
|
-
},
|
|
778
|
-
var
|
|
779
|
-
if (
|
|
780
|
-
var R = this.clone().set(
|
|
781
|
-
R.$d[
|
|
782
|
-
} else
|
|
777
|
+
}, D.$set = function(g, y) {
|
|
778
|
+
var k, I = O.p(g), E = "set" + (this.$u ? "UTC" : ""), B = (k = {}, k[p] = E + "Date", k[w] = E + "Date", k[M] = E + "Month", k[x] = E + "FullYear", k[c] = E + "Hours", k[s] = E + "Minutes", k[o] = E + "Seconds", k[r] = E + "Milliseconds", k)[I], H = I === p ? this.$D + (y - this.$W) : y;
|
|
779
|
+
if (I === M || I === x) {
|
|
780
|
+
var R = this.clone().set(w, 1);
|
|
781
|
+
R.$d[B](H), R.init(), this.$d = R.set(w, Math.min(this.$D, R.daysInMonth())).$d;
|
|
782
|
+
} else B && this.$d[B](H);
|
|
783
783
|
return this.init(), this;
|
|
784
|
-
},
|
|
785
|
-
return this.clone().$set(g,
|
|
786
|
-
},
|
|
787
|
-
return this[
|
|
788
|
-
},
|
|
789
|
-
var
|
|
784
|
+
}, D.set = function(g, y) {
|
|
785
|
+
return this.clone().$set(g, y);
|
|
786
|
+
}, D.get = function(g) {
|
|
787
|
+
return this[O.p(g)]();
|
|
788
|
+
}, D.add = function(g, y) {
|
|
789
|
+
var k, I = this;
|
|
790
790
|
g = Number(g);
|
|
791
|
-
var E =
|
|
792
|
-
var
|
|
793
|
-
return
|
|
791
|
+
var E = O.p(y), B = function(j) {
|
|
792
|
+
var z = C(I);
|
|
793
|
+
return O.w(z.date(z.date() + Math.round(j * g)), I);
|
|
794
794
|
};
|
|
795
|
-
if (E ===
|
|
796
|
-
if (E ===
|
|
797
|
-
if (E ===
|
|
798
|
-
if (E ===
|
|
799
|
-
var H = (
|
|
800
|
-
return
|
|
801
|
-
},
|
|
802
|
-
return this.add(-1 * g,
|
|
803
|
-
},
|
|
804
|
-
var
|
|
805
|
-
if (!this.isValid()) return
|
|
806
|
-
var
|
|
807
|
-
return K && (K[
|
|
795
|
+
if (E === M) return this.set(M, this.$M + g);
|
|
796
|
+
if (E === x) return this.set(x, this.$y + g);
|
|
797
|
+
if (E === p) return B(1);
|
|
798
|
+
if (E === d) return B(7);
|
|
799
|
+
var H = (k = {}, k[s] = i, k[c] = n, k[o] = a, k)[E] || 1, R = this.$d.getTime() + g * H;
|
|
800
|
+
return O.w(R, this);
|
|
801
|
+
}, D.subtract = function(g, y) {
|
|
802
|
+
return this.add(-1 * g, y);
|
|
803
|
+
}, D.format = function(g) {
|
|
804
|
+
var y = this, k = this.$locale();
|
|
805
|
+
if (!this.isValid()) return k.invalidDate || $;
|
|
806
|
+
var I = g || "YYYY-MM-DDTHH:mm:ssZ", E = O.z(this), B = this.$H, H = this.$m, R = this.$M, j = k.weekdays, z = k.months, G = k.meridiem, Z = function(K, Q, ee, ae) {
|
|
807
|
+
return K && (K[Q] || K(y, I)) || ee[Q].slice(0, ae);
|
|
808
808
|
}, oe = function(K) {
|
|
809
|
-
return
|
|
810
|
-
},
|
|
809
|
+
return O.s(B % 12 || 12, K, "0");
|
|
810
|
+
}, X = G || function(K, Q, ee) {
|
|
811
811
|
var ae = K < 12 ? "AM" : "PM";
|
|
812
|
-
return
|
|
812
|
+
return ee ? ae.toLowerCase() : ae;
|
|
813
813
|
};
|
|
814
|
-
return
|
|
815
|
-
return
|
|
816
|
-
switch (
|
|
814
|
+
return I.replace(m, (function(K, Q) {
|
|
815
|
+
return Q || (function(ee) {
|
|
816
|
+
switch (ee) {
|
|
817
817
|
case "YY":
|
|
818
|
-
return String(
|
|
818
|
+
return String(y.$y).slice(-2);
|
|
819
819
|
case "YYYY":
|
|
820
|
-
return
|
|
820
|
+
return O.s(y.$y, 4, "0");
|
|
821
821
|
case "M":
|
|
822
822
|
return R + 1;
|
|
823
823
|
case "MM":
|
|
824
|
-
return
|
|
824
|
+
return O.s(R + 1, 2, "0");
|
|
825
825
|
case "MMM":
|
|
826
|
-
return
|
|
826
|
+
return Z(k.monthsShort, R, z, 3);
|
|
827
827
|
case "MMMM":
|
|
828
|
-
return
|
|
828
|
+
return Z(z, R);
|
|
829
829
|
case "D":
|
|
830
|
-
return
|
|
830
|
+
return y.$D;
|
|
831
831
|
case "DD":
|
|
832
|
-
return
|
|
832
|
+
return O.s(y.$D, 2, "0");
|
|
833
833
|
case "d":
|
|
834
|
-
return String(
|
|
834
|
+
return String(y.$W);
|
|
835
835
|
case "dd":
|
|
836
|
-
return
|
|
836
|
+
return Z(k.weekdaysMin, y.$W, j, 2);
|
|
837
837
|
case "ddd":
|
|
838
|
-
return
|
|
838
|
+
return Z(k.weekdaysShort, y.$W, j, 3);
|
|
839
839
|
case "dddd":
|
|
840
|
-
return
|
|
840
|
+
return j[y.$W];
|
|
841
841
|
case "H":
|
|
842
|
-
return String(
|
|
842
|
+
return String(B);
|
|
843
843
|
case "HH":
|
|
844
|
-
return
|
|
844
|
+
return O.s(B, 2, "0");
|
|
845
845
|
case "h":
|
|
846
846
|
return oe(1);
|
|
847
847
|
case "hh":
|
|
848
848
|
return oe(2);
|
|
849
849
|
case "a":
|
|
850
|
-
return
|
|
850
|
+
return X(B, H, !0);
|
|
851
851
|
case "A":
|
|
852
|
-
return
|
|
852
|
+
return X(B, H, !1);
|
|
853
853
|
case "m":
|
|
854
854
|
return String(H);
|
|
855
855
|
case "mm":
|
|
856
|
-
return
|
|
856
|
+
return O.s(H, 2, "0");
|
|
857
857
|
case "s":
|
|
858
|
-
return String(
|
|
858
|
+
return String(y.$s);
|
|
859
859
|
case "ss":
|
|
860
|
-
return
|
|
860
|
+
return O.s(y.$s, 2, "0");
|
|
861
861
|
case "SSS":
|
|
862
|
-
return
|
|
862
|
+
return O.s(y.$ms, 3, "0");
|
|
863
863
|
case "Z":
|
|
864
864
|
return E;
|
|
865
865
|
}
|
|
866
866
|
return null;
|
|
867
867
|
})(K) || E.replace(":", "");
|
|
868
868
|
}));
|
|
869
|
-
},
|
|
869
|
+
}, D.utcOffset = function() {
|
|
870
870
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
871
|
-
},
|
|
872
|
-
var
|
|
873
|
-
return
|
|
871
|
+
}, D.diff = function(g, y, k) {
|
|
872
|
+
var I, E = this, B = O.p(y), H = C(g), R = (H.utcOffset() - this.utcOffset()) * i, j = this - H, z = function() {
|
|
873
|
+
return O.m(E, H);
|
|
874
874
|
};
|
|
875
|
-
switch (
|
|
876
|
-
case
|
|
877
|
-
|
|
875
|
+
switch (B) {
|
|
876
|
+
case x:
|
|
877
|
+
I = z() / 12;
|
|
878
878
|
break;
|
|
879
|
-
case
|
|
880
|
-
|
|
879
|
+
case M:
|
|
880
|
+
I = z();
|
|
881
881
|
break;
|
|
882
882
|
case l:
|
|
883
|
-
|
|
883
|
+
I = z() / 3;
|
|
884
884
|
break;
|
|
885
|
-
case
|
|
886
|
-
|
|
885
|
+
case d:
|
|
886
|
+
I = (j - R) / 6048e5;
|
|
887
887
|
break;
|
|
888
|
-
case
|
|
889
|
-
|
|
888
|
+
case p:
|
|
889
|
+
I = (j - R) / 864e5;
|
|
890
890
|
break;
|
|
891
891
|
case c:
|
|
892
|
-
|
|
892
|
+
I = j / n;
|
|
893
893
|
break;
|
|
894
894
|
case s:
|
|
895
|
-
|
|
895
|
+
I = j / i;
|
|
896
896
|
break;
|
|
897
897
|
case o:
|
|
898
|
-
|
|
898
|
+
I = j / a;
|
|
899
899
|
break;
|
|
900
900
|
default:
|
|
901
|
-
|
|
901
|
+
I = j;
|
|
902
902
|
}
|
|
903
|
-
return
|
|
904
|
-
},
|
|
905
|
-
return this.endOf(
|
|
906
|
-
},
|
|
907
|
-
return
|
|
908
|
-
},
|
|
903
|
+
return k ? I : O.a(I);
|
|
904
|
+
}, D.daysInMonth = function() {
|
|
905
|
+
return this.endOf(M).$D;
|
|
906
|
+
}, D.$locale = function() {
|
|
907
|
+
return P[this.$L];
|
|
908
|
+
}, D.locale = function(g, y) {
|
|
909
909
|
if (!g) return this.$L;
|
|
910
|
-
var
|
|
911
|
-
return
|
|
912
|
-
},
|
|
913
|
-
return
|
|
914
|
-
},
|
|
910
|
+
var k = this.clone(), I = v(g, y, !0);
|
|
911
|
+
return I && (k.$L = I), k;
|
|
912
|
+
}, D.clone = function() {
|
|
913
|
+
return O.w(this.$d, this);
|
|
914
|
+
}, D.toDate = function() {
|
|
915
915
|
return new Date(this.valueOf());
|
|
916
|
-
},
|
|
916
|
+
}, D.toJSON = function() {
|
|
917
917
|
return this.isValid() ? this.toISOString() : null;
|
|
918
|
-
},
|
|
918
|
+
}, D.toISOString = function() {
|
|
919
919
|
return this.$d.toISOString();
|
|
920
|
-
},
|
|
920
|
+
}, D.toString = function() {
|
|
921
921
|
return this.$d.toUTCString();
|
|
922
|
-
},
|
|
923
|
-
})(),
|
|
924
|
-
return
|
|
925
|
-
|
|
926
|
-
return this.$g(
|
|
922
|
+
}, b;
|
|
923
|
+
})(), T = _.prototype;
|
|
924
|
+
return C.prototype = T, [["$ms", r], ["$s", o], ["$m", s], ["$H", c], ["$W", p], ["$M", M], ["$y", x], ["$D", w]].forEach((function(b) {
|
|
925
|
+
T[b[1]] = function(D) {
|
|
926
|
+
return this.$g(D, b[0], b[1]);
|
|
927
927
|
};
|
|
928
|
-
})),
|
|
929
|
-
return
|
|
930
|
-
},
|
|
931
|
-
return
|
|
932
|
-
},
|
|
928
|
+
})), C.extend = function(b, D) {
|
|
929
|
+
return b.$i || (b(D, _, C), b.$i = !0), C;
|
|
930
|
+
}, C.locale = v, C.isDayjs = S, C.unix = function(b) {
|
|
931
|
+
return C(1e3 * b);
|
|
932
|
+
}, C.en = P[L], C.Ls = P, C.p = {}, C;
|
|
933
933
|
}));
|
|
934
934
|
})(ge)), ge.exports;
|
|
935
935
|
}
|
|
@@ -950,29 +950,29 @@ function Ie(e) {
|
|
|
950
950
|
function va(e, t) {
|
|
951
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("/");
|
|
952
952
|
s !== n.source && (n.source = s, n.parts = a.map((l) => l ? { year: l.year(), month: l.month() + 1, day: l.date() } : {}));
|
|
953
|
-
const c = (l,
|
|
954
|
-
var
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
const u = Ie(
|
|
953
|
+
const c = (l, x, w) => {
|
|
954
|
+
var m;
|
|
955
|
+
const $ = (m = n.parts)[l] ?? (m[l] = {});
|
|
956
|
+
$[x] = w;
|
|
957
|
+
const u = Ie($);
|
|
958
958
|
if (u && !t.disabledDate(u)) {
|
|
959
|
-
const
|
|
960
|
-
|
|
959
|
+
const V = Array.from({ length: i ? 2 : 1 }, (A, Y) => Ie(n.parts[Y] ?? {}));
|
|
960
|
+
V[l] = u, V.every((A) => !A || !t.disabledDate(A)) && t.change(V);
|
|
961
961
|
}
|
|
962
|
-
|
|
963
|
-
},
|
|
962
|
+
w === void 0 && a[l] && t.change([]), t.invalidate();
|
|
963
|
+
}, p = (l, x) => {
|
|
964
964
|
var u;
|
|
965
|
-
const
|
|
966
|
-
(u =
|
|
967
|
-
},
|
|
968
|
-
var
|
|
969
|
-
if (!
|
|
970
|
-
return e("span", { key: u, className: "dsh-date-input__literal", "aria-hidden": !0 },
|
|
971
|
-
const
|
|
972
|
-
if (r || o || !/^\d+$/.test(
|
|
965
|
+
const w = l.closest(".dsh-date-input"), $ = Array.from((w == null ? void 0 : w.querySelectorAll("[role=spinbutton]")) ?? []);
|
|
966
|
+
(u = $[$.indexOf(l) + x]) == null || u.focus();
|
|
967
|
+
}, d = Array.from({ length: i ? 2 : 1 }, (l, x) => e("div", { className: "dsh-date-input__field", key: x }, ...ma(t.format).map(({ unit: w, text: $ }, u) => {
|
|
968
|
+
var P;
|
|
969
|
+
if (!w)
|
|
970
|
+
return e("span", { key: u, className: "dsh-date-input__literal", "aria-hidden": !0 }, $);
|
|
971
|
+
const m = (P = n.parts)[x] ?? (P[x] = {}), V = m[w], A = w === "year" ? 9999 : w === "month" ? 12 : Ie({ year: m.year ?? 2e3, month: m.month ?? 1, day: 1 }).daysInMonth(), Y = `${x}-${w}`, L = (f, S) => {
|
|
972
|
+
if (r || o || !/^\d+$/.test(f))
|
|
973
973
|
return;
|
|
974
|
-
const
|
|
975
|
-
n.target = Y, n.buffer =
|
|
974
|
+
const v = (n.target === Y ? n.buffer : "") + f, C = Number(v) > A ? f : v;
|
|
975
|
+
n.target = Y, n.buffer = C, Number(C) > 0 && c(x, w, Math.min(A, Number(C))), (C.length >= (w === "year" ? 4 : 2) || +(C + "0") > A) && (n.buffer = "", p(S, 1));
|
|
976
976
|
};
|
|
977
977
|
return e("span", {
|
|
978
978
|
key: u,
|
|
@@ -983,53 +983,53 @@ function va(e, t) {
|
|
|
983
983
|
suppressContentEditableWarning: !0,
|
|
984
984
|
spellCheck: !1,
|
|
985
985
|
inputMode: "numeric",
|
|
986
|
-
"aria-label": `${
|
|
987
|
-
"aria-valuenow":
|
|
986
|
+
"aria-label": `${w}, ${t.label}${i ? x === 0 ? ", start" : ", end" : ""}`,
|
|
987
|
+
"aria-valuenow": V,
|
|
988
988
|
"aria-valuemin": 1,
|
|
989
989
|
"aria-valuemax": A,
|
|
990
990
|
"aria-disabled": r || void 0,
|
|
991
991
|
"aria-readonly": o || void 0,
|
|
992
|
-
"data-placeholder":
|
|
992
|
+
"data-placeholder": V === void 0 || void 0,
|
|
993
993
|
onFocus: () => {
|
|
994
994
|
n.target = Y, n.buffer = "";
|
|
995
995
|
},
|
|
996
|
-
onClick: (
|
|
997
|
-
onBeforeInput: (
|
|
998
|
-
var
|
|
999
|
-
|
|
996
|
+
onClick: (f) => f.stopPropagation(),
|
|
997
|
+
onBeforeInput: (f) => {
|
|
998
|
+
var S;
|
|
999
|
+
f.preventDefault(), L(f.data ?? ((S = f.nativeEvent) == null ? void 0 : S.data) ?? "", f.target);
|
|
1000
1000
|
},
|
|
1001
|
-
onPaste: (
|
|
1002
|
-
var
|
|
1003
|
-
|
|
1001
|
+
onPaste: (f) => {
|
|
1002
|
+
var S;
|
|
1003
|
+
f.preventDefault(), L(((S = f.clipboardData) == null ? void 0 : S.getData("text")) ?? "", f.target);
|
|
1004
1004
|
},
|
|
1005
|
-
onKeyDown: (
|
|
1006
|
-
if (
|
|
1007
|
-
|
|
1005
|
+
onKeyDown: (f) => {
|
|
1006
|
+
if (f.altKey && f.key === "ArrowDown") {
|
|
1007
|
+
f.preventDefault(), t.toggle();
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
|
-
if (
|
|
1011
|
-
|
|
1010
|
+
if (f.key === "ArrowLeft" || f.key === "ArrowRight") {
|
|
1011
|
+
f.preventDefault(), p(f.target, f.key === "ArrowLeft" ? -1 : 1);
|
|
1012
1012
|
return;
|
|
1013
1013
|
}
|
|
1014
1014
|
if (!(r || o)) {
|
|
1015
|
-
if (/^\d$/.test(
|
|
1016
|
-
|
|
1015
|
+
if (/^\d$/.test(f.key)) {
|
|
1016
|
+
f.preventDefault(), L(f.key, f.target);
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
|
-
if (
|
|
1020
|
-
|
|
1019
|
+
if (f.key === "Backspace" || f.key === "Delete") {
|
|
1020
|
+
f.preventDefault(), n.buffer = "", c(x, w, void 0);
|
|
1021
1021
|
return;
|
|
1022
1022
|
}
|
|
1023
|
-
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(
|
|
1024
|
-
|
|
1025
|
-
const
|
|
1026
|
-
c(
|
|
1023
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(f.key)) {
|
|
1024
|
+
f.preventDefault(), n.buffer = "";
|
|
1025
|
+
const S = f.key === "Home" ? 1 : f.key === "End" ? A : (V ?? 0) + (f.key === "ArrowUp" ? 1 : -1);
|
|
1026
|
+
c(x, w, S < 1 ? A : S > A ? 1 : S);
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
},
|
|
1031
|
-
}))),
|
|
1032
|
-
return i &&
|
|
1030
|
+
}, V === void 0 ? w === "year" ? "yyyy" : w === "month" ? "mm" : "dd" : String(V));
|
|
1031
|
+
}))), M = [d[0]];
|
|
1032
|
+
return i && M.push(e("span", { className: "dsh-date-input__separator", "aria-hidden": !0 }, "-"), d[1]), M.push(e("button", {
|
|
1033
1033
|
type: "button",
|
|
1034
1034
|
className: "dsh-date-input__trigger",
|
|
1035
1035
|
disabled: r,
|
|
@@ -1039,7 +1039,7 @@ function va(e, t) {
|
|
|
1039
1039
|
onClick: (l) => {
|
|
1040
1040
|
l.stopPropagation(), t.toggle();
|
|
1041
1041
|
}
|
|
1042
|
-
}, e("span", { className: "dsh-date-input__indicator" }, e("svg", { viewBox: "0 0 13 14", width: 14, height: 14, fill: "none", "aria-hidden": !0 }, e("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M3.75 4.5A.75.75 0 0 1 3 3.75v-.748a1.5 1.5 0 0 0-1.5 1.5v1h10v-1a1.5 1.5 0 0 0-1.5-1.5v.75a.75.75 0 1 1-1.5 0v-.75h-4v.747a.75.75 0 0 1-.75.75ZM8.5 1.501h-4V.75a.75.75 0 0 0-1.5 0v.752a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3v-.75a.75.75 0 0 0-1.5 0v.75Zm-7 5.5v3.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-3.5h-10Z" }))))), t.allowClear && a.some(Boolean) && !o && !r &&
|
|
1042
|
+
}, e("span", { className: "dsh-date-input__indicator" }, e("svg", { viewBox: "0 0 13 14", width: 14, height: 14, fill: "none", "aria-hidden": !0 }, e("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M3.75 4.5A.75.75 0 0 1 3 3.75v-.748a1.5 1.5 0 0 0-1.5 1.5v1h10v-1a1.5 1.5 0 0 0-1.5-1.5v.75a.75.75 0 1 1-1.5 0v-.75h-4v.747a.75.75 0 0 1-.75.75ZM8.5 1.501h-4V.75a.75.75 0 0 0-1.5 0v.752a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3v-.75a.75.75 0 0 0-1.5 0v.75Zm-7 5.5v3.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-3.5h-10Z" }))))), t.allowClear && a.some(Boolean) && !o && !r && M.push(e("button", { type: "button", className: "dsh-date-input__clear", "aria-label": "Clear", onClick: (l) => {
|
|
1043
1043
|
l.stopPropagation(), t.change([]);
|
|
1044
1044
|
} }, "×")), e("div", {
|
|
1045
1045
|
className: "dsh-date-input",
|
|
@@ -1052,7 +1052,7 @@ function va(e, t) {
|
|
|
1052
1052
|
onClick: () => {
|
|
1053
1053
|
!r && !o && t.toggle();
|
|
1054
1054
|
}
|
|
1055
|
-
}, ...
|
|
1055
|
+
}, ...M);
|
|
1056
1056
|
}
|
|
1057
1057
|
var be = { exports: {} }, pa = be.exports, nt;
|
|
1058
1058
|
function ga() {
|
|
@@ -1060,34 +1060,34 @@ function ga() {
|
|
|
1060
1060
|
(function(a, i) {
|
|
1061
1061
|
e.exports = i();
|
|
1062
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 = {},
|
|
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 = {}, p = function(u) {
|
|
1064
1064
|
return (u = +u) + (u > 68 ? 1900 : 2e3);
|
|
1065
|
-
},
|
|
1066
|
-
return function(
|
|
1067
|
-
this[u] = +
|
|
1065
|
+
}, d = function(u) {
|
|
1066
|
+
return function(m) {
|
|
1067
|
+
this[u] = +m;
|
|
1068
1068
|
};
|
|
1069
|
-
},
|
|
1070
|
-
(this.zone || (this.zone = {})).offset = (function(
|
|
1071
|
-
if (!
|
|
1072
|
-
var
|
|
1073
|
-
return A === 0 ? 0 :
|
|
1069
|
+
}, M = [/[+-]\d\d:?(\d\d)?|Z/, function(u) {
|
|
1070
|
+
(this.zone || (this.zone = {})).offset = (function(m) {
|
|
1071
|
+
if (!m || m === "Z") return 0;
|
|
1072
|
+
var V = m.match(/([+-]|\d\d)/g), A = 60 * V[1] + (+V[2] || 0);
|
|
1073
|
+
return A === 0 ? 0 : V[0] === "+" ? -A : A;
|
|
1074
1074
|
})(u);
|
|
1075
1075
|
}], l = function(u) {
|
|
1076
|
-
var
|
|
1077
|
-
return
|
|
1078
|
-
},
|
|
1079
|
-
var
|
|
1076
|
+
var m = c[u];
|
|
1077
|
+
return m && (m.indexOf ? m : m.s.concat(m.f));
|
|
1078
|
+
}, x = function(u, m) {
|
|
1079
|
+
var V, A = c.meridiem;
|
|
1080
1080
|
if (A) {
|
|
1081
|
-
for (var Y = 1; Y <= 24; Y += 1) if (u.indexOf(A(Y, 0,
|
|
1082
|
-
|
|
1081
|
+
for (var Y = 1; Y <= 24; Y += 1) if (u.indexOf(A(Y, 0, m)) > -1) {
|
|
1082
|
+
V = Y > 12;
|
|
1083
1083
|
break;
|
|
1084
1084
|
}
|
|
1085
|
-
} else
|
|
1086
|
-
return
|
|
1087
|
-
},
|
|
1088
|
-
this.afternoon =
|
|
1085
|
+
} else V = u === (m ? "pm" : "PM");
|
|
1086
|
+
return V;
|
|
1087
|
+
}, w = { A: [s, function(u) {
|
|
1088
|
+
this.afternoon = x(u, !1);
|
|
1089
1089
|
}], a: [s, function(u) {
|
|
1090
|
-
this.afternoon =
|
|
1090
|
+
this.afternoon = x(u, !0);
|
|
1091
1091
|
}], Q: [n, function(u) {
|
|
1092
1092
|
this.month = 3 * (u - 1) + 1;
|
|
1093
1093
|
}], S: [n, function(u) {
|
|
@@ -1096,80 +1096,80 @@ function ga() {
|
|
|
1096
1096
|
this.milliseconds = 10 * +u;
|
|
1097
1097
|
}], SSS: [/\d{3}/, function(u) {
|
|
1098
1098
|
this.milliseconds = +u;
|
|
1099
|
-
}], s: [o,
|
|
1100
|
-
var
|
|
1101
|
-
if (this.day =
|
|
1102
|
-
}], w: [o,
|
|
1103
|
-
var
|
|
1099
|
+
}], s: [o, d("seconds")], ss: [o, d("seconds")], m: [o, d("minutes")], mm: [o, d("minutes")], H: [o, d("hours")], h: [o, d("hours")], HH: [o, d("hours")], hh: [o, d("hours")], D: [o, d("day")], DD: [r, d("day")], Do: [s, function(u) {
|
|
1100
|
+
var m = c.ordinal, V = u.match(/\d+/);
|
|
1101
|
+
if (this.day = V[0], m) for (var A = 1; A <= 31; A += 1) m(A).replace(/\[|\]/g, "") === u && (this.day = A);
|
|
1102
|
+
}], w: [o, d("week")], ww: [r, d("week")], M: [o, d("month")], MM: [r, d("month")], MMM: [s, function(u) {
|
|
1103
|
+
var m = l("months"), V = (l("monthsShort") || m.map((function(A) {
|
|
1104
1104
|
return A.slice(0, 3);
|
|
1105
1105
|
}))).indexOf(u) + 1;
|
|
1106
|
-
if (
|
|
1107
|
-
this.month =
|
|
1106
|
+
if (V < 1) throw new Error();
|
|
1107
|
+
this.month = V % 12 || V;
|
|
1108
1108
|
}], MMMM: [s, function(u) {
|
|
1109
|
-
var
|
|
1110
|
-
if (
|
|
1111
|
-
this.month =
|
|
1112
|
-
}], Y: [/[+-]?\d+/,
|
|
1113
|
-
this.year =
|
|
1114
|
-
}], YYYY: [/\d{4}/,
|
|
1115
|
-
function
|
|
1116
|
-
var
|
|
1117
|
-
|
|
1118
|
-
for (var A = (u =
|
|
1119
|
-
var
|
|
1120
|
-
return
|
|
1121
|
-
return
|
|
1109
|
+
var m = l("months").indexOf(u) + 1;
|
|
1110
|
+
if (m < 1) throw new Error();
|
|
1111
|
+
this.month = m % 12 || m;
|
|
1112
|
+
}], Y: [/[+-]?\d+/, d("year")], YY: [r, function(u) {
|
|
1113
|
+
this.year = p(u);
|
|
1114
|
+
}], YYYY: [/\d{4}/, d("year")], Z: M, ZZ: M };
|
|
1115
|
+
function $(u) {
|
|
1116
|
+
var m, V;
|
|
1117
|
+
m = u, V = c && c.formats;
|
|
1118
|
+
for (var A = (u = m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(C, O, _) {
|
|
1119
|
+
var T = _ && _.toUpperCase();
|
|
1120
|
+
return O || V[_] || a[_] || V[T].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(b, D, g) {
|
|
1121
|
+
return D || g.slice(1);
|
|
1122
1122
|
}));
|
|
1123
1123
|
}))).match(i), Y = A.length, L = 0; L < Y; L += 1) {
|
|
1124
|
-
var
|
|
1125
|
-
A[L] =
|
|
1124
|
+
var P = A[L], f = w[P], S = f && f[0], v = f && f[1];
|
|
1125
|
+
A[L] = v ? { regex: S, parser: v } : P.replace(/^\[|\]$/g, "");
|
|
1126
1126
|
}
|
|
1127
|
-
return function(
|
|
1128
|
-
for (var
|
|
1129
|
-
var
|
|
1130
|
-
if (typeof
|
|
1127
|
+
return function(C) {
|
|
1128
|
+
for (var O = {}, _ = 0, T = 0; _ < Y; _ += 1) {
|
|
1129
|
+
var b = A[_];
|
|
1130
|
+
if (typeof b == "string") T += b.length;
|
|
1131
1131
|
else {
|
|
1132
|
-
var
|
|
1133
|
-
g.call(
|
|
1132
|
+
var D = b.regex, g = b.parser, y = C.slice(T), k = D.exec(y)[0];
|
|
1133
|
+
g.call(O, k), C = C.replace(k, "");
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
|
-
return (function(
|
|
1137
|
-
var E =
|
|
1136
|
+
return (function(I) {
|
|
1137
|
+
var E = I.afternoon;
|
|
1138
1138
|
if (E !== void 0) {
|
|
1139
|
-
var
|
|
1140
|
-
E ?
|
|
1139
|
+
var B = I.hours;
|
|
1140
|
+
E ? B < 12 && (I.hours += 12) : B === 12 && (I.hours = 0), delete I.afternoon;
|
|
1141
1141
|
}
|
|
1142
|
-
})(
|
|
1142
|
+
})(O), O;
|
|
1143
1143
|
};
|
|
1144
1144
|
}
|
|
1145
|
-
return function(u,
|
|
1146
|
-
|
|
1147
|
-
var A =
|
|
1145
|
+
return function(u, m, V) {
|
|
1146
|
+
V.p.customParseFormat = !0, u && u.parseTwoDigitYear && (p = u.parseTwoDigitYear);
|
|
1147
|
+
var A = m.prototype, Y = A.parse;
|
|
1148
1148
|
A.parse = function(L) {
|
|
1149
|
-
var
|
|
1150
|
-
this.$u =
|
|
1151
|
-
var
|
|
1152
|
-
if (typeof
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1149
|
+
var P = L.date, f = L.utc, S = L.args;
|
|
1150
|
+
this.$u = f;
|
|
1151
|
+
var v = S[1];
|
|
1152
|
+
if (typeof v == "string") {
|
|
1153
|
+
var C = S[2] === !0, O = S[3] === !0, _ = C || O, T = S[2];
|
|
1154
|
+
O && (T = S[2]), c = this.$locale(), !C && T && (c = V.Ls[T]), this.$d = (function(y, k, I, E) {
|
|
1155
1155
|
try {
|
|
1156
|
-
if (["x", "X"].indexOf(
|
|
1157
|
-
var
|
|
1158
|
-
H && !R || (ve = R > 0 ? R - 1 :
|
|
1159
|
-
var pe, Pe =
|
|
1160
|
-
return
|
|
1156
|
+
if (["x", "X"].indexOf(k) > -1) return new Date((k === "X" ? 1e3 : 1) * y);
|
|
1157
|
+
var B = $(k)(y), H = B.year, R = B.month, j = B.day, z = B.hours, G = B.minutes, Z = B.seconds, oe = B.milliseconds, X = B.zone, K = B.week, Q = /* @__PURE__ */ new Date(), ee = j || (H || R ? 1 : Q.getDate()), ae = H || Q.getFullYear(), ve = 0;
|
|
1158
|
+
H && !R || (ve = R > 0 ? R - 1 : Q.getMonth());
|
|
1159
|
+
var pe, Pe = z || 0, Te = G || 0, Ve = Z || 0, Oe = oe || 0;
|
|
1160
|
+
return X ? new Date(Date.UTC(ae, ve, ee, Pe, Te, Ve, Oe + 60 * X.offset * 1e3)) : I ? new Date(Date.UTC(ae, ve, ee, Pe, Te, Ve, Oe)) : (pe = new Date(ae, ve, ee, Pe, Te, Ve, Oe), K && (pe = E(pe).week(K).toDate()), pe);
|
|
1161
1161
|
} catch {
|
|
1162
1162
|
return /* @__PURE__ */ new Date("");
|
|
1163
1163
|
}
|
|
1164
|
-
})(
|
|
1165
|
-
} else if (
|
|
1166
|
-
|
|
1167
|
-
var g =
|
|
1164
|
+
})(P, v, f, V), this.init(), T && T !== !0 && (this.$L = this.locale(T).$L), _ && P != this.format(v) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
|
|
1165
|
+
} else if (v instanceof Array) for (var b = v.length, D = 1; D <= b; D += 1) {
|
|
1166
|
+
S[1] = v[D - 1];
|
|
1167
|
+
var g = V.apply(this, S);
|
|
1168
1168
|
if (g.isValid()) {
|
|
1169
1169
|
this.$d = g.$d, this.$L = g.$L, this.init();
|
|
1170
1170
|
break;
|
|
1171
1171
|
}
|
|
1172
|
-
|
|
1172
|
+
D === b && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1173
1173
|
}
|
|
1174
1174
|
else Y.call(this, L);
|
|
1175
1175
|
};
|
|
@@ -1193,12 +1193,12 @@ function rt(e, t) {
|
|
|
1193
1193
|
function wa(e, t, a, i) {
|
|
1194
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");
|
|
1195
1195
|
for (let c = 0; c <= s; c++) {
|
|
1196
|
-
const
|
|
1197
|
-
if (!
|
|
1198
|
-
return
|
|
1199
|
-
const
|
|
1200
|
-
if (c && !
|
|
1201
|
-
return
|
|
1196
|
+
const p = o.add(c, "day");
|
|
1197
|
+
if (!p.isAfter(r, "day") && !i(p))
|
|
1198
|
+
return p;
|
|
1199
|
+
const d = o.subtract(c, "day");
|
|
1200
|
+
if (c && !d.isBefore(n, "day") && !i(d))
|
|
1201
|
+
return d;
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
1204
|
function Mt(e, t) {
|
|
@@ -1234,83 +1234,83 @@ const ka = {
|
|
|
1234
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"
|
|
1235
1235
|
};
|
|
1236
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()),
|
|
1238
|
-
const
|
|
1239
|
-
var
|
|
1240
|
-
const
|
|
1241
|
-
return e("td", { key:
|
|
1237
|
+
const { month: i, range: n, locale: r, firstDay: o, yearOpen: s } = t, c = i.add(1, "month"), p = new Intl.DateTimeFormat(r, { month: "long", year: "numeric" }), d = p.format(i.toDate()), M = new Intl.DateTimeFormat(r, { weekday: "short" }), l = new Intl.DateTimeFormat(r, { dateStyle: "full" }), x = (f) => e("svg", { viewBox: "0 0 16 16", width: 16, height: 16, fill: "none", "aria-hidden": "true" }, e("path", { d: ka[f], fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" })), w = (f) => e("button", { type: "button", className: "dsh-calendar__nav", "aria-label": f < 0 ? "Previous" : "Next", onClick: () => a.month(i.add(f * (n ? 2 : 1), "month")) }, x(f < 0 ? "previous" : "next")), $ = t.anchor && t.hover ? Mt(t.anchor, t.hover) : t.selected, u = wa(i, t.focused, n, t.disabled), m = Array.from({ length: n ? 2 : 1 }, (f, S) => {
|
|
1238
|
+
const v = i.add(S, "month"), C = rt(v, o), O = Array.from({ length: C.length / 7 }, (_, T) => e("tr", { key: T }, ...C.slice(T * 7, T * 7 + 7).map((b) => {
|
|
1239
|
+
var B, H, R;
|
|
1240
|
+
const D = b.month() !== v.month(), g = t.disabled(b), y = !D && n && !!((B = $[0]) != null && B.isSame(b, "day")), k = !D && n && !!((H = $[1]) != null && H.isSame(b, "day")), I = !D && (n ? !!($[0] && $[1] && !b.isBefore($[0], "day") && !b.isAfter($[1], "day")) : !!((R = t.selected[0]) != null && R.isSame(b, "day"))), E = !D && !g && !!(u != null && u.isSame(b, "day"));
|
|
1241
|
+
return e("td", { key: b.format("YYYY-MM-DD"), role: "gridcell", "aria-selected": I, "aria-disabled": g || void 0 }, e("button", {
|
|
1242
1242
|
type: "button",
|
|
1243
1243
|
className: "dsh-calendar__cell arco-picker-cell",
|
|
1244
|
-
"data-date":
|
|
1245
|
-
"data-outside-month":
|
|
1246
|
-
"data-selected":
|
|
1247
|
-
"data-selection-start":
|
|
1248
|
-
"data-selection-end":
|
|
1249
|
-
"data-today":
|
|
1250
|
-
"data-disabled":
|
|
1251
|
-
"aria-label":
|
|
1252
|
-
tabIndex:
|
|
1253
|
-
disabled:
|
|
1254
|
-
onClick: () => a.select(
|
|
1255
|
-
onMouseEnter: (
|
|
1256
|
-
a.hover(
|
|
1244
|
+
"data-date": b.format("YYYY-MM-DD"),
|
|
1245
|
+
"data-outside-month": D || void 0,
|
|
1246
|
+
"data-selected": I || void 0,
|
|
1247
|
+
"data-selection-start": y || void 0,
|
|
1248
|
+
"data-selection-end": k || void 0,
|
|
1249
|
+
"data-today": !D && b.isSame(ie(), "day") || void 0,
|
|
1250
|
+
"data-disabled": g || void 0,
|
|
1251
|
+
"aria-label": l.format(b.toDate()),
|
|
1252
|
+
tabIndex: E && !s ? 0 : -1,
|
|
1253
|
+
disabled: g,
|
|
1254
|
+
onClick: () => a.select(b),
|
|
1255
|
+
onMouseEnter: (j) => {
|
|
1256
|
+
a.hover(b), t.anchor && !g && (a.focus(b), j.currentTarget.focus({ preventScroll: !0 }));
|
|
1257
1257
|
},
|
|
1258
|
-
onFocus: () => a.focus(
|
|
1259
|
-
onKeyDown: (
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
var
|
|
1263
|
-
const
|
|
1264
|
-
(
|
|
1258
|
+
onFocus: () => a.focus(b),
|
|
1259
|
+
onKeyDown: (j) => {
|
|
1260
|
+
const z = Sa(b, j.key, o, j.shiftKey);
|
|
1261
|
+
z && (j.preventDefault(), !t.disabled(z) && (a.focus(z), !z.isSame(i, "month") && !(n && z.isSame(c, "month")) && a.month(z.startOf("month")), requestAnimationFrame(() => {
|
|
1262
|
+
var Z;
|
|
1263
|
+
const G = j.target.closest(".dsh-calendar");
|
|
1264
|
+
(Z = G == null ? void 0 : G.querySelector(`[data-date="${z.format("YYYY-MM-DD")}"]:not([data-outside-month])`)) == null || Z.focus();
|
|
1265
1265
|
})));
|
|
1266
1266
|
}
|
|
1267
|
-
}, n ? e("span", { className: "dsh-calendar__cell-button" },
|
|
1267
|
+
}, n ? e("span", { className: "dsh-calendar__cell-button" }, b.date()) : String(b.date())));
|
|
1268
1268
|
})));
|
|
1269
1269
|
return e(
|
|
1270
1270
|
"table",
|
|
1271
|
-
{ className: "dsh-calendar__grid", key:
|
|
1272
|
-
e("thead", {}, e("tr", {}, ...
|
|
1273
|
-
e("tbody", {}, ...
|
|
1271
|
+
{ className: "dsh-calendar__grid", key: S, role: "grid", "aria-label": p.format(v.toDate()) },
|
|
1272
|
+
e("thead", {}, e("tr", {}, ...C.slice(0, 7).map((_) => e("th", { className: "dsh-calendar__weekday", key: _.day(), scope: "col" }, M.format(_.toDate()))))),
|
|
1273
|
+
e("tbody", {}, ...O)
|
|
1274
1274
|
);
|
|
1275
|
-
}),
|
|
1276
|
-
const
|
|
1275
|
+
}), V = n ? e("button", { type: "button", className: "dsh-calendar__heading", "aria-expanded": s, onClick: () => a.year(!s) }, d) : 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", {}, d), x("next")), A = n ? e("span", { className: "dsh-calendar__heading dsh-calendar__heading--next" }, p.format(c.toDate())) : null, Y = Math.min(1900, Math.floor(i.year() / 100) * 100), L = Math.max(2099, Math.floor(i.year() / 100) * 100 + 99), P = 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: L - Y + 1 }, (f, S) => {
|
|
1276
|
+
const v = Y + S;
|
|
1277
1277
|
return e("button", {
|
|
1278
|
-
key:
|
|
1278
|
+
key: v,
|
|
1279
1279
|
type: "button",
|
|
1280
1280
|
className: "dsh-calendar__year",
|
|
1281
1281
|
role: "option",
|
|
1282
|
-
"data-year":
|
|
1283
|
-
"aria-selected":
|
|
1284
|
-
"data-selected":
|
|
1285
|
-
tabIndex:
|
|
1286
|
-
onClick: () => a.yearSelect(
|
|
1287
|
-
onKeyDown: (
|
|
1288
|
-
var T,
|
|
1289
|
-
if (
|
|
1290
|
-
|
|
1282
|
+
"data-year": v,
|
|
1283
|
+
"aria-selected": v === i.year(),
|
|
1284
|
+
"data-selected": v === i.year() || void 0,
|
|
1285
|
+
tabIndex: v === i.year() ? 0 : -1,
|
|
1286
|
+
onClick: () => a.yearSelect(v),
|
|
1287
|
+
onKeyDown: (C) => {
|
|
1288
|
+
var T, b;
|
|
1289
|
+
if (C.key === "Escape") {
|
|
1290
|
+
C.preventDefault(), a.year(!1);
|
|
1291
1291
|
return;
|
|
1292
1292
|
}
|
|
1293
|
-
const
|
|
1294
|
-
if (
|
|
1293
|
+
const O = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3 }[C.key];
|
|
1294
|
+
if (O === void 0 && C.key !== "Home" && C.key !== "End")
|
|
1295
1295
|
return;
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1298
|
-
(
|
|
1296
|
+
C.preventDefault();
|
|
1297
|
+
const _ = C.key === "Home" ? Y : C.key === "End" ? L : Math.max(Y, Math.min(L, v + (O ?? 0)));
|
|
1298
|
+
(b = (T = C.target.closest(".dsh-calendar__years")) == null ? void 0 : T.querySelector(`[data-year="${_}"]`)) == null || b.focus();
|
|
1299
1299
|
}
|
|
1300
|
-
},
|
|
1300
|
+
}, v);
|
|
1301
1301
|
})) : null;
|
|
1302
1302
|
return e(
|
|
1303
1303
|
"div",
|
|
1304
1304
|
{ className: `dsh-calendar${n ? " dsh-calendar--range" : ""}`, "data-year-open": s || void 0 },
|
|
1305
|
-
e("div", { className: "dsh-calendar__header" },
|
|
1306
|
-
e("div", { className: "dsh-calendar__grids" }, ...
|
|
1307
|
-
|
|
1305
|
+
e("div", { className: "dsh-calendar__header" }, w(-1), V, A, w(1)),
|
|
1306
|
+
e("div", { className: "dsh-calendar__grids" }, ...m),
|
|
1307
|
+
P
|
|
1308
1308
|
);
|
|
1309
1309
|
}
|
|
1310
1310
|
const At = (e, t, ...a) => {
|
|
1311
|
-
const { className: i, fillRule: n, clipRule: r, suppressContentEditableWarning: o, onKeyDown: s, onBeforeInput: c, onMouseEnter:
|
|
1312
|
-
return
|
|
1313
|
-
},
|
|
1311
|
+
const { className: i, fillRule: n, clipRule: r, suppressContentEditableWarning: o, onKeyDown: s, onBeforeInput: c, onMouseEnter: p, onBlur: d, ...M } = t;
|
|
1312
|
+
return h(e, { ...M, class: i, "fill-rule": n, "clip-rule": r, onKeydown: s, onBeforeinput: c, onMouseenter: p, onFocusout: d }, a);
|
|
1313
|
+
}, xt = F({
|
|
1314
1314
|
name: "DshCalendarPanel",
|
|
1315
1315
|
props: {
|
|
1316
1316
|
standalone: Boolean,
|
|
@@ -1324,24 +1324,24 @@ const At = (e, t, ...a) => {
|
|
|
1324
1324
|
onView: { type: Function, required: !0 }
|
|
1325
1325
|
},
|
|
1326
1326
|
setup(e) {
|
|
1327
|
-
const t =
|
|
1327
|
+
const t = W(e.view.startOf("month")), a = W(e.value.at(-1) ?? e.view), i = q(!1), n = W(), r = W(), o = W();
|
|
1328
1328
|
le(() => e.view.valueOf(), () => {
|
|
1329
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);
|
|
1330
1330
|
});
|
|
1331
|
-
async function s(
|
|
1332
|
-
var
|
|
1333
|
-
if (await re(),
|
|
1334
|
-
const
|
|
1335
|
-
if (
|
|
1331
|
+
async function s(d) {
|
|
1332
|
+
var x, w;
|
|
1333
|
+
if (await re(), d) {
|
|
1334
|
+
const $ = document.activeElement;
|
|
1335
|
+
if ($ !== d && !($ === document.body && (!d.isConnected || d.disabled)))
|
|
1336
1336
|
return;
|
|
1337
1337
|
}
|
|
1338
|
-
const
|
|
1338
|
+
const M = i.value ? ".dsh-calendar__year[data-selected]" : '.dsh-calendar__cell[tabindex="0"]', l = ((x = o.value) == null ? void 0 : x.querySelector(M)) ?? ((w = o.value) == null ? void 0 : w.querySelector(".dsh-calendar__year-trigger, .dsh-calendar__heading"));
|
|
1339
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));
|
|
1340
1340
|
}
|
|
1341
1341
|
let c;
|
|
1342
1342
|
Rt(() => {
|
|
1343
|
-
var
|
|
1344
|
-
c = ((
|
|
1343
|
+
var d;
|
|
1344
|
+
c = ((d = o.value) == null ? void 0 : d.querySelector(".dsh-calendar__cell:focus")) ?? void 0;
|
|
1345
1345
|
}), ke(() => {
|
|
1346
1346
|
c && s(c);
|
|
1347
1347
|
}), fe(() => {
|
|
@@ -1349,10 +1349,10 @@ const At = (e, t, ...a) => {
|
|
|
1349
1349
|
}), le(i, () => {
|
|
1350
1350
|
s();
|
|
1351
1351
|
});
|
|
1352
|
-
const
|
|
1353
|
-
e.onView(
|
|
1352
|
+
const p = (d) => {
|
|
1353
|
+
e.onView(d);
|
|
1354
1354
|
};
|
|
1355
|
-
return () =>
|
|
1355
|
+
return () => h("div", { ref: o, class: ["dsh-picker-popover", { "dsh-picker-popover--range": e.range, "dsh-calendar-standalone": e.standalone }] }, [Ma(At, {
|
|
1356
1356
|
month: t.value,
|
|
1357
1357
|
focused: a.value,
|
|
1358
1358
|
selected: e.value,
|
|
@@ -1364,144 +1364,144 @@ const At = (e, t, ...a) => {
|
|
|
1364
1364
|
firstDay: e.weekStart ?? Da(e.locale),
|
|
1365
1365
|
disabled: e.disabled
|
|
1366
1366
|
}, {
|
|
1367
|
-
month:
|
|
1368
|
-
focus: (
|
|
1369
|
-
a.value =
|
|
1367
|
+
month: p,
|
|
1368
|
+
focus: (d) => {
|
|
1369
|
+
a.value = d;
|
|
1370
1370
|
},
|
|
1371
|
-
year: (
|
|
1372
|
-
i.value =
|
|
1371
|
+
year: (d) => {
|
|
1372
|
+
i.value = d;
|
|
1373
1373
|
},
|
|
1374
|
-
hover: (
|
|
1375
|
-
n.value && (r.value =
|
|
1374
|
+
hover: (d) => {
|
|
1375
|
+
n.value && (r.value = d);
|
|
1376
1376
|
},
|
|
1377
|
-
yearSelect: (
|
|
1378
|
-
const
|
|
1379
|
-
a.value =
|
|
1377
|
+
yearSelect: (d) => {
|
|
1378
|
+
const M = t.value.year(d).date(Math.min(a.value.date(), t.value.year(d).daysInMonth()));
|
|
1379
|
+
a.value = M, p(M), i.value = !1;
|
|
1380
1380
|
},
|
|
1381
|
-
select: (
|
|
1382
|
-
if (e.disabled(
|
|
1381
|
+
select: (d) => {
|
|
1382
|
+
if (e.disabled(d))
|
|
1383
1383
|
return;
|
|
1384
|
-
if (a.value =
|
|
1385
|
-
e.onSelect([
|
|
1384
|
+
if (a.value = d, !e.range) {
|
|
1385
|
+
e.onSelect([d], !0);
|
|
1386
1386
|
return;
|
|
1387
1387
|
}
|
|
1388
1388
|
if (!n.value) {
|
|
1389
|
-
n.value =
|
|
1389
|
+
n.value = d, r.value = d, e.onSelect([d], !1);
|
|
1390
1390
|
return;
|
|
1391
1391
|
}
|
|
1392
|
-
const
|
|
1393
|
-
let l =
|
|
1394
|
-
for (; !l.isAfter(
|
|
1392
|
+
const M = Mt(n.value, d);
|
|
1393
|
+
let l = M[0];
|
|
1394
|
+
for (; !l.isAfter(M[1], "day"); ) {
|
|
1395
1395
|
if (e.disabled(l))
|
|
1396
1396
|
return;
|
|
1397
1397
|
l = l.add(1, "day");
|
|
1398
1398
|
}
|
|
1399
|
-
n.value = void 0, r.value = void 0, e.onSelect(
|
|
1399
|
+
n.value = void 0, r.value = void 0, e.onSelect(M, !0);
|
|
1400
1400
|
}
|
|
1401
1401
|
})]);
|
|
1402
1402
|
}
|
|
1403
1403
|
});
|
|
1404
|
-
function
|
|
1404
|
+
function $t(e) {
|
|
1405
1405
|
const t = e ? mt : ht, a = F({
|
|
1406
1406
|
name: e ? "DshRangePicker" : "DshDatePicker",
|
|
1407
1407
|
inheritAttrs: !1,
|
|
1408
1408
|
setup(i, { attrs: n, slots: r, expose: o }) {
|
|
1409
|
-
const s = se(), c =
|
|
1410
|
-
const
|
|
1411
|
-
Array.isArray(
|
|
1412
|
-
typeof
|
|
1413
|
-
}) : typeof
|
|
1409
|
+
const s = se(), c = W(), p = W(), d = q(0), M = { parts: [], source: "", buffer: "" }, l = (P) => n[P] ?? n[P.replace(/[A-Z]/g, (f) => `-${f.toLowerCase()}`)], x = (P) => ue(P, String(l("valueFormat") ?? (typeof l("format") == "string" ? l("format") : "YYYY-MM-DD"))), w = W(l("defaultValue")), $ = q(!!l("defaultPopupVisible")), u = (P) => e && Array.isArray(P) ? P[0] : P, m = W(x(u(l("pickerValue") ?? l("defaultPickerValue") ?? l("modelValue") ?? l("defaultValue"))) ?? ie()), V = J(() => l("modelValue") === void 0 ? w.value : l("modelValue")), A = (P, ...f) => {
|
|
1410
|
+
const S = n[P];
|
|
1411
|
+
Array.isArray(S) ? S.forEach((v) => {
|
|
1412
|
+
typeof v == "function" && v(...f);
|
|
1413
|
+
}) : typeof S == "function" && S(...f);
|
|
1414
1414
|
};
|
|
1415
|
-
o(new Proxy({}, { get: (
|
|
1416
|
-
var
|
|
1417
|
-
return
|
|
1418
|
-
var
|
|
1419
|
-
|
|
1420
|
-
} :
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
} : (
|
|
1424
|
-
}, has: (
|
|
1425
|
-
const Y = (
|
|
1426
|
-
|
|
1427
|
-
}, L = (
|
|
1428
|
-
const
|
|
1429
|
-
return
|
|
1415
|
+
o(new Proxy({}, { get: (P, f) => {
|
|
1416
|
+
var S;
|
|
1417
|
+
return f === "focus" ? (v = 0) => {
|
|
1418
|
+
var C, O, _, T;
|
|
1419
|
+
p.value ? (O = (C = p.value.querySelectorAll(".dsh-date-input__field")[v]) == null ? void 0 : C.querySelector("[role=spinbutton]")) == null || O.focus() : (T = (_ = c.value) == null ? void 0 : _.focus) == null || T.call(_, v);
|
|
1420
|
+
} : f === "blur" ? () => {
|
|
1421
|
+
var v, C, O;
|
|
1422
|
+
p.value ? (v = p.value.querySelector(":focus")) == null || v.blur() : (O = (C = c.value) == null ? void 0 : C.blur) == null || O.call(C);
|
|
1423
|
+
} : (S = c.value) == null ? void 0 : S[f];
|
|
1424
|
+
}, has: (P, f) => c.value !== void 0 && (f === "focus" || f === "blur" || f in c.value) }));
|
|
1425
|
+
const Y = (P) => {
|
|
1426
|
+
$.value = P, A("onUpdate:popupVisible", P), A("onPopupVisibleChange", P);
|
|
1427
|
+
}, L = (P) => {
|
|
1428
|
+
const f = l("valueFormat") ?? (typeof l("format") == "string" ? l("format") : "YYYY-MM-DD");
|
|
1429
|
+
return f === "Date" ? P.toDate() : f === "timestamp" ? P.valueOf() : P.format(String(f));
|
|
1430
1430
|
};
|
|
1431
1431
|
return () => {
|
|
1432
1432
|
var g;
|
|
1433
|
-
|
|
1434
|
-
const
|
|
1433
|
+
d.value;
|
|
1434
|
+
const P = V.value, f = (e ? Array.isArray(P) ? P : [] : [P]).map(x).filter((y) => !!y), S = l("mode"), v = !!(l("panelRender") || l("showTime") || l("showNowBtn") === !0 || l("showConfirmBtn") || (g = l("shortcuts")) != null && g.length || r.extra || r.cell || l("utcOffset") !== void 0 || l("timezone") || S && S !== "date" || Array.isArray(l("disabled"))), C = l("triggerProps") ?? {}, O = () => h(xt, {
|
|
1435
1435
|
range: e,
|
|
1436
|
-
value:
|
|
1437
|
-
view:
|
|
1436
|
+
value: f,
|
|
1437
|
+
view: x(u(l("pickerValue"))) ?? m.value,
|
|
1438
1438
|
locale: s.locale.value,
|
|
1439
1439
|
weekStart: l("dayStartOfWeek"),
|
|
1440
|
-
disabled: (
|
|
1441
|
-
const
|
|
1442
|
-
return !!(
|
|
1440
|
+
disabled: (y) => {
|
|
1441
|
+
const k = l("disabledDate");
|
|
1442
|
+
return !!(k != null && k(y.toDate(), e ? f.length ? "end" : "start" : void 0));
|
|
1443
1443
|
},
|
|
1444
|
-
onView: (
|
|
1445
|
-
l("pickerValue") === void 0 && (
|
|
1446
|
-
const
|
|
1447
|
-
A("onPickerValueChange", e ?
|
|
1444
|
+
onView: (y) => {
|
|
1445
|
+
l("pickerValue") === void 0 && (m.value = y);
|
|
1446
|
+
const k = e ? [y, y.add(1, "month")] : [y], I = k.map(L), E = k.map((H) => H.toDate()), B = k.map((H) => H.format("YYYY-MM-DD"));
|
|
1447
|
+
A("onPickerValueChange", e ? I : I[0], e ? E : E[0], e ? B : B[0]);
|
|
1448
1448
|
},
|
|
1449
|
-
onSelect: (
|
|
1450
|
-
const
|
|
1451
|
-
if (e && A("onSelect",
|
|
1449
|
+
onSelect: (y, k) => {
|
|
1450
|
+
const I = y.map(L), E = y.map((R) => R.toDate()), B = y.map((R) => R.format(typeof l("format") == "string" ? String(l("format")) : "YYYY-MM-DD"));
|
|
1451
|
+
if (e && A("onSelect", I, E, B), !k)
|
|
1452
1452
|
return;
|
|
1453
|
-
const H = e ?
|
|
1454
|
-
|
|
1455
|
-
var
|
|
1456
|
-
return (
|
|
1457
|
-
}) || (
|
|
1453
|
+
const H = e ? I : I[0];
|
|
1454
|
+
y.every((R, j) => {
|
|
1455
|
+
var z;
|
|
1456
|
+
return (z = f[j]) == null ? void 0 : z.isSame(R, "day");
|
|
1457
|
+
}) || (w.value = H, A("onUpdate:modelValue", H), A("onChange", H, e ? E : E[0], e ? B : B[0])), Y(!1);
|
|
1458
1458
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
var
|
|
1461
|
-
if (
|
|
1459
|
+
}), _ = typeof l("format") == "string" ? String(l("format")) : s.locale.value.startsWith("en-US") ? "M/D/YYYY" : "YYYY-MM-DD", T = !v && !r.default && !r.prefix && !r["suffix-icon"] && !l("inputProps") && /^(?:YYYY|MM?|DD?|[\/\-.\s])+$/.test(_), b = (y) => {
|
|
1460
|
+
var I, E;
|
|
1461
|
+
if (y.length && y.some((B) => !B))
|
|
1462
1462
|
return;
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
},
|
|
1466
|
-
const
|
|
1467
|
-
dates: e ? [
|
|
1463
|
+
const k = e ? y.map((B) => B ? L(B) : void 0) : y[0] ? L(y[0]) : void 0;
|
|
1464
|
+
w.value = k, A("onUpdate:modelValue", k), A("onChange", k, e ? y.map((B) => B == null ? void 0 : B.toDate()) : (I = y[0]) == null ? void 0 : I.toDate(), e ? y.map((B) => B == null ? void 0 : B.format(_)) : (E = y[0]) == null ? void 0 : E.format(_));
|
|
1465
|
+
}, D = T ? { ...r, default: () => {
|
|
1466
|
+
const y = va(At, {
|
|
1467
|
+
dates: e ? [x(Array.isArray(P) ? P[0] : void 0), x(Array.isArray(P) ? P[1] : void 0)] : [x(P)],
|
|
1468
1468
|
range: e,
|
|
1469
|
-
format:
|
|
1469
|
+
format: _,
|
|
1470
1470
|
label: String(l("aria-label") ?? "日期"),
|
|
1471
1471
|
disabled: !!l("disabled"),
|
|
1472
1472
|
readonly: !!(l("readonly") || l("disabledInput")),
|
|
1473
|
-
open: !!(l("popupVisible") ??
|
|
1473
|
+
open: !!(l("popupVisible") ?? $.value),
|
|
1474
1474
|
allowClear: l("allowClear") !== !1,
|
|
1475
|
-
draft:
|
|
1475
|
+
draft: M,
|
|
1476
1476
|
invalidate: () => {
|
|
1477
|
-
|
|
1477
|
+
d.value++;
|
|
1478
1478
|
},
|
|
1479
|
-
change:
|
|
1480
|
-
toggle: () => Y(!(l("popupVisible") ??
|
|
1481
|
-
disabledDate: (
|
|
1482
|
-
var
|
|
1483
|
-
return !!((
|
|
1479
|
+
change: b,
|
|
1480
|
+
toggle: () => Y(!(l("popupVisible") ?? $.value)),
|
|
1481
|
+
disabledDate: (k) => {
|
|
1482
|
+
var I;
|
|
1483
|
+
return !!((I = l("disabledDate")) != null && I(k.toDate()));
|
|
1484
1484
|
}
|
|
1485
1485
|
});
|
|
1486
|
-
return
|
|
1486
|
+
return h("div", { ref: p, class: n.class, style: n.style }, [y]);
|
|
1487
1487
|
} } : r;
|
|
1488
|
-
return
|
|
1488
|
+
return h(t, {
|
|
1489
1489
|
...n,
|
|
1490
1490
|
ref: c,
|
|
1491
|
-
modelValue:
|
|
1492
|
-
popupVisible: l("popupVisible") ??
|
|
1493
|
-
triggerProps: { popupOffset: 8, ...
|
|
1494
|
-
panelRender:
|
|
1495
|
-
"onUpdate:modelValue": (
|
|
1496
|
-
|
|
1491
|
+
modelValue: V.value,
|
|
1492
|
+
popupVisible: l("popupVisible") ?? $.value,
|
|
1493
|
+
triggerProps: { popupOffset: 8, ...C },
|
|
1494
|
+
panelRender: v ? l("panelRender") : O,
|
|
1495
|
+
"onUpdate:modelValue": (y) => {
|
|
1496
|
+
w.value = y, A("onUpdate:modelValue", y);
|
|
1497
1497
|
},
|
|
1498
|
-
"onUpdate:popupVisible": (
|
|
1499
|
-
|
|
1498
|
+
"onUpdate:popupVisible": (y) => {
|
|
1499
|
+
$.value = y, A("onUpdate:popupVisible", y);
|
|
1500
1500
|
},
|
|
1501
|
-
onPopupVisibleChange: (
|
|
1502
|
-
|
|
1501
|
+
onPopupVisibleChange: (y) => {
|
|
1502
|
+
$.value = y, A("onPopupVisibleChange", y);
|
|
1503
1503
|
}
|
|
1504
|
-
},
|
|
1504
|
+
}, D);
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
1507
|
});
|
|
@@ -1510,40 +1510,40 @@ function xt(e) {
|
|
|
1510
1510
|
i.component(`${(n == null ? void 0 : n.componentPrefix) ?? "A"}RangePicker`, a);
|
|
1511
1511
|
return;
|
|
1512
1512
|
}
|
|
1513
|
-
const r = /* @__PURE__ */ new Map([[N.DatePicker, a], [N.RangePicker, Ce], [N.MonthPicker, Me], [N.YearPicker,
|
|
1513
|
+
const r = /* @__PURE__ */ new Map([[N.DatePicker, a], [N.RangePicker, Ce], [N.MonthPicker, Me], [N.YearPicker, $e], [N.QuarterPicker, Ae], [N.WeekPicker, xe]]);
|
|
1514
1514
|
function o(s, c) {
|
|
1515
1515
|
return c === void 0 ? i.component(s) : i.component(s, r.get(c) ?? c);
|
|
1516
1516
|
}
|
|
1517
1517
|
N.DatePicker.install({ ...i, component: o }, n);
|
|
1518
1518
|
} }), a;
|
|
1519
1519
|
}
|
|
1520
|
-
const Ce =
|
|
1520
|
+
const Ce = $t(!0), qa = Ce, Aa = Object.assign($t(!1), { RangePicker: Ce, MonthPicker: Me, YearPicker: $e, QuarterPicker: Ae, WeekPicker: xe }), Ct = Object.assign(F({
|
|
1521
1521
|
name: "DshCalendar",
|
|
1522
1522
|
inheritAttrs: !1,
|
|
1523
1523
|
setup(e, { attrs: t, slots: a }) {
|
|
1524
|
-
const { locale: i } = se(), n = we(Fe, void 0), r = (
|
|
1525
|
-
const
|
|
1526
|
-
for (const l of Array.isArray(
|
|
1527
|
-
typeof l == "function" && l(
|
|
1524
|
+
const { locale: i } = se(), n = we(Fe, void 0), r = (p) => t[p] ?? t[p.replace(/[A-Z]/g, (d) => `-${d.toLowerCase()}`)], o = W(ue(r("defaultValue")) ?? ie().startOf("day")), s = W(ue(r("defaultPageShowDate")) ?? ue(r("modelValue")) ?? o.value), c = (p, d) => {
|
|
1525
|
+
const M = t[p];
|
|
1526
|
+
for (const l of Array.isArray(M) ? M : [M])
|
|
1527
|
+
typeof l == "function" && l(d);
|
|
1528
1528
|
};
|
|
1529
1529
|
return () => {
|
|
1530
|
-
var u,
|
|
1531
|
-
const
|
|
1532
|
-
var L,
|
|
1533
|
-
return ((
|
|
1530
|
+
var u, m, V;
|
|
1531
|
+
const p = ((u = n == null ? void 0 : n.locale) == null ? void 0 : u.locale) ?? i.value, d = (m = n == null ? void 0 : n.locale) == null ? void 0 : m.calendar, M = p === "en-US" ? { month: "MMM YYYY", year: "YYYY", days: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] } : p === "zh-CN" ? { month: "YYYY 年 MM 月", year: "YYYY 年", days: ["日", "一", "二", "三", "四", "五", "六"] } : void 0, l = d && (!M || d.formatMonth !== M.month || d.formatYear !== M.year || ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"].some((A, Y) => {
|
|
1532
|
+
var L, P;
|
|
1533
|
+
return ((P = (L = d.week) == null ? void 0 : L.short) == null ? void 0 : P[A]) !== M.days[Y];
|
|
1534
1534
|
}) || Array.from({ length: 12 }, (A, Y) => new Date(2020, Y, 1)).some((A) => {
|
|
1535
1535
|
var Y, L;
|
|
1536
|
-
return ((L = (Y =
|
|
1536
|
+
return ((L = (Y = d.month) == null ? void 0 : Y.long) == null ? void 0 : L[new Intl.DateTimeFormat("en-US", { month: "long" }).format(A)]) !== new Intl.DateTimeFormat(p, { month: "long" }).format(A);
|
|
1537
1537
|
}));
|
|
1538
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)
|
|
1539
|
-
return
|
|
1540
|
-
const
|
|
1541
|
-
return
|
|
1539
|
+
return h(N.Calendar, t, a);
|
|
1540
|
+
const w = 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 h("div", { ...$, class: ["arco-calendar dsh-hero-calendar", t.class], style: t.style }, [h(xt, {
|
|
1542
1542
|
standalone: !0,
|
|
1543
1543
|
range: !1,
|
|
1544
|
-
value: [
|
|
1544
|
+
value: [w],
|
|
1545
1545
|
view: ue(r("pageShowDate")) ?? s.value,
|
|
1546
|
-
locale: ((
|
|
1546
|
+
locale: ((V = n == null ? void 0 : n.locale) == null ? void 0 : V.locale) ?? i.value,
|
|
1547
1547
|
weekStart: r("dayStartOfWeek") ?? 0,
|
|
1548
1548
|
disabled: (A) => {
|
|
1549
1549
|
var Y;
|
|
@@ -1600,13 +1600,13 @@ const Ce = xt(!0), qa = Ce, Aa = Object.assign(xt(!1), { RangePicker: Ce, MonthP
|
|
|
1600
1600
|
Tree: Jt,
|
|
1601
1601
|
TreeSelect: na,
|
|
1602
1602
|
Trigger: sa,
|
|
1603
|
-
WeekPicker:
|
|
1604
|
-
YearPicker:
|
|
1603
|
+
WeekPicker: xe,
|
|
1604
|
+
YearPicker: $e,
|
|
1605
1605
|
default: Ot
|
|
1606
1606
|
}, [N]), Wa = F({
|
|
1607
1607
|
name: "DshAccordion",
|
|
1608
1608
|
setup(e, { attrs: t, slots: a }) {
|
|
1609
|
-
return () =>
|
|
1609
|
+
return () => h(Yt, { accordion: !0, ...t }, a);
|
|
1610
1610
|
}
|
|
1611
1611
|
}), za = F({
|
|
1612
1612
|
name: "DshSwitchGroup",
|
|
@@ -1614,8 +1614,8 @@ const Ce = xt(!0), qa = Ce, Aa = Object.assign(xt(!1), { RangePicker: Ce, MonthP
|
|
|
1614
1614
|
setup(e, { slots: t }) {
|
|
1615
1615
|
return () => {
|
|
1616
1616
|
var a;
|
|
1617
|
-
return
|
|
1618
|
-
e.label ?
|
|
1617
|
+
return h("fieldset", { class: "dsh-switch-group", disabled: e.disabled, "data-orientation": e.orientation }, [
|
|
1618
|
+
e.label ? h("legend", e.label) : null,
|
|
1619
1619
|
(a = t.default) == null ? void 0 : a.call(t)
|
|
1620
1620
|
]);
|
|
1621
1621
|
};
|
|
@@ -1624,9 +1624,9 @@ const Ce = xt(!0), qa = Ce, Aa = Object.assign(xt(!1), { RangePicker: Ce, MonthP
|
|
|
1624
1624
|
name: "DshSpinner",
|
|
1625
1625
|
props: { label: { type: String, default: "正在加载" } },
|
|
1626
1626
|
setup(e, { attrs: t, slots: a }) {
|
|
1627
|
-
return () =>
|
|
1627
|
+
return () => h(He, { ...t, loading: !0, role: "status", "aria-label": e.label }, a);
|
|
1628
1628
|
}
|
|
1629
|
-
}),
|
|
1629
|
+
}), xa = F({
|
|
1630
1630
|
name: "DshButton",
|
|
1631
1631
|
inheritAttrs: !1,
|
|
1632
1632
|
props: {
|
|
@@ -1654,7 +1654,7 @@ const Ce = xt(!0), qa = Ce, Aa = Object.assign(xt(!1), { RangePicker: Ce, MonthP
|
|
|
1654
1654
|
}, blur: () => {
|
|
1655
1655
|
var r, o;
|
|
1656
1656
|
return (o = (r = n.value) == null ? void 0 : r.$el) == null ? void 0 : o.blur();
|
|
1657
|
-
} }), () =>
|
|
1657
|
+
} }), () => h(Lt, {
|
|
1658
1658
|
...e,
|
|
1659
1659
|
...t,
|
|
1660
1660
|
ref: n,
|
|
@@ -1677,7 +1677,7 @@ const Ce = xt(!0), qa = Ce, Aa = Object.assign(xt(!1), { RangePicker: Ce, MonthP
|
|
|
1677
1677
|
}), Ka = F({
|
|
1678
1678
|
name: "DshCloseButton",
|
|
1679
1679
|
setup(e, { attrs: t }) {
|
|
1680
|
-
return () =>
|
|
1680
|
+
return () => h(xa, { variant: "ghost", iconOnly: !0, "aria-label": "关闭", ...t }, () => "×");
|
|
1681
1681
|
}
|
|
1682
1682
|
}), qe = {
|
|
1683
1683
|
value: Number,
|
|
@@ -1701,7 +1701,7 @@ const Ga = F({
|
|
|
1701
1701
|
setup(e, { attrs: t }) {
|
|
1702
1702
|
return () => {
|
|
1703
1703
|
const a = je(e.value, e.min, e.max);
|
|
1704
|
-
return
|
|
1704
|
+
return h("div", {
|
|
1705
1705
|
...t,
|
|
1706
1706
|
class: ["dsh-progress", t.class],
|
|
1707
1707
|
role: "progressbar",
|
|
@@ -1710,9 +1710,9 @@ const Ga = F({
|
|
|
1710
1710
|
"aria-valuemax": e.max,
|
|
1711
1711
|
"aria-valuenow": e.value === void 0 ? void 0 : e.min + a * (e.max - e.min),
|
|
1712
1712
|
"data-indeterminate": e.value === void 0 || void 0
|
|
1713
|
-
}, [e.label ?
|
|
1714
|
-
|
|
1715
|
-
]), e.showValue && e.value !== void 0 ?
|
|
1713
|
+
}, [e.label ? h("span", e.label) : null, h("div", { class: "dsh-progress__track" }, [
|
|
1714
|
+
h("div", { class: "dsh-progress__fill", style: { width: `${a * 100}%` } })
|
|
1715
|
+
]), e.showValue && e.value !== void 0 ? h("span", `${Math.round(a * 100)}%`) : null]);
|
|
1716
1716
|
};
|
|
1717
1717
|
}
|
|
1718
1718
|
}), Za = F({
|
|
@@ -1721,7 +1721,7 @@ const Ga = F({
|
|
|
1721
1721
|
setup(e, { attrs: t }) {
|
|
1722
1722
|
return () => {
|
|
1723
1723
|
const a = je(e.value, e.min, e.max);
|
|
1724
|
-
return
|
|
1724
|
+
return h("div", {
|
|
1725
1725
|
...t,
|
|
1726
1726
|
class: ["dsh-progress-circle", t.class],
|
|
1727
1727
|
role: "progressbar",
|
|
@@ -1730,9 +1730,9 @@ const Ga = F({
|
|
|
1730
1730
|
"aria-valuemax": e.max,
|
|
1731
1731
|
"aria-valuenow": e.value === void 0 ? void 0 : e.min + a * (e.max - e.min),
|
|
1732
1732
|
"data-indeterminate": e.value === void 0 || void 0
|
|
1733
|
-
}, [
|
|
1734
|
-
|
|
1735
|
-
|
|
1733
|
+
}, [h("svg", { viewBox: "0 0 40 40", "aria-hidden": "true" }, [
|
|
1734
|
+
h("circle", { cx: 20, cy: 20, r: 17, class: "dsh-progress-circle__track" }),
|
|
1735
|
+
h("circle", {
|
|
1736
1736
|
cx: 20,
|
|
1737
1737
|
cy: 20,
|
|
1738
1738
|
r: 17,
|
|
@@ -1740,7 +1740,7 @@ const Ga = F({
|
|
|
1740
1740
|
class: "dsh-progress-circle__fill",
|
|
1741
1741
|
"stroke-dasharray": `${e.value === void 0 ? 25 : a * 100} 100`
|
|
1742
1742
|
})
|
|
1743
|
-
]), e.showValue && e.value !== void 0 ?
|
|
1743
|
+
]), e.showValue && e.value !== void 0 ? h("span", `${Math.round(a * 100)}%`) : null]);
|
|
1744
1744
|
};
|
|
1745
1745
|
}
|
|
1746
1746
|
}), Qa = F({
|
|
@@ -1749,7 +1749,7 @@ const Ga = F({
|
|
|
1749
1749
|
setup(e, { attrs: t }) {
|
|
1750
1750
|
return () => {
|
|
1751
1751
|
const a = je(e.value, e.min, e.max);
|
|
1752
|
-
return
|
|
1752
|
+
return h("div", {
|
|
1753
1753
|
...t,
|
|
1754
1754
|
role: "meter",
|
|
1755
1755
|
class: ["dsh-meter", t.class],
|
|
@@ -1757,12 +1757,12 @@ const Ga = F({
|
|
|
1757
1757
|
"aria-valuemin": e.min,
|
|
1758
1758
|
"aria-valuemax": e.max,
|
|
1759
1759
|
"aria-valuenow": e.min + a * (e.max - e.min)
|
|
1760
|
-
}, [e.label ?
|
|
1761
|
-
|
|
1762
|
-
]), e.showValue ?
|
|
1760
|
+
}, [e.label ? h("span", e.label) : null, h("div", { class: "dsh-progress__track" }, [
|
|
1761
|
+
h("div", { class: "dsh-progress__fill", style: { width: `${a * 100}%` } })
|
|
1762
|
+
]), e.showValue ? h("span", String(e.value)) : null]);
|
|
1763
1763
|
};
|
|
1764
1764
|
}
|
|
1765
|
-
}),
|
|
1765
|
+
}), $a = 'button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])', ne = [];
|
|
1766
1766
|
function We(e, t, a) {
|
|
1767
1767
|
return F({
|
|
1768
1768
|
name: e,
|
|
@@ -1778,67 +1778,67 @@ function We(e, t, a) {
|
|
|
1778
1778
|
},
|
|
1779
1779
|
emits: ["update:visible", "ok", "cancel", "open", "close", "beforeOpen", "beforeClose"],
|
|
1780
1780
|
setup(i, { attrs: n, slots: r, emit: o, expose: s }) {
|
|
1781
|
-
const c = se(),
|
|
1782
|
-
ta(
|
|
1783
|
-
const
|
|
1784
|
-
let
|
|
1785
|
-
le(c.container, (
|
|
1786
|
-
var
|
|
1787
|
-
if ((
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1781
|
+
const c = se(), p = W();
|
|
1782
|
+
ta(p);
|
|
1783
|
+
const d = q(i.defaultVisible), M = J(() => i.visible ?? d.value), l = `dsh-dialog-${Se().replace(/[^a-zA-Z0-9_-]/g, "")}`, x = `${l}-title`;
|
|
1784
|
+
let w, $, u;
|
|
1785
|
+
le(c.container, (P) => {
|
|
1786
|
+
var f;
|
|
1787
|
+
if ((f = p.value) == null || f.remove(), P) {
|
|
1788
|
+
const S = document.createElement("div");
|
|
1789
|
+
S.dataset.dshDialogOwner = l, P.appendChild(S), p.value = S;
|
|
1790
1790
|
} else
|
|
1791
|
-
|
|
1791
|
+
p.value = void 0;
|
|
1792
1792
|
}, { immediate: !0, flush: "post" });
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1795
|
-
},
|
|
1796
|
-
s({ open: A, close:
|
|
1797
|
-
const Y = (
|
|
1798
|
-
if (u == null || u(), u = void 0,
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1793
|
+
const m = (P) => {
|
|
1794
|
+
d.value = P, o("update:visible", P);
|
|
1795
|
+
}, V = () => m(!1), A = () => m(!0);
|
|
1796
|
+
s({ open: A, close: V });
|
|
1797
|
+
const Y = (P) => {
|
|
1798
|
+
if (u == null || u(), u = void 0, w) {
|
|
1799
|
+
const f = ne.indexOf(w);
|
|
1800
|
+
f >= 0 && ne.splice(f, 1);
|
|
1801
1801
|
}
|
|
1802
|
-
|
|
1802
|
+
w = void 0, $ != null && $.isConnected && $.focus(), $ = void 0;
|
|
1803
1803
|
}, L = () => {
|
|
1804
|
-
const
|
|
1805
|
-
if (
|
|
1804
|
+
const P = typeof i.popupContainer == "string" ? document.querySelector(i.popupContainer) : i.popupContainer ?? c.container.value;
|
|
1805
|
+
if (w = (P == null ? void 0 : P.querySelector(t ? `.${l} .arco-drawer` : `.${l}`)) ?? void 0, !w || ne.includes(w))
|
|
1806
1806
|
return;
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1811
|
-
const
|
|
1812
|
-
if (ne[ne.length - 1] !==
|
|
1807
|
+
const f = w;
|
|
1808
|
+
f.id = l, ne.push(f), f.setAttribute("role", a ? "alertdialog" : "dialog"), f.setAttribute("aria-modal", "true"), f.tabIndex = -1, i.label ? f.setAttribute("aria-label", i.label) : (i.title || r.header || r.title) && f.setAttribute("aria-labelledby", x);
|
|
1809
|
+
const S = f.querySelector(".arco-modal-close-btn, .arco-drawer-close-btn");
|
|
1810
|
+
S && (S.tabIndex = 0, S.setAttribute("aria-label", "关闭"));
|
|
1811
|
+
const v = () => Array.from(f.querySelectorAll($a)).filter((T) => T.getClientRects().length > 0 && T.getAttribute("aria-hidden") !== "true" && !T.closest("[inert]")), C = (T) => {
|
|
1812
|
+
if (ne[ne.length - 1] !== f || (S && T.target === S && (T.key === "Enter" || T.key === " ") && (T.preventDefault(), S.click()), T.key !== "Tab"))
|
|
1813
1813
|
return;
|
|
1814
|
-
const
|
|
1815
|
-
!
|
|
1816
|
-
},
|
|
1817
|
-
var
|
|
1818
|
-
const
|
|
1819
|
-
|
|
1814
|
+
const b = v(), D = b[0], g = b[b.length - 1];
|
|
1815
|
+
!D || !g ? (T.preventDefault(), f.focus()) : T.shiftKey && (document.activeElement === D || document.activeElement === f) ? (T.preventDefault(), g.focus()) : !T.shiftKey && (document.activeElement === g || document.activeElement === f) && (T.preventDefault(), D.focus());
|
|
1816
|
+
}, O = (T) => {
|
|
1817
|
+
var D;
|
|
1818
|
+
const b = T.target instanceof Element ? T.target.closest(".arco-trigger-popup") : null;
|
|
1819
|
+
b && ((D = p.value) != null && D.contains(b)) || ne[ne.length - 1] === f && T.target instanceof Node && !f.contains(T.target) && (v()[0] ?? f).focus();
|
|
1820
1820
|
};
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
}, (
|
|
1821
|
+
f.addEventListener("keydown", C), document.addEventListener("focusin", O), u = () => {
|
|
1822
|
+
f.removeEventListener("keydown", C), document.removeEventListener("focusin", O);
|
|
1823
|
+
}, (f.querySelector("[autofocus]") ?? f).focus();
|
|
1824
1824
|
};
|
|
1825
|
-
return le(
|
|
1826
|
-
|
|
1825
|
+
return le(M, async (P) => {
|
|
1826
|
+
P && typeof document < "u" ? ($ = document.activeElement instanceof HTMLElement ? document.activeElement : void 0, await re(), L()) : P || Y();
|
|
1827
1827
|
}, { immediate: !0, flush: "post" }), me(() => {
|
|
1828
|
-
var
|
|
1829
|
-
Y(), (
|
|
1828
|
+
var P;
|
|
1829
|
+
Y(), (P = p.value) == null || P.remove();
|
|
1830
1830
|
}), () => {
|
|
1831
|
-
var
|
|
1832
|
-
const
|
|
1831
|
+
var C, O;
|
|
1832
|
+
const P = { open: A, close: V, visible: M.value }, f = {
|
|
1833
1833
|
...n,
|
|
1834
|
-
visible:
|
|
1834
|
+
visible: M.value,
|
|
1835
1835
|
title: i.title,
|
|
1836
1836
|
popupContainer: i.popupContainer ?? c.container.value,
|
|
1837
1837
|
escToClose: i.escToClose,
|
|
1838
1838
|
maskClosable: i.maskClosable ?? !a,
|
|
1839
|
-
"onUpdate:visible":
|
|
1840
|
-
onOk: (
|
|
1841
|
-
onCancel: (
|
|
1839
|
+
"onUpdate:visible": m,
|
|
1840
|
+
onOk: (_) => o("ok", _),
|
|
1841
|
+
onCancel: (_) => o("cancel", _),
|
|
1842
1842
|
onOpen: () => {
|
|
1843
1843
|
L(), o("open");
|
|
1844
1844
|
},
|
|
@@ -1847,42 +1847,42 @@ function We(e, t, a) {
|
|
|
1847
1847
|
},
|
|
1848
1848
|
onBeforeOpen: () => o("beforeOpen"),
|
|
1849
1849
|
onBeforeClose: () => o("beforeClose")
|
|
1850
|
-
},
|
|
1850
|
+
}, S = {
|
|
1851
1851
|
...r,
|
|
1852
1852
|
trigger: void 0,
|
|
1853
1853
|
title: i.title || r.header || r.title ? () => {
|
|
1854
|
-
var
|
|
1855
|
-
return
|
|
1854
|
+
var _, T;
|
|
1855
|
+
return h("span", { id: x }, ((_ = r.header) == null ? void 0 : _.call(r, P)) ?? ((T = r.title) == null ? void 0 : T.call(r, P)) ?? i.title);
|
|
1856
1856
|
} : void 0,
|
|
1857
1857
|
header: t && r.header ? () => {
|
|
1858
|
-
var
|
|
1859
|
-
return
|
|
1858
|
+
var _;
|
|
1859
|
+
return h("div", { id: x }, (_ = r.header) == null ? void 0 : _.call(r, P));
|
|
1860
1860
|
} : void 0,
|
|
1861
|
-
default: () =>
|
|
1861
|
+
default: () => h(lt, { outerClass: "dsh-overlay-scroll", style: { maxHeight: "inherit", overflow: "auto" } }, {
|
|
1862
1862
|
default: () => {
|
|
1863
|
-
var
|
|
1864
|
-
return (
|
|
1863
|
+
var _;
|
|
1864
|
+
return (_ = r.default) == null ? void 0 : _.call(r, P);
|
|
1865
1865
|
}
|
|
1866
1866
|
}),
|
|
1867
1867
|
footer: r.footer ? () => {
|
|
1868
|
-
var
|
|
1869
|
-
return (
|
|
1868
|
+
var _;
|
|
1869
|
+
return (_ = r.footer) == null ? void 0 : _.call(r, P);
|
|
1870
1870
|
} : void 0
|
|
1871
1871
|
};
|
|
1872
|
-
return [(
|
|
1872
|
+
return [(O = (C = r.trigger) == null ? void 0 : C.call(r, P)) == null ? void 0 : O.map((_) => ut(_) ? Ee(_, {
|
|
1873
1873
|
"aria-haspopup": "dialog",
|
|
1874
|
-
"aria-expanded":
|
|
1874
|
+
"aria-expanded": M.value,
|
|
1875
1875
|
"aria-controls": l,
|
|
1876
|
-
class: { "dsh-overlay-trigger-open":
|
|
1877
|
-
onClick: (
|
|
1878
|
-
|
|
1876
|
+
class: { "dsh-overlay-trigger-open": M.value },
|
|
1877
|
+
onClick: (T) => {
|
|
1878
|
+
T.defaultPrevented || A();
|
|
1879
1879
|
}
|
|
1880
|
-
}) :
|
|
1881
|
-
...
|
|
1880
|
+
}) : _), c.container.value ? t ? h(It, {
|
|
1881
|
+
...f,
|
|
1882
1882
|
width: typeof n.width == "string" || typeof n.width == "number" ? n.width : "var(--dsh-drawer-width)",
|
|
1883
1883
|
height: typeof n.height == "string" || typeof n.height == "number" ? n.height : "auto",
|
|
1884
1884
|
class: ["dsh-drawer", `dsh-drawer-${n.placement === "top" || n.placement === "bottom" ? n.placement : "side"}`, l, n.class]
|
|
1885
|
-
},
|
|
1885
|
+
}, S) : h(Bt, { ...f, alignCenter: !0, modalClass: ["dsh-modal", l, n.modalClass] }, S) : null];
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
1888
|
});
|
|
@@ -1929,26 +1929,26 @@ function en() {
|
|
|
1929
1929
|
return t;
|
|
1930
1930
|
const a = {}, i = /* @__PURE__ */ new Set(), n = (s) => {
|
|
1931
1931
|
const c = ye({ ...a, ...s, visible: !0 });
|
|
1932
|
-
let
|
|
1933
|
-
const
|
|
1932
|
+
let p = !1;
|
|
1933
|
+
const d = () => {
|
|
1934
1934
|
var l;
|
|
1935
|
-
|
|
1936
|
-
},
|
|
1937
|
-
const { title: l, content:
|
|
1938
|
-
return
|
|
1939
|
-
|
|
1940
|
-
footer: typeof
|
|
1935
|
+
p || (p = !0, i.delete(d), M(), (l = c.onClose) == null || l.call(c));
|
|
1936
|
+
}, M = e.mountOverlay(() => {
|
|
1937
|
+
const { title: l, content: x, footer: w, ...$ } = c;
|
|
1938
|
+
return h(Ca, {
|
|
1939
|
+
...$,
|
|
1940
|
+
footer: typeof w == "boolean" ? w : !0,
|
|
1941
1941
|
"onUpdate:visible": (u) => {
|
|
1942
1942
|
c.visible = u;
|
|
1943
1943
|
},
|
|
1944
|
-
onClose:
|
|
1944
|
+
onClose: d
|
|
1945
1945
|
}, {
|
|
1946
1946
|
title: l === void 0 ? void 0 : () => typeof l == "function" ? l() : l,
|
|
1947
|
-
default: () => typeof
|
|
1948
|
-
footer:
|
|
1947
|
+
default: () => typeof x == "function" ? x() : x,
|
|
1948
|
+
footer: w !== void 0 && typeof w != "boolean" ? () => typeof w == "function" ? w() : w : void 0
|
|
1949
1949
|
});
|
|
1950
1950
|
});
|
|
1951
|
-
return i.add(
|
|
1951
|
+
return i.add(d), { close: d, update: (l) => Object.assign(c, l) };
|
|
1952
1952
|
}, o = {
|
|
1953
1953
|
modal: {
|
|
1954
1954
|
open: n,
|
|
@@ -1964,34 +1964,34 @@ function en() {
|
|
|
1964
1964
|
},
|
|
1965
1965
|
drawer: { open: (s) => {
|
|
1966
1966
|
const c = ye({ ...s, visible: !0 });
|
|
1967
|
-
let
|
|
1968
|
-
const
|
|
1967
|
+
let p = !1;
|
|
1968
|
+
const d = () => {
|
|
1969
1969
|
var l;
|
|
1970
|
-
|
|
1971
|
-
},
|
|
1972
|
-
const { title: l, content:
|
|
1973
|
-
return
|
|
1970
|
+
p || (p = !0, M(), (l = c.onClose) == null || l.call(c));
|
|
1971
|
+
}, M = e.mountOverlay(() => {
|
|
1972
|
+
const { title: l, content: x, footer: w, header: $, ...u } = c;
|
|
1973
|
+
return h(_a, {
|
|
1974
1974
|
...u,
|
|
1975
|
-
header: typeof
|
|
1976
|
-
footer: typeof
|
|
1977
|
-
"onUpdate:visible": (
|
|
1978
|
-
c.visible =
|
|
1975
|
+
header: typeof $ == "boolean" ? $ : !0,
|
|
1976
|
+
footer: typeof w == "boolean" ? w : !0,
|
|
1977
|
+
"onUpdate:visible": (m) => {
|
|
1978
|
+
c.visible = m;
|
|
1979
1979
|
},
|
|
1980
|
-
onClose:
|
|
1980
|
+
onClose: d
|
|
1981
1981
|
}, {
|
|
1982
1982
|
title: l === void 0 ? void 0 : () => typeof l == "function" ? l() : l,
|
|
1983
|
-
default: () => typeof
|
|
1984
|
-
header:
|
|
1985
|
-
footer:
|
|
1983
|
+
default: () => typeof x == "function" ? x() : x,
|
|
1984
|
+
header: $ !== void 0 && typeof $ != "boolean" ? () => typeof $ == "function" ? $() : $ : void 0,
|
|
1985
|
+
footer: w !== void 0 && typeof w != "boolean" ? () => typeof w == "function" ? w() : w : void 0
|
|
1986
1986
|
});
|
|
1987
1987
|
});
|
|
1988
|
-
return { close:
|
|
1988
|
+
return { close: d, update: (l) => Object.assign(c, l) };
|
|
1989
1989
|
} }
|
|
1990
1990
|
};
|
|
1991
1991
|
return ot.set(e.mountOverlay, o), o;
|
|
1992
1992
|
}
|
|
1993
1993
|
function he(e, t, a, i = !0) {
|
|
1994
|
-
const n = e.flatMap((c,
|
|
1994
|
+
const n = e.flatMap((c, p) => c.disabled ? [] : [p]);
|
|
1995
1995
|
if (n.length === 0)
|
|
1996
1996
|
return -1;
|
|
1997
1997
|
if (a === "Home")
|
|
@@ -2042,7 +2042,7 @@ const tn = F({
|
|
|
2042
2042
|
setup(e, { attrs: t, slots: a, emit: i }) {
|
|
2043
2043
|
return () => {
|
|
2044
2044
|
var n;
|
|
2045
|
-
return
|
|
2045
|
+
return h("a", {
|
|
2046
2046
|
...t,
|
|
2047
2047
|
class: ["dsh-link", t.class],
|
|
2048
2048
|
role: "link",
|
|
@@ -2067,8 +2067,8 @@ const tn = F({
|
|
|
2067
2067
|
setup(e, { slots: t }) {
|
|
2068
2068
|
return () => {
|
|
2069
2069
|
var a;
|
|
2070
|
-
return
|
|
2071
|
-
...e.keys.map((i) =>
|
|
2070
|
+
return h("kbd", { class: "dsh-kbd" }, [
|
|
2071
|
+
...e.keys.map((i) => h("span", { class: "dsh-kbd__key", key: i }, i)),
|
|
2072
2072
|
(a = t.default) == null ? void 0 : a.call(t)
|
|
2073
2073
|
]);
|
|
2074
2074
|
};
|
|
@@ -2082,7 +2082,7 @@ const tn = F({
|
|
|
2082
2082
|
setup(e, { slots: t }) {
|
|
2083
2083
|
return () => {
|
|
2084
2084
|
var a;
|
|
2085
|
-
return
|
|
2085
|
+
return h(e.as, { class: "dsh-surface", "data-variant": e.variant }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2086
2086
|
};
|
|
2087
2087
|
}
|
|
2088
2088
|
}), rn = F({
|
|
@@ -2090,7 +2090,7 @@ const tn = F({
|
|
|
2090
2090
|
setup(e, { slots: t }) {
|
|
2091
2091
|
return () => {
|
|
2092
2092
|
var a;
|
|
2093
|
-
return
|
|
2093
|
+
return h("header", { class: "dsh-header" }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2094
2094
|
};
|
|
2095
2095
|
}
|
|
2096
2096
|
}), Oa = F({
|
|
@@ -2099,7 +2099,7 @@ const tn = F({
|
|
|
2099
2099
|
setup(e, { slots: t }) {
|
|
2100
2100
|
return () => {
|
|
2101
2101
|
var a;
|
|
2102
|
-
return
|
|
2102
|
+
return h("label", { class: "dsh-label" }, [(a = t.default) == null ? void 0 : a.call(t), e.required ? h("span", { "aria-hidden": "true", class: "dsh-label__required" }, " *") : null]);
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
2105
|
}), Ya = F({
|
|
@@ -2107,7 +2107,7 @@ const tn = F({
|
|
|
2107
2107
|
setup(e, { slots: t }) {
|
|
2108
2108
|
return () => {
|
|
2109
2109
|
var a;
|
|
2110
|
-
return
|
|
2110
|
+
return h("div", { class: "dsh-description" }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2111
2111
|
};
|
|
2112
2112
|
}
|
|
2113
2113
|
}), Pt = F({
|
|
@@ -2115,7 +2115,7 @@ const tn = F({
|
|
|
2115
2115
|
setup(e, { slots: t }) {
|
|
2116
2116
|
return () => {
|
|
2117
2117
|
var a;
|
|
2118
|
-
return
|
|
2118
|
+
return h("div", { class: "dsh-field-error", "aria-live": "polite" }, (a = t.default) == null ? void 0 : a.call(t));
|
|
2119
2119
|
};
|
|
2120
2120
|
}
|
|
2121
2121
|
}), on = Pt, ln = F({
|
|
@@ -2124,8 +2124,8 @@ const tn = F({
|
|
|
2124
2124
|
setup(e, { slots: t }) {
|
|
2125
2125
|
return () => {
|
|
2126
2126
|
var a, i;
|
|
2127
|
-
return
|
|
2128
|
-
t.legend || e.legend ?
|
|
2127
|
+
return h("fieldset", { class: "dsh-fieldset", disabled: e.disabled }, [
|
|
2128
|
+
t.legend || e.legend ? h("legend", {}, ((a = t.legend) == null ? void 0 : a.call(t)) ?? e.legend) : null,
|
|
2129
2129
|
(i = t.default) == null ? void 0 : i.call(t)
|
|
2130
2130
|
]);
|
|
2131
2131
|
};
|
|
@@ -2135,10 +2135,10 @@ const tn = F({
|
|
|
2135
2135
|
setup(e, { slots: t }) {
|
|
2136
2136
|
return () => {
|
|
2137
2137
|
var a;
|
|
2138
|
-
return
|
|
2139
|
-
t.start ?
|
|
2138
|
+
return h("div", { class: "dsh-input-group" }, [
|
|
2139
|
+
t.start ? h("span", { class: "dsh-input-group__start" }, t.start()) : null,
|
|
2140
2140
|
(a = t.default) == null ? void 0 : a.call(t),
|
|
2141
|
-
t.end ?
|
|
2141
|
+
t.end ? h("span", { class: "dsh-input-group__end" }, t.end()) : null
|
|
2142
2142
|
]);
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
@@ -2164,30 +2164,30 @@ const tn = F({
|
|
|
2164
2164
|
setup(e, { attrs: t, slots: a, emit: i, expose: n }) {
|
|
2165
2165
|
const r = ze(), o = Se(), s = q(null), c = q(e.defaultValue);
|
|
2166
2166
|
return n({ focus: () => {
|
|
2167
|
-
var
|
|
2168
|
-
return (
|
|
2167
|
+
var p;
|
|
2168
|
+
return (p = s.value) == null ? void 0 : p.focus();
|
|
2169
2169
|
}, blur: () => {
|
|
2170
|
-
var
|
|
2171
|
-
return (
|
|
2170
|
+
var p;
|
|
2171
|
+
return (p = s.value) == null ? void 0 : p.blur();
|
|
2172
2172
|
} }), () => {
|
|
2173
|
-
const
|
|
2174
|
-
return
|
|
2175
|
-
e.label || a.label ?
|
|
2173
|
+
const p = e.id ?? `dsh-field-${o}`, d = !!(e.description || a.description), M = !!(e.errorMessage || a.error), l = [t["aria-describedby"], d ? `${p}-description` : "", M ? `${p}-error` : ""].filter(Boolean).join(" ") || void 0, { class: x, style: w, ...$ } = t;
|
|
2174
|
+
return h("div", { class: ["dsh-field", x], style: w, "data-invalid": e.invalid || M || void 0 }, [
|
|
2175
|
+
e.label || a.label ? h(Oa, { for: p, required: e.required }, { default: () => {
|
|
2176
2176
|
var u;
|
|
2177
2177
|
return ((u = a.label) == null ? void 0 : u.call(a)) ?? e.label;
|
|
2178
2178
|
} }) : null,
|
|
2179
|
-
|
|
2180
|
-
|
|
2179
|
+
h(Et, {
|
|
2180
|
+
...$,
|
|
2181
2181
|
ref: s,
|
|
2182
2182
|
type: e.type === "password" ? "password" : "text",
|
|
2183
2183
|
inputAttrs: {
|
|
2184
2184
|
...typeof t.inputAttrs == "object" ? t.inputAttrs : {},
|
|
2185
|
-
id:
|
|
2185
|
+
id: p,
|
|
2186
2186
|
name: e.name,
|
|
2187
2187
|
type: e.type,
|
|
2188
2188
|
required: e.required,
|
|
2189
2189
|
"aria-label": t["aria-label"],
|
|
2190
|
-
"aria-invalid": e.invalid ||
|
|
2190
|
+
"aria-invalid": e.invalid || M || void 0,
|
|
2191
2191
|
"aria-describedby": l,
|
|
2192
2192
|
"aria-required": e.required || void 0
|
|
2193
2193
|
},
|
|
@@ -2195,20 +2195,20 @@ const tn = F({
|
|
|
2195
2195
|
modelValue: r ? e.modelValue ?? "" : c.value,
|
|
2196
2196
|
disabled: e.disabled,
|
|
2197
2197
|
readonly: e.readonly,
|
|
2198
|
-
error: e.invalid ||
|
|
2198
|
+
error: e.invalid || M,
|
|
2199
2199
|
"onUpdate:modelValue": (u) => {
|
|
2200
2200
|
c.value = u, i("update:modelValue", u);
|
|
2201
2201
|
},
|
|
2202
|
-
onChange: (u,
|
|
2203
|
-
onInput: (u,
|
|
2202
|
+
onChange: (u, m) => i("change", u, m),
|
|
2203
|
+
onInput: (u, m) => i("input", u, m),
|
|
2204
2204
|
onFocus: (u) => i("focus", u),
|
|
2205
2205
|
onBlur: (u) => i("blur", u)
|
|
2206
2206
|
}, { prefix: a.prefix, suffix: a.suffix, prepend: a.prepend, append: a.append }),
|
|
2207
|
-
|
|
2207
|
+
d ? h(Ya, { id: `${p}-description` }, { default: () => {
|
|
2208
2208
|
var u;
|
|
2209
2209
|
return ((u = a.description) == null ? void 0 : u.call(a)) ?? e.description;
|
|
2210
2210
|
} }) : null,
|
|
2211
|
-
|
|
2211
|
+
M ? h(Pt, { id: `${p}-error` }, { default: () => {
|
|
2212
2212
|
var u;
|
|
2213
2213
|
return ((u = a.error) == null ? void 0 : u.call(a)) ?? e.errorMessage;
|
|
2214
2214
|
} }) : null
|
|
@@ -2222,7 +2222,7 @@ const tn = F({
|
|
|
2222
2222
|
emits: ["update:modelValue", "search"],
|
|
2223
2223
|
setup(e, { attrs: t, slots: a, emit: i }) {
|
|
2224
2224
|
const n = ze(), r = q(e.defaultValue);
|
|
2225
|
-
return () =>
|
|
2225
|
+
return () => h(La, De(t, {
|
|
2226
2226
|
...e,
|
|
2227
2227
|
type: "search",
|
|
2228
2228
|
allowClear: !0,
|
|
@@ -2250,13 +2250,13 @@ const tn = F({
|
|
|
2250
2250
|
},
|
|
2251
2251
|
emits: ["update:modelValue", "complete", "change"],
|
|
2252
2252
|
setup(e, { attrs: t, emit: a, expose: i }) {
|
|
2253
|
-
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 = J(() => ce(n ? e.modelValue ?? "" : o.value, e.length, e.type === "numeric")), c = q(!1), p = q(0), d = () => {
|
|
2254
2254
|
var l;
|
|
2255
|
-
|
|
2256
|
-
},
|
|
2257
|
-
const
|
|
2258
|
-
o.value = l, a("update:modelValue", l),
|
|
2259
|
-
r.value && (r.value.value = s.value, r.value.setSelectionRange(
|
|
2255
|
+
p.value = ((l = r.value) == null ? void 0 : l.selectionStart) ?? 0;
|
|
2256
|
+
}, M = (l, x) => {
|
|
2257
|
+
const w = s.value;
|
|
2258
|
+
o.value = l, a("update:modelValue", l), w !== l && (a("change", l), l.length === e.length && a("complete", l)), re(() => {
|
|
2259
|
+
r.value && (r.value.value = s.value, r.value.setSelectionRange(x, x), d());
|
|
2260
2260
|
});
|
|
2261
2261
|
};
|
|
2262
2262
|
return i({ focus: () => {
|
|
@@ -2266,27 +2266,27 @@ const tn = F({
|
|
|
2266
2266
|
var l;
|
|
2267
2267
|
return (l = r.value) == null ? void 0 : l.blur();
|
|
2268
2268
|
} }), () => {
|
|
2269
|
-
const { class: l, style:
|
|
2270
|
-
return
|
|
2269
|
+
const { class: l, style: x, ...w } = t;
|
|
2270
|
+
return h("div", {
|
|
2271
2271
|
class: ["dsh-otp", l],
|
|
2272
|
-
style:
|
|
2272
|
+
style: x,
|
|
2273
2273
|
"data-invalid": e.invalid || void 0,
|
|
2274
2274
|
"data-disabled": e.disabled || void 0,
|
|
2275
|
-
onMousedown(
|
|
2275
|
+
onMousedown($) {
|
|
2276
2276
|
var u;
|
|
2277
|
-
!e.disabled &&
|
|
2277
|
+
!e.disabled && !$.defaultPrevented && ($.preventDefault(), (u = r.value) == null || u.focus());
|
|
2278
2278
|
}
|
|
2279
2279
|
}, [
|
|
2280
|
-
|
|
2280
|
+
h("div", { class: "dsh-otp__cells", "aria-hidden": "true" }, Array.from({ length: e.length }, ($, u) => h("span", {
|
|
2281
2281
|
class: "dsh-otp__cell",
|
|
2282
|
-
"data-active": c.value && Math.min(
|
|
2282
|
+
"data-active": c.value && Math.min(p.value, e.length - 1) === u || void 0,
|
|
2283
2283
|
"data-filled": !!s.value[u] || void 0,
|
|
2284
|
-
onMousedown(
|
|
2285
|
-
var
|
|
2286
|
-
e.disabled || (
|
|
2284
|
+
onMousedown(m) {
|
|
2285
|
+
var V, A;
|
|
2286
|
+
e.disabled || (m.preventDefault(), (V = r.value) == null || V.focus(), (A = r.value) == null || A.setSelectionRange(Math.min(u, s.value.length), Math.min(u, s.value.length)), d());
|
|
2287
2287
|
}
|
|
2288
2288
|
}, s.value[u] ?? ""))),
|
|
2289
|
-
|
|
2289
|
+
h("input", De(w, {
|
|
2290
2290
|
ref: r,
|
|
2291
2291
|
class: "dsh-otp__input",
|
|
2292
2292
|
value: s.value,
|
|
@@ -2299,24 +2299,24 @@ const tn = F({
|
|
|
2299
2299
|
"aria-label": t["aria-label"] ?? e.label,
|
|
2300
2300
|
"aria-invalid": e.invalid || void 0,
|
|
2301
2301
|
onFocus: () => {
|
|
2302
|
-
c.value = !0,
|
|
2302
|
+
c.value = !0, d();
|
|
2303
2303
|
},
|
|
2304
2304
|
onBlur: () => {
|
|
2305
2305
|
c.value = !1;
|
|
2306
2306
|
},
|
|
2307
|
-
onSelect:
|
|
2308
|
-
onKeyup:
|
|
2309
|
-
onInput(
|
|
2310
|
-
const u =
|
|
2311
|
-
|
|
2307
|
+
onSelect: d,
|
|
2308
|
+
onKeyup: d,
|
|
2309
|
+
onInput($) {
|
|
2310
|
+
const u = $.target, m = ce(u.value.slice(0, u.selectionStart ?? 0), e.length, e.type === "numeric").length;
|
|
2311
|
+
M(ce(u.value, e.length, e.type === "numeric"), m);
|
|
2312
2312
|
},
|
|
2313
|
-
onPaste(
|
|
2314
|
-
var
|
|
2315
|
-
if (e.disabled || e.readonly ||
|
|
2313
|
+
onPaste($) {
|
|
2314
|
+
var m, V;
|
|
2315
|
+
if (e.disabled || e.readonly || !$.clipboardData)
|
|
2316
2316
|
return;
|
|
2317
|
-
|
|
2318
|
-
const u = Va(s.value,
|
|
2319
|
-
|
|
2317
|
+
$.preventDefault();
|
|
2318
|
+
const u = Va(s.value, $.clipboardData.getData("text"), ((m = r.value) == null ? void 0 : m.selectionStart) ?? 0, ((V = r.value) == null ? void 0 : V.selectionEnd) ?? 0, e.length, e.type === "numeric");
|
|
2319
|
+
M(u.value, u.cursor);
|
|
2320
2320
|
}
|
|
2321
2321
|
}))
|
|
2322
2322
|
]);
|
|
@@ -2351,7 +2351,7 @@ const tn = F({
|
|
|
2351
2351
|
}
|
|
2352
2352
|
}), me(() => {
|
|
2353
2353
|
n == null || n.disconnect(), r == null || r.disconnect();
|
|
2354
|
-
}), () =>
|
|
2354
|
+
}), () => h("div", {
|
|
2355
2355
|
ref: a,
|
|
2356
2356
|
class: "dsh-scroll-shadow",
|
|
2357
2357
|
onScrollCapture: o,
|
|
@@ -2359,9 +2359,9 @@ const tn = F({
|
|
|
2359
2359
|
"data-bottom": i.value.bottom || void 0,
|
|
2360
2360
|
"data-left": i.value.left || void 0,
|
|
2361
2361
|
"data-right": i.value.right || void 0
|
|
2362
|
-
},
|
|
2362
|
+
}, h(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: () => {
|
|
2363
2363
|
var s;
|
|
2364
|
-
return
|
|
2364
|
+
return h("div", { class: "dsh-scroll-shadow__content" }, (s = t.default) == null ? void 0 : s.call(t));
|
|
2365
2365
|
} }));
|
|
2366
2366
|
}
|
|
2367
2367
|
});
|
|
@@ -2383,46 +2383,46 @@ const Vt = {
|
|
|
2383
2383
|
props: Vt,
|
|
2384
2384
|
emits: ["update:modelValue", "change"],
|
|
2385
2385
|
setup(e, { slots: t, emit: a }) {
|
|
2386
|
-
const i = _e(), n = Se(), r = q(null), o = q(e.defaultValue), s =
|
|
2387
|
-
let
|
|
2386
|
+
const i = _e(), n = Se(), r = q(null), o = q(e.defaultValue), s = J(() => i ? e.modelValue : o.value), c = J(() => Array.isArray(s.value) ? s.value : s.value === void 0 ? [] : [s.value]), p = q(-1);
|
|
2387
|
+
let d = "", M = 0;
|
|
2388
2388
|
const l = () => {
|
|
2389
|
-
const u = e.options.findIndex((
|
|
2390
|
-
|
|
2389
|
+
const u = e.options.findIndex((m) => !m.disabled && c.value.includes(m.value));
|
|
2390
|
+
p.value = u < 0 ? he(e.options, -1, "Home") : u;
|
|
2391
2391
|
};
|
|
2392
2392
|
le(() => e.options, l, { immediate: !0, deep: !0 });
|
|
2393
|
-
const
|
|
2394
|
-
const
|
|
2395
|
-
if (e.disabled || !
|
|
2393
|
+
const x = (u) => {
|
|
2394
|
+
const m = e.options[u];
|
|
2395
|
+
if (e.disabled || !m || m.disabled)
|
|
2396
2396
|
return;
|
|
2397
|
-
|
|
2398
|
-
const
|
|
2399
|
-
o.value =
|
|
2400
|
-
},
|
|
2397
|
+
p.value = u;
|
|
2398
|
+
const V = _t(s.value, m.value, e.multiple, e.allowEmpty);
|
|
2399
|
+
o.value = V, a("update:modelValue", V), a("change", V);
|
|
2400
|
+
}, w = () => {
|
|
2401
2401
|
re(() => {
|
|
2402
|
-
var u,
|
|
2403
|
-
return (
|
|
2402
|
+
var u, m;
|
|
2403
|
+
return (m = (u = r.value) == null ? void 0 : u.querySelector(`[data-index="${p.value}"]`)) == null ? void 0 : m.scrollIntoView({ block: "nearest" });
|
|
2404
2404
|
});
|
|
2405
|
-
},
|
|
2405
|
+
}, $ = (u) => {
|
|
2406
2406
|
if (!(e.disabled || u.isComposing)) {
|
|
2407
2407
|
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(u.key))
|
|
2408
|
-
u.preventDefault(),
|
|
2408
|
+
u.preventDefault(), p.value = he(e.options, p.value, u.key), w();
|
|
2409
2409
|
else if (u.key === "Enter" || u.key === " ")
|
|
2410
|
-
u.preventDefault(),
|
|
2410
|
+
u.preventDefault(), x(p.value);
|
|
2411
2411
|
else if (e.multiple && (u.ctrlKey || u.metaKey) && u.key.toLowerCase() === "a") {
|
|
2412
2412
|
u.preventDefault();
|
|
2413
|
-
const
|
|
2414
|
-
o.value =
|
|
2413
|
+
const m = e.options.filter((V) => !V.disabled || c.value.includes(V.value)).map((V) => V.value);
|
|
2414
|
+
o.value = m, a("update:modelValue", m), a("change", m);
|
|
2415
2415
|
} else if (u.key.length === 1 && !u.ctrlKey && !u.metaKey && !u.altKey) {
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2418
|
-
const A = [...
|
|
2419
|
-
Y >= 0 && (
|
|
2416
|
+
const m = Date.now();
|
|
2417
|
+
d = m - M > 700 ? u.key : d + u.key, M = m;
|
|
2418
|
+
const A = [...d].every((L) => L.toLocaleLowerCase() === u.key.toLocaleLowerCase()) ? u.key : d, Y = Ta(e.options, A.length > 1 ? p.value - 1 : p.value, A);
|
|
2419
|
+
Y >= 0 && (p.value = Y, w()), u.preventDefault();
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
2422
|
};
|
|
2423
2423
|
return () => {
|
|
2424
2424
|
var u;
|
|
2425
|
-
return
|
|
2425
|
+
return h("div", {
|
|
2426
2426
|
ref: r,
|
|
2427
2427
|
class: "dsh-listbox",
|
|
2428
2428
|
role: "listbox",
|
|
@@ -2430,33 +2430,33 @@ const Vt = {
|
|
|
2430
2430
|
"aria-label": e.label,
|
|
2431
2431
|
"aria-multiselectable": e.multiple || void 0,
|
|
2432
2432
|
"aria-disabled": e.disabled || void 0,
|
|
2433
|
-
"aria-activedescendant":
|
|
2434
|
-
onKeydown:
|
|
2433
|
+
"aria-activedescendant": p.value < 0 ? void 0 : `dsh-listbox-${n}-${p.value}`,
|
|
2434
|
+
onKeydown: $,
|
|
2435
2435
|
onFocus: l
|
|
2436
|
-
}, e.options.length === 0 ? (u = t.empty) == null ? void 0 : u.call(t) : e.options.map((
|
|
2436
|
+
}, e.options.length === 0 ? (u = t.empty) == null ? void 0 : u.call(t) : e.options.map((m, V) => {
|
|
2437
2437
|
var A;
|
|
2438
|
-
return
|
|
2439
|
-
key:
|
|
2440
|
-
id: `dsh-listbox-${n}-${
|
|
2438
|
+
return h("div", {
|
|
2439
|
+
key: m.value,
|
|
2440
|
+
id: `dsh-listbox-${n}-${V}`,
|
|
2441
2441
|
role: "option",
|
|
2442
|
-
"aria-selected": c.value.includes(
|
|
2443
|
-
"aria-disabled": e.disabled ||
|
|
2444
|
-
"data-selected": c.value.includes(
|
|
2445
|
-
"data-disabled": e.disabled ||
|
|
2446
|
-
"data-active":
|
|
2447
|
-
"data-index":
|
|
2442
|
+
"aria-selected": c.value.includes(m.value),
|
|
2443
|
+
"aria-disabled": e.disabled || m.disabled || void 0,
|
|
2444
|
+
"data-selected": c.value.includes(m.value) || void 0,
|
|
2445
|
+
"data-disabled": e.disabled || m.disabled || void 0,
|
|
2446
|
+
"data-active": p.value === V || void 0,
|
|
2447
|
+
"data-index": V,
|
|
2448
2448
|
class: "dsh-listbox__option",
|
|
2449
2449
|
onMousedown(Y) {
|
|
2450
2450
|
Y.preventDefault();
|
|
2451
2451
|
},
|
|
2452
2452
|
onClick() {
|
|
2453
2453
|
var Y;
|
|
2454
|
-
(Y = r.value) == null || Y.focus(),
|
|
2454
|
+
(Y = r.value) == null || Y.focus(), x(V);
|
|
2455
2455
|
}
|
|
2456
|
-
}, ((A = t.option) == null ? void 0 : A.call(t, { option:
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2456
|
+
}, ((A = t.option) == null ? void 0 : A.call(t, { option: m, selected: c.value.includes(m.value), active: p.value === V })) ?? [
|
|
2457
|
+
h("span", { class: "dsh-listbox__label" }, m.label),
|
|
2458
|
+
m.description ? h("span", { class: "dsh-description" }, m.description) : null,
|
|
2459
|
+
h("span", { class: "dsh-listbox__indicator", "aria-hidden": "true" }, c.value.includes(m.value) ? "✓" : "")
|
|
2460
2460
|
]);
|
|
2461
2461
|
}));
|
|
2462
2462
|
};
|
|
@@ -2471,10 +2471,10 @@ const Vt = {
|
|
|
2471
2471
|
},
|
|
2472
2472
|
emits: ["update:modelValue", "change", "click"],
|
|
2473
2473
|
setup(e, { attrs: t, slots: a, emit: i }) {
|
|
2474
|
-
const n = _e(), r = q(e.defaultValue), o =
|
|
2474
|
+
const n = _e(), r = q(e.defaultValue), o = J(() => n ? e.modelValue ?? !1 : r.value);
|
|
2475
2475
|
return () => {
|
|
2476
2476
|
var s;
|
|
2477
|
-
return
|
|
2477
|
+
return h("button", {
|
|
2478
2478
|
...t,
|
|
2479
2479
|
class: ["dsh-toggle-button", t.class],
|
|
2480
2480
|
type: "button",
|
|
@@ -2492,50 +2492,50 @@ const Vt = {
|
|
|
2492
2492
|
props: { ...Vt, orientation: { type: String, default: "horizontal" } },
|
|
2493
2493
|
emits: ["update:modelValue", "change"],
|
|
2494
2494
|
setup(e, { slots: t, emit: a }) {
|
|
2495
|
-
const i = _e(), n = q(null), r = q(e.defaultValue), o =
|
|
2495
|
+
const i = _e(), n = q(null), r = q(e.defaultValue), o = J(() => i ? e.modelValue : r.value), s = J(() => Array.isArray(o.value) ? o.value : o.value === void 0 ? [] : [o.value]), c = q(-1);
|
|
2496
2496
|
le(() => e.options, () => {
|
|
2497
|
-
var
|
|
2498
|
-
if (!e.options[c.value] || (
|
|
2499
|
-
const
|
|
2500
|
-
c.value =
|
|
2497
|
+
var d;
|
|
2498
|
+
if (!e.options[c.value] || (d = e.options[c.value]) != null && d.disabled) {
|
|
2499
|
+
const M = e.options.findIndex((l) => !l.disabled && s.value.includes(l.value));
|
|
2500
|
+
c.value = M < 0 ? he(e.options, -1, "Home") : M;
|
|
2501
2501
|
}
|
|
2502
2502
|
}, { immediate: !0, deep: !0 });
|
|
2503
|
-
const
|
|
2504
|
-
if (e.disabled ||
|
|
2503
|
+
const p = (d) => {
|
|
2504
|
+
if (e.disabled || d.disabled)
|
|
2505
2505
|
return;
|
|
2506
|
-
const
|
|
2507
|
-
r.value =
|
|
2506
|
+
const M = _t(o.value, d.value, e.multiple, e.allowEmpty);
|
|
2507
|
+
r.value = M, a("update:modelValue", M), a("change", M);
|
|
2508
2508
|
};
|
|
2509
|
-
return () =>
|
|
2509
|
+
return () => h("div", {
|
|
2510
2510
|
ref: n,
|
|
2511
2511
|
role: "group",
|
|
2512
2512
|
class: "dsh-toggle-group",
|
|
2513
2513
|
"aria-label": e.label,
|
|
2514
2514
|
"aria-disabled": e.disabled || void 0,
|
|
2515
2515
|
"data-orientation": e.orientation,
|
|
2516
|
-
onKeydown(
|
|
2517
|
-
if (e.disabled || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(
|
|
2516
|
+
onKeydown(d) {
|
|
2517
|
+
if (e.disabled || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(d.key))
|
|
2518
2518
|
return;
|
|
2519
|
-
|
|
2520
|
-
let l =
|
|
2519
|
+
d.preventDefault();
|
|
2520
|
+
let l = d.key;
|
|
2521
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(() => {
|
|
2522
|
-
var
|
|
2523
|
-
return (
|
|
2522
|
+
var x, w;
|
|
2523
|
+
return (w = (x = n.value) == null ? void 0 : x.querySelector(`[data-index="${c.value}"]`)) == null ? void 0 : w.focus();
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
2526
|
-
}, e.options.map((
|
|
2527
|
-
key:
|
|
2528
|
-
modelValue: s.value.includes(
|
|
2529
|
-
disabled: e.disabled ||
|
|
2530
|
-
tabindex: c.value ===
|
|
2531
|
-
"data-index":
|
|
2526
|
+
}, e.options.map((d, M) => h(Ia, {
|
|
2527
|
+
key: d.value,
|
|
2528
|
+
modelValue: s.value.includes(d.value),
|
|
2529
|
+
disabled: e.disabled || d.disabled,
|
|
2530
|
+
tabindex: c.value === M ? 0 : -1,
|
|
2531
|
+
"data-index": M,
|
|
2532
2532
|
onFocus: () => {
|
|
2533
|
-
c.value =
|
|
2533
|
+
c.value = M;
|
|
2534
2534
|
},
|
|
2535
|
-
"onUpdate:modelValue": () =>
|
|
2535
|
+
"onUpdate:modelValue": () => p(d)
|
|
2536
2536
|
}, { default: () => {
|
|
2537
2537
|
var l;
|
|
2538
|
-
return ((l = t.option) == null ? void 0 : l.call(t, { option:
|
|
2538
|
+
return ((l = t.option) == null ? void 0 : l.call(t, { option: d, selected: s.value.includes(d.value) })) ?? d.label;
|
|
2539
2539
|
} })));
|
|
2540
2540
|
}
|
|
2541
2541
|
}), mn = F({
|
|
@@ -2548,9 +2548,9 @@ const Vt = {
|
|
|
2548
2548
|
var s;
|
|
2549
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]"));
|
|
2550
2550
|
}, o = (s) => {
|
|
2551
|
-
const c = r(),
|
|
2552
|
-
for (const
|
|
2553
|
-
n.has(
|
|
2551
|
+
const c = r(), p = s && c.includes(s) ? s : c.find((d) => d === document.activeElement) ?? c.find((d) => d.tabIndex === 0) ?? c[0];
|
|
2552
|
+
for (const d of c)
|
|
2553
|
+
n.has(d) || n.set(d, d.getAttribute("tabindex")), d.tabIndex = d === p ? 0 : -1;
|
|
2554
2554
|
};
|
|
2555
2555
|
return fe(() => {
|
|
2556
2556
|
o(), a.value && (i = new MutationObserver(() => o()), i.observe(a.value, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["disabled", "aria-disabled", "hidden"] }));
|
|
@@ -2560,7 +2560,7 @@ const Vt = {
|
|
|
2560
2560
|
c === null ? s.removeAttribute("tabindex") : s.setAttribute("tabindex", c);
|
|
2561
2561
|
}), () => {
|
|
2562
2562
|
var s;
|
|
2563
|
-
return
|
|
2563
|
+
return h("div", {
|
|
2564
2564
|
ref: a,
|
|
2565
2565
|
class: "dsh-toolbar",
|
|
2566
2566
|
role: "toolbar",
|
|
@@ -2570,15 +2570,15 @@ const Vt = {
|
|
|
2570
2570
|
o(c.target);
|
|
2571
2571
|
},
|
|
2572
2572
|
onKeydown(c) {
|
|
2573
|
-
var
|
|
2574
|
-
const
|
|
2575
|
-
if (
|
|
2573
|
+
var w;
|
|
2574
|
+
const p = c.target;
|
|
2575
|
+
if (p.matches('input, textarea, select, [contenteditable="true"]') || !(e.orientation === "horizontal" ? ["ArrowLeft", "ArrowRight", "Home", "End"] : ["ArrowUp", "ArrowDown", "Home", "End"]).includes(c.key))
|
|
2576
2576
|
return;
|
|
2577
|
-
const
|
|
2577
|
+
const M = r();
|
|
2578
2578
|
let l = c.key;
|
|
2579
2579
|
e.orientation === "horizontal" && a.value && getComputedStyle(a.value).direction === "rtl" && (l === "ArrowLeft" ? l = "ArrowRight" : l === "ArrowRight" && (l = "ArrowLeft"));
|
|
2580
|
-
const
|
|
2581
|
-
|
|
2580
|
+
const x = he(M.map(($, u) => ({ value: u, label: "" })), M.indexOf(p), l);
|
|
2581
|
+
x >= 0 && (c.preventDefault(), (w = M[x]) == null || w.focus());
|
|
2582
2582
|
}
|
|
2583
2583
|
}, (s = t.default) == null ? void 0 : s.call(t));
|
|
2584
2584
|
};
|
|
@@ -2595,27 +2595,27 @@ const Vt = {
|
|
|
2595
2595
|
},
|
|
2596
2596
|
emits: ["update:modelValue", "remove"],
|
|
2597
2597
|
setup(e, { slots: t, emit: a }) {
|
|
2598
|
-
const i = _e(), n = q(null), r = q(e.defaultValue), o =
|
|
2599
|
-
e.disabled || c.disabled || (r.value = o.value.filter((
|
|
2600
|
-
var
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2598
|
+
const i = _e(), n = q(null), r = q(e.defaultValue), o = J(() => i ? e.modelValue ?? [] : r.value), s = (c, p) => {
|
|
2599
|
+
e.disabled || c.disabled || (r.value = o.value.filter((d) => d.value !== c.value), a("update:modelValue", r.value), a("remove", c.value), re(() => {
|
|
2600
|
+
var M, l, x;
|
|
2601
|
+
const d = (M = n.value) == null ? void 0 : M.querySelectorAll("button:not(:disabled)");
|
|
2602
|
+
d != null && d.length ? (l = d[Math.min(p, d.length - 1)]) == null || l.focus() : (x = n.value) == null || x.focus();
|
|
2603
2603
|
}));
|
|
2604
2604
|
};
|
|
2605
|
-
return () =>
|
|
2606
|
-
var
|
|
2607
|
-
return
|
|
2605
|
+
return () => h("div", { ref: n, class: "dsh-tag-group", role: "group", "aria-label": e.label, tabindex: -1 }, o.value.map((c, p) => {
|
|
2606
|
+
var d;
|
|
2607
|
+
return h("span", {
|
|
2608
2608
|
class: ["arco-tag", "dsh-tag-group__tag"],
|
|
2609
2609
|
key: c.value,
|
|
2610
2610
|
"data-disabled": e.disabled || c.disabled || void 0
|
|
2611
2611
|
}, [
|
|
2612
|
-
((
|
|
2613
|
-
e.removable ?
|
|
2612
|
+
((d = t.item) == null ? void 0 : d.call(t, { item: c })) ?? h("span", {}, c.label),
|
|
2613
|
+
e.removable ? h("button", {
|
|
2614
2614
|
class: "dsh-tag-group__remove",
|
|
2615
2615
|
type: "button",
|
|
2616
2616
|
disabled: e.disabled || c.disabled,
|
|
2617
2617
|
"aria-label": e.removeLabel(c),
|
|
2618
|
-
onClick: () => s(c,
|
|
2618
|
+
onClick: () => s(c, p)
|
|
2619
2619
|
}, "×") : null
|
|
2620
2620
|
]);
|
|
2621
2621
|
}));
|
|
@@ -2630,7 +2630,7 @@ export {
|
|
|
2630
2630
|
dt as AutoComplete,
|
|
2631
2631
|
Ra as Autocomplete,
|
|
2632
2632
|
wn as Breadcrumbs,
|
|
2633
|
-
|
|
2633
|
+
xa as Button,
|
|
2634
2634
|
Ct as Calendar,
|
|
2635
2635
|
ft as Cascader,
|
|
2636
2636
|
Qt as Chip,
|
|
@@ -2688,7 +2688,7 @@ export {
|
|
|
2688
2688
|
Qt as Tag,
|
|
2689
2689
|
vn as TagGroup,
|
|
2690
2690
|
An as Text,
|
|
2691
|
-
|
|
2691
|
+
xn as TextArea,
|
|
2692
2692
|
La as TextField,
|
|
2693
2693
|
ra as TimePicker,
|
|
2694
2694
|
Ia as ToggleButton,
|
|
@@ -2698,8 +2698,8 @@ export {
|
|
|
2698
2698
|
Jt as Tree,
|
|
2699
2699
|
na as TreeSelect,
|
|
2700
2700
|
sa as Trigger,
|
|
2701
|
-
|
|
2702
|
-
|
|
2701
|
+
xe as WeekPicker,
|
|
2702
|
+
$e as YearPicker,
|
|
2703
2703
|
je as progressRatio,
|
|
2704
2704
|
ta as provideDshPopupScope,
|
|
2705
2705
|
en as useDialog,
|