@thekestongroup/ui 0.19.0 → 0.20.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/SegmentedControl/SegmentedControl.vue.d.ts +1 -1
- package/dist/components/ThemeSwitcher/ThemeSwitcher.vue.d.ts +4 -3
- package/dist/keston-ui.js +358 -351
- package/package.json +1 -1
- package/src/components/Footer/Footer.vue +1 -1
- package/src/components/SegmentedControl/SegmentedControl.vue +25 -22
- package/src/components/ThemeSwitcher/ThemeSwitcher.stories.ts +9 -0
- package/src/components/ThemeSwitcher/ThemeSwitcher.vue +7 -4
package/dist/keston-ui.js
CHANGED
|
@@ -1217,7 +1217,58 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1217
1217
|
"class"
|
|
1218
1218
|
]));
|
|
1219
1219
|
}
|
|
1220
|
-
}), gi =
|
|
1220
|
+
}), gi = /* @__PURE__ */ f({
|
|
1221
|
+
__name: "Tooltip",
|
|
1222
|
+
props: {
|
|
1223
|
+
text: {},
|
|
1224
|
+
side: { default: "top" },
|
|
1225
|
+
align: { default: "center" },
|
|
1226
|
+
delay: { default: 400 },
|
|
1227
|
+
disabled: { type: Boolean },
|
|
1228
|
+
class: { type: [
|
|
1229
|
+
Boolean,
|
|
1230
|
+
null,
|
|
1231
|
+
String,
|
|
1232
|
+
Object,
|
|
1233
|
+
Array
|
|
1234
|
+
] }
|
|
1235
|
+
},
|
|
1236
|
+
setup(e) {
|
|
1237
|
+
let t = e, n = Hn(null) !== null, r = (e, { slots: r }) => n ? r.default?.() : h(zn, {
|
|
1238
|
+
delayDuration: t.delay,
|
|
1239
|
+
skipDelayDuration: 300
|
|
1240
|
+
}, r);
|
|
1241
|
+
return (n, i) => (T(), a(r, null, {
|
|
1242
|
+
default: H(() => [d(P(Bn), {
|
|
1243
|
+
disabled: e.disabled,
|
|
1244
|
+
"delay-duration": e.delay
|
|
1245
|
+
}, {
|
|
1246
|
+
default: H(() => [d(P(Vn), { "as-child": "" }, {
|
|
1247
|
+
default: H(() => [A(n.$slots, "default")]),
|
|
1248
|
+
_: 3
|
|
1249
|
+
}), d(P(Rn), null, {
|
|
1250
|
+
default: H(() => [d(P(Ln), {
|
|
1251
|
+
side: e.side,
|
|
1252
|
+
align: e.align,
|
|
1253
|
+
"side-offset": 8,
|
|
1254
|
+
"collision-padding": 8,
|
|
1255
|
+
class: b(P(X)("z-100 max-w-72 rounded-md bg-neutral-900 dark:bg-neutral-700 px-2.5 py-1.5 text-xs/4 text-white shadow-lg ring-1 ring-white/10", "data-[state=closed]:animate-fade-out data-[state=delayed-open]:animate-fade-in data-[state=instant-open]:animate-fade-in", t.class))
|
|
1256
|
+
}, {
|
|
1257
|
+
default: H(() => [A(n.$slots, "content", {}, () => [u(N(e.text), 1)])]),
|
|
1258
|
+
_: 3
|
|
1259
|
+
}, 8, [
|
|
1260
|
+
"side",
|
|
1261
|
+
"align",
|
|
1262
|
+
"class"
|
|
1263
|
+
])]),
|
|
1264
|
+
_: 3
|
|
1265
|
+
})]),
|
|
1266
|
+
_: 3
|
|
1267
|
+
}, 8, ["disabled", "delay-duration"])]),
|
|
1268
|
+
_: 3
|
|
1269
|
+
}));
|
|
1270
|
+
}
|
|
1271
|
+
}), _i = { key: 1 }, vi = /* @__PURE__ */ f({
|
|
1221
1272
|
__name: "SegmentedControl",
|
|
1222
1273
|
props: /*@__PURE__*/ _({
|
|
1223
1274
|
label: {},
|
|
@@ -1263,26 +1314,31 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1263
1314
|
loop: "",
|
|
1264
1315
|
class: "inline-flex w-max max-w-full gap-0.5 rounded-lg bg-ink/5 p-0.5"
|
|
1265
1316
|
}, {
|
|
1266
|
-
default: H(() => [(T(!0), s(n, null, k(e.options, (t) => (T(), a(
|
|
1317
|
+
default: H(() => [(T(!0), s(n, null, k(e.options, (t) => (T(), a(gi, {
|
|
1267
1318
|
key: t.value,
|
|
1268
|
-
|
|
1269
|
-
disabled:
|
|
1270
|
-
"
|
|
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))
|
|
1319
|
+
text: t.label,
|
|
1320
|
+
disabled: !e.iconOnly,
|
|
1321
|
+
side: "top"
|
|
1273
1322
|
}, {
|
|
1274
|
-
default: H(() => [
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1323
|
+
default: H(() => [d(P(pn), {
|
|
1324
|
+
value: t.value,
|
|
1325
|
+
disabled: t.disabled,
|
|
1326
|
+
"aria-label": e.iconOnly ? t.label : void 0,
|
|
1327
|
+
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", "aria-checked:bg-control aria-checked:text-ink aria-checked:shadow-xs", "disabled:cursor-not-allowed disabled:opacity-40", f.value))
|
|
1328
|
+
}, {
|
|
1329
|
+
default: H(() => [t.icon ? (T(), a(j(t.icon), {
|
|
1330
|
+
key: 0,
|
|
1331
|
+
"aria-hidden": "true"
|
|
1332
|
+
})) : o("", !0), e.iconOnly ? o("", !0) : (T(), s("span", _i, N(t.label), 1))]),
|
|
1333
|
+
_: 2
|
|
1334
|
+
}, 1032, [
|
|
1335
|
+
"value",
|
|
1336
|
+
"disabled",
|
|
1337
|
+
"aria-label",
|
|
1338
|
+
"class"
|
|
1339
|
+
])]),
|
|
1278
1340
|
_: 2
|
|
1279
|
-
}, 1032, [
|
|
1280
|
-
"value",
|
|
1281
|
-
"disabled",
|
|
1282
|
-
"aria-label",
|
|
1283
|
-
"title",
|
|
1284
|
-
"class"
|
|
1285
|
-
]))), 128))]),
|
|
1341
|
+
}, 1032, ["text", "disabled"]))), 128))]),
|
|
1286
1342
|
_: 1
|
|
1287
1343
|
}, 8, [
|
|
1288
1344
|
"modelValue",
|
|
@@ -1290,7 +1346,7 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1290
1346
|
"name"
|
|
1291
1347
|
])], 2));
|
|
1292
1348
|
}
|
|
1293
|
-
}),
|
|
1349
|
+
}), yi = /* @__PURE__ */ f({
|
|
1294
1350
|
__name: "ThemeSwitcher",
|
|
1295
1351
|
props: {
|
|
1296
1352
|
label: {},
|
|
@@ -1326,11 +1382,10 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1326
1382
|
get: () => r.value,
|
|
1327
1383
|
set: (e) => o(e)
|
|
1328
1384
|
});
|
|
1329
|
-
return (r, i) => e.appearance === "
|
|
1330
|
-
key:
|
|
1385
|
+
return (r, i) => e.appearance === "select" ? (T(), a(mi, {
|
|
1386
|
+
key: 1,
|
|
1331
1387
|
modelValue: c.value,
|
|
1332
|
-
"onUpdate:modelValue": i[
|
|
1333
|
-
size: "sm",
|
|
1388
|
+
"onUpdate:modelValue": i[1] ||= (e) => c.value = e,
|
|
1334
1389
|
label: e.label ?? P(n)("ui.themeSwitcher.label"),
|
|
1335
1390
|
"hide-label": e.hideLabel,
|
|
1336
1391
|
options: s.value,
|
|
@@ -1343,10 +1398,12 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1343
1398
|
"options",
|
|
1344
1399
|
"disabled",
|
|
1345
1400
|
"class"
|
|
1346
|
-
])) : (T(), a(
|
|
1347
|
-
key:
|
|
1401
|
+
])) : (T(), a(vi, {
|
|
1402
|
+
key: 0,
|
|
1348
1403
|
modelValue: c.value,
|
|
1349
|
-
"onUpdate:modelValue": i[
|
|
1404
|
+
"onUpdate:modelValue": i[0] ||= (e) => c.value = e,
|
|
1405
|
+
size: "sm",
|
|
1406
|
+
"icon-only": e.appearance === "icons",
|
|
1350
1407
|
label: e.label ?? P(n)("ui.themeSwitcher.label"),
|
|
1351
1408
|
"hide-label": e.hideLabel,
|
|
1352
1409
|
options: s.value,
|
|
@@ -1354,6 +1411,7 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1354
1411
|
class: b(t.class)
|
|
1355
1412
|
}, null, 8, [
|
|
1356
1413
|
"modelValue",
|
|
1414
|
+
"icon-only",
|
|
1357
1415
|
"label",
|
|
1358
1416
|
"hide-label",
|
|
1359
1417
|
"options",
|
|
@@ -1363,17 +1421,17 @@ var yr = ["stroke-dashoffset", "stroke-opacity"], br = {
|
|
|
1363
1421
|
}
|
|
1364
1422
|
});
|
|
1365
1423
|
// src/components/Footer/footer.ts
|
|
1366
|
-
function
|
|
1424
|
+
function bi(e, t) {
|
|
1367
1425
|
return t && t < e ? `${t}–${e}` : String(e);
|
|
1368
1426
|
}
|
|
1369
|
-
function
|
|
1427
|
+
function xi(e) {
|
|
1370
1428
|
return e ? /^v/i.test(e) ? `v${e.slice(1)}` : `v${e}` : "";
|
|
1371
1429
|
}
|
|
1372
|
-
function
|
|
1430
|
+
function Si(e) {
|
|
1373
1431
|
return e ? e.replace(/^v/i, "") : "";
|
|
1374
1432
|
}
|
|
1375
1433
|
// src/components/Footer/links.ts
|
|
1376
|
-
var
|
|
1434
|
+
var Ci = [
|
|
1377
1435
|
{
|
|
1378
1436
|
label: "Help",
|
|
1379
1437
|
href: "https://thekestongroup.com/help"
|
|
@@ -1386,7 +1444,7 @@ var Si = [
|
|
|
1386
1444
|
label: "Terms",
|
|
1387
1445
|
href: "https://thekestongroup.com/terms"
|
|
1388
1446
|
}
|
|
1389
|
-
],
|
|
1447
|
+
], wi = [
|
|
1390
1448
|
{
|
|
1391
1449
|
label: "Keston ID",
|
|
1392
1450
|
href: "https://id.keston.co"
|
|
@@ -1403,26 +1461,26 @@ var Si = [
|
|
|
1403
1461
|
label: "Design system",
|
|
1404
1462
|
href: "https://ui.keston.co"
|
|
1405
1463
|
}
|
|
1406
|
-
],
|
|
1464
|
+
], Ti = ["aria-label"], Ei = { class: "flex flex-wrap items-center gap-x-4 gap-y-1" }, Di = {
|
|
1407
1465
|
key: 0,
|
|
1408
1466
|
class: "hidden h-4 w-px bg-ink/10 sm:block",
|
|
1409
1467
|
"aria-hidden": "true"
|
|
1410
|
-
},
|
|
1468
|
+
}, Oi = {
|
|
1411
1469
|
key: 0,
|
|
1412
1470
|
class: "flex flex-wrap items-center gap-2"
|
|
1413
|
-
},
|
|
1471
|
+
}, ki = {
|
|
1414
1472
|
key: 1,
|
|
1415
1473
|
class: "flex flex-wrap items-baseline gap-x-1.5"
|
|
1416
|
-
},
|
|
1474
|
+
}, Ai = {
|
|
1417
1475
|
key: 0,
|
|
1418
1476
|
class: "font-bold text-ink/80"
|
|
1419
|
-
},
|
|
1477
|
+
}, ji = { key: 1 }, Mi = { class: "sr-only" }, Ni = { "aria-hidden": "true" }, Pi = ["title"], Fi = { class: "sr-only" }, Ii = {
|
|
1420
1478
|
class: "font-mono text-xs text-ink/55",
|
|
1421
1479
|
"aria-hidden": "true"
|
|
1422
|
-
},
|
|
1480
|
+
}, Li = /* @__PURE__ */ f({
|
|
1423
1481
|
__name: "Footer",
|
|
1424
1482
|
props: {
|
|
1425
|
-
links: { default: () =>
|
|
1483
|
+
links: { default: () => Ci },
|
|
1426
1484
|
moreLinks: { default: () => [] },
|
|
1427
1485
|
linkComponent: { default: void 0 },
|
|
1428
1486
|
appName: {},
|
|
@@ -1449,7 +1507,7 @@ var Si = [
|
|
|
1449
1507
|
ui: {}
|
|
1450
1508
|
},
|
|
1451
1509
|
setup(e) {
|
|
1452
|
-
let { t, availableLocales: r } = J(), l = i(() => f.languageSwitcher && r.length > 1), f = e, p = i(() =>
|
|
1510
|
+
let { t, availableLocales: r } = J(), l = i(() => f.languageSwitcher && r.length > 1), f = e, p = i(() => bi(f.year ?? (/* @__PURE__ */ new Date()).getFullYear(), f.since)), m = i(() => xi(f.version)), h = i(() => f.version ? t("ui.footer.version", { version: Si(f.version) }) : ""), g = i(() => f.build ? t("ui.footer.build", { build: f.build }) : "");
|
|
1453
1511
|
function _(e) {
|
|
1454
1512
|
return e.to === void 0 ? {
|
|
1455
1513
|
href: e.href,
|
|
@@ -1463,33 +1521,33 @@ var Si = [
|
|
|
1463
1521
|
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", {
|
|
1464
1522
|
"aria-label": P(t)("ui.footer.label"),
|
|
1465
1523
|
class: b(P(X)("min-w-0", e.ui?.links))
|
|
1466
|
-
}, [A(r.$slots, "nav", {}, () => [c("ul",
|
|
1524
|
+
}, [A(r.$slots, "nav", {}, () => [c("ul", Ei, [
|
|
1467
1525
|
(T(!0), s(n, null, k(e.links, (e) => (T(), s("li", { key: e.label }, [d(Br, v({ ref_for: !0 }, _(e), { icon: !1 }), {
|
|
1468
1526
|
default: H(() => [u(N(e.label), 1)]),
|
|
1469
1527
|
_: 2
|
|
1470
1528
|
}, 1040)]))), 128)),
|
|
1471
|
-
e.moreLinks.length ? (T(), s("li",
|
|
1529
|
+
e.moreLinks.length ? (T(), s("li", Di)) : o("", !0),
|
|
1472
1530
|
(T(!0), s(n, null, k(e.moreLinks, (e) => (T(), s("li", { key: e.label }, [d(Br, v({ ref_for: !0 }, _(e), { icon: !1 }), {
|
|
1473
1531
|
default: H(() => [u(N(e.label), 1)]),
|
|
1474
1532
|
_: 2
|
|
1475
1533
|
}, 1040)]))), 128))
|
|
1476
|
-
])])], 10,
|
|
1477
|
-
l.value || e.themeSwitcher ? (T(), s("div",
|
|
1534
|
+
])])], 10, Ti), c("div", { class: b(P(X)("flex flex-wrap items-center gap-x-3 gap-y-2 sm:justify-end", e.ui?.meta)) }, [
|
|
1535
|
+
l.value || e.themeSwitcher ? (T(), s("div", Oi, [l.value ? (T(), a(hi, {
|
|
1478
1536
|
key: 0,
|
|
1479
1537
|
"hide-label": "",
|
|
1480
1538
|
class: "w-44"
|
|
1481
|
-
})) : o("", !0), e.themeSwitcher ? (T(), a(
|
|
1539
|
+
})) : o("", !0), e.themeSwitcher ? (T(), a(yi, {
|
|
1482
1540
|
key: 1,
|
|
1483
1541
|
"hide-label": "",
|
|
1484
|
-
appearance: "
|
|
1542
|
+
appearance: "icons"
|
|
1485
1543
|
})) : o("", !0)])) : o("", !0),
|
|
1486
|
-
e.appName || e.version || e.build ? (T(), s("p",
|
|
1487
|
-
e.appName ? (T(), s("span",
|
|
1488
|
-
e.version ? (T(), s("span",
|
|
1544
|
+
e.appName || e.version || e.build ? (T(), s("p", ki, [
|
|
1545
|
+
e.appName ? (T(), s("span", Ai, N(e.appName), 1)) : o("", !0),
|
|
1546
|
+
e.version ? (T(), s("span", ji, [c("span", Mi, N(h.value), 1), c("span", Ni, N(m.value), 1)])) : o("", !0),
|
|
1489
1547
|
e.build ? (T(), s("span", {
|
|
1490
1548
|
key: 2,
|
|
1491
1549
|
title: g.value
|
|
1492
|
-
}, [c("span",
|
|
1550
|
+
}, [c("span", Fi, N(g.value), 1), c("span", Ii, N(e.build), 1)], 8, Pi)) : o("", !0)
|
|
1493
1551
|
])) : o("", !0),
|
|
1494
1552
|
c("p", null, N(P(t)("ui.footer.copyright", {
|
|
1495
1553
|
years: p.value,
|
|
@@ -1500,42 +1558,42 @@ var Si = [
|
|
|
1500
1558
|
}
|
|
1501
1559
|
});
|
|
1502
1560
|
// src/lib/initials.ts
|
|
1503
|
-
function
|
|
1561
|
+
function Ri(e) {
|
|
1504
1562
|
let t = e.replace(/\([^)]*\)|\[[^\]]*\]/g, " ").split(/\s+/).map((e) => e.replace(/^[^\p{L}\p{N}]+/u, "")).filter(Boolean);
|
|
1505
1563
|
if (!t.length) return "";
|
|
1506
1564
|
let n = t[0], r = t.length > 1 ? t[t.length - 1] : "";
|
|
1507
1565
|
return ([...n][0] + ([...r][0] ?? "")).toUpperCase();
|
|
1508
1566
|
}
|
|
1509
1567
|
// src/components/Avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
1510
|
-
var
|
|
1568
|
+
var zi = ["aria-label"], Bi = [
|
|
1511
1569
|
"src",
|
|
1512
1570
|
"width",
|
|
1513
1571
|
"height"
|
|
1514
|
-
],
|
|
1572
|
+
], Vi = {
|
|
1515
1573
|
key: 1,
|
|
1516
1574
|
"aria-hidden": "true"
|
|
1517
|
-
},
|
|
1575
|
+
}, Hi = { class: "flex flex-col" }, Ui = {
|
|
1518
1576
|
key: 0,
|
|
1519
1577
|
class: "truncate px-4 pt-3 text-xs font-bold text-ink/65 uppercase"
|
|
1520
|
-
},
|
|
1578
|
+
}, Wi = { class: "flex items-center gap-3 px-4 py-3" }, Gi = [
|
|
1521
1579
|
"src",
|
|
1522
1580
|
"width",
|
|
1523
1581
|
"height"
|
|
1524
|
-
],
|
|
1582
|
+
], Ki = { class: "flex min-w-0 flex-col" }, qi = { class: "truncate font-bold" }, Ji = {
|
|
1525
1583
|
key: 0,
|
|
1526
1584
|
class: "truncate text-sm text-ink/65"
|
|
1527
|
-
},
|
|
1585
|
+
}, Yi = ["href"], Xi = [
|
|
1528
1586
|
"role",
|
|
1529
1587
|
"aria-label",
|
|
1530
1588
|
"aria-hidden"
|
|
1531
|
-
],
|
|
1589
|
+
], Zi = [
|
|
1532
1590
|
"src",
|
|
1533
1591
|
"width",
|
|
1534
1592
|
"height"
|
|
1535
|
-
],
|
|
1593
|
+
], Qi = {
|
|
1536
1594
|
key: 1,
|
|
1537
1595
|
"aria-hidden": "true"
|
|
1538
|
-
},
|
|
1596
|
+
}, $i = "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary font-bold text-white select-none", ea = /* @__PURE__ */ f({
|
|
1539
1597
|
__name: "Avatar",
|
|
1540
1598
|
props: {
|
|
1541
1599
|
user: {},
|
|
@@ -1551,7 +1609,7 @@ var Ri = ["aria-label"], zi = [
|
|
|
1551
1609
|
] }
|
|
1552
1610
|
},
|
|
1553
1611
|
setup(e) {
|
|
1554
|
-
let t = e, r = i(() =>
|
|
1612
|
+
let t = e, r = i(() => Ri(t.user.name)), l = O(!1);
|
|
1555
1613
|
B(() => t.user.avatar, () => l.value = !1);
|
|
1556
1614
|
let d = i(() => !!t.user.avatar && !l.value), f = i(() => d.value || !r.value ? t.user.name : `${r.value}, ${t.user.name}`), p = {
|
|
1557
1615
|
xs: "size-5 text-xs",
|
|
@@ -1578,8 +1636,8 @@ var Ri = ["aria-label"], zi = [
|
|
|
1578
1636
|
},
|
|
1579
1637
|
ui: { content: "w-64" }
|
|
1580
1638
|
}, {
|
|
1581
|
-
content: H(() => [c("div",
|
|
1582
|
-
class: b(P(X)(
|
|
1639
|
+
content: H(() => [c("div", Hi, [e.user.organisation ? (T(), s("p", Ui, N(e.user.organisation), 1)) : o("", !0), c("div", Wi, [c("span", {
|
|
1640
|
+
class: b(P(X)($i, p.lg)),
|
|
1583
1641
|
"aria-hidden": "true"
|
|
1584
1642
|
}, [d.value ? (T(), s("img", {
|
|
1585
1643
|
key: 0,
|
|
@@ -1590,19 +1648,19 @@ var Ri = ["aria-label"], zi = [
|
|
|
1590
1648
|
decoding: "async",
|
|
1591
1649
|
alt: "",
|
|
1592
1650
|
class: "size-full object-cover"
|
|
1593
|
-
}, null, 8,
|
|
1594
|
-
c("span",
|
|
1595
|
-
e.user.role ? (T(), s("span",
|
|
1651
|
+
}, null, 8, Gi)) : (T(), s(n, { key: 1 }, [u(N(r.value), 1)], 64))], 2), c("div", Ki, [
|
|
1652
|
+
c("span", qi, N(e.user.name), 1),
|
|
1653
|
+
e.user.role ? (T(), s("span", Ji, N(e.user.role), 1)) : o("", !0),
|
|
1596
1654
|
e.user.email ? (T(), s("a", {
|
|
1597
1655
|
key: 1,
|
|
1598
1656
|
href: `mailto:${e.user.email}`,
|
|
1599
1657
|
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"
|
|
1600
|
-
}, N(e.user.email), 9,
|
|
1658
|
+
}, N(e.user.email), 9, Yi)) : o("", !0)
|
|
1601
1659
|
])])])]),
|
|
1602
1660
|
default: H(() => [c("button", {
|
|
1603
1661
|
type: "button",
|
|
1604
1662
|
"aria-label": f.value,
|
|
1605
|
-
class: b(P(X)(
|
|
1663
|
+
class: b(P(X)($i, p[e.size], "cursor-pointer outline-2 outline-offset-1 outline-transparent transition focus-visible:outline-focus", t.class))
|
|
1606
1664
|
}, [d.value ? (T(), s("img", {
|
|
1607
1665
|
key: 0,
|
|
1608
1666
|
src: e.user.avatar,
|
|
@@ -1613,14 +1671,14 @@ var Ri = ["aria-label"], zi = [
|
|
|
1613
1671
|
alt: "",
|
|
1614
1672
|
class: "size-full object-cover",
|
|
1615
1673
|
onError: h[0] ||= (e) => l.value = !0
|
|
1616
|
-
}, null, 40,
|
|
1674
|
+
}, null, 40, Bi)) : (T(), s("span", Vi, N(r.value), 1))], 10, zi)]),
|
|
1617
1675
|
_: 1
|
|
1618
1676
|
})) : (T(), s("span", {
|
|
1619
1677
|
key: 1,
|
|
1620
1678
|
role: e.decorative ? void 0 : "img",
|
|
1621
1679
|
"aria-label": e.decorative ? void 0 : e.user.name,
|
|
1622
1680
|
"aria-hidden": e.decorative || void 0,
|
|
1623
|
-
class: b(P(X)(
|
|
1681
|
+
class: b(P(X)($i, p[e.size], t.class))
|
|
1624
1682
|
}, [d.value ? (T(), s("img", {
|
|
1625
1683
|
key: 0,
|
|
1626
1684
|
src: e.user.avatar,
|
|
@@ -1631,15 +1689,15 @@ var Ri = ["aria-label"], zi = [
|
|
|
1631
1689
|
alt: "",
|
|
1632
1690
|
class: "size-full object-cover",
|
|
1633
1691
|
onError: h[1] ||= (e) => l.value = !0
|
|
1634
|
-
}, null, 40,
|
|
1692
|
+
}, null, 40, Zi)) : (T(), s("span", Qi, N(r.value), 1))], 10, Xi));
|
|
1635
1693
|
}
|
|
1636
|
-
}),
|
|
1694
|
+
}), ta = ["src", "alt"], na = ["src", "alt"], ra = ["src"], ia = ["src"], aa = { class: "truncate" }, oa = { class: "flex flex-col" }, sa = {
|
|
1637
1695
|
key: 0,
|
|
1638
1696
|
class: "border-b border-ink/10"
|
|
1639
|
-
},
|
|
1697
|
+
}, ca = ["title"], la = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, ua = { class: "flex min-w-0 flex-col" }, da = ["title"], fa = ["title"], pa = {
|
|
1640
1698
|
key: 1,
|
|
1641
1699
|
class: "flex items-center gap-2 border-t border-ink/10 px-4 py-3"
|
|
1642
|
-
},
|
|
1700
|
+
}, ma = /* @__PURE__ */ f({
|
|
1643
1701
|
__name: "Header",
|
|
1644
1702
|
props: {
|
|
1645
1703
|
title: {},
|
|
@@ -1688,7 +1746,7 @@ var Ri = ["aria-label"], zi = [
|
|
|
1688
1746
|
"sign-in"
|
|
1689
1747
|
],
|
|
1690
1748
|
setup(e, { emit: t }) {
|
|
1691
|
-
let { t: r } = J(), l = e, f = t, p = i(() =>
|
|
1749
|
+
let { t: r } = J(), l = e, f = t, p = i(() => Ri(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
1750
|
initials: p.value,
|
|
1693
1751
|
name: l.user.name
|
|
1694
1752
|
}) : ""), h = i(() => {
|
|
@@ -1727,21 +1785,21 @@ var Ri = ["aria-label"], zi = [
|
|
|
1727
1785
|
src: x.value.light,
|
|
1728
1786
|
alt: e.title ?? "",
|
|
1729
1787
|
class: b(P(X)("h-6 w-auto max-w-full", x.value.dark && "dark:hidden"))
|
|
1730
|
-
}, null, 10,
|
|
1788
|
+
}, null, 10, ta), x.value.dark ? (T(), s("img", {
|
|
1731
1789
|
key: 0,
|
|
1732
1790
|
src: x.value.dark,
|
|
1733
1791
|
alt: e.title ?? "",
|
|
1734
1792
|
class: "hidden h-6 w-auto max-w-full dark:block"
|
|
1735
|
-
}, null, 8,
|
|
1793
|
+
}, null, 8, na)) : o("", !0)], 64)) : (T(), s(n, { key: 1 }, [y.value ? (T(), s(n, { key: 0 }, [c("img", {
|
|
1736
1794
|
src: y.value.light,
|
|
1737
1795
|
alt: "",
|
|
1738
1796
|
class: b(P(X)("size-5 shrink-0", y.value.dark && "dark:hidden"))
|
|
1739
|
-
}, null, 10,
|
|
1797
|
+
}, null, 10, ra), y.value.dark ? (T(), s("img", {
|
|
1740
1798
|
key: 0,
|
|
1741
1799
|
src: y.value.dark,
|
|
1742
1800
|
alt: "",
|
|
1743
1801
|
class: "hidden size-5 shrink-0 dark:block"
|
|
1744
|
-
}, null, 8,
|
|
1802
|
+
}, null, 8, ia)) : o("", !0)], 64)) : o("", !0), c("span", aa, N(e.title), 1)], 64))])]),
|
|
1745
1803
|
_: 3
|
|
1746
1804
|
}, 16, ["class"])) : o("", !0),
|
|
1747
1805
|
c("div", { class: b(P(X)("flex min-w-0 flex-1 items-center", e.ui?.middle)) }, [A(t.$slots, "default")], 2),
|
|
@@ -1753,25 +1811,25 @@ var Ri = ["aria-label"], zi = [
|
|
|
1753
1811
|
content: { align: "end" },
|
|
1754
1812
|
ui: { content: P(X)("w-80", e.ui?.userMenu) }
|
|
1755
1813
|
}, {
|
|
1756
|
-
content: H(({ close: n }) => [c("div",
|
|
1757
|
-
e.user.organisation || t.$slots.organisation ? (T(), s("div",
|
|
1814
|
+
content: H(({ close: n }) => [c("div", oa, [
|
|
1815
|
+
e.user.organisation || t.$slots.organisation ? (T(), s("div", sa, [A(t.$slots, "organisation", { close: n }, () => [c("p", {
|
|
1758
1816
|
class: "truncate px-4 py-3 text-xs font-bold text-ink/65 uppercase",
|
|
1759
1817
|
title: e.user.organisation
|
|
1760
|
-
}, N(e.user.organisation), 9,
|
|
1761
|
-
c("div",
|
|
1762
|
-
d(
|
|
1818
|
+
}, N(e.user.organisation), 9, ca)])])) : o("", !0),
|
|
1819
|
+
c("div", la, [
|
|
1820
|
+
d(ea, {
|
|
1763
1821
|
user: e.user,
|
|
1764
1822
|
size: "lg",
|
|
1765
1823
|
decorative: ""
|
|
1766
1824
|
}, null, 8, ["user"]),
|
|
1767
|
-
c("div",
|
|
1825
|
+
c("div", ua, [c("span", {
|
|
1768
1826
|
class: "truncate font-bold",
|
|
1769
1827
|
title: e.user.name
|
|
1770
|
-
}, N(e.user.name), 9,
|
|
1828
|
+
}, N(e.user.name), 9, da), e.user.email ? (T(), s("span", {
|
|
1771
1829
|
key: 0,
|
|
1772
1830
|
class: "truncate text-sm text-ink/65",
|
|
1773
1831
|
title: e.user.email
|
|
1774
|
-
}, N(e.user.email), 9,
|
|
1832
|
+
}, N(e.user.email), 9, fa)) : o("", !0)]),
|
|
1775
1833
|
e.userActions.includes("account-settings") ? (T(), a(Z, {
|
|
1776
1834
|
key: 0,
|
|
1777
1835
|
size: "sm",
|
|
@@ -1784,7 +1842,7 @@ var Ri = ["aria-label"], zi = [
|
|
|
1784
1842
|
}, 8, ["onClick"])) : o("", !0)
|
|
1785
1843
|
]),
|
|
1786
1844
|
A(t.$slots, "account-menu", { close: n }),
|
|
1787
|
-
e.userActions.includes("switch-account") || e.userActions.includes("log-out") ? (T(), s("div",
|
|
1845
|
+
e.userActions.includes("switch-account") || e.userActions.includes("log-out") ? (T(), s("div", pa, [e.userActions.includes("switch-account") ? (T(), a(Z, {
|
|
1788
1846
|
key: 0,
|
|
1789
1847
|
onClick: (e) => S("switch-account", n)
|
|
1790
1848
|
}, {
|
|
@@ -1807,7 +1865,7 @@ var Ri = ["aria-label"], zi = [
|
|
|
1807
1865
|
"aria-label": m.value,
|
|
1808
1866
|
class: "-mr-1.5 rounded-full"
|
|
1809
1867
|
}, {
|
|
1810
|
-
default: H(() => [d(
|
|
1868
|
+
default: H(() => [d(ea, {
|
|
1811
1869
|
user: e.user,
|
|
1812
1870
|
size: "sm",
|
|
1813
1871
|
decorative: ""
|
|
@@ -1826,7 +1884,7 @@ var Ri = ["aria-label"], zi = [
|
|
|
1826
1884
|
})) : o("", !0)])], 2)) : o("", !0)
|
|
1827
1885
|
], 2));
|
|
1828
1886
|
}
|
|
1829
|
-
}),
|
|
1887
|
+
}), ha = "inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-ink/10 font-bold", ga = /* @__PURE__ */ f({
|
|
1830
1888
|
__name: "Badge",
|
|
1831
1889
|
props: {
|
|
1832
1890
|
color: { default: "basic" },
|
|
@@ -1852,7 +1910,7 @@ var Ri = ["aria-label"], zi = [
|
|
|
1852
1910
|
md: "h-6 px-2 text-xs gap-1 [&_svg]:size-3.5",
|
|
1853
1911
|
lg: "h-7 px-2.5 text-sm gap-1.5 [&_svg]:size-4"
|
|
1854
1912
|
};
|
|
1855
|
-
return (i, a) => (T(), s("span", { class: b(P(X)(
|
|
1913
|
+
return (i, a) => (T(), s("span", { class: b(P(X)(ha, n[e.color], r[e.size], t.class)) }, [
|
|
1856
1914
|
A(i.$slots, "leading"),
|
|
1857
1915
|
A(i.$slots, "default"),
|
|
1858
1916
|
A(i.$slots, "trailing")
|
|
@@ -1860,27 +1918,27 @@ var Ri = ["aria-label"], zi = [
|
|
|
1860
1918
|
}
|
|
1861
1919
|
});
|
|
1862
1920
|
// src/components/Sidebar/sidebar.ts
|
|
1863
|
-
function
|
|
1921
|
+
function _a(e = [], t = []) {
|
|
1864
1922
|
for (let n of [...e, ...t.flatMap((e) => e.items)]) {
|
|
1865
1923
|
if (n.active) return [n];
|
|
1866
1924
|
if (n.children?.length) {
|
|
1867
|
-
let e =
|
|
1925
|
+
let e = _a(n.children);
|
|
1868
1926
|
if (e.length) return [n, ...e];
|
|
1869
1927
|
}
|
|
1870
1928
|
}
|
|
1871
1929
|
return [];
|
|
1872
1930
|
}
|
|
1873
1931
|
// src/components/Sidebar/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1874
|
-
var
|
|
1932
|
+
var va = ["data-collapsed"], ya = ["aria-label"], ba = ["data-level"], xa = {
|
|
1875
1933
|
key: 0,
|
|
1876
1934
|
class: "-mb-2 flex flex-col gap-1 border-b border-ink/10 pb-2"
|
|
1877
|
-
},
|
|
1935
|
+
}, Sa = ["title"], Ca = {
|
|
1878
1936
|
key: 0,
|
|
1879
1937
|
class: "relative flex h-6 items-center px-3"
|
|
1880
|
-
},
|
|
1938
|
+
}, wa = ["id"], Ta = ["aria-labelledby"], Ea = {
|
|
1881
1939
|
key: 0,
|
|
1882
1940
|
class: "sr-only"
|
|
1883
|
-
},
|
|
1941
|
+
}, Da = "transition-opacity duration-150 motion-reduce:transition-none", Oa = "bg-primary/10 font-bold text-primary-fg not-aria-disabled:not-disabled:hover:bg-primary/15", ka = "font-bold text-primary-fg", Aa = /* @__PURE__ */ f({
|
|
1884
1942
|
__name: "Sidebar",
|
|
1885
1943
|
props: /*@__PURE__*/ _({
|
|
1886
1944
|
items: { default: () => [] },
|
|
@@ -1916,7 +1974,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
1916
1974
|
e.push(r), t = r.children;
|
|
1917
1975
|
}
|
|
1918
1976
|
return e;
|
|
1919
|
-
}), S = i(() => x.value[x.value.length - 1]), C = i(() => S.value ? [{ items: S.value.children }] : g.value), w = i(() =>
|
|
1977
|
+
}), S = i(() => x.value[x.value.length - 1]), C = i(() => S.value ? [{ items: S.value.children }] : g.value), w = i(() => _a(f.items, f.sections)), E = i(() => new Set(w.value.slice(0, -1).map((e) => e.label)));
|
|
1920
1978
|
B(() => w.value.map((e) => e.label).join("\0"), () => {
|
|
1921
1979
|
_.value = w.value.slice(0, -1).map((e) => e.label);
|
|
1922
1980
|
}, { immediate: !0 });
|
|
@@ -1990,21 +2048,21 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
1990
2048
|
key: D.value,
|
|
1991
2049
|
"data-level": D.value,
|
|
1992
2050
|
class: "flex flex-col gap-4"
|
|
1993
|
-
}, [S.value ? (T(), s("div",
|
|
2051
|
+
}, [S.value ? (T(), s("div", xa, [c("button", {
|
|
1994
2052
|
type: "button",
|
|
1995
2053
|
"data-back": "",
|
|
1996
2054
|
title: m.value ? P(l)("ui.sidebar.backFrom", { name: S.value.label }) : void 0,
|
|
1997
2055
|
class: b(P(X)(q, "font-bold", e.ui?.item)),
|
|
1998
2056
|
onClick: U
|
|
1999
|
-
}, [d(P(he), { "aria-hidden": "true" }), c("span", { class: b(P(X)("min-w-0 flex-1 truncate",
|
|
2057
|
+
}, [d(P(he), { "aria-hidden": "true" }), c("span", { class: b(P(X)("min-w-0 flex-1 truncate", Da, m.value && "opacity-0")) }, [i[1] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(N(S.value.label), 1)], 2)], 10, Sa)])) : o("", !0), (T(!0), s(n, null, k(C.value, (r, i) => (T(), s("div", {
|
|
2000
2058
|
key: i,
|
|
2001
2059
|
class: "flex flex-col gap-1"
|
|
2002
|
-
}, [r.label ? (T(), s("div",
|
|
2060
|
+
}, [r.label ? (T(), s("div", Ca, [c("div", {
|
|
2003
2061
|
id: `${P(h)}-section-${i}`,
|
|
2004
|
-
class: b(P(X)("truncate text-xs font-bold text-ink/65 uppercase",
|
|
2005
|
-
}, N(r.label), 11,
|
|
2062
|
+
class: b(P(X)("truncate text-xs font-bold text-ink/65 uppercase", Da, m.value && "opacity-0"))
|
|
2063
|
+
}, N(r.label), 11, wa), c("div", {
|
|
2006
2064
|
"aria-hidden": "true",
|
|
2007
|
-
class: b(P(X)("absolute inset-x-2 top-1/2 border-t border-ink/10",
|
|
2065
|
+
class: b(P(X)("absolute inset-x-2 top-1/2 border-t border-ink/10", Da, !m.value && "opacity-0"))
|
|
2008
2066
|
}, null, 2)])) : o("", !0), c("ul", {
|
|
2009
2067
|
class: "flex flex-col gap-1",
|
|
2010
2068
|
"aria-labelledby": r.label ? `${P(h)}-section-${i}` : void 0
|
|
@@ -2013,7 +2071,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2013
2071
|
"data-parent": n.children?.length ? n.label : void 0,
|
|
2014
2072
|
"aria-current": n.active ? "page" : void 0,
|
|
2015
2073
|
title: m.value ? n.label : void 0,
|
|
2016
|
-
class: P(X)(q, n.active &&
|
|
2074
|
+
class: P(X)(q, n.active && Oa, E.value.has(n.label) && ka, e.ui?.item),
|
|
2017
2075
|
onClick: (e) => K(n, e)
|
|
2018
2076
|
}), {
|
|
2019
2077
|
default: H(() => [A(t.$slots, "item", {
|
|
@@ -2025,12 +2083,12 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2025
2083
|
key: 0,
|
|
2026
2084
|
"aria-hidden": "true"
|
|
2027
2085
|
})) : o("", !0),
|
|
2028
|
-
c("span", { class: b(P(X)("min-w-0 flex-1 truncate",
|
|
2029
|
-
n.badge !== void 0 && n.badge !== "" ? (T(), a(
|
|
2086
|
+
c("span", { class: b(P(X)("min-w-0 flex-1 truncate", Da, m.value && "opacity-0")) }, [u(N(n.label), 1), n.children?.length ? (T(), s("span", Ea, ", more options")) : o("", !0)], 2),
|
|
2087
|
+
n.badge !== void 0 && n.badge !== "" ? (T(), a(ga, {
|
|
2030
2088
|
key: 1,
|
|
2031
2089
|
size: "sm",
|
|
2032
2090
|
color: n.badgeColor,
|
|
2033
|
-
class: b(P(X)(
|
|
2091
|
+
class: b(P(X)(Da, m.value && "opacity-0"))
|
|
2034
2092
|
}, {
|
|
2035
2093
|
default: H(() => [u(N(n.badge), 1)]),
|
|
2036
2094
|
_: 2
|
|
@@ -2038,7 +2096,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2038
2096
|
n.children?.length ? (T(), a(P(ge), {
|
|
2039
2097
|
key: 2,
|
|
2040
2098
|
"aria-hidden": "true",
|
|
2041
|
-
class: b(P(X)("opacity-70",
|
|
2099
|
+
class: b(P(X)("opacity-70", Da, m.value && "opacity-0"))
|
|
2042
2100
|
}, null, 8, ["class"])) : o("", !0)
|
|
2043
2101
|
])]),
|
|
2044
2102
|
_: 2
|
|
@@ -2048,9 +2106,9 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2048
2106
|
"title",
|
|
2049
2107
|
"class",
|
|
2050
2108
|
"onClick"
|
|
2051
|
-
]))]))), 128))], 8,
|
|
2109
|
+
]))]))), 128))], 8, Ta)]))), 128))], 8, ba))]),
|
|
2052
2110
|
_: 3
|
|
2053
|
-
}, 16)], 10,
|
|
2111
|
+
}, 16)], 10, ya),
|
|
2054
2112
|
t.$slots.footer || e.collapsible ? (T(), s("div", {
|
|
2055
2113
|
key: 1,
|
|
2056
2114
|
class: b(P(X)("flex shrink-0 flex-col gap-1 overflow-hidden border-t border-ink/10 p-2", e.ui?.footer))
|
|
@@ -2066,16 +2124,16 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2066
2124
|
default: H(() => [m.value ? (T(), a(P(Be), { key: 0 })) : (T(), a(P(ze), { key: 1 }))]),
|
|
2067
2125
|
_: 1
|
|
2068
2126
|
}, 8, ["aria-label", "aria-expanded"])) : o("", !0)], 2)) : o("", !0)
|
|
2069
|
-
], 10,
|
|
2127
|
+
], 10, va));
|
|
2070
2128
|
}
|
|
2071
|
-
}),
|
|
2129
|
+
}), ja = { class: "absolute inset-x-0 top-1/2 flex -translate-y-1/2 gap-1" }, Ma = [
|
|
2072
2130
|
"disabled",
|
|
2073
2131
|
"aria-label",
|
|
2074
2132
|
"onClick"
|
|
2075
|
-
],
|
|
2133
|
+
], Na = {
|
|
2076
2134
|
key: 1,
|
|
2077
2135
|
class: "flex-1"
|
|
2078
|
-
},
|
|
2136
|
+
}, Pa = "h-1.5 overflow-hidden rounded-full bg-ink/10", Fa = "h-full rounded-full bg-primary transition-[translate,background-color] duration-300 ease-out motion-reduce:transition-none", Ia = "h-1.5 w-full rounded-full transition-colors", La = /* @__PURE__ */ f({
|
|
2079
2137
|
__name: "Progress",
|
|
2080
2138
|
props: {
|
|
2081
2139
|
value: { default: null },
|
|
@@ -2115,14 +2173,14 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2115
2173
|
}, {
|
|
2116
2174
|
default: H(() => [(T(!0), s(n, null, k(e.max, (e) => (T(), s("div", {
|
|
2117
2175
|
key: e,
|
|
2118
|
-
class: b(P(X)(
|
|
2119
|
-
}, [c("div", { class: b(P(X)(
|
|
2176
|
+
class: b(P(X)(Pa, "flex-1"))
|
|
2177
|
+
}, [c("div", { class: b(P(X)(Fa, e <= f.value ? "translate-x-0" : "-translate-x-full")) }, null, 2)], 2))), 128))]),
|
|
2120
2178
|
_: 1
|
|
2121
2179
|
}, 8, [
|
|
2122
2180
|
"model-value",
|
|
2123
2181
|
"max",
|
|
2124
2182
|
"get-value-label"
|
|
2125
|
-
]), c("div",
|
|
2183
|
+
]), c("div", ja, [(T(!0), s(n, null, k(e.max, (t) => (T(), s(n, { key: t }, [t < f.value ? (T(), s("button", {
|
|
2126
2184
|
key: 0,
|
|
2127
2185
|
type: "button",
|
|
2128
2186
|
"data-progress-segment": "",
|
|
@@ -2133,24 +2191,24 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2133
2191
|
name: e.segmentLabels[t - 1]
|
|
2134
2192
|
}),
|
|
2135
2193
|
onClick: (e) => l("select", t - 1)
|
|
2136
|
-
}, [c("span", { class: b(
|
|
2194
|
+
}, [c("span", { class: b(Ia) })], 8, Ma)) : (T(), s("span", Na))], 64))), 128))])], 2)) : (T(), a(P(dn), {
|
|
2137
2195
|
key: 1,
|
|
2138
2196
|
"model-value": u.value ? null : f.value,
|
|
2139
2197
|
max: e.max,
|
|
2140
2198
|
"get-value-label": () => e.label,
|
|
2141
2199
|
"get-value-text": m,
|
|
2142
2200
|
"aria-busy": u.value || void 0,
|
|
2143
|
-
class: b(P(X)(e.segments && !u.value ? "flex gap-1" :
|
|
2201
|
+
class: b(P(X)(e.segments && !u.value ? "flex gap-1" : Pa, o.class))
|
|
2144
2202
|
}, {
|
|
2145
2203
|
default: H(() => [e.segments && !u.value ? (T(!0), s(n, { key: 0 }, k(e.max, (e) => (T(), s("div", {
|
|
2146
2204
|
key: e,
|
|
2147
|
-
class: b(P(X)(
|
|
2148
|
-
}, [c("div", { class: b(P(X)(
|
|
2205
|
+
class: b(P(X)(Pa, "flex-1"))
|
|
2206
|
+
}, [c("div", { class: b(P(X)(Fa, e <= f.value ? "translate-x-0" : "-translate-x-full")) }, null, 2)], 2))), 128)) : u.value ? (T(), a(P(un), {
|
|
2149
2207
|
key: 1,
|
|
2150
2208
|
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"
|
|
2151
2209
|
})) : (T(), a(P(un), {
|
|
2152
2210
|
key: 2,
|
|
2153
|
-
class: b(
|
|
2211
|
+
class: b(Fa),
|
|
2154
2212
|
style: S({ translate: `${p.value - 100}% 0` })
|
|
2155
2213
|
}, null, 8, ["style"]))]),
|
|
2156
2214
|
_: 1
|
|
@@ -2162,18 +2220,18 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2162
2220
|
"class"
|
|
2163
2221
|
]));
|
|
2164
2222
|
}
|
|
2165
|
-
}),
|
|
2223
|
+
}), Ra = { class: "flex items-start gap-4" }, za = { class: "flex min-w-0 flex-1 flex-col gap-1" }, Ba = {
|
|
2166
2224
|
key: 0,
|
|
2167
2225
|
class: "h-5",
|
|
2168
2226
|
"aria-hidden": "true"
|
|
2169
|
-
},
|
|
2227
|
+
}, Va = { key: 0 }, Ha = {
|
|
2170
2228
|
key: 2,
|
|
2171
2229
|
"aria-live": "polite",
|
|
2172
2230
|
class: "sr-only"
|
|
2173
|
-
},
|
|
2231
|
+
}, Ua = ["role", "aria-labelledby"], Wa = {
|
|
2174
2232
|
key: 0,
|
|
2175
2233
|
class: "flex min-h-9.5 flex-1"
|
|
2176
|
-
},
|
|
2234
|
+
}, Ga = "textarea, [contenteditable=\"true\"], input[type=checkbox], input[type=radio], input[type=button], input[type=submit]", Ka = /* @__PURE__ */ f({
|
|
2177
2235
|
__name: "Slideover",
|
|
2178
2236
|
props: /*@__PURE__*/ _({
|
|
2179
2237
|
title: {},
|
|
@@ -2274,7 +2332,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2274
2332
|
}
|
|
2275
2333
|
function q(e) {
|
|
2276
2334
|
let t = e.target;
|
|
2277
|
-
!f.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(
|
|
2335
|
+
!f.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(Ga) || (e.preventDefault(), K());
|
|
2278
2336
|
}
|
|
2279
2337
|
let te = 0;
|
|
2280
2338
|
function ne(e) {
|
|
@@ -2334,7 +2392,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2334
2392
|
e.title || e.description || e.close || e.steps || t.$slots.header || t.$slots.title ? (T(), s("header", {
|
|
2335
2393
|
key: 0,
|
|
2336
2394
|
class: b(P(X)("flex flex-col gap-4 border-b border-ink/10 px-6 py-4", e.ui?.header))
|
|
2337
|
-
}, [e.steps ? (T(), a(
|
|
2395
|
+
}, [e.steps ? (T(), a(La, {
|
|
2338
2396
|
key: 0,
|
|
2339
2397
|
label: e.title ?? P(n)("ui.slideover.steps"),
|
|
2340
2398
|
segments: "",
|
|
@@ -2349,12 +2407,12 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2349
2407
|
"max",
|
|
2350
2408
|
"segment-labels",
|
|
2351
2409
|
"disabled"
|
|
2352
|
-
])) : o("", !0), c("div",
|
|
2410
|
+
])) : o("", !0), c("div", Ra, [A(t.$slots, "header", { close: y }, () => [c("div", za, [
|
|
2353
2411
|
d(P(Ut), { class: b(e.title || t.$slots.title ? P(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
2354
2412
|
default: H(() => [A(t.$slots, "title", {}, () => [u(N(e.title), 1)])]),
|
|
2355
2413
|
_: 3
|
|
2356
2414
|
}, 8, ["class"]),
|
|
2357
|
-
e.steps ? (T(), s("div",
|
|
2415
|
+
e.steps ? (T(), s("div", Ba, [d(r, x(m(R.value)), {
|
|
2358
2416
|
default: H(() => [(T(), s("p", {
|
|
2359
2417
|
key: S.value,
|
|
2360
2418
|
class: "truncate text-sm text-ink/65"
|
|
@@ -2370,14 +2428,14 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2370
2428
|
as: "div",
|
|
2371
2429
|
class: "flex flex-col gap-1 text-sm text-ink/65"
|
|
2372
2430
|
}, {
|
|
2373
|
-
default: H(() => [e.description || t.$slots.description ? (T(), s("p",
|
|
2431
|
+
default: H(() => [e.description || t.$slots.description ? (T(), s("p", Va, [A(t.$slots, "description", {}, () => [u(N(e.description), 1)])])) : o("", !0), e.steps ? (T(), s("p", {
|
|
2374
2432
|
key: 1,
|
|
2375
2433
|
id: D,
|
|
2376
2434
|
class: "sr-only"
|
|
2377
2435
|
}, N(k.value), 1)) : o("", !0)]),
|
|
2378
2436
|
_: 3
|
|
2379
2437
|
})) : o("", !0),
|
|
2380
|
-
e.steps ? (T(), s("p",
|
|
2438
|
+
e.steps ? (T(), s("p", Ha, N(j.value), 1)) : o("", !0)
|
|
2381
2439
|
]), e.close ? (T(), a(P(Lt), {
|
|
2382
2440
|
key: 0,
|
|
2383
2441
|
"as-child": ""
|
|
@@ -2409,11 +2467,11 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2409
2467
|
}, 16)) : A(t.$slots, "body", {
|
|
2410
2468
|
close: y,
|
|
2411
2469
|
step: S.value
|
|
2412
|
-
}, void 0, void 0, 1)], 42,
|
|
2470
|
+
}, void 0, void 0, 1)], 42, Ua),
|
|
2413
2471
|
t.$slots.footer || e.steps ? (T(), s("footer", {
|
|
2414
2472
|
key: 1,
|
|
2415
2473
|
class: b(P(X)("flex justify-end gap-2 border-t border-ink/10 px-6 py-4", e.ui?.footer))
|
|
2416
|
-
}, [A(t.$slots, "footer", { close: y }, () => [e.steps ? (T(), s("div",
|
|
2474
|
+
}, [A(t.$slots, "footer", { close: y }, () => [e.steps ? (T(), s("div", Wa, [d(r, v(R.value, { onEnter: U }), {
|
|
2417
2475
|
default: H(() => [(T(), s("div", {
|
|
2418
2476
|
key: S.value,
|
|
2419
2477
|
class: "flex flex-1 justify-end gap-2"
|
|
@@ -2452,7 +2510,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2452
2510
|
_: 3
|
|
2453
2511
|
}, 8, ["open", "modal"]));
|
|
2454
2512
|
}
|
|
2455
|
-
}),
|
|
2513
|
+
}), qa = ["href"], Ja = { class: "flex flex-1" }, Ya = { class: "sticky top-12 hidden h-[calc(100dvh-var(--spacing)*12)] shrink-0 self-start lg:flex" }, Xa = { class: "flex min-w-0 flex-1 flex-col" }, Za = /* @__PURE__ */ f({
|
|
2456
2514
|
__name: "AppShell",
|
|
2457
2515
|
props: /*@__PURE__*/ _({
|
|
2458
2516
|
title: {},
|
|
@@ -2516,8 +2574,8 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2516
2574
|
c("a", {
|
|
2517
2575
|
href: `#${g}`,
|
|
2518
2576
|
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"
|
|
2519
|
-
}, " Skip to content ", 8,
|
|
2520
|
-
d(
|
|
2577
|
+
}, " Skip to content ", 8, qa),
|
|
2578
|
+
d(ma, v(e.header, {
|
|
2521
2579
|
title: e.title,
|
|
2522
2580
|
"title-to": e.titleTo,
|
|
2523
2581
|
"link-component": e.linkComponent,
|
|
@@ -2595,8 +2653,8 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2595
2653
|
"sign-in",
|
|
2596
2654
|
"ui"
|
|
2597
2655
|
]),
|
|
2598
|
-
c("div",
|
|
2599
|
-
c("div",
|
|
2656
|
+
c("div", Ja, [
|
|
2657
|
+
c("div", Ya, [d(Aa, v(e.sidebar, {
|
|
2600
2658
|
id: _,
|
|
2601
2659
|
collapsed: s.value,
|
|
2602
2660
|
"onUpdate:collapsed": f[6] ||= (e) => s.value = e,
|
|
@@ -2617,7 +2675,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2617
2675
|
"sections",
|
|
2618
2676
|
"link-component"
|
|
2619
2677
|
])]),
|
|
2620
|
-
d(
|
|
2678
|
+
d(Ka, {
|
|
2621
2679
|
open: u.value,
|
|
2622
2680
|
"onUpdate:open": f[8] ||= (e) => u.value = e,
|
|
2623
2681
|
side: "left",
|
|
@@ -2629,7 +2687,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2629
2687
|
body: "flex p-0"
|
|
2630
2688
|
}
|
|
2631
2689
|
}, {
|
|
2632
|
-
body: H(() => [d(
|
|
2690
|
+
body: H(() => [d(Aa, v(e.sidebar, {
|
|
2633
2691
|
items: e.items,
|
|
2634
2692
|
sections: e.sections,
|
|
2635
2693
|
"link-component": e.linkComponent,
|
|
@@ -2646,11 +2704,11 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2646
2704
|
])]),
|
|
2647
2705
|
_: 3
|
|
2648
2706
|
}, 8, ["open", "title"]),
|
|
2649
|
-
c("div",
|
|
2707
|
+
c("div", Xa, [c("main", {
|
|
2650
2708
|
id: g,
|
|
2651
2709
|
tabindex: "-1",
|
|
2652
2710
|
class: b(P(X)("min-w-0 flex-1 outline-none", e.ui?.main))
|
|
2653
|
-
}, [A(t.$slots, "default")], 2), e.footer ? (T(), a(
|
|
2711
|
+
}, [A(t.$slots, "default")], 2), e.footer ? (T(), a(Li, x(v({ key: 0 }, {
|
|
2654
2712
|
linkComponent: e.linkComponent,
|
|
2655
2713
|
...e.footer
|
|
2656
2714
|
})), null, 16)) : o("", !0)])
|
|
@@ -2659,7 +2717,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2659
2717
|
_: 3
|
|
2660
2718
|
}));
|
|
2661
2719
|
}
|
|
2662
|
-
}),
|
|
2720
|
+
}), Qa = ["aria-label"], $a = { class: "flex flex-wrap items-center gap-x-1.5 gap-y-1" }, eo = ["title"], to = { class: "truncate" }, no = { class: "truncate" }, ro = ["title"], io = { class: "truncate" }, ao = "inline-flex max-w-60 min-w-0 items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:shrink-0", oo = /* @__PURE__ */ f({
|
|
2663
2721
|
__name: "Breadcrumb",
|
|
2664
2722
|
props: {
|
|
2665
2723
|
items: {},
|
|
@@ -2695,29 +2753,29 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2695
2753
|
return (t, l) => (T(), s("nav", {
|
|
2696
2754
|
"aria-label": e.label ?? P(r)("ui.breadcrumb.label"),
|
|
2697
2755
|
class: b(P(X)("min-w-0 text-sm", i.class))
|
|
2698
|
-
}, [c("ol",
|
|
2756
|
+
}, [c("ol", $a, [(T(!0), s(n, null, k(e.items, (t, n) => (T(), s("li", {
|
|
2699
2757
|
key: `${t.label}-${n}`,
|
|
2700
2758
|
class: "flex min-w-0 items-center gap-1.5"
|
|
2701
2759
|
}, [n === e.items.length - 1 ? (T(), s("span", {
|
|
2702
2760
|
key: 0,
|
|
2703
2761
|
"aria-current": "page",
|
|
2704
2762
|
title: t.label,
|
|
2705
|
-
class: b(P(X)(
|
|
2763
|
+
class: b(P(X)(ao, "text-ink"))
|
|
2706
2764
|
}, [t.icon ? (T(), a(j(t.icon), {
|
|
2707
2765
|
key: 0,
|
|
2708
2766
|
"aria-hidden": "true"
|
|
2709
|
-
})) : o("", !0), c("span",
|
|
2767
|
+
})) : o("", !0), c("span", to, N(t.label), 1)], 10, eo)) : u(t) ? (T(), a(j(u(t)), v({
|
|
2710
2768
|
key: 1,
|
|
2711
2769
|
ref_for: !0
|
|
2712
2770
|
}, d(t), {
|
|
2713
2771
|
title: t.label,
|
|
2714
|
-
class: P(X)(
|
|
2772
|
+
class: P(X)(ao, p),
|
|
2715
2773
|
onClick: (e) => f(t, e)
|
|
2716
2774
|
}), {
|
|
2717
2775
|
default: H(() => [t.icon ? (T(), a(j(t.icon), {
|
|
2718
2776
|
key: 0,
|
|
2719
2777
|
"aria-hidden": "true"
|
|
2720
|
-
})) : o("", !0), c("span",
|
|
2778
|
+
})) : o("", !0), c("span", no, N(t.label), 1)]),
|
|
2721
2779
|
_: 2
|
|
2722
2780
|
}, 1040, [
|
|
2723
2781
|
"title",
|
|
@@ -2726,17 +2784,17 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2726
2784
|
])) : (T(), s("span", {
|
|
2727
2785
|
key: 2,
|
|
2728
2786
|
title: t.label,
|
|
2729
|
-
class: b(P(X)(
|
|
2787
|
+
class: b(P(X)(ao, "text-ink/65"))
|
|
2730
2788
|
}, [t.icon ? (T(), a(j(t.icon), {
|
|
2731
2789
|
key: 0,
|
|
2732
2790
|
"aria-hidden": "true"
|
|
2733
|
-
})) : o("", !0), c("span",
|
|
2791
|
+
})) : o("", !0), c("span", io, N(t.label), 1)], 10, ro)), n < e.items.length - 1 ? (T(), a(P(ge), {
|
|
2734
2792
|
key: 3,
|
|
2735
2793
|
"aria-hidden": "true",
|
|
2736
2794
|
class: "size-3.5 shrink-0 text-ink/40"
|
|
2737
|
-
})) : o("", !0)]))), 128))])], 10,
|
|
2795
|
+
})) : o("", !0)]))), 128))])], 10, Qa));
|
|
2738
2796
|
}
|
|
2739
|
-
}),
|
|
2797
|
+
}), so = /* @__PURE__ */ f({
|
|
2740
2798
|
__name: "Menu",
|
|
2741
2799
|
props: {
|
|
2742
2800
|
items: {},
|
|
@@ -2814,18 +2872,18 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2814
2872
|
_: 1
|
|
2815
2873
|
}));
|
|
2816
2874
|
}
|
|
2817
|
-
}),
|
|
2875
|
+
}), co = { class: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3" }, lo = { class: "flex min-w-0 flex-col gap-1" }, uo = { class: "flex flex-wrap items-center gap-x-2 gap-y-1" }, fo = ["aria-label"], po = {
|
|
2818
2876
|
key: 0,
|
|
2819
2877
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm font-bold",
|
|
2820
2878
|
"aria-live": "polite"
|
|
2821
|
-
},
|
|
2879
|
+
}, mo = {
|
|
2822
2880
|
"aria-hidden": "true",
|
|
2823
2881
|
inert: "",
|
|
2824
2882
|
class: "invisible absolute top-0 left-0 size-0 overflow-hidden"
|
|
2825
|
-
},
|
|
2883
|
+
}, ho = {
|
|
2826
2884
|
key: 1,
|
|
2827
2885
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm"
|
|
2828
|
-
},
|
|
2886
|
+
}, go = /* @__PURE__ */ f({
|
|
2829
2887
|
__name: "PageHeader",
|
|
2830
2888
|
props: {
|
|
2831
2889
|
title: {},
|
|
@@ -2868,12 +2926,12 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2868
2926
|
}), C(() => x?.disconnect()), B(() => r.toolbar?.map((e) => `${e.label}${e.disabled ? "-" : ""}`).join("|"), () => y(v));
|
|
2869
2927
|
let S = i(() => (r.toolbar ?? []).slice(0, _.value)), E = i(() => (r.toolbar ?? []).slice(_.value));
|
|
2870
2928
|
return (i, p) => (T(), s("header", { class: b(P(X)("flex flex-col gap-2", r.class)) }, [
|
|
2871
|
-
e.breadcrumb && e.breadcrumb.length > 1 ? (T(), a(
|
|
2929
|
+
e.breadcrumb && e.breadcrumb.length > 1 ? (T(), a(oo, {
|
|
2872
2930
|
key: 0,
|
|
2873
2931
|
items: e.breadcrumb,
|
|
2874
2932
|
"link-component": e.linkComponent
|
|
2875
2933
|
}, null, 8, ["items", "link-component"])) : o("", !0),
|
|
2876
|
-
c("div",
|
|
2934
|
+
c("div", co, [c("div", lo, [c("div", uo, [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", {
|
|
2877
2935
|
key: 0,
|
|
2878
2936
|
class: b(P(X)("max-w-prose text-sm text-ink/65", e.ui?.description))
|
|
2879
2937
|
}, [A(i.$slots, "description", {}, () => [u(N(e.description), 1)])], 2)) : o("", !0)]), i.$slots.actions ? (T(), s("div", {
|
|
@@ -2886,7 +2944,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2886
2944
|
"aria-label": P(t)("ui.pageHeader.actions", { title: e.title }),
|
|
2887
2945
|
class: b(P(X)("flex items-center gap-1 rounded-lg border border-ink/10 bg-surface p-1 shadow-xs", e.ui?.toolbar))
|
|
2888
2946
|
}, [
|
|
2889
|
-
i.$slots["toolbar-start"] ? (T(), s("div",
|
|
2947
|
+
i.$slots["toolbar-start"] ? (T(), s("div", po, [A(i.$slots, "toolbar-start")])) : o("", !0),
|
|
2890
2948
|
c("div", {
|
|
2891
2949
|
ref_key: "fitArea",
|
|
2892
2950
|
ref: h,
|
|
@@ -2915,7 +2973,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2915
2973
|
"disabled",
|
|
2916
2974
|
"onClick"
|
|
2917
2975
|
]))), 128)),
|
|
2918
|
-
E.value.length ? (T(), a(
|
|
2976
|
+
E.value.length ? (T(), a(so, {
|
|
2919
2977
|
key: 0,
|
|
2920
2978
|
items: E.value,
|
|
2921
2979
|
label: P(t)("ui.pageHeader.moreActions"),
|
|
@@ -2926,7 +2984,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2926
2984
|
"label",
|
|
2927
2985
|
"link-component"
|
|
2928
2986
|
])) : o("", !0),
|
|
2929
|
-
c("div",
|
|
2987
|
+
c("div", mo, [c("div", {
|
|
2930
2988
|
ref_key: "measure",
|
|
2931
2989
|
ref: g,
|
|
2932
2990
|
class: "flex w-max gap-1"
|
|
@@ -2952,18 +3010,18 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2952
3010
|
_: 1
|
|
2953
3011
|
})], 512)])
|
|
2954
3012
|
], 512),
|
|
2955
|
-
i.$slots["toolbar-end"] ? (T(), s("div",
|
|
2956
|
-
], 10,
|
|
3013
|
+
i.$slots["toolbar-end"] ? (T(), s("div", ho, [A(i.$slots, "toolbar-end")])) : o("", !0)
|
|
3014
|
+
], 10, fo)) : o("", !0),
|
|
2957
3015
|
A(i.$slots, "default")
|
|
2958
3016
|
], 2));
|
|
2959
3017
|
}
|
|
2960
|
-
}),
|
|
3018
|
+
}), _o = { class: "flex min-w-0 flex-col gap-0.5" }, vo = {
|
|
2961
3019
|
class: "text-sm",
|
|
2962
3020
|
"aria-hidden": "true"
|
|
2963
|
-
},
|
|
3021
|
+
}, yo = {
|
|
2964
3022
|
key: 0,
|
|
2965
3023
|
class: "text-xs text-ink/65"
|
|
2966
|
-
},
|
|
3024
|
+
}, bo = { class: "w-full shrink-0 sm:w-80" }, xo = /* @__PURE__ */ f({
|
|
2967
3025
|
__name: "SettingsRow",
|
|
2968
3026
|
props: {
|
|
2969
3027
|
label: {},
|
|
@@ -2978,12 +3036,12 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
2978
3036
|
},
|
|
2979
3037
|
setup(e) {
|
|
2980
3038
|
let t = e;
|
|
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",
|
|
3039
|
+
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", _o, [c("p", vo, N(e.label), 1), e.description ? (T(), s("p", yo, N(e.description), 1)) : o("", !0)]), c("div", bo, [A(n.$slots, "default")])], 2));
|
|
2982
3040
|
}
|
|
2983
|
-
}),
|
|
3041
|
+
}), So = ["aria-label"], Co = ["aria-label"], wo = { "aria-hidden": "true" }, To = { class: "flex max-h-72 flex-col gap-2 overflow-y-auto p-3 text-sm [scrollbar-width:thin]" }, Eo = { class: "min-w-0 truncate" }, Do = {
|
|
2984
3042
|
key: 0,
|
|
2985
3043
|
class: "ml-auto shrink-0 truncate text-xs text-ink/65"
|
|
2986
|
-
},
|
|
3044
|
+
}, Oo = /* @__PURE__ */ f({
|
|
2987
3045
|
__name: "AvatarGroup",
|
|
2988
3046
|
props: {
|
|
2989
3047
|
users: {},
|
|
@@ -3029,7 +3087,7 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
3029
3087
|
}, [(T(!0), s(n, null, k(a.value, (t, n) => (T(), s("span", {
|
|
3030
3088
|
key: `${t.name}-${n}`,
|
|
3031
3089
|
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]))
|
|
3032
|
-
}, [d(
|
|
3090
|
+
}, [d(ea, {
|
|
3033
3091
|
user: t,
|
|
3034
3092
|
size: e.size,
|
|
3035
3093
|
profile: e.profile
|
|
@@ -3051,17 +3109,17 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
3051
3109
|
},
|
|
3052
3110
|
ui: { content: "w-56" }
|
|
3053
3111
|
}, {
|
|
3054
|
-
content: H(() => [c("ul",
|
|
3112
|
+
content: H(() => [c("ul", To, [(T(!0), s(n, null, k(l.value, (e, t) => (T(), s("li", {
|
|
3055
3113
|
key: `${e.name}-${t}`,
|
|
3056
3114
|
class: "flex items-center gap-2"
|
|
3057
3115
|
}, [
|
|
3058
|
-
d(
|
|
3116
|
+
d(ea, {
|
|
3059
3117
|
user: e,
|
|
3060
3118
|
size: "xs",
|
|
3061
3119
|
decorative: ""
|
|
3062
3120
|
}, null, 8, ["user"]),
|
|
3063
|
-
c("span",
|
|
3064
|
-
e.role ? (T(), s("span",
|
|
3121
|
+
c("span", Eo, N(e.name), 1),
|
|
3122
|
+
e.role ? (T(), s("span", Do, N(e.role), 1)) : o("", !0)
|
|
3065
3123
|
]))), 128))])]),
|
|
3066
3124
|
default: H(() => [c("button", {
|
|
3067
3125
|
type: "button",
|
|
@@ -3070,17 +3128,17 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
3070
3128
|
names: l.value.map((e) => e.name).join(", ")
|
|
3071
3129
|
}),
|
|
3072
3130
|
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]))
|
|
3073
|
-
}, [c("span",
|
|
3131
|
+
}, [c("span", wo, "+" + N(l.value.length), 1)], 10, Co)]),
|
|
3074
3132
|
_: 1
|
|
3075
|
-
})], 2)) : o("", !0)], 10,
|
|
3133
|
+
})], 2)) : o("", !0)], 10, So));
|
|
3076
3134
|
}
|
|
3077
|
-
}),
|
|
3135
|
+
}), ko = { class: "flex min-w-0 flex-col gap-1" }, Ao = {
|
|
3078
3136
|
key: 1,
|
|
3079
3137
|
class: "text-sm text-ink/65"
|
|
3080
|
-
},
|
|
3138
|
+
}, jo = {
|
|
3081
3139
|
key: 0,
|
|
3082
3140
|
class: "flex shrink-0 items-center gap-2"
|
|
3083
|
-
},
|
|
3141
|
+
}, Mo = /* @__PURE__ */ f({
|
|
3084
3142
|
__name: "Card",
|
|
3085
3143
|
props: {
|
|
3086
3144
|
title: {},
|
|
@@ -3114,21 +3172,21 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
3114
3172
|
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", {
|
|
3115
3173
|
key: 0,
|
|
3116
3174
|
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))
|
|
3117
|
-
}, [A(i.$slots, "header", {}, () => [c("div",
|
|
3175
|
+
}, [A(i.$slots, "header", {}, () => [c("div", ko, [e.title ? (T(), a(j(`h${e.headingLevel}`), {
|
|
3118
3176
|
key: 0,
|
|
3119
3177
|
id: n,
|
|
3120
3178
|
class: "text-base font-bold"
|
|
3121
3179
|
}, {
|
|
3122
3180
|
default: H(() => [u(N(e.title), 1)]),
|
|
3123
3181
|
_: 1
|
|
3124
|
-
})) : o("", !0), e.description ? (T(), s("p",
|
|
3182
|
+
})) : o("", !0), e.description ? (T(), s("p", Ao, N(e.description), 1)) : o("", !0)])]), i.$slots.actions ? (T(), s("div", jo, [A(i.$slots, "actions")])) : o("", !0)], 2)) : o("", !0), A(i.$slots, "default")], 2), i.$slots.footer ? (T(), s("div", {
|
|
3125
3183
|
key: 0,
|
|
3126
3184
|
class: b(P(X)("flex flex-wrap justify-end gap-2 border-t border-ink/10", d[e.padding], e.ui?.footer))
|
|
3127
3185
|
}, [A(i.$slots, "footer")], 2)) : o("", !0)]),
|
|
3128
3186
|
_: 3
|
|
3129
3187
|
}, 8, ["aria-labelledby", "class"]));
|
|
3130
3188
|
}
|
|
3131
|
-
}),
|
|
3189
|
+
}), No = ["role", "aria-label"], Po = { class: "shrink-0" }, Fo = /* @__PURE__ */ f({
|
|
3132
3190
|
__name: "Divider",
|
|
3133
3191
|
props: {
|
|
3134
3192
|
orientation: { default: "horizontal" },
|
|
@@ -3157,12 +3215,12 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
3157
3215
|
"aria-hidden": "true",
|
|
3158
3216
|
class: "h-px flex-1 bg-ink/10"
|
|
3159
3217
|
}, null, -1),
|
|
3160
|
-
c("span",
|
|
3218
|
+
c("span", Po, [A(n.$slots, "default", {}, () => [u(N(e.label), 1)])]),
|
|
3161
3219
|
r[1] ||= c("span", {
|
|
3162
3220
|
"aria-hidden": "true",
|
|
3163
3221
|
class: "h-px flex-1 bg-ink/10"
|
|
3164
3222
|
}, null, -1)
|
|
3165
|
-
], 10,
|
|
3223
|
+
], 10, No)) : (T(), a(P(En), {
|
|
3166
3224
|
key: 1,
|
|
3167
3225
|
orientation: e.orientation,
|
|
3168
3226
|
decorative: e.decorative,
|
|
@@ -3175,17 +3233,17 @@ var _a = ["data-collapsed"], va = ["aria-label"], ya = ["data-level"], ba = {
|
|
|
3175
3233
|
}
|
|
3176
3234
|
});
|
|
3177
3235
|
// src/components/ChangeIndicator/changeIndicator.ts
|
|
3178
|
-
function
|
|
3236
|
+
function Io(e, t) {
|
|
3179
3237
|
return t ? `${e} ${t}` : String(e);
|
|
3180
3238
|
}
|
|
3181
|
-
function
|
|
3239
|
+
function Lo(e, t) {
|
|
3182
3240
|
return String(e) !== String(t);
|
|
3183
3241
|
}
|
|
3184
3242
|
// src/components/ChangeIndicator/ChangeIndicator.vue?vue&type=script&setup=true&lang.ts
|
|
3185
|
-
var
|
|
3243
|
+
var Ro = { class: "sr-only" }, zo = {
|
|
3186
3244
|
"aria-hidden": "true",
|
|
3187
3245
|
class: "font-normal line-through decoration-blue-fg/60"
|
|
3188
|
-
},
|
|
3246
|
+
}, Bo = { "aria-hidden": "true" }, Vo = /* @__PURE__ */ f({
|
|
3189
3247
|
__name: "ChangeIndicator",
|
|
3190
3248
|
props: {
|
|
3191
3249
|
from: {},
|
|
@@ -3200,33 +3258,33 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3200
3258
|
] }
|
|
3201
3259
|
},
|
|
3202
3260
|
setup(e) {
|
|
3203
|
-
let { t } = J(), r = e, a = i(() =>
|
|
3261
|
+
let { t } = J(), r = e, a = i(() => Lo(r.from, r.to)), l = i(() => t("ui.changeIndicator.changed", {
|
|
3204
3262
|
from: r.from,
|
|
3205
|
-
to:
|
|
3263
|
+
to: Io(r.to, r.unit)
|
|
3206
3264
|
}));
|
|
3207
3265
|
return (t, i) => a.value ? (T(), s("span", {
|
|
3208
3266
|
key: 0,
|
|
3209
3267
|
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))
|
|
3210
3268
|
}, [
|
|
3211
|
-
c("span",
|
|
3212
|
-
c("span",
|
|
3269
|
+
c("span", Ro, N(l.value), 1),
|
|
3270
|
+
c("span", zo, N(e.from), 1),
|
|
3213
3271
|
d(P(ae), {
|
|
3214
3272
|
"aria-hidden": "true",
|
|
3215
3273
|
class: "size-3 shrink-0"
|
|
3216
3274
|
}),
|
|
3217
|
-
c("span",
|
|
3275
|
+
c("span", Bo, [u(N(e.to), 1), e.unit ? (T(), s(n, { key: 0 }, [u(N(e.unit), 1)], 64)) : o("", !0)])
|
|
3218
3276
|
], 2)) : o("", !0);
|
|
3219
3277
|
}
|
|
3220
|
-
}),
|
|
3278
|
+
}), Ho = ["role"], Uo = { class: "flex min-w-0 flex-1 basis-48 flex-col gap-0.5" }, Wo = {
|
|
3221
3279
|
key: 0,
|
|
3222
3280
|
class: "font-bold"
|
|
3223
|
-
},
|
|
3281
|
+
}, Go = { class: "sr-only" }, Ko = {
|
|
3224
3282
|
key: 0,
|
|
3225
3283
|
class: "sr-only"
|
|
3226
|
-
},
|
|
3284
|
+
}, qo = {
|
|
3227
3285
|
key: 0,
|
|
3228
3286
|
class: "flex shrink-0 flex-wrap items-center gap-2 self-center"
|
|
3229
|
-
},
|
|
3287
|
+
}, Jo = /* @__PURE__ */ f({
|
|
3230
3288
|
__name: "Alert",
|
|
3231
3289
|
props: {
|
|
3232
3290
|
type: { default: "info" },
|
|
@@ -3279,11 +3337,11 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3279
3337
|
class: "size-4",
|
|
3280
3338
|
"aria-hidden": "true"
|
|
3281
3339
|
}))])], 2),
|
|
3282
|
-
c("div",
|
|
3340
|
+
c("div", Uo, [e.title ? (T(), s("p", Wo, [c("span", Go, N(P(n)(`ui.alert.${e.type}`)) + ": ", 1), u(N(e.title), 1)])) : o("", !0), e.description || t.$slots.default ? (T(), s("div", {
|
|
3283
3341
|
key: 1,
|
|
3284
3342
|
class: b(e.title ? "text-ink/80" : "")
|
|
3285
|
-
}, [e.title ? o("", !0) : (T(), s("span",
|
|
3286
|
-
t.$slots.actions ? (T(), s("div",
|
|
3343
|
+
}, [e.title ? o("", !0) : (T(), s("span", Ko, N(P(n)(`ui.alert.${e.type}`)) + ": ", 1)), A(t.$slots, "default", {}, () => [u(N(e.description), 1)])], 2)) : o("", !0)]),
|
|
3344
|
+
t.$slots.actions ? (T(), s("div", qo, [A(t.$slots, "actions")])) : o("", !0),
|
|
3287
3345
|
e.dismissible ? (T(), a(Z, {
|
|
3288
3346
|
key: 1,
|
|
3289
3347
|
variant: "ghost",
|
|
@@ -3296,9 +3354,9 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3296
3354
|
default: H(() => [d(P(Xe))]),
|
|
3297
3355
|
_: 1
|
|
3298
3356
|
}, 8, ["aria-label"])) : o("", !0)
|
|
3299
|
-
], 10,
|
|
3357
|
+
], 10, Ho));
|
|
3300
3358
|
}
|
|
3301
|
-
}),
|
|
3359
|
+
}), Yo = /* @__PURE__ */ f({
|
|
3302
3360
|
__name: "Collapsible",
|
|
3303
3361
|
props: /*@__PURE__*/ _({
|
|
3304
3362
|
title: {},
|
|
@@ -3348,7 +3406,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3348
3406
|
"class"
|
|
3349
3407
|
]));
|
|
3350
3408
|
}
|
|
3351
|
-
}),
|
|
3409
|
+
}), Xo = /* @__PURE__ */ f({
|
|
3352
3410
|
__name: "Prose",
|
|
3353
3411
|
props: {
|
|
3354
3412
|
size: { default: "base" },
|
|
@@ -3381,13 +3439,13 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3381
3439
|
};
|
|
3382
3440
|
return (i, a) => (T(), s("div", { class: b(P(X)(n, r[e.size], t.class)) }, [A(i.$slots, "default")], 2));
|
|
3383
3441
|
}
|
|
3384
|
-
}),
|
|
3442
|
+
}), Zo = [
|
|
3385
3443
|
"id",
|
|
3386
3444
|
"spellcheck",
|
|
3387
3445
|
"disabled",
|
|
3388
3446
|
"aria-invalid",
|
|
3389
3447
|
"aria-describedby"
|
|
3390
|
-
],
|
|
3448
|
+
], Qo = /* @__PURE__ */ f({
|
|
3391
3449
|
inheritAttrs: !1,
|
|
3392
3450
|
__name: "Input",
|
|
3393
3451
|
props: /*@__PURE__*/ _({
|
|
@@ -3440,7 +3498,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3440
3498
|
"aria-describedby": a,
|
|
3441
3499
|
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-ink/55 disabled:cursor-not-allowed",
|
|
3442
3500
|
onBlur: i[1] ||= (e) => o.value = !0
|
|
3443
|
-
}), null, 16,
|
|
3501
|
+
}), null, 16, Zo), [[z, r.value]])]),
|
|
3444
3502
|
_: 2
|
|
3445
3503
|
}, [t.$slots.leading ? {
|
|
3446
3504
|
name: "leading",
|
|
@@ -3462,7 +3520,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3462
3520
|
"class"
|
|
3463
3521
|
]));
|
|
3464
3522
|
}
|
|
3465
|
-
}),
|
|
3523
|
+
}), $o = "-ml-3 rounded-l border-r border-ink/10", es = "-mr-3 rounded-r border-l border-ink/10", ts = /* @__PURE__ */ f({
|
|
3466
3524
|
inheritAttrs: !1,
|
|
3467
3525
|
__name: "InputNumber",
|
|
3468
3526
|
props: /*@__PURE__*/ _({
|
|
@@ -3521,7 +3579,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3521
3579
|
class: "contents"
|
|
3522
3580
|
}, {
|
|
3523
3581
|
default: H(() => [
|
|
3524
|
-
d(P(Xt), { class: b([o,
|
|
3582
|
+
d(P(Xt), { class: b([o, $o]) }, {
|
|
3525
3583
|
default: H(() => [d(P(Fe))]),
|
|
3526
3584
|
_: 1
|
|
3527
3585
|
}, 8, ["class"]),
|
|
@@ -3535,7 +3593,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3535
3593
|
"aria-describedby",
|
|
3536
3594
|
"aria-valuetext"
|
|
3537
3595
|
]),
|
|
3538
|
-
d(P(Zt), { class: b([o,
|
|
3596
|
+
d(P(Zt), { class: b([o, es]) }, {
|
|
3539
3597
|
default: H(() => [d(P(Ve))]),
|
|
3540
3598
|
_: 1
|
|
3541
3599
|
}, 8, ["class"])
|
|
@@ -3564,26 +3622,26 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3564
3622
|
"class"
|
|
3565
3623
|
]));
|
|
3566
3624
|
}
|
|
3567
|
-
}),
|
|
3625
|
+
}), ns = { class: "flex items-center" }, rs = ["aria-label", "disabled"], is = ["aria-label", "disabled"], as = {
|
|
3568
3626
|
key: 2,
|
|
3569
3627
|
class: "px-1.5 py-1 text-sm tabular-nums"
|
|
3570
|
-
},
|
|
3628
|
+
}, os = {
|
|
3571
3629
|
key: 0,
|
|
3572
3630
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
3573
|
-
},
|
|
3631
|
+
}, ss = [
|
|
3574
3632
|
"aria-current",
|
|
3575
3633
|
"aria-pressed",
|
|
3576
3634
|
"disabled",
|
|
3577
3635
|
"onClick"
|
|
3578
|
-
],
|
|
3636
|
+
], cs = {
|
|
3579
3637
|
key: 1,
|
|
3580
3638
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
3581
|
-
},
|
|
3639
|
+
}, ls = [
|
|
3582
3640
|
"aria-current",
|
|
3583
3641
|
"aria-pressed",
|
|
3584
3642
|
"disabled",
|
|
3585
3643
|
"onClick"
|
|
3586
|
-
],
|
|
3644
|
+
], us = /* @__PURE__ */ f({
|
|
3587
3645
|
__name: "Calendar",
|
|
3588
3646
|
props: /*@__PURE__*/ _({
|
|
3589
3647
|
min: {},
|
|
@@ -3730,21 +3788,21 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3730
3788
|
default: H(() => [d(P(he))]),
|
|
3731
3789
|
_: 1
|
|
3732
3790
|
}, 8, ["aria-label", "disabled"])),
|
|
3733
|
-
c("div",
|
|
3791
|
+
c("div", ns, [_.value === "days" ? (T(), s("button", {
|
|
3734
3792
|
key: 0,
|
|
3735
3793
|
type: "button",
|
|
3736
3794
|
class: b(q),
|
|
3737
3795
|
"aria-label": P(t)("ui.calendar.chooseMonth", { month: C.value }),
|
|
3738
3796
|
disabled: e.disabled,
|
|
3739
3797
|
onClick: D
|
|
3740
|
-
}, [u(N(C.value) + " ", 1), d(P(me))], 8,
|
|
3798
|
+
}, [u(N(C.value) + " ", 1), d(P(me))], 8, rs)) : o("", !0), _.value === "years" ? (T(), s("span", as, N(E.value[0]) + " – " + N(E.value[E.value.length - 1]), 1)) : (T(), s("button", {
|
|
3741
3799
|
key: 1,
|
|
3742
3800
|
type: "button",
|
|
3743
3801
|
class: b(q),
|
|
3744
3802
|
"aria-label": P(t)("ui.calendar.chooseYear", { year: v.value.year }),
|
|
3745
3803
|
disabled: e.disabled,
|
|
3746
3804
|
onClick: A
|
|
3747
|
-
}, [u(N(v.value.year) + " ", 1), d(P(me))], 8,
|
|
3805
|
+
}, [u(N(v.value.year) + " ", 1), d(P(me))], 8, is))]),
|
|
3748
3806
|
_.value === "days" ? (T(), a(P(pt), {
|
|
3749
3807
|
key: 2,
|
|
3750
3808
|
"as-child": ""
|
|
@@ -3774,7 +3832,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3774
3832
|
]),
|
|
3775
3833
|
_: 1
|
|
3776
3834
|
}),
|
|
3777
|
-
_.value === "months" ? (T(), s("div",
|
|
3835
|
+
_.value === "months" ? (T(), s("div", os, [(T(!0), s(n, null, k(S.value, (e, t) => (T(), s("button", {
|
|
3778
3836
|
key: e,
|
|
3779
3837
|
type: "button",
|
|
3780
3838
|
class: b(ne),
|
|
@@ -3782,7 +3840,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3782
3840
|
"aria-pressed": U(t + 1),
|
|
3783
3841
|
disabled: R(t + 1),
|
|
3784
3842
|
onClick: (e) => j(t + 1)
|
|
3785
|
-
}, N(e), 9,
|
|
3843
|
+
}, N(e), 9, ss))), 128))])) : _.value === "years" ? (T(), s("div", cs, [(T(!0), s(n, null, k(E.value, (e) => (T(), s("button", {
|
|
3786
3844
|
key: e,
|
|
3787
3845
|
type: "button",
|
|
3788
3846
|
class: b(ne),
|
|
@@ -3790,7 +3848,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3790
3848
|
"aria-pressed": W(e),
|
|
3791
3849
|
disabled: z(e),
|
|
3792
3850
|
onClick: (t) => F(e)
|
|
3793
|
-
}, N(e), 9,
|
|
3851
|
+
}, N(e), 9, ls))), 128))])) : o("", !0),
|
|
3794
3852
|
(T(!0), s(n, null, k(_.value === "days" ? i : [], (e) => (T(), a(P(st), {
|
|
3795
3853
|
key: e.value.toString(),
|
|
3796
3854
|
class: "mt-3 border-collapse select-none"
|
|
@@ -3848,7 +3906,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3848
3906
|
"class"
|
|
3849
3907
|
]));
|
|
3850
3908
|
}
|
|
3851
|
-
}),
|
|
3909
|
+
}), ds = {
|
|
3852
3910
|
monday: 1,
|
|
3853
3911
|
mon: 1,
|
|
3854
3912
|
tuesday: 2,
|
|
@@ -3867,7 +3925,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3867
3925
|
sat: 6,
|
|
3868
3926
|
sunday: 7,
|
|
3869
3927
|
sun: 7
|
|
3870
|
-
}, Q = `(${Object.keys(
|
|
3928
|
+
}, Q = `(${Object.keys(ds).join("|")})`, fs = {
|
|
3871
3929
|
january: 1,
|
|
3872
3930
|
jan: 1,
|
|
3873
3931
|
february: 2,
|
|
@@ -3892,7 +3950,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3892
3950
|
nov: 11,
|
|
3893
3951
|
december: 12,
|
|
3894
3952
|
dec: 12
|
|
3895
|
-
},
|
|
3953
|
+
}, ps = `(${Object.keys(fs).sort((e, t) => t.length - e.length).join("|")})`, ms = {
|
|
3896
3954
|
a: 1,
|
|
3897
3955
|
an: 1,
|
|
3898
3956
|
one: 1,
|
|
@@ -3916,7 +3974,7 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3916
3974
|
nineteen: 19,
|
|
3917
3975
|
twenty: 20,
|
|
3918
3976
|
thirty: 30
|
|
3919
|
-
},
|
|
3977
|
+
}, hs = `(\\d+|${Object.keys(ms).join("|")})`, gs = "(day|week|fortnight|month|year)s?", _s = {
|
|
3920
3978
|
first: 1,
|
|
3921
3979
|
second: 2,
|
|
3922
3980
|
third: 3,
|
|
@@ -3938,37 +3996,37 @@ var Lo = { class: "sr-only" }, Ro = {
|
|
|
3938
3996
|
nineteenth: 19,
|
|
3939
3997
|
twentieth: 20,
|
|
3940
3998
|
thirtieth: 30
|
|
3941
|
-
},
|
|
3942
|
-
function
|
|
3999
|
+
}, vs = Object.keys(_s).join("|");
|
|
4000
|
+
function ys(e) {
|
|
3943
4001
|
return new Date(e.year, e.month - 1, e.day).getDay() || 7;
|
|
3944
4002
|
}
|
|
3945
|
-
function
|
|
3946
|
-
return e.subtract({ days:
|
|
4003
|
+
function bs(e) {
|
|
4004
|
+
return e.subtract({ days: ys(e) - 1 });
|
|
3947
4005
|
}
|
|
3948
4006
|
function $(e, t, n) {
|
|
3949
4007
|
if (!Number.isInteger(e) || t < 1 || t > 12 || n < 1) return;
|
|
3950
4008
|
let r = new Un(e, t, 1);
|
|
3951
4009
|
if (!(n > r.calendar.getDaysInMonth(r))) return new Un(e, t, n);
|
|
3952
4010
|
}
|
|
3953
|
-
function
|
|
4011
|
+
function xs(e, t, n, r) {
|
|
3954
4012
|
if (r === -1) {
|
|
3955
4013
|
let r = Wn(new Un(e, t, 1));
|
|
3956
|
-
return r.subtract({ days: (
|
|
4014
|
+
return r.subtract({ days: (ys(r) - n + 7) % 7 });
|
|
3957
4015
|
}
|
|
3958
|
-
let i = new Un(e, t, 1), a = i.add({ days: (n -
|
|
4016
|
+
let i = new Un(e, t, 1), a = i.add({ days: (n - ys(i) + 7) % 7 + (r - 1) * 7 });
|
|
3959
4017
|
return a.month === t ? a : void 0;
|
|
3960
4018
|
}
|
|
3961
|
-
function
|
|
4019
|
+
function Ss(e) {
|
|
3962
4020
|
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;
|
|
3963
4021
|
return new Un(e, p, m);
|
|
3964
4022
|
}
|
|
3965
|
-
function
|
|
4023
|
+
function Cs(e, t) {
|
|
3966
4024
|
if (e.length === 4) return Number(e);
|
|
3967
4025
|
if (e.length !== 2) return NaN;
|
|
3968
4026
|
let n = Number(e);
|
|
3969
4027
|
return n <= t.year % 100 ? 2e3 + n : 1900 + n;
|
|
3970
4028
|
}
|
|
3971
|
-
var
|
|
4029
|
+
var ws = [
|
|
3972
4030
|
["(?:christmas|xmas) eve", (e) => $(e, 12, 24)],
|
|
3973
4031
|
["(?:christmas|xmas)(?: day)?", (e) => $(e, 12, 25)],
|
|
3974
4032
|
["boxing day", (e) => $(e, 12, 26)],
|
|
@@ -3976,16 +4034,16 @@ var Cs = [
|
|
|
3976
4034
|
["new years?(?: day)?", (e) => $(e, 1, 1)],
|
|
3977
4035
|
["valentines(?: day)?", (e) => $(e, 2, 14)],
|
|
3978
4036
|
["(?:st )?(?:patricks|paddys) day", (e) => $(e, 3, 17)],
|
|
3979
|
-
["good friday", (e) =>
|
|
3980
|
-
["easter monday", (e) =>
|
|
3981
|
-
["easter(?: sunday| day)?", (e) =>
|
|
3982
|
-
["(?:mothers day|mothering sunday)", (e) =>
|
|
3983
|
-
["fathers day", (e) =>
|
|
4037
|
+
["good friday", (e) => Ss(e).subtract({ days: 2 })],
|
|
4038
|
+
["easter monday", (e) => Ss(e).add({ days: 1 })],
|
|
4039
|
+
["easter(?: sunday| day)?", (e) => Ss(e)],
|
|
4040
|
+
["(?:mothers day|mothering sunday)", (e) => Ss(e).subtract({ weeks: 3 })],
|
|
4041
|
+
["fathers day", (e) => xs(e, 6, 7, 3)],
|
|
3984
4042
|
["halloween", (e) => $(e, 10, 31)],
|
|
3985
4043
|
["(?:bonfire night|guy fawkes(?: night| day)?)", (e) => $(e, 11, 5)],
|
|
3986
4044
|
["(?:remembrance|armistice) day", (e) => $(e, 11, 11)]
|
|
3987
4045
|
];
|
|
3988
|
-
function
|
|
4046
|
+
function Ts(e, t, n) {
|
|
3989
4047
|
let r = e.filter((e) => !!e).sort((e, t) => e.compare(t));
|
|
3990
4048
|
return n === "future" ? r.find((e) => e.compare(t) >= 0) : n === "past" ? r.findLast((e) => e.compare(t) <= 0) : r.reduce((e, n) => {
|
|
3991
4049
|
if (!e) return n;
|
|
@@ -3993,14 +4051,14 @@ function ws(e, t, n) {
|
|
|
3993
4051
|
return r < i || r === i && n.compare(t) > 0 ? n : e;
|
|
3994
4052
|
}, void 0);
|
|
3995
4053
|
}
|
|
3996
|
-
function
|
|
4054
|
+
function Es(e, t, n, r, i) {
|
|
3997
4055
|
if (!e) return n.yearValue === void 0 ? r.add(t) : void 0;
|
|
3998
4056
|
switch (e.kind) {
|
|
3999
4057
|
case "date": return n.yearValue === void 0 ? e.date.add(t) : void 0;
|
|
4000
4058
|
case "yearless": return n.yearValue === void 0 ? n.year || t.years ? e.resolve(r.year + t.years)?.add({
|
|
4001
4059
|
...t,
|
|
4002
4060
|
years: 0
|
|
4003
|
-
}) :
|
|
4061
|
+
}) : Ts(Array.from({ length: 9 }, (e, t) => r.year - 4 + t).map(e.resolve), r, i)?.add(t) : e.resolve(n.yearValue + t.years)?.add({
|
|
4004
4062
|
...t,
|
|
4005
4063
|
years: 0
|
|
4006
4064
|
});
|
|
@@ -4013,19 +4071,19 @@ function Ts(e, t, n, r, i) {
|
|
|
4013
4071
|
months: 0
|
|
4014
4072
|
});
|
|
4015
4073
|
}
|
|
4016
|
-
return
|
|
4074
|
+
return Ts([
|
|
4017
4075
|
-1,
|
|
4018
4076
|
0,
|
|
4019
4077
|
1
|
|
4020
4078
|
].map((e) => Jn(r).add({ months: e })).map((t) => $(t.year, t.month, e.day)), r, i)?.add(t);
|
|
4021
4079
|
case "weekday": {
|
|
4022
4080
|
if (n.yearValue !== void 0) return;
|
|
4023
|
-
let a = (e.weekday -
|
|
4081
|
+
let a = (e.weekday - ys(r) + 7) % 7 || 7, o = (ys(r) - e.weekday + 7) % 7 || 7, s = r.add({ days: a }), c = r.subtract({ days: o });
|
|
4024
4082
|
return (i === "past" || i === "nearest" && o < a ? c : s).add(t);
|
|
4025
4083
|
}
|
|
4026
4084
|
}
|
|
4027
4085
|
}
|
|
4028
|
-
function
|
|
4086
|
+
function Ds(e, t, n) {
|
|
4029
4087
|
let r = e.trim(), i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r);
|
|
4030
4088
|
if (i) {
|
|
4031
4089
|
let e = $(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
@@ -4051,29 +4109,29 @@ function Es(e, t, n) {
|
|
|
4051
4109
|
kind: "yearless",
|
|
4052
4110
|
resolve: (e) => $(e, o, i)
|
|
4053
4111
|
};
|
|
4054
|
-
let s = $(
|
|
4112
|
+
let s = $(Cs(r.year, t), o, i);
|
|
4055
4113
|
return s && {
|
|
4056
4114
|
kind: "date",
|
|
4057
4115
|
date: s
|
|
4058
4116
|
};
|
|
4059
4117
|
}
|
|
4060
4118
|
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) => {
|
|
4061
|
-
let i = Number(e), a =
|
|
4119
|
+
let i = Number(e), a = fs[n];
|
|
4062
4120
|
if (r === void 0) return {
|
|
4063
4121
|
kind: "yearless",
|
|
4064
4122
|
resolve: (e) => $(e, a, i)
|
|
4065
4123
|
};
|
|
4066
|
-
let o = $(
|
|
4124
|
+
let o = $(Cs(r, t), a, i);
|
|
4067
4125
|
return o && {
|
|
4068
4126
|
kind: "date",
|
|
4069
4127
|
date: o
|
|
4070
4128
|
};
|
|
4071
4129
|
}, c;
|
|
4072
|
-
if (c = RegExp(`^(\\d{1,2}) ${
|
|
4073
|
-
if (c = RegExp(`^${
|
|
4074
|
-
if (c = RegExp(`^(\\d{4}) ${
|
|
4075
|
-
if (c = RegExp(`^${
|
|
4076
|
-
let e =
|
|
4130
|
+
if (c = RegExp(`^(\\d{1,2}) ${ps}(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[1], c[2], c[3]);
|
|
4131
|
+
if (c = RegExp(`^${ps} (\\d{1,2})(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[2], c[1], c[3]);
|
|
4132
|
+
if (c = RegExp(`^(\\d{4}) ${ps} (\\d{1,2})$`).exec(o)) return s(c[3], c[2], c[1]);
|
|
4133
|
+
if (c = RegExp(`^${ps}(?: (\\d{4}))?$`).exec(o)) {
|
|
4134
|
+
let e = fs[c[1]];
|
|
4077
4135
|
if (c[2]) {
|
|
4078
4136
|
let t = $(Number(c[2]), e, 1);
|
|
4079
4137
|
return t && {
|
|
@@ -4094,22 +4152,22 @@ function Es(e, t, n) {
|
|
|
4094
4152
|
} : void 0;
|
|
4095
4153
|
}
|
|
4096
4154
|
}
|
|
4097
|
-
function
|
|
4155
|
+
function Os(e) {
|
|
4098
4156
|
return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
|
|
4099
4157
|
1: "st",
|
|
4100
4158
|
2: "nd",
|
|
4101
4159
|
3: "rd"
|
|
4102
4160
|
}[e % 10] ?? "th"}`;
|
|
4103
4161
|
}
|
|
4104
|
-
function
|
|
4105
|
-
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${
|
|
4162
|
+
function ks(e) {
|
|
4163
|
+
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${vs})\\b`, "g"), (e, t, n) => Os((t === "twenty" ? 20 : 30) + _s[n])).replace(RegExp(`\\b(${vs})\\b`, "g"), (e) => Os(_s[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();
|
|
4106
4164
|
}
|
|
4107
|
-
function
|
|
4165
|
+
function As(e, t) {
|
|
4108
4166
|
let { today: n, order: r = [
|
|
4109
4167
|
"day",
|
|
4110
4168
|
"month",
|
|
4111
4169
|
"year"
|
|
4112
|
-
], prefer: i = "future" } = t, a =
|
|
4170
|
+
], prefer: i = "future" } = t, a = ks(e);
|
|
4113
4171
|
if (!a) return;
|
|
4114
4172
|
let o = ` ${a} `, s = !1, c = !1, l = [], u = !1, d = {
|
|
4115
4173
|
days: 0,
|
|
@@ -4119,7 +4177,7 @@ function ks(e, t) {
|
|
|
4119
4177
|
}, f = {
|
|
4120
4178
|
year: !1,
|
|
4121
4179
|
month: !1
|
|
4122
|
-
}, p =
|
|
4180
|
+
}, p = bs(n);
|
|
4123
4181
|
function m(e) {
|
|
4124
4182
|
let t = RegExp(` ${e} `).exec(o);
|
|
4125
4183
|
return t && (o = o.replace(t[0], " "), s = !0), t;
|
|
@@ -4129,18 +4187,18 @@ function ks(e, t) {
|
|
|
4129
4187
|
}, g = (e) => e && {
|
|
4130
4188
|
kind: "date",
|
|
4131
4189
|
date: e
|
|
4132
|
-
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) =>
|
|
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|${
|
|
4134
|
-
let e = x[1] === "last" ? -1 : Number(x[1][0]), t =
|
|
4190
|
+
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) => ms[e] ?? Number(e), b = (e) => n.add({ days: (e - ys(n) + 7) % 7 || 7 }), x;
|
|
4191
|
+
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|${ps}(?: (\\d{4}))?)`)) {
|
|
4192
|
+
let e = x[1] === "last" ? -1 : Number(x[1][0]), t = ds[x[2]];
|
|
4135
4193
|
if (x[4]) {
|
|
4136
|
-
let n =
|
|
4137
|
-
x[5] ? h(g(
|
|
4194
|
+
let n = fs[x[4]];
|
|
4195
|
+
x[5] ? h(g(xs(Number(x[5]), n, t, e))) : h({
|
|
4138
4196
|
kind: "yearless",
|
|
4139
|
-
resolve: (r) =>
|
|
4197
|
+
resolve: (r) => xs(r, n, t, e)
|
|
4140
4198
|
});
|
|
4141
4199
|
} else {
|
|
4142
4200
|
let r = x[3] === "next" ? 1 : x[3] === "last" ? -1 : 0, i = Jn(n).add({ months: r });
|
|
4143
|
-
h(g(
|
|
4201
|
+
h(g(xs(i.year, i.month, t, e)));
|
|
4144
4202
|
}
|
|
4145
4203
|
}
|
|
4146
4204
|
if (x = m("(start|beginning|middle|mid|end) (?:of )?(?:(this|next|last) )?(week|month|year)")) {
|
|
@@ -4154,8 +4212,8 @@ function ks(e, t) {
|
|
|
4154
4212
|
h(g(t === "start" ? new Un(r, 1, 1) : t === "mid" ? new Un(r, 7, 1) : new Un(r, 12, 31)));
|
|
4155
4213
|
}
|
|
4156
4214
|
}
|
|
4157
|
-
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${
|
|
4158
|
-
let e = x[1], t =
|
|
4215
|
+
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${ps}(?: (\\d{4}))?`)) {
|
|
4216
|
+
let e = x[1], t = fs[x[2]], n = (n) => [
|
|
4159
4217
|
"start",
|
|
4160
4218
|
"beginning",
|
|
4161
4219
|
"early"
|
|
@@ -4172,38 +4230,38 @@ function ks(e, t) {
|
|
|
4172
4230
|
kind: "weekday",
|
|
4173
4231
|
weekday: 6
|
|
4174
4232
|
});
|
|
4175
|
-
for (let [e, t] of
|
|
4233
|
+
for (let [e, t] of ws) m(e) && h({
|
|
4176
4234
|
kind: "yearless",
|
|
4177
4235
|
resolve: t
|
|
4178
4236
|
});
|
|
4179
|
-
if ((x = m(`${Q} after next`)) && h(g(b(
|
|
4237
|
+
if ((x = m(`${Q} after next`)) && h(g(b(ds[x[1]]).add({ weeks: 1 }))), (x = m(`${Q} (week|fortnight)`)) && h(g(b(ds[x[1]]).add({ weeks: x[2] === "fortnight" ? 2 : 1 }))), x = m(`${hs} ${gs} on ${Q}`)) {
|
|
4180
4238
|
let [e, t] = v(x[2]);
|
|
4181
|
-
h(g(b(
|
|
4239
|
+
h(g(b(ds[x[3]]).add({ [e]: y(x[1]) * t })));
|
|
4182
4240
|
}
|
|
4183
|
-
if (x = m(`${
|
|
4241
|
+
if (x = m(`${hs} ${gs} (today|tomorrow|tmrw|tmr)`)) {
|
|
4184
4242
|
let [e, t] = v(x[2]);
|
|
4185
4243
|
h(g((x[3] === "today" ? n : n.add({ days: 1 })).add({ [e]: y(x[1]) * t })));
|
|
4186
4244
|
}
|
|
4187
4245
|
for ((x = m(`(?:next week ${Q}|${Q} next week|next ${Q})`)) && h(g(p.add({
|
|
4188
4246
|
weeks: 1,
|
|
4189
|
-
days:
|
|
4190
|
-
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days:
|
|
4247
|
+
days: ds[_(x)] - 1
|
|
4248
|
+
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days: ds[_(x)] - 1 }))), (x = m(`(?:this week ${Q}|${Q} this week|this ${Q})`)) && h(g(p.add({ days: ds[_(x)] - 1 }))), (x = m(`last ${Q}`)) && h(g(n.subtract({ days: (ys(n) - ds[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({
|
|
4191
4249
|
kind: "weekday",
|
|
4192
|
-
weekday:
|
|
4193
|
-
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${
|
|
4250
|
+
weekday: ds[x[1]]
|
|
4251
|
+
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${gs}`);) {
|
|
4194
4252
|
let [e, t] = v(x[2]);
|
|
4195
4253
|
d[e] += (x[1] === "next" ? 1 : -1) * t;
|
|
4196
4254
|
}
|
|
4197
4255
|
let S = !1;
|
|
4198
|
-
for (; x = m(`in ${
|
|
4256
|
+
for (; x = m(`in ${hs} ${gs}`);) {
|
|
4199
4257
|
let [e, t] = v(x[2]);
|
|
4200
4258
|
d[e] += y(x[1]) * t, S = !0;
|
|
4201
4259
|
}
|
|
4202
|
-
for (; S && (x = m(`(?:and )?${
|
|
4260
|
+
for (; S && (x = m(`(?:and )?${hs} ${gs}(?! (?:ago|before|earlier|from|after|later))`));) {
|
|
4203
4261
|
let [e, t] = v(x[2]);
|
|
4204
4262
|
d[e] += y(x[1]) * t;
|
|
4205
4263
|
}
|
|
4206
|
-
for (; x = m(`${
|
|
4264
|
+
for (; x = m(`${hs} ${gs} (ago|before|earlier|from|after|later)`);) {
|
|
4207
4265
|
let [e, t] = v(x[2]), n = [
|
|
4208
4266
|
"ago",
|
|
4209
4267
|
"before",
|
|
@@ -4214,24 +4272,24 @@ function ks(e, t) {
|
|
|
4214
4272
|
for (; m("(?:on|of|at|by|for)"););
|
|
4215
4273
|
let C = o.trim();
|
|
4216
4274
|
if (s && /^\d{4}$/.test(C) && (f.yearValue = Number(C), C = ""), C) {
|
|
4217
|
-
let e =
|
|
4275
|
+
let e = Ds(C, n, r);
|
|
4218
4276
|
if (!e) return;
|
|
4219
4277
|
l.length === 1 && u && l.pop(), l.push(e);
|
|
4220
4278
|
} else if (!s) return;
|
|
4221
|
-
if (!(c || l.length > 1)) return
|
|
4279
|
+
if (!(c || l.length > 1)) return Es(l[0], d, f, n, i);
|
|
4222
4280
|
}
|
|
4223
4281
|
// src/components/InputDate/InputDate.vue?vue&type=script&setup=true&lang.ts
|
|
4224
|
-
var
|
|
4282
|
+
var js = [
|
|
4225
4283
|
"id",
|
|
4226
4284
|
"placeholder",
|
|
4227
4285
|
"disabled",
|
|
4228
4286
|
"aria-invalid",
|
|
4229
4287
|
"aria-describedby"
|
|
4230
|
-
],
|
|
4288
|
+
], Ms = {
|
|
4231
4289
|
key: 0,
|
|
4232
4290
|
"aria-hidden": "true",
|
|
4233
4291
|
class: "shrink-0 tabular-nums text-ink/55"
|
|
4234
|
-
},
|
|
4292
|
+
}, Ns = /* @__PURE__ */ f({
|
|
4235
4293
|
inheritAttrs: !1,
|
|
4236
4294
|
__name: "InputDate",
|
|
4237
4295
|
props: /*@__PURE__*/ _({
|
|
@@ -4290,7 +4348,7 @@ var As = [
|
|
|
4290
4348
|
return g.value.format(new Date(e.year, e.month - 1, e.day));
|
|
4291
4349
|
}
|
|
4292
4350
|
function E(e) {
|
|
4293
|
-
return
|
|
4351
|
+
return As(e, {
|
|
4294
4352
|
today: Xn(Gn()),
|
|
4295
4353
|
order: y.value,
|
|
4296
4354
|
prefer: n.prefer
|
|
@@ -4366,8 +4424,8 @@ var As = [
|
|
|
4366
4424
|
onInput: M,
|
|
4367
4425
|
onBlur: F,
|
|
4368
4426
|
onKeydown: W(I, ["enter"])
|
|
4369
|
-
}), null, 16,
|
|
4370
|
-
k.value ? (T(), s("span",
|
|
4427
|
+
}), null, 16, js), [[ee, D.value]]),
|
|
4428
|
+
k.value ? (T(), s("span", Ms, N(k.value), 1)) : o("", !0),
|
|
4371
4429
|
d(P(It), {
|
|
4372
4430
|
"aria-label": P(t)("ui.inputDate.openCalendar"),
|
|
4373
4431
|
class: b(q)
|
|
@@ -4380,7 +4438,7 @@ var As = [
|
|
|
4380
4438
|
align: "end",
|
|
4381
4439
|
class: b([P(Ar), "p-3"])
|
|
4382
4440
|
}, {
|
|
4383
|
-
default: H(() => [d(
|
|
4441
|
+
default: H(() => [d(us, {
|
|
4384
4442
|
"model-value": r.value,
|
|
4385
4443
|
min: e.min,
|
|
4386
4444
|
max: e.max,
|
|
@@ -4410,57 +4468,6 @@ var As = [
|
|
|
4410
4468
|
"class"
|
|
4411
4469
|
]));
|
|
4412
4470
|
}
|
|
4413
|
-
}), Ns = /* @__PURE__ */ f({
|
|
4414
|
-
__name: "Tooltip",
|
|
4415
|
-
props: {
|
|
4416
|
-
text: {},
|
|
4417
|
-
side: { default: "top" },
|
|
4418
|
-
align: { default: "center" },
|
|
4419
|
-
delay: { default: 400 },
|
|
4420
|
-
disabled: { type: Boolean },
|
|
4421
|
-
class: { type: [
|
|
4422
|
-
Boolean,
|
|
4423
|
-
null,
|
|
4424
|
-
String,
|
|
4425
|
-
Object,
|
|
4426
|
-
Array
|
|
4427
|
-
] }
|
|
4428
|
-
},
|
|
4429
|
-
setup(e) {
|
|
4430
|
-
let t = e, n = Hn(null) !== null, r = (e, { slots: r }) => n ? r.default?.() : h(zn, {
|
|
4431
|
-
delayDuration: t.delay,
|
|
4432
|
-
skipDelayDuration: 300
|
|
4433
|
-
}, r);
|
|
4434
|
-
return (n, i) => (T(), a(r, null, {
|
|
4435
|
-
default: H(() => [d(P(Bn), {
|
|
4436
|
-
disabled: e.disabled,
|
|
4437
|
-
"delay-duration": e.delay
|
|
4438
|
-
}, {
|
|
4439
|
-
default: H(() => [d(P(Vn), { "as-child": "" }, {
|
|
4440
|
-
default: H(() => [A(n.$slots, "default")]),
|
|
4441
|
-
_: 3
|
|
4442
|
-
}), d(P(Rn), null, {
|
|
4443
|
-
default: H(() => [d(P(Ln), {
|
|
4444
|
-
side: e.side,
|
|
4445
|
-
align: e.align,
|
|
4446
|
-
"side-offset": 8,
|
|
4447
|
-
"collision-padding": 8,
|
|
4448
|
-
class: b(P(X)("z-100 max-w-72 rounded-md bg-neutral-900 dark:bg-neutral-700 px-2.5 py-1.5 text-xs/4 text-white shadow-lg ring-1 ring-white/10", "data-[state=closed]:animate-fade-out data-[state=delayed-open]:animate-fade-in data-[state=instant-open]:animate-fade-in", t.class))
|
|
4449
|
-
}, {
|
|
4450
|
-
default: H(() => [A(n.$slots, "content", {}, () => [u(N(e.text), 1)])]),
|
|
4451
|
-
_: 3
|
|
4452
|
-
}, 8, [
|
|
4453
|
-
"side",
|
|
4454
|
-
"align",
|
|
4455
|
-
"class"
|
|
4456
|
-
])]),
|
|
4457
|
-
_: 3
|
|
4458
|
-
})]),
|
|
4459
|
-
_: 3
|
|
4460
|
-
}, 8, ["disabled", "delay-duration"])]),
|
|
4461
|
-
_: 3
|
|
4462
|
-
}));
|
|
4463
|
-
}
|
|
4464
4471
|
}), 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({
|
|
4465
4472
|
__name: "InputRichText",
|
|
4466
4473
|
props: /*@__PURE__*/ _({
|
|
@@ -4622,7 +4629,7 @@ var As = [
|
|
|
4622
4629
|
"aria-controls": r.id,
|
|
4623
4630
|
class: "flex items-center gap-0.5 border-b border-ink/10 px-1.5 py-1 [&_svg]:opacity-100!",
|
|
4624
4631
|
onMousedown: l[3] ||= G(() => {}, ["prevent"])
|
|
4625
|
-
}, [(T(), s(n, null, k(M, (t) => d(
|
|
4632
|
+
}, [(T(), s(n, null, k(M, (t) => d(gi, {
|
|
4626
4633
|
key: t.name,
|
|
4627
4634
|
text: `${t.label} (${P(A)}${t.key})`,
|
|
4628
4635
|
disabled: e.disabled
|
|
@@ -4657,7 +4664,7 @@ var As = [
|
|
|
4657
4664
|
sideOffset: 6
|
|
4658
4665
|
}
|
|
4659
4666
|
}, {
|
|
4660
|
-
default: H(() => [d(
|
|
4667
|
+
default: H(() => [d(gi, {
|
|
4661
4668
|
text: `${P(t)("ui.inputRichText.link")} (${P(A)}K)`,
|
|
4662
4669
|
disabled: e.disabled
|
|
4663
4670
|
}, {
|
|
@@ -4687,7 +4694,7 @@ var As = [
|
|
|
4687
4694
|
novalidate: "",
|
|
4688
4695
|
onSubmit: G(S, ["prevent"]),
|
|
4689
4696
|
onMousedown: l[1] ||= G(() => {}, ["stop"])
|
|
4690
|
-
}, [d(
|
|
4697
|
+
}, [d(Qo, {
|
|
4691
4698
|
modelValue: v.value,
|
|
4692
4699
|
"onUpdate:modelValue": l[0] ||= (e) => v.value = e,
|
|
4693
4700
|
label: P(t)("ui.inputRichText.linkAddress"),
|
|
@@ -5957,7 +5964,7 @@ var Mc = [
|
|
|
5957
5964
|
href: r.value ? e.href : void 0,
|
|
5958
5965
|
class: b(r.value && "group block h-full cursor-pointer rounded-lg outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus")
|
|
5959
5966
|
}, {
|
|
5960
|
-
default: H(() => [d(
|
|
5967
|
+
default: H(() => [d(Mo, {
|
|
5961
5968
|
padding: "sm",
|
|
5962
5969
|
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)),
|
|
5963
5970
|
ui: { body: "gap-1" }
|
|
@@ -6171,7 +6178,7 @@ var Dl = ["datetime"], Ol = /* @__PURE__ */ f({
|
|
|
6171
6178
|
},
|
|
6172
6179
|
setup(e) {
|
|
6173
6180
|
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(
|
|
6181
|
+
return (e, n) => (T(), a(gi, { text: s.value }, {
|
|
6175
6182
|
default: H(() => [c("time", {
|
|
6176
6183
|
datetime: r.value.toISOString(),
|
|
6177
6184
|
tabindex: "0",
|
|
@@ -6202,7 +6209,7 @@ var Dl = ["datetime"], Ol = /* @__PURE__ */ f({
|
|
|
6202
6209
|
let e = d.value;
|
|
6203
6210
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
6204
6211
|
});
|
|
6205
|
-
return (t, i) => (T(), a(
|
|
6212
|
+
return (t, i) => (T(), a(gi, { text: m.value }, {
|
|
6206
6213
|
default: H(() => [c("span", {
|
|
6207
6214
|
tabindex: "0",
|
|
6208
6215
|
"data-birth-date": h.value,
|
|
@@ -6532,7 +6539,7 @@ var Pl = { class: "flex flex-col gap-2" }, Fl = { class: "flex flex-wrap items-c
|
|
|
6532
6539
|
emits: ["retry"],
|
|
6533
6540
|
setup(e, { emit: t }) {
|
|
6534
6541
|
let { t: n } = J(), r = e, i = t;
|
|
6535
|
-
return (t, o) => e.error ? (T(), a(j(e.card ?
|
|
6542
|
+
return (t, o) => e.error ? (T(), a(j(e.card ? Mo : "div"), {
|
|
6536
6543
|
key: 0,
|
|
6537
6544
|
class: b(r.class)
|
|
6538
6545
|
}, {
|
|
@@ -6561,7 +6568,7 @@ var Pl = { class: "flex flex-col gap-2" }, Fl = { class: "flex flex-wrap items-c
|
|
|
6561
6568
|
}, 8, ["class"])) : e.loading ? (T(), s("div", {
|
|
6562
6569
|
key: 1,
|
|
6563
6570
|
class: b(P(X)("flex justify-center py-12", r.class))
|
|
6564
|
-
}, [d(Sr, { label: e.loadingLabel }, null, 8, ["label"])], 2)) : e.empty ? (T(), a(j(e.card ?
|
|
6571
|
+
}, [d(Sr, { label: e.loadingLabel }, null, 8, ["label"])], 2)) : e.empty ? (T(), a(j(e.card ? Mo : "div"), {
|
|
6565
6572
|
key: 2,
|
|
6566
6573
|
class: b(r.class)
|
|
6567
6574
|
}, {
|
|
@@ -6668,7 +6675,7 @@ var Pl = { class: "flex flex-col gap-2" }, Fl = { class: "flex flex-wrap items-c
|
|
|
6668
6675
|
emits: ["update:step"],
|
|
6669
6676
|
setup(e, { emit: t }) {
|
|
6670
6677
|
let n = e, r = t, a = p(), o = i(() => !!a?.vnode.props?.["onUpdate:step"]);
|
|
6671
|
-
return (t, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-2", n.class)) }, [d(
|
|
6678
|
+
return (t, i) => (T(), s("div", { class: b(P(X)("flex flex-col gap-2", n.class)) }, [d(La, {
|
|
6672
6679
|
label: e.label,
|
|
6673
6680
|
segments: "",
|
|
6674
6681
|
value: e.step + 1,
|
|
@@ -7760,4 +7767,4 @@ function cd(e, t, n) {
|
|
|
7760
7767
|
}
|
|
7761
7768
|
return t;
|
|
7762
7769
|
}
|
|
7763
|
-
export { wu as ActionList, Al as Age,
|
|
7770
|
+
export { wu as ActionList, Al as Age, Jo as Alert, zr as AppLauncher, Za as AppShell, uu as AsyncState, ea as Avatar, Oo as AvatarGroup, ga as Badge, $l as BarChart, oo as Breadcrumb, Z as Button, us as Calendar, Mo as Card, Sc as CardSelect, Vo as ChangeIndicator, Xs as Checkbox, hc as CheckboxGroup, ml as Checklist, Ur as Chip, Yo as Collapsible, id as ConfirmDialog, Fo as Divider, Dc as EmptyState, Ec as FileUpload, Li as Footer, ei as FormField, ma as Header, Kr as InfoTip, Qo as Input, qs as InputCode, Ns as InputDate, ts as InputNumber, Hs as InputPassword, Rs as InputRichText, uc as InputTextArea, hi as LanguageSwitcher, lu as LineChart, Br as Link, so as Menu, Ru as Notification, Hu as NotificationPane, go as PageHeader, Mr as Popover, La as Progress, Xo as Prose, ac as RadioGroup, Ol as RelativeTime, pu as ResultState, vi as SegmentedControl, mi as Select, xo as SettingsRow, Aa as Sidebar, Ka as Slideover, Sr as Spinner, nl as StatTile, gu as Steps, dl as SummaryList, cc as Switch, Jc as Table, Tu as Tabs, yi as ThemeSwitcher, Yu as Toaster, gi 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, Ci as kestonFooterLinks, wi as kestonGroupLinks, vl as relativeTime, _a as sidebarTrail, Ac as sortRows, hl as toDate, od as uiMessages, ju as useNotifications, El as useNow, vr as useTheme };
|