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