@thekestongroup/ui 0.18.0 → 0.19.0
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/AppLauncher/AppLauncher.vue.d.ts +8 -0
- package/dist/components/Footer/Footer.vue.d.ts +2 -2
- package/dist/components/Header/Header.vue.d.ts +19 -1
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +50 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.vue.d.ts +8 -1
- package/dist/i18n/en.d.ts +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/keston-ui.js +696 -564
- package/package.json +1 -1
- package/src/components/AppLauncher/AppLauncher.vue +22 -1
- package/src/components/AppLauncher/apps.ts +2 -2
- package/src/components/AppShell/AppShell.vue +2 -1
- package/src/components/Footer/Footer.stories.ts +3 -3
- package/src/components/Footer/Footer.vue +5 -4
- package/src/components/Footer/footer.test.ts +2 -2
- package/src/components/Footer/links.ts +3 -3
- package/src/components/FormField/FormField.vue +5 -1
- package/src/components/Header/Header.stories.ts +25 -12
- package/src/components/Header/Header.vue +38 -4
- package/src/components/SegmentedControl/SegmentedControl.stories.ts +57 -0
- package/src/components/SegmentedControl/SegmentedControl.vue +93 -0
- package/src/components/ThemeSwitcher/ThemeSwitcher.vue +24 -2
- package/src/i18n/en.ts +1 -1
- package/src/index.ts +3 -1
- package/src/styles/theme.css +14 -0
package/dist/keston-ui.js
CHANGED
|
@@ -425,13 +425,15 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
425
425
|
id: "utilities",
|
|
426
426
|
label: "Utilities",
|
|
427
427
|
href: "https://utilities.keston.co",
|
|
428
|
-
icon: "utilities"
|
|
428
|
+
icon: "utilities",
|
|
429
|
+
signsIn: !1
|
|
429
430
|
},
|
|
430
431
|
{
|
|
431
432
|
id: "design",
|
|
432
433
|
label: "Design system",
|
|
433
434
|
href: "https://ui.keston.co",
|
|
434
|
-
icon: "design"
|
|
435
|
+
icon: "design",
|
|
436
|
+
signsIn: !1
|
|
435
437
|
}
|
|
436
438
|
], Pr = ["aria-label"], Fr = [
|
|
437
439
|
"href",
|
|
@@ -450,6 +452,7 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
450
452
|
current: {},
|
|
451
453
|
align: { default: "end" },
|
|
452
454
|
label: {},
|
|
455
|
+
loginHint: {},
|
|
453
456
|
class: { type: [
|
|
454
457
|
Boolean,
|
|
455
458
|
null,
|
|
@@ -461,18 +464,27 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
461
464
|
setup(e) {
|
|
462
465
|
let { t } = J(), r = e;
|
|
463
466
|
function i(e) {
|
|
467
|
+
if (!r.loginHint || e.id === r.current || e.signsIn === !1) return e.href;
|
|
468
|
+
try {
|
|
469
|
+
let t = new URL(e.href);
|
|
470
|
+
return t.searchParams.set("login_hint", r.loginHint), t.toString();
|
|
471
|
+
} catch {
|
|
472
|
+
return e.href;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
function o(e) {
|
|
464
476
|
return typeof e.icon == "string" ? Rr[e.icon] ?? te : e.icon ?? te;
|
|
465
477
|
}
|
|
466
|
-
return (
|
|
478
|
+
return (l, u) => (T(), a(Mr, {
|
|
467
479
|
content: { align: e.align },
|
|
468
480
|
ui: { content: "w-64 p-2" }
|
|
469
481
|
}, {
|
|
470
482
|
content: H(({ close: r }) => [c("nav", { "aria-label": e.label ?? P(t)("ui.appLauncher.label") }, [c("ul", null, [(T(!0), s(n, null, k(e.apps, (t) => (T(), s("li", { key: t.id }, [c("a", {
|
|
471
|
-
href: t
|
|
483
|
+
href: i(t),
|
|
472
484
|
"aria-current": t.id === e.current ? "page" : void 0,
|
|
473
485
|
class: b(P(X)("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-bold text-ink outline-none hover:bg-hover focus-visible:outline-2 focus-visible:outline-focus", t.id === e.current && "bg-selected")),
|
|
474
486
|
onClick: (e) => r()
|
|
475
|
-
}, [c("span", Ir, [(T(), a(j(
|
|
487
|
+
}, [c("span", Ir, [(T(), a(j(o(t)), {
|
|
476
488
|
class: "size-5",
|
|
477
489
|
"aria-hidden": "true"
|
|
478
490
|
}))]), c("span", Lr, N(t.label), 1)], 10, Fr)]))), 128))])], 8, Pr)]),
|
|
@@ -690,7 +702,8 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
690
702
|
"bg-surface text-ink border border-ink/45 rounded shadow-xs cursor-text transition",
|
|
691
703
|
"outline-2 outline-offset-1 outline-transparent forced-colors:not-has-focus-visible:outline-0",
|
|
692
704
|
"has-focus-visible:outline-focus",
|
|
693
|
-
"has-[[data-pointer-focus]]:outline-transparent!"
|
|
705
|
+
"has-[[data-pointer-focus]]:outline-transparent!",
|
|
706
|
+
"has-[input:autofill]:bg-autofill has-[input:-webkit-autofill]:bg-autofill"
|
|
694
707
|
], x = {
|
|
695
708
|
error: "border-red",
|
|
696
709
|
success: "border-green",
|
|
@@ -1204,12 +1217,86 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1204
1217
|
"class"
|
|
1205
1218
|
]));
|
|
1206
1219
|
}
|
|
1207
|
-
}), gi = /* @__PURE__ */ f({
|
|
1220
|
+
}), gi = { key: 1 }, _i = /* @__PURE__ */ f({
|
|
1221
|
+
__name: "SegmentedControl",
|
|
1222
|
+
props: /*@__PURE__*/ _({
|
|
1223
|
+
label: {},
|
|
1224
|
+
hideLabel: { type: Boolean },
|
|
1225
|
+
options: {},
|
|
1226
|
+
iconOnly: { type: Boolean },
|
|
1227
|
+
size: { default: "md" },
|
|
1228
|
+
disabled: { type: Boolean },
|
|
1229
|
+
name: {},
|
|
1230
|
+
class: { type: [
|
|
1231
|
+
Boolean,
|
|
1232
|
+
null,
|
|
1233
|
+
String,
|
|
1234
|
+
Object,
|
|
1235
|
+
Array
|
|
1236
|
+
] }
|
|
1237
|
+
}, {
|
|
1238
|
+
modelValue: {},
|
|
1239
|
+
modelModifiers: {}
|
|
1240
|
+
}),
|
|
1241
|
+
emits: ["update:modelValue"],
|
|
1242
|
+
setup(e) {
|
|
1243
|
+
let t = e, r = L(e, "modelValue"), l = `${I()}-label`, u = {
|
|
1244
|
+
sm: {
|
|
1245
|
+
item: "h-7 px-2.5 text-xs gap-1.5 [&_svg]:size-3.5",
|
|
1246
|
+
icon: "size-7"
|
|
1247
|
+
},
|
|
1248
|
+
md: {
|
|
1249
|
+
item: "h-8 px-3 text-sm gap-2 [&_svg]:size-4",
|
|
1250
|
+
icon: "size-8"
|
|
1251
|
+
}
|
|
1252
|
+
}, f = i(() => t.iconOnly ? `${u[t.size].icon} justify-center [&_svg]:size-4` : u[t.size].item);
|
|
1253
|
+
return (i, u) => (T(), s("div", { class: b(P(X)("inline-flex flex-col gap-1.5", t.class)) }, [c("span", {
|
|
1254
|
+
id: l,
|
|
1255
|
+
class: b(e.hideLabel ? "sr-only" : "text-sm font-bold text-ink")
|
|
1256
|
+
}, N(e.label), 3), d(P(mn), {
|
|
1257
|
+
modelValue: r.value,
|
|
1258
|
+
"onUpdate:modelValue": u[0] ||= (e) => r.value = e,
|
|
1259
|
+
"aria-labelledby": l,
|
|
1260
|
+
disabled: e.disabled,
|
|
1261
|
+
name: e.name,
|
|
1262
|
+
orientation: "horizontal",
|
|
1263
|
+
loop: "",
|
|
1264
|
+
class: "inline-flex w-max max-w-full gap-0.5 rounded-lg bg-ink/5 p-0.5"
|
|
1265
|
+
}, {
|
|
1266
|
+
default: H(() => [(T(!0), s(n, null, k(e.options, (t) => (T(), a(P(pn), {
|
|
1267
|
+
key: t.value,
|
|
1268
|
+
value: t.value,
|
|
1269
|
+
disabled: t.disabled,
|
|
1270
|
+
"aria-label": e.iconOnly ? t.label : void 0,
|
|
1271
|
+
title: e.iconOnly ? t.label : void 0,
|
|
1272
|
+
class: b(P(X)("inline-flex shrink-0 cursor-pointer items-center rounded-md font-bold whitespace-nowrap text-ink/65 outline-2 outline-offset-1 outline-transparent transition-colors duration-150 motion-reduce:transition-none", "not-disabled:hover:text-ink focus-visible:outline-focus", "data-[state=checked]:bg-control data-[state=checked]:text-ink data-[state=checked]:shadow-xs", "disabled:cursor-not-allowed disabled:opacity-40", f.value))
|
|
1273
|
+
}, {
|
|
1274
|
+
default: H(() => [t.icon ? (T(), a(j(t.icon), {
|
|
1275
|
+
key: 0,
|
|
1276
|
+
"aria-hidden": "true"
|
|
1277
|
+
})) : o("", !0), e.iconOnly ? o("", !0) : (T(), s("span", gi, N(t.label), 1))]),
|
|
1278
|
+
_: 2
|
|
1279
|
+
}, 1032, [
|
|
1280
|
+
"value",
|
|
1281
|
+
"disabled",
|
|
1282
|
+
"aria-label",
|
|
1283
|
+
"title",
|
|
1284
|
+
"class"
|
|
1285
|
+
]))), 128))]),
|
|
1286
|
+
_: 1
|
|
1287
|
+
}, 8, [
|
|
1288
|
+
"modelValue",
|
|
1289
|
+
"disabled",
|
|
1290
|
+
"name"
|
|
1291
|
+
])], 2));
|
|
1292
|
+
}
|
|
1293
|
+
}), vi = /* @__PURE__ */ f({
|
|
1208
1294
|
__name: "ThemeSwitcher",
|
|
1209
1295
|
props: {
|
|
1210
1296
|
label: {},
|
|
1211
1297
|
hideLabel: { type: Boolean },
|
|
1212
1298
|
disabled: { type: Boolean },
|
|
1299
|
+
appearance: { default: "select" },
|
|
1213
1300
|
class: { type: [
|
|
1214
1301
|
Boolean,
|
|
1215
1302
|
null,
|
|
@@ -1231,7 +1318,7 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1231
1318
|
icon: Le
|
|
1232
1319
|
},
|
|
1233
1320
|
{
|
|
1234
|
-
label: n("ui.themeSwitcher.system"),
|
|
1321
|
+
label: t.appearance === "segmented" ? n("ui.themeSwitcher.systemShort") : n("ui.themeSwitcher.system"),
|
|
1235
1322
|
value: "system",
|
|
1236
1323
|
icon: Ie
|
|
1237
1324
|
}
|
|
@@ -1239,9 +1326,27 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1239
1326
|
get: () => r.value,
|
|
1240
1327
|
set: (e) => o(e)
|
|
1241
1328
|
});
|
|
1242
|
-
return (r, i) => (T(), a(
|
|
1329
|
+
return (r, i) => e.appearance === "segmented" ? (T(), a(_i, {
|
|
1330
|
+
key: 0,
|
|
1243
1331
|
modelValue: c.value,
|
|
1244
1332
|
"onUpdate:modelValue": i[0] ||= (e) => c.value = e,
|
|
1333
|
+
size: "sm",
|
|
1334
|
+
label: e.label ?? P(n)("ui.themeSwitcher.label"),
|
|
1335
|
+
"hide-label": e.hideLabel,
|
|
1336
|
+
options: s.value,
|
|
1337
|
+
disabled: e.disabled,
|
|
1338
|
+
class: b(t.class)
|
|
1339
|
+
}, null, 8, [
|
|
1340
|
+
"modelValue",
|
|
1341
|
+
"label",
|
|
1342
|
+
"hide-label",
|
|
1343
|
+
"options",
|
|
1344
|
+
"disabled",
|
|
1345
|
+
"class"
|
|
1346
|
+
])) : (T(), a(mi, {
|
|
1347
|
+
key: 1,
|
|
1348
|
+
modelValue: c.value,
|
|
1349
|
+
"onUpdate:modelValue": i[1] ||= (e) => c.value = e,
|
|
1245
1350
|
label: e.label ?? P(n)("ui.themeSwitcher.label"),
|
|
1246
1351
|
"hide-label": e.hideLabel,
|
|
1247
1352
|
options: s.value,
|
|
@@ -1258,30 +1363,30 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1258
1363
|
}
|
|
1259
1364
|
});
|
|
1260
1365
|
// src/components/Footer/footer.ts
|
|
1261
|
-
function
|
|
1366
|
+
function yi(e, t) {
|
|
1262
1367
|
return t && t < e ? `${t}–${e}` : String(e);
|
|
1263
1368
|
}
|
|
1264
|
-
function
|
|
1369
|
+
function bi(e) {
|
|
1265
1370
|
return e ? /^v/i.test(e) ? `v${e.slice(1)}` : `v${e}` : "";
|
|
1266
1371
|
}
|
|
1267
|
-
function
|
|
1372
|
+
function xi(e) {
|
|
1268
1373
|
return e ? e.replace(/^v/i, "") : "";
|
|
1269
1374
|
}
|
|
1270
1375
|
// src/components/Footer/links.ts
|
|
1271
|
-
var
|
|
1376
|
+
var Si = [
|
|
1272
1377
|
{
|
|
1273
|
-
label: "Help
|
|
1378
|
+
label: "Help",
|
|
1274
1379
|
href: "https://thekestongroup.com/help"
|
|
1275
1380
|
},
|
|
1276
1381
|
{
|
|
1277
|
-
label: "Privacy
|
|
1382
|
+
label: "Privacy",
|
|
1278
1383
|
href: "https://thekestongroup.com/privacy"
|
|
1279
1384
|
},
|
|
1280
1385
|
{
|
|
1281
|
-
label: "Terms
|
|
1386
|
+
label: "Terms",
|
|
1282
1387
|
href: "https://thekestongroup.com/terms"
|
|
1283
1388
|
}
|
|
1284
|
-
],
|
|
1389
|
+
], Ci = [
|
|
1285
1390
|
{
|
|
1286
1391
|
label: "Keston ID",
|
|
1287
1392
|
href: "https://id.keston.co"
|
|
@@ -1298,26 +1403,26 @@ var bi = [
|
|
|
1298
1403
|
label: "Design system",
|
|
1299
1404
|
href: "https://ui.keston.co"
|
|
1300
1405
|
}
|
|
1301
|
-
],
|
|
1406
|
+
], wi = ["aria-label"], Ti = { class: "flex flex-wrap items-center gap-x-4 gap-y-1" }, Ei = {
|
|
1302
1407
|
key: 0,
|
|
1303
1408
|
class: "hidden h-4 w-px bg-ink/10 sm:block",
|
|
1304
1409
|
"aria-hidden": "true"
|
|
1305
|
-
},
|
|
1410
|
+
}, Di = {
|
|
1306
1411
|
key: 0,
|
|
1307
1412
|
class: "flex flex-wrap items-center gap-2"
|
|
1308
|
-
},
|
|
1413
|
+
}, Oi = {
|
|
1309
1414
|
key: 1,
|
|
1310
1415
|
class: "flex flex-wrap items-baseline gap-x-1.5"
|
|
1311
|
-
},
|
|
1416
|
+
}, ki = {
|
|
1312
1417
|
key: 0,
|
|
1313
1418
|
class: "font-bold text-ink/80"
|
|
1314
|
-
},
|
|
1419
|
+
}, Ai = { key: 1 }, ji = { class: "sr-only" }, Mi = { "aria-hidden": "true" }, Ni = ["title"], Pi = { class: "sr-only" }, Fi = {
|
|
1315
1420
|
class: "font-mono text-xs text-ink/55",
|
|
1316
1421
|
"aria-hidden": "true"
|
|
1317
|
-
},
|
|
1422
|
+
}, Ii = /* @__PURE__ */ f({
|
|
1318
1423
|
__name: "Footer",
|
|
1319
1424
|
props: {
|
|
1320
|
-
links: { default: () =>
|
|
1425
|
+
links: { default: () => Si },
|
|
1321
1426
|
moreLinks: { default: () => [] },
|
|
1322
1427
|
linkComponent: { default: void 0 },
|
|
1323
1428
|
appName: {},
|
|
@@ -1344,7 +1449,7 @@ var bi = [
|
|
|
1344
1449
|
ui: {}
|
|
1345
1450
|
},
|
|
1346
1451
|
setup(e) {
|
|
1347
|
-
let { t, availableLocales: r } = J(), l = i(() => f.languageSwitcher && r.length > 1), f = e, p = i(() =>
|
|
1452
|
+
let { t, availableLocales: r } = J(), l = i(() => f.languageSwitcher && r.length > 1), f = e, p = i(() => yi(f.year ?? (/* @__PURE__ */ new Date()).getFullYear(), f.since)), m = i(() => bi(f.version)), h = i(() => f.version ? t("ui.footer.version", { version: xi(f.version) }) : ""), g = i(() => f.build ? t("ui.footer.build", { build: f.build }) : "");
|
|
1348
1453
|
function _(e) {
|
|
1349
1454
|
return e.to === void 0 ? {
|
|
1350
1455
|
href: e.href,
|
|
@@ -1358,33 +1463,33 @@ var bi = [
|
|
|
1358
1463
|
return (r, i) => (T(), s("footer", { class: b(P(X)("flex shrink-0 flex-col gap-3 border-t border-ink/10 bg-surface px-4 py-4 text-sm text-ink/65 sm:flex-row sm:items-center sm:justify-between sm:px-6", f.class)) }, [c("nav", {
|
|
1359
1464
|
"aria-label": P(t)("ui.footer.label"),
|
|
1360
1465
|
class: b(P(X)("min-w-0", e.ui?.links))
|
|
1361
|
-
}, [A(r.$slots, "nav", {}, () => [c("ul",
|
|
1466
|
+
}, [A(r.$slots, "nav", {}, () => [c("ul", Ti, [
|
|
1362
1467
|
(T(!0), s(n, null, k(e.links, (e) => (T(), s("li", { key: e.label }, [d(Br, v({ ref_for: !0 }, _(e), { icon: !1 }), {
|
|
1363
1468
|
default: H(() => [u(N(e.label), 1)]),
|
|
1364
1469
|
_: 2
|
|
1365
1470
|
}, 1040)]))), 128)),
|
|
1366
|
-
e.moreLinks.length ? (T(), s("li",
|
|
1471
|
+
e.moreLinks.length ? (T(), s("li", Ei)) : o("", !0),
|
|
1367
1472
|
(T(!0), s(n, null, k(e.moreLinks, (e) => (T(), s("li", { key: e.label }, [d(Br, v({ ref_for: !0 }, _(e), { icon: !1 }), {
|
|
1368
1473
|
default: H(() => [u(N(e.label), 1)]),
|
|
1369
1474
|
_: 2
|
|
1370
1475
|
}, 1040)]))), 128))
|
|
1371
|
-
])])], 10,
|
|
1372
|
-
l.value || e.themeSwitcher ? (T(), s("div",
|
|
1476
|
+
])])], 10, wi), c("div", { class: b(P(X)("flex flex-wrap items-center gap-x-3 gap-y-2 sm:justify-end", e.ui?.meta)) }, [
|
|
1477
|
+
l.value || e.themeSwitcher ? (T(), s("div", Di, [l.value ? (T(), a(hi, {
|
|
1373
1478
|
key: 0,
|
|
1374
1479
|
"hide-label": "",
|
|
1375
1480
|
class: "w-44"
|
|
1376
|
-
})) : o("", !0), e.themeSwitcher ? (T(), a(
|
|
1481
|
+
})) : o("", !0), e.themeSwitcher ? (T(), a(vi, {
|
|
1377
1482
|
key: 1,
|
|
1378
1483
|
"hide-label": "",
|
|
1379
|
-
|
|
1484
|
+
appearance: "segmented"
|
|
1380
1485
|
})) : o("", !0)])) : o("", !0),
|
|
1381
|
-
e.appName || e.version || e.build ? (T(), s("p",
|
|
1382
|
-
e.appName ? (T(), s("span",
|
|
1383
|
-
e.version ? (T(), s("span",
|
|
1486
|
+
e.appName || e.version || e.build ? (T(), s("p", Oi, [
|
|
1487
|
+
e.appName ? (T(), s("span", ki, N(e.appName), 1)) : o("", !0),
|
|
1488
|
+
e.version ? (T(), s("span", Ai, [c("span", ji, N(h.value), 1), c("span", Mi, N(m.value), 1)])) : o("", !0),
|
|
1384
1489
|
e.build ? (T(), s("span", {
|
|
1385
1490
|
key: 2,
|
|
1386
1491
|
title: g.value
|
|
1387
|
-
}, [c("span",
|
|
1492
|
+
}, [c("span", Pi, N(g.value), 1), c("span", Fi, N(e.build), 1)], 8, Ni)) : o("", !0)
|
|
1388
1493
|
])) : o("", !0),
|
|
1389
1494
|
c("p", null, N(P(t)("ui.footer.copyright", {
|
|
1390
1495
|
years: p.value,
|
|
@@ -1395,42 +1500,42 @@ var bi = [
|
|
|
1395
1500
|
}
|
|
1396
1501
|
});
|
|
1397
1502
|
// src/lib/initials.ts
|
|
1398
|
-
function
|
|
1503
|
+
function Li(e) {
|
|
1399
1504
|
let t = e.replace(/\([^)]*\)|\[[^\]]*\]/g, " ").split(/\s+/).map((e) => e.replace(/^[^\p{L}\p{N}]+/u, "")).filter(Boolean);
|
|
1400
1505
|
if (!t.length) return "";
|
|
1401
1506
|
let n = t[0], r = t.length > 1 ? t[t.length - 1] : "";
|
|
1402
1507
|
return ([...n][0] + ([...r][0] ?? "")).toUpperCase();
|
|
1403
1508
|
}
|
|
1404
1509
|
// src/components/Avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
1405
|
-
var
|
|
1510
|
+
var Ri = ["aria-label"], zi = [
|
|
1406
1511
|
"src",
|
|
1407
1512
|
"width",
|
|
1408
1513
|
"height"
|
|
1409
|
-
],
|
|
1514
|
+
], Bi = {
|
|
1410
1515
|
key: 1,
|
|
1411
1516
|
"aria-hidden": "true"
|
|
1412
|
-
},
|
|
1517
|
+
}, Vi = { class: "flex flex-col" }, Hi = {
|
|
1413
1518
|
key: 0,
|
|
1414
1519
|
class: "truncate px-4 pt-3 text-xs font-bold text-ink/65 uppercase"
|
|
1415
|
-
},
|
|
1520
|
+
}, Ui = { class: "flex items-center gap-3 px-4 py-3" }, Wi = [
|
|
1416
1521
|
"src",
|
|
1417
1522
|
"width",
|
|
1418
1523
|
"height"
|
|
1419
|
-
],
|
|
1524
|
+
], Gi = { class: "flex min-w-0 flex-col" }, Ki = { class: "truncate font-bold" }, qi = {
|
|
1420
1525
|
key: 0,
|
|
1421
1526
|
class: "truncate text-sm text-ink/65"
|
|
1422
|
-
},
|
|
1527
|
+
}, Ji = ["href"], Yi = [
|
|
1423
1528
|
"role",
|
|
1424
1529
|
"aria-label",
|
|
1425
1530
|
"aria-hidden"
|
|
1426
|
-
],
|
|
1531
|
+
], Xi = [
|
|
1427
1532
|
"src",
|
|
1428
1533
|
"width",
|
|
1429
1534
|
"height"
|
|
1430
|
-
],
|
|
1535
|
+
], Zi = {
|
|
1431
1536
|
key: 1,
|
|
1432
1537
|
"aria-hidden": "true"
|
|
1433
|
-
},
|
|
1538
|
+
}, Qi = "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary font-bold text-white select-none", $i = /* @__PURE__ */ f({
|
|
1434
1539
|
__name: "Avatar",
|
|
1435
1540
|
props: {
|
|
1436
1541
|
user: {},
|
|
@@ -1446,7 +1551,7 @@ var Ii = ["aria-label"], Li = [
|
|
|
1446
1551
|
] }
|
|
1447
1552
|
},
|
|
1448
1553
|
setup(e) {
|
|
1449
|
-
let t = e, r = i(() =>
|
|
1554
|
+
let t = e, r = i(() => Li(t.user.name)), l = O(!1);
|
|
1450
1555
|
B(() => t.user.avatar, () => l.value = !1);
|
|
1451
1556
|
let d = i(() => !!t.user.avatar && !l.value), f = i(() => d.value || !r.value ? t.user.name : `${r.value}, ${t.user.name}`), p = {
|
|
1452
1557
|
xs: "size-5 text-xs",
|
|
@@ -1473,8 +1578,8 @@ var Ii = ["aria-label"], Li = [
|
|
|
1473
1578
|
},
|
|
1474
1579
|
ui: { content: "w-64" }
|
|
1475
1580
|
}, {
|
|
1476
|
-
content: H(() => [c("div",
|
|
1477
|
-
class: b(P(X)(
|
|
1581
|
+
content: H(() => [c("div", Vi, [e.user.organisation ? (T(), s("p", Hi, N(e.user.organisation), 1)) : o("", !0), c("div", Ui, [c("span", {
|
|
1582
|
+
class: b(P(X)(Qi, p.lg)),
|
|
1478
1583
|
"aria-hidden": "true"
|
|
1479
1584
|
}, [d.value ? (T(), s("img", {
|
|
1480
1585
|
key: 0,
|
|
@@ -1485,19 +1590,19 @@ var Ii = ["aria-label"], Li = [
|
|
|
1485
1590
|
decoding: "async",
|
|
1486
1591
|
alt: "",
|
|
1487
1592
|
class: "size-full object-cover"
|
|
1488
|
-
}, null, 8,
|
|
1489
|
-
c("span",
|
|
1490
|
-
e.user.role ? (T(), s("span",
|
|
1593
|
+
}, null, 8, Wi)) : (T(), s(n, { key: 1 }, [u(N(r.value), 1)], 64))], 2), c("div", Gi, [
|
|
1594
|
+
c("span", Ki, N(e.user.name), 1),
|
|
1595
|
+
e.user.role ? (T(), s("span", qi, N(e.user.role), 1)) : o("", !0),
|
|
1491
1596
|
e.user.email ? (T(), s("a", {
|
|
1492
1597
|
key: 1,
|
|
1493
1598
|
href: `mailto:${e.user.email}`,
|
|
1494
1599
|
class: "truncate rounded-sm text-sm text-ink/65 underline-offset-2 hover:text-ink hover:underline outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
1495
|
-
}, N(e.user.email), 9,
|
|
1600
|
+
}, N(e.user.email), 9, Ji)) : o("", !0)
|
|
1496
1601
|
])])])]),
|
|
1497
1602
|
default: H(() => [c("button", {
|
|
1498
1603
|
type: "button",
|
|
1499
1604
|
"aria-label": f.value,
|
|
1500
|
-
class: b(P(X)(
|
|
1605
|
+
class: b(P(X)(Qi, p[e.size], "cursor-pointer outline-2 outline-offset-1 outline-transparent transition focus-visible:outline-focus", t.class))
|
|
1501
1606
|
}, [d.value ? (T(), s("img", {
|
|
1502
1607
|
key: 0,
|
|
1503
1608
|
src: e.user.avatar,
|
|
@@ -1508,14 +1613,14 @@ var Ii = ["aria-label"], Li = [
|
|
|
1508
1613
|
alt: "",
|
|
1509
1614
|
class: "size-full object-cover",
|
|
1510
1615
|
onError: h[0] ||= (e) => l.value = !0
|
|
1511
|
-
}, null, 40,
|
|
1616
|
+
}, null, 40, zi)) : (T(), s("span", Bi, N(r.value), 1))], 10, Ri)]),
|
|
1512
1617
|
_: 1
|
|
1513
1618
|
})) : (T(), s("span", {
|
|
1514
1619
|
key: 1,
|
|
1515
1620
|
role: e.decorative ? void 0 : "img",
|
|
1516
1621
|
"aria-label": e.decorative ? void 0 : e.user.name,
|
|
1517
1622
|
"aria-hidden": e.decorative || void 0,
|
|
1518
|
-
class: b(P(X)(
|
|
1623
|
+
class: b(P(X)(Qi, p[e.size], t.class))
|
|
1519
1624
|
}, [d.value ? (T(), s("img", {
|
|
1520
1625
|
key: 0,
|
|
1521
1626
|
src: e.user.avatar,
|
|
@@ -1526,18 +1631,20 @@ var Ii = ["aria-label"], Li = [
|
|
|
1526
1631
|
alt: "",
|
|
1527
1632
|
class: "size-full object-cover",
|
|
1528
1633
|
onError: h[1] ||= (e) => l.value = !0
|
|
1529
|
-
}, null, 40,
|
|
1634
|
+
}, null, 40, Xi)) : (T(), s("span", Zi, N(r.value), 1))], 10, Yi));
|
|
1530
1635
|
}
|
|
1531
|
-
}),
|
|
1636
|
+
}), ea = ["src", "alt"], ta = ["src", "alt"], na = ["src"], ra = ["src"], ia = { class: "truncate" }, aa = { class: "flex flex-col" }, oa = {
|
|
1532
1637
|
key: 0,
|
|
1533
1638
|
class: "border-b border-ink/10"
|
|
1534
|
-
},
|
|
1639
|
+
}, sa = ["title"], ca = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, la = { class: "flex min-w-0 flex-col" }, ua = ["title"], da = ["title"], fa = {
|
|
1535
1640
|
key: 1,
|
|
1536
1641
|
class: "flex items-center gap-2 border-t border-ink/10 px-4 py-3"
|
|
1537
|
-
},
|
|
1642
|
+
}, pa = /* @__PURE__ */ f({
|
|
1538
1643
|
__name: "Header",
|
|
1539
1644
|
props: {
|
|
1540
1645
|
title: {},
|
|
1646
|
+
logo: {},
|
|
1647
|
+
lockup: {},
|
|
1541
1648
|
titleTo: {},
|
|
1542
1649
|
linkComponent: { default: "a" },
|
|
1543
1650
|
menu: {
|
|
@@ -1581,27 +1688,30 @@ var Ii = ["aria-label"], Li = [
|
|
|
1581
1688
|
"sign-in"
|
|
1582
1689
|
],
|
|
1583
1690
|
setup(e, { emit: t }) {
|
|
1584
|
-
let { t:
|
|
1585
|
-
initials:
|
|
1586
|
-
name:
|
|
1587
|
-
}) : ""),
|
|
1588
|
-
let e =
|
|
1589
|
-
if (e != null && e !== "") return
|
|
1590
|
-
}),
|
|
1591
|
-
|
|
1592
|
-
|
|
1691
|
+
let { t: r } = J(), l = e, f = t, p = i(() => Li(l.user?.name ?? "")), m = i(() => l.user ? l.user.avatar || !p.value ? r("ui.header.account", { name: l.user.name }) : r("ui.header.accountWithInitials", {
|
|
1692
|
+
initials: p.value,
|
|
1693
|
+
name: l.user.name
|
|
1694
|
+
}) : ""), h = i(() => {
|
|
1695
|
+
let e = l.titleTo;
|
|
1696
|
+
if (e != null && e !== "") return l.linkComponent === "a" ? { href: e } : { to: e };
|
|
1697
|
+
}), g = ["-mx-2 rounded px-2 py-1 transition-colors hover:bg-hover active:bg-pressed", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0"], _ = (e) => typeof e == "string" ? {
|
|
1698
|
+
light: e,
|
|
1699
|
+
dark: void 0
|
|
1700
|
+
} : e, y = i(() => _(l.logo)), x = i(() => _(l.lockup));
|
|
1701
|
+
function S(e, t) {
|
|
1702
|
+
t(), f(e === "account-settings" ? "account-settings" : e === "switch-account" ? "switch-account" : "log-out");
|
|
1593
1703
|
}
|
|
1594
|
-
return (t, i) => (T(), s("header", { class: b(P(X)("flex h-12 shrink-0 items-center gap-2 border-b border-ink/10 bg-surface px-4 text-ink", e.sticky && "sticky top-0 z-40",
|
|
1704
|
+
return (t, i) => (T(), s("header", { class: b(P(X)("flex h-12 shrink-0 items-center gap-2 border-b border-ink/10 bg-surface px-4 text-ink", e.sticky && "sticky top-0 z-40", l.class)) }, [
|
|
1595
1705
|
A(t.$slots, "start"),
|
|
1596
1706
|
e.menu ? (T(), a(Z, {
|
|
1597
1707
|
key: 0,
|
|
1598
1708
|
variant: "ghost",
|
|
1599
1709
|
square: "",
|
|
1600
|
-
"aria-label": e.menuLabel ?? P(
|
|
1710
|
+
"aria-label": e.menuLabel ?? P(r)("ui.header.menu"),
|
|
1601
1711
|
"aria-expanded": e.menuOpen,
|
|
1602
1712
|
"aria-controls": e.menuControls,
|
|
1603
1713
|
class: b(P(X)("-ml-2.5", e.ui?.menu)),
|
|
1604
|
-
onClick: i[0] ||= (e) =>
|
|
1714
|
+
onClick: i[0] ||= (e) => f("menu")
|
|
1605
1715
|
}, {
|
|
1606
1716
|
default: H(() => [d(P(Pe))]),
|
|
1607
1717
|
_: 1
|
|
@@ -1612,8 +1722,26 @@ var Ii = ["aria-label"], Li = [
|
|
|
1612
1722
|
"class"
|
|
1613
1723
|
])) : o("", !0),
|
|
1614
1724
|
A(t.$slots, "leading"),
|
|
1615
|
-
e.title || t.$slots.title ? (T(), a(j(
|
|
1616
|
-
default: H(() => [A(t.$slots, "title", {}, () => [
|
|
1725
|
+
e.title || e.lockup || t.$slots.title ? (T(), a(j(h.value ? e.linkComponent : "span"), v({ key: 1 }, h.value, { class: P(X)("flex min-w-0 items-center gap-2 text-base font-bold", h.value && g, e.ui?.title) }), {
|
|
1726
|
+
default: H(() => [A(t.$slots, "title", {}, () => [x.value ? (T(), s(n, { key: 0 }, [c("img", {
|
|
1727
|
+
src: x.value.light,
|
|
1728
|
+
alt: e.title ?? "",
|
|
1729
|
+
class: b(P(X)("h-6 w-auto max-w-full", x.value.dark && "dark:hidden"))
|
|
1730
|
+
}, null, 10, ea), x.value.dark ? (T(), s("img", {
|
|
1731
|
+
key: 0,
|
|
1732
|
+
src: x.value.dark,
|
|
1733
|
+
alt: e.title ?? "",
|
|
1734
|
+
class: "hidden h-6 w-auto max-w-full dark:block"
|
|
1735
|
+
}, null, 8, ta)) : o("", !0)], 64)) : (T(), s(n, { key: 1 }, [y.value ? (T(), s(n, { key: 0 }, [c("img", {
|
|
1736
|
+
src: y.value.light,
|
|
1737
|
+
alt: "",
|
|
1738
|
+
class: b(P(X)("size-5 shrink-0", y.value.dark && "dark:hidden"))
|
|
1739
|
+
}, null, 10, na), y.value.dark ? (T(), s("img", {
|
|
1740
|
+
key: 0,
|
|
1741
|
+
src: y.value.dark,
|
|
1742
|
+
alt: "",
|
|
1743
|
+
class: "hidden size-5 shrink-0 dark:block"
|
|
1744
|
+
}, null, 8, ra)) : o("", !0)], 64)) : o("", !0), c("span", ia, N(e.title), 1)], 64))])]),
|
|
1617
1745
|
_: 3
|
|
1618
1746
|
}, 16, ["class"])) : o("", !0),
|
|
1619
1747
|
c("div", { class: b(P(X)("flex min-w-0 flex-1 items-center", e.ui?.middle)) }, [A(t.$slots, "default")], 2),
|
|
@@ -1625,30 +1753,30 @@ var Ii = ["aria-label"], Li = [
|
|
|
1625
1753
|
content: { align: "end" },
|
|
1626
1754
|
ui: { content: P(X)("w-80", e.ui?.userMenu) }
|
|
1627
1755
|
}, {
|
|
1628
|
-
content: H(({ close: n }) => [c("div",
|
|
1629
|
-
e.user.organisation || t.$slots.organisation ? (T(), s("div",
|
|
1756
|
+
content: H(({ close: n }) => [c("div", aa, [
|
|
1757
|
+
e.user.organisation || t.$slots.organisation ? (T(), s("div", oa, [A(t.$slots, "organisation", { close: n }, () => [c("p", {
|
|
1630
1758
|
class: "truncate px-4 py-3 text-xs font-bold text-ink/65 uppercase",
|
|
1631
1759
|
title: e.user.organisation
|
|
1632
|
-
}, N(e.user.organisation), 9,
|
|
1633
|
-
c("div",
|
|
1634
|
-
d(
|
|
1760
|
+
}, N(e.user.organisation), 9, sa)])])) : o("", !0),
|
|
1761
|
+
c("div", ca, [
|
|
1762
|
+
d($i, {
|
|
1635
1763
|
user: e.user,
|
|
1636
1764
|
size: "lg",
|
|
1637
1765
|
decorative: ""
|
|
1638
1766
|
}, null, 8, ["user"]),
|
|
1639
|
-
c("div",
|
|
1767
|
+
c("div", la, [c("span", {
|
|
1640
1768
|
class: "truncate font-bold",
|
|
1641
1769
|
title: e.user.name
|
|
1642
|
-
}, N(e.user.name), 9,
|
|
1770
|
+
}, N(e.user.name), 9, ua), e.user.email ? (T(), s("span", {
|
|
1643
1771
|
key: 0,
|
|
1644
1772
|
class: "truncate text-sm text-ink/65",
|
|
1645
1773
|
title: e.user.email
|
|
1646
|
-
}, N(e.user.email), 9,
|
|
1774
|
+
}, N(e.user.email), 9, da)) : o("", !0)]),
|
|
1647
1775
|
e.userActions.includes("account-settings") ? (T(), a(Z, {
|
|
1648
1776
|
key: 0,
|
|
1649
1777
|
size: "sm",
|
|
1650
1778
|
class: "col-start-2 justify-self-start",
|
|
1651
|
-
onClick: (e) =>
|
|
1779
|
+
onClick: (e) => S("account-settings", n)
|
|
1652
1780
|
}, {
|
|
1653
1781
|
leading: H(() => [d(P(Ue))]),
|
|
1654
1782
|
default: H(() => [i[2] ||= u(" Account settings ", -1)]),
|
|
@@ -1656,9 +1784,9 @@ var Ii = ["aria-label"], Li = [
|
|
|
1656
1784
|
}, 8, ["onClick"])) : o("", !0)
|
|
1657
1785
|
]),
|
|
1658
1786
|
A(t.$slots, "account-menu", { close: n }),
|
|
1659
|
-
e.userActions.includes("switch-account") || e.userActions.includes("log-out") ? (T(), s("div",
|
|
1787
|
+
e.userActions.includes("switch-account") || e.userActions.includes("log-out") ? (T(), s("div", fa, [e.userActions.includes("switch-account") ? (T(), a(Z, {
|
|
1660
1788
|
key: 0,
|
|
1661
|
-
onClick: (e) =>
|
|
1789
|
+
onClick: (e) => S("switch-account", n)
|
|
1662
1790
|
}, {
|
|
1663
1791
|
leading: H(() => [d(P(ie))]),
|
|
1664
1792
|
default: H(() => [i[3] ||= u(" Switch account ", -1)]),
|
|
@@ -1666,7 +1794,7 @@ var Ii = ["aria-label"], Li = [
|
|
|
1666
1794
|
}, 8, ["onClick"])) : o("", !0), e.userActions.includes("log-out") ? (T(), a(Z, {
|
|
1667
1795
|
key: 1,
|
|
1668
1796
|
class: "ml-auto",
|
|
1669
|
-
onClick: (e) =>
|
|
1797
|
+
onClick: (e) => S("log-out", n)
|
|
1670
1798
|
}, {
|
|
1671
1799
|
leading: H(() => [d(P(Ne))]),
|
|
1672
1800
|
default: H(() => [i[4] ||= u(" Log out ", -1)]),
|
|
@@ -1676,10 +1804,10 @@ var Ii = ["aria-label"], Li = [
|
|
|
1676
1804
|
default: H(() => [d(Z, {
|
|
1677
1805
|
variant: "ghost",
|
|
1678
1806
|
square: "",
|
|
1679
|
-
"aria-label":
|
|
1807
|
+
"aria-label": m.value,
|
|
1680
1808
|
class: "-mr-1.5 rounded-full"
|
|
1681
1809
|
}, {
|
|
1682
|
-
default: H(() => [d(
|
|
1810
|
+
default: H(() => [d($i, {
|
|
1683
1811
|
user: e.user,
|
|
1684
1812
|
size: "sm",
|
|
1685
1813
|
decorative: ""
|
|
@@ -1691,14 +1819,14 @@ var Ii = ["aria-label"], Li = [
|
|
|
1691
1819
|
key: 1,
|
|
1692
1820
|
size: "sm",
|
|
1693
1821
|
variant: "primary",
|
|
1694
|
-
onClick: i[1] ||= (e) =>
|
|
1822
|
+
onClick: i[1] ||= (e) => f("sign-in")
|
|
1695
1823
|
}, {
|
|
1696
|
-
default: H(() => [u(N(P(
|
|
1824
|
+
default: H(() => [u(N(P(r)("ui.header.signIn")), 1)]),
|
|
1697
1825
|
_: 1
|
|
1698
1826
|
})) : o("", !0)])], 2)) : o("", !0)
|
|
1699
1827
|
], 2));
|
|
1700
1828
|
}
|
|
1701
|
-
}),
|
|
1829
|
+
}), ma = "inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-ink/10 font-bold", ha = /* @__PURE__ */ f({
|
|
1702
1830
|
__name: "Badge",
|
|
1703
1831
|
props: {
|
|
1704
1832
|
color: { default: "basic" },
|
|
@@ -1724,7 +1852,7 @@ var Ii = ["aria-label"], Li = [
|
|
|
1724
1852
|
md: "h-6 px-2 text-xs gap-1 [&_svg]:size-3.5",
|
|
1725
1853
|
lg: "h-7 px-2.5 text-sm gap-1.5 [&_svg]:size-4"
|
|
1726
1854
|
};
|
|
1727
|
-
return (i, a) => (T(), s("span", { class: b(P(X)(
|
|
1855
|
+
return (i, a) => (T(), s("span", { class: b(P(X)(ma, n[e.color], r[e.size], t.class)) }, [
|
|
1728
1856
|
A(i.$slots, "leading"),
|
|
1729
1857
|
A(i.$slots, "default"),
|
|
1730
1858
|
A(i.$slots, "trailing")
|
|
@@ -1732,27 +1860,27 @@ var Ii = ["aria-label"], Li = [
|
|
|
1732
1860
|
}
|
|
1733
1861
|
});
|
|
1734
1862
|
// src/components/Sidebar/sidebar.ts
|
|
1735
|
-
function
|
|
1863
|
+
function ga(e = [], t = []) {
|
|
1736
1864
|
for (let n of [...e, ...t.flatMap((e) => e.items)]) {
|
|
1737
1865
|
if (n.active) return [n];
|
|
1738
1866
|
if (n.children?.length) {
|
|
1739
|
-
let e =
|
|
1867
|
+
let e = ga(n.children);
|
|
1740
1868
|
if (e.length) return [n, ...e];
|
|
1741
1869
|
}
|
|
1742
1870
|
}
|
|
1743
1871
|
return [];
|
|
1744
1872
|
}
|
|
1745
1873
|
// src/components/Sidebar/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1746
|
-
var
|
|
1874
|
+
var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
1747
1875
|
key: 0,
|
|
1748
1876
|
class: "-mb-2 flex flex-col gap-1 border-b border-ink/10 pb-2"
|
|
1749
|
-
},
|
|
1877
|
+
}, xa = ["title"], Sa = {
|
|
1750
1878
|
key: 0,
|
|
1751
1879
|
class: "relative flex h-6 items-center px-3"
|
|
1752
|
-
},
|
|
1880
|
+
}, Ca = ["id"], wa = ["aria-labelledby"], Ta = {
|
|
1753
1881
|
key: 0,
|
|
1754
1882
|
class: "sr-only"
|
|
1755
|
-
},
|
|
1883
|
+
}, Ea = "transition-opacity duration-150 motion-reduce:transition-none", Da = "bg-primary/10 font-bold text-primary-fg not-aria-disabled:not-disabled:hover:bg-primary/15", Oa = "font-bold text-primary-fg", ka = /* @__PURE__ */ f({
|
|
1756
1884
|
__name: "Sidebar",
|
|
1757
1885
|
props: /*@__PURE__*/ _({
|
|
1758
1886
|
items: { default: () => [] },
|
|
@@ -1788,7 +1916,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1788
1916
|
e.push(r), t = r.children;
|
|
1789
1917
|
}
|
|
1790
1918
|
return e;
|
|
1791
|
-
}), S = i(() => x.value[x.value.length - 1]), C = i(() => S.value ? [{ items: S.value.children }] : g.value), w = i(() =>
|
|
1919
|
+
}), S = i(() => x.value[x.value.length - 1]), C = i(() => S.value ? [{ items: S.value.children }] : g.value), w = i(() => ga(f.items, f.sections)), E = i(() => new Set(w.value.slice(0, -1).map((e) => e.label)));
|
|
1792
1920
|
B(() => w.value.map((e) => e.label).join("\0"), () => {
|
|
1793
1921
|
_.value = w.value.slice(0, -1).map((e) => e.label);
|
|
1794
1922
|
}, { immediate: !0 });
|
|
@@ -1862,21 +1990,21 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1862
1990
|
key: D.value,
|
|
1863
1991
|
"data-level": D.value,
|
|
1864
1992
|
class: "flex flex-col gap-4"
|
|
1865
|
-
}, [S.value ? (T(), s("div",
|
|
1993
|
+
}, [S.value ? (T(), s("div", ba, [c("button", {
|
|
1866
1994
|
type: "button",
|
|
1867
1995
|
"data-back": "",
|
|
1868
1996
|
title: m.value ? P(l)("ui.sidebar.backFrom", { name: S.value.label }) : void 0,
|
|
1869
1997
|
class: b(P(X)(q, "font-bold", e.ui?.item)),
|
|
1870
1998
|
onClick: U
|
|
1871
|
-
}, [d(P(he), { "aria-hidden": "true" }), c("span", { class: b(P(X)("min-w-0 flex-1 truncate",
|
|
1999
|
+
}, [d(P(he), { "aria-hidden": "true" }), c("span", { class: b(P(X)("min-w-0 flex-1 truncate", Ea, m.value && "opacity-0")) }, [i[1] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(N(S.value.label), 1)], 2)], 10, xa)])) : o("", !0), (T(!0), s(n, null, k(C.value, (r, i) => (T(), s("div", {
|
|
1872
2000
|
key: i,
|
|
1873
2001
|
class: "flex flex-col gap-1"
|
|
1874
|
-
}, [r.label ? (T(), s("div",
|
|
2002
|
+
}, [r.label ? (T(), s("div", Sa, [c("div", {
|
|
1875
2003
|
id: `${P(h)}-section-${i}`,
|
|
1876
|
-
class: b(P(X)("truncate text-xs font-bold text-ink/65 uppercase",
|
|
1877
|
-
}, N(r.label), 11,
|
|
2004
|
+
class: b(P(X)("truncate text-xs font-bold text-ink/65 uppercase", Ea, m.value && "opacity-0"))
|
|
2005
|
+
}, N(r.label), 11, Ca), c("div", {
|
|
1878
2006
|
"aria-hidden": "true",
|
|
1879
|
-
class: b(P(X)("absolute inset-x-2 top-1/2 border-t border-ink/10",
|
|
2007
|
+
class: b(P(X)("absolute inset-x-2 top-1/2 border-t border-ink/10", Ea, !m.value && "opacity-0"))
|
|
1880
2008
|
}, null, 2)])) : o("", !0), c("ul", {
|
|
1881
2009
|
class: "flex flex-col gap-1",
|
|
1882
2010
|
"aria-labelledby": r.label ? `${P(h)}-section-${i}` : void 0
|
|
@@ -1885,7 +2013,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1885
2013
|
"data-parent": n.children?.length ? n.label : void 0,
|
|
1886
2014
|
"aria-current": n.active ? "page" : void 0,
|
|
1887
2015
|
title: m.value ? n.label : void 0,
|
|
1888
|
-
class: P(X)(q, n.active &&
|
|
2016
|
+
class: P(X)(q, n.active && Da, E.value.has(n.label) && Oa, e.ui?.item),
|
|
1889
2017
|
onClick: (e) => K(n, e)
|
|
1890
2018
|
}), {
|
|
1891
2019
|
default: H(() => [A(t.$slots, "item", {
|
|
@@ -1897,12 +2025,12 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1897
2025
|
key: 0,
|
|
1898
2026
|
"aria-hidden": "true"
|
|
1899
2027
|
})) : o("", !0),
|
|
1900
|
-
c("span", { class: b(P(X)("min-w-0 flex-1 truncate",
|
|
1901
|
-
n.badge !== void 0 && n.badge !== "" ? (T(), a(
|
|
2028
|
+
c("span", { class: b(P(X)("min-w-0 flex-1 truncate", Ea, m.value && "opacity-0")) }, [u(N(n.label), 1), n.children?.length ? (T(), s("span", Ta, ", more options")) : o("", !0)], 2),
|
|
2029
|
+
n.badge !== void 0 && n.badge !== "" ? (T(), a(ha, {
|
|
1902
2030
|
key: 1,
|
|
1903
2031
|
size: "sm",
|
|
1904
2032
|
color: n.badgeColor,
|
|
1905
|
-
class: b(P(X)(
|
|
2033
|
+
class: b(P(X)(Ea, m.value && "opacity-0"))
|
|
1906
2034
|
}, {
|
|
1907
2035
|
default: H(() => [u(N(n.badge), 1)]),
|
|
1908
2036
|
_: 2
|
|
@@ -1910,7 +2038,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1910
2038
|
n.children?.length ? (T(), a(P(ge), {
|
|
1911
2039
|
key: 2,
|
|
1912
2040
|
"aria-hidden": "true",
|
|
1913
|
-
class: b(P(X)("opacity-70",
|
|
2041
|
+
class: b(P(X)("opacity-70", Ea, m.value && "opacity-0"))
|
|
1914
2042
|
}, null, 8, ["class"])) : o("", !0)
|
|
1915
2043
|
])]),
|
|
1916
2044
|
_: 2
|
|
@@ -1920,9 +2048,9 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1920
2048
|
"title",
|
|
1921
2049
|
"class",
|
|
1922
2050
|
"onClick"
|
|
1923
|
-
]))]))), 128))], 8,
|
|
2051
|
+
]))]))), 128))], 8, wa)]))), 128))], 8, ya))]),
|
|
1924
2052
|
_: 3
|
|
1925
|
-
}, 16)], 10,
|
|
2053
|
+
}, 16)], 10, va),
|
|
1926
2054
|
t.$slots.footer || e.collapsible ? (T(), s("div", {
|
|
1927
2055
|
key: 1,
|
|
1928
2056
|
class: b(P(X)("flex shrink-0 flex-col gap-1 overflow-hidden border-t border-ink/10 p-2", e.ui?.footer))
|
|
@@ -1938,16 +2066,16 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1938
2066
|
default: H(() => [m.value ? (T(), a(P(Be), { key: 0 })) : (T(), a(P(ze), { key: 1 }))]),
|
|
1939
2067
|
_: 1
|
|
1940
2068
|
}, 8, ["aria-label", "aria-expanded"])) : o("", !0)], 2)) : o("", !0)
|
|
1941
|
-
], 10,
|
|
2069
|
+
], 10, _a));
|
|
1942
2070
|
}
|
|
1943
|
-
}),
|
|
2071
|
+
}), Aa = { class: "absolute inset-x-0 top-1/2 flex -translate-y-1/2 gap-1" }, ja = [
|
|
1944
2072
|
"disabled",
|
|
1945
2073
|
"aria-label",
|
|
1946
2074
|
"onClick"
|
|
1947
|
-
],
|
|
2075
|
+
], Ma = {
|
|
1948
2076
|
key: 1,
|
|
1949
2077
|
class: "flex-1"
|
|
1950
|
-
},
|
|
2078
|
+
}, Na = "h-1.5 overflow-hidden rounded-full bg-ink/10", Pa = "h-full rounded-full bg-primary transition-[translate,background-color] duration-300 ease-out motion-reduce:transition-none", Fa = "h-1.5 w-full rounded-full transition-colors", Ia = /* @__PURE__ */ f({
|
|
1951
2079
|
__name: "Progress",
|
|
1952
2080
|
props: {
|
|
1953
2081
|
value: { default: null },
|
|
@@ -1987,14 +2115,14 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
1987
2115
|
}, {
|
|
1988
2116
|
default: H(() => [(T(!0), s(n, null, k(e.max, (e) => (T(), s("div", {
|
|
1989
2117
|
key: e,
|
|
1990
|
-
class: b(P(X)(
|
|
1991
|
-
}, [c("div", { class: b(P(X)(
|
|
2118
|
+
class: b(P(X)(Na, "flex-1"))
|
|
2119
|
+
}, [c("div", { class: b(P(X)(Pa, e <= f.value ? "translate-x-0" : "-translate-x-full")) }, null, 2)], 2))), 128))]),
|
|
1992
2120
|
_: 1
|
|
1993
2121
|
}, 8, [
|
|
1994
2122
|
"model-value",
|
|
1995
2123
|
"max",
|
|
1996
2124
|
"get-value-label"
|
|
1997
|
-
]), c("div",
|
|
2125
|
+
]), c("div", Aa, [(T(!0), s(n, null, k(e.max, (t) => (T(), s(n, { key: t }, [t < f.value ? (T(), s("button", {
|
|
1998
2126
|
key: 0,
|
|
1999
2127
|
type: "button",
|
|
2000
2128
|
"data-progress-segment": "",
|
|
@@ -2005,24 +2133,24 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2005
2133
|
name: e.segmentLabels[t - 1]
|
|
2006
2134
|
}),
|
|
2007
2135
|
onClick: (e) => l("select", t - 1)
|
|
2008
|
-
}, [c("span", { class: b(
|
|
2136
|
+
}, [c("span", { class: b(Fa) })], 8, ja)) : (T(), s("span", Ma))], 64))), 128))])], 2)) : (T(), a(P(dn), {
|
|
2009
2137
|
key: 1,
|
|
2010
2138
|
"model-value": u.value ? null : f.value,
|
|
2011
2139
|
max: e.max,
|
|
2012
2140
|
"get-value-label": () => e.label,
|
|
2013
2141
|
"get-value-text": m,
|
|
2014
2142
|
"aria-busy": u.value || void 0,
|
|
2015
|
-
class: b(P(X)(e.segments && !u.value ? "flex gap-1" :
|
|
2143
|
+
class: b(P(X)(e.segments && !u.value ? "flex gap-1" : Na, o.class))
|
|
2016
2144
|
}, {
|
|
2017
2145
|
default: H(() => [e.segments && !u.value ? (T(!0), s(n, { key: 0 }, k(e.max, (e) => (T(), s("div", {
|
|
2018
2146
|
key: e,
|
|
2019
|
-
class: b(P(X)(
|
|
2020
|
-
}, [c("div", { class: b(P(X)(
|
|
2147
|
+
class: b(P(X)(Na, "flex-1"))
|
|
2148
|
+
}, [c("div", { class: b(P(X)(Pa, e <= f.value ? "translate-x-0" : "-translate-x-full")) }, null, 2)], 2))), 128)) : u.value ? (T(), a(P(un), {
|
|
2021
2149
|
key: 1,
|
|
2022
2150
|
class: "h-full w-2/5 rounded-full bg-primary animate-progress-indeterminate motion-reduce:w-full motion-reduce:translate-x-0 motion-reduce:animate-pulse"
|
|
2023
2151
|
})) : (T(), a(P(un), {
|
|
2024
2152
|
key: 2,
|
|
2025
|
-
class: b(
|
|
2153
|
+
class: b(Pa),
|
|
2026
2154
|
style: S({ translate: `${p.value - 100}% 0` })
|
|
2027
2155
|
}, null, 8, ["style"]))]),
|
|
2028
2156
|
_: 1
|
|
@@ -2034,18 +2162,18 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2034
2162
|
"class"
|
|
2035
2163
|
]));
|
|
2036
2164
|
}
|
|
2037
|
-
}),
|
|
2165
|
+
}), La = { class: "flex items-start gap-4" }, Ra = { class: "flex min-w-0 flex-1 flex-col gap-1" }, za = {
|
|
2038
2166
|
key: 0,
|
|
2039
2167
|
class: "h-5",
|
|
2040
2168
|
"aria-hidden": "true"
|
|
2041
|
-
},
|
|
2169
|
+
}, Ba = { key: 0 }, Va = {
|
|
2042
2170
|
key: 2,
|
|
2043
2171
|
"aria-live": "polite",
|
|
2044
2172
|
class: "sr-only"
|
|
2045
|
-
},
|
|
2173
|
+
}, Ha = ["role", "aria-labelledby"], Ua = {
|
|
2046
2174
|
key: 0,
|
|
2047
2175
|
class: "flex min-h-9.5 flex-1"
|
|
2048
|
-
},
|
|
2176
|
+
}, Wa = "textarea, [contenteditable=\"true\"], input[type=checkbox], input[type=radio], input[type=button], input[type=submit]", Ga = /* @__PURE__ */ f({
|
|
2049
2177
|
__name: "Slideover",
|
|
2050
2178
|
props: /*@__PURE__*/ _({
|
|
2051
2179
|
title: {},
|
|
@@ -2146,7 +2274,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2146
2274
|
}
|
|
2147
2275
|
function q(e) {
|
|
2148
2276
|
let t = e.target;
|
|
2149
|
-
!f.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(
|
|
2277
|
+
!f.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(Wa) || (e.preventDefault(), K());
|
|
2150
2278
|
}
|
|
2151
2279
|
let te = 0;
|
|
2152
2280
|
function ne(e) {
|
|
@@ -2206,7 +2334,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2206
2334
|
e.title || e.description || e.close || e.steps || t.$slots.header || t.$slots.title ? (T(), s("header", {
|
|
2207
2335
|
key: 0,
|
|
2208
2336
|
class: b(P(X)("flex flex-col gap-4 border-b border-ink/10 px-6 py-4", e.ui?.header))
|
|
2209
|
-
}, [e.steps ? (T(), a(
|
|
2337
|
+
}, [e.steps ? (T(), a(Ia, {
|
|
2210
2338
|
key: 0,
|
|
2211
2339
|
label: e.title ?? P(n)("ui.slideover.steps"),
|
|
2212
2340
|
segments: "",
|
|
@@ -2221,12 +2349,12 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2221
2349
|
"max",
|
|
2222
2350
|
"segment-labels",
|
|
2223
2351
|
"disabled"
|
|
2224
|
-
])) : o("", !0), c("div",
|
|
2352
|
+
])) : o("", !0), c("div", La, [A(t.$slots, "header", { close: y }, () => [c("div", Ra, [
|
|
2225
2353
|
d(P(Ut), { class: b(e.title || t.$slots.title ? P(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
2226
2354
|
default: H(() => [A(t.$slots, "title", {}, () => [u(N(e.title), 1)])]),
|
|
2227
2355
|
_: 3
|
|
2228
2356
|
}, 8, ["class"]),
|
|
2229
|
-
e.steps ? (T(), s("div",
|
|
2357
|
+
e.steps ? (T(), s("div", za, [d(r, x(m(R.value)), {
|
|
2230
2358
|
default: H(() => [(T(), s("p", {
|
|
2231
2359
|
key: S.value,
|
|
2232
2360
|
class: "truncate text-sm text-ink/65"
|
|
@@ -2242,14 +2370,14 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2242
2370
|
as: "div",
|
|
2243
2371
|
class: "flex flex-col gap-1 text-sm text-ink/65"
|
|
2244
2372
|
}, {
|
|
2245
|
-
default: H(() => [e.description || t.$slots.description ? (T(), s("p",
|
|
2373
|
+
default: H(() => [e.description || t.$slots.description ? (T(), s("p", Ba, [A(t.$slots, "description", {}, () => [u(N(e.description), 1)])])) : o("", !0), e.steps ? (T(), s("p", {
|
|
2246
2374
|
key: 1,
|
|
2247
2375
|
id: D,
|
|
2248
2376
|
class: "sr-only"
|
|
2249
2377
|
}, N(k.value), 1)) : o("", !0)]),
|
|
2250
2378
|
_: 3
|
|
2251
2379
|
})) : o("", !0),
|
|
2252
|
-
e.steps ? (T(), s("p",
|
|
2380
|
+
e.steps ? (T(), s("p", Va, N(j.value), 1)) : o("", !0)
|
|
2253
2381
|
]), e.close ? (T(), a(P(Lt), {
|
|
2254
2382
|
key: 0,
|
|
2255
2383
|
"as-child": ""
|
|
@@ -2281,11 +2409,11 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2281
2409
|
}, 16)) : A(t.$slots, "body", {
|
|
2282
2410
|
close: y,
|
|
2283
2411
|
step: S.value
|
|
2284
|
-
}, void 0, void 0, 1)], 42,
|
|
2412
|
+
}, void 0, void 0, 1)], 42, Ha),
|
|
2285
2413
|
t.$slots.footer || e.steps ? (T(), s("footer", {
|
|
2286
2414
|
key: 1,
|
|
2287
2415
|
class: b(P(X)("flex justify-end gap-2 border-t border-ink/10 px-6 py-4", e.ui?.footer))
|
|
2288
|
-
}, [A(t.$slots, "footer", { close: y }, () => [e.steps ? (T(), s("div",
|
|
2416
|
+
}, [A(t.$slots, "footer", { close: y }, () => [e.steps ? (T(), s("div", Ua, [d(r, v(R.value, { onEnter: U }), {
|
|
2289
2417
|
default: H(() => [(T(), s("div", {
|
|
2290
2418
|
key: S.value,
|
|
2291
2419
|
class: "flex flex-1 justify-end gap-2"
|
|
@@ -2324,7 +2452,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2324
2452
|
_: 3
|
|
2325
2453
|
}, 8, ["open", "modal"]));
|
|
2326
2454
|
}
|
|
2327
|
-
}),
|
|
2455
|
+
}), Ka = ["href"], qa = { class: "flex flex-1" }, Ja = { class: "sticky top-12 hidden h-[calc(100dvh-var(--spacing)*12)] shrink-0 self-start lg:flex" }, Ya = { class: "flex min-w-0 flex-1 flex-col" }, Xa = /* @__PURE__ */ f({
|
|
2328
2456
|
__name: "AppShell",
|
|
2329
2457
|
props: /*@__PURE__*/ _({
|
|
2330
2458
|
title: {},
|
|
@@ -2388,8 +2516,8 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2388
2516
|
c("a", {
|
|
2389
2517
|
href: `#${g}`,
|
|
2390
2518
|
class: "sr-only z-50 rounded bg-surface px-4 py-2 text-sm focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:outline-2 focus:outline-focus"
|
|
2391
|
-
}, " Skip to content ", 8,
|
|
2392
|
-
d(
|
|
2519
|
+
}, " Skip to content ", 8, Ka),
|
|
2520
|
+
d(pa, v(e.header, {
|
|
2393
2521
|
title: e.title,
|
|
2394
2522
|
"title-to": e.titleTo,
|
|
2395
2523
|
"link-component": e.linkComponent,
|
|
@@ -2431,7 +2559,10 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2431
2559
|
}, [
|
|
2432
2560
|
e.launcher ? {
|
|
2433
2561
|
name: "start",
|
|
2434
|
-
fn: H(() => [d(zr, v({
|
|
2562
|
+
fn: H(() => [d(zr, v({
|
|
2563
|
+
align: "start",
|
|
2564
|
+
"login-hint": e.user?.email
|
|
2565
|
+
}, e.launcher === !0 ? {} : e.launcher, { class: "-ml-2.5" }), null, 16, ["login-hint"])]),
|
|
2435
2566
|
key: "0"
|
|
2436
2567
|
} : void 0,
|
|
2437
2568
|
t.$slots["header-trailing"] ? {
|
|
@@ -2464,8 +2595,8 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2464
2595
|
"sign-in",
|
|
2465
2596
|
"ui"
|
|
2466
2597
|
]),
|
|
2467
|
-
c("div",
|
|
2468
|
-
c("div",
|
|
2598
|
+
c("div", qa, [
|
|
2599
|
+
c("div", Ja, [d(ka, v(e.sidebar, {
|
|
2469
2600
|
id: _,
|
|
2470
2601
|
collapsed: s.value,
|
|
2471
2602
|
"onUpdate:collapsed": f[6] ||= (e) => s.value = e,
|
|
@@ -2486,7 +2617,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2486
2617
|
"sections",
|
|
2487
2618
|
"link-component"
|
|
2488
2619
|
])]),
|
|
2489
|
-
d(
|
|
2620
|
+
d(Ga, {
|
|
2490
2621
|
open: u.value,
|
|
2491
2622
|
"onUpdate:open": f[8] ||= (e) => u.value = e,
|
|
2492
2623
|
side: "left",
|
|
@@ -2498,7 +2629,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2498
2629
|
body: "flex p-0"
|
|
2499
2630
|
}
|
|
2500
2631
|
}, {
|
|
2501
|
-
body: H(() => [d(
|
|
2632
|
+
body: H(() => [d(ka, v(e.sidebar, {
|
|
2502
2633
|
items: e.items,
|
|
2503
2634
|
sections: e.sections,
|
|
2504
2635
|
"link-component": e.linkComponent,
|
|
@@ -2515,11 +2646,11 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2515
2646
|
])]),
|
|
2516
2647
|
_: 3
|
|
2517
2648
|
}, 8, ["open", "title"]),
|
|
2518
|
-
c("div",
|
|
2649
|
+
c("div", Ya, [c("main", {
|
|
2519
2650
|
id: g,
|
|
2520
2651
|
tabindex: "-1",
|
|
2521
2652
|
class: b(P(X)("min-w-0 flex-1 outline-none", e.ui?.main))
|
|
2522
|
-
}, [A(t.$slots, "default")], 2), e.footer ? (T(), a(
|
|
2653
|
+
}, [A(t.$slots, "default")], 2), e.footer ? (T(), a(Ii, x(v({ key: 0 }, {
|
|
2523
2654
|
linkComponent: e.linkComponent,
|
|
2524
2655
|
...e.footer
|
|
2525
2656
|
})), null, 16)) : o("", !0)])
|
|
@@ -2528,7 +2659,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2528
2659
|
_: 3
|
|
2529
2660
|
}));
|
|
2530
2661
|
}
|
|
2531
|
-
}),
|
|
2662
|
+
}), Za = ["aria-label"], Qa = { class: "flex flex-wrap items-center gap-x-1.5 gap-y-1" }, $a = ["title"], eo = { class: "truncate" }, to = { class: "truncate" }, no = ["title"], ro = { class: "truncate" }, io = "inline-flex max-w-60 min-w-0 items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:shrink-0", ao = /* @__PURE__ */ f({
|
|
2532
2663
|
__name: "Breadcrumb",
|
|
2533
2664
|
props: {
|
|
2534
2665
|
items: {},
|
|
@@ -2564,29 +2695,29 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2564
2695
|
return (t, l) => (T(), s("nav", {
|
|
2565
2696
|
"aria-label": e.label ?? P(r)("ui.breadcrumb.label"),
|
|
2566
2697
|
class: b(P(X)("min-w-0 text-sm", i.class))
|
|
2567
|
-
}, [c("ol",
|
|
2698
|
+
}, [c("ol", Qa, [(T(!0), s(n, null, k(e.items, (t, n) => (T(), s("li", {
|
|
2568
2699
|
key: `${t.label}-${n}`,
|
|
2569
2700
|
class: "flex min-w-0 items-center gap-1.5"
|
|
2570
2701
|
}, [n === e.items.length - 1 ? (T(), s("span", {
|
|
2571
2702
|
key: 0,
|
|
2572
2703
|
"aria-current": "page",
|
|
2573
2704
|
title: t.label,
|
|
2574
|
-
class: b(P(X)(
|
|
2705
|
+
class: b(P(X)(io, "text-ink"))
|
|
2575
2706
|
}, [t.icon ? (T(), a(j(t.icon), {
|
|
2576
2707
|
key: 0,
|
|
2577
2708
|
"aria-hidden": "true"
|
|
2578
|
-
})) : o("", !0), c("span",
|
|
2709
|
+
})) : o("", !0), c("span", eo, N(t.label), 1)], 10, $a)) : u(t) ? (T(), a(j(u(t)), v({
|
|
2579
2710
|
key: 1,
|
|
2580
2711
|
ref_for: !0
|
|
2581
2712
|
}, d(t), {
|
|
2582
2713
|
title: t.label,
|
|
2583
|
-
class: P(X)(
|
|
2714
|
+
class: P(X)(io, p),
|
|
2584
2715
|
onClick: (e) => f(t, e)
|
|
2585
2716
|
}), {
|
|
2586
2717
|
default: H(() => [t.icon ? (T(), a(j(t.icon), {
|
|
2587
2718
|
key: 0,
|
|
2588
2719
|
"aria-hidden": "true"
|
|
2589
|
-
})) : o("", !0), c("span",
|
|
2720
|
+
})) : o("", !0), c("span", to, N(t.label), 1)]),
|
|
2590
2721
|
_: 2
|
|
2591
2722
|
}, 1040, [
|
|
2592
2723
|
"title",
|
|
@@ -2595,17 +2726,17 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2595
2726
|
])) : (T(), s("span", {
|
|
2596
2727
|
key: 2,
|
|
2597
2728
|
title: t.label,
|
|
2598
|
-
class: b(P(X)(
|
|
2729
|
+
class: b(P(X)(io, "text-ink/65"))
|
|
2599
2730
|
}, [t.icon ? (T(), a(j(t.icon), {
|
|
2600
2731
|
key: 0,
|
|
2601
2732
|
"aria-hidden": "true"
|
|
2602
|
-
})) : o("", !0), c("span",
|
|
2733
|
+
})) : o("", !0), c("span", ro, N(t.label), 1)], 10, no)), n < e.items.length - 1 ? (T(), a(P(ge), {
|
|
2603
2734
|
key: 3,
|
|
2604
2735
|
"aria-hidden": "true",
|
|
2605
2736
|
class: "size-3.5 shrink-0 text-ink/40"
|
|
2606
|
-
})) : o("", !0)]))), 128))])], 10,
|
|
2737
|
+
})) : o("", !0)]))), 128))])], 10, Za));
|
|
2607
2738
|
}
|
|
2608
|
-
}),
|
|
2739
|
+
}), oo = /* @__PURE__ */ f({
|
|
2609
2740
|
__name: "Menu",
|
|
2610
2741
|
props: {
|
|
2611
2742
|
items: {},
|
|
@@ -2683,18 +2814,18 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2683
2814
|
_: 1
|
|
2684
2815
|
}));
|
|
2685
2816
|
}
|
|
2686
|
-
}),
|
|
2817
|
+
}), so = { class: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3" }, co = { class: "flex min-w-0 flex-col gap-1" }, lo = { class: "flex flex-wrap items-center gap-x-2 gap-y-1" }, uo = ["aria-label"], fo = {
|
|
2687
2818
|
key: 0,
|
|
2688
2819
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm font-bold",
|
|
2689
2820
|
"aria-live": "polite"
|
|
2690
|
-
},
|
|
2821
|
+
}, po = {
|
|
2691
2822
|
"aria-hidden": "true",
|
|
2692
2823
|
inert: "",
|
|
2693
2824
|
class: "invisible absolute top-0 left-0 size-0 overflow-hidden"
|
|
2694
|
-
},
|
|
2825
|
+
}, mo = {
|
|
2695
2826
|
key: 1,
|
|
2696
2827
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm"
|
|
2697
|
-
},
|
|
2828
|
+
}, ho = /* @__PURE__ */ f({
|
|
2698
2829
|
__name: "PageHeader",
|
|
2699
2830
|
props: {
|
|
2700
2831
|
title: {},
|
|
@@ -2737,12 +2868,12 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2737
2868
|
}), C(() => x?.disconnect()), B(() => r.toolbar?.map((e) => `${e.label}${e.disabled ? "-" : ""}`).join("|"), () => y(v));
|
|
2738
2869
|
let S = i(() => (r.toolbar ?? []).slice(0, _.value)), E = i(() => (r.toolbar ?? []).slice(_.value));
|
|
2739
2870
|
return (i, p) => (T(), s("header", { class: b(P(X)("flex flex-col gap-2", r.class)) }, [
|
|
2740
|
-
e.breadcrumb && e.breadcrumb.length > 1 ? (T(), a(
|
|
2871
|
+
e.breadcrumb && e.breadcrumb.length > 1 ? (T(), a(ao, {
|
|
2741
2872
|
key: 0,
|
|
2742
2873
|
items: e.breadcrumb,
|
|
2743
2874
|
"link-component": e.linkComponent
|
|
2744
2875
|
}, null, 8, ["items", "link-component"])) : o("", !0),
|
|
2745
|
-
c("div",
|
|
2876
|
+
c("div", so, [c("div", co, [c("div", lo, [c("h1", { class: b(P(X)("min-w-0 text-2xl font-bold break-words", e.ui?.title)) }, N(e.title), 3), A(i.$slots, "badge")]), e.description || i.$slots.description ? (T(), s("p", {
|
|
2746
2877
|
key: 0,
|
|
2747
2878
|
class: b(P(X)("max-w-prose text-sm text-ink/65", e.ui?.description))
|
|
2748
2879
|
}, [A(i.$slots, "description", {}, () => [u(N(e.description), 1)])], 2)) : o("", !0)]), i.$slots.actions ? (T(), s("div", {
|
|
@@ -2755,7 +2886,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2755
2886
|
"aria-label": P(t)("ui.pageHeader.actions", { title: e.title }),
|
|
2756
2887
|
class: b(P(X)("flex items-center gap-1 rounded-lg border border-ink/10 bg-surface p-1 shadow-xs", e.ui?.toolbar))
|
|
2757
2888
|
}, [
|
|
2758
|
-
i.$slots["toolbar-start"] ? (T(), s("div",
|
|
2889
|
+
i.$slots["toolbar-start"] ? (T(), s("div", fo, [A(i.$slots, "toolbar-start")])) : o("", !0),
|
|
2759
2890
|
c("div", {
|
|
2760
2891
|
ref_key: "fitArea",
|
|
2761
2892
|
ref: h,
|
|
@@ -2784,7 +2915,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2784
2915
|
"disabled",
|
|
2785
2916
|
"onClick"
|
|
2786
2917
|
]))), 128)),
|
|
2787
|
-
E.value.length ? (T(), a(
|
|
2918
|
+
E.value.length ? (T(), a(oo, {
|
|
2788
2919
|
key: 0,
|
|
2789
2920
|
items: E.value,
|
|
2790
2921
|
label: P(t)("ui.pageHeader.moreActions"),
|
|
@@ -2795,7 +2926,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2795
2926
|
"label",
|
|
2796
2927
|
"link-component"
|
|
2797
2928
|
])) : o("", !0),
|
|
2798
|
-
c("div",
|
|
2929
|
+
c("div", po, [c("div", {
|
|
2799
2930
|
ref_key: "measure",
|
|
2800
2931
|
ref: g,
|
|
2801
2932
|
class: "flex w-max gap-1"
|
|
@@ -2821,18 +2952,18 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2821
2952
|
_: 1
|
|
2822
2953
|
})], 512)])
|
|
2823
2954
|
], 512),
|
|
2824
|
-
i.$slots["toolbar-end"] ? (T(), s("div",
|
|
2825
|
-
], 10,
|
|
2955
|
+
i.$slots["toolbar-end"] ? (T(), s("div", mo, [A(i.$slots, "toolbar-end")])) : o("", !0)
|
|
2956
|
+
], 10, uo)) : o("", !0),
|
|
2826
2957
|
A(i.$slots, "default")
|
|
2827
2958
|
], 2));
|
|
2828
2959
|
}
|
|
2829
|
-
}),
|
|
2960
|
+
}), go = { class: "flex min-w-0 flex-col gap-0.5" }, _o = {
|
|
2830
2961
|
class: "text-sm",
|
|
2831
2962
|
"aria-hidden": "true"
|
|
2832
|
-
},
|
|
2963
|
+
}, vo = {
|
|
2833
2964
|
key: 0,
|
|
2834
2965
|
class: "text-xs text-ink/65"
|
|
2835
|
-
},
|
|
2966
|
+
}, yo = { class: "w-full shrink-0 sm:w-80" }, bo = /* @__PURE__ */ f({
|
|
2836
2967
|
__name: "SettingsRow",
|
|
2837
2968
|
props: {
|
|
2838
2969
|
label: {},
|
|
@@ -2847,12 +2978,12 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2847
2978
|
},
|
|
2848
2979
|
setup(e) {
|
|
2849
2980
|
let t = e;
|
|
2850
|
-
return (n, r) => (T(), s("div", { class: b(P(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div",
|
|
2981
|
+
return (n, r) => (T(), s("div", { class: b(P(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div", go, [c("p", _o, N(e.label), 1), e.description ? (T(), s("p", vo, N(e.description), 1)) : o("", !0)]), c("div", yo, [A(n.$slots, "default")])], 2));
|
|
2851
2982
|
}
|
|
2852
|
-
}),
|
|
2983
|
+
}), xo = ["aria-label"], So = ["aria-label"], Co = { "aria-hidden": "true" }, wo = { class: "flex max-h-72 flex-col gap-2 overflow-y-auto p-3 text-sm [scrollbar-width:thin]" }, To = { class: "min-w-0 truncate" }, Eo = {
|
|
2853
2984
|
key: 0,
|
|
2854
2985
|
class: "ml-auto shrink-0 truncate text-xs text-ink/65"
|
|
2855
|
-
},
|
|
2986
|
+
}, Do = /* @__PURE__ */ f({
|
|
2856
2987
|
__name: "AvatarGroup",
|
|
2857
2988
|
props: {
|
|
2858
2989
|
users: {},
|
|
@@ -2898,7 +3029,7 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2898
3029
|
}, [(T(!0), s(n, null, k(a.value, (t, n) => (T(), s("span", {
|
|
2899
3030
|
key: `${t.name}-${n}`,
|
|
2900
3031
|
class: b(P(X)("relative flex rounded-full ring-surface hover:z-10 focus-within:z-10", f[e.size], n > 0 && u[e.size]))
|
|
2901
|
-
}, [d(
|
|
3032
|
+
}, [d($i, {
|
|
2902
3033
|
user: t,
|
|
2903
3034
|
size: e.size,
|
|
2904
3035
|
profile: e.profile
|
|
@@ -2920,17 +3051,17 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2920
3051
|
},
|
|
2921
3052
|
ui: { content: "w-56" }
|
|
2922
3053
|
}, {
|
|
2923
|
-
content: H(() => [c("ul",
|
|
3054
|
+
content: H(() => [c("ul", wo, [(T(!0), s(n, null, k(l.value, (e, t) => (T(), s("li", {
|
|
2924
3055
|
key: `${e.name}-${t}`,
|
|
2925
3056
|
class: "flex items-center gap-2"
|
|
2926
3057
|
}, [
|
|
2927
|
-
d(
|
|
3058
|
+
d($i, {
|
|
2928
3059
|
user: e,
|
|
2929
3060
|
size: "xs",
|
|
2930
3061
|
decorative: ""
|
|
2931
3062
|
}, null, 8, ["user"]),
|
|
2932
|
-
c("span",
|
|
2933
|
-
e.role ? (T(), s("span",
|
|
3063
|
+
c("span", To, N(e.name), 1),
|
|
3064
|
+
e.role ? (T(), s("span", Eo, N(e.role), 1)) : o("", !0)
|
|
2934
3065
|
]))), 128))])]),
|
|
2935
3066
|
default: H(() => [c("button", {
|
|
2936
3067
|
type: "button",
|
|
@@ -2939,17 +3070,17 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2939
3070
|
names: l.value.map((e) => e.name).join(", ")
|
|
2940
3071
|
}),
|
|
2941
3072
|
class: b(P(X)("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full bg-surface-muted font-bold text-ink select-none", "outline-2 outline-offset-1 outline-transparent transition focus-visible:outline-focus", p[e.size]))
|
|
2942
|
-
}, [c("span",
|
|
3073
|
+
}, [c("span", Co, "+" + N(l.value.length), 1)], 10, So)]),
|
|
2943
3074
|
_: 1
|
|
2944
|
-
})], 2)) : o("", !0)], 10,
|
|
3075
|
+
})], 2)) : o("", !0)], 10, xo));
|
|
2945
3076
|
}
|
|
2946
|
-
}),
|
|
3077
|
+
}), Oo = { class: "flex min-w-0 flex-col gap-1" }, ko = {
|
|
2947
3078
|
key: 1,
|
|
2948
3079
|
class: "text-sm text-ink/65"
|
|
2949
|
-
},
|
|
3080
|
+
}, Ao = {
|
|
2950
3081
|
key: 0,
|
|
2951
3082
|
class: "flex shrink-0 items-center gap-2"
|
|
2952
|
-
},
|
|
3083
|
+
}, jo = /* @__PURE__ */ f({
|
|
2953
3084
|
__name: "Card",
|
|
2954
3085
|
props: {
|
|
2955
3086
|
title: {},
|
|
@@ -2983,21 +3114,21 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
2983
3114
|
default: H(() => [c("div", { class: b(P(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 ? (T(), s("div", {
|
|
2984
3115
|
key: 0,
|
|
2985
3116
|
class: b(P(X)("flex items-start justify-between gap-3", e.padding === "none" && "px-4 pt-4 sm:px-6 sm:pt-6", e.ui?.header))
|
|
2986
|
-
}, [A(i.$slots, "header", {}, () => [c("div",
|
|
3117
|
+
}, [A(i.$slots, "header", {}, () => [c("div", Oo, [e.title ? (T(), a(j(`h${e.headingLevel}`), {
|
|
2987
3118
|
key: 0,
|
|
2988
3119
|
id: n,
|
|
2989
3120
|
class: "text-base font-bold"
|
|
2990
3121
|
}, {
|
|
2991
3122
|
default: H(() => [u(N(e.title), 1)]),
|
|
2992
3123
|
_: 1
|
|
2993
|
-
})) : o("", !0), e.description ? (T(), s("p",
|
|
3124
|
+
})) : o("", !0), e.description ? (T(), s("p", ko, N(e.description), 1)) : o("", !0)])]), i.$slots.actions ? (T(), s("div", Ao, [A(i.$slots, "actions")])) : o("", !0)], 2)) : o("", !0), A(i.$slots, "default")], 2), i.$slots.footer ? (T(), s("div", {
|
|
2994
3125
|
key: 0,
|
|
2995
3126
|
class: b(P(X)("flex flex-wrap justify-end gap-2 border-t border-ink/10", d[e.padding], e.ui?.footer))
|
|
2996
3127
|
}, [A(i.$slots, "footer")], 2)) : o("", !0)]),
|
|
2997
3128
|
_: 3
|
|
2998
3129
|
}, 8, ["aria-labelledby", "class"]));
|
|
2999
3130
|
}
|
|
3000
|
-
}),
|
|
3131
|
+
}), Mo = ["role", "aria-label"], No = { class: "shrink-0" }, Po = /* @__PURE__ */ f({
|
|
3001
3132
|
__name: "Divider",
|
|
3002
3133
|
props: {
|
|
3003
3134
|
orientation: { default: "horizontal" },
|
|
@@ -3026,12 +3157,12 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
3026
3157
|
"aria-hidden": "true",
|
|
3027
3158
|
class: "h-px flex-1 bg-ink/10"
|
|
3028
3159
|
}, null, -1),
|
|
3029
|
-
c("span",
|
|
3160
|
+
c("span", No, [A(n.$slots, "default", {}, () => [u(N(e.label), 1)])]),
|
|
3030
3161
|
r[1] ||= c("span", {
|
|
3031
3162
|
"aria-hidden": "true",
|
|
3032
3163
|
class: "h-px flex-1 bg-ink/10"
|
|
3033
3164
|
}, null, -1)
|
|
3034
|
-
], 10,
|
|
3165
|
+
], 10, Mo)) : (T(), a(P(En), {
|
|
3035
3166
|
key: 1,
|
|
3036
3167
|
orientation: e.orientation,
|
|
3037
3168
|
decorative: e.decorative,
|
|
@@ -3044,17 +3175,17 @@ var ua = ["data-collapsed"], da = ["aria-label"], fa = ["data-level"], pa = {
|
|
|
3044
3175
|
}
|
|
3045
3176
|
});
|
|
3046
3177
|
// src/components/ChangeIndicator/changeIndicator.ts
|
|
3047
|
-
function
|
|
3178
|
+
function Fo(e, t) {
|
|
3048
3179
|
return t ? `${e} ${t}` : String(e);
|
|
3049
3180
|
}
|
|
3050
|
-
function
|
|
3181
|
+
function Io(e, t) {
|
|
3051
3182
|
return String(e) !== String(t);
|
|
3052
3183
|
}
|
|
3053
3184
|
// src/components/ChangeIndicator/ChangeIndicator.vue?vue&type=script&setup=true&lang.ts
|
|
3054
|
-
var
|
|
3185
|
+
var Lo = { class: "sr-only" }, Ro = {
|
|
3055
3186
|
"aria-hidden": "true",
|
|
3056
3187
|
class: "font-normal line-through decoration-blue-fg/60"
|
|
3057
|
-
},
|
|
3188
|
+
}, zo = { "aria-hidden": "true" }, Bo = /* @__PURE__ */ f({
|
|
3058
3189
|
__name: "ChangeIndicator",
|
|
3059
3190
|
props: {
|
|
3060
3191
|
from: {},
|
|
@@ -3069,33 +3200,33 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3069
3200
|
] }
|
|
3070
3201
|
},
|
|
3071
3202
|
setup(e) {
|
|
3072
|
-
let { t } = J(), r = e, a = i(() =>
|
|
3203
|
+
let { t } = J(), r = e, a = i(() => Io(r.from, r.to)), l = i(() => t("ui.changeIndicator.changed", {
|
|
3073
3204
|
from: r.from,
|
|
3074
|
-
to:
|
|
3205
|
+
to: Fo(r.to, r.unit)
|
|
3075
3206
|
}));
|
|
3076
3207
|
return (t, i) => a.value ? (T(), s("span", {
|
|
3077
3208
|
key: 0,
|
|
3078
3209
|
class: b(P(X)("inline-flex items-center gap-1 whitespace-nowrap rounded-full border border-blue-fg/30 bg-blue-fg/10 px-2 text-xs font-bold text-blue-fg", r.class))
|
|
3079
3210
|
}, [
|
|
3080
|
-
c("span",
|
|
3081
|
-
c("span",
|
|
3211
|
+
c("span", Lo, N(l.value), 1),
|
|
3212
|
+
c("span", Ro, N(e.from), 1),
|
|
3082
3213
|
d(P(ae), {
|
|
3083
3214
|
"aria-hidden": "true",
|
|
3084
3215
|
class: "size-3 shrink-0"
|
|
3085
3216
|
}),
|
|
3086
|
-
c("span",
|
|
3217
|
+
c("span", zo, [u(N(e.to), 1), e.unit ? (T(), s(n, { key: 0 }, [u(N(e.unit), 1)], 64)) : o("", !0)])
|
|
3087
3218
|
], 2)) : o("", !0);
|
|
3088
3219
|
}
|
|
3089
|
-
}),
|
|
3220
|
+
}), Vo = ["role"], Ho = { class: "flex min-w-0 flex-1 basis-48 flex-col gap-0.5" }, Uo = {
|
|
3090
3221
|
key: 0,
|
|
3091
3222
|
class: "font-bold"
|
|
3092
|
-
},
|
|
3223
|
+
}, Wo = { class: "sr-only" }, Go = {
|
|
3093
3224
|
key: 0,
|
|
3094
3225
|
class: "sr-only"
|
|
3095
|
-
},
|
|
3226
|
+
}, Ko = {
|
|
3096
3227
|
key: 0,
|
|
3097
3228
|
class: "flex shrink-0 flex-wrap items-center gap-2 self-center"
|
|
3098
|
-
},
|
|
3229
|
+
}, qo = /* @__PURE__ */ f({
|
|
3099
3230
|
__name: "Alert",
|
|
3100
3231
|
props: {
|
|
3101
3232
|
type: { default: "info" },
|
|
@@ -3148,11 +3279,11 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3148
3279
|
class: "size-4",
|
|
3149
3280
|
"aria-hidden": "true"
|
|
3150
3281
|
}))])], 2),
|
|
3151
|
-
c("div",
|
|
3282
|
+
c("div", Ho, [e.title ? (T(), s("p", Uo, [c("span", Wo, N(P(n)(`ui.alert.${e.type}`)) + ": ", 1), u(N(e.title), 1)])) : o("", !0), e.description || t.$slots.default ? (T(), s("div", {
|
|
3152
3283
|
key: 1,
|
|
3153
3284
|
class: b(e.title ? "text-ink/80" : "")
|
|
3154
|
-
}, [e.title ? o("", !0) : (T(), s("span",
|
|
3155
|
-
t.$slots.actions ? (T(), s("div",
|
|
3285
|
+
}, [e.title ? o("", !0) : (T(), s("span", Go, N(P(n)(`ui.alert.${e.type}`)) + ": ", 1)), A(t.$slots, "default", {}, () => [u(N(e.description), 1)])], 2)) : o("", !0)]),
|
|
3286
|
+
t.$slots.actions ? (T(), s("div", Ko, [A(t.$slots, "actions")])) : o("", !0),
|
|
3156
3287
|
e.dismissible ? (T(), a(Z, {
|
|
3157
3288
|
key: 1,
|
|
3158
3289
|
variant: "ghost",
|
|
@@ -3165,9 +3296,9 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3165
3296
|
default: H(() => [d(P(Xe))]),
|
|
3166
3297
|
_: 1
|
|
3167
3298
|
}, 8, ["aria-label"])) : o("", !0)
|
|
3168
|
-
], 10,
|
|
3299
|
+
], 10, Vo));
|
|
3169
3300
|
}
|
|
3170
|
-
}),
|
|
3301
|
+
}), Jo = /* @__PURE__ */ f({
|
|
3171
3302
|
__name: "Collapsible",
|
|
3172
3303
|
props: /*@__PURE__*/ _({
|
|
3173
3304
|
title: {},
|
|
@@ -3217,7 +3348,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3217
3348
|
"class"
|
|
3218
3349
|
]));
|
|
3219
3350
|
}
|
|
3220
|
-
}),
|
|
3351
|
+
}), Yo = /* @__PURE__ */ f({
|
|
3221
3352
|
__name: "Prose",
|
|
3222
3353
|
props: {
|
|
3223
3354
|
size: { default: "base" },
|
|
@@ -3250,13 +3381,13 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3250
3381
|
};
|
|
3251
3382
|
return (i, a) => (T(), s("div", { class: b(P(X)(n, r[e.size], t.class)) }, [A(i.$slots, "default")], 2));
|
|
3252
3383
|
}
|
|
3253
|
-
}),
|
|
3384
|
+
}), Xo = [
|
|
3254
3385
|
"id",
|
|
3255
3386
|
"spellcheck",
|
|
3256
3387
|
"disabled",
|
|
3257
3388
|
"aria-invalid",
|
|
3258
3389
|
"aria-describedby"
|
|
3259
|
-
],
|
|
3390
|
+
], Zo = /* @__PURE__ */ f({
|
|
3260
3391
|
inheritAttrs: !1,
|
|
3261
3392
|
__name: "Input",
|
|
3262
3393
|
props: /*@__PURE__*/ _({
|
|
@@ -3309,7 +3440,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3309
3440
|
"aria-describedby": a,
|
|
3310
3441
|
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-ink/55 disabled:cursor-not-allowed",
|
|
3311
3442
|
onBlur: i[1] ||= (e) => o.value = !0
|
|
3312
|
-
}), null, 16,
|
|
3443
|
+
}), null, 16, Xo), [[z, r.value]])]),
|
|
3313
3444
|
_: 2
|
|
3314
3445
|
}, [t.$slots.leading ? {
|
|
3315
3446
|
name: "leading",
|
|
@@ -3331,7 +3462,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3331
3462
|
"class"
|
|
3332
3463
|
]));
|
|
3333
3464
|
}
|
|
3334
|
-
}),
|
|
3465
|
+
}), Qo = "-ml-3 rounded-l border-r border-ink/10", $o = "-mr-3 rounded-r border-l border-ink/10", es = /* @__PURE__ */ f({
|
|
3335
3466
|
inheritAttrs: !1,
|
|
3336
3467
|
__name: "InputNumber",
|
|
3337
3468
|
props: /*@__PURE__*/ _({
|
|
@@ -3390,7 +3521,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3390
3521
|
class: "contents"
|
|
3391
3522
|
}, {
|
|
3392
3523
|
default: H(() => [
|
|
3393
|
-
d(P(Xt), { class: b([o,
|
|
3524
|
+
d(P(Xt), { class: b([o, Qo]) }, {
|
|
3394
3525
|
default: H(() => [d(P(Fe))]),
|
|
3395
3526
|
_: 1
|
|
3396
3527
|
}, 8, ["class"]),
|
|
@@ -3404,7 +3535,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3404
3535
|
"aria-describedby",
|
|
3405
3536
|
"aria-valuetext"
|
|
3406
3537
|
]),
|
|
3407
|
-
d(P(Zt), { class: b([o,
|
|
3538
|
+
d(P(Zt), { class: b([o, $o]) }, {
|
|
3408
3539
|
default: H(() => [d(P(Ve))]),
|
|
3409
3540
|
_: 1
|
|
3410
3541
|
}, 8, ["class"])
|
|
@@ -3433,26 +3564,26 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3433
3564
|
"class"
|
|
3434
3565
|
]));
|
|
3435
3566
|
}
|
|
3436
|
-
}),
|
|
3567
|
+
}), ts = { class: "flex items-center" }, ns = ["aria-label", "disabled"], rs = ["aria-label", "disabled"], is = {
|
|
3437
3568
|
key: 2,
|
|
3438
3569
|
class: "px-1.5 py-1 text-sm tabular-nums"
|
|
3439
|
-
},
|
|
3570
|
+
}, as = {
|
|
3440
3571
|
key: 0,
|
|
3441
3572
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
3442
|
-
},
|
|
3573
|
+
}, os = [
|
|
3443
3574
|
"aria-current",
|
|
3444
3575
|
"aria-pressed",
|
|
3445
3576
|
"disabled",
|
|
3446
3577
|
"onClick"
|
|
3447
|
-
],
|
|
3578
|
+
], ss = {
|
|
3448
3579
|
key: 1,
|
|
3449
3580
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
3450
|
-
},
|
|
3581
|
+
}, cs = [
|
|
3451
3582
|
"aria-current",
|
|
3452
3583
|
"aria-pressed",
|
|
3453
3584
|
"disabled",
|
|
3454
3585
|
"onClick"
|
|
3455
|
-
],
|
|
3586
|
+
], ls = /* @__PURE__ */ f({
|
|
3456
3587
|
__name: "Calendar",
|
|
3457
3588
|
props: /*@__PURE__*/ _({
|
|
3458
3589
|
min: {},
|
|
@@ -3599,21 +3730,21 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3599
3730
|
default: H(() => [d(P(he))]),
|
|
3600
3731
|
_: 1
|
|
3601
3732
|
}, 8, ["aria-label", "disabled"])),
|
|
3602
|
-
c("div",
|
|
3733
|
+
c("div", ts, [_.value === "days" ? (T(), s("button", {
|
|
3603
3734
|
key: 0,
|
|
3604
3735
|
type: "button",
|
|
3605
3736
|
class: b(q),
|
|
3606
3737
|
"aria-label": P(t)("ui.calendar.chooseMonth", { month: C.value }),
|
|
3607
3738
|
disabled: e.disabled,
|
|
3608
3739
|
onClick: D
|
|
3609
|
-
}, [u(N(C.value) + " ", 1), d(P(me))], 8,
|
|
3740
|
+
}, [u(N(C.value) + " ", 1), d(P(me))], 8, ns)) : o("", !0), _.value === "years" ? (T(), s("span", is, N(E.value[0]) + " – " + N(E.value[E.value.length - 1]), 1)) : (T(), s("button", {
|
|
3610
3741
|
key: 1,
|
|
3611
3742
|
type: "button",
|
|
3612
3743
|
class: b(q),
|
|
3613
3744
|
"aria-label": P(t)("ui.calendar.chooseYear", { year: v.value.year }),
|
|
3614
3745
|
disabled: e.disabled,
|
|
3615
3746
|
onClick: A
|
|
3616
|
-
}, [u(N(v.value.year) + " ", 1), d(P(me))], 8,
|
|
3747
|
+
}, [u(N(v.value.year) + " ", 1), d(P(me))], 8, rs))]),
|
|
3617
3748
|
_.value === "days" ? (T(), a(P(pt), {
|
|
3618
3749
|
key: 2,
|
|
3619
3750
|
"as-child": ""
|
|
@@ -3643,7 +3774,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3643
3774
|
]),
|
|
3644
3775
|
_: 1
|
|
3645
3776
|
}),
|
|
3646
|
-
_.value === "months" ? (T(), s("div",
|
|
3777
|
+
_.value === "months" ? (T(), s("div", as, [(T(!0), s(n, null, k(S.value, (e, t) => (T(), s("button", {
|
|
3647
3778
|
key: e,
|
|
3648
3779
|
type: "button",
|
|
3649
3780
|
class: b(ne),
|
|
@@ -3651,7 +3782,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3651
3782
|
"aria-pressed": U(t + 1),
|
|
3652
3783
|
disabled: R(t + 1),
|
|
3653
3784
|
onClick: (e) => j(t + 1)
|
|
3654
|
-
}, N(e), 9,
|
|
3785
|
+
}, N(e), 9, os))), 128))])) : _.value === "years" ? (T(), s("div", ss, [(T(!0), s(n, null, k(E.value, (e) => (T(), s("button", {
|
|
3655
3786
|
key: e,
|
|
3656
3787
|
type: "button",
|
|
3657
3788
|
class: b(ne),
|
|
@@ -3659,7 +3790,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3659
3790
|
"aria-pressed": W(e),
|
|
3660
3791
|
disabled: z(e),
|
|
3661
3792
|
onClick: (t) => F(e)
|
|
3662
|
-
}, N(e), 9,
|
|
3793
|
+
}, N(e), 9, cs))), 128))])) : o("", !0),
|
|
3663
3794
|
(T(!0), s(n, null, k(_.value === "days" ? i : [], (e) => (T(), a(P(st), {
|
|
3664
3795
|
key: e.value.toString(),
|
|
3665
3796
|
class: "mt-3 border-collapse select-none"
|
|
@@ -3717,7 +3848,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3717
3848
|
"class"
|
|
3718
3849
|
]));
|
|
3719
3850
|
}
|
|
3720
|
-
}),
|
|
3851
|
+
}), us = {
|
|
3721
3852
|
monday: 1,
|
|
3722
3853
|
mon: 1,
|
|
3723
3854
|
tuesday: 2,
|
|
@@ -3736,7 +3867,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3736
3867
|
sat: 6,
|
|
3737
3868
|
sunday: 7,
|
|
3738
3869
|
sun: 7
|
|
3739
|
-
}, Q = `(${Object.keys(
|
|
3870
|
+
}, Q = `(${Object.keys(us).join("|")})`, ds = {
|
|
3740
3871
|
january: 1,
|
|
3741
3872
|
jan: 1,
|
|
3742
3873
|
february: 2,
|
|
@@ -3761,7 +3892,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3761
3892
|
nov: 11,
|
|
3762
3893
|
december: 12,
|
|
3763
3894
|
dec: 12
|
|
3764
|
-
},
|
|
3895
|
+
}, fs = `(${Object.keys(ds).sort((e, t) => t.length - e.length).join("|")})`, ps = {
|
|
3765
3896
|
a: 1,
|
|
3766
3897
|
an: 1,
|
|
3767
3898
|
one: 1,
|
|
@@ -3785,7 +3916,7 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3785
3916
|
nineteen: 19,
|
|
3786
3917
|
twenty: 20,
|
|
3787
3918
|
thirty: 30
|
|
3788
|
-
},
|
|
3919
|
+
}, ms = `(\\d+|${Object.keys(ps).join("|")})`, hs = "(day|week|fortnight|month|year)s?", gs = {
|
|
3789
3920
|
first: 1,
|
|
3790
3921
|
second: 2,
|
|
3791
3922
|
third: 3,
|
|
@@ -3807,37 +3938,37 @@ var Ao = { class: "sr-only" }, jo = {
|
|
|
3807
3938
|
nineteenth: 19,
|
|
3808
3939
|
twentieth: 20,
|
|
3809
3940
|
thirtieth: 30
|
|
3810
|
-
},
|
|
3811
|
-
function
|
|
3941
|
+
}, _s = Object.keys(gs).join("|");
|
|
3942
|
+
function vs(e) {
|
|
3812
3943
|
return new Date(e.year, e.month - 1, e.day).getDay() || 7;
|
|
3813
3944
|
}
|
|
3814
|
-
function
|
|
3815
|
-
return e.subtract({ days:
|
|
3945
|
+
function ys(e) {
|
|
3946
|
+
return e.subtract({ days: vs(e) - 1 });
|
|
3816
3947
|
}
|
|
3817
3948
|
function $(e, t, n) {
|
|
3818
3949
|
if (!Number.isInteger(e) || t < 1 || t > 12 || n < 1) return;
|
|
3819
3950
|
let r = new Un(e, t, 1);
|
|
3820
3951
|
if (!(n > r.calendar.getDaysInMonth(r))) return new Un(e, t, n);
|
|
3821
3952
|
}
|
|
3822
|
-
function
|
|
3953
|
+
function bs(e, t, n, r) {
|
|
3823
3954
|
if (r === -1) {
|
|
3824
3955
|
let r = Wn(new Un(e, t, 1));
|
|
3825
|
-
return r.subtract({ days: (
|
|
3956
|
+
return r.subtract({ days: (vs(r) - n + 7) % 7 });
|
|
3826
3957
|
}
|
|
3827
|
-
let i = new Un(e, t, 1), a = i.add({ days: (n -
|
|
3958
|
+
let i = new Un(e, t, 1), a = i.add({ days: (n - vs(i) + 7) % 7 + (r - 1) * 7 });
|
|
3828
3959
|
return a.month === t ? a : void 0;
|
|
3829
3960
|
}
|
|
3830
|
-
function
|
|
3961
|
+
function xs(e) {
|
|
3831
3962
|
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;
|
|
3832
3963
|
return new Un(e, p, m);
|
|
3833
3964
|
}
|
|
3834
|
-
function
|
|
3965
|
+
function Ss(e, t) {
|
|
3835
3966
|
if (e.length === 4) return Number(e);
|
|
3836
3967
|
if (e.length !== 2) return NaN;
|
|
3837
3968
|
let n = Number(e);
|
|
3838
3969
|
return n <= t.year % 100 ? 2e3 + n : 1900 + n;
|
|
3839
3970
|
}
|
|
3840
|
-
var
|
|
3971
|
+
var Cs = [
|
|
3841
3972
|
["(?:christmas|xmas) eve", (e) => $(e, 12, 24)],
|
|
3842
3973
|
["(?:christmas|xmas)(?: day)?", (e) => $(e, 12, 25)],
|
|
3843
3974
|
["boxing day", (e) => $(e, 12, 26)],
|
|
@@ -3845,16 +3976,16 @@ var gs = [
|
|
|
3845
3976
|
["new years?(?: day)?", (e) => $(e, 1, 1)],
|
|
3846
3977
|
["valentines(?: day)?", (e) => $(e, 2, 14)],
|
|
3847
3978
|
["(?:st )?(?:patricks|paddys) day", (e) => $(e, 3, 17)],
|
|
3848
|
-
["good friday", (e) =>
|
|
3849
|
-
["easter monday", (e) =>
|
|
3850
|
-
["easter(?: sunday| day)?", (e) =>
|
|
3851
|
-
["(?:mothers day|mothering sunday)", (e) =>
|
|
3852
|
-
["fathers day", (e) =>
|
|
3979
|
+
["good friday", (e) => xs(e).subtract({ days: 2 })],
|
|
3980
|
+
["easter monday", (e) => xs(e).add({ days: 1 })],
|
|
3981
|
+
["easter(?: sunday| day)?", (e) => xs(e)],
|
|
3982
|
+
["(?:mothers day|mothering sunday)", (e) => xs(e).subtract({ weeks: 3 })],
|
|
3983
|
+
["fathers day", (e) => bs(e, 6, 7, 3)],
|
|
3853
3984
|
["halloween", (e) => $(e, 10, 31)],
|
|
3854
3985
|
["(?:bonfire night|guy fawkes(?: night| day)?)", (e) => $(e, 11, 5)],
|
|
3855
3986
|
["(?:remembrance|armistice) day", (e) => $(e, 11, 11)]
|
|
3856
3987
|
];
|
|
3857
|
-
function
|
|
3988
|
+
function ws(e, t, n) {
|
|
3858
3989
|
let r = e.filter((e) => !!e).sort((e, t) => e.compare(t));
|
|
3859
3990
|
return n === "future" ? r.find((e) => e.compare(t) >= 0) : n === "past" ? r.findLast((e) => e.compare(t) <= 0) : r.reduce((e, n) => {
|
|
3860
3991
|
if (!e) return n;
|
|
@@ -3862,14 +3993,14 @@ function _s(e, t, n) {
|
|
|
3862
3993
|
return r < i || r === i && n.compare(t) > 0 ? n : e;
|
|
3863
3994
|
}, void 0);
|
|
3864
3995
|
}
|
|
3865
|
-
function
|
|
3996
|
+
function Ts(e, t, n, r, i) {
|
|
3866
3997
|
if (!e) return n.yearValue === void 0 ? r.add(t) : void 0;
|
|
3867
3998
|
switch (e.kind) {
|
|
3868
3999
|
case "date": return n.yearValue === void 0 ? e.date.add(t) : void 0;
|
|
3869
4000
|
case "yearless": return n.yearValue === void 0 ? n.year || t.years ? e.resolve(r.year + t.years)?.add({
|
|
3870
4001
|
...t,
|
|
3871
4002
|
years: 0
|
|
3872
|
-
}) :
|
|
4003
|
+
}) : ws(Array.from({ length: 9 }, (e, t) => r.year - 4 + t).map(e.resolve), r, i)?.add(t) : e.resolve(n.yearValue + t.years)?.add({
|
|
3873
4004
|
...t,
|
|
3874
4005
|
years: 0
|
|
3875
4006
|
});
|
|
@@ -3882,19 +4013,19 @@ function vs(e, t, n, r, i) {
|
|
|
3882
4013
|
months: 0
|
|
3883
4014
|
});
|
|
3884
4015
|
}
|
|
3885
|
-
return
|
|
4016
|
+
return ws([
|
|
3886
4017
|
-1,
|
|
3887
4018
|
0,
|
|
3888
4019
|
1
|
|
3889
4020
|
].map((e) => Jn(r).add({ months: e })).map((t) => $(t.year, t.month, e.day)), r, i)?.add(t);
|
|
3890
4021
|
case "weekday": {
|
|
3891
4022
|
if (n.yearValue !== void 0) return;
|
|
3892
|
-
let a = (e.weekday -
|
|
4023
|
+
let a = (e.weekday - vs(r) + 7) % 7 || 7, o = (vs(r) - e.weekday + 7) % 7 || 7, s = r.add({ days: a }), c = r.subtract({ days: o });
|
|
3893
4024
|
return (i === "past" || i === "nearest" && o < a ? c : s).add(t);
|
|
3894
4025
|
}
|
|
3895
4026
|
}
|
|
3896
4027
|
}
|
|
3897
|
-
function
|
|
4028
|
+
function Es(e, t, n) {
|
|
3898
4029
|
let r = e.trim(), i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r);
|
|
3899
4030
|
if (i) {
|
|
3900
4031
|
let e = $(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
@@ -3920,29 +4051,29 @@ function ys(e, t, n) {
|
|
|
3920
4051
|
kind: "yearless",
|
|
3921
4052
|
resolve: (e) => $(e, o, i)
|
|
3922
4053
|
};
|
|
3923
|
-
let s = $(
|
|
4054
|
+
let s = $(Ss(r.year, t), o, i);
|
|
3924
4055
|
return s && {
|
|
3925
4056
|
kind: "date",
|
|
3926
4057
|
date: s
|
|
3927
4058
|
};
|
|
3928
4059
|
}
|
|
3929
4060
|
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) => {
|
|
3930
|
-
let i = Number(e), a =
|
|
4061
|
+
let i = Number(e), a = ds[n];
|
|
3931
4062
|
if (r === void 0) return {
|
|
3932
4063
|
kind: "yearless",
|
|
3933
4064
|
resolve: (e) => $(e, a, i)
|
|
3934
4065
|
};
|
|
3935
|
-
let o = $(
|
|
4066
|
+
let o = $(Ss(r, t), a, i);
|
|
3936
4067
|
return o && {
|
|
3937
4068
|
kind: "date",
|
|
3938
4069
|
date: o
|
|
3939
4070
|
};
|
|
3940
4071
|
}, c;
|
|
3941
|
-
if (c = RegExp(`^(\\d{1,2}) ${
|
|
3942
|
-
if (c = RegExp(`^${
|
|
3943
|
-
if (c = RegExp(`^(\\d{4}) ${
|
|
3944
|
-
if (c = RegExp(`^${
|
|
3945
|
-
let e =
|
|
4072
|
+
if (c = RegExp(`^(\\d{1,2}) ${fs}(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[1], c[2], c[3]);
|
|
4073
|
+
if (c = RegExp(`^${fs} (\\d{1,2})(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[2], c[1], c[3]);
|
|
4074
|
+
if (c = RegExp(`^(\\d{4}) ${fs} (\\d{1,2})$`).exec(o)) return s(c[3], c[2], c[1]);
|
|
4075
|
+
if (c = RegExp(`^${fs}(?: (\\d{4}))?$`).exec(o)) {
|
|
4076
|
+
let e = ds[c[1]];
|
|
3946
4077
|
if (c[2]) {
|
|
3947
4078
|
let t = $(Number(c[2]), e, 1);
|
|
3948
4079
|
return t && {
|
|
@@ -3963,22 +4094,22 @@ function ys(e, t, n) {
|
|
|
3963
4094
|
} : void 0;
|
|
3964
4095
|
}
|
|
3965
4096
|
}
|
|
3966
|
-
function
|
|
4097
|
+
function Ds(e) {
|
|
3967
4098
|
return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
|
|
3968
4099
|
1: "st",
|
|
3969
4100
|
2: "nd",
|
|
3970
4101
|
3: "rd"
|
|
3971
4102
|
}[e % 10] ?? "th"}`;
|
|
3972
4103
|
}
|
|
3973
|
-
function
|
|
3974
|
-
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${
|
|
4104
|
+
function Os(e) {
|
|
4105
|
+
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${_s})\\b`, "g"), (e, t, n) => Ds((t === "twenty" ? 20 : 30) + gs[n])).replace(RegExp(`\\b(${_s})\\b`, "g"), (e) => Ds(gs[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();
|
|
3975
4106
|
}
|
|
3976
|
-
function
|
|
4107
|
+
function ks(e, t) {
|
|
3977
4108
|
let { today: n, order: r = [
|
|
3978
4109
|
"day",
|
|
3979
4110
|
"month",
|
|
3980
4111
|
"year"
|
|
3981
|
-
], prefer: i = "future" } = t, a =
|
|
4112
|
+
], prefer: i = "future" } = t, a = Os(e);
|
|
3982
4113
|
if (!a) return;
|
|
3983
4114
|
let o = ` ${a} `, s = !1, c = !1, l = [], u = !1, d = {
|
|
3984
4115
|
days: 0,
|
|
@@ -3988,7 +4119,7 @@ function Ss(e, t) {
|
|
|
3988
4119
|
}, f = {
|
|
3989
4120
|
year: !1,
|
|
3990
4121
|
month: !1
|
|
3991
|
-
}, p =
|
|
4122
|
+
}, p = ys(n);
|
|
3992
4123
|
function m(e) {
|
|
3993
4124
|
let t = RegExp(` ${e} `).exec(o);
|
|
3994
4125
|
return t && (o = o.replace(t[0], " "), s = !0), t;
|
|
@@ -3998,18 +4129,18 @@ function Ss(e, t) {
|
|
|
3998
4129
|
}, g = (e) => e && {
|
|
3999
4130
|
kind: "date",
|
|
4000
4131
|
date: e
|
|
4001
|
-
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) =>
|
|
4002
|
-
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(Wn(n))), m("eoy") && h(g(new Un(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${
|
|
4003
|
-
let e = x[1] === "last" ? -1 : Number(x[1][0]), t =
|
|
4132
|
+
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) => ps[e] ?? Number(e), b = (e) => n.add({ days: (e - vs(n) + 7) % 7 || 7 }), x;
|
|
4133
|
+
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(Wn(n))), m("eoy") && h(g(new Un(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${fs}(?: (\\d{4}))?)`)) {
|
|
4134
|
+
let e = x[1] === "last" ? -1 : Number(x[1][0]), t = us[x[2]];
|
|
4004
4135
|
if (x[4]) {
|
|
4005
|
-
let n =
|
|
4006
|
-
x[5] ? h(g(
|
|
4136
|
+
let n = ds[x[4]];
|
|
4137
|
+
x[5] ? h(g(bs(Number(x[5]), n, t, e))) : h({
|
|
4007
4138
|
kind: "yearless",
|
|
4008
|
-
resolve: (r) =>
|
|
4139
|
+
resolve: (r) => bs(r, n, t, e)
|
|
4009
4140
|
});
|
|
4010
4141
|
} else {
|
|
4011
4142
|
let r = x[3] === "next" ? 1 : x[3] === "last" ? -1 : 0, i = Jn(n).add({ months: r });
|
|
4012
|
-
h(g(
|
|
4143
|
+
h(g(bs(i.year, i.month, t, e)));
|
|
4013
4144
|
}
|
|
4014
4145
|
}
|
|
4015
4146
|
if (x = m("(start|beginning|middle|mid|end) (?:of )?(?:(this|next|last) )?(week|month|year)")) {
|
|
@@ -4023,8 +4154,8 @@ function Ss(e, t) {
|
|
|
4023
4154
|
h(g(t === "start" ? new Un(r, 1, 1) : t === "mid" ? new Un(r, 7, 1) : new Un(r, 12, 31)));
|
|
4024
4155
|
}
|
|
4025
4156
|
}
|
|
4026
|
-
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${
|
|
4027
|
-
let e = x[1], t =
|
|
4157
|
+
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${fs}(?: (\\d{4}))?`)) {
|
|
4158
|
+
let e = x[1], t = ds[x[2]], n = (n) => [
|
|
4028
4159
|
"start",
|
|
4029
4160
|
"beginning",
|
|
4030
4161
|
"early"
|
|
@@ -4041,38 +4172,38 @@ function Ss(e, t) {
|
|
|
4041
4172
|
kind: "weekday",
|
|
4042
4173
|
weekday: 6
|
|
4043
4174
|
});
|
|
4044
|
-
for (let [e, t] of
|
|
4175
|
+
for (let [e, t] of Cs) m(e) && h({
|
|
4045
4176
|
kind: "yearless",
|
|
4046
4177
|
resolve: t
|
|
4047
4178
|
});
|
|
4048
|
-
if ((x = m(`${Q} after next`)) && h(g(b(
|
|
4179
|
+
if ((x = m(`${Q} after next`)) && h(g(b(us[x[1]]).add({ weeks: 1 }))), (x = m(`${Q} (week|fortnight)`)) && h(g(b(us[x[1]]).add({ weeks: x[2] === "fortnight" ? 2 : 1 }))), x = m(`${ms} ${hs} on ${Q}`)) {
|
|
4049
4180
|
let [e, t] = v(x[2]);
|
|
4050
|
-
h(g(b(
|
|
4181
|
+
h(g(b(us[x[3]]).add({ [e]: y(x[1]) * t })));
|
|
4051
4182
|
}
|
|
4052
|
-
if (x = m(`${
|
|
4183
|
+
if (x = m(`${ms} ${hs} (today|tomorrow|tmrw|tmr)`)) {
|
|
4053
4184
|
let [e, t] = v(x[2]);
|
|
4054
4185
|
h(g((x[3] === "today" ? n : n.add({ days: 1 })).add({ [e]: y(x[1]) * t })));
|
|
4055
4186
|
}
|
|
4056
4187
|
for ((x = m(`(?:next week ${Q}|${Q} next week|next ${Q})`)) && h(g(p.add({
|
|
4057
4188
|
weeks: 1,
|
|
4058
|
-
days:
|
|
4059
|
-
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days:
|
|
4189
|
+
days: us[_(x)] - 1
|
|
4190
|
+
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days: us[_(x)] - 1 }))), (x = m(`(?:this week ${Q}|${Q} this week|this ${Q})`)) && h(g(p.add({ days: us[_(x)] - 1 }))), (x = m(`last ${Q}`)) && h(g(n.subtract({ days: (vs(n) - us[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({
|
|
4060
4191
|
kind: "weekday",
|
|
4061
|
-
weekday:
|
|
4062
|
-
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${
|
|
4192
|
+
weekday: us[x[1]]
|
|
4193
|
+
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${hs}`);) {
|
|
4063
4194
|
let [e, t] = v(x[2]);
|
|
4064
4195
|
d[e] += (x[1] === "next" ? 1 : -1) * t;
|
|
4065
4196
|
}
|
|
4066
4197
|
let S = !1;
|
|
4067
|
-
for (; x = m(`in ${
|
|
4198
|
+
for (; x = m(`in ${ms} ${hs}`);) {
|
|
4068
4199
|
let [e, t] = v(x[2]);
|
|
4069
4200
|
d[e] += y(x[1]) * t, S = !0;
|
|
4070
4201
|
}
|
|
4071
|
-
for (; S && (x = m(`(?:and )?${
|
|
4202
|
+
for (; S && (x = m(`(?:and )?${ms} ${hs}(?! (?:ago|before|earlier|from|after|later))`));) {
|
|
4072
4203
|
let [e, t] = v(x[2]);
|
|
4073
4204
|
d[e] += y(x[1]) * t;
|
|
4074
4205
|
}
|
|
4075
|
-
for (; x = m(`${
|
|
4206
|
+
for (; x = m(`${ms} ${hs} (ago|before|earlier|from|after|later)`);) {
|
|
4076
4207
|
let [e, t] = v(x[2]), n = [
|
|
4077
4208
|
"ago",
|
|
4078
4209
|
"before",
|
|
@@ -4083,24 +4214,24 @@ function Ss(e, t) {
|
|
|
4083
4214
|
for (; m("(?:on|of|at|by|for)"););
|
|
4084
4215
|
let C = o.trim();
|
|
4085
4216
|
if (s && /^\d{4}$/.test(C) && (f.yearValue = Number(C), C = ""), C) {
|
|
4086
|
-
let e =
|
|
4217
|
+
let e = Es(C, n, r);
|
|
4087
4218
|
if (!e) return;
|
|
4088
4219
|
l.length === 1 && u && l.pop(), l.push(e);
|
|
4089
4220
|
} else if (!s) return;
|
|
4090
|
-
if (!(c || l.length > 1)) return
|
|
4221
|
+
if (!(c || l.length > 1)) return Ts(l[0], d, f, n, i);
|
|
4091
4222
|
}
|
|
4092
4223
|
// src/components/InputDate/InputDate.vue?vue&type=script&setup=true&lang.ts
|
|
4093
|
-
var
|
|
4224
|
+
var As = [
|
|
4094
4225
|
"id",
|
|
4095
4226
|
"placeholder",
|
|
4096
4227
|
"disabled",
|
|
4097
4228
|
"aria-invalid",
|
|
4098
4229
|
"aria-describedby"
|
|
4099
|
-
],
|
|
4230
|
+
], js = {
|
|
4100
4231
|
key: 0,
|
|
4101
4232
|
"aria-hidden": "true",
|
|
4102
4233
|
class: "shrink-0 tabular-nums text-ink/55"
|
|
4103
|
-
},
|
|
4234
|
+
}, Ms = /* @__PURE__ */ f({
|
|
4104
4235
|
inheritAttrs: !1,
|
|
4105
4236
|
__name: "InputDate",
|
|
4106
4237
|
props: /*@__PURE__*/ _({
|
|
@@ -4159,7 +4290,7 @@ var Cs = [
|
|
|
4159
4290
|
return g.value.format(new Date(e.year, e.month - 1, e.day));
|
|
4160
4291
|
}
|
|
4161
4292
|
function E(e) {
|
|
4162
|
-
return
|
|
4293
|
+
return ks(e, {
|
|
4163
4294
|
today: Xn(Gn()),
|
|
4164
4295
|
order: y.value,
|
|
4165
4296
|
prefer: n.prefer
|
|
@@ -4235,8 +4366,8 @@ var Cs = [
|
|
|
4235
4366
|
onInput: M,
|
|
4236
4367
|
onBlur: F,
|
|
4237
4368
|
onKeydown: W(I, ["enter"])
|
|
4238
|
-
}), null, 16,
|
|
4239
|
-
k.value ? (T(), s("span",
|
|
4369
|
+
}), null, 16, As), [[ee, D.value]]),
|
|
4370
|
+
k.value ? (T(), s("span", js, N(k.value), 1)) : o("", !0),
|
|
4240
4371
|
d(P(It), {
|
|
4241
4372
|
"aria-label": P(t)("ui.inputDate.openCalendar"),
|
|
4242
4373
|
class: b(q)
|
|
@@ -4249,7 +4380,7 @@ var Cs = [
|
|
|
4249
4380
|
align: "end",
|
|
4250
4381
|
class: b([P(Ar), "p-3"])
|
|
4251
4382
|
}, {
|
|
4252
|
-
default: H(() => [d(
|
|
4383
|
+
default: H(() => [d(ls, {
|
|
4253
4384
|
"model-value": r.value,
|
|
4254
4385
|
min: e.min,
|
|
4255
4386
|
max: e.max,
|
|
@@ -4279,7 +4410,7 @@ var Cs = [
|
|
|
4279
4410
|
"class"
|
|
4280
4411
|
]));
|
|
4281
4412
|
}
|
|
4282
|
-
}),
|
|
4413
|
+
}), Ns = /* @__PURE__ */ f({
|
|
4283
4414
|
__name: "Tooltip",
|
|
4284
4415
|
props: {
|
|
4285
4416
|
text: {},
|
|
@@ -4330,7 +4461,7 @@ var Cs = [
|
|
|
4330
4461
|
_: 3
|
|
4331
4462
|
}));
|
|
4332
4463
|
}
|
|
4333
|
-
}),
|
|
4464
|
+
}), Ps = { class: "-mx-3 -my-2 flex min-w-0 flex-1 flex-col self-stretch" }, Fs = ["aria-label", "aria-controls"], Is = { class: "flex justify-end gap-2" }, Ls = "https://", Rs = /* @__PURE__ */ f({
|
|
4334
4465
|
__name: "InputRichText",
|
|
4335
4466
|
props: /*@__PURE__*/ _({
|
|
4336
4467
|
label: {},
|
|
@@ -4484,14 +4615,14 @@ var Cs = [
|
|
|
4484
4615
|
disabled: e.disabled,
|
|
4485
4616
|
class: b(r.class)
|
|
4486
4617
|
}, {
|
|
4487
|
-
default: H((r) => [c("div",
|
|
4618
|
+
default: H((r) => [c("div", Ps, [
|
|
4488
4619
|
c("div", {
|
|
4489
4620
|
role: "toolbar",
|
|
4490
4621
|
"aria-label": P(t)("ui.inputRichText.formattingFor", { label: e.label }),
|
|
4491
4622
|
"aria-controls": r.id,
|
|
4492
4623
|
class: "flex items-center gap-0.5 border-b border-ink/10 px-1.5 py-1 [&_svg]:opacity-100!",
|
|
4493
4624
|
onMousedown: l[3] ||= G(() => {}, ["prevent"])
|
|
4494
|
-
}, [(T(), s(n, null, k(M, (t) => d(
|
|
4625
|
+
}, [(T(), s(n, null, k(M, (t) => d(Ns, {
|
|
4495
4626
|
key: t.name,
|
|
4496
4627
|
text: `${t.label} (${P(A)}${t.key})`,
|
|
4497
4628
|
disabled: e.disabled
|
|
@@ -4526,7 +4657,7 @@ var Cs = [
|
|
|
4526
4657
|
sideOffset: 6
|
|
4527
4658
|
}
|
|
4528
4659
|
}, {
|
|
4529
|
-
default: H(() => [d(
|
|
4660
|
+
default: H(() => [d(Ns, {
|
|
4530
4661
|
text: `${P(t)("ui.inputRichText.link")} (${P(A)}K)`,
|
|
4531
4662
|
disabled: e.disabled
|
|
4532
4663
|
}, {
|
|
@@ -4556,13 +4687,13 @@ var Cs = [
|
|
|
4556
4687
|
novalidate: "",
|
|
4557
4688
|
onSubmit: G(S, ["prevent"]),
|
|
4558
4689
|
onMousedown: l[1] ||= G(() => {}, ["stop"])
|
|
4559
|
-
}, [d(
|
|
4690
|
+
}, [d(Zo, {
|
|
4560
4691
|
modelValue: v.value,
|
|
4561
4692
|
"onUpdate:modelValue": l[0] ||= (e) => v.value = e,
|
|
4562
4693
|
label: P(t)("ui.inputRichText.linkAddress"),
|
|
4563
4694
|
type: "url",
|
|
4564
4695
|
inputmode: "url",
|
|
4565
|
-
placeholder:
|
|
4696
|
+
placeholder: Ls,
|
|
4566
4697
|
autocomplete: "off",
|
|
4567
4698
|
spellcheck: "false",
|
|
4568
4699
|
"error-text": y.value
|
|
@@ -4570,7 +4701,7 @@ var Cs = [
|
|
|
4570
4701
|
"modelValue",
|
|
4571
4702
|
"label",
|
|
4572
4703
|
"error-text"
|
|
4573
|
-
]), c("div",
|
|
4704
|
+
]), c("div", Is, [h.value.link ? (T(), a(Z, {
|
|
4574
4705
|
key: 0,
|
|
4575
4706
|
size: "sm",
|
|
4576
4707
|
variant: "ghost",
|
|
@@ -4587,7 +4718,7 @@ var Cs = [
|
|
|
4587
4718
|
_: 1
|
|
4588
4719
|
})])], 32)]),
|
|
4589
4720
|
_: 1
|
|
4590
|
-
}, 8, ["open"])], 40,
|
|
4721
|
+
}, 8, ["open"])], 40, Fs),
|
|
4591
4722
|
d(P(E), { ids: r }, null, 8, ["ids"]),
|
|
4592
4723
|
d(P(Zn), {
|
|
4593
4724
|
editor: P(m),
|
|
@@ -4607,18 +4738,18 @@ var Cs = [
|
|
|
4607
4738
|
"class"
|
|
4608
4739
|
]));
|
|
4609
4740
|
}
|
|
4610
|
-
}),
|
|
4741
|
+
}), zs = [
|
|
4611
4742
|
"id",
|
|
4612
4743
|
"type",
|
|
4613
4744
|
"autocomplete",
|
|
4614
4745
|
"disabled",
|
|
4615
4746
|
"aria-invalid",
|
|
4616
4747
|
"aria-describedby"
|
|
4617
|
-
],
|
|
4748
|
+
], Bs = [
|
|
4618
4749
|
"aria-controls",
|
|
4619
4750
|
"aria-pressed",
|
|
4620
4751
|
"disabled"
|
|
4621
|
-
],
|
|
4752
|
+
], Vs = { class: "sr-only" }, Hs = /* @__PURE__ */ f({
|
|
4622
4753
|
inheritAttrs: !1,
|
|
4623
4754
|
__name: "InputPassword",
|
|
4624
4755
|
props: /*@__PURE__*/ _({
|
|
@@ -4686,7 +4817,7 @@ var Cs = [
|
|
|
4686
4817
|
onKeydown: h,
|
|
4687
4818
|
onKeyup: h,
|
|
4688
4819
|
onBlur: o[1] ||= (e) => m.value = !1
|
|
4689
|
-
}), null, 16,
|
|
4820
|
+
}), null, 16, zs), [[z, r.value]]), c("button", {
|
|
4690
4821
|
type: "button",
|
|
4691
4822
|
class: b(_),
|
|
4692
4823
|
"aria-controls": n,
|
|
@@ -4694,13 +4825,13 @@ var Cs = [
|
|
|
4694
4825
|
disabled: e.disabled,
|
|
4695
4826
|
onPointerdown: o[2] ||= G(() => {}, ["prevent"]),
|
|
4696
4827
|
onClick: o[3] ||= (e) => d.value = !d.value
|
|
4697
|
-
}, [c("span",
|
|
4828
|
+
}, [c("span", Vs, N(P(t)("ui.inputPassword.show")), 1), d.value ? (T(), a(P(Te), {
|
|
4698
4829
|
key: 0,
|
|
4699
4830
|
"aria-hidden": "true"
|
|
4700
4831
|
})) : (T(), a(P(we), {
|
|
4701
4832
|
key: 1,
|
|
4702
4833
|
"aria-hidden": "true"
|
|
4703
|
-
}))], 40,
|
|
4834
|
+
}))], 40, Bs)]),
|
|
4704
4835
|
_: 2
|
|
4705
4836
|
}, [i.$slots.leading ? {
|
|
4706
4837
|
name: "leading",
|
|
@@ -4722,7 +4853,7 @@ var Cs = [
|
|
|
4722
4853
|
"class"
|
|
4723
4854
|
]));
|
|
4724
4855
|
}
|
|
4725
|
-
}),
|
|
4856
|
+
}), Us = { class: "flex flex-col gap-0.5" }, Ws = { class: "flex items-center gap-1" }, Gs = ["for"], Ks = ["hidden"], qs = /* @__PURE__ */ f({
|
|
4726
4857
|
__name: "InputCode",
|
|
4727
4858
|
props: /*@__PURE__*/ _({
|
|
4728
4859
|
label: {},
|
|
@@ -4765,11 +4896,11 @@ var Cs = [
|
|
|
4765
4896
|
loading: ""
|
|
4766
4897
|
};
|
|
4767
4898
|
return (t, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-1.5 text-ink", l.class)) }, [
|
|
4768
|
-
c("div",
|
|
4899
|
+
c("div", Us, [c("div", Ws, [c("label", {
|
|
4769
4900
|
id: m,
|
|
4770
4901
|
for: `${P(p)}-0`,
|
|
4771
4902
|
class: "text-sm"
|
|
4772
|
-
}, N(e.label), 9,
|
|
4903
|
+
}, N(e.label), 9, Gs), e.helper && e.helperPlacement === "icon" ? (T(), a(Kr, {
|
|
4773
4904
|
key: 0,
|
|
4774
4905
|
text: e.helper,
|
|
4775
4906
|
label: P(r)("ui.formField.about", { label: e.label })
|
|
@@ -4778,7 +4909,7 @@ var Cs = [
|
|
|
4778
4909
|
id: h,
|
|
4779
4910
|
hidden: e.helperPlacement === "icon",
|
|
4780
4911
|
class: "text-xs text-ink/65"
|
|
4781
|
-
}, N(e.helper), 9,
|
|
4912
|
+
}, N(e.helper), 9, Ks)) : o("", !0)]),
|
|
4782
4913
|
d(P(tn), {
|
|
4783
4914
|
"model-value": x.value,
|
|
4784
4915
|
type: e.alphanumeric ? "text" : "number",
|
|
@@ -4828,7 +4959,7 @@ var Cs = [
|
|
|
4828
4959
|
}, null, 8, ["status", "text"])
|
|
4829
4960
|
], 2));
|
|
4830
4961
|
}
|
|
4831
|
-
}),
|
|
4962
|
+
}), Js = ["data-disabled"], Ys = { class: "flex items-start gap-2" }, Xs = /* @__PURE__ */ f({
|
|
4832
4963
|
__name: "Checkbox",
|
|
4833
4964
|
props: /*@__PURE__*/ _({
|
|
4834
4965
|
label: {},
|
|
@@ -4870,7 +5001,7 @@ var Cs = [
|
|
|
4870
5001
|
return (r, i) => (T(), s("div", {
|
|
4871
5002
|
"data-disabled": e.disabled || void 0,
|
|
4872
5003
|
class: b(P(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", t.class))
|
|
4873
|
-
}, [c("div",
|
|
5004
|
+
}, [c("div", Ys, [d(P(_t), {
|
|
4874
5005
|
id: l,
|
|
4875
5006
|
modelValue: n.value,
|
|
4876
5007
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4916,9 +5047,9 @@ var Cs = [
|
|
|
4916
5047
|
id: f,
|
|
4917
5048
|
status: e.errorText ? "error" : void 0,
|
|
4918
5049
|
text: e.errorText
|
|
4919
|
-
}, null, 8, ["status", "text"])], 10,
|
|
5050
|
+
}, null, 8, ["status", "text"])], 10, Js));
|
|
4920
5051
|
}
|
|
4921
|
-
}),
|
|
5052
|
+
}), Zs = ["data-disabled"], Qs = { class: "flex flex-col gap-0.5" }, $s = { class: "flex items-center gap-1" }, ec = ["hidden"], tc = ["data-disabled"], nc = ["onClick"], rc = ["for"], ic = ["id"], ac = /* @__PURE__ */ f({
|
|
4922
5053
|
__name: "RadioGroup",
|
|
4923
5054
|
props: /*@__PURE__*/ _({
|
|
4924
5055
|
label: {},
|
|
@@ -4956,7 +5087,7 @@ var Cs = [
|
|
|
4956
5087
|
"data-disabled": e.disabled || void 0,
|
|
4957
5088
|
class: b(P(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", r.class))
|
|
4958
5089
|
}, [
|
|
4959
|
-
c("div",
|
|
5090
|
+
c("div", Qs, [c("div", $s, [c("span", {
|
|
4960
5091
|
id: f,
|
|
4961
5092
|
class: "text-sm"
|
|
4962
5093
|
}, N(e.label), 1), e.helper && e.helperPlacement === "icon" ? (T(), a(Kr, {
|
|
@@ -4968,7 +5099,7 @@ var Cs = [
|
|
|
4968
5099
|
id: p,
|
|
4969
5100
|
hidden: e.helperPlacement === "icon",
|
|
4970
5101
|
class: "text-xs text-ink/65"
|
|
4971
|
-
}, N(e.helper), 9,
|
|
5102
|
+
}, N(e.helper), 9, ec)) : o("", !0)]),
|
|
4972
5103
|
d(P(mn), {
|
|
4973
5104
|
modelValue: l.value,
|
|
4974
5105
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -5005,11 +5136,11 @@ var Cs = [
|
|
|
5005
5136
|
}, [c("label", {
|
|
5006
5137
|
for: `${P(u)}-${n}`,
|
|
5007
5138
|
class: b(P(X)("text-sm", e.disabled || t.disabled ? "cursor-not-allowed" : "cursor-pointer"))
|
|
5008
|
-
}, N(t.label), 11,
|
|
5139
|
+
}, N(t.label), 11, rc), t.description ? (T(), s("p", {
|
|
5009
5140
|
key: 0,
|
|
5010
5141
|
id: `${P(u)}-${n}-description`,
|
|
5011
5142
|
class: "text-xs text-ink/65"
|
|
5012
|
-
}, N(t.description), 9,
|
|
5143
|
+
}, N(t.description), 9, ic)) : o("", !0)], 10, nc)], 8, tc))), 128))]),
|
|
5013
5144
|
_: 1
|
|
5014
5145
|
}, 8, [
|
|
5015
5146
|
"modelValue",
|
|
@@ -5024,9 +5155,9 @@ var Cs = [
|
|
|
5024
5155
|
status: e.errorText ? "error" : void 0,
|
|
5025
5156
|
text: e.errorText
|
|
5026
5157
|
}, null, 8, ["status", "text"])
|
|
5027
|
-
], 10,
|
|
5158
|
+
], 10, Zs));
|
|
5028
5159
|
}
|
|
5029
|
-
}),
|
|
5160
|
+
}), oc = { class: "flex items-start gap-2" }, sc = "size-4 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 motion-reduce:transition-none", cc = /* @__PURE__ */ f({
|
|
5030
5161
|
__name: "Switch",
|
|
5031
5162
|
props: /*@__PURE__*/ _({
|
|
5032
5163
|
label: {},
|
|
@@ -5063,7 +5194,7 @@ var Cs = [
|
|
|
5063
5194
|
"disabled:cursor-not-allowed",
|
|
5064
5195
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
5065
5196
|
];
|
|
5066
|
-
return (r, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", t.class)) }, [c("div",
|
|
5197
|
+
return (r, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", t.class)) }, [c("div", oc, [d(P(Dn), {
|
|
5067
5198
|
id: a,
|
|
5068
5199
|
modelValue: n.value,
|
|
5069
5200
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -5073,7 +5204,7 @@ var Cs = [
|
|
|
5073
5204
|
"aria-describedby": m.value,
|
|
5074
5205
|
class: b(g)
|
|
5075
5206
|
}, {
|
|
5076
|
-
default: H(() => [d(P(On), { class: b(
|
|
5207
|
+
default: H(() => [d(P(On), { class: b(sc) })]),
|
|
5077
5208
|
_: 1
|
|
5078
5209
|
}, 8, [
|
|
5079
5210
|
"modelValue",
|
|
@@ -5097,13 +5228,13 @@ var Cs = [
|
|
|
5097
5228
|
text: p.value
|
|
5098
5229
|
}, null, 8, ["status", "text"])], 2));
|
|
5099
5230
|
}
|
|
5100
|
-
}),
|
|
5231
|
+
}), lc = [
|
|
5101
5232
|
"id",
|
|
5102
5233
|
"placeholder",
|
|
5103
5234
|
"disabled",
|
|
5104
5235
|
"aria-invalid",
|
|
5105
5236
|
"aria-describedby"
|
|
5106
|
-
],
|
|
5237
|
+
], uc = /* @__PURE__ */ f({
|
|
5107
5238
|
inheritAttrs: !1,
|
|
5108
5239
|
__name: "InputTextArea",
|
|
5109
5240
|
props: /*@__PURE__*/ _({
|
|
@@ -5153,7 +5284,7 @@ var Cs = [
|
|
|
5153
5284
|
"aria-invalid": a,
|
|
5154
5285
|
"aria-describedby": i,
|
|
5155
5286
|
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-ink/55 disabled:cursor-not-allowed pointer-coarse:text-base"
|
|
5156
|
-
}), null, 16,
|
|
5287
|
+
}), null, 16, lc), [[ee, o.value]])]),
|
|
5157
5288
|
_: 1
|
|
5158
5289
|
}, 8, [
|
|
5159
5290
|
"label",
|
|
@@ -5167,7 +5298,7 @@ var Cs = [
|
|
|
5167
5298
|
"class"
|
|
5168
5299
|
]));
|
|
5169
5300
|
}
|
|
5170
|
-
}),
|
|
5301
|
+
}), dc = ["data-disabled"], fc = { class: "flex items-center gap-1" }, pc = ["hidden"], mc = ["aria-describedby", "aria-invalid"], hc = /* @__PURE__ */ f({
|
|
5171
5302
|
__name: "CheckboxGroup",
|
|
5172
5303
|
props: /*@__PURE__*/ _({
|
|
5173
5304
|
label: {},
|
|
@@ -5198,7 +5329,7 @@ var Cs = [
|
|
|
5198
5329
|
"data-disabled": e.disabled || void 0,
|
|
5199
5330
|
class: b(P(X)("flex flex-col gap-1.5 text-ink", t.class))
|
|
5200
5331
|
}, [
|
|
5201
|
-
c("div", { class: b(P(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
5332
|
+
c("div", { class: b(P(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", fc, [c("span", {
|
|
5202
5333
|
id: f,
|
|
5203
5334
|
class: "text-sm"
|
|
5204
5335
|
}, N(e.label), 1), e.helper && e.helperPlacement === "icon" ? (T(), a(Kr, {
|
|
@@ -5210,14 +5341,14 @@ var Cs = [
|
|
|
5210
5341
|
id: p,
|
|
5211
5342
|
hidden: e.helperPlacement === "icon",
|
|
5212
5343
|
class: "text-xs text-ink/65"
|
|
5213
|
-
}, N(e.helper), 9,
|
|
5344
|
+
}, N(e.helper), 9, pc)) : o("", !0)], 2),
|
|
5214
5345
|
c("div", {
|
|
5215
5346
|
role: "group",
|
|
5216
5347
|
"aria-labelledby": f,
|
|
5217
5348
|
"aria-describedby": h.value,
|
|
5218
5349
|
"aria-invalid": e.errorText ? !0 : void 0,
|
|
5219
5350
|
class: "flex flex-col gap-3"
|
|
5220
|
-
}, [(T(!0), s(n, null, k(e.options, (t) => (T(), a(
|
|
5351
|
+
}, [(T(!0), s(n, null, k(e.options, (t) => (T(), a(Xs, {
|
|
5221
5352
|
key: String(t.value),
|
|
5222
5353
|
"model-value": l.value.includes(t.value),
|
|
5223
5354
|
label: t.label,
|
|
@@ -5230,15 +5361,15 @@ var Cs = [
|
|
|
5230
5361
|
"description",
|
|
5231
5362
|
"disabled",
|
|
5232
5363
|
"onUpdate:modelValue"
|
|
5233
|
-
]))), 128))], 8,
|
|
5364
|
+
]))), 128))], 8, mc),
|
|
5234
5365
|
d(Yr, {
|
|
5235
5366
|
id: m,
|
|
5236
5367
|
status: e.errorText ? "error" : void 0,
|
|
5237
5368
|
text: e.errorText
|
|
5238
5369
|
}, null, 8, ["status", "text"])
|
|
5239
|
-
], 10,
|
|
5370
|
+
], 10, dc));
|
|
5240
5371
|
}
|
|
5241
|
-
}),
|
|
5372
|
+
}), gc = ["data-disabled"], _c = { class: "flex items-center gap-1" }, vc = ["hidden"], yc = { class: "flex min-w-0 flex-1 flex-col gap-0.5" }, bc = { class: "text-sm font-bold" }, xc = ["id"], Sc = /* @__PURE__ */ f({
|
|
5242
5373
|
__name: "CardSelect",
|
|
5243
5374
|
props: /*@__PURE__*/ _({
|
|
5244
5375
|
label: {},
|
|
@@ -5284,7 +5415,7 @@ var Cs = [
|
|
|
5284
5415
|
"data-disabled": e.disabled || void 0,
|
|
5285
5416
|
class: b(P(X)("flex flex-col gap-2 text-ink", e.disabled && "opacity-40", r.class))
|
|
5286
5417
|
}, [
|
|
5287
|
-
c("div", { class: b(P(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
5418
|
+
c("div", { class: b(P(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", _c, [c("span", {
|
|
5288
5419
|
id: f,
|
|
5289
5420
|
class: "text-sm"
|
|
5290
5421
|
}, N(e.label), 1), e.helper && e.helperPlacement === "icon" ? (T(), a(Kr, {
|
|
@@ -5296,7 +5427,7 @@ var Cs = [
|
|
|
5296
5427
|
id: p,
|
|
5297
5428
|
hidden: e.helperPlacement === "icon",
|
|
5298
5429
|
class: "text-xs text-ink/65"
|
|
5299
|
-
}, N(e.helper), 9,
|
|
5430
|
+
}, N(e.helper), 9, vc)) : o("", !0)], 2),
|
|
5300
5431
|
d(P(mn), {
|
|
5301
5432
|
modelValue: l.value,
|
|
5302
5433
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -5322,11 +5453,11 @@ var Cs = [
|
|
|
5322
5453
|
"aria-hidden": "true",
|
|
5323
5454
|
class: "mt-0.5 size-4 shrink-0 text-ink/65 group-data-[state=checked]:text-primary-fg"
|
|
5324
5455
|
})) : o("", !0),
|
|
5325
|
-
c("span",
|
|
5456
|
+
c("span", yc, [c("span", bc, N(t.title), 1), t.description ? (T(), s("span", {
|
|
5326
5457
|
key: 0,
|
|
5327
5458
|
id: `${P(u)}-${n}-description`,
|
|
5328
5459
|
class: "text-xs text-ink/65"
|
|
5329
|
-
}, N(t.description), 9,
|
|
5460
|
+
}, N(t.description), 9, xc)) : o("", !0)]),
|
|
5330
5461
|
v[1] ||= c("span", {
|
|
5331
5462
|
"aria-hidden": "true",
|
|
5332
5463
|
class: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border border-ink/45 bg-surface group-data-[state=checked]:border-primary"
|
|
@@ -5355,13 +5486,13 @@ var Cs = [
|
|
|
5355
5486
|
status: e.errorText ? "error" : void 0,
|
|
5356
5487
|
text: e.errorText
|
|
5357
5488
|
}, null, 8, ["status", "text"])
|
|
5358
|
-
], 10,
|
|
5489
|
+
], 10, gc));
|
|
5359
5490
|
}
|
|
5360
|
-
}),
|
|
5491
|
+
}), Cc = ["data-disabled"], wc = { class: "text-sm text-ink/65" }, Tc = [
|
|
5361
5492
|
"accept",
|
|
5362
5493
|
"multiple",
|
|
5363
5494
|
"disabled"
|
|
5364
|
-
],
|
|
5495
|
+
], Ec = /* @__PURE__ */ f({
|
|
5365
5496
|
__name: "FileUpload",
|
|
5366
5497
|
props: {
|
|
5367
5498
|
label: {},
|
|
@@ -5429,7 +5560,7 @@ var Cs = [
|
|
|
5429
5560
|
e.drop ? (T(), s(n, { key: 0 }, [d(P(Ee), {
|
|
5430
5561
|
class: "size-8 text-primary-fg",
|
|
5431
5562
|
"aria-hidden": "true"
|
|
5432
|
-
}), A(t.$slots, "default", {}, () => [c("p",
|
|
5563
|
+
}), A(t.$slots, "default", {}, () => [c("p", wc, N(m.value), 1)])], 64)) : o("", !0),
|
|
5433
5564
|
d(Z, {
|
|
5434
5565
|
variant: e.variant,
|
|
5435
5566
|
size: e.size,
|
|
@@ -5459,10 +5590,10 @@ var Cs = [
|
|
|
5459
5590
|
multiple: e.multiple,
|
|
5460
5591
|
disabled: e.disabled,
|
|
5461
5592
|
onChange: v
|
|
5462
|
-
}, null, 40,
|
|
5463
|
-
], 42,
|
|
5593
|
+
}, null, 40, Tc)
|
|
5594
|
+
], 42, Cc));
|
|
5464
5595
|
}
|
|
5465
|
-
}),
|
|
5596
|
+
}), Dc = /* @__PURE__ */ f({
|
|
5466
5597
|
__name: "EmptyState",
|
|
5467
5598
|
props: {
|
|
5468
5599
|
title: {},
|
|
@@ -5518,15 +5649,15 @@ var Cs = [
|
|
|
5518
5649
|
}, [A(r.$slots, "actions")], 2)) : o("", !0)
|
|
5519
5650
|
], 2));
|
|
5520
5651
|
}
|
|
5521
|
-
}),
|
|
5652
|
+
}), Oc = new Intl.Collator("en-GB", {
|
|
5522
5653
|
numeric: !0,
|
|
5523
5654
|
sensitivity: "base"
|
|
5524
5655
|
});
|
|
5525
|
-
function
|
|
5656
|
+
function kc(e, t) {
|
|
5526
5657
|
let n = e == null || e === "", r = t == null || t === "";
|
|
5527
|
-
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) :
|
|
5658
|
+
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) : Oc.compare(String(e), String(t));
|
|
5528
5659
|
}
|
|
5529
|
-
function
|
|
5660
|
+
function Ac(e, t, n) {
|
|
5530
5661
|
let r = n && t.find((e) => e.key === n.key);
|
|
5531
5662
|
if (!n || !r) return [...e];
|
|
5532
5663
|
let i = r.sortValue ?? ((e) => e[r.key]), a = n.direction === "asc" ? 1 : -1;
|
|
@@ -5536,10 +5667,10 @@ function Cc(e, t, n) {
|
|
|
5536
5667
|
value: i(e)
|
|
5537
5668
|
})).sort((e, t) => {
|
|
5538
5669
|
let n = e.value === null || e.value === void 0 || e.value === "", r = t.value === null || t.value === void 0 || t.value === "";
|
|
5539
|
-
return (n || r ?
|
|
5670
|
+
return (n || r ? kc(e.value, t.value) : a * kc(e.value, t.value)) || e.index - t.index;
|
|
5540
5671
|
}).map((e) => e.row);
|
|
5541
5672
|
}
|
|
5542
|
-
function
|
|
5673
|
+
function jc(e, t) {
|
|
5543
5674
|
return e?.key === t ? e.direction === "asc" ? {
|
|
5544
5675
|
key: t,
|
|
5545
5676
|
direction: "desc"
|
|
@@ -5549,24 +5680,24 @@ function wc(e, t) {
|
|
|
5549
5680
|
};
|
|
5550
5681
|
}
|
|
5551
5682
|
// src/components/Table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
5552
|
-
var
|
|
5683
|
+
var Mc = [
|
|
5553
5684
|
"tabindex",
|
|
5554
5685
|
"role",
|
|
5555
5686
|
"aria-labelledby",
|
|
5556
5687
|
"aria-label"
|
|
5557
|
-
],
|
|
5688
|
+
], Nc = ["aria-busy"], Pc = {
|
|
5558
5689
|
key: 1,
|
|
5559
5690
|
class: "sr-only"
|
|
5560
|
-
},
|
|
5691
|
+
}, Fc = ["aria-sort"], Ic = {
|
|
5561
5692
|
key: 0,
|
|
5562
5693
|
class: "sr-only"
|
|
5563
|
-
},
|
|
5694
|
+
}, Lc = ["onClick"], Rc = { key: 0 }, zc = ["colspan"], Bc = {
|
|
5564
5695
|
key: 0,
|
|
5565
5696
|
class: "inline-flex items-center gap-2"
|
|
5566
|
-
},
|
|
5697
|
+
}, Vc = ["onClick"], Hc = {
|
|
5567
5698
|
key: 1,
|
|
5568
5699
|
"aria-hidden": "true"
|
|
5569
|
-
},
|
|
5700
|
+
}, Uc = ["colspan"], Wc = "relative z-1 w-0 cursor-pointer", Gc = "absolute inset-0 outline-none", Kc = "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", qc = "outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Jc = /* @__PURE__ */ f({
|
|
5570
5701
|
__name: "Table",
|
|
5571
5702
|
props: /*@__PURE__*/ _({
|
|
5572
5703
|
columns: {},
|
|
@@ -5616,7 +5747,7 @@ var Tc = [
|
|
|
5616
5747
|
function S(e, t) {
|
|
5617
5748
|
e.target.closest("button, label, .sr-only") || t();
|
|
5618
5749
|
}
|
|
5619
|
-
let E = i(() => r.columns.length + +!!r.selectable), D = i(() => r.manualSort ? r.rows :
|
|
5750
|
+
let E = i(() => r.columns.length + +!!r.selectable), D = i(() => r.manualSort ? r.rows : Ac(r.rows, r.columns, l.value));
|
|
5620
5751
|
function M(e, t) {
|
|
5621
5752
|
return typeof r.rowKey == "function" ? r.rowKey(e, t) : r.rowKey ? e[r.rowKey] : t;
|
|
5622
5753
|
}
|
|
@@ -5653,7 +5784,7 @@ var Tc = [
|
|
|
5653
5784
|
}), C(() => K?.disconnect()), (i, f) => (T(), s("div", {
|
|
5654
5785
|
ref_key: "scroller",
|
|
5655
5786
|
ref: W,
|
|
5656
|
-
class: b(P(X)("relative overflow-auto", G.value &&
|
|
5787
|
+
class: b(P(X)("relative overflow-auto", G.value && qc, r.class)),
|
|
5657
5788
|
tabindex: G.value ? 0 : void 0,
|
|
5658
5789
|
role: G.value ? "region" : void 0,
|
|
5659
5790
|
"aria-labelledby": G.value && (e.caption || i.$slots.caption) ? p : void 0,
|
|
@@ -5670,24 +5801,24 @@ var Tc = [
|
|
|
5670
5801
|
c("thead", { class: b(P(X)(e.stickyHeader && "sticky top-0 z-10 bg-surface", e.ui?.header)) }, [c("tr", null, [e.selectable ? (T(), s("th", {
|
|
5671
5802
|
key: 0,
|
|
5672
5803
|
scope: "col",
|
|
5673
|
-
class: b(P(X)("border-b border-ink/10", V.value, h.value.length &&
|
|
5804
|
+
class: b(P(X)("border-b border-ink/10", V.value, h.value.length && Wc)),
|
|
5674
5805
|
onClick: f[1] ||= (e) => S(e, () => h.value.length && x(y.value !== !0))
|
|
5675
|
-
}, [h.value.length ? (T(), a(
|
|
5806
|
+
}, [h.value.length ? (T(), a(Xs, {
|
|
5676
5807
|
key: 0,
|
|
5677
5808
|
"model-value": y.value,
|
|
5678
5809
|
label: P(t)("ui.table.selectAll"),
|
|
5679
5810
|
"hide-label": "",
|
|
5680
5811
|
"onUpdate:modelValue": f[0] ||= (e) => x(e === !0)
|
|
5681
|
-
}, null, 8, ["model-value", "label"])) : (T(), s("span",
|
|
5812
|
+
}, null, 8, ["model-value", "label"])) : (T(), s("span", Pc, N(P(t)("ui.table.select")), 1))], 2)) : o("", !0), (T(!0), s(n, null, k(e.columns, (e) => (T(), s("th", {
|
|
5682
5813
|
key: e.key,
|
|
5683
5814
|
scope: "col",
|
|
5684
5815
|
"aria-sort": F(e),
|
|
5685
5816
|
class: b(P(X)("border-b border-ink/10 font-bold text-ink/65", V.value, U(e)))
|
|
5686
|
-
}, [A(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (T(), s("span",
|
|
5817
|
+
}, [A(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (T(), s("span", Ic, N(e.label), 1)) : e.sortable ? (T(), s("button", {
|
|
5687
5818
|
key: 1,
|
|
5688
5819
|
type: "button",
|
|
5689
|
-
class: b(P(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-ink", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-ink",
|
|
5690
|
-
onClick: (t) => l.value = P(
|
|
5820
|
+
class: b(P(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-ink", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-ink", Kc)),
|
|
5821
|
+
onClick: (t) => l.value = P(jc)(l.value, e.key)
|
|
5691
5822
|
}, [u(N(e.label) + " ", 1), l.value?.key === e.key && l.value.direction === "asc" ? (T(), a(P(oe), {
|
|
5692
5823
|
key: 0,
|
|
5693
5824
|
class: "size-4 shrink-0",
|
|
@@ -5700,24 +5831,24 @@ var Tc = [
|
|
|
5700
5831
|
key: 2,
|
|
5701
5832
|
class: "size-4 shrink-0 text-ink/40",
|
|
5702
5833
|
"aria-hidden": "true"
|
|
5703
|
-
}))], 10,
|
|
5834
|
+
}))], 10, Lc)) : (T(), s(n, { key: 2 }, [u(N(e.label), 1)], 64))])], 10, Fc))), 128))])], 2),
|
|
5704
5835
|
c("tbody", { class: b(P(X)(e.loading && D.value.length && "opacity-50 transition-opacity")) }, [
|
|
5705
|
-
D.value.length ? o("", !0) : (T(), s("tr",
|
|
5836
|
+
D.value.length ? o("", !0) : (T(), s("tr", Rc, [c("td", {
|
|
5706
5837
|
colspan: E.value,
|
|
5707
5838
|
class: "px-4 py-8 text-center text-ink/65"
|
|
5708
|
-
}, [e.loading ? (T(), s("span",
|
|
5839
|
+
}, [e.loading ? (T(), s("span", Bc, [d(Sr, { size: "sm" }), f[2] ||= u(" Loading… ", -1)])) : A(i.$slots, "empty", {}, () => [d(Dc, {
|
|
5709
5840
|
size: "sm",
|
|
5710
5841
|
description: e.emptyText ?? P(t)("ui.table.empty"),
|
|
5711
5842
|
class: "p-0"
|
|
5712
|
-
}, null, 8, ["description"])], void 0, 1)], 8,
|
|
5843
|
+
}, null, 8, ["description"])], void 0, 1)], 8, zc)])),
|
|
5713
5844
|
(T(!0), s(n, null, k(D.value, (r, c) => (T(), s("tr", {
|
|
5714
5845
|
key: M(r, c),
|
|
5715
5846
|
class: b(P(X)("group/row", z(r, c) && B, e.ui?.row))
|
|
5716
5847
|
}, [e.selectable ? (T(), s("td", {
|
|
5717
5848
|
key: 0,
|
|
5718
|
-
class: b(P(X)("border-b border-ink/10 align-middle", !e.inset && "group-last/row:border-b-0", V.value, m(r) &&
|
|
5849
|
+
class: b(P(X)("border-b border-ink/10 align-middle", !e.inset && "group-last/row:border-b-0", V.value, m(r) && Wc)),
|
|
5719
5850
|
onClick: (e) => m(r) && S(e, () => _(r, c, !g(r, c)))
|
|
5720
|
-
}, [m(r) ? (T(), a(
|
|
5851
|
+
}, [m(r) ? (T(), a(Xs, {
|
|
5721
5852
|
key: 0,
|
|
5722
5853
|
"model-value": g(r, c),
|
|
5723
5854
|
label: e.rowLabel ? e.rowLabel(r, c) : P(t)("ui.table.selectRow", { n: c + 1 }),
|
|
@@ -5727,7 +5858,7 @@ var Tc = [
|
|
|
5727
5858
|
"model-value",
|
|
5728
5859
|
"label",
|
|
5729
5860
|
"onUpdate:modelValue"
|
|
5730
|
-
])) : o("", !0)], 10,
|
|
5861
|
+
])) : o("", !0)], 10, Vc)) : o("", !0), (T(!0), s(n, null, k(e.columns, (t) => (T(), a(j(t.rowHeader ? "th" : "td"), {
|
|
5731
5862
|
key: t.key,
|
|
5732
5863
|
scope: t.rowHeader ? "row" : void 0,
|
|
5733
5864
|
class: b(P(X)("border-b border-ink/10 align-middle", !e.inset && "group-last/row:border-b-0", t.rowHeader ? "font-bold" : "font-normal", t.align === "end" && "tabular-nums", V.value, z(r, c) && "relative", U(t)))
|
|
@@ -5739,7 +5870,7 @@ var Tc = [
|
|
|
5739
5870
|
"data-row-overlay": "",
|
|
5740
5871
|
tabindex: "-1",
|
|
5741
5872
|
"aria-hidden": "true",
|
|
5742
|
-
class:
|
|
5873
|
+
class: Gc
|
|
5743
5874
|
}), null, 16)) : o("", !0), t.key === R.value && z(r, c) ? (T(), a(j(e.linkComponent), v({
|
|
5744
5875
|
key: 1,
|
|
5745
5876
|
ref_for: !0
|
|
@@ -5760,33 +5891,33 @@ var Tc = [
|
|
|
5760
5891
|
}, () => [u(N(r[t.key] ?? ""), 1)], void 0, 2)]),
|
|
5761
5892
|
_: 2
|
|
5762
5893
|
}, 1032, ["scope", "class"]))), 128))], 2))), 128)),
|
|
5763
|
-
e.inset && D.value.length && !i.$slots.footer ? (T(), s("tr",
|
|
5894
|
+
e.inset && D.value.length && !i.$slots.footer ? (T(), s("tr", Hc, [c("td", {
|
|
5764
5895
|
colspan: E.value,
|
|
5765
5896
|
class: "h-2 p-0 sm:h-4"
|
|
5766
|
-
}, null, 8,
|
|
5897
|
+
}, null, 8, Uc)])) : o("", !0)
|
|
5767
5898
|
], 2),
|
|
5768
5899
|
i.$slots.footer ? (T(), s("tfoot", {
|
|
5769
5900
|
key: 1,
|
|
5770
5901
|
class: b(P(X)("font-bold *:*:border-t *:*:border-ink/10", e.size === "sm" ? "*:*:px-4 *:*:py-2" : "*:*:px-4 *:*:py-3", e.inset && "*:*:sm:first:pl-6 *:*:sm:last:pr-6"))
|
|
5771
5902
|
}, [A(i.$slots, "footer")], 2)) : o("", !0)
|
|
5772
|
-
], 10,
|
|
5903
|
+
], 10, Nc)], 10, Mc));
|
|
5773
5904
|
}
|
|
5774
|
-
}),
|
|
5905
|
+
}), Yc = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" }, Xc = { class: "text-2xl font-bold tabular-nums" }, Zc = {
|
|
5775
5906
|
key: 1,
|
|
5776
5907
|
class: "sr-only"
|
|
5777
|
-
},
|
|
5908
|
+
}, Qc = {
|
|
5778
5909
|
key: 2,
|
|
5779
5910
|
class: "font-bold tabular-nums"
|
|
5780
|
-
},
|
|
5911
|
+
}, $c = {
|
|
5781
5912
|
key: 3,
|
|
5782
5913
|
class: "text-ink/65"
|
|
5783
|
-
},
|
|
5914
|
+
}, el = {
|
|
5784
5915
|
key: 1,
|
|
5785
5916
|
class: "text-sm text-ink/65"
|
|
5786
|
-
},
|
|
5917
|
+
}, tl = {
|
|
5787
5918
|
key: 2,
|
|
5788
5919
|
class: "mt-2 text-sm"
|
|
5789
|
-
},
|
|
5920
|
+
}, nl = /* @__PURE__ */ f({
|
|
5790
5921
|
__name: "StatTile",
|
|
5791
5922
|
props: {
|
|
5792
5923
|
label: {},
|
|
@@ -5826,7 +5957,7 @@ var Tc = [
|
|
|
5826
5957
|
href: r.value ? e.href : void 0,
|
|
5827
5958
|
class: b(r.value && "group block h-full cursor-pointer rounded-lg outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus")
|
|
5828
5959
|
}, {
|
|
5829
|
-
default: H(() => [d(
|
|
5960
|
+
default: H(() => [d(jo, {
|
|
5830
5961
|
padding: "sm",
|
|
5831
5962
|
class: b(P(X)(r.value && "relative h-full transition-[border-color,box-shadow,background-color] duration-150 motion-reduce:transition-none group-hover:border-ink/20 group-hover:shadow-sm group-active:bg-surface-hover", n.class)),
|
|
5832
5963
|
ui: { body: "gap-1" }
|
|
@@ -5842,7 +5973,7 @@ var Tc = [
|
|
|
5842
5973
|
class: "size-4 shrink-0",
|
|
5843
5974
|
"aria-hidden": "true"
|
|
5844
5975
|
})) : o("", !0), u(" " + N(e.label), 1)], 2),
|
|
5845
|
-
c("div",
|
|
5976
|
+
c("div", Yc, [c("p", Xc, [A(t.$slots, "value", {}, () => [u(N(e.value ?? "—"), 1)])]), e.change || e.trend ? (T(), s("p", {
|
|
5846
5977
|
key: 0,
|
|
5847
5978
|
class: b(P(X)("inline-flex items-center gap-0.5 text-sm", f[l.value]))
|
|
5848
5979
|
}, [
|
|
@@ -5851,12 +5982,12 @@ var Tc = [
|
|
|
5851
5982
|
class: "size-4 shrink-0",
|
|
5852
5983
|
"aria-hidden": "true"
|
|
5853
5984
|
})) : o("", !0),
|
|
5854
|
-
e.trend ? (T(), s("span",
|
|
5855
|
-
e.change ? (T(), s("span",
|
|
5856
|
-
e.changeLabel ? (T(), s("span",
|
|
5985
|
+
e.trend ? (T(), s("span", Zc, N(m.value[e.trend]), 1)) : o("", !0),
|
|
5986
|
+
e.change ? (T(), s("span", Qc, N(e.change), 1)) : o("", !0),
|
|
5987
|
+
e.changeLabel ? (T(), s("span", $c, "\xA0" + N(e.changeLabel), 1)) : o("", !0)
|
|
5857
5988
|
], 2)) : o("", !0)]),
|
|
5858
|
-
e.description || t.$slots.description ? (T(), s("p",
|
|
5859
|
-
t.$slots.footer && !r.value ? (T(), s("div",
|
|
5989
|
+
e.description || t.$slots.description ? (T(), s("p", el, [A(t.$slots, "description", {}, () => [u(N(e.description), 1)])])) : o("", !0),
|
|
5990
|
+
t.$slots.footer && !r.value ? (T(), s("div", tl, [A(t.$slots, "footer")])) : o("", !0)
|
|
5860
5991
|
]),
|
|
5861
5992
|
_: 3
|
|
5862
5993
|
}, 8, ["class"])]),
|
|
@@ -5867,19 +5998,19 @@ var Tc = [
|
|
|
5867
5998
|
"class"
|
|
5868
5999
|
]));
|
|
5869
6000
|
}
|
|
5870
|
-
}),
|
|
6001
|
+
}), rl = { class: "col-span-2 text-ink/65 @sm:col-span-1" }, il = { class: "sr-only" }, al = {
|
|
5871
6002
|
key: 0,
|
|
5872
6003
|
class: "mt-0.5 block text-ink/65"
|
|
5873
|
-
},
|
|
6004
|
+
}, ol = {
|
|
5874
6005
|
key: 0,
|
|
5875
6006
|
class: "justify-self-end"
|
|
5876
|
-
},
|
|
6007
|
+
}, sl = { class: "text-ink/65" }, cl = { class: "sr-only" }, ll = {
|
|
5877
6008
|
key: 0,
|
|
5878
6009
|
class: "mt-0.5 block font-normal text-ink/65"
|
|
5879
|
-
},
|
|
6010
|
+
}, ul = {
|
|
5880
6011
|
key: 1,
|
|
5881
6012
|
class: "mt-1 block font-normal"
|
|
5882
|
-
},
|
|
6013
|
+
}, dl = /* @__PURE__ */ f({
|
|
5883
6014
|
__name: "SummaryList",
|
|
5884
6015
|
props: {
|
|
5885
6016
|
items: {},
|
|
@@ -5904,37 +6035,37 @@ var Tc = [
|
|
|
5904
6035
|
key: r.label,
|
|
5905
6036
|
class: b(P(X)("grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-ink/10 py-3 first:pt-0 last:border-b-0 last:pb-0", a[e.labelWidth]))
|
|
5906
6037
|
}, [
|
|
5907
|
-
c("dt",
|
|
6038
|
+
c("dt", rl, N(r.label), 1),
|
|
5908
6039
|
c("dd", { class: b(P(X)("min-w-0 break-words", r.emphasis && "font-bold", !l.$slots.action && "col-span-2")) }, [A(l.$slots, "value", {
|
|
5909
6040
|
item: r,
|
|
5910
6041
|
index: f
|
|
5911
6042
|
}, () => [i(r.value) ? (T(), s(n, { key: 1 }, [d[0] ||= c("span", {
|
|
5912
6043
|
class: "text-ink/40",
|
|
5913
6044
|
"aria-hidden": "true"
|
|
5914
|
-
}, "—", -1), c("span",
|
|
5915
|
-
l.$slots.action ? (T(), s("dd",
|
|
6045
|
+
}, "—", -1), c("span", il, N(e.emptyLabel ?? P(t)("ui.summaryList.notSet")), 1)], 64)) : (T(), s(n, { key: 0 }, [u(N(r.value), 1)], 64))]), r.description ? (T(), s("span", al, N(r.description), 1)) : o("", !0)], 2),
|
|
6046
|
+
l.$slots.action ? (T(), s("dd", ol, [A(l.$slots, "action", {
|
|
5916
6047
|
item: r,
|
|
5917
6048
|
index: f
|
|
5918
6049
|
})])) : o("", !0)
|
|
5919
6050
|
], 2))), 128)) : (T(!0), s(n, { key: 1 }, k(e.items, (r, a) => (T(), s("div", {
|
|
5920
6051
|
key: r.label,
|
|
5921
6052
|
class: b(e.layout === "compact" ? "col-span-2 grid grid-cols-subgrid items-baseline" : "flex min-w-0 flex-col gap-1")
|
|
5922
|
-
}, [c("dt",
|
|
6053
|
+
}, [c("dt", sl, N(r.label), 1), c("dd", { class: b(P(X)("min-w-0 break-words", e.layout === "compact" && "text-right font-bold tabular-nums", r.emphasis && "font-bold")) }, [
|
|
5923
6054
|
A(l.$slots, "value", {
|
|
5924
6055
|
item: r,
|
|
5925
6056
|
index: a
|
|
5926
6057
|
}, () => [i(r.value) ? (T(), s(n, { key: 1 }, [d[1] ||= c("span", {
|
|
5927
6058
|
class: "text-ink/40",
|
|
5928
6059
|
"aria-hidden": "true"
|
|
5929
|
-
}, "—", -1), c("span",
|
|
5930
|
-
r.description ? (T(), s("span",
|
|
5931
|
-
l.$slots.action ? (T(), s("span",
|
|
6060
|
+
}, "—", -1), c("span", cl, N(e.emptyLabel ?? P(t)("ui.summaryList.notSet")), 1)], 64)) : (T(), s(n, { key: 0 }, [u(N(r.value), 1)], 64))]),
|
|
6061
|
+
r.description ? (T(), s("span", ll, N(r.description), 1)) : o("", !0),
|
|
6062
|
+
l.$slots.action ? (T(), s("span", ul, [A(l.$slots, "action", {
|
|
5932
6063
|
item: r,
|
|
5933
6064
|
index: a
|
|
5934
6065
|
})])) : o("", !0)
|
|
5935
6066
|
], 2)], 2))), 128))], 2)], 2));
|
|
5936
6067
|
}
|
|
5937
|
-
}),
|
|
6068
|
+
}), fl = { class: "flex h-5 shrink-0 items-center" }, pl = { class: "sr-only" }, ml = /* @__PURE__ */ f({
|
|
5938
6069
|
__name: "Checklist",
|
|
5939
6070
|
props: {
|
|
5940
6071
|
items: {},
|
|
@@ -5952,7 +6083,7 @@ var Tc = [
|
|
|
5952
6083
|
return (r, i) => (T(), s("ul", { class: b(P(X)("flex flex-col gap-2 text-sm", t.class)) }, [(T(!0), s(n, null, k(e.items, (t) => (T(), s("li", {
|
|
5953
6084
|
key: t.label,
|
|
5954
6085
|
class: "flex items-start gap-2"
|
|
5955
|
-
}, [c("span",
|
|
6086
|
+
}, [c("span", fl, [t.done ? (T(), a(P(be), {
|
|
5956
6087
|
key: 0,
|
|
5957
6088
|
class: "size-4 text-green-fg",
|
|
5958
6089
|
"aria-hidden": "true"
|
|
@@ -5960,11 +6091,11 @@ var Tc = [
|
|
|
5960
6091
|
key: 1,
|
|
5961
6092
|
class: b(P(X)("size-4", e.invalid ? "text-red-fg" : "text-ink/40")),
|
|
5962
6093
|
"aria-hidden": "true"
|
|
5963
|
-
}, null, 8, ["class"]))]), c("span", { class: b(t.done ? "text-ink" : "text-ink/65") }, [u(N(t.label), 1), c("span",
|
|
6094
|
+
}, null, 8, ["class"]))]), c("span", { class: b(t.done ? "text-ink" : "text-ink/65") }, [u(N(t.label), 1), c("span", pl, N(t.done ? " (done)" : " (to do)"), 1)], 2)]))), 128))], 2));
|
|
5964
6095
|
}
|
|
5965
6096
|
});
|
|
5966
6097
|
// src/lib/dates.ts
|
|
5967
|
-
function
|
|
6098
|
+
function hl(e) {
|
|
5968
6099
|
if (e instanceof Date) return e;
|
|
5969
6100
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
5970
6101
|
let [t, n, r] = e.split("-").map(Number);
|
|
@@ -5972,59 +6103,59 @@ function cl(e) {
|
|
|
5972
6103
|
}
|
|
5973
6104
|
return new Date(e);
|
|
5974
6105
|
}
|
|
5975
|
-
var
|
|
6106
|
+
var gl = [
|
|
5976
6107
|
["year", 31536e3],
|
|
5977
6108
|
["month", 2592e3],
|
|
5978
6109
|
["week", 604800],
|
|
5979
6110
|
["day", 86400],
|
|
5980
6111
|
["hour", 3600],
|
|
5981
6112
|
["minute", 60]
|
|
5982
|
-
],
|
|
5983
|
-
function
|
|
5984
|
-
let n = Math.round((
|
|
6113
|
+
], _l = new Intl.RelativeTimeFormat("en-GB", { numeric: "auto" });
|
|
6114
|
+
function vl(e, t = /* @__PURE__ */ new Date()) {
|
|
6115
|
+
let n = Math.round((hl(e).getTime() - t.getTime()) / 1e3);
|
|
5985
6116
|
if (Math.abs(n) < 60) return "Just now";
|
|
5986
|
-
for (let [e, t] of
|
|
5987
|
-
let r =
|
|
6117
|
+
for (let [e, t] of gl) if (Math.abs(n) >= t) {
|
|
6118
|
+
let r = _l.format(Math.trunc(n / t), e);
|
|
5988
6119
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
5989
6120
|
}
|
|
5990
6121
|
return "Just now";
|
|
5991
6122
|
}
|
|
5992
|
-
function
|
|
5993
|
-
let t =
|
|
6123
|
+
function yl(e) {
|
|
6124
|
+
let t = hl(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
|
|
5994
6125
|
hour: "2-digit",
|
|
5995
6126
|
minute: "2-digit"
|
|
5996
6127
|
});
|
|
5997
|
-
return `${n} ${
|
|
6128
|
+
return `${n} ${bl(t)} at ${r}`;
|
|
5998
6129
|
}
|
|
5999
|
-
function
|
|
6000
|
-
return
|
|
6130
|
+
function bl(e) {
|
|
6131
|
+
return hl(e).toLocaleDateString("en-GB", {
|
|
6001
6132
|
day: "numeric",
|
|
6002
6133
|
month: "long",
|
|
6003
6134
|
year: "numeric"
|
|
6004
6135
|
});
|
|
6005
6136
|
}
|
|
6006
|
-
function
|
|
6007
|
-
let n =
|
|
6137
|
+
function xl(e, t = /* @__PURE__ */ new Date()) {
|
|
6138
|
+
let n = hl(e), r = t.getFullYear() - n.getFullYear(), i = t.getMonth() - n.getMonth();
|
|
6008
6139
|
return (i < 0 || i === 0 && t.getDate() < n.getDate()) && r--, r;
|
|
6009
6140
|
}
|
|
6010
|
-
function
|
|
6011
|
-
let n =
|
|
6141
|
+
function Sl(e, t = /* @__PURE__ */ new Date()) {
|
|
6142
|
+
let n = hl(e), r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), i = (e) => {
|
|
6012
6143
|
let t = new Date(e, n.getMonth(), n.getDate());
|
|
6013
6144
|
return t.getMonth() === n.getMonth() ? t : new Date(e, 2, 1);
|
|
6014
6145
|
}, a = i(r.getFullYear());
|
|
6015
6146
|
return a < r && (a = i(r.getFullYear() + 1)), Math.round((a.getTime() - r.getTime()) / 864e5);
|
|
6016
6147
|
}
|
|
6017
6148
|
// src/lib/useNow.ts
|
|
6018
|
-
var
|
|
6019
|
-
function
|
|
6149
|
+
var Cl = O(/* @__PURE__ */ new Date()), wl = 0, Tl;
|
|
6150
|
+
function El() {
|
|
6020
6151
|
return w(() => {
|
|
6021
|
-
|
|
6152
|
+
wl++ === 0 && (Cl.value = /* @__PURE__ */ new Date(), Tl = setInterval(() => Cl.value = /* @__PURE__ */ new Date(), 3e4));
|
|
6022
6153
|
}), C(() => {
|
|
6023
|
-
--
|
|
6024
|
-
}),
|
|
6154
|
+
--wl === 0 && clearInterval(Tl);
|
|
6155
|
+
}), Cl;
|
|
6025
6156
|
}
|
|
6026
6157
|
// src/components/RelativeTime/RelativeTime.vue?vue&type=script&setup=true&lang.ts
|
|
6027
|
-
var
|
|
6158
|
+
var Dl = ["datetime"], Ol = /* @__PURE__ */ f({
|
|
6028
6159
|
__name: "RelativeTime",
|
|
6029
6160
|
props: {
|
|
6030
6161
|
date: {},
|
|
@@ -6039,17 +6170,17 @@ var bl = ["datetime"], xl = /* @__PURE__ */ f({
|
|
|
6039
6170
|
] }
|
|
6040
6171
|
},
|
|
6041
6172
|
setup(e) {
|
|
6042
|
-
let t = e, n =
|
|
6043
|
-
return (e, n) => (T(), a(
|
|
6173
|
+
let t = e, n = El(), r = i(() => hl(t.date)), o = i(() => vl(r.value, t.now ?? n.value)), s = i(() => t.tooltip ? t.tooltip(r.value) : yl(r.value));
|
|
6174
|
+
return (e, n) => (T(), a(Ns, { text: s.value }, {
|
|
6044
6175
|
default: H(() => [c("time", {
|
|
6045
6176
|
datetime: r.value.toISOString(),
|
|
6046
6177
|
tabindex: "0",
|
|
6047
6178
|
class: b(P(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))
|
|
6048
|
-
}, N(o.value), 11,
|
|
6179
|
+
}, N(o.value), 11, Dl)]),
|
|
6049
6180
|
_: 1
|
|
6050
6181
|
}, 8, ["text"]));
|
|
6051
6182
|
}
|
|
6052
|
-
}),
|
|
6183
|
+
}), kl = ["data-birth-date"], Al = /* @__PURE__ */ f({
|
|
6053
6184
|
__name: "Age",
|
|
6054
6185
|
props: {
|
|
6055
6186
|
birthDate: {},
|
|
@@ -6064,29 +6195,29 @@ var bl = ["datetime"], xl = /* @__PURE__ */ f({
|
|
|
6064
6195
|
] }
|
|
6065
6196
|
},
|
|
6066
6197
|
setup(e) {
|
|
6067
|
-
let { t } = J(), r = e, l =
|
|
6068
|
-
let e =
|
|
6069
|
-
return `${t("ui.age.born", { date:
|
|
6198
|
+
let { t } = J(), r = e, l = El(), d = i(() => hl(r.birthDate)), f = i(() => r.now ?? l.value), p = i(() => xl(d.value, f.value)), m = i(() => {
|
|
6199
|
+
let e = Sl(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 })}` : "";
|
|
6200
|
+
return `${t("ui.age.born", { date: bl(d.value) })}${n}`;
|
|
6070
6201
|
}), h = i(() => {
|
|
6071
6202
|
let e = d.value;
|
|
6072
6203
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
6073
6204
|
});
|
|
6074
|
-
return (t, i) => (T(), a(
|
|
6205
|
+
return (t, i) => (T(), a(Ns, { text: m.value }, {
|
|
6075
6206
|
default: H(() => [c("span", {
|
|
6076
6207
|
tabindex: "0",
|
|
6077
6208
|
"data-birth-date": h.value,
|
|
6078
6209
|
class: b(P(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))
|
|
6079
|
-
}, [u(N(p.value), 1), e.suffix ? (T(), s(n, { key: 0 }, [u("\xA0" + N(e.suffix), 1)], 64)) : o("", !0)], 10,
|
|
6210
|
+
}, [u(N(p.value), 1), e.suffix ? (T(), s(n, { key: 0 }, [u("\xA0" + N(e.suffix), 1)], 64)) : o("", !0)], 10, kl)]),
|
|
6080
6211
|
_: 1
|
|
6081
6212
|
}, 8, ["text"]));
|
|
6082
6213
|
}
|
|
6083
6214
|
});
|
|
6084
6215
|
// src/lib/chart.ts
|
|
6085
|
-
function
|
|
6216
|
+
function jl(e, t) {
|
|
6086
6217
|
return `var(--color-chart-${e.color ?? Math.min(t + 1, 8)})`;
|
|
6087
6218
|
}
|
|
6088
|
-
var
|
|
6089
|
-
function
|
|
6219
|
+
var Ml = (e, t) => e.values[t] ?? 0;
|
|
6220
|
+
function Nl(e, t = 4) {
|
|
6090
6221
|
if (!(e > 0)) return {
|
|
6091
6222
|
max: 1,
|
|
6092
6223
|
ticks: [0, 1]
|
|
@@ -6105,17 +6236,17 @@ function El(e, t = 4) {
|
|
|
6105
6236
|
};
|
|
6106
6237
|
}
|
|
6107
6238
|
// src/components/BarChart/ChartData.vue?vue&type=script&setup=true&lang.ts
|
|
6108
|
-
var
|
|
6239
|
+
var Pl = { class: "flex flex-col gap-2" }, Fl = { class: "flex flex-wrap items-center gap-x-4 gap-y-1" }, Il = {
|
|
6109
6240
|
key: 0,
|
|
6110
6241
|
class: "flex flex-wrap gap-x-4 gap-y-1 text-xs text-ink/65",
|
|
6111
6242
|
"aria-hidden": "true"
|
|
6112
|
-
},
|
|
6243
|
+
}, Ll = ["aria-expanded"], Rl = { class: "w-full text-left text-xs tabular-nums" }, zl = { class: "sr-only" }, Bl = { class: "text-ink/65" }, Vl = { class: "border-b border-ink/10" }, Hl = {
|
|
6113
6244
|
scope: "col",
|
|
6114
6245
|
class: "py-1.5 pr-4 font-normal"
|
|
6115
|
-
},
|
|
6246
|
+
}, Ul = {
|
|
6116
6247
|
scope: "row",
|
|
6117
6248
|
class: "py-1.5 pr-4 font-normal"
|
|
6118
|
-
},
|
|
6249
|
+
}, Wl = /* @__PURE__ */ f({
|
|
6119
6250
|
__name: "ChartData",
|
|
6120
6251
|
props: {
|
|
6121
6252
|
label: {},
|
|
@@ -6126,20 +6257,20 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6126
6257
|
},
|
|
6127
6258
|
setup(e) {
|
|
6128
6259
|
let t = e, { t: r } = J(), i = O(!1);
|
|
6129
|
-
return (a, l) => (T(), s("div",
|
|
6260
|
+
return (a, l) => (T(), s("div", Pl, [c("div", Fl, [e.series.length > 1 ? (T(), s("ul", Il, [(T(!0), s(n, null, k(e.series, (e, t) => (T(), s("li", {
|
|
6130
6261
|
key: e.key,
|
|
6131
6262
|
class: "flex items-center gap-1.5"
|
|
6132
6263
|
}, [c("span", {
|
|
6133
6264
|
class: "size-2.5 rounded-sm",
|
|
6134
|
-
style: S({ background: P(
|
|
6265
|
+
style: S({ background: P(jl)(e, t) })
|
|
6135
6266
|
}, null, 4), u(N(e.label), 1)]))), 128))])) : o("", !0), c("button", {
|
|
6136
6267
|
type: "button",
|
|
6137
6268
|
class: "ml-auto cursor-pointer rounded-sm text-xs text-ink/65 underline underline-offset-2 hover:text-ink outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus",
|
|
6138
6269
|
"aria-expanded": i.value,
|
|
6139
6270
|
onClick: l[0] ||= (e) => i.value = !i.value
|
|
6140
|
-
}, N(i.value ? P(r)("ui.chart.hideTable") : P(r)("ui.chart.showTable")), 9,
|
|
6141
|
-
c("caption",
|
|
6142
|
-
c("thead",
|
|
6271
|
+
}, N(i.value ? P(r)("ui.chart.hideTable") : P(r)("ui.chart.showTable")), 9, Ll)]), c("div", { class: b(i.value ? "overflow-x-auto" : "sr-only") }, [c("table", Rl, [
|
|
6272
|
+
c("caption", zl, N(t.label), 1),
|
|
6273
|
+
c("thead", Bl, [c("tr", Vl, [c("th", Hl, N(e.categoryLabel), 1), (T(!0), s(n, null, k(e.series, (e) => (T(), s("th", {
|
|
6143
6274
|
key: e.key,
|
|
6144
6275
|
scope: "col",
|
|
6145
6276
|
class: "py-1.5 pr-4 text-right font-normal"
|
|
@@ -6147,19 +6278,19 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6147
6278
|
c("tbody", null, [(T(!0), s(n, null, k(e.data, (t) => (T(), s("tr", {
|
|
6148
6279
|
key: t.label,
|
|
6149
6280
|
class: "border-b border-ink/10 last:border-b-0"
|
|
6150
|
-
}, [c("th",
|
|
6281
|
+
}, [c("th", Ul, N(t.fullLabel ?? t.label), 1), (T(!0), s(n, null, k(e.series, (n) => (T(), s("td", {
|
|
6151
6282
|
key: n.key,
|
|
6152
6283
|
class: "py-1.5 pr-4 text-right"
|
|
6153
|
-
}, N(e.format(P(
|
|
6284
|
+
}, N(e.format(P(Ml)(t, n.key))), 1))), 128))]))), 128))])
|
|
6154
6285
|
])], 2)]));
|
|
6155
6286
|
}
|
|
6156
|
-
}),
|
|
6287
|
+
}), Gl = {
|
|
6157
6288
|
class: "flex gap-2",
|
|
6158
6289
|
"aria-hidden": "true"
|
|
6159
|
-
},
|
|
6290
|
+
}, Kl = { class: "flex min-w-0 flex-1 flex-col gap-1.5" }, ql = { class: "absolute inset-0 flex" }, Jl = {
|
|
6160
6291
|
key: 1,
|
|
6161
6292
|
class: "flex h-full w-full items-end justify-center gap-0.5"
|
|
6162
|
-
},
|
|
6293
|
+
}, Yl = { class: "pointer-events-none absolute bottom-full left-1/2 z-10 mb-1 hidden w-max max-w-56 -translate-x-1/2 flex-col gap-1 rounded-md border border-ink/10 bg-surface-elevated px-2.5 py-1.5 text-xs text-ink shadow-md group-hover/column:flex" }, Xl = { class: "font-bold" }, Zl = { class: "ml-auto pl-3 tabular-nums" }, Ql = { class: "flex text-xs text-ink/65" }, $l = /* @__PURE__ */ f({
|
|
6163
6294
|
__name: "BarChart",
|
|
6164
6295
|
props: {
|
|
6165
6296
|
label: {},
|
|
@@ -6181,29 +6312,29 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6181
6312
|
] }
|
|
6182
6313
|
},
|
|
6183
6314
|
setup(e) {
|
|
6184
|
-
let { t, locale: r } = J(), a = e, o = i(() => new Intl.NumberFormat(r.value)), l = (e) => a.format ? a.format(e) : o.value.format(e), f = i(() => Math.max(0, ...a.data.map((e) => a.stacked ? a.series.reduce((t, n) => t +
|
|
6315
|
+
let { t, locale: r } = J(), a = e, o = i(() => new Intl.NumberFormat(r.value)), l = (e) => a.format ? a.format(e) : o.value.format(e), f = i(() => Math.max(0, ...a.data.map((e) => a.stacked ? a.series.reduce((t, n) => t + Ml(e, n.key), 0) : Math.max(0, ...a.series.map((t) => Ml(e, t.key)))))), p = i(() => Nl(f.value)), m = (e) => e / p.value.max * 100, h = i(() => a.data.map((e) => ({
|
|
6185
6316
|
point: e,
|
|
6186
6317
|
parts: a.series.map((t, n) => ({
|
|
6187
6318
|
series: t,
|
|
6188
|
-
value:
|
|
6189
|
-
color:
|
|
6319
|
+
value: Ml(e, t.key),
|
|
6320
|
+
color: jl(t, n)
|
|
6190
6321
|
})).filter((e) => e.value > 0)
|
|
6191
6322
|
}))), g = (e) => e.reduce((e, t) => e + t.value, 0);
|
|
6192
|
-
return (r, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-3", a.class)) }, [c("div",
|
|
6323
|
+
return (r, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-3", a.class)) }, [c("div", Gl, [c("div", {
|
|
6193
6324
|
class: "relative w-8 shrink-0 text-right text-xs text-ink/65 tabular-nums",
|
|
6194
6325
|
style: S({ height: `${e.height}px` })
|
|
6195
6326
|
}, [(T(!0), s(n, null, k(p.value.ticks, (e) => (T(), s("span", {
|
|
6196
6327
|
key: e,
|
|
6197
6328
|
class: "absolute right-0 translate-y-1/2 leading-none",
|
|
6198
6329
|
style: S({ bottom: `${m(e)}%` })
|
|
6199
|
-
}, N(l(e)), 5))), 128))], 4), c("div",
|
|
6330
|
+
}, N(l(e)), 5))), 128))], 4), c("div", Kl, [c("div", {
|
|
6200
6331
|
class: "relative",
|
|
6201
6332
|
style: S({ height: `${e.height}px` })
|
|
6202
6333
|
}, [(T(!0), s(n, null, k(p.value.ticks, (e) => (T(), s("div", {
|
|
6203
6334
|
key: e,
|
|
6204
6335
|
class: "absolute inset-x-0 h-px bg-ink/10",
|
|
6205
6336
|
style: S({ bottom: `${m(e)}%` })
|
|
6206
|
-
}, null, 4))), 128)), c("div",
|
|
6337
|
+
}, null, 4))), 128)), c("div", ql, [(T(!0), s(n, null, k(h.value, (t, r) => (T(), s("div", {
|
|
6207
6338
|
key: r,
|
|
6208
6339
|
class: "group/column relative isolate hover:z-20 flex h-full min-w-0 flex-1 items-end justify-center px-0.5"
|
|
6209
6340
|
}, [
|
|
@@ -6219,7 +6350,7 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6219
6350
|
flexBasis: 0,
|
|
6220
6351
|
background: e.color
|
|
6221
6352
|
})
|
|
6222
|
-
}, null, 6))), 128))], 4)) : (T(), s("div",
|
|
6353
|
+
}, null, 6))), 128))], 4)) : (T(), s("div", Jl, [(T(!0), s(n, null, k(t.parts, (e) => (T(), s("div", {
|
|
6223
6354
|
key: e.series.key,
|
|
6224
6355
|
class: "w-full max-w-6 rounded-t-sm",
|
|
6225
6356
|
style: S({
|
|
@@ -6227,22 +6358,22 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6227
6358
|
background: e.color
|
|
6228
6359
|
})
|
|
6229
6360
|
}, null, 4))), 128))])),
|
|
6230
|
-
c("div",
|
|
6361
|
+
c("div", Yl, [c("span", Xl, N(t.point.fullLabel ?? t.point.label), 1), (T(!0), s(n, null, k(e.series, (e, n) => (T(), s("span", {
|
|
6231
6362
|
key: e.key,
|
|
6232
6363
|
class: "flex items-center gap-1.5"
|
|
6233
6364
|
}, [
|
|
6234
6365
|
c("span", {
|
|
6235
6366
|
class: "size-2 rounded-sm",
|
|
6236
|
-
style: S({ background: P(
|
|
6367
|
+
style: S({ background: P(jl)(e, n) })
|
|
6237
6368
|
}, null, 4),
|
|
6238
6369
|
u(" " + N(e.label), 1),
|
|
6239
|
-
c("span",
|
|
6370
|
+
c("span", Zl, N(l(P(Ml)(t.point, e.key))), 1)
|
|
6240
6371
|
]))), 128))]),
|
|
6241
6372
|
i[0] ||= c("div", { class: "absolute inset-0 -z-10 rounded-sm group-hover/column:bg-hover" }, null, -1)
|
|
6242
|
-
]))), 128))])], 4), c("div",
|
|
6373
|
+
]))), 128))])], 4), c("div", Ql, [(T(!0), s(n, null, k(h.value, (e, t) => (T(), s("span", {
|
|
6243
6374
|
key: t,
|
|
6244
6375
|
class: "min-w-0 flex-1 truncate px-0.5 text-center"
|
|
6245
|
-
}, N(e.point.label), 1))), 128))])])]), d(
|
|
6376
|
+
}, N(e.point.label), 1))), 128))])])]), d(Wl, {
|
|
6246
6377
|
label: e.label,
|
|
6247
6378
|
"category-label": e.categoryLabel ?? P(t)("ui.chart.category"),
|
|
6248
6379
|
series: e.series,
|
|
@@ -6255,14 +6386,14 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6255
6386
|
"data"
|
|
6256
6387
|
])], 2));
|
|
6257
6388
|
}
|
|
6258
|
-
}),
|
|
6389
|
+
}), eu = {
|
|
6259
6390
|
class: "flex gap-2",
|
|
6260
6391
|
"aria-hidden": "true"
|
|
6261
|
-
},
|
|
6392
|
+
}, tu = { class: "flex min-w-0 flex-1 flex-col gap-1.5" }, nu = {
|
|
6262
6393
|
class: "absolute inset-0 size-full overflow-visible",
|
|
6263
6394
|
viewBox: "0 0 100 100",
|
|
6264
6395
|
preserveAspectRatio: "none"
|
|
6265
|
-
},
|
|
6396
|
+
}, ru = ["points", "fill"], iu = ["points", "stroke"], au = { class: "pointer-events-none absolute bottom-full left-1/2 mb-1 hidden w-max max-w-56 -translate-x-1/2 flex-col gap-1 rounded-md border border-ink/10 bg-surface-elevated px-2.5 py-1.5 text-xs text-ink shadow-md group-hover/point:flex" }, ou = { class: "font-bold" }, su = { class: "ml-auto pl-3 tabular-nums" }, cu = { class: "relative h-4 text-xs text-ink/65" }, lu = /* @__PURE__ */ f({
|
|
6266
6397
|
__name: "LineChart",
|
|
6267
6398
|
props: {
|
|
6268
6399
|
label: {},
|
|
@@ -6281,24 +6412,24 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6281
6412
|
] }
|
|
6282
6413
|
},
|
|
6283
6414
|
setup(e) {
|
|
6284
|
-
let { t, locale: r } = J(), a = e, l = i(() => new Intl.NumberFormat(r.value)), f = (e) => a.format ? a.format(e) : l.value.format(e), p = i(() =>
|
|
6285
|
-
let n = a.data.map((t, n) => `${h(n)},${100 - g(
|
|
6415
|
+
let { t, locale: r } = J(), a = e, l = i(() => new Intl.NumberFormat(r.value)), f = (e) => a.format ? a.format(e) : l.value.format(e), p = i(() => Nl(Math.max(0, ...a.data.flatMap((e) => a.series.map((t) => Ml(e, t.key)))))), m = i(() => a.data.length), h = (e) => m.value > 1 ? e / (m.value - 1) * 100 : 50, g = (e) => e / p.value.max * 100, _ = i(() => a.series.map((e, t) => {
|
|
6416
|
+
let n = a.data.map((t, n) => `${h(n)},${100 - g(Ml(t, e.key))}`);
|
|
6286
6417
|
return {
|
|
6287
6418
|
series: e,
|
|
6288
|
-
color:
|
|
6419
|
+
color: jl(e, t),
|
|
6289
6420
|
points: n.join(" "),
|
|
6290
6421
|
area: `0,100 ${n.join(" ")} ${h(m.value - 1)},100`,
|
|
6291
|
-
last: m.value ? g(
|
|
6422
|
+
last: m.value ? g(Ml(a.data[m.value - 1], e.key)) : 0
|
|
6292
6423
|
};
|
|
6293
6424
|
})), v = i(() => Math.max(1, Math.ceil(m.value / 7))), y = (e) => e === m.value - 1 || e % v.value === 0 && m.value - 1 - e >= v.value;
|
|
6294
|
-
return (r, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-3", a.class)) }, [c("div",
|
|
6425
|
+
return (r, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-3", a.class)) }, [c("div", eu, [c("div", {
|
|
6295
6426
|
class: "relative w-8 shrink-0 text-right text-xs text-ink/65 tabular-nums",
|
|
6296
6427
|
style: S({ height: `${e.height}px` })
|
|
6297
6428
|
}, [(T(!0), s(n, null, k(p.value.ticks, (e) => (T(), s("span", {
|
|
6298
6429
|
key: e,
|
|
6299
6430
|
class: "absolute right-0 translate-y-1/2 leading-none",
|
|
6300
6431
|
style: S({ bottom: `${g(e)}%` })
|
|
6301
|
-
}, N(f(e)), 5))), 128))], 4), c("div",
|
|
6432
|
+
}, N(f(e)), 5))), 128))], 4), c("div", tu, [c("div", {
|
|
6302
6433
|
class: "relative",
|
|
6303
6434
|
style: S({ height: `${e.height}px` })
|
|
6304
6435
|
}, [
|
|
@@ -6307,12 +6438,12 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6307
6438
|
class: "absolute inset-x-0 h-px bg-ink/10",
|
|
6308
6439
|
style: S({ bottom: `${g(e)}%` })
|
|
6309
6440
|
}, null, 4))), 128)),
|
|
6310
|
-
(T(), s("svg",
|
|
6441
|
+
(T(), s("svg", nu, [e.area && _.value.length === 1 ? (T(), s("polygon", {
|
|
6311
6442
|
key: 0,
|
|
6312
6443
|
points: _.value[0].area,
|
|
6313
6444
|
fill: _.value[0].color,
|
|
6314
6445
|
"fill-opacity": "0.1"
|
|
6315
|
-
}, null, 8,
|
|
6446
|
+
}, null, 8, ru)) : o("", !0), (T(!0), s(n, null, k(_.value, (e) => (T(), s("polyline", {
|
|
6316
6447
|
key: e.series.key,
|
|
6317
6448
|
points: e.points,
|
|
6318
6449
|
fill: "none",
|
|
@@ -6321,7 +6452,7 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6321
6452
|
"stroke-linejoin": "round",
|
|
6322
6453
|
"stroke-linecap": "round",
|
|
6323
6454
|
"vector-effect": "non-scaling-stroke"
|
|
6324
|
-
}, null, 8,
|
|
6455
|
+
}, null, 8, iu))), 128))])),
|
|
6325
6456
|
(T(!0), s(n, null, k(_.value, (e) => (T(), s("span", {
|
|
6326
6457
|
key: e.series.key,
|
|
6327
6458
|
class: "absolute size-2 -translate-x-1/2 translate-y-1/2 rounded-full ring-2 ring-surface",
|
|
@@ -6344,27 +6475,27 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6344
6475
|
key: e.series.key,
|
|
6345
6476
|
class: "absolute left-1/2 hidden size-2 -translate-x-1/2 translate-y-1/2 rounded-full ring-2 ring-surface group-hover/point:block",
|
|
6346
6477
|
style: S({
|
|
6347
|
-
bottom: `${g(P(
|
|
6478
|
+
bottom: `${g(P(Ml)(t, e.series.key))}%`,
|
|
6348
6479
|
background: e.color
|
|
6349
6480
|
})
|
|
6350
6481
|
}, null, 4))), 128)),
|
|
6351
|
-
c("div",
|
|
6482
|
+
c("div", au, [c("span", ou, N(t.fullLabel ?? t.label), 1), (T(!0), s(n, null, k(e.series, (e, n) => (T(), s("span", {
|
|
6352
6483
|
key: e.key,
|
|
6353
6484
|
class: "flex items-center gap-1.5"
|
|
6354
6485
|
}, [
|
|
6355
6486
|
c("span", {
|
|
6356
6487
|
class: "size-2 rounded-full",
|
|
6357
|
-
style: S({ background: P(
|
|
6488
|
+
style: S({ background: P(jl)(e, n) })
|
|
6358
6489
|
}, null, 4),
|
|
6359
6490
|
u(" " + N(e.label), 1),
|
|
6360
|
-
c("span",
|
|
6491
|
+
c("span", su, N(f(P(Ml)(t, e.key))), 1)
|
|
6361
6492
|
]))), 128))])
|
|
6362
6493
|
], 4))), 128))
|
|
6363
|
-
], 4), c("div",
|
|
6494
|
+
], 4), c("div", cu, [(T(!0), s(n, null, k(e.data, (e, t) => (T(), s(n, { key: t }, [y(t) ? (T(), s("span", {
|
|
6364
6495
|
key: 0,
|
|
6365
6496
|
class: b(["absolute whitespace-nowrap", t === 0 && m.value > 1 ? "" : t === m.value - 1 && m.value > 1 ? "-translate-x-full" : "-translate-x-1/2"]),
|
|
6366
6497
|
style: S({ left: `${h(t)}%` })
|
|
6367
|
-
}, N(e.label), 7)) : o("", !0)], 64))), 128))])])]), d(
|
|
6498
|
+
}, N(e.label), 7)) : o("", !0)], 64))), 128))])])]), d(Wl, {
|
|
6368
6499
|
label: e.label,
|
|
6369
6500
|
"category-label": e.categoryLabel ?? P(t)("ui.chart.category"),
|
|
6370
6501
|
series: e.series,
|
|
@@ -6377,7 +6508,7 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6377
6508
|
"data"
|
|
6378
6509
|
])], 2));
|
|
6379
6510
|
}
|
|
6380
|
-
}),
|
|
6511
|
+
}), uu = /* @__PURE__ */ f({
|
|
6381
6512
|
__name: "AsyncState",
|
|
6382
6513
|
props: {
|
|
6383
6514
|
loading: { type: Boolean },
|
|
@@ -6401,11 +6532,11 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6401
6532
|
emits: ["retry"],
|
|
6402
6533
|
setup(e, { emit: t }) {
|
|
6403
6534
|
let { t: n } = J(), r = e, i = t;
|
|
6404
|
-
return (t, o) => e.error ? (T(), a(j(e.card ?
|
|
6535
|
+
return (t, o) => e.error ? (T(), a(j(e.card ? jo : "div"), {
|
|
6405
6536
|
key: 0,
|
|
6406
6537
|
class: b(r.class)
|
|
6407
6538
|
}, {
|
|
6408
|
-
default: H(() => [d(
|
|
6539
|
+
default: H(() => [d(Dc, {
|
|
6409
6540
|
icon: P(Ke),
|
|
6410
6541
|
title: e.errorTitle ?? P(n)("ui.asyncState.error"),
|
|
6411
6542
|
description: e.error,
|
|
@@ -6430,11 +6561,11 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6430
6561
|
}, 8, ["class"])) : e.loading ? (T(), s("div", {
|
|
6431
6562
|
key: 1,
|
|
6432
6563
|
class: b(P(X)("flex justify-center py-12", r.class))
|
|
6433
|
-
}, [d(Sr, { label: e.loadingLabel }, null, 8, ["label"])], 2)) : e.empty ? (T(), a(j(e.card ?
|
|
6564
|
+
}, [d(Sr, { label: e.loadingLabel }, null, 8, ["label"])], 2)) : e.empty ? (T(), a(j(e.card ? jo : "div"), {
|
|
6434
6565
|
key: 2,
|
|
6435
6566
|
class: b(r.class)
|
|
6436
6567
|
}, {
|
|
6437
|
-
default: H(() => [A(t.$slots, "empty", {}, () => [d(
|
|
6568
|
+
default: H(() => [A(t.$slots, "empty", {}, () => [d(Dc, {
|
|
6438
6569
|
icon: e.emptyIcon,
|
|
6439
6570
|
title: e.emptyTitle,
|
|
6440
6571
|
description: e.emptyDescription
|
|
@@ -6450,13 +6581,13 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6450
6581
|
_: 3
|
|
6451
6582
|
}, 8, ["class"])) : A(t.$slots, "default", {}, void 0, void 0, 3);
|
|
6452
6583
|
}
|
|
6453
|
-
}),
|
|
6584
|
+
}), du = {
|
|
6454
6585
|
key: 0,
|
|
6455
6586
|
class: "max-w-prose text-sm text-ink/65"
|
|
6456
|
-
},
|
|
6587
|
+
}, fu = {
|
|
6457
6588
|
key: 1,
|
|
6458
6589
|
class: "mt-3 flex flex-wrap justify-center gap-2"
|
|
6459
|
-
},
|
|
6590
|
+
}, pu = /* @__PURE__ */ f({
|
|
6460
6591
|
__name: "ResultState",
|
|
6461
6592
|
props: {
|
|
6462
6593
|
type: { default: "success" },
|
|
@@ -6511,15 +6642,15 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6511
6642
|
default: H(() => [u(N(e.title), 1)]),
|
|
6512
6643
|
_: 1
|
|
6513
6644
|
}, 512)),
|
|
6514
|
-
e.description || i.$slots.description ? (T(), s("div",
|
|
6645
|
+
e.description || i.$slots.description ? (T(), s("div", du, [A(i.$slots, "description", {}, () => [u(N(e.description), 1)])])) : o("", !0),
|
|
6515
6646
|
A(i.$slots, "default"),
|
|
6516
|
-
i.$slots.actions ? (T(), s("div",
|
|
6647
|
+
i.$slots.actions ? (T(), s("div", fu, [A(i.$slots, "actions")])) : o("", !0)
|
|
6517
6648
|
], 2));
|
|
6518
6649
|
}
|
|
6519
|
-
}),
|
|
6650
|
+
}), mu = {
|
|
6520
6651
|
class: "text-sm text-ink/65",
|
|
6521
6652
|
"aria-live": "polite"
|
|
6522
|
-
},
|
|
6653
|
+
}, hu = { class: "text-ink" }, gu = /* @__PURE__ */ f({
|
|
6523
6654
|
__name: "Steps",
|
|
6524
6655
|
props: {
|
|
6525
6656
|
steps: {},
|
|
@@ -6537,7 +6668,7 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6537
6668
|
emits: ["update:step"],
|
|
6538
6669
|
setup(e, { emit: t }) {
|
|
6539
6670
|
let n = e, r = t, a = p(), o = i(() => !!a?.vnode.props?.["onUpdate:step"]);
|
|
6540
|
-
return (t, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-2", n.class)) }, [d(
|
|
6671
|
+
return (t, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-2", n.class)) }, [d(Ia, {
|
|
6541
6672
|
label: e.label,
|
|
6542
6673
|
segments: "",
|
|
6543
6674
|
value: e.step + 1,
|
|
@@ -6551,28 +6682,28 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6551
6682
|
"max",
|
|
6552
6683
|
"segment-labels",
|
|
6553
6684
|
"disabled"
|
|
6554
|
-
]), c("p",
|
|
6685
|
+
]), c("p", mu, [d(P(K), {
|
|
6555
6686
|
keypath: "ui.steps.stepOfDash",
|
|
6556
6687
|
scope: "global",
|
|
6557
6688
|
tag: "span"
|
|
6558
6689
|
}, {
|
|
6559
6690
|
current: H(() => [u(N(e.step + 1), 1)]),
|
|
6560
6691
|
total: H(() => [u(N(e.steps.length), 1)]),
|
|
6561
|
-
name: H(() => [c("span",
|
|
6692
|
+
name: H(() => [c("span", hu, N(e.steps[e.step]), 1)]),
|
|
6562
6693
|
_: 1
|
|
6563
6694
|
})])], 2));
|
|
6564
6695
|
}
|
|
6565
|
-
}),
|
|
6696
|
+
}), _u = ["aria-label"], vu = { class: "flex min-w-0 flex-1 flex-col" }, yu = { class: "flex min-w-0 items-center gap-2" }, bu = { class: "truncate text-sm font-bold" }, xu = {
|
|
6566
6697
|
key: 0,
|
|
6567
6698
|
class: "truncate text-xs text-ink/65"
|
|
6568
|
-
},
|
|
6699
|
+
}, Su = {
|
|
6569
6700
|
key: 0,
|
|
6570
6701
|
"data-note": "",
|
|
6571
6702
|
class: "shrink-0 self-start text-xs text-ink/65"
|
|
6572
|
-
},
|
|
6703
|
+
}, Cu = {
|
|
6573
6704
|
key: 0,
|
|
6574
6705
|
class: "shrink-0 pr-3 empty:hidden"
|
|
6575
|
-
},
|
|
6706
|
+
}, wu = /* @__PURE__ */ f({
|
|
6576
6707
|
__name: "ActionList",
|
|
6577
6708
|
props: {
|
|
6578
6709
|
items: {},
|
|
@@ -6633,8 +6764,8 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6633
6764
|
class: "size-5 shrink-0 text-ink/65",
|
|
6634
6765
|
"aria-hidden": "true"
|
|
6635
6766
|
})) : o("", !0)]),
|
|
6636
|
-
c("span",
|
|
6637
|
-
n.note ? (T(), s("span",
|
|
6767
|
+
c("span", vu, [c("span", yu, [c("span", bu, N(n.label), 1), A(t.$slots, "badges", { item: n })]), n.description ? (T(), s("span", xu, N(n.description), 1)) : o("", !0)]),
|
|
6768
|
+
n.note ? (T(), s("span", Su, N(n.note), 1)) : o("", !0),
|
|
6638
6769
|
n.loading ? (T(), a(Sr, {
|
|
6639
6770
|
key: 1,
|
|
6640
6771
|
size: "sm"
|
|
@@ -6649,9 +6780,9 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6649
6780
|
"aria-current",
|
|
6650
6781
|
"aria-busy",
|
|
6651
6782
|
"onClick"
|
|
6652
|
-
])), t.$slots.after ? (T(), s("div",
|
|
6783
|
+
])), t.$slots.after ? (T(), s("div", Cu, [A(t.$slots, "after", { item: n })])) : o("", !0)]))), 128))], 10, _u));
|
|
6653
6784
|
}
|
|
6654
|
-
}),
|
|
6785
|
+
}), Tu = /* @__PURE__ */ f({
|
|
6655
6786
|
__name: "Tabs",
|
|
6656
6787
|
props: /*@__PURE__*/ _({
|
|
6657
6788
|
tabs: {},
|
|
@@ -6713,11 +6844,11 @@ var Dl = { class: "flex flex-col gap-2" }, Ol = { class: "flex flex-wrap items-c
|
|
|
6713
6844
|
_: 3
|
|
6714
6845
|
}, 8, ["model-value", "class"]));
|
|
6715
6846
|
}
|
|
6716
|
-
}),
|
|
6717
|
-
function
|
|
6847
|
+
}), Eu = 0, Du = () => `notification-${Date.now().toString(36)}-${(Eu++).toString(36)}`;
|
|
6848
|
+
function Ou(e, t) {
|
|
6718
6849
|
return t === void 0 ? e.type === "error" ? Infinity : e.action ? e.compact ? 1e4 : Infinity : 6e3 : t;
|
|
6719
6850
|
}
|
|
6720
|
-
function
|
|
6851
|
+
function ku(e = []) {
|
|
6721
6852
|
let t = E({
|
|
6722
6853
|
items: e.map(n).sort((e, t) => t.createdAt.getTime() - e.createdAt.getTime()),
|
|
6723
6854
|
toasts: [],
|
|
@@ -6727,7 +6858,7 @@ function Su(e = []) {
|
|
|
6727
6858
|
function n(e) {
|
|
6728
6859
|
return {
|
|
6729
6860
|
...e,
|
|
6730
|
-
id: e.id ??
|
|
6861
|
+
id: e.id ?? Du(),
|
|
6731
6862
|
type: e.type ?? "info",
|
|
6732
6863
|
createdAt: e.createdAt ?? /* @__PURE__ */ new Date(),
|
|
6733
6864
|
read: e.read ?? !1
|
|
@@ -6737,7 +6868,7 @@ function Su(e = []) {
|
|
|
6737
6868
|
let i = n(e);
|
|
6738
6869
|
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), {
|
|
6739
6870
|
id: i.id,
|
|
6740
|
-
duration:
|
|
6871
|
+
duration: Ou(i, r.duration),
|
|
6741
6872
|
item: i
|
|
6742
6873
|
}]), i.id;
|
|
6743
6874
|
}
|
|
@@ -6786,25 +6917,25 @@ function Su(e = []) {
|
|
|
6786
6917
|
markAllRead: c
|
|
6787
6918
|
};
|
|
6788
6919
|
}
|
|
6789
|
-
var
|
|
6790
|
-
function
|
|
6791
|
-
return
|
|
6920
|
+
var Au;
|
|
6921
|
+
function ju() {
|
|
6922
|
+
return Au ??= ku();
|
|
6792
6923
|
}
|
|
6793
6924
|
// src/components/Notification/Notification.vue?vue&type=script&setup=true&lang.ts
|
|
6794
|
-
var
|
|
6925
|
+
var Mu = { class: "sr-only" }, Nu = {
|
|
6795
6926
|
key: 0,
|
|
6796
6927
|
class: "text-ink/65 [&_a]:font-bold [&_a]:text-primary-fg [&_a]:underline [&_b]:font-bold [&_b]:text-ink [&_strong]:font-bold [&_strong]:text-ink"
|
|
6797
|
-
},
|
|
6928
|
+
}, Pu = {
|
|
6798
6929
|
key: 1,
|
|
6799
6930
|
class: "flex items-center gap-1.5 text-xs text-ink/65"
|
|
6800
|
-
},
|
|
6931
|
+
}, Fu = {
|
|
6801
6932
|
key: 0,
|
|
6802
6933
|
class: "size-2 shrink-0 rounded-full bg-primary",
|
|
6803
6934
|
"aria-hidden": "true"
|
|
6804
|
-
},
|
|
6935
|
+
}, Iu = {
|
|
6805
6936
|
key: 1,
|
|
6806
6937
|
class: "sr-only"
|
|
6807
|
-
},
|
|
6938
|
+
}, Lu = ["href"], Ru = /* @__PURE__ */ f({
|
|
6808
6939
|
__name: "Notification",
|
|
6809
6940
|
props: {
|
|
6810
6941
|
type: { default: "info" },
|
|
@@ -6869,12 +7000,12 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
6869
7000
|
c("p", {
|
|
6870
7001
|
id: f,
|
|
6871
7002
|
class: b(P(X)("font-bold", h.value && "min-w-0 flex-1 py-1"))
|
|
6872
|
-
}, [c("span",
|
|
6873
|
-
!h.value && (e.description || t.$slots.default) ? (T(), s("div",
|
|
6874
|
-
e.appearance === "row" && (e.createdAt || e.unread) ? (T(), s("p",
|
|
6875
|
-
e.unread ? (T(), s("span",
|
|
6876
|
-
e.unread ? (T(), s("span",
|
|
6877
|
-
e.createdAt ? (T(), a(
|
|
7003
|
+
}, [c("span", Mu, N(p[e.type].word) + ": ", 1), u(N(e.title), 1)], 2),
|
|
7004
|
+
!h.value && (e.description || t.$slots.default) ? (T(), s("div", Nu, [A(t.$slots, "default", {}, () => [d(m)])])) : o("", !0),
|
|
7005
|
+
e.appearance === "row" && (e.createdAt || e.unread) ? (T(), s("p", Pu, [
|
|
7006
|
+
e.unread ? (T(), s("span", Fu)) : o("", !0),
|
|
7007
|
+
e.unread ? (T(), s("span", Iu, "Unread, ")) : o("", !0),
|
|
7008
|
+
e.createdAt ? (T(), a(Ol, {
|
|
6878
7009
|
key: 2,
|
|
6879
7010
|
date: e.createdAt,
|
|
6880
7011
|
now: e.now
|
|
@@ -6889,7 +7020,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
6889
7020
|
"as-child": "",
|
|
6890
7021
|
onClick: g
|
|
6891
7022
|
}, {
|
|
6892
|
-
default: H(() => [c("a", { href: e.action.href }, N(e.action.label), 9,
|
|
7023
|
+
default: H(() => [c("a", { href: e.action.href }, N(e.action.label), 9, Lu)]),
|
|
6893
7024
|
_: 1
|
|
6894
7025
|
})) : e.action ? (T(), a(Z, {
|
|
6895
7026
|
key: 1,
|
|
@@ -6915,11 +7046,11 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
6915
7046
|
}, 8, ["class", "aria-label"])) : o("", !0)
|
|
6916
7047
|
], 2));
|
|
6917
7048
|
}
|
|
6918
|
-
}),
|
|
7049
|
+
}), zu = {
|
|
6919
7050
|
key: 0,
|
|
6920
7051
|
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-surface",
|
|
6921
7052
|
"aria-hidden": "true"
|
|
6922
|
-
},
|
|
7053
|
+
}, Bu = { class: "flex h-11 shrink-0 items-center justify-between gap-2 border-b border-ink/10 pr-2 pl-4" }, Vu = ["inert"], Hu = /* @__PURE__ */ f({
|
|
6923
7054
|
__name: "NotificationPane",
|
|
6924
7055
|
props: /*@__PURE__*/ _({
|
|
6925
7056
|
notifications: {},
|
|
@@ -6935,7 +7066,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
6935
7066
|
}),
|
|
6936
7067
|
emits: ["update:open"],
|
|
6937
7068
|
setup(e) {
|
|
6938
|
-
let { t } = J(), r = e, l = L(e, "open"), f = i(() => r.notifications ??
|
|
7069
|
+
let { t } = J(), r = e, l = L(e, "open"), f = i(() => r.notifications ?? ju()), 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", {
|
|
6939
7070
|
label: g.value,
|
|
6940
7071
|
count: h.value
|
|
6941
7072
|
}) : g.value), v = `${I()}-heading`, x = O(), S = O();
|
|
@@ -6985,7 +7116,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
6985
7116
|
ref: C,
|
|
6986
7117
|
"aria-labelledby": v,
|
|
6987
7118
|
class: "flex min-h-0 flex-col"
|
|
6988
|
-
}, [c("div",
|
|
7119
|
+
}, [c("div", Bu, [c("h2", {
|
|
6989
7120
|
id: v,
|
|
6990
7121
|
ref_key: "heading",
|
|
6991
7122
|
ref: x,
|
|
@@ -7010,7 +7141,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7010
7141
|
}, [(T(!0), s(n, null, k(p.value, (e, t) => (T(), s("li", {
|
|
7011
7142
|
key: e.id,
|
|
7012
7143
|
class: "border-b border-ink/10 last:border-b-0"
|
|
7013
|
-
}, [d(
|
|
7144
|
+
}, [d(Ru, {
|
|
7014
7145
|
appearance: "row",
|
|
7015
7146
|
type: e.type,
|
|
7016
7147
|
title: e.title,
|
|
@@ -7029,7 +7160,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7029
7160
|
"unread",
|
|
7030
7161
|
"onDismiss",
|
|
7031
7162
|
"onAction"
|
|
7032
|
-
])]))), 128))], 42,
|
|
7163
|
+
])]))), 128))], 42, Vu)) : (T(), a(Dc, {
|
|
7033
7164
|
key: 1,
|
|
7034
7165
|
size: "sm",
|
|
7035
7166
|
icon: P(le),
|
|
@@ -7048,13 +7179,13 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7048
7179
|
"aria-label": _.value,
|
|
7049
7180
|
class: b(P(X)("relative overflow-visible", e.ui?.trigger))
|
|
7050
7181
|
}, {
|
|
7051
|
-
default: H(() => [d(P(ce)), m.value ? (T(), s("span",
|
|
7182
|
+
default: H(() => [d(P(ce)), m.value ? (T(), s("span", zu, N(h.value), 1)) : o("", !0)]),
|
|
7052
7183
|
_: 1
|
|
7053
7184
|
}, 8, ["aria-label", "class"])]),
|
|
7054
7185
|
_: 1
|
|
7055
7186
|
}, 8, ["open", "ui"]));
|
|
7056
7187
|
}
|
|
7057
|
-
}),
|
|
7188
|
+
}), Uu = { class: "in-data-expanded:hidden" }, Wu = { class: "hidden in-data-expanded:inline" }, Gu = { class: "sr-only" }, Ku = 8, qu = .5, Ju = 80, Yu = /* @__PURE__ */ f({
|
|
7058
7189
|
__name: "Toaster",
|
|
7059
7190
|
props: {
|
|
7060
7191
|
notifications: {},
|
|
@@ -7071,15 +7202,15 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7071
7202
|
},
|
|
7072
7203
|
emits: ["more"],
|
|
7073
7204
|
setup(e, { emit: t }) {
|
|
7074
|
-
let { t: r } = J(), l = e, f = t, p = i(() => l.notifications ??
|
|
7205
|
+
let { t: r } = J(), l = e, f = t, p = i(() => l.notifications ?? ju()), m = i(() => l.position === "top-right"), h = O(typeof window > "u" ? 800 : window.innerHeight), g = () => h.value = window.innerHeight;
|
|
7075
7206
|
w(() => window.addEventListener("resize", g)), C(() => window.removeEventListener("resize", g));
|
|
7076
|
-
let _ = i(() => Math.max(h.value -
|
|
7077
|
-
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? v(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) +
|
|
7207
|
+
let _ = i(() => Math.max(h.value - Ju, 108)), v = (e) => e.compact ? 42 : e.action ? 116 : e.description ? 78 : 56, x = i(() => {
|
|
7208
|
+
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? v(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) + Ku, -8), i = /* @__PURE__ */ new Set();
|
|
7078
7209
|
if (r <= _.value) n.forEach((e) => i.add(e.id));
|
|
7079
7210
|
else {
|
|
7080
7211
|
let e = 44;
|
|
7081
7212
|
for (let r of n) {
|
|
7082
|
-
let n = e + t(r) + (i.size ?
|
|
7213
|
+
let n = e + t(r) + (i.size ? Ku : 0);
|
|
7083
7214
|
if (i.size && n > _.value) break;
|
|
7084
7215
|
i.add(r.id), e = n;
|
|
7085
7216
|
}
|
|
@@ -7134,16 +7265,16 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7134
7265
|
}
|
|
7135
7266
|
let q = i(() => {
|
|
7136
7267
|
let e = D.value.filter((e) => !W.has(e.id)), t = /* @__PURE__ */ new Map(), n = [], r = 0;
|
|
7137
|
-
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) +
|
|
7138
|
-
let i = Math.max(r -
|
|
7268
|
+
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) + Ku;
|
|
7269
|
+
let i = Math.max(r - Ku, 0), a = Math.min(l.maxHeight, _.value), o = 0;
|
|
7139
7270
|
for (; o < e.length && (o === 0 || n[o] + (L.get(e[o].id) ?? 0) <= a);) o++;
|
|
7140
|
-
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u +
|
|
7271
|
+
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u + Ku;
|
|
7141
7272
|
e.forEach((r, i) => {
|
|
7142
7273
|
let a = i >= o;
|
|
7143
7274
|
t.set(r.id, {
|
|
7144
7275
|
spread: n[i],
|
|
7145
7276
|
stacked: a ? d : n[i],
|
|
7146
|
-
scale: a ?
|
|
7277
|
+
scale: a ? qu : 1,
|
|
7147
7278
|
opacity: +!a,
|
|
7148
7279
|
z: e.length - i
|
|
7149
7280
|
});
|
|
@@ -7154,7 +7285,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7154
7285
|
places: t,
|
|
7155
7286
|
spreadHeight: i + (A.value > 0 ? 44 : 0),
|
|
7156
7287
|
stackedHeight: p,
|
|
7157
|
-
moreOffset: i + (i ?
|
|
7288
|
+
moreOffset: i + (i ? Ku : 0),
|
|
7158
7289
|
notInView: f,
|
|
7159
7290
|
pillOffset: d
|
|
7160
7291
|
};
|
|
@@ -7163,10 +7294,10 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7163
7294
|
let t = W.has(e) ? G.get(e) : q.value.places.get(e), n = m.value ? 1 : -1, r = (e) => `${n * e}px`, i = {
|
|
7164
7295
|
"--toast-spread": r(q.value.moreOffset),
|
|
7165
7296
|
"--toast-stacked": r(q.value.pillOffset),
|
|
7166
|
-
"--toast-scale":
|
|
7297
|
+
"--toast-scale": qu,
|
|
7167
7298
|
"--toast-opacity": 0,
|
|
7168
7299
|
"--toast-spread-opacity": 0,
|
|
7169
|
-
"--toast-spread-scale":
|
|
7300
|
+
"--toast-spread-scale": qu,
|
|
7170
7301
|
"--toast-z": 0
|
|
7171
7302
|
};
|
|
7172
7303
|
if (!t && j.has(e) || t && !V.has(e) && M.has(e)) return i;
|
|
@@ -7224,7 +7355,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7224
7355
|
class: b(P(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")),
|
|
7225
7356
|
"onUpdate:open": (t) => K(e.id, t)
|
|
7226
7357
|
}, {
|
|
7227
|
-
default: H(() => [d(
|
|
7358
|
+
default: H(() => [d(Ru, {
|
|
7228
7359
|
ref_for: !0,
|
|
7229
7360
|
ref: (t) => ee(e.id, t),
|
|
7230
7361
|
type: e.item.type,
|
|
@@ -7267,7 +7398,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7267
7398
|
type: "button",
|
|
7268
7399
|
class: b(P(X)("flex cursor-pointer items-center justify-center overflow-hidden border border-ink/10 bg-surface-elevated font-bold whitespace-nowrap text-ink shadow-md hover:bg-[color-mix(in_oklab,var(--color-surface-elevated)_95%,var(--color-ink))]", "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")),
|
|
7269
7400
|
onClick: ie
|
|
7270
|
-
}, [A.value ? (T(), s(n, { key: 0 }, [c("span",
|
|
7401
|
+
}, [A.value ? (T(), s(n, { key: 0 }, [c("span", Uu, N(P(r)("ui.notifications.more", { count: q.value.notInView })), 1), c("span", Wu, N(P(r)("ui.notifications.more", { count: A.value })), 1)], 64)) : (T(), s(n, { key: 1 }, [u(N(P(r)("ui.notifications.more", { count: q.value.notInView })), 1)], 64)), c("span", Gu, "\xA0" + N(P(r)("ui.notifications.notifications")), 1)], 2)], 6)) : o("", !0)]),
|
|
7271
7402
|
_: 1
|
|
7272
7403
|
}, 8, [
|
|
7273
7404
|
"label",
|
|
@@ -7277,14 +7408,14 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7277
7408
|
_: 1
|
|
7278
7409
|
}, 8, ["label"]));
|
|
7279
7410
|
}
|
|
7280
|
-
}),
|
|
7411
|
+
}), Xu = {
|
|
7281
7412
|
key: 0,
|
|
7282
7413
|
"aria-hidden": "true",
|
|
7283
7414
|
class: "h-20"
|
|
7284
|
-
},
|
|
7415
|
+
}, Zu = ["aria-label"], Qu = { class: "pointer-events-auto flex w-full max-w-2xl items-center justify-between gap-3 rounded-lg border border-ink/10 bg-surface-elevated p-3 pl-4 shadow-lg" }, $u = {
|
|
7285
7416
|
role: "status",
|
|
7286
7417
|
class: "flex items-center gap-2 text-sm font-bold"
|
|
7287
|
-
},
|
|
7418
|
+
}, ed = { class: "flex shrink-0 items-center gap-2" }, td = /* @__PURE__ */ f({
|
|
7288
7419
|
__name: "UnsavedChangesBar",
|
|
7289
7420
|
props: {
|
|
7290
7421
|
open: { type: Boolean },
|
|
@@ -7307,7 +7438,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7307
7438
|
emits: ["discard", "save"],
|
|
7308
7439
|
setup(e, { emit: t }) {
|
|
7309
7440
|
let { t: a } = J(), l = e, f = t, p = i(() => l.status === "loading");
|
|
7310
|
-
return (t, i) => (T(), s(n, null, [e.open && e.reserveSpace ? (T(), s("div",
|
|
7441
|
+
return (t, i) => (T(), s(n, null, [e.open && e.reserveSpace ? (T(), s("div", Xu)) : o("", !0), d(r, {
|
|
7311
7442
|
"enter-active-class": "transition duration-300 ease-out motion-reduce:transition-none",
|
|
7312
7443
|
"leave-active-class": "transition duration-200 ease-in motion-reduce:transition-none",
|
|
7313
7444
|
"enter-from-class": "translate-y-full motion-reduce:translate-y-0 motion-reduce:opacity-0",
|
|
@@ -7318,10 +7449,10 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7318
7449
|
role: "region",
|
|
7319
7450
|
"aria-label": e.message ?? P(a)("ui.unsavedChangesBar.message"),
|
|
7320
7451
|
class: b(P(X)("fixed inset-x-0 bottom-0 z-40 flex justify-center px-4 pb-4 pointer-events-none", l.class))
|
|
7321
|
-
}, [c("div",
|
|
7452
|
+
}, [c("div", Qu, [c("p", $u, [i[2] ||= c("span", {
|
|
7322
7453
|
"aria-hidden": "true",
|
|
7323
7454
|
class: "size-2 shrink-0 rounded-full bg-yellow"
|
|
7324
|
-
}, null, -1), u(" " + N(e.message ?? P(a)("ui.unsavedChangesBar.message")), 1)]), c("div",
|
|
7455
|
+
}, null, -1), u(" " + N(e.message ?? P(a)("ui.unsavedChangesBar.message")), 1)]), c("div", ed, [d(Z, {
|
|
7325
7456
|
disabled: p.value,
|
|
7326
7457
|
onClick: i[0] ||= (e) => f("discard")
|
|
7327
7458
|
}, {
|
|
@@ -7335,11 +7466,11 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7335
7466
|
}, {
|
|
7336
7467
|
default: H(() => [u(N(e.saveLabel ?? P(a)("ui.unsavedChangesBar.save")), 1)]),
|
|
7337
7468
|
_: 1
|
|
7338
|
-
}, 8, ["status", "disabled"])])])], 10,
|
|
7469
|
+
}, 8, ["status", "disabled"])])])], 10, Zu)) : o("", !0)]),
|
|
7339
7470
|
_: 1
|
|
7340
7471
|
})], 64));
|
|
7341
7472
|
}
|
|
7342
|
-
}),
|
|
7473
|
+
}), nd = { class: "flex flex-col gap-2" }, rd = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, id = /* @__PURE__ */ f({
|
|
7343
7474
|
__name: "ConfirmDialog",
|
|
7344
7475
|
props: /*@__PURE__*/ _({
|
|
7345
7476
|
title: {},
|
|
@@ -7385,7 +7516,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7385
7516
|
onEscapeKeyDown: i[1] ||= (e) => f.value && e.preventDefault(),
|
|
7386
7517
|
onOpenAutoFocus: i[2] ||= G((e) => p.value?.$el?.focus(), ["prevent"])
|
|
7387
7518
|
}, {
|
|
7388
|
-
default: H(() => [c("div",
|
|
7519
|
+
default: H(() => [c("div", nd, [d(P(rt), { class: "text-lg font-bold" }, {
|
|
7389
7520
|
default: H(() => [u(N(e.title), 1)]),
|
|
7390
7521
|
_: 1
|
|
7391
7522
|
}), e.description || t.$slots.description ? (T(), a(P($e), {
|
|
@@ -7395,7 +7526,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7395
7526
|
}, {
|
|
7396
7527
|
default: H(() => [A(t.$slots, "description", {}, () => [u(N(e.description), 1)])]),
|
|
7397
7528
|
_: 3
|
|
7398
|
-
})) : o("", !0)]), c("div",
|
|
7529
|
+
})) : o("", !0)]), c("div", rd, [d(P(Ze), { "as-child": "" }, {
|
|
7399
7530
|
default: H(() => [d(Z, {
|
|
7400
7531
|
ref_key: "cancelButton",
|
|
7401
7532
|
ref: p,
|
|
@@ -7425,7 +7556,7 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7425
7556
|
_: 3
|
|
7426
7557
|
}, 8, ["open"]));
|
|
7427
7558
|
}
|
|
7428
|
-
}),
|
|
7559
|
+
}), ad = { ui: {
|
|
7429
7560
|
age: {
|
|
7430
7561
|
born: "Born {date}",
|
|
7431
7562
|
birthdayToday: "Birthday today",
|
|
@@ -7528,7 +7659,8 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7528
7659
|
label: "Appearance",
|
|
7529
7660
|
light: "Light",
|
|
7530
7661
|
dark: "Dark",
|
|
7531
|
-
system: "Match device"
|
|
7662
|
+
system: "Match device",
|
|
7663
|
+
systemShort: "System"
|
|
7532
7664
|
},
|
|
7533
7665
|
notifications: {
|
|
7534
7666
|
title: "Notifications",
|
|
@@ -7597,16 +7729,16 @@ var Tu = { class: "sr-only" }, Eu = {
|
|
|
7597
7729
|
discard: "Discard",
|
|
7598
7730
|
save: "Save"
|
|
7599
7731
|
}
|
|
7600
|
-
} },
|
|
7601
|
-
function
|
|
7602
|
-
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(
|
|
7732
|
+
} }, od = { en: ad };
|
|
7733
|
+
function sd(e = {}) {
|
|
7734
|
+
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(od), ...Object.keys(t)])], a = {};
|
|
7603
7735
|
for (let e of i) a[e] = {
|
|
7604
|
-
|
|
7736
|
+
...od[e],
|
|
7605
7737
|
...t[e]
|
|
7606
7738
|
};
|
|
7607
7739
|
let o = q({
|
|
7608
7740
|
legacy: !1,
|
|
7609
|
-
locale: e.locale ??
|
|
7741
|
+
locale: e.locale ?? cd(i, n, r),
|
|
7610
7742
|
fallbackLocale: n,
|
|
7611
7743
|
messages: a
|
|
7612
7744
|
});
|
|
@@ -7617,7 +7749,7 @@ function ed(e = {}) {
|
|
|
7617
7749
|
typeof document < "u" && (document.documentElement.lang = e);
|
|
7618
7750
|
}, { immediate: !0 }), o;
|
|
7619
7751
|
}
|
|
7620
|
-
function
|
|
7752
|
+
function cd(e, t, n) {
|
|
7621
7753
|
try {
|
|
7622
7754
|
let t = localStorage.getItem(n);
|
|
7623
7755
|
if (t && e.includes(t)) return t;
|
|
@@ -7628,4 +7760,4 @@ function td(e, t, n) {
|
|
|
7628
7760
|
}
|
|
7629
7761
|
return t;
|
|
7630
7762
|
}
|
|
7631
|
-
export {
|
|
7763
|
+
export { wu as ActionList, Al as Age, qo as Alert, zr as AppLauncher, Xa as AppShell, uu as AsyncState, $i as Avatar, Do as AvatarGroup, ha as Badge, $l as BarChart, ao as Breadcrumb, Z as Button, ls as Calendar, jo as Card, Sc as CardSelect, Bo as ChangeIndicator, Xs as Checkbox, hc as CheckboxGroup, ml as Checklist, Ur as Chip, Jo as Collapsible, id as ConfirmDialog, Po as Divider, Dc as EmptyState, Ec as FileUpload, Ii as Footer, ei as FormField, pa as Header, Kr as InfoTip, Zo as Input, qs as InputCode, Ms as InputDate, es as InputNumber, Hs as InputPassword, Rs as InputRichText, uc as InputTextArea, hi as LanguageSwitcher, lu as LineChart, Br as Link, oo as Menu, Ru as Notification, Hu as NotificationPane, ho as PageHeader, Mr as Popover, Ia as Progress, Yo as Prose, ac as RadioGroup, Ol as RelativeTime, pu as ResultState, _i as SegmentedControl, mi as Select, bo as SettingsRow, ka as Sidebar, Ga as Slideover, Sr as Spinner, nl as StatTile, gu as Steps, dl as SummaryList, cc as Switch, Jc as Table, Tu as Tabs, vi as ThemeSwitcher, Yu as Toaster, Ns as Tooltip, td as UnsavedChangesBar, xl as age, X as cn, sd as createKestonI18n, ku as createNotifications, Sl as daysToBirthday, ad as en, bl as formatDate, yl as formatDateTime, _r as initTheme, Nr as kestonApps, Si as kestonFooterLinks, Ci as kestonGroupLinks, vl as relativeTime, ga as sidebarTrail, Ac as sortRows, hl as toDate, od as uiMessages, ju as useNotifications, El as useNow, vr as useTheme };
|