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