@thekestongroup/ui 0.14.0 → 0.15.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/Popover/popover.d.ts +3 -2
- package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
- package/dist/keston-ui.js +681 -680
- package/package.json +1 -1
- package/src/components/AppLauncher/AppLauncher.vue +3 -3
- package/src/components/AppShell/AppShell.stories.ts +2 -2
- package/src/components/AppShell/AppShell.vue +2 -2
- package/src/components/Avatar/Avatar.vue +3 -3
- package/src/components/AvatarGroup/AvatarGroup.vue +4 -4
- package/src/components/Badge/Badge.vue +2 -2
- package/src/components/Breadcrumb/Breadcrumb.vue +5 -5
- package/src/components/Button/Button.stories.ts +1 -1
- package/src/components/Button/Button.vue +12 -9
- package/src/components/Calendar/Calendar.stories.ts +2 -2
- package/src/components/Calendar/Calendar.vue +8 -8
- package/src/components/Card/Card.stories.ts +5 -5
- package/src/components/Card/Card.vue +3 -3
- package/src/components/CardSelect/CardSelect.vue +10 -7
- package/src/components/ChangeIndicator/ChangeIndicator.vue +2 -2
- package/src/components/Checkbox/Checkbox.vue +5 -5
- package/src/components/CheckboxGroup/CheckboxGroup.stories.ts +1 -1
- package/src/components/CheckboxGroup/CheckboxGroup.vue +2 -2
- package/src/components/Checklist/Checklist.vue +3 -3
- package/src/components/Chip/Chip.stories.ts +1 -1
- package/src/components/Chip/Chip.vue +2 -2
- package/src/components/Divider/Divider.vue +4 -4
- package/src/components/EmptyState/EmptyState.vue +3 -3
- package/src/components/Footer/Footer.vue +4 -4
- package/src/components/FormField/FieldMessage.vue +3 -3
- package/src/components/FormField/FormField.stories.ts +1 -1
- package/src/components/FormField/FormField.vue +8 -3
- package/src/components/Header/Header.stories.ts +8 -8
- package/src/components/Header/Header.vue +6 -6
- package/src/components/InfoTip/InfoTip.stories.ts +1 -1
- package/src/components/InfoTip/InfoTip.vue +1 -1
- package/src/components/Input/Input.vue +1 -1
- package/src/components/InputCode/InputCode.stories.ts +1 -1
- package/src/components/InputCode/InputCode.vue +4 -4
- package/src/components/InputDate/InputDate.stories.ts +1 -1
- package/src/components/InputDate/InputDate.vue +5 -5
- package/src/components/InputNumber/InputNumber.stories.ts +1 -1
- package/src/components/InputNumber/InputNumber.vue +6 -6
- package/src/components/InputPassword/InputPassword.vue +4 -4
- package/src/components/InputRichText/InputRichText.stories.ts +1 -1
- package/src/components/InputRichText/InputRichText.vue +3 -3
- package/src/components/InputTextArea/InputTextArea.vue +1 -1
- package/src/components/Link/Link.stories.ts +4 -4
- package/src/components/Link/Link.vue +1 -1
- package/src/components/Menu/Menu.vue +6 -5
- package/src/components/Notification/Notification.stories.ts +3 -3
- package/src/components/Notification/Notification.vue +9 -9
- package/src/components/Notification/NotificationPane.vue +3 -3
- package/src/components/Notification/Toaster.vue +1 -1
- package/src/components/PageHeader/PageHeader.vue +2 -2
- package/src/components/Popover/Popover.stories.ts +2 -2
- package/src/components/Popover/popover.ts +4 -3
- package/src/components/Progress/Progress.vue +1 -1
- package/src/components/RadioGroup/RadioGroup.vue +6 -6
- package/src/components/RelativeTime/RelativeTime.stories.ts +1 -1
- package/src/components/Select/Select.stories.ts +1 -1
- package/src/components/Select/Select.vue +22 -18
- package/src/components/SettingsRow/SettingsRow.vue +1 -1
- package/src/components/Sidebar/Sidebar.stories.ts +2 -2
- package/src/components/Sidebar/Sidebar.vue +9 -9
- package/src/components/Slideover/Slideover.stories.ts +5 -5
- package/src/components/Slideover/Slideover.vue +6 -6
- package/src/components/Spinner/Spinner.stories.ts +7 -7
- package/src/components/Spinner/Spinner.vue +1 -1
- package/src/components/StatTile/StatTile.stories.ts +2 -2
- package/src/components/StatTile/StatTile.vue +6 -6
- package/src/components/Steps/Steps.vue +2 -2
- package/src/components/SummaryList/SummaryList.vue +8 -8
- package/src/components/Switch/Switch.vue +3 -3
- package/src/components/Table/Table.vue +12 -12
- package/src/components/Tabs/Tabs.vue +4 -4
- package/src/components/Tooltip/Tooltip.stories.ts +1 -1
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/UnsavedChangesBar/UnsavedChangesBar.stories.ts +1 -1
- package/src/components/UnsavedChangesBar/UnsavedChangesBar.vue +1 -1
- package/src/examples/AppPages.stories.ts +3 -3
- package/src/examples/FormLayout.stories.ts +3 -3
- package/src/examples/KestonIdPages.stories.ts +18 -18
- package/src/examples/SchoolPages.stories.ts +5 -5
- package/src/styles/theme.css +94 -5
package/dist/keston-ui.js
CHANGED
|
@@ -90,7 +90,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
90
90
|
}, qn = { key: 2 }, Jn = {
|
|
91
91
|
class: "sr-only",
|
|
92
92
|
role: "status"
|
|
93
|
-
}, Yn = 300, Xn = "not-disabled:not-aria-disabled:hover:brightness-90 not-disabled:not-aria-disabled:active:brightness-80", Zn = "not-disabled:not-aria-disabled:hover:bg-
|
|
93
|
+
}, Yn = 300, Xn = "not-disabled:not-aria-disabled:hover:brightness-90 not-disabled:not-aria-disabled:active:brightness-80", Zn = "not-disabled:not-aria-disabled:hover:bg-surface-hover not-disabled:not-aria-disabled:active:bg-surface-pressed", Qn = "not-disabled:not-aria-disabled:hover:bg-hover not-disabled:not-aria-disabled:active:bg-pressed", Z = /* @__PURE__ */ f({
|
|
94
94
|
__name: "Button",
|
|
95
95
|
props: {
|
|
96
96
|
variant: { default: "basic" },
|
|
@@ -156,15 +156,15 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
156
156
|
error: "Failed"
|
|
157
157
|
}[n.status] : ""), T = [
|
|
158
158
|
"relative inline-flex shrink-0 items-center justify-center whitespace-nowrap select-none overflow-hidden",
|
|
159
|
-
"border border-
|
|
159
|
+
"border border-ink/10 cursor-pointer transition",
|
|
160
160
|
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
161
161
|
"aria-busy:cursor-progress",
|
|
162
162
|
"outline-2 outline-offset-1 outline-transparent forced-colors:not-focus-visible:outline-0",
|
|
163
163
|
"focus-visible:outline-focus"
|
|
164
164
|
], D = {
|
|
165
|
-
basic: `bg-
|
|
165
|
+
basic: `bg-surface text-ink shadow-xs ${Zn}`,
|
|
166
166
|
primary: `bg-primary text-white ${Xn}`,
|
|
167
|
-
ghost: `bg-transparent text-
|
|
167
|
+
ghost: `bg-transparent text-ink border-transparent ${Qn}`,
|
|
168
168
|
danger: `bg-red text-white ${Xn}`
|
|
169
169
|
}, A = {
|
|
170
170
|
idle: "",
|
|
@@ -229,7 +229,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
229
229
|
"class"
|
|
230
230
|
]));
|
|
231
231
|
}
|
|
232
|
-
}),
|
|
232
|
+
}), $n = ["z-50 rounded border border-ink/10 bg-surface-elevated text-ink shadow-md outline-none", "data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out"], er = "block size-2.5 -translate-y-1/2 rotate-45 border-r border-b border-ink/10 bg-surface-elevated", tr = /* @__PURE__ */ f({
|
|
233
233
|
__name: "Popover",
|
|
234
234
|
props: /*@__PURE__*/ g({
|
|
235
235
|
mode: { default: "click" },
|
|
@@ -342,7 +342,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
342
342
|
...f,
|
|
343
343
|
...e.content
|
|
344
344
|
}, {
|
|
345
|
-
class: M(X)(M(
|
|
345
|
+
class: M(X)(M($n), e.ui?.content),
|
|
346
346
|
onPointerenter: v,
|
|
347
347
|
onPointerleave: b,
|
|
348
348
|
onEscapeKeyDown: D,
|
|
@@ -351,7 +351,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
351
351
|
onCloseAutoFocus: k
|
|
352
352
|
}), {
|
|
353
353
|
default: V(() => [O(t.$slots, "content", { close: u }), e.arrow ? (w(), a(M(Lt), _({ key: 0 }, typeof e.arrow == "object" ? e.arrow : {}, { "as-child": "" }), {
|
|
354
|
-
default: V(() => [c("span", { class: y(M(X)(M(
|
|
354
|
+
default: V(() => [c("span", { class: y(M(X)(M(er), e.ui?.arrow)) }, null, 2)]),
|
|
355
355
|
_: 1
|
|
356
356
|
}, 16)) : o("", !0)]),
|
|
357
357
|
_: 3
|
|
@@ -362,7 +362,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
362
362
|
_: 3
|
|
363
363
|
}, 8, ["open", "modal"]));
|
|
364
364
|
}
|
|
365
|
-
}),
|
|
365
|
+
}), nr = [
|
|
366
366
|
{
|
|
367
367
|
id: "id",
|
|
368
368
|
label: "Keston ID",
|
|
@@ -393,20 +393,20 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
393
393
|
href: "https://ui.keston.co",
|
|
394
394
|
icon: "design"
|
|
395
395
|
}
|
|
396
|
-
],
|
|
396
|
+
], rr = ["aria-label"], ir = [
|
|
397
397
|
"href",
|
|
398
398
|
"aria-current",
|
|
399
399
|
"onClick"
|
|
400
|
-
],
|
|
400
|
+
], ar = { class: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-ink/5" }, or = { class: "min-w-0 truncate" }, sr = {
|
|
401
401
|
id: we,
|
|
402
402
|
admin: Le,
|
|
403
403
|
work: le,
|
|
404
404
|
utilities: Be,
|
|
405
405
|
design: Me
|
|
406
|
-
},
|
|
406
|
+
}, cr = /* @__PURE__ */ f({
|
|
407
407
|
__name: "AppLauncher",
|
|
408
408
|
props: {
|
|
409
|
-
apps: { default: () =>
|
|
409
|
+
apps: { default: () => nr },
|
|
410
410
|
current: {},
|
|
411
411
|
align: { default: "end" },
|
|
412
412
|
label: {},
|
|
@@ -421,21 +421,21 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
421
421
|
setup(e) {
|
|
422
422
|
let { t } = K(), r = e;
|
|
423
423
|
function i(e) {
|
|
424
|
-
return typeof e.icon == "string" ?
|
|
424
|
+
return typeof e.icon == "string" ? sr[e.icon] ?? q : e.icon ?? q;
|
|
425
425
|
}
|
|
426
|
-
return (o, l) => (w(), a(
|
|
426
|
+
return (o, l) => (w(), a(tr, {
|
|
427
427
|
content: { align: e.align },
|
|
428
428
|
ui: { content: "w-64 p-2" }
|
|
429
429
|
}, {
|
|
430
430
|
content: V(({ close: r }) => [c("nav", { "aria-label": e.label ?? M(t)("ui.appLauncher.label") }, [c("ul", null, [(w(!0), s(n, null, D(e.apps, (t) => (w(), s("li", { key: t.id }, [c("a", {
|
|
431
431
|
href: t.href,
|
|
432
432
|
"aria-current": t.id === e.current ? "page" : void 0,
|
|
433
|
-
class: y(M(X)("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-bold text-
|
|
433
|
+
class: y(M(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")),
|
|
434
434
|
onClick: (e) => r()
|
|
435
|
-
}, [c("span",
|
|
435
|
+
}, [c("span", ar, [(w(), a(k(i(t)), {
|
|
436
436
|
class: "size-5",
|
|
437
437
|
"aria-hidden": "true"
|
|
438
|
-
}))]), c("span",
|
|
438
|
+
}))]), c("span", or, j(t.label), 1)], 10, ir)]))), 128))])], 8, rr)]),
|
|
439
439
|
default: V(() => [d(Z, {
|
|
440
440
|
variant: "ghost",
|
|
441
441
|
square: "",
|
|
@@ -448,7 +448,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
448
448
|
_: 1
|
|
449
449
|
}, 8, ["content"]));
|
|
450
450
|
}
|
|
451
|
-
}),
|
|
451
|
+
}), lr = /* @__PURE__ */ f({
|
|
452
452
|
__name: "Link",
|
|
453
453
|
props: {
|
|
454
454
|
href: {},
|
|
@@ -469,7 +469,7 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
469
469
|
setup(e) {
|
|
470
470
|
let t = e, r = [
|
|
471
471
|
"cursor-pointer rounded-xs underline underline-offset-2 transition-colors",
|
|
472
|
-
"hover:text-
|
|
472
|
+
"hover:text-ink hover:decoration-2",
|
|
473
473
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
474
474
|
];
|
|
475
475
|
return (i, l) => (w(), a(M(Ht), {
|
|
@@ -497,17 +497,17 @@ var Hn = ["stroke-dashoffset", "stroke-opacity"], Un = {
|
|
|
497
497
|
}
|
|
498
498
|
});
|
|
499
499
|
// src/components/Footer/footer.ts
|
|
500
|
-
function
|
|
500
|
+
function ur(e, t) {
|
|
501
501
|
return t && t < e ? `${t}–${e}` : String(e);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function dr(e) {
|
|
504
504
|
return e ? /^v/i.test(e) ? `v${e.slice(1)}` : `v${e}` : "";
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function fr(e) {
|
|
507
507
|
return e ? e.replace(/^v/i, "") : "";
|
|
508
508
|
}
|
|
509
509
|
// src/components/Footer/links.ts
|
|
510
|
-
var
|
|
510
|
+
var pr = [
|
|
511
511
|
{
|
|
512
512
|
label: "Help & support",
|
|
513
513
|
href: "https://thekestongroup.com/help"
|
|
@@ -520,7 +520,7 @@ var fr = [
|
|
|
520
520
|
label: "Terms & Conditions",
|
|
521
521
|
href: "https://thekestongroup.com/terms"
|
|
522
522
|
}
|
|
523
|
-
],
|
|
523
|
+
], mr = [
|
|
524
524
|
{
|
|
525
525
|
label: "Keston ID",
|
|
526
526
|
href: "https://id.keston.co"
|
|
@@ -537,23 +537,23 @@ var fr = [
|
|
|
537
537
|
label: "Design system",
|
|
538
538
|
href: "https://ui.keston.co"
|
|
539
539
|
}
|
|
540
|
-
],
|
|
540
|
+
], hr = ["aria-label"], gr = { class: "flex flex-wrap items-center gap-x-4 gap-y-1" }, _r = {
|
|
541
541
|
key: 0,
|
|
542
|
-
class: "hidden h-4 w-px bg-
|
|
542
|
+
class: "hidden h-4 w-px bg-ink/10 sm:block",
|
|
543
543
|
"aria-hidden": "true"
|
|
544
|
-
},
|
|
544
|
+
}, vr = {
|
|
545
545
|
key: 0,
|
|
546
546
|
class: "flex flex-wrap items-baseline gap-x-1.5"
|
|
547
|
-
},
|
|
547
|
+
}, yr = {
|
|
548
548
|
key: 0,
|
|
549
|
-
class: "font-bold text-
|
|
550
|
-
},
|
|
551
|
-
class: "font-mono text-xs text-
|
|
549
|
+
class: "font-bold text-ink/80"
|
|
550
|
+
}, br = { key: 1 }, xr = { class: "sr-only" }, Sr = { "aria-hidden": "true" }, Cr = ["title"], wr = { class: "sr-only" }, Tr = {
|
|
551
|
+
class: "font-mono text-xs text-ink/55",
|
|
552
552
|
"aria-hidden": "true"
|
|
553
|
-
},
|
|
553
|
+
}, Er = /* @__PURE__ */ f({
|
|
554
554
|
__name: "Footer",
|
|
555
555
|
props: {
|
|
556
|
-
links: { default: () =>
|
|
556
|
+
links: { default: () => pr },
|
|
557
557
|
moreLinks: { default: () => [] },
|
|
558
558
|
linkComponent: { default: void 0 },
|
|
559
559
|
appName: {},
|
|
@@ -572,7 +572,7 @@ var fr = [
|
|
|
572
572
|
ui: {}
|
|
573
573
|
},
|
|
574
574
|
setup(e) {
|
|
575
|
-
let { t } = K(), r = e, a = i(() =>
|
|
575
|
+
let { t } = K(), r = e, a = i(() => ur(r.year ?? (/* @__PURE__ */ new Date()).getFullYear(), r.since)), l = i(() => dr(r.version)), f = i(() => r.version ? t("ui.footer.version", { version: fr(r.version) }) : ""), p = i(() => r.build ? t("ui.footer.build", { build: r.build }) : "");
|
|
576
576
|
function m(e) {
|
|
577
577
|
return e.to === void 0 ? {
|
|
578
578
|
href: e.href,
|
|
@@ -583,27 +583,27 @@ var fr = [
|
|
|
583
583
|
newTab: e.newTab ?? !1
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
return (i, h) => (w(), s("footer", { class: y(M(X)("flex shrink-0 flex-col gap-3 border-t border-
|
|
586
|
+
return (i, h) => (w(), s("footer", { class: y(M(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", r.class)) }, [c("nav", {
|
|
587
587
|
"aria-label": M(t)("ui.footer.label"),
|
|
588
588
|
class: y(M(X)("min-w-0", e.ui?.links))
|
|
589
|
-
}, [O(i.$slots, "nav", {}, () => [c("ul",
|
|
590
|
-
(w(!0), s(n, null, D(e.links, (e) => (w(), s("li", { key: e.label }, [d(
|
|
589
|
+
}, [O(i.$slots, "nav", {}, () => [c("ul", gr, [
|
|
590
|
+
(w(!0), s(n, null, D(e.links, (e) => (w(), s("li", { key: e.label }, [d(lr, _({ ref_for: !0 }, m(e), { icon: !1 }), {
|
|
591
591
|
default: V(() => [u(j(e.label), 1)]),
|
|
592
592
|
_: 2
|
|
593
593
|
}, 1040)]))), 128)),
|
|
594
|
-
e.moreLinks.length ? (w(), s("li",
|
|
595
|
-
(w(!0), s(n, null, D(e.moreLinks, (e) => (w(), s("li", { key: e.label }, [d(
|
|
594
|
+
e.moreLinks.length ? (w(), s("li", _r)) : o("", !0),
|
|
595
|
+
(w(!0), s(n, null, D(e.moreLinks, (e) => (w(), s("li", { key: e.label }, [d(lr, _({ ref_for: !0 }, m(e), { icon: !1 }), {
|
|
596
596
|
default: V(() => [u(j(e.label), 1)]),
|
|
597
597
|
_: 2
|
|
598
598
|
}, 1040)]))), 128))
|
|
599
|
-
])])], 10,
|
|
600
|
-
e.appName || e.version || e.build ? (w(), s("p",
|
|
601
|
-
e.appName ? (w(), s("span",
|
|
602
|
-
e.version ? (w(), s("span",
|
|
599
|
+
])])], 10, hr), c("div", { class: y(M(X)("flex flex-wrap items-center gap-x-3 gap-y-1 sm:justify-end", e.ui?.meta)) }, [
|
|
600
|
+
e.appName || e.version || e.build ? (w(), s("p", vr, [
|
|
601
|
+
e.appName ? (w(), s("span", yr, j(e.appName), 1)) : o("", !0),
|
|
602
|
+
e.version ? (w(), s("span", br, [c("span", xr, j(f.value), 1), c("span", Sr, j(l.value), 1)])) : o("", !0),
|
|
603
603
|
e.build ? (w(), s("span", {
|
|
604
604
|
key: 2,
|
|
605
605
|
title: p.value
|
|
606
|
-
}, [c("span",
|
|
606
|
+
}, [c("span", wr, j(p.value), 1), c("span", Tr, j(e.build), 1)], 8, Cr)) : o("", !0)
|
|
607
607
|
])) : o("", !0),
|
|
608
608
|
c("p", null, j(M(t)("ui.footer.copyright", {
|
|
609
609
|
years: a.value,
|
|
@@ -614,42 +614,42 @@ var fr = [
|
|
|
614
614
|
}
|
|
615
615
|
});
|
|
616
616
|
// src/lib/initials.ts
|
|
617
|
-
function
|
|
617
|
+
function Dr(e) {
|
|
618
618
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
619
619
|
if (!t.length) return "";
|
|
620
620
|
let n = t[0], r = t.length > 1 ? t[t.length - 1] : "";
|
|
621
621
|
return (n[0] + (r[0] ?? "")).toUpperCase();
|
|
622
622
|
}
|
|
623
623
|
// src/components/Avatar/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
624
|
-
var
|
|
624
|
+
var Or = ["aria-label"], kr = [
|
|
625
625
|
"src",
|
|
626
626
|
"width",
|
|
627
627
|
"height"
|
|
628
|
-
],
|
|
628
|
+
], Ar = {
|
|
629
629
|
key: 1,
|
|
630
630
|
"aria-hidden": "true"
|
|
631
|
-
},
|
|
631
|
+
}, jr = { class: "flex flex-col" }, Mr = {
|
|
632
632
|
key: 0,
|
|
633
|
-
class: "truncate px-4 pt-3 text-xs font-bold text-
|
|
634
|
-
},
|
|
633
|
+
class: "truncate px-4 pt-3 text-xs font-bold text-ink/65 uppercase"
|
|
634
|
+
}, Nr = { class: "flex items-center gap-3 px-4 py-3" }, Pr = [
|
|
635
635
|
"src",
|
|
636
636
|
"width",
|
|
637
637
|
"height"
|
|
638
|
-
],
|
|
638
|
+
], Fr = { class: "flex min-w-0 flex-col" }, Ir = { class: "truncate font-bold" }, Lr = {
|
|
639
639
|
key: 0,
|
|
640
|
-
class: "truncate text-sm text-
|
|
641
|
-
},
|
|
640
|
+
class: "truncate text-sm text-ink/65"
|
|
641
|
+
}, Rr = ["href"], zr = [
|
|
642
642
|
"role",
|
|
643
643
|
"aria-label",
|
|
644
644
|
"aria-hidden"
|
|
645
|
-
],
|
|
645
|
+
], Br = [
|
|
646
646
|
"src",
|
|
647
647
|
"width",
|
|
648
648
|
"height"
|
|
649
|
-
],
|
|
649
|
+
], Vr = {
|
|
650
650
|
key: 1,
|
|
651
651
|
"aria-hidden": "true"
|
|
652
|
-
},
|
|
652
|
+
}, Hr = "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary font-bold text-white select-none", Ur = /* @__PURE__ */ f({
|
|
653
653
|
__name: "Avatar",
|
|
654
654
|
props: {
|
|
655
655
|
user: {},
|
|
@@ -665,7 +665,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
665
665
|
] }
|
|
666
666
|
},
|
|
667
667
|
setup(e) {
|
|
668
|
-
let t = e, r = i(() =>
|
|
668
|
+
let t = e, r = i(() => Dr(t.user.name)), l = E(!1);
|
|
669
669
|
z(() => t.user.avatar, () => l.value = !1);
|
|
670
670
|
let d = i(() => !!t.user.avatar && !l.value), f = i(() => d.value || !r.value ? t.user.name : `${r.value}, ${t.user.name}`), p = {
|
|
671
671
|
xs: "size-5 text-xs",
|
|
@@ -680,7 +680,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
680
680
|
lg: 48,
|
|
681
681
|
xl: 64
|
|
682
682
|
};
|
|
683
|
-
return (i, h) => e.profile ? (w(), a(
|
|
683
|
+
return (i, h) => e.profile ? (w(), a(tr, {
|
|
684
684
|
key: 0,
|
|
685
685
|
mode: "hover",
|
|
686
686
|
"open-delay": 300,
|
|
@@ -692,8 +692,8 @@ var Dr = ["aria-label"], Or = [
|
|
|
692
692
|
},
|
|
693
693
|
ui: { content: "w-64" }
|
|
694
694
|
}, {
|
|
695
|
-
content: V(() => [c("div",
|
|
696
|
-
class: y(M(X)(
|
|
695
|
+
content: V(() => [c("div", jr, [e.user.organisation ? (w(), s("p", Mr, j(e.user.organisation), 1)) : o("", !0), c("div", Nr, [c("span", {
|
|
696
|
+
class: y(M(X)(Hr, p.lg)),
|
|
697
697
|
"aria-hidden": "true"
|
|
698
698
|
}, [d.value ? (w(), s("img", {
|
|
699
699
|
key: 0,
|
|
@@ -704,19 +704,19 @@ var Dr = ["aria-label"], Or = [
|
|
|
704
704
|
decoding: "async",
|
|
705
705
|
alt: "",
|
|
706
706
|
class: "size-full object-cover"
|
|
707
|
-
}, null, 8,
|
|
708
|
-
c("span",
|
|
709
|
-
e.user.role ? (w(), s("span",
|
|
707
|
+
}, null, 8, Pr)) : (w(), s(n, { key: 1 }, [u(j(r.value), 1)], 64))], 2), c("div", Fr, [
|
|
708
|
+
c("span", Ir, j(e.user.name), 1),
|
|
709
|
+
e.user.role ? (w(), s("span", Lr, j(e.user.role), 1)) : o("", !0),
|
|
710
710
|
e.user.email ? (w(), s("a", {
|
|
711
711
|
key: 1,
|
|
712
712
|
href: `mailto:${e.user.email}`,
|
|
713
|
-
class: "truncate rounded-sm text-sm text-
|
|
714
|
-
}, j(e.user.email), 9,
|
|
713
|
+
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"
|
|
714
|
+
}, j(e.user.email), 9, Rr)) : o("", !0)
|
|
715
715
|
])])])]),
|
|
716
716
|
default: V(() => [c("button", {
|
|
717
717
|
type: "button",
|
|
718
718
|
"aria-label": f.value,
|
|
719
|
-
class: y(M(X)(
|
|
719
|
+
class: y(M(X)(Hr, p[e.size], "cursor-pointer outline-2 outline-offset-1 outline-transparent transition focus-visible:outline-focus", t.class))
|
|
720
720
|
}, [d.value ? (w(), s("img", {
|
|
721
721
|
key: 0,
|
|
722
722
|
src: e.user.avatar,
|
|
@@ -727,14 +727,14 @@ var Dr = ["aria-label"], Or = [
|
|
|
727
727
|
alt: "",
|
|
728
728
|
class: "size-full object-cover",
|
|
729
729
|
onError: h[0] ||= (e) => l.value = !0
|
|
730
|
-
}, null, 40,
|
|
730
|
+
}, null, 40, kr)) : (w(), s("span", Ar, j(r.value), 1))], 10, Or)]),
|
|
731
731
|
_: 1
|
|
732
732
|
})) : (w(), s("span", {
|
|
733
733
|
key: 1,
|
|
734
734
|
role: e.decorative ? void 0 : "img",
|
|
735
735
|
"aria-label": e.decorative ? void 0 : e.user.name,
|
|
736
736
|
"aria-hidden": e.decorative || void 0,
|
|
737
|
-
class: y(M(X)(
|
|
737
|
+
class: y(M(X)(Hr, p[e.size], t.class))
|
|
738
738
|
}, [d.value ? (w(), s("img", {
|
|
739
739
|
key: 0,
|
|
740
740
|
src: e.user.avatar,
|
|
@@ -745,15 +745,15 @@ var Dr = ["aria-label"], Or = [
|
|
|
745
745
|
alt: "",
|
|
746
746
|
class: "size-full object-cover",
|
|
747
747
|
onError: h[1] ||= (e) => l.value = !0
|
|
748
|
-
}, null, 40,
|
|
748
|
+
}, null, 40, Br)) : (w(), s("span", Vr, j(r.value), 1))], 10, zr));
|
|
749
749
|
}
|
|
750
|
-
}),
|
|
750
|
+
}), Wr = { class: "flex flex-col" }, Gr = {
|
|
751
751
|
key: 0,
|
|
752
|
-
class: "border-b border-
|
|
753
|
-
},
|
|
752
|
+
class: "border-b border-ink/10"
|
|
753
|
+
}, Kr = ["title"], qr = { class: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 px-4 py-3" }, Jr = { class: "flex min-w-0 flex-col" }, Yr = ["title"], Xr = ["title"], Zr = {
|
|
754
754
|
key: 1,
|
|
755
|
-
class: "flex items-center gap-2 border-t border-
|
|
756
|
-
},
|
|
755
|
+
class: "flex items-center gap-2 border-t border-ink/10 px-4 py-3"
|
|
756
|
+
}, Qr = /* @__PURE__ */ f({
|
|
757
757
|
__name: "Header",
|
|
758
758
|
props: {
|
|
759
759
|
title: {},
|
|
@@ -800,17 +800,17 @@ var Dr = ["aria-label"], Or = [
|
|
|
800
800
|
"sign-in"
|
|
801
801
|
],
|
|
802
802
|
setup(e, { emit: t }) {
|
|
803
|
-
let { t: n } = K(), r = e, l = t, f = i(() =>
|
|
803
|
+
let { t: n } = K(), r = e, l = t, f = i(() => Dr(r.user?.name ?? "")), p = i(() => r.user ? r.user.avatar || !f.value ? n("ui.header.account", { name: r.user.name }) : n("ui.header.accountWithInitials", {
|
|
804
804
|
initials: f.value,
|
|
805
805
|
name: r.user.name
|
|
806
806
|
}) : ""), m = i(() => {
|
|
807
807
|
let e = r.titleTo;
|
|
808
808
|
if (e != null && e !== "") return r.linkComponent === "a" ? { href: e } : { to: e };
|
|
809
|
-
}), h = ["-mx-2 rounded px-2 py-1 transition-colors hover:bg-
|
|
809
|
+
}), h = ["-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"];
|
|
810
810
|
function g(e, t) {
|
|
811
811
|
t(), l(e === "account-settings" ? "account-settings" : e === "switch-account" ? "switch-account" : "log-out");
|
|
812
812
|
}
|
|
813
|
-
return (t, i) => (w(), s("header", { class: y(M(X)("flex h-12 shrink-0 items-center gap-2 border-b border-
|
|
813
|
+
return (t, i) => (w(), s("header", { class: y(M(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", r.class)) }, [
|
|
814
814
|
O(t.$slots, "start"),
|
|
815
815
|
e.menu ? (w(), a(Z, {
|
|
816
816
|
key: 0,
|
|
@@ -839,30 +839,30 @@ var Dr = ["aria-label"], Or = [
|
|
|
839
839
|
t.$slots.trailing || t.$slots.account || e.user || e.signIn ? (w(), s("div", {
|
|
840
840
|
key: 2,
|
|
841
841
|
class: y(M(X)("flex shrink-0 items-center gap-1", e.ui?.trailing))
|
|
842
|
-
}, [O(t.$slots, "trailing"), O(t.$slots, "account", {}, () => [e.user ? (w(), a(
|
|
842
|
+
}, [O(t.$slots, "trailing"), O(t.$slots, "account", {}, () => [e.user ? (w(), a(tr, {
|
|
843
843
|
key: 0,
|
|
844
844
|
content: { align: "end" },
|
|
845
845
|
ui: { content: M(X)("w-80", e.ui?.userMenu) }
|
|
846
846
|
}, {
|
|
847
|
-
content: V(({ close: n }) => [c("div",
|
|
848
|
-
e.user.organisation || t.$slots.organisation ? (w(), s("div",
|
|
849
|
-
class: "truncate px-4 py-3 text-xs font-bold text-
|
|
847
|
+
content: V(({ close: n }) => [c("div", Wr, [
|
|
848
|
+
e.user.organisation || t.$slots.organisation ? (w(), s("div", Gr, [O(t.$slots, "organisation", { close: n }, () => [c("p", {
|
|
849
|
+
class: "truncate px-4 py-3 text-xs font-bold text-ink/65 uppercase",
|
|
850
850
|
title: e.user.organisation
|
|
851
|
-
}, j(e.user.organisation), 9,
|
|
852
|
-
c("div",
|
|
853
|
-
d(
|
|
851
|
+
}, j(e.user.organisation), 9, Kr)])])) : o("", !0),
|
|
852
|
+
c("div", qr, [
|
|
853
|
+
d(Ur, {
|
|
854
854
|
user: e.user,
|
|
855
855
|
size: "lg",
|
|
856
856
|
decorative: ""
|
|
857
857
|
}, null, 8, ["user"]),
|
|
858
|
-
c("div",
|
|
858
|
+
c("div", Jr, [c("span", {
|
|
859
859
|
class: "truncate font-bold",
|
|
860
860
|
title: e.user.name
|
|
861
|
-
}, j(e.user.name), 9,
|
|
861
|
+
}, j(e.user.name), 9, Yr), e.user.email ? (w(), s("span", {
|
|
862
862
|
key: 0,
|
|
863
|
-
class: "truncate text-sm text-
|
|
863
|
+
class: "truncate text-sm text-ink/65",
|
|
864
864
|
title: e.user.email
|
|
865
|
-
}, j(e.user.email), 9,
|
|
865
|
+
}, j(e.user.email), 9, Xr)) : o("", !0)]),
|
|
866
866
|
e.userActions.includes("account-settings") ? (w(), a(Z, {
|
|
867
867
|
key: 0,
|
|
868
868
|
size: "sm",
|
|
@@ -875,7 +875,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
875
875
|
}, 8, ["onClick"])) : o("", !0)
|
|
876
876
|
]),
|
|
877
877
|
O(t.$slots, "account-menu", { close: n }),
|
|
878
|
-
e.userActions.includes("switch-account") || e.userActions.includes("log-out") ? (w(), s("div",
|
|
878
|
+
e.userActions.includes("switch-account") || e.userActions.includes("log-out") ? (w(), s("div", Zr, [e.userActions.includes("switch-account") ? (w(), a(Z, {
|
|
879
879
|
key: 0,
|
|
880
880
|
onClick: (e) => g("switch-account", n)
|
|
881
881
|
}, {
|
|
@@ -898,7 +898,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
898
898
|
"aria-label": p.value,
|
|
899
899
|
class: "-mr-1.5 rounded-full"
|
|
900
900
|
}, {
|
|
901
|
-
default: V(() => [d(
|
|
901
|
+
default: V(() => [d(Ur, {
|
|
902
902
|
user: e.user,
|
|
903
903
|
size: "sm",
|
|
904
904
|
decorative: ""
|
|
@@ -917,7 +917,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
917
917
|
})) : o("", !0)])], 2)) : o("", !0)
|
|
918
918
|
], 2));
|
|
919
919
|
}
|
|
920
|
-
}),
|
|
920
|
+
}), $r = "inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-ink/10 font-bold", ei = /* @__PURE__ */ f({
|
|
921
921
|
__name: "Badge",
|
|
922
922
|
props: {
|
|
923
923
|
color: { default: "basic" },
|
|
@@ -932,7 +932,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
932
932
|
},
|
|
933
933
|
setup(e) {
|
|
934
934
|
let t = e, n = {
|
|
935
|
-
basic: "bg-
|
|
935
|
+
basic: "bg-surface text-ink",
|
|
936
936
|
primary: "bg-primary text-white",
|
|
937
937
|
red: "bg-red text-white",
|
|
938
938
|
green: "bg-green text-white",
|
|
@@ -943,7 +943,7 @@ var Dr = ["aria-label"], Or = [
|
|
|
943
943
|
md: "h-6 px-2 text-xs gap-1 [&_svg]:size-3.5",
|
|
944
944
|
lg: "h-7 px-2.5 text-sm gap-1.5 [&_svg]:size-4"
|
|
945
945
|
};
|
|
946
|
-
return (i, a) => (w(), s("span", { class: y(M(X)(
|
|
946
|
+
return (i, a) => (w(), s("span", { class: y(M(X)($r, n[e.color], r[e.size], t.class)) }, [
|
|
947
947
|
O(i.$slots, "leading"),
|
|
948
948
|
O(i.$slots, "default"),
|
|
949
949
|
O(i.$slots, "trailing")
|
|
@@ -951,27 +951,27 @@ var Dr = ["aria-label"], Or = [
|
|
|
951
951
|
}
|
|
952
952
|
});
|
|
953
953
|
// src/components/Sidebar/sidebar.ts
|
|
954
|
-
function
|
|
954
|
+
function ti(e = [], t = []) {
|
|
955
955
|
for (let n of [...e, ...t.flatMap((e) => e.items)]) {
|
|
956
956
|
if (n.active) return [n];
|
|
957
957
|
if (n.children?.length) {
|
|
958
|
-
let e =
|
|
958
|
+
let e = ti(n.children);
|
|
959
959
|
if (e.length) return [n, ...e];
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
return [];
|
|
963
963
|
}
|
|
964
964
|
// src/components/Sidebar/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
965
|
-
var
|
|
965
|
+
var ni = ["data-collapsed"], ri = ["aria-label"], ii = ["data-level"], ai = {
|
|
966
966
|
key: 0,
|
|
967
|
-
class: "-mb-2 flex flex-col gap-1 border-b border-
|
|
968
|
-
},
|
|
967
|
+
class: "-mb-2 flex flex-col gap-1 border-b border-ink/10 pb-2"
|
|
968
|
+
}, oi = ["title"], si = {
|
|
969
969
|
key: 0,
|
|
970
970
|
class: "relative flex h-6 items-center px-3"
|
|
971
|
-
},
|
|
971
|
+
}, ci = ["id"], li = ["aria-labelledby"], ui = {
|
|
972
972
|
key: 0,
|
|
973
973
|
class: "sr-only"
|
|
974
|
-
},
|
|
974
|
+
}, di = "transition-opacity duration-150 motion-reduce:transition-none", fi = "bg-primary/10 font-bold text-primary-fg not-aria-disabled:not-disabled:hover:bg-primary/15", pi = "font-bold text-primary-fg", mi = /* @__PURE__ */ f({
|
|
975
975
|
__name: "Sidebar",
|
|
976
976
|
props: /*@__PURE__*/ g({
|
|
977
977
|
items: { default: () => [] },
|
|
@@ -1007,7 +1007,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1007
1007
|
e.push(r), t = r.children;
|
|
1008
1008
|
}
|
|
1009
1009
|
return e;
|
|
1010
|
-
}), S = i(() => x.value[x.value.length - 1]), C = i(() => S.value ? [{ items: S.value.children }] : g.value), T = i(() =>
|
|
1010
|
+
}), S = i(() => x.value[x.value.length - 1]), C = i(() => S.value ? [{ items: S.value.children }] : g.value), T = i(() => ti(f.items, f.sections)), A = i(() => new Set(T.value.slice(0, -1).map((e) => e.label)));
|
|
1011
1011
|
z(() => T.value.map((e) => e.label).join("\0"), () => {
|
|
1012
1012
|
b.value = T.value.slice(0, -1).map((e) => e.label);
|
|
1013
1013
|
}, { immediate: !0 });
|
|
@@ -1060,16 +1060,16 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1060
1060
|
"cursor-pointer transition [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1061
1061
|
"outline-2 -outline-offset-2 outline-transparent forced-colors:not-focus-visible:outline-0",
|
|
1062
1062
|
"focus-visible:outline-focus",
|
|
1063
|
-
"not-aria-disabled:not-disabled:hover:bg-
|
|
1063
|
+
"not-aria-disabled:not-disabled:hover:bg-hover not-aria-disabled:not-disabled:active:bg-pressed",
|
|
1064
1064
|
"disabled:cursor-not-allowed disabled:opacity-40 aria-disabled:cursor-not-allowed aria-disabled:opacity-40"
|
|
1065
1065
|
];
|
|
1066
1066
|
return (t, i) => (w(), s("aside", {
|
|
1067
1067
|
"data-collapsed": m.value || void 0,
|
|
1068
|
-
class: y(M(X)("flex h-full shrink-0 flex-col border-r border-
|
|
1068
|
+
class: y(M(X)("flex h-full shrink-0 flex-col border-r border-ink/10 bg-surface text-ink", "w-64 transition-[width] duration-300 ease-out motion-reduce:transition-none", m.value && "w-14", f.class))
|
|
1069
1069
|
}, [
|
|
1070
1070
|
t.$slots.header ? (w(), s("div", {
|
|
1071
1071
|
key: 0,
|
|
1072
|
-
class: y(M(X)("flex h-12 shrink-0 items-center gap-2 overflow-hidden border-b border-
|
|
1072
|
+
class: y(M(X)("flex h-12 shrink-0 items-center gap-2 overflow-hidden border-b border-ink/10 px-4", e.ui?.header))
|
|
1073
1073
|
}, [O(t.$slots, "header", { collapsed: m.value })], 2)) : o("", !0),
|
|
1074
1074
|
c("nav", {
|
|
1075
1075
|
ref_key: "navRef",
|
|
@@ -1081,21 +1081,21 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1081
1081
|
key: N.value,
|
|
1082
1082
|
"data-level": N.value,
|
|
1083
1083
|
class: "flex flex-col gap-4"
|
|
1084
|
-
}, [S.value ? (w(), s("div",
|
|
1084
|
+
}, [S.value ? (w(), s("div", ai, [c("button", {
|
|
1085
1085
|
type: "button",
|
|
1086
1086
|
"data-back": "",
|
|
1087
1087
|
title: m.value ? M(l)("ui.sidebar.backFrom", { name: S.value.label }) : void 0,
|
|
1088
1088
|
class: y(M(X)(J, "font-bold", e.ui?.item)),
|
|
1089
1089
|
onClick: ee
|
|
1090
|
-
}, [d(M(pe), { "aria-hidden": "true" }), c("span", { class: y(M(X)("min-w-0 flex-1 truncate",
|
|
1090
|
+
}, [d(M(pe), { "aria-hidden": "true" }), c("span", { class: y(M(X)("min-w-0 flex-1 truncate", di, m.value && "opacity-0")) }, [i[1] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(j(S.value.label), 1)], 2)], 10, oi)])) : o("", !0), (w(!0), s(n, null, D(C.value, (r, i) => (w(), s("div", {
|
|
1091
1091
|
key: i,
|
|
1092
1092
|
class: "flex flex-col gap-1"
|
|
1093
|
-
}, [r.label ? (w(), s("div",
|
|
1093
|
+
}, [r.label ? (w(), s("div", si, [c("div", {
|
|
1094
1094
|
id: `${M(h)}-section-${i}`,
|
|
1095
|
-
class: y(M(X)("truncate text-xs font-bold text-
|
|
1096
|
-
}, j(r.label), 11,
|
|
1095
|
+
class: y(M(X)("truncate text-xs font-bold text-ink/65 uppercase", di, m.value && "opacity-0"))
|
|
1096
|
+
}, j(r.label), 11, ci), c("div", {
|
|
1097
1097
|
"aria-hidden": "true",
|
|
1098
|
-
class: y(M(X)("absolute inset-x-2 top-1/2 border-t border-
|
|
1098
|
+
class: y(M(X)("absolute inset-x-2 top-1/2 border-t border-ink/10", di, !m.value && "opacity-0"))
|
|
1099
1099
|
}, null, 2)])) : o("", !0), c("ul", {
|
|
1100
1100
|
class: "flex flex-col gap-1",
|
|
1101
1101
|
"aria-labelledby": r.label ? `${M(h)}-section-${i}` : void 0
|
|
@@ -1104,7 +1104,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1104
1104
|
"data-parent": n.children?.length ? n.label : void 0,
|
|
1105
1105
|
"aria-current": n.active ? "page" : void 0,
|
|
1106
1106
|
title: m.value ? n.label : void 0,
|
|
1107
|
-
class: M(X)(J, n.active &&
|
|
1107
|
+
class: M(X)(J, n.active && fi, A.value.has(n.label) && pi, e.ui?.item),
|
|
1108
1108
|
onClick: (e) => q(n, e)
|
|
1109
1109
|
}), {
|
|
1110
1110
|
default: V(() => [O(t.$slots, "item", {
|
|
@@ -1116,12 +1116,12 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1116
1116
|
key: 0,
|
|
1117
1117
|
"aria-hidden": "true"
|
|
1118
1118
|
})) : o("", !0),
|
|
1119
|
-
c("span", { class: y(M(X)("min-w-0 flex-1 truncate",
|
|
1120
|
-
n.badge !== void 0 && n.badge !== "" ? (w(), a(
|
|
1119
|
+
c("span", { class: y(M(X)("min-w-0 flex-1 truncate", di, m.value && "opacity-0")) }, [u(j(n.label), 1), n.children?.length ? (w(), s("span", ui, ", more options")) : o("", !0)], 2),
|
|
1120
|
+
n.badge !== void 0 && n.badge !== "" ? (w(), a(ei, {
|
|
1121
1121
|
key: 1,
|
|
1122
1122
|
size: "sm",
|
|
1123
1123
|
color: n.badgeColor,
|
|
1124
|
-
class: y(M(X)(
|
|
1124
|
+
class: y(M(X)(di, m.value && "opacity-0"))
|
|
1125
1125
|
}, {
|
|
1126
1126
|
default: V(() => [u(j(n.badge), 1)]),
|
|
1127
1127
|
_: 2
|
|
@@ -1129,7 +1129,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1129
1129
|
n.children?.length ? (w(), a(M(me), {
|
|
1130
1130
|
key: 2,
|
|
1131
1131
|
"aria-hidden": "true",
|
|
1132
|
-
class: y(M(X)("opacity-70",
|
|
1132
|
+
class: y(M(X)("opacity-70", di, m.value && "opacity-0"))
|
|
1133
1133
|
}, null, 8, ["class"])) : o("", !0)
|
|
1134
1134
|
])]),
|
|
1135
1135
|
_: 2
|
|
@@ -1139,12 +1139,12 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1139
1139
|
"title",
|
|
1140
1140
|
"class",
|
|
1141
1141
|
"onClick"
|
|
1142
|
-
]))]))), 128))], 8,
|
|
1142
|
+
]))]))), 128))], 8, li)]))), 128))], 8, ii))]),
|
|
1143
1143
|
_: 3
|
|
1144
|
-
}, 16)], 10,
|
|
1144
|
+
}, 16)], 10, ri),
|
|
1145
1145
|
t.$slots.footer || e.collapsible ? (w(), s("div", {
|
|
1146
1146
|
key: 1,
|
|
1147
|
-
class: y(M(X)("flex shrink-0 flex-col gap-1 overflow-hidden border-t border-
|
|
1147
|
+
class: y(M(X)("flex shrink-0 flex-col gap-1 overflow-hidden border-t border-ink/10 p-2", e.ui?.footer))
|
|
1148
1148
|
}, [O(t.$slots, "footer", { collapsed: m.value }), e.collapsible ? (w(), a(Z, {
|
|
1149
1149
|
key: 0,
|
|
1150
1150
|
variant: "ghost",
|
|
@@ -1157,9 +1157,9 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1157
1157
|
default: V(() => [m.value ? (w(), a(M(Pe), { key: 0 })) : (w(), a(M(Ne), { key: 1 }))]),
|
|
1158
1158
|
_: 1
|
|
1159
1159
|
}, 8, ["aria-label", "aria-expanded"])) : o("", !0)], 2)) : o("", !0)
|
|
1160
|
-
], 10,
|
|
1160
|
+
], 10, ni));
|
|
1161
1161
|
}
|
|
1162
|
-
}),
|
|
1162
|
+
}), hi = "h-1.5 overflow-hidden rounded-full bg-ink/10", gi = "h-full rounded-full bg-primary transition-[translate,background-color] duration-300 ease-out motion-reduce:transition-none", _i = /* @__PURE__ */ f({
|
|
1163
1163
|
__name: "Progress",
|
|
1164
1164
|
props: {
|
|
1165
1165
|
value: { default: null },
|
|
@@ -1185,17 +1185,17 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1185
1185
|
"get-value-label": () => e.label,
|
|
1186
1186
|
"get-value-text": d,
|
|
1187
1187
|
"aria-busy": o.value || void 0,
|
|
1188
|
-
class: y(M(X)(e.segments && !o.value ? "flex gap-1" :
|
|
1188
|
+
class: y(M(X)(e.segments && !o.value ? "flex gap-1" : hi, r.class))
|
|
1189
1189
|
}, {
|
|
1190
1190
|
default: V(() => [e.segments && !o.value ? (w(!0), s(n, { key: 0 }, D(e.max, (e) => (w(), s("div", {
|
|
1191
1191
|
key: e,
|
|
1192
|
-
class: y(M(X)(
|
|
1193
|
-
}, [c("div", { class: y(M(X)(
|
|
1192
|
+
class: y(M(X)(hi, "flex-1"))
|
|
1193
|
+
}, [c("div", { class: y(M(X)(gi, e <= l.value ? "translate-x-0" : "-translate-x-full")) }, null, 2)], 2))), 128)) : o.value ? (w(), a(M(Ut), {
|
|
1194
1194
|
key: 1,
|
|
1195
1195
|
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"
|
|
1196
1196
|
})) : (w(), a(M(Ut), {
|
|
1197
1197
|
key: 2,
|
|
1198
|
-
class: y(
|
|
1198
|
+
class: y(gi),
|
|
1199
1199
|
style: x({ translate: `${u.value - 100}% 0` })
|
|
1200
1200
|
}, null, 8, ["style"]))]),
|
|
1201
1201
|
_: 1
|
|
@@ -1207,14 +1207,14 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1207
1207
|
"class"
|
|
1208
1208
|
]));
|
|
1209
1209
|
}
|
|
1210
|
-
}),
|
|
1210
|
+
}), vi = { class: "text-ink" }, yi = { class: "flex items-start gap-4" }, bi = { class: "flex min-w-0 flex-1 flex-col gap-1" }, xi = { key: 0 }, Si = {
|
|
1211
1211
|
key: 1,
|
|
1212
1212
|
class: "sr-only"
|
|
1213
|
-
},
|
|
1213
|
+
}, Ci = {
|
|
1214
1214
|
key: 1,
|
|
1215
1215
|
"aria-live": "polite",
|
|
1216
1216
|
class: "sr-only"
|
|
1217
|
-
},
|
|
1217
|
+
}, wi = ["role", "aria-labelledby"], Ti = "textarea, [contenteditable=\"true\"], input[type=checkbox], input[type=radio], input[type=button], input[type=submit]", Ei = /* @__PURE__ */ f({
|
|
1218
1218
|
__name: "Slideover",
|
|
1219
1219
|
props: /*@__PURE__*/ g({
|
|
1220
1220
|
title: {},
|
|
@@ -1295,7 +1295,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
function L(e) {
|
|
1297
1297
|
let t = e.target;
|
|
1298
|
-
!r.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(
|
|
1298
|
+
!r.steps || e.defaultPrevented || e.isComposing || t.tagName !== "INPUT" || t.closest(Ti) || (e.preventDefault(), I());
|
|
1299
1299
|
}
|
|
1300
1300
|
let R = 0;
|
|
1301
1301
|
function B(e) {
|
|
@@ -1326,7 +1326,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1326
1326
|
left: "inset-y-0 left-0 w-full max-w-md border-r data-[state=open]:animate-slide-in-left data-[state=closed]:animate-slide-out-left",
|
|
1327
1327
|
top: "inset-x-0 top-0 max-h-full border-b data-[state=open]:animate-slide-in-top data-[state=closed]:animate-slide-out-top",
|
|
1328
1328
|
bottom: "inset-x-0 bottom-0 max-h-full border-t data-[state=open]:animate-slide-in-bottom data-[state=closed]:animate-slide-out-bottom"
|
|
1329
|
-
}, J = ["fixed z-50 flex flex-col bg-
|
|
1329
|
+
}, J = ["fixed z-50 flex flex-col bg-surface text-ink border-ink/10 shadow-xl outline-none", "motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out"];
|
|
1330
1330
|
return (t, r) => (w(), a(M(St), {
|
|
1331
1331
|
open: m.value,
|
|
1332
1332
|
modal: e.modal,
|
|
@@ -1354,14 +1354,14 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1354
1354
|
default: V(() => [O(t.$slots, "content", { close: g }, () => [
|
|
1355
1355
|
e.title || e.description || e.close || e.steps || t.$slots.header || t.$slots.title ? (w(), s("header", {
|
|
1356
1356
|
key: 0,
|
|
1357
|
-
class: y(M(X)("flex flex-col gap-4 border-b border-
|
|
1357
|
+
class: y(M(X)("flex flex-col gap-4 border-b border-ink/10 px-6 py-4", e.ui?.header))
|
|
1358
1358
|
}, [
|
|
1359
1359
|
e.steps ? (w(), s("p", {
|
|
1360
1360
|
key: 0,
|
|
1361
1361
|
id: T,
|
|
1362
|
-
class: "text-sm text-
|
|
1363
|
-
}, [u(" Step " + j(b.value + 1) + " of " + j(x.value) + ": ", 1), c("span",
|
|
1364
|
-
e.steps ? (w(), a(
|
|
1362
|
+
class: "text-sm text-ink/65"
|
|
1363
|
+
}, [u(" Step " + j(b.value + 1) + " of " + j(x.value) + ": ", 1), c("span", vi, j(e.steps[b.value]), 1)])) : o("", !0),
|
|
1364
|
+
e.steps ? (w(), a(_i, {
|
|
1365
1365
|
key: 1,
|
|
1366
1366
|
label: e.title ?? M(n)("ui.slideover.steps"),
|
|
1367
1367
|
segments: "",
|
|
@@ -1372,7 +1372,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1372
1372
|
"value",
|
|
1373
1373
|
"max"
|
|
1374
1374
|
])) : o("", !0),
|
|
1375
|
-
c("div",
|
|
1375
|
+
c("div", yi, [O(t.$slots, "header", { close: g }, () => [c("div", bi, [
|
|
1376
1376
|
d(M(Ct), { class: y(e.title || t.$slots.title ? M(X)("text-lg", e.ui?.title) : "sr-only") }, {
|
|
1377
1377
|
default: V(() => [O(t.$slots, "title", {}, () => [u(j(e.title), 1)])]),
|
|
1378
1378
|
_: 3
|
|
@@ -1380,12 +1380,12 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1380
1380
|
e.description || t.$slots.description || e.steps ? (w(), a(M(yt), {
|
|
1381
1381
|
key: 0,
|
|
1382
1382
|
as: "div",
|
|
1383
|
-
class: "flex flex-col gap-1 text-sm text-
|
|
1383
|
+
class: "flex flex-col gap-1 text-sm text-ink/65"
|
|
1384
1384
|
}, {
|
|
1385
|
-
default: V(() => [e.description || t.$slots.description ? (w(), s("p",
|
|
1385
|
+
default: V(() => [e.description || t.$slots.description ? (w(), s("p", xi, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0), e.steps ? (w(), s("p", Si, j(D.value), 1)) : o("", !0)]),
|
|
1386
1386
|
_: 3
|
|
1387
1387
|
})) : o("", !0),
|
|
1388
|
-
e.steps ? (w(), s("p",
|
|
1388
|
+
e.steps ? (w(), s("p", Ci, j(k.value), 1)) : o("", !0)
|
|
1389
1389
|
]), e.close ? (w(), a(M(_t), {
|
|
1390
1390
|
key: 0,
|
|
1391
1391
|
"as-child": ""
|
|
@@ -1412,10 +1412,10 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1412
1412
|
}, [O(t.$slots, "body", {
|
|
1413
1413
|
close: g,
|
|
1414
1414
|
step: b.value
|
|
1415
|
-
})], 42,
|
|
1415
|
+
})], 42, wi),
|
|
1416
1416
|
t.$slots.footer || e.steps ? (w(), s("footer", {
|
|
1417
1417
|
key: 1,
|
|
1418
|
-
class: y(M(X)("flex justify-end gap-2 border-t border-
|
|
1418
|
+
class: y(M(X)("flex justify-end gap-2 border-t border-ink/10 px-6 py-4", e.ui?.footer))
|
|
1419
1419
|
}, [O(t.$slots, "footer", { close: g }, () => [d(Z, {
|
|
1420
1420
|
class: "mr-auto",
|
|
1421
1421
|
disabled: b.value > 0 && C.value === "loading",
|
|
@@ -1447,7 +1447,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1447
1447
|
_: 3
|
|
1448
1448
|
}, 8, ["open", "modal"]));
|
|
1449
1449
|
}
|
|
1450
|
-
}),
|
|
1450
|
+
}), Di = ["href"], Oi = { class: "flex flex-1" }, ki = { class: "sticky top-12 hidden h-[calc(100dvh-var(--spacing)*12)] shrink-0 self-start lg:flex" }, Ai = { class: "flex min-w-0 flex-1 flex-col" }, ji = /* @__PURE__ */ f({
|
|
1451
1451
|
__name: "AppShell",
|
|
1452
1452
|
props: /*@__PURE__*/ g({
|
|
1453
1453
|
title: {},
|
|
@@ -1507,12 +1507,12 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1507
1507
|
"delay-duration": 400,
|
|
1508
1508
|
"skip-delay-duration": 300
|
|
1509
1509
|
}, {
|
|
1510
|
-
default: V(() => [c("div", { class: y(M(X)("flex min-h-dvh flex-col bg-background text-
|
|
1510
|
+
default: V(() => [c("div", { class: y(M(X)("flex min-h-dvh flex-col bg-background text-ink", r.class)) }, [
|
|
1511
1511
|
c("a", {
|
|
1512
1512
|
href: `#${g}`,
|
|
1513
|
-
class: "sr-only z-50 rounded bg-
|
|
1514
|
-
}, " Skip to content ", 8,
|
|
1515
|
-
d(
|
|
1513
|
+
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"
|
|
1514
|
+
}, " Skip to content ", 8, Di),
|
|
1515
|
+
d(Qr, _(e.header, {
|
|
1516
1516
|
title: e.title,
|
|
1517
1517
|
"title-to": e.titleTo,
|
|
1518
1518
|
"link-component": e.linkComponent,
|
|
@@ -1554,7 +1554,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1554
1554
|
}, [
|
|
1555
1555
|
e.launcher ? {
|
|
1556
1556
|
name: "start",
|
|
1557
|
-
fn: V(() => [d(
|
|
1557
|
+
fn: V(() => [d(cr, _({ align: "start" }, e.launcher === !0 ? {} : e.launcher, { class: "-ml-2.5" }), null, 16)]),
|
|
1558
1558
|
key: "0"
|
|
1559
1559
|
} : void 0,
|
|
1560
1560
|
t.$slots["header-trailing"] ? {
|
|
@@ -1587,8 +1587,8 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1587
1587
|
"sign-in",
|
|
1588
1588
|
"ui"
|
|
1589
1589
|
]),
|
|
1590
|
-
c("div",
|
|
1591
|
-
c("div",
|
|
1590
|
+
c("div", Oi, [
|
|
1591
|
+
c("div", ki, [d(mi, _(e.sidebar, {
|
|
1592
1592
|
id: v,
|
|
1593
1593
|
collapsed: s.value,
|
|
1594
1594
|
"onUpdate:collapsed": f[6] ||= (e) => s.value = e,
|
|
@@ -1609,7 +1609,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1609
1609
|
"sections",
|
|
1610
1610
|
"link-component"
|
|
1611
1611
|
])]),
|
|
1612
|
-
d(
|
|
1612
|
+
d(Ei, {
|
|
1613
1613
|
open: u.value,
|
|
1614
1614
|
"onUpdate:open": f[8] ||= (e) => u.value = e,
|
|
1615
1615
|
side: "left",
|
|
@@ -1621,7 +1621,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1621
1621
|
body: "flex p-0"
|
|
1622
1622
|
}
|
|
1623
1623
|
}, {
|
|
1624
|
-
body: V(() => [d(
|
|
1624
|
+
body: V(() => [d(mi, _(e.sidebar, {
|
|
1625
1625
|
items: e.items,
|
|
1626
1626
|
sections: e.sections,
|
|
1627
1627
|
"link-component": e.linkComponent,
|
|
@@ -1638,11 +1638,11 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1638
1638
|
])]),
|
|
1639
1639
|
_: 3
|
|
1640
1640
|
}, 8, ["open", "title"]),
|
|
1641
|
-
c("div",
|
|
1641
|
+
c("div", Ai, [c("main", {
|
|
1642
1642
|
id: g,
|
|
1643
1643
|
tabindex: "-1",
|
|
1644
1644
|
class: y(M(X)("min-w-0 flex-1 outline-none", e.ui?.main))
|
|
1645
|
-
}, [O(t.$slots, "default")], 2), e.footer ? (w(), a(
|
|
1645
|
+
}, [O(t.$slots, "default")], 2), e.footer ? (w(), a(Er, b(_({ key: 0 }, {
|
|
1646
1646
|
linkComponent: e.linkComponent,
|
|
1647
1647
|
...e.footer
|
|
1648
1648
|
})), null, 16)) : o("", !0)])
|
|
@@ -1651,7 +1651,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1651
1651
|
_: 3
|
|
1652
1652
|
}));
|
|
1653
1653
|
}
|
|
1654
|
-
}),
|
|
1654
|
+
}), Mi = ["aria-label"], Ni = { class: "flex flex-wrap items-center gap-x-1.5 gap-y-1" }, Pi = ["title"], Fi = { class: "truncate" }, Ii = { class: "truncate" }, Li = ["title"], Ri = { class: "truncate" }, zi = "inline-flex max-w-60 min-w-0 items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:shrink-0", Bi = /* @__PURE__ */ f({
|
|
1655
1655
|
__name: "Breadcrumb",
|
|
1656
1656
|
props: {
|
|
1657
1657
|
items: {},
|
|
@@ -1680,36 +1680,36 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1680
1680
|
e.onSelect?.(t), l("select", e, t);
|
|
1681
1681
|
}
|
|
1682
1682
|
let p = [
|
|
1683
|
-
"cursor-pointer rounded-sm text-
|
|
1684
|
-
"hover:text-
|
|
1683
|
+
"cursor-pointer rounded-sm text-ink/65 underline-offset-2 transition",
|
|
1684
|
+
"hover:text-ink hover:underline",
|
|
1685
1685
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
1686
1686
|
];
|
|
1687
1687
|
return (t, l) => (w(), s("nav", {
|
|
1688
1688
|
"aria-label": e.label ?? M(r)("ui.breadcrumb.label"),
|
|
1689
1689
|
class: y(M(X)("min-w-0 text-sm", i.class))
|
|
1690
|
-
}, [c("ol",
|
|
1690
|
+
}, [c("ol", Ni, [(w(!0), s(n, null, D(e.items, (t, n) => (w(), s("li", {
|
|
1691
1691
|
key: `${t.label}-${n}`,
|
|
1692
1692
|
class: "flex min-w-0 items-center gap-1.5"
|
|
1693
1693
|
}, [n === e.items.length - 1 ? (w(), s("span", {
|
|
1694
1694
|
key: 0,
|
|
1695
1695
|
"aria-current": "page",
|
|
1696
1696
|
title: t.label,
|
|
1697
|
-
class: y(M(X)(
|
|
1697
|
+
class: y(M(X)(zi, "text-ink"))
|
|
1698
1698
|
}, [t.icon ? (w(), a(k(t.icon), {
|
|
1699
1699
|
key: 0,
|
|
1700
1700
|
"aria-hidden": "true"
|
|
1701
|
-
})) : o("", !0), c("span",
|
|
1701
|
+
})) : o("", !0), c("span", Fi, j(t.label), 1)], 10, Pi)) : u(t) ? (w(), a(k(u(t)), _({
|
|
1702
1702
|
key: 1,
|
|
1703
1703
|
ref_for: !0
|
|
1704
1704
|
}, d(t), {
|
|
1705
1705
|
title: t.label,
|
|
1706
|
-
class: M(X)(
|
|
1706
|
+
class: M(X)(zi, p),
|
|
1707
1707
|
onClick: (e) => f(t, e)
|
|
1708
1708
|
}), {
|
|
1709
1709
|
default: V(() => [t.icon ? (w(), a(k(t.icon), {
|
|
1710
1710
|
key: 0,
|
|
1711
1711
|
"aria-hidden": "true"
|
|
1712
|
-
})) : o("", !0), c("span",
|
|
1712
|
+
})) : o("", !0), c("span", Ii, j(t.label), 1)]),
|
|
1713
1713
|
_: 2
|
|
1714
1714
|
}, 1040, [
|
|
1715
1715
|
"title",
|
|
@@ -1718,17 +1718,17 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1718
1718
|
])) : (w(), s("span", {
|
|
1719
1719
|
key: 2,
|
|
1720
1720
|
title: t.label,
|
|
1721
|
-
class: y(M(X)(
|
|
1721
|
+
class: y(M(X)(zi, "text-ink/65"))
|
|
1722
1722
|
}, [t.icon ? (w(), a(k(t.icon), {
|
|
1723
1723
|
key: 0,
|
|
1724
1724
|
"aria-hidden": "true"
|
|
1725
|
-
})) : o("", !0), c("span",
|
|
1725
|
+
})) : o("", !0), c("span", Ri, j(t.label), 1)], 10, Li)), n < e.items.length - 1 ? (w(), a(M(me), {
|
|
1726
1726
|
key: 3,
|
|
1727
1727
|
"aria-hidden": "true",
|
|
1728
|
-
class: "size-3.5 shrink-0 text-
|
|
1729
|
-
})) : o("", !0)]))), 128))])], 10,
|
|
1728
|
+
class: "size-3.5 shrink-0 text-ink/40"
|
|
1729
|
+
})) : o("", !0)]))), 128))])], 10, Mi));
|
|
1730
1730
|
}
|
|
1731
|
-
}),
|
|
1731
|
+
}), Vi = /* @__PURE__ */ f({
|
|
1732
1732
|
__name: "Menu",
|
|
1733
1733
|
props: {
|
|
1734
1734
|
items: {},
|
|
@@ -1752,9 +1752,9 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1752
1752
|
return e.to === void 0 ? e.href === void 0 ? {} : { href: e.href } : { to: e.to };
|
|
1753
1753
|
}
|
|
1754
1754
|
let c = [
|
|
1755
|
-
"flex min-h-8 cursor-pointer items-center gap-2
|
|
1755
|
+
"flex min-h-8 cursor-pointer items-center gap-2 px-3 py-1.5 text-sm text-ink no-underline outline-none select-none",
|
|
1756
1756
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
1757
|
-
"data-highlighted:bg-
|
|
1757
|
+
"data-highlighted:bg-selected",
|
|
1758
1758
|
"data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
1759
1759
|
];
|
|
1760
1760
|
return (l, f) => (w(), a(M(Ot), { modal: !1 }, {
|
|
@@ -1779,7 +1779,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1779
1779
|
align: "end",
|
|
1780
1780
|
"side-offset": 4,
|
|
1781
1781
|
"collision-padding": 8,
|
|
1782
|
-
class: y(M(X)(M(
|
|
1782
|
+
class: y(M(X)(M($n), "min-w-48 overflow-hidden py-1"))
|
|
1783
1783
|
}, {
|
|
1784
1784
|
default: V(() => [(w(!0), s(n, null, D(e.items, (e) => (w(), a(M(Et), _({
|
|
1785
1785
|
key: e.label,
|
|
@@ -1806,18 +1806,18 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1806
1806
|
_: 1
|
|
1807
1807
|
}));
|
|
1808
1808
|
}
|
|
1809
|
-
}),
|
|
1809
|
+
}), Hi = { class: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3" }, Ui = { class: "flex min-w-0 flex-col gap-1" }, Wi = { class: "flex flex-wrap items-center gap-x-2 gap-y-1" }, Gi = ["aria-label"], Ki = {
|
|
1810
1810
|
key: 0,
|
|
1811
1811
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm font-bold",
|
|
1812
1812
|
"aria-live": "polite"
|
|
1813
|
-
},
|
|
1813
|
+
}, qi = {
|
|
1814
1814
|
"aria-hidden": "true",
|
|
1815
1815
|
inert: "",
|
|
1816
1816
|
class: "invisible absolute top-0 left-0 size-0 overflow-hidden"
|
|
1817
|
-
},
|
|
1817
|
+
}, Ji = {
|
|
1818
1818
|
key: 1,
|
|
1819
1819
|
class: "flex shrink-0 items-center gap-2 px-3 text-sm"
|
|
1820
|
-
},
|
|
1820
|
+
}, Yi = /* @__PURE__ */ f({
|
|
1821
1821
|
__name: "PageHeader",
|
|
1822
1822
|
props: {
|
|
1823
1823
|
title: {},
|
|
@@ -1860,14 +1860,14 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1860
1860
|
}), S(() => x?.disconnect()), z(() => r.toolbar?.map((e) => `${e.label}${e.disabled ? "-" : ""}`).join("|"), () => v(b));
|
|
1861
1861
|
let T = i(() => (r.toolbar ?? []).slice(0, _.value)), A = i(() => (r.toolbar ?? []).slice(_.value));
|
|
1862
1862
|
return (i, p) => (w(), s("header", { class: y(M(X)("flex flex-col gap-2", r.class)) }, [
|
|
1863
|
-
e.breadcrumb && e.breadcrumb.length > 1 ? (w(), a(
|
|
1863
|
+
e.breadcrumb && e.breadcrumb.length > 1 ? (w(), a(Bi, {
|
|
1864
1864
|
key: 0,
|
|
1865
1865
|
items: e.breadcrumb,
|
|
1866
1866
|
"link-component": e.linkComponent
|
|
1867
1867
|
}, null, 8, ["items", "link-component"])) : o("", !0),
|
|
1868
|
-
c("div",
|
|
1868
|
+
c("div", Hi, [c("div", Ui, [c("div", Wi, [c("h1", { class: y(M(X)("min-w-0 text-2xl font-bold break-words", e.ui?.title)) }, j(e.title), 3), O(i.$slots, "badge")]), e.description || i.$slots.description ? (w(), s("p", {
|
|
1869
1869
|
key: 0,
|
|
1870
|
-
class: y(M(X)("max-w-prose text-sm text-
|
|
1870
|
+
class: y(M(X)("max-w-prose text-sm text-ink/65", e.ui?.description))
|
|
1871
1871
|
}, [O(i.$slots, "description", {}, () => [u(j(e.description), 1)])], 2)) : o("", !0)]), i.$slots.actions ? (w(), s("div", {
|
|
1872
1872
|
key: 0,
|
|
1873
1873
|
class: y(M(X)("flex flex-wrap items-center gap-2", e.ui?.actions))
|
|
@@ -1876,9 +1876,9 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1876
1876
|
key: 1,
|
|
1877
1877
|
role: "group",
|
|
1878
1878
|
"aria-label": M(t)("ui.pageHeader.actions", { title: e.title }),
|
|
1879
|
-
class: y(M(X)("flex items-center gap-1 rounded-lg border border-
|
|
1879
|
+
class: y(M(X)("flex items-center gap-1 rounded-lg border border-ink/10 bg-surface p-1 shadow-xs", e.ui?.toolbar))
|
|
1880
1880
|
}, [
|
|
1881
|
-
i.$slots["toolbar-start"] ? (w(), s("div",
|
|
1881
|
+
i.$slots["toolbar-start"] ? (w(), s("div", Ki, [O(i.$slots, "toolbar-start")])) : o("", !0),
|
|
1882
1882
|
c("div", {
|
|
1883
1883
|
ref_key: "fitArea",
|
|
1884
1884
|
ref: h,
|
|
@@ -1907,7 +1907,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1907
1907
|
"disabled",
|
|
1908
1908
|
"onClick"
|
|
1909
1909
|
]))), 128)),
|
|
1910
|
-
A.value.length ? (w(), a(
|
|
1910
|
+
A.value.length ? (w(), a(Vi, {
|
|
1911
1911
|
key: 0,
|
|
1912
1912
|
items: A.value,
|
|
1913
1913
|
label: M(t)("ui.pageHeader.moreActions"),
|
|
@@ -1918,7 +1918,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1918
1918
|
"label",
|
|
1919
1919
|
"link-component"
|
|
1920
1920
|
])) : o("", !0),
|
|
1921
|
-
c("div",
|
|
1921
|
+
c("div", qi, [c("div", {
|
|
1922
1922
|
ref_key: "measure",
|
|
1923
1923
|
ref: g,
|
|
1924
1924
|
class: "flex w-max gap-1"
|
|
@@ -1944,18 +1944,18 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1944
1944
|
_: 1
|
|
1945
1945
|
})], 512)])
|
|
1946
1946
|
], 512),
|
|
1947
|
-
i.$slots["toolbar-end"] ? (w(), s("div",
|
|
1948
|
-
], 10,
|
|
1947
|
+
i.$slots["toolbar-end"] ? (w(), s("div", Ji, [O(i.$slots, "toolbar-end")])) : o("", !0)
|
|
1948
|
+
], 10, Gi)) : o("", !0),
|
|
1949
1949
|
O(i.$slots, "default")
|
|
1950
1950
|
], 2));
|
|
1951
1951
|
}
|
|
1952
|
-
}),
|
|
1952
|
+
}), Xi = { class: "flex min-w-0 flex-col gap-0.5" }, Zi = {
|
|
1953
1953
|
class: "text-sm",
|
|
1954
1954
|
"aria-hidden": "true"
|
|
1955
|
-
},
|
|
1955
|
+
}, Qi = {
|
|
1956
1956
|
key: 0,
|
|
1957
|
-
class: "text-xs text-
|
|
1958
|
-
},
|
|
1957
|
+
class: "text-xs text-ink/65"
|
|
1958
|
+
}, $i = { class: "w-full shrink-0 sm:w-80" }, ea = /* @__PURE__ */ f({
|
|
1959
1959
|
__name: "SettingsRow",
|
|
1960
1960
|
props: {
|
|
1961
1961
|
label: {},
|
|
@@ -1970,12 +1970,12 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
1970
1970
|
},
|
|
1971
1971
|
setup(e) {
|
|
1972
1972
|
let t = e;
|
|
1973
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div",
|
|
1973
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6", t.class)) }, [c("div", Xi, [c("p", Zi, j(e.label), 1), e.description ? (w(), s("p", Qi, j(e.description), 1)) : o("", !0)]), c("div", $i, [O(n.$slots, "default")])], 2));
|
|
1974
1974
|
}
|
|
1975
|
-
}),
|
|
1975
|
+
}), ta = ["aria-label"], na = ["aria-label"], ra = { "aria-hidden": "true" }, ia = { class: "flex max-h-72 flex-col gap-2 overflow-y-auto p-3 text-sm [scrollbar-width:thin]" }, aa = { class: "min-w-0 truncate" }, oa = {
|
|
1976
1976
|
key: 0,
|
|
1977
|
-
class: "ml-auto shrink-0 truncate text-xs text-
|
|
1978
|
-
},
|
|
1977
|
+
class: "ml-auto shrink-0 truncate text-xs text-ink/65"
|
|
1978
|
+
}, sa = /* @__PURE__ */ f({
|
|
1979
1979
|
__name: "AvatarGroup",
|
|
1980
1980
|
props: {
|
|
1981
1981
|
users: {},
|
|
@@ -2020,8 +2020,8 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2020
2020
|
class: y(M(X)("flex items-center", r.class))
|
|
2021
2021
|
}, [(w(!0), s(n, null, D(a.value, (t, n) => (w(), s("span", {
|
|
2022
2022
|
key: `${t.name}-${n}`,
|
|
2023
|
-
class: y(M(X)("relative flex rounded-full ring-
|
|
2024
|
-
}, [d(
|
|
2023
|
+
class: y(M(X)("relative flex rounded-full ring-surface hover:z-10 focus-within:z-10", f[e.size], n > 0 && u[e.size]))
|
|
2024
|
+
}, [d(Ur, {
|
|
2025
2025
|
user: t,
|
|
2026
2026
|
size: e.size,
|
|
2027
2027
|
profile: e.profile
|
|
@@ -2031,8 +2031,8 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2031
2031
|
"profile"
|
|
2032
2032
|
])], 2))), 128)), l.value.length ? (w(), s("span", {
|
|
2033
2033
|
key: 0,
|
|
2034
|
-
class: y(M(X)("relative flex rounded-full ring-
|
|
2035
|
-
}, [d(
|
|
2034
|
+
class: y(M(X)("relative flex rounded-full ring-surface hover:z-10 focus-within:z-10", f[e.size], u[e.size]))
|
|
2035
|
+
}, [d(tr, {
|
|
2036
2036
|
mode: "hover",
|
|
2037
2037
|
"open-delay": 300,
|
|
2038
2038
|
"close-delay": 150,
|
|
@@ -2043,17 +2043,17 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2043
2043
|
},
|
|
2044
2044
|
ui: { content: "w-56" }
|
|
2045
2045
|
}, {
|
|
2046
|
-
content: V(() => [c("ul",
|
|
2046
|
+
content: V(() => [c("ul", ia, [(w(!0), s(n, null, D(l.value, (e, t) => (w(), s("li", {
|
|
2047
2047
|
key: `${e.name}-${t}`,
|
|
2048
2048
|
class: "flex items-center gap-2"
|
|
2049
2049
|
}, [
|
|
2050
|
-
d(
|
|
2050
|
+
d(Ur, {
|
|
2051
2051
|
user: e,
|
|
2052
2052
|
size: "xs",
|
|
2053
2053
|
decorative: ""
|
|
2054
2054
|
}, null, 8, ["user"]),
|
|
2055
|
-
c("span",
|
|
2056
|
-
e.role ? (w(), s("span",
|
|
2055
|
+
c("span", aa, j(e.name), 1),
|
|
2056
|
+
e.role ? (w(), s("span", oa, j(e.role), 1)) : o("", !0)
|
|
2057
2057
|
]))), 128))])]),
|
|
2058
2058
|
default: V(() => [c("button", {
|
|
2059
2059
|
type: "button",
|
|
@@ -2061,18 +2061,18 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2061
2061
|
count: l.value.length,
|
|
2062
2062
|
names: l.value.map((e) => e.name).join(", ")
|
|
2063
2063
|
}),
|
|
2064
|
-
class: y(M(X)("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full bg-surface font-bold text-
|
|
2065
|
-
}, [c("span",
|
|
2064
|
+
class: y(M(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]))
|
|
2065
|
+
}, [c("span", ra, "+" + j(l.value.length), 1)], 10, na)]),
|
|
2066
2066
|
_: 1
|
|
2067
|
-
})], 2)) : o("", !0)], 10,
|
|
2067
|
+
})], 2)) : o("", !0)], 10, ta));
|
|
2068
2068
|
}
|
|
2069
|
-
}),
|
|
2069
|
+
}), ca = { class: "flex min-w-0 flex-col gap-1" }, la = {
|
|
2070
2070
|
key: 1,
|
|
2071
|
-
class: "text-sm text-
|
|
2072
|
-
},
|
|
2071
|
+
class: "text-sm text-ink/65"
|
|
2072
|
+
}, ua = {
|
|
2073
2073
|
key: 0,
|
|
2074
2074
|
class: "flex shrink-0 items-center gap-2"
|
|
2075
|
-
},
|
|
2075
|
+
}, da = /* @__PURE__ */ f({
|
|
2076
2076
|
__name: "Card",
|
|
2077
2077
|
props: {
|
|
2078
2078
|
title: {},
|
|
@@ -2101,30 +2101,30 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2101
2101
|
};
|
|
2102
2102
|
return (i, f) => (w(), a(k(r.value), {
|
|
2103
2103
|
"aria-labelledby": e.title ? n : void 0,
|
|
2104
|
-
class: y(M(X)("@container flex flex-col rounded-lg border border-
|
|
2104
|
+
class: y(M(X)("@container flex flex-col rounded-lg border border-ink/10 bg-surface text-ink shadow-xs", e.padding === "none" && "overflow-clip", t.class))
|
|
2105
2105
|
}, {
|
|
2106
2106
|
default: V(() => [c("div", { class: y(M(X)("flex min-w-0 flex-1 flex-col gap-4", l[e.padding], e.ui?.body)) }, [e.title || e.description || i.$slots.header || i.$slots.actions ? (w(), s("div", {
|
|
2107
2107
|
key: 0,
|
|
2108
2108
|
class: y(M(X)("flex items-start justify-between gap-3", e.padding === "none" && "px-4 pt-4 sm:px-6 sm:pt-6", e.ui?.header))
|
|
2109
|
-
}, [O(i.$slots, "header", {}, () => [c("div",
|
|
2109
|
+
}, [O(i.$slots, "header", {}, () => [c("div", ca, [e.title ? (w(), a(k(`h${e.headingLevel}`), {
|
|
2110
2110
|
key: 0,
|
|
2111
2111
|
id: n,
|
|
2112
2112
|
class: "text-base font-bold"
|
|
2113
2113
|
}, {
|
|
2114
2114
|
default: V(() => [u(j(e.title), 1)]),
|
|
2115
2115
|
_: 1
|
|
2116
|
-
})) : o("", !0), e.description ? (w(), s("p",
|
|
2116
|
+
})) : o("", !0), e.description ? (w(), s("p", la, j(e.description), 1)) : o("", !0)])]), i.$slots.actions ? (w(), s("div", ua, [O(i.$slots, "actions")])) : o("", !0)], 2)) : o("", !0), O(i.$slots, "default")], 2), i.$slots.footer ? (w(), s("div", {
|
|
2117
2117
|
key: 0,
|
|
2118
|
-
class: y(M(X)("flex flex-wrap justify-end gap-2 border-t border-
|
|
2118
|
+
class: y(M(X)("flex flex-wrap justify-end gap-2 border-t border-ink/10", d[e.padding], e.ui?.footer))
|
|
2119
2119
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)]),
|
|
2120
2120
|
_: 3
|
|
2121
2121
|
}, 8, ["aria-labelledby", "class"]));
|
|
2122
2122
|
}
|
|
2123
|
-
}),
|
|
2123
|
+
}), fa = { class: "min-w-0 truncate" }, pa = [
|
|
2124
2124
|
"tabindex",
|
|
2125
2125
|
"aria-label",
|
|
2126
2126
|
"disabled"
|
|
2127
|
-
],
|
|
2127
|
+
], ma = /* @__PURE__ */ f({
|
|
2128
2128
|
__name: "Chip",
|
|
2129
2129
|
props: {
|
|
2130
2130
|
size: { default: "md" },
|
|
@@ -2145,7 +2145,7 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2145
2145
|
},
|
|
2146
2146
|
emits: ["remove"],
|
|
2147
2147
|
setup(e, { emit: t }) {
|
|
2148
|
-
let { t: n } = K(), r = e, i = t, a = ["inline-flex max-w-full shrink-0 items-center whitespace-nowrap rounded border border-
|
|
2148
|
+
let { t: n } = K(), r = e, i = t, a = ["inline-flex max-w-full shrink-0 items-center whitespace-nowrap rounded border border-ink/10 bg-ink/5 text-ink", "[&_svg]:shrink-0"], l = {
|
|
2149
2149
|
sm: "h-5 gap-1 px-1.5 text-xs [&_svg]:size-3",
|
|
2150
2150
|
md: "h-6 gap-1 px-2 text-sm [&_svg]:size-3.5"
|
|
2151
2151
|
}, u = {
|
|
@@ -2157,19 +2157,19 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2157
2157
|
};
|
|
2158
2158
|
return (t, p) => (w(), s("span", { class: y(M(X)(a, l[e.size], e.removable && u[e.size], e.disabled && "opacity-40", r.class)) }, [
|
|
2159
2159
|
O(t.$slots, "leading"),
|
|
2160
|
-
c("span",
|
|
2160
|
+
c("span", fa, [O(t.$slots, "default")]),
|
|
2161
2161
|
e.removable ? (w(), s("button", {
|
|
2162
2162
|
key: 0,
|
|
2163
2163
|
type: "button",
|
|
2164
2164
|
tabindex: e.removeFocusable ? void 0 : -1,
|
|
2165
2165
|
"aria-label": e.removeLabel ?? M(n)("ui.chip.remove"),
|
|
2166
2166
|
disabled: e.disabled,
|
|
2167
|
-
class: y(M(X)("flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition", "not-disabled:hover:bg-
|
|
2167
|
+
class: y(M(X)("flex shrink-0 cursor-pointer items-center justify-center rounded-sm transition", "not-disabled:hover:bg-hover not-disabled:active:bg-pressed disabled:cursor-not-allowed", "outline-2 outline-offset-0 outline-transparent focus-visible:outline-focus", f[e.size])),
|
|
2168
2168
|
onClick: p[0] ||= (e) => i("remove")
|
|
2169
|
-
}, [d(M(Ve), { "aria-hidden": "true" })], 10,
|
|
2169
|
+
}, [d(M(Ve), { "aria-hidden": "true" })], 10, pa)) : o("", !0)
|
|
2170
2170
|
], 2));
|
|
2171
2171
|
}
|
|
2172
|
-
}),
|
|
2172
|
+
}), ha = ["role", "aria-label"], ga = { class: "shrink-0" }, _a = /* @__PURE__ */ f({
|
|
2173
2173
|
__name: "Divider",
|
|
2174
2174
|
props: {
|
|
2175
2175
|
orientation: { default: "horizontal" },
|
|
@@ -2192,22 +2192,22 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2192
2192
|
key: 0,
|
|
2193
2193
|
role: e.decorative ? "presentation" : "separator",
|
|
2194
2194
|
"aria-label": e.decorative ? void 0 : e.label,
|
|
2195
|
-
class: y(M(X)("flex w-full items-center gap-3 text-xs text-
|
|
2195
|
+
class: y(M(X)("flex w-full items-center gap-3 text-xs text-ink/65", t.class))
|
|
2196
2196
|
}, [
|
|
2197
2197
|
r[0] ||= c("span", {
|
|
2198
2198
|
"aria-hidden": "true",
|
|
2199
|
-
class: "h-px flex-1 bg-
|
|
2199
|
+
class: "h-px flex-1 bg-ink/10"
|
|
2200
2200
|
}, null, -1),
|
|
2201
|
-
c("span",
|
|
2201
|
+
c("span", ga, [O(n.$slots, "default", {}, () => [u(j(e.label), 1)])]),
|
|
2202
2202
|
r[1] ||= c("span", {
|
|
2203
2203
|
"aria-hidden": "true",
|
|
2204
|
-
class: "h-px flex-1 bg-
|
|
2204
|
+
class: "h-px flex-1 bg-ink/10"
|
|
2205
2205
|
}, null, -1)
|
|
2206
|
-
], 10,
|
|
2206
|
+
], 10, ha)) : (w(), a(M(on), {
|
|
2207
2207
|
key: 1,
|
|
2208
2208
|
orientation: e.orientation,
|
|
2209
2209
|
decorative: e.decorative,
|
|
2210
|
-
class: y(M(X)("shrink-0 bg-
|
|
2210
|
+
class: y(M(X)("shrink-0 bg-ink/10", e.orientation === "horizontal" ? "h-px w-full" : "w-px self-stretch", t.class))
|
|
2211
2211
|
}, null, 8, [
|
|
2212
2212
|
"orientation",
|
|
2213
2213
|
"decorative",
|
|
@@ -2216,17 +2216,17 @@ var ti = ["data-collapsed"], ni = ["aria-label"], ri = ["data-level"], ii = {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
});
|
|
2218
2218
|
// src/components/ChangeIndicator/changeIndicator.ts
|
|
2219
|
-
function
|
|
2219
|
+
function va(e, t) {
|
|
2220
2220
|
return t ? `${e} ${t}` : String(e);
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2222
|
+
function ya(e, t) {
|
|
2223
2223
|
return String(e) !== String(t);
|
|
2224
2224
|
}
|
|
2225
2225
|
// src/components/ChangeIndicator/ChangeIndicator.vue?vue&type=script&setup=true&lang.ts
|
|
2226
|
-
var
|
|
2226
|
+
var ba = { class: "sr-only" }, xa = {
|
|
2227
2227
|
"aria-hidden": "true",
|
|
2228
|
-
class: "font-normal line-through decoration-blue/60"
|
|
2229
|
-
},
|
|
2228
|
+
class: "font-normal line-through decoration-blue-fg/60"
|
|
2229
|
+
}, Sa = { "aria-hidden": "true" }, Ca = /* @__PURE__ */ f({
|
|
2230
2230
|
__name: "ChangeIndicator",
|
|
2231
2231
|
props: {
|
|
2232
2232
|
from: {},
|
|
@@ -2241,24 +2241,24 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2241
2241
|
] }
|
|
2242
2242
|
},
|
|
2243
2243
|
setup(e) {
|
|
2244
|
-
let { t } = K(), r = e, a = i(() =>
|
|
2244
|
+
let { t } = K(), r = e, a = i(() => ya(r.from, r.to)), l = i(() => t("ui.changeIndicator.changed", {
|
|
2245
2245
|
from: r.from,
|
|
2246
|
-
to:
|
|
2246
|
+
to: va(r.to, r.unit)
|
|
2247
2247
|
}));
|
|
2248
2248
|
return (t, i) => a.value ? (w(), s("span", {
|
|
2249
2249
|
key: 0,
|
|
2250
|
-
class: y(M(X)("inline-flex items-center gap-1 whitespace-nowrap rounded-full border border-blue/30 bg-blue/10 px-2 text-xs font-bold text-blue", r.class))
|
|
2250
|
+
class: y(M(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))
|
|
2251
2251
|
}, [
|
|
2252
|
-
c("span",
|
|
2253
|
-
c("span",
|
|
2252
|
+
c("span", ba, j(l.value), 1),
|
|
2253
|
+
c("span", xa, j(e.from), 1),
|
|
2254
2254
|
d(M(re), {
|
|
2255
2255
|
"aria-hidden": "true",
|
|
2256
2256
|
class: "size-3 shrink-0"
|
|
2257
2257
|
}),
|
|
2258
|
-
c("span",
|
|
2258
|
+
c("span", Sa, [u(j(e.to), 1), e.unit ? (w(), s(n, { key: 0 }, [u(j(e.unit), 1)], 64)) : o("", !0)])
|
|
2259
2259
|
], 2)) : o("", !0);
|
|
2260
2260
|
}
|
|
2261
|
-
}),
|
|
2261
|
+
}), wa = ["aria-label"], Ta = { class: "max-w-64 px-3 py-2 text-xs" }, Ea = /* @__PURE__ */ f({
|
|
2262
2262
|
__name: "InfoTip",
|
|
2263
2263
|
props: {
|
|
2264
2264
|
text: {},
|
|
@@ -2273,27 +2273,27 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2273
2273
|
},
|
|
2274
2274
|
setup(e) {
|
|
2275
2275
|
let t = e, n = `${P()}-description`;
|
|
2276
|
-
return (r, i) => (w(), a(
|
|
2276
|
+
return (r, i) => (w(), a(tr, {
|
|
2277
2277
|
mode: "hover",
|
|
2278
2278
|
content: {
|
|
2279
2279
|
side: "top",
|
|
2280
2280
|
sideOffset: 6
|
|
2281
2281
|
}
|
|
2282
2282
|
}, {
|
|
2283
|
-
content: V(() => [c("p",
|
|
2283
|
+
content: V(() => [c("p", Ta, j(e.text), 1)]),
|
|
2284
2284
|
default: V(() => [c("button", {
|
|
2285
2285
|
type: "button",
|
|
2286
2286
|
"aria-label": e.label,
|
|
2287
2287
|
"aria-describedby": n,
|
|
2288
|
-
class: y(M(X)("inline-flex shrink-0 rounded-full p-0.5 align-middle text-
|
|
2288
|
+
class: y(M(X)("inline-flex shrink-0 rounded-full p-0.5 align-middle text-ink transition hover:bg-hover data-[state=open]:bg-selected", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus [&_svg]:size-4", t.class))
|
|
2289
2289
|
}, [d(M(ye), { "aria-hidden": "true" }), c("span", {
|
|
2290
2290
|
id: n,
|
|
2291
2291
|
hidden: ""
|
|
2292
|
-
}, j(e.text), 1)], 10,
|
|
2292
|
+
}, j(e.text), 1)], 10, wa)]),
|
|
2293
2293
|
_: 1
|
|
2294
2294
|
}));
|
|
2295
2295
|
}
|
|
2296
|
-
}),
|
|
2296
|
+
}), Da = { class: "overflow-hidden" }, Oa = ["id"], ka = /* @__PURE__ */ f({
|
|
2297
2297
|
__name: "FieldMessage",
|
|
2298
2298
|
props: {
|
|
2299
2299
|
id: {},
|
|
@@ -2306,9 +2306,9 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2306
2306
|
e && (l.value = e, d.value = t);
|
|
2307
2307
|
});
|
|
2308
2308
|
let f = {
|
|
2309
|
-
error: "text-red",
|
|
2310
|
-
success: "text-green",
|
|
2311
|
-
loading: "text-
|
|
2309
|
+
error: "text-red-fg",
|
|
2310
|
+
success: "text-green-fg",
|
|
2311
|
+
loading: "text-ink/65"
|
|
2312
2312
|
}, p = {
|
|
2313
2313
|
error: _e,
|
|
2314
2314
|
success: ve
|
|
@@ -2316,7 +2316,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2316
2316
|
return (t, i) => (w(), s(n, null, [c("div", {
|
|
2317
2317
|
"aria-hidden": "true",
|
|
2318
2318
|
class: y(M(X)("-mt-1.5 grid transition-[grid-template-rows,visibility] duration-150 ease-out motion-reduce:transition-none", r.value ? "grid-rows-[1fr]" : "invisible grid-rows-[0fr] delay-100"))
|
|
2319
|
-
}, [c("div",
|
|
2319
|
+
}, [c("div", Da, [c("p", { class: y(M(X)("flex items-center gap-1 pt-1.5 text-xs transition-[translate,opacity,color] ease-out motion-reduce:transition-none [&_svg]:size-3.5 [&_svg]:shrink-0", d.value && f[d.value], r.value ? "duration-150 delay-100" : "-translate-y-1 opacity-0 duration-100")) }, [d.value === "loading" ? (w(), a(Gn, {
|
|
2320
2320
|
key: 0,
|
|
2321
2321
|
size: "sm",
|
|
2322
2322
|
class: "size-3.5"
|
|
@@ -2324,12 +2324,12 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2324
2324
|
id: e.id,
|
|
2325
2325
|
"aria-live": "polite",
|
|
2326
2326
|
class: "sr-only"
|
|
2327
|
-
}, j(e.text), 9,
|
|
2327
|
+
}, j(e.text), 9, Oa)], 64));
|
|
2328
2328
|
}
|
|
2329
|
-
}),
|
|
2329
|
+
}), Aa = { class: "flex items-center gap-1" }, ja = ["hidden"], Ma = {
|
|
2330
2330
|
key: 0,
|
|
2331
2331
|
class: "col-start-2 row-start-1 flex h-5 items-center text-xs"
|
|
2332
|
-
},
|
|
2332
|
+
}, Na = "input, textarea, [role=\"spinbutton\"], [contenteditable=\"true\"]", Pa = /* @__PURE__ */ f({
|
|
2333
2333
|
__name: "FormField",
|
|
2334
2334
|
props: {
|
|
2335
2335
|
label: {},
|
|
@@ -2352,7 +2352,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2352
2352
|
let { t } = K(), n = e, r = P(), l = `${r}-control`, u = `${r}-label`, f = `${r}-helper`, p = `${r}-status`, m = i(() => n.errorText ? "error" : n.status), h = i(() => n.errorText || n.statusText), g = i(() => [n.helper && f, h.value && p].filter(Boolean).join(" ") || void 0);
|
|
2353
2353
|
function _(e) {
|
|
2354
2354
|
let t = e.target;
|
|
2355
|
-
n.disabled || t.closest(`${
|
|
2355
|
+
n.disabled || t.closest(`${Na}, button`) || (e.preventDefault(), e.currentTarget.querySelector(Na)?.focus());
|
|
2356
2356
|
}
|
|
2357
2357
|
function v() {
|
|
2358
2358
|
let e = document.getElementById(l);
|
|
@@ -2360,7 +2360,8 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2360
2360
|
}
|
|
2361
2361
|
let b = [
|
|
2362
2362
|
"flex items-center gap-2 px-3 py-2 text-sm pointer-coarse:text-base [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:opacity-70",
|
|
2363
|
-
"
|
|
2363
|
+
"[&>svg:first-child]:-ml-0.5 [&>svg:last-child]:-mr-0.5",
|
|
2364
|
+
"bg-surface text-ink border border-ink/45 rounded shadow-xs cursor-text transition",
|
|
2364
2365
|
"outline-2 outline-offset-1 outline-transparent forced-colors:not-has-focus-visible:outline-0",
|
|
2365
2366
|
"has-focus-visible:outline-focus",
|
|
2366
2367
|
"has-[[data-pointer-focus]]:outline-transparent!"
|
|
@@ -2369,13 +2370,13 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2369
2370
|
success: "border-green",
|
|
2370
2371
|
loading: ""
|
|
2371
2372
|
};
|
|
2372
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-
|
|
2373
|
-
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
2373
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-ink", n.class)) }, [c("div", { class: y(M(X)("grid grid-cols-[minmax(0,1fr)_auto]", !e.hideLabel && "gap-y-1.5", r.$slots["label-trailing"] && "gap-x-3")) }, [
|
|
2374
|
+
c("div", { class: y(M(X)("col-start-1 row-start-1 flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", Aa, [c("label", {
|
|
2374
2375
|
id: u,
|
|
2375
2376
|
for: l,
|
|
2376
2377
|
class: "text-sm",
|
|
2377
2378
|
onClick: v
|
|
2378
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
2379
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Ea, {
|
|
2379
2380
|
key: 0,
|
|
2380
2381
|
text: e.helper,
|
|
2381
2382
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -2383,8 +2384,8 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2383
2384
|
key: 0,
|
|
2384
2385
|
id: f,
|
|
2385
2386
|
hidden: e.helperPlacement === "icon",
|
|
2386
|
-
class: "text-xs text-
|
|
2387
|
-
}, j(e.helper), 9,
|
|
2387
|
+
class: "text-xs text-ink/65"
|
|
2388
|
+
}, j(e.helper), 9, ja)) : o("", !0)], 2),
|
|
2388
2389
|
c("div", {
|
|
2389
2390
|
class: y(M(X)(b, "col-span-2 row-start-2", m.value && x[m.value], e.disabled && "opacity-40 cursor-not-allowed")),
|
|
2390
2391
|
onPointerdown: _
|
|
@@ -2398,20 +2399,20 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2398
2399
|
}),
|
|
2399
2400
|
O(r.$slots, "trailing")
|
|
2400
2401
|
], 34),
|
|
2401
|
-
r.$slots["label-trailing"] ? (w(), s("div",
|
|
2402
|
-
], 2), d(
|
|
2402
|
+
r.$slots["label-trailing"] ? (w(), s("div", Ma, [O(r.$slots, "label-trailing")])) : o("", !0)
|
|
2403
|
+
], 2), d(ka, {
|
|
2403
2404
|
id: p,
|
|
2404
2405
|
status: m.value,
|
|
2405
2406
|
text: h.value
|
|
2406
2407
|
}, null, 8, ["status", "text"])], 2));
|
|
2407
2408
|
}
|
|
2408
|
-
}),
|
|
2409
|
+
}), Fa = [
|
|
2409
2410
|
"id",
|
|
2410
2411
|
"spellcheck",
|
|
2411
2412
|
"disabled",
|
|
2412
2413
|
"aria-invalid",
|
|
2413
2414
|
"aria-describedby"
|
|
2414
|
-
],
|
|
2415
|
+
], Ia = /* @__PURE__ */ f({
|
|
2415
2416
|
inheritAttrs: !1,
|
|
2416
2417
|
__name: "Input",
|
|
2417
2418
|
props: /*@__PURE__*/ g({
|
|
@@ -2443,7 +2444,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2443
2444
|
if (n.maxLength !== void 0 && e > n.maxLength) return t("ui.input.maxLength", { count: n.maxLength });
|
|
2444
2445
|
if (o.value && n.minLength !== void 0 && e > 0 && e < n.minLength) return t("ui.input.minLength", { count: n.minLength });
|
|
2445
2446
|
}), u = i(() => n.status ?? (s.value ? "error" : void 0)), d = i(() => n.statusText ?? s.value);
|
|
2446
|
-
return (t, i) => (w(), a(
|
|
2447
|
+
return (t, i) => (w(), a(Pa, {
|
|
2447
2448
|
label: e.label,
|
|
2448
2449
|
helper: e.helper,
|
|
2449
2450
|
"helper-placement": e.helperPlacement,
|
|
@@ -2462,9 +2463,9 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2462
2463
|
disabled: e.disabled,
|
|
2463
2464
|
"aria-invalid": s,
|
|
2464
2465
|
"aria-describedby": a,
|
|
2465
|
-
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-
|
|
2466
|
+
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-ink/55 disabled:cursor-not-allowed",
|
|
2466
2467
|
onBlur: i[1] ||= (e) => o.value = !0
|
|
2467
|
-
}), null, 16,
|
|
2468
|
+
}), null, 16, Fa), [[L, r.value]])]),
|
|
2468
2469
|
_: 2
|
|
2469
2470
|
}, [t.$slots.leading ? {
|
|
2470
2471
|
name: "leading",
|
|
@@ -2486,7 +2487,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2486
2487
|
"class"
|
|
2487
2488
|
]));
|
|
2488
2489
|
}
|
|
2489
|
-
}),
|
|
2490
|
+
}), La = "-ml-3 rounded-l border-r border-ink/10", Ra = "-mr-3 rounded-r border-l border-ink/10", za = /* @__PURE__ */ f({
|
|
2490
2491
|
inheritAttrs: !1,
|
|
2491
2492
|
__name: "InputNumber",
|
|
2492
2493
|
props: /*@__PURE__*/ g({
|
|
@@ -2517,11 +2518,11 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2517
2518
|
emits: ["update:modelValue"],
|
|
2518
2519
|
setup(e) {
|
|
2519
2520
|
let t = e, n = F(e, "modelValue"), r = i(() => n.value === void 0 ? void 0 : new Intl.NumberFormat(t.locale, t.formatOptions).format(n.value)), o = [
|
|
2520
|
-
"flex w-9 shrink-0 -my-2 self-stretch items-center justify-center bg-
|
|
2521
|
-
"not-disabled:hover:
|
|
2521
|
+
"flex w-9 shrink-0 -my-2 self-stretch items-center justify-center bg-surface cursor-pointer transition",
|
|
2522
|
+
"not-disabled:hover:bg-surface-hover not-disabled:active:bg-surface-pressed [&_svg]:opacity-100!",
|
|
2522
2523
|
"disabled:cursor-not-allowed disabled:[&_svg]:opacity-40!"
|
|
2523
2524
|
];
|
|
2524
|
-
return (t, i) => (w(), a(
|
|
2525
|
+
return (t, i) => (w(), a(Pa, {
|
|
2525
2526
|
label: e.label,
|
|
2526
2527
|
helper: e.helper,
|
|
2527
2528
|
"helper-placement": e.helperPlacement,
|
|
@@ -2545,7 +2546,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2545
2546
|
class: "contents"
|
|
2546
2547
|
}, {
|
|
2547
2548
|
default: V(() => [
|
|
2548
|
-
d(M(At), { class: y([o,
|
|
2549
|
+
d(M(At), { class: y([o, La]) }, {
|
|
2549
2550
|
default: V(() => [d(M(je))]),
|
|
2550
2551
|
_: 1
|
|
2551
2552
|
}, 8, ["class"]),
|
|
@@ -2553,13 +2554,13 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2553
2554
|
"aria-invalid": c,
|
|
2554
2555
|
"aria-describedby": s,
|
|
2555
2556
|
"aria-valuetext": r.value,
|
|
2556
|
-
class: "h-5 min-w-0 flex-1 bg-transparent text-center tabular-nums outline-none placeholder:text-
|
|
2557
|
+
class: "h-5 min-w-0 flex-1 bg-transparent text-center tabular-nums outline-none placeholder:text-ink/55 disabled:cursor-not-allowed"
|
|
2557
2558
|
}), null, 16, [
|
|
2558
2559
|
"aria-invalid",
|
|
2559
2560
|
"aria-describedby",
|
|
2560
2561
|
"aria-valuetext"
|
|
2561
2562
|
]),
|
|
2562
|
-
d(M(jt), { class: y([o,
|
|
2563
|
+
d(M(jt), { class: y([o, Ra]) }, {
|
|
2563
2564
|
default: V(() => [d(M(Fe))]),
|
|
2564
2565
|
_: 1
|
|
2565
2566
|
}, 8, ["class"])
|
|
@@ -2588,26 +2589,26 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2588
2589
|
"class"
|
|
2589
2590
|
]));
|
|
2590
2591
|
}
|
|
2591
|
-
}),
|
|
2592
|
+
}), Ba = { class: "flex items-center" }, Va = ["aria-label", "disabled"], Ha = ["aria-label", "disabled"], Ua = {
|
|
2592
2593
|
key: 2,
|
|
2593
2594
|
class: "px-1.5 py-1 text-sm tabular-nums"
|
|
2594
|
-
},
|
|
2595
|
+
}, Wa = {
|
|
2595
2596
|
key: 0,
|
|
2596
2597
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2597
|
-
},
|
|
2598
|
+
}, Ga = [
|
|
2598
2599
|
"aria-current",
|
|
2599
2600
|
"aria-pressed",
|
|
2600
2601
|
"disabled",
|
|
2601
2602
|
"onClick"
|
|
2602
|
-
],
|
|
2603
|
+
], Ka = {
|
|
2603
2604
|
key: 1,
|
|
2604
2605
|
class: "mt-3 grid w-56 grid-cols-3 gap-1"
|
|
2605
|
-
},
|
|
2606
|
+
}, qa = [
|
|
2606
2607
|
"aria-current",
|
|
2607
2608
|
"aria-pressed",
|
|
2608
2609
|
"disabled",
|
|
2609
2610
|
"onClick"
|
|
2610
|
-
],
|
|
2611
|
+
], Ja = /* @__PURE__ */ f({
|
|
2611
2612
|
__name: "Calendar",
|
|
2612
2613
|
props: /*@__PURE__*/ g({
|
|
2613
2614
|
min: {},
|
|
@@ -2684,7 +2685,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2684
2685
|
return v.value.year === t.year && e === t.month;
|
|
2685
2686
|
}, q = (e) => e === An(Tn()).year, J = [
|
|
2686
2687
|
"inline-flex items-center gap-0.5 rounded px-1.5 py-1 text-sm cursor-pointer transition",
|
|
2687
|
-
"hover:bg-
|
|
2688
|
+
"hover:bg-hover active:bg-pressed [&_svg]:size-3.5",
|
|
2688
2689
|
"disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
2689
2690
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2690
2691
|
], te = [
|
|
@@ -2695,18 +2696,18 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2695
2696
|
...te,
|
|
2696
2697
|
"aria-[current=date]:after:bottom-2",
|
|
2697
2698
|
"flex h-12 items-center justify-center rounded text-sm tabular-nums cursor-pointer transition",
|
|
2698
|
-
"hover:bg-
|
|
2699
|
+
"hover:bg-hover",
|
|
2699
2700
|
"aria-pressed:bg-primary aria-pressed:text-white aria-pressed:hover:bg-primary",
|
|
2700
|
-
"disabled:cursor-not-allowed disabled:text-
|
|
2701
|
+
"disabled:cursor-not-allowed disabled:text-ink/25 disabled:hover:bg-transparent",
|
|
2701
2702
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2702
2703
|
], re = [
|
|
2703
2704
|
...te,
|
|
2704
2705
|
"aria-[current=date]:after:bottom-0.5",
|
|
2705
2706
|
"flex size-8 items-center justify-center rounded text-sm tabular-nums cursor-pointer transition",
|
|
2706
|
-
"hover:bg-
|
|
2707
|
-
"data-[outside-view]:text-
|
|
2707
|
+
"hover:bg-hover",
|
|
2708
|
+
"data-[outside-view]:text-ink/55",
|
|
2708
2709
|
"data-[selected]:bg-primary data-[selected]:text-white data-[selected]:hover:bg-primary",
|
|
2709
|
-
"data-[disabled]:cursor-not-allowed data-[disabled]:text-
|
|
2710
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:text-ink/25 data-[disabled]:hover:bg-transparent",
|
|
2710
2711
|
"data-[unavailable]:line-through",
|
|
2711
2712
|
"outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
|
|
2712
2713
|
];
|
|
@@ -2720,7 +2721,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2720
2721
|
"initial-focus": e.initialFocus,
|
|
2721
2722
|
"week-starts-on": 1,
|
|
2722
2723
|
"fixed-weeks": "",
|
|
2723
|
-
class: y(M(X)("w-fit text-
|
|
2724
|
+
class: y(M(X)("w-fit text-ink", e.disabled && "opacity-40", r.class)),
|
|
2724
2725
|
"onUpdate:modelValue": g,
|
|
2725
2726
|
"onUpdate:placeholder": x
|
|
2726
2727
|
}, {
|
|
@@ -2753,21 +2754,21 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2753
2754
|
default: V(() => [d(M(pe))]),
|
|
2754
2755
|
_: 1
|
|
2755
2756
|
}, 8, ["aria-label", "disabled"])),
|
|
2756
|
-
c("div",
|
|
2757
|
+
c("div", Ba, [_.value === "days" ? (w(), s("button", {
|
|
2757
2758
|
key: 0,
|
|
2758
2759
|
type: "button",
|
|
2759
2760
|
class: y(J),
|
|
2760
2761
|
"aria-label": M(t)("ui.calendar.chooseMonth"),
|
|
2761
2762
|
disabled: e.disabled,
|
|
2762
2763
|
onClick: k
|
|
2763
|
-
}, [u(j(C.value) + " ", 1), d(M(fe))], 8,
|
|
2764
|
+
}, [u(j(C.value) + " ", 1), d(M(fe))], 8, Va)) : o("", !0), _.value === "years" ? (w(), s("span", Ua, j(O.value[0]) + " – " + j(O.value[O.value.length - 1]), 1)) : (w(), s("button", {
|
|
2764
2765
|
key: 1,
|
|
2765
2766
|
type: "button",
|
|
2766
2767
|
class: y(J),
|
|
2767
2768
|
"aria-label": M(t)("ui.calendar.chooseYear"),
|
|
2768
2769
|
disabled: e.disabled,
|
|
2769
2770
|
onClick: N
|
|
2770
|
-
}, [u(j(v.value.year) + " ", 1), d(M(fe))], 8,
|
|
2771
|
+
}, [u(j(v.value.year) + " ", 1), d(M(fe))], 8, Ha))]),
|
|
2771
2772
|
_.value === "days" ? (w(), a(M(Xe), {
|
|
2772
2773
|
key: 2,
|
|
2773
2774
|
"as-child": ""
|
|
@@ -2797,7 +2798,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2797
2798
|
]),
|
|
2798
2799
|
_: 1
|
|
2799
2800
|
}),
|
|
2800
|
-
_.value === "months" ? (w(), s("div",
|
|
2801
|
+
_.value === "months" ? (w(), s("div", Wa, [(w(!0), s(n, null, D(S.value, (e, t) => (w(), s("button", {
|
|
2801
2802
|
key: e,
|
|
2802
2803
|
type: "button",
|
|
2803
2804
|
class: y(ne),
|
|
@@ -2805,7 +2806,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2805
2806
|
"aria-pressed": ee(t + 1),
|
|
2806
2807
|
disabled: R(t + 1),
|
|
2807
2808
|
onClick: (e) => P(t + 1)
|
|
2808
|
-
}, j(e), 9,
|
|
2809
|
+
}, j(e), 9, Ga))), 128))])) : _.value === "years" ? (w(), s("div", Ka, [(w(!0), s(n, null, D(O.value, (e) => (w(), s("button", {
|
|
2809
2810
|
key: e,
|
|
2810
2811
|
type: "button",
|
|
2811
2812
|
class: y(ne),
|
|
@@ -2813,7 +2814,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2813
2814
|
"aria-pressed": W(e),
|
|
2814
2815
|
disabled: B(e),
|
|
2815
2816
|
onClick: (t) => I(e)
|
|
2816
|
-
}, j(e), 9,
|
|
2817
|
+
}, j(e), 9, qa))), 128))])) : o("", !0),
|
|
2817
2818
|
(w(!0), s(n, null, D(_.value === "days" ? i : [], (e) => (w(), a(M(We), {
|
|
2818
2819
|
key: e.value.toString(),
|
|
2819
2820
|
class: "mt-3 border-collapse select-none"
|
|
@@ -2822,7 +2823,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2822
2823
|
default: V(() => [d(M(qe), { class: "flex" }, {
|
|
2823
2824
|
default: V(() => [(w(!0), s(n, null, D(r, (e) => (w(), a(M(Je), {
|
|
2824
2825
|
key: e,
|
|
2825
|
-
class: "w-8 pb-1 text-xs font-normal text-
|
|
2826
|
+
class: "w-8 pb-1 text-xs font-normal text-ink/55"
|
|
2826
2827
|
}, {
|
|
2827
2828
|
default: V(() => [u(j(e), 1)]),
|
|
2828
2829
|
_: 2
|
|
@@ -2870,7 +2871,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2870
2871
|
"class"
|
|
2871
2872
|
]));
|
|
2872
2873
|
}
|
|
2873
|
-
}),
|
|
2874
|
+
}), Ya = {
|
|
2874
2875
|
monday: 1,
|
|
2875
2876
|
mon: 1,
|
|
2876
2877
|
tuesday: 2,
|
|
@@ -2889,7 +2890,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2889
2890
|
sat: 6,
|
|
2890
2891
|
sunday: 7,
|
|
2891
2892
|
sun: 7
|
|
2892
|
-
}, Q = `(${Object.keys(
|
|
2893
|
+
}, Q = `(${Object.keys(Ya).join("|")})`, Xa = {
|
|
2893
2894
|
january: 1,
|
|
2894
2895
|
jan: 1,
|
|
2895
2896
|
february: 2,
|
|
@@ -2914,7 +2915,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2914
2915
|
nov: 11,
|
|
2915
2916
|
december: 12,
|
|
2916
2917
|
dec: 12
|
|
2917
|
-
},
|
|
2918
|
+
}, Za = `(${Object.keys(Xa).sort((e, t) => t.length - e.length).join("|")})`, Qa = {
|
|
2918
2919
|
a: 1,
|
|
2919
2920
|
an: 1,
|
|
2920
2921
|
one: 1,
|
|
@@ -2938,7 +2939,7 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2938
2939
|
nineteen: 19,
|
|
2939
2940
|
twenty: 20,
|
|
2940
2941
|
thirty: 30
|
|
2941
|
-
},
|
|
2942
|
+
}, $a = `(\\d+|${Object.keys(Qa).join("|")})`, eo = "(day|week|fortnight|month|year)s?", to = {
|
|
2942
2943
|
first: 1,
|
|
2943
2944
|
second: 2,
|
|
2944
2945
|
third: 3,
|
|
@@ -2960,37 +2961,37 @@ var ya = { class: "sr-only" }, ba = {
|
|
|
2960
2961
|
nineteenth: 19,
|
|
2961
2962
|
twentieth: 20,
|
|
2962
2963
|
thirtieth: 30
|
|
2963
|
-
},
|
|
2964
|
-
function
|
|
2964
|
+
}, no = Object.keys(to).join("|");
|
|
2965
|
+
function ro(e) {
|
|
2965
2966
|
return new Date(e.year, e.month - 1, e.day).getDay() || 7;
|
|
2966
2967
|
}
|
|
2967
|
-
function
|
|
2968
|
-
return e.subtract({ days:
|
|
2968
|
+
function io(e) {
|
|
2969
|
+
return e.subtract({ days: ro(e) - 1 });
|
|
2969
2970
|
}
|
|
2970
2971
|
function $(e, t, n) {
|
|
2971
2972
|
if (!Number.isInteger(e) || t < 1 || t > 12 || n < 1) return;
|
|
2972
2973
|
let r = new Cn(e, t, 1);
|
|
2973
2974
|
if (!(n > r.calendar.getDaysInMonth(r))) return new Cn(e, t, n);
|
|
2974
2975
|
}
|
|
2975
|
-
function
|
|
2976
|
+
function ao(e, t, n, r) {
|
|
2976
2977
|
if (r === -1) {
|
|
2977
2978
|
let r = wn(new Cn(e, t, 1));
|
|
2978
|
-
return r.subtract({ days: (
|
|
2979
|
+
return r.subtract({ days: (ro(r) - n + 7) % 7 });
|
|
2979
2980
|
}
|
|
2980
|
-
let i = new Cn(e, t, 1), a = i.add({ days: (n -
|
|
2981
|
+
let i = new Cn(e, t, 1), a = i.add({ days: (n - ro(i) + 7) % 7 + (r - 1) * 7 });
|
|
2981
2982
|
return a.month === t ? a : void 0;
|
|
2982
2983
|
}
|
|
2983
|
-
function
|
|
2984
|
+
function oo(e) {
|
|
2984
2985
|
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;
|
|
2985
2986
|
return new Cn(e, p, m);
|
|
2986
2987
|
}
|
|
2987
|
-
function
|
|
2988
|
+
function so(e, t) {
|
|
2988
2989
|
if (e.length === 4) return Number(e);
|
|
2989
2990
|
if (e.length !== 2) return NaN;
|
|
2990
2991
|
let n = Number(e);
|
|
2991
2992
|
return n <= t.year % 100 ? 2e3 + n : 1900 + n;
|
|
2992
2993
|
}
|
|
2993
|
-
var
|
|
2994
|
+
var co = [
|
|
2994
2995
|
["(?:christmas|xmas) eve", (e) => $(e, 12, 24)],
|
|
2995
2996
|
["(?:christmas|xmas)(?: day)?", (e) => $(e, 12, 25)],
|
|
2996
2997
|
["boxing day", (e) => $(e, 12, 26)],
|
|
@@ -2998,16 +2999,16 @@ var so = [
|
|
|
2998
2999
|
["new years?(?: day)?", (e) => $(e, 1, 1)],
|
|
2999
3000
|
["valentines(?: day)?", (e) => $(e, 2, 14)],
|
|
3000
3001
|
["(?:st )?(?:patricks|paddys) day", (e) => $(e, 3, 17)],
|
|
3001
|
-
["good friday", (e) =>
|
|
3002
|
-
["easter monday", (e) =>
|
|
3003
|
-
["easter(?: sunday| day)?", (e) =>
|
|
3004
|
-
["(?:mothers day|mothering sunday)", (e) =>
|
|
3005
|
-
["fathers day", (e) =>
|
|
3002
|
+
["good friday", (e) => oo(e).subtract({ days: 2 })],
|
|
3003
|
+
["easter monday", (e) => oo(e).add({ days: 1 })],
|
|
3004
|
+
["easter(?: sunday| day)?", (e) => oo(e)],
|
|
3005
|
+
["(?:mothers day|mothering sunday)", (e) => oo(e).subtract({ weeks: 3 })],
|
|
3006
|
+
["fathers day", (e) => ao(e, 6, 7, 3)],
|
|
3006
3007
|
["halloween", (e) => $(e, 10, 31)],
|
|
3007
3008
|
["(?:bonfire night|guy fawkes(?: night| day)?)", (e) => $(e, 11, 5)],
|
|
3008
3009
|
["(?:remembrance|armistice) day", (e) => $(e, 11, 11)]
|
|
3009
3010
|
];
|
|
3010
|
-
function
|
|
3011
|
+
function lo(e, t, n) {
|
|
3011
3012
|
let r = e.filter((e) => !!e).sort((e, t) => e.compare(t));
|
|
3012
3013
|
return n === "future" ? r.find((e) => e.compare(t) >= 0) : n === "past" ? r.findLast((e) => e.compare(t) <= 0) : r.reduce((e, n) => {
|
|
3013
3014
|
if (!e) return n;
|
|
@@ -3015,14 +3016,14 @@ function co(e, t, n) {
|
|
|
3015
3016
|
return r < i || r === i && n.compare(t) > 0 ? n : e;
|
|
3016
3017
|
}, void 0);
|
|
3017
3018
|
}
|
|
3018
|
-
function
|
|
3019
|
+
function uo(e, t, n, r, i) {
|
|
3019
3020
|
if (!e) return n.yearValue === void 0 ? r.add(t) : void 0;
|
|
3020
3021
|
switch (e.kind) {
|
|
3021
3022
|
case "date": return n.yearValue === void 0 ? e.date.add(t) : void 0;
|
|
3022
3023
|
case "yearless": return n.yearValue === void 0 ? n.year || t.years ? e.resolve(r.year + t.years)?.add({
|
|
3023
3024
|
...t,
|
|
3024
3025
|
years: 0
|
|
3025
|
-
}) :
|
|
3026
|
+
}) : lo(Array.from({ length: 9 }, (e, t) => r.year - 4 + t).map(e.resolve), r, i)?.add(t) : e.resolve(n.yearValue + t.years)?.add({
|
|
3026
3027
|
...t,
|
|
3027
3028
|
years: 0
|
|
3028
3029
|
});
|
|
@@ -3035,19 +3036,19 @@ function lo(e, t, n, r, i) {
|
|
|
3035
3036
|
months: 0
|
|
3036
3037
|
});
|
|
3037
3038
|
}
|
|
3038
|
-
return
|
|
3039
|
+
return lo([
|
|
3039
3040
|
-1,
|
|
3040
3041
|
0,
|
|
3041
3042
|
1
|
|
3042
3043
|
].map((e) => On(r).add({ months: e })).map((t) => $(t.year, t.month, e.day)), r, i)?.add(t);
|
|
3043
3044
|
case "weekday": {
|
|
3044
3045
|
if (n.yearValue !== void 0) return;
|
|
3045
|
-
let a = (e.weekday -
|
|
3046
|
+
let a = (e.weekday - ro(r) + 7) % 7 || 7, o = (ro(r) - e.weekday + 7) % 7 || 7, s = r.add({ days: a }), c = r.subtract({ days: o });
|
|
3046
3047
|
return (i === "past" || i === "nearest" && o < a ? c : s).add(t);
|
|
3047
3048
|
}
|
|
3048
3049
|
}
|
|
3049
3050
|
}
|
|
3050
|
-
function
|
|
3051
|
+
function fo(e, t, n) {
|
|
3051
3052
|
let r = e.trim(), i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(r);
|
|
3052
3053
|
if (i) {
|
|
3053
3054
|
let e = $(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
@@ -3073,29 +3074,29 @@ function uo(e, t, n) {
|
|
|
3073
3074
|
kind: "yearless",
|
|
3074
3075
|
resolve: (e) => $(e, o, i)
|
|
3075
3076
|
};
|
|
3076
|
-
let s = $(
|
|
3077
|
+
let s = $(so(r.year, t), o, i);
|
|
3077
3078
|
return s && {
|
|
3078
3079
|
kind: "date",
|
|
3079
3080
|
date: s
|
|
3080
3081
|
};
|
|
3081
3082
|
}
|
|
3082
3083
|
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) => {
|
|
3083
|
-
let i = Number(e), a =
|
|
3084
|
+
let i = Number(e), a = Xa[n];
|
|
3084
3085
|
if (r === void 0) return {
|
|
3085
3086
|
kind: "yearless",
|
|
3086
3087
|
resolve: (e) => $(e, a, i)
|
|
3087
3088
|
};
|
|
3088
|
-
let o = $(
|
|
3089
|
+
let o = $(so(r, t), a, i);
|
|
3089
3090
|
return o && {
|
|
3090
3091
|
kind: "date",
|
|
3091
3092
|
date: o
|
|
3092
3093
|
};
|
|
3093
3094
|
}, c;
|
|
3094
|
-
if (c = RegExp(`^(\\d{1,2}) ${
|
|
3095
|
-
if (c = RegExp(`^${
|
|
3096
|
-
if (c = RegExp(`^(\\d{4}) ${
|
|
3097
|
-
if (c = RegExp(`^${
|
|
3098
|
-
let e =
|
|
3095
|
+
if (c = RegExp(`^(\\d{1,2}) ${Za}(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[1], c[2], c[3]);
|
|
3096
|
+
if (c = RegExp(`^${Za} (\\d{1,2})(?: (\\d{2}|\\d{4}))?$`).exec(o)) return s(c[2], c[1], c[3]);
|
|
3097
|
+
if (c = RegExp(`^(\\d{4}) ${Za} (\\d{1,2})$`).exec(o)) return s(c[3], c[2], c[1]);
|
|
3098
|
+
if (c = RegExp(`^${Za}(?: (\\d{4}))?$`).exec(o)) {
|
|
3099
|
+
let e = Xa[c[1]];
|
|
3099
3100
|
if (c[2]) {
|
|
3100
3101
|
let t = $(Number(c[2]), e, 1);
|
|
3101
3102
|
return t && {
|
|
@@ -3116,22 +3117,22 @@ function uo(e, t, n) {
|
|
|
3116
3117
|
} : void 0;
|
|
3117
3118
|
}
|
|
3118
3119
|
}
|
|
3119
|
-
function
|
|
3120
|
+
function po(e) {
|
|
3120
3121
|
return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
|
|
3121
3122
|
1: "st",
|
|
3122
3123
|
2: "nd",
|
|
3123
3124
|
3: "rd"
|
|
3124
3125
|
}[e % 10] ?? "th"}`;
|
|
3125
3126
|
}
|
|
3126
|
-
function
|
|
3127
|
-
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${
|
|
3127
|
+
function mo(e) {
|
|
3128
|
+
return e.toLowerCase().replace(/['’]/g, "").replace(/,/g, " ").replace(/\.+$/, "").replace(RegExp(`\\b(twenty|thirty)[ -](${no})\\b`, "g"), (e, t, n) => po((t === "twenty" ? 20 : 30) + to[n])).replace(RegExp(`\\b(${no})\\b`, "g"), (e) => po(to[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();
|
|
3128
3129
|
}
|
|
3129
|
-
function
|
|
3130
|
+
function ho(e, t) {
|
|
3130
3131
|
let { today: n, order: r = [
|
|
3131
3132
|
"day",
|
|
3132
3133
|
"month",
|
|
3133
3134
|
"year"
|
|
3134
|
-
], prefer: i = "future" } = t, a =
|
|
3135
|
+
], prefer: i = "future" } = t, a = mo(e);
|
|
3135
3136
|
if (!a) return;
|
|
3136
3137
|
let o = ` ${a} `, s = !1, c = !1, l = [], u = !1, d = {
|
|
3137
3138
|
days: 0,
|
|
@@ -3141,7 +3142,7 @@ function mo(e, t) {
|
|
|
3141
3142
|
}, f = {
|
|
3142
3143
|
year: !1,
|
|
3143
3144
|
month: !1
|
|
3144
|
-
}, p =
|
|
3145
|
+
}, p = io(n);
|
|
3145
3146
|
function m(e) {
|
|
3146
3147
|
let t = RegExp(` ${e} `).exec(o);
|
|
3147
3148
|
return t && (o = o.replace(t[0], " "), s = !0), t;
|
|
@@ -3151,18 +3152,18 @@ function mo(e, t) {
|
|
|
3151
3152
|
}, g = (e) => e && {
|
|
3152
3153
|
kind: "date",
|
|
3153
3154
|
date: e
|
|
3154
|
-
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) =>
|
|
3155
|
-
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(wn(n))), m("eoy") && h(g(new Cn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${
|
|
3156
|
-
let e = x[1] === "last" ? -1 : Number(x[1][0]), t =
|
|
3155
|
+
}, _ = (e, t = 1) => e.slice(t).find((e) => e !== void 0), v = (e) => e === "fortnight" ? ["weeks", 2] : [`${e}s`, 1], y = (e) => Qa[e] ?? Number(e), b = (e) => n.add({ days: (e - ro(n) + 7) % 7 || 7 }), x;
|
|
3156
|
+
if (m("eow") && h(g(p.add({ days: 4 }))), m("eom") && h(g(wn(n))), m("eoy") && h(g(new Cn(n.year, 12, 31))), x = m(`(1st|2nd|3rd|4th|5th|last) ${Q} (?:of|in) (?:(this|next|last) month|month|${Za}(?: (\\d{4}))?)`)) {
|
|
3157
|
+
let e = x[1] === "last" ? -1 : Number(x[1][0]), t = Ya[x[2]];
|
|
3157
3158
|
if (x[4]) {
|
|
3158
|
-
let n =
|
|
3159
|
-
x[5] ? h(g(
|
|
3159
|
+
let n = Xa[x[4]];
|
|
3160
|
+
x[5] ? h(g(ao(Number(x[5]), n, t, e))) : h({
|
|
3160
3161
|
kind: "yearless",
|
|
3161
|
-
resolve: (r) =>
|
|
3162
|
+
resolve: (r) => ao(r, n, t, e)
|
|
3162
3163
|
});
|
|
3163
3164
|
} else {
|
|
3164
3165
|
let r = x[3] === "next" ? 1 : x[3] === "last" ? -1 : 0, i = On(n).add({ months: r });
|
|
3165
|
-
h(g(
|
|
3166
|
+
h(g(ao(i.year, i.month, t, e)));
|
|
3166
3167
|
}
|
|
3167
3168
|
}
|
|
3168
3169
|
if (x = m("(start|beginning|middle|mid|end) (?:of )?(?:(this|next|last) )?(week|month|year)")) {
|
|
@@ -3176,8 +3177,8 @@ function mo(e, t) {
|
|
|
3176
3177
|
h(g(t === "start" ? new Cn(r, 1, 1) : t === "mid" ? new Cn(r, 7, 1) : new Cn(r, 12, 31)));
|
|
3177
3178
|
}
|
|
3178
3179
|
}
|
|
3179
|
-
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${
|
|
3180
|
-
let e = x[1], t =
|
|
3180
|
+
if (x = m(`(start|beginning|early|middle|mid|late|end) (?:of )?${Za}(?: (\\d{4}))?`)) {
|
|
3181
|
+
let e = x[1], t = Xa[x[2]], n = (n) => [
|
|
3181
3182
|
"start",
|
|
3182
3183
|
"beginning",
|
|
3183
3184
|
"early"
|
|
@@ -3194,38 +3195,38 @@ function mo(e, t) {
|
|
|
3194
3195
|
kind: "weekday",
|
|
3195
3196
|
weekday: 6
|
|
3196
3197
|
});
|
|
3197
|
-
for (let [e, t] of
|
|
3198
|
+
for (let [e, t] of co) m(e) && h({
|
|
3198
3199
|
kind: "yearless",
|
|
3199
3200
|
resolve: t
|
|
3200
3201
|
});
|
|
3201
|
-
if ((x = m(`${Q} after next`)) && h(g(b(
|
|
3202
|
+
if ((x = m(`${Q} after next`)) && h(g(b(Ya[x[1]]).add({ weeks: 1 }))), (x = m(`${Q} (week|fortnight)`)) && h(g(b(Ya[x[1]]).add({ weeks: x[2] === "fortnight" ? 2 : 1 }))), x = m(`${$a} ${eo} on ${Q}`)) {
|
|
3202
3203
|
let [e, t] = v(x[2]);
|
|
3203
|
-
h(g(b(
|
|
3204
|
+
h(g(b(Ya[x[3]]).add({ [e]: y(x[1]) * t })));
|
|
3204
3205
|
}
|
|
3205
|
-
if (x = m(`${
|
|
3206
|
+
if (x = m(`${$a} ${eo} (today|tomorrow|tmrw|tmr)`)) {
|
|
3206
3207
|
let [e, t] = v(x[2]);
|
|
3207
3208
|
h(g((x[3] === "today" ? n : n.add({ days: 1 })).add({ [e]: y(x[1]) * t })));
|
|
3208
3209
|
}
|
|
3209
3210
|
for ((x = m(`(?:next week ${Q}|${Q} next week|next ${Q})`)) && h(g(p.add({
|
|
3210
3211
|
weeks: 1,
|
|
3211
|
-
days:
|
|
3212
|
-
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days:
|
|
3212
|
+
days: Ya[_(x)] - 1
|
|
3213
|
+
}))), (x = m(`(?:last week ${Q}|${Q} last week)`)) && h(g(p.subtract({ weeks: 1 }).add({ days: Ya[_(x)] - 1 }))), (x = m(`(?:this week ${Q}|${Q} this week|this ${Q})`)) && h(g(p.add({ days: Ya[_(x)] - 1 }))), (x = m(`last ${Q}`)) && h(g(n.subtract({ days: (ro(n) - Ya[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({
|
|
3213
3214
|
kind: "weekday",
|
|
3214
|
-
weekday:
|
|
3215
|
-
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${
|
|
3215
|
+
weekday: Ya[x[1]]
|
|
3216
|
+
}, !0), m("this year") && (f.year = !0), m("this month") && (f.month = !0); x = m(`(next|last) ${eo}`);) {
|
|
3216
3217
|
let [e, t] = v(x[2]);
|
|
3217
3218
|
d[e] += (x[1] === "next" ? 1 : -1) * t;
|
|
3218
3219
|
}
|
|
3219
3220
|
let S = !1;
|
|
3220
|
-
for (; x = m(`in ${
|
|
3221
|
+
for (; x = m(`in ${$a} ${eo}`);) {
|
|
3221
3222
|
let [e, t] = v(x[2]);
|
|
3222
3223
|
d[e] += y(x[1]) * t, S = !0;
|
|
3223
3224
|
}
|
|
3224
|
-
for (; S && (x = m(`(?:and )?${
|
|
3225
|
+
for (; S && (x = m(`(?:and )?${$a} ${eo}(?! (?:ago|before|earlier|from|after|later))`));) {
|
|
3225
3226
|
let [e, t] = v(x[2]);
|
|
3226
3227
|
d[e] += y(x[1]) * t;
|
|
3227
3228
|
}
|
|
3228
|
-
for (; x = m(`${
|
|
3229
|
+
for (; x = m(`${$a} ${eo} (ago|before|earlier|from|after|later)`);) {
|
|
3229
3230
|
let [e, t] = v(x[2]), n = [
|
|
3230
3231
|
"ago",
|
|
3231
3232
|
"before",
|
|
@@ -3236,24 +3237,24 @@ function mo(e, t) {
|
|
|
3236
3237
|
for (; m("(?:on|of|at|by|for)"););
|
|
3237
3238
|
let C = o.trim();
|
|
3238
3239
|
if (s && /^\d{4}$/.test(C) && (f.yearValue = Number(C), C = ""), C) {
|
|
3239
|
-
let e =
|
|
3240
|
+
let e = fo(C, n, r);
|
|
3240
3241
|
if (!e) return;
|
|
3241
3242
|
l.length === 1 && u && l.pop(), l.push(e);
|
|
3242
3243
|
} else if (!s) return;
|
|
3243
|
-
if (!(c || l.length > 1)) return
|
|
3244
|
+
if (!(c || l.length > 1)) return uo(l[0], d, f, n, i);
|
|
3244
3245
|
}
|
|
3245
3246
|
// src/components/InputDate/InputDate.vue?vue&type=script&setup=true&lang.ts
|
|
3246
|
-
var
|
|
3247
|
+
var go = [
|
|
3247
3248
|
"id",
|
|
3248
3249
|
"placeholder",
|
|
3249
3250
|
"disabled",
|
|
3250
3251
|
"aria-invalid",
|
|
3251
3252
|
"aria-describedby"
|
|
3252
|
-
],
|
|
3253
|
+
], _o = {
|
|
3253
3254
|
key: 0,
|
|
3254
3255
|
"aria-hidden": "true",
|
|
3255
|
-
class: "shrink-0 tabular-nums text-
|
|
3256
|
-
},
|
|
3256
|
+
class: "shrink-0 tabular-nums text-ink/55"
|
|
3257
|
+
}, vo = /* @__PURE__ */ f({
|
|
3257
3258
|
inheritAttrs: !1,
|
|
3258
3259
|
__name: "InputDate",
|
|
3259
3260
|
props: /*@__PURE__*/ g({
|
|
@@ -3312,7 +3313,7 @@ var ho = [
|
|
|
3312
3313
|
return g.value.format(new Date(e.year, e.month - 1, e.day));
|
|
3313
3314
|
}
|
|
3314
3315
|
function D(e) {
|
|
3315
|
-
return
|
|
3316
|
+
return ho(e, {
|
|
3316
3317
|
today: An(Tn()),
|
|
3317
3318
|
order: b.value,
|
|
3318
3319
|
prefer: n.prefer
|
|
@@ -3352,12 +3353,12 @@ var ho = [
|
|
|
3352
3353
|
}
|
|
3353
3354
|
let J = [
|
|
3354
3355
|
"flex w-9 shrink-0 -my-2 -mr-3 self-stretch items-center justify-center",
|
|
3355
|
-
"rounded-r border-l border-
|
|
3356
|
-
"not-disabled:hover:
|
|
3357
|
-
"data-[state=open]:
|
|
3356
|
+
"rounded-r border-l border-ink/10 bg-surface cursor-pointer transition",
|
|
3357
|
+
"not-disabled:hover:bg-surface-hover not-disabled:active:bg-surface-pressed [&_svg]:opacity-100!",
|
|
3358
|
+
"data-[state=open]:bg-surface-pressed disabled:cursor-not-allowed",
|
|
3358
3359
|
"outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
3359
3360
|
];
|
|
3360
|
-
return (i, l) => (w(), a(
|
|
3361
|
+
return (i, l) => (w(), a(Pa, {
|
|
3361
3362
|
label: e.label,
|
|
3362
3363
|
helper: e.helper,
|
|
3363
3364
|
"helper-placement": e.helperPlacement,
|
|
@@ -3384,12 +3385,12 @@ var ho = [
|
|
|
3384
3385
|
disabled: e.disabled,
|
|
3385
3386
|
"aria-invalid": u,
|
|
3386
3387
|
"aria-describedby": a,
|
|
3387
|
-
class: "h-5 min-w-0 flex-1 bg-transparent tabular-nums outline-none placeholder:text-
|
|
3388
|
+
class: "h-5 min-w-0 flex-1 bg-transparent tabular-nums outline-none placeholder:text-ink/55 disabled:cursor-not-allowed",
|
|
3388
3389
|
onInput: P,
|
|
3389
3390
|
onBlur: I,
|
|
3390
3391
|
onKeydown: U(L, ["enter"])
|
|
3391
|
-
}), null, 16,
|
|
3392
|
-
k.value ? (w(), s("span",
|
|
3392
|
+
}), null, 16, go), [[R, O.value]]),
|
|
3393
|
+
k.value ? (w(), s("span", _o, j(k.value), 1)) : o("", !0),
|
|
3393
3394
|
d(M(gt), {
|
|
3394
3395
|
"aria-label": M(t)("ui.inputDate.openCalendar"),
|
|
3395
3396
|
class: y(J)
|
|
@@ -3400,9 +3401,9 @@ var ho = [
|
|
|
3400
3401
|
d(M(mt), {
|
|
3401
3402
|
"side-offset": 6,
|
|
3402
3403
|
align: "end",
|
|
3403
|
-
class: y([M(
|
|
3404
|
+
class: y([M($n), "p-3"])
|
|
3404
3405
|
}, {
|
|
3405
|
-
default: V(() => [d(
|
|
3406
|
+
default: V(() => [d(Ja, {
|
|
3406
3407
|
"model-value": r.value,
|
|
3407
3408
|
min: e.min,
|
|
3408
3409
|
max: e.max,
|
|
@@ -3432,7 +3433,7 @@ var ho = [
|
|
|
3432
3433
|
"class"
|
|
3433
3434
|
]));
|
|
3434
3435
|
}
|
|
3435
|
-
}),
|
|
3436
|
+
}), yo = /* @__PURE__ */ f({
|
|
3436
3437
|
__name: "Tooltip",
|
|
3437
3438
|
props: {
|
|
3438
3439
|
text: {},
|
|
@@ -3467,7 +3468,7 @@ var ho = [
|
|
|
3467
3468
|
align: e.align,
|
|
3468
3469
|
"side-offset": 8,
|
|
3469
3470
|
"collision-padding": 8,
|
|
3470
|
-
class: y(M(X)("z-100 max-w-72 rounded-md bg-
|
|
3471
|
+
class: y(M(X)("z-100 max-w-72 rounded-md bg-neutral-900 dark:bg-neutral-700 px-2.5 py-1.5 text-xs/4 font-medium 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))
|
|
3471
3472
|
}, {
|
|
3472
3473
|
default: V(() => [O(n.$slots, "content", {}, () => [u(j(e.text), 1)])]),
|
|
3473
3474
|
_: 3
|
|
@@ -3483,7 +3484,7 @@ var ho = [
|
|
|
3483
3484
|
_: 3
|
|
3484
3485
|
}));
|
|
3485
3486
|
}
|
|
3486
|
-
}),
|
|
3487
|
+
}), bo = { class: "-mx-3 -my-2 flex min-w-0 flex-1 flex-col self-stretch" }, xo = ["aria-label", "aria-controls"], So = /* @__PURE__ */ f({
|
|
3487
3488
|
__name: "InputRichText",
|
|
3488
3489
|
props: /*@__PURE__*/ g({
|
|
3489
3490
|
label: {},
|
|
@@ -3589,8 +3590,8 @@ var ho = [
|
|
|
3589
3590
|
key: "U",
|
|
3590
3591
|
toggle: () => l.value?.chain().focus().toggleUnderline().run()
|
|
3591
3592
|
}
|
|
3592
|
-
], v = "min-h-24 max-h-80 overflow-y-auto px-3 py-2 text-sm pointer-coarse:text-base outline-none cursor-text [&_p+p]:mt-2 [&_p.is-editor-empty:first-child]:before:pointer-events-none [&_p.is-editor-empty:first-child]:before:float-left [&_p.is-editor-empty:first-child]:before:h-0 [&_p.is-editor-empty:first-child]:before:text-
|
|
3593
|
-
return (i, o) => (w(), a(
|
|
3593
|
+
], v = "min-h-24 max-h-80 overflow-y-auto px-3 py-2 text-sm pointer-coarse:text-base outline-none cursor-text [&_p+p]:mt-2 [&_p.is-editor-empty:first-child]:before:pointer-events-none [&_p.is-editor-empty:first-child]:before:float-left [&_p.is-editor-empty:first-child]:before:h-0 [&_p.is-editor-empty:first-child]:before:text-ink/55 [&_p.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]";
|
|
3594
|
+
return (i, o) => (w(), a(Pa, {
|
|
3594
3595
|
label: e.label,
|
|
3595
3596
|
helper: e.helper,
|
|
3596
3597
|
"helper-placement": e.helperPlacement,
|
|
@@ -3601,14 +3602,14 @@ var ho = [
|
|
|
3601
3602
|
disabled: e.disabled,
|
|
3602
3603
|
class: y(r.class)
|
|
3603
3604
|
}, {
|
|
3604
|
-
default: V((r) => [c("div",
|
|
3605
|
+
default: V((r) => [c("div", bo, [
|
|
3605
3606
|
c("div", {
|
|
3606
3607
|
role: "toolbar",
|
|
3607
3608
|
"aria-label": M(t)("ui.inputRichText.formattingFor", { label: e.label }),
|
|
3608
3609
|
"aria-controls": r.id,
|
|
3609
|
-
class: "flex items-center gap-0.5 border-b border-
|
|
3610
|
+
class: "flex items-center gap-0.5 border-b border-ink/10 px-1.5 py-1 [&_svg]:opacity-100!",
|
|
3610
3611
|
onMousedown: o[0] ||= ee(() => {}, ["prevent"])
|
|
3611
|
-
}, [(w(), s(n, null, D(_, (t) => d(
|
|
3612
|
+
}, [(w(), s(n, null, D(_, (t) => d(yo, {
|
|
3612
3613
|
key: t.name,
|
|
3613
3614
|
text: `${t.label} (${M(g)}${t.key})`,
|
|
3614
3615
|
disabled: e.disabled
|
|
@@ -3621,7 +3622,7 @@ var ho = [
|
|
|
3621
3622
|
"aria-pressed": u.value[t.name],
|
|
3622
3623
|
"aria-keyshortcuts": `${M(h) ? "Meta" : "Control"}+${t.key}`,
|
|
3623
3624
|
disabled: e.disabled,
|
|
3624
|
-
class: "aria-pressed:bg-
|
|
3625
|
+
class: "aria-pressed:bg-selected",
|
|
3625
3626
|
onClick: (e) => t.toggle()
|
|
3626
3627
|
}, {
|
|
3627
3628
|
default: V(() => [(w(), a(k(t.icon)))]),
|
|
@@ -3634,7 +3635,7 @@ var ho = [
|
|
|
3634
3635
|
"onClick"
|
|
3635
3636
|
])]),
|
|
3636
3637
|
_: 2
|
|
3637
|
-
}, 1032, ["text", "disabled"])), 64))], 40,
|
|
3638
|
+
}, 1032, ["text", "disabled"])), 64))], 40, xo),
|
|
3638
3639
|
d(M(m), { ids: r }, null, 8, ["ids"]),
|
|
3639
3640
|
d(M(jn), {
|
|
3640
3641
|
editor: M(l),
|
|
@@ -3654,18 +3655,18 @@ var ho = [
|
|
|
3654
3655
|
"class"
|
|
3655
3656
|
]));
|
|
3656
3657
|
}
|
|
3657
|
-
}),
|
|
3658
|
+
}), Co = [
|
|
3658
3659
|
"id",
|
|
3659
3660
|
"type",
|
|
3660
3661
|
"autocomplete",
|
|
3661
3662
|
"disabled",
|
|
3662
3663
|
"aria-invalid",
|
|
3663
3664
|
"aria-describedby"
|
|
3664
|
-
],
|
|
3665
|
+
], wo = [
|
|
3665
3666
|
"aria-controls",
|
|
3666
3667
|
"aria-pressed",
|
|
3667
3668
|
"disabled"
|
|
3668
|
-
],
|
|
3669
|
+
], To = { class: "sr-only" }, Eo = /* @__PURE__ */ f({
|
|
3669
3670
|
inheritAttrs: !1,
|
|
3670
3671
|
__name: "InputPassword",
|
|
3671
3672
|
props: /*@__PURE__*/ g({
|
|
@@ -3700,11 +3701,11 @@ var ho = [
|
|
|
3700
3701
|
}
|
|
3701
3702
|
let g = i(() => n.statusText ?? (m.value ? t("ui.inputPassword.capsLock") : void 0)), v = [
|
|
3702
3703
|
"flex w-9 shrink-0 -my-2 -mr-3 self-stretch items-center justify-center",
|
|
3703
|
-
"bg-
|
|
3704
|
-
"not-disabled:hover:
|
|
3705
|
-
"outline-none focus-visible:bg-
|
|
3704
|
+
"bg-surface rounded-r border-l border-ink/10 cursor-pointer transition",
|
|
3705
|
+
"not-disabled:hover:bg-surface-hover not-disabled:active:bg-surface-pressed [&_svg]:opacity-100!",
|
|
3706
|
+
"outline-none focus-visible:bg-surface-hover disabled:cursor-not-allowed"
|
|
3706
3707
|
];
|
|
3707
|
-
return (i, o) => (w(), a(
|
|
3708
|
+
return (i, o) => (w(), a(Pa, {
|
|
3708
3709
|
label: e.label,
|
|
3709
3710
|
helper: e.helper,
|
|
3710
3711
|
"helper-placement": e.helperPlacement,
|
|
@@ -3729,11 +3730,11 @@ var ho = [
|
|
|
3729
3730
|
disabled: e.disabled,
|
|
3730
3731
|
"aria-invalid": f,
|
|
3731
3732
|
"aria-describedby": l,
|
|
3732
|
-
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-
|
|
3733
|
+
class: "h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-ink/55 disabled:cursor-not-allowed",
|
|
3733
3734
|
onKeydown: h,
|
|
3734
3735
|
onKeyup: h,
|
|
3735
3736
|
onBlur: o[1] ||= (e) => m.value = !1
|
|
3736
|
-
}), null, 16,
|
|
3737
|
+
}), null, 16, Co), [[L, r.value]]), c("button", {
|
|
3737
3738
|
type: "button",
|
|
3738
3739
|
class: y(v),
|
|
3739
3740
|
"aria-controls": n,
|
|
@@ -3741,13 +3742,13 @@ var ho = [
|
|
|
3741
3742
|
disabled: e.disabled,
|
|
3742
3743
|
onPointerdown: o[2] ||= ee(() => {}, ["prevent"]),
|
|
3743
3744
|
onClick: o[3] ||= (e) => d.value = !d.value
|
|
3744
|
-
}, [c("span",
|
|
3745
|
+
}, [c("span", To, j(M(t)("ui.inputPassword.show")), 1), d.value ? (w(), a(M(Ce), {
|
|
3745
3746
|
key: 0,
|
|
3746
3747
|
"aria-hidden": "true"
|
|
3747
3748
|
})) : (w(), a(M(Se), {
|
|
3748
3749
|
key: 1,
|
|
3749
3750
|
"aria-hidden": "true"
|
|
3750
|
-
}))], 40,
|
|
3751
|
+
}))], 40, wo)]),
|
|
3751
3752
|
_: 2
|
|
3752
3753
|
}, [i.$slots.leading ? {
|
|
3753
3754
|
name: "leading",
|
|
@@ -3769,7 +3770,7 @@ var ho = [
|
|
|
3769
3770
|
"class"
|
|
3770
3771
|
]));
|
|
3771
3772
|
}
|
|
3772
|
-
}),
|
|
3773
|
+
}), Do = { class: "flex flex-col gap-0.5" }, Oo = { class: "flex items-center gap-1" }, ko = ["for"], Ao = ["hidden"], jo = /* @__PURE__ */ f({
|
|
3773
3774
|
__name: "InputCode",
|
|
3774
3775
|
props: /*@__PURE__*/ g({
|
|
3775
3776
|
label: {},
|
|
@@ -3803,20 +3804,20 @@ var ho = [
|
|
|
3803
3804
|
return e.map((e) => e == null ? "" : String(e)).join("").replace(l.alphanumeric ? /[^a-z0-9]/gi : /\D/g, "").toUpperCase().slice(0, l.length);
|
|
3804
3805
|
}
|
|
3805
3806
|
let C = (e) => u.value = S(e), T = (e) => f("complete", S(e)), E = [
|
|
3806
|
-
"size-10 shrink-0 rounded border border-
|
|
3807
|
+
"size-10 shrink-0 rounded border border-ink/45 bg-surface shadow-xs text-center text-lg tabular-nums text-ink transition",
|
|
3807
3808
|
"outline-2 outline-offset-1 outline-transparent focus:outline-focus forced-colors:not-focus:outline-0",
|
|
3808
|
-
"placeholder:text-
|
|
3809
|
+
"placeholder:text-ink/25 disabled:cursor-not-allowed"
|
|
3809
3810
|
], O = {
|
|
3810
3811
|
error: "border-red",
|
|
3811
3812
|
success: "border-green",
|
|
3812
3813
|
loading: ""
|
|
3813
3814
|
};
|
|
3814
|
-
return (t, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-
|
|
3815
|
-
c("div",
|
|
3815
|
+
return (t, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-ink", l.class)) }, [
|
|
3816
|
+
c("div", Do, [c("div", Oo, [c("label", {
|
|
3816
3817
|
id: m,
|
|
3817
3818
|
for: `${M(p)}-0`,
|
|
3818
3819
|
class: "text-sm"
|
|
3819
|
-
}, j(e.label), 9,
|
|
3820
|
+
}, j(e.label), 9, ko), e.helper && e.helperPlacement === "icon" ? (w(), a(Ea, {
|
|
3820
3821
|
key: 0,
|
|
3821
3822
|
text: e.helper,
|
|
3822
3823
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -3824,8 +3825,8 @@ var ho = [
|
|
|
3824
3825
|
key: 0,
|
|
3825
3826
|
id: h,
|
|
3826
3827
|
hidden: e.helperPlacement === "icon",
|
|
3827
|
-
class: "text-xs text-
|
|
3828
|
-
}, j(e.helper), 9,
|
|
3828
|
+
class: "text-xs text-ink/65"
|
|
3829
|
+
}, j(e.helper), 9, Ao)) : o("", !0)]),
|
|
3829
3830
|
d(M(Ft), {
|
|
3830
3831
|
"model-value": x.value,
|
|
3831
3832
|
type: e.alphanumeric ? "text" : "number",
|
|
@@ -3868,32 +3869,32 @@ var ho = [
|
|
|
3868
3869
|
"disabled",
|
|
3869
3870
|
"class"
|
|
3870
3871
|
]),
|
|
3871
|
-
d(
|
|
3872
|
+
d(ka, {
|
|
3872
3873
|
id: g,
|
|
3873
3874
|
status: _.value,
|
|
3874
3875
|
text: v.value
|
|
3875
3876
|
}, null, 8, ["status", "text"])
|
|
3876
3877
|
], 2));
|
|
3877
3878
|
}
|
|
3878
|
-
}),
|
|
3879
|
+
}), Mo = {
|
|
3879
3880
|
key: 0,
|
|
3880
|
-
class: "flex min-w-0 flex-1 flex-wrap gap-1"
|
|
3881
|
-
},
|
|
3881
|
+
class: "-ml-1 flex min-w-0 flex-1 flex-wrap gap-1"
|
|
3882
|
+
}, No = {
|
|
3882
3883
|
key: 1,
|
|
3883
3884
|
class: "h-5 min-w-0 flex-1 truncate"
|
|
3884
|
-
},
|
|
3885
|
+
}, Po = { class: "flex h-5 shrink-0 items-center" }, Fo = { class: "min-w-0 flex-1 truncate" }, Io = { class: "truncate" }, Lo = {
|
|
3885
3886
|
key: 0,
|
|
3886
3887
|
class: "flex h-5 shrink-0 items-center"
|
|
3887
|
-
},
|
|
3888
|
+
}, Ro = { class: "flex min-w-0 flex-1 flex-col" }, zo = {
|
|
3888
3889
|
key: 0,
|
|
3889
3890
|
class: "sr-only"
|
|
3890
|
-
}, zo = {
|
|
3891
|
-
key: 0,
|
|
3892
|
-
class: "text-xs text-black/65"
|
|
3893
3891
|
}, Bo = {
|
|
3892
|
+
key: 0,
|
|
3893
|
+
class: "text-xs text-ink/65"
|
|
3894
|
+
}, Vo = {
|
|
3894
3895
|
key: 1,
|
|
3895
|
-
class: "text-xs text-
|
|
3896
|
-
},
|
|
3896
|
+
class: "text-xs text-ink/65"
|
|
3897
|
+
}, Ho = { class: "flex h-5 w-4 shrink-0 items-center justify-center" }, Uo = "-mx-3 -my-2 flex min-w-0 flex-1 items-center gap-2 self-stretch px-3 py-2 [&>svg:first-child]:-ml-0.5 [&>svg:last-child]:-mr-0.5", Wo = "transition-transform duration-150 in-data-[state=open]:rotate-180 motion-reduce:transition-none", Go = /* @__PURE__ */ f({
|
|
3897
3898
|
__name: "Select",
|
|
3898
3899
|
props: /*@__PURE__*/ g({
|
|
3899
3900
|
label: {},
|
|
@@ -4041,16 +4042,16 @@ var ho = [
|
|
|
4041
4042
|
Item: Xt,
|
|
4042
4043
|
ItemText: Qt,
|
|
4043
4044
|
Indicator: Zt
|
|
4044
|
-
}), Se = i(() => X(
|
|
4045
|
-
"relative flex min-h-8 cursor-pointer items-start gap-2
|
|
4046
|
-
"data-highlighted:bg-
|
|
4045
|
+
}), Se = i(() => X($n, "overflow-hidden", r.searchable ? "max-h-(--reka-combobox-content-available-height) min-w-(--reka-combobox-trigger-width) max-w-[max(var(--reka-combobox-trigger-width),--spacing(80))]" : "max-h-(--reka-select-content-available-height) min-w-(--reka-select-trigger-width) max-w-[max(var(--reka-select-trigger-width),--spacing(80))]")), Ce = [
|
|
4046
|
+
"relative flex min-h-8 cursor-pointer items-start gap-2 px-3 py-1.5 text-sm outline-none select-none",
|
|
4047
|
+
"data-highlighted:bg-selected",
|
|
4047
4048
|
"data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
4048
4049
|
], we = (e) => r.searchable ? [
|
|
4049
4050
|
e.option.label,
|
|
4050
4051
|
e.option.description,
|
|
4051
4052
|
e.path
|
|
4052
4053
|
].filter(Boolean).join(" ") : e.option.label;
|
|
4053
|
-
return (i, f) => (w(), a(
|
|
4054
|
+
return (i, f) => (w(), a(Pa, {
|
|
4054
4055
|
label: e.label,
|
|
4055
4056
|
helper: e.helper,
|
|
4056
4057
|
"helper-placement": e.helperPlacement,
|
|
@@ -4077,7 +4078,7 @@ var ho = [
|
|
|
4077
4078
|
}), {
|
|
4078
4079
|
default: V(() => [e.searchable ? (w(), a(M(tt), {
|
|
4079
4080
|
key: 0,
|
|
4080
|
-
class: y(
|
|
4081
|
+
class: y(Uo),
|
|
4081
4082
|
onPointerdown: f[4] ||= (e) => re.value = !0,
|
|
4082
4083
|
onClick: f[5] ||= (t) => !e.disabled && !t.target.closest("button") && J(!0)
|
|
4083
4084
|
}, {
|
|
@@ -4086,7 +4087,7 @@ var ho = [
|
|
|
4086
4087
|
key: 0,
|
|
4087
4088
|
"aria-hidden": "true"
|
|
4088
4089
|
})) : o("", !0)]),
|
|
4089
|
-
c("span", { class: y(e.multiple ? "flex min-w-0 flex-1 flex-wrap items-center gap-1" : "contents") }, [(w(!0), s(n, null, D(R.value, (n) => (w(), a(
|
|
4090
|
+
c("span", { class: y(e.multiple ? M(X)("flex min-w-0 flex-1 flex-wrap items-center gap-1", R.value.length && "-ml-1") : "contents") }, [(w(!0), s(n, null, D(R.value, (n) => (w(), a(ma, {
|
|
4090
4091
|
key: String(n.value),
|
|
4091
4092
|
size: "sm",
|
|
4092
4093
|
removable: "",
|
|
@@ -4117,7 +4118,7 @@ var ho = [
|
|
|
4117
4118
|
"aria-invalid": v,
|
|
4118
4119
|
"aria-describedby": p,
|
|
4119
4120
|
autocomplete: "off",
|
|
4120
|
-
class: y(M(X)("h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-
|
|
4121
|
+
class: y(M(X)("h-5 min-w-0 flex-1 bg-transparent outline-none placeholder:text-ink/55 disabled:cursor-not-allowed", e.multiple && "min-w-16")),
|
|
4121
4122
|
"data-pointer-focus": re.value || void 0,
|
|
4122
4123
|
onFocus: te,
|
|
4123
4124
|
onBlur: f[2] ||= (e) => re.value = !1,
|
|
@@ -4135,11 +4136,11 @@ var ho = [
|
|
|
4135
4136
|
d(M(ft), {
|
|
4136
4137
|
tabindex: "-1",
|
|
4137
4138
|
"aria-label": M(t)("ui.select.showOptions"),
|
|
4138
|
-
class: "flex cursor-pointer disabled:cursor-not-allowed"
|
|
4139
|
+
class: "-mr-0.5 flex cursor-pointer disabled:cursor-not-allowed"
|
|
4139
4140
|
}, {
|
|
4140
4141
|
default: V(() => [d(M(fe), {
|
|
4141
4142
|
"aria-hidden": "true",
|
|
4142
|
-
class: y(
|
|
4143
|
+
class: y(Wo)
|
|
4143
4144
|
})]),
|
|
4144
4145
|
_: 1
|
|
4145
4146
|
}, 8, ["aria-label"])
|
|
@@ -4152,14 +4153,14 @@ var ho = [
|
|
|
4152
4153
|
"aria-describedby": p,
|
|
4153
4154
|
"data-pointer-focus": re.value || void 0,
|
|
4154
4155
|
onBlur: f[6] ||= (e) => re.value = !1,
|
|
4155
|
-
class: y(M(X)(
|
|
4156
|
+
class: y(M(X)(Uo, "cursor-pointer text-left outline-none disabled:cursor-not-allowed data-placeholder:text-ink/55"))
|
|
4156
4157
|
}, {
|
|
4157
4158
|
default: V(() => [
|
|
4158
4159
|
O(i.$slots, "leading", {}, () => [L.value?.icon ? (w(), a(k(L.value.icon), {
|
|
4159
4160
|
key: 0,
|
|
4160
4161
|
"aria-hidden": "true"
|
|
4161
4162
|
})) : o("", !0)]),
|
|
4162
|
-
e.multiple && R.value.length ? (w(), s("span",
|
|
4163
|
+
e.multiple && R.value.length ? (w(), s("span", Mo, [(w(!0), s(n, null, D(R.value, (e) => (w(), a(ma, {
|
|
4163
4164
|
key: String(e.value),
|
|
4164
4165
|
size: "sm"
|
|
4165
4166
|
}, l({
|
|
@@ -4169,10 +4170,10 @@ var ho = [
|
|
|
4169
4170
|
name: "leading",
|
|
4170
4171
|
fn: V(() => [(w(), a(k(e.icon), { "aria-hidden": "true" }))]),
|
|
4171
4172
|
key: "0"
|
|
4172
|
-
} : void 0]), 1024))), 128))])) : (w(), s("span",
|
|
4173
|
+
} : void 0]), 1024))), 128))])) : (w(), s("span", No, j(L.value?.label ?? g.value), 1)),
|
|
4173
4174
|
d(M(fe), {
|
|
4174
4175
|
"aria-hidden": "true",
|
|
4175
|
-
class: y(
|
|
4176
|
+
class: y(Wo)
|
|
4176
4177
|
})
|
|
4177
4178
|
]),
|
|
4178
4179
|
_: 3
|
|
@@ -4191,11 +4192,11 @@ var ho = [
|
|
|
4191
4192
|
onKeydown: f[7] ||= (t) => !e.searchable && xe(t),
|
|
4192
4193
|
onMousedown: f[8] ||= (t) => e.searchable && t.preventDefault()
|
|
4193
4194
|
}, {
|
|
4194
|
-
default: V(() => [(w(), a(k(Y.value.Viewport), { class: "flex flex-col
|
|
4195
|
+
default: V(() => [(w(), a(k(Y.value.Viewport), { class: "flex flex-col py-1 [scrollbar-width:thin]! [&::-webkit-scrollbar]:block!" }, {
|
|
4195
4196
|
default: V(() => [
|
|
4196
4197
|
e.searchable ? (w(), a(M(rt), {
|
|
4197
4198
|
key: 0,
|
|
4198
|
-
class: "px-
|
|
4199
|
+
class: "px-3 py-1.5 text-sm text-ink/65"
|
|
4199
4200
|
}, {
|
|
4200
4201
|
default: V(() => [u(j(e.emptyText ?? M(t)("ui.select.noMatches")), 1)]),
|
|
4201
4202
|
_: 1
|
|
@@ -4207,25 +4208,25 @@ var ho = [
|
|
|
4207
4208
|
class: y(M(X)(Ce, "font-bold")),
|
|
4208
4209
|
onSelect: be
|
|
4209
4210
|
}, {
|
|
4210
|
-
default: V(() => [c("span",
|
|
4211
|
+
default: V(() => [c("span", Po, [d(M(pe), {
|
|
4211
4212
|
"aria-hidden": "true",
|
|
4212
4213
|
class: "size-4"
|
|
4213
|
-
})]), c("span",
|
|
4214
|
+
})]), c("span", Fo, [f[9] ||= c("span", { class: "sr-only" }, "Back from ", -1), u(j(G.value.label), 1)])]),
|
|
4214
4215
|
_: 1
|
|
4215
|
-
}, 40, ["text-value", "class"])), (w(), a(k(Y.value.Separator), { class: "-
|
|
4216
|
+
}, 40, ["text-value", "class"])), (w(), a(k(Y.value.Separator), { class: "my-1 border-t border-ink/10" }))], 64)) : o("", !0),
|
|
4216
4217
|
(w(!0), s(n, null, D(le.value, (e, t) => (w(), s(n, { key: t }, [t > 0 && !oe.value ? (w(), a(k(Y.value.Separator), {
|
|
4217
4218
|
key: 0,
|
|
4218
|
-
class: "-
|
|
4219
|
-
})) : o("", !0), (w(), a(k(Y.value.Group), { class: "flex flex-col
|
|
4219
|
+
class: "my-1 border-t border-ink/10"
|
|
4220
|
+
})) : o("", !0), (w(), a(k(Y.value.Group), { class: "flex flex-col" }, {
|
|
4220
4221
|
default: V(() => [e.label ? (w(), a(k(Y.value.Label), {
|
|
4221
4222
|
key: 0,
|
|
4222
|
-
class: "flex h-6 items-center gap-1.5 px-
|
|
4223
|
+
class: "flex h-6 items-center gap-1.5 px-3 text-xs font-bold text-ink/65 uppercase"
|
|
4223
4224
|
}, {
|
|
4224
4225
|
default: V(() => [e.icon ? (w(), a(k(e.icon), {
|
|
4225
4226
|
key: 0,
|
|
4226
4227
|
"aria-hidden": "true",
|
|
4227
4228
|
class: "size-3.5 shrink-0"
|
|
4228
|
-
})) : o("", !0), c("span",
|
|
4229
|
+
})) : o("", !0), c("span", Io, j(e.label), 1)]),
|
|
4229
4230
|
_: 2
|
|
4230
4231
|
}, 1024)) : o("", !0), (w(!0), s(n, null, D(e.rows, (e) => (w(), a(k(Y.value.Item), {
|
|
4231
4232
|
key: e.key,
|
|
@@ -4237,19 +4238,19 @@ var ho = [
|
|
|
4237
4238
|
onSelect: (t) => e.parent && ye(t, e.option)
|
|
4238
4239
|
}, {
|
|
4239
4240
|
default: V(() => [
|
|
4240
|
-
e.option.icon ? (w(), s("span",
|
|
4241
|
+
e.option.icon ? (w(), s("span", Lo, [(w(), a(k(e.option.icon), {
|
|
4241
4242
|
"aria-hidden": "true",
|
|
4242
4243
|
class: "size-4 opacity-70"
|
|
4243
4244
|
}))])) : o("", !0),
|
|
4244
|
-
c("span",
|
|
4245
|
+
c("span", Ro, [
|
|
4245
4246
|
(w(), a(k(Y.value.ItemText), { class: "truncate in-data-[state=checked]:font-bold" }, {
|
|
4246
|
-
default: V(() => [u(j(e.option.label), 1), e.parent ? (w(), s("span",
|
|
4247
|
+
default: V(() => [u(j(e.option.label), 1), e.parent ? (w(), s("span", zo, ", more options")) : o("", !0)]),
|
|
4247
4248
|
_: 2
|
|
4248
4249
|
}, 1024)),
|
|
4249
|
-
e.path ? (w(), s("span",
|
|
4250
|
-
e.option.description ? (w(), s("span",
|
|
4250
|
+
e.path ? (w(), s("span", Bo, j(e.path), 1)) : o("", !0),
|
|
4251
|
+
e.option.description ? (w(), s("span", Vo, j(e.option.description), 1)) : o("", !0)
|
|
4251
4252
|
]),
|
|
4252
|
-
c("span",
|
|
4253
|
+
c("span", Ho, [e.parent ? (w(), a(M(me), {
|
|
4253
4254
|
key: 0,
|
|
4254
4255
|
"aria-hidden": "true",
|
|
4255
4256
|
class: "size-4 opacity-70"
|
|
@@ -4297,7 +4298,7 @@ var ho = [
|
|
|
4297
4298
|
"class"
|
|
4298
4299
|
]));
|
|
4299
4300
|
}
|
|
4300
|
-
}),
|
|
4301
|
+
}), Ko = { class: "flex items-start gap-2" }, qo = /* @__PURE__ */ f({
|
|
4301
4302
|
__name: "Checkbox",
|
|
4302
4303
|
props: /*@__PURE__*/ g({
|
|
4303
4304
|
label: {},
|
|
@@ -4329,14 +4330,14 @@ var ho = [
|
|
|
4329
4330
|
e.target.closest("label") || document.getElementById(t)?.click();
|
|
4330
4331
|
}
|
|
4331
4332
|
let h = [
|
|
4332
|
-
"mt-0.5 flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-sm border bg-
|
|
4333
|
-
"not-disabled:hover:border-
|
|
4333
|
+
"mt-0.5 flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-sm border bg-surface text-white transition",
|
|
4334
|
+
"not-disabled:hover:border-ink disabled:cursor-not-allowed",
|
|
4334
4335
|
"data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:hover:border-primary",
|
|
4335
4336
|
"data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:hover:border-primary",
|
|
4336
4337
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus",
|
|
4337
4338
|
"[&_svg]:size-3.5 [&_svg]:stroke-3"
|
|
4338
4339
|
];
|
|
4339
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-
|
|
4340
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", t.class)) }, [c("div", Ko, [d(M(et), {
|
|
4340
4341
|
id: l,
|
|
4341
4342
|
modelValue: n.value,
|
|
4342
4343
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4346,7 +4347,7 @@ var ho = [
|
|
|
4346
4347
|
disabled: e.disabled,
|
|
4347
4348
|
"aria-invalid": e.errorText ? !0 : void 0,
|
|
4348
4349
|
"aria-describedby": p.value,
|
|
4349
|
-
class: y(M(X)(h, e.errorText ? "border-red" : "border-
|
|
4350
|
+
class: y(M(X)(h, e.errorText ? "border-red" : "border-ink/45"))
|
|
4350
4351
|
}, {
|
|
4351
4352
|
default: V(() => [d(M($e), { class: "flex" }, {
|
|
4352
4353
|
default: V(() => [n.value === "indeterminate" ? (w(), a(M(je), {
|
|
@@ -4377,14 +4378,14 @@ var ho = [
|
|
|
4377
4378
|
}, j(e.label), 3), e.description ? (w(), s("p", {
|
|
4378
4379
|
key: 0,
|
|
4379
4380
|
id: u,
|
|
4380
|
-
class: "text-xs text-
|
|
4381
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4381
|
+
class: "text-xs text-ink/65"
|
|
4382
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(ka, {
|
|
4382
4383
|
id: f,
|
|
4383
4384
|
status: e.errorText ? "error" : void 0,
|
|
4384
4385
|
text: e.errorText
|
|
4385
4386
|
}, null, 8, ["status", "text"])], 2));
|
|
4386
4387
|
}
|
|
4387
|
-
}),
|
|
4388
|
+
}), Jo = { class: "flex flex-col gap-0.5" }, Yo = { class: "flex items-center gap-1" }, Xo = ["hidden"], Zo = ["onClick"], Qo = ["for"], $o = ["id"], es = /* @__PURE__ */ f({
|
|
4388
4389
|
__name: "RadioGroup",
|
|
4389
4390
|
props: /*@__PURE__*/ g({
|
|
4390
4391
|
label: {},
|
|
@@ -4413,16 +4414,16 @@ var ho = [
|
|
|
4413
4414
|
e.target.closest("label") || document.getElementById(t)?.click();
|
|
4414
4415
|
}
|
|
4415
4416
|
let _ = [
|
|
4416
|
-
"mt-0.5 flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border bg-
|
|
4417
|
-
"not-disabled:hover:border-
|
|
4417
|
+
"mt-0.5 flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border bg-surface transition",
|
|
4418
|
+
"not-disabled:hover:border-ink disabled:cursor-not-allowed",
|
|
4418
4419
|
"data-[state=checked]:border-primary data-[state=checked]:hover:border-primary",
|
|
4419
4420
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4420
4421
|
];
|
|
4421
|
-
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-
|
|
4422
|
-
c("div",
|
|
4422
|
+
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", r.class)) }, [
|
|
4423
|
+
c("div", Jo, [c("div", Yo, [c("span", {
|
|
4423
4424
|
id: f,
|
|
4424
4425
|
class: "text-sm"
|
|
4425
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4426
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Ea, {
|
|
4426
4427
|
key: 0,
|
|
4427
4428
|
text: e.helper,
|
|
4428
4429
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -4430,8 +4431,8 @@ var ho = [
|
|
|
4430
4431
|
key: 0,
|
|
4431
4432
|
id: p,
|
|
4432
4433
|
hidden: e.helperPlacement === "icon",
|
|
4433
|
-
class: "text-xs text-
|
|
4434
|
-
}, j(e.helper), 9,
|
|
4434
|
+
class: "text-xs text-ink/65"
|
|
4435
|
+
}, j(e.helper), 9, Xo)) : o("", !0)]),
|
|
4435
4436
|
d(M(qt), {
|
|
4436
4437
|
modelValue: l.value,
|
|
4437
4438
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -4451,7 +4452,7 @@ var ho = [
|
|
|
4451
4452
|
value: t.value,
|
|
4452
4453
|
disabled: t.disabled,
|
|
4453
4454
|
"aria-describedby": t.description ? `${M(u)}-${n}-description` : void 0,
|
|
4454
|
-
class: y(M(X)(_, e.errorText ? "border-red" : "border-
|
|
4455
|
+
class: y(M(X)(_, e.errorText ? "border-red" : "border-ink/45", t.disabled && !e.disabled && "opacity-40"))
|
|
4455
4456
|
}, {
|
|
4456
4457
|
default: V(() => [d(M(Gt), { class: "size-2 rounded-full bg-primary" })]),
|
|
4457
4458
|
_: 1
|
|
@@ -4467,11 +4468,11 @@ var ho = [
|
|
|
4467
4468
|
}, [c("label", {
|
|
4468
4469
|
for: `${M(u)}-${n}`,
|
|
4469
4470
|
class: y(M(X)("text-sm", e.disabled || t.disabled ? "cursor-not-allowed" : "cursor-pointer"))
|
|
4470
|
-
}, j(t.label), 11,
|
|
4471
|
+
}, j(t.label), 11, Qo), t.description ? (w(), s("p", {
|
|
4471
4472
|
key: 0,
|
|
4472
4473
|
id: `${M(u)}-${n}-description`,
|
|
4473
|
-
class: "text-xs text-
|
|
4474
|
-
}, j(t.description), 9,
|
|
4474
|
+
class: "text-xs text-ink/65"
|
|
4475
|
+
}, j(t.description), 9, $o)) : o("", !0)], 10, Zo)]))), 128))]),
|
|
4475
4476
|
_: 1
|
|
4476
4477
|
}, 8, [
|
|
4477
4478
|
"modelValue",
|
|
@@ -4481,14 +4482,14 @@ var ho = [
|
|
|
4481
4482
|
"aria-describedby",
|
|
4482
4483
|
"aria-invalid"
|
|
4483
4484
|
]),
|
|
4484
|
-
d(
|
|
4485
|
+
d(ka, {
|
|
4485
4486
|
id: m,
|
|
4486
4487
|
status: e.errorText ? "error" : void 0,
|
|
4487
4488
|
text: e.errorText
|
|
4488
4489
|
}, null, 8, ["status", "text"])
|
|
4489
4490
|
], 2));
|
|
4490
4491
|
}
|
|
4491
|
-
}),
|
|
4492
|
+
}), ts = { class: "flex items-start gap-2" }, ns = "size-4 rounded-full bg-white shadow-sm transition-transform data-[state=checked]:translate-x-4 motion-reduce:transition-none", rs = /* @__PURE__ */ f({
|
|
4492
4493
|
__name: "Switch",
|
|
4493
4494
|
props: /*@__PURE__*/ g({
|
|
4494
4495
|
label: {},
|
|
@@ -4521,11 +4522,11 @@ var ho = [
|
|
|
4521
4522
|
}
|
|
4522
4523
|
let g = [
|
|
4523
4524
|
"inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full p-0.5 transition-colors",
|
|
4524
|
-
"bg-
|
|
4525
|
+
"bg-ink/45 not-disabled:hover:bg-ink/55 data-[state=checked]:bg-primary data-[state=checked]:hover:bg-primary",
|
|
4525
4526
|
"disabled:cursor-not-allowed",
|
|
4526
4527
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus"
|
|
4527
4528
|
];
|
|
4528
|
-
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-
|
|
4529
|
+
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-ink", e.disabled && "opacity-40", t.class)) }, [c("div", ts, [d(M(sn), {
|
|
4529
4530
|
id: a,
|
|
4530
4531
|
modelValue: n.value,
|
|
4531
4532
|
"onUpdate:modelValue": i[0] ||= (e) => n.value = e,
|
|
@@ -4535,7 +4536,7 @@ var ho = [
|
|
|
4535
4536
|
"aria-describedby": m.value,
|
|
4536
4537
|
class: y(g)
|
|
4537
4538
|
}, {
|
|
4538
|
-
default: V(() => [d(M(cn), { class: y(
|
|
4539
|
+
default: V(() => [d(M(cn), { class: y(ns) })]),
|
|
4539
4540
|
_: 1
|
|
4540
4541
|
}, 8, [
|
|
4541
4542
|
"modelValue",
|
|
@@ -4552,20 +4553,20 @@ var ho = [
|
|
|
4552
4553
|
}, j(e.label), 3), e.description ? (w(), s("p", {
|
|
4553
4554
|
key: 0,
|
|
4554
4555
|
id: l,
|
|
4555
|
-
class: "text-xs text-
|
|
4556
|
-
}, j(e.description), 1)) : o("", !0)], 2)]), d(
|
|
4556
|
+
class: "text-xs text-ink/65"
|
|
4557
|
+
}, j(e.description), 1)) : o("", !0)], 2)]), d(ka, {
|
|
4557
4558
|
id: u,
|
|
4558
4559
|
status: f.value,
|
|
4559
4560
|
text: p.value
|
|
4560
4561
|
}, null, 8, ["status", "text"])], 2));
|
|
4561
4562
|
}
|
|
4562
|
-
}),
|
|
4563
|
+
}), is = [
|
|
4563
4564
|
"id",
|
|
4564
4565
|
"placeholder",
|
|
4565
4566
|
"disabled",
|
|
4566
4567
|
"aria-invalid",
|
|
4567
4568
|
"aria-describedby"
|
|
4568
|
-
],
|
|
4569
|
+
], as = /* @__PURE__ */ f({
|
|
4569
4570
|
inheritAttrs: !1,
|
|
4570
4571
|
__name: "InputTextArea",
|
|
4571
4572
|
props: /*@__PURE__*/ g({
|
|
@@ -4593,7 +4594,7 @@ var ho = [
|
|
|
4593
4594
|
emits: ["update:modelValue"],
|
|
4594
4595
|
setup(e, { expose: t }) {
|
|
4595
4596
|
let n = e, { t: r } = K(), o = F(e, "modelValue"), s = i(() => n.maxLength !== void 0 && o.value.length > n.maxLength ? r("ui.input.maxLength", { count: n.maxLength }) : void 0), l = i(() => n.status ?? (s.value ? "error" : void 0)), u = i(() => n.statusText ?? s.value), d = E();
|
|
4596
|
-
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a(
|
|
4597
|
+
return t({ focus: () => d.value?.focus() }), (t, r) => (w(), a(Pa, {
|
|
4597
4598
|
label: e.label,
|
|
4598
4599
|
helper: e.helper,
|
|
4599
4600
|
"helper-placement": e.helperPlacement,
|
|
@@ -4614,8 +4615,8 @@ var ho = [
|
|
|
4614
4615
|
disabled: e.disabled,
|
|
4615
4616
|
"aria-invalid": a,
|
|
4616
4617
|
"aria-describedby": i,
|
|
4617
|
-
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-
|
|
4618
|
-
}), null, 16,
|
|
4618
|
+
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"
|
|
4619
|
+
}), null, 16, is), [[R, o.value]])]),
|
|
4619
4620
|
_: 1
|
|
4620
4621
|
}, 8, [
|
|
4621
4622
|
"label",
|
|
@@ -4629,7 +4630,7 @@ var ho = [
|
|
|
4629
4630
|
"class"
|
|
4630
4631
|
]));
|
|
4631
4632
|
}
|
|
4632
|
-
}),
|
|
4633
|
+
}), os = { class: "flex items-center gap-1" }, ss = ["hidden"], cs = ["aria-describedby", "aria-invalid"], ls = /* @__PURE__ */ f({
|
|
4633
4634
|
__name: "CheckboxGroup",
|
|
4634
4635
|
props: /*@__PURE__*/ g({
|
|
4635
4636
|
label: {},
|
|
@@ -4656,11 +4657,11 @@ var ho = [
|
|
|
4656
4657
|
function g(e, t) {
|
|
4657
4658
|
l.value = t ? [...l.value, e] : l.value.filter((t) => t !== e);
|
|
4658
4659
|
}
|
|
4659
|
-
return (i, u) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-
|
|
4660
|
-
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
4660
|
+
return (i, u) => (w(), s("div", { class: y(M(X)("flex flex-col gap-1.5 text-ink", t.class)) }, [
|
|
4661
|
+
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", os, [c("span", {
|
|
4661
4662
|
id: f,
|
|
4662
4663
|
class: "text-sm"
|
|
4663
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4664
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Ea, {
|
|
4664
4665
|
key: 0,
|
|
4665
4666
|
text: e.helper,
|
|
4666
4667
|
label: M(r)("ui.formField.about", { label: e.label })
|
|
@@ -4668,15 +4669,15 @@ var ho = [
|
|
|
4668
4669
|
key: 0,
|
|
4669
4670
|
id: p,
|
|
4670
4671
|
hidden: e.helperPlacement === "icon",
|
|
4671
|
-
class: "text-xs text-
|
|
4672
|
-
}, j(e.helper), 9,
|
|
4672
|
+
class: "text-xs text-ink/65"
|
|
4673
|
+
}, j(e.helper), 9, ss)) : o("", !0)], 2),
|
|
4673
4674
|
c("div", {
|
|
4674
4675
|
role: "group",
|
|
4675
4676
|
"aria-labelledby": f,
|
|
4676
4677
|
"aria-describedby": h.value,
|
|
4677
4678
|
"aria-invalid": e.errorText ? !0 : void 0,
|
|
4678
4679
|
class: "flex flex-col gap-3"
|
|
4679
|
-
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(
|
|
4680
|
+
}, [(w(!0), s(n, null, D(e.options, (t) => (w(), a(qo, {
|
|
4680
4681
|
key: String(t.value),
|
|
4681
4682
|
"model-value": l.value.includes(t.value),
|
|
4682
4683
|
label: t.label,
|
|
@@ -4689,15 +4690,15 @@ var ho = [
|
|
|
4689
4690
|
"description",
|
|
4690
4691
|
"disabled",
|
|
4691
4692
|
"onUpdate:modelValue"
|
|
4692
|
-
]))), 128))], 8,
|
|
4693
|
-
d(
|
|
4693
|
+
]))), 128))], 8, cs),
|
|
4694
|
+
d(ka, {
|
|
4694
4695
|
id: m,
|
|
4695
4696
|
status: e.errorText ? "error" : void 0,
|
|
4696
4697
|
text: e.errorText
|
|
4697
4698
|
}, null, 8, ["status", "text"])
|
|
4698
4699
|
], 2));
|
|
4699
4700
|
}
|
|
4700
|
-
}),
|
|
4701
|
+
}), us = /* @__PURE__ */ f({
|
|
4701
4702
|
__name: "LanguageSwitcher",
|
|
4702
4703
|
props: {
|
|
4703
4704
|
label: {},
|
|
@@ -4727,7 +4728,7 @@ var ho = [
|
|
|
4727
4728
|
label: s(e),
|
|
4728
4729
|
value: e
|
|
4729
4730
|
})));
|
|
4730
|
-
return (i, o) => (w(), a(
|
|
4731
|
+
return (i, o) => (w(), a(Go, {
|
|
4731
4732
|
modelValue: M(r),
|
|
4732
4733
|
"onUpdate:modelValue": o[0] ||= (e) => h(r) ? r.value = e : null,
|
|
4733
4734
|
label: e.label ?? M(n)("ui.languageSwitcher.label"),
|
|
@@ -4747,7 +4748,7 @@ var ho = [
|
|
|
4747
4748
|
"class"
|
|
4748
4749
|
]));
|
|
4749
4750
|
}
|
|
4750
|
-
}),
|
|
4751
|
+
}), ds = { class: "flex items-center gap-1" }, fs = ["hidden"], ps = { class: "flex min-w-0 flex-1 flex-col gap-0.5" }, ms = { class: "text-sm font-bold" }, hs = ["id"], gs = /* @__PURE__ */ f({
|
|
4751
4752
|
__name: "CardSelect",
|
|
4752
4753
|
props: /*@__PURE__*/ g({
|
|
4753
4754
|
label: {},
|
|
@@ -4782,18 +4783,18 @@ var ho = [
|
|
|
4782
4783
|
default: return "grid-cols-[repeat(auto-fit,minmax(min(10rem,100%),1fr))]";
|
|
4783
4784
|
}
|
|
4784
4785
|
}), _ = [
|
|
4785
|
-
"group relative flex w-full cursor-pointer items-start gap-3 rounded-lg border border-
|
|
4786
|
+
"group relative flex w-full cursor-pointer items-start gap-3 rounded-lg border border-ink/10 bg-surface p-3 pt-2.5 text-left text-ink shadow-xs transition-colors",
|
|
4786
4787
|
"outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus",
|
|
4787
|
-
"not-disabled:not-data-[state=checked]:hover:bg-surface-
|
|
4788
|
+
"not-disabled:not-data-[state=checked]:hover:bg-surface-hover",
|
|
4788
4789
|
"data-[state=checked]:border-primary data-[state=checked]:bg-primary/6 data-[state=checked]:shadow-[inset_0_0_0_1px_var(--color-primary)]",
|
|
4789
4790
|
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
4790
4791
|
"motion-reduce:transition-none"
|
|
4791
4792
|
];
|
|
4792
|
-
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-2 text-
|
|
4793
|
-
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div",
|
|
4793
|
+
return (i, v) => (w(), s("div", { class: y(M(X)("flex flex-col gap-2 text-ink", e.disabled && "opacity-40", r.class)) }, [
|
|
4794
|
+
c("div", { class: y(M(X)("flex flex-col gap-0.5", e.hideLabel && "sr-only")) }, [c("div", ds, [c("span", {
|
|
4794
4795
|
id: f,
|
|
4795
4796
|
class: "text-sm"
|
|
4796
|
-
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(
|
|
4797
|
+
}, j(e.label), 1), e.helper && e.helperPlacement === "icon" ? (w(), a(Ea, {
|
|
4797
4798
|
key: 0,
|
|
4798
4799
|
text: e.helper,
|
|
4799
4800
|
label: M(t)("ui.formField.about", { label: e.label })
|
|
@@ -4801,8 +4802,8 @@ var ho = [
|
|
|
4801
4802
|
key: 0,
|
|
4802
4803
|
id: p,
|
|
4803
4804
|
hidden: e.helperPlacement === "icon",
|
|
4804
|
-
class: "text-xs text-
|
|
4805
|
-
}, j(e.helper), 9,
|
|
4805
|
+
class: "text-xs text-ink/65"
|
|
4806
|
+
}, j(e.helper), 9, fs)) : o("", !0)], 2),
|
|
4806
4807
|
d(M(qt), {
|
|
4807
4808
|
modelValue: l.value,
|
|
4808
4809
|
"onUpdate:modelValue": v[0] ||= (e) => l.value = e,
|
|
@@ -4826,16 +4827,16 @@ var ho = [
|
|
|
4826
4827
|
t.icon ? (w(), a(k(t.icon), {
|
|
4827
4828
|
key: 0,
|
|
4828
4829
|
"aria-hidden": "true",
|
|
4829
|
-
class: "mt-0.5 size-4 shrink-0 text-
|
|
4830
|
+
class: "mt-0.5 size-4 shrink-0 text-ink/65 group-data-[state=checked]:text-primary-fg"
|
|
4830
4831
|
})) : o("", !0),
|
|
4831
|
-
c("span",
|
|
4832
|
+
c("span", ps, [c("span", ms, j(t.title), 1), t.description ? (w(), s("span", {
|
|
4832
4833
|
key: 0,
|
|
4833
4834
|
id: `${M(u)}-${n}-description`,
|
|
4834
|
-
class: "text-xs text-
|
|
4835
|
-
}, j(t.description), 9,
|
|
4835
|
+
class: "text-xs text-ink/65"
|
|
4836
|
+
}, j(t.description), 9, hs)) : o("", !0)]),
|
|
4836
4837
|
v[1] ||= c("span", {
|
|
4837
4838
|
"aria-hidden": "true",
|
|
4838
|
-
class: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border border-
|
|
4839
|
+
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"
|
|
4839
4840
|
}, [c("span", { class: "size-2 scale-0 rounded-full bg-primary transition-transform group-data-[state=checked]:scale-100 motion-reduce:transition-none" })], -1)
|
|
4840
4841
|
]),
|
|
4841
4842
|
_: 2
|
|
@@ -4856,14 +4857,14 @@ var ho = [
|
|
|
4856
4857
|
"aria-invalid",
|
|
4857
4858
|
"class"
|
|
4858
4859
|
]),
|
|
4859
|
-
d(
|
|
4860
|
+
d(ka, {
|
|
4860
4861
|
id: m,
|
|
4861
4862
|
status: e.errorText ? "error" : void 0,
|
|
4862
4863
|
text: e.errorText
|
|
4863
4864
|
}, null, 8, ["status", "text"])
|
|
4864
4865
|
], 2));
|
|
4865
4866
|
}
|
|
4866
|
-
}),
|
|
4867
|
+
}), _s = /* @__PURE__ */ f({
|
|
4867
4868
|
__name: "EmptyState",
|
|
4868
4869
|
props: {
|
|
4869
4870
|
title: {},
|
|
@@ -4898,19 +4899,19 @@ var ho = [
|
|
|
4898
4899
|
return (r, i) => (w(), s("div", { class: y(M(X)("flex flex-col items-center text-center", n[e.size].root, t.class)) }, [
|
|
4899
4900
|
e.icon ? (w(), s("div", {
|
|
4900
4901
|
key: 0,
|
|
4901
|
-
class: y(M(X)("flex text-
|
|
4902
|
+
class: y(M(X)("flex text-ink/45", e.size === "md" && "mb-1", e.ui?.icon)),
|
|
4902
4903
|
"aria-hidden": "true"
|
|
4903
4904
|
}, [(w(), a(k(e.icon), { class: y(n[e.size].icon) }, null, 8, ["class"]))], 2)) : o("", !0),
|
|
4904
4905
|
r.$slots.title || e.title ? (w(), a(k(e.headingLevel ? `h${e.headingLevel}` : "p"), {
|
|
4905
4906
|
key: 1,
|
|
4906
|
-
class: y(M(X)("font-bold text-
|
|
4907
|
+
class: y(M(X)("font-bold text-ink", n[e.size].title, e.ui?.title))
|
|
4907
4908
|
}, {
|
|
4908
4909
|
default: V(() => [O(r.$slots, "title", {}, () => [u(j(e.title), 1)])]),
|
|
4909
4910
|
_: 3
|
|
4910
4911
|
}, 8, ["class"])) : o("", !0),
|
|
4911
4912
|
r.$slots.description || e.description ? (w(), s("p", {
|
|
4912
4913
|
key: 2,
|
|
4913
|
-
class: y(M(X)("max-w-sm text-
|
|
4914
|
+
class: y(M(X)("max-w-sm text-ink/65", n[e.size].description, e.ui?.description))
|
|
4914
4915
|
}, [O(r.$slots, "description", {}, () => [u(j(e.description), 1)])], 2)) : o("", !0),
|
|
4915
4916
|
O(r.$slots, "default"),
|
|
4916
4917
|
r.$slots.actions ? (w(), s("div", {
|
|
@@ -4919,15 +4920,15 @@ var ho = [
|
|
|
4919
4920
|
}, [O(r.$slots, "actions")], 2)) : o("", !0)
|
|
4920
4921
|
], 2));
|
|
4921
4922
|
}
|
|
4922
|
-
}),
|
|
4923
|
+
}), vs = new Intl.Collator("en-GB", {
|
|
4923
4924
|
numeric: !0,
|
|
4924
4925
|
sensitivity: "base"
|
|
4925
4926
|
});
|
|
4926
|
-
function
|
|
4927
|
+
function ys(e, t) {
|
|
4927
4928
|
let n = e == null || e === "", r = t == null || t === "";
|
|
4928
|
-
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) :
|
|
4929
|
+
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) : vs.compare(String(e), String(t));
|
|
4929
4930
|
}
|
|
4930
|
-
function
|
|
4931
|
+
function bs(e, t, n) {
|
|
4931
4932
|
let r = n && t.find((e) => e.key === n.key);
|
|
4932
4933
|
if (!n || !r) return [...e];
|
|
4933
4934
|
let i = r.sortValue ?? ((e) => e[r.key]), a = n.direction === "asc" ? 1 : -1;
|
|
@@ -4937,10 +4938,10 @@ function ys(e, t, n) {
|
|
|
4937
4938
|
value: i(e)
|
|
4938
4939
|
})).sort((e, t) => {
|
|
4939
4940
|
let n = e.value === null || e.value === void 0 || e.value === "", r = t.value === null || t.value === void 0 || t.value === "";
|
|
4940
|
-
return (n || r ?
|
|
4941
|
+
return (n || r ? ys(e.value, t.value) : a * ys(e.value, t.value)) || e.index - t.index;
|
|
4941
4942
|
}).map((e) => e.row);
|
|
4942
4943
|
}
|
|
4943
|
-
function
|
|
4944
|
+
function xs(e, t) {
|
|
4944
4945
|
return e?.key === t ? e.direction === "asc" ? {
|
|
4945
4946
|
key: t,
|
|
4946
4947
|
direction: "desc"
|
|
@@ -4950,24 +4951,24 @@ function bs(e, t) {
|
|
|
4950
4951
|
};
|
|
4951
4952
|
}
|
|
4952
4953
|
// src/components/Table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
4953
|
-
var
|
|
4954
|
+
var Ss = [
|
|
4954
4955
|
"tabindex",
|
|
4955
4956
|
"role",
|
|
4956
4957
|
"aria-labelledby",
|
|
4957
4958
|
"aria-label"
|
|
4958
|
-
],
|
|
4959
|
+
], Cs = ["aria-busy"], ws = {
|
|
4959
4960
|
key: 1,
|
|
4960
4961
|
class: "sr-only"
|
|
4961
|
-
},
|
|
4962
|
+
}, Ts = ["aria-sort"], Es = {
|
|
4962
4963
|
key: 0,
|
|
4963
4964
|
class: "sr-only"
|
|
4964
|
-
},
|
|
4965
|
+
}, Ds = ["onClick"], Os = { key: 0 }, ks = ["colspan"], As = {
|
|
4965
4966
|
key: 0,
|
|
4966
4967
|
class: "inline-flex items-center gap-2"
|
|
4967
|
-
},
|
|
4968
|
+
}, js = ["onClick"], Ms = {
|
|
4968
4969
|
key: 1,
|
|
4969
4970
|
"aria-hidden": "true"
|
|
4970
|
-
},
|
|
4971
|
+
}, Ns = ["colspan"], Ps = "relative z-1 w-0 cursor-pointer", Fs = "absolute inset-0 outline-none", Is = "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Ls = "outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Rs = /* @__PURE__ */ f({
|
|
4971
4972
|
__name: "Table",
|
|
4972
4973
|
props: /*@__PURE__*/ g({
|
|
4973
4974
|
columns: {},
|
|
@@ -5017,7 +5018,7 @@ var xs = [
|
|
|
5017
5018
|
function T(e, t) {
|
|
5018
5019
|
e.target.closest("button, label, .sr-only") || t();
|
|
5019
5020
|
}
|
|
5020
|
-
let A = i(() => r.columns.length + +!!r.selectable), N = i(() => r.manualSort ? r.rows :
|
|
5021
|
+
let A = i(() => r.columns.length + +!!r.selectable), N = i(() => r.manualSort ? r.rows : bs(r.rows, r.columns, l.value));
|
|
5021
5022
|
function I(e, t) {
|
|
5022
5023
|
return typeof r.rowKey == "function" ? r.rowKey(e, t) : r.rowKey ? e[r.rowKey] : t;
|
|
5023
5024
|
}
|
|
@@ -5034,7 +5035,7 @@ var xs = [
|
|
|
5034
5035
|
"after:absolute after:inset-0 after:outline-2 after:-outline-offset-2 after:outline-transparent",
|
|
5035
5036
|
"focus-visible:after:outline-focus forced-colors:not-focus-visible:after:outline-0"
|
|
5036
5037
|
], H = [
|
|
5037
|
-
"cursor-pointer hover:bg-
|
|
5038
|
+
"cursor-pointer hover:bg-hover has-[[data-row-link]:focus-visible]:bg-hover",
|
|
5038
5039
|
"[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:relative",
|
|
5039
5040
|
"[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:z-1"
|
|
5040
5041
|
], U = i(() => {
|
|
@@ -5054,13 +5055,13 @@ var xs = [
|
|
|
5054
5055
|
}), S(() => q?.disconnect()), (i, f) => (w(), s("div", {
|
|
5055
5056
|
ref_key: "scroller",
|
|
5056
5057
|
ref: W,
|
|
5057
|
-
class: y(M(X)("relative overflow-auto", G.value &&
|
|
5058
|
+
class: y(M(X)("relative overflow-auto", G.value && Ls, r.class)),
|
|
5058
5059
|
tabindex: G.value ? 0 : void 0,
|
|
5059
5060
|
role: G.value ? "region" : void 0,
|
|
5060
5061
|
"aria-labelledby": G.value && (e.caption || i.$slots.caption) ? p : void 0,
|
|
5061
5062
|
"aria-label": G.value && !e.caption && !i.$slots.caption ? M(t)("ui.table.table") : void 0
|
|
5062
5063
|
}, [c("table", {
|
|
5063
|
-
class: y(M(X)("w-full border-separate border-spacing-0 text-left text-sm text-
|
|
5064
|
+
class: y(M(X)("w-full border-separate border-spacing-0 text-left text-sm text-ink", e.ui?.table)),
|
|
5064
5065
|
"aria-busy": e.loading || void 0
|
|
5065
5066
|
}, [
|
|
5066
5067
|
e.caption || i.$slots.caption ? (w(), s("caption", {
|
|
@@ -5068,27 +5069,27 @@ var xs = [
|
|
|
5068
5069
|
id: p,
|
|
5069
5070
|
class: y(e.showCaption ? M(X)("px-4 pt-4 pb-2 text-left text-base font-bold", e.inset && "sm:px-6") : "sr-only")
|
|
5070
5071
|
}, [O(i.$slots, "caption", {}, () => [u(j(e.caption), 1)])], 2)) : o("", !0),
|
|
5071
|
-
c("thead", { class: y(M(X)(e.stickyHeader && "sticky top-0 z-10 bg-
|
|
5072
|
+
c("thead", { class: y(M(X)(e.stickyHeader && "sticky top-0 z-10 bg-surface", e.ui?.header)) }, [c("tr", null, [e.selectable ? (w(), s("th", {
|
|
5072
5073
|
key: 0,
|
|
5073
5074
|
scope: "col",
|
|
5074
|
-
class: y(M(X)("border-b border-
|
|
5075
|
+
class: y(M(X)("border-b border-ink/10", U.value, h.value.length && Ps)),
|
|
5075
5076
|
onClick: f[1] ||= (e) => T(e, () => h.value.length && x(b.value !== !0))
|
|
5076
|
-
}, [h.value.length ? (w(), a(
|
|
5077
|
+
}, [h.value.length ? (w(), a(qo, {
|
|
5077
5078
|
key: 0,
|
|
5078
5079
|
"model-value": b.value,
|
|
5079
5080
|
label: M(t)("ui.table.selectAll"),
|
|
5080
5081
|
"hide-label": "",
|
|
5081
5082
|
"onUpdate:modelValue": f[0] ||= (e) => x(e === !0)
|
|
5082
|
-
}, null, 8, ["model-value", "label"])) : (w(), s("span",
|
|
5083
|
+
}, null, 8, ["model-value", "label"])) : (w(), s("span", ws, j(M(t)("ui.table.select")), 1))], 2)) : o("", !0), (w(!0), s(n, null, D(e.columns, (e) => (w(), s("th", {
|
|
5083
5084
|
key: e.key,
|
|
5084
5085
|
scope: "col",
|
|
5085
5086
|
"aria-sort": L(e),
|
|
5086
|
-
class: y(M(X)("border-b border-
|
|
5087
|
-
}, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span",
|
|
5087
|
+
class: y(M(X)("border-b border-ink/10 font-bold text-ink/65", U.value, ee(e)))
|
|
5088
|
+
}, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span", Es, j(e.label), 1)) : e.sortable ? (w(), s("button", {
|
|
5088
5089
|
key: 1,
|
|
5089
5090
|
type: "button",
|
|
5090
|
-
class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-
|
|
5091
|
-
onClick: (t) => l.value = M(
|
|
5091
|
+
class: y(M(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", Is)),
|
|
5092
|
+
onClick: (t) => l.value = M(xs)(l.value, e.key)
|
|
5092
5093
|
}, [u(j(e.label) + " ", 1), l.value?.key === e.key && l.value.direction === "asc" ? (w(), a(M(ie), {
|
|
5093
5094
|
key: 0,
|
|
5094
5095
|
class: "size-4 shrink-0",
|
|
@@ -5099,26 +5100,26 @@ var xs = [
|
|
|
5099
5100
|
"aria-hidden": "true"
|
|
5100
5101
|
})) : (w(), a(M(he), {
|
|
5101
5102
|
key: 2,
|
|
5102
|
-
class: "size-4 shrink-0 text-
|
|
5103
|
+
class: "size-4 shrink-0 text-ink/40",
|
|
5103
5104
|
"aria-hidden": "true"
|
|
5104
|
-
}))], 10,
|
|
5105
|
+
}))], 10, Ds)) : (w(), s(n, { key: 2 }, [u(j(e.label), 1)], 64))])], 10, Ts))), 128))])], 2),
|
|
5105
5106
|
c("tbody", { class: y(M(X)(e.loading && N.value.length && "opacity-50 transition-opacity")) }, [
|
|
5106
|
-
N.value.length ? o("", !0) : (w(), s("tr",
|
|
5107
|
+
N.value.length ? o("", !0) : (w(), s("tr", Os, [c("td", {
|
|
5107
5108
|
colspan: A.value,
|
|
5108
|
-
class: "px-4 py-8 text-center text-
|
|
5109
|
-
}, [e.loading ? (w(), s("span",
|
|
5109
|
+
class: "px-4 py-8 text-center text-ink/65"
|
|
5110
|
+
}, [e.loading ? (w(), s("span", As, [d(Gn, { size: "sm" }), f[2] ||= u(" Loading… ", -1)])) : O(i.$slots, "empty", {}, () => [d(_s, {
|
|
5110
5111
|
size: "sm",
|
|
5111
5112
|
description: e.emptyText ?? M(t)("ui.table.empty"),
|
|
5112
5113
|
class: "p-0"
|
|
5113
|
-
}, null, 8, ["description"])], void 0, 1)], 8,
|
|
5114
|
+
}, null, 8, ["description"])], void 0, 1)], 8, ks)])),
|
|
5114
5115
|
(w(!0), s(n, null, D(N.value, (r, c) => (w(), s("tr", {
|
|
5115
5116
|
key: I(r, c),
|
|
5116
5117
|
class: y(M(X)("group/row", z(r, c) && H, e.ui?.row))
|
|
5117
5118
|
}, [e.selectable ? (w(), s("td", {
|
|
5118
5119
|
key: 0,
|
|
5119
|
-
class: y(M(X)("border-b border-
|
|
5120
|
+
class: y(M(X)("border-b border-ink/10 align-middle", !e.inset && "group-last/row:border-b-0", U.value, m(r) && Ps)),
|
|
5120
5121
|
onClick: (e) => m(r) && T(e, () => v(r, c, !g(r, c)))
|
|
5121
|
-
}, [m(r) ? (w(), a(
|
|
5122
|
+
}, [m(r) ? (w(), a(qo, {
|
|
5122
5123
|
key: 0,
|
|
5123
5124
|
"model-value": g(r, c),
|
|
5124
5125
|
label: e.rowLabel ? e.rowLabel(r, c) : M(t)("ui.table.selectRow", { n: c + 1 }),
|
|
@@ -5128,10 +5129,10 @@ var xs = [
|
|
|
5128
5129
|
"model-value",
|
|
5129
5130
|
"label",
|
|
5130
5131
|
"onUpdate:modelValue"
|
|
5131
|
-
])) : o("", !0)], 10,
|
|
5132
|
+
])) : o("", !0)], 10, js)) : o("", !0), (w(!0), s(n, null, D(e.columns, (t) => (w(), a(k(t.rowHeader ? "th" : "td"), {
|
|
5132
5133
|
key: t.key,
|
|
5133
5134
|
scope: t.rowHeader ? "row" : void 0,
|
|
5134
|
-
class: y(M(X)("border-b border-
|
|
5135
|
+
class: y(M(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", U.value, z(r, c) && "relative", ee(t)))
|
|
5135
5136
|
}, {
|
|
5136
5137
|
default: V(() => [t.key !== R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
|
|
5137
5138
|
key: 0,
|
|
@@ -5140,7 +5141,7 @@ var xs = [
|
|
|
5140
5141
|
"data-row-overlay": "",
|
|
5141
5142
|
tabindex: "-1",
|
|
5142
5143
|
"aria-hidden": "true",
|
|
5143
|
-
class:
|
|
5144
|
+
class: Fs
|
|
5144
5145
|
}), null, 16)) : o("", !0), t.key === R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
|
|
5145
5146
|
key: 1,
|
|
5146
5147
|
ref_for: !0
|
|
@@ -5161,33 +5162,33 @@ var xs = [
|
|
|
5161
5162
|
}, () => [u(j(r[t.key] ?? ""), 1)], void 0, 2)]),
|
|
5162
5163
|
_: 2
|
|
5163
5164
|
}, 1032, ["scope", "class"]))), 128))], 2))), 128)),
|
|
5164
|
-
e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr",
|
|
5165
|
+
e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr", Ms, [c("td", {
|
|
5165
5166
|
colspan: A.value,
|
|
5166
5167
|
class: "h-2 p-0 sm:h-4"
|
|
5167
|
-
}, null, 8,
|
|
5168
|
+
}, null, 8, Ns)])) : o("", !0)
|
|
5168
5169
|
], 2),
|
|
5169
5170
|
i.$slots.footer ? (w(), s("tfoot", {
|
|
5170
5171
|
key: 1,
|
|
5171
|
-
class: y(M(X)("font-bold *:*:border-t *:*:border-
|
|
5172
|
+
class: y(M(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"))
|
|
5172
5173
|
}, [O(i.$slots, "footer")], 2)) : o("", !0)
|
|
5173
|
-
], 10,
|
|
5174
|
+
], 10, Cs)], 10, Ss));
|
|
5174
5175
|
}
|
|
5175
|
-
}),
|
|
5176
|
+
}), zs = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" }, Bs = { class: "text-2xl font-bold tabular-nums" }, Vs = {
|
|
5176
5177
|
key: 1,
|
|
5177
5178
|
class: "sr-only"
|
|
5178
|
-
},
|
|
5179
|
+
}, Hs = {
|
|
5179
5180
|
key: 2,
|
|
5180
5181
|
class: "font-bold tabular-nums"
|
|
5181
|
-
}, Hs = {
|
|
5182
|
-
key: 3,
|
|
5183
|
-
class: "text-black/65"
|
|
5184
5182
|
}, Us = {
|
|
5185
|
-
key:
|
|
5186
|
-
class: "text-
|
|
5183
|
+
key: 3,
|
|
5184
|
+
class: "text-ink/65"
|
|
5187
5185
|
}, Ws = {
|
|
5186
|
+
key: 1,
|
|
5187
|
+
class: "text-sm text-ink/65"
|
|
5188
|
+
}, Gs = {
|
|
5188
5189
|
key: 2,
|
|
5189
5190
|
class: "mt-2 text-sm"
|
|
5190
|
-
},
|
|
5191
|
+
}, Ks = /* @__PURE__ */ f({
|
|
5191
5192
|
__name: "StatTile",
|
|
5192
5193
|
props: {
|
|
5193
5194
|
label: {},
|
|
@@ -5214,9 +5215,9 @@ var xs = [
|
|
|
5214
5215
|
let r = i(() => !!(n.href || n.as));
|
|
5215
5216
|
B(() => {});
|
|
5216
5217
|
let l = i(() => n.sentiment ? n.sentiment : n.trend === "up" ? "positive" : n.trend === "down" ? "negative" : "neutral"), f = {
|
|
5217
|
-
positive: "text-green",
|
|
5218
|
-
negative: "text-red",
|
|
5219
|
-
neutral: "text-
|
|
5218
|
+
positive: "text-green-fg",
|
|
5219
|
+
negative: "text-red-fg",
|
|
5220
|
+
neutral: "text-ink/65"
|
|
5220
5221
|
}, p = i(() => n.trend === "up" ? ae : n.trend === "down" ? te : n.trend === "flat" ? re : void 0), m = i(() => ({
|
|
5221
5222
|
up: t("ui.statTile.up"),
|
|
5222
5223
|
down: t("ui.statTile.down"),
|
|
@@ -5227,23 +5228,23 @@ var xs = [
|
|
|
5227
5228
|
href: r.value ? e.href : void 0,
|
|
5228
5229
|
class: y(r.value && "group block h-full cursor-pointer rounded-lg outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus")
|
|
5229
5230
|
}, {
|
|
5230
|
-
default: V(() => [d(
|
|
5231
|
+
default: V(() => [d(da, {
|
|
5231
5232
|
padding: "sm",
|
|
5232
|
-
class: y(M(X)(r.value && "relative h-full transition-[border-color,box-shadow,background-color] duration-150 motion-reduce:transition-none group-hover:border-
|
|
5233
|
+
class: y(M(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)),
|
|
5233
5234
|
ui: { body: "gap-1" }
|
|
5234
5235
|
}, {
|
|
5235
5236
|
default: V(() => [
|
|
5236
5237
|
r.value ? (w(), a(M(ae), {
|
|
5237
5238
|
key: 0,
|
|
5238
|
-
class: "absolute end-4 top-4 size-4 text-
|
|
5239
|
+
class: "absolute end-4 top-4 size-4 text-ink/65",
|
|
5239
5240
|
"aria-hidden": "true"
|
|
5240
5241
|
})) : o("", !0),
|
|
5241
|
-
c("p", { class: y(M(X)("flex items-center gap-2 text-sm text-
|
|
5242
|
+
c("p", { class: y(M(X)("flex items-center gap-2 text-sm text-ink/65", r.value && "pe-6")) }, [e.icon ? (w(), a(k(e.icon), {
|
|
5242
5243
|
key: 0,
|
|
5243
5244
|
class: "size-4 shrink-0",
|
|
5244
5245
|
"aria-hidden": "true"
|
|
5245
5246
|
})) : o("", !0), u(" " + j(e.label), 1)], 2),
|
|
5246
|
-
c("div",
|
|
5247
|
+
c("div", zs, [c("p", Bs, [O(t.$slots, "value", {}, () => [u(j(e.value ?? "—"), 1)])]), e.change || e.trend ? (w(), s("p", {
|
|
5247
5248
|
key: 0,
|
|
5248
5249
|
class: y(M(X)("inline-flex items-center gap-0.5 text-sm", f[l.value]))
|
|
5249
5250
|
}, [
|
|
@@ -5252,12 +5253,12 @@ var xs = [
|
|
|
5252
5253
|
class: "size-4 shrink-0",
|
|
5253
5254
|
"aria-hidden": "true"
|
|
5254
5255
|
})) : o("", !0),
|
|
5255
|
-
e.trend ? (w(), s("span",
|
|
5256
|
-
e.change ? (w(), s("span",
|
|
5257
|
-
e.changeLabel ? (w(), s("span",
|
|
5256
|
+
e.trend ? (w(), s("span", Vs, j(m.value[e.trend]), 1)) : o("", !0),
|
|
5257
|
+
e.change ? (w(), s("span", Hs, j(e.change), 1)) : o("", !0),
|
|
5258
|
+
e.changeLabel ? (w(), s("span", Us, "\xA0" + j(e.changeLabel), 1)) : o("", !0)
|
|
5258
5259
|
], 2)) : o("", !0)]),
|
|
5259
|
-
e.description || t.$slots.description ? (w(), s("p",
|
|
5260
|
-
t.$slots.footer && !r.value ? (w(), s("div",
|
|
5260
|
+
e.description || t.$slots.description ? (w(), s("p", Ws, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0),
|
|
5261
|
+
t.$slots.footer && !r.value ? (w(), s("div", Gs, [O(t.$slots, "footer")])) : o("", !0)
|
|
5261
5262
|
]),
|
|
5262
5263
|
_: 3
|
|
5263
5264
|
}, 8, ["class"])]),
|
|
@@ -5268,19 +5269,19 @@ var xs = [
|
|
|
5268
5269
|
"class"
|
|
5269
5270
|
]));
|
|
5270
5271
|
}
|
|
5271
|
-
}),
|
|
5272
|
+
}), qs = { class: "col-span-2 text-ink/65 @sm:col-span-1" }, Js = { class: "sr-only" }, Ys = {
|
|
5272
5273
|
key: 0,
|
|
5273
|
-
class: "mt-0.5 block text-
|
|
5274
|
-
},
|
|
5274
|
+
class: "mt-0.5 block text-ink/65"
|
|
5275
|
+
}, Xs = {
|
|
5275
5276
|
key: 0,
|
|
5276
5277
|
class: "justify-self-end"
|
|
5277
|
-
},
|
|
5278
|
+
}, Zs = { class: "text-ink/65" }, Qs = { class: "sr-only" }, $s = {
|
|
5278
5279
|
key: 0,
|
|
5279
|
-
class: "mt-0.5 block font-normal text-
|
|
5280
|
-
},
|
|
5280
|
+
class: "mt-0.5 block font-normal text-ink/65"
|
|
5281
|
+
}, ec = {
|
|
5281
5282
|
key: 1,
|
|
5282
5283
|
class: "mt-1 block font-normal"
|
|
5283
|
-
},
|
|
5284
|
+
}, tc = /* @__PURE__ */ f({
|
|
5284
5285
|
__name: "SummaryList",
|
|
5285
5286
|
props: {
|
|
5286
5287
|
items: {},
|
|
@@ -5301,41 +5302,41 @@ var xs = [
|
|
|
5301
5302
|
md: "@sm:grid-cols-[12rem_1fr_auto]",
|
|
5302
5303
|
lg: "@sm:grid-cols-[16rem_1fr_auto]"
|
|
5303
5304
|
};
|
|
5304
|
-
return (l, d) => (w(), s("div", { class: y(M(X)("@container text-sm text-
|
|
5305
|
+
return (l, d) => (w(), s("div", { class: y(M(X)("@container text-sm text-ink", r.class)) }, [c("dl", { class: y(M(X)(e.layout === "rows" && "flex flex-col", e.layout === "compact" && "grid grid-cols-[1fr_auto] gap-x-4 gap-y-2", e.layout === "stacked" && "grid grid-cols-1 gap-x-6 gap-y-4 @sm:grid-cols-2 @2xl:grid-cols-3")) }, [e.layout === "rows" ? (w(!0), s(n, { key: 0 }, D(e.items, (r, f) => (w(), s("div", {
|
|
5305
5306
|
key: r.label,
|
|
5306
|
-
class: y(M(X)("grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-
|
|
5307
|
+
class: y(M(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]))
|
|
5307
5308
|
}, [
|
|
5308
|
-
c("dt",
|
|
5309
|
+
c("dt", qs, j(r.label), 1),
|
|
5309
5310
|
c("dd", { class: y(M(X)("min-w-0 break-words", r.emphasis && "font-bold", !l.$slots.action && "col-span-2")) }, [O(l.$slots, "value", {
|
|
5310
5311
|
item: r,
|
|
5311
5312
|
index: f
|
|
5312
5313
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[0] ||= c("span", {
|
|
5313
|
-
class: "text-
|
|
5314
|
+
class: "text-ink/40",
|
|
5314
5315
|
"aria-hidden": "true"
|
|
5315
|
-
}, "—", -1), c("span",
|
|
5316
|
-
l.$slots.action ? (w(), s("dd",
|
|
5316
|
+
}, "—", -1), c("span", Js, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]), r.description ? (w(), s("span", Ys, j(r.description), 1)) : o("", !0)], 2),
|
|
5317
|
+
l.$slots.action ? (w(), s("dd", Xs, [O(l.$slots, "action", {
|
|
5317
5318
|
item: r,
|
|
5318
5319
|
index: f
|
|
5319
5320
|
})])) : o("", !0)
|
|
5320
5321
|
], 2))), 128)) : (w(!0), s(n, { key: 1 }, D(e.items, (r, a) => (w(), s("div", {
|
|
5321
5322
|
key: r.label,
|
|
5322
5323
|
class: y(e.layout === "compact" ? "col-span-2 grid grid-cols-subgrid items-baseline" : "flex min-w-0 flex-col gap-1")
|
|
5323
|
-
}, [c("dt",
|
|
5324
|
+
}, [c("dt", Zs, j(r.label), 1), c("dd", { class: y(M(X)("min-w-0 break-words", e.layout === "compact" && "text-right font-bold tabular-nums", r.emphasis && "font-bold")) }, [
|
|
5324
5325
|
O(l.$slots, "value", {
|
|
5325
5326
|
item: r,
|
|
5326
5327
|
index: a
|
|
5327
5328
|
}, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[1] ||= c("span", {
|
|
5328
|
-
class: "text-
|
|
5329
|
+
class: "text-ink/40",
|
|
5329
5330
|
"aria-hidden": "true"
|
|
5330
|
-
}, "—", -1), c("span",
|
|
5331
|
-
r.description ? (w(), s("span",
|
|
5332
|
-
l.$slots.action ? (w(), s("span",
|
|
5331
|
+
}, "—", -1), c("span", Qs, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]),
|
|
5332
|
+
r.description ? (w(), s("span", $s, j(r.description), 1)) : o("", !0),
|
|
5333
|
+
l.$slots.action ? (w(), s("span", ec, [O(l.$slots, "action", {
|
|
5333
5334
|
item: r,
|
|
5334
5335
|
index: a
|
|
5335
5336
|
})])) : o("", !0)
|
|
5336
5337
|
], 2)], 2))), 128))], 2)], 2));
|
|
5337
5338
|
}
|
|
5338
|
-
}),
|
|
5339
|
+
}), nc = { class: "flex h-5 shrink-0 items-center" }, rc = { class: "sr-only" }, ic = /* @__PURE__ */ f({
|
|
5339
5340
|
__name: "Checklist",
|
|
5340
5341
|
props: {
|
|
5341
5342
|
items: {},
|
|
@@ -5353,19 +5354,19 @@ var xs = [
|
|
|
5353
5354
|
return (r, i) => (w(), s("ul", { class: y(M(X)("flex flex-col gap-2 text-sm", t.class)) }, [(w(!0), s(n, null, D(e.items, (t) => (w(), s("li", {
|
|
5354
5355
|
key: t.label,
|
|
5355
5356
|
class: "flex items-start gap-2"
|
|
5356
|
-
}, [c("span",
|
|
5357
|
+
}, [c("span", nc, [t.done ? (w(), a(M(ve), {
|
|
5357
5358
|
key: 0,
|
|
5358
|
-
class: "size-4 text-green",
|
|
5359
|
+
class: "size-4 text-green-fg",
|
|
5359
5360
|
"aria-hidden": "true"
|
|
5360
5361
|
})) : (w(), a(M(ge), {
|
|
5361
5362
|
key: 1,
|
|
5362
|
-
class: y(M(X)("size-4", e.invalid ? "text-red" : "text-
|
|
5363
|
+
class: y(M(X)("size-4", e.invalid ? "text-red-fg" : "text-ink/40")),
|
|
5363
5364
|
"aria-hidden": "true"
|
|
5364
|
-
}, null, 8, ["class"]))]), c("span", { class: y(t.done ? "text-
|
|
5365
|
+
}, null, 8, ["class"]))]), c("span", { class: y(t.done ? "text-ink" : "text-ink/65") }, [u(j(t.label), 1), c("span", rc, j(t.done ? " (done)" : " (to do)"), 1)], 2)]))), 128))], 2));
|
|
5365
5366
|
}
|
|
5366
5367
|
});
|
|
5367
5368
|
// src/lib/dates.ts
|
|
5368
|
-
function
|
|
5369
|
+
function ac(e) {
|
|
5369
5370
|
if (e instanceof Date) return e;
|
|
5370
5371
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
5371
5372
|
let [t, n, r] = e.split("-").map(Number);
|
|
@@ -5373,59 +5374,59 @@ function ic(e) {
|
|
|
5373
5374
|
}
|
|
5374
5375
|
return new Date(e);
|
|
5375
5376
|
}
|
|
5376
|
-
var
|
|
5377
|
+
var oc = [
|
|
5377
5378
|
["year", 31536e3],
|
|
5378
5379
|
["month", 2592e3],
|
|
5379
5380
|
["week", 604800],
|
|
5380
5381
|
["day", 86400],
|
|
5381
5382
|
["hour", 3600],
|
|
5382
5383
|
["minute", 60]
|
|
5383
|
-
],
|
|
5384
|
-
function
|
|
5385
|
-
let n = Math.round((
|
|
5384
|
+
], sc = new Intl.RelativeTimeFormat("en-GB", { numeric: "auto" });
|
|
5385
|
+
function cc(e, t = /* @__PURE__ */ new Date()) {
|
|
5386
|
+
let n = Math.round((ac(e).getTime() - t.getTime()) / 1e3);
|
|
5386
5387
|
if (Math.abs(n) < 60) return "Just now";
|
|
5387
|
-
for (let [e, t] of
|
|
5388
|
-
let r =
|
|
5388
|
+
for (let [e, t] of oc) if (Math.abs(n) >= t) {
|
|
5389
|
+
let r = sc.format(Math.trunc(n / t), e);
|
|
5389
5390
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
5390
5391
|
}
|
|
5391
5392
|
return "Just now";
|
|
5392
5393
|
}
|
|
5393
|
-
function
|
|
5394
|
-
let t =
|
|
5394
|
+
function lc(e) {
|
|
5395
|
+
let t = ac(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
|
|
5395
5396
|
hour: "2-digit",
|
|
5396
5397
|
minute: "2-digit"
|
|
5397
5398
|
});
|
|
5398
|
-
return `${n} ${
|
|
5399
|
+
return `${n} ${uc(t)} at ${r}`;
|
|
5399
5400
|
}
|
|
5400
|
-
function
|
|
5401
|
-
return
|
|
5401
|
+
function uc(e) {
|
|
5402
|
+
return ac(e).toLocaleDateString("en-GB", {
|
|
5402
5403
|
day: "numeric",
|
|
5403
5404
|
month: "long",
|
|
5404
5405
|
year: "numeric"
|
|
5405
5406
|
});
|
|
5406
5407
|
}
|
|
5407
|
-
function
|
|
5408
|
-
let n =
|
|
5408
|
+
function dc(e, t = /* @__PURE__ */ new Date()) {
|
|
5409
|
+
let n = ac(e), r = t.getFullYear() - n.getFullYear(), i = t.getMonth() - n.getMonth();
|
|
5409
5410
|
return (i < 0 || i === 0 && t.getDate() < n.getDate()) && r--, r;
|
|
5410
5411
|
}
|
|
5411
|
-
function
|
|
5412
|
-
let n =
|
|
5412
|
+
function fc(e, t = /* @__PURE__ */ new Date()) {
|
|
5413
|
+
let n = ac(e), r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), i = (e) => {
|
|
5413
5414
|
let t = new Date(e, n.getMonth(), n.getDate());
|
|
5414
5415
|
return t.getMonth() === n.getMonth() ? t : new Date(e, 2, 1);
|
|
5415
5416
|
}, a = i(r.getFullYear());
|
|
5416
5417
|
return a < r && (a = i(r.getFullYear() + 1)), Math.round((a.getTime() - r.getTime()) / 864e5);
|
|
5417
5418
|
}
|
|
5418
5419
|
// src/lib/useNow.ts
|
|
5419
|
-
var
|
|
5420
|
-
function
|
|
5420
|
+
var pc = E(/* @__PURE__ */ new Date()), mc = 0, hc;
|
|
5421
|
+
function gc() {
|
|
5421
5422
|
return C(() => {
|
|
5422
|
-
|
|
5423
|
+
mc++ === 0 && (pc.value = /* @__PURE__ */ new Date(), hc = setInterval(() => pc.value = /* @__PURE__ */ new Date(), 3e4));
|
|
5423
5424
|
}), S(() => {
|
|
5424
|
-
--
|
|
5425
|
-
}),
|
|
5425
|
+
--mc === 0 && clearInterval(hc);
|
|
5426
|
+
}), pc;
|
|
5426
5427
|
}
|
|
5427
5428
|
// src/components/RelativeTime/RelativeTime.vue?vue&type=script&setup=true&lang.ts
|
|
5428
|
-
var
|
|
5429
|
+
var _c = ["datetime"], vc = /* @__PURE__ */ f({
|
|
5429
5430
|
__name: "RelativeTime",
|
|
5430
5431
|
props: {
|
|
5431
5432
|
date: {},
|
|
@@ -5440,17 +5441,17 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5440
5441
|
] }
|
|
5441
5442
|
},
|
|
5442
5443
|
setup(e) {
|
|
5443
|
-
let t = e, n =
|
|
5444
|
-
return (e, n) => (w(), a(
|
|
5444
|
+
let t = e, n = gc(), r = i(() => ac(t.date)), o = i(() => cc(r.value, t.now ?? n.value)), s = i(() => t.tooltip ? t.tooltip(r.value) : lc(r.value));
|
|
5445
|
+
return (e, n) => (w(), a(yo, { text: s.value }, {
|
|
5445
5446
|
default: V(() => [c("time", {
|
|
5446
5447
|
datetime: r.value.toISOString(),
|
|
5447
5448
|
tabindex: "0",
|
|
5448
5449
|
class: y(M(X)("cursor-default rounded-sm underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", t.class))
|
|
5449
|
-
}, j(o.value), 11,
|
|
5450
|
+
}, j(o.value), 11, _c)]),
|
|
5450
5451
|
_: 1
|
|
5451
5452
|
}, 8, ["text"]));
|
|
5452
5453
|
}
|
|
5453
|
-
}),
|
|
5454
|
+
}), yc = ["data-birth-date"], bc = /* @__PURE__ */ f({
|
|
5454
5455
|
__name: "Age",
|
|
5455
5456
|
props: {
|
|
5456
5457
|
birthDate: {},
|
|
@@ -5465,26 +5466,26 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5465
5466
|
] }
|
|
5466
5467
|
},
|
|
5467
5468
|
setup(e) {
|
|
5468
|
-
let { t } = K(), r = e, l =
|
|
5469
|
-
let e =
|
|
5470
|
-
return `${t("ui.age.born", { date:
|
|
5469
|
+
let { t } = K(), r = e, l = gc(), d = i(() => ac(r.birthDate)), f = i(() => r.now ?? l.value), p = i(() => dc(d.value, f.value)), m = i(() => {
|
|
5470
|
+
let e = fc(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 })}` : "";
|
|
5471
|
+
return `${t("ui.age.born", { date: uc(d.value) })}${n}`;
|
|
5471
5472
|
}), h = i(() => {
|
|
5472
5473
|
let e = d.value;
|
|
5473
5474
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
5474
5475
|
});
|
|
5475
|
-
return (t, i) => (w(), a(
|
|
5476
|
+
return (t, i) => (w(), a(yo, { text: m.value }, {
|
|
5476
5477
|
default: V(() => [c("span", {
|
|
5477
5478
|
tabindex: "0",
|
|
5478
5479
|
"data-birth-date": h.value,
|
|
5479
5480
|
class: y(M(X)("cursor-default rounded-sm tabular-nums underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", r.class))
|
|
5480
|
-
}, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10,
|
|
5481
|
+
}, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10, yc)]),
|
|
5481
5482
|
_: 1
|
|
5482
5483
|
}, 8, ["text"]));
|
|
5483
5484
|
}
|
|
5484
|
-
}),
|
|
5485
|
-
class: "text-sm text-
|
|
5485
|
+
}), xc = {
|
|
5486
|
+
class: "text-sm text-ink/65",
|
|
5486
5487
|
"aria-live": "polite"
|
|
5487
|
-
},
|
|
5488
|
+
}, Sc = { class: "text-ink" }, Cc = /* @__PURE__ */ f({
|
|
5488
5489
|
__name: "Steps",
|
|
5489
5490
|
props: {
|
|
5490
5491
|
steps: {},
|
|
@@ -5500,16 +5501,16 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5500
5501
|
},
|
|
5501
5502
|
setup(e) {
|
|
5502
5503
|
let t = e;
|
|
5503
|
-
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [c("p",
|
|
5504
|
+
return (n, r) => (w(), s("div", { class: y(M(X)("flex flex-col gap-3", t.class)) }, [c("p", xc, [d(M(W), {
|
|
5504
5505
|
keypath: "ui.steps.stepOfNamed",
|
|
5505
5506
|
scope: "global",
|
|
5506
5507
|
tag: "span"
|
|
5507
5508
|
}, {
|
|
5508
5509
|
current: V(() => [u(j(e.step + 1), 1)]),
|
|
5509
5510
|
total: V(() => [u(j(e.steps.length), 1)]),
|
|
5510
|
-
name: V(() => [c("span",
|
|
5511
|
+
name: V(() => [c("span", Sc, j(e.steps[e.step]), 1)]),
|
|
5511
5512
|
_: 1
|
|
5512
|
-
})]), d(
|
|
5513
|
+
})]), d(_i, {
|
|
5513
5514
|
label: e.label,
|
|
5514
5515
|
segments: "",
|
|
5515
5516
|
value: e.step + 1,
|
|
@@ -5520,7 +5521,7 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5520
5521
|
"max"
|
|
5521
5522
|
])], 2));
|
|
5522
5523
|
}
|
|
5523
|
-
}),
|
|
5524
|
+
}), wc = /* @__PURE__ */ f({
|
|
5524
5525
|
__name: "Tabs",
|
|
5525
5526
|
props: /*@__PURE__*/ g({
|
|
5526
5527
|
tabs: {},
|
|
@@ -5539,10 +5540,10 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5539
5540
|
emits: ["update:modelValue"],
|
|
5540
5541
|
setup(e) {
|
|
5541
5542
|
let t = e, r = F(e, "modelValue"), i = [
|
|
5542
|
-
"relative inline-flex h-10 items-center gap-2 px-3 text-sm whitespace-nowrap text-
|
|
5543
|
+
"relative inline-flex h-10 items-center gap-2 px-3 text-sm whitespace-nowrap text-ink/65 outline-none",
|
|
5543
5544
|
"[&_svg]:size-4 [&_svg]:shrink-0",
|
|
5544
|
-
"not-data-disabled:hover:text-
|
|
5545
|
-
"data-[state=active]:font-bold data-[state=active]:text-primary",
|
|
5545
|
+
"not-data-disabled:hover:text-ink",
|
|
5546
|
+
"data-[state=active]:font-bold data-[state=active]:text-primary-fg",
|
|
5546
5547
|
"focus-visible:rounded focus-visible:ring-2 focus-visible:ring-primary",
|
|
5547
5548
|
"data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
5548
5549
|
];
|
|
@@ -5553,7 +5554,7 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5553
5554
|
}, {
|
|
5554
5555
|
default: V(() => [d(M(dn), {
|
|
5555
5556
|
"aria-label": e.label,
|
|
5556
|
-
class: "relative flex overflow-x-auto overflow-y-hidden border-b border-
|
|
5557
|
+
class: "relative flex overflow-x-auto overflow-y-hidden border-b border-ink/10"
|
|
5557
5558
|
}, {
|
|
5558
5559
|
default: V(() => [(w(!0), s(n, null, D(e.tabs, (e) => (w(), a(M(pn), {
|
|
5559
5560
|
key: e.value,
|
|
@@ -5582,11 +5583,11 @@ var gc = ["datetime"], _c = /* @__PURE__ */ f({
|
|
|
5582
5583
|
_: 3
|
|
5583
5584
|
}, 8, ["model-value", "class"]));
|
|
5584
5585
|
}
|
|
5585
|
-
}),
|
|
5586
|
-
function
|
|
5586
|
+
}), Tc = 0, Ec = () => `notification-${Date.now().toString(36)}-${(Tc++).toString(36)}`;
|
|
5587
|
+
function Dc(e, t) {
|
|
5587
5588
|
return t === void 0 ? e.type === "error" ? Infinity : e.action ? e.compact ? 1e4 : Infinity : 6e3 : t;
|
|
5588
5589
|
}
|
|
5589
|
-
function
|
|
5590
|
+
function Oc(e = []) {
|
|
5590
5591
|
let t = T({
|
|
5591
5592
|
items: e.map(n).sort((e, t) => t.createdAt.getTime() - e.createdAt.getTime()),
|
|
5592
5593
|
toasts: [],
|
|
@@ -5596,7 +5597,7 @@ function Dc(e = []) {
|
|
|
5596
5597
|
function n(e) {
|
|
5597
5598
|
return {
|
|
5598
5599
|
...e,
|
|
5599
|
-
id: e.id ??
|
|
5600
|
+
id: e.id ?? Ec(),
|
|
5600
5601
|
type: e.type ?? "info",
|
|
5601
5602
|
createdAt: e.createdAt ?? /* @__PURE__ */ new Date(),
|
|
5602
5603
|
read: e.read ?? !1
|
|
@@ -5606,7 +5607,7 @@ function Dc(e = []) {
|
|
|
5606
5607
|
let i = n(e);
|
|
5607
5608
|
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), {
|
|
5608
5609
|
id: i.id,
|
|
5609
|
-
duration:
|
|
5610
|
+
duration: Dc(i, r.duration),
|
|
5610
5611
|
item: i
|
|
5611
5612
|
}]), i.id;
|
|
5612
5613
|
}
|
|
@@ -5655,25 +5656,25 @@ function Dc(e = []) {
|
|
|
5655
5656
|
markAllRead: c
|
|
5656
5657
|
};
|
|
5657
5658
|
}
|
|
5658
|
-
var
|
|
5659
|
-
function
|
|
5660
|
-
return
|
|
5659
|
+
var kc;
|
|
5660
|
+
function Ac() {
|
|
5661
|
+
return kc ??= Oc();
|
|
5661
5662
|
}
|
|
5662
5663
|
// src/components/Notification/Notification.vue?vue&type=script&setup=true&lang.ts
|
|
5663
|
-
var
|
|
5664
|
+
var jc = { class: "sr-only" }, Mc = {
|
|
5664
5665
|
key: 0,
|
|
5665
|
-
class: "text-
|
|
5666
|
-
}, Mc = {
|
|
5667
|
-
key: 1,
|
|
5668
|
-
class: "flex items-center gap-1.5 text-xs text-black/65"
|
|
5666
|
+
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"
|
|
5669
5667
|
}, Nc = {
|
|
5668
|
+
key: 1,
|
|
5669
|
+
class: "flex items-center gap-1.5 text-xs text-ink/65"
|
|
5670
|
+
}, Pc = {
|
|
5670
5671
|
key: 0,
|
|
5671
5672
|
class: "size-2 shrink-0 rounded-full bg-primary",
|
|
5672
5673
|
"aria-hidden": "true"
|
|
5673
|
-
},
|
|
5674
|
+
}, Fc = {
|
|
5674
5675
|
key: 1,
|
|
5675
5676
|
class: "sr-only"
|
|
5676
|
-
},
|
|
5677
|
+
}, Ic = ["href"], Lc = /* @__PURE__ */ f({
|
|
5677
5678
|
__name: "Notification",
|
|
5678
5679
|
props: {
|
|
5679
5680
|
type: { default: "info" },
|
|
@@ -5703,22 +5704,22 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5703
5704
|
let { t: n } = K(), r = e, l = t, f = `${P()}-title`, p = {
|
|
5704
5705
|
info: {
|
|
5705
5706
|
icon: Te,
|
|
5706
|
-
colour: "text-blue",
|
|
5707
|
+
colour: "text-blue-fg",
|
|
5707
5708
|
word: "Information"
|
|
5708
5709
|
},
|
|
5709
5710
|
success: {
|
|
5710
5711
|
icon: ve,
|
|
5711
|
-
colour: "text-green",
|
|
5712
|
+
colour: "text-green-fg",
|
|
5712
5713
|
word: "Success"
|
|
5713
5714
|
},
|
|
5714
5715
|
warning: {
|
|
5715
5716
|
icon: Re,
|
|
5716
|
-
colour: "text-yellow",
|
|
5717
|
+
colour: "text-yellow-fg",
|
|
5717
5718
|
word: "Warning"
|
|
5718
5719
|
},
|
|
5719
5720
|
error: {
|
|
5720
5721
|
icon: be,
|
|
5721
|
-
colour: "text-red",
|
|
5722
|
+
colour: "text-red-fg",
|
|
5722
5723
|
word: "Error"
|
|
5723
5724
|
}
|
|
5724
5725
|
}, m = () => typeof r.description == "function" ? r.description() : r.description, h = i(() => r.compact && r.appearance === "card");
|
|
@@ -5728,7 +5729,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5728
5729
|
return (t, i) => (w(), s("div", {
|
|
5729
5730
|
"aria-labelledby": f,
|
|
5730
5731
|
role: "group",
|
|
5731
|
-
class: y(M(X)("relative flex text-sm text-
|
|
5732
|
+
class: y(M(X)("relative flex text-sm text-ink", h.value ? "items-center gap-3" : "gap-3", e.appearance === "row" ? "px-4 py-3" : "rounded border border-ink/10 bg-surface shadow-xs", e.appearance === "card" && (h.value ? M(X)("py-1.5 pl-5", e.dismissible ? "pr-1.5" : "pr-4") : "py-4 pr-4 pl-5"), e.appearance === "row" && e.unread && "bg-blue-fg/5", r.class))
|
|
5732
5733
|
}, [
|
|
5733
5734
|
(w(), a(k(p[e.type].icon), {
|
|
5734
5735
|
class: y(M(X)("size-4 shrink-0", !h.value && "mt-0.5", p[e.type].colour)),
|
|
@@ -5738,12 +5739,12 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5738
5739
|
c("p", {
|
|
5739
5740
|
id: f,
|
|
5740
5741
|
class: y(M(X)("font-bold", h.value && "min-w-0 flex-1 py-1"))
|
|
5741
|
-
}, [c("span",
|
|
5742
|
-
!h.value && (e.description || t.$slots.default) ? (w(), s("div",
|
|
5743
|
-
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p",
|
|
5744
|
-
e.unread ? (w(), s("span",
|
|
5745
|
-
e.unread ? (w(), s("span",
|
|
5746
|
-
e.createdAt ? (w(), a(
|
|
5742
|
+
}, [c("span", jc, j(p[e.type].word) + ": ", 1), u(j(e.title), 1)], 2),
|
|
5743
|
+
!h.value && (e.description || t.$slots.default) ? (w(), s("div", Mc, [O(t.$slots, "default", {}, () => [d(m)])])) : o("", !0),
|
|
5744
|
+
e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p", Nc, [
|
|
5745
|
+
e.unread ? (w(), s("span", Pc)) : o("", !0),
|
|
5746
|
+
e.unread ? (w(), s("span", Fc, "Unread, ")) : o("", !0),
|
|
5747
|
+
e.createdAt ? (w(), a(vc, {
|
|
5747
5748
|
key: 2,
|
|
5748
5749
|
date: e.createdAt,
|
|
5749
5750
|
now: e.now
|
|
@@ -5758,7 +5759,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5758
5759
|
"as-child": "",
|
|
5759
5760
|
onClick: g
|
|
5760
5761
|
}, {
|
|
5761
|
-
default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9,
|
|
5762
|
+
default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9, Ic)]),
|
|
5762
5763
|
_: 1
|
|
5763
5764
|
})) : e.action ? (w(), a(Z, {
|
|
5764
5765
|
key: 1,
|
|
@@ -5784,11 +5785,11 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5784
5785
|
}, 8, ["class", "aria-label"])) : o("", !0)
|
|
5785
5786
|
], 2));
|
|
5786
5787
|
}
|
|
5787
|
-
}),
|
|
5788
|
+
}), Rc = {
|
|
5788
5789
|
key: 0,
|
|
5789
|
-
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-
|
|
5790
|
+
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",
|
|
5790
5791
|
"aria-hidden": "true"
|
|
5791
|
-
},
|
|
5792
|
+
}, zc = { class: "flex h-11 shrink-0 items-center justify-between gap-2 border-b border-ink/10 pr-2 pl-4" }, Bc = ["inert"], Vc = /* @__PURE__ */ f({
|
|
5792
5793
|
__name: "NotificationPane",
|
|
5793
5794
|
props: /*@__PURE__*/ g({
|
|
5794
5795
|
notifications: {},
|
|
@@ -5804,7 +5805,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5804
5805
|
}),
|
|
5805
5806
|
emits: ["update:open"],
|
|
5806
5807
|
setup(e) {
|
|
5807
|
-
let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ??
|
|
5808
|
+
let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ?? Ac()), 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", {
|
|
5808
5809
|
label: g.value,
|
|
5809
5810
|
count: h.value
|
|
5810
5811
|
}) : g.value), b = `${P()}-heading`, x = E(), S = E();
|
|
@@ -5840,7 +5841,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5840
5841
|
easing: "cubic-bezier(0, 0, 0.2, 1)"
|
|
5841
5842
|
});
|
|
5842
5843
|
}
|
|
5843
|
-
return (r, i) => (w(), a(
|
|
5844
|
+
return (r, i) => (w(), a(tr, {
|
|
5844
5845
|
open: l.value,
|
|
5845
5846
|
"onUpdate:open": i[1] ||= (e) => l.value = e,
|
|
5846
5847
|
content: {
|
|
@@ -5854,7 +5855,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5854
5855
|
ref: C,
|
|
5855
5856
|
"aria-labelledby": b,
|
|
5856
5857
|
class: "flex min-h-0 flex-col"
|
|
5857
|
-
}, [c("div",
|
|
5858
|
+
}, [c("div", zc, [c("h2", {
|
|
5858
5859
|
id: b,
|
|
5859
5860
|
ref_key: "heading",
|
|
5860
5861
|
ref: x,
|
|
@@ -5878,8 +5879,8 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5878
5879
|
onAnimationend: i[0] ||= ee((e) => T.value && I(), ["self"])
|
|
5879
5880
|
}, [(w(!0), s(n, null, D(p.value, (e, t) => (w(), s("li", {
|
|
5880
5881
|
key: e.id,
|
|
5881
|
-
class: "border-b border-
|
|
5882
|
-
}, [d(
|
|
5882
|
+
class: "border-b border-ink/10 last:border-b-0"
|
|
5883
|
+
}, [d(Lc, {
|
|
5883
5884
|
appearance: "row",
|
|
5884
5885
|
type: e.type,
|
|
5885
5886
|
title: e.title,
|
|
@@ -5898,7 +5899,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5898
5899
|
"unread",
|
|
5899
5900
|
"onDismiss",
|
|
5900
5901
|
"onAction"
|
|
5901
|
-
])]))), 128))], 42,
|
|
5902
|
+
])]))), 128))], 42, Bc)) : (w(), a(_s, {
|
|
5902
5903
|
key: 1,
|
|
5903
5904
|
size: "sm",
|
|
5904
5905
|
icon: M(se),
|
|
@@ -5917,13 +5918,13 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5917
5918
|
"aria-label": _.value,
|
|
5918
5919
|
class: y(M(X)("relative overflow-visible", e.ui?.trigger))
|
|
5919
5920
|
}, {
|
|
5920
|
-
default: V(() => [d(M(oe)), m.value ? (w(), s("span",
|
|
5921
|
+
default: V(() => [d(M(oe)), m.value ? (w(), s("span", Rc, j(h.value), 1)) : o("", !0)]),
|
|
5921
5922
|
_: 1
|
|
5922
5923
|
}, 8, ["aria-label", "class"])]),
|
|
5923
5924
|
_: 1
|
|
5924
5925
|
}, 8, ["open", "ui"]));
|
|
5925
5926
|
}
|
|
5926
|
-
}),
|
|
5927
|
+
}), Hc = { class: "in-data-expanded:hidden" }, Uc = { class: "hidden in-data-expanded:inline" }, Wc = { class: "sr-only" }, Gc = 8, Kc = .5, qc = 80, Jc = /* @__PURE__ */ f({
|
|
5927
5928
|
__name: "Toaster",
|
|
5928
5929
|
props: {
|
|
5929
5930
|
notifications: {},
|
|
@@ -5940,15 +5941,15 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
5940
5941
|
},
|
|
5941
5942
|
emits: ["more"],
|
|
5942
5943
|
setup(e, { emit: t }) {
|
|
5943
|
-
let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ??
|
|
5944
|
+
let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ?? Ac()), m = i(() => l.position === "top-right"), h = E(typeof window > "u" ? 800 : window.innerHeight), g = () => h.value = window.innerHeight;
|
|
5944
5945
|
C(() => window.addEventListener("resize", g)), S(() => window.removeEventListener("resize", g));
|
|
5945
|
-
let _ = i(() => Math.max(h.value -
|
|
5946
|
-
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) +
|
|
5946
|
+
let _ = i(() => Math.max(h.value - qc, 108)), b = (e) => e.compact ? 42 : e.action ? 116 : e.description ? 78 : 56, O = i(() => {
|
|
5947
|
+
let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) + Gc, -8), i = /* @__PURE__ */ new Set();
|
|
5947
5948
|
if (r <= _.value) n.forEach((e) => i.add(e.id));
|
|
5948
5949
|
else {
|
|
5949
5950
|
let e = 44;
|
|
5950
5951
|
for (let r of n) {
|
|
5951
|
-
let n = e + t(r) + (i.size ?
|
|
5952
|
+
let n = e + t(r) + (i.size ? Gc : 0);
|
|
5952
5953
|
if (i.size && n > _.value) break;
|
|
5953
5954
|
i.add(r.id), e = n;
|
|
5954
5955
|
}
|
|
@@ -6003,16 +6004,16 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6003
6004
|
}
|
|
6004
6005
|
let J = i(() => {
|
|
6005
6006
|
let e = k.value.filter((e) => !W.has(e.id)), t = /* @__PURE__ */ new Map(), n = [], r = 0;
|
|
6006
|
-
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) +
|
|
6007
|
-
let i = Math.max(r -
|
|
6007
|
+
for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) + Gc;
|
|
6008
|
+
let i = Math.max(r - Gc, 0), a = Math.min(l.maxHeight, _.value), o = 0;
|
|
6008
6009
|
for (; o < e.length && (o === 0 || n[o] + (L.get(e[o].id) ?? 0) <= a);) o++;
|
|
6009
|
-
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u +
|
|
6010
|
+
let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u + Gc;
|
|
6010
6011
|
e.forEach((r, i) => {
|
|
6011
6012
|
let a = i >= o;
|
|
6012
6013
|
t.set(r.id, {
|
|
6013
6014
|
spread: n[i],
|
|
6014
6015
|
stacked: a ? d : n[i],
|
|
6015
|
-
scale: a ?
|
|
6016
|
+
scale: a ? Kc : 1,
|
|
6016
6017
|
opacity: +!a,
|
|
6017
6018
|
z: e.length - i
|
|
6018
6019
|
});
|
|
@@ -6023,7 +6024,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6023
6024
|
places: t,
|
|
6024
6025
|
spreadHeight: i + (A.value > 0 ? 44 : 0),
|
|
6025
6026
|
stackedHeight: p,
|
|
6026
|
-
moreOffset: i + (i ?
|
|
6027
|
+
moreOffset: i + (i ? Gc : 0),
|
|
6027
6028
|
notInView: f,
|
|
6028
6029
|
pillOffset: d
|
|
6029
6030
|
};
|
|
@@ -6032,10 +6033,10 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6032
6033
|
let t = W.has(e) ? G.get(e) : J.value.places.get(e), n = m.value ? 1 : -1, r = (e) => `${n * e}px`, i = {
|
|
6033
6034
|
"--toast-spread": r(J.value.moreOffset),
|
|
6034
6035
|
"--toast-stacked": r(J.value.pillOffset),
|
|
6035
|
-
"--toast-scale":
|
|
6036
|
+
"--toast-scale": Kc,
|
|
6036
6037
|
"--toast-opacity": 0,
|
|
6037
6038
|
"--toast-spread-opacity": 0,
|
|
6038
|
-
"--toast-spread-scale":
|
|
6039
|
+
"--toast-spread-scale": Kc,
|
|
6039
6040
|
"--toast-z": 0
|
|
6040
6041
|
};
|
|
6041
6042
|
if (!t && N.has(e) || t && !U.has(e) && P.has(e)) return i;
|
|
@@ -6093,7 +6094,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6093
6094
|
class: y(M(X)("absolute inset-x-0 z-(--toast-z) list-none rounded", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", m.value ? "top-0 origin-top" : "bottom-0 origin-bottom", "translate-y-(--toast-stacked) scale-(--toast-scale) opacity-(--toast-opacity)", "data-expanded:translate-y-(--toast-spread) data-expanded:scale-(--toast-spread-scale) data-expanded:opacity-(--toast-spread-opacity)", "transition-[translate,scale,opacity] duration-300 ease-out motion-reduce:transition-none", "data-[state=closed]:animate-fade-out", "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=move]:transition-none", "data-[swipe=cancel]:translate-x-0", "data-[swipe=end]:animate-slide-out-right")),
|
|
6094
6095
|
"onUpdate:open": (t) => q(e.id, t)
|
|
6095
6096
|
}, {
|
|
6096
|
-
default: V(() => [d(
|
|
6097
|
+
default: V(() => [d(Lc, {
|
|
6097
6098
|
ref_for: !0,
|
|
6098
6099
|
ref: (t) => H(e.id, t),
|
|
6099
6100
|
type: e.item.type,
|
|
@@ -6134,9 +6135,9 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6134
6135
|
class: y(M(X)("absolute inset-x-0 z-0 flex list-none justify-center", m.value ? "top-0" : "bottom-0", "translate-y-(--toast-pill) transition-[translate,opacity,visibility] duration-300 ease-out motion-reduce:transition-none", A.value ? "in-data-expanded:translate-y-(--toast-more)" : "in-data-expanded:invisible in-data-expanded:opacity-0 in-data-expanded:duration-150"))
|
|
6135
6136
|
}, [c("button", {
|
|
6136
6137
|
type: "button",
|
|
6137
|
-
class: y(M(X)("flex cursor-pointer items-center justify-center overflow-hidden border border-
|
|
6138
|
+
class: y(M(X)("flex cursor-pointer items-center justify-center overflow-hidden border border-ink/10 bg-surface font-bold whitespace-nowrap text-ink shadow-md hover:bg-surface-hover", "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")),
|
|
6138
6139
|
onClick: ie
|
|
6139
|
-
}, [A.value ? (w(), s(n, { key: 0 }, [c("span",
|
|
6140
|
+
}, [A.value ? (w(), s(n, { key: 0 }, [c("span", Hc, j(M(r)("ui.notifications.more", { count: J.value.notInView })), 1), c("span", Uc, j(M(r)("ui.notifications.more", { count: A.value })), 1)], 64)) : (w(), s(n, { key: 1 }, [u(j(M(r)("ui.notifications.more", { count: J.value.notInView })), 1)], 64)), c("span", Wc, "\xA0" + j(M(r)("ui.notifications.notifications")), 1)], 2)], 6)) : o("", !0)]),
|
|
6140
6141
|
_: 1
|
|
6141
6142
|
}, 8, [
|
|
6142
6143
|
"label",
|
|
@@ -6146,14 +6147,14 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6146
6147
|
_: 1
|
|
6147
6148
|
}, 8, ["label"]));
|
|
6148
6149
|
}
|
|
6149
|
-
}),
|
|
6150
|
+
}), Yc = {
|
|
6150
6151
|
key: 0,
|
|
6151
6152
|
"aria-hidden": "true",
|
|
6152
6153
|
class: "h-20"
|
|
6153
|
-
},
|
|
6154
|
+
}, Xc = ["aria-label"], Zc = { 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" }, Qc = {
|
|
6154
6155
|
role: "status",
|
|
6155
6156
|
class: "flex items-center gap-2 text-sm font-bold"
|
|
6156
|
-
},
|
|
6157
|
+
}, $c = { class: "flex shrink-0 items-center gap-2" }, el = /* @__PURE__ */ f({
|
|
6157
6158
|
__name: "UnsavedChangesBar",
|
|
6158
6159
|
props: {
|
|
6159
6160
|
open: { type: Boolean },
|
|
@@ -6176,7 +6177,7 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6176
6177
|
emits: ["discard", "save"],
|
|
6177
6178
|
setup(e, { emit: t }) {
|
|
6178
6179
|
let { t: a } = K(), l = e, f = t, p = i(() => l.status === "loading");
|
|
6179
|
-
return (t, i) => (w(), s(n, null, [e.open && e.reserveSpace ? (w(), s("div",
|
|
6180
|
+
return (t, i) => (w(), s(n, null, [e.open && e.reserveSpace ? (w(), s("div", Yc)) : o("", !0), d(r, {
|
|
6180
6181
|
"enter-active-class": "transition duration-300 ease-out motion-reduce:transition-none",
|
|
6181
6182
|
"leave-active-class": "transition duration-200 ease-in motion-reduce:transition-none",
|
|
6182
6183
|
"enter-from-class": "translate-y-full motion-reduce:translate-y-0 motion-reduce:opacity-0",
|
|
@@ -6187,10 +6188,10 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6187
6188
|
role: "region",
|
|
6188
6189
|
"aria-label": e.message ?? M(a)("ui.unsavedChangesBar.message"),
|
|
6189
6190
|
class: y(M(X)("fixed inset-x-0 bottom-0 z-40 flex justify-center px-4 pb-4 pointer-events-none", l.class))
|
|
6190
|
-
}, [c("div",
|
|
6191
|
+
}, [c("div", Zc, [c("p", Qc, [i[2] ||= c("span", {
|
|
6191
6192
|
"aria-hidden": "true",
|
|
6192
6193
|
class: "size-2 shrink-0 rounded-full bg-yellow"
|
|
6193
|
-
}, null, -1), u(" " + j(e.message ?? M(a)("ui.unsavedChangesBar.message")), 1)]), c("div",
|
|
6194
|
+
}, null, -1), u(" " + j(e.message ?? M(a)("ui.unsavedChangesBar.message")), 1)]), c("div", $c, [d(Z, {
|
|
6194
6195
|
disabled: p.value,
|
|
6195
6196
|
onClick: i[0] ||= (e) => f("discard")
|
|
6196
6197
|
}, {
|
|
@@ -6204,11 +6205,11 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6204
6205
|
}, {
|
|
6205
6206
|
default: V(() => [u(j(e.saveLabel ?? M(a)("ui.unsavedChangesBar.save")), 1)]),
|
|
6206
6207
|
_: 1
|
|
6207
|
-
}, 8, ["status", "disabled"])])])], 10,
|
|
6208
|
+
}, 8, ["status", "disabled"])])])], 10, Xc)) : o("", !0)]),
|
|
6208
6209
|
_: 1
|
|
6209
6210
|
})], 64));
|
|
6210
6211
|
}
|
|
6211
|
-
}),
|
|
6212
|
+
}), tl = { ui: {
|
|
6212
6213
|
age: {
|
|
6213
6214
|
born: "Born {date}",
|
|
6214
6215
|
birthdayToday: "Birthday today",
|
|
@@ -6337,16 +6338,16 @@ var Ac = { class: "sr-only" }, jc = {
|
|
|
6337
6338
|
discard: "Discard",
|
|
6338
6339
|
save: "Save"
|
|
6339
6340
|
}
|
|
6340
|
-
} },
|
|
6341
|
-
function
|
|
6342
|
-
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(
|
|
6341
|
+
} }, nl = { en: tl };
|
|
6342
|
+
function rl(e = {}) {
|
|
6343
|
+
let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(nl), ...Object.keys(t)])], a = {};
|
|
6343
6344
|
for (let e of i) a[e] = {
|
|
6344
|
-
...
|
|
6345
|
+
...nl[e],
|
|
6345
6346
|
...t[e]
|
|
6346
6347
|
};
|
|
6347
6348
|
let o = G({
|
|
6348
6349
|
legacy: !1,
|
|
6349
|
-
locale: e.locale ??
|
|
6350
|
+
locale: e.locale ?? il(i, n, r),
|
|
6350
6351
|
fallbackLocale: n,
|
|
6351
6352
|
messages: a
|
|
6352
6353
|
});
|
|
@@ -6357,7 +6358,7 @@ function nl(e = {}) {
|
|
|
6357
6358
|
typeof document < "u" && (document.documentElement.lang = e);
|
|
6358
6359
|
}, { immediate: !0 }), o;
|
|
6359
6360
|
}
|
|
6360
|
-
function
|
|
6361
|
+
function il(e, t, n) {
|
|
6361
6362
|
try {
|
|
6362
6363
|
let t = localStorage.getItem(n);
|
|
6363
6364
|
if (t && e.includes(t)) return t;
|
|
@@ -6368,4 +6369,4 @@ function rl(e, t, n) {
|
|
|
6368
6369
|
}
|
|
6369
6370
|
return t;
|
|
6370
6371
|
}
|
|
6371
|
-
export {
|
|
6372
|
+
export { bc as Age, cr as AppLauncher, ji as AppShell, Ur as Avatar, sa as AvatarGroup, ei as Badge, Bi as Breadcrumb, Z as Button, Ja as Calendar, da as Card, gs as CardSelect, Ca as ChangeIndicator, qo as Checkbox, ls as CheckboxGroup, ic as Checklist, ma as Chip, _a as Divider, _s as EmptyState, Er as Footer, Pa as FormField, Qr as Header, Ea as InfoTip, Ia as Input, jo as InputCode, vo as InputDate, za as InputNumber, Eo as InputPassword, So as InputRichText, as as InputTextArea, us as LanguageSwitcher, lr as Link, Vi as Menu, Lc as Notification, Vc as NotificationPane, Yi as PageHeader, tr as Popover, _i as Progress, es as RadioGroup, vc as RelativeTime, Go as Select, ea as SettingsRow, mi as Sidebar, Ei as Slideover, Gn as Spinner, Ks as StatTile, Cc as Steps, tc as SummaryList, rs as Switch, Rs as Table, wc as Tabs, Jc as Toaster, yo as Tooltip, el as UnsavedChangesBar, dc as age, X as cn, rl as createKestonI18n, Oc as createNotifications, fc as daysToBirthday, tl as en, uc as formatDate, lc as formatDateTime, nr as kestonApps, pr as kestonFooterLinks, mr as kestonGroupLinks, cc as relativeTime, ti as sidebarTrail, bs as sortRows, ac as toDate, nl as uiMessages, Ac as useNotifications, gc as useNow };
|