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