@thekestongroup/ui 0.9.1 → 0.9.2
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/components/Checklist/Checklist.vue.d.ts +2 -0
- package/dist/components/Steps/Steps.vue.d.ts +1 -1
- package/dist/keston-ui.js +446 -432
- package/package.json +1 -1
- package/src/components/Checklist/Checklist.stories.ts +6 -0
- package/src/components/Checklist/Checklist.vue +3 -1
- package/src/components/Header/Header.vue +3 -2
- package/src/components/Slideover/Slideover.vue +5 -3
- package/src/components/Steps/Steps.vue +2 -2
package/dist/keston-ui.js
CHANGED
|
@@ -467,13 +467,7 @@ var Kn = ["z-50 rounded border border-black/15 bg-white text-black shadow-md out
|
|
|
467
467
|
onError: m[1] ||= (e) => l.value = !0
|
|
468
468
|
}, null, 40, sr)) : (w(), s("span", cr, j(r.value), 1))], 10, or));
|
|
469
469
|
}
|
|
470
|
-
}), dr = { class: "flex flex-col" }, fr = {
|
|
471
|
-
key: 0,
|
|
472
|
-
class: "truncate px-4 pt-3 text-xs font-bold text-black/65 uppercase"
|
|
473
|
-
}, pr = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, mr = { class: "flex min-w-0 flex-col" }, hr = { class: "truncate font-bold" }, gr = {
|
|
474
|
-
key: 0,
|
|
475
|
-
class: "truncate text-sm text-black/65"
|
|
476
|
-
}, _r = {
|
|
470
|
+
}), dr = { class: "flex flex-col" }, fr = ["title"], pr = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, mr = { class: "flex min-w-0 flex-col" }, hr = ["title"], gr = ["title"], _r = {
|
|
477
471
|
key: 1,
|
|
478
472
|
class: "flex items-center gap-2 border-t border-black/15 px-4 py-3"
|
|
479
473
|
}, vr = /* @__PURE__ */ f({
|
|
@@ -567,14 +561,25 @@ var Kn = ["z-50 rounded border border-black/15 bg-white text-black shadow-md out
|
|
|
567
561
|
ui: { content: M(X)("w-72", e.ui?.userMenu) }
|
|
568
562
|
}, {
|
|
569
563
|
content: V(({ close: n }) => [c("div", dr, [
|
|
570
|
-
e.user.organisation ? (w(), s("p",
|
|
564
|
+
e.user.organisation ? (w(), s("p", {
|
|
565
|
+
key: 0,
|
|
566
|
+
class: "truncate px-4 pt-3 text-xs font-bold text-black/65 uppercase",
|
|
567
|
+
title: e.user.organisation
|
|
568
|
+
}, j(e.user.organisation), 9, fr)) : o("", !0),
|
|
571
569
|
c("div", pr, [
|
|
572
570
|
d(ur, {
|
|
573
571
|
user: e.user,
|
|
574
572
|
size: "lg",
|
|
575
573
|
decorative: ""
|
|
576
574
|
}, null, 8, ["user"]),
|
|
577
|
-
c("div", mr, [c("span",
|
|
575
|
+
c("div", mr, [c("span", {
|
|
576
|
+
class: "truncate font-bold",
|
|
577
|
+
title: e.user.name
|
|
578
|
+
}, j(e.user.name), 9, hr), e.user.email ? (w(), s("span", {
|
|
579
|
+
key: 0,
|
|
580
|
+
class: "truncate text-sm text-black/65",
|
|
581
|
+
title: e.user.email
|
|
582
|
+
}, j(e.user.email), 9, gr)) : o("", !0)]),
|
|
578
583
|
e.userActions.includes("account-settings") ? (w(), a(Z, {
|
|
579
584
|
key: 0,
|
|
580
585
|
size: "sm",
|
|
@@ -919,11 +924,14 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
919
924
|
"class"
|
|
920
925
|
]));
|
|
921
926
|
}
|
|
922
|
-
}), Rr = { class: "flex items-start gap-4" },
|
|
927
|
+
}), Rr = { class: "text-black" }, zr = { class: "flex items-start gap-4" }, Br = { class: "flex min-w-0 flex-1 flex-col gap-1" }, Vr = { key: 0 }, Hr = {
|
|
928
|
+
key: 1,
|
|
929
|
+
class: "sr-only"
|
|
930
|
+
}, Ur = {
|
|
923
931
|
key: 1,
|
|
924
932
|
"aria-live": "polite",
|
|
925
933
|
class: "sr-only"
|
|
926
|
-
},
|
|
934
|
+
}, Wr = ["role", "aria-labelledby"], Gr = "textarea, [contenteditable=\"true\"], input[type=checkbox], input[type=radio], input[type=button], input[type=submit]", Kr = /* @__PURE__ */ f({
|
|
927
935
|
__name: "Slideover",
|
|
928
936
|
props: /*@__PURE__*/ g({
|
|
929
937
|
title: {},
|
|
@@ -1004,7 +1012,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1004
1012
|
}
|
|
1005
1013
|
function L(e) {
|
|
1006
1014
|
let t = e.target;
|
|
1007
|
-
!r.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(
|
|
1015
|
+
!r.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(Gr) || (e.preventDefault(), I());
|
|
1008
1016
|
}
|
|
1009
1017
|
let R = 0;
|
|
1010
1018
|
function B(e) {
|
|
@@ -1064,48 +1072,53 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1064
1072
|
e.title || e.description || e.close || e.steps || t.$slots.header || t.$slots.title ? (w(), s("header", {
|
|
1065
1073
|
key: 0,
|
|
1066
1074
|
class: y(M(X)("flex flex-col gap-4 border-b border-black/15 px-6 py-4", e.ui?.header))
|
|
1067
|
-
}, [
|
|
1068
|
-
|
|
1069
|
-
label: e.title ?? M(n)("ui.slideover.steps"),
|
|
1070
|
-
segments: "",
|
|
1071
|
-
value: b.value + 1,
|
|
1072
|
-
max: x.value
|
|
1073
|
-
}, null, 8, [
|
|
1074
|
-
"label",
|
|
1075
|
-
"value",
|
|
1076
|
-
"max"
|
|
1077
|
-
])) : o("", !0), c("div", Rr, [O(t.$slots, "header", { close: g }, () => [c("div", zr, [
|
|
1078
|
-
d(M(gt), { class: y(e.title || t.$slots.title ? M(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
1079
|
-
default: V(() => [O(t.$slots, "title", {}, () => [u(j(e.title), 1)])]),
|
|
1080
|
-
_: 3
|
|
1081
|
-
}, 8, ["class"]),
|
|
1082
|
-
e.description || t.$slots.description || e.steps ? (w(), a(M(ft), {
|
|
1075
|
+
}, [
|
|
1076
|
+
e.steps ? (w(), s("p", {
|
|
1083
1077
|
key: 0,
|
|
1084
|
-
|
|
1085
|
-
class: "
|
|
1086
|
-
},
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1078
|
+
id: T,
|
|
1079
|
+
class: "text-sm text-black/65"
|
|
1080
|
+
}, [u(" Step " + j(b.value + 1) + " of " + j(x.value) + ": ", 1), c("span", Rr, j(e.steps[b.value]), 1)])) : o("", !0),
|
|
1081
|
+
e.steps ? (w(), a(Lr, {
|
|
1082
|
+
key: 1,
|
|
1083
|
+
label: e.title ?? M(n)("ui.slideover.steps"),
|
|
1084
|
+
segments: "",
|
|
1085
|
+
value: b.value + 1,
|
|
1086
|
+
max: x.value
|
|
1087
|
+
}, null, 8, [
|
|
1088
|
+
"label",
|
|
1089
|
+
"value",
|
|
1090
|
+
"max"
|
|
1091
|
+
])) : o("", !0),
|
|
1092
|
+
c("div", zr, [O(t.$slots, "header", { close: g }, () => [c("div", Br, [
|
|
1093
|
+
d(M(gt), { class: y(e.title || t.$slots.title ? M(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
1094
|
+
default: V(() => [O(t.$slots, "title", {}, () => [u(j(e.title), 1)])]),
|
|
1095
|
+
_: 3
|
|
1096
|
+
}, 8, ["class"]),
|
|
1097
|
+
e.description || t.$slots.description || e.steps ? (w(), a(M(ft), {
|
|
1098
|
+
key: 0,
|
|
1099
|
+
as: "div",
|
|
1100
|
+
class: "flex flex-col gap-1 text-sm text-black/65"
|
|
1101
|
+
}, {
|
|
1102
|
+
default: V(() => [e.description || t.$slots.description ? (w(), s("p", Vr, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0), e.steps ? (w(), s("p", Hr, j(D.value), 1)) : o("", !0)]),
|
|
1103
|
+
_: 3
|
|
1104
|
+
})) : o("", !0),
|
|
1105
|
+
e.steps ? (w(), s("p", Ur, j(k.value), 1)) : o("", !0)
|
|
1106
|
+
]), e.close ? (w(), a(M(ut), {
|
|
1107
|
+
key: 0,
|
|
1108
|
+
"as-child": ""
|
|
1103
1109
|
}, {
|
|
1104
|
-
default: V(() => [d(
|
|
1110
|
+
default: V(() => [d(Z, {
|
|
1111
|
+
variant: "ghost",
|
|
1112
|
+
square: "",
|
|
1113
|
+
"aria-label": M(n)("ui.slideover.close"),
|
|
1114
|
+
class: "-my-1.5 -mr-3 shrink-0"
|
|
1115
|
+
}, {
|
|
1116
|
+
default: V(() => [d(M(Pe))]),
|
|
1117
|
+
_: 1
|
|
1118
|
+
}, 8, ["aria-label"])]),
|
|
1105
1119
|
_: 1
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
})) : o("", !0)])])], 2)) : o("", !0),
|
|
1120
|
+
})) : o("", !0)])])
|
|
1121
|
+
], 2)) : o("", !0),
|
|
1109
1122
|
c("div", {
|
|
1110
1123
|
ref_key: "body",
|
|
1111
1124
|
ref: A,
|
|
@@ -1116,7 +1129,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1116
1129
|
}, [O(t.$slots, "body", {
|
|
1117
1130
|
close: g,
|
|
1118
1131
|
step: b.value
|
|
1119
|
-
})], 42,
|
|
1132
|
+
})], 42, Wr),
|
|
1120
1133
|
t.$slots.footer || e.steps ? (w(), s("footer", {
|
|
1121
1134
|
key: 1,
|
|
1122
1135
|
class: y(M(X)("flex justify-end gap-2 border-t border-black/15 px-6 py-4", e.ui?.footer))
|
|
@@ -1151,7 +1164,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1151
1164
|
_: 3
|
|
1152
1165
|
}, 8, ["open", "modal"]));
|
|
1153
1166
|
}
|
|
1154
|
-
}),
|
|
1167
|
+
}), qr = ["href"], Jr = { class: "flex flex-1" }, Yr = { class: "sticky top-12 hidden h-[calc(100dvh-var(--spacing)*12)] shrink-0 self-start lg:flex" }, Xr = /* @__PURE__ */ f({
|
|
1155
1168
|
__name: "AppShell",
|
|
1156
1169
|
props: /*@__PURE__*/ g({
|
|
1157
1170
|
title: {},
|
|
@@ -1213,7 +1226,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1213
1226
|
c("a", {
|
|
1214
1227
|
href: `#${g}`,
|
|
1215
1228
|
class: "sr-only z-50 rounded bg-white px-4 py-2 text-sm focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:outline-2 focus:outline-focus"
|
|
1216
|
-
}, " Skip to content ", 8,
|
|
1229
|
+
}, " Skip to content ", 8, qr),
|
|
1217
1230
|
d(vr, _(e.header, {
|
|
1218
1231
|
title: e.title,
|
|
1219
1232
|
"title-to": e.titleTo,
|
|
@@ -1275,8 +1288,8 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1275
1288
|
"sign-in",
|
|
1276
1289
|
"ui"
|
|
1277
1290
|
]),
|
|
1278
|
-
c("div",
|
|
1279
|
-
c("div",
|
|
1291
|
+
c("div", Jr, [
|
|
1292
|
+
c("div", Yr, [d(Pr, _(e.sidebar, {
|
|
1280
1293
|
id: v,
|
|
1281
1294
|
collapsed: s.value,
|
|
1282
1295
|
"onUpdate:collapsed": f[6] ||= (e) => s.value = e,
|
|
@@ -1297,7 +1310,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1297
1310
|
"sections",
|
|
1298
1311
|
"link-component"
|
|
1299
1312
|
])]),
|
|
1300
|
-
d(
|
|
1313
|
+
d(Kr, {
|
|
1301
1314
|
open: u.value,
|
|
1302
1315
|
"onUpdate:open": f[8] ||= (e) => u.value = e,
|
|
1303
1316
|
side: "left",
|
|
@@ -1336,7 +1349,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1336
1349
|
_: 3
|
|
1337
1350
|
}));
|
|
1338
1351
|
}
|
|
1339
|
-
}),
|
|
1352
|
+
}), Zr = ["aria-label"], Qr = { class: "flex flex-wrap items-center gap-x-1.5 gap-y-1" }, $r = ["title"], ei = { class: "truncate" }, ti = { class: "truncate" }, ni = ["title"], ri = { class: "truncate" }, ii = "inline-flex max-w-60 min-w-0 items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:shrink-0", ai = /* @__PURE__ */ f({
|
|
1340
1353
|
__name: "Breadcrumb",
|
|
1341
1354
|
props: {
|
|
1342
1355
|
items: {},
|
|
@@ -1372,29 +1385,29 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1372
1385
|
return (t, l) => (w(), s("nav", {
|
|
1373
1386
|
"aria-label": e.label ?? M(r)("ui.breadcrumb.label"),
|
|
1374
1387
|
class: y(M(X)("min-w-0 text-sm", i.class))
|
|
1375
|
-
}, [c("ol",
|
|
1388
|
+
}, [c("ol", Qr, [(w(!0), s(n, null, D(e.items, (t, n) => (w(), s("li", {
|
|
1376
1389
|
key: `${t.label}-${n}`,
|
|
1377
1390
|
class: "flex min-w-0 items-center gap-1.5"
|
|
1378
1391
|
}, [n === e.items.length - 1 ? (w(), s("span", {
|
|
1379
1392
|
key: 0,
|
|
1380
1393
|
"aria-current": "page",
|
|
1381
1394
|
title: t.label,
|
|
1382
|
-
class: y(M(X)(
|
|
1395
|
+
class: y(M(X)(ii, "text-black"))
|
|
1383
1396
|
}, [t.icon ? (w(), a(k(t.icon), {
|
|
1384
1397
|
key: 0,
|
|
1385
1398
|
"aria-hidden": "true"
|
|
1386
|
-
})) : o("", !0), c("span",
|
|
1399
|
+
})) : o("", !0), c("span", ei, j(t.label), 1)], 10, $r)) : u(t) ? (w(), a(k(u(t)), _({
|
|
1387
1400
|
key: 1,
|
|
1388
1401
|
ref_for: !0
|
|
1389
1402
|
}, d(t), {
|
|
1390
1403
|
title: t.label,
|
|
1391
|
-
class: M(X)(
|
|
1404
|
+
class: M(X)(ii, p),
|
|
1392
1405
|
onClick: (e) => f(t, e)
|
|
1393
1406
|
}), {
|
|
1394
1407
|
default: V(() => [t.icon ? (w(), a(k(t.icon), {
|
|
1395
1408
|
key: 0,
|
|
1396
1409
|
"aria-hidden": "true"
|
|
1397
|
-
})) : o("", !0), c("span",
|
|
1410
|
+
})) : o("", !0), c("span", ti, j(t.label), 1)]),
|
|
1398
1411
|
_: 2
|
|
1399
1412
|
}, 1040, [
|
|
1400
1413
|
"title",
|
|
@@ -1403,17 +1416,17 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1403
1416
|
])) : (w(), s("span", {
|
|
1404
1417
|
key: 2,
|
|
1405
1418
|
title: t.label,
|
|
1406
|
-
class: y(M(X)(
|
|
1419
|
+
class: y(M(X)(ii, "text-black/65"))
|
|
1407
1420
|
}, [t.icon ? (w(), a(k(t.icon), {
|
|
1408
1421
|
key: 0,
|
|
1409
1422
|
"aria-hidden": "true"
|
|
1410
|
-
})) : o("", !0), c("span",
|
|
1423
|
+
})) : o("", !0), c("span", ri, j(t.label), 1)], 10, ni)), n < e.items.length - 1 ? (w(), a(M(fe), {
|
|
1411
1424
|
key: 3,
|
|
1412
1425
|
"aria-hidden": "true",
|
|
1413
1426
|
class: "size-3.5 shrink-0 text-black/40"
|
|
1414
|
-
})) : o("", !0)]))), 128))])], 10,
|
|
1427
|
+
})) : o("", !0)]))), 128))])], 10, Zr));
|
|
1415
1428
|
}
|
|
1416
|
-
}),
|
|
1429
|
+
}), oi = /* @__PURE__ */ f({
|
|
1417
1430
|
__name: "Menu",
|
|
1418
1431
|
props: {
|
|
1419
1432
|
items: {},
|
|
@@ -1491,18 +1504,18 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1491
1504
|
_: 1
|
|
1492
1505
|
}));
|
|
1493
1506
|
}
|
|
1494
|
-
}),
|
|
1507
|
+
}), si = { class: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3" }, ci = { class: "flex min-w-0 flex-col gap-1" }, li = { class: "flex flex-wrap items-center gap-x-2 gap-y-1" }, ui = ["aria-label"], di = {
|
|
1495
1508
|
key: 0,
|
|
1496
1509
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm font-bold",
|
|
1497
1510
|
"aria-live": "polite"
|
|
1498
|
-
},
|
|
1511
|
+
}, fi = {
|
|
1499
1512
|
"aria-hidden": "true",
|
|
1500
1513
|
inert: "",
|
|
1501
1514
|
class: "invisible absolute top-0 left-0 size-0 overflow-hidden"
|
|
1502
|
-
},
|
|
1515
|
+
}, pi = {
|
|
1503
1516
|
key: 1,
|
|
1504
1517
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm"
|
|
1505
|
-
},
|
|
1518
|
+
}, mi = /* @__PURE__ */ f({
|
|
1506
1519
|
__name: "PageHeader",
|
|
1507
1520
|
props: {
|
|
1508
1521
|
title: {},
|
|
@@ -1545,12 +1558,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1545
1558
|
}), S(() => x?.disconnect()), z(() => r.toolbar?.map((e) => `${e.label}${e.disabled ? "-" : ""}`).join("|"), () => v(b));
|
|
1546
1559
|
let T = i(() => (r.toolbar ?? []).slice(0, _.value)), A = i(() => (r.toolbar ?? []).slice(_.value));
|
|
1547
1560
|
return (i, p) => (w(), s("header", { class: y(M(X)("flex flex-col gap-2", r.class)) }, [
|
|
1548
|
-
e.breadcrumb && e.breadcrumb.length > 1 ? (w(), a(
|
|
1561
|
+
e.breadcrumb && e.breadcrumb.length > 1 ? (w(), a(ai, {
|
|
1549
1562
|
key: 0,
|
|
1550
1563
|
items: e.breadcrumb,
|
|
1551
1564
|
"link-component": e.linkComponent
|
|
1552
1565
|
}, null, 8, ["items", "link-component"])) : o("", !0),
|
|
1553
|
-
c("div",
|
|
1566
|
+
c("div", si, [c("div", ci, [c("div", li, [c("h1", { class: y(M(X)("min-w-0 text-2xl font-bold break-words", e.ui?.title)) }, j(e.title), 3), O(i.$slots, "badge")]), e.description || i.$slots.description ? (w(), s("p", {
|
|
1554
1567
|
key: 0,
|
|
1555
1568
|
class: y(M(X)("max-w-prose text-sm text-black/65", e.ui?.description))
|
|
1556
1569
|
}, [O(i.$slots, "description", {}, () => [u(j(e.description), 1)])], 2)) : o("", !0)]), i.$slots.actions ? (w(), s("div", {
|
|
@@ -1563,7 +1576,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1563
1576
|
"aria-label": M(t)("ui.pageHeader.actions", { title: e.title }),
|
|
1564
1577
|
class: y(M(X)("flex items-center gap-1 rounded-lg border border-black/15 bg-white p-1", e.ui?.toolbar))
|
|
1565
1578
|
}, [
|
|
1566
|
-
i.$slots["toolbar-start"] ? (w(), s("div",
|
|
1579
|
+
i.$slots["toolbar-start"] ? (w(), s("div", di, [O(i.$slots, "toolbar-start")])) : o("", !0),
|
|
1567
1580
|
c("div", {
|
|
1568
1581
|
ref_key: "fitArea",
|
|
1569
1582
|
ref: h,
|
|
@@ -1592,7 +1605,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1592
1605
|
"disabled",
|
|
1593
1606
|
"onClick"
|
|
1594
1607
|
]))), 128)),
|
|
1595
|
-
A.value.length ? (w(), a(
|
|
1608
|
+
A.value.length ? (w(), a(oi, {
|
|
1596
1609
|
key: 0,
|
|
1597
1610
|
items: A.value,
|
|
1598
1611
|
label: M(t)("ui.pageHeader.moreActions"),
|
|
@@ -1603,7 +1616,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1603
1616
|
"label",
|
|
1604
1617
|
"link-component"
|
|
1605
1618
|
])) : o("", !0),
|
|
1606
|
-
c("div",
|
|
1619
|
+
c("div", fi, [c("div", {
|
|
1607
1620
|
ref_key: "measure",
|
|
1608
1621
|
ref: g,
|
|
1609
1622
|
class: "flex w-max gap-1"
|
|
@@ -1629,18 +1642,18 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1629
1642
|
_: 1
|
|
1630
1643
|
})], 512)])
|
|
1631
1644
|
], 512),
|
|
1632
|
-
i.$slots["toolbar-end"] ? (w(), s("div",
|
|
1633
|
-
], 10,
|
|
1645
|
+
i.$slots["toolbar-end"] ? (w(), s("div", pi, [O(i.$slots, "toolbar-end")])) : o("", !0)
|
|
1646
|
+
], 10, ui)) : o("", !0),
|
|
1634
1647
|
O(i.$slots, "default")
|
|
1635
1648
|
], 2));
|
|
1636
1649
|
}
|
|
1637
|
-
}),
|
|
1650
|
+
}), hi = { class: "flex min-w-0 flex-col gap-0.5" }, gi = {
|
|
1638
1651
|
class: "text-sm",
|
|
1639
1652
|
"aria-hidden": "true"
|
|
1640
|
-
},
|
|
1653
|
+
}, _i = {
|
|
1641
1654
|
key: 0,
|
|
1642
1655
|
class: "text-xs text-black/65"
|
|
1643
|
-
},
|
|
1656
|
+
}, vi = { class: "w-full shrink-0 sm:w-80" }, yi = /* @__PURE__ */ f({
|
|
1644
1657
|
__name: "SettingsRow",
|
|
1645
1658
|
props: {
|
|
1646
1659
|
label: {},
|
|
@@ -1655,12 +1668,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1655
1668
|
},
|
|
1656
1669
|
setup(e) {
|
|
1657
1670
|
let t = e;
|
|
1658
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div",
|
|
1671
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div", hi, [c("p", gi, j(e.label), 1), e.description ? (w(), s("p", _i, j(e.description), 1)) : o("", !0)]), c("div", vi, [O(n.$slots, "default")])], 2));
|
|
1659
1672
|
}
|
|
1660
|
-
}),
|
|
1673
|
+
}), bi = ["aria-label"], xi = ["aria-label"], Si = { "aria-hidden": "true" }, Ci = { class: "flex max-h-72 flex-col gap-2 overflow-y-auto p-3 text-sm [scrollbar-width:thin]" }, wi = { class: "min-w-0 truncate" }, Ti = {
|
|
1661
1674
|
key: 0,
|
|
1662
1675
|
class: "ml-auto shrink-0 truncate text-xs text-black/65"
|
|
1663
|
-
},
|
|
1676
|
+
}, Ei = /* @__PURE__ */ f({
|
|
1664
1677
|
__name: "AvatarGroup",
|
|
1665
1678
|
props: {
|
|
1666
1679
|
users: {},
|
|
@@ -1728,7 +1741,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1728
1741
|
},
|
|
1729
1742
|
ui: { content: "w-56" }
|
|
1730
1743
|
}, {
|
|
1731
|
-
content: V(() => [c("ul",
|
|
1744
|
+
content: V(() => [c("ul", Ci, [(w(!0), s(n, null, D(l.value, (e, t) => (w(), s("li", {
|
|
1732
1745
|
key: `${e.name}-${t}`,
|
|
1733
1746
|
class: "flex items-center gap-2"
|
|
1734
1747
|
}, [
|
|
@@ -1737,8 +1750,8 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1737
1750
|
size: "xs",
|
|
1738
1751
|
decorative: ""
|
|
1739
1752
|
}, null, 8, ["user"]),
|
|
1740
|
-
c("span",
|
|
1741
|
-
e.role ? (w(), s("span",
|
|
1753
|
+
c("span", wi, j(e.name), 1),
|
|
1754
|
+
e.role ? (w(), s("span", Ti, j(e.role), 1)) : o("", !0)
|
|
1742
1755
|
]))), 128))])]),
|
|
1743
1756
|
default: V(() => [c("button", {
|
|
1744
1757
|
type: "button",
|
|
@@ -1747,17 +1760,17 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1747
1760
|
names: l.value.map((e) => e.name).join(", ")
|
|
1748
1761
|
}),
|
|
1749
1762
|
class: y(M(X)("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full bg-surface font-bold text-black select-none", "outline-2 outline-offset-1 outline-transparent transition focus-visible:outline-focus", p[e.size]))
|
|
1750
|
-
}, [c("span",
|
|
1763
|
+
}, [c("span", Si, "+" + j(l.value.length), 1)], 10, xi)]),
|
|
1751
1764
|
_: 1
|
|
1752
|
-
})], 2)) : o("", !0)], 10,
|
|
1765
|
+
})], 2)) : o("", !0)], 10, bi));
|
|
1753
1766
|
}
|
|
1754
|
-
}),
|
|
1767
|
+
}), Di = { class: "flex min-w-0 flex-col gap-1" }, Oi = {
|
|
1755
1768
|
key: 1,
|
|
1756
1769
|
class: "text-sm text-black/65"
|
|
1757
|
-
},
|
|
1770
|
+
}, ki = {
|
|
1758
1771
|
key: 0,
|
|
1759
1772
|
class: "flex shrink-0 items-center gap-2"
|
|
1760
|
-
},
|
|
1773
|
+
}, Ai = /* @__PURE__ */ f({
|
|
1761
1774
|
__name: "Card",
|
|
1762
1775
|
props: {
|
|
1763
1776
|
title: {},
|
|
@@ -1791,25 +1804,25 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1791
1804
|
default: V(() => [c("div", { class: y(M(X)("flex min-w-0 flex-1 flex-col gap-4", l[e.padding], e.ui?.body)) }, [e.title || e.description || i.$slots.header || i.$slots.actions ? (w(), s("div", {
|
|
1792
1805
|
key: 0,
|
|
1793
1806
|
class: y(M(X)("flex items-start justify-between gap-3", e.padding === "none" && "px-4 pt-4 sm:px-6 sm:pt-6", e.ui?.header))
|
|
1794
|
-
}, [O(i.$slots, "header", {}, () => [c("div",
|
|
1807
|
+
}, [O(i.$slots, "header", {}, () => [c("div", Di, [e.title ? (w(), a(k(`h${e.headingLevel}`), {
|
|
1795
1808
|
key: 0,
|
|
1796
1809
|
id: n,
|
|
1797
1810
|
class: "text-base font-bold"
|
|
1798
1811
|
}, {
|
|
1799
1812
|
default: V(() => [u(j(e.title), 1)]),
|
|
1800
1813
|
_: 1
|
|
1801
|
-
})) : o("", !0), e.description ? (w(), s("p",
|
|
1814
|
+
})) : o("", !0), e.description ? (w(), s("p", Oi, j(e.description), 1)) : o("", !0)])]), i.$slots.actions ? (w(), s("div", ki, [O(i.$slots, "actions")])) : o("", !0)], 2)) : o("", !0), O(i.$slots, "default")], 2), i.$slots.footer ? (w(), s("div", {
|
|
1802
1815
|
key: 0,
|
|
1803
1816
|
class: y(M(X)("flex flex-wrap justify-end gap-2 border-t border-black/15", d[e.padding], e.ui?.footer))
|
|
1804
1817
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)]),
|
|
1805
1818
|
_: 3
|
|
1806
1819
|
}, 8, ["aria-labelledby", "class"]));
|
|
1807
1820
|
}
|
|
1808
|
-
}),
|
|
1821
|
+
}), ji = { class: "min-w-0 truncate" }, Mi = [
|
|
1809
1822
|
"tabindex",
|
|
1810
1823
|
"aria-label",
|
|
1811
1824
|
"disabled"
|
|
1812
|
-
],
|
|
1825
|
+
], Ni = /* @__PURE__ */ f({
|
|
1813
1826
|
__name: "Chip",
|
|
1814
1827
|
props: {
|
|
1815
1828
|
size: { default: "md" },
|
|
@@ -1842,7 +1855,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1842
1855
|
};
|
|
1843
1856
|
return (t, p) => (w(), s("span", { class: y(M(X)(a, l[e.size], e.removable && u[e.size], e.disabled && "opacity-40", r.class)) }, [
|
|
1844
1857
|
O(t.$slots, "leading"),
|
|
1845
|
-
c("span",
|
|
1858
|
+
c("span", ji, [O(t.$slots, "default")]),
|
|
1846
1859
|
e.removable ? (w(), s("button", {
|
|
1847
1860
|
key: 0,
|
|
1848
1861
|
type: "button",
|
|
@@ -1851,10 +1864,10 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1851
1864
|
disabled: e.disabled,
|
|
1852
1865
|
class: y(M(X)("flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition", "not-disabled:hover:bg-black/10 not-disabled:active:bg-black/15 disabled:cursor-not-allowed", "outline-2 outline-offset-0 outline-transparent focus-visible:outline-focus", f[e.size])),
|
|
1853
1866
|
onClick: p[0] ||= (e) => i("remove")
|
|
1854
|
-
}, [d(M(Pe), { "aria-hidden": "true" })], 10,
|
|
1867
|
+
}, [d(M(Pe), { "aria-hidden": "true" })], 10, Mi)) : o("", !0)
|
|
1855
1868
|
], 2));
|
|
1856
1869
|
}
|
|
1857
|
-
}),
|
|
1870
|
+
}), Pi = ["role", "aria-label"], Fi = { class: "shrink-0" }, Ii = /* @__PURE__ */ f({
|
|
1858
1871
|
__name: "Divider",
|
|
1859
1872
|
props: {
|
|
1860
1873
|
orientation: { default: "horizontal" },
|
|
@@ -1883,12 +1896,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1883
1896
|
"aria-hidden": "true",
|
|
1884
1897
|
class: "h-px flex-1 bg-black/15"
|
|
1885
1898
|
}, null, -1),
|
|
1886
|
-
c("span",
|
|
1899
|
+
c("span", Fi, [O(n.$slots, "default", {}, () => [u(j(e.label), 1)])]),
|
|
1887
1900
|
r[1] ||= c("span", {
|
|
1888
1901
|
"aria-hidden": "true",
|
|
1889
1902
|
class: "h-px flex-1 bg-black/15"
|
|
1890
1903
|
}, null, -1)
|
|
1891
|
-
], 10,
|
|
1904
|
+
], 10, Pi)) : (w(), a(M(Qt), {
|
|
1892
1905
|
key: 1,
|
|
1893
1906
|
orientation: e.orientation,
|
|
1894
1907
|
decorative: e.decorative,
|
|
@@ -1899,7 +1912,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1899
1912
|
"class"
|
|
1900
1913
|
]));
|
|
1901
1914
|
}
|
|
1902
|
-
}),
|
|
1915
|
+
}), Li = ["aria-label"], Ri = { class: "max-w-64 px-3 py-2 text-xs" }, zi = /* @__PURE__ */ f({
|
|
1903
1916
|
__name: "InfoTip",
|
|
1904
1917
|
props: {
|
|
1905
1918
|
text: {},
|
|
@@ -1921,7 +1934,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1921
1934
|
sideOffset: 6
|
|
1922
1935
|
}
|
|
1923
1936
|
}, {
|
|
1924
|
-
content: V(() => [c("p",
|
|
1937
|
+
content: V(() => [c("p", Ri, j(e.text), 1)]),
|
|
1925
1938
|
default: V(() => [c("button", {
|
|
1926
1939
|
type: "button",
|
|
1927
1940
|
"aria-label": e.label,
|
|
@@ -1930,11 +1943,11 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1930
1943
|
}, [d(M(_e), { "aria-hidden": "true" }), c("span", {
|
|
1931
1944
|
id: n,
|
|
1932
1945
|
hidden: ""
|
|
1933
|
-
}, j(e.text), 1)], 10,
|
|
1946
|
+
}, j(e.text), 1)], 10, Li)]),
|
|
1934
1947
|
_: 1
|
|
1935
1948
|
}));
|
|
1936
1949
|
}
|
|
1937
|
-
}),
|
|
1950
|
+
}), Bi = { class: "overflow-hidden" }, Vi = ["id"], Hi = /* @__PURE__ */ f({
|
|
1938
1951
|
__name: "FieldMessage",
|
|
1939
1952
|
props: {
|
|
1940
1953
|
id: {},
|
|
@@ -1957,7 +1970,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1957
1970
|
return (t, i) => (w(), s(n, null, [c("div", {
|
|
1958
1971
|
"aria-hidden": "true",
|
|
1959
1972
|
class: y(M(X)("-mt-1.5 grid transition-[grid-template-rows,visibility] duration-150 ease-out motion-reduce:transition-none", r.value ? "grid-rows-[1fr]" : "invisible grid-rows-[0fr] delay-100"))
|
|
1960
|
-
}, [c("div",
|
|
1973
|
+
}, [c("div", Bi, [c("p", { class: y(M(X)("flex items-center gap-1 pt-1.5 text-xs transition-[translate,opacity,color] ease-out motion-reduce:transition-none [&_svg]:size-3.5 [&_svg]:shrink-0", d.value && f[d.value], r.value ? "duration-150 delay-100" : "-translate-y-1 opacity-0 duration-100")) }, [d.value === "loading" ? (w(), a(Rn, {
|
|
1961
1974
|
key: 0,
|
|
1962
1975
|
size: "sm",
|
|
1963
1976
|
class: "size-3.5"
|
|
@@ -1965,12 +1978,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1965
1978
|
id: e.id,
|
|
1966
1979
|
"aria-live": "polite",
|
|
1967
1980
|
class: "sr-only"
|
|
1968
|
-
}, j(e.text), 9,
|
|
1981
|
+
}, j(e.text), 9, Vi)], 64));
|
|
1969
1982
|
}
|
|
1970
|
-
}),
|
|
1983
|
+
}), Ui = { class: "flex items-center gap-1" }, Wi = ["hidden"], Gi = {
|
|
1971
1984
|
key: 0,
|
|
1972
1985
|
class: "col-start-2 row-start-1 flex h-5 items-center text-xs"
|
|
1973
|
-
},
|
|
1986
|
+
}, Ki = "input, textarea, [role=\"spinbutton\"], [contenteditable=\"true\"]", qi = /* @__PURE__ */ f({
|
|
1974
1987
|
__name: "FormField",
|
|
1975
1988
|
props: {
|
|
1976
1989
|
label: {},
|
|
@@ -1993,7 +2006,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
1993
2006
|
let { t } = K(), n = e, r = P(), l = `${r}-control`, u = `${r}-label`, f = `${r}-helper`, p = `${r}-status`, m = i(() => n.errorText ? "error" : n.status), h = i(() => n.errorText || n.statusText), g = i(() => [n.helper && f, h.value && p].filter(Boolean).join(" ") || void 0);
|
|
1994
2007
|
function _(e) {
|
|
1995
2008
|
let t = e.target;
|
|
1996
|
-
n.disabled || t.closest(`${
|
|
2009
|
+
n.disabled || t.closest(`${Ki}, button`) || (e.preventDefault(), e.currentTarget.querySelector(Ki)?.focus());
|
|
1997
2010
|
}
|
|
1998
2011
|
function v() {
|
|
1999
2012
|
let e = document.getElementById(l);
|
|
@@ -2011,12 +2024,12 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2011
2024
|
loading: ""
|
|
2012
2025
|
};
|
|
2013
2026
|
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", n.class)) }, [c("div", { class: y(M(X)("grid grid-cols-[minmax(0,1fr)_auto]", !e.hideLabel && "gap-y-1.5", r.$slots["label-trailing"] && "gap-x-3")) }, [
|
|
2014
|
-
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
2027
|
+
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", Ui, [c("label", {
|
|
2015
2028
|
id: u,
|
|
2016
2029
|
for: l,
|
|
2017
2030
|
class: "text-sm",
|
|
2018
2031
|
onClick: v
|
|
2019
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
2032
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(zi, {
|
|
2020
2033
|
key: 0,
|
|
2021
2034
|
text: e.helper,
|
|
2022
2035
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -2025,7 +2038,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2025
2038
|
id: f,
|
|
2026
2039
|
hidden: e.helperPlacement === "icon",
|
|
2027
2040
|
class: "text-xs text-black/65"
|
|
2028
|
-
}, j(e.helper), 9,
|
|
2041
|
+
}, j(e.helper), 9, Wi)) : o("", !0)], 2),
|
|
2029
2042
|
c("div", {
|
|
2030
2043
|
class: y(M(X)(b, "col-span-2 row-start-2", m.value && x[m.value], e.disabled && "opacity-40 cursor-not-allowed")),
|
|
2031
2044
|
onPointerdown: _
|
|
@@ -2039,19 +2052,19 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2039
2052
|
}),
|
|
2040
2053
|
O(r.$slots, "trailing")
|
|
2041
2054
|
], 34),
|
|
2042
|
-
r.$slots["label-trailing"] ? (w(), s("div",
|
|
2043
|
-
], 2), d(
|
|
2055
|
+
r.$slots["label-trailing"] ? (w(), s("div", Gi, [O(r.$slots, "label-trailing")])) : o("", !0)
|
|
2056
|
+
], 2), d(Hi, {
|
|
2044
2057
|
id: p,
|
|
2045
2058
|
status: m.value,
|
|
2046
2059
|
text: h.value
|
|
2047
2060
|
}, null, 8, ["status", "text"])], 2));
|
|
2048
2061
|
}
|
|
2049
|
-
}),
|
|
2062
|
+
}), Ji = [
|
|
2050
2063
|
"id",
|
|
2051
2064
|
"disabled",
|
|
2052
2065
|
"aria-invalid",
|
|
2053
2066
|
"aria-describedby"
|
|
2054
|
-
],
|
|
2067
|
+
], Yi = /* @__PURE__ */ f({
|
|
2055
2068
|
inheritAttrs: !1,
|
|
2056
2069
|
__name: "Input",
|
|
2057
2070
|
props: /*@__PURE__*/ g({
|
|
@@ -2083,7 +2096,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2083
2096
|
if (n.maxLength !== void 0 && e > n.maxLength) return t("ui.input.maxLength", { count: n.maxLength });
|
|
2084
2097
|
if (o.value && n.minLength !== void 0 && e > 0 && e < n.minLength) return t("ui.input.minLength", { count: n.minLength });
|
|
2085
2098
|
}), u = i(() => n.status ?? (s.value ? "error" : void 0)), d = i(() => n.statusText ?? s.value);
|
|
2086
|
-
return (t, i) => (w(), a(
|
|
2099
|
+
return (t, i) => (w(), a(qi, {
|
|
2087
2100
|
label: e.label,
|
|
2088
2101
|
helper: e.helper,
|
|
2089
2102
|
"helper-placement": e.helperPlacement,
|
|
@@ -2103,7 +2116,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2103
2116
|
"aria-describedby": a,
|
|
2104
2117
|
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-black/55 disabled:cursor-not-allowed",
|
|
2105
2118
|
onBlur: i[1] ||= (e) => o.value = !0
|
|
2106
|
-
}), null, 16,
|
|
2119
|
+
}), null, 16, Ji), [[L, r.value]])]),
|
|
2107
2120
|
_: 2
|
|
2108
2121
|
}, [t.$slots.leading ? {
|
|
2109
2122
|
name: "leading",
|
|
@@ -2125,7 +2138,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2125
2138
|
"class"
|
|
2126
2139
|
]));
|
|
2127
2140
|
}
|
|
2128
|
-
}),
|
|
2141
|
+
}), Xi = "-ml-3 rounded-l border-r border-black/15", Zi = "-mr-3 rounded-r border-l border-black/15", Qi = /* @__PURE__ */ f({
|
|
2129
2142
|
inheritAttrs: !1,
|
|
2130
2143
|
__name: "InputNumber",
|
|
2131
2144
|
props: /*@__PURE__*/ g({
|
|
@@ -2160,7 +2173,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2160
2173
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
2161
2174
|
"disabled:cursor-not-allowed disabled:[&_svg]:opacity-40!"
|
|
2162
2175
|
];
|
|
2163
|
-
return (t, i) => (w(), a(
|
|
2176
|
+
return (t, i) => (w(), a(qi, {
|
|
2164
2177
|
label: e.label,
|
|
2165
2178
|
helper: e.helper,
|
|
2166
2179
|
"helper-placement": e.helperPlacement,
|
|
@@ -2184,7 +2197,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2184
2197
|
class: "contents"
|
|
2185
2198
|
}, {
|
|
2186
2199
|
default: V(() => [
|
|
2187
|
-
d(M(Ct), { class: y([o,
|
|
2200
|
+
d(M(Ct), { class: y([o, Xi]) }, {
|
|
2188
2201
|
default: V(() => [d(M(De))]),
|
|
2189
2202
|
_: 1
|
|
2190
2203
|
}, 8, ["class"]),
|
|
@@ -2198,7 +2211,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2198
2211
|
"aria-describedby",
|
|
2199
2212
|
"aria-valuetext"
|
|
2200
2213
|
]),
|
|
2201
|
-
d(M(wt), { class: y([o,
|
|
2214
|
+
d(M(wt), { class: y([o, Zi]) }, {
|
|
2202
2215
|
default: V(() => [d(M(Ae))]),
|
|
2203
2216
|
_: 1
|
|
2204
2217
|
}, 8, ["class"])
|
|
@@ -2227,26 +2240,26 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2227
2240
|
"class"
|
|
2228
2241
|
]));
|
|
2229
2242
|
}
|
|
2230
|
-
}),
|
|
2243
|
+
}), $i = { class: "flex items-center" }, ea = ["aria-label", "disabled"], ta = ["aria-label", "disabled"], na = {
|
|
2231
2244
|
key: 2,
|
|
2232
2245
|
class: "px-1.5 py-1 text-sm tabular-nums"
|
|
2233
|
-
},
|
|
2246
|
+
}, ra = {
|
|
2234
2247
|
key: 0,
|
|
2235
2248
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2236
|
-
},
|
|
2249
|
+
}, ia = [
|
|
2237
2250
|
"aria-current",
|
|
2238
2251
|
"aria-pressed",
|
|
2239
2252
|
"disabled",
|
|
2240
2253
|
"onClick"
|
|
2241
|
-
],
|
|
2254
|
+
], aa = {
|
|
2242
2255
|
key: 1,
|
|
2243
2256
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2244
|
-
},
|
|
2257
|
+
}, oa = [
|
|
2245
2258
|
"aria-current",
|
|
2246
2259
|
"aria-pressed",
|
|
2247
2260
|
"disabled",
|
|
2248
2261
|
"onClick"
|
|
2249
|
-
],
|
|
2262
|
+
], sa = /* @__PURE__ */ f({
|
|
2250
2263
|
__name: "Calendar",
|
|
2251
2264
|
props: /*@__PURE__*/ g({
|
|
2252
2265
|
min: {},
|
|
@@ -2392,21 +2405,21 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2392
2405
|
default: V(() => [d(M(de))]),
|
|
2393
2406
|
_: 1
|
|
2394
2407
|
}, 8, ["aria-label", "disabled"])),
|
|
2395
|
-
c("div",
|
|
2408
|
+
c("div", $i, [_.value === "days" ? (w(), s("button", {
|
|
2396
2409
|
key: 0,
|
|
2397
2410
|
type: "button",
|
|
2398
2411
|
class: y(q),
|
|
2399
2412
|
"aria-label": M(t)("ui.calendar.chooseMonth"),
|
|
2400
2413
|
disabled: e.disabled,
|
|
2401
2414
|
onClick: k
|
|
2402
|
-
}, [u(j(C.value) + " ", 1), d(M(ue))], 8,
|
|
2415
|
+
}, [u(j(C.value) + " ", 1), d(M(ue))], 8, ea)) : o("", !0), _.value === "years" ? (w(), s("span", na, j(O.value[0]) + " – " + j(O.value[O.value.length - 1]), 1)) : (w(), s("button", {
|
|
2403
2416
|
key: 1,
|
|
2404
2417
|
type: "button",
|
|
2405
2418
|
class: y(q),
|
|
2406
2419
|
"aria-label": M(t)("ui.calendar.chooseYear"),
|
|
2407
2420
|
disabled: e.disabled,
|
|
2408
2421
|
onClick: N
|
|
2409
|
-
}, [u(j(v.value.year) + " ", 1), d(M(ue))], 8,
|
|
2422
|
+
}, [u(j(v.value.year) + " ", 1), d(M(ue))], 8, ta))]),
|
|
2410
2423
|
_.value === "days" ? (w(), a(M(Ue), {
|
|
2411
2424
|
key: 2,
|
|
2412
2425
|
"as-child": ""
|
|
@@ -2436,7 +2449,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2436
2449
|
]),
|
|
2437
2450
|
_: 1
|
|
2438
2451
|
}),
|
|
2439
|
-
_.value === "months" ? (w(), s("div",
|
|
2452
|
+
_.value === "months" ? (w(), s("div", ra, [(w(!0), s(n, null, D(S.value, (e, t) => (w(), s("button", {
|
|
2440
2453
|
key: e,
|
|
2441
2454
|
type: "button",
|
|
2442
2455
|
class: y(re),
|
|
@@ -2444,7 +2457,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2444
2457
|
"aria-pressed": ee(t + 1),
|
|
2445
2458
|
disabled: R(t + 1),
|
|
2446
2459
|
onClick: (e) => P(t + 1)
|
|
2447
|
-
}, j(e), 9,
|
|
2460
|
+
}, j(e), 9, ia))), 128))])) : _.value === "years" ? (w(), s("div", aa, [(w(!0), s(n, null, D(O.value, (e) => (w(), s("button", {
|
|
2448
2461
|
key: e,
|
|
2449
2462
|
type: "button",
|
|
2450
2463
|
class: y(re),
|
|
@@ -2452,7 +2465,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2452
2465
|
"aria-pressed": W(e),
|
|
2453
2466
|
disabled: B(e),
|
|
2454
2467
|
onClick: (t) => I(e)
|
|
2455
|
-
}, j(e), 9,
|
|
2468
|
+
}, j(e), 9, oa))), 128))])) : o("", !0),
|
|
2456
2469
|
(w(!0), s(n, null, D(_.value === "days" ? i : [], (e) => (w(), a(M(Le), {
|
|
2457
2470
|
key: e.value.toString(),
|
|
2458
2471
|
class: "mt-3 border-collapse select-none"
|
|
@@ -2509,7 +2522,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2509
2522
|
"class"
|
|
2510
2523
|
]));
|
|
2511
2524
|
}
|
|
2512
|
-
}),
|
|
2525
|
+
}), ca = {
|
|
2513
2526
|
monday: 1,
|
|
2514
2527
|
mon: 1,
|
|
2515
2528
|
tuesday: 2,
|
|
@@ -2528,7 +2541,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2528
2541
|
sat: 6,
|
|
2529
2542
|
sunday: 7,
|
|
2530
2543
|
sun: 7
|
|
2531
|
-
}, Q = `(${Object.keys(
|
|
2544
|
+
}, Q = `(${Object.keys(ca).join("|")})`, la = {
|
|
2532
2545
|
january: 1,
|
|
2533
2546
|
jan: 1,
|
|
2534
2547
|
february: 2,
|
|
@@ -2553,7 +2566,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2553
2566
|
nov: 11,
|
|
2554
2567
|
december: 12,
|
|
2555
2568
|
dec: 12
|
|
2556
|
-
},
|
|
2569
|
+
}, ua = `(${Object.keys(la).sort((e, t) => t.length - e.length).join("|")})`, da = {
|
|
2557
2570
|
a: 1,
|
|
2558
2571
|
an: 1,
|
|
2559
2572
|
one: 1,
|
|
@@ -2577,7 +2590,7 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2577
2590
|
nineteen: 19,
|
|
2578
2591
|
twenty: 20,
|
|
2579
2592
|
thirty: 30
|
|
2580
|
-
},
|
|
2593
|
+
}, fa = `(\\d+|${Object.keys(da).join("|")})`, pa = "(day|week|fortnight|month|year)s?", ma = {
|
|
2581
2594
|
first: 1,
|
|
2582
2595
|
second: 2,
|
|
2583
2596
|
third: 3,
|
|
@@ -2599,37 +2612,37 @@ var Sr = ["data-collapsed"], Cr = ["aria-label"], wr = ["data-level"], Tr = {
|
|
|
2599
2612
|
nineteenth: 19,
|
|
2600
2613
|
twentieth: 20,
|
|
2601
2614
|
thirtieth: 30
|
|
2602
|
-
},
|
|
2603
|
-
function
|
|
2615
|
+
}, ha = Object.keys(ma).join("|");
|
|
2616
|
+
function ga(e) {
|
|
2604
2617
|
return new Date(e.year, e.month - 1, e.day).getDay() || 7;
|
|
2605
2618
|
}
|
|
2606
|
-
function
|
|
2607
|
-
return e.subtract({ days:
|
|
2619
|
+
function _a(e) {
|
|
2620
|
+
return e.subtract({ days: ga(e) - 1 });
|
|
2608
2621
|
}
|
|
2609
2622
|
function $(e, t, n) {
|
|
2610
2623
|
if (!Number.isInteger(e) || t < 1 || t > 12 || n < 1) return;
|
|
2611
2624
|
let r = new gn(e, t, 1);
|
|
2612
2625
|
if (!(n > r.calendar.getDaysInMonth(r))) return new gn(e, t, n);
|
|
2613
2626
|
}
|
|
2614
|
-
function
|
|
2627
|
+
function va(e, t, n, r) {
|
|
2615
2628
|
if (r === -1) {
|
|
2616
2629
|
let r = _n(new gn(e, t, 1));
|
|
2617
|
-
return r.subtract({ days: (
|
|
2630
|
+
return r.subtract({ days: (ga(r) - n + 7) % 7 });
|
|
2618
2631
|
}
|
|
2619
|
-
let i = new gn(e, t, 1), a = i.add({ days: (n -
|
|
2632
|
+
let i = new gn(e, t, 1), a = i.add({ days: (n - ga(i) + 7) % 7 + (r - 1) * 7 });
|
|
2620
2633
|
return a.month === t ? a : void 0;
|
|
2621
2634
|
}
|
|
2622
|
-
function
|
|
2635
|
+
function ya(e) {
|
|
2623
2636
|
let t = e % 19, n = Math.floor(e / 100), r = e % 100, i = Math.floor(n / 4), a = n % 4, o = Math.floor((n + 8) / 25), s = Math.floor((n - o + 1) / 3), c = (19 * t + n - i - s + 15) % 30, l = Math.floor(r / 4), u = r % 4, d = (32 + 2 * a + 2 * l - c - u) % 7, f = Math.floor((t + 11 * c + 22 * d) / 451), p = Math.floor((c + d - 7 * f + 114) / 31), m = (c + d - 7 * f + 114) % 31 + 1;
|
|
2624
2637
|
return new gn(e, p, m);
|
|
2625
2638
|
}
|
|
2626
|
-
function
|
|
2639
|
+
function ba(e, t) {
|
|
2627
2640
|
if (e.length === 4) return Number(e);
|
|
2628
2641
|
if (e.length !== 2) return NaN;
|
|
2629
2642
|
let n = Number(e);
|
|
2630
2643
|
return n <= t.year % 100 ? 2e3 + n : 1900 + n;
|
|
2631
2644
|
}
|
|
2632
|
-
var
|
|
2645
|
+
var xa = [
|
|
2633
2646
|
["(?:christmas|xmas) eve", (e) => $(e, 12, 24)],
|
|
2634
2647
|
["(?:christmas|xmas)(?: day)?", (e) => $(e, 12, 25)],
|
|
2635
2648
|
["boxing day", (e) => $(e, 12, 26)],
|
|
@@ -2637,16 +2650,16 @@ var ba = [
|
|
|
2637
2650
|
["new years?(?: day)?", (e) => $(e, 1, 1)],
|
|
2638
2651
|
["valentines(?: day)?", (e) => $(e, 2, 14)],
|
|
2639
2652
|
["(?:st )?(?:patricks|paddys) day", (e) => $(e, 3, 17)],
|
|
2640
|
-
["good friday", (e) =>
|
|
2641
|
-
["easter monday", (e) =>
|
|
2642
|
-
["easter(?: sunday| day)?", (e) =>
|
|
2643
|
-
["(?:mothers day|mothering sunday)", (e) =>
|
|
2644
|
-
["fathers day", (e) =>
|
|
2653
|
+
["good friday", (e) => ya(e).subtract({ days: 2 })],
|
|
2654
|
+
["easter monday", (e) => ya(e).add({ days: 1 })],
|
|
2655
|
+
["easter(?: sunday| day)?", (e) => ya(e)],
|
|
2656
|
+
["(?:mothers day|mothering sunday)", (e) => ya(e).subtract({ weeks: 3 })],
|
|
2657
|
+
["fathers day", (e) => va(e, 6, 7, 3)],
|
|
2645
2658
|
["halloween", (e) => $(e, 10, 31)],
|
|
2646
2659
|
["(?:bonfire night|guy fawkes(?: night| day)?)", (e) => $(e, 11, 5)],
|
|
2647
2660
|
["(?:remembrance|armistice) day", (e) => $(e, 11, 11)]
|
|
2648
2661
|
];
|
|
2649
|
-
function
|
|
2662
|
+
function Sa(e, t, n) {
|
|
2650
2663
|
let r = e.filter((e) => !!e).sort((e, t) => e.compare(t));
|
|
2651
2664
|
return n === "future" ? r.find((e) => e.compare(t) >= 0) : n === "past" ? [...r].reverse().find((e) => e.compare(t) <= 0) : r.reduce((e, n) => {
|
|
2652
2665
|
if (!e) return n;
|
|
@@ -2654,14 +2667,14 @@ function xa(e, t, n) {
|
|
|
2654
2667
|
return r < i || r === i && n.compare(t) > 0 ? n : e;
|
|
2655
2668
|
}, void 0);
|
|
2656
2669
|
}
|
|
2657
|
-
function
|
|
2670
|
+
function Ca(e, t, n, r, i) {
|
|
2658
2671
|
if (!e) return n.yearValue === void 0 ? r.add(t) : void 0;
|
|
2659
2672
|
switch (e.kind) {
|
|
2660
2673
|
case "date": return n.yearValue === void 0 ? e.date.add(t) : void 0;
|
|
2661
2674
|
case "yearless": return n.yearValue === void 0 ? n.year || t.years ? e.resolve(r.year + t.years)?.add({
|
|
2662
2675
|
...t,
|
|
2663
2676
|
years: 0
|
|
2664
|
-
}) :
|
|
2677
|
+
}) : Sa(Array.from({ length: 9 }, (e, t) => r.year - 4 + t).map(e.resolve), r, i)?.add(t) : e.resolve(n.yearValue + t.years)?.add({
|
|
2665
2678
|
...t,
|
|
2666
2679
|
years: 0
|
|
2667
2680
|
});
|
|
@@ -2674,19 +2687,19 @@ function Sa(e, t, n, r, i) {
|
|
|
2674
2687
|
months: 0
|
|
2675
2688
|
});
|
|
2676
2689
|
}
|
|
2677
|
-
return
|
|
2690
|
+
return Sa([
|
|
2678
2691
|
-1,
|
|
2679
2692
|
0,
|
|
2680
2693
|
1
|
|
2681
2694
|
].map((e) => xn(r).add({ months: e })).map((t) => $(t.year, t.month, e.day)), r, i)?.add(t);
|
|
2682
2695
|
case "weekday": {
|
|
2683
2696
|
if (n.yearValue !== void 0) return;
|
|
2684
|
-
let a = (e.weekday -
|
|
2697
|
+
let a = (e.weekday - ga(r) + 7) % 7 || 7, o = (ga(r) - e.weekday + 7) % 7 || 7, s = r.add({ days: a }), c = r.subtract({ days: o });
|
|
2685
2698
|
return (i === "past" || i === "nearest" && o < a ? c : s).add(t);
|
|
2686
2699
|
}
|
|
2687
2700
|
}
|
|
2688
2701
|
}
|
|
2689
|
-
function
|
|
2702
|
+
function wa(e, t, n) {
|
|
2690
2703
|
let r = e.trim(), i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r);
|
|
2691
2704
|
if (i) {
|
|
2692
2705
|
let e = $(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
@@ -2712,29 +2725,29 @@ function Ca(e, t, n) {
|
|
|
2712
2725
|
kind: "yearless",
|
|
2713
2726
|
resolve: (e) => $(e, o, i)
|
|
2714
2727
|
};
|
|
2715
|
-
let s = $(
|
|
2728
|
+
let s = $(ba(r.year, t), o, i);
|
|
2716
2729
|
return s && {
|
|
2717
2730
|
kind: "date",
|
|
2718
2731
|
date: s
|
|
2719
2732
|
};
|
|
2720
2733
|
}
|
|
2721
2734
|
let o = r.replace(/(\d)(st|nd|rd|th)\b/g, "$1").replace(/\bof\b/g, " ").replace(/[,/.\-]/g, " ").replace(/\s+/g, " ").trim(), s = (e, n, r) => {
|
|
2722
|
-
let i = Number(e), a =
|
|
2735
|
+
let i = Number(e), a = la[n];
|
|
2723
2736
|
if (r === void 0) return {
|
|
2724
2737
|
kind: "yearless",
|
|
2725
2738
|
resolve: (e) => $(e, a, i)
|
|
2726
2739
|
};
|
|
2727
|
-
let o = $(
|
|
2740
|
+
let o = $(ba(r, t), a, i);
|
|
2728
2741
|
return o && {
|
|
2729
2742
|
kind: "date",
|
|
2730
2743
|
date: o
|
|
2731
2744
|
};
|
|
2732
2745
|
}, c;
|
|
2733
|
-
if (c = RegExp(`^(\\d{1,2}) ${
|
|
2734
|
-
if (c = RegExp(`^${
|
|
2735
|
-
if (c = RegExp(`^(\\d{4}) ${
|
|
2736
|
-
if (c = RegExp(`^${
|
|
2737
|
-
let e =
|
|
2746
|
+
if (c = RegExp(`^(\\d{1,2}) ${ua}(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[1], c[2], c[3]);
|
|
2747
|
+
if (c = RegExp(`^${ua} (\\d{1,2})(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[2], c[1], c[3]);
|
|
2748
|
+
if (c = RegExp(`^(\\d{4}) ${ua} (\\d{1,2})$`).exec(o)) return s(c[3], c[2], c[1]);
|
|
2749
|
+
if (c = RegExp(`^${ua}(?: (\\d{4}))?$`).exec(o)) {
|
|
2750
|
+
let e = la[c[1]];
|
|
2738
2751
|
if (c[2]) {
|
|
2739
2752
|
let t = $(Number(c[2]), e, 1);
|
|
2740
2753
|
return t && {
|
|
@@ -2755,22 +2768,22 @@ function Ca(e, t, n) {
|
|
|
2755
2768
|
} : void 0;
|
|
2756
2769
|
}
|
|
2757
2770
|
}
|
|
2758
|
-
function
|
|
2771
|
+
function Ta(e) {
|
|
2759
2772
|
return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
|
|
2760
2773
|
1: "st",
|
|
2761
2774
|
2: "nd",
|
|
2762
2775
|
3: "rd"
|
|
2763
2776
|
}[e % 10] ?? "th"}`;
|
|
2764
2777
|
}
|
|
2765
|
-
function
|
|
2766
|
-
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${
|
|
2778
|
+
function Ea(e) {
|
|
2779
|
+
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${ha})\\b`, "g"), (e, t, n) => Ta((t === "twenty" ? 20 : 30) + ma[n])).replace(RegExp(`\\b(${ha})\\b`, "g"), (e) => Ta(ma[e])).replace(/\b(?:a )?couple(?: of)?\b/g, "2").replace(/\b(?:a )?few\b/g, "3").replace(/\b(?:at |@ ?)?\d{1,2}(?::\d{2})? ?(?:am|pm)\b/g, " ").replace(/\b(?:at |@ ?)\d{1,2}(?::\d{2})?\b(?![/.\-]\d)/g, " ").replace(/\b\d{1,2}:\d{2}\b/g, " ").replace(/\b(?:at )?(?:noon|midday|midnight)\b/g, " ").replace(/\b(?:tonight|this (?:morning|afternoon|evening)|eod|end of (?:the )?day)\b/g, " today ").replace(/\b(?:in the )?(?:morning|afternoon|evening|(?<!bonfire |fawkes )night)\b/g, " ").replace(/\bthe\b/g, " ").replace(/\s+/g, " ").trim();
|
|
2767
2780
|
}
|
|
2768
|
-
function
|
|
2781
|
+
function Da(e, t) {
|
|
2769
2782
|
let { today: n, order: r = [
|
|
2770
2783
|
"day",
|
|
2771
2784
|
"month",
|
|
2772
2785
|
"year"
|
|
2773
|
-
], prefer: i = "future" } = t, a =
|
|
2786
|
+
], prefer: i = "future" } = t, a = Ea(e);
|
|
2774
2787
|
if (!a) return;
|
|
2775
2788
|
let o = ` ${a} `, s = !1, c = !1, l = [], u = !1, d = {
|
|
2776
2789
|
days: 0,
|
|
@@ -2780,7 +2793,7 @@ function Ea(e, t) {
|
|
|
2780
2793
|
}, f = {
|
|
2781
2794
|
year: !1,
|
|
2782
2795
|
month: !1
|
|
2783
|
-
}, p =
|
|
2796
|
+
}, p = _a(n);
|
|
2784
2797
|
function m(e) {
|
|
2785
2798
|
let t = RegExp(` ${e} `).exec(o);
|
|
2786
2799
|
return t && (o = o.replace(t[0], " "), s = !0), t;
|
|
@@ -2790,18 +2803,18 @@ function Ea(e, t) {
|
|
|
2790
2803
|
}, g = (e) => e && {
|
|
2791
2804
|
kind: "date",
|
|
2792
2805
|
date: e
|
|
2793
|
-
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) =>
|
|
2794
|
-
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(_n(n))), m("eoy") && h(g(new gn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${
|
|
2795
|
-
let e = x[1] === "last" ? -1 : Number(x[1][0]), t =
|
|
2806
|
+
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) => da[e] ?? Number(e), b = (e) => n.add({ days: (e - ga(n) + 7) % 7 || 7 }), x;
|
|
2807
|
+
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(_n(n))), m("eoy") && h(g(new gn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${ua}(?: (\\d{4}))?)`)) {
|
|
2808
|
+
let e = x[1] === "last" ? -1 : Number(x[1][0]), t = ca[x[2]];
|
|
2796
2809
|
if (x[4]) {
|
|
2797
|
-
let n =
|
|
2798
|
-
x[5] ? h(g(
|
|
2810
|
+
let n = la[x[4]];
|
|
2811
|
+
x[5] ? h(g(va(Number(x[5]), n, t, e))) : h({
|
|
2799
2812
|
kind: "yearless",
|
|
2800
|
-
resolve: (r) =>
|
|
2813
|
+
resolve: (r) => va(r, n, t, e)
|
|
2801
2814
|
});
|
|
2802
2815
|
} else {
|
|
2803
2816
|
let r = x[3] === "next" ? 1 : x[3] === "last" ? -1 : 0, i = xn(n).add({ months: r });
|
|
2804
|
-
h(g(
|
|
2817
|
+
h(g(va(i.year, i.month, t, e)));
|
|
2805
2818
|
}
|
|
2806
2819
|
}
|
|
2807
2820
|
if (x = m("(start|beginning|middle|mid|end) (?:of )?(?:(this|next|last) )?(week|month|year)")) {
|
|
@@ -2815,8 +2828,8 @@ function Ea(e, t) {
|
|
|
2815
2828
|
h(g(t === "start" ? new gn(r, 1, 1) : t === "mid" ? new gn(r, 7, 1) : new gn(r, 12, 31)));
|
|
2816
2829
|
}
|
|
2817
2830
|
}
|
|
2818
|
-
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${
|
|
2819
|
-
let e = x[1], t =
|
|
2831
|
+
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${ua}(?: (\\d{4}))?`)) {
|
|
2832
|
+
let e = x[1], t = la[x[2]], n = (n) => [
|
|
2820
2833
|
"start",
|
|
2821
2834
|
"beginning",
|
|
2822
2835
|
"early"
|
|
@@ -2833,38 +2846,38 @@ function Ea(e, t) {
|
|
|
2833
2846
|
kind: "weekday",
|
|
2834
2847
|
weekday: 6
|
|
2835
2848
|
});
|
|
2836
|
-
for (let [e, t] of
|
|
2849
|
+
for (let [e, t] of xa) m(e) && h({
|
|
2837
2850
|
kind: "yearless",
|
|
2838
2851
|
resolve: t
|
|
2839
2852
|
});
|
|
2840
|
-
if ((x = m(`${Q} after next`)) && h(g(b(
|
|
2853
|
+
if ((x = m(`${Q} after next`)) && h(g(b(ca[x[1]]).add({ weeks: 1 }))), (x = m(`${Q} (week|fortnight)`)) && h(g(b(ca[x[1]]).add({ weeks: x[2] === "fortnight" ? 2 : 1 }))), x = m(`${fa} ${pa} on ${Q}`)) {
|
|
2841
2854
|
let [e, t] = v(x[2]);
|
|
2842
|
-
h(g(b(
|
|
2855
|
+
h(g(b(ca[x[3]]).add({ [e]: y(x[1]) * t })));
|
|
2843
2856
|
}
|
|
2844
|
-
if (x = m(`${
|
|
2857
|
+
if (x = m(`${fa} ${pa} (today|tomorrow|tmrw|tmr)`)) {
|
|
2845
2858
|
let [e, t] = v(x[2]);
|
|
2846
2859
|
h(g((x[3] === "today" ? n : n.add({ days: 1 })).add({ [e]: y(x[1]) * t })));
|
|
2847
2860
|
}
|
|
2848
2861
|
for ((x = m(`(?:next week ${Q}|${Q} next week|next ${Q})`)) && h(g(p.add({
|
|
2849
2862
|
weeks: 1,
|
|
2850
|
-
days:
|
|
2851
|
-
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days:
|
|
2863
|
+
days: ca[_(x)] - 1
|
|
2864
|
+
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days: ca[_(x)] - 1 }))), (x = m(`(?:this week ${Q}|${Q} this week|this ${Q})`)) && h(g(p.add({ days: ca[_(x)] - 1 }))), (x = m(`last ${Q}`)) && h(g(n.subtract({ days: (ga(n) - ca[x[1]] + 7) % 7 || 7 }))), m("day after (?:tomorrow|tmrw|tmr)") && h(g(n.add({ days: 2 }))), m("day before yesterday") && h(g(n.subtract({ days: 2 }))), m("(?:tomorrow|tmrw|tmr|tmw|tomoz)") && h(g(n.add({ days: 1 }))), m("(?:yesterday|yday|yest)") && h(g(n.subtract({ days: 1 }))), m("(?:today|now|tdy)") && h(g(n)), (x = m(`(?:on )?${Q}`)) && h({
|
|
2852
2865
|
kind: "weekday",
|
|
2853
|
-
weekday:
|
|
2854
|
-
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${
|
|
2866
|
+
weekday: ca[x[1]]
|
|
2867
|
+
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${pa}`);) {
|
|
2855
2868
|
let [e, t] = v(x[2]);
|
|
2856
2869
|
d[e] += (x[1] === "next" ? 1 : -1) * t;
|
|
2857
2870
|
}
|
|
2858
2871
|
let S = !1;
|
|
2859
|
-
for (; x = m(`in ${
|
|
2872
|
+
for (; x = m(`in ${fa} ${pa}`);) {
|
|
2860
2873
|
let [e, t] = v(x[2]);
|
|
2861
2874
|
d[e] += y(x[1]) * t, S = !0;
|
|
2862
2875
|
}
|
|
2863
|
-
for (; S && (x = m(`(?:and )?${
|
|
2876
|
+
for (; S && (x = m(`(?:and )?${fa} ${pa}(?! (?:ago|before|earlier|from|after|later))`));) {
|
|
2864
2877
|
let [e, t] = v(x[2]);
|
|
2865
2878
|
d[e] += y(x[1]) * t;
|
|
2866
2879
|
}
|
|
2867
|
-
for (; x = m(`${
|
|
2880
|
+
for (; x = m(`${fa} ${pa} (ago|before|earlier|from|after|later)`);) {
|
|
2868
2881
|
let [e, t] = v(x[2]), n = [
|
|
2869
2882
|
"ago",
|
|
2870
2883
|
"before",
|
|
@@ -2875,24 +2888,24 @@ function Ea(e, t) {
|
|
|
2875
2888
|
for (; m("(?:on|of|at|by|for)"););
|
|
2876
2889
|
let C = o.trim();
|
|
2877
2890
|
if (s && /^\d{4}$/.test(C) && (f.yearValue = Number(C), C = ""), C) {
|
|
2878
|
-
let e =
|
|
2891
|
+
let e = wa(C, n, r);
|
|
2879
2892
|
if (!e) return;
|
|
2880
2893
|
l.length === 1 && u && l.pop(), l.push(e);
|
|
2881
2894
|
} else if (!s) return;
|
|
2882
|
-
if (!(c || l.length > 1)) return
|
|
2895
|
+
if (!(c || l.length > 1)) return Ca(l[0], d, f, n, i);
|
|
2883
2896
|
}
|
|
2884
2897
|
// src/components/InputDate/InputDate.vue?vue&type=script&setup=true&lang.ts
|
|
2885
|
-
var
|
|
2898
|
+
var Oa = [
|
|
2886
2899
|
"id",
|
|
2887
2900
|
"placeholder",
|
|
2888
2901
|
"disabled",
|
|
2889
2902
|
"aria-invalid",
|
|
2890
2903
|
"aria-describedby"
|
|
2891
|
-
],
|
|
2904
|
+
], ka = {
|
|
2892
2905
|
key: 0,
|
|
2893
2906
|
"aria-hidden": "true",
|
|
2894
2907
|
class: "shrink-0 tabular-nums text-black/55"
|
|
2895
|
-
},
|
|
2908
|
+
}, Aa = /* @__PURE__ */ f({
|
|
2896
2909
|
inheritAttrs: !1,
|
|
2897
2910
|
__name: "InputDate",
|
|
2898
2911
|
props: /*@__PURE__*/ g({
|
|
@@ -2951,7 +2964,7 @@ var Da = [
|
|
|
2951
2964
|
return g.value.format(new Date(e.year, e.month - 1, e.day));
|
|
2952
2965
|
}
|
|
2953
2966
|
function D(e) {
|
|
2954
|
-
return
|
|
2967
|
+
return Da(e, {
|
|
2955
2968
|
today: Cn(vn()),
|
|
2956
2969
|
order: b.value,
|
|
2957
2970
|
prefer: n.prefer
|
|
@@ -2996,7 +3009,7 @@ var Da = [
|
|
|
2996
3009
|
"data-[state=open]:brightness-90 disabled:cursor-not-allowed",
|
|
2997
3010
|
"outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
2998
3011
|
];
|
|
2999
|
-
return (i, l) => (w(), a(
|
|
3012
|
+
return (i, l) => (w(), a(qi, {
|
|
3000
3013
|
label: e.label,
|
|
3001
3014
|
helper: e.helper,
|
|
3002
3015
|
"helper-placement": e.helperPlacement,
|
|
@@ -3027,8 +3040,8 @@ var Da = [
|
|
|
3027
3040
|
onInput: P,
|
|
3028
3041
|
onBlur: I,
|
|
3029
3042
|
onKeydown: U(L, ["enter"])
|
|
3030
|
-
}), null, 16,
|
|
3031
|
-
k.value ? (w(), s("span",
|
|
3043
|
+
}), null, 16, Oa), [[R, O.value]]),
|
|
3044
|
+
k.value ? (w(), s("span", ka, j(k.value), 1)) : o("", !0),
|
|
3032
3045
|
d(M(lt), {
|
|
3033
3046
|
"aria-label": M(t)("ui.inputDate.openCalendar"),
|
|
3034
3047
|
class: y(q)
|
|
@@ -3041,7 +3054,7 @@ var Da = [
|
|
|
3041
3054
|
align: "end",
|
|
3042
3055
|
class: y([M(Kn), "p-3"])
|
|
3043
3056
|
}, {
|
|
3044
|
-
default: V(() => [d(
|
|
3057
|
+
default: V(() => [d(sa, {
|
|
3045
3058
|
"model-value": r.value,
|
|
3046
3059
|
min: e.min,
|
|
3047
3060
|
max: e.max,
|
|
@@ -3071,7 +3084,7 @@ var Da = [
|
|
|
3071
3084
|
"class"
|
|
3072
3085
|
]));
|
|
3073
3086
|
}
|
|
3074
|
-
}),
|
|
3087
|
+
}), ja = /* @__PURE__ */ f({
|
|
3075
3088
|
__name: "Tooltip",
|
|
3076
3089
|
props: {
|
|
3077
3090
|
text: {},
|
|
@@ -3122,7 +3135,7 @@ var Da = [
|
|
|
3122
3135
|
_: 3
|
|
3123
3136
|
}));
|
|
3124
3137
|
}
|
|
3125
|
-
}),
|
|
3138
|
+
}), Ma = { class: "-mx-3 -my-2 flex min-w-0 flex-1 flex-col self-stretch" }, Na = ["aria-label", "aria-controls"], Pa = /* @__PURE__ */ f({
|
|
3126
3139
|
__name: "InputRichText",
|
|
3127
3140
|
props: /*@__PURE__*/ g({
|
|
3128
3141
|
label: {},
|
|
@@ -3229,7 +3242,7 @@ var Da = [
|
|
|
3229
3242
|
toggle: () => l.value?.chain().focus().toggleUnderline().run()
|
|
3230
3243
|
}
|
|
3231
3244
|
], v = "min-h-24 max-h-80 overflow-y-auto px-3 py-2 text-sm pointer-coarse:text-base outline-none cursor-text [&_p+p]:mt-2 [&_p.is-editor-empty:first-child]:before:pointer-events-none [&_p.is-editor-empty:first-child]:before:float-left [&_p.is-editor-empty:first-child]:before:h-0 [&_p.is-editor-empty:first-child]:before:text-black/55 [&_p.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]";
|
|
3232
|
-
return (i, o) => (w(), a(
|
|
3245
|
+
return (i, o) => (w(), a(qi, {
|
|
3233
3246
|
label: e.label,
|
|
3234
3247
|
helper: e.helper,
|
|
3235
3248
|
"helper-placement": e.helperPlacement,
|
|
@@ -3240,14 +3253,14 @@ var Da = [
|
|
|
3240
3253
|
disabled: e.disabled,
|
|
3241
3254
|
class: y(r.class)
|
|
3242
3255
|
}, {
|
|
3243
|
-
default: V((r) => [c("div",
|
|
3256
|
+
default: V((r) => [c("div", Ma, [
|
|
3244
3257
|
c("div", {
|
|
3245
3258
|
role: "toolbar",
|
|
3246
3259
|
"aria-label": M(t)("ui.inputRichText.formattingFor", { label: e.label }),
|
|
3247
3260
|
"aria-controls": r.id,
|
|
3248
3261
|
class: "flex items-center gap-0.5 border-b border-black/15 px-1.5 py-1 [&_svg]:opacity-100!",
|
|
3249
3262
|
onMousedown: o[0] ||= ee(() => {}, ["prevent"])
|
|
3250
|
-
}, [(w(), s(n, null, D(_, (t) => d(
|
|
3263
|
+
}, [(w(), s(n, null, D(_, (t) => d(ja, {
|
|
3251
3264
|
key: t.name,
|
|
3252
3265
|
text: `${t.label} (${M(g)}${t.key})`,
|
|
3253
3266
|
disabled: e.disabled
|
|
@@ -3273,7 +3286,7 @@ var Da = [
|
|
|
3273
3286
|
"onClick"
|
|
3274
3287
|
])]),
|
|
3275
3288
|
_: 2
|
|
3276
|
-
}, 1032, ["text", "disabled"])), 64))], 40,
|
|
3289
|
+
}, 1032, ["text", "disabled"])), 64))], 40, Na),
|
|
3277
3290
|
d(M(m), { ids: r }, null, 8, ["ids"]),
|
|
3278
3291
|
d(M(wn), {
|
|
3279
3292
|
editor: M(l),
|
|
@@ -3293,18 +3306,18 @@ var Da = [
|
|
|
3293
3306
|
"class"
|
|
3294
3307
|
]));
|
|
3295
3308
|
}
|
|
3296
|
-
}),
|
|
3309
|
+
}), Fa = [
|
|
3297
3310
|
"id",
|
|
3298
3311
|
"type",
|
|
3299
3312
|
"autocomplete",
|
|
3300
3313
|
"disabled",
|
|
3301
3314
|
"aria-invalid",
|
|
3302
3315
|
"aria-describedby"
|
|
3303
|
-
],
|
|
3316
|
+
], Ia = [
|
|
3304
3317
|
"aria-controls",
|
|
3305
3318
|
"aria-pressed",
|
|
3306
3319
|
"disabled"
|
|
3307
|
-
],
|
|
3320
|
+
], La = { class: "sr-only" }, Ra = /* @__PURE__ */ f({
|
|
3308
3321
|
inheritAttrs: !1,
|
|
3309
3322
|
__name: "InputPassword",
|
|
3310
3323
|
props: /*@__PURE__*/ g({
|
|
@@ -3343,7 +3356,7 @@ var Da = [
|
|
|
3343
3356
|
"not-disabled:hover:brightness-90 not-disabled:active:brightness-80 [&_svg]:opacity-100!",
|
|
3344
3357
|
"outline-none focus-visible:bg-black/5 disabled:cursor-not-allowed"
|
|
3345
3358
|
];
|
|
3346
|
-
return (i, o) => (w(), a(
|
|
3359
|
+
return (i, o) => (w(), a(qi, {
|
|
3347
3360
|
label: e.label,
|
|
3348
3361
|
helper: e.helper,
|
|
3349
3362
|
"helper-placement": e.helperPlacement,
|
|
@@ -3372,7 +3385,7 @@ var Da = [
|
|
|
3372
3385
|
onKeydown: h,
|
|
3373
3386
|
onKeyup: h,
|
|
3374
3387
|
onBlur: o[1] ||= (e) => m.value = !1
|
|
3375
|
-
}), null, 16,
|
|
3388
|
+
}), null, 16, Fa), [[L, r.value]]), c("button", {
|
|
3376
3389
|
type: "button",
|
|
3377
3390
|
class: y(v),
|
|
3378
3391
|
"aria-controls": n,
|
|
@@ -3380,13 +3393,13 @@ var Da = [
|
|
|
3380
3393
|
disabled: e.disabled,
|
|
3381
3394
|
onPointerdown: o[2] ||= ee(() => {}, ["prevent"]),
|
|
3382
3395
|
onClick: o[3] ||= (e) => d.value = !d.value
|
|
3383
|
-
}, [c("span",
|
|
3396
|
+
}, [c("span", La, j(M(t)("ui.inputPassword.show")), 1), d.value ? (w(), a(M(Y), {
|
|
3384
3397
|
key: 0,
|
|
3385
3398
|
"aria-hidden": "true"
|
|
3386
3399
|
})) : (w(), a(M(xe), {
|
|
3387
3400
|
key: 1,
|
|
3388
3401
|
"aria-hidden": "true"
|
|
3389
|
-
}))], 40,
|
|
3402
|
+
}))], 40, Ia)]),
|
|
3390
3403
|
_: 2
|
|
3391
3404
|
}, [i.$slots.leading ? {
|
|
3392
3405
|
name: "leading",
|
|
@@ -3408,7 +3421,7 @@ var Da = [
|
|
|
3408
3421
|
"class"
|
|
3409
3422
|
]));
|
|
3410
3423
|
}
|
|
3411
|
-
}),
|
|
3424
|
+
}), za = { class: "flex flex-col gap-0.5" }, Ba = { class: "flex items-center gap-1" }, Va = ["for"], Ha = ["hidden"], Ua = /* @__PURE__ */ f({
|
|
3412
3425
|
__name: "InputCode",
|
|
3413
3426
|
props: /*@__PURE__*/ g({
|
|
3414
3427
|
label: {},
|
|
@@ -3451,11 +3464,11 @@ var Da = [
|
|
|
3451
3464
|
loading: ""
|
|
3452
3465
|
};
|
|
3453
3466
|
return (t, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", l.class)) }, [
|
|
3454
|
-
c("div",
|
|
3467
|
+
c("div", za, [c("div", Ba, [c("label", {
|
|
3455
3468
|
id: m,
|
|
3456
3469
|
for: `${M(p)}-0`,
|
|
3457
3470
|
class: "text-sm"
|
|
3458
|
-
}, j(e.label), 9,
|
|
3471
|
+
}, j(e.label), 9, Va), e.helper && e.helperPlacement === "icon" ? (w(), a(zi, {
|
|
3459
3472
|
key: 0,
|
|
3460
3473
|
text: e.helper,
|
|
3461
3474
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -3464,7 +3477,7 @@ var Da = [
|
|
|
3464
3477
|
id: h,
|
|
3465
3478
|
hidden: e.helperPlacement === "icon",
|
|
3466
3479
|
class: "text-xs text-black/65"
|
|
3467
|
-
}, j(e.helper), 9,
|
|
3480
|
+
}, j(e.helper), 9, Ha)) : o("", !0)]),
|
|
3468
3481
|
d(M(Ot), {
|
|
3469
3482
|
"model-value": x.value,
|
|
3470
3483
|
type: e.alphanumeric ? "text" : "number",
|
|
@@ -3507,32 +3520,32 @@ var Da = [
|
|
|
3507
3520
|
"disabled",
|
|
3508
3521
|
"class"
|
|
3509
3522
|
]),
|
|
3510
|
-
d(
|
|
3523
|
+
d(Hi, {
|
|
3511
3524
|
id: g,
|
|
3512
3525
|
status: _.value,
|
|
3513
3526
|
text: v.value
|
|
3514
3527
|
}, null, 8, ["status", "text"])
|
|
3515
3528
|
], 2));
|
|
3516
3529
|
}
|
|
3517
|
-
}),
|
|
3530
|
+
}), Wa = {
|
|
3518
3531
|
key: 0,
|
|
3519
3532
|
class: "flex min-w-0 flex-1 flex-wrap gap-1"
|
|
3520
|
-
},
|
|
3533
|
+
}, Ga = {
|
|
3521
3534
|
key: 1,
|
|
3522
3535
|
class: "h-5 min-w-0 flex-1 truncate"
|
|
3523
|
-
},
|
|
3536
|
+
}, Ka = { class: "flex h-5 shrink-0 items-center" }, qa = { class: "min-w-0 flex-1 truncate" }, Ja = { class: "truncate" }, Ya = {
|
|
3524
3537
|
key: 0,
|
|
3525
3538
|
class: "flex h-5 shrink-0 items-center"
|
|
3526
|
-
},
|
|
3539
|
+
}, Xa = { class: "flex min-w-0 flex-1 flex-col" }, Za = {
|
|
3527
3540
|
key: 0,
|
|
3528
3541
|
class: "sr-only"
|
|
3529
|
-
},
|
|
3542
|
+
}, Qa = {
|
|
3530
3543
|
key: 0,
|
|
3531
3544
|
class: "text-xs text-black/65"
|
|
3532
|
-
},
|
|
3545
|
+
}, $a = {
|
|
3533
3546
|
key: 1,
|
|
3534
3547
|
class: "text-xs text-black/65"
|
|
3535
|
-
},
|
|
3548
|
+
}, eo = { class: "flex h-5 w-4 shrink-0 items-center justify-center" }, to = "-mx-3 -my-2 flex min-w-0 flex-1 items-center gap-2 self-stretch px-3 py-2", no = "transition-transform duration-150 in-data-[state=open]:rotate-180 motion-reduce:transition-none", ro = /* @__PURE__ */ f({
|
|
3536
3549
|
__name: "Select",
|
|
3537
3550
|
props: /*@__PURE__*/ g({
|
|
3538
3551
|
label: {},
|
|
@@ -3689,7 +3702,7 @@ var Da = [
|
|
|
3689
3702
|
e.option.description,
|
|
3690
3703
|
e.path
|
|
3691
3704
|
].filter(Boolean).join(" ") : e.option.label;
|
|
3692
|
-
return (i, f) => (w(), a(
|
|
3705
|
+
return (i, f) => (w(), a(qi, {
|
|
3693
3706
|
label: e.label,
|
|
3694
3707
|
helper: e.helper,
|
|
3695
3708
|
"helper-placement": e.helperPlacement,
|
|
@@ -3716,7 +3729,7 @@ var Da = [
|
|
|
3716
3729
|
}), {
|
|
3717
3730
|
default: V(() => [e.searchable ? (w(), a(M(Je), {
|
|
3718
3731
|
key: 0,
|
|
3719
|
-
class: y(
|
|
3732
|
+
class: y(to),
|
|
3720
3733
|
onPointerdown: f[4] ||= (e) => J.value = !0,
|
|
3721
3734
|
onClick: f[5] ||= (t) => !e.disabled && !t.target.closest("button") && q(!0)
|
|
3722
3735
|
}, {
|
|
@@ -3725,7 +3738,7 @@ var Da = [
|
|
|
3725
3738
|
key: 0,
|
|
3726
3739
|
"aria-hidden": "true"
|
|
3727
3740
|
})) : o("", !0)]),
|
|
3728
|
-
c("span", { class: y(e.multiple ? "flex min-w-0 flex-1 flex-wrap items-center gap-1" : "contents") }, [(w(!0), s(n, null, D(R.value, (n) => (w(), a(
|
|
3741
|
+
c("span", { class: y(e.multiple ? "flex min-w-0 flex-1 flex-wrap items-center gap-1" : "contents") }, [(w(!0), s(n, null, D(R.value, (n) => (w(), a(Ni, {
|
|
3729
3742
|
key: String(n.value),
|
|
3730
3743
|
size: "sm",
|
|
3731
3744
|
removable: "",
|
|
@@ -3778,7 +3791,7 @@ var Da = [
|
|
|
3778
3791
|
}, {
|
|
3779
3792
|
default: V(() => [d(M(ue), {
|
|
3780
3793
|
"aria-hidden": "true",
|
|
3781
|
-
class: y(
|
|
3794
|
+
class: y(no)
|
|
3782
3795
|
})]),
|
|
3783
3796
|
_: 1
|
|
3784
3797
|
}, 8, ["aria-label"])
|
|
@@ -3791,14 +3804,14 @@ var Da = [
|
|
|
3791
3804
|
"aria-describedby": p,
|
|
3792
3805
|
"data-pointer-focus": J.value || void 0,
|
|
3793
3806
|
onBlur: f[6] ||= (e) => J.value = !1,
|
|
3794
|
-
class: y(M(X)(
|
|
3807
|
+
class: y(M(X)(to, "cursor-pointer text-left outline-none disabled:cursor-not-allowed data-placeholder:text-black/55"))
|
|
3795
3808
|
}, {
|
|
3796
3809
|
default: V(() => [
|
|
3797
3810
|
O(i.$slots, "leading", {}, () => [L.value?.icon ? (w(), a(k(L.value.icon), {
|
|
3798
3811
|
key: 0,
|
|
3799
3812
|
"aria-hidden": "true"
|
|
3800
3813
|
})) : o("", !0)]),
|
|
3801
|
-
e.multiple && R.value.length ? (w(), s("span",
|
|
3814
|
+
e.multiple && R.value.length ? (w(), s("span", Wa, [(w(!0), s(n, null, D(R.value, (e) => (w(), a(Ni, {
|
|
3802
3815
|
key: String(e.value),
|
|
3803
3816
|
size: "sm"
|
|
3804
3817
|
}, l({
|
|
@@ -3808,10 +3821,10 @@ var Da = [
|
|
|
3808
3821
|
name: "leading",
|
|
3809
3822
|
fn: V(() => [(w(), a(k(e.icon), { "aria-hidden": "true" }))]),
|
|
3810
3823
|
key: "0"
|
|
3811
|
-
} : void 0]), 1024))), 128))])) : (w(), s("span",
|
|
3824
|
+
} : void 0]), 1024))), 128))])) : (w(), s("span", Ga, j(L.value?.label ?? g.value), 1)),
|
|
3812
3825
|
d(M(ue), {
|
|
3813
3826
|
"aria-hidden": "true",
|
|
3814
|
-
class: y(
|
|
3827
|
+
class: y(no)
|
|
3815
3828
|
})
|
|
3816
3829
|
]),
|
|
3817
3830
|
_: 3
|
|
@@ -3846,10 +3859,10 @@ var Da = [
|
|
|
3846
3859
|
class: y(M(X)(Ce, "font-bold")),
|
|
3847
3860
|
onSelect: be
|
|
3848
3861
|
}, {
|
|
3849
|
-
default: V(() => [c("span",
|
|
3862
|
+
default: V(() => [c("span", Ka, [d(M(de), {
|
|
3850
3863
|
"aria-hidden": "true",
|
|
3851
3864
|
class: "size-4"
|
|
3852
|
-
})]), c("span",
|
|
3865
|
+
})]), c("span", qa, [f[9] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(j(G.value.label), 1)])]),
|
|
3853
3866
|
_: 1
|
|
3854
3867
|
}, 40, ["text-value", "class"])), (w(), a(k(Y.value.Separator), { class: "-mx-1 my-0.5 border-t border-black/15" }))], 64)) : o("", !0),
|
|
3855
3868
|
(w(!0), s(n, null, D(pe.value, (e, t) => (w(), s(n, { key: t }, [t > 0 && !oe.value ? (w(), a(k(Y.value.Separator), {
|
|
@@ -3864,7 +3877,7 @@ var Da = [
|
|
|
3864
3877
|
key: 0,
|
|
3865
3878
|
"aria-hidden": "true",
|
|
3866
3879
|
class: "size-3.5 shrink-0"
|
|
3867
|
-
})) : o("", !0), c("span",
|
|
3880
|
+
})) : o("", !0), c("span", Ja, j(e.label), 1)]),
|
|
3868
3881
|
_: 2
|
|
3869
3882
|
}, 1024)) : o("", !0), (w(!0), s(n, null, D(e.rows, (e) => (w(), a(k(Y.value.Item), {
|
|
3870
3883
|
key: e.key,
|
|
@@ -3876,19 +3889,19 @@ var Da = [
|
|
|
3876
3889
|
onSelect: (t) => e.parent && ye(t, e.option)
|
|
3877
3890
|
}, {
|
|
3878
3891
|
default: V(() => [
|
|
3879
|
-
e.option.icon ? (w(), s("span",
|
|
3892
|
+
e.option.icon ? (w(), s("span", Ya, [(w(), a(k(e.option.icon), {
|
|
3880
3893
|
"aria-hidden": "true",
|
|
3881
3894
|
class: "size-4 opacity-70"
|
|
3882
3895
|
}))])) : o("", !0),
|
|
3883
|
-
c("span",
|
|
3896
|
+
c("span", Xa, [
|
|
3884
3897
|
(w(), a(k(Y.value.ItemText), { class: "truncate in-data-[state=checked]:font-bold" }, {
|
|
3885
|
-
default: V(() => [u(j(e.option.label), 1), e.parent ? (w(), s("span",
|
|
3898
|
+
default: V(() => [u(j(e.option.label), 1), e.parent ? (w(), s("span", Za, ", more options")) : o("", !0)]),
|
|
3886
3899
|
_: 2
|
|
3887
3900
|
}, 1024)),
|
|
3888
|
-
e.path ? (w(), s("span",
|
|
3889
|
-
e.option.description ? (w(), s("span",
|
|
3901
|
+
e.path ? (w(), s("span", Qa, j(e.path), 1)) : o("", !0),
|
|
3902
|
+
e.option.description ? (w(), s("span", $a, j(e.option.description), 1)) : o("", !0)
|
|
3890
3903
|
]),
|
|
3891
|
-
c("span",
|
|
3904
|
+
c("span", eo, [e.parent ? (w(), a(M(fe), {
|
|
3892
3905
|
key: 0,
|
|
3893
3906
|
"aria-hidden": "true",
|
|
3894
3907
|
class: "size-4 opacity-70"
|
|
@@ -3936,7 +3949,7 @@ var Da = [
|
|
|
3936
3949
|
"class"
|
|
3937
3950
|
]));
|
|
3938
3951
|
}
|
|
3939
|
-
}),
|
|
3952
|
+
}), io = { class: "flex items-start gap-2" }, ao = /* @__PURE__ */ f({
|
|
3940
3953
|
__name: "Checkbox",
|
|
3941
3954
|
props: /*@__PURE__*/ g({
|
|
3942
3955
|
label: {},
|
|
@@ -3975,7 +3988,7 @@ var Da = [
|
|
|
3975
3988
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus",
|
|
3976
3989
|
"[&_svg]:size-3.5 [&_svg]:stroke-3"
|
|
3977
3990
|
];
|
|
3978
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
3991
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div", io, [d(M(qe), {
|
|
3979
3992
|
id: l,
|
|
3980
3993
|
modelValue: n.value,
|
|
3981
3994
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4017,13 +4030,13 @@ var Da = [
|
|
|
4017
4030
|
key: 0,
|
|
4018
4031
|
id: u,
|
|
4019
4032
|
class: "text-xs text-black/65"
|
|
4020
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4033
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(Hi, {
|
|
4021
4034
|
id: f,
|
|
4022
4035
|
status: e.errorText ? "error" : void 0,
|
|
4023
4036
|
text: e.errorText
|
|
4024
4037
|
}, null, 8, ["status", "text"])], 2));
|
|
4025
4038
|
}
|
|
4026
|
-
}),
|
|
4039
|
+
}), oo = { class: "flex flex-col gap-0.5" }, so = { class: "flex items-center gap-1" }, co = ["hidden"], lo = ["onClick"], uo = ["for"], fo = ["id"], po = /* @__PURE__ */ f({
|
|
4027
4040
|
__name: "RadioGroup",
|
|
4028
4041
|
props: /*@__PURE__*/ g({
|
|
4029
4042
|
label: {},
|
|
@@ -4058,10 +4071,10 @@ var Da = [
|
|
|
4058
4071
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4059
4072
|
];
|
|
4060
4073
|
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", r.class)) }, [
|
|
4061
|
-
c("div",
|
|
4074
|
+
c("div", oo, [c("div", so, [c("span", {
|
|
4062
4075
|
id: f,
|
|
4063
4076
|
class: "text-sm"
|
|
4064
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4077
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(zi, {
|
|
4065
4078
|
key: 0,
|
|
4066
4079
|
text: e.helper,
|
|
4067
4080
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -4070,7 +4083,7 @@ var Da = [
|
|
|
4070
4083
|
id: p,
|
|
4071
4084
|
hidden: e.helperPlacement === "icon",
|
|
4072
4085
|
class: "text-xs text-black/65"
|
|
4073
|
-
}, j(e.helper), 9,
|
|
4086
|
+
}, j(e.helper), 9, co)) : o("", !0)]),
|
|
4074
4087
|
d(M(Bt), {
|
|
4075
4088
|
modelValue: l.value,
|
|
4076
4089
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -4106,11 +4119,11 @@ var Da = [
|
|
|
4106
4119
|
}, [c("label", {
|
|
4107
4120
|
for: `${M(u)}-${n}`,
|
|
4108
4121
|
class: y(M(X)("text-sm", e.disabled || t.disabled ? "cursor-not-allowed" : "cursor-pointer"))
|
|
4109
|
-
}, j(t.label), 11,
|
|
4122
|
+
}, j(t.label), 11, uo), t.description ? (w(), s("p", {
|
|
4110
4123
|
key: 0,
|
|
4111
4124
|
id: `${M(u)}-${n}-description`,
|
|
4112
4125
|
class: "text-xs text-black/65"
|
|
4113
|
-
}, j(t.description), 9,
|
|
4126
|
+
}, j(t.description), 9, fo)) : o("", !0)], 10, lo)]))), 128))]),
|
|
4114
4127
|
_: 1
|
|
4115
4128
|
}, 8, [
|
|
4116
4129
|
"modelValue",
|
|
@@ -4120,14 +4133,14 @@ var Da = [
|
|
|
4120
4133
|
"aria-describedby",
|
|
4121
4134
|
"aria-invalid"
|
|
4122
4135
|
]),
|
|
4123
|
-
d(
|
|
4136
|
+
d(Hi, {
|
|
4124
4137
|
id: m,
|
|
4125
4138
|
status: e.errorText ? "error" : void 0,
|
|
4126
4139
|
text: e.errorText
|
|
4127
4140
|
}, null, 8, ["status", "text"])
|
|
4128
4141
|
], 2));
|
|
4129
4142
|
}
|
|
4130
|
-
}),
|
|
4143
|
+
}), mo = { class: "flex items-start gap-2" }, ho = "size-4 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 motion-reduce:transition-none", go = /* @__PURE__ */ f({
|
|
4131
4144
|
__name: "Switch",
|
|
4132
4145
|
props: /*@__PURE__*/ g({
|
|
4133
4146
|
label: {},
|
|
@@ -4164,7 +4177,7 @@ var Da = [
|
|
|
4164
4177
|
"disabled:cursor-not-allowed",
|
|
4165
4178
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4166
4179
|
];
|
|
4167
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
4180
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", e.disabled && "opacity-40", t.class)) }, [c("div", mo, [d(M($t), {
|
|
4168
4181
|
id: a,
|
|
4169
4182
|
modelValue: n.value,
|
|
4170
4183
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4174,7 +4187,7 @@ var Da = [
|
|
|
4174
4187
|
"aria-describedby": m.value,
|
|
4175
4188
|
class: y(g)
|
|
4176
4189
|
}, {
|
|
4177
|
-
default: V(() => [d(M(en), { class: y(
|
|
4190
|
+
default: V(() => [d(M(en), { class: y(ho) })]),
|
|
4178
4191
|
_: 1
|
|
4179
4192
|
}, 8, [
|
|
4180
4193
|
"modelValue",
|
|
@@ -4192,19 +4205,19 @@ var Da = [
|
|
|
4192
4205
|
key: 0,
|
|
4193
4206
|
id: l,
|
|
4194
4207
|
class: "text-xs text-black/65"
|
|
4195
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4208
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(Hi, {
|
|
4196
4209
|
id: u,
|
|
4197
4210
|
status: f.value,
|
|
4198
4211
|
text: p.value
|
|
4199
4212
|
}, null, 8, ["status", "text"])], 2));
|
|
4200
4213
|
}
|
|
4201
|
-
}),
|
|
4214
|
+
}), _o = [
|
|
4202
4215
|
"id",
|
|
4203
4216
|
"placeholder",
|
|
4204
4217
|
"disabled",
|
|
4205
4218
|
"aria-invalid",
|
|
4206
4219
|
"aria-describedby"
|
|
4207
|
-
],
|
|
4220
|
+
], vo = /* @__PURE__ */ f({
|
|
4208
4221
|
inheritAttrs: !1,
|
|
4209
4222
|
__name: "InputTextArea",
|
|
4210
4223
|
props: /*@__PURE__*/ g({
|
|
@@ -4232,7 +4245,7 @@ var Da = [
|
|
|
4232
4245
|
emits: ["update:modelValue"],
|
|
4233
4246
|
setup(e, { expose: t }) {
|
|
4234
4247
|
let n = e, { t: r } = K(), o = F(e, "modelValue"), s = i(() => n.maxLength !== void 0 && o.value.length > n.maxLength ? r("ui.input.maxLength", { count: n.maxLength }) : void 0), l = i(() => n.status ?? (s.value ? "error" : void 0)), u = i(() => n.statusText ?? s.value), d = E();
|
|
4235
|
-
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a(
|
|
4248
|
+
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a(qi, {
|
|
4236
4249
|
label: e.label,
|
|
4237
4250
|
helper: e.helper,
|
|
4238
4251
|
"helper-placement": e.helperPlacement,
|
|
@@ -4254,7 +4267,7 @@ var Da = [
|
|
|
4254
4267
|
"aria-invalid": a,
|
|
4255
4268
|
"aria-describedby": i,
|
|
4256
4269
|
class: "field-sizing-content -my-0.5 max-h-80 min-h-24 min-w-0 flex-1 resize-none bg-transparent text-sm leading-5 outline-none placeholder:text-black/55 disabled:cursor-not-allowed pointer-coarse:text-base"
|
|
4257
|
-
}), null, 16,
|
|
4270
|
+
}), null, 16, _o), [[R, o.value]])]),
|
|
4258
4271
|
_: 1
|
|
4259
4272
|
}, 8, [
|
|
4260
4273
|
"label",
|
|
@@ -4268,7 +4281,7 @@ var Da = [
|
|
|
4268
4281
|
"class"
|
|
4269
4282
|
]));
|
|
4270
4283
|
}
|
|
4271
|
-
}),
|
|
4284
|
+
}), yo = { class: "flex items-center gap-1" }, bo = ["hidden"], xo = ["aria-describedby", "aria-invalid"], So = /* @__PURE__ */ f({
|
|
4272
4285
|
__name: "CheckboxGroup",
|
|
4273
4286
|
props: /*@__PURE__*/ g({
|
|
4274
4287
|
label: {},
|
|
@@ -4296,10 +4309,10 @@ var Da = [
|
|
|
4296
4309
|
l.value = t ? [...l.value, e] : l.value.filter((t) => t !== e);
|
|
4297
4310
|
}
|
|
4298
4311
|
return (i, u) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-black", t.class)) }, [
|
|
4299
|
-
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
4312
|
+
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", yo, [c("span", {
|
|
4300
4313
|
id: f,
|
|
4301
4314
|
class: "text-sm"
|
|
4302
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4315
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(zi, {
|
|
4303
4316
|
key: 0,
|
|
4304
4317
|
text: e.helper,
|
|
4305
4318
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -4308,14 +4321,14 @@ var Da = [
|
|
|
4308
4321
|
id: p,
|
|
4309
4322
|
hidden: e.helperPlacement === "icon",
|
|
4310
4323
|
class: "text-xs text-black/65"
|
|
4311
|
-
}, j(e.helper), 9,
|
|
4324
|
+
}, j(e.helper), 9, bo)) : o("", !0)], 2),
|
|
4312
4325
|
c("div", {
|
|
4313
4326
|
role: "group",
|
|
4314
4327
|
"aria-labelledby": f,
|
|
4315
4328
|
"aria-describedby": h.value,
|
|
4316
4329
|
"aria-invalid": e.errorText ? !0 : void 0,
|
|
4317
4330
|
class: "flex flex-col gap-3"
|
|
4318
|
-
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(
|
|
4331
|
+
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(ao, {
|
|
4319
4332
|
key: String(t.value),
|
|
4320
4333
|
"model-value": l.value.includes(t.value),
|
|
4321
4334
|
label: t.label,
|
|
@@ -4328,15 +4341,15 @@ var Da = [
|
|
|
4328
4341
|
"description",
|
|
4329
4342
|
"disabled",
|
|
4330
4343
|
"onUpdate:modelValue"
|
|
4331
|
-
]))), 128))], 8,
|
|
4332
|
-
d(
|
|
4344
|
+
]))), 128))], 8, xo),
|
|
4345
|
+
d(Hi, {
|
|
4333
4346
|
id: m,
|
|
4334
4347
|
status: e.errorText ? "error" : void 0,
|
|
4335
4348
|
text: e.errorText
|
|
4336
4349
|
}, null, 8, ["status", "text"])
|
|
4337
4350
|
], 2));
|
|
4338
4351
|
}
|
|
4339
|
-
}),
|
|
4352
|
+
}), Co = /* @__PURE__ */ f({
|
|
4340
4353
|
__name: "LanguageSwitcher",
|
|
4341
4354
|
props: {
|
|
4342
4355
|
label: {},
|
|
@@ -4366,7 +4379,7 @@ var Da = [
|
|
|
4366
4379
|
label: s(e),
|
|
4367
4380
|
value: e
|
|
4368
4381
|
})));
|
|
4369
|
-
return (i, o) => (w(), a(
|
|
4382
|
+
return (i, o) => (w(), a(ro, {
|
|
4370
4383
|
modelValue: M(r),
|
|
4371
4384
|
"onUpdate:modelValue": o[0] ||= (e) => h(r) ? r.value = e : null,
|
|
4372
4385
|
label: e.label ?? M(n)("ui.languageSwitcher.label"),
|
|
@@ -4386,7 +4399,7 @@ var Da = [
|
|
|
4386
4399
|
"class"
|
|
4387
4400
|
]));
|
|
4388
4401
|
}
|
|
4389
|
-
}),
|
|
4402
|
+
}), wo = /* @__PURE__ */ f({
|
|
4390
4403
|
__name: "EmptyState",
|
|
4391
4404
|
props: {
|
|
4392
4405
|
title: {},
|
|
@@ -4442,15 +4455,15 @@ var Da = [
|
|
|
4442
4455
|
}, [O(r.$slots, "actions")], 2)) : o("", !0)
|
|
4443
4456
|
], 2));
|
|
4444
4457
|
}
|
|
4445
|
-
}),
|
|
4458
|
+
}), To = new Intl.Collator("en-GB", {
|
|
4446
4459
|
numeric: !0,
|
|
4447
4460
|
sensitivity: "base"
|
|
4448
4461
|
});
|
|
4449
|
-
function
|
|
4462
|
+
function Eo(e, t) {
|
|
4450
4463
|
let n = e == null || e === "", r = t == null || t === "";
|
|
4451
|
-
return n || r ? n === r ? 0 : n ? 1 : -1 : typeof e == "number" && typeof t == "number" ? e - t : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) :
|
|
4464
|
+
return n || r ? n === r ? 0 : n ? 1 : -1 : typeof e == "number" && typeof t == "number" ? e - t : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : To.compare(String(e), String(t));
|
|
4452
4465
|
}
|
|
4453
|
-
function
|
|
4466
|
+
function Do(e, t, n) {
|
|
4454
4467
|
let r = n && t.find((e) => e.key === n.key);
|
|
4455
4468
|
if (!n || !r) return [...e];
|
|
4456
4469
|
let i = r.sortValue ?? ((e) => e[r.key]), a = n.direction === "asc" ? 1 : -1;
|
|
@@ -4460,10 +4473,10 @@ function Eo(e, t, n) {
|
|
|
4460
4473
|
value: i(e)
|
|
4461
4474
|
})).sort((e, t) => {
|
|
4462
4475
|
let n = e.value === null || e.value === void 0 || e.value === "", r = t.value === null || t.value === void 0 || t.value === "";
|
|
4463
|
-
return (n || r ?
|
|
4476
|
+
return (n || r ? Eo(e.value, t.value) : a * Eo(e.value, t.value)) || e.index - t.index;
|
|
4464
4477
|
}).map((e) => e.row);
|
|
4465
4478
|
}
|
|
4466
|
-
function
|
|
4479
|
+
function Oo(e, t) {
|
|
4467
4480
|
return e?.key === t ? e.direction === "asc" ? {
|
|
4468
4481
|
key: t,
|
|
4469
4482
|
direction: "desc"
|
|
@@ -4473,24 +4486,24 @@ function Do(e, t) {
|
|
|
4473
4486
|
};
|
|
4474
4487
|
}
|
|
4475
4488
|
// src/components/Table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4476
|
-
var
|
|
4489
|
+
var ko = [
|
|
4477
4490
|
"tabindex",
|
|
4478
4491
|
"role",
|
|
4479
4492
|
"aria-labelledby",
|
|
4480
4493
|
"aria-label"
|
|
4481
|
-
],
|
|
4494
|
+
], Ao = ["aria-busy"], jo = {
|
|
4482
4495
|
key: 1,
|
|
4483
4496
|
class: "sr-only"
|
|
4484
|
-
},
|
|
4497
|
+
}, Mo = ["aria-sort"], No = {
|
|
4485
4498
|
key: 0,
|
|
4486
4499
|
class: "sr-only"
|
|
4487
|
-
},
|
|
4500
|
+
}, Po = ["onClick"], Fo = { key: 0 }, Io = ["colspan"], Lo = {
|
|
4488
4501
|
key: 0,
|
|
4489
4502
|
class: "inline-flex items-center gap-2"
|
|
4490
|
-
},
|
|
4503
|
+
}, Ro = ["onClick"], zo = {
|
|
4491
4504
|
key: 1,
|
|
4492
4505
|
"aria-hidden": "true"
|
|
4493
|
-
},
|
|
4506
|
+
}, Bo = ["colspan"], Vo = "relative z-1 w-0 cursor-pointer", Ho = "absolute inset-0 outline-none", Uo = "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Wo = "outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Go = /* @__PURE__ */ f({
|
|
4494
4507
|
__name: "Table",
|
|
4495
4508
|
props: /*@__PURE__*/ g({
|
|
4496
4509
|
columns: {},
|
|
@@ -4540,7 +4553,7 @@ var Oo = [
|
|
|
4540
4553
|
function T(e, t) {
|
|
4541
4554
|
e.target.closest("button, label, .sr-only") || t();
|
|
4542
4555
|
}
|
|
4543
|
-
let A = i(() => r.columns.length + +!!r.selectable), N = i(() => r.manualSort ? r.rows :
|
|
4556
|
+
let A = i(() => r.columns.length + +!!r.selectable), N = i(() => r.manualSort ? r.rows : Do(r.rows, r.columns, l.value));
|
|
4544
4557
|
function I(e, t) {
|
|
4545
4558
|
return typeof r.rowKey == "function" ? r.rowKey(e, t) : r.rowKey ? e[r.rowKey] : t;
|
|
4546
4559
|
}
|
|
@@ -4577,7 +4590,7 @@ var Oo = [
|
|
|
4577
4590
|
}), S(() => q?.disconnect()), (i, f) => (w(), s("div", {
|
|
4578
4591
|
ref_key: "scroller",
|
|
4579
4592
|
ref: W,
|
|
4580
|
-
class: y(M(X)("relative overflow-auto", G.value &&
|
|
4593
|
+
class: y(M(X)("relative overflow-auto", G.value && Wo, r.class)),
|
|
4581
4594
|
tabindex: G.value ? 0 : void 0,
|
|
4582
4595
|
role: G.value ? "region" : void 0,
|
|
4583
4596
|
"aria-labelledby": G.value && (e.caption || i.$slots.caption) ? p : void 0,
|
|
@@ -4594,24 +4607,24 @@ var Oo = [
|
|
|
4594
4607
|
c("thead", { class: y(M(X)(e.stickyHeader && "sticky top-0 z-10 bg-white", e.ui?.header)) }, [c("tr", null, [e.selectable ? (w(), s("th", {
|
|
4595
4608
|
key: 0,
|
|
4596
4609
|
scope: "col",
|
|
4597
|
-
class: y(M(X)("border-b border-black/15", U.value, h.value.length &&
|
|
4610
|
+
class: y(M(X)("border-b border-black/15", U.value, h.value.length && Vo)),
|
|
4598
4611
|
onClick: f[1] ||= (e) => T(e, () => h.value.length && x(b.value !== !0))
|
|
4599
|
-
}, [h.value.length ? (w(), a(
|
|
4612
|
+
}, [h.value.length ? (w(), a(ao, {
|
|
4600
4613
|
key: 0,
|
|
4601
4614
|
"model-value": b.value,
|
|
4602
4615
|
label: M(t)("ui.table.selectAll"),
|
|
4603
4616
|
"hide-label": "",
|
|
4604
4617
|
"onUpdate:modelValue": f[0] ||= (e) => x(e === !0)
|
|
4605
|
-
}, null, 8, ["model-value", "label"])) : (w(), s("span",
|
|
4618
|
+
}, null, 8, ["model-value", "label"])) : (w(), s("span", jo, j(M(t)("ui.table.select")), 1))], 2)) : o("", !0), (w(!0), s(n, null, D(e.columns, (e) => (w(), s("th", {
|
|
4606
4619
|
key: e.key,
|
|
4607
4620
|
scope: "col",
|
|
4608
4621
|
"aria-sort": L(e),
|
|
4609
4622
|
class: y(M(X)("border-b border-black/15 font-bold text-black/65", U.value, ee(e)))
|
|
4610
|
-
}, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span",
|
|
4623
|
+
}, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span", No, j(e.label), 1)) : e.sortable ? (w(), s("button", {
|
|
4611
4624
|
key: 1,
|
|
4612
4625
|
type: "button",
|
|
4613
|
-
class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black",
|
|
4614
|
-
onClick: (t) => l.value = M(
|
|
4626
|
+
class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black", Uo)),
|
|
4627
|
+
onClick: (t) => l.value = M(Oo)(l.value, e.key)
|
|
4615
4628
|
}, [u(j(e.label) + " ", 1), l.value?.key === e.key && l.value.direction === "asc" ? (w(), a(M(J), {
|
|
4616
4629
|
key: 0,
|
|
4617
4630
|
class: "size-4 shrink-0",
|
|
@@ -4624,24 +4637,24 @@ var Oo = [
|
|
|
4624
4637
|
key: 2,
|
|
4625
4638
|
class: "size-4 shrink-0 text-black/40",
|
|
4626
4639
|
"aria-hidden": "true"
|
|
4627
|
-
}))], 10,
|
|
4640
|
+
}))], 10, Po)) : (w(), s(n, { key: 2 }, [u(j(e.label), 1)], 64))])], 10, Mo))), 128))])], 2),
|
|
4628
4641
|
c("tbody", { class: y(M(X)(e.loading && N.value.length && "opacity-50 transition-opacity")) }, [
|
|
4629
|
-
N.value.length ? o("", !0) : (w(), s("tr",
|
|
4642
|
+
N.value.length ? o("", !0) : (w(), s("tr", Fo, [c("td", {
|
|
4630
4643
|
colspan: A.value,
|
|
4631
4644
|
class: "px-4 py-8 text-center text-black/65"
|
|
4632
|
-
}, [e.loading ? (w(), s("span",
|
|
4645
|
+
}, [e.loading ? (w(), s("span", Lo, [d(Rn, { size: "sm" }), f[2] ||= u(" Loading… ", -1)])) : O(i.$slots, "empty", {}, () => [d(wo, {
|
|
4633
4646
|
size: "sm",
|
|
4634
4647
|
description: e.emptyText ?? M(t)("ui.table.empty"),
|
|
4635
4648
|
class: "p-0"
|
|
4636
|
-
}, null, 8, ["description"])], void 0, 1)], 8,
|
|
4649
|
+
}, null, 8, ["description"])], void 0, 1)], 8, Io)])),
|
|
4637
4650
|
(w(!0), s(n, null, D(N.value, (r, c) => (w(), s("tr", {
|
|
4638
4651
|
key: I(r, c),
|
|
4639
4652
|
class: y(M(X)("group/row", z(r, c) && H, e.ui?.row))
|
|
4640
4653
|
}, [e.selectable ? (w(), s("td", {
|
|
4641
4654
|
key: 0,
|
|
4642
|
-
class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", U.value, m(r) &&
|
|
4655
|
+
class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", U.value, m(r) && Vo)),
|
|
4643
4656
|
onClick: (e) => m(r) && T(e, () => v(r, c, !g(r, c)))
|
|
4644
|
-
}, [m(r) ? (w(), a(
|
|
4657
|
+
}, [m(r) ? (w(), a(ao, {
|
|
4645
4658
|
key: 0,
|
|
4646
4659
|
"model-value": g(r, c),
|
|
4647
4660
|
label: e.rowLabel ? e.rowLabel(r, c) : M(t)("ui.table.selectRow", { n: c + 1 }),
|
|
@@ -4651,7 +4664,7 @@ var Oo = [
|
|
|
4651
4664
|
"model-value",
|
|
4652
4665
|
"label",
|
|
4653
4666
|
"onUpdate:modelValue"
|
|
4654
|
-
])) : o("", !0)], 10,
|
|
4667
|
+
])) : o("", !0)], 10, Ro)) : o("", !0), (w(!0), s(n, null, D(e.columns, (t) => (w(), a(k(t.rowHeader ? "th" : "td"), {
|
|
4655
4668
|
key: t.key,
|
|
4656
4669
|
scope: t.rowHeader ? "row" : void 0,
|
|
4657
4670
|
class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", t.rowHeader ? "font-bold" : "font-normal", t.align === "end" && "tabular-nums", U.value, z(r, c) && "relative", ee(t)))
|
|
@@ -4663,7 +4676,7 @@ var Oo = [
|
|
|
4663
4676
|
"data-row-overlay": "",
|
|
4664
4677
|
tabindex: "-1",
|
|
4665
4678
|
"aria-hidden": "true",
|
|
4666
|
-
class:
|
|
4679
|
+
class: Ho
|
|
4667
4680
|
}), null, 16)) : o("", !0), t.key === R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
|
|
4668
4681
|
key: 1,
|
|
4669
4682
|
ref_for: !0
|
|
@@ -4684,33 +4697,33 @@ var Oo = [
|
|
|
4684
4697
|
}, () => [u(j(r[t.key] ?? ""), 1)], void 0, 2)]),
|
|
4685
4698
|
_: 2
|
|
4686
4699
|
}, 1032, ["scope", "class"]))), 128))], 2))), 128)),
|
|
4687
|
-
e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr",
|
|
4700
|
+
e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr", zo, [c("td", {
|
|
4688
4701
|
colspan: A.value,
|
|
4689
4702
|
class: "h-2 p-0 sm:h-4"
|
|
4690
|
-
}, null, 8,
|
|
4703
|
+
}, null, 8, Bo)])) : o("", !0)
|
|
4691
4704
|
], 2),
|
|
4692
4705
|
i.$slots.footer ? (w(), s("tfoot", {
|
|
4693
4706
|
key: 1,
|
|
4694
4707
|
class: y(M(X)("font-bold *:*:border-t *:*:border-black/15", e.size === "sm" ? "*:*:px-4 *:*:py-2" : "*:*:px-4 *:*:py-3", e.inset && "*:*:sm:first:pl-6 *:*:sm:last:pr-6"))
|
|
4695
4708
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)
|
|
4696
|
-
], 10,
|
|
4709
|
+
], 10, Ao)], 10, ko));
|
|
4697
4710
|
}
|
|
4698
|
-
}),
|
|
4711
|
+
}), Ko = { class: "flex items-center gap-2 text-sm text-black/65" }, qo = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" }, Jo = { class: "text-2xl font-bold tabular-nums" }, Yo = {
|
|
4699
4712
|
key: 1,
|
|
4700
4713
|
class: "sr-only"
|
|
4701
|
-
},
|
|
4714
|
+
}, Xo = {
|
|
4702
4715
|
key: 2,
|
|
4703
4716
|
class: "font-bold tabular-nums"
|
|
4704
|
-
},
|
|
4717
|
+
}, Zo = {
|
|
4705
4718
|
key: 3,
|
|
4706
4719
|
class: "text-black/65"
|
|
4707
|
-
},
|
|
4720
|
+
}, Qo = {
|
|
4708
4721
|
key: 0,
|
|
4709
4722
|
class: "text-sm text-black/65"
|
|
4710
|
-
},
|
|
4723
|
+
}, $o = {
|
|
4711
4724
|
key: 1,
|
|
4712
4725
|
class: "mt-2 text-sm"
|
|
4713
|
-
},
|
|
4726
|
+
}, es = /* @__PURE__ */ f({
|
|
4714
4727
|
__name: "StatTile",
|
|
4715
4728
|
props: {
|
|
4716
4729
|
label: {},
|
|
@@ -4739,18 +4752,18 @@ var Oo = [
|
|
|
4739
4752
|
down: t("ui.statTile.down"),
|
|
4740
4753
|
flat: t("ui.statTile.flat")
|
|
4741
4754
|
}));
|
|
4742
|
-
return (t, i) => (w(), a(
|
|
4755
|
+
return (t, i) => (w(), a(Ai, {
|
|
4743
4756
|
padding: "sm",
|
|
4744
4757
|
class: y(n.class),
|
|
4745
4758
|
ui: { body: "gap-1" }
|
|
4746
4759
|
}, {
|
|
4747
4760
|
default: V(() => [
|
|
4748
|
-
c("p",
|
|
4761
|
+
c("p", Ko, [e.icon ? (w(), a(k(e.icon), {
|
|
4749
4762
|
key: 0,
|
|
4750
4763
|
class: "size-4 shrink-0",
|
|
4751
4764
|
"aria-hidden": "true"
|
|
4752
4765
|
})) : o("", !0), u(" " + j(e.label), 1)]),
|
|
4753
|
-
c("div",
|
|
4766
|
+
c("div", qo, [c("p", Jo, [O(t.$slots, "value", {}, () => [u(j(e.value ?? "—"), 1)])]), e.change || e.trend ? (w(), s("p", {
|
|
4754
4767
|
key: 0,
|
|
4755
4768
|
class: y(M(X)("inline-flex items-center gap-0.5 text-sm", l[r.value]))
|
|
4756
4769
|
}, [
|
|
@@ -4759,29 +4772,29 @@ var Oo = [
|
|
|
4759
4772
|
class: "size-4 shrink-0",
|
|
4760
4773
|
"aria-hidden": "true"
|
|
4761
4774
|
})) : o("", !0),
|
|
4762
|
-
e.trend ? (w(), s("span",
|
|
4763
|
-
e.change ? (w(), s("span",
|
|
4764
|
-
e.changeLabel ? (w(), s("span",
|
|
4775
|
+
e.trend ? (w(), s("span", Yo, j(f.value[e.trend]), 1)) : o("", !0),
|
|
4776
|
+
e.change ? (w(), s("span", Xo, j(e.change), 1)) : o("", !0),
|
|
4777
|
+
e.changeLabel ? (w(), s("span", Zo, "\xA0" + j(e.changeLabel), 1)) : o("", !0)
|
|
4765
4778
|
], 2)) : o("", !0)]),
|
|
4766
|
-
e.description || t.$slots.description ? (w(), s("p",
|
|
4767
|
-
t.$slots.footer ? (w(), s("div",
|
|
4779
|
+
e.description || t.$slots.description ? (w(), s("p", Qo, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0),
|
|
4780
|
+
t.$slots.footer ? (w(), s("div", $o, [O(t.$slots, "footer")])) : o("", !0)
|
|
4768
4781
|
]),
|
|
4769
4782
|
_: 3
|
|
4770
4783
|
}, 8, ["class"]));
|
|
4771
4784
|
}
|
|
4772
|
-
}),
|
|
4785
|
+
}), ts = { class: "col-span-2 text-black/65 @sm:col-span-1" }, ns = { class: "sr-only" }, rs = {
|
|
4773
4786
|
key: 0,
|
|
4774
4787
|
class: "mt-0.5 block text-black/65"
|
|
4775
|
-
},
|
|
4788
|
+
}, is = {
|
|
4776
4789
|
key: 0,
|
|
4777
4790
|
class: "justify-self-end"
|
|
4778
|
-
},
|
|
4791
|
+
}, as = { class: "text-black/65" }, os = { class: "sr-only" }, ss = {
|
|
4779
4792
|
key: 0,
|
|
4780
4793
|
class: "mt-0.5 block font-normal text-black/65"
|
|
4781
|
-
},
|
|
4794
|
+
}, cs = {
|
|
4782
4795
|
key: 1,
|
|
4783
4796
|
class: "mt-1 block font-normal"
|
|
4784
|
-
},
|
|
4797
|
+
}, ls = /* @__PURE__ */ f({
|
|
4785
4798
|
__name: "SummaryList",
|
|
4786
4799
|
props: {
|
|
4787
4800
|
items: {},
|
|
@@ -4806,40 +4819,41 @@ var Oo = [
|
|
|
4806
4819
|
key: r.label,
|
|
4807
4820
|
class: y(M(X)("grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-black/15 py-3 first:pt-0 last:border-b-0 last:pb-0", a[e.labelWidth]))
|
|
4808
4821
|
}, [
|
|
4809
|
-
c("dt",
|
|
4822
|
+
c("dt", ts, j(r.label), 1),
|
|
4810
4823
|
c("dd", { class: y(M(X)("min-w-0 break-words", r.emphasis && "font-bold", !l.$slots.action && "col-span-2")) }, [O(l.$slots, "value", {
|
|
4811
4824
|
item: r,
|
|
4812
4825
|
index: f
|
|
4813
4826
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[0] ||= c("span", {
|
|
4814
4827
|
class: "text-black/40",
|
|
4815
4828
|
"aria-hidden": "true"
|
|
4816
|
-
}, "—", -1), c("span",
|
|
4817
|
-
l.$slots.action ? (w(), s("dd",
|
|
4829
|
+
}, "—", -1), c("span", ns, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]), r.description ? (w(), s("span", rs, j(r.description), 1)) : o("", !0)], 2),
|
|
4830
|
+
l.$slots.action ? (w(), s("dd", is, [O(l.$slots, "action", {
|
|
4818
4831
|
item: r,
|
|
4819
4832
|
index: f
|
|
4820
4833
|
})])) : o("", !0)
|
|
4821
4834
|
], 2))), 128)) : (w(!0), s(n, { key: 1 }, D(e.items, (r, a) => (w(), s("div", {
|
|
4822
4835
|
key: r.label,
|
|
4823
4836
|
class: y(e.layout === "compact" ? "col-span-2 grid grid-cols-subgrid items-baseline" : "flex min-w-0 flex-col gap-1")
|
|
4824
|
-
}, [c("dt",
|
|
4837
|
+
}, [c("dt", as, j(r.label), 1), c("dd", { class: y(M(X)("min-w-0 break-words", e.layout === "compact" && "text-right font-bold tabular-nums", r.emphasis && "font-bold")) }, [
|
|
4825
4838
|
O(l.$slots, "value", {
|
|
4826
4839
|
item: r,
|
|
4827
4840
|
index: a
|
|
4828
4841
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[1] ||= c("span", {
|
|
4829
4842
|
class: "text-black/40",
|
|
4830
4843
|
"aria-hidden": "true"
|
|
4831
|
-
}, "—", -1), c("span",
|
|
4832
|
-
r.description ? (w(), s("span",
|
|
4833
|
-
l.$slots.action ? (w(), s("span",
|
|
4844
|
+
}, "—", -1), c("span", os, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]),
|
|
4845
|
+
r.description ? (w(), s("span", ss, j(r.description), 1)) : o("", !0),
|
|
4846
|
+
l.$slots.action ? (w(), s("span", cs, [O(l.$slots, "action", {
|
|
4834
4847
|
item: r,
|
|
4835
4848
|
index: a
|
|
4836
4849
|
})])) : o("", !0)
|
|
4837
4850
|
], 2)], 2))), 128))], 2)], 2));
|
|
4838
4851
|
}
|
|
4839
|
-
}),
|
|
4852
|
+
}), us = { class: "flex h-5 shrink-0 items-center" }, ds = { class: "sr-only" }, fs = /* @__PURE__ */ f({
|
|
4840
4853
|
__name: "Checklist",
|
|
4841
4854
|
props: {
|
|
4842
4855
|
items: {},
|
|
4856
|
+
invalid: { type: Boolean },
|
|
4843
4857
|
class: { type: [
|
|
4844
4858
|
Boolean,
|
|
4845
4859
|
null,
|
|
@@ -4850,22 +4864,22 @@ var Oo = [
|
|
|
4850
4864
|
},
|
|
4851
4865
|
setup(e) {
|
|
4852
4866
|
let t = e;
|
|
4853
|
-
return (r, i) => (w(), s("ul", { class: y(M(X)("flex flex-col gap-2 text-sm", t.class)) }, [(w(!0), s(n, null, D(e.items, (
|
|
4854
|
-
key:
|
|
4867
|
+
return (r, i) => (w(), s("ul", { class: y(M(X)("flex flex-col gap-2 text-sm", t.class)) }, [(w(!0), s(n, null, D(e.items, (t) => (w(), s("li", {
|
|
4868
|
+
key: t.label,
|
|
4855
4869
|
class: "flex items-start gap-2"
|
|
4856
|
-
}, [c("span",
|
|
4870
|
+
}, [c("span", us, [t.done ? (w(), a(M(ge), {
|
|
4857
4871
|
key: 0,
|
|
4858
4872
|
class: "size-4 text-green",
|
|
4859
4873
|
"aria-hidden": "true"
|
|
4860
4874
|
})) : (w(), a(M(me), {
|
|
4861
4875
|
key: 1,
|
|
4862
|
-
class: "size-4 text-black/40",
|
|
4876
|
+
class: y(M(X)("size-4", e.invalid ? "text-red" : "text-black/40")),
|
|
4863
4877
|
"aria-hidden": "true"
|
|
4864
|
-
}))]), c("span", { class: y(
|
|
4878
|
+
}, null, 8, ["class"]))]), c("span", { class: y(t.done ? "text-black" : "text-black/65") }, [u(j(t.label), 1), c("span", ds, j(t.done ? " (done)" : " (to do)"), 1)], 2)]))), 128))], 2));
|
|
4865
4879
|
}
|
|
4866
4880
|
});
|
|
4867
4881
|
// src/lib/dates.ts
|
|
4868
|
-
function
|
|
4882
|
+
function ps(e) {
|
|
4869
4883
|
if (e instanceof Date) return e;
|
|
4870
4884
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
4871
4885
|
let [t, n, r] = e.split("-").map(Number);
|
|
@@ -4873,59 +4887,59 @@ function fs(e) {
|
|
|
4873
4887
|
}
|
|
4874
4888
|
return new Date(e);
|
|
4875
4889
|
}
|
|
4876
|
-
var
|
|
4890
|
+
var ms = [
|
|
4877
4891
|
["year", 31536e3],
|
|
4878
4892
|
["month", 2592e3],
|
|
4879
4893
|
["week", 604800],
|
|
4880
4894
|
["day", 86400],
|
|
4881
4895
|
["hour", 3600],
|
|
4882
4896
|
["minute", 60]
|
|
4883
|
-
],
|
|
4884
|
-
function
|
|
4885
|
-
let n = Math.round((
|
|
4897
|
+
], hs = new Intl.RelativeTimeFormat("en-GB", { numeric: "auto" });
|
|
4898
|
+
function gs(e, t = /* @__PURE__ */ new Date()) {
|
|
4899
|
+
let n = Math.round((ps(e).getTime() - t.getTime()) / 1e3);
|
|
4886
4900
|
if (Math.abs(n) < 60) return "Just now";
|
|
4887
|
-
for (let [e, t] of
|
|
4888
|
-
let r =
|
|
4901
|
+
for (let [e, t] of ms) if (Math.abs(n) >= t) {
|
|
4902
|
+
let r = hs.format(Math.trunc(n / t), e);
|
|
4889
4903
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
4890
4904
|
}
|
|
4891
4905
|
return "Just now";
|
|
4892
4906
|
}
|
|
4893
|
-
function
|
|
4894
|
-
let t =
|
|
4907
|
+
function _s(e) {
|
|
4908
|
+
let t = ps(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
|
|
4895
4909
|
hour: "2-digit",
|
|
4896
4910
|
minute: "2-digit"
|
|
4897
4911
|
});
|
|
4898
|
-
return `${n} ${
|
|
4912
|
+
return `${n} ${vs(t)} at ${r}`;
|
|
4899
4913
|
}
|
|
4900
|
-
function
|
|
4901
|
-
return
|
|
4914
|
+
function vs(e) {
|
|
4915
|
+
return ps(e).toLocaleDateString("en-GB", {
|
|
4902
4916
|
day: "numeric",
|
|
4903
4917
|
month: "long",
|
|
4904
4918
|
year: "numeric"
|
|
4905
4919
|
});
|
|
4906
4920
|
}
|
|
4907
|
-
function
|
|
4908
|
-
let n =
|
|
4921
|
+
function ys(e, t = /* @__PURE__ */ new Date()) {
|
|
4922
|
+
let n = ps(e), r = t.getFullYear() - n.getFullYear(), i = t.getMonth() - n.getMonth();
|
|
4909
4923
|
return (i < 0 || i === 0 && t.getDate() < n.getDate()) && r--, r;
|
|
4910
4924
|
}
|
|
4911
|
-
function
|
|
4912
|
-
let n =
|
|
4925
|
+
function bs(e, t = /* @__PURE__ */ new Date()) {
|
|
4926
|
+
let n = ps(e), r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), i = (e) => {
|
|
4913
4927
|
let t = new Date(e, n.getMonth(), n.getDate());
|
|
4914
4928
|
return t.getMonth() === n.getMonth() ? t : new Date(e, 2, 1);
|
|
4915
4929
|
}, a = i(r.getFullYear());
|
|
4916
4930
|
return a < r && (a = i(r.getFullYear() + 1)), Math.round((a.getTime() - r.getTime()) / 864e5);
|
|
4917
4931
|
}
|
|
4918
4932
|
// src/lib/useNow.ts
|
|
4919
|
-
var
|
|
4920
|
-
function
|
|
4933
|
+
var xs = E(/* @__PURE__ */ new Date()), Ss = 0, Cs;
|
|
4934
|
+
function ws() {
|
|
4921
4935
|
return C(() => {
|
|
4922
|
-
|
|
4936
|
+
Ss++ === 0 && (xs.value = /* @__PURE__ */ new Date(), Cs = setInterval(() => xs.value = /* @__PURE__ */ new Date(), 3e4));
|
|
4923
4937
|
}), S(() => {
|
|
4924
|
-
--
|
|
4925
|
-
}),
|
|
4938
|
+
--Ss === 0 && clearInterval(Cs);
|
|
4939
|
+
}), xs;
|
|
4926
4940
|
}
|
|
4927
4941
|
// src/components/RelativeTime/RelativeTime.vue?vue&type=script&setup=true&lang.ts
|
|
4928
|
-
var
|
|
4942
|
+
var Ts = ["datetime"], Es = /* @__PURE__ */ f({
|
|
4929
4943
|
__name: "RelativeTime",
|
|
4930
4944
|
props: {
|
|
4931
4945
|
date: {},
|
|
@@ -4940,17 +4954,17 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
4940
4954
|
] }
|
|
4941
4955
|
},
|
|
4942
4956
|
setup(e) {
|
|
4943
|
-
let t = e, n =
|
|
4944
|
-
return (e, n) => (w(), a(
|
|
4957
|
+
let t = e, n = ws(), r = i(() => ps(t.date)), o = i(() => gs(r.value, t.now ?? n.value)), s = i(() => t.tooltip ? t.tooltip(r.value) : _s(r.value));
|
|
4958
|
+
return (e, n) => (w(), a(ja, { text: s.value }, {
|
|
4945
4959
|
default: V(() => [c("time", {
|
|
4946
4960
|
datetime: r.value.toISOString(),
|
|
4947
4961
|
tabindex: "0",
|
|
4948
4962
|
class: y(M(X)("cursor-default rounded-sm underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", t.class))
|
|
4949
|
-
}, j(o.value), 11,
|
|
4963
|
+
}, j(o.value), 11, Ts)]),
|
|
4950
4964
|
_: 1
|
|
4951
4965
|
}, 8, ["text"]));
|
|
4952
4966
|
}
|
|
4953
|
-
}),
|
|
4967
|
+
}), Ds = ["data-birth-date"], Os = /* @__PURE__ */ f({
|
|
4954
4968
|
__name: "Age",
|
|
4955
4969
|
props: {
|
|
4956
4970
|
birthDate: {},
|
|
@@ -4965,23 +4979,23 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
4965
4979
|
] }
|
|
4966
4980
|
},
|
|
4967
4981
|
setup(e) {
|
|
4968
|
-
let { t } = K(), r = e, l =
|
|
4969
|
-
let e =
|
|
4970
|
-
return `${t("ui.age.born", { date:
|
|
4982
|
+
let { t } = K(), r = e, l = ws(), d = i(() => ps(r.birthDate)), f = i(() => r.now ?? l.value), p = i(() => ys(d.value, f.value)), m = i(() => {
|
|
4983
|
+
let e = bs(d.value, f.value), n = e === 0 ? ` · ${t("ui.age.birthdayToday")}` : e === 1 ? ` · ${t("ui.age.birthdayTomorrow")}` : e <= 7 ? ` · ${t("ui.age.birthdayInDays", { days: e })}` : "";
|
|
4984
|
+
return `${t("ui.age.born", { date: vs(d.value) })}${n}`;
|
|
4971
4985
|
}), h = i(() => {
|
|
4972
4986
|
let e = d.value;
|
|
4973
4987
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
4974
4988
|
});
|
|
4975
|
-
return (t, i) => (w(), a(
|
|
4989
|
+
return (t, i) => (w(), a(ja, { text: m.value }, {
|
|
4976
4990
|
default: V(() => [c("span", {
|
|
4977
4991
|
tabindex: "0",
|
|
4978
4992
|
"data-birth-date": h.value,
|
|
4979
4993
|
class: y(M(X)("cursor-default rounded-sm tabular-nums underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", r.class))
|
|
4980
|
-
}, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10,
|
|
4994
|
+
}, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10, Ds)]),
|
|
4981
4995
|
_: 1
|
|
4982
4996
|
}, 8, ["text"]));
|
|
4983
4997
|
}
|
|
4984
|
-
}),
|
|
4998
|
+
}), ks = /* @__PURE__ */ f({
|
|
4985
4999
|
__name: "Link",
|
|
4986
5000
|
props: {
|
|
4987
5001
|
href: {},
|
|
@@ -5028,10 +5042,10 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5028
5042
|
"class"
|
|
5029
5043
|
]));
|
|
5030
5044
|
}
|
|
5031
|
-
}),
|
|
5045
|
+
}), As = {
|
|
5032
5046
|
class: "text-sm text-black/65",
|
|
5033
5047
|
"aria-live": "polite"
|
|
5034
|
-
},
|
|
5048
|
+
}, js = { class: "text-black" }, Ms = /* @__PURE__ */ f({
|
|
5035
5049
|
__name: "Steps",
|
|
5036
5050
|
props: {
|
|
5037
5051
|
steps: {},
|
|
@@ -5047,7 +5061,16 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5047
5061
|
},
|
|
5048
5062
|
setup(e) {
|
|
5049
5063
|
let t = e;
|
|
5050
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [d(
|
|
5064
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [c("p", As, [d(M(W), {
|
|
5065
|
+
keypath: "ui.steps.stepOfNamed",
|
|
5066
|
+
scope: "global",
|
|
5067
|
+
tag: "span"
|
|
5068
|
+
}, {
|
|
5069
|
+
current: V(() => [u(j(e.step + 1), 1)]),
|
|
5070
|
+
total: V(() => [u(j(e.steps.length), 1)]),
|
|
5071
|
+
name: V(() => [c("span", js, j(e.steps[e.step]), 1)]),
|
|
5072
|
+
_: 1
|
|
5073
|
+
})]), d(Lr, {
|
|
5051
5074
|
label: e.label,
|
|
5052
5075
|
segments: "",
|
|
5053
5076
|
value: e.step + 1,
|
|
@@ -5056,18 +5079,9 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5056
5079
|
"label",
|
|
5057
5080
|
"value",
|
|
5058
5081
|
"max"
|
|
5059
|
-
]),
|
|
5060
|
-
keypath: "ui.steps.stepOfNamed",
|
|
5061
|
-
scope: "global",
|
|
5062
|
-
tag: "span"
|
|
5063
|
-
}, {
|
|
5064
|
-
current: V(() => [u(j(e.step + 1), 1)]),
|
|
5065
|
-
total: V(() => [u(j(e.steps.length), 1)]),
|
|
5066
|
-
name: V(() => [c("span", As, j(e.steps[e.step]), 1)]),
|
|
5067
|
-
_: 1
|
|
5068
|
-
})])], 2));
|
|
5082
|
+
])], 2));
|
|
5069
5083
|
}
|
|
5070
|
-
}),
|
|
5084
|
+
}), Ns = /* @__PURE__ */ f({
|
|
5071
5085
|
__name: "Tabs",
|
|
5072
5086
|
props: /*@__PURE__*/ g({
|
|
5073
5087
|
tabs: {},
|
|
@@ -5129,11 +5143,11 @@ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
|
|
|
5129
5143
|
_: 3
|
|
5130
5144
|
}, 8, ["model-value", "class"]));
|
|
5131
5145
|
}
|
|
5132
|
-
}),
|
|
5133
|
-
function
|
|
5146
|
+
}), Ps = 0, Fs = () => `notification-${Date.now().toString(36)}-${(Ps++).toString(36)}`;
|
|
5147
|
+
function Is(e, t) {
|
|
5134
5148
|
return t === void 0 ? e.type === "error" ? Infinity : e.action ? e.compact ? 1e4 : Infinity : 6e3 : t;
|
|
5135
5149
|
}
|
|
5136
|
-
function
|
|
5150
|
+
function Ls(e = []) {
|
|
5137
5151
|
let t = T({
|
|
5138
5152
|
items: e.map(n).sort((e, t) => t.createdAt.getTime() - e.createdAt.getTime()),
|
|
5139
5153
|
toasts: [],
|
|
@@ -5143,7 +5157,7 @@ function Is(e = []) {
|
|
|
5143
5157
|
function n(e) {
|
|
5144
5158
|
return {
|
|
5145
5159
|
...e,
|
|
5146
|
-
id: e.id ??
|
|
5160
|
+
id: e.id ?? Fs(),
|
|
5147
5161
|
type: e.type ?? "info",
|
|
5148
5162
|
createdAt: e.createdAt ?? /* @__PURE__ */ new Date(),
|
|
5149
5163
|
read: e.read ?? !1
|
|
@@ -5153,7 +5167,7 @@ function Is(e = []) {
|
|
|
5153
5167
|
let i = n(e);
|
|
5154
5168
|
return t.items = [i, ...t.items.filter((e) => e.id !== i.id)], r.toast !== !1 && !t.paneOpen && (t.toasts = [...t.toasts.filter((e) => e.id !== i.id), {
|
|
5155
5169
|
id: i.id,
|
|
5156
|
-
duration:
|
|
5170
|
+
duration: Is(i, r.duration),
|
|
5157
5171
|
item: i
|
|
5158
5172
|
}]), i.id;
|
|
5159
5173
|
}
|
|
@@ -5202,25 +5216,25 @@ function Is(e = []) {
|
|
|
5202
5216
|
markAllRead: c
|
|
5203
5217
|
};
|
|
5204
5218
|
}
|
|
5205
|
-
var
|
|
5206
|
-
function
|
|
5207
|
-
return
|
|
5219
|
+
var Rs;
|
|
5220
|
+
function zs() {
|
|
5221
|
+
return Rs ??= Ls();
|
|
5208
5222
|
}
|
|
5209
5223
|
// src/components/Notification/Notification.vue?vue&type=script&setup=true&lang.ts
|
|
5210
|
-
var
|
|
5224
|
+
var Bs = { class: "sr-only" }, Vs = {
|
|
5211
5225
|
key: 0,
|
|
5212
5226
|
class: "text-black/65 [&_a]:font-bold [&_a]:text-primary [&_a]:underline [&_b]:font-bold [&_b]:text-black [&_strong]:font-bold [&_strong]:text-black"
|
|
5213
|
-
},
|
|
5227
|
+
}, Hs = {
|
|
5214
5228
|
key: 1,
|
|
5215
5229
|
class: "flex items-center gap-1.5 text-xs text-black/65"
|
|
5216
|
-
},
|
|
5230
|
+
}, Us = {
|
|
5217
5231
|
key: 0,
|
|
5218
5232
|
class: "size-2 shrink-0 rounded-full bg-primary",
|
|
5219
5233
|
"aria-hidden": "true"
|
|
5220
|
-
},
|
|
5234
|
+
}, Ws = {
|
|
5221
5235
|
key: 1,
|
|
5222
5236
|
class: "sr-only"
|
|
5223
|
-
},
|
|
5237
|
+
}, Gs = ["href"], Ks = /* @__PURE__ */ f({
|
|
5224
5238
|
__name: "Notification",
|
|
5225
5239
|
props: {
|
|
5226
5240
|
type: { default: "info" },
|
|
@@ -5285,12 +5299,12 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5285
5299
|
c("p", {
|
|
5286
5300
|
id: f,
|
|
5287
5301
|
class: y(M(X)("font-bold", h.value && "min-w-0 flex-1 py-1"))
|
|
5288
|
-
}, [c("span",
|
|
5289
|
-
!h.value && (e.description || t.$slots.default) ? (w(), s("div",
|
|
5290
|
-
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p",
|
|
5291
|
-
e.unread ? (w(), s("span",
|
|
5292
|
-
e.unread ? (w(), s("span",
|
|
5293
|
-
e.createdAt ? (w(), a(
|
|
5302
|
+
}, [c("span", Bs, j(p[e.type].word) + ": ", 1), u(j(e.title), 1)], 2),
|
|
5303
|
+
!h.value && (e.description || t.$slots.default) ? (w(), s("div", Vs, [O(t.$slots, "default", {}, () => [d(m)])])) : o("", !0),
|
|
5304
|
+
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p", Hs, [
|
|
5305
|
+
e.unread ? (w(), s("span", Us)) : o("", !0),
|
|
5306
|
+
e.unread ? (w(), s("span", Ws, "Unread, ")) : o("", !0),
|
|
5307
|
+
e.createdAt ? (w(), a(Es, {
|
|
5294
5308
|
key: 2,
|
|
5295
5309
|
date: e.createdAt,
|
|
5296
5310
|
now: e.now
|
|
@@ -5305,7 +5319,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5305
5319
|
"as-child": "",
|
|
5306
5320
|
onClick: g
|
|
5307
5321
|
}, {
|
|
5308
|
-
default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9,
|
|
5322
|
+
default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9, Gs)]),
|
|
5309
5323
|
_: 1
|
|
5310
5324
|
})) : e.action ? (w(), a(Z, {
|
|
5311
5325
|
key: 1,
|
|
@@ -5331,11 +5345,11 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5331
5345
|
}, 8, ["class", "aria-label"])) : o("", !0)
|
|
5332
5346
|
], 2));
|
|
5333
5347
|
}
|
|
5334
|
-
}),
|
|
5348
|
+
}), qs = {
|
|
5335
5349
|
key: 0,
|
|
5336
5350
|
class: "absolute top-1 left-1/2 ml-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red px-1 text-xs leading-none font-bold text-white ring-2 ring-white",
|
|
5337
5351
|
"aria-hidden": "true"
|
|
5338
|
-
},
|
|
5352
|
+
}, Js = { class: "flex h-11 shrink-0 items-center justify-between gap-2 border-b border-black/15 pr-2 pl-4" }, Ys = ["inert"], Xs = /* @__PURE__ */ f({
|
|
5339
5353
|
__name: "NotificationPane",
|
|
5340
5354
|
props: /*@__PURE__*/ g({
|
|
5341
5355
|
notifications: {},
|
|
@@ -5351,7 +5365,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5351
5365
|
}),
|
|
5352
5366
|
emits: ["update:open"],
|
|
5353
5367
|
setup(e) {
|
|
5354
|
-
let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ??
|
|
5368
|
+
let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ?? zs()), p = i(() => f.value.items), m = i(() => f.value.unreadCount.value), h = i(() => m.value > 99 ? "99+" : String(m.value)), g = i(() => r.label ?? t("ui.notifications.title")), _ = i(() => m.value ? t("ui.notifications.withUnread", {
|
|
5355
5369
|
label: g.value,
|
|
5356
5370
|
count: h.value
|
|
5357
5371
|
}) : g.value), b = `${P()}-heading`, x = E(), S = E();
|
|
@@ -5401,7 +5415,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5401
5415
|
ref: C,
|
|
5402
5416
|
"aria-labelledby": b,
|
|
5403
5417
|
class: "flex min-h-0 flex-col"
|
|
5404
|
-
}, [c("div",
|
|
5418
|
+
}, [c("div", Js, [c("h2", {
|
|
5405
5419
|
id: b,
|
|
5406
5420
|
ref_key: "heading",
|
|
5407
5421
|
ref: x,
|
|
@@ -5426,7 +5440,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5426
5440
|
}, [(w(!0), s(n, null, D(p.value, (e, t) => (w(), s("li", {
|
|
5427
5441
|
key: e.id,
|
|
5428
5442
|
class: "border-b border-black/15 last:border-b-0"
|
|
5429
|
-
}, [d(
|
|
5443
|
+
}, [d(Ks, {
|
|
5430
5444
|
appearance: "row",
|
|
5431
5445
|
type: e.type,
|
|
5432
5446
|
title: e.title,
|
|
@@ -5445,7 +5459,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5445
5459
|
"unread",
|
|
5446
5460
|
"onDismiss",
|
|
5447
5461
|
"onAction"
|
|
5448
|
-
])]))), 128))], 42,
|
|
5462
|
+
])]))), 128))], 42, Ys)) : (w(), a(wo, {
|
|
5449
5463
|
key: 1,
|
|
5450
5464
|
size: "sm",
|
|
5451
5465
|
icon: M(oe),
|
|
@@ -5464,13 +5478,13 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5464
5478
|
"aria-label": _.value,
|
|
5465
5479
|
class: y(M(X)("relative overflow-visible", e.ui?.trigger))
|
|
5466
5480
|
}, {
|
|
5467
|
-
default: V(() => [d(M(ae)), m.value ? (w(), s("span",
|
|
5481
|
+
default: V(() => [d(M(ae)), m.value ? (w(), s("span", qs, j(h.value), 1)) : o("", !0)]),
|
|
5468
5482
|
_: 1
|
|
5469
5483
|
}, 8, ["aria-label", "class"])]),
|
|
5470
5484
|
_: 1
|
|
5471
5485
|
}, 8, ["open", "ui"]));
|
|
5472
5486
|
}
|
|
5473
|
-
}),
|
|
5487
|
+
}), Zs = { class: "in-data-expanded:hidden" }, Qs = { class: "hidden in-data-expanded:inline" }, $s = { class: "sr-only" }, ec = 8, tc = .5, nc = 80, rc = /* @__PURE__ */ f({
|
|
5474
5488
|
__name: "Toaster",
|
|
5475
5489
|
props: {
|
|
5476
5490
|
notifications: {},
|
|
@@ -5487,15 +5501,15 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5487
5501
|
},
|
|
5488
5502
|
emits: ["more"],
|
|
5489
5503
|
setup(e, { emit: t }) {
|
|
5490
|
-
let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ??
|
|
5504
|
+
let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ?? zs()), m = i(() => l.position === "top-right"), h = E(typeof window > "u" ? 800 : window.innerHeight), g = () => h.value = window.innerHeight;
|
|
5491
5505
|
C(() => window.addEventListener("resize", g)), S(() => window.removeEventListener("resize", g));
|
|
5492
|
-
let _ = i(() => Math.max(h.value -
|
|
5493
|
-
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) +
|
|
5506
|
+
let _ = i(() => Math.max(h.value - nc, 108)), b = (e) => e.compact ? 42 : e.action ? 116 : e.description ? 78 : 56, O = i(() => {
|
|
5507
|
+
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) + ec, -8), i = /* @__PURE__ */ new Set();
|
|
5494
5508
|
if (r <= _.value) n.forEach((e) => i.add(e.id));
|
|
5495
5509
|
else {
|
|
5496
5510
|
let e = 44;
|
|
5497
5511
|
for (let r of n) {
|
|
5498
|
-
let n = e + t(r) + (i.size ?
|
|
5512
|
+
let n = e + t(r) + (i.size ? ec : 0);
|
|
5499
5513
|
if (i.size && n > _.value) break;
|
|
5500
5514
|
i.add(r.id), e = n;
|
|
5501
5515
|
}
|
|
@@ -5550,16 +5564,16 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5550
5564
|
}
|
|
5551
5565
|
let q = i(() => {
|
|
5552
5566
|
let e = k.value.filter((e) => !W.has(e.id)), t = /* @__PURE__ */ new Map(), n = [], r = 0;
|
|
5553
|
-
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) +
|
|
5554
|
-
let i = Math.max(r -
|
|
5567
|
+
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) + ec;
|
|
5568
|
+
let i = Math.max(r - ec, 0), a = Math.min(l.maxHeight, _.value), o = 0;
|
|
5555
5569
|
for (; o < e.length && (o === 0 || n[o] + (L.get(e[o].id) ?? 0) <= a);) o++;
|
|
5556
|
-
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u +
|
|
5570
|
+
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u + ec;
|
|
5557
5571
|
e.forEach((r, i) => {
|
|
5558
5572
|
let a = i >= o;
|
|
5559
5573
|
t.set(r.id, {
|
|
5560
5574
|
spread: n[i],
|
|
5561
5575
|
stacked: a ? d : n[i],
|
|
5562
|
-
scale: a ?
|
|
5576
|
+
scale: a ? tc : 1,
|
|
5563
5577
|
opacity: +!a,
|
|
5564
5578
|
z: e.length - i
|
|
5565
5579
|
});
|
|
@@ -5570,7 +5584,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5570
5584
|
places: t,
|
|
5571
5585
|
spreadHeight: i + (A.value > 0 ? 44 : 0),
|
|
5572
5586
|
stackedHeight: p,
|
|
5573
|
-
moreOffset: i + (i ?
|
|
5587
|
+
moreOffset: i + (i ? ec : 0),
|
|
5574
5588
|
notInView: f,
|
|
5575
5589
|
pillOffset: d
|
|
5576
5590
|
};
|
|
@@ -5579,10 +5593,10 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5579
5593
|
let t = W.has(e) ? G.get(e) : q.value.places.get(e), n = m.value ? 1 : -1, r = (e) => `${n * e}px`, i = {
|
|
5580
5594
|
"--toast-spread": r(q.value.moreOffset),
|
|
5581
5595
|
"--toast-stacked": r(q.value.pillOffset),
|
|
5582
|
-
"--toast-scale":
|
|
5596
|
+
"--toast-scale": tc,
|
|
5583
5597
|
"--toast-opacity": 0,
|
|
5584
5598
|
"--toast-spread-opacity": 0,
|
|
5585
|
-
"--toast-spread-scale":
|
|
5599
|
+
"--toast-spread-scale": tc,
|
|
5586
5600
|
"--toast-z": 0
|
|
5587
5601
|
};
|
|
5588
5602
|
if (!t && N.has(e) || t && !U.has(e) && P.has(e)) return i;
|
|
@@ -5640,7 +5654,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5640
5654
|
class: y(M(X)("absolute inset-x-0 z-(--toast-z) list-none rounded", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", m.value ? "top-0 origin-top" : "bottom-0 origin-bottom", "translate-y-(--toast-stacked) scale-(--toast-scale) opacity-(--toast-opacity)", "data-expanded:translate-y-(--toast-spread) data-expanded:scale-(--toast-spread-scale) data-expanded:opacity-(--toast-spread-opacity)", "transition-[translate,scale,opacity] duration-300 ease-out motion-reduce:transition-none", "data-[state=closed]:animate-fade-out", "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=move]:transition-none", "data-[swipe=cancel]:translate-x-0", "data-[swipe=end]:animate-slide-out-right")),
|
|
5641
5655
|
"onUpdate:open": (t) => te(e.id, t)
|
|
5642
5656
|
}, {
|
|
5643
|
-
default: V(() => [d(
|
|
5657
|
+
default: V(() => [d(Ks, {
|
|
5644
5658
|
ref_for: !0,
|
|
5645
5659
|
ref: (t) => H(e.id, t),
|
|
5646
5660
|
type: e.item.type,
|
|
@@ -5683,7 +5697,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5683
5697
|
type: "button",
|
|
5684
5698
|
class: y(M(X)("flex cursor-pointer items-center justify-center overflow-hidden border border-black/15 bg-white font-bold whitespace-nowrap text-black shadow-md hover:bg-surface-elevated", "h-7 w-24 rounded-2xl text-xs", A.value && "in-data-expanded:h-9 in-data-expanded:w-full in-data-expanded:rounded in-data-expanded:text-sm", "transition-[width,height,border-radius,font-size,background-color] duration-300 ease-out motion-reduce:transition-none", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0")),
|
|
5685
5699
|
onClick: ie
|
|
5686
|
-
}, [A.value ? (w(), s(n, { key: 0 }, [c("span",
|
|
5700
|
+
}, [A.value ? (w(), s(n, { key: 0 }, [c("span", Zs, j(M(r)("ui.notifications.more", { count: q.value.notInView })), 1), c("span", Qs, j(M(r)("ui.notifications.more", { count: A.value })), 1)], 64)) : (w(), s(n, { key: 1 }, [u(j(M(r)("ui.notifications.more", { count: q.value.notInView })), 1)], 64)), c("span", $s, "\xA0" + j(M(r)("ui.notifications.notifications")), 1)], 2)], 6)) : o("", !0)]),
|
|
5687
5701
|
_: 1
|
|
5688
5702
|
}, 8, [
|
|
5689
5703
|
"label",
|
|
@@ -5693,7 +5707,7 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5693
5707
|
_: 1
|
|
5694
5708
|
}, 8, ["label"]));
|
|
5695
5709
|
}
|
|
5696
|
-
}),
|
|
5710
|
+
}), ic = { ui: {
|
|
5697
5711
|
age: {
|
|
5698
5712
|
born: "Born {date}",
|
|
5699
5713
|
birthdayToday: "Birthday today",
|
|
@@ -5809,16 +5823,16 @@ var zs = { class: "sr-only" }, Bs = {
|
|
|
5809
5823
|
selectRow: "Select row {n}",
|
|
5810
5824
|
select: "Select"
|
|
5811
5825
|
}
|
|
5812
|
-
} },
|
|
5813
|
-
function
|
|
5814
|
-
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(
|
|
5826
|
+
} }, ac = { en: ic };
|
|
5827
|
+
function oc(e = {}) {
|
|
5828
|
+
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(ac), ...Object.keys(t)])], a = {};
|
|
5815
5829
|
for (let e of i) a[e] = {
|
|
5816
|
-
...
|
|
5830
|
+
...ac[e],
|
|
5817
5831
|
...t[e]
|
|
5818
5832
|
};
|
|
5819
5833
|
let o = G({
|
|
5820
5834
|
legacy: !1,
|
|
5821
|
-
locale: e.locale ??
|
|
5835
|
+
locale: e.locale ?? sc(i, n, r),
|
|
5822
5836
|
fallbackLocale: n,
|
|
5823
5837
|
messages: a
|
|
5824
5838
|
});
|
|
@@ -5829,7 +5843,7 @@ function ac(e = {}) {
|
|
|
5829
5843
|
typeof document < "u" && (document.documentElement.lang = e);
|
|
5830
5844
|
}, { immediate: !0 }), o;
|
|
5831
5845
|
}
|
|
5832
|
-
function
|
|
5846
|
+
function sc(e, t, n) {
|
|
5833
5847
|
try {
|
|
5834
5848
|
let t = localStorage.getItem(n);
|
|
5835
5849
|
if (t && e.includes(t)) return t;
|
|
@@ -5840,4 +5854,4 @@ function oc(e, t, n) {
|
|
|
5840
5854
|
}
|
|
5841
5855
|
return t;
|
|
5842
5856
|
}
|
|
5843
|
-
export {
|
|
5857
|
+
export { Os as Age, Xr as AppShell, ur as Avatar, Ei as AvatarGroup, br as Badge, ai as Breadcrumb, Z as Button, sa as Calendar, Ai as Card, ao as Checkbox, So as CheckboxGroup, fs as Checklist, Ni as Chip, Ii as Divider, wo as EmptyState, qi as FormField, vr as Header, zi as InfoTip, Yi as Input, Ua as InputCode, Aa as InputDate, Qi as InputNumber, Ra as InputPassword, Pa as InputRichText, vo as InputTextArea, Co as LanguageSwitcher, ks as Link, oi as Menu, Ks as Notification, Xs as NotificationPane, mi as PageHeader, Jn as Popover, Lr as Progress, po as RadioGroup, Es as RelativeTime, ro as Select, yi as SettingsRow, Pr as Sidebar, Kr as Slideover, Rn as Spinner, es as StatTile, Ms as Steps, ls as SummaryList, go as Switch, Go as Table, Ns as Tabs, rc as Toaster, ja as Tooltip, ys as age, X as cn, oc as createKestonI18n, Ls as createNotifications, bs as daysToBirthday, ic as en, vs as formatDate, _s as formatDateTime, gs as relativeTime, xr as sidebarTrail, Do as sortRows, ps as toDate, ac as uiMessages, zs as useNotifications, ws as useNow };
|