@typeach/core 0.0.10 → 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 +499 -298
- package/dist/typeach.umd.cjs +2 -2
- package/package.json +16 -17
package/dist/typeach.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
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
|
|
2
|
-
import { defineStore 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
|
+
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) => {
|
|
8
8
|
let n = new Date(e);
|
|
9
9
|
return n.setMonth(n.getMonth() + t), n;
|
|
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
|
-
}, ze = (e) => !
|
|
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,34 +89,34 @@ var T = (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
|
-
e.value =
|
|
98
|
+
e.value = me(e.value);
|
|
99
99
|
break;
|
|
100
100
|
case "ArrowDown":
|
|
101
|
-
e.value =
|
|
101
|
+
e.value = pe(e.value);
|
|
102
102
|
break;
|
|
103
103
|
case "PageUp":
|
|
104
|
-
e.value = n.shiftKey ?
|
|
104
|
+
e.value = n.shiftKey ? ve(e.value) : ge(e.value);
|
|
105
105
|
break;
|
|
106
106
|
case "PageDown":
|
|
107
|
-
e.value = n.shiftKey ?
|
|
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,17 +127,17 @@ var T = (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
|
-
!r && n &&
|
|
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
142
|
isMovedTo: Be,
|
|
143
143
|
moveTo: n
|
|
@@ -145,10 +145,13 @@ var T = (e, t) => {
|
|
|
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
|
-
}, z = Symbol("grid"),
|
|
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",
|
|
@@ -165,15 +168,15 @@ var T = (e, t) => {
|
|
|
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 T = (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,21 +209,60 @@ var T = (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
258
|
var V = typeof window < "u" && typeof document < "u";
|
|
219
259
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
220
|
-
var
|
|
221
|
-
function
|
|
222
|
-
|
|
260
|
+
var et = (e) => e != null, tt = () => {};
|
|
261
|
+
function nt(e) {
|
|
262
|
+
return Array.isArray(e) ? e : [e];
|
|
263
|
+
}
|
|
264
|
+
function rt(e, t, n = {}) {
|
|
265
|
+
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = ie(!1), o;
|
|
223
266
|
function s() {
|
|
224
267
|
o &&= (clearTimeout(o), void 0);
|
|
225
268
|
}
|
|
@@ -229,65 +272,97 @@ function Ze(e, t, n = {}) {
|
|
|
229
272
|
function l(...n) {
|
|
230
273
|
i && e(), s(), a.value = !0, o = setTimeout(() => {
|
|
231
274
|
a.value = !1, o = void 0, e(...n);
|
|
232
|
-
},
|
|
275
|
+
}, b(t));
|
|
233
276
|
}
|
|
234
|
-
return r && (a.value = !0, V && l()),
|
|
235
|
-
isPending:
|
|
277
|
+
return r && (a.value = !0, V && l()), $e(c), {
|
|
278
|
+
isPending: re(a),
|
|
236
279
|
start: l,
|
|
237
280
|
stop: c
|
|
238
281
|
};
|
|
239
282
|
}
|
|
240
|
-
function
|
|
241
|
-
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);
|
|
242
285
|
return r ? {
|
|
243
286
|
ready: o,
|
|
244
287
|
...a
|
|
245
288
|
} : o;
|
|
246
289
|
}
|
|
247
290
|
function H(e, t, n) {
|
|
248
|
-
return
|
|
291
|
+
return T(e, t, {
|
|
249
292
|
...n,
|
|
250
293
|
immediate: !0
|
|
251
294
|
});
|
|
252
295
|
}
|
|
296
|
+
//#endregion
|
|
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;
|
|
253
299
|
V && window.document, V && window.navigator, V && window.location;
|
|
254
|
-
function
|
|
255
|
-
let
|
|
256
|
-
return t
|
|
300
|
+
function ot(e) {
|
|
301
|
+
let t = b(e);
|
|
302
|
+
return t?.$el ?? t;
|
|
303
|
+
}
|
|
304
|
+
function st() {
|
|
305
|
+
let e = ie(!1), t = s();
|
|
306
|
+
return t && m(() => {
|
|
257
307
|
e.value = !0;
|
|
258
308
|
}, t), e;
|
|
259
309
|
}
|
|
310
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
311
|
+
function ct(e) {
|
|
312
|
+
let n = st();
|
|
313
|
+
return t(() => (n.value, !!e()));
|
|
314
|
+
}
|
|
315
|
+
function lt(e, n, r = {}) {
|
|
316
|
+
let { window: i = at, ...a } = r, o, s = /* @__PURE__ */ ct(() => i && "MutationObserver" in i), c = () => {
|
|
317
|
+
o &&= (o.disconnect(), void 0);
|
|
318
|
+
}, l = T(t(() => {
|
|
319
|
+
let t = nt(b(e)).map(ot).filter(et);
|
|
320
|
+
return new Set(t);
|
|
321
|
+
}), (e) => {
|
|
322
|
+
c(), s.value && e.size && (o = new MutationObserver(n), e.forEach((e) => o.observe(e, a)));
|
|
323
|
+
}, {
|
|
324
|
+
immediate: !0,
|
|
325
|
+
flush: "post"
|
|
326
|
+
}), u = () => o?.takeRecords(), d = () => {
|
|
327
|
+
l(), c();
|
|
328
|
+
};
|
|
329
|
+
return $e(d), {
|
|
330
|
+
isSupported: s,
|
|
331
|
+
stop: d,
|
|
332
|
+
takeRecords: u
|
|
333
|
+
};
|
|
334
|
+
}
|
|
260
335
|
//#endregion
|
|
261
336
|
//#region src/hooks/keyboard/useTypeahead.ts
|
|
262
|
-
var
|
|
263
|
-
let t =
|
|
337
|
+
var ut = (e) => {
|
|
338
|
+
let t = _(""), n = it(500, {
|
|
264
339
|
controls: !0,
|
|
265
340
|
callback() {
|
|
266
341
|
t.value = "";
|
|
267
342
|
}
|
|
268
343
|
});
|
|
269
344
|
return { type(r) {
|
|
270
|
-
let { getElements: i, moveTo: a, isMovedTo: o } =
|
|
345
|
+
let { getElements: i, moveTo: a, isMovedTo: o } = b(e);
|
|
271
346
|
n.isPending.value && n.stop();
|
|
272
347
|
let s = r.toLowerCase();
|
|
273
348
|
t.value += s;
|
|
274
|
-
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];
|
|
275
350
|
f && a(f, d), n.start();
|
|
276
351
|
} };
|
|
277
|
-
},
|
|
278
|
-
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) {
|
|
279
354
|
let t = e.trim();
|
|
280
|
-
t = t.replace(
|
|
355
|
+
t = t.replace(dt, ht).replace(ft, ht), t = t.replace(mt, "\0");
|
|
281
356
|
let n = 0, r = t.length;
|
|
282
357
|
for (; t.charAt(n) === "\0";) n++;
|
|
283
358
|
if (n === r) return [];
|
|
284
359
|
for (; t.charAt(r - 1) === "\0";) r--;
|
|
285
360
|
return t.slice(n, r).split(/\0/g);
|
|
286
361
|
}
|
|
287
|
-
function
|
|
288
|
-
let t =
|
|
362
|
+
function vt(e) {
|
|
363
|
+
let t = _t(e);
|
|
289
364
|
for (let e = 0; e < t.length; e++) {
|
|
290
|
-
let n = t[e], r =
|
|
365
|
+
let n = t[e], r = pt.exec(n);
|
|
291
366
|
if (r) {
|
|
292
367
|
let i = r.index + (r[1] ?? r[2]).length;
|
|
293
368
|
t.splice(e, 1, n.slice(0, i), n.slice(i));
|
|
@@ -295,21 +370,21 @@ function ct(e) {
|
|
|
295
370
|
}
|
|
296
371
|
return t;
|
|
297
372
|
}
|
|
298
|
-
function
|
|
299
|
-
let [n, r, i] =
|
|
300
|
-
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;
|
|
301
376
|
}
|
|
302
377
|
function U(e, t) {
|
|
303
|
-
return
|
|
378
|
+
return yt(e, {
|
|
304
379
|
delimiter: "-",
|
|
305
380
|
...t
|
|
306
381
|
});
|
|
307
382
|
}
|
|
308
|
-
function
|
|
383
|
+
function bt(e) {
|
|
309
384
|
return e === !1 ? (e) => e.toLowerCase() : (t) => t.toLocaleLowerCase(e);
|
|
310
385
|
}
|
|
311
|
-
function
|
|
312
|
-
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;
|
|
313
388
|
for (; a < e.length;) {
|
|
314
389
|
let t = e.charAt(a);
|
|
315
390
|
if (!r.includes(t)) break;
|
|
@@ -328,7 +403,7 @@ function dt(e, t = {}) {
|
|
|
328
403
|
}
|
|
329
404
|
//#endregion
|
|
330
405
|
//#region src/hooks/useBemClass.ts
|
|
331
|
-
var
|
|
406
|
+
var St = (e, t) => {
|
|
332
407
|
let n = t ? `${t}-${e}` : e;
|
|
333
408
|
return (...e) => {
|
|
334
409
|
let t = [n, ...e].filter((e) => typeof e == "string").map((e) => U(e)).join("__"), r = { [t]: !0 };
|
|
@@ -338,47 +413,77 @@ var ft = (e, t) => {
|
|
|
338
413
|
}
|
|
339
414
|
return r;
|
|
340
415
|
};
|
|
341
|
-
},
|
|
342
|
-
let i =
|
|
343
|
-
return
|
|
344
|
-
i.value =
|
|
345
|
-
}),
|
|
346
|
-
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);
|
|
347
422
|
}), {
|
|
348
423
|
year: a,
|
|
349
424
|
month: o,
|
|
350
425
|
weeks: s
|
|
351
426
|
};
|
|
352
|
-
},
|
|
353
|
-
let r =
|
|
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(() => {
|
|
429
|
+
let e = [], t = [];
|
|
430
|
+
for (let n of r.value) {
|
|
431
|
+
let r = parseInt(n.tagName.substring(1), 10), i = {
|
|
432
|
+
heading: n,
|
|
433
|
+
children: [],
|
|
434
|
+
level: r
|
|
435
|
+
};
|
|
436
|
+
for (; t.length >= r;) t.pop();
|
|
437
|
+
t.length === 0 ? e.push(i) : t[t.length - 1]?.children?.push(i), t.push(i);
|
|
438
|
+
}
|
|
439
|
+
return e;
|
|
440
|
+
}), o = (t) => e ? t.map((t) => {
|
|
441
|
+
let n = {
|
|
442
|
+
level: t.level,
|
|
443
|
+
heading: e(t.heading, t.level),
|
|
444
|
+
children: t.children
|
|
445
|
+
};
|
|
446
|
+
return t.children && (n.children = o(t.children)), n;
|
|
447
|
+
}) : t;
|
|
448
|
+
return m(async () => {
|
|
449
|
+
await p(), n.value = Array.from(i());
|
|
450
|
+
}), lt(document.body, (e) => {
|
|
451
|
+
let t = Array.from(i());
|
|
452
|
+
t.some((t) => e.some((e) => [...e.addedNodes, ...e.removedNodes].includes(t))) && (n.value = t);
|
|
453
|
+
}, {
|
|
454
|
+
childList: !0,
|
|
455
|
+
subtree: !0
|
|
456
|
+
}), { documentOutline: t(() => o(a.value)) };
|
|
457
|
+
}, K = (e, n) => {
|
|
458
|
+
let r = _(/* @__PURE__ */ new Map()), i = n ? {
|
|
354
459
|
items: r,
|
|
355
460
|
parent: n
|
|
356
461
|
} : l(`${e}-elements`, {
|
|
357
462
|
items: r,
|
|
358
|
-
parent:
|
|
463
|
+
parent: _()
|
|
359
464
|
});
|
|
360
|
-
return n &&
|
|
465
|
+
return n && g(`${e}-elements`, i), {
|
|
361
466
|
getElements: (t = !0) => {
|
|
362
467
|
let n = i.parent.value;
|
|
363
468
|
if (!n) return [];
|
|
364
|
-
let r = Array.from(n
|
|
365
|
-
return Array.from(i.items.value.values()).sort((e, t) => r.indexOf(e) - r.indexOf(t)).filter((e) => t || !
|
|
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)));
|
|
366
471
|
},
|
|
367
|
-
elements: t(() => Array.from(i.items.value.values()))
|
|
472
|
+
elements: t(() => Ve(Array.from(i.items.value.values())))
|
|
368
473
|
};
|
|
369
474
|
}, q = (e, t, n) => {
|
|
370
475
|
let r = l(`${e}-elements`, void 0);
|
|
371
|
-
|
|
476
|
+
oe((e) => {
|
|
372
477
|
if (!t.value) return;
|
|
373
478
|
let i = u(t.value);
|
|
374
479
|
n?.value ? r?.items.value.delete(i) : r?.items.value.set(i, t.value), e(() => r?.items.value.delete(i));
|
|
375
|
-
}),
|
|
480
|
+
}), m(() => {
|
|
376
481
|
t.value?.setAttribute(`data-elements-${e}`, "true");
|
|
377
|
-
}),
|
|
482
|
+
}), te(() => {
|
|
378
483
|
t.value?.removeAttribute(`data-elements-${e}`);
|
|
379
484
|
});
|
|
380
|
-
},
|
|
381
|
-
let n =
|
|
485
|
+
}, Dt = (e) => {
|
|
486
|
+
let n = _();
|
|
382
487
|
return t({
|
|
383
488
|
set(e) {
|
|
384
489
|
n.value = e;
|
|
@@ -387,12 +492,12 @@ var ft = (e, t) => {
|
|
|
387
492
|
return n.value ?? e;
|
|
388
493
|
}
|
|
389
494
|
});
|
|
390
|
-
},
|
|
495
|
+
}, Ot = (e, t) => {
|
|
391
496
|
H(t, (t) => {
|
|
392
497
|
e.value = t;
|
|
393
498
|
});
|
|
394
|
-
},
|
|
395
|
-
let e =
|
|
499
|
+
}, kt = () => {
|
|
500
|
+
let e = _(/* @__PURE__ */ new Map());
|
|
396
501
|
return {
|
|
397
502
|
set(t, n) {
|
|
398
503
|
n ? e.value.set(t, n) : e.value.delete(t);
|
|
@@ -405,8 +510,8 @@ var ft = (e, t) => {
|
|
|
405
510
|
H(n, (n) => {
|
|
406
511
|
e.set(t, n);
|
|
407
512
|
});
|
|
408
|
-
},
|
|
409
|
-
let e =
|
|
513
|
+
}, At = ue("theme-settings", () => {
|
|
514
|
+
let e = _(1), t = _(!0), n = (e, t) => {
|
|
410
515
|
document.documentElement.style.setProperty(`--${e}`, t);
|
|
411
516
|
};
|
|
412
517
|
return H(e, (e) => {
|
|
@@ -417,23 +522,23 @@ var ft = (e, t) => {
|
|
|
417
522
|
saturation: e,
|
|
418
523
|
wrapCode: t
|
|
419
524
|
};
|
|
420
|
-
}), Y = Symbol("toolbar"),
|
|
525
|
+
}), Y = Symbol("toolbar"), jt = ["aria-orientation", "aria-controls"], Mt = /* @__PURE__ */ o({
|
|
421
526
|
__name: "Toolbar",
|
|
422
527
|
props: {
|
|
423
528
|
orientation: { default: "horizontal" },
|
|
424
529
|
controls: {}
|
|
425
530
|
},
|
|
426
531
|
setup(e) {
|
|
427
|
-
let { orientation: t } =
|
|
428
|
-
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", {
|
|
429
534
|
ref_key: "element",
|
|
430
535
|
ref: n,
|
|
431
|
-
"aria-orientation":
|
|
536
|
+
"aria-orientation": x(t),
|
|
432
537
|
"aria-controls": e.controls,
|
|
433
538
|
role: "toolbar"
|
|
434
|
-
}, [
|
|
539
|
+
}, [v(r.$slots, "default")], 8, jt));
|
|
435
540
|
}
|
|
436
|
-
}),
|
|
541
|
+
}), Nt = [
|
|
437
542
|
"aria-disabled",
|
|
438
543
|
"disabled",
|
|
439
544
|
"type"
|
|
@@ -448,87 +553,87 @@ var ft = (e, t) => {
|
|
|
448
553
|
},
|
|
449
554
|
emits: ["click"],
|
|
450
555
|
setup(e, { emit: t }) {
|
|
451
|
-
let n = e, r = t, a =
|
|
556
|
+
let n = e, r = t, a = w("element"), { onKeyDown: o } = W(Y);
|
|
452
557
|
q("toolbar", a);
|
|
453
558
|
let s = (e) => {
|
|
454
559
|
n.disabled || r("click", e);
|
|
455
560
|
};
|
|
456
|
-
return (t, n) => (
|
|
561
|
+
return (t, n) => (h(), i("button", {
|
|
457
562
|
ref_key: "element",
|
|
458
563
|
ref: a,
|
|
459
|
-
"aria-disabled": e.disabled === !0
|
|
460
|
-
disabled: e.disabled === "without-focus"
|
|
564
|
+
"aria-disabled": e.disabled === !0 || void 0,
|
|
565
|
+
disabled: e.disabled === "without-focus" || void 0,
|
|
461
566
|
type: e.type,
|
|
462
567
|
onClick: s,
|
|
463
|
-
onKeydown: n[0] ||= (...e) =>
|
|
464
|
-
}, [
|
|
568
|
+
onKeydown: n[0] ||= (...e) => x(o) && x(o)(...e)
|
|
569
|
+
}, [v(t.$slots, "default")], 40, Nt));
|
|
465
570
|
}
|
|
466
|
-
}),
|
|
571
|
+
}), Pt = /* @__PURE__ */ o({
|
|
467
572
|
__name: "Table",
|
|
468
573
|
setup(e) {
|
|
469
|
-
return (e, t) => (
|
|
574
|
+
return (e, t) => (h(), i("table", null, [v(e.$slots, "default")]));
|
|
470
575
|
}
|
|
471
|
-
}),
|
|
576
|
+
}), Ft = /* @__PURE__ */ o({
|
|
472
577
|
__name: "TableBody",
|
|
473
578
|
setup(e) {
|
|
474
|
-
return (e, t) => (
|
|
579
|
+
return (e, t) => (h(), i("tbody", null, [v(e.$slots, "default")]));
|
|
475
580
|
}
|
|
476
|
-
}),
|
|
581
|
+
}), It = /* @__PURE__ */ o({
|
|
477
582
|
__name: "TableCell",
|
|
478
583
|
props: { heading: { type: Boolean } },
|
|
479
584
|
setup(e) {
|
|
480
|
-
return (t, r) => (
|
|
481
|
-
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")]),
|
|
482
587
|
_: 3
|
|
483
588
|
}, 8, ["scope"]));
|
|
484
589
|
}
|
|
485
|
-
}),
|
|
590
|
+
}), Lt = /* @__PURE__ */ o({
|
|
486
591
|
__name: "TableHead",
|
|
487
592
|
setup(e) {
|
|
488
|
-
return (e, t) => (
|
|
593
|
+
return (e, t) => (h(), i("thead", null, [v(e.$slots, "default")]));
|
|
489
594
|
}
|
|
490
|
-
}),
|
|
595
|
+
}), Rt = ["aria-sort"], zt = /* @__PURE__ */ o({
|
|
491
596
|
__name: "TableHeadingCell",
|
|
492
597
|
props: { sorted: {} },
|
|
493
598
|
setup(e) {
|
|
494
|
-
return (t, n) => (
|
|
599
|
+
return (t, n) => (h(), i("th", { "aria-sort": e.sorted }, [v(t.$slots, "default")], 8, Rt));
|
|
495
600
|
}
|
|
496
|
-
}),
|
|
601
|
+
}), Bt = /* @__PURE__ */ o({
|
|
497
602
|
__name: "TableRow",
|
|
498
603
|
setup(e) {
|
|
499
|
-
return (e, t) => (
|
|
604
|
+
return (e, t) => (h(), i("tr", null, [v(e.$slots, "default")]));
|
|
500
605
|
}
|
|
501
|
-
}),
|
|
606
|
+
}), Vt = Symbol("calendar-table"), Ht = /* @__PURE__ */ o({
|
|
502
607
|
__name: "CalendarTable",
|
|
503
608
|
props: /*@__PURE__*/ d({ autoFocus: { type: Boolean } }, {
|
|
504
|
-
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
609
|
+
modelValue: { default: () => /* @__PURE__ */ new Date() },
|
|
505
610
|
modelModifiers: {}
|
|
506
611
|
}),
|
|
507
612
|
emits: ["update:modelValue"],
|
|
508
613
|
setup(e) {
|
|
509
|
-
let r = e, i =
|
|
510
|
-
return
|
|
614
|
+
let r = e, i = C(e, "modelValue"), a = st();
|
|
615
|
+
return g(Vt, {
|
|
511
616
|
focusedDate: i,
|
|
512
|
-
allowFocus: t(() =>
|
|
513
|
-
}), (e, t) => (
|
|
514
|
-
default:
|
|
617
|
+
allowFocus: t(() => r.autoFocus || a.value)
|
|
618
|
+
}), (e, t) => (h(), n(x(Pt), { role: "grid" }, {
|
|
619
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
515
620
|
_: 3
|
|
516
621
|
}));
|
|
517
622
|
}
|
|
518
|
-
}),
|
|
623
|
+
}), Ut = /* @__PURE__ */ o({
|
|
519
624
|
__name: "CalendarTableCell",
|
|
520
625
|
setup(e) {
|
|
521
|
-
return (e, t) => (
|
|
522
|
-
default:
|
|
626
|
+
return (e, t) => (h(), n(It, { role: "gridcell" }, {
|
|
627
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
523
628
|
_: 3
|
|
524
629
|
}));
|
|
525
630
|
}
|
|
526
|
-
}),
|
|
631
|
+
}), Wt = [
|
|
527
632
|
"aria-pressed",
|
|
528
633
|
"aria-disabled",
|
|
529
634
|
"aria-current",
|
|
530
635
|
"tabindex"
|
|
531
|
-
],
|
|
636
|
+
], Gt = /* @__PURE__ */ o({
|
|
532
637
|
__name: "CalendarTableCellButton",
|
|
533
638
|
props: {
|
|
534
639
|
date: {},
|
|
@@ -537,27 +642,27 @@ var ft = (e, t) => {
|
|
|
537
642
|
},
|
|
538
643
|
emits: ["click"],
|
|
539
644
|
setup(e, { emit: n }) {
|
|
540
|
-
let r = e, a = n, o =
|
|
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));
|
|
541
646
|
return H(u, async (e) => {
|
|
542
|
-
e && c.value && (await
|
|
543
|
-
}), (t, n) => (
|
|
647
|
+
e && c.value && (await p(), o.value?.focus());
|
|
648
|
+
}), (t, n) => (h(), i("button", {
|
|
544
649
|
ref_key: "element",
|
|
545
650
|
ref: o,
|
|
546
651
|
"aria-pressed": e.selected,
|
|
547
652
|
"aria-disabled": e.disabled,
|
|
548
|
-
"aria-current":
|
|
653
|
+
"aria-current": x(Fe)(e.date, /* @__PURE__ */ new Date()) ? "date" : void 0,
|
|
549
654
|
tabindex: u.value ? 0 : -1,
|
|
550
655
|
onFocus: n[0] ||= (t) => s.value = e.date,
|
|
551
|
-
onKeydown: n[1] ||= (...e) =>
|
|
656
|
+
onKeydown: n[1] ||= (...e) => x(l) && x(l)(...e),
|
|
552
657
|
onClick: n[2] ||= (e) => a("click", e)
|
|
553
|
-
}, [
|
|
658
|
+
}, [v(t.$slots, "default")], 40, Wt));
|
|
554
659
|
}
|
|
555
|
-
}),
|
|
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({
|
|
556
661
|
__name: "VisuallyHidden",
|
|
557
662
|
setup(e) {
|
|
558
|
-
return (e, t) => (
|
|
663
|
+
return (e, t) => (h(), i("div", { style: Kt }, [v(e.$slots, "default")]));
|
|
559
664
|
}
|
|
560
|
-
}),
|
|
665
|
+
}), Jt = /* @__PURE__ */ o({
|
|
561
666
|
__name: "CopyButton",
|
|
562
667
|
props: {
|
|
563
668
|
content: {},
|
|
@@ -566,26 +671,23 @@ var ft = (e, t) => {
|
|
|
566
671
|
},
|
|
567
672
|
emits: ["copy"],
|
|
568
673
|
setup(o) {
|
|
569
|
-
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) => {
|
|
570
675
|
c.content ? await navigator.clipboard.write(l.value) : await c.onCopy?.(e), s.value = !0, setTimeout(() => {
|
|
571
676
|
s.value = !1;
|
|
572
677
|
}, 4e3);
|
|
573
678
|
};
|
|
574
|
-
return (t, c) => (
|
|
679
|
+
return (t, c) => (h(), i(e, null, [o.preventAnnouncement ? r("", !0) : (h(), n(x(qt), {
|
|
575
680
|
key: 0,
|
|
576
681
|
"aria-live": "polite"
|
|
577
682
|
}, {
|
|
578
|
-
default:
|
|
579
|
-
key: 0,
|
|
580
|
-
isCopying: s.value
|
|
581
|
-
}) : r("", !0)]),
|
|
683
|
+
default: E(() => [s.value ? v(t.$slots, "default", { isCopying: s.value }, void 0, void 0, 0) : r("", !0)]),
|
|
582
684
|
_: 3
|
|
583
|
-
})), a(
|
|
584
|
-
default:
|
|
685
|
+
})), a(x(X), f(t.$attrs, { onClick: u }), {
|
|
686
|
+
default: E(() => [v(t.$slots, "default", { isCopying: s.value })]),
|
|
585
687
|
_: 3
|
|
586
688
|
}, 16)], 64));
|
|
587
689
|
}
|
|
588
|
-
}),
|
|
690
|
+
}), Z = Symbol("disclosure"), Yt = { key: 0 }, Xt = /* @__PURE__ */ o({
|
|
589
691
|
__name: "Disclosure",
|
|
590
692
|
props: /*@__PURE__*/ d({
|
|
591
693
|
render: { type: Boolean },
|
|
@@ -600,11 +702,11 @@ var ft = (e, t) => {
|
|
|
600
702
|
}),
|
|
601
703
|
emits: ["update:modelValue"],
|
|
602
704
|
setup(e) {
|
|
603
|
-
let n =
|
|
604
|
-
return
|
|
605
|
-
panelId:
|
|
606
|
-
disabled: t(() =>
|
|
607
|
-
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),
|
|
608
710
|
open: t({
|
|
609
711
|
get() {
|
|
610
712
|
return r.disabled ? !0 : n.value;
|
|
@@ -613,25 +715,25 @@ var ft = (e, t) => {
|
|
|
613
715
|
n.value = e;
|
|
614
716
|
}
|
|
615
717
|
})
|
|
616
|
-
}), (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);
|
|
617
719
|
}
|
|
618
|
-
}),
|
|
720
|
+
}), Zt = /* @__PURE__ */ o({
|
|
619
721
|
__name: "DisclosureButton",
|
|
620
722
|
props: { disabled: { type: [Boolean, String] } },
|
|
621
723
|
setup(e) {
|
|
622
|
-
let { panelId: i, open: a, disabled: o, popover: s } = G(
|
|
724
|
+
let { panelId: i, open: a, disabled: o, popover: s } = G(Z), c = t(() => s.value ? {
|
|
623
725
|
command: "toggle-popover",
|
|
624
726
|
commandfor: i.value
|
|
625
727
|
} : { onClick() {
|
|
626
728
|
a.value = !a.value;
|
|
627
729
|
} });
|
|
628
|
-
return (t, s) =>
|
|
730
|
+
return (t, s) => x(o) ? r("", !0) : (h(), n(x(X), f({
|
|
629
731
|
key: 0,
|
|
630
|
-
"aria-expanded":
|
|
631
|
-
"aria-controls":
|
|
732
|
+
"aria-expanded": x(a),
|
|
733
|
+
"aria-controls": x(i),
|
|
632
734
|
disabled: e.disabled
|
|
633
735
|
}, c.value), {
|
|
634
|
-
default:
|
|
736
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
635
737
|
_: 3
|
|
636
738
|
}, 16, [
|
|
637
739
|
"aria-expanded",
|
|
@@ -639,27 +741,27 @@ var ft = (e, t) => {
|
|
|
639
741
|
"disabled"
|
|
640
742
|
]));
|
|
641
743
|
}
|
|
642
|
-
}),
|
|
744
|
+
}), Qt = _(0), $t = {
|
|
643
745
|
beforeMount(e, { value: t }) {
|
|
644
|
-
let n = `a-l-${
|
|
645
|
-
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));
|
|
646
748
|
},
|
|
647
749
|
updated(e, { value: t, oldValue: n }) {
|
|
648
750
|
if (t === n) return;
|
|
649
751
|
let r = e.getAttribute("data-labelledby-id");
|
|
650
752
|
if (r) {
|
|
651
753
|
let n = document.getElementById(r);
|
|
652
|
-
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());
|
|
653
755
|
}
|
|
654
756
|
},
|
|
655
757
|
beforeUnmount(e) {
|
|
656
758
|
let t = e.getAttribute("data-labelledby-id");
|
|
657
759
|
t && (e.removeAttribute("aria-labelledby"), document.getElementById(t)?.remove());
|
|
658
760
|
}
|
|
659
|
-
},
|
|
761
|
+
}, en = (e, t) => {
|
|
660
762
|
let n = document.createElement("span");
|
|
661
|
-
return n.innerText = e, n.id =
|
|
662
|
-
},
|
|
763
|
+
return n.innerText = e, n.id = t, n.hidden = !0, document.documentElement.appendChild(n), n;
|
|
764
|
+
}, tn = {
|
|
663
765
|
beforeMount(e, { value: t }, { transition: n }) {
|
|
664
766
|
n && t === !1 ? n.beforeEnter(e) : Q(e, t);
|
|
665
767
|
},
|
|
@@ -674,7 +776,7 @@ var ft = (e, t) => {
|
|
|
674
776
|
}
|
|
675
777
|
}, Q = (e, t) => {
|
|
676
778
|
t ? e.setAttribute("hidden", `${t}`) : e.removeAttribute("hidden");
|
|
677
|
-
},
|
|
779
|
+
}, nn = /* @__PURE__ */ o({
|
|
678
780
|
__name: "DisclosurePanel",
|
|
679
781
|
props: {
|
|
680
782
|
hideFromSearch: { type: Boolean },
|
|
@@ -682,145 +784,244 @@ var ft = (e, t) => {
|
|
|
682
784
|
id: { default: void 0 }
|
|
683
785
|
},
|
|
684
786
|
setup(e) {
|
|
685
|
-
let r = e, { panelId: i, disabled: a, popover: o, open: s } = G(
|
|
686
|
-
|
|
687
|
-
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) => {
|
|
688
790
|
e.newState === "open" ? s.value = !0 : s.value = !1;
|
|
689
791
|
};
|
|
690
|
-
return (t, r) =>
|
|
691
|
-
id:
|
|
792
|
+
return (t, r) => se((h(), n(y(e.as), {
|
|
793
|
+
id: x(i),
|
|
692
794
|
ref_key: "element",
|
|
693
795
|
ref: c,
|
|
694
|
-
popover:
|
|
796
|
+
popover: x(a) || !x(o) ? void 0 : "auto",
|
|
695
797
|
onBeforematch: r[0] ||= (e) => s.value = !0,
|
|
696
798
|
onToggle: u
|
|
697
799
|
}, {
|
|
698
|
-
default:
|
|
800
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
699
801
|
_: 3
|
|
700
|
-
}, 40, ["id", "popover"])), [[
|
|
802
|
+
}, 40, ["id", "popover"])), [[x(tn), l.value]]);
|
|
701
803
|
}
|
|
702
|
-
}),
|
|
804
|
+
}), rn = ["href", "download"], an = /* @__PURE__ */ o({
|
|
703
805
|
__name: "DownloadLink",
|
|
704
806
|
props: {
|
|
705
807
|
url: {},
|
|
706
808
|
filename: {}
|
|
707
809
|
},
|
|
708
810
|
setup(e) {
|
|
709
|
-
let t =
|
|
710
|
-
return q("toolbar", t), (r, a) => (
|
|
811
|
+
let t = w("element"), { onKeyDown: n } = W(Y);
|
|
812
|
+
return q("toolbar", t), (r, a) => (h(), i("a", {
|
|
711
813
|
ref_key: "element",
|
|
712
814
|
ref: t,
|
|
713
815
|
href: e.url,
|
|
714
816
|
download: e.filename || !0,
|
|
715
|
-
onKeydown: a[0] ||= (...e) =>
|
|
716
|
-
}, [
|
|
817
|
+
onKeydown: a[0] ||= (...e) => x(n) && x(n)(...e)
|
|
818
|
+
}, [v(r.$slots, "default")], 40, rn));
|
|
717
819
|
}
|
|
718
|
-
}),
|
|
820
|
+
}), on = ["id"], sn = /* @__PURE__ */ o({
|
|
719
821
|
__name: "FieldDescription",
|
|
720
822
|
setup(e) {
|
|
721
|
-
let t =
|
|
722
|
-
return q("field-description", n), (e, r) => (
|
|
723
|
-
id:
|
|
823
|
+
let t = S(), n = w("element");
|
|
824
|
+
return q("field-description", n), (e, r) => (h(), i("div", {
|
|
825
|
+
id: x(t),
|
|
724
826
|
ref_key: "element",
|
|
725
827
|
ref: n
|
|
726
|
-
}, [
|
|
828
|
+
}, [v(e.$slots, "default")], 8, on));
|
|
727
829
|
}
|
|
728
|
-
}),
|
|
830
|
+
}), cn = ["id"], ln = /* @__PURE__ */ o({
|
|
729
831
|
__name: "FieldError",
|
|
730
832
|
setup(e) {
|
|
731
|
-
let t =
|
|
732
|
-
return q("field-error", n), (e, r) => (
|
|
733
|
-
id:
|
|
833
|
+
let t = S(), n = w("element");
|
|
834
|
+
return q("field-error", n), (e, r) => (h(), i("div", {
|
|
835
|
+
id: x(t),
|
|
734
836
|
ref_key: "element",
|
|
735
837
|
ref: n
|
|
736
|
-
}, [
|
|
838
|
+
}, [v(e.$slots, "default")], 8, cn));
|
|
737
839
|
}
|
|
738
|
-
}),
|
|
840
|
+
}), un = Symbol("field"), dn = (e, n) => {
|
|
739
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);
|
|
740
|
-
return
|
|
842
|
+
return Tt(un, {
|
|
741
843
|
id: e,
|
|
742
844
|
hasErrors: t(() => r.value.length > 0),
|
|
743
845
|
errorIds: t(() => a(r.value)),
|
|
744
846
|
descriptionIds: t(() => a(i.value))
|
|
745
847
|
});
|
|
746
|
-
},
|
|
848
|
+
}, fn = () => G(un), pn = ["id", "for"], mn = /* @__PURE__ */ o({
|
|
747
849
|
__name: "FieldLabel",
|
|
748
850
|
setup(e) {
|
|
749
|
-
let { id: t } =
|
|
851
|
+
let { id: t } = fn(), n = () => {
|
|
750
852
|
document.getElementById(t)?.focus();
|
|
751
853
|
};
|
|
752
|
-
return (e, r) => (
|
|
753
|
-
id: `${
|
|
754
|
-
for:
|
|
854
|
+
return (e, r) => (h(), i("label", {
|
|
855
|
+
id: `${x(t)}-label`,
|
|
856
|
+
for: x(t),
|
|
755
857
|
onClick: n
|
|
756
|
-
}, [
|
|
858
|
+
}, [v(e.$slots, "default")], 8, pn));
|
|
757
859
|
}
|
|
758
|
-
}),
|
|
860
|
+
}), hn = /* @__PURE__ */ o({
|
|
759
861
|
__name: "GridTable",
|
|
760
862
|
setup(e) {
|
|
761
|
-
let r =
|
|
762
|
-
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, {
|
|
763
865
|
ref_key: "element",
|
|
764
866
|
ref: i,
|
|
765
867
|
role: "grid"
|
|
766
868
|
}, {
|
|
767
|
-
default:
|
|
869
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
768
870
|
_: 3
|
|
769
871
|
}, 512));
|
|
770
872
|
}
|
|
771
|
-
}),
|
|
772
|
-
let n = t(() => e.value?.$el), r = G(
|
|
873
|
+
}), gn = (e) => {
|
|
874
|
+
let n = t(() => e.value?.$el), r = G(_n);
|
|
773
875
|
q("table", n), q(r, n);
|
|
774
876
|
let { onKeyDown: i } = G(z);
|
|
775
877
|
return {
|
|
776
878
|
onKeyDown: i,
|
|
777
879
|
rowId: r
|
|
778
880
|
};
|
|
779
|
-
},
|
|
881
|
+
}, _n = Symbol("row"), vn = /* @__PURE__ */ o({
|
|
780
882
|
__name: "GridTableCell",
|
|
781
883
|
props: { heading: { type: Boolean } },
|
|
782
884
|
setup(e) {
|
|
783
|
-
let { rowId: t, onKeyDown: r } =
|
|
784
|
-
return (i, a) => (
|
|
885
|
+
let { rowId: t, onKeyDown: r } = gn(w("element"));
|
|
886
|
+
return (i, a) => (h(), n(It, {
|
|
785
887
|
ref: "element",
|
|
786
888
|
heading: e.heading,
|
|
787
889
|
role: "gridcell",
|
|
788
|
-
onKeydown: a[0] ||= (e) =>
|
|
890
|
+
onKeydown: a[0] ||= (e) => x(r)(x(t), e)
|
|
789
891
|
}, {
|
|
790
|
-
default:
|
|
892
|
+
default: E(() => [v(i.$slots, "default")]),
|
|
791
893
|
_: 3
|
|
792
894
|
}, 8, ["heading"]));
|
|
793
895
|
}
|
|
794
|
-
}),
|
|
896
|
+
}), yn = /* @__PURE__ */ o({
|
|
795
897
|
__name: "GridTableHeadingCell",
|
|
796
898
|
props: { sorted: {} },
|
|
797
899
|
setup(e) {
|
|
798
|
-
let { rowId: t, onKeyDown: r } =
|
|
799
|
-
return (i, a) => (
|
|
900
|
+
let { rowId: t, onKeyDown: r } = gn(w("element"));
|
|
901
|
+
return (i, a) => (h(), n(zt, {
|
|
800
902
|
ref: "element",
|
|
801
903
|
role: "gridcell",
|
|
802
904
|
sorted: e.sorted,
|
|
803
|
-
onKeydown: a[0] ||= (e) =>
|
|
905
|
+
onKeydown: a[0] ||= (e) => x(r)(x(t), e)
|
|
804
906
|
}, {
|
|
805
|
-
default:
|
|
907
|
+
default: E(() => [v(i.$slots, "default")]),
|
|
806
908
|
_: 3
|
|
807
909
|
}, 8, ["sorted"]));
|
|
808
910
|
}
|
|
809
|
-
}),
|
|
911
|
+
}), bn = /* @__PURE__ */ o({
|
|
810
912
|
__name: "GridTableRow",
|
|
811
913
|
setup(e) {
|
|
812
|
-
return
|
|
813
|
-
default:
|
|
914
|
+
return g(_n, S()), (e, t) => (h(), n(Bt, null, {
|
|
915
|
+
default: E(() => [v(e.$slots, "default")]),
|
|
814
916
|
_: 3
|
|
815
917
|
}));
|
|
816
918
|
}
|
|
817
|
-
}),
|
|
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({
|
|
818
1019
|
__name: "Separator",
|
|
819
1020
|
props: { orientation: { default: "horizontal" } },
|
|
820
1021
|
setup(e) {
|
|
821
|
-
return (t, n) => (
|
|
1022
|
+
return (t, n) => (h(), i("hr", { "aria-orientation": e.orientation }, null, 8, Mn));
|
|
822
1023
|
}
|
|
823
|
-
}),
|
|
1024
|
+
}), Pn = Symbol("Switch-field"), Fn = () => G(Pn), In = /* @__PURE__ */ o({
|
|
824
1025
|
__name: "SwitchField",
|
|
825
1026
|
props: {
|
|
826
1027
|
modelValue: {
|
|
@@ -831,36 +1032,36 @@ var ft = (e, t) => {
|
|
|
831
1032
|
},
|
|
832
1033
|
emits: ["update:modelValue"],
|
|
833
1034
|
setup(e) {
|
|
834
|
-
let t =
|
|
835
|
-
return
|
|
1035
|
+
let t = C(e, "modelValue"), n = S(), r = w("element");
|
|
1036
|
+
return dn(n, r), g(Pn, {
|
|
836
1037
|
id: n,
|
|
837
1038
|
modelValue: t
|
|
838
|
-
}), (e, t) => (
|
|
1039
|
+
}), (e, t) => (h(), i("div", {
|
|
839
1040
|
ref_key: "element",
|
|
840
1041
|
ref: r
|
|
841
|
-
}, [
|
|
1042
|
+
}, [v(e.$slots, "default")], 512));
|
|
842
1043
|
}
|
|
843
|
-
}),
|
|
1044
|
+
}), Ln = { "aria-hidden": "true" }, Rn = /* @__PURE__ */ o({
|
|
844
1045
|
__name: "SwitchFieldStateLabel",
|
|
845
1046
|
setup(e) {
|
|
846
|
-
return (e, t) => (
|
|
1047
|
+
return (e, t) => (h(), i("div", Ln, [v(e.$slots, "default")]));
|
|
847
1048
|
}
|
|
848
|
-
}),
|
|
1049
|
+
}), zn = /* @__PURE__ */ o({
|
|
849
1050
|
__name: "SwitchFieldSwitchButton",
|
|
850
1051
|
props: { disabled: { type: Boolean } },
|
|
851
1052
|
setup(e) {
|
|
852
|
-
let { modelValue: t } =
|
|
853
|
-
return (s, c) => (
|
|
854
|
-
id:
|
|
855
|
-
"aria-checked":
|
|
856
|
-
"aria-describedby": [
|
|
857
|
-
"aria-invalid":
|
|
858
|
-
"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`,
|
|
859
1060
|
disabled: e.disabled,
|
|
860
1061
|
role: "switch",
|
|
861
|
-
onClick: c[0] ||= (e) => t.value = !
|
|
1062
|
+
onClick: c[0] ||= (e) => t.value = !x(t)
|
|
862
1063
|
}, {
|
|
863
|
-
default:
|
|
1064
|
+
default: E(() => [v(s.$slots, "default")]),
|
|
864
1065
|
_: 3
|
|
865
1066
|
}, 8, [
|
|
866
1067
|
"id",
|
|
@@ -871,7 +1072,7 @@ var ft = (e, t) => {
|
|
|
871
1072
|
"disabled"
|
|
872
1073
|
]));
|
|
873
1074
|
}
|
|
874
|
-
}), $ = Symbol("tabs"),
|
|
1075
|
+
}), $ = Symbol("tabs"), Bn = Symbol("tabs-list"), Vn = /* @__PURE__ */ o({
|
|
875
1076
|
__name: "Tabs",
|
|
876
1077
|
props: /*@__PURE__*/ d({ as: {} }, {
|
|
877
1078
|
modelValue: {},
|
|
@@ -879,97 +1080,97 @@ var ft = (e, t) => {
|
|
|
879
1080
|
}),
|
|
880
1081
|
emits: ["update:modelValue"],
|
|
881
1082
|
setup(e) {
|
|
882
|
-
let t =
|
|
883
|
-
return
|
|
884
|
-
ids:
|
|
1083
|
+
let t = C(e, "modelValue");
|
|
1084
|
+
return g($, {
|
|
1085
|
+
ids: kt(),
|
|
885
1086
|
selectedPanel: t
|
|
886
|
-
}), (t, r) => e.as ? (
|
|
887
|
-
default:
|
|
1087
|
+
}), (t, r) => e.as ? (h(), n(y(e.as), { key: 0 }, {
|
|
1088
|
+
default: E(() => [v(t.$slots, "default")]),
|
|
888
1089
|
_: 3
|
|
889
|
-
})) :
|
|
1090
|
+
})) : v(t.$slots, "default", {}, void 0, void 0, 1);
|
|
890
1091
|
}
|
|
891
|
-
}),
|
|
1092
|
+
}), Hn = ["tabindex"], Un = /* @__PURE__ */ o({
|
|
892
1093
|
__name: "TabsActionButton",
|
|
893
1094
|
props: { value: {} },
|
|
894
1095
|
emits: ["click"],
|
|
895
1096
|
setup(e, { emit: t }) {
|
|
896
1097
|
let n = t, { selectedPanel: r } = G($);
|
|
897
|
-
return (t, a) => (
|
|
1098
|
+
return (t, a) => (h(), i("button", {
|
|
898
1099
|
ref: "button",
|
|
899
|
-
tabindex:
|
|
1100
|
+
tabindex: x(r) === e.value ? 0 : -1,
|
|
900
1101
|
type: "button",
|
|
901
1102
|
onClick: a[0] ||= (e) => n("click", e)
|
|
902
|
-
}, [
|
|
1103
|
+
}, [v(t.$slots, "default")], 8, Hn));
|
|
903
1104
|
}
|
|
904
|
-
}),
|
|
1105
|
+
}), Wn = [
|
|
905
1106
|
"id",
|
|
906
1107
|
"aria-selected",
|
|
907
1108
|
"aria-controls"
|
|
908
|
-
],
|
|
1109
|
+
], Gn = /* @__PURE__ */ o({
|
|
909
1110
|
__name: "TabsButton",
|
|
910
1111
|
props: {
|
|
911
1112
|
value: {},
|
|
912
|
-
id: { default: (e) => `${
|
|
1113
|
+
id: { default: (e) => `${S()}-${e.value}-button` }
|
|
913
1114
|
},
|
|
914
1115
|
emits: ["delete"],
|
|
915
1116
|
setup(e, { emit: t }) {
|
|
916
|
-
let n = e, r =
|
|
1117
|
+
let n = e, r = w("element");
|
|
917
1118
|
q("tabs-list", r);
|
|
918
1119
|
let a = t, { selectedPanel: o, ids: s } = G($);
|
|
919
1120
|
J(s, `${n.value}-button`, () => n.id);
|
|
920
|
-
let { onKeyDown: c, selectionFollowsFocus: l } = G(
|
|
921
|
-
return
|
|
1121
|
+
let { onKeyDown: c, selectionFollowsFocus: l } = G(Bn);
|
|
1122
|
+
return ee(() => {
|
|
922
1123
|
o.value ||= n.value;
|
|
923
|
-
}), (t, u) => (
|
|
1124
|
+
}), (t, u) => (h(), i("button", {
|
|
924
1125
|
id: e.id,
|
|
925
1126
|
ref_key: "element",
|
|
926
1127
|
ref: r,
|
|
927
|
-
"aria-selected":
|
|
928
|
-
"aria-controls":
|
|
1128
|
+
"aria-selected": x(o) === e.value,
|
|
1129
|
+
"aria-controls": x(s).get(`${n.value}-panel`),
|
|
929
1130
|
type: "button",
|
|
930
1131
|
role: "tab",
|
|
931
1132
|
onClick: u[0] ||= (t) => o.value = e.value,
|
|
932
|
-
onFocus: u[1] ||= (t) =>
|
|
933
|
-
onKeydown: [u[2] ||=
|
|
934
|
-
}, [
|
|
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));
|
|
935
1136
|
}
|
|
936
|
-
}),
|
|
1137
|
+
}), Kn = ["aria-orientation"], qn = /* @__PURE__ */ o({
|
|
937
1138
|
__name: "TabsList",
|
|
938
1139
|
props: {
|
|
939
1140
|
orientation: { default: "horizontal" },
|
|
940
1141
|
selectionFollowsFocus: { type: Boolean }
|
|
941
1142
|
},
|
|
942
1143
|
setup(e) {
|
|
943
|
-
let n = e, { orientation: r } =
|
|
944
|
-
return
|
|
945
|
-
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),
|
|
946
1147
|
onKeyDown: s
|
|
947
|
-
}), (e, t) => (
|
|
1148
|
+
}), (e, t) => (h(), i("div", {
|
|
948
1149
|
ref_key: "element",
|
|
949
1150
|
ref: a,
|
|
950
|
-
"aria-orientation":
|
|
1151
|
+
"aria-orientation": x(r),
|
|
951
1152
|
role: "tablist"
|
|
952
|
-
}, [
|
|
1153
|
+
}, [v(e.$slots, "default")], 8, Kn));
|
|
953
1154
|
}
|
|
954
|
-
}),
|
|
1155
|
+
}), Jn = ["id", "aria-labelledby"], Yn = /* @__PURE__ */ o({
|
|
955
1156
|
__name: "TabsPanel",
|
|
956
1157
|
props: {
|
|
957
1158
|
value: {},
|
|
958
|
-
id: { default: (e) => `${
|
|
1159
|
+
id: { default: (e) => `${S()}-${e.value}-panel` }
|
|
959
1160
|
},
|
|
960
1161
|
setup(e) {
|
|
961
1162
|
let n = e, { selectedPanel: a, ids: o } = G($);
|
|
962
1163
|
J(o, `${n.value}-panel`, () => n.id);
|
|
963
1164
|
let s = t(() => a.value === n.value);
|
|
964
|
-
return (t, a) => s.value ? (
|
|
1165
|
+
return (t, a) => s.value ? (h(), i("div", {
|
|
965
1166
|
key: 0,
|
|
966
1167
|
id: e.id,
|
|
967
1168
|
ref: "button",
|
|
968
|
-
"aria-labelledby":
|
|
1169
|
+
"aria-labelledby": x(o).get(`${n.value}-button`),
|
|
969
1170
|
tabindex: "-1",
|
|
970
1171
|
role: "tabpanel"
|
|
971
|
-
}, [
|
|
1172
|
+
}, [v(t.$slots, "default")], 8, Jn)) : r("", !0);
|
|
972
1173
|
}
|
|
973
1174
|
});
|
|
974
1175
|
//#endregion
|
|
975
|
-
export { z as GridKey, X as PeachyButton,
|
|
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 };
|