@typeach/core 0.0.11 → 0.0.13
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/typeach.js +472 -330
- package/dist/typeach.umd.cjs +2 -2
- package/package.json +16 -17
package/dist/typeach.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createVNode as a, defineComponent as o, getCurrentInstance as s, getCurrentScope as c, inject as l, markRaw as u, mergeModels as d, mergeProps as f, nextTick as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createVNode as a, defineComponent as o, getCurrentInstance as s, getCurrentScope as c, inject as l, markRaw as u, mergeModels as d, mergeProps as f, nextTick as p, onBeforeMount as ee, onBeforeUnmount as te, onMounted as m, onScopeDispose as ne, openBlock as h, provide as g, ref as _, renderSlot as v, resolveDynamicComponent as y, shallowReadonly as re, shallowRef as ie, toRefs as ae, toValue as b, unref as x, useId as S, useModel as C, useTemplateRef as w, watch as T, watchEffect as oe, withCtx as E, withDirectives as se, withKeys as ce, withModifiers as le } from "vue";
|
|
2
2
|
import { defineStore as ue } from "pinia";
|
|
3
3
|
//#region src/utils/date/date-modifiers.ts
|
|
4
|
-
var
|
|
4
|
+
var D = (e, t) => {
|
|
5
5
|
let n = new Date(e);
|
|
6
6
|
return n.setDate(n.getDate() + t), n;
|
|
7
7
|
}, de = (e, t) => {
|
|
@@ -10,74 +10,74 @@ var E = (e, t) => {
|
|
|
10
10
|
}, fe = (e, t) => {
|
|
11
11
|
let n = new Date(e);
|
|
12
12
|
return n.setFullYear(n.getFullYear() + t), n;
|
|
13
|
-
},
|
|
13
|
+
}, O = (e) => D(e, 1), k = (e) => D(e, -1), pe = (e) => D(e, 7), me = (e) => D(e, -7), he = (e) => de(e, 1), ge = (e) => de(e, -1), _e = (e) => fe(e, 1), ve = (e) => fe(e, -1), A = (e, t) => {
|
|
14
14
|
let n = new Date(e), r = n.getDay(), i = r >= t ? r - t : 6 - r;
|
|
15
15
|
return n.setDate(n.getDate() - i), n;
|
|
16
|
-
},
|
|
16
|
+
}, ye = (e, t) => D(A(e, t), 6), j = (e) => {
|
|
17
17
|
let t = `${e.getFullYear()}`.padStart(4, "0"), n = `${e.getMonth() + 1}`.padStart(2, "0");
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
let t =
|
|
18
|
+
return N(/* @__PURE__ */ new Date(`${t}-${n}-01`));
|
|
19
|
+
}, M = (e) => {
|
|
20
|
+
let t = j(e);
|
|
21
21
|
return t.setMonth(t.getMonth() + 1), t.setDate(t.getDate() - 1), t;
|
|
22
|
-
},
|
|
22
|
+
}, be = (e) => new Date(e.getFullYear(), 0, 1), xe = (e) => new Date(e.getFullYear(), 11, 31), N = (e) => {
|
|
23
23
|
let t = new Date(e), n = t.getTimezoneOffset();
|
|
24
24
|
return t.setMinutes(t.getMinutes() + n), t;
|
|
25
|
-
},
|
|
25
|
+
}, Se = (e, t) => Intl.DateTimeFormat(t, {
|
|
26
26
|
weekday: "long",
|
|
27
27
|
day: "numeric",
|
|
28
28
|
month: "long",
|
|
29
29
|
year: "numeric"
|
|
30
|
-
}).format(e),
|
|
30
|
+
}).format(e), Ce = (e) => e.getDate(), we = (e, t) => Intl.DateTimeFormat(t, { weekday: "long" }).format(e), Te = (e) => {
|
|
31
31
|
let t = new Date(e);
|
|
32
32
|
t.setDate(t.getDate() + 4 - t.getDay());
|
|
33
|
-
let n =
|
|
33
|
+
let n = be(e);
|
|
34
34
|
return Math.floor(((t - +n) / 864e5 + 1) / 7);
|
|
35
|
-
},
|
|
36
|
-
name:
|
|
35
|
+
}, P = (e, t) => ({
|
|
36
|
+
name: Oe(e, t),
|
|
37
37
|
number: e.getMonth() + 1
|
|
38
|
-
}),
|
|
38
|
+
}), Ee = (e) => e.getFullYear(), De = (e, t) => Array.from({ length: 7 }).fill(void 0).map((t, n) => (e + n) % 7 + 1).map((e) => we(N(/* @__PURE__ */ new Date(`2006-01-0${e}`)), t)), Oe = (e, t) => Intl.DateTimeFormat(t, { month: "long" }).format(e), ke = (e) => Array.from({ length: 12 }).fill(void 0).map((t, n) => P(/* @__PURE__ */ new Date(`2006-${String(n + 1).padStart(2, "0")}-01`), e)), F = /* @__PURE__ */ function(e) {
|
|
39
39
|
return e[e.Monday = 1] = "Monday", e[e.Tuesday = 2] = "Tuesday", e[e.Wednesday = 3] = "Wednesday", e[e.Thursday = 4] = "Thursday", e[e.Friday = 5] = "Friday", e[e.Saturday = 6] = "Saturday", e[e.Sunday = 7] = "Sunday", e;
|
|
40
|
-
}({}),
|
|
41
|
-
let t = [], n =
|
|
42
|
-
for (; n.getMonth() === e.getMonth();) t.push(n), n =
|
|
40
|
+
}({}), Ae = (e) => {
|
|
41
|
+
let t = [], n = j(e);
|
|
42
|
+
for (; n.getMonth() === e.getMonth();) t.push(n), n = O(n);
|
|
43
43
|
return t;
|
|
44
|
-
},
|
|
45
|
-
let n =
|
|
44
|
+
}, I = (e, t) => {
|
|
45
|
+
let n = Ae(e), { daysBefore: r, daysAfter: i } = Me(e, t);
|
|
46
46
|
return [
|
|
47
47
|
...r,
|
|
48
48
|
...n,
|
|
49
49
|
...i
|
|
50
50
|
];
|
|
51
|
-
},
|
|
51
|
+
}, je = (e) => {
|
|
52
52
|
let t = [];
|
|
53
53
|
for (let n = 0; n < e.length; n += 7) t.push(e.slice(n, n + 7));
|
|
54
54
|
return t.map((e) => ({
|
|
55
55
|
days: e,
|
|
56
|
-
number:
|
|
56
|
+
number: Te(e[e.length - 1])
|
|
57
57
|
}));
|
|
58
|
-
},
|
|
59
|
-
let n =
|
|
60
|
-
for (; l > 0;) s.push(u), u =
|
|
58
|
+
}, Me = (e, t) => {
|
|
59
|
+
let n = j(e), r = n.getDay() === 0 ? 7 : n.getDay(), i = M(e), a = i.getDay() === 0 ? 7 : i.getDay(), o = t === F.Monday ? 7 : t - 1, s = [], c = [], l = (7 - t + r) % 7, u = k(n);
|
|
60
|
+
for (; l > 0;) s.push(u), u = k(u), --l;
|
|
61
61
|
s.reverse();
|
|
62
|
-
let d = (7 - a + o) % 7, f =
|
|
63
|
-
for (; d > 0;) c.push(f), f =
|
|
62
|
+
let d = (7 - a + o) % 7, f = O(i);
|
|
63
|
+
for (; d > 0;) c.push(f), f = O(f), --d;
|
|
64
64
|
return {
|
|
65
65
|
daysBefore: s,
|
|
66
66
|
daysAfter: c
|
|
67
67
|
};
|
|
68
|
-
},
|
|
68
|
+
}, L = (e) => ({
|
|
69
69
|
start: e.start < e.end ? e.start : e.end,
|
|
70
70
|
end: e.start < e.end ? e.end : e.start
|
|
71
|
-
}),
|
|
72
|
-
let { start: n, end: r } =
|
|
71
|
+
}), Ne = (e, t) => {
|
|
72
|
+
let { start: n, end: r } = L(t);
|
|
73
73
|
return e >= n && e <= r;
|
|
74
|
-
},
|
|
75
|
-
let { start: n, end: r } =
|
|
74
|
+
}, Pe = (e, t) => {
|
|
75
|
+
let { start: n, end: r } = L(t);
|
|
76
76
|
return n.setHours(0, 0, 0, 0), r.setHours(23, 59, 59, 999), e >= n && e <= r;
|
|
77
|
-
},
|
|
77
|
+
}, R = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), Fe = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth(), Ie = (e) => e == null, Le = (e) => e instanceof HTMLElement, z = (e) => {
|
|
78
78
|
let { disabled: t } = e.dataset;
|
|
79
|
-
return e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || !
|
|
80
|
-
}, Re = (e) => !
|
|
79
|
+
return e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || !Ie(t) && t !== "";
|
|
80
|
+
}, Re = (e) => !Ie(e) && e === document.activeElement, ze = (e) => Re(e) || e.getAttribute("tabindex") === "0", Be = (e) => [...e].sort((e, t) => e === t ? 0 : e.compareDocumentPosition(t) & 2 ? 1 : -1), Ve = (e) => e.match(/^[\P{Cc}\P{Cn}\P{Cs}]$/u) !== null, He = (e) => Ve(e) && e !== " ", Ue = (e, t) => e.length > 1 && e.split("").every((e) => e === t), We = (e, t) => e.trim().toLowerCase().startsWith(t.trim().toLowerCase()), Ge = (e, t = F.Monday) => ({ onKeyDown(n) {
|
|
81
81
|
switch ([
|
|
82
82
|
"ArrowLeft",
|
|
83
83
|
"ArrowRight",
|
|
@@ -89,10 +89,10 @@ var E = (e, t) => {
|
|
|
89
89
|
"End"
|
|
90
90
|
].includes(n.key) && n.preventDefault(), n.key) {
|
|
91
91
|
case "ArrowLeft":
|
|
92
|
-
e.value =
|
|
92
|
+
e.value = k(e.value);
|
|
93
93
|
break;
|
|
94
94
|
case "ArrowRight":
|
|
95
|
-
e.value =
|
|
95
|
+
e.value = O(e.value);
|
|
96
96
|
break;
|
|
97
97
|
case "ArrowUp":
|
|
98
98
|
e.value = me(e.value);
|
|
@@ -107,37 +107,41 @@ var E = (e, t) => {
|
|
|
107
107
|
e.value = n.shiftKey ? _e(e.value) : he(e.value);
|
|
108
108
|
break;
|
|
109
109
|
case "Home":
|
|
110
|
-
e.value = n.shiftKey ?
|
|
110
|
+
e.value = n.shiftKey ? j(e.value) : A(e.value, t);
|
|
111
111
|
break;
|
|
112
112
|
case "End":
|
|
113
|
-
e.value = n.shiftKey ?
|
|
113
|
+
e.value = n.shiftKey ? M(e.value) : ye(e.value, t);
|
|
114
114
|
break;
|
|
115
115
|
default: break;
|
|
116
116
|
}
|
|
117
|
-
} }),
|
|
118
|
-
let t = (t, n) => {
|
|
119
|
-
let { getElements:
|
|
120
|
-
|
|
117
|
+
} }), Ke = (e) => {
|
|
118
|
+
let t = (t, n, i = !1) => {
|
|
119
|
+
let { getElements: a, moveTo: o, isMovedTo: s } = e, c = a(), l = c.findIndex((e) => s(e)), u = n(l, c.length), d = c[u], f = t === "forwards" ? u++ : u--;
|
|
120
|
+
if (f < 0) return i ? "backwards" : r("start");
|
|
121
|
+
if (f > c.length - 1) return i ? "forwards" : r("end");
|
|
122
|
+
d = c[f], d && o(d, c[l]);
|
|
123
|
+
}, n = (e, n = !1) => t(e > 0 ? "forwards" : "backwards", (t) => t + e, n), r = (e) => {
|
|
124
|
+
t(e === "start" ? "forwards" : "backwards", (t, n) => e === "start" ? 0 : n - 1);
|
|
125
|
+
}, i = (e, t) => {
|
|
126
|
+
let r = e * t, a = n(r, !0);
|
|
127
|
+
a && e !== 0 && i(a === "forwards" ? e - 1 : e + 1, t);
|
|
121
128
|
};
|
|
122
129
|
return {
|
|
123
|
-
moveRelatively:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
moveToEdge: (e) => {
|
|
127
|
-
t(e === "start" ? "forwards" : "backwards", (t, n) => e === "start" ? 0 : n - 1);
|
|
128
|
-
}
|
|
130
|
+
moveRelatively: n,
|
|
131
|
+
moveToEdge: r,
|
|
132
|
+
moveByPages: i
|
|
129
133
|
};
|
|
130
|
-
},
|
|
134
|
+
}, qe = (e) => {
|
|
131
135
|
let t = (e, t) => {
|
|
132
136
|
t.filter((t) => !e?.isSameNode(t)).forEach((e) => e.setAttribute("tabindex", "-1")), e?.setAttribute("tabindex", "0");
|
|
133
137
|
}, n = (n) => {
|
|
134
138
|
t(n, e()), n.focus();
|
|
135
139
|
};
|
|
136
|
-
|
|
140
|
+
T(e, (e) => {
|
|
137
141
|
let [n] = e, r = e.find((e) => e.matches(":focus"));
|
|
138
|
-
!r && n &&
|
|
142
|
+
!r && n && z(n) && (n = e.find((e) => !z(e))), t(r || n, e);
|
|
139
143
|
});
|
|
140
|
-
let { moveRelatively: r, moveToEdge: i } =
|
|
144
|
+
let { moveRelatively: r, moveToEdge: i, moveByPages: a } = Ke({
|
|
141
145
|
getElements: e,
|
|
142
146
|
isMovedTo: ze,
|
|
143
147
|
moveTo: n
|
|
@@ -145,12 +149,16 @@ var E = (e, t) => {
|
|
|
145
149
|
return {
|
|
146
150
|
moveTo: n,
|
|
147
151
|
moveRelatively: r,
|
|
148
|
-
moveToEdge: i
|
|
152
|
+
moveToEdge: i,
|
|
153
|
+
moveByPages: a,
|
|
154
|
+
getCurrentTabStop() {
|
|
155
|
+
return e().find((e) => e.matches(":focus") || e.tabIndex === 0);
|
|
156
|
+
}
|
|
149
157
|
};
|
|
150
|
-
}, B = Symbol("grid"),
|
|
151
|
-
let { moveRelatively: t, moveToEdge: n, moveTo: r } =
|
|
152
|
-
return { onKeyDown(
|
|
153
|
-
let
|
|
158
|
+
}, B = Symbol("grid"), Je = (e) => {
|
|
159
|
+
let { moveRelatively: t, moveToEdge: n, moveTo: r, moveByPages: i } = qe(e);
|
|
160
|
+
return { onKeyDown(a, o) {
|
|
161
|
+
let s = [
|
|
154
162
|
"ArrowLeft",
|
|
155
163
|
"ArrowRight",
|
|
156
164
|
"ArrowUp",
|
|
@@ -160,37 +168,39 @@ var E = (e, t) => {
|
|
|
160
168
|
"Home",
|
|
161
169
|
"End"
|
|
162
170
|
];
|
|
163
|
-
if (!Le(
|
|
164
|
-
|
|
165
|
-
let
|
|
166
|
-
switch (
|
|
171
|
+
if (!Le(o.target)) return;
|
|
172
|
+
s.includes(o.key) && o.preventDefault();
|
|
173
|
+
let c = e().filter((e) => e.matches(`[data-elements-${a}="true"]`)), [l, u] = [c[0], c[c.length - 1]], d = o.target.closest(`[data-elements-${a}="true"]`);
|
|
174
|
+
switch (o.key) {
|
|
167
175
|
case "ArrowLeft":
|
|
168
|
-
|
|
176
|
+
l?.isSameNode(d) || t(-1);
|
|
169
177
|
break;
|
|
170
178
|
case "ArrowRight":
|
|
171
|
-
|
|
179
|
+
u?.isSameNode(d) || t(1);
|
|
172
180
|
break;
|
|
173
|
-
case "ArrowUp": return
|
|
174
|
-
case "ArrowDown": return
|
|
175
|
-
case "PageUp": return
|
|
176
|
-
case "PageDown": return
|
|
181
|
+
case "ArrowUp": return i(-1, c.length);
|
|
182
|
+
case "ArrowDown": return i(1, c.length);
|
|
183
|
+
case "PageUp": return i(-9, c.length);
|
|
184
|
+
case "PageDown": return i(9, c.length);
|
|
177
185
|
case "Home":
|
|
178
|
-
|
|
186
|
+
o.ctrlKey ? n("start") : l && r(l);
|
|
179
187
|
break;
|
|
180
188
|
case "End":
|
|
181
|
-
|
|
189
|
+
o.ctrlKey ? n("end") : u && r(u);
|
|
182
190
|
break;
|
|
183
191
|
default: break;
|
|
184
192
|
}
|
|
185
193
|
} };
|
|
186
|
-
},
|
|
187
|
-
let { moveTo: n, moveRelatively: r, moveToEdge: i } =
|
|
194
|
+
}, Ye = Symbol("roving-tabindex"), V = (e, t) => {
|
|
195
|
+
let { moveTo: n, moveRelatively: r, moveToEdge: i, moveByPages: a, getCurrentTabStop: o } = qe(t);
|
|
188
196
|
return {
|
|
189
197
|
moveTo: n,
|
|
190
198
|
moveRelatively: r,
|
|
191
199
|
moveToEdge: i,
|
|
200
|
+
moveByPages: a,
|
|
201
|
+
getCurrentTabStop: o,
|
|
192
202
|
onKeyDown(t) {
|
|
193
|
-
let n =
|
|
203
|
+
let n = b(e) === "vertical", a = n ? "ArrowUp" : "ArrowLeft", o = n ? "ArrowDown" : "ArrowRight";
|
|
194
204
|
switch ([
|
|
195
205
|
o,
|
|
196
206
|
a,
|
|
@@ -205,24 +215,60 @@ var E = (e, t) => {
|
|
|
205
215
|
case "PageDown": return r(10);
|
|
206
216
|
case "Home": return i("start");
|
|
207
217
|
case "End": return i("end");
|
|
208
|
-
default:
|
|
218
|
+
default: return;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}, Xe = Symbol("listbox"), Ze = (e, t, n, r) => {
|
|
223
|
+
let { moveTo: i, moveRelatively: a, moveToEdge: o, onKeyDown: s, getCurrentTabStop: c } = V(e, r), l = () => {
|
|
224
|
+
c()?.dispatchEvent(new KeyboardEvent("keydown", { key: " " }));
|
|
225
|
+
}, u = (e, t) => {
|
|
226
|
+
let i = r(), a = i.findIndex((t) => t.getAttribute("data-value") === e), o = i.findIndex((e) => e.getAttribute("data-value") === t);
|
|
227
|
+
if (a < 0 || o < 0 || a === o) return;
|
|
228
|
+
let s = (a < o ? i.slice(a, o) : i.slice(o, a)).filter((e) => !z(e) && !!e.getAttribute("data-value")).map((e) => e.getAttribute("data-value"));
|
|
229
|
+
i[a] && !z(i[a]) && s.unshift(e), i[o] && !z(i[o]) && s.push(t), n.value = [...new Set(n.value.concat(s))];
|
|
230
|
+
}, d = (e, t) => {
|
|
231
|
+
let n = r().at(t === "start" ? 0 : -1)?.getAttribute("data-value");
|
|
232
|
+
n && u(e, n);
|
|
233
|
+
};
|
|
234
|
+
return {
|
|
235
|
+
moveTo: i,
|
|
236
|
+
onSpace(e) {
|
|
237
|
+
n.value.includes(e) ? n.value = n.value.filter((t) => t !== e) : n.value = b(t) ? [...n.value, e] : [e];
|
|
238
|
+
},
|
|
239
|
+
onKeyDown(i, c) {
|
|
240
|
+
if (!b(t) || !c.shiftKey && !c.ctrlKey) return s(c);
|
|
241
|
+
let u = b(e) === "vertical";
|
|
242
|
+
if (c.ctrlKey && c.key === "a") return c.preventDefault(), n.value = r(!1).map((e) => e.getAttribute("data-value")).filter((e) => !!e);
|
|
243
|
+
if (c.shiftKey) switch (c.key) {
|
|
244
|
+
case u ? "ArrowUp" : "ArrowLeft":
|
|
245
|
+
c.preventDefault(), a(-1), l();
|
|
246
|
+
break;
|
|
247
|
+
case u ? "ArrowDown" : "ArrowRight":
|
|
248
|
+
c.preventDefault(), a(1), l();
|
|
249
|
+
break;
|
|
250
|
+
case "Home":
|
|
251
|
+
case "End":
|
|
252
|
+
c.ctrlKey && (c.preventDefault(), d(i, c.key === "Home" ? "start" : "end"), o(c.key === "Home" ? "start" : "end"));
|
|
253
|
+
break;
|
|
254
|
+
default: break;
|
|
209
255
|
}
|
|
210
256
|
}
|
|
211
257
|
};
|
|
212
258
|
};
|
|
213
259
|
//#endregion
|
|
214
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.
|
|
215
|
-
function
|
|
216
|
-
return c() ? (
|
|
260
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
261
|
+
function Qe(e, t) {
|
|
262
|
+
return c() ? (ne(e, t), !0) : !1;
|
|
217
263
|
}
|
|
218
264
|
var H = typeof window < "u" && typeof document < "u";
|
|
219
265
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
220
|
-
var
|
|
221
|
-
function
|
|
266
|
+
var $e = (e) => e != null, et = () => {};
|
|
267
|
+
function tt(e) {
|
|
222
268
|
return Array.isArray(e) ? e : [e];
|
|
223
269
|
}
|
|
224
|
-
function
|
|
225
|
-
let { immediate: r = !0, immediateCallback: i = !1 } = n, a =
|
|
270
|
+
function nt(e, t, n = {}) {
|
|
271
|
+
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = ie(!1), o;
|
|
226
272
|
function s() {
|
|
227
273
|
o &&= (clearTimeout(o), void 0);
|
|
228
274
|
}
|
|
@@ -232,51 +278,51 @@ function Qe(e, t, n = {}) {
|
|
|
232
278
|
function l(...n) {
|
|
233
279
|
i && e(), s(), a.value = !0, o = setTimeout(() => {
|
|
234
280
|
a.value = !1, o = void 0, e(...n);
|
|
235
|
-
},
|
|
281
|
+
}, b(t));
|
|
236
282
|
}
|
|
237
|
-
return r && (a.value = !0, H && l()),
|
|
238
|
-
isPending:
|
|
283
|
+
return r && (a.value = !0, H && l()), Qe(c), {
|
|
284
|
+
isPending: re(a),
|
|
239
285
|
start: l,
|
|
240
286
|
stop: c
|
|
241
287
|
};
|
|
242
288
|
}
|
|
243
|
-
function
|
|
244
|
-
let { controls: r = !1, callback: i } = n, a =
|
|
289
|
+
function rt(e = 1e3, n = {}) {
|
|
290
|
+
let { controls: r = !1, callback: i } = n, a = nt(i ?? et, e, n), o = t(() => !a.isPending.value);
|
|
245
291
|
return r ? {
|
|
246
292
|
ready: o,
|
|
247
293
|
...a
|
|
248
294
|
} : o;
|
|
249
295
|
}
|
|
250
296
|
function U(e, t, n) {
|
|
251
|
-
return
|
|
297
|
+
return T(e, t, {
|
|
252
298
|
...n,
|
|
253
299
|
immediate: !0
|
|
254
300
|
});
|
|
255
301
|
}
|
|
256
302
|
//#endregion
|
|
257
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.
|
|
258
|
-
var
|
|
303
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.40_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
304
|
+
var it = H ? window : void 0;
|
|
259
305
|
H && window.document, H && window.navigator, H && window.location;
|
|
260
|
-
function
|
|
261
|
-
let t =
|
|
306
|
+
function at(e) {
|
|
307
|
+
let t = b(e);
|
|
262
308
|
return t?.$el ?? t;
|
|
263
309
|
}
|
|
264
|
-
function
|
|
265
|
-
let e =
|
|
266
|
-
return t &&
|
|
310
|
+
function ot() {
|
|
311
|
+
let e = ie(!1), t = s();
|
|
312
|
+
return t && m(() => {
|
|
267
313
|
e.value = !0;
|
|
268
314
|
}, t), e;
|
|
269
315
|
}
|
|
270
316
|
/* @__NO_SIDE_EFFECTS__ */
|
|
271
|
-
function
|
|
272
|
-
let n =
|
|
317
|
+
function st(e) {
|
|
318
|
+
let n = ot();
|
|
273
319
|
return t(() => (n.value, !!e()));
|
|
274
320
|
}
|
|
275
|
-
function
|
|
276
|
-
let { window: i =
|
|
321
|
+
function ct(e, n, r = {}) {
|
|
322
|
+
let { window: i = it, ...a } = r, o, s = /* @__PURE__ */ st(() => i && "MutationObserver" in i), c = () => {
|
|
277
323
|
o &&= (o.disconnect(), void 0);
|
|
278
|
-
}, l =
|
|
279
|
-
let t =
|
|
324
|
+
}, l = T(t(() => {
|
|
325
|
+
let t = tt(b(e)).map(at).filter($e);
|
|
280
326
|
return new Set(t);
|
|
281
327
|
}), (e) => {
|
|
282
328
|
c(), s.value && e.size && (o = new MutationObserver(n), e.forEach((e) => o.observe(e, a)));
|
|
@@ -286,7 +332,7 @@ function it(e, n, r = {}) {
|
|
|
286
332
|
}), u = () => o?.takeRecords(), d = () => {
|
|
287
333
|
l(), c();
|
|
288
334
|
};
|
|
289
|
-
return
|
|
335
|
+
return Qe(d), {
|
|
290
336
|
isSupported: s,
|
|
291
337
|
stop: d,
|
|
292
338
|
takeRecords: u
|
|
@@ -294,35 +340,35 @@ function it(e, n, r = {}) {
|
|
|
294
340
|
}
|
|
295
341
|
//#endregion
|
|
296
342
|
//#region src/hooks/keyboard/useTypeahead.ts
|
|
297
|
-
var
|
|
298
|
-
let t =
|
|
343
|
+
var lt = (e) => {
|
|
344
|
+
let t = _(""), n = rt(500, {
|
|
299
345
|
controls: !0,
|
|
300
346
|
callback() {
|
|
301
347
|
t.value = "";
|
|
302
348
|
}
|
|
303
349
|
});
|
|
304
350
|
return { type(r) {
|
|
305
|
-
let { getElements: i, moveTo: a, isMovedTo: o } =
|
|
351
|
+
let { getElements: i, moveTo: a, isMovedTo: o } = b(e);
|
|
306
352
|
n.isPending.value && n.stop();
|
|
307
353
|
let s = r.toLowerCase();
|
|
308
354
|
t.value += s;
|
|
309
|
-
let c =
|
|
355
|
+
let c = Ue(t.value, s) ? s : t.value, l = i(), u = l.filter((e) => We(e.textContent, c)), d = l.find((e) => o(e)), f = u[u.findIndex((e) => d?.isSameNode(e)) + 1];
|
|
310
356
|
f && a(f, d), n.start();
|
|
311
357
|
} };
|
|
312
|
-
},
|
|
313
|
-
function
|
|
358
|
+
}, ut = /([\p{Ll}\d])(\p{Lu})/gu, dt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, ft = /(\d)\p{Ll}|(\p{L})\d/u, pt = /[^\p{L}\d]+/giu, mt = "$1\0$2", ht = "";
|
|
359
|
+
function gt(e) {
|
|
314
360
|
let t = e.trim();
|
|
315
|
-
t = t.replace(
|
|
361
|
+
t = t.replace(ut, mt).replace(dt, mt), t = t.replace(pt, "\0");
|
|
316
362
|
let n = 0, r = t.length;
|
|
317
363
|
for (; t.charAt(n) === "\0";) n++;
|
|
318
364
|
if (n === r) return [];
|
|
319
365
|
for (; t.charAt(r - 1) === "\0";) r--;
|
|
320
366
|
return t.slice(n, r).split(/\0/g);
|
|
321
367
|
}
|
|
322
|
-
function
|
|
323
|
-
let t =
|
|
368
|
+
function _t(e) {
|
|
369
|
+
let t = gt(e);
|
|
324
370
|
for (let e = 0; e < t.length; e++) {
|
|
325
|
-
let n = t[e], r =
|
|
371
|
+
let n = t[e], r = ft.exec(n);
|
|
326
372
|
if (r) {
|
|
327
373
|
let i = r.index + (r[1] ?? r[2]).length;
|
|
328
374
|
t.splice(e, 1, n.slice(0, i), n.slice(i));
|
|
@@ -330,21 +376,21 @@ function pt(e) {
|
|
|
330
376
|
}
|
|
331
377
|
return t;
|
|
332
378
|
}
|
|
333
|
-
function
|
|
334
|
-
let [n, r, i] =
|
|
335
|
-
return n + r.map(
|
|
379
|
+
function vt(e, t) {
|
|
380
|
+
let [n, r, i] = bt(e, t);
|
|
381
|
+
return n + r.map(yt(t?.locale)).join(t?.delimiter ?? " ") + i;
|
|
336
382
|
}
|
|
337
383
|
function W(e, t) {
|
|
338
|
-
return
|
|
384
|
+
return vt(e, {
|
|
339
385
|
delimiter: "-",
|
|
340
386
|
...t
|
|
341
387
|
});
|
|
342
388
|
}
|
|
343
|
-
function
|
|
389
|
+
function yt(e) {
|
|
344
390
|
return e === !1 ? (e) => e.toLowerCase() : (t) => t.toLocaleLowerCase(e);
|
|
345
391
|
}
|
|
346
|
-
function
|
|
347
|
-
let n = t.split ?? (t.separateNumbers ?
|
|
392
|
+
function bt(e, t = {}) {
|
|
393
|
+
let n = t.split ?? (t.separateNumbers ? _t : gt), r = t.prefixCharacters ?? ht, i = t.suffixCharacters ?? ht, a = 0, o = e.length;
|
|
348
394
|
for (; a < e.length;) {
|
|
349
395
|
let t = e.charAt(a);
|
|
350
396
|
if (!r.includes(t)) break;
|
|
@@ -363,7 +409,7 @@ function gt(e, t = {}) {
|
|
|
363
409
|
}
|
|
364
410
|
//#endregion
|
|
365
411
|
//#region src/hooks/useBemClass.ts
|
|
366
|
-
var
|
|
412
|
+
var xt = (e, t) => {
|
|
367
413
|
let n = t ? `${t}-${e}` : e;
|
|
368
414
|
return (...e) => {
|
|
369
415
|
let t = [n, ...e].filter((e) => typeof e == "string").map((e) => W(e)).join("__"), r = { [t]: !0 };
|
|
@@ -373,19 +419,19 @@ var _t = (e, t) => {
|
|
|
373
419
|
}
|
|
374
420
|
return r;
|
|
375
421
|
};
|
|
376
|
-
},
|
|
377
|
-
let i =
|
|
378
|
-
return
|
|
379
|
-
i.value =
|
|
380
|
-
}),
|
|
381
|
-
i.value =
|
|
422
|
+
}, St = (e) => (t) => xt(t, e), Ct = (e, n = F.Monday, r = "en") => {
|
|
423
|
+
let i = _(I(e.value, b(n))), a = t(() => Ee(e.value)), o = t(() => P(e.value, b(r))), s = t(() => je(i.value));
|
|
424
|
+
return T(t(() => `${a.value}${o.value.number}`), () => {
|
|
425
|
+
i.value = I(e.value, b(n));
|
|
426
|
+
}), T(() => b(n), (t) => {
|
|
427
|
+
i.value = I(e.value, t);
|
|
382
428
|
}), {
|
|
383
429
|
year: a,
|
|
384
430
|
month: o,
|
|
385
431
|
weeks: s
|
|
386
432
|
};
|
|
387
|
-
},
|
|
388
|
-
let n =
|
|
433
|
+
}, wt = (e, t) => (g(e, t), t), G = (e) => l(e, { missingContext: !0 }), K = (e) => l(e), Tt = (e) => {
|
|
434
|
+
let n = _([]), r = t(() => n.value.sort((e, t) => e === t ? 0 : e.compareDocumentPosition(t) & 2 ? 1 : -1)), i = () => document.querySelectorAll("h1, h2, h3, h4, h5, h6"), a = t(() => {
|
|
389
435
|
let e = [], t = [];
|
|
390
436
|
for (let n of r.value) {
|
|
391
437
|
let r = parseInt(n.tagName.substring(1), 10), i = {
|
|
@@ -394,7 +440,7 @@ var _t = (e, t) => {
|
|
|
394
440
|
level: r
|
|
395
441
|
};
|
|
396
442
|
for (; t.length >= r;) t.pop();
|
|
397
|
-
t.length === 0 ? e.push(i) : t[t.length - 1]?.children
|
|
443
|
+
t.length === 0 ? e.push(i) : t[t.length - 1]?.children?.push(i), t.push(i);
|
|
398
444
|
}
|
|
399
445
|
return e;
|
|
400
446
|
}), o = (t) => e ? t.map((t) => {
|
|
@@ -405,9 +451,9 @@ var _t = (e, t) => {
|
|
|
405
451
|
};
|
|
406
452
|
return t.children && (n.children = o(t.children)), n;
|
|
407
453
|
}) : t;
|
|
408
|
-
return
|
|
409
|
-
await
|
|
410
|
-
}),
|
|
454
|
+
return m(async () => {
|
|
455
|
+
await p(), n.value = Array.from(i());
|
|
456
|
+
}), ct(document.body, (e) => {
|
|
411
457
|
let t = Array.from(i());
|
|
412
458
|
t.some((t) => e.some((e) => [...e.addedNodes, ...e.removedNodes].includes(t))) && (n.value = t);
|
|
413
459
|
}, {
|
|
@@ -415,35 +461,35 @@ var _t = (e, t) => {
|
|
|
415
461
|
subtree: !0
|
|
416
462
|
}), { documentOutline: t(() => o(a.value)) };
|
|
417
463
|
}, q = (e, n) => {
|
|
418
|
-
let r =
|
|
464
|
+
let r = _(/* @__PURE__ */ new Map()), i = n ? {
|
|
419
465
|
items: r,
|
|
420
466
|
parent: n
|
|
421
467
|
} : l(`${e}-elements`, {
|
|
422
468
|
items: r,
|
|
423
|
-
parent:
|
|
469
|
+
parent: _()
|
|
424
470
|
});
|
|
425
|
-
return n &&
|
|
471
|
+
return n && g(`${e}-elements`, i), {
|
|
426
472
|
getElements: (t = !0) => {
|
|
427
473
|
let n = i.parent.value;
|
|
428
474
|
if (!n) return [];
|
|
429
|
-
let r = Array.from(n
|
|
430
|
-
return Array.from(i.items.value.values()).sort((e, t) => r.indexOf(e) - r.indexOf(t)).filter((e) => t || !
|
|
475
|
+
let r = Array.from(n.querySelectorAll(`[data-elements-${e}="true"]`));
|
|
476
|
+
return Be(Array.from(i.items.value.values()).sort((e, t) => r.indexOf(e) - r.indexOf(t)).filter((e) => t || !z(e)));
|
|
431
477
|
},
|
|
432
|
-
elements: t(() => Array.from(i.items.value.values()))
|
|
478
|
+
elements: t(() => Be(Array.from(i.items.value.values())))
|
|
433
479
|
};
|
|
434
480
|
}, J = (e, t, n) => {
|
|
435
481
|
let r = l(`${e}-elements`, void 0);
|
|
436
|
-
|
|
482
|
+
oe((e) => {
|
|
437
483
|
if (!t.value) return;
|
|
438
484
|
let i = u(t.value);
|
|
439
485
|
n?.value ? r?.items.value.delete(i) : r?.items.value.set(i, t.value), e(() => r?.items.value.delete(i));
|
|
440
|
-
}),
|
|
486
|
+
}), m(() => {
|
|
441
487
|
t.value?.setAttribute(`data-elements-${e}`, "true");
|
|
442
|
-
}),
|
|
488
|
+
}), te(() => {
|
|
443
489
|
t.value?.removeAttribute(`data-elements-${e}`);
|
|
444
490
|
});
|
|
445
|
-
},
|
|
446
|
-
let n =
|
|
491
|
+
}, Et = (e) => {
|
|
492
|
+
let n = _();
|
|
447
493
|
return t({
|
|
448
494
|
set(e) {
|
|
449
495
|
n.value = e;
|
|
@@ -452,12 +498,12 @@ var _t = (e, t) => {
|
|
|
452
498
|
return n.value ?? e;
|
|
453
499
|
}
|
|
454
500
|
});
|
|
455
|
-
},
|
|
501
|
+
}, Dt = (e, t) => {
|
|
456
502
|
U(t, (t) => {
|
|
457
503
|
e.value = t;
|
|
458
504
|
});
|
|
459
|
-
},
|
|
460
|
-
let e =
|
|
505
|
+
}, Ot = () => {
|
|
506
|
+
let e = _(/* @__PURE__ */ new Map());
|
|
461
507
|
return {
|
|
462
508
|
set(t, n) {
|
|
463
509
|
n ? e.value.set(t, n) : e.value.delete(t);
|
|
@@ -466,12 +512,12 @@ var _t = (e, t) => {
|
|
|
466
512
|
return e.value.get(t);
|
|
467
513
|
}
|
|
468
514
|
};
|
|
469
|
-
},
|
|
515
|
+
}, Y = (e, t, n) => {
|
|
470
516
|
U(n, (n) => {
|
|
471
517
|
e.set(t, n);
|
|
472
518
|
});
|
|
473
|
-
},
|
|
474
|
-
let e =
|
|
519
|
+
}, kt = ue("theme-settings", () => {
|
|
520
|
+
let e = _(1), t = _(!0), n = (e, t) => {
|
|
475
521
|
document.documentElement.style.setProperty(`--${e}`, t);
|
|
476
522
|
};
|
|
477
523
|
return U(e, (e) => {
|
|
@@ -482,27 +528,27 @@ var _t = (e, t) => {
|
|
|
482
528
|
saturation: e,
|
|
483
529
|
wrapCode: t
|
|
484
530
|
};
|
|
485
|
-
}),
|
|
531
|
+
}), X = Symbol("toolbar"), At = ["aria-orientation", "aria-controls"], jt = /* @__PURE__ */ o({
|
|
486
532
|
__name: "Toolbar",
|
|
487
533
|
props: {
|
|
488
534
|
orientation: { default: "horizontal" },
|
|
489
535
|
controls: {}
|
|
490
536
|
},
|
|
491
537
|
setup(e) {
|
|
492
|
-
let { orientation: t } =
|
|
493
|
-
return
|
|
538
|
+
let { orientation: t } = ae(e), n = w("element"), { getElements: r } = q("toolbar", n), { onKeyDown: a } = V(t, r);
|
|
539
|
+
return g(X, { onKeyDown: a }), (r, a) => (h(), i("div", {
|
|
494
540
|
ref_key: "element",
|
|
495
541
|
ref: n,
|
|
496
|
-
"aria-orientation":
|
|
542
|
+
"aria-orientation": x(t),
|
|
497
543
|
"aria-controls": e.controls,
|
|
498
544
|
role: "toolbar"
|
|
499
|
-
}, [
|
|
545
|
+
}, [v(r.$slots, "default")], 8, At));
|
|
500
546
|
}
|
|
501
|
-
}),
|
|
547
|
+
}), Mt = [
|
|
502
548
|
"aria-disabled",
|
|
503
549
|
"disabled",
|
|
504
550
|
"type"
|
|
505
|
-
],
|
|
551
|
+
], Z = /* @__PURE__ */ o({
|
|
506
552
|
__name: "Button",
|
|
507
553
|
props: {
|
|
508
554
|
type: { default: "button" },
|
|
@@ -513,87 +559,87 @@ var _t = (e, t) => {
|
|
|
513
559
|
},
|
|
514
560
|
emits: ["click"],
|
|
515
561
|
setup(e, { emit: t }) {
|
|
516
|
-
let n = e, r = t, a =
|
|
562
|
+
let n = e, r = t, a = w("element"), { onKeyDown: o } = G(X);
|
|
517
563
|
J("toolbar", a);
|
|
518
564
|
let s = (e) => {
|
|
519
565
|
n.disabled || r("click", e);
|
|
520
566
|
};
|
|
521
|
-
return (t, n) => (
|
|
567
|
+
return (t, n) => (h(), i("button", {
|
|
522
568
|
ref_key: "element",
|
|
523
569
|
ref: a,
|
|
524
|
-
"aria-disabled": e.disabled === !0
|
|
525
|
-
disabled: e.disabled === "without-focus"
|
|
570
|
+
"aria-disabled": e.disabled === !0 || void 0,
|
|
571
|
+
disabled: e.disabled === "without-focus" || void 0,
|
|
526
572
|
type: e.type,
|
|
527
573
|
onClick: s,
|
|
528
|
-
onKeydown: n[0] ||= (...e) =>
|
|
529
|
-
}, [
|
|
574
|
+
onKeydown: n[0] ||= (...e) => x(o) && x(o)(...e)
|
|
575
|
+
}, [v(t.$slots, "default")], 40, Mt));
|
|
530
576
|
}
|
|
531
|
-
}),
|
|
577
|
+
}), Nt = /* @__PURE__ */ o({
|
|
532
578
|
__name: "Table",
|
|
533
579
|
setup(e) {
|
|
534
|
-
return (e, t) => (
|
|
580
|
+
return (e, t) => (h(), i("table", null, [v(e.$slots, "default")]));
|
|
535
581
|
}
|
|
536
|
-
}),
|
|
582
|
+
}), Pt = /* @__PURE__ */ o({
|
|
537
583
|
__name: "TableBody",
|
|
538
584
|
setup(e) {
|
|
539
|
-
return (e, t) => (
|
|
585
|
+
return (e, t) => (h(), i("tbody", null, [v(e.$slots, "default")]));
|
|
540
586
|
}
|
|
541
|
-
}),
|
|
587
|
+
}), Ft = /* @__PURE__ */ o({
|
|
542
588
|
__name: "TableCell",
|
|
543
589
|
props: { heading: { type: Boolean } },
|
|
544
590
|
setup(e) {
|
|
545
|
-
return (t, r) => (
|
|
546
|
-
default:
|
|
591
|
+
return (t, r) => (h(), n(y(e.heading ? "th" : "td"), { scope: e.heading ? "row" : void 0 }, {
|
|
592
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
547
593
|
_: 3
|
|
548
594
|
}, 8, ["scope"]));
|
|
549
595
|
}
|
|
550
|
-
}),
|
|
596
|
+
}), It = /* @__PURE__ */ o({
|
|
551
597
|
__name: "TableHead",
|
|
552
598
|
setup(e) {
|
|
553
|
-
return (e, t) => (
|
|
599
|
+
return (e, t) => (h(), i("thead", null, [v(e.$slots, "default")]));
|
|
554
600
|
}
|
|
555
|
-
}),
|
|
601
|
+
}), Lt = ["aria-sort"], Rt = /* @__PURE__ */ o({
|
|
556
602
|
__name: "TableHeadingCell",
|
|
557
603
|
props: { sorted: {} },
|
|
558
604
|
setup(e) {
|
|
559
|
-
return (t, n) => (
|
|
605
|
+
return (t, n) => (h(), i("th", { "aria-sort": e.sorted }, [v(t.$slots, "default")], 8, Lt));
|
|
560
606
|
}
|
|
561
|
-
}),
|
|
607
|
+
}), zt = /* @__PURE__ */ o({
|
|
562
608
|
__name: "TableRow",
|
|
563
609
|
setup(e) {
|
|
564
|
-
return (e, t) => (
|
|
610
|
+
return (e, t) => (h(), i("tr", null, [v(e.$slots, "default")]));
|
|
565
611
|
}
|
|
566
|
-
}),
|
|
612
|
+
}), Bt = Symbol("calendar-table"), Vt = /* @__PURE__ */ o({
|
|
567
613
|
__name: "CalendarTable",
|
|
568
614
|
props: /*@__PURE__*/ d({ autoFocus: { type: Boolean } }, {
|
|
569
|
-
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
615
|
+
modelValue: { default: () => /* @__PURE__ */ new Date() },
|
|
570
616
|
modelModifiers: {}
|
|
571
617
|
}),
|
|
572
618
|
emits: ["update:modelValue"],
|
|
573
619
|
setup(e) {
|
|
574
|
-
let r = e, i =
|
|
575
|
-
return
|
|
620
|
+
let r = e, i = C(e, "modelValue"), a = ot();
|
|
621
|
+
return g(Bt, {
|
|
576
622
|
focusedDate: i,
|
|
577
|
-
allowFocus: t(() =>
|
|
578
|
-
}), (e, t) => (
|
|
579
|
-
default:
|
|
623
|
+
allowFocus: t(() => r.autoFocus || a.value)
|
|
624
|
+
}), (e, t) => (h(), n(x(Nt), { role: "grid" }, {
|
|
625
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
580
626
|
_: 3
|
|
581
627
|
}));
|
|
582
628
|
}
|
|
583
|
-
}),
|
|
629
|
+
}), Ht = /* @__PURE__ */ o({
|
|
584
630
|
__name: "CalendarTableCell",
|
|
585
631
|
setup(e) {
|
|
586
|
-
return (e, t) => (
|
|
587
|
-
default:
|
|
632
|
+
return (e, t) => (h(), n(Ft, { role: "gridcell" }, {
|
|
633
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
588
634
|
_: 3
|
|
589
635
|
}));
|
|
590
636
|
}
|
|
591
|
-
}),
|
|
637
|
+
}), Ut = [
|
|
592
638
|
"aria-pressed",
|
|
593
639
|
"aria-disabled",
|
|
594
640
|
"aria-current",
|
|
595
641
|
"tabindex"
|
|
596
|
-
],
|
|
642
|
+
], Wt = /* @__PURE__ */ o({
|
|
597
643
|
__name: "CalendarTableCellButton",
|
|
598
644
|
props: {
|
|
599
645
|
date: {},
|
|
@@ -602,27 +648,27 @@ var _t = (e, t) => {
|
|
|
602
648
|
},
|
|
603
649
|
emits: ["click"],
|
|
604
650
|
setup(e, { emit: n }) {
|
|
605
|
-
let r = e, a = n, o =
|
|
651
|
+
let r = e, a = n, o = w("element"), { focusedDate: s, allowFocus: c } = K(Bt), { onKeyDown: l } = Ge(s), u = t(() => R(r.date, s.value));
|
|
606
652
|
return U(u, async (e) => {
|
|
607
|
-
e && c.value && (await
|
|
608
|
-
}), (t, n) => (
|
|
653
|
+
e && c.value && (await p(), o.value?.focus());
|
|
654
|
+
}), (t, n) => (h(), i("button", {
|
|
609
655
|
ref_key: "element",
|
|
610
656
|
ref: o,
|
|
611
657
|
"aria-pressed": e.selected,
|
|
612
658
|
"aria-disabled": e.disabled,
|
|
613
|
-
"aria-current":
|
|
659
|
+
"aria-current": x(R)(e.date, /* @__PURE__ */ new Date()) ? "date" : void 0,
|
|
614
660
|
tabindex: u.value ? 0 : -1,
|
|
615
661
|
onFocus: n[0] ||= (t) => s.value = e.date,
|
|
616
|
-
onKeydown: n[1] ||= (...e) =>
|
|
662
|
+
onKeydown: n[1] ||= (...e) => x(l) && x(l)(...e),
|
|
617
663
|
onClick: n[2] ||= (e) => a("click", e)
|
|
618
|
-
}, [
|
|
664
|
+
}, [v(t.$slots, "default")], 40, Ut));
|
|
619
665
|
}
|
|
620
|
-
}),
|
|
666
|
+
}), Gt = "\n block-size: 1px;\n inline-size: 1px;\n\n position: absolute;\n overflow: hidden;\n\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n\n white-space: nowrap;\n", Kt = /* @__PURE__ */ o({
|
|
621
667
|
__name: "VisuallyHidden",
|
|
622
668
|
setup(e) {
|
|
623
|
-
return (e, t) => (
|
|
669
|
+
return (e, t) => (h(), i("div", { style: Gt }, [v(e.$slots, "default")]));
|
|
624
670
|
}
|
|
625
|
-
}),
|
|
671
|
+
}), qt = /* @__PURE__ */ o({
|
|
626
672
|
__name: "CopyButton",
|
|
627
673
|
props: {
|
|
628
674
|
content: {},
|
|
@@ -631,26 +677,23 @@ var _t = (e, t) => {
|
|
|
631
677
|
},
|
|
632
678
|
emits: ["copy"],
|
|
633
679
|
setup(o) {
|
|
634
|
-
let s =
|
|
680
|
+
let s = _(!1), c = o, l = t(() => c.content ? typeof c.content == "string" ? [new ClipboardItem({ "text/plain": c.content })] : Array.isArray(c.content) ? c.content : [c.content] : []), u = async (e) => {
|
|
635
681
|
c.content ? await navigator.clipboard.write(l.value) : await c.onCopy?.(e), s.value = !0, setTimeout(() => {
|
|
636
682
|
s.value = !1;
|
|
637
683
|
}, 4e3);
|
|
638
684
|
};
|
|
639
|
-
return (t, c) => (
|
|
685
|
+
return (t, c) => (h(), i(e, null, [o.preventAnnouncement ? r("", !0) : (h(), n(x(Kt), {
|
|
640
686
|
key: 0,
|
|
641
687
|
"aria-live": "polite"
|
|
642
688
|
}, {
|
|
643
|
-
default:
|
|
644
|
-
key: 0,
|
|
645
|
-
isCopying: s.value
|
|
646
|
-
}) : r("", !0)]),
|
|
689
|
+
default: E(() => [s.value ? v(t.$slots, "default", { isCopying: s.value }, void 0, void 0, 0) : r("", !0)]),
|
|
647
690
|
_: 3
|
|
648
|
-
})), a(
|
|
649
|
-
default:
|
|
691
|
+
})), a(x(Z), f(t.$attrs, { onClick: u }), {
|
|
692
|
+
default: E(() => [v(t.$slots, "default", { isCopying: s.value })]),
|
|
650
693
|
_: 3
|
|
651
694
|
}, 16)], 64));
|
|
652
695
|
}
|
|
653
|
-
}),
|
|
696
|
+
}), Jt = Symbol("disclosure"), Yt = { key: 0 }, Xt = /* @__PURE__ */ o({
|
|
654
697
|
__name: "Disclosure",
|
|
655
698
|
props: /*@__PURE__*/ d({
|
|
656
699
|
render: { type: Boolean },
|
|
@@ -665,11 +708,11 @@ var _t = (e, t) => {
|
|
|
665
708
|
}),
|
|
666
709
|
emits: ["update:modelValue"],
|
|
667
710
|
setup(e) {
|
|
668
|
-
let n =
|
|
669
|
-
return
|
|
670
|
-
panelId:
|
|
671
|
-
disabled: t(() =>
|
|
672
|
-
popover: t(() =>
|
|
711
|
+
let n = C(e, "modelValue"), r = e;
|
|
712
|
+
return g(Jt, {
|
|
713
|
+
panelId: Et(S()),
|
|
714
|
+
disabled: t(() => r.disabled),
|
|
715
|
+
popover: t(() => r.popover),
|
|
673
716
|
open: t({
|
|
674
717
|
get() {
|
|
675
718
|
return r.disabled ? !0 : n.value;
|
|
@@ -678,25 +721,25 @@ var _t = (e, t) => {
|
|
|
678
721
|
n.value = e;
|
|
679
722
|
}
|
|
680
723
|
})
|
|
681
|
-
}), (t, n) => e.render ? (
|
|
724
|
+
}), (t, n) => e.render ? (h(), i("div", Yt, [v(t.$slots, "default")])) : v(t.$slots, "default", {}, void 0, void 0, 1);
|
|
682
725
|
}
|
|
683
|
-
}),
|
|
726
|
+
}), Zt = /* @__PURE__ */ o({
|
|
684
727
|
__name: "DisclosureButton",
|
|
685
728
|
props: { disabled: { type: [Boolean, String] } },
|
|
686
729
|
setup(e) {
|
|
687
|
-
let { panelId: i, open: a, disabled: o, popover: s } = K(
|
|
730
|
+
let { panelId: i, open: a, disabled: o, popover: s } = K(Jt), c = t(() => s.value ? {
|
|
688
731
|
command: "toggle-popover",
|
|
689
732
|
commandfor: i.value
|
|
690
733
|
} : { onClick() {
|
|
691
734
|
a.value = !a.value;
|
|
692
735
|
} });
|
|
693
|
-
return (t, s) =>
|
|
736
|
+
return (t, s) => x(o) ? r("", !0) : (h(), n(x(Z), f({
|
|
694
737
|
key: 0,
|
|
695
|
-
"aria-expanded":
|
|
696
|
-
"aria-controls":
|
|
738
|
+
"aria-expanded": x(a),
|
|
739
|
+
"aria-controls": x(i),
|
|
697
740
|
disabled: e.disabled
|
|
698
741
|
}, c.value), {
|
|
699
|
-
default:
|
|
742
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
700
743
|
_: 3
|
|
701
744
|
}, 16, [
|
|
702
745
|
"aria-expanded",
|
|
@@ -704,27 +747,27 @@ var _t = (e, t) => {
|
|
|
704
747
|
"disabled"
|
|
705
748
|
]));
|
|
706
749
|
}
|
|
707
|
-
}),
|
|
750
|
+
}), Qt = _(0), $t = {
|
|
708
751
|
beforeMount(e, { value: t }) {
|
|
709
|
-
let n = `a-l-${
|
|
710
|
-
e.setAttribute("data-labelledby-id", n), t && (
|
|
752
|
+
let n = `a-l-${Qt.value++}`;
|
|
753
|
+
e.setAttribute("data-labelledby-id", n), t && (en(t, n), e.setAttribute("aria-labelledby", n));
|
|
711
754
|
},
|
|
712
755
|
updated(e, { value: t, oldValue: n }) {
|
|
713
756
|
if (t === n) return;
|
|
714
757
|
let r = e.getAttribute("data-labelledby-id");
|
|
715
758
|
if (r) {
|
|
716
759
|
let n = document.getElementById(r);
|
|
717
|
-
t ? n ? n.innerText = t : (
|
|
760
|
+
t ? n ? n.innerText = t : (en(t, r), e.setAttribute("aria-labelledby", r)) : (e.removeAttribute("aria-labelledby"), n?.remove());
|
|
718
761
|
}
|
|
719
762
|
},
|
|
720
763
|
beforeUnmount(e) {
|
|
721
764
|
let t = e.getAttribute("data-labelledby-id");
|
|
722
765
|
t && (e.removeAttribute("aria-labelledby"), document.getElementById(t)?.remove());
|
|
723
766
|
}
|
|
724
|
-
},
|
|
767
|
+
}, en = (e, t) => {
|
|
725
768
|
let n = document.createElement("span");
|
|
726
|
-
return n.innerText = e, n.id =
|
|
727
|
-
},
|
|
769
|
+
return n.innerText = e, n.id = t, n.hidden = !0, document.documentElement.appendChild(n), n;
|
|
770
|
+
}, tn = {
|
|
728
771
|
beforeMount(e, { value: t }, { transition: n }) {
|
|
729
772
|
n && t === !1 ? n.beforeEnter(e) : Q(e, t);
|
|
730
773
|
},
|
|
@@ -739,7 +782,7 @@ var _t = (e, t) => {
|
|
|
739
782
|
}
|
|
740
783
|
}, Q = (e, t) => {
|
|
741
784
|
t ? e.setAttribute("hidden", `${t}`) : e.removeAttribute("hidden");
|
|
742
|
-
},
|
|
785
|
+
}, nn = /* @__PURE__ */ o({
|
|
743
786
|
__name: "DisclosurePanel",
|
|
744
787
|
props: {
|
|
745
788
|
hideFromSearch: { type: Boolean },
|
|
@@ -747,145 +790,244 @@ var _t = (e, t) => {
|
|
|
747
790
|
id: { default: void 0 }
|
|
748
791
|
},
|
|
749
792
|
setup(e) {
|
|
750
|
-
let r = e, { panelId: i, disabled: a, popover: o, open: s } = K(
|
|
751
|
-
|
|
752
|
-
let c =
|
|
793
|
+
let r = e, { panelId: i, disabled: a, popover: o, open: s } = K(Jt);
|
|
794
|
+
Dt(i, () => r.id);
|
|
795
|
+
let c = w("element"), l = t(() => s.value ? void 0 : r.hideFromSearch ? !0 : "until-found"), u = (e) => {
|
|
753
796
|
e.newState === "open" ? s.value = !0 : s.value = !1;
|
|
754
797
|
};
|
|
755
|
-
return (t, r) =>
|
|
756
|
-
id:
|
|
798
|
+
return (t, r) => se((h(), n(y(e.as), {
|
|
799
|
+
id: x(i),
|
|
757
800
|
ref_key: "element",
|
|
758
801
|
ref: c,
|
|
759
|
-
popover:
|
|
802
|
+
popover: x(a) || !x(o) ? void 0 : "auto",
|
|
760
803
|
onBeforematch: r[0] ||= (e) => s.value = !0,
|
|
761
804
|
onToggle: u
|
|
762
805
|
}, {
|
|
763
|
-
default:
|
|
806
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
764
807
|
_: 3
|
|
765
|
-
}, 40, ["id", "popover"])), [[
|
|
808
|
+
}, 40, ["id", "popover"])), [[x(tn), l.value]]);
|
|
766
809
|
}
|
|
767
|
-
}),
|
|
810
|
+
}), rn = ["href", "download"], an = /* @__PURE__ */ o({
|
|
768
811
|
__name: "DownloadLink",
|
|
769
812
|
props: {
|
|
770
813
|
url: {},
|
|
771
814
|
filename: {}
|
|
772
815
|
},
|
|
773
816
|
setup(e) {
|
|
774
|
-
let t =
|
|
775
|
-
return J("toolbar", t), (r, a) => (
|
|
817
|
+
let t = w("element"), { onKeyDown: n } = G(X);
|
|
818
|
+
return J("toolbar", t), (r, a) => (h(), i("a", {
|
|
776
819
|
ref_key: "element",
|
|
777
820
|
ref: t,
|
|
778
821
|
href: e.url,
|
|
779
822
|
download: e.filename || !0,
|
|
780
|
-
onKeydown: a[0] ||= (...e) =>
|
|
781
|
-
}, [
|
|
823
|
+
onKeydown: a[0] ||= (...e) => x(n) && x(n)(...e)
|
|
824
|
+
}, [v(r.$slots, "default")], 40, rn));
|
|
782
825
|
}
|
|
783
|
-
}),
|
|
826
|
+
}), on = ["id"], sn = /* @__PURE__ */ o({
|
|
784
827
|
__name: "FieldDescription",
|
|
785
828
|
setup(e) {
|
|
786
|
-
let t =
|
|
787
|
-
return J("field-description", n), (e, r) => (
|
|
788
|
-
id:
|
|
829
|
+
let t = S(), n = w("element");
|
|
830
|
+
return J("field-description", n), (e, r) => (h(), i("div", {
|
|
831
|
+
id: x(t),
|
|
789
832
|
ref_key: "element",
|
|
790
833
|
ref: n
|
|
791
|
-
}, [
|
|
834
|
+
}, [v(e.$slots, "default")], 8, on));
|
|
792
835
|
}
|
|
793
|
-
}),
|
|
836
|
+
}), cn = ["id"], ln = /* @__PURE__ */ o({
|
|
794
837
|
__name: "FieldError",
|
|
795
838
|
setup(e) {
|
|
796
|
-
let t =
|
|
797
|
-
return J("field-error", n), (e, r) => (
|
|
798
|
-
id:
|
|
839
|
+
let t = S(), n = w("element");
|
|
840
|
+
return J("field-error", n), (e, r) => (h(), i("div", {
|
|
841
|
+
id: x(t),
|
|
799
842
|
ref_key: "element",
|
|
800
843
|
ref: n
|
|
801
|
-
}, [
|
|
844
|
+
}, [v(e.$slots, "default")], 8, cn));
|
|
802
845
|
}
|
|
803
|
-
}),
|
|
846
|
+
}), un = Symbol("field"), dn = (e, n) => {
|
|
804
847
|
let { elements: r } = q("field-error", n), { elements: i } = q("field-description", n), a = (e) => e.filter((e) => e.id).map((e) => e.id);
|
|
805
|
-
return
|
|
848
|
+
return wt(un, {
|
|
806
849
|
id: e,
|
|
807
850
|
hasErrors: t(() => r.value.length > 0),
|
|
808
851
|
errorIds: t(() => a(r.value)),
|
|
809
852
|
descriptionIds: t(() => a(i.value))
|
|
810
853
|
});
|
|
811
|
-
},
|
|
854
|
+
}, fn = () => K(un), pn = ["id", "for"], mn = /* @__PURE__ */ o({
|
|
812
855
|
__name: "FieldLabel",
|
|
813
856
|
setup(e) {
|
|
814
|
-
let { id: t } =
|
|
857
|
+
let { id: t } = fn(), n = () => {
|
|
815
858
|
document.getElementById(t)?.focus();
|
|
816
859
|
};
|
|
817
|
-
return (e, r) => (
|
|
818
|
-
id: `${
|
|
819
|
-
for:
|
|
860
|
+
return (e, r) => (h(), i("label", {
|
|
861
|
+
id: `${x(t)}-label`,
|
|
862
|
+
for: x(t),
|
|
820
863
|
onClick: n
|
|
821
|
-
}, [
|
|
864
|
+
}, [v(e.$slots, "default")], 8, pn));
|
|
822
865
|
}
|
|
823
|
-
}),
|
|
866
|
+
}), hn = /* @__PURE__ */ o({
|
|
824
867
|
__name: "GridTable",
|
|
825
868
|
setup(e) {
|
|
826
|
-
let r =
|
|
827
|
-
return
|
|
869
|
+
let r = w("element"), i = t(() => r.value?.$el), { getElements: a } = q("table", i), { onKeyDown: o } = Je(a);
|
|
870
|
+
return g(B, { onKeyDown: o }), (e, t) => (h(), n(Nt, {
|
|
828
871
|
ref_key: "element",
|
|
829
872
|
ref: i,
|
|
830
873
|
role: "grid"
|
|
831
874
|
}, {
|
|
832
|
-
default:
|
|
875
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
833
876
|
_: 3
|
|
834
877
|
}, 512));
|
|
835
878
|
}
|
|
836
|
-
}),
|
|
837
|
-
let n = t(() => e.value?.$el), r = K(
|
|
879
|
+
}), gn = (e) => {
|
|
880
|
+
let n = t(() => e.value?.$el), r = K(_n);
|
|
838
881
|
J("table", n), J(r, n);
|
|
839
882
|
let { onKeyDown: i } = K(B);
|
|
840
883
|
return {
|
|
841
884
|
onKeyDown: i,
|
|
842
885
|
rowId: r
|
|
843
886
|
};
|
|
844
|
-
},
|
|
887
|
+
}, _n = Symbol("row"), vn = /* @__PURE__ */ o({
|
|
845
888
|
__name: "GridTableCell",
|
|
846
889
|
props: { heading: { type: Boolean } },
|
|
847
890
|
setup(e) {
|
|
848
|
-
let { rowId: t, onKeyDown: r } =
|
|
849
|
-
return (i, a) => (
|
|
891
|
+
let { rowId: t, onKeyDown: r } = gn(w("element"));
|
|
892
|
+
return (i, a) => (h(), n(Ft, {
|
|
850
893
|
ref: "element",
|
|
851
894
|
heading: e.heading,
|
|
852
895
|
role: "gridcell",
|
|
853
|
-
onKeydown: a[0] ||= (e) =>
|
|
896
|
+
onKeydown: a[0] ||= (e) => x(r)(x(t), e)
|
|
854
897
|
}, {
|
|
855
|
-
default:
|
|
898
|
+
default: E(() => [v(i.$slots, "default")]),
|
|
856
899
|
_: 3
|
|
857
900
|
}, 8, ["heading"]));
|
|
858
901
|
}
|
|
859
|
-
}),
|
|
902
|
+
}), yn = /* @__PURE__ */ o({
|
|
860
903
|
__name: "GridTableHeadingCell",
|
|
861
904
|
props: { sorted: {} },
|
|
862
905
|
setup(e) {
|
|
863
|
-
let { rowId: t, onKeyDown: r } =
|
|
864
|
-
return (i, a) => (
|
|
906
|
+
let { rowId: t, onKeyDown: r } = gn(w("element"));
|
|
907
|
+
return (i, a) => (h(), n(Rt, {
|
|
865
908
|
ref: "element",
|
|
866
909
|
role: "gridcell",
|
|
867
910
|
sorted: e.sorted,
|
|
868
|
-
onKeydown: a[0] ||= (e) =>
|
|
911
|
+
onKeydown: a[0] ||= (e) => x(r)(x(t), e)
|
|
869
912
|
}, {
|
|
870
|
-
default:
|
|
913
|
+
default: E(() => [v(i.$slots, "default")]),
|
|
871
914
|
_: 3
|
|
872
915
|
}, 8, ["sorted"]));
|
|
873
916
|
}
|
|
874
|
-
}),
|
|
917
|
+
}), bn = /* @__PURE__ */ o({
|
|
875
918
|
__name: "GridTableRow",
|
|
876
919
|
setup(e) {
|
|
877
|
-
return
|
|
878
|
-
default:
|
|
920
|
+
return g(_n, S()), (e, t) => (h(), n(zt, null, {
|
|
921
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
879
922
|
_: 3
|
|
880
923
|
}));
|
|
881
924
|
}
|
|
882
|
-
}),
|
|
925
|
+
}), xn = /* @__PURE__ */ o({
|
|
926
|
+
__name: "ListboxField",
|
|
927
|
+
setup(e) {
|
|
928
|
+
let t = S(), n = w("element");
|
|
929
|
+
return dn(t, n), (e, t) => (h(), i("div", {
|
|
930
|
+
ref_key: "element",
|
|
931
|
+
ref: n
|
|
932
|
+
}, [v(e.$slots, "default")], 512));
|
|
933
|
+
}
|
|
934
|
+
}), Sn = Symbol("listbox-field"), Cn = Symbol("listbox-field-group"), wn = ["aria-labelledby"], Tn = /* @__PURE__ */ o({
|
|
935
|
+
__name: "ListboxFieldGroup",
|
|
936
|
+
setup(e) {
|
|
937
|
+
let t = S();
|
|
938
|
+
return g(Cn, t), (e, n) => (h(), i("div", {
|
|
939
|
+
role: "group",
|
|
940
|
+
"aria-labelledby": x(t)
|
|
941
|
+
}, [v(e.$slots, "default")], 8, wn));
|
|
942
|
+
}
|
|
943
|
+
}), En = ["id"], Dn = /* @__PURE__ */ o({
|
|
944
|
+
__name: "ListboxFieldGroupTitle",
|
|
945
|
+
setup(e) {
|
|
946
|
+
let t = K(Cn);
|
|
947
|
+
return (e, n) => (h(), i("div", { id: x(t) }, [v(e.$slots, "default")], 8, En));
|
|
948
|
+
}
|
|
949
|
+
}), On = [
|
|
950
|
+
"id",
|
|
951
|
+
"aria-labelledby",
|
|
952
|
+
"aria-describedby",
|
|
953
|
+
"aria-invalid",
|
|
954
|
+
"aria-multiselectable",
|
|
955
|
+
"aria-orientation"
|
|
956
|
+
], kn = /* @__PURE__ */ o({
|
|
957
|
+
__name: "ListboxFieldInput",
|
|
958
|
+
props: /*@__PURE__*/ d({
|
|
959
|
+
multiselect: { type: Boolean },
|
|
960
|
+
disabled: { type: Boolean },
|
|
961
|
+
orientation: { default: "vertical" }
|
|
962
|
+
}, {
|
|
963
|
+
modelValue: { default: () => [] },
|
|
964
|
+
modelModifiers: {}
|
|
965
|
+
}),
|
|
966
|
+
emits: ["update:modelValue"],
|
|
967
|
+
setup(e) {
|
|
968
|
+
let n = e, r = C(e, "modelValue"), { id: a, hasErrors: o, errorIds: s, descriptionIds: c } = fn(), l = w("element"), { getElements: u } = q("listbox", l), { onKeyDown: d, onSpace: f, moveTo: p } = Ze(() => n.orientation, () => n.multiselect, r, u);
|
|
969
|
+
return g(Sn, {
|
|
970
|
+
onKeyDown: d,
|
|
971
|
+
onSpace: f,
|
|
972
|
+
moveTo: p,
|
|
973
|
+
modelValue: r,
|
|
974
|
+
multiselect: t(() => n.multiselect)
|
|
975
|
+
}), (t, n) => (h(), i("div", {
|
|
976
|
+
id: x(a),
|
|
977
|
+
ref_key: "element",
|
|
978
|
+
ref: l,
|
|
979
|
+
"aria-labelledby": `${x(a)}-label`,
|
|
980
|
+
"aria-describedby": [x(s), x(c)].flat().join(" "),
|
|
981
|
+
"aria-invalid": x(o),
|
|
982
|
+
"aria-multiselectable": e.multiselect,
|
|
983
|
+
"aria-orientation": e.orientation,
|
|
984
|
+
role: "listbox"
|
|
985
|
+
}, [v(t.$slots, "default")], 8, On));
|
|
986
|
+
}
|
|
987
|
+
}), An = [
|
|
988
|
+
"aria-selected",
|
|
989
|
+
"aria-disabled",
|
|
990
|
+
"data-value"
|
|
991
|
+
], jn = /* @__PURE__ */ o({
|
|
992
|
+
__name: "ListboxFieldOption",
|
|
993
|
+
props: {
|
|
994
|
+
value: {},
|
|
995
|
+
disabled: {
|
|
996
|
+
type: Boolean,
|
|
997
|
+
default: !1
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
setup(e) {
|
|
1001
|
+
let t = e, n = w("element");
|
|
1002
|
+
J("listbox", n);
|
|
1003
|
+
let { onKeyDown: r, onSpace: a, moveTo: o, modelValue: s, multiselect: c } = K(Sn), l = () => {
|
|
1004
|
+
o(n.value), !t.disabled && (s.value.includes(t.value) ? s.value = s.value.filter((e) => e !== t.value) : s.value = c.value ? [...s.value, t.value] : [t.value]);
|
|
1005
|
+
}, u = () => {
|
|
1006
|
+
t.disabled || s.value.includes(t.value) || (s.value = c.value ? [...s.value, t.value] : [t.value]);
|
|
1007
|
+
};
|
|
1008
|
+
return (t, o) => (h(), i("div", {
|
|
1009
|
+
ref_key: "element",
|
|
1010
|
+
ref: n,
|
|
1011
|
+
"aria-selected": x(s).includes(e.value),
|
|
1012
|
+
"aria-disabled": e.disabled,
|
|
1013
|
+
"data-value": e.value,
|
|
1014
|
+
role: "option",
|
|
1015
|
+
tabindex: "-1",
|
|
1016
|
+
onClick: l,
|
|
1017
|
+
onKeydown: [
|
|
1018
|
+
ce(u, ["enter"]),
|
|
1019
|
+
o[0] ||= ce(le((t) => e.disabled ? void 0 : x(a)(e.value, t), ["prevent"]), ["space"]),
|
|
1020
|
+
o[1] ||= (t) => x(r)(e.value, t)
|
|
1021
|
+
]
|
|
1022
|
+
}, [v(t.$slots, "default")], 40, An));
|
|
1023
|
+
}
|
|
1024
|
+
}), Mn = ["aria-orientation"], Nn = /* @__PURE__ */ o({
|
|
883
1025
|
__name: "Separator",
|
|
884
1026
|
props: { orientation: { default: "horizontal" } },
|
|
885
1027
|
setup(e) {
|
|
886
|
-
return (t, n) => (
|
|
1028
|
+
return (t, n) => (h(), i("hr", { "aria-orientation": e.orientation }, null, 8, Mn));
|
|
887
1029
|
}
|
|
888
|
-
}),
|
|
1030
|
+
}), Pn = Symbol("Switch-field"), Fn = () => K(Pn), In = /* @__PURE__ */ o({
|
|
889
1031
|
__name: "SwitchField",
|
|
890
1032
|
props: {
|
|
891
1033
|
modelValue: {
|
|
@@ -896,36 +1038,36 @@ var _t = (e, t) => {
|
|
|
896
1038
|
},
|
|
897
1039
|
emits: ["update:modelValue"],
|
|
898
1040
|
setup(e) {
|
|
899
|
-
let t =
|
|
900
|
-
return
|
|
1041
|
+
let t = C(e, "modelValue"), n = S(), r = w("element");
|
|
1042
|
+
return dn(n, r), g(Pn, {
|
|
901
1043
|
id: n,
|
|
902
1044
|
modelValue: t
|
|
903
|
-
}), (e, t) => (
|
|
1045
|
+
}), (e, t) => (h(), i("div", {
|
|
904
1046
|
ref_key: "element",
|
|
905
1047
|
ref: r
|
|
906
|
-
}, [
|
|
1048
|
+
}, [v(e.$slots, "default")], 512));
|
|
907
1049
|
}
|
|
908
|
-
}),
|
|
1050
|
+
}), Ln = { "aria-hidden": "true" }, Rn = /* @__PURE__ */ o({
|
|
909
1051
|
__name: "SwitchFieldStateLabel",
|
|
910
1052
|
setup(e) {
|
|
911
|
-
return (e, t) => (
|
|
1053
|
+
return (e, t) => (h(), i("div", Ln, [v(e.$slots, "default")]));
|
|
912
1054
|
}
|
|
913
|
-
}),
|
|
1055
|
+
}), zn = /* @__PURE__ */ o({
|
|
914
1056
|
__name: "SwitchFieldSwitchButton",
|
|
915
1057
|
props: { disabled: { type: Boolean } },
|
|
916
1058
|
setup(e) {
|
|
917
|
-
let { modelValue: t } =
|
|
918
|
-
return (s, c) => (
|
|
919
|
-
id:
|
|
920
|
-
"aria-checked":
|
|
921
|
-
"aria-describedby": [
|
|
922
|
-
"aria-invalid":
|
|
923
|
-
"aria-labelledby": `${
|
|
1059
|
+
let { modelValue: t } = Fn(), { id: r, hasErrors: i, errorIds: a, descriptionIds: o } = fn();
|
|
1060
|
+
return (s, c) => (h(), n(x(Z), {
|
|
1061
|
+
id: x(r),
|
|
1062
|
+
"aria-checked": x(t),
|
|
1063
|
+
"aria-describedby": [x(a), x(o)].flat().join(" ") || void 0,
|
|
1064
|
+
"aria-invalid": x(i) ? !0 : void 0,
|
|
1065
|
+
"aria-labelledby": `${x(r)}-label`,
|
|
924
1066
|
disabled: e.disabled,
|
|
925
1067
|
role: "switch",
|
|
926
|
-
onClick: c[0] ||= (e) => t.value = !
|
|
1068
|
+
onClick: c[0] ||= (e) => t.value = !x(t)
|
|
927
1069
|
}, {
|
|
928
|
-
default:
|
|
1070
|
+
default: E(() => [v(s.$slots, "default")]),
|
|
929
1071
|
_: 3
|
|
930
1072
|
}, 8, [
|
|
931
1073
|
"id",
|
|
@@ -936,7 +1078,7 @@ var _t = (e, t) => {
|
|
|
936
1078
|
"disabled"
|
|
937
1079
|
]));
|
|
938
1080
|
}
|
|
939
|
-
}), $ = Symbol("tabs"),
|
|
1081
|
+
}), $ = Symbol("tabs"), Bn = Symbol("tabs-list"), Vn = /* @__PURE__ */ o({
|
|
940
1082
|
__name: "Tabs",
|
|
941
1083
|
props: /*@__PURE__*/ d({ as: {} }, {
|
|
942
1084
|
modelValue: {},
|
|
@@ -944,97 +1086,97 @@ var _t = (e, t) => {
|
|
|
944
1086
|
}),
|
|
945
1087
|
emits: ["update:modelValue"],
|
|
946
1088
|
setup(e) {
|
|
947
|
-
let t =
|
|
948
|
-
return
|
|
949
|
-
ids:
|
|
1089
|
+
let t = C(e, "modelValue");
|
|
1090
|
+
return g($, {
|
|
1091
|
+
ids: Ot(),
|
|
950
1092
|
selectedPanel: t
|
|
951
|
-
}), (t, r) => e.as ? (
|
|
952
|
-
default:
|
|
1093
|
+
}), (t, r) => e.as ? (h(), n(y(e.as), { key: 0 }, {
|
|
1094
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
953
1095
|
_: 3
|
|
954
|
-
})) :
|
|
1096
|
+
})) : v(t.$slots, "default", {}, void 0, void 0, 1);
|
|
955
1097
|
}
|
|
956
|
-
}),
|
|
1098
|
+
}), Hn = ["tabindex"], Un = /* @__PURE__ */ o({
|
|
957
1099
|
__name: "TabsActionButton",
|
|
958
1100
|
props: { value: {} },
|
|
959
1101
|
emits: ["click"],
|
|
960
1102
|
setup(e, { emit: t }) {
|
|
961
1103
|
let n = t, { selectedPanel: r } = K($);
|
|
962
|
-
return (t, a) => (
|
|
1104
|
+
return (t, a) => (h(), i("button", {
|
|
963
1105
|
ref: "button",
|
|
964
|
-
tabindex:
|
|
1106
|
+
tabindex: x(r) === e.value ? 0 : -1,
|
|
965
1107
|
type: "button",
|
|
966
1108
|
onClick: a[0] ||= (e) => n("click", e)
|
|
967
|
-
}, [
|
|
1109
|
+
}, [v(t.$slots, "default")], 8, Hn));
|
|
968
1110
|
}
|
|
969
|
-
}),
|
|
1111
|
+
}), Wn = [
|
|
970
1112
|
"id",
|
|
971
1113
|
"aria-selected",
|
|
972
1114
|
"aria-controls"
|
|
973
|
-
],
|
|
1115
|
+
], Gn = /* @__PURE__ */ o({
|
|
974
1116
|
__name: "TabsButton",
|
|
975
1117
|
props: {
|
|
976
1118
|
value: {},
|
|
977
|
-
id: { default: (e) => `${
|
|
1119
|
+
id: { default: (e) => `${S()}-${e.value}-button` }
|
|
978
1120
|
},
|
|
979
1121
|
emits: ["delete"],
|
|
980
1122
|
setup(e, { emit: t }) {
|
|
981
|
-
let n = e, r =
|
|
1123
|
+
let n = e, r = w("element");
|
|
982
1124
|
J("tabs-list", r);
|
|
983
1125
|
let a = t, { selectedPanel: o, ids: s } = K($);
|
|
984
|
-
|
|
985
|
-
let { onKeyDown: c, selectionFollowsFocus: l } = K(
|
|
986
|
-
return
|
|
1126
|
+
Y(s, `${n.value}-button`, () => n.id);
|
|
1127
|
+
let { onKeyDown: c, selectionFollowsFocus: l } = K(Bn);
|
|
1128
|
+
return ee(() => {
|
|
987
1129
|
o.value ||= n.value;
|
|
988
|
-
}), (t, u) => (
|
|
1130
|
+
}), (t, u) => (h(), i("button", {
|
|
989
1131
|
id: e.id,
|
|
990
1132
|
ref_key: "element",
|
|
991
1133
|
ref: r,
|
|
992
|
-
"aria-selected":
|
|
993
|
-
"aria-controls":
|
|
1134
|
+
"aria-selected": x(o) === e.value,
|
|
1135
|
+
"aria-controls": x(s).get(`${n.value}-panel`),
|
|
994
1136
|
type: "button",
|
|
995
1137
|
role: "tab",
|
|
996
1138
|
onClick: u[0] ||= (t) => o.value = e.value,
|
|
997
|
-
onFocus: u[1] ||= (t) =>
|
|
998
|
-
onKeydown: [u[2] ||=
|
|
999
|
-
}, [
|
|
1139
|
+
onFocus: u[1] ||= (t) => x(l) ? o.value = e.value : void 0,
|
|
1140
|
+
onKeydown: [u[2] ||= ce((e) => a("delete"), ["delete"]), u[3] ||= (...e) => x(c) && x(c)(...e)]
|
|
1141
|
+
}, [v(t.$slots, "default")], 40, Wn));
|
|
1000
1142
|
}
|
|
1001
|
-
}),
|
|
1143
|
+
}), Kn = ["aria-orientation"], qn = /* @__PURE__ */ o({
|
|
1002
1144
|
__name: "TabsList",
|
|
1003
1145
|
props: {
|
|
1004
1146
|
orientation: { default: "horizontal" },
|
|
1005
1147
|
selectionFollowsFocus: { type: Boolean }
|
|
1006
1148
|
},
|
|
1007
1149
|
setup(e) {
|
|
1008
|
-
let n = e, { orientation: r } =
|
|
1009
|
-
return
|
|
1010
|
-
selectionFollowsFocus: t(() =>
|
|
1150
|
+
let n = e, { orientation: r } = ae(n), a = w("element"), { getElements: o } = q("tabs-list", a), { onKeyDown: s } = V(r, o);
|
|
1151
|
+
return g(Bn, {
|
|
1152
|
+
selectionFollowsFocus: t(() => n.selectionFollowsFocus),
|
|
1011
1153
|
onKeyDown: s
|
|
1012
|
-
}), (e, t) => (
|
|
1154
|
+
}), (e, t) => (h(), i("div", {
|
|
1013
1155
|
ref_key: "element",
|
|
1014
1156
|
ref: a,
|
|
1015
|
-
"aria-orientation":
|
|
1157
|
+
"aria-orientation": x(r),
|
|
1016
1158
|
role: "tablist"
|
|
1017
|
-
}, [
|
|
1159
|
+
}, [v(e.$slots, "default")], 8, Kn));
|
|
1018
1160
|
}
|
|
1019
|
-
}),
|
|
1161
|
+
}), Jn = ["id", "aria-labelledby"], Yn = /* @__PURE__ */ o({
|
|
1020
1162
|
__name: "TabsPanel",
|
|
1021
1163
|
props: {
|
|
1022
1164
|
value: {},
|
|
1023
|
-
id: { default: (e) => `${
|
|
1165
|
+
id: { default: (e) => `${S()}-${e.value}-panel` }
|
|
1024
1166
|
},
|
|
1025
1167
|
setup(e) {
|
|
1026
1168
|
let n = e, { selectedPanel: a, ids: o } = K($);
|
|
1027
|
-
|
|
1169
|
+
Y(o, `${n.value}-panel`, () => n.id);
|
|
1028
1170
|
let s = t(() => a.value === n.value);
|
|
1029
|
-
return (t, a) => s.value ? (
|
|
1171
|
+
return (t, a) => s.value ? (h(), i("div", {
|
|
1030
1172
|
key: 0,
|
|
1031
1173
|
id: e.id,
|
|
1032
1174
|
ref: "button",
|
|
1033
|
-
"aria-labelledby":
|
|
1175
|
+
"aria-labelledby": x(o).get(`${n.value}-button`),
|
|
1034
1176
|
tabindex: "-1",
|
|
1035
1177
|
role: "tabpanel"
|
|
1036
|
-
}, [
|
|
1178
|
+
}, [v(t.$slots, "default")], 8, Jn)) : r("", !0);
|
|
1037
1179
|
}
|
|
1038
1180
|
});
|
|
1039
1181
|
//#endregion
|
|
1040
|
-
export { B as GridKey,
|
|
1182
|
+
export { B as GridKey, Xe as ListboxKey, Z as PeachyButton, Vt as PeachyCalendarTable, Ht as PeachyCalendarTableCell, Wt as PeachyCalendarTableCellButton, qt as PeachyCopyButton, Xt as PeachyDisclosure, Zt as PeachyDisclosureButton, nn as PeachyDisclosurePanel, an as PeachyDownloadLink, sn as PeachyFieldDescription, ln as PeachyFieldError, mn as PeachyFieldLabel, hn as PeachyGridTable, vn as PeachyGridTableCell, yn as PeachyGridTableHeadingCell, bn as PeachyGridTableRow, xn as PeachyListboxField, Tn as PeachyListboxGroup, Dn as PeachyListboxGroupTitle, kn as PeachyListboxInput, jn as PeachyListboxOption, Nn as PeachySeparator, zn as PeachySwitchButton, In as PeachySwitchField, Rn as PeachySwitchStateLabel, Nt as PeachyTable, Pt as PeachyTableBody, Ft as PeachyTableCell, It as PeachyTableHead, Rt as PeachyTableHeadingCell, zt as PeachyTableRow, Vn as PeachyTabs, Un as PeachyTabsActionButton, Gn as PeachyTabsButton, qn as PeachyTabsList, Yn as PeachyTabsPanel, jt as PeachyToolbar, Kt as PeachyVisuallyHidden, Ye as RovingTabindexKey, X as ToolbarKey, F as Weekday, Se as formatDate, Ce as getDate, I as getDaysOfCalendarMonth, Ae as getDaysOfMonth, j as getFirstDayOfMonth, A as getFirstDayOfWeek, be as getFirstDayOfYear, M as getLastDayOfMonth, ye as getLastDayOfTheWeek, xe as getLastDayOfYear, P as getMonth, ke as getMonths, Oe as getNameOfMonth, O as getNextDay, he as getNextMonth, pe as getNextWeek, _e as getNextYear, k as getPreviousDay, ge as getPreviousMonth, me as getPreviousWeek, ve as getPreviousYear, Te as getWeekNumber, De as getWeekdays, Ee as getYear, Pe as isDateInRange, Ne as isDateTimeInRange, z as isDisabledElement, Re as isFocusedHtmlElement, ze as isFocusedRovingTabindexElement, Le as isHtmlElement, Ie as isNullish, Ve as isPrintableCharacter, Ue as isRepeatingCharacter, R as isSameDate, Fe as isSameMonth, He as isTypeaheadCharacter, J as provideElement, N as removeTimezoneOffset, Ot as shareDynamicIds, Et as shareId, Be as sortElementsByAppearance, L as sortRange, je as splitDaysIntoWeeks, We as startsWith, xt as useBemClass, Ct as useCalendar, Ge as useCalendarGrid, K as useContext, wt as useContextProvider, Tt as useDocumentOutline, q as useElements, St as useGlobalBemClass, Je as useGrid, Ze as useListbox, Ke as useNavigableElements, G as useOptionalContext, V as useRovingTabindex, Y as useSharedDynamicIds, Dt as useSharedId, qe as useSingleTabStop, kt as useThemeSettingsStore, lt as useTypeahead, $t as vAriaLabelledby, tn as vHidden };
|