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